@cnc-tools/storm 0.9.1 → 0.11.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 -2
- package/dist/application.d.ts +5 -5
- package/dist/application.js +11 -9
- package/dist/bin/storm.js +32 -20
- package/dist/build-info.js +1 -1
- package/dist/chunks/chunk-3ZZVZPMG.js +10 -0
- package/dist/chunks/{chunk-WV6WQFC6.js → chunk-4EU4AH7E.js} +150 -26
- package/dist/chunks/chunk-4PRAB24Y.js +4400 -0
- package/dist/chunks/chunk-AMTYHUYB.js +257 -0
- package/dist/chunks/chunk-ETCZ6WP7.js +431 -0
- package/dist/chunks/chunk-FVMQKYTT.js +10 -0
- package/dist/chunks/chunk-GRMD7G4J.js +1267 -0
- package/dist/chunks/chunk-ICB4BZJX.js +22 -0
- package/dist/chunks/chunk-KR7WIYLG.js +2184 -0
- package/dist/chunks/chunk-L4ZPMSKQ.js +808 -0
- package/dist/chunks/chunk-NPPJ57W7.js +569 -0
- package/dist/chunks/chunk-O4BUT7BE.js +3361 -0
- package/dist/chunks/chunk-OJOKQRM6.js +1457 -0
- package/dist/chunks/chunk-SLNKW4ZM.js +40 -0
- package/dist/chunks/chunk-TRFEAYNC.js +1952 -0
- package/dist/chunks/chunk-VZZTHCBW.js +93 -0
- package/dist/chunks/chunk-WNIQA5J6.js +19 -0
- package/dist/chunks/chunk-WSIF7SR6.js +10 -0
- package/dist/chunks/{live-app-X3PW2W42.js → live-app-LOGYUBKB.js} +73 -20
- 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 +28 -44
- package/dist/commands/exec/cleanup.js +25 -55
- package/dist/commands/exec/command.d.ts +73 -545
- package/dist/commands/exec/command.js +65 -25
- 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 +49 -42
- package/dist/commands/exec/metadata.d.ts +0 -65
- package/dist/commands/exec/metadata.js +2 -61
- 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 +47 -75
- package/dist/commands/exec/plan-run.d.ts +148 -0
- package/dist/commands/exec/plan-run.js +121 -0
- package/dist/commands/exec/progress.d.ts +26 -16
- package/dist/commands/exec/progress.js +63 -42
- 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-command.d.ts +87 -167
- package/dist/commands/exec/run-command.js +296 -418
- package/dist/commands/exec/run-metadata.d.ts +20 -43
- package/dist/commands/exec/run-metadata.js +18 -37
- package/dist/commands/exec/test-plan.d.ts +11 -0
- package/dist/commands/exec/test-plan.js +39 -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/view.d.ts +5 -7
- package/dist/commands/exec/view.js +22 -14
- package/dist/commands/exec/waterfall.d.ts +4 -9
- package/dist/commands/exec/waterfall.js +22 -26
- 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 +11 -6
- package/dist/commands/runs/facts.js +27 -15
- package/dist/commands/runs/list/command.d.ts +15 -8
- package/dist/commands/runs/list/command.js +39 -32
- package/dist/commands/runs/list/metadata.d.ts +16 -14
- package/dist/commands/runs/list/metadata.js +17 -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 +46 -41
- package/dist/commands/runs/logs/metadata.d.ts +17 -15
- package/dist/commands/runs/logs/metadata.js +20 -18
- package/dist/commands/runs/past-run.d.ts +3 -33
- package/dist/commands/runs/past-run.js +3 -52
- package/dist/commands/runs/show/command.d.ts +57 -42
- package/dist/commands/runs/show/command.js +93 -82
- package/dist/commands/runs/show/metadata.d.ts +20 -18
- package/dist/commands/runs/show/metadata.js +20 -18
- 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 +95 -560
- package/dist/commands/vitest/command.js +84 -100
- package/dist/commands/vitest/metadata.d.ts +0 -65
- package/dist/commands/vitest/metadata.js +2 -41
- package/dist/commands/vitest/outcomes.d.ts +44 -274
- package/dist/commands/vitest/outcomes.js +7 -14
- package/dist/config/credential-resolver.d.ts +134 -0
- package/dist/config/credential-resolver.js +70 -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 +60 -29
- package/dist/context.js +32 -13
- package/dist/core/before-run.d.ts +38 -0
- package/dist/core/before-run.js +44 -0
- package/dist/core/definition-lookup.d.ts +22 -0
- package/dist/core/definition-lookup.js +34 -0
- package/dist/core/events.d.ts +59 -64
- package/dist/core/gateways.d.ts +23 -164
- package/dist/core/index.d.ts +14 -15
- package/dist/core/index.js +13 -11
- package/dist/core/launcher-supplies.d.ts +11 -0
- package/dist/core/launcher-supplies.js +28 -0
- package/dist/core/live/terminal-command-gateway.d.ts +8 -0
- package/dist/core/live/terminal-command-gateway.js +49 -0
- package/dist/core/payload.d.ts +13 -14
- package/dist/core/payload.js +9 -8
- package/dist/core/presentations.d.ts +38 -37
- package/dist/core/presentations.js +48 -56
- package/dist/core/reports.d.ts +5 -0
- package/dist/core/reports.js +13 -0
- package/dist/core/resource-registry.d.ts +38 -0
- package/dist/core/resource-registry.js +30 -0
- package/dist/core/resource-reports.d.ts +69 -0
- package/dist/core/resource-reports.js +67 -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 +97 -84
- package/dist/core/resources.js +166 -165
- package/dist/core/run-state.d.ts +30 -42
- package/dist/core/run-state.js +56 -60
- package/dist/core/run.d.ts +83 -90
- package/dist/core/run.js +109 -155
- package/dist/core/state-directory.js +4 -3
- package/dist/core/timeline.d.ts +42 -24
- package/dist/core/timeline.js +46 -27
- package/dist/core/timing.d.ts +3 -3
- package/dist/core/timing.js +1 -1
- package/dist/credential/events.d.ts +20 -0
- package/dist/credential/events.js +4 -0
- package/dist/credential/gateways.d.ts +1 -80
- package/dist/credential/index.d.ts +4 -5
- package/dist/credential/index.js +8 -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 +44 -75
- package/dist/credential/source.js +33 -28
- package/dist/credential/target.d.ts +1 -1
- package/dist/extension-commands.d.ts +20 -0
- package/dist/extension-commands.js +27 -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/story/command-tree.d.ts +6 -0
- package/dist/extensions/story/command-tree.js +21 -0
- package/dist/extensions/story/commands/app.d.ts +23 -0
- package/dist/extensions/story/commands/app.js +5 -0
- package/dist/extensions/story/commands/run/command.d.ts +211 -0
- package/dist/extensions/story/commands/run/command.js +259 -0
- package/dist/extensions/story/commands/run/metadata.d.ts +4 -0
- package/dist/extensions/story/commands/run/metadata.js +8 -0
- package/dist/extensions/story/commands/run/outcomes.d.ts +101 -0
- package/dist/extensions/story/commands/run/outcomes.js +73 -0
- package/dist/extensions/story/commands/tree.d.ts +2 -0
- package/dist/extensions/story/commands/tree.js +6 -0
- package/dist/extensions/story/extension.d.ts +2 -0
- package/dist/extensions/story/extension.js +8 -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 +20 -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/{resources/testserver/commands → extensions/testserver/commands/pool}/create/command.js +112 -141
- 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/{resources/testserver/commands → extensions/testserver/commands/pool}/list/command.js +34 -28
- package/dist/extensions/testserver/commands/pool/list/metadata.d.ts +11 -0
- package/dist/{resources/testserver/commands → extensions/testserver/commands/pool}/list/metadata.js +7 -5
- 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 +30 -0
- package/dist/extensions/testserver/vitest/config.js +41 -0
- package/dist/{vitest → extensions/testserver/vitest}/container-scope.d.ts +25 -14
- package/dist/{vitest → extensions/testserver/vitest}/container-scope.js +55 -17
- 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 +66 -29
- package/dist/{vitest → extensions/testserver/vitest}/diagnostics.js +146 -50
- package/dist/{vitest → extensions/testserver/vitest}/fixtures.d.ts +7 -5
- package/dist/{vitest → extensions/testserver/vitest}/fixtures.js +69 -26
- 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 +144 -0
- package/dist/extensions.js +41 -0
- package/dist/forward-sigterm.d.ts +8 -0
- package/dist/forward-sigterm.js +18 -0
- package/dist/help-logo.js +5 -5
- package/dist/launch.js +46 -0
- package/dist/launcher-resolvers/index.d.ts +2 -0
- package/dist/launcher-resolvers/index.js +8 -0
- package/dist/launcher-resolvers/local-services.d.ts +57 -0
- package/dist/launcher-resolvers/local-services.js +7 -0
- package/dist/live-app.js +12 -7
- package/dist/local-services.d.ts +19 -0
- package/dist/local-services.js +37 -0
- package/dist/presentation.js +2 -2
- package/dist/run-directory/gateways.d.ts +167 -0
- package/dist/run-directory/gateways.js +2 -0
- package/dist/run-directory/index.d.ts +8 -0
- package/dist/run-directory/index.js +13 -0
- package/dist/run-directory/plan.d.ts +35 -0
- package/dist/run-directory/plan.js +24 -0
- package/dist/run-directory/reader.d.ts +70 -0
- package/dist/run-directory/reader.js +51 -0
- package/dist/run-directory/recording.d.ts +92 -0
- package/dist/run-directory/recording.js +85 -0
- package/dist/run-directory/run-collector.d.ts +36 -0
- package/dist/{commands/exec → run-directory}/run-collector.js +10 -12
- package/dist/{core → run-directory}/run-directory.d.ts +13 -14
- package/dist/{core → run-directory}/run-directory.js +11 -11
- package/dist/{commands/exec → run-directory}/run-record.d.ts +92 -61
- package/dist/run-directory/run-record.js +209 -0
- package/dist/run-directory/timeline-facts.d.ts +53 -0
- package/dist/run-directory/timeline-facts.js +76 -0
- package/dist/runner/base.js +1 -1
- package/dist/runner/context.js +1 -1
- package/dist/runner/events.d.ts +6 -5
- 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 +13 -17
- package/dist/runner/index.js +10 -14
- 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 +40 -17
- package/dist/runner/prepare.js +17 -11
- package/dist/runner/ready.js +2 -2
- package/dist/runner/recipe.d.ts +38 -20
- package/dist/runner/recipe.js +31 -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 +21 -14
- package/dist/runner/scope.js +12 -10
- package/dist/runner/secrets.js +1 -1
- package/dist/runner/session.d.ts +100 -0
- package/dist/runner/session.js +109 -0
- package/dist/runner/snapshot-key.d.ts +1 -1
- package/dist/runner/snapshot-key.js +4 -4
- package/dist/runner/snapshot-save.d.ts +3 -2
- package/dist/runner/snapshot-save.js +8 -7
- package/dist/sdk/extension/ci.d.ts +2 -0
- package/dist/sdk/extension/ci.js +6 -0
- package/dist/sdk/extension/commands.d.ts +69 -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 +16 -0
- package/dist/sdk/extension/index.js +40 -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 +212 -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/story/align.d.ts +1 -1
- package/dist/story/align.js +1 -1
- package/dist/story/command-line.d.ts +6 -16
- package/dist/story/command-line.js +11 -23
- package/dist/story/errors.d.ts +1 -1
- package/dist/story/errors.js +1 -1
- package/dist/story/host.d.ts +1 -1
- package/dist/story/host.js +2 -2
- package/dist/story/index.d.ts +2 -2
- package/dist/story/index.js +4 -3
- package/dist/story/launch.d.ts +70 -0
- package/dist/story/launch.js +77 -0
- package/dist/story/report.d.ts +2 -2
- package/dist/story/report.js +3 -4
- package/dist/story/settle.d.ts +7 -7
- package/dist/story/settle.js +5 -5
- package/dist/story/start.d.ts +2 -2
- 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/vendor/testserver-sdk/container/container.d.ts +199 -0
- package/dist/vendor/testserver-sdk/container/container.js +458 -0
- 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 +102 -0
- package/dist/vendor/testserver-sdk/testserver/failure.js +109 -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/vitest/config.d.ts +2 -28
- package/dist/vitest/config.js +6 -36
- 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 +52 -23
- package/skills/overview.md +12 -9
- package/skills/read-run-output.md +26 -3
- package/skills/testserver-builds.md +8 -8
- package/dist/chunks/chunk-5CQCRX2L.js +0 -5768
- package/dist/chunks/chunk-5U5Q6VZR.js +0 -556
- package/dist/chunks/chunk-7O6UN63H.js +0 -63
- package/dist/chunks/chunk-NX55IJ5S.js +0 -1842
- package/dist/chunks/chunk-OCZJE5XV.js +0 -910
- package/dist/chunks/chunk-RRQ2ZGSE.js +0 -1512
- package/dist/chunks/chunk-S5NAIZYS.js +0 -13
- package/dist/chunks/chunk-UHO5OCEX.js +0 -360
- package/dist/chunks/chunk-WBIHJM7D.js +0 -188
- package/dist/combine-errors.d.ts +0 -11
- package/dist/combine-errors.js +0 -19
- package/dist/commands/exec/run-collector.d.ts +0 -30
- package/dist/commands/exec/run-record.js +0 -152
- 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/mint.d.ts +0 -10
- package/dist/core/mint.js +0 -14
- package/dist/core/presentation.d.ts +0 -87
- package/dist/core/presentation.js +0 -5
- package/dist/core/provider.d.ts +0 -79
- package/dist/core/provider.js +0 -5
- package/dist/resource-commands.d.ts +0 -13
- package/dist/resource-commands.js +0 -22
- 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-tree.d.ts +0 -4
- package/dist/resources/testserver/command-tree.js +0 -12
- 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/metadata.d.ts +0 -31
- package/dist/resources/testserver/commands/create/metadata.js +0 -53
- package/dist/resources/testserver/commands/list/metadata.d.ts +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 -32
- 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 -702
- package/dist/resources.js +0 -83
- package/dist/sdk/container/api-request.js +0 -46
- package/dist/sdk/container/container.d.ts +0 -144
- package/dist/sdk/container/container.js +0 -346
- 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/host.d.ts +0 -2
- package/dist/sdk/host.js +0 -7
- 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/story/mode.d.ts +0 -17
- package/dist/story/mode.js +0 -21
- package/dist/vitest/sandbox.d.ts +0 -22
- package/dist/vitest/sandbox.js +0 -41
- /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/{core → run-directory}/live/run-directory-gateway.d.ts +0 -0
- /package/dist/{core → run-directory}/live/run-directory-gateway.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
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// The GitHub fixture repository resource's published export, `@vercel/storm/github`: its resource factory, which a
|
|
2
|
+
// config file calls to make the resource under `resources.githubFixtureRepo` (`githubFixtureRepo({ … })`), and the
|
|
3
|
+
// types of its entry and options. Its definition is `definition.ts`. It loads no Clinkr.
|
|
4
|
+
import { resourceFactory } from "../../sdk/extension/index.js";
|
|
5
|
+
import { githubFixtureRepoDefinition } from "./definition.js";
|
|
6
|
+
/**
|
|
7
|
+
* The GitHub fixture repository resource, for `resources.githubFixtureRepo` in `storm.config.ts`: one standing GitHub
|
|
8
|
+
* repository a run hands its command, with a token for it and a branch prefix of the run's own.
|
|
9
|
+
*
|
|
10
|
+
* ```ts
|
|
11
|
+
* resources: { githubFixtureRepo: githubFixtureRepo({ repo: "owner/name", tokenEnv: "CNC_GITHUB_FIXTURE_TOKEN" }) }
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* `repo` and `tokenEnv` are required. A run with the resource reads the token from the launcher environment variable
|
|
15
|
+
* `tokenEnv`, checks that the token can read `repo`, picks a run prefix (`run/<UTC timestamp>-<suffix>`), and hands all
|
|
16
|
+
* three to its command in the run payload. Once the command has stopped, the run deletes every branch under the run
|
|
17
|
+
* prefix. With `optional: true`, or `storm exec`'s and `storm vitest`'s `--github-optional`, a run without the token
|
|
18
|
+
* goes on without the repository. A command reads the repository with `readRunPayload().get(githubFixtureRepoPayload)`,
|
|
19
|
+
* from `@vercel/storm/github/payload`; a runner recipe reads its options with `run.get(githubFixtureRepo)`.
|
|
20
|
+
*/
|
|
21
|
+
export const githubFixtureRepo = resourceFactory(githubFixtureRepoDefinition);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { PayloadCheckResult, PayloadContract } from "../../../sdk/run/launcher.ts";
|
|
2
|
+
/** The GitHub fixture repository resource's name: its key under `resources` in the config file and the run payload. */
|
|
3
|
+
export declare const GITHUB_FIXTURE_REPO_NAME = "githubFixtureRepo";
|
|
4
|
+
/**
|
|
5
|
+
* The GitHub fixture repository a run hands its command: the HTTPS URL to clone it from, its `owner/name`, a token
|
|
6
|
+
* for it, and the run prefix (`run/<UTC timestamp>-<suffix>`), the branches under which the run deletes once the
|
|
7
|
+
* command has stopped. The token is test data limited to this repository; storm hides it in what it prints and
|
|
8
|
+
* writes, and the command should too.
|
|
9
|
+
*/
|
|
10
|
+
export interface GitHubFixtureRepoPayload {
|
|
11
|
+
readonly url: string;
|
|
12
|
+
readonly nameWithOwner: string;
|
|
13
|
+
readonly token: string;
|
|
14
|
+
readonly runPrefix: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The GitHub fixture repository's payload check: whether `section` is a `GitHubFixtureRepoPayload`, each field a
|
|
18
|
+
* non-empty string. A refusal names the field, never its value, since the token is one.
|
|
19
|
+
*/
|
|
20
|
+
export declare function checkGitHubFixtureRepoPayload(section: unknown): PayloadCheckResult<GitHubFixtureRepoPayload>;
|
|
21
|
+
/**
|
|
22
|
+
* The GitHub fixture repository's payload contract: its name and its payload check, which its resource takes as its
|
|
23
|
+
* `payload`, and a command reads its section by: `readRunPayload().get(githubFixtureRepoPayload)`.
|
|
24
|
+
*/
|
|
25
|
+
export declare const githubFixtureRepoPayload: PayloadContract<GitHubFixtureRepoPayload> & {
|
|
26
|
+
readonly name: typeof GITHUB_FIXTURE_REPO_NAME;
|
|
27
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// The GitHub fixture repository resource's payload contract, `@vercel/storm/github/payload`: its name, its section of
|
|
2
|
+
// the run payload, what a run with it hands its command under `resources.githubFixtureRepo`, and its payload check, so
|
|
3
|
+
// a command reads the section with `readRunPayload().get(githubFixtureRepoPayload)` without loading the resource. Its
|
|
4
|
+
// definition (`definition.ts`) takes it as its `payload`. It loads no other file at run time, and the SDK's launcher
|
|
5
|
+
// entry only for types.
|
|
6
|
+
/** The GitHub fixture repository resource's name: its key under `resources` in the config file and the run payload. */
|
|
7
|
+
export const GITHUB_FIXTURE_REPO_NAME = "githubFixtureRepo";
|
|
8
|
+
/**
|
|
9
|
+
* The GitHub fixture repository's payload check: whether `section` is a `GitHubFixtureRepoPayload`, each field a
|
|
10
|
+
* non-empty string. A refusal names the field, never its value, since the token is one.
|
|
11
|
+
*/
|
|
12
|
+
export function checkGitHubFixtureRepoPayload(section) {
|
|
13
|
+
if (!isObject(section))
|
|
14
|
+
return { ok: false, at: [], problem: "must be an object" };
|
|
15
|
+
const { url, nameWithOwner, token, runPrefix } = section;
|
|
16
|
+
if (!filled(url))
|
|
17
|
+
return refused("url");
|
|
18
|
+
if (!filled(nameWithOwner))
|
|
19
|
+
return refused("nameWithOwner");
|
|
20
|
+
if (!filled(token))
|
|
21
|
+
return refused("token");
|
|
22
|
+
if (!filled(runPrefix))
|
|
23
|
+
return refused("runPrefix");
|
|
24
|
+
return { ok: true, value: { url, nameWithOwner, token, runPrefix } };
|
|
25
|
+
}
|
|
26
|
+
/** Whether `value` is a JSON object: not `null`, and not an array. */
|
|
27
|
+
function isObject(value) {
|
|
28
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
29
|
+
}
|
|
30
|
+
/** Whether `value` is a non-empty string. */
|
|
31
|
+
function filled(value) {
|
|
32
|
+
return typeof value === "string" && value !== "";
|
|
33
|
+
}
|
|
34
|
+
/** The check's refusal of `field`. */
|
|
35
|
+
function refused(field) {
|
|
36
|
+
return { ok: false, at: [field], problem: "must be a non-empty string" };
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The GitHub fixture repository's payload contract: its name and its payload check, which its resource takes as its
|
|
40
|
+
* `payload`, and a command reads its section by: `readRunPayload().get(githubFixtureRepoPayload)`.
|
|
41
|
+
*/
|
|
42
|
+
export const githubFixtureRepoPayload = Object.freeze({ name: GITHUB_FIXTURE_REPO_NAME, payload: checkGitHubFixtureRepoPayload });
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { GitHubFixtureRepoGateway } from "./gateways.ts";
|
|
2
|
+
import type { Clock } from "../../sdk/extension/index.ts";
|
|
3
|
+
/**
|
|
4
|
+
* What the GitHub fixture repository reaches the outside through: the launcher environment, where its token is,
|
|
5
|
+
* GitHub's REST API, the random suffix a run prefix ends with, and the clock its time comes from.
|
|
6
|
+
*/
|
|
7
|
+
export interface GitHubWorld {
|
|
8
|
+
/** The launcher environment, which holds the token in the variable its `tokenEnv` names. */
|
|
9
|
+
readonly env: Readonly<Record<string, string | undefined>>;
|
|
10
|
+
/** GitHub's REST API. */
|
|
11
|
+
readonly githubFixtureRepos: GitHubFixtureRepoGateway;
|
|
12
|
+
/** A short random suffix of lowercase letters and digits, a DI seam: a run prefix ends with one. */
|
|
13
|
+
readonly randomSuffix: () => string;
|
|
14
|
+
readonly clock: Clock;
|
|
15
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { StoryCommandApp } from "./commands/app.ts";
|
|
2
|
+
/**
|
|
3
|
+
* The story extension's commands, which take `StoryCommandApp` (`commands/app.ts`), projected from the launcher's app:
|
|
4
|
+
* the vitest and terminal local services, the launcher's environment and directory, and where the exit status goes.
|
|
5
|
+
*/
|
|
6
|
+
export declare const storyExtensionCommands: import("../../sdk/extension/commands.ts").ExtensionCommands<StoryCommandApp>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// The story extension's own commands, `run`, which the registry mounts as `storm story`. It loads only Clinkr, the
|
|
2
|
+
// extension API's light entry and the tree's declaration, so `src/extension-commands.ts` mounts it for help without
|
|
3
|
+
// loading anything that runs.
|
|
4
|
+
import { defineExtensionCommands } from "../../sdk/extension/commands.js";
|
|
5
|
+
import { storyCommands } from "./commands/tree.js";
|
|
6
|
+
/**
|
|
7
|
+
* The story extension's commands, which take `StoryCommandApp` (`commands/app.ts`), projected from the launcher's app:
|
|
8
|
+
* the vitest and terminal local services, the launcher's environment and directory, and where the exit status goes.
|
|
9
|
+
*/
|
|
10
|
+
export const storyExtensionCommands = defineExtensionCommands({
|
|
11
|
+
description: "Run a package's stories on this machine, recording or comparing each story's tool calls.",
|
|
12
|
+
tree: storyCommands,
|
|
13
|
+
directory: "extensions/story/commands",
|
|
14
|
+
app: (launcherApp) => ({
|
|
15
|
+
vitest: launcherApp.vitest,
|
|
16
|
+
terminal: launcherApp.terminal,
|
|
17
|
+
env: launcherApp.env,
|
|
18
|
+
cwd: launcherApp.cwd,
|
|
19
|
+
exit: launcherApp.exit,
|
|
20
|
+
}),
|
|
21
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { TerminalService, VitestService } from "../../../launcher-resolvers/index.ts";
|
|
2
|
+
/** Where a command records the status storm exits with, past Clinkr's 0 or 1: the code of the command it ran. */
|
|
3
|
+
export interface StoryExit {
|
|
4
|
+
status: number | undefined;
|
|
5
|
+
}
|
|
6
|
+
/** What `storm story run` takes: the local services it uses, and the launcher's environment and directory. */
|
|
7
|
+
export interface StoryCommandApp {
|
|
8
|
+
/** Finds `vitest` from the launcher's directory. */
|
|
9
|
+
readonly vitest: VitestService;
|
|
10
|
+
/** Runs `vitest run` in the launcher's terminal. */
|
|
11
|
+
readonly terminal: TerminalService;
|
|
12
|
+
/** The launcher environment: the base of Vitest's environment, and whether `CI` is set. */
|
|
13
|
+
readonly env: Readonly<Record<string, string | undefined>>;
|
|
14
|
+
/** The launcher's working directory, where Vitest runs and a relative `--bin` program resolves. */
|
|
15
|
+
readonly cwd: string;
|
|
16
|
+
/** Where the command records Vitest's exit status, which storm exits with. */
|
|
17
|
+
readonly exit: StoryExit;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* What the story extension's mount reads of the launcher's app: what its commands take, which the mount copies field by
|
|
21
|
+
* field, so a command never holds the launcher's whole app.
|
|
22
|
+
*/
|
|
23
|
+
export type StoryLauncherApp = StoryCommandApp;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// The app the story extension's commands take, and what their mount reads of the launcher's app to build it
|
|
2
|
+
// (`StoryLauncherApp`), stated here so they import nothing from the composition layer. The extension's mount
|
|
3
|
+
// (`../command-tree.ts`) projects the launcher's app into this one, and the launcher checks its app against
|
|
4
|
+
// `StoryLauncherApp`.
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* `storm story run`: runs `vitest run --project <project>…` on this machine with the story launch in `STORM_STORY`
|
|
4
|
+
* (`story/launch.ts`), which hands the stories the answers level and the executable `--bin` names, resolved here, once
|
|
5
|
+
* (`resolveStoryExecutable`). It finds
|
|
6
|
+
* `vitest` on this machine as `storm vitest` does, runs it in the launcher's terminal with the launcher's
|
|
7
|
+
* environment and the launch, and exits with its code. Every argument that isn't one of its flags goes to `vitest run`
|
|
8
|
+
* unchanged, in order, after the projects; vitest's own dash options come after `--`, which Clinkr reads into the same
|
|
9
|
+
* `args`.
|
|
10
|
+
*/
|
|
11
|
+
declare const _default: import("@vercel/clinkr").CommandDefinition<z.ZodObject<{
|
|
12
|
+
project: z.ZodArray<z.ZodString>;
|
|
13
|
+
answers: z.ZodOptional<z.ZodEnum<{
|
|
14
|
+
accept: "accept";
|
|
15
|
+
add: "add";
|
|
16
|
+
check: "check";
|
|
17
|
+
}>>;
|
|
18
|
+
bin: z.ZodOptional<z.ZodString>;
|
|
19
|
+
args: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
20
|
+
}, z.core.$strip>, import("@vercel/clinkr").Outcomes<{
|
|
21
|
+
ran: z.ZodObject<{
|
|
22
|
+
projects: z.ZodArray<z.ZodString>;
|
|
23
|
+
answers: z.ZodEnum<{
|
|
24
|
+
accept: "accept";
|
|
25
|
+
add: "add";
|
|
26
|
+
check: "check";
|
|
27
|
+
}>;
|
|
28
|
+
bin: z.ZodNullable<z.ZodObject<{
|
|
29
|
+
file: z.ZodString;
|
|
30
|
+
args: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
31
|
+
}, z.core.$strict>>;
|
|
32
|
+
vitest: z.ZodString;
|
|
33
|
+
args: z.ZodArray<z.ZodString>;
|
|
34
|
+
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
35
|
+
signal: z.ZodNullable<z.ZodString>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
}, {
|
|
38
|
+
ran: unknown;
|
|
39
|
+
}, {
|
|
40
|
+
vitestNotFound: z.ZodObject<{
|
|
41
|
+
cwd: z.ZodString;
|
|
42
|
+
searched: z.ZodArray<z.ZodString>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
spawnFailed: z.ZodObject<{
|
|
45
|
+
projects: z.ZodArray<z.ZodString>;
|
|
46
|
+
answers: z.ZodEnum<{
|
|
47
|
+
accept: "accept";
|
|
48
|
+
add: "add";
|
|
49
|
+
check: "check";
|
|
50
|
+
}>;
|
|
51
|
+
bin: z.ZodNullable<z.ZodObject<{
|
|
52
|
+
file: z.ZodString;
|
|
53
|
+
args: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
54
|
+
}, z.core.$strict>>;
|
|
55
|
+
vitest: z.ZodString;
|
|
56
|
+
args: z.ZodArray<z.ZodString>;
|
|
57
|
+
message: z.ZodString;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
}, {
|
|
60
|
+
readonly vitestNotFound: {
|
|
61
|
+
readonly exitCode: 1;
|
|
62
|
+
readonly description: "No directory from the working directory up to the repository's root, or the filesystem's root outside a repository, has node_modules/.bin/vitest, so no story ran.";
|
|
63
|
+
readonly schema: z.ZodObject<{
|
|
64
|
+
cwd: z.ZodString;
|
|
65
|
+
searched: z.ZodArray<z.ZodString>;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
readonly render: ({ cwd, searched }: {
|
|
68
|
+
cwd: string;
|
|
69
|
+
searched: string[];
|
|
70
|
+
}) => {
|
|
71
|
+
message: string;
|
|
72
|
+
next: {
|
|
73
|
+
type: "text";
|
|
74
|
+
text: string;
|
|
75
|
+
}[];
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
readonly spawnFailed: {
|
|
79
|
+
readonly exitCode: 1;
|
|
80
|
+
readonly description: "vitest couldn't start, so no story ran.";
|
|
81
|
+
readonly schema: z.ZodObject<{
|
|
82
|
+
projects: z.ZodArray<z.ZodString>;
|
|
83
|
+
answers: z.ZodEnum<{
|
|
84
|
+
accept: "accept";
|
|
85
|
+
add: "add";
|
|
86
|
+
check: "check";
|
|
87
|
+
}>;
|
|
88
|
+
bin: z.ZodNullable<z.ZodObject<{
|
|
89
|
+
file: z.ZodString;
|
|
90
|
+
args: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
91
|
+
}, z.core.$strict>>;
|
|
92
|
+
vitest: z.ZodString;
|
|
93
|
+
args: z.ZodArray<z.ZodString>;
|
|
94
|
+
message: z.ZodString;
|
|
95
|
+
}, z.core.$strip>;
|
|
96
|
+
readonly render: ({ vitest, message }: {
|
|
97
|
+
projects: string[];
|
|
98
|
+
answers: "accept" | "add" | "check";
|
|
99
|
+
bin: {
|
|
100
|
+
file: string;
|
|
101
|
+
args: readonly string[];
|
|
102
|
+
} | null;
|
|
103
|
+
vitest: string;
|
|
104
|
+
args: string[];
|
|
105
|
+
message: string;
|
|
106
|
+
}) => {
|
|
107
|
+
message: string;
|
|
108
|
+
rows: [string, string][];
|
|
109
|
+
next: {
|
|
110
|
+
type: "text";
|
|
111
|
+
text: string;
|
|
112
|
+
}[];
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
}>, import("@vercel/clinkr").OutcomeOf<import("@vercel/clinkr").Outcomes<{
|
|
116
|
+
ran: z.ZodObject<{
|
|
117
|
+
projects: z.ZodArray<z.ZodString>;
|
|
118
|
+
answers: z.ZodEnum<{
|
|
119
|
+
accept: "accept";
|
|
120
|
+
add: "add";
|
|
121
|
+
check: "check";
|
|
122
|
+
}>;
|
|
123
|
+
bin: z.ZodNullable<z.ZodObject<{
|
|
124
|
+
file: z.ZodString;
|
|
125
|
+
args: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
126
|
+
}, z.core.$strict>>;
|
|
127
|
+
vitest: z.ZodString;
|
|
128
|
+
args: z.ZodArray<z.ZodString>;
|
|
129
|
+
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
130
|
+
signal: z.ZodNullable<z.ZodString>;
|
|
131
|
+
}, z.core.$strip>;
|
|
132
|
+
}, {
|
|
133
|
+
ran: unknown;
|
|
134
|
+
}, {
|
|
135
|
+
vitestNotFound: z.ZodObject<{
|
|
136
|
+
cwd: z.ZodString;
|
|
137
|
+
searched: z.ZodArray<z.ZodString>;
|
|
138
|
+
}, z.core.$strip>;
|
|
139
|
+
spawnFailed: z.ZodObject<{
|
|
140
|
+
projects: z.ZodArray<z.ZodString>;
|
|
141
|
+
answers: z.ZodEnum<{
|
|
142
|
+
accept: "accept";
|
|
143
|
+
add: "add";
|
|
144
|
+
check: "check";
|
|
145
|
+
}>;
|
|
146
|
+
bin: z.ZodNullable<z.ZodObject<{
|
|
147
|
+
file: z.ZodString;
|
|
148
|
+
args: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
149
|
+
}, z.core.$strict>>;
|
|
150
|
+
vitest: z.ZodString;
|
|
151
|
+
args: z.ZodArray<z.ZodString>;
|
|
152
|
+
message: z.ZodString;
|
|
153
|
+
}, z.core.$strip>;
|
|
154
|
+
}, {
|
|
155
|
+
readonly vitestNotFound: {
|
|
156
|
+
readonly exitCode: 1;
|
|
157
|
+
readonly description: "No directory from the working directory up to the repository's root, or the filesystem's root outside a repository, has node_modules/.bin/vitest, so no story ran.";
|
|
158
|
+
readonly schema: z.ZodObject<{
|
|
159
|
+
cwd: z.ZodString;
|
|
160
|
+
searched: z.ZodArray<z.ZodString>;
|
|
161
|
+
}, z.core.$strip>;
|
|
162
|
+
readonly render: ({ cwd, searched }: {
|
|
163
|
+
cwd: string;
|
|
164
|
+
searched: string[];
|
|
165
|
+
}) => {
|
|
166
|
+
message: string;
|
|
167
|
+
next: {
|
|
168
|
+
type: "text";
|
|
169
|
+
text: string;
|
|
170
|
+
}[];
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
readonly spawnFailed: {
|
|
174
|
+
readonly exitCode: 1;
|
|
175
|
+
readonly description: "vitest couldn't start, so no story ran.";
|
|
176
|
+
readonly schema: z.ZodObject<{
|
|
177
|
+
projects: z.ZodArray<z.ZodString>;
|
|
178
|
+
answers: z.ZodEnum<{
|
|
179
|
+
accept: "accept";
|
|
180
|
+
add: "add";
|
|
181
|
+
check: "check";
|
|
182
|
+
}>;
|
|
183
|
+
bin: z.ZodNullable<z.ZodObject<{
|
|
184
|
+
file: z.ZodString;
|
|
185
|
+
args: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
186
|
+
}, z.core.$strict>>;
|
|
187
|
+
vitest: z.ZodString;
|
|
188
|
+
args: z.ZodArray<z.ZodString>;
|
|
189
|
+
message: z.ZodString;
|
|
190
|
+
}, z.core.$strip>;
|
|
191
|
+
readonly render: ({ vitest, message }: {
|
|
192
|
+
projects: string[];
|
|
193
|
+
answers: "accept" | "add" | "check";
|
|
194
|
+
bin: {
|
|
195
|
+
file: string;
|
|
196
|
+
args: readonly string[];
|
|
197
|
+
} | null;
|
|
198
|
+
vitest: string;
|
|
199
|
+
args: string[];
|
|
200
|
+
message: string;
|
|
201
|
+
}) => {
|
|
202
|
+
message: string;
|
|
203
|
+
rows: [string, string][];
|
|
204
|
+
next: {
|
|
205
|
+
type: "text";
|
|
206
|
+
text: string;
|
|
207
|
+
}[];
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
}>>, import("../app.ts").StoryCommandApp, false>;
|
|
211
|
+
export default _default;
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import {
|
|
2
|
+
storyCommands
|
|
3
|
+
} from "../../../../chunks/chunk-WSIF7SR6.js";
|
|
4
|
+
import "../../../../chunks/chunk-ICB4BZJX.js";
|
|
5
|
+
import {
|
|
6
|
+
isCi
|
|
7
|
+
} from "../../../../chunks/chunk-AMTYHUYB.js";
|
|
8
|
+
import {
|
|
9
|
+
defineOutcomes,
|
|
10
|
+
renderOutcome
|
|
11
|
+
} from "../../../../chunks/chunk-4PRAB24Y.js";
|
|
12
|
+
|
|
13
|
+
// src/extensions/story/commands/run/command.ts
|
|
14
|
+
import { z as z3 } from "zod";
|
|
15
|
+
|
|
16
|
+
// src/story/command-line.ts
|
|
17
|
+
import { isAbsolute, resolve } from "node:path";
|
|
18
|
+
var InvalidCommandLine = class extends Error {
|
|
19
|
+
name = "InvalidCommandLine";
|
|
20
|
+
};
|
|
21
|
+
function splitCommandLine(command) {
|
|
22
|
+
const words = [];
|
|
23
|
+
let word;
|
|
24
|
+
let index = 0;
|
|
25
|
+
const add = (text) => {
|
|
26
|
+
word = (word ?? "") + text;
|
|
27
|
+
};
|
|
28
|
+
while (index < command.length) {
|
|
29
|
+
const char = command[index] ?? "";
|
|
30
|
+
if (/\s/u.test(char)) {
|
|
31
|
+
if (word !== void 0) words.push(word);
|
|
32
|
+
word = void 0;
|
|
33
|
+
index += 1;
|
|
34
|
+
} else if (char === "'") {
|
|
35
|
+
const end = command.indexOf("'", index + 1);
|
|
36
|
+
if (end === -1) throw new InvalidCommandLine(`${JSON.stringify(command)} has an unclosed single quote`);
|
|
37
|
+
add(command.slice(index + 1, end));
|
|
38
|
+
index = end + 1;
|
|
39
|
+
} else if (char === '"') {
|
|
40
|
+
let text = "";
|
|
41
|
+
index += 1;
|
|
42
|
+
while (command[index] !== '"') {
|
|
43
|
+
if (index >= command.length) {
|
|
44
|
+
throw new InvalidCommandLine(`${JSON.stringify(command)} has an unclosed double quote`);
|
|
45
|
+
}
|
|
46
|
+
const next = command[index + 1] ?? "";
|
|
47
|
+
if (command[index] === "\\" && ['"', "\\", "$", "`"].includes(next)) {
|
|
48
|
+
text += next;
|
|
49
|
+
index += 2;
|
|
50
|
+
} else {
|
|
51
|
+
text += command[index] ?? "";
|
|
52
|
+
index += 1;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
add(text);
|
|
56
|
+
index += 1;
|
|
57
|
+
} else if (char === "\\") {
|
|
58
|
+
if (index + 1 >= command.length) throw new InvalidCommandLine(`${JSON.stringify(command)} ends in a backslash`);
|
|
59
|
+
add(command[index + 1] ?? "");
|
|
60
|
+
index += 2;
|
|
61
|
+
} else if ("|&;<>()$`*?[~#".includes(char)) {
|
|
62
|
+
throw new InvalidCommandLine(
|
|
63
|
+
`${JSON.stringify(command)} has ${JSON.stringify(char)} outside quotes, and the harness runs no shell`
|
|
64
|
+
);
|
|
65
|
+
} else {
|
|
66
|
+
add(char);
|
|
67
|
+
index += 1;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
if (word !== void 0) words.push(word);
|
|
71
|
+
return words;
|
|
72
|
+
}
|
|
73
|
+
function resolveStoryExecutable(commandLine, base) {
|
|
74
|
+
const [program, ...args] = splitCommandLine(commandLine);
|
|
75
|
+
if (program === void 0) throw new InvalidCommandLine(`${JSON.stringify(commandLine)} names no program`);
|
|
76
|
+
const file = program.includes("/") && !isAbsolute(program) ? resolve(base, program) : program;
|
|
77
|
+
return { file, args };
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// src/story/launch.ts
|
|
81
|
+
import { z } from "zod";
|
|
82
|
+
var STORY_LAUNCH_VARIABLE = "STORM_STORY";
|
|
83
|
+
var storyAnswersLevelSchema = z.enum(["check", "add", "accept"]);
|
|
84
|
+
var storyExecutableSchema = z.object({ file: z.string().min(1), args: z.array(z.string()).readonly() }).strict();
|
|
85
|
+
var storyLaunchSchema = z.object({
|
|
86
|
+
version: z.literal(1),
|
|
87
|
+
answers: storyAnswersLevelSchema,
|
|
88
|
+
/** The executable `--bin` names (`storyExecutableSchema`); null without `--bin`. */
|
|
89
|
+
bin: storyExecutableSchema.nullable()
|
|
90
|
+
}).strict();
|
|
91
|
+
function storyLaunchEnv(launch) {
|
|
92
|
+
return { [STORY_LAUNCH_VARIABLE]: JSON.stringify(storyLaunchSchema.parse(launch)) };
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// src/extensions/story/commands/run/outcomes.ts
|
|
96
|
+
import { z as z2 } from "zod";
|
|
97
|
+
var launchedShape = {
|
|
98
|
+
/** The Vitest projects it ran, each from a `--project`, in order. */
|
|
99
|
+
projects: z2.array(z2.string()),
|
|
100
|
+
/** The answers level the stories got: `--answers`, or its default, `check` when `CI` is set and `add` elsewhere. */
|
|
101
|
+
answers: storyAnswersLevelSchema,
|
|
102
|
+
/**
|
|
103
|
+
* The executable `--bin` named for the stories to invoke, resolved: its program, a relative one against the working
|
|
104
|
+
* directory, and the words it gets before a story's own; null without `--bin`.
|
|
105
|
+
*/
|
|
106
|
+
bin: storyExecutableSchema.nullable(),
|
|
107
|
+
/** The `vitest` it ran: the nearest `node_modules/.bin/vitest` from the working directory. */
|
|
108
|
+
vitest: z2.string(),
|
|
109
|
+
/** What `vitest` got, after the executable: `run`, a `--project` for each project, then the rest, in order. */
|
|
110
|
+
args: z2.array(z2.string())
|
|
111
|
+
};
|
|
112
|
+
var outcomes = defineOutcomes({
|
|
113
|
+
results: {
|
|
114
|
+
ran: {
|
|
115
|
+
schema: z2.object({
|
|
116
|
+
...launchedShape,
|
|
117
|
+
/** Vitest's exit code; null when a signal ended it. */
|
|
118
|
+
exitCode: z2.number().nullable(),
|
|
119
|
+
/** The signal that ended vitest, such as `SIGINT`; null when it exited. */
|
|
120
|
+
signal: z2.string().nullable()
|
|
121
|
+
}),
|
|
122
|
+
description: "Vitest ran and ended. storm exits with its code, or 128 + n when signal n ended it, whatever this result's exit code.",
|
|
123
|
+
render: () => renderOutcome({})
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
errors: {
|
|
127
|
+
vitestNotFound: {
|
|
128
|
+
exitCode: 1,
|
|
129
|
+
description: "No directory from the working directory up to the repository's root, or the filesystem's root outside a repository, has node_modules/.bin/vitest, so no story ran.",
|
|
130
|
+
schema: z2.object({
|
|
131
|
+
/** The working directory, where vitest would run. */
|
|
132
|
+
cwd: z2.string(),
|
|
133
|
+
/** Every directory searched for `node_modules/.bin/vitest`, nearest first. */
|
|
134
|
+
searched: z2.array(z2.string())
|
|
135
|
+
}),
|
|
136
|
+
render: ({ cwd, searched }) => ({
|
|
137
|
+
message: `Couldn't find vitest for ${cwd} in node_modules/.bin of ${searched.join(", ")}.`,
|
|
138
|
+
next: [
|
|
139
|
+
{
|
|
140
|
+
type: "text",
|
|
141
|
+
text: "Run it from the package that holds the stories, once vitest is installed in its node_modules/.bin or one above it."
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
})
|
|
145
|
+
},
|
|
146
|
+
spawnFailed: {
|
|
147
|
+
exitCode: 1,
|
|
148
|
+
description: "vitest couldn't start, so no story ran.",
|
|
149
|
+
schema: z2.object({
|
|
150
|
+
...launchedShape,
|
|
151
|
+
/** What the OS said. */
|
|
152
|
+
message: z2.string()
|
|
153
|
+
}),
|
|
154
|
+
render: ({ vitest, message }) => ({
|
|
155
|
+
message: `Failed to start vitest. ${/[.!?]$/u.test(message) ? message : `${message}.`}`,
|
|
156
|
+
rows: [["Vitest", vitest]],
|
|
157
|
+
next: [{ type: "text", text: "Fix what the OS said about that vitest, then run it again." }]
|
|
158
|
+
})
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
// src/extensions/story/commands/run/command.ts
|
|
164
|
+
var command_default = storyCommands.define({
|
|
165
|
+
requestSchema: z3.object({
|
|
166
|
+
project: z3.array(z3.string().min(1)).min(1),
|
|
167
|
+
answers: storyAnswersLevelSchema.optional(),
|
|
168
|
+
bin: z3.string().optional(),
|
|
169
|
+
args: z3.array(z3.string()).default([])
|
|
170
|
+
}),
|
|
171
|
+
cli: { positionals: ["args"] },
|
|
172
|
+
help: {
|
|
173
|
+
usages: [
|
|
174
|
+
"--project <PROJECT>... [--answers check|add|accept] [--bin <COMMAND>] [<vitest run args>...] [-- <vitest dash options>...]"
|
|
175
|
+
],
|
|
176
|
+
fields: {
|
|
177
|
+
project: {
|
|
178
|
+
valueLabel: "PROJECT",
|
|
179
|
+
description: "A Vitest project to run, such as a package's story lane; repeat it for several. Required: without it, vitest would run every project, the package's other test lanes among them."
|
|
180
|
+
},
|
|
181
|
+
answers: {
|
|
182
|
+
valueLabel: "LEVEL",
|
|
183
|
+
description: "How much each story may change its recording: check compares and writes nothing; add also rewrites what no longer fits the story (it records new calls, removes calls the story no longer makes, rewrites an unreadable recording and removes orphan recordings), but still fails on a divergence; accept also accepts each divergence as the new observation. Default: check when CI is set (to anything but empty, 0 or false), else add."
|
|
184
|
+
},
|
|
185
|
+
bin: {
|
|
186
|
+
valueLabel: "COMMAND",
|
|
187
|
+
description: "Another executable for the stories to invoke in place of the package's own, such as a port of the tool to another language, against the same recordings. Split as a POSIX shell splits words, with no shell operators or expansions; a relative program resolves against the working directory, a bare name against PATH."
|
|
188
|
+
},
|
|
189
|
+
args: {
|
|
190
|
+
valueLabel: "args",
|
|
191
|
+
description: "What vitest run gets after the projects, unchanged and in order: every argument that isn't one of storm's flags, such as story files, then everything after --, such as -t."
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
examples: [
|
|
195
|
+
{
|
|
196
|
+
argv: "--project story",
|
|
197
|
+
description: "Run the story lane, recording new calls and removing stale ones: add, the default outside CI."
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
argv: "--project story --answers accept",
|
|
201
|
+
description: "Accept every divergence as the new observation, after a deliberate change to what the tool prints."
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
argv: "--project story --answers check --bin ../go/bin/tool",
|
|
205
|
+
description: "Compare a port of the tool against the same recordings, writing nothing."
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
argv: "--project story test/story/list.story.test.ts -- -t lists",
|
|
209
|
+
description: "Run the stories named lists in one story file."
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
},
|
|
213
|
+
response: outcomes,
|
|
214
|
+
validate: ({ bin }) => binProblems(bin),
|
|
215
|
+
handler: async ({ app, signal }, request) => {
|
|
216
|
+
if (signal.aborted) return outcomes.canceled({ changed: "No story ran." });
|
|
217
|
+
const answers = request.answers ?? (isCi(app.env) ? "check" : "add");
|
|
218
|
+
const bin = request.bin === void 0 ? null : resolveStoryExecutable(request.bin, app.cwd);
|
|
219
|
+
const found = await app.vitest.find(app.cwd);
|
|
220
|
+
if (!found.ok) return outcomes.vitestNotFound({ cwd: app.cwd, searched: [...found.searched] });
|
|
221
|
+
if (signal.aborted) return outcomes.canceled({ changed: "No story ran." });
|
|
222
|
+
const args = ["run", ...request.project.flatMap((project) => ["--project", project]), ...request.args];
|
|
223
|
+
const launched = { projects: [...request.project], answers, bin, vitest: found.path, args };
|
|
224
|
+
const ended = await app.terminal.run({
|
|
225
|
+
argv: [found.path, ...args],
|
|
226
|
+
env: { ...presentEnv(app.env), ...storyLaunchEnv({ version: 1, answers, bin }) },
|
|
227
|
+
cwd: app.cwd,
|
|
228
|
+
signal
|
|
229
|
+
});
|
|
230
|
+
if (ended.kind === "spawn-failed") return outcomes.spawnFailed({ ...launched, message: ended.message });
|
|
231
|
+
app.exit.status = ended.status;
|
|
232
|
+
return outcomes.ran({
|
|
233
|
+
...launched,
|
|
234
|
+
exitCode: ended.kind === "exited" ? ended.code : null,
|
|
235
|
+
signal: ended.kind === "signaled" ? ended.signal : null
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
function binProblems(bin) {
|
|
240
|
+
if (bin === void 0) return [];
|
|
241
|
+
try {
|
|
242
|
+
resolveStoryExecutable(bin, "/");
|
|
243
|
+
} catch (error) {
|
|
244
|
+
if (!(error instanceof InvalidCommandLine)) throw error;
|
|
245
|
+
return [
|
|
246
|
+
{
|
|
247
|
+
field: "bin",
|
|
248
|
+
message: `--bin ${error.message}. Write it as a POSIX shell would split it into words, with no operators or expansions.`
|
|
249
|
+
}
|
|
250
|
+
];
|
|
251
|
+
}
|
|
252
|
+
return [];
|
|
253
|
+
}
|
|
254
|
+
function presentEnv(env) {
|
|
255
|
+
return Object.fromEntries(Object.entries(env).filter((entry) => entry[1] !== void 0));
|
|
256
|
+
}
|
|
257
|
+
export {
|
|
258
|
+
command_default as default
|
|
259
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// src/extensions/story/commands/run/metadata.ts
|
|
2
|
+
var metadata = {
|
|
3
|
+
description: "Run a package's stories on this machine: vitest run --project <project> for each --project, with the nearest node_modules/.bin/vitest from the working directory up to the repository's root, in the working directory, with this machine's environment. The stories get the answers level (--answers) and the executable to invoke (--bin) from the story launch, one private environment variable that only this command sets. Every other argument goes to vitest run unchanged, in order; put vitest's own dash options after --. Vitest owns the terminal: its output reaches it as it prints, and storm prints nothing of its own unless vitest can't start. storm exits with vitest's code, or 128 + n when signal n ended it. Ctrl+C reaches vitest directly, and storm waits for it to exit. A bare vitest run, an IDE's test runner or CI's story lanes, with no story launch, compares at check and writes nothing. It uses no runner sandbox, resource or run directory.",
|
|
4
|
+
summary: "Run a package's stories, recording or comparing their tool calls."
|
|
5
|
+
};
|
|
6
|
+
export {
|
|
7
|
+
metadata
|
|
8
|
+
};
|