staydevops-ts
No long description provided.
Installation
dagger install github.com/StaytunedLLP/daggerverse@d508005210c271a66eaa0c03f548f2876dd5fb47Entrypoint
Return Type
StaydevopsTs Example
dagger -m github.com/StaytunedLLP/daggerverse@d508005210c271a66eaa0c03f548f2876dd5fb47 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.
checks() 🔗
Returns the collection of repository checks.
Return Type
StaydevopsTsChecks ! Example
dagger -m github.com/StaytunedLLP/daggerverse@d508005210c271a66eaa0c03f548f2876dd5fb47 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() 🔗
Run Playwright E2E tests for a package inside the provided source tree.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | - Repository source directory containing Playwright tests. |
| nodeAuthToken | Secret | - | - Optional GitHub Packages token secret. Required only when installing private npm packages. |
| packagePaths | String ! | "." | - Package path or comma-separated package paths relative to the source root. The first path is used for build/test execution. |
| testSelector | String ! | "" | - Optional selector/path passed to the npm test script using `--`. |
| testScript | String ! | "test:e2e" | - Npm script to run for tests. Defaults to `test:e2e`. |
| runBuild | Boolean ! | true | - When true, runs `npm run build` before executing tests. |
| registryScope | String ! | "staytunedllp" | - GitHub Packages scope used when authenticating npm. |
| browsers | String ! | "chromium" | - Browser list for Playwright install commands, as a comma-separated string. |
| runAffected | Boolean ! | false | - When true, resolves affected tests from git diff and runs only those selectors. |
| base | String ! | "origin/main" | - Base ref used by affected discovery when `runAffected` is enabled. |
| listOnly | Boolean ! | false | - When true with `runAffected`, returns discovered selectors without running build/tests. |
| changedFiles | String ! | "" | - Optional whitespace/comma-separated file list used instead of git diff in affected discovery. |
Example
dagger -m github.com/StaytunedLLP/daggerverse@d508005210c271a66eaa0c03f548f2876dd5fb47 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 stringfunc (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) string {
return dag.
StaydevopsTs().
TestPlaywright(ctxpackagePaths, testSelector, testScript, runBuild, registryScope, browsers, runAffected, base, listOnly, changedFiles)
}@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) -> 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)
)@func()
async example(packagePaths: string, testSelector: string, testScript: string, runBuild: boolean, registryScope: string, browsers: string, runAffected: boolean, base: string, listOnly: boolean, changedFiles: string): Promise<string> {
return dag
.staydevopsTs()
.testPlaywright(packagePaths, testSelector, testScript, runBuild, registryScope, browsers, runAffected, base, listOnly, changedFiles)
}gitDiff() 🔗
Retrieves an array of changed files based on the specified mode.
Return Type
[String ! ] !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | - The source directory to check for changed files. |
| mode | String ! | "staged" | - The diff mode to use: 'staged', 'previous', or 'between'. |
| commitRange | String ! | "" | - A string specifying the range of commits (required for 'between' mode). |
Example
dagger -m github.com/StaytunedLLP/daggerverse@d508005210c271a66eaa0c03f548f2876dd5fb47 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() 🔗
Performs actions on Firebase App Hosting backends.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| action | String ! | - | - The action to perform: 'deploy' or 'delete'. |
| projectId | String ! | - | - Firebase project ID used for deployment. |
| backendId | String ! | - | - Firebase App Hosting backend identifier. |
| source | Directory | - | - Repository source directory containing the application to deploy (required for deploy). |
| rootDir | String ! | "." | - Application root directory inside the source tree (deploy only). |
| appId | String ! | "" | - Optional Firebase app ID used when creating a backend (deploy only). |
| region | String ! | "asia-southeast1" | - Firebase App Hosting region (deploy only). |
| gcpCredentials | Secret | - | - Optional GCP service account secret. |
| wifProvider | String ! | "" | - Workload Identity Federation provider resource name (deploy only). |
| wifServiceAccount | String ! | "" | - Workload Identity Federation service account email (deploy only). |
| wifOidcToken | Secret | - | - Optional OIDC token secret for WIF authentication (deploy only). |
| wifAudience | String ! | "" | - Optional WIF audience override (deploy only). |
Example
dagger -m github.com/StaytunedLLP/daggerverse@d508005210c271a66eaa0c03f548f2876dd5fb47 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() 🔗
Build and deploy a Firebase web hosting project from the provided source tree.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | - Repository source directory containing the Firebase project and any frontend or backend packages. |
| projectId | String ! | - | - Firebase project ID used for the deploy command and frontend environment generation. |
| gcpCredentials | Secret ! | - | - GCP service account JSON secret used for Firebase deployment authentication. |
| appId | String | - | - Optional Firebase app ID to inject into frontend environment variables before building. |
| only | String | - | - Optional Firebase deploy target selector passed to `firebase deploy --only`. |
| frontendDir | String | - | - Optional frontend package directory to build before deployment, relative to the source root. |
| backendDir | String | - | - Optional backend or secondary package directory whose dependencies should be installed before deployment. |
| firebaseDir | String | - | - Optional directory containing `firebase.json`. Defaults to the workspace root. |
| webappConfig | Secret | - | - Optional secret containing Firebase web app config JSON to write into frontend environment variables. |
| extraEnv | Secret | - | - Optional secret containing extra `.env` lines appended before the frontend build runs. |
| nodeAuthToken | Secret | - | - Optional GitHub Packages token secret. Required only when frontend or backend installs private npm packages. |
Example
dagger -m github.com/StaytunedLLP/daggerverse@d508005210c271a66eaa0c03f548f2876dd5fb47 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 package publishing logic for npm packages. For merged release PRs, this also creates the GitHub Release after publishing the npm package and can finalize release labels.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | - Repository source directory to publish from. |
| ref | String ! | - | - Git ref triggering the workflow (e.g. refs/tags/v1.2.3 for release events). |
| eventName | String ! | - | - GitHub event name (allowed: release, workflow_dispatch). |
| githubToken | Secret ! | - | - GitHub PAT for npm authentication and PR validation. |
| repoOwner | String ! | - | - Repository owner (e.g. StaytunedLLP). |
| repoName | String ! | - | - Repository name (e.g. devops). |
| inputBranch | String | - | - Manual branch input provided for workflow_dispatch. |
| releasePrNumber | Integer | - | - Release PR number to finalize after publishing a merged release commit. |
| registryScope | String | - | - The scope of the npm package (e.g. staytunedllp). |
Example
dagger -m github.com/StaytunedLLP/daggerverse@d508005210c271a66eaa0c03f548f2876dd5fb47 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.
install() 🔗
Install Node dependencies and optionally provision Playwright and Firebase tooling.
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | - Repository source directory to install into the workspace container. |
| nodeAuthToken | Secret | - | - Optional GitHub Packages token secret. Required only when installing private npm packages. |
| packagePaths | String ! | "." | - Package path or comma-separated package paths relative to the source root where npm installs should run. |
| playwrightInstall | Boolean ! | false | - When true, installs Playwright system dependencies and Chromium into the prepared workspace. |
| firebaseTools | Boolean ! | false | - When true, installs Firebase CLI tooling in the prepared workspace container. |
Example
dagger -m github.com/StaytunedLLP/daggerverse@d508005210c271a66eaa0c03f548f2876dd5fb47 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() 🔗
Run the repository formatting check with npm run format:check.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | - Repository source directory to validate. |
Example
dagger -m github.com/StaytunedLLP/daggerverse@d508005210c271a66eaa0c03f548f2876dd5fb47 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() 🔗
Run the repository linter with npm run lint.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | - Repository source directory to lint. |
Example
dagger -m github.com/StaytunedLLP/daggerverse@d508005210c271a66eaa0c03f548f2876dd5fb47 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() 🔗
Run the repository build with npm run build.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | - Repository source directory to build. |
Example
dagger -m github.com/StaytunedLLP/daggerverse@d508005210c271a66eaa0c03f548f2876dd5fb47 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() 🔗
Run the repository test suite with npm run test.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | - Repository source directory to test. |
Example
dagger -m github.com/StaytunedLLP/daggerverse@d508005210c271a66eaa0c03f548f2876dd5fb47 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()
}