@cnc-tools/storm 0.0.0 → 0.6.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/exec/cleanup.d.ts +135 -0
- package/dist/commands/exec/cleanup.js +171 -0
- package/dist/commands/exec/command.d.ts +272 -0
- package/dist/commands/exec/command.js +23 -0
- package/dist/commands/exec/job-summary.d.ts +10 -0
- package/dist/commands/exec/job-summary.js +34 -0
- package/dist/commands/exec/live-view.d.ts +22 -0
- package/dist/commands/exec/live-view.js +395 -0
- package/dist/commands/exec/metadata.d.ts +66 -0
- package/dist/commands/exec/metadata.js +55 -0
- package/dist/commands/exec/mint-failed.d.ts +11 -0
- package/dist/commands/exec/mint-failed.js +33 -0
- package/dist/commands/exec/outcomes.d.ts +614 -0
- package/dist/commands/exec/outcomes.js +338 -0
- package/dist/commands/exec/progress.d.ts +44 -0
- package/dist/commands/exec/progress.js +277 -0
- package/dist/commands/exec/redaction.d.ts +15 -0
- package/dist/commands/exec/redaction.js +40 -0
- package/dist/commands/exec/run-collector.d.ts +30 -0
- package/dist/commands/exec/run-collector.js +73 -0
- package/dist/commands/exec/run-command.d.ts +221 -0
- package/dist/commands/exec/run-command.js +663 -0
- package/dist/commands/exec/run-metadata.d.ts +56 -0
- package/dist/commands/exec/run-metadata.js +58 -0
- package/dist/commands/exec/run-record.d.ts +170 -0
- package/dist/commands/exec/run-record.js +104 -0
- package/dist/commands/exec/tests-summary.d.ts +34 -0
- package/dist/commands/exec/tests-summary.js +141 -0
- package/dist/commands/exec/testserver-flags.d.ts +48 -0
- package/dist/commands/exec/testserver-flags.js +80 -0
- package/dist/commands/exec/text.d.ts +22 -0
- package/dist/commands/exec/text.js +74 -0
- package/dist/commands/exec/view.d.ts +35 -0
- package/dist/commands/exec/view.js +163 -0
- package/dist/commands/exec/waterfall.d.ts +25 -0
- package/dist/commands/exec/waterfall.js +108 -0
- package/dist/commands/exec/worker-chart.d.ts +79 -0
- package/dist/commands/exec/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 +80 -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 +320 -0
- package/dist/commands/vitest/command.d.ts +299 -0
- package/dist/commands/vitest/command.js +138 -0
- package/dist/commands/vitest/metadata.d.ts +66 -0
- package/dist/commands/vitest/metadata.js +35 -0
- package/dist/commands/vitest/outcomes.d.ts +273 -0
- package/dist/commands/vitest/outcomes.js +77 -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 +10 -0
- package/dist/config/index.js +13 -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 +27 -0
- package/dist/config/set.js +71 -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 +39 -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 +89 -0
- package/dist/context.js +45 -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 +78 -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 +455 -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/find-vitest.d.ts +7 -0
- package/dist/vitest/find-vitest.js +28 -0
- package/dist/vitest/fixtures.d.ts +64 -0
- package/dist/vitest/fixtures.js +172 -0
- package/dist/vitest/gateways.d.ts +78 -0
- package/dist/vitest/gateways.js +4 -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 +11 -0
- package/dist/vitest/live/list-gateway.js +107 -0
- package/dist/vitest/ownership.d.ts +29 -0
- package/dist/vitest/ownership.js +68 -0
- package/dist/vitest/plan.d.ts +66 -0
- package/dist/vitest/plan.js +104 -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 +33 -0
- package/skills/read-run-output.md +65 -0
- package/README.md +0 -3
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/** The flags every run takes, as a usage line names them, before the command's own arguments. */
|
|
2
|
+
export declare const RUN_USAGE_FLAGS = "[--testserver-sandboxes <N>] [--testserver-build <BUILD>] [--testserver-min-time-left <DURATION>] [--testserver-ttl <DURATION> | --testserver-no-create] [--set <KEY=VALUE>]... [--credential <SOURCE>] [--scope <TEAM> --project <PROJECT>] [--local | [--rebuild-snapshot] [--show-output] [--keep-sandbox <DURATION>]] [--verbose]";
|
|
3
|
+
/** The field descriptions of the flags every run takes. */
|
|
4
|
+
export declare const RUN_FIELDS: {
|
|
5
|
+
readonly testserverSandboxes: {
|
|
6
|
+
readonly valueLabel: "N";
|
|
7
|
+
readonly description: "How many Testserver sandboxes the command gets, 1 to 32, overriding resources.testserverPool.sandboxes in storm.config.ts; default 1. Gives the run a Testserver side.";
|
|
8
|
+
};
|
|
9
|
+
readonly testserverBuild: {
|
|
10
|
+
readonly valueLabel: "BUILD";
|
|
11
|
+
readonly description: "The build the Testserver sandboxes run: a build name or the build channel stable or latest_main, overriding resources.testserverPool.build in storm.config.ts; default stable. Gives the run a Testserver side.";
|
|
12
|
+
};
|
|
13
|
+
readonly testserverMinTimeLeft: {
|
|
14
|
+
readonly valueLabel: "DURATION";
|
|
15
|
+
readonly description: "The least time left a Testserver sandbox from the pool needs, in whole minutes or hours (30m, 2h), overriding resources.testserverPool.minTimeLeft in storm.config.ts; default 30m. Gives the run a Testserver side.";
|
|
16
|
+
};
|
|
17
|
+
readonly testserverTtl: {
|
|
18
|
+
readonly valueLabel: "DURATION";
|
|
19
|
+
readonly description: "How long each Testserver sandbox the run creates lives, 10m to 5h and longer than minTimeLeft, overriding resources.testserverPool.ttl in storm.config.ts; default 5h. Not with noCreate. Gives the run a Testserver side.";
|
|
20
|
+
};
|
|
21
|
+
readonly testserverNoCreate: {
|
|
22
|
+
readonly description: "Run only on Testserver sandboxes already in the pool, never minting for Testserver or creating: needs no --scope or --project with --local, and takes no --testserver-ttl. Turns on resources.testserverPool.noCreate whatever storm.config.ts says; without it, the file's noCreate, default false, applies. Gives the run a Testserver side.";
|
|
23
|
+
};
|
|
24
|
+
readonly set: {
|
|
25
|
+
readonly valueLabel: "KEY=VALUE";
|
|
26
|
+
readonly description: "Set a resource's option for this run by its key path in storm.config.ts, resources.<name>.<option>, overriding the file and the default; repeat it for each option. The key paths: resources.githubFixtureRepo.repo, the GitHub repository as owner/name, required; resources.githubFixtureRepo.tokenEnv, the host environment variable holding its token, required; resources.githubFixtureRepo.optional, true or false, default false: false refuses the run without the token, true goes on without the repository. The Testserver pool resource's options have their own flags, --testserver-<option>, which --set doesn't take. Any --set of a resource's option gives the run that resource, as storm.config.ts does. An unknown key path, one given twice, one with its own flag, or a value its option refuses is a usage error. Options that don't fit together once merged, or a required one nothing gives, are invalid_resource_options, naming where each value came from.";
|
|
27
|
+
};
|
|
28
|
+
readonly credential: {
|
|
29
|
+
readonly valueLabel: "SOURCE";
|
|
30
|
+
readonly description: "The credential source: mint, the default, mints one with the vercel CLI for --scope and --project; github-actions requests a GitHub Actions OIDC token, in a GitHub Actions job with permissions id-token: write, anew once it is 4 minutes old, and needs no --scope or --project. Only --local takes it: a runner run needs the mint. Only a run holding a resource that takes a credential takes it, the Testserver pool resource without noCreate (resources.testserverPool in storm.config.ts, or any --testserver-* flag but --testserver-no-create); otherwise it is credential_unused. No config key.";
|
|
31
|
+
};
|
|
32
|
+
readonly local: {
|
|
33
|
+
readonly description: "Run the command on this machine instead of in a runner sandbox. Without it, the command runs in a Vercel Sandbox started from a runner snapshot of the base, with this checkout's changes applied, installed and built, from the runner key of storm.config.ts, and its output streams back with paths rewritten to this checkout's. No config key.";
|
|
34
|
+
};
|
|
35
|
+
readonly rebuildSnapshot: {
|
|
36
|
+
readonly description: "Build a runner snapshot of the base whatever the runner snapshot cache holds, replacing an entry for the same base. Not with --local. No config key.";
|
|
37
|
+
};
|
|
38
|
+
readonly keepSandbox: {
|
|
39
|
+
readonly valueLabel: "DURATION";
|
|
40
|
+
readonly description: "How long the runner sandbox keeps running once the run ends, however it ends, so you can connect to it from its page in the Vercel dashboard: 0, which stops and deletes it with the run's other sandboxes, or a whole number of minutes or hours up to 5h (30m, 2h). The run asks Vercel Sandbox to extend the runner sandbox's timeout when it would stop sooner; it never shortens it, so the sandbox may run past the keep time until its own timeout. The run says until when it runs, and storm runs show and runs list say so too. Default: keepSandbox in the runner recipe, else 30m, or 0 when CI is set. Not with --local.";
|
|
41
|
+
};
|
|
42
|
+
readonly showOutput: {
|
|
43
|
+
readonly description: "In a runner run on a terminal, print the runner's step output (a snapshot build, the install, the build) above the live view instead of keeping only each step's last line there. Plain output always prints it. Either way, the run directory keeps it whole. Not with --local. No config key.";
|
|
44
|
+
};
|
|
45
|
+
readonly verbose: {
|
|
46
|
+
readonly description: "Print more as it happens: each Testserver sandbox create's progress messages, the runner's step output as with --show-output, and verbose in the run payload, which has the Vitest adapter's reporters print each test as it finishes and its fixtures print each container start, proxied request and vercel invocation, for passing tests too. No config key.";
|
|
47
|
+
};
|
|
48
|
+
readonly scope: {
|
|
49
|
+
readonly valueLabel: "TEAM";
|
|
50
|
+
readonly description: "The control plane team: the Vercel team whose project's development OIDC tokens the Testserver control plane trusts. Required, from this flag or scope in storm.config.ts, unless --local without a Testserver side, with noCreate or with --credential github-actions.";
|
|
51
|
+
};
|
|
52
|
+
readonly project: {
|
|
53
|
+
readonly valueLabel: "PROJECT";
|
|
54
|
+
readonly description: "The control plane project: the Vercel project, within the team, to mint the credential for. Required, from this flag or project in storm.config.ts, unless --local without a Testserver side, with noCreate or with --credential github-actions.";
|
|
55
|
+
};
|
|
56
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// The help every run's command shares, `exec`'s and `vitest`'s: the usage of the flags every run takes, and their field
|
|
2
|
+
// descriptions. Clinkr loads each command's metadata eagerly for navigation, so this module imports nothing.
|
|
3
|
+
/** The flags every run takes, as a usage line names them, before the command's own arguments. */
|
|
4
|
+
export const RUN_USAGE_FLAGS = "[--testserver-sandboxes <N>] [--testserver-build <BUILD>] [--testserver-min-time-left <DURATION>] [--testserver-ttl <DURATION> | --testserver-no-create] [--set <KEY=VALUE>]... [--credential <SOURCE>] [--scope <TEAM> --project <PROJECT>] [--local | [--rebuild-snapshot] [--show-output] [--keep-sandbox <DURATION>]] [--verbose]";
|
|
5
|
+
/** The field descriptions of the flags every run takes. */
|
|
6
|
+
export const RUN_FIELDS = {
|
|
7
|
+
testserverSandboxes: {
|
|
8
|
+
valueLabel: "N",
|
|
9
|
+
description: "How many Testserver sandboxes the command gets, 1 to 32, overriding resources.testserverPool.sandboxes in storm.config.ts; default 1. Gives the run a Testserver side.",
|
|
10
|
+
},
|
|
11
|
+
testserverBuild: {
|
|
12
|
+
valueLabel: "BUILD",
|
|
13
|
+
description: "The build the Testserver sandboxes run: a build name or the build channel stable or latest_main, overriding resources.testserverPool.build in storm.config.ts; default stable. Gives the run a Testserver side.",
|
|
14
|
+
},
|
|
15
|
+
testserverMinTimeLeft: {
|
|
16
|
+
valueLabel: "DURATION",
|
|
17
|
+
description: "The least time left a Testserver sandbox from the pool needs, in whole minutes or hours (30m, 2h), overriding resources.testserverPool.minTimeLeft in storm.config.ts; default 30m. Gives the run a Testserver side.",
|
|
18
|
+
},
|
|
19
|
+
testserverTtl: {
|
|
20
|
+
valueLabel: "DURATION",
|
|
21
|
+
description: "How long each Testserver sandbox the run creates lives, 10m to 5h and longer than minTimeLeft, overriding resources.testserverPool.ttl in storm.config.ts; default 5h. Not with noCreate. Gives the run a Testserver side.",
|
|
22
|
+
},
|
|
23
|
+
testserverNoCreate: {
|
|
24
|
+
description: "Run only on Testserver sandboxes already in the pool, never minting for Testserver or creating: needs no --scope or --project with --local, and takes no --testserver-ttl. Turns on resources.testserverPool.noCreate whatever storm.config.ts says; without it, the file's noCreate, default false, applies. Gives the run a Testserver side.",
|
|
25
|
+
},
|
|
26
|
+
set: {
|
|
27
|
+
valueLabel: "KEY=VALUE",
|
|
28
|
+
description: "Set a resource's option for this run by its key path in storm.config.ts, resources.<name>.<option>, overriding the file and the default; repeat it for each option. The key paths: resources.githubFixtureRepo.repo, the GitHub repository as owner/name, required; resources.githubFixtureRepo.tokenEnv, the host environment variable holding its token, required; resources.githubFixtureRepo.optional, true or false, default false: false refuses the run without the token, true goes on without the repository. The Testserver pool resource's options have their own flags, --testserver-<option>, which --set doesn't take. Any --set of a resource's option gives the run that resource, as storm.config.ts does. An unknown key path, one given twice, one with its own flag, or a value its option refuses is a usage error. Options that don't fit together once merged, or a required one nothing gives, are invalid_resource_options, naming where each value came from.",
|
|
29
|
+
},
|
|
30
|
+
credential: {
|
|
31
|
+
valueLabel: "SOURCE",
|
|
32
|
+
description: "The credential source: mint, the default, mints one with the vercel CLI for --scope and --project; github-actions requests a GitHub Actions OIDC token, in a GitHub Actions job with permissions id-token: write, anew once it is 4 minutes old, and needs no --scope or --project. Only --local takes it: a runner run needs the mint. Only a run holding a resource that takes a credential takes it, the Testserver pool resource without noCreate (resources.testserverPool in storm.config.ts, or any --testserver-* flag but --testserver-no-create); otherwise it is credential_unused. No config key.",
|
|
33
|
+
},
|
|
34
|
+
local: {
|
|
35
|
+
description: "Run the command on this machine instead of in a runner sandbox. Without it, the command runs in a Vercel Sandbox started from a runner snapshot of the base, with this checkout's changes applied, installed and built, from the runner key of storm.config.ts, and its output streams back with paths rewritten to this checkout's. No config key.",
|
|
36
|
+
},
|
|
37
|
+
rebuildSnapshot: {
|
|
38
|
+
description: "Build a runner snapshot of the base whatever the runner snapshot cache holds, replacing an entry for the same base. Not with --local. No config key.",
|
|
39
|
+
},
|
|
40
|
+
keepSandbox: {
|
|
41
|
+
valueLabel: "DURATION",
|
|
42
|
+
description: "How long the runner sandbox keeps running once the run ends, however it ends, so you can connect to it from its page in the Vercel dashboard: 0, which stops and deletes it with the run's other sandboxes, or a whole number of minutes or hours up to 5h (30m, 2h). The run asks Vercel Sandbox to extend the runner sandbox's timeout when it would stop sooner; it never shortens it, so the sandbox may run past the keep time until its own timeout. The run says until when it runs, and storm runs show and runs list say so too. Default: keepSandbox in the runner recipe, else 30m, or 0 when CI is set. Not with --local.",
|
|
43
|
+
},
|
|
44
|
+
showOutput: {
|
|
45
|
+
description: "In a runner run on a terminal, print the runner's step output (a snapshot build, the install, the build) above the live view instead of keeping only each step's last line there. Plain output always prints it. Either way, the run directory keeps it whole. Not with --local. No config key.",
|
|
46
|
+
},
|
|
47
|
+
verbose: {
|
|
48
|
+
description: "Print more as it happens: each Testserver sandbox create's progress messages, the runner's step output as with --show-output, and verbose in the run payload, which has the Vitest adapter's reporters print each test as it finishes and its fixtures print each container start, proxied request and vercel invocation, for passing tests too. No config key.",
|
|
49
|
+
},
|
|
50
|
+
scope: {
|
|
51
|
+
valueLabel: "TEAM",
|
|
52
|
+
description: "The control plane team: the Vercel team whose project's development OIDC tokens the Testserver control plane trusts. Required, from this flag or scope in storm.config.ts, unless --local without a Testserver side, with noCreate or with --credential github-actions.",
|
|
53
|
+
},
|
|
54
|
+
project: {
|
|
55
|
+
valueLabel: "PROJECT",
|
|
56
|
+
description: "The control plane project: the Vercel project, within the team, to mint the credential for. Required, from this flag or project in storm.config.ts, unless --local without a Testserver side, with noCreate or with --credential github-actions.",
|
|
57
|
+
},
|
|
58
|
+
};
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type StormResourceRanFacts } from "../../resources.ts";
|
|
3
|
+
import type { TestEvent } from "../../sdk/index.ts";
|
|
4
|
+
declare const testTotalsSchema: z.ZodObject<{
|
|
5
|
+
passed: z.ZodNumber;
|
|
6
|
+
failed: z.ZodNumber;
|
|
7
|
+
skipped: z.ZodNumber;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
/** How many of a run's tests passed, failed and were skipped, by their final results. */
|
|
10
|
+
export type RunTestTotals = Readonly<z.output<typeof testTotalsSchema>>;
|
|
11
|
+
declare const endedSchema: z.ZodObject<{
|
|
12
|
+
outcome: z.ZodString;
|
|
13
|
+
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
14
|
+
signal: z.ZodNullable<z.ZodString>;
|
|
15
|
+
ms: z.ZodNullable<z.ZodNumber>;
|
|
16
|
+
tests: z.ZodNullable<z.ZodObject<{
|
|
17
|
+
passed: z.ZodNumber;
|
|
18
|
+
failed: z.ZodNumber;
|
|
19
|
+
skipped: z.ZodNumber;
|
|
20
|
+
}, z.core.$strip>>;
|
|
21
|
+
testsIncomplete: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
22
|
+
resources: z.ZodUnknown;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
/**
|
|
25
|
+
* How a run ended: its outcome's kind (`ran`, `canceled`, `spawn-failed`, …), the status storm exited with and
|
|
26
|
+
* the signal that ended the command, for a run whose command ran (null otherwise), how long the command took (null
|
|
27
|
+
* when it never ended), its tests' totals (null without a final result), why those may be incomplete (null unless a
|
|
28
|
+
* runner run's final read of its test events file failed), and what each resource it acquired reports
|
|
29
|
+
* of itself, as a `ran` outcome does, such as the Testserver sandboxes and their log viewer URLs (null for any other
|
|
30
|
+
* outcome).
|
|
31
|
+
*/
|
|
32
|
+
export type RunRecordEnd = Readonly<Omit<z.output<typeof endedSchema>, "resources"> & {
|
|
33
|
+
readonly resources: StormResourceRanFacts | null;
|
|
34
|
+
}>;
|
|
35
|
+
declare const snapshotSchema: z.ZodObject<{
|
|
36
|
+
id: z.ZodString;
|
|
37
|
+
base: z.ZodString;
|
|
38
|
+
built: z.ZodBoolean;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
/**
|
|
41
|
+
* The runner snapshot a runner sandbox started from: its id, the base it is of, which the run's changes were uploaded
|
|
42
|
+
* on top of, and whether the run built it or reused a cached one.
|
|
43
|
+
*/
|
|
44
|
+
export type RunRecordSnapshot = Readonly<z.output<typeof snapshotSchema>>;
|
|
45
|
+
declare const whereSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
46
|
+
kind: z.ZodLiteral<"local">;
|
|
47
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
48
|
+
kind: z.ZodLiteral<"runner">;
|
|
49
|
+
team: z.ZodString;
|
|
50
|
+
project: z.ZodString;
|
|
51
|
+
region: z.ZodString;
|
|
52
|
+
runtime: z.ZodString;
|
|
53
|
+
vcpus: z.ZodNumber;
|
|
54
|
+
base: z.ZodString;
|
|
55
|
+
baseRef: z.ZodString;
|
|
56
|
+
sandbox: z.ZodNullable<z.ZodString>;
|
|
57
|
+
snapshot: z.ZodNullable<z.ZodObject<{
|
|
58
|
+
id: z.ZodString;
|
|
59
|
+
base: z.ZodString;
|
|
60
|
+
built: z.ZodBoolean;
|
|
61
|
+
}, z.core.$strip>>;
|
|
62
|
+
keptUntil: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
63
|
+
}, z.core.$strip>], "kind">;
|
|
64
|
+
/**
|
|
65
|
+
* Where a run's command ran: on this machine (`local`, with `--local`), or in a runner sandbox (`runner`): the control
|
|
66
|
+
* plane team and project it runs in, its region, runtime and vCPUs, and the run's base, HEAD's merge-base with
|
|
67
|
+
* `baseRef`, all known as the run starts; then, once the run is over, the runner sandbox's name and the runner snapshot
|
|
68
|
+
* it started from, each null when the run stopped before it, and when the runner sandbox's timeout stops it, as an ISO
|
|
69
|
+
* time, when the run kept it running (null when it stopped and deleted it). A reused runner snapshot can be of an
|
|
70
|
+
* older base.
|
|
71
|
+
*/
|
|
72
|
+
export type RunRecordWhere = Readonly<z.output<typeof whereSchema>>;
|
|
73
|
+
declare const gitSchema: z.ZodObject<{
|
|
74
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
75
|
+
commit: z.ZodString;
|
|
76
|
+
dirty: z.ZodBoolean;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
/**
|
|
79
|
+
* Where the checkout the run started from was: HEAD's branch (null when detached), its commit, and whether the working
|
|
80
|
+
* tree had uncommitted changes or untracked files.
|
|
81
|
+
*/
|
|
82
|
+
export type RunRecordGit = Readonly<z.output<typeof gitSchema>>;
|
|
83
|
+
declare const planSchema: z.ZodObject<{
|
|
84
|
+
tests: z.ZodNumber;
|
|
85
|
+
files: z.ZodNumber;
|
|
86
|
+
sandboxes: z.ZodNullable<z.ZodNumber>;
|
|
87
|
+
sandboxesFrom: z.ZodNullable<z.ZodEnum<{
|
|
88
|
+
auto: "auto";
|
|
89
|
+
file: "file";
|
|
90
|
+
flag: "flag";
|
|
91
|
+
}>>;
|
|
92
|
+
}, z.core.$strip>;
|
|
93
|
+
/**
|
|
94
|
+
* A `storm vitest` run's test plan: how many tests `vitest list` counted, in how many files, and, with a Testserver
|
|
95
|
+
* side, how many Testserver sandboxes the run asked for and where that count came from (`--testserver-sandboxes`, the
|
|
96
|
+
* config file's `resources.testserverPool.sandboxes`, or sized automatically from the files); both null without one.
|
|
97
|
+
*/
|
|
98
|
+
export type RunRecordPlan = Readonly<z.output<typeof planSchema>>;
|
|
99
|
+
declare const runRecordSchema: z.ZodObject<{
|
|
100
|
+
version: z.ZodLiteral<1>;
|
|
101
|
+
startedAt: z.ZodString;
|
|
102
|
+
cwd: z.ZodString;
|
|
103
|
+
configFile: z.ZodNullable<z.ZodString>;
|
|
104
|
+
argv: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
105
|
+
plan: z.ZodExactOptional<z.ZodObject<{
|
|
106
|
+
tests: z.ZodNumber;
|
|
107
|
+
files: z.ZodNumber;
|
|
108
|
+
sandboxes: z.ZodNullable<z.ZodNumber>;
|
|
109
|
+
sandboxesFrom: z.ZodNullable<z.ZodEnum<{
|
|
110
|
+
auto: "auto";
|
|
111
|
+
file: "file";
|
|
112
|
+
flag: "flag";
|
|
113
|
+
}>>;
|
|
114
|
+
}, z.core.$strip>>;
|
|
115
|
+
where: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
116
|
+
kind: z.ZodLiteral<"local">;
|
|
117
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
118
|
+
kind: z.ZodLiteral<"runner">;
|
|
119
|
+
team: z.ZodString;
|
|
120
|
+
project: z.ZodString;
|
|
121
|
+
region: z.ZodString;
|
|
122
|
+
runtime: z.ZodString;
|
|
123
|
+
vcpus: z.ZodNumber;
|
|
124
|
+
base: z.ZodString;
|
|
125
|
+
baseRef: z.ZodString;
|
|
126
|
+
sandbox: z.ZodNullable<z.ZodString>;
|
|
127
|
+
snapshot: z.ZodNullable<z.ZodObject<{
|
|
128
|
+
id: z.ZodString;
|
|
129
|
+
base: z.ZodString;
|
|
130
|
+
built: z.ZodBoolean;
|
|
131
|
+
}, z.core.$strip>>;
|
|
132
|
+
keptUntil: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
133
|
+
}, z.core.$strip>], "kind">;
|
|
134
|
+
git: z.ZodNullable<z.ZodObject<{
|
|
135
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
136
|
+
commit: z.ZodString;
|
|
137
|
+
dirty: z.ZodBoolean;
|
|
138
|
+
}, z.core.$strip>>;
|
|
139
|
+
ended: z.ZodExactOptional<z.ZodObject<{
|
|
140
|
+
outcome: z.ZodString;
|
|
141
|
+
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
142
|
+
signal: z.ZodNullable<z.ZodString>;
|
|
143
|
+
ms: z.ZodNullable<z.ZodNumber>;
|
|
144
|
+
tests: z.ZodNullable<z.ZodObject<{
|
|
145
|
+
passed: z.ZodNumber;
|
|
146
|
+
failed: z.ZodNumber;
|
|
147
|
+
skipped: z.ZodNumber;
|
|
148
|
+
}, z.core.$strip>>;
|
|
149
|
+
testsIncomplete: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
150
|
+
resources: z.ZodUnknown;
|
|
151
|
+
}, z.core.$strip>>;
|
|
152
|
+
}, z.core.$strip>;
|
|
153
|
+
/**
|
|
154
|
+
* A run as `run.json` records it: when it started, the working directory and config file it ran with (null when
|
|
155
|
+
* none applied), its command's argv, a `storm vitest` run's test plan, where its command ran, the Git checkout it started from (null outside one,
|
|
156
|
+
* or when git couldn't say), and, once it is over, how it ended.
|
|
157
|
+
*/
|
|
158
|
+
export type RunRecord = Readonly<Omit<z.output<typeof runRecordSchema>, "ended"> & {
|
|
159
|
+
readonly ended?: RunRecordEnd;
|
|
160
|
+
}>;
|
|
161
|
+
/** `run.json`'s text for `record`. */
|
|
162
|
+
export declare function runRecordText(record: RunRecord): string;
|
|
163
|
+
/**
|
|
164
|
+
* The run `text` records; undefined when there is no text, or it isn't a version 1 `run.json`. Resources' facts it
|
|
165
|
+
* can't read, such as another storm's, read as null.
|
|
166
|
+
*/
|
|
167
|
+
export declare function parseRunRecord(text: string | undefined): RunRecord | undefined;
|
|
168
|
+
/** The totals of `events`' final results; null without one. */
|
|
169
|
+
export declare function testTotals(events: readonly TestEvent[]): RunTestTotals | null;
|
|
170
|
+
export {};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// What a run records about itself in its run directory's `run.json`, which `storm runs` reads back: written as
|
|
2
|
+
// the run directory opens, then replaced with how the run ended once it is over. The run directory stores the text;
|
|
3
|
+
// this module owns its shape, version 1.
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { RESOURCE_REPORTS } from "../../resources.js";
|
|
6
|
+
const testTotalsSchema = z.object({
|
|
7
|
+
passed: z.number().int().nonnegative(),
|
|
8
|
+
failed: z.number().int().nonnegative(),
|
|
9
|
+
skipped: z.number().int().nonnegative(),
|
|
10
|
+
});
|
|
11
|
+
const endedSchema = z.object({
|
|
12
|
+
outcome: z.string(),
|
|
13
|
+
exitCode: z.number().int().nullable(),
|
|
14
|
+
signal: z.string().nullable(),
|
|
15
|
+
ms: z.number().nonnegative().nullable(),
|
|
16
|
+
tests: testTotalsSchema.nullable(),
|
|
17
|
+
// Absent from a run.json an earlier storm wrote.
|
|
18
|
+
testsIncomplete: z.string().nullable().default(null),
|
|
19
|
+
// Read on its own in `parseRunRecord`, so a resource's facts another storm wrote cost only themselves.
|
|
20
|
+
resources: z.unknown(),
|
|
21
|
+
});
|
|
22
|
+
const snapshotSchema = z.object({ id: z.string(), base: z.string(), built: z.boolean() });
|
|
23
|
+
const whereSchema = z.discriminatedUnion("kind", [
|
|
24
|
+
z.object({ kind: z.literal("local") }),
|
|
25
|
+
z.object({
|
|
26
|
+
kind: z.literal("runner"),
|
|
27
|
+
team: z.string(),
|
|
28
|
+
project: z.string(),
|
|
29
|
+
region: z.string(),
|
|
30
|
+
runtime: z.string(),
|
|
31
|
+
vcpus: z.number().int().positive(),
|
|
32
|
+
base: z.string(),
|
|
33
|
+
baseRef: z.string(),
|
|
34
|
+
sandbox: z.string().nullable(),
|
|
35
|
+
snapshot: snapshotSchema.nullable(),
|
|
36
|
+
// Absent from a run.json an earlier storm wrote, which kept no runner sandbox.
|
|
37
|
+
keptUntil: z.string().nullable().default(null),
|
|
38
|
+
}),
|
|
39
|
+
]);
|
|
40
|
+
const gitSchema = z.object({ branch: z.string().nullable(), commit: z.string(), dirty: z.boolean() });
|
|
41
|
+
const planSchema = z.object({
|
|
42
|
+
tests: z.number().int().nonnegative(),
|
|
43
|
+
files: z.number().int().nonnegative(),
|
|
44
|
+
sandboxes: z.number().int().positive().nullable(),
|
|
45
|
+
sandboxesFrom: z.enum(["flag", "file", "auto"]).nullable(),
|
|
46
|
+
});
|
|
47
|
+
const runRecordSchema = z.object({
|
|
48
|
+
version: z.literal(1),
|
|
49
|
+
startedAt: z.string(),
|
|
50
|
+
cwd: z.string(),
|
|
51
|
+
configFile: z.string().nullable(),
|
|
52
|
+
argv: z.array(z.string()).readonly(),
|
|
53
|
+
// Only a `storm vitest` run has one.
|
|
54
|
+
plan: planSchema.exactOptional(),
|
|
55
|
+
where: whereSchema,
|
|
56
|
+
git: gitSchema.nullable(),
|
|
57
|
+
ended: endedSchema.exactOptional(),
|
|
58
|
+
});
|
|
59
|
+
/** `run.json`'s text for `record`. */
|
|
60
|
+
export function runRecordText(record) {
|
|
61
|
+
return JSON.stringify(record);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The run `text` records; undefined when there is no text, or it isn't a version 1 `run.json`. Resources' facts it
|
|
65
|
+
* can't read, such as another storm's, read as null.
|
|
66
|
+
*/
|
|
67
|
+
export function parseRunRecord(text) {
|
|
68
|
+
if (text === undefined)
|
|
69
|
+
return undefined;
|
|
70
|
+
let json;
|
|
71
|
+
try {
|
|
72
|
+
json = JSON.parse(text);
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
return undefined;
|
|
76
|
+
}
|
|
77
|
+
const parsed = runRecordSchema.safeParse(json);
|
|
78
|
+
if (!parsed.success)
|
|
79
|
+
return undefined;
|
|
80
|
+
const { ended, ...started } = parsed.data;
|
|
81
|
+
if (ended === undefined)
|
|
82
|
+
return started;
|
|
83
|
+
const resources = RESOURCE_REPORTS.ranSchema.safeParse(ended.resources);
|
|
84
|
+
return { ...started, ended: { ...ended, resources: resources.success ? resources.data : null } };
|
|
85
|
+
}
|
|
86
|
+
/** The totals of `events`' final results; null without one. */
|
|
87
|
+
export function testTotals(events) {
|
|
88
|
+
let passed = 0;
|
|
89
|
+
let failed = 0;
|
|
90
|
+
let skipped = 0;
|
|
91
|
+
let any = false;
|
|
92
|
+
for (const event of events) {
|
|
93
|
+
if (event.kind !== "test-result")
|
|
94
|
+
continue;
|
|
95
|
+
any = true;
|
|
96
|
+
if (event.state === "pass")
|
|
97
|
+
passed += 1;
|
|
98
|
+
else if (event.state === "fail")
|
|
99
|
+
failed += 1;
|
|
100
|
+
else
|
|
101
|
+
skipped += 1;
|
|
102
|
+
}
|
|
103
|
+
return any ? { passed, failed, skipped } : null;
|
|
104
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { TestEvent } from "../../sdk/index.ts";
|
|
2
|
+
/**
|
|
3
|
+
* What the summary says about the tests, a line apiece: `tests`, the totals and how busy the workers were;
|
|
4
|
+
* `containers`, how long container starts took and how much of the attempts' time they were; `slowest`, the slowest
|
|
5
|
+
* files; `unreadable`, how many lines of the test events file held no test event; and `incomplete`, that the test
|
|
6
|
+
* results may be incomplete, since the final read of a runner run's test events file failed. Each is undefined when it
|
|
7
|
+
* has nothing to say.
|
|
8
|
+
*/
|
|
9
|
+
export interface TestsSummary {
|
|
10
|
+
readonly tests: string | undefined;
|
|
11
|
+
readonly containers: string | undefined;
|
|
12
|
+
readonly slowest: string | undefined;
|
|
13
|
+
readonly unreadable: string | undefined;
|
|
14
|
+
readonly incomplete: string | undefined;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The summary's lines about the tests, after the critical path; none without a test event. The totals come only from
|
|
18
|
+
* the tests' final results (`test-result`); without one, the line says how to get them and counts the workers' test attempts
|
|
19
|
+
* instead. `unreadable` counts the lines in the test events file that held none; `incomplete` is why the final read of
|
|
20
|
+
* a runner run's test events file failed, when it did.
|
|
21
|
+
*/
|
|
22
|
+
export declare function testsSummaryLines(events: readonly TestEvent[], unreadable?: number, incomplete?: string): string[];
|
|
23
|
+
/** What the summary says when the final read of a runner run's test events file failed with `message`. */
|
|
24
|
+
export declare function incompleteText(message: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* What the tests line says in place of totals when the command's test runner reported attempts but no final results:
|
|
27
|
+
* the Vitest config lacks `stormReporter`, or a `--reporter` on vitest's command line replaced it.
|
|
28
|
+
*/
|
|
29
|
+
export declare const NO_FINAL_RESULTS = "no final test results: add stormReporter() to vitest.config's reporters (@cnc-tools/storm/vitest/config)";
|
|
30
|
+
/**
|
|
31
|
+
* What the summary says about the tests, from `events`, of which `unreadable` lines held none, and `incomplete`, why the
|
|
32
|
+
* final read of the test events file failed.
|
|
33
|
+
*/
|
|
34
|
+
export declare function testsSummary(events: readonly TestEvent[], unreadable?: number, incomplete?: string): TestsSummary;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
// What a run's summary says about its tests, from the test events the command appended: the final totals, how busy
|
|
2
|
+
// the workers were with test attempts, how long container starts took and how much of the attempts' time they were,
|
|
3
|
+
// and the slowest files.
|
|
4
|
+
import { median, seconds, shortFile } from "./text.js";
|
|
5
|
+
/** How many slowest files the summary names. */
|
|
6
|
+
const SLOWEST_FILES = 3;
|
|
7
|
+
/**
|
|
8
|
+
* The summary's lines about the tests, after the critical path; none without a test event. The totals come only from
|
|
9
|
+
* the tests' final results (`test-result`); without one, the line says how to get them and counts the workers' test attempts
|
|
10
|
+
* instead. `unreadable` counts the lines in the test events file that held none; `incomplete` is why the final read of
|
|
11
|
+
* a runner run's test events file failed, when it did.
|
|
12
|
+
*/
|
|
13
|
+
export function testsSummaryLines(events, unreadable = 0, incomplete) {
|
|
14
|
+
const summary = testsSummary(events, unreadable, incomplete);
|
|
15
|
+
return [
|
|
16
|
+
summary.tests,
|
|
17
|
+
summary.containers === undefined ? undefined : ` ${summary.containers}`,
|
|
18
|
+
summary.slowest === undefined ? undefined : ` ${summary.slowest}`,
|
|
19
|
+
summary.unreadable,
|
|
20
|
+
summary.incomplete,
|
|
21
|
+
].filter((line) => line !== undefined);
|
|
22
|
+
}
|
|
23
|
+
/** What the summary says when the final read of a runner run's test events file failed with `message`. */
|
|
24
|
+
export function incompleteText(message) {
|
|
25
|
+
return `the test results may be incomplete: couldn't read the test events file once the command ended: ${message}`;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* What the tests line says in place of totals when the command's test runner reported attempts but no final results:
|
|
29
|
+
* the Vitest config lacks `stormReporter`, or a `--reporter` on vitest's command line replaced it.
|
|
30
|
+
*/
|
|
31
|
+
export const NO_FINAL_RESULTS = "no final test results: add stormReporter() to vitest.config's reporters (@cnc-tools/storm/vitest/config)";
|
|
32
|
+
/**
|
|
33
|
+
* What the summary says about the tests, from `events`, of which `unreadable` lines held none, and `incomplete`, why the
|
|
34
|
+
* final read of the test events file failed.
|
|
35
|
+
*/
|
|
36
|
+
export function testsSummary(events, unreadable = 0, incomplete) {
|
|
37
|
+
const results = [];
|
|
38
|
+
const reported = [];
|
|
39
|
+
for (const event of events) {
|
|
40
|
+
if (event.kind === "test-result")
|
|
41
|
+
results.push(event);
|
|
42
|
+
else
|
|
43
|
+
reported.push(event);
|
|
44
|
+
}
|
|
45
|
+
let tests;
|
|
46
|
+
let containers;
|
|
47
|
+
let slowestText;
|
|
48
|
+
if (events.length > 0) {
|
|
49
|
+
const attempts = reported.flatMap((event) => (event.kind === "test-attempt-finished" ? [event] : []));
|
|
50
|
+
const testMs = attempts.reduce((sum, event) => sum + event.ms, 0);
|
|
51
|
+
let workers = 0;
|
|
52
|
+
let first = Infinity;
|
|
53
|
+
let last = -Infinity;
|
|
54
|
+
for (const event of reported) {
|
|
55
|
+
workers = Math.max(workers, event.worker);
|
|
56
|
+
first = Math.min(first, event.at);
|
|
57
|
+
last = Math.max(last, event.at);
|
|
58
|
+
}
|
|
59
|
+
const wallMs = reported.length === 0 ? 0 : last - first;
|
|
60
|
+
const files = new Set(events.map((event) => event.file)).size;
|
|
61
|
+
const filesText = `${files} ${files === 1 ? "file" : "files"}`;
|
|
62
|
+
const outcome = results.length === 0
|
|
63
|
+
? [
|
|
64
|
+
NO_FINAL_RESULTS,
|
|
65
|
+
...(attempts.length === 0
|
|
66
|
+
? []
|
|
67
|
+
: [`${attempts.length} test ${attempts.length === 1 ? "attempt" : "attempts"}`]),
|
|
68
|
+
filesText,
|
|
69
|
+
]
|
|
70
|
+
: resultTotals(results, filesText);
|
|
71
|
+
const busy = wallMs > 0 && workers > 0 ? ` (${Math.round((testMs / (wallMs * workers)) * 100)}% busy)` : "";
|
|
72
|
+
const timing = workers === 0
|
|
73
|
+
? []
|
|
74
|
+
: [
|
|
75
|
+
`${seconds(testMs)} of attempts on ${workers} ${workers === 1 ? "worker" : "workers"} in ${seconds(wallMs)}${busy}`,
|
|
76
|
+
];
|
|
77
|
+
tests = ` tests ${[...outcome, ...timing].join(" · ")}`;
|
|
78
|
+
const starts = [];
|
|
79
|
+
const warmups = [];
|
|
80
|
+
for (const event of reported) {
|
|
81
|
+
if (event.kind !== "container-started" || !event.ok)
|
|
82
|
+
continue;
|
|
83
|
+
starts.push(event.ms);
|
|
84
|
+
if (event.warmupMs !== undefined)
|
|
85
|
+
warmups.push(event.warmupMs);
|
|
86
|
+
}
|
|
87
|
+
if (starts.length > 0) {
|
|
88
|
+
let startMs = 0;
|
|
89
|
+
let fastest = Infinity;
|
|
90
|
+
let slowest = -Infinity;
|
|
91
|
+
for (const ms of starts) {
|
|
92
|
+
startMs += ms;
|
|
93
|
+
fastest = Math.min(fastest, ms);
|
|
94
|
+
slowest = Math.max(slowest, ms);
|
|
95
|
+
}
|
|
96
|
+
const share = testMs > 0 ? ` · ~${Math.round((startMs / testMs) * 100)}% of attempt time` : "";
|
|
97
|
+
const warmup = warmups.length === 0 ? "" : ` · warmup median ${seconds(median(warmups) ?? 0)}`;
|
|
98
|
+
containers = `container starts ${starts.length} · ${seconds(fastest)}–${seconds(slowest)} · median ${seconds(median(starts) ?? 0)}${share}${warmup}`;
|
|
99
|
+
}
|
|
100
|
+
const slowest = slowestFiles(reported);
|
|
101
|
+
if (slowest.length > 0)
|
|
102
|
+
slowestText = `slowest: ${slowest.map(({ file, ms }) => `${shortFile(file)} ${seconds(ms)}`).join(", ")}`;
|
|
103
|
+
}
|
|
104
|
+
return {
|
|
105
|
+
tests,
|
|
106
|
+
containers,
|
|
107
|
+
slowest: slowestText,
|
|
108
|
+
unreadable: unreadable > 0
|
|
109
|
+
? ` tests skipped ${unreadable} unreadable test event ${unreadable === 1 ? "line" : "lines"}`
|
|
110
|
+
: undefined,
|
|
111
|
+
incomplete: incomplete === undefined ? undefined : ` tests ${incompleteText(incomplete)}`,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
/** `2 passed · 1 failed · 1 skipped · 2 files`, with failed and skipped only when there are some. */
|
|
115
|
+
function resultTotals(results, filesText) {
|
|
116
|
+
const count = (state) => results.filter((event) => event.state === state).length;
|
|
117
|
+
const failed = count("fail");
|
|
118
|
+
const skipped = count("skip");
|
|
119
|
+
return [
|
|
120
|
+
`${count("pass")} passed`,
|
|
121
|
+
...(failed === 0 ? [] : [`${failed} failed`]),
|
|
122
|
+
...(skipped === 0 ? [] : [`${skipped} skipped`]),
|
|
123
|
+
filesText,
|
|
124
|
+
];
|
|
125
|
+
}
|
|
126
|
+
/** The files that took longest, from each file's start to its finish on the worker that ran it. */
|
|
127
|
+
function slowestFiles(events) {
|
|
128
|
+
const started = new Map();
|
|
129
|
+
const durations = [];
|
|
130
|
+
for (const event of events) {
|
|
131
|
+
const key = `${event.worker}\u0000${event.file}`;
|
|
132
|
+
if (event.kind === "file-started")
|
|
133
|
+
started.set(key, event.at);
|
|
134
|
+
if (event.kind === "file-finished") {
|
|
135
|
+
const at = started.get(key);
|
|
136
|
+
if (at !== undefined)
|
|
137
|
+
durations.push({ file: event.file, ms: event.at - at });
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return durations.toSorted((a, b) => b.ms - a.ms).slice(0, SLOWEST_FILES);
|
|
141
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type AnyResourceConfig, type OwnFlags, type SettingsFile } from "../../config/index.ts";
|
|
2
|
+
import { type StormSetValues } from "../../resources.ts";
|
|
3
|
+
/** The Testserver pool resource's options as the command line gives them, each checked; one not given is absent. */
|
|
4
|
+
export type TestserverPoolFlagValues = NonNullable<StormSetValues["testserverPool"]>;
|
|
5
|
+
/** One of the Testserver pool resource's options. */
|
|
6
|
+
type TestserverPoolOption = keyof TestserverPoolFlagValues;
|
|
7
|
+
/** The request field of an option's flag: `testserver` and the option's name, such as `testserverMinTimeLeft`. */
|
|
8
|
+
type TestserverField<O extends string> = `testserver${Capitalize<O>}`;
|
|
9
|
+
/** An option's flag: its request field and its spelling, which Clinkr derives from the field. */
|
|
10
|
+
interface TestserverFlag<O extends string> {
|
|
11
|
+
readonly field: TestserverField<O>;
|
|
12
|
+
readonly flag: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Each Testserver pool option's flag, by option. An option the resource gains or loses fails to compile here until its
|
|
16
|
+
* flag follows; the run's request fields (`RUN_REQUEST_FIELDS`) declare each by hand, and the run's help names each
|
|
17
|
+
* flag.
|
|
18
|
+
*/
|
|
19
|
+
export declare const TESTSERVER_FLAGS: {
|
|
20
|
+
readonly [O in TestserverPoolOption]-?: TestserverFlag<O>;
|
|
21
|
+
};
|
|
22
|
+
/** What a run's request holds of the flags: each field, `undefined` when its flag wasn't given. */
|
|
23
|
+
export type TestserverFlagRequest = {
|
|
24
|
+
readonly [O in TestserverPoolOption as TestserverField<O>]?: unknown;
|
|
25
|
+
};
|
|
26
|
+
/** The key path of each option with a flag, with that flag, for `parseSetFlags`, which refuses them by the flag. */
|
|
27
|
+
export declare const TESTSERVER_OWN_FLAGS: OwnFlags;
|
|
28
|
+
/** A flag value its option's rule refuses, as `validate` reports it. */
|
|
29
|
+
export interface TestserverFlagProblem {
|
|
30
|
+
readonly field: string;
|
|
31
|
+
readonly message: string;
|
|
32
|
+
}
|
|
33
|
+
/** Each flag value in `request` its option's rule refuses, such as `--testserver-sandboxes` of 40. */
|
|
34
|
+
export declare function testserverFlagProblems(request: TestserverFlagRequest): readonly TestserverFlagProblem[];
|
|
35
|
+
/**
|
|
36
|
+
* The values `--set` gave, `sets`, with the Testserver pool options the flags in `request` gave. `--set` takes none of
|
|
37
|
+
* them, so nothing is overridden. Any flag gives the run the Testserver pool resource, as the file's section does.
|
|
38
|
+
*/
|
|
39
|
+
export declare function withTestserverFlags(sets: StormSetValues, request: TestserverFlagRequest): StormSetValues;
|
|
40
|
+
/** Where a held Testserver pool resource's `sandboxes` came from: its flag, the file's section, or its default. */
|
|
41
|
+
export type TestserverSandboxesSource = "flag" | "file" | "default";
|
|
42
|
+
/**
|
|
43
|
+
* Where the Testserver sandbox count of a run holding the Testserver pool resource came from: `--testserver-sandboxes`
|
|
44
|
+
* in `request`, else `resources.testserverPool.sandboxes` in `file`, else the option's default. `--set` takes no
|
|
45
|
+
* Testserver pool option, so these are the only sources.
|
|
46
|
+
*/
|
|
47
|
+
export declare function testserverSandboxesSource(request: TestserverFlagRequest, file: SettingsFile<readonly AnyResourceConfig[]>): TestserverSandboxesSource;
|
|
48
|
+
export {};
|