staydevops-ts
No long description provided.
Installation
dagger install github.com/StaytunedLLP/devops@dd528727948630bfc312724a1e68ac9208a55b17Entrypoint
Return Type
StaydevopsTs Example
dagger -m github.com/StaytunedLLP/devops@dd528727948630bfc312724a1e68ac9208a55b17 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 | - |
|
Example
dagger -m github.com/StaytunedLLP/devops@dd528727948630bfc312724a1e68ac9208a55b17 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 | - |
|
Example
dagger -m github.com/StaytunedLLP/devops@dd528727948630bfc312724a1e68ac9208a55b17 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 | - |
|
Example
dagger -m github.com/StaytunedLLP/devops@dd528727948630bfc312724a1e68ac9208a55b17 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 | - |
|
| commitRange | String ! | - |
|
Example
dagger -m github.com/StaytunedLLP/devops@dd528727948630bfc312724a1e68ac9208a55b17 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 | - |
|
Example
dagger -m github.com/StaytunedLLP/devops@dd528727948630bfc312724a1e68ac9208a55b17 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 | - |
|
Example
dagger -m github.com/StaytunedLLP/devops@dd528727948630bfc312724a1e68ac9208a55b17 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 | - |
|
Example
dagger -m github.com/StaytunedLLP/devops@dd528727948630bfc312724a1e68ac9208a55b17 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 ! | - |
|
| nodeAuthToken | Secret | - |
|
| packagePaths | String ! | "." |
|
Example
dagger -m github.com/StaytunedLLP/devops@dd528727948630bfc312724a1e68ac9208a55b17 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 ! | - |
|
| nodeAuthToken | Secret | - |
|
| packagePaths | String ! | "." |
|
| playwrightInstall | Boolean ! | false |
|
| firebaseTools | Boolean ! | false |
|
Example
dagger -m github.com/StaytunedLLP/devops@dd528727948630bfc312724a1e68ac9208a55b17 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 ! | - |
|
| nodeAuthToken | Secret | - |
|
| packagePaths | String ! | "." |
|
| testSelector | String ! | "" |
|
| testScript | String ! | "test:e2e" |
|
| runBuild | Boolean ! | true |
|
| registryScope | String ! | "staytunedllp" |
|
| browsers | String ! | "chromium" |
|
Example
dagger -m github.com/StaytunedLLP/devops@dd528727948630bfc312724a1e68ac9208a55b17 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 ! | - |
|
| 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/devops@dd528727948630bfc312724a1e68ac9208a55b17 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 ! | - |
|
| ref | String ! | - |
|
| eventName | String ! | - |
|
| githubToken | Secret ! | - |
|
| repoOwner | String ! | - |
|
| repoName | String ! | - |
|
| inputBranch | String | - |
|
| releasePrNumber | Integer | - |
|
| registryScope | String | - |
|
Example
dagger -m github.com/StaytunedLLP/devops@dd528727948630bfc312724a1e68ac9208a55b17 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)
}