staydevops-ts
No long description provided.
Installation
dagger install github.com/StaytunedLLP/devops@a8f65956d30e7d90b63f6ad5d14f8dc387e03e0aEntrypoint
Return Type
StaydevopsTs Example
dagger -m github.com/StaytunedLLP/devops@a8f65956d30e7d90b63f6ad5d14f8dc387e03e0a 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.
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/devops@a8f65956d30e7d90b63f6ad5d14f8dc387e03e0a call \
formatfunc (m *MyModule) Example(ctx context.Context) {
return dag.
StaydevopsTs().
Format(ctx)
}@function
async def example() -> None:
return await (
dag.staydevops_ts()
.format()
)@func()
async example(): Promise<void> {
return dag
.staydevopsTs()
.format()
}gitDiffStaged() 🔗
Retrieves an array of files that are staged for commit.
Return Type
[String ! ] !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | - The source directory to check for staged files. |
Example
dagger -m github.com/StaytunedLLP/devops@a8f65956d30e7d90b63f6ad5d14f8dc387e03e0a call \
git-diff-stagedfunc (m *MyModule) Example(ctx context.Context) []string {
return dag.
StaydevopsTs().
GitDiffStaged(ctx)
}@function
async def example() -> List[str]:
return await (
dag.staydevops_ts()
.git_diff_staged()
)@func()
async example(): Promise<string[]> {
return dag
.staydevopsTs()
.gitDiffStaged()
}gitDiffPrevious() 🔗
Retrieves an array of files from the previous commit.
Return Type
[String ! ] !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | - The source directory to check for files in the previous commit. |
Example
dagger -m github.com/StaytunedLLP/devops@a8f65956d30e7d90b63f6ad5d14f8dc387e03e0a call \
git-diff-previousfunc (m *MyModule) Example(ctx context.Context) []string {
return dag.
StaydevopsTs().
GitDiffPrevious(ctx)
}@function
async def example() -> List[str]:
return await (
dag.staydevops_ts()
.git_diff_previous()
)@func()
async example(): Promise<string[]> {
return dag
.staydevopsTs()
.gitDiffPrevious()
}gitDiffBetweenCommits() 🔗
Retrieves an array of files that have changed between two commits.
Return Type
[String ! ] !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | - The source directory to check for files in the commit range. |
| commitRange | String ! | - | - A string specifying the range of commits. |
Example
dagger -m github.com/StaytunedLLP/devops@a8f65956d30e7d90b63f6ad5d14f8dc387e03e0a call \
git-diff-between-commits --commit-range stringfunc (m *MyModule) Example(ctx context.Context, commitRange string) []string {
return dag.
StaydevopsTs().
GitDiffBetweenCommits(ctxcommitRange)
}@function
async def example(commit_range: str) -> List[str]:
return await (
dag.staydevops_ts()
.git_diff_between_commits(commit_range)
)@func()
async example(commitRange: string): Promise<string[]> {
return dag
.staydevopsTs()
.gitDiffBetweenCommits(commitRange)
}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/devops@a8f65956d30e7d90b63f6ad5d14f8dc387e03e0a call \
lintfunc (m *MyModule) Example(ctx context.Context) {
return dag.
StaydevopsTs().
Lint(ctx)
}@function
async def example() -> None:
return await (
dag.staydevops_ts()
.lint()
)@func()
async example(): Promise<void> {
return dag
.staydevopsTs()
.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/devops@a8f65956d30e7d90b63f6ad5d14f8dc387e03e0a call \
buildfunc (m *MyModule) Example(ctx context.Context) {
return dag.
StaydevopsTs().
Build(ctx)
}@function
async def example() -> None:
return await (
dag.staydevops_ts()
.build()
)@func()
async example(): Promise<void> {
return dag
.staydevopsTs()
.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/devops@a8f65956d30e7d90b63f6ad5d14f8dc387e03e0a call \
testfunc (m *MyModule) Example(ctx context.Context) {
return dag.
StaydevopsTs().
Test(ctx)
}@function
async def example() -> None:
return await (
dag.staydevops_ts()
.test()
)@func()
async example(): Promise<void> {
return dag
.staydevopsTs()
.test()
}verifyChromiumBidi() 🔗
Validate that chromium-bidi is installed in the selected package path.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | - Repository source directory that contains the package to inspect. |
| 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 the chromium-bidi check. |
Example
dagger -m github.com/StaytunedLLP/devops@a8f65956d30e7d90b63f6ad5d14f8dc387e03e0a call \
verify-chromium-bidi --source DIR_PATH --package-paths stringfunc (m *MyModule) Example(ctx context.Context, source *dagger.Directory, packagePaths string) string {
return dag.
StaydevopsTs().
VerifyChromiumBidi(ctx, source, packagePaths)
}@function
async def example(source: dagger.Directory, package_paths: str) -> str:
return await (
dag.staydevops_ts()
.verify_chromium_bidi(source, package_paths)
)@func()
async example(source: Directory, packagePaths: string): Promise<string> {
return dag
.staydevopsTs()
.verifyChromiumBidi(source, packagePaths)
}prepareNodeWorkspace() 🔗
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/devops@a8f65956d30e7d90b63f6ad5d14f8dc387e03e0a call \
prepare-node-workspace --source DIR_PATH --package-paths string --playwright-install boolean --firebase-tools booleanfunc (m *MyModule) Example(source *dagger.Directory, packagePaths string, playwrightInstall bool, firebaseTools bool) *dagger.Directory {
return dag.
StaydevopsTs().
PrepareNodeWorkspace(source, packagePaths, playwrightInstall, firebaseTools)
}@function
def example(source: dagger.Directory, package_paths: str, playwright_install: bool, firebase_tools: bool) -> dagger.Directory:
return (
dag.staydevops_ts()
.prepare_node_workspace(source, package_paths, playwright_install, firebase_tools)
)@func()
example(source: Directory, packagePaths: string, playwrightInstall: boolean, firebaseTools: boolean): Directory {
return dag
.staydevopsTs()
.prepareNodeWorkspace(source, packagePaths, playwrightInstall, firebaseTools)
}playwrightTest() 🔗
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. |
Example
dagger -m github.com/StaytunedLLP/devops@a8f65956d30e7d90b63f6ad5d14f8dc387e03e0a call \
playwright-test --source DIR_PATH --package-paths string --test-selector string --test-script string --run-build boolean --registry-scope string --browsers stringfunc (m *MyModule) Example(ctx context.Context, source *dagger.Directory, packagePaths string, testSelector string, testScript string, runBuild bool, registryScope string, browsers string) string {
return dag.
StaydevopsTs().
PlaywrightTest(ctx, source, packagePaths, testSelector, testScript, runBuild, registryScope, browsers)
}@function
async def example(source: dagger.Directory, package_paths: str, test_selector: str, test_script: str, run_build: bool, registry_scope: str, browsers: str) -> str:
return await (
dag.staydevops_ts()
.playwright_test(source, package_paths, test_selector, test_script, run_build, registry_scope, browsers)
)@func()
async example(source: Directory, packagePaths: string, testSelector: string, testScript: string, runBuild: boolean, registryScope: string, browsers: string): Promise<string> {
return dag
.staydevopsTs()
.playwrightTest(source, packagePaths, testSelector, testScript, runBuild, registryScope, browsers)
}deployWebhosting() 🔗
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/devops@a8f65956d30e7d90b63f6ad5d14f8dc387e03e0a call \
deploy-webhosting --source DIR_PATH --project-id string --gcp-credentials env:MYSECRETfunc (m *MyModule) Example(ctx context.Context, source *dagger.Directory, projectId string, gcpCredentials *dagger.Secret) string {
return dag.
StaydevopsTs().
DeployWebhosting(ctx, source, projectId, gcpCredentials)
}@function
async def example(source: dagger.Directory, project_id: str, gcp_credentials: dagger.Secret) -> str:
return await (
dag.staydevops_ts()
.deploy_webhosting(source, project_id, gcp_credentials)
)@func()
async example(source: Directory, projectId: string, gcpCredentials: Secret): Promise<string> {
return dag
.staydevopsTs()
.deployWebhosting(source, 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/devops@a8f65956d30e7d90b63f6ad5d14f8dc387e03e0a call \
publish-package --source DIR_PATH --ref string --event-name string --github-token env:MYSECRET --repo-owner string --repo-name stringfunc (m *MyModule) Example(ctx context.Context, source *dagger.Directory, ref string, eventName string, githubToken *dagger.Secret, repoOwner string, repoName string) string {
return dag.
StaydevopsTs().
PublishPackage(ctx, source, ref, eventName, githubToken, repoOwner, repoName)
}@function
async def example(source: dagger.Directory, ref: str, event_name: str, github_token: dagger.Secret, repo_owner: str, repo_name: str) -> str:
return await (
dag.staydevops_ts()
.publish_package(source, ref, event_name, github_token, repo_owner, repo_name)
)@func()
async example(source: Directory, ref: string, eventName: string, githubToken: Secret, repoOwner: string, repoName: string): Promise<string> {
return dag
.staydevopsTs()
.publishPackage(source, ref, eventName, githubToken, repoOwner, repoName)
}