@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,84 @@
|
|
|
1
|
+
import { type TestResultOutput } from "../sdk/index.ts";
|
|
2
|
+
/**
|
|
3
|
+
* The most characters (UTF-16 code units) of a test's test output its final result keeps, the last ones: 8 MiB worth,
|
|
4
|
+
* room for any test's ordinary log output. The limit guards against a test that prints without end, since the reporter
|
|
5
|
+
* holds each running test's output in memory.
|
|
6
|
+
*/
|
|
7
|
+
export declare const OUTPUT_CHARS: number;
|
|
8
|
+
/** The most errors a test's final result keeps: the first ones. */
|
|
9
|
+
export declare const MAX_ERRORS = 5;
|
|
10
|
+
/** The most characters of an error's `message`, and of its `diff`, a final result keeps: the first ones. */
|
|
11
|
+
export declare const ERROR_TEXT_CHARS = 4000;
|
|
12
|
+
/** The most lines of an error's `stack` a final result keeps: the first ones. */
|
|
13
|
+
export declare const STACK_LINES = 30;
|
|
14
|
+
/** The parts of one of vitest's `TestError`s the reporter reads. */
|
|
15
|
+
export interface ReportedTestError {
|
|
16
|
+
readonly name?: string;
|
|
17
|
+
readonly message: string;
|
|
18
|
+
readonly stack?: string;
|
|
19
|
+
readonly diff?: string;
|
|
20
|
+
}
|
|
21
|
+
/** The parts of vitest's `TestCase` the reporter reads. */
|
|
22
|
+
export interface ReportedTestCase {
|
|
23
|
+
/** Vitest's id for the test, unique within a run. */
|
|
24
|
+
readonly id: string;
|
|
25
|
+
readonly fullName: string;
|
|
26
|
+
readonly module: {
|
|
27
|
+
readonly relativeModuleId: string;
|
|
28
|
+
};
|
|
29
|
+
result(): {
|
|
30
|
+
readonly state: string;
|
|
31
|
+
readonly errors?: ReadonlyArray<ReportedTestError> | undefined;
|
|
32
|
+
};
|
|
33
|
+
diagnostic(): {
|
|
34
|
+
readonly retryCount: number;
|
|
35
|
+
readonly flaky: boolean;
|
|
36
|
+
} | undefined;
|
|
37
|
+
}
|
|
38
|
+
/** The parts of vitest's `TestModule` the reporter reads. */
|
|
39
|
+
export interface ReportedTestModule {
|
|
40
|
+
readonly children: {
|
|
41
|
+
allTests(): Iterable<ReportedTestCase>;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The parts of vitest's `UserConsoleLog` the reporter reads: one console write, and the id of the task that was
|
|
46
|
+
* running when it was made, a test's, or a suite's or file's outside any test.
|
|
47
|
+
*/
|
|
48
|
+
export interface ReportedConsoleLog {
|
|
49
|
+
readonly content: string;
|
|
50
|
+
readonly taskId?: string | undefined;
|
|
51
|
+
}
|
|
52
|
+
/** A vitest reporter that appends each test's final result to the run payload's `testEvents` file. */
|
|
53
|
+
export interface StormReporter {
|
|
54
|
+
onUserConsoleLog(log: ReportedConsoleLog): void;
|
|
55
|
+
onTestCaseResult(testCase: ReportedTestCase): void;
|
|
56
|
+
onTestModuleEnd(testModule: ReportedTestModule): void;
|
|
57
|
+
onTestRunEnd(): void;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The reporter: once for each test, by its vitest id, appends a `test-result` event with its final state, how many
|
|
61
|
+
* times it was retried, whether it was flaky, the time, its errors and its test output. A test vitest ran is reported
|
|
62
|
+
* when its result is final; a test skipped without running, and every test of a file whose tests were all skipped,
|
|
63
|
+
* when its file ends.
|
|
64
|
+
*
|
|
65
|
+
* Test output is each console write vitest hands `onUserConsoleLog`, kept by the id of the task that made it, the
|
|
66
|
+
* last `OUTPUT_CHARS` per test with a count of the characters dropped before them (`keepLast`): the kept text starts
|
|
67
|
+
* at a line's start, unless its first line alone is longer than that. Vitest tags a write with the
|
|
68
|
+
* running test's id from the test's start until after its `onTestFailed` handlers, and sends it before the test's
|
|
69
|
+
* result, so a failure report printed from `onTestFailed` is the end of its test's output. A write tagged with a
|
|
70
|
+
* suite's or file's id, from a `beforeAll` or a file-scoped fixture's cleanup, belongs to no test and is dropped when
|
|
71
|
+
* the run ends. Errors are vitest's, the first `MAX_ERRORS`, each `message` and `diff` cut to `ERROR_TEXT_CHARS` and
|
|
72
|
+
* `stack` to `STACK_LINES` lines.
|
|
73
|
+
*
|
|
74
|
+
* Outside a storm run, or when the run payload names no test events file, it reports and keeps nothing; a test
|
|
75
|
+
* whose result can't be read is dropped; and once an append fails it drops every later result: reporting never fails
|
|
76
|
+
* a test.
|
|
77
|
+
*/
|
|
78
|
+
export declare function testResultReporter(env: Readonly<Record<string, string | undefined>>, append?: (path: string, text: string) => void, now?: () => number): StormReporter;
|
|
79
|
+
/**
|
|
80
|
+
* `output` with at most its last `limit` characters, cut at a line's start: past the cut, through the next `\n`, unless
|
|
81
|
+
* the cut already falls at a line's start or no `\n` with text after it lies past the cut, when it cuts mid-line.
|
|
82
|
+
* `droppedChars` adds every character cut.
|
|
83
|
+
*/
|
|
84
|
+
export declare function keepLast(output: TestResultOutput, limit: number): TestResultOutput;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
// Each test's final result, which a reporter in vitest's main process appends to the run payload's `testEvents` file
|
|
2
|
+
// as a `test-result` test event. Only the main process knows a test's final result: a worker sees each retry as an
|
|
3
|
+
// attempt, and never sees a test skipped before it runs. Nothing here imports vitest: the reporter's types are the
|
|
4
|
+
// parts of vitest's `TestCase` and `TestModule` it reads, so `config.ts` can export it into a `vitest.config.ts`.
|
|
5
|
+
import { appendFileSync } from "node:fs";
|
|
6
|
+
import { testEventLine } from "../sdk/index.js";
|
|
7
|
+
import { testEventsFile } from "./test-events.js";
|
|
8
|
+
/**
|
|
9
|
+
* The most characters (UTF-16 code units) of a test's test output its final result keeps, the last ones: 8 MiB worth,
|
|
10
|
+
* room for any test's ordinary log output. The limit guards against a test that prints without end, since the reporter
|
|
11
|
+
* holds each running test's output in memory.
|
|
12
|
+
*/
|
|
13
|
+
export const OUTPUT_CHARS = 8 * 1024 * 1024;
|
|
14
|
+
/** The most errors a test's final result keeps: the first ones. */
|
|
15
|
+
export const MAX_ERRORS = 5;
|
|
16
|
+
/** The most characters of an error's `message`, and of its `diff`, a final result keeps: the first ones. */
|
|
17
|
+
export const ERROR_TEXT_CHARS = 4000;
|
|
18
|
+
/** The most lines of an error's `stack` a final result keeps: the first ones. */
|
|
19
|
+
export const STACK_LINES = 30;
|
|
20
|
+
/**
|
|
21
|
+
* The reporter: once for each test, by its vitest id, appends a `test-result` event with its final state, how many
|
|
22
|
+
* times it was retried, whether it was flaky, the time, its errors and its test output. A test vitest ran is reported
|
|
23
|
+
* when its result is final; a test skipped without running, and every test of a file whose tests were all skipped,
|
|
24
|
+
* when its file ends.
|
|
25
|
+
*
|
|
26
|
+
* Test output is each console write vitest hands `onUserConsoleLog`, kept by the id of the task that made it, the
|
|
27
|
+
* last `OUTPUT_CHARS` per test with a count of the characters dropped before them (`keepLast`): the kept text starts
|
|
28
|
+
* at a line's start, unless its first line alone is longer than that. Vitest tags a write with the
|
|
29
|
+
* running test's id from the test's start until after its `onTestFailed` handlers, and sends it before the test's
|
|
30
|
+
* result, so a failure report printed from `onTestFailed` is the end of its test's output. A write tagged with a
|
|
31
|
+
* suite's or file's id, from a `beforeAll` or a file-scoped fixture's cleanup, belongs to no test and is dropped when
|
|
32
|
+
* the run ends. Errors are vitest's, the first `MAX_ERRORS`, each `message` and `diff` cut to `ERROR_TEXT_CHARS` and
|
|
33
|
+
* `stack` to `STACK_LINES` lines.
|
|
34
|
+
*
|
|
35
|
+
* Outside a storm run, or when the run payload names no test events file, it reports and keeps nothing; a test
|
|
36
|
+
* whose result can't be read is dropped; and once an append fails it drops every later result: reporting never fails
|
|
37
|
+
* a test.
|
|
38
|
+
*/
|
|
39
|
+
export function testResultReporter(env, append = (path, text) => appendFileSync(path, text), now = Date.now) {
|
|
40
|
+
const path = testEventsFile(env);
|
|
41
|
+
const reported = new Set();
|
|
42
|
+
const outputs = new Map();
|
|
43
|
+
let failed = false;
|
|
44
|
+
const report = (testCase) => {
|
|
45
|
+
if (path === undefined || failed || reported.has(testCase.id))
|
|
46
|
+
return;
|
|
47
|
+
let line;
|
|
48
|
+
try {
|
|
49
|
+
const result = testCase.result();
|
|
50
|
+
const state = resultState(result.state);
|
|
51
|
+
if (state === undefined)
|
|
52
|
+
return;
|
|
53
|
+
reported.add(testCase.id);
|
|
54
|
+
const diagnostic = testCase.diagnostic();
|
|
55
|
+
const held = outputs.get(testCase.id);
|
|
56
|
+
outputs.delete(testCase.id);
|
|
57
|
+
const output = held === undefined ? undefined : keepLast(held, OUTPUT_CHARS);
|
|
58
|
+
const errors = (result.errors ?? []).slice(0, MAX_ERRORS).map(resultError);
|
|
59
|
+
line = testEventLine({
|
|
60
|
+
kind: "test-result",
|
|
61
|
+
id: testCase.id,
|
|
62
|
+
file: testCase.module.relativeModuleId,
|
|
63
|
+
test: testCase.fullName,
|
|
64
|
+
state,
|
|
65
|
+
retryCount: diagnostic?.retryCount ?? 0,
|
|
66
|
+
flaky: diagnostic?.flaky ?? false,
|
|
67
|
+
at: now(),
|
|
68
|
+
...(errors.length > 0 ? { errors } : {}),
|
|
69
|
+
...(output === undefined ? {} : { output }),
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
// A test vitest can't describe is dropped alone.
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
try {
|
|
77
|
+
append(path, `${line}\n`);
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
failed = true;
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
return {
|
|
84
|
+
onUserConsoleLog: (log) => {
|
|
85
|
+
const { taskId, content } = log;
|
|
86
|
+
if (path === undefined || failed || taskId === undefined || reported.has(taskId))
|
|
87
|
+
return;
|
|
88
|
+
const held = outputs.get(taskId) ?? { text: "", droppedChars: 0 };
|
|
89
|
+
const grown = { text: held.text + content, droppedChars: held.droppedChars };
|
|
90
|
+
// Cut only once it holds twice the limit, so a test that prints without end isn't cut on every write; the
|
|
91
|
+
// result is cut to the limit.
|
|
92
|
+
outputs.set(taskId, grown.text.length > 2 * OUTPUT_CHARS ? keepLast(grown, OUTPUT_CHARS) : grown);
|
|
93
|
+
},
|
|
94
|
+
onTestCaseResult: report,
|
|
95
|
+
onTestModuleEnd: (testModule) => {
|
|
96
|
+
for (const testCase of testModule.children.allTests())
|
|
97
|
+
report(testCase);
|
|
98
|
+
},
|
|
99
|
+
onTestRunEnd: () => {
|
|
100
|
+
outputs.clear();
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
const NODE_DIFF_MODES = new Set(["simple", "full"]);
|
|
105
|
+
/** One of vitest's errors as a final result keeps it, cut to size. */
|
|
106
|
+
function resultError(error) {
|
|
107
|
+
const name = typeof error.name === "string" && error.name !== "" ? error.name : "Error";
|
|
108
|
+
// Vitest serializes what a test threw, which can be anything.
|
|
109
|
+
const raw = error.message;
|
|
110
|
+
const message = cut(typeof raw === "string" ? raw : String(raw), ERROR_TEXT_CHARS);
|
|
111
|
+
const stack = typeof error.stack === "string" ? cutLines(error.stack, STACK_LINES) : undefined;
|
|
112
|
+
// Node's `AssertionError` has a `diff` of its own, the mode `"simple"` or `"full"`, which vitest passes on when it
|
|
113
|
+
// made no diff.
|
|
114
|
+
const diff = typeof error.diff === "string" && !NODE_DIFF_MODES.has(error.diff) ? cut(error.diff, ERROR_TEXT_CHARS) : undefined;
|
|
115
|
+
return {
|
|
116
|
+
name,
|
|
117
|
+
message,
|
|
118
|
+
...(stack === undefined ? {} : { stack }),
|
|
119
|
+
...(diff === undefined ? {} : { diff }),
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
/** The first `max` characters of `text`, saying how many more it had. */
|
|
123
|
+
function cut(text, max) {
|
|
124
|
+
return text.length <= max ? text : `${text.slice(0, max)}… (${text.length - max} more characters)`;
|
|
125
|
+
}
|
|
126
|
+
/** The first `max` lines of `text`, saying how many more it had. */
|
|
127
|
+
function cutLines(text, max) {
|
|
128
|
+
const lines = text.split("\n");
|
|
129
|
+
return lines.length <= max ? text : `${lines.slice(0, max).join("\n")}\n… (${lines.length - max} more lines)`;
|
|
130
|
+
}
|
|
131
|
+
/** A vitest test result's state as a test event reports it; undefined while the test is still pending. */
|
|
132
|
+
function resultState(state) {
|
|
133
|
+
switch (state) {
|
|
134
|
+
case "passed":
|
|
135
|
+
return "pass";
|
|
136
|
+
case "failed":
|
|
137
|
+
return "fail";
|
|
138
|
+
case "skipped":
|
|
139
|
+
return "skip";
|
|
140
|
+
default:
|
|
141
|
+
return undefined;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* `output` with at most its last `limit` characters, cut at a line's start: past the cut, through the next `\n`, unless
|
|
146
|
+
* the cut already falls at a line's start or no `\n` with text after it lies past the cut, when it cuts mid-line.
|
|
147
|
+
* `droppedChars` adds every character cut.
|
|
148
|
+
*/
|
|
149
|
+
export function keepLast(output, limit) {
|
|
150
|
+
const { text } = output;
|
|
151
|
+
if (text.length <= limit)
|
|
152
|
+
return output;
|
|
153
|
+
let cut = text.length - limit;
|
|
154
|
+
if (text[cut - 1] !== "\n") {
|
|
155
|
+
const end = text.indexOf("\n", cut);
|
|
156
|
+
if (end !== -1 && end < text.length - 1)
|
|
157
|
+
cut = end + 1;
|
|
158
|
+
}
|
|
159
|
+
return { text: text.slice(cut), droppedChars: output.droppedChars + cut };
|
|
160
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { TestAPI } from "vitest";
|
|
2
|
+
import type { Container, ContainerProxy, FeatureFlags, Seeder, TestserverServiceId } from "../sdk/index.ts";
|
|
3
|
+
import type { ContainerScope } from "./container-scope.ts";
|
|
4
|
+
/** The adapter's fixtures set up once per worker. */
|
|
5
|
+
export interface StormWorkerFixtures {
|
|
6
|
+
/** This worker's Testserver sandbox, `sandboxes[(VITEST_POOL_ID - 1) % N]` of the run payload's Testserver pool. */
|
|
7
|
+
testserverUrl: string;
|
|
8
|
+
/** Whether the run is verbose (its `--verbose`). */
|
|
9
|
+
verbose: boolean;
|
|
10
|
+
}
|
|
11
|
+
/** The adapter's fixtures set up for each test. */
|
|
12
|
+
export interface StormTestFixtures {
|
|
13
|
+
/** How long `container` lives: `'file'` (the default) or `'test'`, set with `test.override`. */
|
|
14
|
+
containerScope: ContainerScope;
|
|
15
|
+
/**
|
|
16
|
+
* The Testserver services to warm in each new container before a test gets it; by default none. Set it with
|
|
17
|
+
* `.override("warmServices", [...])` on a suite's `test`, or `test.override({ warmServices: [...] })`.
|
|
18
|
+
*/
|
|
19
|
+
warmServices: readonly TestserverServiceId[];
|
|
20
|
+
/**
|
|
21
|
+
* The feature flags each new container's services read, by flag client, such as
|
|
22
|
+
* `{ all: { "env-var-config-secret-ui": true } }`; by default `{}`, none. Set it with `.override("featureFlags",
|
|
23
|
+
* {...})` on a suite's `test`, or `test.override({ featureFlags })`. A value replaces the whole object, never merges
|
|
24
|
+
* into it: to add flags to a suite's default, spread it. In `'file'` scope, a test whose feature flags differ from
|
|
25
|
+
* those of the file's container ends it and gets a new one.
|
|
26
|
+
*/
|
|
27
|
+
featureFlags: FeatureFlags;
|
|
28
|
+
/** The file's container in `'file'` scope, or the test's own in `'test'` scope. */
|
|
29
|
+
container: Container;
|
|
30
|
+
/** A `Seeder` over `container`. */
|
|
31
|
+
seed: Seeder;
|
|
32
|
+
/** A proxy adding `container`'s test id, closed after the test. */
|
|
33
|
+
proxy: ContainerProxy;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The fixtures a test of the adapter's `test` can ask for. The adapter's own fixtures for its state and test events
|
|
37
|
+
* exist at run time too, but aren't named here: tests don't use them.
|
|
38
|
+
*/
|
|
39
|
+
export interface StormContext extends StormWorkerFixtures, StormTestFixtures {
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* A suite's own fixtures by scope, keyed as in vitest's object-form `test.extend<{ $worker?, $file?, $test? }>`.
|
|
43
|
+
*/
|
|
44
|
+
export interface StormScopes {
|
|
45
|
+
$worker?: object;
|
|
46
|
+
$file?: object;
|
|
47
|
+
$test?: object;
|
|
48
|
+
}
|
|
49
|
+
/** The fixtures `F` names for scope `K`, or `object` when it names none. */
|
|
50
|
+
type ScopeOf<F extends StormScopes, K extends keyof StormScopes> = K extends keyof F ? [Exclude<F[K], undefined>] extends [never] ? object : Exclude<F[K], undefined> : object;
|
|
51
|
+
/**
|
|
52
|
+
* The type of the adapter's `test`, or of a suite's `test` that extends it with its own fixtures, by scope:
|
|
53
|
+
*
|
|
54
|
+
* ```ts
|
|
55
|
+
* export const test: StormTest<{ $test: { vercel: VercelCli } }> = storm.extend("vercel", ...);
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* `$__worker`, `$__file` and `$__test` are the markers vitest's builder `extend` reads to tell a later fixture which
|
|
59
|
+
* fixtures its scope can see. vitest doesn't export the types that write them, so this is the one place storm
|
|
60
|
+
* names them; `test/unit/vitest/test-types.test.ts` pins them, so a vitest release that changes them fails
|
|
61
|
+
* storm's checks rather than a suite's.
|
|
62
|
+
*/
|
|
63
|
+
export type StormTest<F extends StormScopes = StormScopes> = TestAPI<StormContext & ScopeOf<F, "$worker"> & ScopeOf<F, "$file"> & ScopeOf<F, "$test"> & {
|
|
64
|
+
readonly $__worker?: StormWorkerFixtures & ScopeOf<F, "$worker">;
|
|
65
|
+
readonly $__file?: ScopeOf<F, "$file">;
|
|
66
|
+
readonly $__test?: StormTestFixtures & ScopeOf<F, "$test">;
|
|
67
|
+
}>;
|
|
68
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// The published types of the Vitest adapter's `test`: the fixtures it names and `StormTest`, the type of a
|
|
2
|
+
// suite's `test` that extends it. Types only; it imports nothing from `./fixtures.ts`, so a module that names a
|
|
3
|
+
// fixture type doesn't extend vitest's `test`.
|
|
4
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,9 +1,125 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cnc-tools/storm",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.6.0",
|
|
4
|
+
"description": "Run a command against Vercel Testserver sandboxes",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/vercel-labs/cnc.git"
|
|
7
|
+
"url": "git+https://github.com/vercel-labs/cnc.git",
|
|
8
|
+
"directory": "tools/storm/ts"
|
|
9
|
+
},
|
|
10
|
+
"bin": {
|
|
11
|
+
"storm": "./bin/storm.js"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"bin",
|
|
15
|
+
"dist",
|
|
16
|
+
"skills"
|
|
17
|
+
],
|
|
18
|
+
"type": "module",
|
|
19
|
+
"typesVersions": {
|
|
20
|
+
"*": {
|
|
21
|
+
"config": [
|
|
22
|
+
"./dist/config-file/define.d.ts"
|
|
23
|
+
],
|
|
24
|
+
"testserver": [
|
|
25
|
+
"./dist/resources/testserver/resource.d.ts"
|
|
26
|
+
],
|
|
27
|
+
"github": [
|
|
28
|
+
"./dist/resources/github/resource.d.ts"
|
|
29
|
+
],
|
|
30
|
+
"sdk": [
|
|
31
|
+
"./dist/sdk/index.d.ts"
|
|
32
|
+
],
|
|
33
|
+
"vitest": [
|
|
34
|
+
"./dist/vitest/index.d.ts"
|
|
35
|
+
],
|
|
36
|
+
"vitest/config": [
|
|
37
|
+
"./dist/vitest/config.d.ts"
|
|
38
|
+
],
|
|
39
|
+
"vitest/plan": [
|
|
40
|
+
"./dist/vitest/plan.d.ts"
|
|
41
|
+
],
|
|
42
|
+
"story": [
|
|
43
|
+
"./dist/story/index.d.ts"
|
|
44
|
+
],
|
|
45
|
+
"vercel-cli": [
|
|
46
|
+
"./dist/vercel-cli/index.d.ts"
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"exports": {
|
|
51
|
+
"./config": {
|
|
52
|
+
"types": "./dist/config-file/define.d.ts",
|
|
53
|
+
"import": "./dist/config-file/define.js"
|
|
54
|
+
},
|
|
55
|
+
"./testserver": {
|
|
56
|
+
"types": "./dist/resources/testserver/resource.d.ts",
|
|
57
|
+
"import": "./dist/resources/testserver/resource.js"
|
|
58
|
+
},
|
|
59
|
+
"./github": {
|
|
60
|
+
"types": "./dist/resources/github/resource.d.ts",
|
|
61
|
+
"import": "./dist/resources/github/resource.js"
|
|
62
|
+
},
|
|
63
|
+
"./sdk": {
|
|
64
|
+
"types": "./dist/sdk/index.d.ts",
|
|
65
|
+
"import": "./dist/sdk/index.js"
|
|
66
|
+
},
|
|
67
|
+
"./vitest": {
|
|
68
|
+
"types": "./dist/vitest/index.d.ts",
|
|
69
|
+
"import": "./dist/vitest/index.js"
|
|
70
|
+
},
|
|
71
|
+
"./vitest/config": {
|
|
72
|
+
"types": "./dist/vitest/config.d.ts",
|
|
73
|
+
"import": "./dist/vitest/config.js"
|
|
74
|
+
},
|
|
75
|
+
"./vitest/plan": {
|
|
76
|
+
"types": "./dist/vitest/plan.d.ts",
|
|
77
|
+
"import": "./dist/vitest/plan.js"
|
|
78
|
+
},
|
|
79
|
+
"./story": {
|
|
80
|
+
"types": "./dist/story/index.d.ts",
|
|
81
|
+
"import": "./dist/story/index.js"
|
|
82
|
+
},
|
|
83
|
+
"./vercel-cli": {
|
|
84
|
+
"types": "./dist/vercel-cli/index.d.ts",
|
|
85
|
+
"import": "./dist/vercel-cli/index.js"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"publishConfig": {
|
|
89
|
+
"access": "public",
|
|
90
|
+
"registry": "https://registry.npmjs.org/"
|
|
91
|
+
},
|
|
92
|
+
"dependencies": {
|
|
93
|
+
"@cnc-tools/cli-kit": "^0.3.2",
|
|
94
|
+
"@vercel/clinkr": "npm:clinkr@^0.8.2",
|
|
95
|
+
"@vercel/sandbox": "3.9.0",
|
|
96
|
+
"zod": "^4.6.5"
|
|
97
|
+
},
|
|
98
|
+
"devDependencies": {
|
|
99
|
+
"@types/node": "^24.19.1",
|
|
100
|
+
"@xterm/headless": "^6.0.0",
|
|
101
|
+
"typescript": "^7.0.2",
|
|
102
|
+
"typescript-5": "npm:typescript@5.9.3",
|
|
103
|
+
"vitest": "4.1.10"
|
|
104
|
+
},
|
|
105
|
+
"peerDependencies": {
|
|
106
|
+
"vitest": "^4.1.10"
|
|
107
|
+
},
|
|
108
|
+
"peerDependenciesMeta": {
|
|
109
|
+
"vitest": {
|
|
110
|
+
"optional": true
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"engines": {
|
|
114
|
+
"node": ">=22.19.0"
|
|
115
|
+
},
|
|
116
|
+
"scripts": {
|
|
117
|
+
"build": "tsc -p tsconfig.build.json && node scripts/write-build-info.js",
|
|
118
|
+
"typecheck": "tsc --noEmit && tsc -p tsconfig.sdk.json",
|
|
119
|
+
"test": "pnpm run test:default && pnpm run test:integration",
|
|
120
|
+
"test:default": "vitest run --project default --project sanity",
|
|
121
|
+
"test:integration": "vitest run --project integration --passWithNoTests",
|
|
122
|
+
"test:testserver": "node bin/storm.js vitest --local --testserver-sandboxes 2 -- --project testserver",
|
|
123
|
+
"live:runner": "node scripts/live/runner-checks.ts"
|
|
8
124
|
}
|
|
9
125
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: overview
|
|
3
|
+
description: Start here. What a run, a run id, a run directory, test output and a run log are, and how the storm commands fit together.
|
|
4
|
+
commands: all
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Overview
|
|
8
|
+
|
|
9
|
+
`storm vitest` runs vitest, in a runner sandbox or on this machine. First, it counts the tests on this machine. With a Testserver side, it gives vitest Vercel Testserver sandboxes, one for each 4 test files, at most 8. `storm exec` runs a different command, such as `pnpm test`, in the same way, but it does not count tests. After the run, the `runs` commands read the run back on this machine.
|
|
10
|
+
|
|
11
|
+
## Concepts
|
|
12
|
+
|
|
13
|
+
- A **run** is one `storm vitest` or one `storm exec`. It runs one command: `vitest run` for `storm vitest`, the command after `--` for `storm exec`.
|
|
14
|
+
- A **runner run** runs the command in a **runner sandbox**, a Vercel Sandbox. This is the default.
|
|
15
|
+
- A **local run** runs the command on this machine. Add `--local` to make a local run.
|
|
16
|
+
- A **run id** is the name of a run, such as `20261103T192655-8277`. It is the start time of the run in UTC and a short suffix. `storm vitest` and `storm exec` print it at the end, in the `logs` line. With `--json`, the result gives it as `runId`.
|
|
17
|
+
- A **run directory** is the directory where a run writes what it did, on the machine that started the run. This is true for a runner run and for a local run. Its name is the run id. Do not read its files directly. Use the `runs` commands.
|
|
18
|
+
- A run is **active** while it goes on. A run is **finished** when it has ended and saved its test results. `runs show` shows test results only for a finished run.
|
|
19
|
+
- A **test result** is the final result of one test: `pass`, `fail` or `skip`, with its errors. The command saves test results only with the Vitest adapter's `stormReporter`.
|
|
20
|
+
- **Test output** is what one test printed to the console, stdout and stderr together. storm keeps the last 8 MiB of the test output of each test. `droppedChars` counts the characters that storm did not keep.
|
|
21
|
+
- A **run log** is a log in the run directory. The **command log** (`command`) holds all the output of the command. It also holds output that no test owns: output from a `beforeAll`, a global setup, a raw `process.stdout.write`, or a child process. A **step log** (`install`, `build`, `apply`, `snapshot`) holds the output of one step of a runner run.
|
|
22
|
+
|
|
23
|
+
## Commands
|
|
24
|
+
|
|
25
|
+
- `storm vitest [<vitest run args>...] [-- <vitest dash options>...]` counts the tests, then runs `vitest run` with the arguments. Put the dash options of vitest, such as `-t` or `--project`, after `--`.
|
|
26
|
+
- `storm exec -- <command>` runs a different command. It does not count tests.
|
|
27
|
+
- `storm runs list --json` lists the recent runs.
|
|
28
|
+
- `storm runs show <run-id> --json` shows a run, its test results, and with `--failed` or `--test` the errors and test output of tests.
|
|
29
|
+
- `storm runs logs <run-id>` prints a run log.
|
|
30
|
+
|
|
31
|
+
## Other skills
|
|
32
|
+
|
|
33
|
+
- To read the output and the errors of a run, run `storm skills get read-run-output`.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: read-run-output
|
|
3
|
+
description: Find a run, then read its failed tests, the output of one test, its command log and its step logs, while it goes or after it ends.
|
|
4
|
+
commands: [runs list, runs show, runs logs]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Read the output of a run
|
|
8
|
+
|
|
9
|
+
Use this skill to find out what a test printed, why a test failed, or what the command printed outside the tests.
|
|
10
|
+
|
|
11
|
+
## 1. Find the run id
|
|
12
|
+
|
|
13
|
+
1. If you started the run, read the run id from the `logs` line at the end of its output. With `--json`, read `runId` in the result.
|
|
14
|
+
2. If you do not have the run id, run `storm runs list --json`.
|
|
15
|
+
3. Read `runs`. The newest run is first. Read `id`, `argv`, `active` and `ended` of each run to find the run.
|
|
16
|
+
4. If `runs` is empty, the runs of this `storm.config.ts` are not on this machine. Run `storm runs list --all --json`.
|
|
17
|
+
|
|
18
|
+
Use the run id in each command below. Do not use a command without a run id when another run can start: it uses the newest run.
|
|
19
|
+
|
|
20
|
+
## 2. Read the failed tests
|
|
21
|
+
|
|
22
|
+
1. Run `storm runs show <run-id> --failed --json`.
|
|
23
|
+
2. If `finished` is `false`, the run is still active, or it stopped before it saved its test results. Go to step 4.
|
|
24
|
+
3. Read `tests`. For each test where `selected` is `true`, read these fields:
|
|
25
|
+
- `errors`: each error has `name`, `message`, `stack` and `diff`.
|
|
26
|
+
- `output.text`: the test output. It ends with the failure report that the test printed.
|
|
27
|
+
- `output.droppedChars`: if this is more than 0, storm did not keep the start of the test output. Read the command log in step 4.
|
|
28
|
+
4. If `ended.testsIncomplete` is not `null`, the run did not get all its test results. Read the command log in step 4.
|
|
29
|
+
|
|
30
|
+
## 3. Read the output of one test
|
|
31
|
+
|
|
32
|
+
1. Run `storm runs show <run-id> --test <TEXT> --json`. Use a part of the name or the file of the test as `<TEXT>`.
|
|
33
|
+
2. Read `output.text` of each test where `selected` is `true`. A passing test has test output too.
|
|
34
|
+
3. If `output` is `null`, the test printed nothing in its test output. Its output can be in the command log. Go to step 4.
|
|
35
|
+
|
|
36
|
+
## 4. Read output that no test owns
|
|
37
|
+
|
|
38
|
+
The command log holds all the output of the command. Output from a `beforeAll`, a global setup, a raw `process.stdout.write`, or a child process is only in the command log.
|
|
39
|
+
|
|
40
|
+
1. Run `storm runs logs <run-id> | grep <TEXT>`.
|
|
41
|
+
2. To read all of it, run `storm runs logs <run-id>`.
|
|
42
|
+
|
|
43
|
+
## 5. Read the log of a step that failed
|
|
44
|
+
|
|
45
|
+
In a runner run, storm installs and builds before it runs the command.
|
|
46
|
+
|
|
47
|
+
1. Run `storm runs show <run-id> --json`. Read `logs`. Each item has `step` and `path`.
|
|
48
|
+
2. Run `storm runs logs <run-id> --step <step>`, for example `--step install` or `--step build`.
|
|
49
|
+
|
|
50
|
+
## 6. Run one test again in the runner sandbox
|
|
51
|
+
|
|
52
|
+
A runner run can keep its runner sandbox running after it ends.
|
|
53
|
+
|
|
54
|
+
1. Run `storm runs show <run-id> --json`.
|
|
55
|
+
2. Read `where.keptMinutesLeft`. If it is `null` or 0, the runner sandbox is not running. Start a new run with `storm vitest` or `storm exec`.
|
|
56
|
+
3. Read `where.sandboxUrl`. Give a person the Connect page, `<sandboxUrl>/connect`. In it, a person can run one test again.
|
|
57
|
+
|
|
58
|
+
## When a command fails
|
|
59
|
+
|
|
60
|
+
Read `reason` in the error document.
|
|
61
|
+
|
|
62
|
+
- `no_runs`: the scope has no run. Run `storm runs list --all --json`, then use a run id.
|
|
63
|
+
- `run_not_found`: no run has this run id on this machine. Run `storm runs list --all --json`. Do not guess a run id.
|
|
64
|
+
- `log_not_found`: the run has no log for this step. Read `data.logs`. Use one of these steps, or do not use `--step`.
|
|
65
|
+
- `runs_unreadable`: storm cannot read the run directories. Read `data.path` and `data.message`, and tell a person.
|
package/README.md
DELETED