staydevops-ts
No long description provided.
Installation
dagger install github.com/StaytunedLLP/daggerverse@v1.5.0Entrypoint
Return Type
StaydevopsTs Example
dagger -m github.com/StaytunedLLP/daggerverse@8868b6e92b37a75d18343776522922b748f17230 call \
func (m *MyModule) Example() *dagger.StaydevopsTs {
return dag.
StaydevopsTs()
}@function
def example() -> dagger.StaydevopsTs:
return (
dag.staydevops_ts()
)@func()
example(): StaydevopsTs {
return dag
.staydevopsTs()
}Types
StaydevopsTs 🔗
Shared Dagger module for Node/TypeScript repository checks and deployment helpers.
Staydevops-TS is a comprehensive toolkit designed to streamline CI/CD pipelines
for modern TypeScript applications. It provides a suite of high-level Dagger functions
for:
- đ Repository Health: Automated linting, formatting, and build verification.
- đ§Ș Advanced Testing: Integrated Playwright E2E testing with built-in âAffected Testâ discovery.
- đ Firebase Deployment: Streamlined pipelines for Firebase Hosting and App Hosting.
- đŠ Package Release Automation: main-aware PR patch bumps and main-branch npm publishing.
- đ Git Utilities: Helpers for discovering changed files and diff ranges.
Built with performance and security in mind, this module leverages Daggerâs advanced caching and secure secret handling to provide a robust foundation for staytunedllp infrastructure and beyond.
checkPrTitle() 🔗
Validates the PR title according to Conventional Commits naming convention.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| eventFile | File | - |
|
| githubToken | Secret | - |
|
Example
dagger -m github.com/StaytunedLLP/daggerverse@8868b6e92b37a75d18343776522922b748f17230 call \
check-pr-titlefunc (m *MyModule) Example(ctx context.Context) {
return dag.
StaydevopsTs().
CheckPrTitle(ctx)
}@function
async def example() -> None:
return await (
dag.staydevops_ts()
.check_pr_title()
)@func()
async example(): Promise<void> {
return dag
.staydevopsTs()
.checkPrTitle()
}checks() 🔗
Returns the collection of repository checks.
Return Type
StaydevopsTsChecks ! Example
dagger -m github.com/StaytunedLLP/daggerverse@8868b6e92b37a75d18343776522922b748f17230 call \
checksfunc (m *MyModule) Example() *dagger.StaydevopsTsChecks {
return dag.
StaydevopsTs().
Checks()
}@function
def example() -> dagger.StaydevopsTsChecks:
return (
dag.staydevops_ts()
.checks()
)@func()
example(): StaydevopsTsChecks {
return dag
.staydevopsTs()
.checks()
}testPlaywright() 🔗
Orchestrates high-performance Playwright E2E test execution.
Includes advanced features like dependency layering, browser caching, and Staytunedâs âAffected Testâ discovery for lightning-fast feedback loops.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - |
|
| nodeAuthToken | Secret | - |
|
| packagePaths | String ! | "." |
|
| testSelector | String ! | "" |
|
| testScript | String ! | "test:e2e" |
|
| runBuild | Boolean ! | true |
|
| registryScope | String ! | "staytunedllp" |
|
| browsers | String ! | "chromium" |
|
| runAffected | Boolean ! | false |
|
| base | String ! | "origin/main" |
|
| listOnly | Boolean ! | false |
|
| changedFiles | String ! | "" |
|
| skipReferenceChecks | Boolean ! | true | No description provided |
Example
dagger -m github.com/StaytunedLLP/daggerverse@8868b6e92b37a75d18343776522922b748f17230 call \
test-playwright --package-paths string --test-selector string --test-script string --run-build boolean --registry-scope string --browsers string --run-affected boolean --base string --list-only boolean --changed-files string --skip-reference-checks booleanfunc (m *MyModule) Example(ctx context.Context, packagePaths string, testSelector string, testScript string, runBuild bool, registryScope string, browsers string, runAffected bool, base string, listOnly bool, changedFiles string, skipReferenceChecks bool) string {
return dag.
StaydevopsTs().
TestPlaywright(ctxpackagePaths, testSelector, testScript, runBuild, registryScope, browsers, runAffected, base, listOnly, changedFiles, skipReferenceChecks)
}@function
async def example(package_paths: str, test_selector: str, test_script: str, run_build: bool, registry_scope: str, browsers: str, run_affected: bool, base: str, list_only: bool, changed_files: str, skip_reference_checks: bool) -> str:
return await (
dag.staydevops_ts()
.test_playwright(package_paths, test_selector, test_script, run_build, registry_scope, browsers, run_affected, base, list_only, changed_files, skip_reference_checks)
)@func()
async example(packagePaths: string, testSelector: string, testScript: string, runBuild: boolean, registryScope: string, browsers: string, runAffected: boolean, base: string, listOnly: boolean, changedFiles: string, skipReferenceChecks: boolean): Promise<string> {
return dag
.staydevopsTs()
.testPlaywright(packagePaths, testSelector, testScript, runBuild, registryScope, browsers, runAffected, base, listOnly, changedFiles, skipReferenceChecks)
}gitDiff() 🔗
Retrieves an array of changed file paths using git diff.
This is a powerful helper for automating logic based on PR changes.
Return Type
[String ! ] !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - |
|
| mode | String ! | "staged" |
|
| commitRange | String ! | "" |
|
Example
dagger -m github.com/StaytunedLLP/daggerverse@8868b6e92b37a75d18343776522922b748f17230 call \
git-diff --mode string --commit-range stringfunc (m *MyModule) Example(ctx context.Context, mode string, commitRange string) []string {
return dag.
StaydevopsTs().
GitDiff(ctxmode, commitRange)
}@function
async def example(mode: str, commit_range: str) -> List[str]:
return await (
dag.staydevops_ts()
.git_diff(mode, commit_range)
)@func()
async example(mode: string, commitRange: string): Promise<string[]> {
return dag
.staydevopsTs()
.gitDiff(mode, commitRange)
}fbApphosting() 🔗
Unified management of Firebase App Hosting backends.
This function automates the creation, deployment, and deletion of App Hosting
backends, supporting both Personal Access Tokens and Workload Identity Federation (WIF).
When buildBeforeDeploy is enabled for deploys, it also prepares the source
for Vite by writing .env.production from the Firebase web app config and
running the package build before Firebase deploys the backend.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| action | String ! | - |
|
| projectId | String ! | - |
|
| backendId | String ! | - |
|
| source | Directory | - |
|
| rootDir | String ! | "." |
|
| appId | String ! | "" |
|
| region | String ! | "asia-southeast1" |
|
| gcpCredentials | Secret | - |
|
| webappConfig | Secret | - |
|
| extraEnv | Secret | - |
|
| nodeAuthToken | Secret | - |
|
| registryScope | String | - |
|
| wifProvider | String ! | "" |
|
| wifServiceAccount | String ! | "" |
|
| wifOidcToken | Secret | - |
|
| wifAudience | String ! | "" |
|
| buildBeforeDeploy | Boolean ! | false |
|
Example
dagger -m github.com/StaytunedLLP/daggerverse@8868b6e92b37a75d18343776522922b748f17230 call \
fb-apphosting --action string --project-id string --backend-id string --root-dir string --app-id string --region string --wif-provider string --wif-service-account string --wif-audience string --build-before-deploy booleanfunc (m *MyModule) Example(ctx context.Context, action string, projectId string, backendId string, rootDir string, appId string, region string, wifProvider string, wifServiceAccount string, wifAudience string, buildBeforeDeploy bool) string {
return dag.
StaydevopsTs().
FbApphosting(ctx, action, projectId, backendId, rootDir, appId, region, wifProvider, wifServiceAccount, wifAudience, buildBeforeDeploy)
}@function
async def example(action: str, project_id: str, backend_id: str, root_dir: str, app_id: str, region: str, wif_provider: str, wif_service_account: str, wif_audience: str, build_before_deploy: bool) -> str:
return await (
dag.staydevops_ts()
.fb_apphosting(action, project_id, backend_id, root_dir, app_id, region, wif_provider, wif_service_account, wif_audience, build_before_deploy)
)@func()
async example(action: string, projectId: string, backendId: string, rootDir: string, appId: string, region: string, wifProvider: string, wifServiceAccount: string, wifAudience: string, buildBeforeDeploy: boolean): Promise<string> {
return dag
.staydevopsTs()
.fbApphosting(action, projectId, backendId, rootDir, appId, region, wifProvider, wifServiceAccount, wifAudience, buildBeforeDeploy)
}fbWebhosting() 🔗
High-level pipeline for building and deploying Firebase Web Hosting projects.
This function provides a complete âBuild once, deploy anywhereâ workflow by: 1. Preparing a Node workspace with all required dependencies. 2. Injecting Firebase App ID and Web App Config into the frontend environment. 3. Executing the frontend build (e.g. ânpm run buildâ). 4. Authenticating with GCP and deploying to Firebase Hosting.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - |
|
| projectId | String ! | - |
|
| gcpCredentials | Secret ! | - |
|
| appId | String | - |
|
| only | String | - |
|
| frontendDir | String | - |
|
| backendDir | String | - |
|
| firebaseDir | String | - |
|
| webappConfig | Secret | - |
|
| extraEnv | Secret | - |
|
| nodeAuthToken | Secret | - |
|
Example
dagger -m github.com/StaytunedLLP/daggerverse@8868b6e92b37a75d18343776522922b748f17230 call \
fb-webhosting --project-id string --gcp-credentials env:MYSECRETfunc (m *MyModule) Example(ctx context.Context, projectId string, gcpCredentials *dagger.Secret) string {
return dag.
StaydevopsTs().
FbWebhosting(ctxprojectId, gcpCredentials)
}@function
async def example(project_id: str, gcp_credentials: dagger.Secret) -> str:
return await (
dag.staydevops_ts()
.fb_webhosting(project_id, gcp_credentials)
)@func()
async example(projectId: string, gcpCredentials: Secret): Promise<string> {
return dag
.staydevopsTs()
.fbWebhosting(projectId, gcpCredentials)
}releasePackage() 🔗
Production package release pipeline with deterministic PR version sync and main-only publishing.
Use sync-pr-version in pull request workflows to keep package.json and package-lock.json
ahead of the latest base branch patch version without overwriting manual major/minor bumps.
When a bump is needed, the function commits and pushes the update back to the PR branch.
Use publish on the main branch to validate the canonical package version, detect registry
conflicts, publish the package, and push the release tag.
This flow assumes branch protection requires pull requests to be up to date before merging.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| action | String ! | - |
|
| source | Directory | - |
|
| githubToken | Secret ! | - |
|
| repoOwner | String ! | - |
|
| repoName | String ! | - |
|
| registryScope | String | - |
|
| baseBranch | String | - |
|
| packagePath | String | - |
|
| prBranch | String | - |
|
Example
dagger -m github.com/StaytunedLLP/daggerverse@8868b6e92b37a75d18343776522922b748f17230 call \
release-package --action string --github-token env:MYSECRET --repo-owner string --repo-name stringfunc (m *MyModule) Example(ctx context.Context, action string, githubToken *dagger.Secret, repoOwner string, repoName string) string {
return dag.
StaydevopsTs().
ReleasePackage(ctx, action, githubToken, repoOwner, repoName)
}@function
async def example(action: str, github_token: dagger.Secret, repo_owner: str, repo_name: str) -> str:
return await (
dag.staydevops_ts()
.release_package(action, github_token, repo_owner, repo_name)
)@func()
async example(action: string, githubToken: Secret, repoOwner: string, repoName: string): Promise<string> {
return dag
.staydevopsTs()
.releasePackage(action, githubToken, repoOwner, repoName)
}StaydevopsTsChecks 🔗
Collection of repository checks and validation tools for Node.js projects.
This sub-module provides high-performance, cache-efficient workflows for common CI tasks such as formatting, linting, testing, and building. It is designed to work seamlessly in both standard repositories and monorepos.
install() 🔗
Fully prepares a Node.js workspace environment by: 1. Synchronizing repository manifests (.npmrc, package-lock.json). 2. Authenticating with the GitHub Packages registry. 3. Mounting persistent cache volumes for maximum performance. 4. Installing production and development dependencies via ânpm ciâ. 5. (Optional) Provisioning Playwright browsers and system dependencies. 6. (Optional) Bootstrapping Firebase CLI tooling.
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - |
|
| nodeAuthToken | Secret | - |
|
| packagePaths | String ! | "." |
|
| playwrightInstall | Boolean ! | false |
|
| firebaseTools | Boolean ! | false |
|
Example
dagger -m github.com/StaytunedLLP/daggerverse@8868b6e92b37a75d18343776522922b748f17230 call \
checks \
install --package-paths string --playwright-install boolean --firebase-tools booleanfunc (m *MyModule) Example(packagePaths string, playwrightInstall bool, firebaseTools bool) *dagger.Directory {
return dag.
StaydevopsTs().
Checks().
Install(packagePaths, playwrightInstall, firebaseTools)
}@function
def example(package_paths: str, playwright_install: bool, firebase_tools: bool) -> dagger.Directory:
return (
dag.staydevops_ts()
.checks()
.install(package_paths, playwright_install, firebase_tools)
)@func()
example(packagePaths: string, playwrightInstall: boolean, firebaseTools: boolean): Directory {
return dag
.staydevopsTs()
.checks()
.install(packagePaths, playwrightInstall, firebaseTools)
}format() 🔗
Validates repository formatting using the standard npm run format:check command.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - |
|
| nodeAuthToken | Secret | - |
|
Example
dagger -m github.com/StaytunedLLP/daggerverse@8868b6e92b37a75d18343776522922b748f17230 call \
checks \
formatfunc (m *MyModule) Example(ctx context.Context) {
return dag.
StaydevopsTs().
Checks().
Format(ctx)
}@function
async def example() -> None:
return await (
dag.staydevops_ts()
.checks()
.format()
)@func()
async example(): Promise<void> {
return dag
.staydevopsTs()
.checks()
.format()
}lint() 🔗
Executes the repository linter using the standard npm run lint command.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - |
|
| nodeAuthToken | Secret | - |
|
Example
dagger -m github.com/StaytunedLLP/daggerverse@8868b6e92b37a75d18343776522922b748f17230 call \
checks \
lintfunc (m *MyModule) Example(ctx context.Context) {
return dag.
StaydevopsTs().
Checks().
Lint(ctx)
}@function
async def example() -> None:
return await (
dag.staydevops_ts()
.checks()
.lint()
)@func()
async example(): Promise<void> {
return dag
.staydevopsTs()
.checks()
.lint()
}build() 🔗
Verifies that the repository builds successfully using the npm run build command.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - |
|
| nodeAuthToken | Secret | - |
|
Example
dagger -m github.com/StaytunedLLP/daggerverse@8868b6e92b37a75d18343776522922b748f17230 call \
checks \
buildfunc (m *MyModule) Example(ctx context.Context) {
return dag.
StaydevopsTs().
Checks().
Build(ctx)
}@function
async def example() -> None:
return await (
dag.staydevops_ts()
.checks()
.build()
)@func()
async example(): Promise<void> {
return dag
.staydevopsTs()
.checks()
.build()
}test() 🔗
Executes the standard repository test suite using the npm run test command.
Supports intelligent execution of affected tests via runAffected.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - |
|
| nodeAuthToken | Secret | - |
|
| runAffected | Boolean ! | false |
|
| base | String ! | "origin/main" |
|
| changedFiles | String ! | "" |
|
Example
dagger -m github.com/StaytunedLLP/daggerverse@8868b6e92b37a75d18343776522922b748f17230 call \
checks \
test --run-affected boolean --base string --changed-files stringfunc (m *MyModule) Example(ctx context.Context, runAffected bool, base string, changedFiles string) {
return dag.
StaydevopsTs().
Checks().
Test(ctxrunAffected, base, changedFiles)
}@function
async def example(run_affected: bool, base: str, changed_files: str) -> None:
return await (
dag.staydevops_ts()
.checks()
.test(run_affected, base, changed_files)
)@func()
async example(runAffected: boolean, base: string, changedFiles: string): Promise<void> {
return dag
.staydevopsTs()
.checks()
.test(runAffected, base, changedFiles)
}