@cnc-tools/storm 0.9.0 → 0.10.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/storm.js +11 -13
- package/dist/application.d.ts +18 -10
- package/dist/application.js +13 -12
- package/dist/bin/storm.js +102 -42
- package/dist/build-info.js +1 -1
- package/dist/chunks/chunk-AGWW3HDT.js +2559 -0
- package/dist/chunks/chunk-AKKNF3WZ.js +2023 -0
- package/dist/chunks/chunk-H2VCSNVU.js +351 -0
- package/dist/chunks/chunk-I5GZLOLQ.js +38 -0
- package/dist/chunks/chunk-J6ZNYUDV.js +21 -0
- package/dist/chunks/chunk-JQ2HK4RN.js +425 -0
- package/dist/chunks/chunk-OVXD7GES.js +841 -0
- package/dist/chunks/chunk-VJQLMGOH.js +4716 -0
- package/dist/chunks/chunk-WF4KJ7YG.js +431 -0
- package/dist/chunks/chunk-XHJGHJBW.js +1509 -0
- package/dist/chunks/chunk-YF3ICDBY.js +10 -0
- package/dist/chunks/chunk-ZJ2USLAT.js +4420 -0
- package/dist/chunks/live-app-RIJM3QFD.js +97 -0
- package/dist/chunks/version-X7RMSKZI.js +12 -0
- package/dist/command-tree.d.ts +3 -0
- package/dist/command-tree.js +3 -0
- package/dist/commands/dashboard.d.ts +1 -1
- package/dist/commands/dashboard.js +1 -1
- package/dist/commands/exec/cleanup.d.ts +27 -43
- package/dist/commands/exec/cleanup.js +20 -54
- package/dist/commands/exec/command.d.ts +72 -544
- package/dist/commands/exec/command.js +69 -22
- package/dist/commands/exec/job-summary.d.ts +2 -2
- package/dist/commands/exec/job-summary.js +3 -3
- package/dist/commands/exec/live-view.d.ts +9 -9
- package/dist/commands/exec/live-view.js +48 -41
- package/dist/commands/exec/metadata.d.ts +0 -65
- package/dist/commands/exec/metadata.js +7 -58
- package/dist/commands/exec/mint-failed.d.ts +1 -1
- package/dist/commands/exec/mint-failed.js +8 -8
- package/dist/commands/exec/outcomes.d.ts +63 -468
- package/dist/commands/exec/outcomes.js +42 -69
- package/dist/commands/exec/plan-run.d.ts +150 -0
- package/dist/commands/exec/plan-run.js +121 -0
- package/dist/commands/exec/progress.d.ts +25 -15
- package/dist/commands/exec/progress.js +61 -40
- package/dist/commands/exec/redaction.d.ts +3 -3
- package/dist/commands/exec/redaction.js +4 -4
- package/dist/commands/exec/resource-flags.d.ts +50 -0
- package/dist/commands/exec/resource-flags.js +125 -0
- package/dist/commands/exec/resource-refusals.d.ts +64 -0
- package/dist/commands/exec/resource-refusals.js +58 -0
- package/dist/commands/exec/run-collector.d.ts +15 -10
- package/dist/commands/exec/run-collector.js +5 -5
- package/dist/commands/exec/run-command.d.ts +80 -165
- package/dist/commands/exec/run-command.js +264 -275
- package/dist/commands/exec/run-metadata.d.ts +20 -43
- package/dist/commands/exec/run-metadata.js +18 -37
- package/dist/commands/exec/run-record.d.ts +67 -58
- package/dist/commands/exec/run-record.js +15 -32
- package/dist/commands/exec/test-plan.d.ts +45 -0
- package/dist/commands/exec/test-plan.js +59 -0
- package/dist/commands/exec/tests-summary.d.ts +5 -5
- package/dist/commands/exec/tests-summary.js +2 -2
- package/dist/commands/exec/text.d.ts +8 -2
- package/dist/commands/exec/text.js +8 -0
- package/dist/commands/exec/timeline-facts.d.ts +57 -0
- package/dist/commands/exec/timeline-facts.js +92 -0
- package/dist/commands/exec/view.d.ts +5 -7
- package/dist/commands/exec/view.js +21 -13
- package/dist/commands/exec/waterfall.d.ts +2 -9
- package/dist/commands/exec/waterfall.js +9 -30
- package/dist/commands/exec/worker-chart.d.ts +1 -1
- package/dist/commands/ext/metadata.d.ts +4 -0
- package/dist/commands/ext/metadata.js +8 -0
- package/dist/commands/runs/facts.d.ts +9 -5
- package/dist/commands/runs/facts.js +26 -14
- package/dist/commands/runs/list/command.d.ts +15 -8
- package/dist/commands/runs/list/command.js +142 -33
- package/dist/commands/runs/list/metadata.d.ts +16 -14
- package/dist/commands/runs/list/metadata.js +21 -15
- package/dist/commands/runs/list/outcomes.d.ts +6 -2
- package/dist/commands/runs/logs/command.d.ts +3 -4
- package/dist/commands/runs/logs/command.js +135 -49
- package/dist/commands/runs/logs/metadata.d.ts +17 -15
- package/dist/commands/runs/logs/metadata.js +23 -17
- package/dist/commands/runs/metadata.js +6 -2
- package/dist/commands/runs/past-run.d.ts +3 -9
- package/dist/commands/runs/past-run.js +2 -17
- package/dist/commands/runs/show/command.d.ts +57 -42
- package/dist/commands/runs/show/command.js +404 -74
- package/dist/commands/runs/show/metadata.d.ts +20 -18
- package/dist/commands/runs/show/metadata.js +23 -17
- package/dist/commands/runs/show/outcomes.d.ts +27 -19
- package/dist/commands/runs/show/outcomes.js +8 -6
- package/dist/commands/vitest/command.d.ts +94 -559
- package/dist/commands/vitest/command.js +176 -132
- package/dist/commands/vitest/metadata.d.ts +0 -65
- package/dist/commands/vitest/metadata.js +7 -38
- package/dist/commands/vitest/outcomes.d.ts +44 -274
- package/dist/commands/vitest/outcomes.js +7 -14
- package/dist/config/credential-resolver.d.ts +131 -0
- package/dist/config/credential-resolver.js +69 -0
- package/dist/{credential/settle.d.ts → config/credential-settle.d.ts} +1 -2
- package/dist/config/errors.d.ts +1 -1
- package/dist/config/errors.js +5 -5
- package/dist/config/index.d.ts +7 -6
- package/dist/config/index.js +13 -9
- package/dist/config/load.d.ts +16 -13
- package/dist/config/load.js +55 -40
- package/dist/config/recipe-run.d.ts +26 -0
- package/dist/config/recipe-run.js +27 -0
- package/dist/config/resolve.d.ts +103 -15
- package/dist/config/resolve.js +137 -47
- package/dist/config/resolver.d.ts +40 -0
- package/dist/config/resolver.js +31 -0
- package/dist/config/schema.d.ts +13 -17
- package/dist/config/schema.js +14 -35
- package/dist/config/settings-file.d.ts +28 -16
- package/dist/config/settings-file.js +39 -24
- package/dist/config/typed-options.d.ts +21 -0
- package/dist/config/typed-options.js +28 -0
- package/dist/config-file/define.d.ts +33 -31
- package/dist/config-file/define.js +14 -4
- package/dist/config-file/toolchain.d.ts +1 -1
- package/dist/context.d.ts +37 -24
- package/dist/context.js +16 -8
- package/dist/core/before-run.d.ts +37 -0
- package/dist/core/before-run.js +44 -0
- package/dist/core/events.d.ts +55 -46
- package/dist/core/gateways.d.ts +17 -18
- package/dist/core/index.d.ts +12 -12
- package/dist/core/index.js +12 -8
- package/dist/core/launcher-supplies.d.ts +11 -0
- package/dist/core/launcher-supplies.js +28 -0
- package/dist/core/mint.js +2 -2
- package/dist/core/payload.d.ts +13 -14
- package/dist/core/payload.js +9 -8
- package/dist/core/presentations.d.ts +37 -37
- package/dist/core/presentations.js +49 -56
- package/dist/core/reports.d.ts +5 -0
- package/dist/core/reports.js +13 -0
- package/dist/core/resource-registry.d.ts +54 -0
- package/dist/core/resource-registry.js +57 -0
- package/dist/core/resource-reports.d.ts +36 -0
- package/dist/core/resource-reports.js +38 -0
- package/dist/core/resource.d.ts +135 -243
- package/dist/core/resource.js +7 -5
- package/dist/core/resources-of.d.ts +16 -0
- package/dist/core/resources-of.js +8 -0
- package/dist/core/resources.d.ts +96 -84
- package/dist/core/resources.js +168 -165
- package/dist/core/run-directory.d.ts +10 -11
- package/dist/core/run-directory.js +9 -9
- package/dist/core/run-state.d.ts +29 -41
- package/dist/core/run-state.js +56 -60
- package/dist/core/run.d.ts +77 -66
- package/dist/core/run.js +83 -74
- package/dist/core/state-directory.js +4 -3
- package/dist/core/timeline.d.ts +42 -24
- package/dist/core/timeline.js +45 -27
- package/dist/core/timing.d.ts +3 -3
- package/dist/core/timing.js +1 -1
- package/dist/credential/gateways.d.ts +1 -80
- package/dist/credential/index.d.ts +3 -5
- package/dist/credential/index.js +7 -5
- package/dist/credential/live/github-actions-token-response.js +1 -1
- package/dist/credential/live/vercel-cli-gateway.d.ts +2 -1
- package/dist/credential/live/vercel-cli-gateway.js +1 -1
- package/dist/credential/live/vercel-output.d.ts +1 -1
- package/dist/credential/source.d.ts +16 -59
- package/dist/credential/source.js +21 -7
- package/dist/credential/target.d.ts +1 -1
- package/dist/extension-commands.d.ts +14 -0
- package/dist/extension-commands.js +20 -0
- package/dist/extensions/github/definition.d.ts +26 -0
- package/dist/extensions/github/definition.js +29 -0
- package/dist/extensions/github/extension.d.ts +18 -0
- package/dist/extensions/github/extension.js +6 -0
- package/dist/{resources → extensions}/github/fixture-repo.d.ts +11 -8
- package/dist/{resources → extensions}/github/fixture-repo.js +8 -4
- package/dist/extensions/github/index.d.ts +13 -0
- package/dist/extensions/github/index.js +17 -0
- package/dist/extensions/github/lifecycle.d.ts +30 -0
- package/dist/extensions/github/lifecycle.js +69 -0
- package/dist/extensions/github/live/world.d.ts +6 -0
- package/dist/extensions/github/live/world.js +16 -0
- package/dist/extensions/github/options.d.ts +36 -0
- package/dist/extensions/github/options.js +36 -0
- package/dist/extensions/github/refusals.d.ts +32 -0
- package/dist/extensions/github/refusals.js +43 -0
- package/dist/extensions/github/release.d.ts +17 -0
- package/dist/extensions/github/release.js +34 -0
- package/dist/extensions/github/resource.d.ts +36 -0
- package/dist/extensions/github/resource.js +21 -0
- package/dist/extensions/github/run/payload.d.ts +27 -0
- package/dist/extensions/github/run/payload.js +42 -0
- package/dist/extensions/github/world.d.ts +15 -0
- package/dist/extensions/github/world.js +3 -0
- package/dist/extensions/testserver/canceled.d.ts +7 -0
- package/dist/extensions/testserver/canceled.js +27 -0
- package/dist/extensions/testserver/command-tree.d.ts +6 -0
- package/dist/extensions/testserver/command-tree.js +21 -0
- package/dist/extensions/testserver/commands/app.d.ts +22 -0
- package/dist/extensions/testserver/commands/app.js +5 -0
- package/dist/{resources/testserver/commands → extensions/testserver/commands/pool}/create/command.d.ts +277 -237
- package/dist/extensions/testserver/commands/pool/create/command.js +352 -0
- package/dist/extensions/testserver/commands/pool/create/metadata.d.ts +33 -0
- package/dist/extensions/testserver/commands/pool/create/metadata.js +55 -0
- package/dist/{resources/testserver/commands → extensions/testserver/commands/pool}/create/outcomes.d.ts +132 -112
- package/dist/{resources/testserver/commands → extensions/testserver/commands/pool}/create/outcomes.js +6 -24
- package/dist/{resources/testserver/commands → extensions/testserver/commands/pool}/list/command.d.ts +3 -4
- package/dist/extensions/testserver/commands/pool/list/command.js +203 -0
- package/dist/extensions/testserver/commands/pool/list/metadata.d.ts +11 -0
- package/dist/extensions/testserver/commands/pool/list/metadata.js +15 -0
- package/dist/{resources/testserver/commands → extensions/testserver/commands/pool}/list/outcomes.js +1 -1
- package/dist/extensions/testserver/commands/pool/metadata.d.ts +3 -0
- package/dist/extensions/testserver/commands/pool/metadata.js +7 -0
- package/dist/extensions/testserver/commands/tree.d.ts +2 -0
- package/dist/extensions/testserver/commands/tree.js +6 -0
- package/dist/{resources → extensions}/testserver/credential-facts.d.ts +6 -40
- package/dist/{resources → extensions}/testserver/credential-facts.js +13 -35
- package/dist/extensions/testserver/definition.d.ts +57 -0
- package/dist/extensions/testserver/definition.js +71 -0
- package/dist/{resources → extensions}/testserver/events.d.ts +5 -4
- package/dist/extensions/testserver/events.js +4 -0
- package/dist/extensions/testserver/extension.d.ts +46 -0
- package/dist/extensions/testserver/extension.js +68 -0
- package/dist/extensions/testserver/index.d.ts +20 -0
- package/dist/extensions/testserver/index.js +31 -0
- package/dist/extensions/testserver/lifecycle.d.ts +24 -0
- package/dist/extensions/testserver/lifecycle.js +116 -0
- package/dist/{core → extensions/testserver}/limit.js +1 -0
- package/dist/extensions/testserver/live/world.d.ts +8 -0
- package/dist/extensions/testserver/live/world.js +38 -0
- package/dist/{resources/testserver/sandbox → extensions/testserver/options}/channels.d.ts +1 -1
- package/dist/extensions/testserver/options/index.d.ts +5 -0
- package/dist/extensions/testserver/options/index.js +11 -0
- package/dist/extensions/testserver/options/rules.d.ts +69 -0
- package/dist/extensions/testserver/options/rules.js +92 -0
- package/dist/extensions/testserver/options/sandboxes.d.ts +29 -0
- package/dist/extensions/testserver/options/sandboxes.js +33 -0
- package/dist/extensions/testserver/options/ttl.d.ts +23 -0
- package/dist/extensions/testserver/options/ttl.js +42 -0
- package/dist/{resources → extensions}/testserver/pool/channels.d.ts +3 -3
- package/dist/{resources → extensions}/testserver/pool/channels.js +2 -2
- package/dist/{resources → extensions}/testserver/pool/create.d.ts +1 -2
- package/dist/{resources → extensions}/testserver/pool/create.js +2 -1
- package/dist/{resources → extensions}/testserver/pool/index.d.ts +0 -1
- package/dist/{resources → extensions}/testserver/pool/index.js +2 -3
- package/dist/{resources → extensions}/testserver/pool/inspect.d.ts +1 -1
- package/dist/{resources → extensions}/testserver/pool/lease.d.ts +1 -1
- package/dist/extensions/testserver/pool/live/pool-store-gateway.d.ts +12 -0
- package/dist/{resources → extensions}/testserver/pool/live/pool-store-gateway.js +4 -4
- package/dist/{resources → extensions}/testserver/pool/pull-request.d.ts +8 -5
- package/dist/{resources → extensions}/testserver/pool/pull-request.js +2 -2
- package/dist/extensions/testserver/pr-build-facts.d.ts +156 -0
- package/dist/extensions/testserver/pr-build-facts.js +309 -0
- package/dist/extensions/testserver/presentation.d.ts +11 -0
- package/dist/{resources → extensions}/testserver/presentation.js +35 -56
- package/dist/{resources/testserver/lane.d.ts → extensions/testserver/progress.d.ts} +10 -6
- package/dist/{resources/testserver/lane.js → extensions/testserver/progress.js} +21 -16
- package/dist/extensions/testserver/provision.d.ts +160 -0
- package/dist/{resources/testserver/provider.js → extensions/testserver/provision.js} +80 -108
- package/dist/{resources → extensions}/testserver/pull-request/gateways.d.ts +1 -1
- package/dist/extensions/testserver/pull-request/gateways.js +5 -0
- package/dist/{resources → extensions}/testserver/pull-request/index.js +2 -2
- package/dist/{resources → extensions}/testserver/pull-request/live/github-token-gateway.d.ts +4 -4
- package/dist/{resources → extensions}/testserver/pull-request/live/github-token-gateway.js +4 -4
- package/dist/extensions/testserver/refusals.d.ts +72 -0
- package/dist/extensions/testserver/refusals.js +117 -0
- package/dist/extensions/testserver/release.d.ts +14 -0
- package/dist/extensions/testserver/release.js +26 -0
- package/dist/extensions/testserver/resource.d.ts +57 -0
- package/dist/extensions/testserver/resource.js +19 -0
- package/dist/extensions/testserver/result.d.ts +55 -0
- package/dist/extensions/testserver/result.js +98 -0
- package/dist/extensions/testserver/run/connection.d.ts +21 -0
- package/dist/extensions/testserver/run/connection.js +39 -0
- package/dist/extensions/testserver/run-sandbox.d.ts +16 -0
- package/dist/extensions/testserver/run-sandbox.js +11 -0
- package/dist/{resources → extensions}/testserver/sandbox/create.d.ts +1 -11
- package/dist/{resources → extensions}/testserver/sandbox/create.js +0 -15
- package/dist/{resources → extensions}/testserver/sandbox/gateways.d.ts +1 -1
- package/dist/{resources → extensions}/testserver/sandbox/index.d.ts +1 -3
- package/dist/extensions/testserver/sandbox/index.js +6 -0
- package/dist/extensions/testserver/testserver-sdk.d.ts +1 -0
- package/dist/extensions/testserver/testserver-sdk.js +4 -0
- package/dist/{vercel-cli → extensions/testserver/vercel-cli}/arguments.js +1 -1
- package/dist/{vercel-cli → extensions/testserver/vercel-cli}/context.js +1 -1
- package/dist/{vercel-cli → extensions/testserver/vercel-cli}/driver.d.ts +1 -1
- package/dist/{vercel-cli → extensions/testserver/vercel-cli}/gateways.js +1 -1
- package/dist/{vercel-cli → extensions/testserver/vercel-cli}/index.js +4 -4
- package/dist/{vercel-cli → extensions/testserver/vercel-cli}/invocation.d.ts +1 -1
- package/dist/{vercel-cli → extensions/testserver/vercel-cli}/invocation.js +1 -1
- package/dist/{vercel-cli → extensions/testserver/vercel-cli}/redaction.js +1 -1
- package/dist/{vercel-cli → extensions/testserver/vercel-cli}/report.d.ts +1 -1
- package/dist/{vercel-cli → extensions/testserver/vercel-cli}/report.js +1 -1
- package/dist/{vercel-cli → extensions/testserver/vercel-cli}/verbose.js +1 -1
- package/dist/extensions/testserver/vitest/config.d.ts +28 -0
- package/dist/extensions/testserver/vitest/config.js +39 -0
- package/dist/{vitest → extensions/testserver/vitest}/container-scope.d.ts +33 -15
- package/dist/{vitest → extensions/testserver/vitest}/container-scope.js +75 -14
- package/dist/extensions/testserver/vitest/container-start.d.ts +19 -0
- package/dist/extensions/testserver/vitest/container-start.js +31 -0
- package/dist/{vitest → extensions/testserver/vitest}/diagnostics.d.ts +72 -29
- package/dist/{vitest → extensions/testserver/vitest}/diagnostics.js +151 -52
- package/dist/{vitest → extensions/testserver/vitest}/fixtures.d.ts +8 -5
- package/dist/{vitest → extensions/testserver/vitest}/fixtures.js +45 -22
- package/dist/extensions/testserver/vitest/index.d.ts +3 -0
- package/dist/extensions/testserver/vitest/index.js +10 -0
- package/dist/extensions/testserver/vitest/sandbox.d.ts +25 -0
- package/dist/extensions/testserver/vitest/sandbox.js +43 -0
- package/dist/{vitest → extensions/testserver/vitest}/types.d.ts +1 -1
- package/dist/extensions/testserver/world.d.ts +25 -0
- package/dist/extensions/testserver/world.js +4 -0
- package/dist/extensions.d.ts +153 -0
- package/dist/extensions.js +53 -0
- package/dist/help-logo.js +5 -5
- package/dist/launch.js +46 -0
- package/dist/launcher-resolvers/index.d.ts +1 -0
- package/dist/launcher-resolvers/index.js +7 -0
- package/dist/live-app.d.ts +9 -0
- package/dist/live-app.js +25 -0
- package/dist/presentation.js +2 -2
- package/dist/runner/base.js +1 -1
- package/dist/runner/context.js +1 -1
- package/dist/runner/events.js +1 -1
- package/dist/runner/gateways.d.ts +11 -11
- package/dist/runner/gateways.js +1 -1
- package/dist/runner/index.d.ts +4 -4
- package/dist/runner/index.js +1 -1
- package/dist/runner/live/sandbox-gateway.js +4 -4
- package/dist/runner/live/terminal.d.ts +1 -1
- package/dist/runner/live/terminal.js +1 -1
- package/dist/runner/prepare.d.ts +13 -12
- package/dist/runner/prepare.js +3 -3
- package/dist/runner/ready.js +2 -2
- package/dist/runner/recipe.d.ts +24 -20
- package/dist/runner/recipe.js +19 -17
- package/dist/runner/{remote-command.d.ts → sandboxed-command.d.ts} +18 -19
- package/dist/runner/{remote-command.js → sandboxed-command.js} +21 -22
- package/dist/runner/scope.d.ts +3 -3
- package/dist/runner/secrets.js +1 -1
- package/dist/runner/snapshot-key.d.ts +1 -1
- package/dist/runner/snapshot-key.js +4 -4
- package/dist/runner/snapshot-save.js +3 -3
- package/dist/sdk/extension/commands.d.ts +71 -0
- package/dist/sdk/extension/commands.js +31 -0
- package/dist/{credential/diagnosis.d.ts → sdk/extension/credential-diagnosis.d.ts} +1 -7
- package/dist/{credential/diagnosis.js → sdk/extension/credential-diagnosis.js} +2 -11
- package/dist/sdk/extension/credential-source.d.ts +132 -0
- package/dist/sdk/extension/credential-source.js +5 -0
- package/dist/{credential → sdk/extension}/credential.d.ts +8 -7
- package/dist/{credential → sdk/extension}/credential.js +9 -6
- package/dist/sdk/extension/index.d.ts +15 -0
- package/dist/sdk/extension/index.js +39 -0
- package/dist/sdk/extension/launcher-supplies.d.ts +24 -0
- package/dist/sdk/extension/launcher-supplies.js +3 -0
- package/dist/sdk/extension/lifecycle.d.ts +211 -0
- package/dist/sdk/extension/lifecycle.js +9 -0
- package/dist/sdk/extension/presentation.d.ts +31 -0
- package/dist/sdk/extension/presentation.js +7 -0
- package/dist/sdk/extension/progress.d.ts +75 -0
- package/dist/sdk/extension/progress.js +8 -0
- package/dist/sdk/extension/reports.d.ts +15 -0
- package/dist/sdk/extension/reports.js +5 -0
- package/dist/sdk/extension/resource-definition.d.ts +204 -0
- package/dist/sdk/extension/resource-definition.js +24 -0
- package/dist/sdk/extension/resource-factory.d.ts +10 -0
- package/dist/sdk/extension/resource-factory.js +15 -0
- package/dist/sdk/extension/resource.d.ts +60 -0
- package/dist/sdk/extension/resource.js +42 -0
- package/dist/sdk/extension/rules.d.ts +16 -0
- package/dist/sdk/extension/rules.js +30 -0
- package/dist/sdk/extension/span.d.ts +8 -0
- package/dist/sdk/extension/span.js +4 -0
- package/dist/sdk/extension/time.d.ts +11 -0
- package/dist/sdk/extension/time.js +4 -0
- package/dist/sdk/extension/token-request-facts.d.ts +39 -0
- package/dist/sdk/extension/token-request-facts.js +35 -0
- package/dist/sdk/index.d.ts +4 -7
- package/dist/sdk/index.js +7 -15
- package/dist/sdk/run/contract.d.ts +32 -0
- package/dist/sdk/run/contract.js +12 -0
- package/dist/sdk/run/launcher.d.ts +5 -0
- package/dist/sdk/run/launcher.js +6 -0
- package/dist/sdk/run/payload.d.ts +58 -0
- package/dist/sdk/run/payload.js +73 -0
- package/dist/sdk/run/present.d.ts +11 -0
- package/dist/sdk/run/present.js +4 -0
- package/dist/sdk/run/redact.d.ts +5 -0
- package/dist/sdk/run/redact.js +12 -0
- package/dist/time/duration.js +2 -2
- package/dist/time/index.js +2 -1
- package/dist/time/time.d.ts +2 -11
- package/dist/time/time.js +2 -2
- package/dist/{sdk → vendor/testserver-sdk}/container/api-request.d.ts +14 -2
- package/dist/vendor/testserver-sdk/container/api-request.js +68 -0
- package/dist/{sdk → vendor/testserver-sdk}/container/container.d.ts +74 -24
- package/dist/{sdk → vendor/testserver-sdk}/container/container.js +180 -90
- package/dist/vendor/testserver-sdk/container/external.d.ts +111 -0
- package/dist/vendor/testserver-sdk/container/external.js +76 -0
- package/dist/vendor/testserver-sdk/container/gateways.d.ts +156 -0
- package/dist/{sdk → vendor/testserver-sdk}/container/index.d.ts +2 -1
- package/dist/{sdk → vendor/testserver-sdk}/container/index.js +2 -1
- package/dist/vendor/testserver-sdk/container/live/container-gateway.d.ts +22 -0
- package/dist/vendor/testserver-sdk/container/live/container-gateway.js +165 -0
- package/dist/vendor/testserver-sdk/container/recorder.d.ts +69 -0
- package/dist/vendor/testserver-sdk/container/recorder.js +121 -0
- package/dist/{sdk → vendor/testserver-sdk}/factories/build.d.ts +33 -12
- package/dist/{sdk → vendor/testserver-sdk}/factories/build.js +36 -14
- package/dist/vendor/testserver-sdk/factories/definition.d.ts +39 -0
- package/dist/{sdk → vendor/testserver-sdk}/factories/definition.js +1 -1
- package/dist/{sdk → vendor/testserver-sdk}/factories/definitions.d.ts +7 -4
- package/dist/{sdk → vendor/testserver-sdk}/factories/definitions.js +10 -0
- package/dist/vendor/testserver-sdk/factories/gateways.d.ts +31 -0
- package/dist/vendor/testserver-sdk/factories/index.d.ts +4 -0
- package/dist/{sdk → vendor/testserver-sdk}/factories/index.js +3 -3
- package/dist/vendor/testserver-sdk/index.d.ts +6 -0
- package/dist/vendor/testserver-sdk/index.js +11 -0
- package/dist/{sdk → vendor/testserver-sdk}/proxy/exchange.d.ts +2 -1
- package/dist/{sdk → vendor/testserver-sdk}/proxy/exchange.js +8 -4
- package/dist/{sdk → vendor/testserver-sdk}/proxy/faulted-exchange.js +7 -2
- package/dist/{sdk → vendor/testserver-sdk}/proxy/faults.d.ts +2 -1
- package/dist/{sdk → vendor/testserver-sdk}/proxy/records.d.ts +10 -1
- package/dist/{sdk → vendor/testserver-sdk}/proxy/records.js +13 -0
- package/dist/{sdk → vendor/testserver-sdk}/records/index.d.ts +1 -1
- package/dist/{sdk → vendor/testserver-sdk}/records/records.d.ts +17 -1
- package/dist/vendor/testserver-sdk/testserver/external-ids.d.ts +38 -0
- package/dist/vendor/testserver-sdk/testserver/external-ids.js +46 -0
- package/dist/vendor/testserver-sdk/testserver/failure.d.ts +101 -0
- package/dist/vendor/testserver-sdk/testserver/failure.js +108 -0
- package/dist/vendor/testserver-sdk/testserver/index.d.ts +7 -0
- package/dist/vendor/testserver-sdk/testserver/index.js +11 -0
- package/dist/{sdk → vendor/testserver-sdk}/testserver/live/request.d.ts +8 -10
- package/dist/{sdk → vendor/testserver-sdk}/testserver/live/request.js +8 -6
- package/dist/vendor/testserver-sdk/testserver/routes.d.ts +60 -0
- package/dist/vendor/testserver-sdk/testserver/routes.js +84 -0
- package/dist/vendor/testserver-sdk/testserver/service-ids.d.ts +31 -0
- package/dist/{sdk → vendor/testserver-sdk}/testserver/service-ids.js +27 -4
- package/dist/version.d.ts +2 -2
- package/dist/version.js +10 -11
- package/dist/vitest/config.d.ts +2 -32
- package/dist/vitest/config.js +6 -40
- package/dist/vitest/gateways.js +1 -1
- package/dist/vitest/index.d.ts +2 -3
- package/dist/vitest/index.js +5 -9
- package/dist/vitest/plan.d.ts +1 -16
- package/dist/vitest/plan.js +4 -36
- package/dist/vitest/test-events.d.ts +1 -18
- package/dist/vitest/test-events.js +2 -31
- package/package.json +53 -23
- package/skills/overview.md +9 -9
- package/skills/read-run-output.md +25 -2
- package/skills/testserver-builds.md +8 -8
- package/bin/node-version.js +0 -24
- package/dist/closed-terminal.d.ts +0 -7
- package/dist/closed-terminal.js +0 -18
- package/dist/combine-errors.d.ts +0 -11
- package/dist/combine-errors.js +0 -19
- package/dist/commands/exec/testserver-flags.d.ts +0 -48
- package/dist/commands/exec/testserver-flags.js +0 -80
- package/dist/config/by-name.d.ts +0 -24
- package/dist/config/by-name.js +0 -26
- package/dist/config/resource-config.d.ts +0 -132
- package/dist/config/resource-config.js +0 -19
- package/dist/config/set.d.ts +0 -27
- package/dist/config/set.js +0 -71
- package/dist/core/command-provider.d.ts +0 -126
- package/dist/core/command-provider.js +0 -13
- package/dist/core/command-slots.d.ts +0 -73
- package/dist/core/command-slots.js +0 -140
- package/dist/core/keyed.d.ts +0 -12
- package/dist/core/keyed.js +0 -24
- package/dist/core/lane.d.ts +0 -46
- package/dist/core/lane.js +0 -5
- package/dist/core/presentation.d.ts +0 -87
- package/dist/core/presentation.js +0 -5
- package/dist/core/provider.d.ts +0 -69
- package/dist/core/provider.js +0 -5
- package/dist/resources/github/cleanup.d.ts +0 -23
- package/dist/resources/github/cleanup.js +0 -39
- package/dist/resources/github/command.d.ts +0 -126
- package/dist/resources/github/command.js +0 -117
- package/dist/resources/github/config.d.ts +0 -16
- package/dist/resources/github/config.js +0 -37
- package/dist/resources/github/events.d.ts +0 -26
- package/dist/resources/github/events.js +0 -2
- package/dist/resources/github/index.d.ts +0 -12
- package/dist/resources/github/index.js +0 -15
- package/dist/resources/github/live/gateways.d.ts +0 -6
- package/dist/resources/github/live/gateways.js +0 -13
- package/dist/resources/github/presentation.d.ts +0 -13
- package/dist/resources/github/presentation.js +0 -43
- package/dist/resources/github/provider.d.ts +0 -66
- package/dist/resources/github/provider.js +0 -58
- package/dist/resources/github/resource-provider.d.ts +0 -6
- package/dist/resources/github/resource-provider.js +0 -20
- package/dist/resources/github/resource.d.ts +0 -33
- package/dist/resources/github/resource.js +0 -12
- package/dist/resources/testserver/cleanup.d.ts +0 -14
- package/dist/resources/testserver/cleanup.js +0 -22
- package/dist/resources/testserver/command.d.ts +0 -520
- package/dist/resources/testserver/command.js +0 -252
- package/dist/resources/testserver/commands/app.d.ts +0 -18
- package/dist/resources/testserver/commands/app.js +0 -3
- package/dist/resources/testserver/commands/create/command.js +0 -208
- package/dist/resources/testserver/commands/create/metadata.d.ts +0 -31
- package/dist/resources/testserver/commands/create/metadata.js +0 -49
- package/dist/resources/testserver/commands/list/command.js +0 -56
- package/dist/resources/testserver/commands/list/metadata.d.ts +0 -9
- package/dist/resources/testserver/commands/list/metadata.js +0 -9
- package/dist/resources/testserver/config.d.ts +0 -18
- package/dist/resources/testserver/config.js +0 -88
- package/dist/resources/testserver/events.js +0 -4
- package/dist/resources/testserver/index.d.ts +0 -16
- package/dist/resources/testserver/index.js +0 -25
- package/dist/resources/testserver/live/gateways.d.ts +0 -8
- package/dist/resources/testserver/live/gateways.js +0 -39
- package/dist/resources/testserver/options.d.ts +0 -5
- package/dist/resources/testserver/options.js +0 -5
- package/dist/resources/testserver/pool/directory.d.ts +0 -4
- package/dist/resources/testserver/pool/directory.js +0 -5
- package/dist/resources/testserver/pool/live/pool-store-gateway.d.ts +0 -12
- package/dist/resources/testserver/pr-build-facts.d.ts +0 -130
- package/dist/resources/testserver/pr-build-facts.js +0 -261
- package/dist/resources/testserver/presentation.d.ts +0 -9
- package/dist/resources/testserver/provider.d.ts +0 -187
- package/dist/resources/testserver/pull-request/gateways.js +0 -5
- package/dist/resources/testserver/ran.d.ts +0 -92
- package/dist/resources/testserver/ran.js +0 -156
- package/dist/resources/testserver/resource-provider.d.ts +0 -12
- package/dist/resources/testserver/resource-provider.js +0 -38
- package/dist/resources/testserver/resource.d.ts +0 -36
- package/dist/resources/testserver/resource.js +0 -10
- package/dist/resources/testserver/run-sandbox.d.ts +0 -13
- package/dist/resources/testserver/run-sandbox.js +0 -6
- package/dist/resources/testserver/sandbox/index.js +0 -8
- package/dist/resources.d.ts +0 -705
- package/dist/resources.js +0 -88
- package/dist/sdk/container/api-request.js +0 -46
- package/dist/sdk/container/gateways.d.ts +0 -108
- package/dist/sdk/container/live/container-gateway.d.ts +0 -17
- package/dist/sdk/container/live/container-gateway.js +0 -114
- package/dist/sdk/factories/definition.d.ts +0 -28
- package/dist/sdk/factories/gateways.d.ts +0 -25
- package/dist/sdk/factories/index.d.ts +0 -5
- package/dist/sdk/factories/live/factory-gateway.d.ts +0 -10
- package/dist/sdk/factories/live/factory-gateway.js +0 -29
- package/dist/sdk/payload/index.d.ts +0 -2
- package/dist/sdk/payload/index.js +0 -4
- package/dist/sdk/payload/payload.d.ts +0 -47
- package/dist/sdk/payload/payload.js +0 -74
- package/dist/sdk/testserver/failure.d.ts +0 -73
- package/dist/sdk/testserver/failure.js +0 -61
- package/dist/sdk/testserver/index.d.ts +0 -5
- package/dist/sdk/testserver/index.js +0 -8
- package/dist/sdk/testserver/service-ids.d.ts +0 -19
- package/dist/vitest/sandbox.d.ts +0 -16
- package/dist/vitest/sandbox.js +0 -35
- /package/dist/{credential/settle.js → config/credential-settle.js} +0 -0
- /package/dist/{resources → extensions}/github/gateways.d.ts +0 -0
- /package/dist/{resources → extensions}/github/gateways.js +0 -0
- /package/dist/{resources → extensions}/github/live/fixture-repo-gateway.d.ts +0 -0
- /package/dist/{resources → extensions}/github/live/fixture-repo-gateway.js +0 -0
- /package/dist/{resources/testserver/commands → extensions/testserver/commands/pool}/list/outcomes.d.ts +0 -0
- /package/dist/{core → extensions/testserver}/limit.d.ts +0 -0
- /package/dist/{resources/testserver/sandbox → extensions/testserver/options}/build-reference.d.ts +0 -0
- /package/dist/{resources/testserver/sandbox → extensions/testserver/options}/build-reference.js +0 -0
- /package/dist/{resources/testserver/sandbox → extensions/testserver/options}/channels.js +0 -0
- /package/dist/{resources → extensions}/testserver/pool/gateways.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/pool/gateways.js +0 -0
- /package/dist/{resources → extensions}/testserver/pool/host.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/pool/host.js +0 -0
- /package/dist/{resources → extensions}/testserver/pool/inspect.js +0 -0
- /package/dist/{resources → extensions}/testserver/pool/lease.js +0 -0
- /package/dist/{resources → extensions}/testserver/pool/live/pool-records.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/pool/live/pool-records.js +0 -0
- /package/dist/{resources → extensions}/testserver/pool/staleness.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/pool/staleness.js +0 -0
- /package/dist/{resources → extensions}/testserver/pull-request/index.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/pull-request/live/github-rest.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/pull-request/live/github-rest.js +0 -0
- /package/dist/{resources → extensions}/testserver/pull-request/live/pull-request-gateway.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/pull-request/live/pull-request-gateway.js +0 -0
- /package/dist/{resources → extensions}/testserver/pull-request/live/testserver-workflow-gateway.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/pull-request/live/testserver-workflow-gateway.js +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/create-failure.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/create-failure.js +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/gateways.js +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/live/builds-response.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/live/builds-response.js +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/live/control-plane-gateway.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/live/control-plane-gateway.js +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/live/create-response.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/live/create-response.js +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/live/fetch-failure.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/live/fetch-failure.js +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/live/health-check-gateway.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/live/health-check-gateway.js +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/live/sse.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/live/sse.js +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/ansi.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/ansi.js +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/arguments.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/auth-config.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/auth-config.js +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/clock.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/clock.js +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/config-files.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/config-files.js +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/context.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/driver.js +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/entry.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/entry.js +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/environment.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/environment.js +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/errors.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/errors.js +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/gateways.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/index.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/keys.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/keys.js +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/live/config-files.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/live/config-files.js +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/live/process-gateway.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/live/process-gateway.js +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/redaction.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/verbose.d.ts +0 -0
- /package/dist/{vitest → extensions/testserver/vitest}/types.js +0 -0
- /package/dist/sdk/{payload → run}/test-events.d.ts +0 -0
- /package/dist/sdk/{payload → run}/test-events.js +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/container/feature-flags.d.ts +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/container/feature-flags.js +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/container/gateways.js +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/factories/gateways.js +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/proxy/faulted-exchange.d.ts +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/proxy/faults.js +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/proxy/index.d.ts +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/proxy/index.js +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/proxy/proxy.d.ts +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/proxy/proxy.js +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/records/body.d.ts +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/records/body.js +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/records/index.js +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/records/records.js +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/seed/index.d.ts +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/seed/index.js +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/seed/seed.d.ts +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/seed/seed.js +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/testserver/clock.d.ts +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/testserver/clock.js +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/testserver/live/connect-failure.d.ts +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/testserver/live/connect-failure.js +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/testserver/test-id.d.ts +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/testserver/test-id.js +0 -0
|
@@ -1,59 +1,36 @@
|
|
|
1
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
|
|
3
|
-
/** The field descriptions of the flags every run takes. */
|
|
2
|
+
export declare const RUN_USAGE_FLAGS: string;
|
|
3
|
+
/** The field descriptions of the flags every run takes: the resources' flags, then the run's own. */
|
|
4
4
|
export declare const RUN_FIELDS: {
|
|
5
|
-
|
|
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, the build channel stable or latest_main, or a vercel/api pull request as pr:<N> or its URL, overriding resources.testserverPool.build in storm.config.ts; default stable. A pull request runs on the newest build made from its head commit, which storm reads from GitHub with GITHUB_TOKEN, GH_TOKEN or gh auth token, or refuses. 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: {
|
|
5
|
+
credential: {
|
|
29
6
|
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 --
|
|
7
|
+
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 --unsandboxed takes it: a sandboxed run needs the mint. Only a run with a resource that takes a credential takes it, as that resource's options decide; otherwise it is credential_unused. No config key.";
|
|
31
8
|
};
|
|
32
|
-
|
|
33
|
-
readonly description: "Run the command on this machine
|
|
9
|
+
unsandboxed: {
|
|
10
|
+
readonly description: "Run the command on this machine, with no isolation: it sees this machine's files and environment, less the variables the resources drop. 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
11
|
};
|
|
35
|
-
|
|
36
|
-
readonly description: "Build a runner snapshot of the base whatever the runner snapshot cache holds, replacing an entry for the same base, and drop this branch's saved branch snapshots from the cache. Not with --
|
|
12
|
+
rebuildSnapshot: {
|
|
13
|
+
readonly description: "Build a runner snapshot of the base whatever the runner snapshot cache holds, replacing an entry for the same base, and drop this branch's saved branch snapshots from the cache. Not with --unsandboxed. No config key.";
|
|
37
14
|
};
|
|
38
|
-
|
|
39
|
-
readonly description: "Once the command ends on its own after a successful install and build, save the runner sandbox as this branch's runner snapshot, so the next run on the branch starts from this run's install and build outputs. The run resets the working tree to the snapshot's base, keeps .git and ignored files such as node_modules and build outputs, and empties /tmp; the snapshot keeps whatever the command wrote there and to $HOME, a resource's token included. A run with it on a branch keeps no runner sandbox, even when it fails or stops before the save. With a detached HEAD it says so as it starts and keeps the runner sandbox as without the flag. Not with --
|
|
15
|
+
saveSnapshot: {
|
|
16
|
+
readonly description: "Once the command ends on its own after a successful install and build, save the runner sandbox as this branch's runner snapshot, so the next run on the branch starts from this run's install and build outputs. The run resets the working tree to the snapshot's base, keeps .git and ignored files such as node_modules and build outputs, and empties /tmp; the snapshot keeps whatever the command wrote there and to $HOME, a resource's token included. A run with it on a branch keeps no runner sandbox, even when it fails or stops before the save. With a detached HEAD it says so as it starts and keeps the runner sandbox as without the flag. Not with --unsandboxed, or with --keep-sandbox above 0. No config key.";
|
|
40
17
|
};
|
|
41
|
-
|
|
18
|
+
keepSandbox: {
|
|
42
19
|
readonly valueLabel: "DURATION";
|
|
43
|
-
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 --
|
|
20
|
+
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 --unsandboxed.";
|
|
44
21
|
};
|
|
45
|
-
|
|
46
|
-
readonly description: "In a
|
|
22
|
+
showOutput: {
|
|
23
|
+
readonly description: "In a sandboxed 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 --unsandboxed. No config key.";
|
|
47
24
|
};
|
|
48
|
-
|
|
49
|
-
readonly description: "Print more as it happens: each
|
|
25
|
+
verbose: {
|
|
26
|
+
readonly description: "Print more as it happens: each resource's detailed progress, 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.";
|
|
50
27
|
};
|
|
51
|
-
|
|
28
|
+
scope: {
|
|
52
29
|
readonly valueLabel: "TEAM";
|
|
53
|
-
readonly description: "The control plane team: the Vercel team whose project
|
|
30
|
+
readonly description: "The control plane team: the Vercel team whose project the credential is minted for and a sandboxed run's sandboxes run in. Required, from this flag or scope in storm.config.ts, unless an unsandboxed run has no resource that takes a credential or takes --credential github-actions.";
|
|
54
31
|
};
|
|
55
|
-
|
|
32
|
+
project: {
|
|
56
33
|
readonly valueLabel: "PROJECT";
|
|
57
|
-
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
|
|
34
|
+
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 an unsandboxed run has no resource that takes a credential or takes --credential github-actions.";
|
|
58
35
|
};
|
|
59
36
|
};
|
|
@@ -1,61 +1,42 @@
|
|
|
1
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
|
|
2
|
+
// descriptions: the run's own, and each resource option's flag, from the registry's resource definitions
|
|
3
|
+
// (`resource-flags.ts`). `exec`'s and `vitest`'s `command.ts` read it for their leaf help.
|
|
4
|
+
import { RESOURCE_FLAG_HELP, RESOURCE_USAGE_FLAGS } from "./resource-flags.js";
|
|
3
5
|
/** The flags every run takes, as a usage line names them, before the command's own arguments. */
|
|
4
|
-
export const RUN_USAGE_FLAGS =
|
|
5
|
-
/** The field descriptions of the
|
|
6
|
-
|
|
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, the build channel stable or latest_main, or a vercel/api pull request as pr:<N> or its URL, overriding resources.testserverPool.build in storm.config.ts; default stable. A pull request runs on the newest build made from its head commit, which storm reads from GitHub with GITHUB_TOKEN, GH_TOKEN or gh auth token, or refuses. 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
|
-
},
|
|
6
|
+
export const RUN_USAGE_FLAGS = `${RESOURCE_USAGE_FLAGS} [--credential <SOURCE>] [--scope <TEAM> --project <PROJECT>] [--unsandboxed | [--rebuild-snapshot] [--save-snapshot] [--show-output] [--keep-sandbox <DURATION>]] [--verbose]`;
|
|
7
|
+
/** The field descriptions of the run's own flags. */
|
|
8
|
+
const OWN_RUN_FIELDS = {
|
|
30
9
|
credential: {
|
|
31
10
|
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 --
|
|
11
|
+
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 --unsandboxed takes it: a sandboxed run needs the mint. Only a run with a resource that takes a credential takes it, as that resource's options decide; otherwise it is credential_unused. No config key.",
|
|
33
12
|
},
|
|
34
|
-
|
|
35
|
-
description: "Run the command on this machine
|
|
13
|
+
unsandboxed: {
|
|
14
|
+
description: "Run the command on this machine, with no isolation: it sees this machine's files and environment, less the variables the resources drop. 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
15
|
},
|
|
37
16
|
rebuildSnapshot: {
|
|
38
|
-
description: "Build a runner snapshot of the base whatever the runner snapshot cache holds, replacing an entry for the same base, and drop this branch's saved branch snapshots from the cache. Not with --
|
|
17
|
+
description: "Build a runner snapshot of the base whatever the runner snapshot cache holds, replacing an entry for the same base, and drop this branch's saved branch snapshots from the cache. Not with --unsandboxed. No config key.",
|
|
39
18
|
},
|
|
40
19
|
saveSnapshot: {
|
|
41
|
-
description: "Once the command ends on its own after a successful install and build, save the runner sandbox as this branch's runner snapshot, so the next run on the branch starts from this run's install and build outputs. The run resets the working tree to the snapshot's base, keeps .git and ignored files such as node_modules and build outputs, and empties /tmp; the snapshot keeps whatever the command wrote there and to $HOME, a resource's token included. A run with it on a branch keeps no runner sandbox, even when it fails or stops before the save. With a detached HEAD it says so as it starts and keeps the runner sandbox as without the flag. Not with --
|
|
20
|
+
description: "Once the command ends on its own after a successful install and build, save the runner sandbox as this branch's runner snapshot, so the next run on the branch starts from this run's install and build outputs. The run resets the working tree to the snapshot's base, keeps .git and ignored files such as node_modules and build outputs, and empties /tmp; the snapshot keeps whatever the command wrote there and to $HOME, a resource's token included. A run with it on a branch keeps no runner sandbox, even when it fails or stops before the save. With a detached HEAD it says so as it starts and keeps the runner sandbox as without the flag. Not with --unsandboxed, or with --keep-sandbox above 0. No config key.",
|
|
42
21
|
},
|
|
43
22
|
keepSandbox: {
|
|
44
23
|
valueLabel: "DURATION",
|
|
45
|
-
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 --
|
|
24
|
+
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 --unsandboxed.",
|
|
46
25
|
},
|
|
47
26
|
showOutput: {
|
|
48
|
-
description: "In a
|
|
27
|
+
description: "In a sandboxed 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 --unsandboxed. No config key.",
|
|
49
28
|
},
|
|
50
29
|
verbose: {
|
|
51
|
-
description: "Print more as it happens: each
|
|
30
|
+
description: "Print more as it happens: each resource's detailed progress, 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.",
|
|
52
31
|
},
|
|
53
32
|
scope: {
|
|
54
33
|
valueLabel: "TEAM",
|
|
55
|
-
description: "The control plane team: the Vercel team whose project
|
|
34
|
+
description: "The control plane team: the Vercel team whose project the credential is minted for and a sandboxed run's sandboxes run in. Required, from this flag or scope in storm.config.ts, unless an unsandboxed run has no resource that takes a credential or takes --credential github-actions.",
|
|
56
35
|
},
|
|
57
36
|
project: {
|
|
58
37
|
valueLabel: "PROJECT",
|
|
59
|
-
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
|
|
38
|
+
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 an unsandboxed run has no resource that takes a credential or takes --credential github-actions.",
|
|
60
39
|
},
|
|
61
40
|
};
|
|
41
|
+
/** The field descriptions of the flags every run takes: the resources' flags, then the run's own. */
|
|
42
|
+
export const RUN_FIELDS = { ...RESOURCE_FLAG_HELP, ...OWN_RUN_FIELDS };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { Row } from "@vercel/clinkr";
|
|
1
2
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
import type
|
|
3
|
+
import type { TestEvent } from "../../sdk/run/launcher.ts";
|
|
4
|
+
import { type TestPlanFacts } from "./test-plan.ts";
|
|
4
5
|
declare const testTotalsSchema: z.ZodObject<{
|
|
5
6
|
passed: z.ZodNumber;
|
|
6
7
|
failed: z.ZodNumber;
|
|
@@ -18,26 +19,41 @@ declare const endedSchema: z.ZodObject<{
|
|
|
18
19
|
failed: z.ZodNumber;
|
|
19
20
|
skipped: z.ZodNumber;
|
|
20
21
|
}, z.core.$strip>>;
|
|
21
|
-
testsIncomplete: z.
|
|
22
|
-
resources: z.
|
|
22
|
+
testsIncomplete: z.ZodNullable<z.ZodString>;
|
|
23
|
+
resources: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
24
|
+
definition: z.ZodString;
|
|
25
|
+
facts: z.ZodUnknown;
|
|
26
|
+
}, z.core.$strip>>>;
|
|
27
|
+
resourceRows: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>], null>>;
|
|
23
28
|
}, z.core.$strip>;
|
|
24
29
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
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).
|
|
30
|
+
* What each resource instance a run acquired reported of itself, by resource key, as recorded: its definition's name
|
|
31
|
+
* and its facts, whose shape is the definition's as of the run.
|
|
31
32
|
*/
|
|
32
|
-
export type
|
|
33
|
-
readonly
|
|
33
|
+
export type RecordedResources = {
|
|
34
|
+
readonly [key: string]: {
|
|
35
|
+
readonly definition: string;
|
|
36
|
+
readonly facts: unknown;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* How a run ended: its outcome's kind (`ran`, `canceled`, `spawn-failed`, …), the status storm exited with and the
|
|
41
|
+
* signal that ended the command, for a run whose command ran (null otherwise), how long the command took (null when it
|
|
42
|
+
* never ended), its tests' totals (null without a final result), why those may be incomplete (null unless a sandboxed
|
|
43
|
+
* run's final read of its test events file failed), what each resource instance it acquired reports of itself, as a
|
|
44
|
+
* `ran` outcome does (null for any other outcome), and the rows `storm runs show` lists for those, as storm rendered
|
|
45
|
+
* them when the run ended (none for any other outcome).
|
|
46
|
+
*/
|
|
47
|
+
export type RunRecordEnd = Readonly<Omit<z.output<typeof endedSchema>, "resources" | "resourceRows"> & {
|
|
48
|
+
readonly resources: RecordedResources | null;
|
|
49
|
+
readonly resourceRows: readonly Row[];
|
|
34
50
|
}>;
|
|
35
51
|
declare const snapshotSchema: z.ZodObject<{
|
|
36
52
|
id: z.ZodString;
|
|
37
53
|
base: z.ZodString;
|
|
38
54
|
built: z.ZodBoolean;
|
|
39
|
-
branch: z.
|
|
40
|
-
head: z.
|
|
55
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
56
|
+
head: z.ZodNullable<z.ZodString>;
|
|
41
57
|
}, z.core.$strip>;
|
|
42
58
|
/**
|
|
43
59
|
* The runner snapshot a runner sandbox started from: its id, the base it is of, which the run's changes were uploaded
|
|
@@ -74,7 +90,7 @@ export declare const saveSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
74
90
|
/** How saving the runner sandbox as a branch snapshot ended. */
|
|
75
91
|
export type RunRecordSave = z.output<typeof saveSchema>;
|
|
76
92
|
declare const whereSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
77
|
-
kind: z.ZodLiteral<"
|
|
93
|
+
kind: z.ZodLiteral<"unsandboxed">;
|
|
78
94
|
}, z.core.$strip>, z.ZodObject<{
|
|
79
95
|
kind: z.ZodLiteral<"runner">;
|
|
80
96
|
team: z.ZodString;
|
|
@@ -89,11 +105,11 @@ declare const whereSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
89
105
|
id: z.ZodString;
|
|
90
106
|
base: z.ZodString;
|
|
91
107
|
built: z.ZodBoolean;
|
|
92
|
-
branch: z.
|
|
93
|
-
head: z.
|
|
108
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
109
|
+
head: z.ZodNullable<z.ZodString>;
|
|
94
110
|
}, z.core.$strip>>;
|
|
95
|
-
keptUntil: z.
|
|
96
|
-
save: z.
|
|
111
|
+
keptUntil: z.ZodNullable<z.ZodString>;
|
|
112
|
+
save: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
97
113
|
kind: z.ZodLiteral<"saved">;
|
|
98
114
|
snapshotId: z.ZodString;
|
|
99
115
|
base: z.ZodString;
|
|
@@ -114,14 +130,14 @@ declare const whereSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
114
130
|
message: z.ZodString;
|
|
115
131
|
}, z.core.$strip>, z.ZodObject<{
|
|
116
132
|
kind: z.ZodLiteral<"stopped">;
|
|
117
|
-
}, z.core.$strip>], "kind"
|
|
133
|
+
}, z.core.$strip>], "kind">>;
|
|
118
134
|
}, z.core.$strip>], "kind">;
|
|
119
135
|
/**
|
|
120
|
-
* Where a run's command ran: on this machine (`
|
|
121
|
-
* plane team and project it runs in, its region, runtime and vCPUs, and the run's base, HEAD's merge-base
|
|
122
|
-
* `baseRef`, all known as the run starts; then, once the run is over, the runner sandbox's name and the runner
|
|
123
|
-
* it started from, each null when the run stopped before it, when the runner sandbox's timeout stops it, as an
|
|
124
|
-
* time, when the run kept it running (null when it stopped and deleted it), and how saving it as a branch snapshot
|
|
136
|
+
* Where a run's command ran: on this machine (`unsandboxed`, with `--unsandboxed`), or in a runner sandbox (`runner`):
|
|
137
|
+
* the control plane team and project it runs in, its region, runtime and vCPUs, and the run's base, HEAD's merge-base
|
|
138
|
+
* with `baseRef`, all known as the run starts; then, once the run is over, the runner sandbox's name and the runner
|
|
139
|
+
* snapshot it started from, each null when the run stopped before it, when the runner sandbox's timeout stops it, as an
|
|
140
|
+
* ISO time, when the run kept it running (null when it stopped and deleted it), and how saving it as a branch snapshot
|
|
125
141
|
* ended (null without `--save-snapshot`). A reused runner snapshot can be of an older base.
|
|
126
142
|
*/
|
|
127
143
|
export type RunRecordWhere = Readonly<z.output<typeof whereSchema>>;
|
|
@@ -135,24 +151,13 @@ declare const gitSchema: z.ZodObject<{
|
|
|
135
151
|
* tree had uncommitted changes or untracked files.
|
|
136
152
|
*/
|
|
137
153
|
export type RunRecordGit = Readonly<z.output<typeof gitSchema>>;
|
|
138
|
-
declare const planSchema: z.ZodObject<{
|
|
139
|
-
tests: z.ZodNumber;
|
|
140
|
-
files: z.ZodNumber;
|
|
141
|
-
sandboxes: z.ZodNullable<z.ZodNumber>;
|
|
142
|
-
sandboxesFrom: z.ZodNullable<z.ZodEnum<{
|
|
143
|
-
auto: "auto";
|
|
144
|
-
file: "file";
|
|
145
|
-
flag: "flag";
|
|
146
|
-
}>>;
|
|
147
|
-
}, z.core.$strip>;
|
|
148
154
|
/**
|
|
149
|
-
* A `storm vitest` run's test plan: how many tests `vitest list` counted, in how many files, and
|
|
150
|
-
*
|
|
151
|
-
* config file's `resources.testserverPool.sandboxes`, or sized automatically from the files); both null without one.
|
|
155
|
+
* A `storm vitest` run's test plan: how many tests `vitest list` counted, in how many files, and each resource option
|
|
156
|
+
* whose default is a function of the planned run, with its value and where that came from (`test-plan.ts`).
|
|
152
157
|
*/
|
|
153
|
-
export type RunRecordPlan =
|
|
158
|
+
export type RunRecordPlan = TestPlanFacts;
|
|
154
159
|
declare const runRecordSchema: z.ZodObject<{
|
|
155
|
-
version: z.ZodLiteral<
|
|
160
|
+
version: z.ZodLiteral<3>;
|
|
156
161
|
startedAt: z.ZodString;
|
|
157
162
|
cwd: z.ZodString;
|
|
158
163
|
configFile: z.ZodNullable<z.ZodString>;
|
|
@@ -160,15 +165,18 @@ declare const runRecordSchema: z.ZodObject<{
|
|
|
160
165
|
plan: z.ZodExactOptional<z.ZodObject<{
|
|
161
166
|
tests: z.ZodNumber;
|
|
162
167
|
files: z.ZodNumber;
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
168
|
+
options: z.ZodArray<z.ZodObject<{
|
|
169
|
+
path: z.ZodString;
|
|
170
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
171
|
+
from: z.ZodEnum<{
|
|
172
|
+
default: "default";
|
|
173
|
+
file: "file";
|
|
174
|
+
flag: "flag";
|
|
175
|
+
}>;
|
|
176
|
+
}, z.core.$strip>>;
|
|
169
177
|
}, z.core.$strip>>;
|
|
170
178
|
where: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
171
|
-
kind: z.ZodLiteral<"
|
|
179
|
+
kind: z.ZodLiteral<"unsandboxed">;
|
|
172
180
|
}, z.core.$strip>, z.ZodObject<{
|
|
173
181
|
kind: z.ZodLiteral<"runner">;
|
|
174
182
|
team: z.ZodString;
|
|
@@ -183,11 +191,11 @@ declare const runRecordSchema: z.ZodObject<{
|
|
|
183
191
|
id: z.ZodString;
|
|
184
192
|
base: z.ZodString;
|
|
185
193
|
built: z.ZodBoolean;
|
|
186
|
-
branch: z.
|
|
187
|
-
head: z.
|
|
194
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
195
|
+
head: z.ZodNullable<z.ZodString>;
|
|
188
196
|
}, z.core.$strip>>;
|
|
189
|
-
keptUntil: z.
|
|
190
|
-
save: z.
|
|
197
|
+
keptUntil: z.ZodNullable<z.ZodString>;
|
|
198
|
+
save: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
191
199
|
kind: z.ZodLiteral<"saved">;
|
|
192
200
|
snapshotId: z.ZodString;
|
|
193
201
|
base: z.ZodString;
|
|
@@ -208,7 +216,7 @@ declare const runRecordSchema: z.ZodObject<{
|
|
|
208
216
|
message: z.ZodString;
|
|
209
217
|
}, z.core.$strip>, z.ZodObject<{
|
|
210
218
|
kind: z.ZodLiteral<"stopped">;
|
|
211
|
-
}, z.core.$strip>], "kind"
|
|
219
|
+
}, z.core.$strip>], "kind">>;
|
|
212
220
|
}, z.core.$strip>], "kind">;
|
|
213
221
|
git: z.ZodNullable<z.ZodObject<{
|
|
214
222
|
branch: z.ZodNullable<z.ZodString>;
|
|
@@ -225,8 +233,12 @@ declare const runRecordSchema: z.ZodObject<{
|
|
|
225
233
|
failed: z.ZodNumber;
|
|
226
234
|
skipped: z.ZodNumber;
|
|
227
235
|
}, z.core.$strip>>;
|
|
228
|
-
testsIncomplete: z.
|
|
229
|
-
resources: z.
|
|
236
|
+
testsIncomplete: z.ZodNullable<z.ZodString>;
|
|
237
|
+
resources: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
238
|
+
definition: z.ZodString;
|
|
239
|
+
facts: z.ZodUnknown;
|
|
240
|
+
}, z.core.$strip>>>;
|
|
241
|
+
resourceRows: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>], null>>;
|
|
230
242
|
}, z.core.$strip>>;
|
|
231
243
|
}, z.core.$strip>;
|
|
232
244
|
/**
|
|
@@ -239,10 +251,7 @@ export type RunRecord = Readonly<Omit<z.output<typeof runRecordSchema>, "ended">
|
|
|
239
251
|
}>;
|
|
240
252
|
/** `run.json`'s text for `record`. */
|
|
241
253
|
export declare function runRecordText(record: RunRecord): string;
|
|
242
|
-
/**
|
|
243
|
-
* The run `text` records; undefined when there is no text, or it isn't a version 1 `run.json`. Resources' facts it
|
|
244
|
-
* can't read, such as another storm's, read as null.
|
|
245
|
-
*/
|
|
254
|
+
/** The run `text` records; undefined when there is no text, or it isn't a version 3 `run.json`. */
|
|
246
255
|
export declare function parseRunRecord(text: string | undefined): RunRecord | undefined;
|
|
247
256
|
/** The totals of `events`' final results; null without one. */
|
|
248
257
|
export declare function testTotals(events: readonly TestEvent[]): RunTestTotals | null;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
// What a run records about itself in its run directory's `run.json`, which `storm runs` reads back: written as
|
|
2
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
|
|
3
|
+
// this module owns its shape, version 3. Reading it back asks the registry nothing: each resource instance's facts
|
|
4
|
+
// read as recorded, beside its definition's name, and `runs show` lists the rows storm rendered for them when the run
|
|
5
|
+
// ended, so a past run reads the same after a resource definition is renamed or its extension removed.
|
|
4
6
|
import { z } from "zod";
|
|
5
|
-
import {
|
|
7
|
+
import { planSchema } from "./test-plan.js";
|
|
6
8
|
const testTotalsSchema = z.object({
|
|
7
9
|
passed: z.number().int().nonnegative(),
|
|
8
10
|
failed: z.number().int().nonnegative(),
|
|
@@ -14,18 +16,16 @@ const endedSchema = z.object({
|
|
|
14
16
|
signal: z.string().nullable(),
|
|
15
17
|
ms: z.number().nonnegative().nullable(),
|
|
16
18
|
tests: testTotalsSchema.nullable(),
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
resources: z.unknown(),
|
|
19
|
+
testsIncomplete: z.string().nullable(),
|
|
20
|
+
resources: z.record(z.string(), z.object({ definition: z.string(), facts: z.unknown() })).nullable(),
|
|
21
|
+
resourceRows: z.array(z.tuple([z.string(), z.union([z.string(), z.array(z.string())])])),
|
|
21
22
|
});
|
|
22
23
|
const snapshotSchema = z.object({
|
|
23
24
|
id: z.string(),
|
|
24
25
|
base: z.string(),
|
|
25
26
|
built: z.boolean(),
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
head: z.string().nullable().default(null),
|
|
27
|
+
branch: z.string().nullable(),
|
|
28
|
+
head: z.string().nullable(),
|
|
29
29
|
});
|
|
30
30
|
/**
|
|
31
31
|
* How saving the runner sandbox as a branch snapshot ended (`--save-snapshot`), as a `ran` outcome and `run.json`
|
|
@@ -67,7 +67,7 @@ export const saveSchema = z.discriminatedUnion("kind", [
|
|
|
67
67
|
}),
|
|
68
68
|
]);
|
|
69
69
|
const whereSchema = z.discriminatedUnion("kind", [
|
|
70
|
-
z.object({ kind: z.literal("
|
|
70
|
+
z.object({ kind: z.literal("unsandboxed") }),
|
|
71
71
|
z.object({
|
|
72
72
|
kind: z.literal("runner"),
|
|
73
73
|
team: z.string(),
|
|
@@ -79,21 +79,13 @@ const whereSchema = z.discriminatedUnion("kind", [
|
|
|
79
79
|
baseRef: z.string(),
|
|
80
80
|
sandbox: z.string().nullable(),
|
|
81
81
|
snapshot: snapshotSchema.nullable(),
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
// Absent from a run.json an earlier storm wrote, which saved no branch snapshot.
|
|
85
|
-
save: saveSchema.nullable().default(null),
|
|
82
|
+
keptUntil: z.string().nullable(),
|
|
83
|
+
save: saveSchema.nullable(),
|
|
86
84
|
}),
|
|
87
85
|
]);
|
|
88
86
|
const gitSchema = z.object({ branch: z.string().nullable(), commit: z.string(), dirty: z.boolean() });
|
|
89
|
-
const planSchema = z.object({
|
|
90
|
-
tests: z.number().int().nonnegative(),
|
|
91
|
-
files: z.number().int().nonnegative(),
|
|
92
|
-
sandboxes: z.number().int().positive().nullable(),
|
|
93
|
-
sandboxesFrom: z.enum(["flag", "file", "auto"]).nullable(),
|
|
94
|
-
});
|
|
95
87
|
const runRecordSchema = z.object({
|
|
96
|
-
version: z.literal(
|
|
88
|
+
version: z.literal(3),
|
|
97
89
|
startedAt: z.string(),
|
|
98
90
|
cwd: z.string(),
|
|
99
91
|
configFile: z.string().nullable(),
|
|
@@ -108,10 +100,7 @@ const runRecordSchema = z.object({
|
|
|
108
100
|
export function runRecordText(record) {
|
|
109
101
|
return JSON.stringify(record);
|
|
110
102
|
}
|
|
111
|
-
/**
|
|
112
|
-
* The run `text` records; undefined when there is no text, or it isn't a version 1 `run.json`. Resources' facts it
|
|
113
|
-
* can't read, such as another storm's, read as null.
|
|
114
|
-
*/
|
|
103
|
+
/** The run `text` records; undefined when there is no text, or it isn't a version 3 `run.json`. */
|
|
115
104
|
export function parseRunRecord(text) {
|
|
116
105
|
if (text === undefined)
|
|
117
106
|
return undefined;
|
|
@@ -123,13 +112,7 @@ export function parseRunRecord(text) {
|
|
|
123
112
|
return undefined;
|
|
124
113
|
}
|
|
125
114
|
const parsed = runRecordSchema.safeParse(json);
|
|
126
|
-
|
|
127
|
-
return undefined;
|
|
128
|
-
const { ended, ...started } = parsed.data;
|
|
129
|
-
if (ended === undefined)
|
|
130
|
-
return started;
|
|
131
|
-
const resources = RESOURCE_REPORTS.ranSchema.safeParse(ended.resources);
|
|
132
|
-
return { ...started, ended: { ...ended, resources: resources.success ? resources.data : null } };
|
|
115
|
+
return parsed.success ? parsed.data : undefined;
|
|
133
116
|
}
|
|
134
117
|
/** The totals of `events`' final results; null without one. */
|
|
135
118
|
export function testTotals(events) {
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type RunTestPlan } from "../../sdk/extension/index.ts";
|
|
3
|
+
declare const planOptionSchema: z.ZodObject<{
|
|
4
|
+
path: z.ZodString;
|
|
5
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
6
|
+
from: z.ZodEnum<{
|
|
7
|
+
default: "default";
|
|
8
|
+
file: "file";
|
|
9
|
+
flag: "flag";
|
|
10
|
+
}>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
/**
|
|
13
|
+
* One resource option whose default is a function of the planned run: its key path, value and where the value came
|
|
14
|
+
* from.
|
|
15
|
+
*/
|
|
16
|
+
export type PlanOption = Readonly<z.output<typeof planOptionSchema>>;
|
|
17
|
+
/** A run's test plan, as `vitest`'s `ran` outcome, `run.json` and `runs show` hold it. */
|
|
18
|
+
export declare const planSchema: z.ZodObject<{
|
|
19
|
+
tests: z.ZodNumber;
|
|
20
|
+
files: z.ZodNumber;
|
|
21
|
+
options: z.ZodArray<z.ZodObject<{
|
|
22
|
+
path: z.ZodString;
|
|
23
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
24
|
+
from: z.ZodEnum<{
|
|
25
|
+
default: "default";
|
|
26
|
+
file: "file";
|
|
27
|
+
flag: "flag";
|
|
28
|
+
}>;
|
|
29
|
+
}, z.core.$strip>>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
/**
|
|
32
|
+
* A run's test plan: how many tests `vitest list` counted, in how many files, and each resource option whose default is
|
|
33
|
+
* a function of the planned run, with its value and where that came from.
|
|
34
|
+
*/
|
|
35
|
+
export type TestPlanFacts = Readonly<z.output<typeof planSchema>>;
|
|
36
|
+
/** The plan a run records: with a counted test plan, its counts and `options`; none for a run that counted nothing. */
|
|
37
|
+
export declare function recordedPlan(testPlan: RunTestPlan, options: readonly PlanOption[]): TestPlanFacts | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* The plan as `vitest` says it before the run: `Running 65 tests in 19 files; resources.<key>.<option> 5 (default)`,
|
|
40
|
+
* each option with where its value came from, or `Running 65 tests in 19 files` without one.
|
|
41
|
+
*/
|
|
42
|
+
export declare function testPlanLine(plan: TestPlanFacts): string;
|
|
43
|
+
/** The plan as a phrase: `65 tests in 19 files; resources.<key>.<option> 5 (--<prefix>-<option>)`. */
|
|
44
|
+
export declare function testPlanText(plan: TestPlanFacts): string;
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// A run's test plan as storm says and records it: what `vitest` counted before the run, and each resource option whose
|
|
2
|
+
// default is a function of the planned run, with its value and where that came from. `vitest`'s `ran` outcome,
|
|
3
|
+
// `run.json` and `runs show` share its shape, and `vitest`'s line before the run and `runs show`'s row its text.
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { CONFIG_FILE_NAME } from "../../config/index.js";
|
|
6
|
+
import { optionKeyPath } from "../../sdk/extension/index.js";
|
|
7
|
+
import { formatPlan } from "../../vitest/plan.js";
|
|
8
|
+
import { RESOURCE_FLAGS } from "./resource-flags.js";
|
|
9
|
+
const planOptionSchema = z.object({
|
|
10
|
+
/** The option's key path, `resources.<key>.<option>`, under its resource key. */
|
|
11
|
+
path: z.string(),
|
|
12
|
+
/** Its value. */
|
|
13
|
+
value: z.union([z.string(), z.number(), z.boolean()]),
|
|
14
|
+
/** Where the value came from: its flag (`flag`), storm.config.ts (`file`), or its default, given the test plan (`default`). */
|
|
15
|
+
from: z.enum(["flag", "file", "default"]),
|
|
16
|
+
});
|
|
17
|
+
/** A run's test plan, as `vitest`'s `ran` outcome, `run.json` and `runs show` hold it. */
|
|
18
|
+
export const planSchema = z.object({
|
|
19
|
+
/** How many tests `vitest list --json <args>` counted. */
|
|
20
|
+
tests: z.number().int().nonnegative(),
|
|
21
|
+
/** How many distinct test files they are in. */
|
|
22
|
+
files: z.number().int().nonnegative(),
|
|
23
|
+
/**
|
|
24
|
+
* Each resource option whose default is a function of the test plan, with its value and where that came from; empty
|
|
25
|
+
* when the run has none.
|
|
26
|
+
*/
|
|
27
|
+
options: z.array(planOptionSchema),
|
|
28
|
+
});
|
|
29
|
+
/** The plan a run records: with a counted test plan, its counts and `options`; none for a run that counted nothing. */
|
|
30
|
+
export function recordedPlan(testPlan, options) {
|
|
31
|
+
return testPlan.kind === "counted"
|
|
32
|
+
? { tests: testPlan.tests, files: testPlan.files, options: options.map((option) => ({ ...option })) }
|
|
33
|
+
: undefined;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The plan as `vitest` says it before the run: `Running 65 tests in 19 files; resources.<key>.<option> 5 (default)`,
|
|
37
|
+
* each option with where its value came from, or `Running 65 tests in 19 files` without one.
|
|
38
|
+
*/
|
|
39
|
+
export function testPlanLine(plan) {
|
|
40
|
+
return `Running ${testPlanText(plan)}`;
|
|
41
|
+
}
|
|
42
|
+
/** The plan as a phrase: `65 tests in 19 files; resources.<key>.<option> 5 (--<prefix>-<option>)`. */
|
|
43
|
+
export function testPlanText(plan) {
|
|
44
|
+
return [formatPlan(plan), ...plan.options.map(planOptionText)].join("; ");
|
|
45
|
+
}
|
|
46
|
+
/** An option as the plan names it: its key path, its value, and where that came from, a flag by its spelling. */
|
|
47
|
+
function planOptionText({ path, value, from }) {
|
|
48
|
+
return `${path} ${String(value)} (${fromText(path, from)})`;
|
|
49
|
+
}
|
|
50
|
+
function fromText(path, from) {
|
|
51
|
+
switch (from) {
|
|
52
|
+
case "flag":
|
|
53
|
+
return RESOURCE_FLAGS.find(({ resource, option }) => optionKeyPath(resource, option) === path)?.flag ?? "a flag";
|
|
54
|
+
case "file":
|
|
55
|
+
return CONFIG_FILE_NAME;
|
|
56
|
+
case "default":
|
|
57
|
+
return "default";
|
|
58
|
+
}
|
|
59
|
+
}
|