staydevops-ts
No long description provided.
Installation
dagger install github.com/StaytunedLLP/daggerverse@v1.4.0Entrypoint
Return Type
StaydevopsTs Example
dagger -m github.com/StaytunedLLP/daggerverse@23af7e528d23c64174a5af5e283c0b363f86e2e3 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 Publishing: Deterministic npm publishing with automatic GitHub Release integration.
- đ 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@23af7e528d23c64174a5af5e283c0b363f86e2e3 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@23af7e528d23c64174a5af5e283c0b363f86e2e3 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@23af7e528d23c64174a5af5e283c0b363f86e2e3 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@23af7e528d23c64174a5af5e283c0b363f86e2e3 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).
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 | - |
|
| wifProvider | String ! | "" |
|
| wifServiceAccount | String ! | "" |
|
| wifOidcToken | Secret | - |
|
| wifAudience | String ! | "" |
|
Example
dagger -m github.com/StaytunedLLP/daggerverse@23af7e528d23c64174a5af5e283c0b363f86e2e3 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 stringfunc (m *MyModule) Example(ctx context.Context, action string, projectId string, backendId string, rootDir string, appId string, region string, wifProvider string, wifServiceAccount string, wifAudience string) string {
return dag.
StaydevopsTs().
FbApphosting(ctx, action, projectId, backendId, rootDir, appId, region, wifProvider, wifServiceAccount, wifAudience)
}@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) -> 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)
)@func()
async example(action: string, projectId: string, backendId: string, rootDir: string, appId: string, region: string, wifProvider: string, wifServiceAccount: string, wifAudience: string): Promise<string> {
return dag
.staydevopsTs()
.fbApphosting(action, projectId, backendId, rootDir, appId, region, wifProvider, wifServiceAccount, wifAudience)
}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@23af7e528d23c64174a5af5e283c0b363f86e2e3 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)
}publishPackage() 🔗
Deterministic and secure npm package publishing pipeline.
This function manages the full release lifecycle including: 1. Version validation and conflict checking against the GitHub Packages registry. 2. Automated PR-based pre-release versioning (e.g. 1.0.0-pre-pr42). 3. Collaborative release finalization for merged Pull Requests. 4. Creation of GitHub Releases and associated git tags.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - |
|
| ref | String ! | - |
|
| eventName | String ! | - |
|
| githubToken | Secret ! | - |
|
| repoOwner | String ! | - |
|
| repoName | String ! | - |
|
| inputBranch | String | - |
|
| releasePrNumber | Integer | - |
|
| registryScope | String | - |
|
Example
dagger -m github.com/StaytunedLLP/daggerverse@23af7e528d23c64174a5af5e283c0b363f86e2e3 call \
publish-package --ref string --event-name string --github-token env:MYSECRET --repo-owner string --repo-name stringfunc (m *MyModule) Example(ctx context.Context, ref string, eventName string, githubToken *dagger.Secret, repoOwner string, repoName string) string {
return dag.
StaydevopsTs().
PublishPackage(ctxref, eventName, githubToken, repoOwner, repoName)
}@function
async def example(ref: str, event_name: str, github_token: dagger.Secret, repo_owner: str, repo_name: str) -> str:
return await (
dag.staydevops_ts()
.publish_package(ref, event_name, github_token, repo_owner, repo_name)
)@func()
async example(ref: string, eventName: string, githubToken: Secret, repoOwner: string, repoName: string): Promise<string> {
return dag
.staydevopsTs()
.publishPackage(ref, eventName, 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@23af7e528d23c64174a5af5e283c0b363f86e2e3 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 | - |
|
Example
dagger -m github.com/StaytunedLLP/daggerverse@23af7e528d23c64174a5af5e283c0b363f86e2e3 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 | - |
|
Example
dagger -m github.com/StaytunedLLP/daggerverse@23af7e528d23c64174a5af5e283c0b363f86e2e3 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 | - |
|
Example
dagger -m github.com/StaytunedLLP/daggerverse@23af7e528d23c64174a5af5e283c0b363f86e2e3 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.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - |
|
Example
dagger -m github.com/StaytunedLLP/daggerverse@23af7e528d23c64174a5af5e283c0b363f86e2e3 call \
checks \
testfunc (m *MyModule) Example(ctx context.Context) {
return dag.
StaydevopsTs().
Checks().
Test(ctx)
}@function
async def example() -> None:
return await (
dag.staydevops_ts()
.checks()
.test()
)@func()
async example(): Promise<void> {
return dag
.staydevopsTs()
.checks()
.test()
}