@cnc-tools/storm 0.0.0 → 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 +119 -3
- package/skills/overview.md +32 -0
- package/skills/read-run-output.md +65 -0
- package/README.md +0 -3
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { CommandBuilder } from "@vercel/clinkr";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import type { StormApp } from "../../../context.ts";
|
|
4
|
+
/**
|
|
5
|
+
* Prints a run log of a past run as it is: the command log by default, or step `--step`'s log. The run is run `id`, or
|
|
6
|
+
* without one the newest run of the config file found from the working directory, or of every run with `--all` or
|
|
7
|
+
* when none is found, still going or not, since its logs grow while it goes. It reads the run directory and changes
|
|
8
|
+
* nothing.
|
|
9
|
+
*/
|
|
10
|
+
export declare function command(cmd: CommandBuilder<StormApp>): import("@vercel/clinkr").CommandDefinition<z.ZodObject<{
|
|
11
|
+
id: z.ZodOptional<z.ZodString>;
|
|
12
|
+
step: z.ZodDefault<z.ZodEnum<{
|
|
13
|
+
apply: "apply";
|
|
14
|
+
build: "build";
|
|
15
|
+
command: "command";
|
|
16
|
+
install: "install";
|
|
17
|
+
snapshot: "snapshot";
|
|
18
|
+
}>>;
|
|
19
|
+
all: z.ZodDefault<z.ZodBoolean>;
|
|
20
|
+
}, z.core.$strip>, import("@vercel/clinkr").Outcomes<{
|
|
21
|
+
printed: z.ZodObject<{
|
|
22
|
+
runId: z.ZodString;
|
|
23
|
+
step: z.ZodEnum<{
|
|
24
|
+
apply: "apply";
|
|
25
|
+
build: "build";
|
|
26
|
+
command: "command";
|
|
27
|
+
install: "install";
|
|
28
|
+
snapshot: "snapshot";
|
|
29
|
+
}>;
|
|
30
|
+
path: z.ZodString;
|
|
31
|
+
text: z.ZodString;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
}, {
|
|
34
|
+
printed: unknown;
|
|
35
|
+
}, {
|
|
36
|
+
runsUnreadable: z.ZodObject<{
|
|
37
|
+
path: z.ZodString;
|
|
38
|
+
message: z.ZodString;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
runNotFound: z.ZodObject<{
|
|
41
|
+
id: z.ZodString;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
noRuns: z.ZodObject<{
|
|
44
|
+
scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
45
|
+
kind: z.ZodLiteral<"config">;
|
|
46
|
+
configFile: z.ZodString;
|
|
47
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
48
|
+
kind: z.ZodLiteral<"all">;
|
|
49
|
+
why: z.ZodEnum<{
|
|
50
|
+
flag: "flag";
|
|
51
|
+
"no-config-file": "no-config-file";
|
|
52
|
+
}>;
|
|
53
|
+
}, z.core.$strip>], "kind">;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
logNotFound: z.ZodObject<{
|
|
56
|
+
id: z.ZodString;
|
|
57
|
+
step: z.ZodEnum<{
|
|
58
|
+
apply: "apply";
|
|
59
|
+
build: "build";
|
|
60
|
+
command: "command";
|
|
61
|
+
install: "install";
|
|
62
|
+
snapshot: "snapshot";
|
|
63
|
+
}>;
|
|
64
|
+
logs: z.ZodArray<z.ZodEnum<{
|
|
65
|
+
apply: "apply";
|
|
66
|
+
build: "build";
|
|
67
|
+
command: "command";
|
|
68
|
+
install: "install";
|
|
69
|
+
snapshot: "snapshot";
|
|
70
|
+
}>>;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
}>, StormApp, false>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { findConfigFile } from "../../../config/index.js";
|
|
3
|
+
import { LOG_STEPS, scopeFacts } from "../facts.js";
|
|
4
|
+
import { newest, runScope, runsInScope } from "../past-run.js";
|
|
5
|
+
import { outcomes } from "./outcomes.js";
|
|
6
|
+
/**
|
|
7
|
+
* Prints a run log of a past run as it is: the command log by default, or step `--step`'s log. The run is run `id`, or
|
|
8
|
+
* without one the newest run of the config file found from the working directory, or of every run with `--all` or
|
|
9
|
+
* when none is found, still going or not, since its logs grow while it goes. It reads the run directory and changes
|
|
10
|
+
* nothing.
|
|
11
|
+
*/
|
|
12
|
+
export function command(cmd) {
|
|
13
|
+
return cmd.define({
|
|
14
|
+
requestSchema: z.object({
|
|
15
|
+
id: z.string().min(1).optional(),
|
|
16
|
+
step: z.enum(LOG_STEPS).default("command"),
|
|
17
|
+
all: z.boolean().default(false),
|
|
18
|
+
}),
|
|
19
|
+
cli: { positionals: ["id"] },
|
|
20
|
+
outcomes,
|
|
21
|
+
handler: async ({ app }, request) => {
|
|
22
|
+
const now = app.context.clock.now();
|
|
23
|
+
let id = request.id;
|
|
24
|
+
if (id === undefined) {
|
|
25
|
+
const listed = await app.context.runDirectories.list({ now });
|
|
26
|
+
if (!listed.ok)
|
|
27
|
+
return outcomes.runsUnreadable({ ...listed.failure });
|
|
28
|
+
const scope = runScope(request.all, await findConfigFile(app.context.config, app.cwd));
|
|
29
|
+
const run = newest(runsInScope(listed.runs, scope));
|
|
30
|
+
if (run === undefined)
|
|
31
|
+
return outcomes.noRuns({ scope: scopeFacts(scope) });
|
|
32
|
+
id = run.id;
|
|
33
|
+
}
|
|
34
|
+
const read = await app.context.runDirectories.read({ id, now });
|
|
35
|
+
if (read.kind === "failed")
|
|
36
|
+
return outcomes.runsUnreadable({ ...read.failure });
|
|
37
|
+
if (read.kind === "not-found")
|
|
38
|
+
return outcomes.runNotFound({ id });
|
|
39
|
+
const logs = LOG_STEPS.filter((log) => read.directory.logs.includes(log));
|
|
40
|
+
const notFound = () => outcomes.logNotFound({ id, step: request.step, logs: [...logs] });
|
|
41
|
+
if (!logs.includes(request.step))
|
|
42
|
+
return notFound();
|
|
43
|
+
const log = await app.context.runDirectories.readLog({ id, log: request.step });
|
|
44
|
+
if (log.kind === "failed")
|
|
45
|
+
return outcomes.runsUnreadable({ ...log.failure });
|
|
46
|
+
if (log.kind === "not-found")
|
|
47
|
+
return notFound();
|
|
48
|
+
return outcomes.printed({ runId: id, step: request.step, path: log.path, text: log.text });
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const metadata: {
|
|
2
|
+
description: string;
|
|
3
|
+
summary: string;
|
|
4
|
+
usages: string[];
|
|
5
|
+
fields: {
|
|
6
|
+
id: {
|
|
7
|
+
valueLabel: string;
|
|
8
|
+
description: string;
|
|
9
|
+
};
|
|
10
|
+
step: {
|
|
11
|
+
valueLabel: string;
|
|
12
|
+
description: string;
|
|
13
|
+
};
|
|
14
|
+
all: {
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
examples: {
|
|
19
|
+
argv: string;
|
|
20
|
+
description: string;
|
|
21
|
+
}[];
|
|
22
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const metadata = {
|
|
2
|
+
description: "Print a log of a run from its run directory, as it is, on stdout. The command log holds all the output of the command: the output of its tests, and output that no test owns, such as the output of a beforeAll, a global setup, a raw write to stdout or stderr, or a child process. A step log holds the output of one step of a runner run: install, build, apply or snapshot. Each line of a step log starts with its time. Without an id, it prints a log of the newest run of the storm.config.ts found from the working directory, or of every config with --all. That run can still be going: then it prints the log as it is now. Changes nothing.",
|
|
3
|
+
summary: "Print the command log or a step log of a run.",
|
|
4
|
+
usages: ["[<id>] [--step command|install|build|apply|snapshot] [--all]"],
|
|
5
|
+
fields: {
|
|
6
|
+
id: {
|
|
7
|
+
valueLabel: "id",
|
|
8
|
+
description: "The run id, such as 20261103T192655-8277, which `storm run` and `storm runs list` print.",
|
|
9
|
+
},
|
|
10
|
+
step: {
|
|
11
|
+
valueLabel: "STEP",
|
|
12
|
+
description: "The log to print: command (the default) for the output of the command, or install, build, apply or snapshot for the log of that step.",
|
|
13
|
+
},
|
|
14
|
+
all: { description: "Without an id, use the newest run of any config file." },
|
|
15
|
+
},
|
|
16
|
+
examples: [
|
|
17
|
+
{ argv: "20261103T192655-8277", description: "Print the command log of a run." },
|
|
18
|
+
{ argv: "", description: "Print the command log of the newest run. Pipe it to grep to find lines." },
|
|
19
|
+
{ argv: "20261103T192655-8277 --step install", description: "Print the install log of a runner run." },
|
|
20
|
+
{ argv: "20261103T192655-8277 --json", description: "Print the command log as JSON, with its path." },
|
|
21
|
+
],
|
|
22
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** How `runs logs` ends. */
|
|
3
|
+
export declare const outcomes: import("@vercel/clinkr").Outcomes<{
|
|
4
|
+
printed: z.ZodObject<{
|
|
5
|
+
runId: z.ZodString;
|
|
6
|
+
step: z.ZodEnum<{
|
|
7
|
+
apply: "apply";
|
|
8
|
+
build: "build";
|
|
9
|
+
command: "command";
|
|
10
|
+
install: "install";
|
|
11
|
+
snapshot: "snapshot";
|
|
12
|
+
}>;
|
|
13
|
+
path: z.ZodString;
|
|
14
|
+
text: z.ZodString;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
}, {
|
|
17
|
+
printed: unknown;
|
|
18
|
+
}, {
|
|
19
|
+
runsUnreadable: z.ZodObject<{
|
|
20
|
+
path: z.ZodString;
|
|
21
|
+
message: z.ZodString;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
runNotFound: z.ZodObject<{
|
|
24
|
+
id: z.ZodString;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
noRuns: z.ZodObject<{
|
|
27
|
+
scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
28
|
+
kind: z.ZodLiteral<"config">;
|
|
29
|
+
configFile: z.ZodString;
|
|
30
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
31
|
+
kind: z.ZodLiteral<"all">;
|
|
32
|
+
why: z.ZodEnum<{
|
|
33
|
+
flag: "flag";
|
|
34
|
+
"no-config-file": "no-config-file";
|
|
35
|
+
}>;
|
|
36
|
+
}, z.core.$strip>], "kind">;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
logNotFound: z.ZodObject<{
|
|
39
|
+
id: z.ZodString;
|
|
40
|
+
step: z.ZodEnum<{
|
|
41
|
+
apply: "apply";
|
|
42
|
+
build: "build";
|
|
43
|
+
command: "command";
|
|
44
|
+
install: "install";
|
|
45
|
+
snapshot: "snapshot";
|
|
46
|
+
}>;
|
|
47
|
+
logs: z.ZodArray<z.ZodEnum<{
|
|
48
|
+
apply: "apply";
|
|
49
|
+
build: "build";
|
|
50
|
+
command: "command";
|
|
51
|
+
install: "install";
|
|
52
|
+
snapshot: "snapshot";
|
|
53
|
+
}>>;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
}>;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { renderOutcome } from "@cnc-tools/cli-kit/clinkr";
|
|
2
|
+
import { defineOutcomes } from "@vercel/clinkr";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { LOG_STEPS, runNotFound, runsUnreadable, scopeSchema } from "../facts.js";
|
|
5
|
+
const stepSchema = z.enum(LOG_STEPS);
|
|
6
|
+
const printedSchema = z.object({
|
|
7
|
+
/** The run id. */
|
|
8
|
+
runId: z.string(),
|
|
9
|
+
/** The run log: `command` for the command's output, or a step's log. */
|
|
10
|
+
step: stepSchema,
|
|
11
|
+
/** The run log's file. */
|
|
12
|
+
path: z.string(),
|
|
13
|
+
/** The run log's text, as it is now. A step's log starts each line with its time. */
|
|
14
|
+
text: z.string(),
|
|
15
|
+
});
|
|
16
|
+
/** How `runs logs` ends. */
|
|
17
|
+
export const outcomes = defineOutcomes({
|
|
18
|
+
results: {
|
|
19
|
+
printed: {
|
|
20
|
+
schema: printedSchema,
|
|
21
|
+
description: "The run log's text, as it is.",
|
|
22
|
+
render: ({ text }) => renderOutcome({ text }),
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
errors: {
|
|
26
|
+
runsUnreadable,
|
|
27
|
+
runNotFound,
|
|
28
|
+
noRuns: {
|
|
29
|
+
exitCode: 1,
|
|
30
|
+
description: "Without an id, the scope has no run.",
|
|
31
|
+
schema: z.object({
|
|
32
|
+
/** Which runs it looked through. */
|
|
33
|
+
scope: scopeSchema,
|
|
34
|
+
}),
|
|
35
|
+
render: ({ scope }) => scope.kind === "config"
|
|
36
|
+
? {
|
|
37
|
+
message: `Couldn't find a run of ${scope.configFile}.`,
|
|
38
|
+
next: [
|
|
39
|
+
{
|
|
40
|
+
type: "command",
|
|
41
|
+
argv: ["storm", "runs", "logs", "--all"],
|
|
42
|
+
label: "Print the newest run's command log, of any config file",
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
}
|
|
46
|
+
: { message: "Couldn't find a run.", next: [{ type: "text", text: "Run storm run first." }] },
|
|
47
|
+
},
|
|
48
|
+
logNotFound: {
|
|
49
|
+
exitCode: 1,
|
|
50
|
+
description: "The run has no log for the step given: the step didn't run, or hasn't written output yet.",
|
|
51
|
+
schema: z.object({
|
|
52
|
+
/** The run id. */
|
|
53
|
+
id: z.string(),
|
|
54
|
+
/** The step given. */
|
|
55
|
+
step: stepSchema,
|
|
56
|
+
/** The run logs the run has. */
|
|
57
|
+
logs: z.array(stepSchema),
|
|
58
|
+
}),
|
|
59
|
+
render: ({ id, step, logs }) => {
|
|
60
|
+
const first = logs[0];
|
|
61
|
+
return {
|
|
62
|
+
message: `Run ${id} has no ${step} log.`,
|
|
63
|
+
rows: [["Logs", logs.length === 0 ? "none" : logs.join(", ")]],
|
|
64
|
+
next: first === undefined
|
|
65
|
+
? [{ type: "command", argv: ["storm", "runs", "show", id], label: "Show the run" }]
|
|
66
|
+
: [
|
|
67
|
+
{
|
|
68
|
+
type: "command",
|
|
69
|
+
argv: ["storm", "runs", "logs", id, "--step", first],
|
|
70
|
+
label: `Print its ${first} log`,
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
});
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { z } from "zod";
|
|
2
|
+
import type { ListedRunDirectory, PastRunDirectory } from "../../core/index.ts";
|
|
3
|
+
import type { StormTimeline } from "../../resources.ts";
|
|
4
|
+
import { type TestEvent, type TestResultEvent } from "../../sdk/index.ts";
|
|
5
|
+
import { timelineSchema } from "../run/outcomes.ts";
|
|
6
|
+
import { type RunRecord } from "../run/run-record.ts";
|
|
7
|
+
/**
|
|
8
|
+
* Which runs a command sees: those of the config file `storm.config.ts` the working directory finds, or every run,
|
|
9
|
+
* by `--all` or because no config file was found.
|
|
10
|
+
*/
|
|
11
|
+
export type RunScope = {
|
|
12
|
+
readonly kind: "config";
|
|
13
|
+
readonly configFile: string;
|
|
14
|
+
} | {
|
|
15
|
+
readonly kind: "all";
|
|
16
|
+
readonly why: "flag" | "no-config-file";
|
|
17
|
+
};
|
|
18
|
+
/** The scope for `--all` and the config file found from the working directory, if any. */
|
|
19
|
+
export declare function runScope(all: boolean, configFile: string | undefined): RunScope;
|
|
20
|
+
/** A listed run directory with what its `run.json` records; `record` undefined when it has none it can read. */
|
|
21
|
+
export interface ListedRun {
|
|
22
|
+
readonly id: string;
|
|
23
|
+
readonly path: string;
|
|
24
|
+
readonly active: boolean;
|
|
25
|
+
readonly record: RunRecord | undefined;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The runs in `scope`, newest first, as `listed` holds them. A run of another config file, or whose `run.json` can't be
|
|
29
|
+
* read, such as one an older storm wrote, is only in the `all` scope.
|
|
30
|
+
*/
|
|
31
|
+
export declare function runsInScope(listed: readonly ListedRunDirectory[], scope: RunScope): ListedRun[];
|
|
32
|
+
/**
|
|
33
|
+
* The runs in `runs` that started on branch `branch`, by their `run.json`; all of them when `branch` is undefined. A
|
|
34
|
+
* run on a detached HEAD, outside a Git checkout, or whose `run.json` can't be read is on no branch.
|
|
35
|
+
*/
|
|
36
|
+
export declare function onBranch(runs: readonly ListedRun[], branch: string | undefined): readonly ListedRun[];
|
|
37
|
+
/**
|
|
38
|
+
* The newest run in `runs` that has finished: its run directory no longer active, and its `run.json` saying how it
|
|
39
|
+
* ended, which storm writes once the run is over. Undefined when none has.
|
|
40
|
+
*/
|
|
41
|
+
export declare function newestFinished(runs: readonly ListedRun[]): ListedRun | undefined;
|
|
42
|
+
/** The newest run in `runs`, whether it has finished or is still going; undefined when there is none. */
|
|
43
|
+
export declare function newest(runs: readonly ListedRun[]): ListedRun | undefined;
|
|
44
|
+
/** A timeline as `timeline.json` and a JSON result hold it. */
|
|
45
|
+
export type TimelineFacts = z.output<typeof timelineSchema>;
|
|
46
|
+
/**
|
|
47
|
+
* A past run read whole: its listing and record; its tests' final results, from its `tests.jsonl`, which storm
|
|
48
|
+
* writes only once the run is over and only redacted, with how many lines held no test event; and its timeline's
|
|
49
|
+
* facts, when it parses, which `timelineFromFacts` turns into a timeline when the run is shown.
|
|
50
|
+
*/
|
|
51
|
+
export interface PastRun extends ListedRun {
|
|
52
|
+
/** Whether its test results were saved: it finished, so its `tests.jsonl` exists. */
|
|
53
|
+
readonly finished: boolean;
|
|
54
|
+
/** Its test events, in the order its `tests.jsonl` holds them; empty unless `finished`. */
|
|
55
|
+
readonly events: readonly TestEvent[];
|
|
56
|
+
readonly unreadableTestLines: number;
|
|
57
|
+
readonly timeline: TimelineFacts | undefined;
|
|
58
|
+
}
|
|
59
|
+
/** `directory` as a past run. */
|
|
60
|
+
export declare function pastRun(directory: PastRunDirectory): PastRun;
|
|
61
|
+
/** The final results among `events`, one per test, in order. */
|
|
62
|
+
export declare function finalResults(events: readonly TestEvent[]): TestResultEvent[];
|
|
63
|
+
/**
|
|
64
|
+
* Whether test `result` is selected by `--failed` (a failed test) and `--test` (a test whose full name or file holds
|
|
65
|
+
* `text`); each that is given must hold.
|
|
66
|
+
*/
|
|
67
|
+
export declare function selected(result: TestResultEvent, filters: {
|
|
68
|
+
readonly failed: boolean;
|
|
69
|
+
readonly test: string | undefined;
|
|
70
|
+
}): boolean;
|
|
71
|
+
/** A timeline as `timeline.json` and a JSON result hold it, as the waterfall reads it. */
|
|
72
|
+
export declare function timelineFromFacts(facts: TimelineFacts): StormTimeline;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
// Past runs as `storm runs` reads them back from their run directories: which runs a command sees, what each one's
|
|
2
|
+
// `run.json`, `tests.jsonl` and `timeline.json` say, and how a person reads those facts. Pure: the commands hand it
|
|
3
|
+
// what the run directory gateway read. Files it can't read, or from an older storm, leave facts unknown, never
|
|
4
|
+
// an error.
|
|
5
|
+
import { parseTestEvent } from "../../sdk/index.js";
|
|
6
|
+
import { timelineSchema } from "../run/outcomes.js";
|
|
7
|
+
import { parseRunRecord } from "../run/run-record.js";
|
|
8
|
+
/** The scope for `--all` and the config file found from the working directory, if any. */
|
|
9
|
+
export function runScope(all, configFile) {
|
|
10
|
+
if (all)
|
|
11
|
+
return { kind: "all", why: "flag" };
|
|
12
|
+
if (configFile === undefined)
|
|
13
|
+
return { kind: "all", why: "no-config-file" };
|
|
14
|
+
return { kind: "config", configFile };
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The runs in `scope`, newest first, as `listed` holds them. A run of another config file, or whose `run.json` can't be
|
|
18
|
+
* read, such as one an older storm wrote, is only in the `all` scope.
|
|
19
|
+
*/
|
|
20
|
+
export function runsInScope(listed, scope) {
|
|
21
|
+
const runs = listed.map(({ id, path, active, run }) => ({ id, path, active, record: parseRunRecord(run) }));
|
|
22
|
+
return scope.kind === "all" ? runs : runs.filter(({ record }) => record?.configFile === scope.configFile);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The runs in `runs` that started on branch `branch`, by their `run.json`; all of them when `branch` is undefined. A
|
|
26
|
+
* run on a detached HEAD, outside a Git checkout, or whose `run.json` can't be read is on no branch.
|
|
27
|
+
*/
|
|
28
|
+
export function onBranch(runs, branch) {
|
|
29
|
+
return branch === undefined ? runs : runs.filter(({ record }) => record?.git?.branch === branch);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The newest run in `runs` that has finished: its run directory no longer active, and its `run.json` saying how it
|
|
33
|
+
* ended, which storm writes once the run is over. Undefined when none has.
|
|
34
|
+
*/
|
|
35
|
+
export function newestFinished(runs) {
|
|
36
|
+
return runs.find((run) => !run.active && run.record?.ended !== undefined);
|
|
37
|
+
}
|
|
38
|
+
/** The newest run in `runs`, whether it has finished or is still going; undefined when there is none. */
|
|
39
|
+
export function newest(runs) {
|
|
40
|
+
return runs[0];
|
|
41
|
+
}
|
|
42
|
+
/** `directory` as a past run. */
|
|
43
|
+
export function pastRun(directory) {
|
|
44
|
+
const parsed = (directory.tests ?? []).map(parseTestEvent);
|
|
45
|
+
return {
|
|
46
|
+
id: directory.id,
|
|
47
|
+
path: directory.path,
|
|
48
|
+
active: directory.active,
|
|
49
|
+
record: parseRunRecord(directory.run),
|
|
50
|
+
finished: directory.tests !== undefined,
|
|
51
|
+
events: parsed.filter((event) => event !== undefined),
|
|
52
|
+
unreadableTestLines: parsed.filter((event) => event === undefined).length,
|
|
53
|
+
timeline: parseTimeline(directory.timeline),
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/** The final results among `events`, one per test, in order. */
|
|
57
|
+
export function finalResults(events) {
|
|
58
|
+
return events.flatMap((event) => (event.kind === "test-result" ? [event] : []));
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Whether test `result` is selected by `--failed` (a failed test) and `--test` (a test whose full name or file holds
|
|
62
|
+
* `text`); each that is given must hold.
|
|
63
|
+
*/
|
|
64
|
+
export function selected(result, filters) {
|
|
65
|
+
if (filters.failed && result.state !== "fail")
|
|
66
|
+
return false;
|
|
67
|
+
if (filters.test !== undefined && !result.test.includes(filters.test) && !result.file.includes(filters.test))
|
|
68
|
+
return false;
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
/** `timeline.json`'s text as timeline facts; undefined when there is none, or it doesn't parse. */
|
|
72
|
+
function parseTimeline(text) {
|
|
73
|
+
if (text === undefined)
|
|
74
|
+
return undefined;
|
|
75
|
+
let json;
|
|
76
|
+
try {
|
|
77
|
+
json = JSON.parse(text);
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
82
|
+
const parsed = timelineSchema.safeParse(json);
|
|
83
|
+
return parsed.success ? parsed.data : undefined;
|
|
84
|
+
}
|
|
85
|
+
/** A timeline as `timeline.json` and a JSON result hold it, as the waterfall reads it. */
|
|
86
|
+
export function timelineFromFacts(facts) {
|
|
87
|
+
return {
|
|
88
|
+
...facts,
|
|
89
|
+
rows: facts.rows.map((row) => ({
|
|
90
|
+
...row,
|
|
91
|
+
// `timelineSchema`'s step names are the timeline's, though its enum, built from each resource's presentation,
|
|
92
|
+
// types them as strings.
|
|
93
|
+
steps: row.steps.map((step) => ({ ...step, name: step.name })),
|
|
94
|
+
// A timeline row always has these keys, undefined when it has no such fact; the facts leave them out then.
|
|
95
|
+
snapshot: row.snapshot,
|
|
96
|
+
sandboxes: row.sandboxes,
|
|
97
|
+
})),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import type { CommandBuilder } from "@vercel/clinkr";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import type { StormApp } from "../../../context.ts";
|
|
4
|
+
/**
|
|
5
|
+
* Shows a past run: run `id`, or without one the newest finished run of the config file found from the working
|
|
6
|
+
* directory, or of every run with `--all` or when none is found. It reads the run's `run.json`, its `timeline.json`,
|
|
7
|
+
* its `tests.jsonl`, which the run writes redacted once it is over, and which run logs it has, and changes nothing. `--failed` and
|
|
8
|
+
* `--test` select tests whose errors and test output it shows.
|
|
9
|
+
*/
|
|
10
|
+
export declare function command(cmd: CommandBuilder<StormApp>): import("@vercel/clinkr").CommandDefinition<z.ZodObject<{
|
|
11
|
+
id: z.ZodOptional<z.ZodString>;
|
|
12
|
+
failed: z.ZodDefault<z.ZodBoolean>;
|
|
13
|
+
test: z.ZodOptional<z.ZodString>;
|
|
14
|
+
all: z.ZodDefault<z.ZodBoolean>;
|
|
15
|
+
}, z.core.$strip>, import("@vercel/clinkr").Outcomes<{
|
|
16
|
+
shown: z.ZodObject<{
|
|
17
|
+
id: z.ZodString;
|
|
18
|
+
path: z.ZodString;
|
|
19
|
+
active: z.ZodBoolean;
|
|
20
|
+
startedAt: z.ZodNullable<z.ZodString>;
|
|
21
|
+
cwd: z.ZodNullable<z.ZodString>;
|
|
22
|
+
configFile: z.ZodNullable<z.ZodString>;
|
|
23
|
+
argv: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
24
|
+
where: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
25
|
+
kind: z.ZodLiteral<"local">;
|
|
26
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
27
|
+
kind: z.ZodLiteral<"runner">;
|
|
28
|
+
team: z.ZodString;
|
|
29
|
+
project: z.ZodString;
|
|
30
|
+
region: z.ZodString;
|
|
31
|
+
runtime: z.ZodString;
|
|
32
|
+
vcpus: z.ZodNumber;
|
|
33
|
+
base: z.ZodString;
|
|
34
|
+
baseRef: z.ZodString;
|
|
35
|
+
sandbox: z.ZodNullable<z.ZodString>;
|
|
36
|
+
sandboxUrl: z.ZodNullable<z.ZodString>;
|
|
37
|
+
keptUntil: z.ZodNullable<z.ZodString>;
|
|
38
|
+
keptMinutesLeft: z.ZodNullable<z.ZodNumber>;
|
|
39
|
+
snapshot: z.ZodNullable<z.ZodObject<{
|
|
40
|
+
id: z.ZodString;
|
|
41
|
+
base: z.ZodString;
|
|
42
|
+
built: z.ZodBoolean;
|
|
43
|
+
url: z.ZodString;
|
|
44
|
+
}, z.core.$strip>>;
|
|
45
|
+
}, z.core.$strip>], "kind">>;
|
|
46
|
+
git: z.ZodNullable<z.ZodObject<{
|
|
47
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
48
|
+
commit: z.ZodString;
|
|
49
|
+
dirty: z.ZodBoolean;
|
|
50
|
+
}, z.core.$strip>>;
|
|
51
|
+
ended: z.ZodNullable<z.ZodObject<{
|
|
52
|
+
outcome: z.ZodString;
|
|
53
|
+
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
54
|
+
signal: z.ZodNullable<z.ZodString>;
|
|
55
|
+
ms: z.ZodNullable<z.ZodNumber>;
|
|
56
|
+
tests: z.ZodNullable<z.ZodObject<{
|
|
57
|
+
passed: z.ZodNumber;
|
|
58
|
+
failed: z.ZodNumber;
|
|
59
|
+
skipped: z.ZodNumber;
|
|
60
|
+
}, z.core.$strip>>;
|
|
61
|
+
testsIncomplete: z.ZodNullable<z.ZodString>;
|
|
62
|
+
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>>>>;
|
|
63
|
+
}, z.core.$strip>>;
|
|
64
|
+
finished: z.ZodBoolean;
|
|
65
|
+
logs: z.ZodArray<z.ZodObject<{
|
|
66
|
+
step: z.ZodEnum<{
|
|
67
|
+
apply: "apply";
|
|
68
|
+
build: "build";
|
|
69
|
+
command: "command";
|
|
70
|
+
install: "install";
|
|
71
|
+
snapshot: "snapshot";
|
|
72
|
+
}>;
|
|
73
|
+
path: z.ZodString;
|
|
74
|
+
}, z.core.$strip>>;
|
|
75
|
+
unreadableTestLines: z.ZodNumber;
|
|
76
|
+
timeline: z.ZodNullable<z.ZodObject<{
|
|
77
|
+
startedAt: z.ZodString;
|
|
78
|
+
totalMs: z.ZodNumber;
|
|
79
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
80
|
+
name: z.ZodEnum<{
|
|
81
|
+
cleanup: "cleanup";
|
|
82
|
+
mint: "mint";
|
|
83
|
+
runner: "runner";
|
|
84
|
+
tests: "tests";
|
|
85
|
+
testserver: "testserver";
|
|
86
|
+
}>;
|
|
87
|
+
startMs: z.ZodNumber;
|
|
88
|
+
endMs: z.ZodNumber;
|
|
89
|
+
outcome: z.ZodEnum<{
|
|
90
|
+
done: "done";
|
|
91
|
+
failed: "failed";
|
|
92
|
+
stopped: "stopped";
|
|
93
|
+
unfinished: "unfinished";
|
|
94
|
+
}>;
|
|
95
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
96
|
+
name: z.ZodEnum<{
|
|
97
|
+
[x: string]: string;
|
|
98
|
+
}>;
|
|
99
|
+
startMs: z.ZodNumber;
|
|
100
|
+
endMs: z.ZodNumber;
|
|
101
|
+
outcome: z.ZodEnum<{
|
|
102
|
+
done: "done";
|
|
103
|
+
failed: "failed";
|
|
104
|
+
stopped: "stopped";
|
|
105
|
+
unfinished: "unfinished";
|
|
106
|
+
}>;
|
|
107
|
+
}, z.core.$strip>>;
|
|
108
|
+
idleMs: z.ZodNumber;
|
|
109
|
+
snapshot: z.ZodOptional<z.ZodEnum<{
|
|
110
|
+
built: "built";
|
|
111
|
+
reused: "reused";
|
|
112
|
+
}>>;
|
|
113
|
+
sandboxes: z.ZodOptional<z.ZodObject<{
|
|
114
|
+
reused: z.ZodNumber;
|
|
115
|
+
created: z.ZodNumber;
|
|
116
|
+
}, z.core.$strip>>;
|
|
117
|
+
}, z.core.$strip>>;
|
|
118
|
+
criticalPath: z.ZodArray<z.ZodEnum<{
|
|
119
|
+
cleanup: "cleanup";
|
|
120
|
+
mint: "mint";
|
|
121
|
+
runner: "runner";
|
|
122
|
+
tests: "tests";
|
|
123
|
+
testserver: "testserver";
|
|
124
|
+
}>>;
|
|
125
|
+
}, z.core.$strip>>;
|
|
126
|
+
selection: z.ZodObject<{
|
|
127
|
+
failed: z.ZodBoolean;
|
|
128
|
+
test: z.ZodNullable<z.ZodString>;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
tests: z.ZodArray<z.ZodObject<{
|
|
131
|
+
id: z.ZodString;
|
|
132
|
+
file: z.ZodString;
|
|
133
|
+
test: z.ZodString;
|
|
134
|
+
state: z.ZodEnum<{
|
|
135
|
+
fail: "fail";
|
|
136
|
+
pass: "pass";
|
|
137
|
+
skip: "skip";
|
|
138
|
+
}>;
|
|
139
|
+
retryCount: z.ZodNumber;
|
|
140
|
+
flaky: z.ZodBoolean;
|
|
141
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
142
|
+
name: z.ZodString;
|
|
143
|
+
message: z.ZodString;
|
|
144
|
+
stack: z.ZodNullable<z.ZodString>;
|
|
145
|
+
diff: z.ZodNullable<z.ZodString>;
|
|
146
|
+
}, z.core.$strip>>;
|
|
147
|
+
selected: z.ZodBoolean;
|
|
148
|
+
output: z.ZodNullable<z.ZodObject<{
|
|
149
|
+
text: z.ZodString;
|
|
150
|
+
droppedChars: z.ZodNumber;
|
|
151
|
+
}, z.core.$strip>>;
|
|
152
|
+
}, z.core.$strip>>;
|
|
153
|
+
}, z.core.$strip>;
|
|
154
|
+
}, {
|
|
155
|
+
shown: unknown;
|
|
156
|
+
}, {
|
|
157
|
+
runsUnreadable: z.ZodObject<{
|
|
158
|
+
path: z.ZodString;
|
|
159
|
+
message: z.ZodString;
|
|
160
|
+
}, z.core.$strip>;
|
|
161
|
+
runNotFound: z.ZodObject<{
|
|
162
|
+
id: z.ZodString;
|
|
163
|
+
}, z.core.$strip>;
|
|
164
|
+
noRuns: z.ZodObject<{
|
|
165
|
+
scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
166
|
+
kind: z.ZodLiteral<"config">;
|
|
167
|
+
configFile: z.ZodString;
|
|
168
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
169
|
+
kind: z.ZodLiteral<"all">;
|
|
170
|
+
why: z.ZodEnum<{
|
|
171
|
+
flag: "flag";
|
|
172
|
+
"no-config-file": "no-config-file";
|
|
173
|
+
}>;
|
|
174
|
+
}, z.core.$strip>], "kind">;
|
|
175
|
+
}, z.core.$strip>;
|
|
176
|
+
}>, StormApp, false>;
|