@cnc-tools/storm 0.0.0-stage → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/node-version.js +24 -0
- package/bin/storm.js +16 -0
- package/dist/application.d.ts +13 -0
- package/dist/application.js +23 -0
- package/dist/bin/storm.d.ts +1 -0
- package/dist/bin/storm.js +45 -0
- package/dist/build-info.js +3 -0
- package/dist/closed-terminal.d.ts +7 -0
- package/dist/closed-terminal.js +18 -0
- package/dist/combine-errors.d.ts +11 -0
- package/dist/combine-errors.js +19 -0
- package/dist/commands/dashboard.d.ts +11 -0
- package/dist/commands/dashboard.js +18 -0
- package/dist/commands/run/cleanup.d.ts +135 -0
- package/dist/commands/run/cleanup.js +171 -0
- package/dist/commands/run/command.d.ts +327 -0
- package/dist/commands/run/command.js +620 -0
- package/dist/commands/run/job-summary.d.ts +6 -0
- package/dist/commands/run/job-summary.js +31 -0
- package/dist/commands/run/live-view.d.ts +22 -0
- package/dist/commands/run/live-view.js +395 -0
- package/dist/commands/run/metadata.d.ts +47 -0
- package/dist/commands/run/metadata.js +83 -0
- package/dist/commands/run/mint-failed.d.ts +11 -0
- package/dist/commands/run/mint-failed.js +33 -0
- package/dist/commands/run/outcomes.d.ts +307 -0
- package/dist/commands/run/outcomes.js +332 -0
- package/dist/commands/run/progress.d.ts +44 -0
- package/dist/commands/run/progress.js +277 -0
- package/dist/commands/run/redaction.d.ts +15 -0
- package/dist/commands/run/redaction.js +40 -0
- package/dist/commands/run/run-collector.d.ts +30 -0
- package/dist/commands/run/run-collector.js +73 -0
- package/dist/commands/run/run-record.d.ts +144 -0
- package/dist/commands/run/run-record.js +96 -0
- package/dist/commands/run/tests-summary.d.ts +34 -0
- package/dist/commands/run/tests-summary.js +141 -0
- package/dist/commands/run/text.d.ts +22 -0
- package/dist/commands/run/text.js +74 -0
- package/dist/commands/run/view.d.ts +35 -0
- package/dist/commands/run/view.js +163 -0
- package/dist/commands/run/waterfall.d.ts +25 -0
- package/dist/commands/run/waterfall.js +108 -0
- package/dist/commands/run/worker-chart.d.ts +79 -0
- package/dist/commands/run/worker-chart.js +313 -0
- package/dist/commands/runs/facts.d.ts +150 -0
- package/dist/commands/runs/facts.js +292 -0
- package/dist/commands/runs/list/command.d.ts +86 -0
- package/dist/commands/runs/list/command.js +36 -0
- package/dist/commands/runs/list/metadata.d.ts +22 -0
- package/dist/commands/runs/list/metadata.js +19 -0
- package/dist/commands/runs/list/outcomes.d.ts +74 -0
- package/dist/commands/runs/list/outcomes.js +89 -0
- package/dist/commands/runs/logs/command.d.ts +72 -0
- package/dist/commands/runs/logs/command.js +51 -0
- package/dist/commands/runs/logs/metadata.d.ts +22 -0
- package/dist/commands/runs/logs/metadata.js +22 -0
- package/dist/commands/runs/logs/outcomes.d.ts +55 -0
- package/dist/commands/runs/logs/outcomes.js +77 -0
- package/dist/commands/runs/metadata.d.ts +3 -0
- package/dist/commands/runs/metadata.js +3 -0
- package/dist/commands/runs/past-run.d.ts +72 -0
- package/dist/commands/runs/past-run.js +99 -0
- package/dist/commands/runs/show/command.d.ts +176 -0
- package/dist/commands/runs/show/command.js +76 -0
- package/dist/commands/runs/show/metadata.d.ts +25 -0
- package/dist/commands/runs/show/metadata.js +22 -0
- package/dist/commands/runs/show/outcomes.d.ts +164 -0
- package/dist/commands/runs/show/outcomes.js +317 -0
- package/dist/config/by-name.d.ts +24 -0
- package/dist/config/by-name.js +26 -0
- package/dist/config/errors.d.ts +58 -0
- package/dist/config/errors.js +101 -0
- package/dist/config/gateways.d.ts +32 -0
- package/dist/config/gateways.js +1 -0
- package/dist/config/index.d.ts +9 -0
- package/dist/config/index.js +12 -0
- package/dist/config/live/config-gateway.d.ts +6 -0
- package/dist/config/live/config-gateway.js +71 -0
- package/dist/config/load.d.ts +54 -0
- package/dist/config/load.js +175 -0
- package/dist/config/resolve.d.ts +49 -0
- package/dist/config/resolve.js +94 -0
- package/dist/config/resource-config.d.ts +132 -0
- package/dist/config/resource-config.js +19 -0
- package/dist/config/schema.d.ts +64 -0
- package/dist/config/schema.js +57 -0
- package/dist/config/set.d.ts +16 -0
- package/dist/config/set.js +55 -0
- package/dist/config/settings-file.d.ts +41 -0
- package/dist/config/settings-file.js +72 -0
- package/dist/config-file/define.d.ts +37 -0
- package/dist/config-file/define.js +9 -0
- package/dist/config-file/toolchain.d.ts +9 -0
- package/dist/config-file/toolchain.js +41 -0
- package/dist/context.d.ts +86 -0
- package/dist/context.js +43 -0
- package/dist/core/command-provider.d.ts +126 -0
- package/dist/core/command-provider.js +13 -0
- package/dist/core/command-slots.d.ts +67 -0
- package/dist/core/command-slots.js +136 -0
- package/dist/core/events.d.ts +128 -0
- package/dist/core/events.js +15 -0
- package/dist/core/gateways.d.ts +249 -0
- package/dist/core/gateways.js +1 -0
- package/dist/core/index.d.ts +20 -0
- package/dist/core/index.js +18 -0
- package/dist/core/keyed.d.ts +12 -0
- package/dist/core/keyed.js +24 -0
- package/dist/core/lane.d.ts +46 -0
- package/dist/core/lane.js +5 -0
- package/dist/core/limit.d.ts +9 -0
- package/dist/core/limit.js +29 -0
- package/dist/core/live/command-gateway.d.ts +11 -0
- package/dist/core/live/command-gateway.js +83 -0
- package/dist/core/live/job-summary-gateway.d.ts +5 -0
- package/dist/core/live/job-summary-gateway.js +20 -0
- package/dist/core/live/progress-terminal.d.ts +20 -0
- package/dist/core/live/progress-terminal.js +173 -0
- package/dist/core/live/run-directory-gateway.d.ts +24 -0
- package/dist/core/live/run-directory-gateway.js +437 -0
- package/dist/core/mint.d.ts +10 -0
- package/dist/core/mint.js +14 -0
- package/dist/core/payload.d.ts +26 -0
- package/dist/core/payload.js +33 -0
- package/dist/core/presentation.d.ts +87 -0
- package/dist/core/presentation.js +5 -0
- package/dist/core/presentations.d.ts +56 -0
- package/dist/core/presentations.js +66 -0
- package/dist/core/provider.d.ts +69 -0
- package/dist/core/provider.js +5 -0
- package/dist/core/resource.d.ts +262 -0
- package/dist/core/resource.js +6 -0
- package/dist/core/resources.d.ts +131 -0
- package/dist/core/resources.js +254 -0
- package/dist/core/run-directory.d.ts +69 -0
- package/dist/core/run-directory.js +94 -0
- package/dist/core/run-state.d.ts +152 -0
- package/dist/core/run-state.js +313 -0
- package/dist/core/run.d.ts +187 -0
- package/dist/core/run.js +321 -0
- package/dist/core/state-directory.d.ts +19 -0
- package/dist/core/state-directory.js +29 -0
- package/dist/core/timeline.d.ts +63 -0
- package/dist/core/timeline.js +97 -0
- package/dist/core/timing.d.ts +22 -0
- package/dist/core/timing.js +26 -0
- package/dist/credential/credential.d.ts +46 -0
- package/dist/credential/credential.js +80 -0
- package/dist/credential/diagnosis.d.ts +18 -0
- package/dist/credential/diagnosis.js +99 -0
- package/dist/credential/gateways.d.ts +109 -0
- package/dist/credential/gateways.js +1 -0
- package/dist/credential/index.d.ts +7 -0
- package/dist/credential/index.js +7 -0
- package/dist/credential/live/github-actions-token-gateway.d.ts +15 -0
- package/dist/credential/live/github-actions-token-gateway.js +43 -0
- package/dist/credential/live/github-actions-token-response.d.ts +19 -0
- package/dist/credential/live/github-actions-token-response.js +49 -0
- package/dist/credential/live/vercel-cli-gateway.d.ts +9 -0
- package/dist/credential/live/vercel-cli-gateway.js +64 -0
- package/dist/credential/live/vercel-output.d.ts +60 -0
- package/dist/credential/live/vercel-output.js +122 -0
- package/dist/credential/live/vercel-process.d.ts +14 -0
- package/dist/credential/live/vercel-process.js +3 -0
- package/dist/credential/settle.d.ts +31 -0
- package/dist/credential/settle.js +49 -0
- package/dist/credential/source.d.ts +110 -0
- package/dist/credential/source.js +114 -0
- package/dist/help-logo.d.ts +11 -0
- package/dist/help-logo.js +56 -0
- package/dist/presentation.d.ts +26 -0
- package/dist/presentation.js +21 -0
- package/dist/resources/github/cleanup.d.ts +23 -0
- package/dist/resources/github/cleanup.js +39 -0
- package/dist/resources/github/command.d.ts +74 -0
- package/dist/resources/github/command.js +117 -0
- package/dist/resources/github/config.d.ts +16 -0
- package/dist/resources/github/config.js +37 -0
- package/dist/resources/github/events.d.ts +26 -0
- package/dist/resources/github/events.js +2 -0
- package/dist/resources/github/fixture-repo.d.ts +69 -0
- package/dist/resources/github/fixture-repo.js +60 -0
- package/dist/resources/github/gateways.d.ts +62 -0
- package/dist/resources/github/gateways.js +1 -0
- package/dist/resources/github/index.d.ts +12 -0
- package/dist/resources/github/index.js +15 -0
- package/dist/resources/github/live/fixture-repo-gateway.d.ts +12 -0
- package/dist/resources/github/live/fixture-repo-gateway.js +92 -0
- package/dist/resources/github/live/gateways.d.ts +6 -0
- package/dist/resources/github/live/gateways.js +13 -0
- package/dist/resources/github/presentation.d.ts +13 -0
- package/dist/resources/github/presentation.js +43 -0
- package/dist/resources/github/provider.d.ts +66 -0
- package/dist/resources/github/provider.js +58 -0
- package/dist/resources/github/resource-provider.d.ts +6 -0
- package/dist/resources/github/resource-provider.js +20 -0
- package/dist/resources/github/resource.d.ts +33 -0
- package/dist/resources/github/resource.js +12 -0
- package/dist/resources/testserver/cleanup.d.ts +14 -0
- package/dist/resources/testserver/cleanup.js +22 -0
- package/dist/resources/testserver/command.d.ts +322 -0
- package/dist/resources/testserver/command.js +245 -0
- package/dist/resources/testserver/commands/app.d.ts +18 -0
- package/dist/resources/testserver/commands/app.js +3 -0
- package/dist/resources/testserver/commands/create/command.d.ts +136 -0
- package/dist/resources/testserver/commands/create/command.js +158 -0
- package/dist/resources/testserver/commands/create/metadata.d.ts +31 -0
- package/dist/resources/testserver/commands/create/metadata.js +45 -0
- package/dist/resources/testserver/commands/create/outcomes.d.ts +111 -0
- package/dist/resources/testserver/commands/create/outcomes.js +172 -0
- package/dist/resources/testserver/commands/list/command.d.ts +60 -0
- package/dist/resources/testserver/commands/list/command.js +56 -0
- package/dist/resources/testserver/commands/list/metadata.d.ts +9 -0
- package/dist/resources/testserver/commands/list/metadata.js +9 -0
- package/dist/resources/testserver/commands/list/outcomes.d.ts +54 -0
- package/dist/resources/testserver/commands/list/outcomes.js +152 -0
- package/dist/resources/testserver/config.d.ts +18 -0
- package/dist/resources/testserver/config.js +77 -0
- package/dist/resources/testserver/credential-facts.d.ts +80 -0
- package/dist/resources/testserver/credential-facts.js +83 -0
- package/dist/resources/testserver/events.d.ts +59 -0
- package/dist/resources/testserver/events.js +4 -0
- package/dist/resources/testserver/index.d.ts +16 -0
- package/dist/resources/testserver/index.js +24 -0
- package/dist/resources/testserver/lane.d.ts +28 -0
- package/dist/resources/testserver/lane.js +139 -0
- package/dist/resources/testserver/live/gateways.d.ts +6 -0
- package/dist/resources/testserver/live/gateways.js +26 -0
- package/dist/resources/testserver/options.d.ts +5 -0
- package/dist/resources/testserver/options.js +5 -0
- package/dist/resources/testserver/pool/channels.d.ts +80 -0
- package/dist/resources/testserver/pool/channels.js +48 -0
- package/dist/resources/testserver/pool/create.d.ts +48 -0
- package/dist/resources/testserver/pool/create.js +45 -0
- package/dist/resources/testserver/pool/directory.d.ts +4 -0
- package/dist/resources/testserver/pool/directory.js +5 -0
- package/dist/resources/testserver/pool/gateways.d.ts +190 -0
- package/dist/resources/testserver/pool/gateways.js +1 -0
- package/dist/resources/testserver/pool/host.d.ts +8 -0
- package/dist/resources/testserver/pool/host.js +21 -0
- package/dist/resources/testserver/pool/index.d.ts +9 -0
- package/dist/resources/testserver/pool/index.js +10 -0
- package/dist/resources/testserver/pool/inspect.d.ts +53 -0
- package/dist/resources/testserver/pool/inspect.js +45 -0
- package/dist/resources/testserver/pool/lease.d.ts +84 -0
- package/dist/resources/testserver/pool/lease.js +125 -0
- package/dist/resources/testserver/pool/live/pool-records.d.ts +17 -0
- package/dist/resources/testserver/pool/live/pool-records.js +70 -0
- package/dist/resources/testserver/pool/live/pool-store-gateway.d.ts +12 -0
- package/dist/resources/testserver/pool/live/pool-store-gateway.js +435 -0
- package/dist/resources/testserver/pool/staleness.d.ts +16 -0
- package/dist/resources/testserver/pool/staleness.js +27 -0
- package/dist/resources/testserver/presentation.d.ts +9 -0
- package/dist/resources/testserver/presentation.js +217 -0
- package/dist/resources/testserver/provider.d.ts +177 -0
- package/dist/resources/testserver/provider.js +254 -0
- package/dist/resources/testserver/ran.d.ts +87 -0
- package/dist/resources/testserver/ran.js +140 -0
- package/dist/resources/testserver/resource-provider.d.ts +12 -0
- package/dist/resources/testserver/resource-provider.js +38 -0
- package/dist/resources/testserver/resource.d.ts +32 -0
- package/dist/resources/testserver/resource.js +10 -0
- package/dist/resources/testserver/run-sandbox.d.ts +13 -0
- package/dist/resources/testserver/run-sandbox.js +6 -0
- package/dist/resources/testserver/sandbox/channels.d.ts +12 -0
- package/dist/resources/testserver/sandbox/channels.js +21 -0
- package/dist/resources/testserver/sandbox/create-failure.d.ts +35 -0
- package/dist/resources/testserver/sandbox/create-failure.js +65 -0
- package/dist/resources/testserver/sandbox/create.d.ts +29 -0
- package/dist/resources/testserver/sandbox/create.js +37 -0
- package/dist/resources/testserver/sandbox/gateways.d.ts +150 -0
- package/dist/resources/testserver/sandbox/gateways.js +1 -0
- package/dist/resources/testserver/sandbox/index.d.ts +6 -0
- package/dist/resources/testserver/sandbox/index.js +7 -0
- package/dist/resources/testserver/sandbox/live/builds-response.d.ts +9 -0
- package/dist/resources/testserver/sandbox/live/builds-response.js +27 -0
- package/dist/resources/testserver/sandbox/live/control-plane-gateway.d.ts +17 -0
- package/dist/resources/testserver/sandbox/live/control-plane-gateway.js +133 -0
- package/dist/resources/testserver/sandbox/live/create-response.d.ts +35 -0
- package/dist/resources/testserver/sandbox/live/create-response.js +78 -0
- package/dist/resources/testserver/sandbox/live/fetch-failure.d.ts +24 -0
- package/dist/resources/testserver/sandbox/live/fetch-failure.js +45 -0
- package/dist/resources/testserver/sandbox/live/health-check-gateway.d.ts +11 -0
- package/dist/resources/testserver/sandbox/live/health-check-gateway.js +36 -0
- package/dist/resources/testserver/sandbox/live/sse.d.ts +12 -0
- package/dist/resources/testserver/sandbox/live/sse.js +32 -0
- package/dist/resources.d.ts +452 -0
- package/dist/resources.js +88 -0
- package/dist/runner/base.d.ts +40 -0
- package/dist/runner/base.js +52 -0
- package/dist/runner/context.d.ts +13 -0
- package/dist/runner/context.js +9 -0
- package/dist/runner/events.d.ts +179 -0
- package/dist/runner/events.js +16 -0
- package/dist/runner/gateways.d.ts +351 -0
- package/dist/runner/gateways.js +3 -0
- package/dist/runner/index.d.ts +19 -0
- package/dist/runner/index.js +18 -0
- package/dist/runner/live/checkout-gateway.d.ts +3 -0
- package/dist/runner/live/checkout-gateway.js +206 -0
- package/dist/runner/live/git-output.d.ts +14 -0
- package/dist/runner/live/git-output.js +32 -0
- package/dist/runner/live/sandbox-errors.d.ts +7 -0
- package/dist/runner/live/sandbox-errors.js +21 -0
- package/dist/runner/live/sandbox-gateway.d.ts +7 -0
- package/dist/runner/live/sandbox-gateway.js +427 -0
- package/dist/runner/live/snapshot-cache-gateway.d.ts +12 -0
- package/dist/runner/live/snapshot-cache-gateway.js +104 -0
- package/dist/runner/live/snapshot-records.d.ts +11 -0
- package/dist/runner/live/snapshot-records.js +57 -0
- package/dist/runner/live/terminal.d.ts +16 -0
- package/dist/runner/live/terminal.js +37 -0
- package/dist/runner/live/user.d.ts +2 -0
- package/dist/runner/live/user.js +11 -0
- package/dist/runner/output.d.ts +23 -0
- package/dist/runner/output.js +58 -0
- package/dist/runner/prepare.d.ts +67 -0
- package/dist/runner/prepare.js +59 -0
- package/dist/runner/ready.d.ts +68 -0
- package/dist/runner/ready.js +159 -0
- package/dist/runner/recipe.d.ts +126 -0
- package/dist/runner/recipe.js +302 -0
- package/dist/runner/remote-command.d.ts +77 -0
- package/dist/runner/remote-command.js +127 -0
- package/dist/runner/scope.d.ts +58 -0
- package/dist/runner/scope.js +117 -0
- package/dist/runner/snapshot-build.d.ts +33 -0
- package/dist/runner/snapshot-build.js +112 -0
- package/dist/runner/snapshot-cache.d.ts +84 -0
- package/dist/runner/snapshot-cache.js +126 -0
- package/dist/runner/snapshot-key.d.ts +52 -0
- package/dist/runner/snapshot-key.js +91 -0
- package/dist/runner/steps.d.ts +41 -0
- package/dist/runner/steps.js +49 -0
- package/dist/sdk/container/api-request.d.ts +32 -0
- package/dist/sdk/container/api-request.js +46 -0
- package/dist/sdk/container/container.d.ts +144 -0
- package/dist/sdk/container/container.js +346 -0
- package/dist/sdk/container/feature-flags.d.ts +37 -0
- package/dist/sdk/container/feature-flags.js +118 -0
- package/dist/sdk/container/gateways.d.ts +108 -0
- package/dist/sdk/container/gateways.js +1 -0
- package/dist/sdk/container/index.d.ts +5 -0
- package/dist/sdk/container/index.js +5 -0
- package/dist/sdk/container/live/container-gateway.d.ts +17 -0
- package/dist/sdk/container/live/container-gateway.js +114 -0
- package/dist/sdk/factories/build.d.ts +66 -0
- package/dist/sdk/factories/build.js +98 -0
- package/dist/sdk/factories/definition.d.ts +28 -0
- package/dist/sdk/factories/definition.js +16 -0
- package/dist/sdk/factories/definitions.d.ts +166 -0
- package/dist/sdk/factories/definitions.js +235 -0
- package/dist/sdk/factories/gateways.d.ts +25 -0
- package/dist/sdk/factories/gateways.js +1 -0
- package/dist/sdk/factories/index.d.ts +5 -0
- package/dist/sdk/factories/index.js +5 -0
- package/dist/sdk/factories/live/factory-gateway.d.ts +10 -0
- package/dist/sdk/factories/live/factory-gateway.js +29 -0
- package/dist/sdk/index.d.ts +7 -0
- package/dist/sdk/index.js +15 -0
- package/dist/sdk/payload/index.d.ts +2 -0
- package/dist/sdk/payload/index.js +4 -0
- package/dist/sdk/payload/payload.d.ts +47 -0
- package/dist/sdk/payload/payload.js +74 -0
- package/dist/sdk/payload/test-events.d.ts +102 -0
- package/dist/sdk/payload/test-events.js +59 -0
- package/dist/sdk/proxy/exchange.d.ts +58 -0
- package/dist/sdk/proxy/exchange.js +173 -0
- package/dist/sdk/proxy/faulted-exchange.d.ts +10 -0
- package/dist/sdk/proxy/faulted-exchange.js +106 -0
- package/dist/sdk/proxy/faults.d.ts +133 -0
- package/dist/sdk/proxy/faults.js +147 -0
- package/dist/sdk/proxy/index.d.ts +3 -0
- package/dist/sdk/proxy/index.js +3 -0
- package/dist/sdk/proxy/proxy.d.ts +93 -0
- package/dist/sdk/proxy/proxy.js +99 -0
- package/dist/sdk/proxy/records.d.ts +56 -0
- package/dist/sdk/proxy/records.js +56 -0
- package/dist/sdk/records/body.d.ts +89 -0
- package/dist/sdk/records/body.js +236 -0
- package/dist/sdk/records/index.d.ts +2 -0
- package/dist/sdk/records/index.js +4 -0
- package/dist/sdk/records/records.d.ts +49 -0
- package/dist/sdk/records/records.js +16 -0
- package/dist/sdk/seed/index.d.ts +1 -0
- package/dist/sdk/seed/index.js +3 -0
- package/dist/sdk/seed/seed.d.ts +221 -0
- package/dist/sdk/seed/seed.js +171 -0
- package/dist/sdk/testserver/clock.d.ts +8 -0
- package/dist/sdk/testserver/clock.js +10 -0
- package/dist/sdk/testserver/failure.d.ts +73 -0
- package/dist/sdk/testserver/failure.js +61 -0
- package/dist/sdk/testserver/index.d.ts +5 -0
- package/dist/sdk/testserver/index.js +8 -0
- package/dist/sdk/testserver/live/connect-failure.d.ts +7 -0
- package/dist/sdk/testserver/live/connect-failure.js +30 -0
- package/dist/sdk/testserver/live/request.d.ts +69 -0
- package/dist/sdk/testserver/live/request.js +89 -0
- package/dist/sdk/testserver/service-ids.d.ts +19 -0
- package/dist/sdk/testserver/service-ids.js +77 -0
- package/dist/sdk/testserver/test-id.d.ts +15 -0
- package/dist/sdk/testserver/test-id.js +28 -0
- package/dist/story/align.d.ts +37 -0
- package/dist/story/align.js +39 -0
- package/dist/story/artifact.d.ts +60 -0
- package/dist/story/artifact.js +93 -0
- package/dist/story/definition.d.ts +52 -0
- package/dist/story/definition.js +9 -0
- package/dist/story/diff.d.ts +9 -0
- package/dist/story/diff.js +97 -0
- package/dist/story/errors.d.ts +14 -0
- package/dist/story/errors.js +21 -0
- package/dist/story/gateways.d.ts +74 -0
- package/dist/story/gateways.js +3 -0
- package/dist/story/host.d.ts +27 -0
- package/dist/story/host.js +97 -0
- package/dist/story/index.d.ts +7 -0
- package/dist/story/index.js +9 -0
- package/dist/story/json.d.ts +16 -0
- package/dist/story/json.js +59 -0
- package/dist/story/live/artifact-gateway.d.ts +2 -0
- package/dist/story/live/artifact-gateway.js +82 -0
- package/dist/story/mode.d.ts +17 -0
- package/dist/story/mode.js +21 -0
- package/dist/story/orphans.d.ts +17 -0
- package/dist/story/orphans.js +15 -0
- package/dist/story/report.d.ts +30 -0
- package/dist/story/report.js +118 -0
- package/dist/story/run.d.ts +49 -0
- package/dist/story/run.js +160 -0
- package/dist/story/sequence.d.ts +30 -0
- package/dist/story/sequence.js +74 -0
- package/dist/story/settle.d.ts +94 -0
- package/dist/story/settle.js +70 -0
- package/dist/time/duration.d.ts +19 -0
- package/dist/time/duration.js +37 -0
- package/dist/time/index.d.ts +2 -0
- package/dist/time/index.js +4 -0
- package/dist/time/time.d.ts +15 -0
- package/dist/time/time.js +23 -0
- package/dist/vercel-cli/ansi.d.ts +13 -0
- package/dist/vercel-cli/ansi.js +32 -0
- package/dist/vercel-cli/arguments.d.ts +25 -0
- package/dist/vercel-cli/arguments.js +78 -0
- package/dist/vercel-cli/auth-config.d.ts +43 -0
- package/dist/vercel-cli/auth-config.js +36 -0
- package/dist/vercel-cli/clock.d.ts +9 -0
- package/dist/vercel-cli/clock.js +10 -0
- package/dist/vercel-cli/config-files.d.ts +24 -0
- package/dist/vercel-cli/config-files.js +40 -0
- package/dist/vercel-cli/context.d.ts +12 -0
- package/dist/vercel-cli/context.js +12 -0
- package/dist/vercel-cli/driver.d.ts +218 -0
- package/dist/vercel-cli/driver.js +364 -0
- package/dist/vercel-cli/entry.d.ts +8 -0
- package/dist/vercel-cli/entry.js +13 -0
- package/dist/vercel-cli/environment.d.ts +33 -0
- package/dist/vercel-cli/environment.js +72 -0
- package/dist/vercel-cli/errors.d.ts +8 -0
- package/dist/vercel-cli/errors.js +8 -0
- package/dist/vercel-cli/gateways.d.ts +103 -0
- package/dist/vercel-cli/gateways.js +4 -0
- package/dist/vercel-cli/index.d.ts +10 -0
- package/dist/vercel-cli/index.js +15 -0
- package/dist/vercel-cli/invocation.d.ts +234 -0
- package/dist/vercel-cli/invocation.js +397 -0
- package/dist/vercel-cli/keys.d.ts +14 -0
- package/dist/vercel-cli/keys.js +12 -0
- package/dist/vercel-cli/live/config-files.d.ts +28 -0
- package/dist/vercel-cli/live/config-files.js +66 -0
- package/dist/vercel-cli/live/process-gateway.d.ts +14 -0
- package/dist/vercel-cli/live/process-gateway.js +178 -0
- package/dist/vercel-cli/redaction.d.ts +13 -0
- package/dist/vercel-cli/redaction.js +22 -0
- package/dist/vercel-cli/report.d.ts +22 -0
- package/dist/vercel-cli/report.js +110 -0
- package/dist/vercel-cli/verbose.d.ts +7 -0
- package/dist/vercel-cli/verbose.js +24 -0
- package/dist/version.d.ts +20 -0
- package/dist/version.js +57 -0
- package/dist/vitest/config.d.ts +51 -0
- package/dist/vitest/config.js +61 -0
- package/dist/vitest/container-scope.d.ts +108 -0
- package/dist/vitest/container-scope.js +234 -0
- package/dist/vitest/diagnostics.d.ts +146 -0
- package/dist/vitest/diagnostics.js +306 -0
- package/dist/vitest/fixtures.d.ts +64 -0
- package/dist/vitest/fixtures.js +172 -0
- package/dist/vitest/gateways.d.ts +47 -0
- package/dist/vitest/gateways.js +3 -0
- package/dist/vitest/index.d.ts +3 -0
- package/dist/vitest/index.js +9 -0
- package/dist/vitest/list-output.d.ts +3 -0
- package/dist/vitest/list-output.js +19 -0
- package/dist/vitest/live/list-gateway.d.ts +7 -0
- package/dist/vitest/live/list-gateway.js +60 -0
- package/dist/vitest/ownership.d.ts +29 -0
- package/dist/vitest/ownership.js +68 -0
- package/dist/vitest/plan.d.ts +33 -0
- package/dist/vitest/plan.js +73 -0
- package/dist/vitest/sandbox.d.ts +16 -0
- package/dist/vitest/sandbox.js +35 -0
- package/dist/vitest/test-events.d.ts +41 -0
- package/dist/vitest/test-events.js +92 -0
- package/dist/vitest/test-results.d.ts +84 -0
- package/dist/vitest/test-results.js +160 -0
- package/dist/vitest/types.d.ts +68 -0
- package/dist/vitest/types.js +4 -0
- package/package.json +123 -4
- package/skills/overview.md +32 -0
- package/skills/read-run-output.md +65 -0
- package/README.md +0 -3
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
// What `storm runs list`, `storm runs show` and `storm runs logs` report of a run, and the errors they
|
|
2
|
+
// share: shared schemas and the facts built from a past run, so the commands' JSON agree.
|
|
3
|
+
import { muted } from "@cnc-tools/cli-kit/clinkr";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { RESOURCE_REPORTS } from "../../resources.js";
|
|
6
|
+
import { sandboxPage, snapshotPage } from "../dashboard.js";
|
|
7
|
+
import { isoSecondsText, seconds, short } from "../run/text.js";
|
|
8
|
+
/**
|
|
9
|
+
* The run logs `runs logs` prints and `runs show` names: the command log (`command`), then each step's, in the order a
|
|
10
|
+
* person looks for them.
|
|
11
|
+
*/
|
|
12
|
+
export const LOG_STEPS = ["command", "install", "build", "apply", "snapshot"];
|
|
13
|
+
/** Which runs a command saw. */
|
|
14
|
+
export const scopeSchema = z.discriminatedUnion("kind", [
|
|
15
|
+
z.object({
|
|
16
|
+
/** The runs of one config file. */
|
|
17
|
+
kind: z.literal("config"),
|
|
18
|
+
/** The config file found from the working directory, its absolute path. */
|
|
19
|
+
configFile: z.string(),
|
|
20
|
+
}),
|
|
21
|
+
z.object({
|
|
22
|
+
/** Every run. */
|
|
23
|
+
kind: z.literal("all"),
|
|
24
|
+
/** `flag` for `--all`; `no-config-file` when no storm.config.ts was found from the working directory. */
|
|
25
|
+
why: z.enum(["flag", "no-config-file"]),
|
|
26
|
+
}),
|
|
27
|
+
]);
|
|
28
|
+
/** A run's facts, from its run directory and `run.json`; each fact is null when unknown. */
|
|
29
|
+
export const runFactsSchema = z.object({
|
|
30
|
+
/** The run id, its run directory's name. */
|
|
31
|
+
id: z.string(),
|
|
32
|
+
/** The run directory. */
|
|
33
|
+
path: z.string(),
|
|
34
|
+
/** Whether its run is still going. */
|
|
35
|
+
active: z.boolean(),
|
|
36
|
+
/** When it started, as an ISO time. */
|
|
37
|
+
startedAt: z.string().nullable(),
|
|
38
|
+
/** The working directory it ran in. */
|
|
39
|
+
cwd: z.string().nullable(),
|
|
40
|
+
/** The config file its settings came from; null when none applied, or unknown. */
|
|
41
|
+
configFile: z.string().nullable(),
|
|
42
|
+
/** The command after --. */
|
|
43
|
+
argv: z.array(z.string()).nullable(),
|
|
44
|
+
/** Where its command ran: on this machine (`local`, with --local), or in a runner sandbox (`runner`). */
|
|
45
|
+
where: z
|
|
46
|
+
.discriminatedUnion("kind", [
|
|
47
|
+
z.object({ kind: z.literal("local") }),
|
|
48
|
+
z.object({
|
|
49
|
+
kind: z.literal("runner"),
|
|
50
|
+
/** The control plane team the runner sandbox ran in. */
|
|
51
|
+
team: z.string(),
|
|
52
|
+
/** The control plane project the runner sandbox ran in. */
|
|
53
|
+
project: z.string(),
|
|
54
|
+
/** The runner sandbox's region, such as iad1. */
|
|
55
|
+
region: z.string(),
|
|
56
|
+
/** The runner sandbox's runtime, such as node24. */
|
|
57
|
+
runtime: z.string(),
|
|
58
|
+
/** The runner sandbox's vCPUs. */
|
|
59
|
+
vcpus: z.number(),
|
|
60
|
+
/** The run's base: HEAD's merge-base with baseRef, a full SHA. */
|
|
61
|
+
base: z.string(),
|
|
62
|
+
/** The ref the base is HEAD's merge-base with, such as origin/main. */
|
|
63
|
+
baseRef: z.string(),
|
|
64
|
+
/** The runner sandbox's name; null until it started, or when the run stopped before it. */
|
|
65
|
+
sandbox: z.string().nullable(),
|
|
66
|
+
/** The runner sandbox's page in the Vercel dashboard, with what ran in it; null without a sandbox. */
|
|
67
|
+
sandboxUrl: z.string().nullable(),
|
|
68
|
+
/** When the runner sandbox's timeout stops it, as an ISO time, when the run kept it running once it ended so a person could connect to it; null when the run stopped and deleted it, or before the run ended. */
|
|
69
|
+
keptUntil: z.string().nullable(),
|
|
70
|
+
/** How many whole minutes are left until keptUntil, as of reading the run, 0 once it has passed; null when keptUntil is. */
|
|
71
|
+
keptMinutesLeft: z.number().nullable(),
|
|
72
|
+
/** The runner snapshot it started from: its id, the base it is of, which the run's changes went on top of, whether this run built it or reused it, and its page in the Vercel dashboard. Null until known. */
|
|
73
|
+
snapshot: z.object({ id: z.string(), base: z.string(), built: z.boolean(), url: z.string() }).nullable(),
|
|
74
|
+
}),
|
|
75
|
+
])
|
|
76
|
+
.nullable(),
|
|
77
|
+
/** The Git checkout it started from: HEAD's branch (null when detached), its commit, and whether the working tree had uncommitted changes or untracked files. Null outside a Git checkout, or when unknown. */
|
|
78
|
+
git: z.object({ branch: z.string().nullable(), commit: z.string(), dirty: z.boolean() }).nullable(),
|
|
79
|
+
/** How it ended; null while it runs, or when unknown. */
|
|
80
|
+
ended: z
|
|
81
|
+
.object({
|
|
82
|
+
/** The run's outcome: `ran` when its command ran, or why not, such as `canceled` or `spawn-failed`. */
|
|
83
|
+
outcome: z.string(),
|
|
84
|
+
/** The status storm exited with, when the command ran. */
|
|
85
|
+
exitCode: z.number().nullable(),
|
|
86
|
+
/** The signal that ended the command, if one did. */
|
|
87
|
+
signal: z.string().nullable(),
|
|
88
|
+
/** How long the command took, in milliseconds. */
|
|
89
|
+
ms: z.number().nullable(),
|
|
90
|
+
/** Its tests' totals, by their final results; null without one. */
|
|
91
|
+
tests: z.object({ passed: z.number(), failed: z.number(), skipped: z.number() }).nullable(),
|
|
92
|
+
/** Why its test results may be incomplete: a runner run's read of its test events file, once the command ended, failed with this message; null otherwise. */
|
|
93
|
+
testsIncomplete: z.string().nullable(),
|
|
94
|
+
/** What each resource it acquired reported, as a `storm run` result's `resources`, such as the Testserver sandboxes and their log viewer URLs; null unless its command ran, or when unknown. */
|
|
95
|
+
resources: RESOURCE_REPORTS.ranSchema.nullable(),
|
|
96
|
+
})
|
|
97
|
+
.nullable(),
|
|
98
|
+
});
|
|
99
|
+
/** `run`'s facts, as of `now`. */
|
|
100
|
+
export function runFacts(run, now) {
|
|
101
|
+
const { record } = run;
|
|
102
|
+
return {
|
|
103
|
+
id: run.id,
|
|
104
|
+
path: run.path,
|
|
105
|
+
active: run.active,
|
|
106
|
+
startedAt: record?.startedAt ?? null,
|
|
107
|
+
cwd: record?.cwd ?? null,
|
|
108
|
+
configFile: record?.configFile ?? null,
|
|
109
|
+
argv: record === undefined ? null : [...record.argv],
|
|
110
|
+
where: record === undefined ? null : whereFacts(record.where, now),
|
|
111
|
+
git: record?.git === undefined || record.git === null ? null : { ...record.git },
|
|
112
|
+
ended: record?.ended === undefined
|
|
113
|
+
? null
|
|
114
|
+
: {
|
|
115
|
+
...record.ended,
|
|
116
|
+
tests: record.ended.tests === null ? null : { ...record.ended.tests },
|
|
117
|
+
},
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Where a run's command ran, as the result reports it, with the Vercel dashboard's pages for its sandbox and snapshot,
|
|
122
|
+
* and how long a kept runner sandbox has left as of `now`.
|
|
123
|
+
*/
|
|
124
|
+
function whereFacts(where, now) {
|
|
125
|
+
if (where.kind === "local")
|
|
126
|
+
return { kind: "local" };
|
|
127
|
+
const { sandbox, snapshot, keptUntil } = where;
|
|
128
|
+
return {
|
|
129
|
+
...where,
|
|
130
|
+
keptMinutesLeft: keptUntil === null ? null : Math.max(0, Math.floor((Date.parse(keptUntil) - now.getTime()) / 60_000)),
|
|
131
|
+
sandboxUrl: sandbox === null ? null : sandboxPage(where, sandbox),
|
|
132
|
+
snapshot: snapshot === null ? null : { ...snapshot, url: snapshotPage(where, snapshot.id) },
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
/** `scope` as the result reports it. */
|
|
136
|
+
export function scopeFacts(scope) {
|
|
137
|
+
return scope.kind === "config" ? { kind: "config", configFile: scope.configFile } : { kind: "all", why: scope.why };
|
|
138
|
+
}
|
|
139
|
+
/** How a scope reads in a result's `Runs of` row. */
|
|
140
|
+
export function scopeText(scope) {
|
|
141
|
+
if (scope.kind === "config")
|
|
142
|
+
return scope.configFile;
|
|
143
|
+
return scope.why === "flag" ? "every config (--all)" : "every config (no storm.config.ts found)";
|
|
144
|
+
}
|
|
145
|
+
/** The error every `runs` command returns when the run directories can't be read. */
|
|
146
|
+
export const runsUnreadable = {
|
|
147
|
+
exitCode: 1,
|
|
148
|
+
description: "storm couldn't read the run directories.",
|
|
149
|
+
schema: z.object({
|
|
150
|
+
/** The directory or file the read failed on. */
|
|
151
|
+
path: z.string(),
|
|
152
|
+
/** What the OS said, or why there is no place for run directories. */
|
|
153
|
+
message: z.string(),
|
|
154
|
+
}),
|
|
155
|
+
render: ({ path, message }) => ({
|
|
156
|
+
message: `Couldn't read the run directories: ${message}`,
|
|
157
|
+
rows: [["Path", path]],
|
|
158
|
+
}),
|
|
159
|
+
};
|
|
160
|
+
/** The error `runs show` and `runs logs` return for a run id no run directory has. */
|
|
161
|
+
export const runNotFound = {
|
|
162
|
+
exitCode: 1,
|
|
163
|
+
description: "No run directory has the id given: it was never a run on this machine, or it was removed.",
|
|
164
|
+
schema: z.object({
|
|
165
|
+
/** The run id given. */
|
|
166
|
+
id: z.string(),
|
|
167
|
+
}),
|
|
168
|
+
render: ({ id }) => ({
|
|
169
|
+
message: `Couldn't find run ${id}.`,
|
|
170
|
+
next: [{ type: "command", argv: ["storm", "runs", "list", "--all"], label: "List every run" }],
|
|
171
|
+
}),
|
|
172
|
+
};
|
|
173
|
+
/** How a run ended, as its exit cell reads: `running`, the status storm exited with, the outcome, or `-`. */
|
|
174
|
+
export function exitText(run) {
|
|
175
|
+
if (run.active)
|
|
176
|
+
return "running";
|
|
177
|
+
const { ended } = run;
|
|
178
|
+
if (ended === null)
|
|
179
|
+
return "-";
|
|
180
|
+
if (ended.outcome !== "ran")
|
|
181
|
+
return ended.outcome;
|
|
182
|
+
if (ended.exitCode === null)
|
|
183
|
+
return "-";
|
|
184
|
+
return ended.signal === null ? String(ended.exitCode) : `${ended.exitCode} (${ended.signal})`;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* The color a run's exit cell takes for a person: success for status 0, error for another status or an outcome that
|
|
188
|
+
* failed, warn for `canceled`, accent while it runs; undefined when unknown.
|
|
189
|
+
*/
|
|
190
|
+
export function exitTone(run) {
|
|
191
|
+
if (run.active)
|
|
192
|
+
return "accent";
|
|
193
|
+
const { ended } = run;
|
|
194
|
+
if (ended === null)
|
|
195
|
+
return undefined;
|
|
196
|
+
if (ended.outcome === "canceled")
|
|
197
|
+
return "warn";
|
|
198
|
+
if (ended.outcome !== "ran")
|
|
199
|
+
return "error";
|
|
200
|
+
if (ended.exitCode === null)
|
|
201
|
+
return undefined;
|
|
202
|
+
return ended.exitCode === 0 ? "success" : "error";
|
|
203
|
+
}
|
|
204
|
+
/** How long a run's command took, or `-` when unknown. */
|
|
205
|
+
export function tookText(run) {
|
|
206
|
+
const ms = run.ended?.ms;
|
|
207
|
+
return ms === undefined || ms === null ? "-" : seconds(ms);
|
|
208
|
+
}
|
|
209
|
+
/** A run's tests' totals, such as `5 passed · 1 failed`, `no tests`, or `-` when unknown. */
|
|
210
|
+
export function totalsText(run) {
|
|
211
|
+
const totals = run.ended?.tests;
|
|
212
|
+
if (totals === undefined || totals === null)
|
|
213
|
+
return "-";
|
|
214
|
+
const parts = [
|
|
215
|
+
...(totals.passed > 0 ? [`${totals.passed} passed`] : []),
|
|
216
|
+
...(totals.failed > 0 ? [`${totals.failed} failed`] : []),
|
|
217
|
+
...(totals.skipped > 0 ? [`${totals.skipped} skipped`] : []),
|
|
218
|
+
];
|
|
219
|
+
return parts.length === 0 ? "no tests" : parts.join(" · ");
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* The color a run's tests cell takes for a person: error when a test failed, success when some passed and none failed;
|
|
223
|
+
* undefined otherwise, such as with no tests or only skipped ones.
|
|
224
|
+
*/
|
|
225
|
+
export function totalsTone(run) {
|
|
226
|
+
const totals = run.ended?.tests;
|
|
227
|
+
if (totals === undefined || totals === null)
|
|
228
|
+
return undefined;
|
|
229
|
+
if (totals.failed > 0)
|
|
230
|
+
return "error";
|
|
231
|
+
return totals.passed > 0 ? "success" : undefined;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* The runner a run's command ran on, as its table cell reads: a runner run's sandbox name, linked to its page in the
|
|
235
|
+
* Vercel dashboard, with how long it has left while the run's kept runner sandbox still runs, such as `(23m left)`;
|
|
236
|
+
* otherwise, muted, `local` for this machine, `(starting)` before the run has named its sandbox, `(none started)` when
|
|
237
|
+
* it ended without one, or `-` when unknown.
|
|
238
|
+
*/
|
|
239
|
+
export function runnerCell(run) {
|
|
240
|
+
const { where } = run;
|
|
241
|
+
if (where === null)
|
|
242
|
+
return muted("-");
|
|
243
|
+
if (where.kind === "local")
|
|
244
|
+
return muted("local");
|
|
245
|
+
if (where.sandbox === null || where.sandboxUrl === null)
|
|
246
|
+
return muted(run.ended === null ? "(starting)" : "(none started)");
|
|
247
|
+
const left = where.keptMinutesLeft;
|
|
248
|
+
return {
|
|
249
|
+
text: left === null || left === 0 ? where.sandbox : `${where.sandbox} (${left}m left)`,
|
|
250
|
+
url: where.sandboxUrl,
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* How long a run's kept runner sandbox runs, as a person reads it: `until 2026-11-03T21:32:00Z (23m left)`, or
|
|
255
|
+
* `until … (stopped by now)` once that has passed; undefined when the run kept none.
|
|
256
|
+
*/
|
|
257
|
+
export function keptText(run) {
|
|
258
|
+
const { where } = run;
|
|
259
|
+
if (where === null || where.kind === "local" || where.keptUntil === null)
|
|
260
|
+
return undefined;
|
|
261
|
+
const until = `until ${isoSecondsText(where.keptUntil)}`;
|
|
262
|
+
return where.keptMinutesLeft === null || where.keptMinutesLeft === 0
|
|
263
|
+
? `${until} (stopped by now)`
|
|
264
|
+
: `${until} (${where.keptMinutesLeft}m left)`;
|
|
265
|
+
}
|
|
266
|
+
/** The branch a run started from, as its table cell reads: the branch, `detached`, or `-` when unknown. */
|
|
267
|
+
export function branchText(run) {
|
|
268
|
+
if (run.git === null)
|
|
269
|
+
return "-";
|
|
270
|
+
return run.git.branch ?? "detached";
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* The Git checkout a run started from, as a person reads it: `main at 3f2a9c1b7d4e`, `detached at …`, with
|
|
274
|
+
* `, plus uncommitted changes` when the working tree had any; or `-` when unknown.
|
|
275
|
+
*/
|
|
276
|
+
export function gitText(run) {
|
|
277
|
+
const { git } = run;
|
|
278
|
+
if (git === null)
|
|
279
|
+
return "-";
|
|
280
|
+
const at = `${git.branch ?? "detached"} at ${short(git.commit)}`;
|
|
281
|
+
return git.dirty ? `${at}, plus uncommitted changes` : at;
|
|
282
|
+
}
|
|
283
|
+
/** When a run started, as an ISO time to the second, or `-` when unknown. */
|
|
284
|
+
export function startedText(run) {
|
|
285
|
+
return run.startedAt === null ? "-" : isoSecondsText(run.startedAt);
|
|
286
|
+
}
|
|
287
|
+
/** A run's command line as a person reads it, each argument as is when it is plain, else single-quoted; or `-`. */
|
|
288
|
+
export function commandText(run) {
|
|
289
|
+
if (run.argv === null)
|
|
290
|
+
return "-";
|
|
291
|
+
return run.argv.map((arg) => (/^[\w@%+=:,./-]+$/.test(arg) ? arg : `'${arg.replaceAll("'", `'\\''`)}'`)).join(" ");
|
|
292
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { CommandBuilder } from "@vercel/clinkr";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import type { StormApp } from "../../../context.ts";
|
|
4
|
+
/** How many runs `runs list` lists unless `--limit` says otherwise. */
|
|
5
|
+
export declare const DEFAULT_LIMIT = 20;
|
|
6
|
+
/**
|
|
7
|
+
* Lists past runs, newest first: those of the config file found from the working directory, or every run with `--all`
|
|
8
|
+
* or when none is found, only those started on branch `--branch` when given, at most `--limit`. It reads each run
|
|
9
|
+
* directory's `run.json` and changes nothing.
|
|
10
|
+
*/
|
|
11
|
+
export declare function command(cmd: CommandBuilder<StormApp>): import("@vercel/clinkr").CommandDefinition<z.ZodObject<{
|
|
12
|
+
all: z.ZodDefault<z.ZodBoolean>;
|
|
13
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
14
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, z.core.$strip>, import("@vercel/clinkr").Outcomes<{
|
|
16
|
+
listed: z.ZodObject<{
|
|
17
|
+
scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
18
|
+
kind: z.ZodLiteral<"config">;
|
|
19
|
+
configFile: z.ZodString;
|
|
20
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
21
|
+
kind: z.ZodLiteral<"all">;
|
|
22
|
+
why: z.ZodEnum<{
|
|
23
|
+
flag: "flag";
|
|
24
|
+
"no-config-file": "no-config-file";
|
|
25
|
+
}>;
|
|
26
|
+
}, z.core.$strip>], "kind">;
|
|
27
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
28
|
+
total: z.ZodNumber;
|
|
29
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
30
|
+
id: z.ZodString;
|
|
31
|
+
path: z.ZodString;
|
|
32
|
+
active: z.ZodBoolean;
|
|
33
|
+
startedAt: z.ZodNullable<z.ZodString>;
|
|
34
|
+
cwd: z.ZodNullable<z.ZodString>;
|
|
35
|
+
configFile: z.ZodNullable<z.ZodString>;
|
|
36
|
+
argv: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
37
|
+
where: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
38
|
+
kind: z.ZodLiteral<"local">;
|
|
39
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
40
|
+
kind: z.ZodLiteral<"runner">;
|
|
41
|
+
team: z.ZodString;
|
|
42
|
+
project: z.ZodString;
|
|
43
|
+
region: z.ZodString;
|
|
44
|
+
runtime: z.ZodString;
|
|
45
|
+
vcpus: z.ZodNumber;
|
|
46
|
+
base: z.ZodString;
|
|
47
|
+
baseRef: z.ZodString;
|
|
48
|
+
sandbox: z.ZodNullable<z.ZodString>;
|
|
49
|
+
sandboxUrl: z.ZodNullable<z.ZodString>;
|
|
50
|
+
keptUntil: z.ZodNullable<z.ZodString>;
|
|
51
|
+
keptMinutesLeft: z.ZodNullable<z.ZodNumber>;
|
|
52
|
+
snapshot: z.ZodNullable<z.ZodObject<{
|
|
53
|
+
id: z.ZodString;
|
|
54
|
+
base: z.ZodString;
|
|
55
|
+
built: z.ZodBoolean;
|
|
56
|
+
url: z.ZodString;
|
|
57
|
+
}, z.core.$strip>>;
|
|
58
|
+
}, z.core.$strip>], "kind">>;
|
|
59
|
+
git: z.ZodNullable<z.ZodObject<{
|
|
60
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
61
|
+
commit: z.ZodString;
|
|
62
|
+
dirty: z.ZodBoolean;
|
|
63
|
+
}, z.core.$strip>>;
|
|
64
|
+
ended: z.ZodNullable<z.ZodObject<{
|
|
65
|
+
outcome: z.ZodString;
|
|
66
|
+
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
67
|
+
signal: z.ZodNullable<z.ZodString>;
|
|
68
|
+
ms: z.ZodNullable<z.ZodNumber>;
|
|
69
|
+
tests: z.ZodNullable<z.ZodObject<{
|
|
70
|
+
passed: z.ZodNumber;
|
|
71
|
+
failed: z.ZodNumber;
|
|
72
|
+
skipped: z.ZodNumber;
|
|
73
|
+
}, z.core.$strip>>;
|
|
74
|
+
testsIncomplete: z.ZodNullable<z.ZodString>;
|
|
75
|
+
resources: z.ZodNullable<z.ZodType<import("../../../core/resource.ts").ResourceRanFacts<import("../../../resources.ts").Resources>, import("../../../core/resource.ts").ResourceRanFacts<import("../../../resources.ts").Resources>, z.core.$ZodTypeInternals<import("../../../core/resource.ts").ResourceRanFacts<import("../../../resources.ts").Resources>, import("../../../core/resource.ts").ResourceRanFacts<import("../../../resources.ts").Resources>>>>;
|
|
76
|
+
}, z.core.$strip>>;
|
|
77
|
+
}, z.core.$strip>>;
|
|
78
|
+
}, z.core.$strip>;
|
|
79
|
+
}, {
|
|
80
|
+
listed: unknown;
|
|
81
|
+
}, {
|
|
82
|
+
runsUnreadable: z.ZodObject<{
|
|
83
|
+
path: z.ZodString;
|
|
84
|
+
message: z.ZodString;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
}>, StormApp, false>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { findConfigFile } from "../../../config/index.js";
|
|
3
|
+
import { runFacts, scopeFacts } from "../facts.js";
|
|
4
|
+
import { onBranch, runScope, runsInScope } from "../past-run.js";
|
|
5
|
+
import { outcomes } from "./outcomes.js";
|
|
6
|
+
/** How many runs `runs list` lists unless `--limit` says otherwise. */
|
|
7
|
+
export const DEFAULT_LIMIT = 20;
|
|
8
|
+
/**
|
|
9
|
+
* Lists past runs, newest first: those of the config file found from the working directory, or every run with `--all`
|
|
10
|
+
* or when none is found, only those started on branch `--branch` when given, at most `--limit`. It reads each run
|
|
11
|
+
* directory's `run.json` and changes nothing.
|
|
12
|
+
*/
|
|
13
|
+
export function command(cmd) {
|
|
14
|
+
return cmd.define({
|
|
15
|
+
requestSchema: z.object({
|
|
16
|
+
all: z.boolean().default(false),
|
|
17
|
+
limit: z.number().int().min(1).default(DEFAULT_LIMIT),
|
|
18
|
+
branch: z.string().min(1).optional(),
|
|
19
|
+
}),
|
|
20
|
+
outcomes,
|
|
21
|
+
handler: async ({ app }, request) => {
|
|
22
|
+
const now = app.context.clock.now();
|
|
23
|
+
const listed = await app.context.runDirectories.list({ now });
|
|
24
|
+
if (!listed.ok)
|
|
25
|
+
return outcomes.runsUnreadable({ ...listed.failure });
|
|
26
|
+
const scope = runScope(request.all, await findConfigFile(app.context.config, app.cwd));
|
|
27
|
+
const runs = onBranch(runsInScope(listed.runs, scope), request.branch);
|
|
28
|
+
return outcomes.listed({
|
|
29
|
+
scope: scopeFacts(scope),
|
|
30
|
+
branch: request.branch ?? null,
|
|
31
|
+
total: runs.length,
|
|
32
|
+
runs: runs.slice(0, request.limit).map((run) => runFacts(run, now)),
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const metadata: {
|
|
2
|
+
description: string;
|
|
3
|
+
summary: string;
|
|
4
|
+
aliases: string[];
|
|
5
|
+
fields: {
|
|
6
|
+
all: {
|
|
7
|
+
description: string;
|
|
8
|
+
};
|
|
9
|
+
limit: {
|
|
10
|
+
valueLabel: string;
|
|
11
|
+
description: string;
|
|
12
|
+
};
|
|
13
|
+
branch: {
|
|
14
|
+
valueLabel: string;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
examples: {
|
|
19
|
+
argv: string;
|
|
20
|
+
description: string;
|
|
21
|
+
}[];
|
|
22
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export const metadata = {
|
|
2
|
+
description: "List past runs, newest first, from their run directories under ${XDG_STATE_HOME:-~/.local/state}/storm/runs/ on this machine: each run's id, when it started, how long its command took, how it ended, the runner its command ran on (local for this machine, with --local, or the runner sandbox's name, linked to its page in the Vercel dashboard on a terminal that takes color, with how long it has left while the run keeps it running), the branch it started from, its tests' totals and its command, the exit and the totals in the color of how the run went on a terminal that takes color. By default only the runs of the storm.config.ts found from the working directory, so each worktree sees its own; every run when none is found. --branch keeps only the runs started on one branch, whichever worktree ran them when given with --all. Changes nothing.",
|
|
3
|
+
summary: "List past runs.",
|
|
4
|
+
aliases: ["ls"],
|
|
5
|
+
fields: {
|
|
6
|
+
all: { description: "List every run, whatever config file it ran with, including runs from an older storm." },
|
|
7
|
+
limit: { valueLabel: "N", description: "List at most N runs, the newest; default 20." },
|
|
8
|
+
branch: {
|
|
9
|
+
valueLabel: "BRANCH",
|
|
10
|
+
description: "List only the runs started with BRANCH checked out. With --all, from every worktree.",
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
examples: [
|
|
14
|
+
{ argv: "", description: "List this config file's newest 20 runs." },
|
|
15
|
+
{ argv: "--all --limit 100", description: "List the newest 100 runs on this machine." },
|
|
16
|
+
{ argv: "--all --branch my-feature", description: "List the runs of branch my-feature, from any worktree." },
|
|
17
|
+
{ argv: "--json", description: "List the runs as JSON, each with its run.json facts." },
|
|
18
|
+
],
|
|
19
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** How `runs list` ends. */
|
|
3
|
+
export declare const outcomes: import("@vercel/clinkr").Outcomes<{
|
|
4
|
+
listed: z.ZodObject<{
|
|
5
|
+
scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6
|
+
kind: z.ZodLiteral<"config">;
|
|
7
|
+
configFile: z.ZodString;
|
|
8
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
9
|
+
kind: z.ZodLiteral<"all">;
|
|
10
|
+
why: z.ZodEnum<{
|
|
11
|
+
flag: "flag";
|
|
12
|
+
"no-config-file": "no-config-file";
|
|
13
|
+
}>;
|
|
14
|
+
}, z.core.$strip>], "kind">;
|
|
15
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
16
|
+
total: z.ZodNumber;
|
|
17
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
18
|
+
id: z.ZodString;
|
|
19
|
+
path: z.ZodString;
|
|
20
|
+
active: z.ZodBoolean;
|
|
21
|
+
startedAt: z.ZodNullable<z.ZodString>;
|
|
22
|
+
cwd: z.ZodNullable<z.ZodString>;
|
|
23
|
+
configFile: z.ZodNullable<z.ZodString>;
|
|
24
|
+
argv: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
25
|
+
where: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
26
|
+
kind: z.ZodLiteral<"local">;
|
|
27
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
28
|
+
kind: z.ZodLiteral<"runner">;
|
|
29
|
+
team: z.ZodString;
|
|
30
|
+
project: z.ZodString;
|
|
31
|
+
region: z.ZodString;
|
|
32
|
+
runtime: z.ZodString;
|
|
33
|
+
vcpus: z.ZodNumber;
|
|
34
|
+
base: z.ZodString;
|
|
35
|
+
baseRef: z.ZodString;
|
|
36
|
+
sandbox: z.ZodNullable<z.ZodString>;
|
|
37
|
+
sandboxUrl: z.ZodNullable<z.ZodString>;
|
|
38
|
+
keptUntil: z.ZodNullable<z.ZodString>;
|
|
39
|
+
keptMinutesLeft: z.ZodNullable<z.ZodNumber>;
|
|
40
|
+
snapshot: z.ZodNullable<z.ZodObject<{
|
|
41
|
+
id: z.ZodString;
|
|
42
|
+
base: z.ZodString;
|
|
43
|
+
built: z.ZodBoolean;
|
|
44
|
+
url: z.ZodString;
|
|
45
|
+
}, z.core.$strip>>;
|
|
46
|
+
}, z.core.$strip>], "kind">>;
|
|
47
|
+
git: z.ZodNullable<z.ZodObject<{
|
|
48
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
49
|
+
commit: z.ZodString;
|
|
50
|
+
dirty: z.ZodBoolean;
|
|
51
|
+
}, z.core.$strip>>;
|
|
52
|
+
ended: z.ZodNullable<z.ZodObject<{
|
|
53
|
+
outcome: z.ZodString;
|
|
54
|
+
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
55
|
+
signal: z.ZodNullable<z.ZodString>;
|
|
56
|
+
ms: z.ZodNullable<z.ZodNumber>;
|
|
57
|
+
tests: z.ZodNullable<z.ZodObject<{
|
|
58
|
+
passed: z.ZodNumber;
|
|
59
|
+
failed: z.ZodNumber;
|
|
60
|
+
skipped: z.ZodNumber;
|
|
61
|
+
}, z.core.$strip>>;
|
|
62
|
+
testsIncomplete: z.ZodNullable<z.ZodString>;
|
|
63
|
+
resources: z.ZodNullable<z.ZodType<import("../../../core/resource.ts").ResourceRanFacts<import("../../../resources.ts").Resources>, import("../../../core/resource.ts").ResourceRanFacts<import("../../../resources.ts").Resources>, z.core.$ZodTypeInternals<import("../../../core/resource.ts").ResourceRanFacts<import("../../../resources.ts").Resources>, import("../../../core/resource.ts").ResourceRanFacts<import("../../../resources.ts").Resources>>>>;
|
|
64
|
+
}, z.core.$strip>>;
|
|
65
|
+
}, z.core.$strip>>;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
}, {
|
|
68
|
+
listed: unknown;
|
|
69
|
+
}, {
|
|
70
|
+
runsUnreadable: z.ZodObject<{
|
|
71
|
+
path: z.ZodString;
|
|
72
|
+
message: z.ZodString;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
}>;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { muted, path, renderOutcome, status } from "@cnc-tools/cli-kit/clinkr";
|
|
2
|
+
import { defineOutcomes } from "@vercel/clinkr";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { branchText, commandText, exitText, exitTone, runnerCell, runFactsSchema, runsUnreadable, scopeSchema, scopeText, startedText, tookText, totalsText, totalsTone, } from "../facts.js";
|
|
5
|
+
const listedSchema = z.object({
|
|
6
|
+
/** Which runs it listed: one config file's, or every run. */
|
|
7
|
+
scope: scopeSchema,
|
|
8
|
+
/** The branch --branch named, which every listed run started on; null without --branch. */
|
|
9
|
+
branch: z.string().nullable(),
|
|
10
|
+
/** How many runs are in the scope, and on the branch, listed or not. */
|
|
11
|
+
total: z.number(),
|
|
12
|
+
/** The newest runs in the scope, newest first, at most --limit. */
|
|
13
|
+
runs: z.array(runFactsSchema),
|
|
14
|
+
});
|
|
15
|
+
/** What `runs list` says when it lists no run, and how to widen the scope or the filter. */
|
|
16
|
+
function emptyText({ scope, branch }) {
|
|
17
|
+
if (branch === null)
|
|
18
|
+
return scope.kind === "config" ? "No runs of this config file. Pass --all to see every run." : "No runs.";
|
|
19
|
+
return scope.kind === "config"
|
|
20
|
+
? "No runs of this config file match this filter. Remove --branch to see all of them, or pass --all to look through every run."
|
|
21
|
+
: "No runs match this filter. Remove --branch to see all runs.";
|
|
22
|
+
}
|
|
23
|
+
/** A table cell as a person sees it: `-` and other unknowns muted, else in `tone` when it has one. */
|
|
24
|
+
function cell(text, tone) {
|
|
25
|
+
if (text === "-")
|
|
26
|
+
return muted(text);
|
|
27
|
+
return tone === undefined ? text : status(text, tone);
|
|
28
|
+
}
|
|
29
|
+
/** The branch cell: muted when the run started on a detached HEAD or outside a Git checkout. */
|
|
30
|
+
function branchCell(run) {
|
|
31
|
+
const text = branchText(run);
|
|
32
|
+
return run.git === null || run.git.branch === null ? muted(text) : text;
|
|
33
|
+
}
|
|
34
|
+
/** How `runs list` ends. */
|
|
35
|
+
export const outcomes = defineOutcomes({
|
|
36
|
+
results: {
|
|
37
|
+
listed: {
|
|
38
|
+
schema: listedSchema,
|
|
39
|
+
description: "The newest runs in the scope; none is an empty list.",
|
|
40
|
+
render: (listed) => renderOutcome({
|
|
41
|
+
rows: [
|
|
42
|
+
["Runs of", listed.scope.kind === "config" ? path(listed.scope.configFile) : scopeText(listed.scope)],
|
|
43
|
+
...(listed.branch === null ? [] : [["Branch", listed.branch]]),
|
|
44
|
+
],
|
|
45
|
+
...(listed.runs.length === 0
|
|
46
|
+
? { message: emptyText(listed) }
|
|
47
|
+
: {
|
|
48
|
+
table: {
|
|
49
|
+
columns: ["RUN", "STARTED", "TOOK", "EXIT", "RUNNER", "BRANCH", "TESTS", "COMMAND"],
|
|
50
|
+
// The exit and the tests in the color of how they went, the runner sandbox in a link's color, and
|
|
51
|
+
// what is unknown or not a place muted.
|
|
52
|
+
rows: listed.runs.map((run) => [
|
|
53
|
+
run.id,
|
|
54
|
+
cell(startedText(run)),
|
|
55
|
+
cell(tookText(run)),
|
|
56
|
+
cell(exitText(run), exitTone(run)),
|
|
57
|
+
runnerCell(run),
|
|
58
|
+
branchCell(run),
|
|
59
|
+
cell(totalsText(run), totalsTone(run)),
|
|
60
|
+
cell(commandText(run)),
|
|
61
|
+
]),
|
|
62
|
+
},
|
|
63
|
+
}),
|
|
64
|
+
...(listed.total > listed.runs.length
|
|
65
|
+
? {
|
|
66
|
+
next: [
|
|
67
|
+
{
|
|
68
|
+
type: "command",
|
|
69
|
+
argv: [
|
|
70
|
+
"storm",
|
|
71
|
+
"runs",
|
|
72
|
+
"list",
|
|
73
|
+
...(listed.scope.kind === "all" && listed.scope.why === "flag" ? ["--all"] : []),
|
|
74
|
+
...(listed.branch === null ? [] : ["--branch", listed.branch]),
|
|
75
|
+
"--limit",
|
|
76
|
+
String(listed.total),
|
|
77
|
+
],
|
|
78
|
+
label: `List all ${listed.total} runs`,
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
}
|
|
82
|
+
: {}),
|
|
83
|
+
}),
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
errors: {
|
|
87
|
+
runsUnreadable,
|
|
88
|
+
},
|
|
89
|
+
});
|