@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,620 @@
|
|
|
1
|
+
import { refused } from "@vercel/clinkr";
|
|
2
|
+
import { NodeSignalCancellation } from "@vercel/clinkr/node";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { describeMintFailure, requireTarget, settleCredential, } from "../../credential/index.js";
|
|
5
|
+
import { prepareRunner, } from "../../runner/index.js";
|
|
6
|
+
import { fileSettings, invalidConfig, loadSettingsFile, parseSetFlags, settleResourceOptions, } from "../../config/index.js";
|
|
7
|
+
import { commandExitStatus, executeRun, observeAll, RUN_DIRECTORIES_KEPT, runDirectoryObserver, stepLog, testEventsPath, timedProgress, } from "../../core/index.js";
|
|
8
|
+
import { RESOURCE_COMMANDS, RESOURCE_CONFIGS, RESOURCE_REPORTS, RESOURCES, RUN_CLEANUP, stormTimeline, } from "../../resources.js";
|
|
9
|
+
import { parseKeepTime } from "../../time/index.js";
|
|
10
|
+
import { jobSummaryMarkdown } from "./job-summary.js";
|
|
11
|
+
import { testsSummaryLines } from "./tests-summary.js";
|
|
12
|
+
import { runView } from "./view.js";
|
|
13
|
+
import { waterfallLines } from "./waterfall.js";
|
|
14
|
+
import { testsChart } from "./worker-chart.js";
|
|
15
|
+
import { runCollector } from "./run-collector.js";
|
|
16
|
+
import { outcomes } from "./outcomes.js";
|
|
17
|
+
import { keptText, notDeletedText, notKeptText, notStoppedText, } from "./cleanup.js";
|
|
18
|
+
import { redactingObserver, redactingTerminal, redactor, redactStrings } from "./redaction.js";
|
|
19
|
+
import { runRecordText, testTotals, } from "./run-record.js";
|
|
20
|
+
/**
|
|
21
|
+
* Runs the command after `--`, with the run payload in `STORM_RUN` and the host variables each resource names
|
|
22
|
+
* removed (`TESTSERVER_BASES`/`TESTSERVER_BASE` for the Testserver pool), waits for it, and prints a waterfall. With a Testserver side it first leases usable Testserver sandboxes
|
|
23
|
+
* from the pool, creates the rest, and prints the sandbox list, and releases the leases once the command ends. The
|
|
24
|
+
* process exits with the command's code, or `128 + n` when signal `n` ended it: `bin/storm.ts` applies the
|
|
25
|
+
* status this records in `app.exit`, which Clinkr's 0 or 1 can't carry.
|
|
26
|
+
*
|
|
27
|
+
* A run holds a resource when `storm.config.ts` has it under `resources` or a `--set
|
|
28
|
+
* resources.<name>.<option>=<value>` names one of its options. A run has a Testserver side when it holds the
|
|
29
|
+
* Testserver pool resource; without one, the run payload names no Testserver sandbox.
|
|
30
|
+
*
|
|
31
|
+
* Signals: before the command starts, the first signal stops the run at its next step, lets creates in flight
|
|
32
|
+
* settle, releases its leases, and cancels (exit `128 + n`). While the command runs, Ctrl+C and a closed terminal
|
|
33
|
+
* reach it directly through its process group, so only SIGTERM is passed on; either way the run waits for the
|
|
34
|
+
* command. A second signal makes Clinkr's host exit at once with `128 + n`, leaving the leases for the next run
|
|
35
|
+
* to reclaim, since their holder is gone.
|
|
36
|
+
*
|
|
37
|
+
* `scope` and `project` come from `--scope` and `--project`, else `storm.config.ts` (found from the working
|
|
38
|
+
* directory and checked whole); they have no default, so one of the two must give them when the run mints. Each
|
|
39
|
+
* resource's options come from `--set resources.<name>.<option>=<value>`, which may repeat, else the file's section,
|
|
40
|
+
* else the option's default (the registry's resource configs, `src/resources.ts`). An unknown key path, a key path
|
|
41
|
+
* given twice, or a value its option's rule refuses is a usage error. Options that don't fit together once merged,
|
|
42
|
+
* such as a TTL not longer than `minTimeLeft`, or a `--set` of the TTL under `noCreate`, are
|
|
43
|
+
* `invalid_resource_options`, which names each value's source.
|
|
44
|
+
*
|
|
45
|
+
* By default the command runs in a runner sandbox, from the `runner` recipe of `storm.config.ts`, which only a
|
|
46
|
+
* runner run reads: `missing_runner` without one. `--local` (no config key) runs it on this machine instead. The
|
|
47
|
+
* runner's local checks (`prepareRunner`) run before anything is minted, leased or created. A runner run always
|
|
48
|
+
* mints, for the runner sandbox, so it needs `scope` and `project` whatever resources it holds. In a runner run, the
|
|
49
|
+
* first SIGINT, SIGTERM or SIGHUP stops the run in any phase: the remote command is killed, every sandbox the run
|
|
50
|
+
* started is stopped and deleted, the leases are released, and the run cancels. `--rebuild-snapshot` (no config key,
|
|
51
|
+
* not with `--local`) builds a runner snapshot whatever the cache holds.
|
|
52
|
+
*
|
|
53
|
+
* `--credential` (no config key) picks the credential source: `mint`, the default, or `github-actions`, which requests
|
|
54
|
+
* a GitHub Actions OIDC token instead and so needs no `--scope` or `--project`; any given are unused. A runner run
|
|
55
|
+
* needs the mint, so `--credential github-actions` without `--local` is a usage error. The registry says whether a
|
|
56
|
+
* held resource takes the credential (`RESOURCE_COMMANDS.takesCredential`): the Testserver pool does unless `noCreate`. A
|
|
57
|
+
* `--credential` given to a run where none does is `credential_unused`.
|
|
58
|
+
*
|
|
59
|
+
* Progress shows by the app's presentation (`presentation.ts`): a live view on a terminal a person watches, plain
|
|
60
|
+
* lines elsewhere, folded for GitHub Actions, nothing under `--json`. `--show-output` (no config key, not with
|
|
61
|
+
* `--local`) prints the runner's step output above the live view. `--verbose` (no config key) prints each create's
|
|
62
|
+
* progress messages and the runner's step output, and sets `verbose` in the run payload. Every run, `--json`
|
|
63
|
+
* included, writes a run directory (`core/run-directory.ts`), and a run that can't make one goes on without it; the
|
|
64
|
+
* waterfall names it and the `storm runs show` command that reads the run back by its run id, which a ran outcome
|
|
65
|
+
* carries as `runId`, and in a GitHub Actions step with a job summary the run appends a Markdown summary there.
|
|
66
|
+
*
|
|
67
|
+
* Each resource is a provider (the registry, `src/resources.ts`, lists them), whose folder under `src/resources/` says
|
|
68
|
+
* what the run does with it, and whose command half settles it (`RESOURCE_COMMANDS.settle`). The run refuses in this order:
|
|
69
|
+
* `invalid_config`, `invalid_resource_options`, `credential_unused`; in a runner run `missing_runner`, then
|
|
70
|
+
* `missing_target`; in a local run where a resource takes the credential, `missing_target` for the mint; then each
|
|
71
|
+
* resource's settle, in provider order. A resource's secrets, such as a token, are hidden as `<token>` in the run's
|
|
72
|
+
* progress, its run directory, its job summary, its outcome, and its command's output, in either kind of run.
|
|
73
|
+
*/
|
|
74
|
+
export function command(cmd) {
|
|
75
|
+
return cmd.define({
|
|
76
|
+
requestSchema: z.object({
|
|
77
|
+
set: z.array(z.string()).default([]),
|
|
78
|
+
scope: z.string().min(1).optional(),
|
|
79
|
+
project: z.string().min(1).optional(),
|
|
80
|
+
credential: z.enum(["mint", "github-actions"]).optional(),
|
|
81
|
+
local: z.boolean().default(false),
|
|
82
|
+
rebuildSnapshot: z.boolean().default(false),
|
|
83
|
+
showOutput: z.boolean().default(false),
|
|
84
|
+
keepSandbox: z.string().optional(),
|
|
85
|
+
verbose: z.boolean().default(false),
|
|
86
|
+
command: z.array(z.string()).min(1, { message: "Give the command to run after --" }),
|
|
87
|
+
}),
|
|
88
|
+
cli: { options: { project: { short: "p" } }, positionals: ["command"] },
|
|
89
|
+
outcomes,
|
|
90
|
+
validate: ({ set, credential, local, rebuildSnapshot, showOutput, keepSandbox }) => [
|
|
91
|
+
...setProblems(set).map((problem) => ({ field: "set", message: `${problem}.` })),
|
|
92
|
+
...(rebuildSnapshot && local
|
|
93
|
+
? [{ field: "rebuildSnapshot", message: "--rebuild-snapshot builds a runner snapshot; drop it or --local." }]
|
|
94
|
+
: []),
|
|
95
|
+
...(!local && credential === "github-actions"
|
|
96
|
+
? [
|
|
97
|
+
{
|
|
98
|
+
field: "credential",
|
|
99
|
+
message: "A runner run needs the mint: the runner sandbox uses a minted Vercel token. Add --local, or drop --credential github-actions.",
|
|
100
|
+
},
|
|
101
|
+
]
|
|
102
|
+
: []),
|
|
103
|
+
...(showOutput && local
|
|
104
|
+
? [{ field: "showOutput", message: "--show-output prints a runner run's step output; drop it or --local." }]
|
|
105
|
+
: []),
|
|
106
|
+
...(keepSandbox !== undefined && parseKeepTime(keepSandbox) === undefined
|
|
107
|
+
? [
|
|
108
|
+
{
|
|
109
|
+
field: "keepSandbox",
|
|
110
|
+
message: `--keep-sandbox takes 0, or a whole number of minutes or hours up to 5h, such as 30m or 2h, not ${JSON.stringify(keepSandbox)}.`,
|
|
111
|
+
},
|
|
112
|
+
]
|
|
113
|
+
: []),
|
|
114
|
+
...(keepSandbox !== undefined && local
|
|
115
|
+
? [{ field: "keepSandbox", message: "--keep-sandbox keeps a runner run's runner sandbox; drop it or --local." }]
|
|
116
|
+
: []),
|
|
117
|
+
],
|
|
118
|
+
handler: async ({ app, ui, signal }, request) => {
|
|
119
|
+
const sets = parseSetFlags(request.set, RESOURCE_CONFIGS);
|
|
120
|
+
// `validate` refused every `--set` this can't read, so it always reads.
|
|
121
|
+
if (!sets.ok)
|
|
122
|
+
throw new Error(`--set should have been refused: ${sets.problems.join("; ")}`);
|
|
123
|
+
const settled = await settleRun(app, { ...request, sets: sets.values });
|
|
124
|
+
if (!settled.ok)
|
|
125
|
+
return settled.refusal;
|
|
126
|
+
const { configFile, where, settlement } = settled;
|
|
127
|
+
const base = {
|
|
128
|
+
argv: request.command,
|
|
129
|
+
// A resource can name host variables that could point the command at something else than the run payload
|
|
130
|
+
// names, so the command never sees one.
|
|
131
|
+
env: Object.fromEntries(Object.entries(app.env).filter(([name]) => !RESOURCE_REPORTS.hostVariablesToDrop.includes(name))),
|
|
132
|
+
version: app.version,
|
|
133
|
+
commit: app.commit,
|
|
134
|
+
configFile,
|
|
135
|
+
verbose: request.verbose,
|
|
136
|
+
};
|
|
137
|
+
// Both kinds of run take the same requests. A local run carries the credential choice it settled, if any, whose
|
|
138
|
+
// source the core builds; a runner run's resources share its one mint.
|
|
139
|
+
let run;
|
|
140
|
+
if (where.kind === "local")
|
|
141
|
+
run = {
|
|
142
|
+
...base,
|
|
143
|
+
resources: settlement.requests,
|
|
144
|
+
...(where.credential === undefined ? {} : { credential: where.credential }),
|
|
145
|
+
};
|
|
146
|
+
else {
|
|
147
|
+
const prepared = await prepareRunner(app.context, {
|
|
148
|
+
cwd: app.cwd,
|
|
149
|
+
recipe: where.recipe,
|
|
150
|
+
resources: RESOURCE_REPORTS.runnerResources(settled.options),
|
|
151
|
+
rebuild: request.rebuildSnapshot,
|
|
152
|
+
});
|
|
153
|
+
if (prepared.kind !== "ok")
|
|
154
|
+
return prepareRefusal(prepared, configFile);
|
|
155
|
+
run = {
|
|
156
|
+
...base,
|
|
157
|
+
resources: settlement.requests,
|
|
158
|
+
runner: {
|
|
159
|
+
prepared: prepared.prepared,
|
|
160
|
+
target: where.target,
|
|
161
|
+
user: app.user,
|
|
162
|
+
keepSandboxMs: keepSandboxMinutes(request.keepSandbox, where.recipe, app.env) * 60_000,
|
|
163
|
+
},
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
// With --local, only SIGTERM is passed on to the local command, which Ctrl+C and a closed terminal reach
|
|
167
|
+
// directly. In a runner run, `executeRun` stops on any signal itself.
|
|
168
|
+
const terminate = new AbortController();
|
|
169
|
+
const forward = () => {
|
|
170
|
+
const reason = signal.reason;
|
|
171
|
+
if (reason instanceof NodeSignalCancellation && reason.signal === "SIGTERM")
|
|
172
|
+
terminate.abort(reason);
|
|
173
|
+
};
|
|
174
|
+
if (run.runner === undefined) {
|
|
175
|
+
if (signal.aborted)
|
|
176
|
+
forward();
|
|
177
|
+
else
|
|
178
|
+
signal.addEventListener("abort", forward, { once: true });
|
|
179
|
+
}
|
|
180
|
+
const view = runView({
|
|
181
|
+
presentation: app.presentation,
|
|
182
|
+
progress: ui.progress,
|
|
183
|
+
context: app.context,
|
|
184
|
+
showOutput: request.showOutput,
|
|
185
|
+
verbose: request.verbose,
|
|
186
|
+
});
|
|
187
|
+
// The resources' secrets: every event and the command's output pass through `redact` before any view, the run
|
|
188
|
+
// directory or the summary sees them.
|
|
189
|
+
const { secrets } = settlement;
|
|
190
|
+
const redact = redactor(secrets);
|
|
191
|
+
const git = await checkoutGit(app.context.checkout, app.cwd);
|
|
192
|
+
const startedAt = app.context.clock.now();
|
|
193
|
+
const record = redactStrings({
|
|
194
|
+
version: 1,
|
|
195
|
+
startedAt: startedAt.toISOString(),
|
|
196
|
+
cwd: app.cwd,
|
|
197
|
+
configFile,
|
|
198
|
+
argv: request.command,
|
|
199
|
+
where: run.runner === undefined ? { kind: "local" } : startedWhere(run.runner),
|
|
200
|
+
git,
|
|
201
|
+
}, redact);
|
|
202
|
+
const opened = await app.context.runDirectories.open({
|
|
203
|
+
startedAt,
|
|
204
|
+
keep: RUN_DIRECTORIES_KEPT,
|
|
205
|
+
run: runRecordText(record),
|
|
206
|
+
});
|
|
207
|
+
const directory = opened.ok ? opened.directory : undefined;
|
|
208
|
+
const collector = runCollector(directory);
|
|
209
|
+
const observers = [collector.observer, view.observer];
|
|
210
|
+
if (directory !== undefined)
|
|
211
|
+
observers.push(runDirectoryObserver(directory));
|
|
212
|
+
const observer = observeAll(...observers);
|
|
213
|
+
const terminal = teeTerminal(view.runnerTerminal, directory);
|
|
214
|
+
let outcome;
|
|
215
|
+
try {
|
|
216
|
+
const ended = await executeRun(RESOURCES, { ...app.context, runnerTerminal: secrets.length === 0 ? terminal : redactingTerminal(terminal, redact) }, run.runner === undefined && directory !== undefined
|
|
217
|
+
? { ...run, testEvents: testEventsPath(directory.path) }
|
|
218
|
+
: run, { signal, terminate: terminate.signal }, timedProgress(app.context.clock, secrets.length === 0 ? observer : redactingObserver(observer, redact)));
|
|
219
|
+
// An outcome's facts, such as a failed Sandbox call's message, can quote what the run handed its command.
|
|
220
|
+
outcome = secrets.length === 0 ? ended : redactStrings(ended, redact);
|
|
221
|
+
}
|
|
222
|
+
catch (error) {
|
|
223
|
+
// A live region must not outlive the run, however it ends, and closing the run directory completes it and
|
|
224
|
+
// removes the test events a local command staged there, unredacted. They are never saved: the run didn't end.
|
|
225
|
+
await view.finish([]);
|
|
226
|
+
await directory?.close();
|
|
227
|
+
throw error;
|
|
228
|
+
}
|
|
229
|
+
signal.removeEventListener("abort", forward);
|
|
230
|
+
const ran = await summarize(app, {
|
|
231
|
+
view,
|
|
232
|
+
collector,
|
|
233
|
+
opened,
|
|
234
|
+
local: run.runner === undefined,
|
|
235
|
+
redact,
|
|
236
|
+
record,
|
|
237
|
+
outcome,
|
|
238
|
+
requests: run.resources,
|
|
239
|
+
});
|
|
240
|
+
switch (outcome.kind) {
|
|
241
|
+
case "ran": {
|
|
242
|
+
app.exit.status = commandExitStatus(outcome.command);
|
|
243
|
+
const { command } = outcome;
|
|
244
|
+
return outcomes.ran({
|
|
245
|
+
version: app.version,
|
|
246
|
+
commit: app.commit,
|
|
247
|
+
configFile,
|
|
248
|
+
resources: RESOURCE_REPORTS.ranFacts(outcome.resources, run.resources),
|
|
249
|
+
cleanup: RUN_CLEANUP.facts(outcome),
|
|
250
|
+
command: command.kind === "exited"
|
|
251
|
+
? { exitCode: command.code, signal: null }
|
|
252
|
+
: command.kind === "signaled"
|
|
253
|
+
? { exitCode: null, signal: command.signal }
|
|
254
|
+
: { exitCode: null, signal: null },
|
|
255
|
+
runner: outcome.runner === undefined
|
|
256
|
+
? null
|
|
257
|
+
: {
|
|
258
|
+
snapshotId: outcome.runner.snapshotId,
|
|
259
|
+
base: outcome.runner.base,
|
|
260
|
+
built: outcome.runner.built,
|
|
261
|
+
vcpus: outcome.runner.vcpus,
|
|
262
|
+
region: outcome.runner.region,
|
|
263
|
+
runtime: outcome.runner.runtime,
|
|
264
|
+
},
|
|
265
|
+
timeline: timelineFacts(ran),
|
|
266
|
+
runId: directory?.id ?? null,
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
case "resource-unprepared":
|
|
270
|
+
return RESOURCE_COMMANDS.unpreparedError(outcome);
|
|
271
|
+
case "resource-refused":
|
|
272
|
+
return RESOURCE_COMMANDS.refusedError(outcome, RUN_CLEANUP.facts(outcome));
|
|
273
|
+
// The run's mint: in a runner run for the runner sandbox, in a local run for a resource that needed it.
|
|
274
|
+
case "mint-failed":
|
|
275
|
+
return outcomes.mintFailed({
|
|
276
|
+
...outcome.target,
|
|
277
|
+
...describeMintFailure(outcome.failure, outcome.target),
|
|
278
|
+
runner: outcome.runner,
|
|
279
|
+
cleanup: RUN_CLEANUP.facts(outcome),
|
|
280
|
+
});
|
|
281
|
+
case "spawn-failed":
|
|
282
|
+
return outcomes.spawnFailed({
|
|
283
|
+
executable: outcome.executable,
|
|
284
|
+
message: outcome.message,
|
|
285
|
+
// Only a local run spawns its command on this machine, so it holds no runner sandbox.
|
|
286
|
+
cleanup: RUN_CLEANUP.facts({ runnerCleanup: null, resourceCleanup: outcome.resourceCleanup }),
|
|
287
|
+
});
|
|
288
|
+
case "canceled":
|
|
289
|
+
return outcomes.canceled({ changed: canceledChanges(outcome) });
|
|
290
|
+
case "runner-failed":
|
|
291
|
+
return outcomes.runnerFailed({
|
|
292
|
+
failure: runnerFailureFacts(outcome.failure),
|
|
293
|
+
cleanup: RUN_CLEANUP.facts(outcome),
|
|
294
|
+
});
|
|
295
|
+
case "snapshot-gone":
|
|
296
|
+
return outcomes.snapshotGone({
|
|
297
|
+
snapshotId: outcome.entry.snapshotId,
|
|
298
|
+
base: outcome.entry.base,
|
|
299
|
+
removal: outcome.removal === undefined ? null : { ...outcome.removal },
|
|
300
|
+
cleanup: RUN_CLEANUP.facts(outcome),
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* The refusal for a runner whose local checks failed: no base, submodules, a recipe storm can't use at the run's
|
|
308
|
+
* base or for its sandbox count (`invalid_config`, naming the key inside `runner`), or git or tar failing.
|
|
309
|
+
*/
|
|
310
|
+
function prepareRefusal(prepared, configFile) {
|
|
311
|
+
switch (prepared.kind) {
|
|
312
|
+
case "no-base-ref":
|
|
313
|
+
return outcomes.noBaseRef({ refs: prepared.refs.map(({ ref, reason }) => ({ ref, reason })) });
|
|
314
|
+
case "submodules":
|
|
315
|
+
return outcomes.submodulesRefused({ paths: [...prepared.paths] });
|
|
316
|
+
case "invalid-recipe":
|
|
317
|
+
return invalidConfig(configFile ?? "", [
|
|
318
|
+
{ key: ["runner", ...prepared.path].join("."), location: null, problem: prepared.problem },
|
|
319
|
+
]);
|
|
320
|
+
case "checkout-failed":
|
|
321
|
+
return outcomes.runnerFailed({
|
|
322
|
+
failure: runnerFailureFacts({ kind: "checkout-failed", failure: prepared.failure }),
|
|
323
|
+
cleanup: RUN_CLEANUP.facts(NOTHING_HELD),
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Once the run is done: reads a `--local` run's staged test events through `collector`, which redacts and streams each
|
|
329
|
+
* one to the private test events file, then publishes the redacted test events as `tests.jsonl`, writes the timeline
|
|
330
|
+
* and how the run ended (`record` with `ended`, its runner sandbox and runner snapshot from the final state, and a ran
|
|
331
|
+
* outcome's acquired resources' ran facts, from their `requests`) to the run directory, in that order, and closes it,
|
|
332
|
+
* which removes the staged test events and an unpublished partial file. Then it appends the job summary, and has the
|
|
333
|
+
* view print the waterfall, with the worker chart under its tests lane, the tests' summary, the logs of failed steps,
|
|
334
|
+
* and what went wrong with either file. The job summary leaves the worker chart out. It answers the timeline, which a
|
|
335
|
+
* ran outcome carries.
|
|
336
|
+
*/
|
|
337
|
+
async function summarize(app, run) {
|
|
338
|
+
const { view, opened } = run;
|
|
339
|
+
const directory = opened.ok ? opened.directory : undefined;
|
|
340
|
+
if (run.local && directory !== undefined)
|
|
341
|
+
await run.collector.readLocal(directory, run.redact);
|
|
342
|
+
const collected = run.collector.finish();
|
|
343
|
+
const { state, tests } = collected;
|
|
344
|
+
const ran = stormTimeline(state);
|
|
345
|
+
directory?.publishTestEvents();
|
|
346
|
+
directory?.writeTimeline(JSON.stringify(ran, null, 2));
|
|
347
|
+
directory?.writeRun(runRecordText({
|
|
348
|
+
...run.record,
|
|
349
|
+
where: endedWhere(run.record.where, state.runner),
|
|
350
|
+
ended: runEnd(run.outcome, state.command, tests, run.requests),
|
|
351
|
+
}));
|
|
352
|
+
const writeFailure = await directory?.close();
|
|
353
|
+
const failed = tests.events.some((event) => event.kind === "test-result" && event.state === "fail");
|
|
354
|
+
const testsLines = testsSummaryLines(tests.events, tests.unreadable, tests.incomplete);
|
|
355
|
+
const stepLogs = failedStepLogs(ran, directory?.path, app.env);
|
|
356
|
+
const clock = workerClock(ran, collected, run.local);
|
|
357
|
+
const charted = clock === undefined ? undefined : testsChart(tests.events, tests.unreadable, clock, tests.incomplete);
|
|
358
|
+
const summarized = await app.context.jobSummary.appendJobSummary(jobSummaryMarkdown(ran, { logs: directory?.path, details: [...testsLines, ...stepLogs] }));
|
|
359
|
+
await view.finish(waterfallLines(ran, {
|
|
360
|
+
width: view.width,
|
|
361
|
+
paint: view.paint,
|
|
362
|
+
logs: logsText(opened, writeFailure, app.env, failed),
|
|
363
|
+
...(charted === undefined ? {} : { workers: charted.lanes }),
|
|
364
|
+
details: [
|
|
365
|
+
...(charted?.notes ?? testsLines),
|
|
366
|
+
...stepLogs,
|
|
367
|
+
...(summarized.kind === "failed"
|
|
368
|
+
? [` couldn't append to the job summary at ${summarized.failure.path}: ${summarized.failure.message}`]
|
|
369
|
+
: []),
|
|
370
|
+
],
|
|
371
|
+
}));
|
|
372
|
+
return ran;
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* How the workers' clock maps to the run's, for the worker chart under the tests lane; undefined without one. A local
|
|
376
|
+
* command's workers share the run's clock. In a runner run they run in the runner sandbox, so the offset comes from
|
|
377
|
+
* when the run heard each worker test event.
|
|
378
|
+
*/
|
|
379
|
+
function workerClock(ran, collected, local) {
|
|
380
|
+
const tests = ran.rows.find((row) => row.name === "tests");
|
|
381
|
+
if (tests === undefined)
|
|
382
|
+
return undefined;
|
|
383
|
+
return { runStartedAt: Date.parse(ran.startedAt), offsetMs: local ? 0 : collected.workerOffsetMs, tests };
|
|
384
|
+
}
|
|
385
|
+
/** The command's output, in either kind of run, to `terminal` and to the run directory's `command.log`. */
|
|
386
|
+
function teeTerminal(terminal, directory) {
|
|
387
|
+
if (directory === undefined)
|
|
388
|
+
return terminal;
|
|
389
|
+
return {
|
|
390
|
+
color: terminal.color,
|
|
391
|
+
writeStdout: (text) => {
|
|
392
|
+
directory.appendCommandOutput(text);
|
|
393
|
+
terminal.writeStdout(text);
|
|
394
|
+
},
|
|
395
|
+
writeStderr: (text) => {
|
|
396
|
+
directory.appendCommandOutput(text);
|
|
397
|
+
terminal.writeStderr(text);
|
|
398
|
+
},
|
|
399
|
+
};
|
|
400
|
+
}
|
|
401
|
+
/** A path as a person reads it: under `HOME`, starting `~/`. */
|
|
402
|
+
function displayPath(path, env) {
|
|
403
|
+
const home = env["HOME"];
|
|
404
|
+
if (home === undefined || home === "" || !path.startsWith(`${home}/`))
|
|
405
|
+
return path;
|
|
406
|
+
return `~${path.slice(home.length)}`;
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Where the run directory is, for the summary's logs line, and what went wrong with it: it couldn't be made, a write
|
|
410
|
+
* failed, or pruning couldn't remove an older one or the staged test events left in one. The run goes on whichever it
|
|
411
|
+
* was. Then the command that reads the run back by its run id, with `--failed` when a test `failed`.
|
|
412
|
+
*/
|
|
413
|
+
function logsText(opened, writeFailure, env, failed) {
|
|
414
|
+
if (!opened.ok)
|
|
415
|
+
return `none: couldn't make ${opened.failure.path}: ${opened.failure.message}`;
|
|
416
|
+
const path = `${displayPath(opened.directory.path, env)}/`;
|
|
417
|
+
const problems = [
|
|
418
|
+
...(writeFailure === undefined ? [] : [`couldn't write ${writeFailure.path}: ${writeFailure.message}`]),
|
|
419
|
+
...opened.pruneFailures.slice(0, 1).map((failure) => `couldn't remove ${failure.path}: ${failure.message}`),
|
|
420
|
+
];
|
|
421
|
+
const show = `storm runs show ${opened.directory.id}${failed ? " --failed" : ""}`;
|
|
422
|
+
return `${problems.length === 0 ? path : `${path} (${problems.join("; ")})`} · ${show}`;
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* How the run ended, for `run.json`: its outcome's kind; for a run whose command ran, the status storm exits with
|
|
426
|
+
* and the signal that ended the command; how long the command took, from the command's state once it ended on its own
|
|
427
|
+
* (a command the run stopped has none); the totals of its tests' final results, and why they may be incomplete; and a
|
|
428
|
+
* ran outcome's acquired resources' ran facts, from their `requests`.
|
|
429
|
+
*/
|
|
430
|
+
function runEnd(outcome, ran, tests, requests) {
|
|
431
|
+
const command = outcome.kind === "ran" ? outcome.command : undefined;
|
|
432
|
+
const ms = ran?.outcome === undefined || ran.outcome === "stopped" || ran.endedAt === undefined
|
|
433
|
+
? null
|
|
434
|
+
: ran.endedAt - ran.startedAt;
|
|
435
|
+
return {
|
|
436
|
+
outcome: outcome.kind,
|
|
437
|
+
exitCode: command === undefined ? null : commandExitStatus(command),
|
|
438
|
+
signal: command?.kind === "signaled" ? command.signal : null,
|
|
439
|
+
ms,
|
|
440
|
+
tests: testTotals(tests.events),
|
|
441
|
+
testsIncomplete: tests.incomplete ?? null,
|
|
442
|
+
resources: outcome.kind === "ran" ? RESOURCE_REPORTS.ranFacts(outcome.resources, requests) : null,
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* Where the checkout `cwd` is in was as the run starts, for `run.json`; null outside a Git checkout, or when git
|
|
447
|
+
* can't say. The run goes on either way.
|
|
448
|
+
*/
|
|
449
|
+
async function checkoutGit(checkout, cwd) {
|
|
450
|
+
const root = await checkout.repositoryRoot({ cwd });
|
|
451
|
+
if (!root.ok)
|
|
452
|
+
return null;
|
|
453
|
+
const head = await checkout.head({ repoRoot: root.value });
|
|
454
|
+
return head.ok ? { ...head.value } : null;
|
|
455
|
+
}
|
|
456
|
+
/** How long a runner sandbox keeps running once its run ends, when neither the flag nor the recipe says. */
|
|
457
|
+
export const DEFAULT_KEEP_SANDBOX_MINUTES = 30;
|
|
458
|
+
/**
|
|
459
|
+
* How long the runner sandbox keeps running once the run ends, in minutes: `--keep-sandbox`, else the recipe's
|
|
460
|
+
* `keepSandbox`, else `DEFAULT_KEEP_SANDBOX_MINUTES`, or 0 when `CI` is set, where nobody connects to it.
|
|
461
|
+
*/
|
|
462
|
+
function keepSandboxMinutes(flag, recipe, env) {
|
|
463
|
+
// `validate` refused a flag this can't read.
|
|
464
|
+
const fromFlag = flag === undefined ? undefined : parseKeepTime(flag);
|
|
465
|
+
return fromFlag ?? recipe.keepSandboxMinutes ?? (isCi(env) ? 0 : DEFAULT_KEEP_SANDBOX_MINUTES);
|
|
466
|
+
}
|
|
467
|
+
/** Whether `CI` is set, as CI services set it: to anything but empty, `0` or `false`. */
|
|
468
|
+
function isCi(env) {
|
|
469
|
+
const ci = env["CI"];
|
|
470
|
+
return ci !== undefined && ci !== "" && ci !== "0" && ci.toLowerCase() !== "false";
|
|
471
|
+
}
|
|
472
|
+
/** Where a runner run's command runs, as `run.json` records it as the run starts: no sandbox or snapshot yet. */
|
|
473
|
+
function startedWhere(runner) {
|
|
474
|
+
const { prepared, target } = runner;
|
|
475
|
+
return {
|
|
476
|
+
kind: "runner",
|
|
477
|
+
team: target.team,
|
|
478
|
+
project: target.project,
|
|
479
|
+
region: prepared.recipe.region,
|
|
480
|
+
runtime: prepared.recipe.runtime,
|
|
481
|
+
vcpus: prepared.vcpus,
|
|
482
|
+
base: prepared.base,
|
|
483
|
+
baseRef: prepared.baseRef,
|
|
484
|
+
sandbox: null,
|
|
485
|
+
snapshot: null,
|
|
486
|
+
keptUntil: null,
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* `where` once the run is over, from the runner's final state: for a runner run, the runner sandbox the run started,
|
|
491
|
+
* the runner snapshot it started from, which the run reused or built, and when its timeout stops the runner sandbox it
|
|
492
|
+
* kept running. Each is null when the run stopped before it, or kept no runner sandbox.
|
|
493
|
+
*/
|
|
494
|
+
function endedWhere(where, runner) {
|
|
495
|
+
if (where.kind === "local")
|
|
496
|
+
return where;
|
|
497
|
+
const snapshot = runner?.snapshot;
|
|
498
|
+
return {
|
|
499
|
+
...where,
|
|
500
|
+
sandbox: runner?.sandbox?.name ?? null,
|
|
501
|
+
snapshot: snapshot === undefined || snapshot.kind === "building"
|
|
502
|
+
? null
|
|
503
|
+
: { id: snapshot.id, base: snapshot.base, built: snapshot.kind === "built" },
|
|
504
|
+
keptUntil: runner?.kept?.stopsAt ?? null,
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
/** For each runner step that failed, where its whole output is: the summary's lines after the critical path. */
|
|
508
|
+
function failedStepLogs(ran, directory, env) {
|
|
509
|
+
if (directory === undefined)
|
|
510
|
+
return [];
|
|
511
|
+
const runner = ran.rows.find((row) => row.name === "runner");
|
|
512
|
+
return (runner?.steps ?? [])
|
|
513
|
+
.filter((step) => step.outcome === "failed")
|
|
514
|
+
.flatMap((step) => {
|
|
515
|
+
const log = stepLog(directory, step.name);
|
|
516
|
+
return log === undefined ? [] : [` failed ${step.name}, whole output: ${displayPath(log, env)}`];
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
/** The run's timeline as the ran outcome reports it. */
|
|
520
|
+
function timelineFacts(ran) {
|
|
521
|
+
return {
|
|
522
|
+
...ran,
|
|
523
|
+
rows: ran.rows.map((row) => ({ ...row, steps: row.steps.map((step) => ({ ...step })) })),
|
|
524
|
+
criticalPath: [...ran.criticalPath],
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
/** A runner failure as outcomes report it. */
|
|
528
|
+
function runnerFailureFacts(failure) {
|
|
529
|
+
switch (failure.kind) {
|
|
530
|
+
case "snapshot-build-step-failed":
|
|
531
|
+
case "apply-failed":
|
|
532
|
+
case "install-failed":
|
|
533
|
+
case "build-failed":
|
|
534
|
+
return { kind: failure.kind, label: failure.label, exitCode: failure.exitCode, tail: [...failure.tail] };
|
|
535
|
+
case "sandbox-api-failed":
|
|
536
|
+
return { kind: failure.kind, operation: failure.operation, status: failure.status, message: failure.message };
|
|
537
|
+
case "checkout-failed":
|
|
538
|
+
return { kind: failure.kind, message: failure.failure.message, command: failure.failure.displayCommand ?? null };
|
|
539
|
+
case "credential-claims-missing":
|
|
540
|
+
return { kind: failure.kind, ...failure.target };
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
/** The cleanup of a run that never started a runner sandbox or held a resource. */
|
|
544
|
+
const NOTHING_HELD = { runnerCleanup: null, resourceCleanup: {} };
|
|
545
|
+
/** What is wrong with the `--set` flags, for a person: each one `parseSetFlags` can't use. */
|
|
546
|
+
function setProblems(texts) {
|
|
547
|
+
const parsed = parseSetFlags(texts, RESOURCE_CONFIGS);
|
|
548
|
+
return parsed.ok ? [] : parsed.problems;
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* Settles a run before it starts, refusing in this order: the config file (`invalid_config`); each held resource's
|
|
552
|
+
* merged options (`invalid_resource_options`); a `--credential` no held resource takes (`credential_unused`); in a
|
|
553
|
+
* runner run, the runner recipe (`missing_runner`) and the team and project its mint needs (`missing_target`); in a
|
|
554
|
+
* local run where a held resource takes the credential, the credential source (`missing_target` for the mint); then
|
|
555
|
+
* each held resource's own settle, in provider order.
|
|
556
|
+
*/
|
|
557
|
+
async function settleRun(app, request) {
|
|
558
|
+
const file = await loadSettingsFile(app.context.config, app.cwd, RESOURCE_CONFIGS);
|
|
559
|
+
if (!file.ok)
|
|
560
|
+
return file;
|
|
561
|
+
const configFile = file.path;
|
|
562
|
+
const resolved = settleResourceOptions(file, request.sets);
|
|
563
|
+
if (!resolved.ok)
|
|
564
|
+
return resolved;
|
|
565
|
+
const { options } = resolved;
|
|
566
|
+
const takesCredential = RESOURCE_COMMANDS.takesCredential(options);
|
|
567
|
+
if (request.credential !== undefined && !takesCredential)
|
|
568
|
+
return refused(outcomes.credentialUnused({ flags: ["--credential"], configFile }));
|
|
569
|
+
const settings = fileSettings(file, request);
|
|
570
|
+
let where;
|
|
571
|
+
if (!request.local) {
|
|
572
|
+
if (settings.runner === undefined)
|
|
573
|
+
return refused(outcomes.missingRunner({ configFile }));
|
|
574
|
+
const required = requireTarget(settings.scope, settings.project);
|
|
575
|
+
if (!required.ok)
|
|
576
|
+
return required;
|
|
577
|
+
where = { kind: "runner", recipe: settings.runner.value, target: required.target };
|
|
578
|
+
}
|
|
579
|
+
else if (takesCredential) {
|
|
580
|
+
const chosen = settleCredential(request.credential ?? "mint", settings.scope, settings.project);
|
|
581
|
+
if (!chosen.ok)
|
|
582
|
+
return chosen;
|
|
583
|
+
where = { kind: "local", credential: chosen.credential };
|
|
584
|
+
}
|
|
585
|
+
else
|
|
586
|
+
where = { kind: "local", credential: undefined };
|
|
587
|
+
const settlement = RESOURCE_COMMANDS.settle(options, app.env, configFile);
|
|
588
|
+
if (!settlement.ok)
|
|
589
|
+
return settlement;
|
|
590
|
+
return { ok: true, configFile, options, where, settlement };
|
|
591
|
+
}
|
|
592
|
+
/**
|
|
593
|
+
* What a canceled run changed, for a person: whether its command ran, what happened to a runner run's sandboxes, and
|
|
594
|
+
* what each resource it held says of what it changed (`RESOURCE_COMMANDS.canceledLines`).
|
|
595
|
+
*/
|
|
596
|
+
function canceledChanges(outcome) {
|
|
597
|
+
const { commandStopped } = outcome;
|
|
598
|
+
const lines = [
|
|
599
|
+
commandStopped === true ? "The command was stopped in the runner sandbox." : "The command didn't run.",
|
|
600
|
+
];
|
|
601
|
+
const cleanup = RUN_CLEANUP.facts(outcome).runner;
|
|
602
|
+
if (cleanup !== null)
|
|
603
|
+
lines.push(...runnerCleanupLines(cleanup));
|
|
604
|
+
lines.push(...RESOURCE_COMMANDS.canceledLines(outcome.resources, outcome.resourceCleanup));
|
|
605
|
+
return lines.join("\n");
|
|
606
|
+
}
|
|
607
|
+
/** What happened to a canceled runner run's sandboxes, for a person: the one it kept running, and the rest. */
|
|
608
|
+
function runnerCleanupLines({ kept, notKept, notStopped, notDeleted }) {
|
|
609
|
+
const problems = [
|
|
610
|
+
...(notKept === null ? [] : [notKeptText(notKept)]),
|
|
611
|
+
...notStopped.map(notStoppedText),
|
|
612
|
+
...notDeleted.map(notDeletedText),
|
|
613
|
+
];
|
|
614
|
+
if (kept === null)
|
|
615
|
+
return problems.length === 0 ? ["Every sandbox the runner started is stopped and deleted."] : problems;
|
|
616
|
+
return [
|
|
617
|
+
keptText(kept),
|
|
618
|
+
...(problems.length === 0 ? ["Every other sandbox the runner started is stopped and deleted."] : problems),
|
|
619
|
+
];
|
|
620
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { StormTimeline } from "../../resources.ts";
|
|
2
|
+
/** The job summary's Markdown for `timeline`; `details` are lines after the critical path, such as the tests'. */
|
|
3
|
+
export declare function jobSummaryMarkdown(timeline: StormTimeline, extras: {
|
|
4
|
+
readonly logs: string | undefined;
|
|
5
|
+
readonly details?: readonly string[];
|
|
6
|
+
}): string;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// The Markdown summary a run appends to a GitHub Actions job summary: its waterfall as a table, the critical path,
|
|
2
|
+
// and where its run directory is, so a CI run that uploads it as an artifact can find it.
|
|
3
|
+
import { seconds } from "./text.js";
|
|
4
|
+
import { criticalPathStep, laneLabel } from "./waterfall.js";
|
|
5
|
+
/** The job summary's Markdown for `timeline`; `details` are lines after the critical path, such as the tests'. */
|
|
6
|
+
export function jobSummaryMarkdown(timeline, extras) {
|
|
7
|
+
const lines = ["### storm run", ""];
|
|
8
|
+
if (timeline.rows.length > 0) {
|
|
9
|
+
lines.push("| Lane | Start | Duration | Idle | Steps |", "| --- | ---: | ---: | ---: | --- |");
|
|
10
|
+
for (const row of timeline.rows)
|
|
11
|
+
lines.push(tableRow(row));
|
|
12
|
+
lines.push("");
|
|
13
|
+
}
|
|
14
|
+
if (timeline.criticalPath.length > 0) {
|
|
15
|
+
const path = timeline.criticalPath.map((name) => criticalPathStep(name, timeline));
|
|
16
|
+
lines.push(`Critical path: ${path.join(" → ")}`, "");
|
|
17
|
+
}
|
|
18
|
+
for (const detail of extras.details ?? [])
|
|
19
|
+
lines.push(`${detail.trim()} `);
|
|
20
|
+
if ((extras.details ?? []).length > 0)
|
|
21
|
+
lines.push("");
|
|
22
|
+
if (extras.logs !== undefined)
|
|
23
|
+
lines.push(`Run directory: \`${extras.logs}\``, "");
|
|
24
|
+
return lines.join("\n");
|
|
25
|
+
}
|
|
26
|
+
function tableRow(row) {
|
|
27
|
+
const outcome = row.outcome === "done" ? "" : ` (${row.outcome})`;
|
|
28
|
+
const steps = row.steps.map((step) => `${step.name} ${seconds(step.endMs - step.startMs)}`).join(" · ");
|
|
29
|
+
const idle = row.idleMs > 0 ? seconds(row.idleMs) : "";
|
|
30
|
+
return `| ${laneLabel(row.name)}${outcome} | +${seconds(row.startMs)} | ${seconds(row.endMs - row.startMs)} | ${idle} | ${steps} |`;
|
|
31
|
+
}
|