@cnc-tools/storm 0.11.0 → 0.12.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/dist/bin/storm.js +7 -12
- package/dist/build-info.js +1 -1
- package/dist/chunks/{chunk-3ZZVZPMG.js → chunk-43MWZLJR.js} +1 -1
- package/dist/chunks/chunk-4XT5RC5T.js +98 -0
- package/dist/chunks/chunk-7D6LC5JY.js +340 -0
- package/dist/chunks/{chunk-ETCZ6WP7.js → chunk-BW2ADH7U.js} +1 -1
- package/dist/chunks/chunk-FK4RLDEK.js +40 -0
- package/dist/chunks/{chunk-KR7WIYLG.js → chunk-FSP3SJ35.js} +209 -964
- package/dist/chunks/chunk-GQIL3AHY.js +20 -0
- package/dist/chunks/{chunk-ICB4BZJX.js → chunk-GSC6SRTW.js} +7 -2
- package/dist/chunks/{chunk-NPPJ57W7.js → chunk-ISGQJIQM.js} +498 -215
- package/dist/chunks/{chunk-OJOKQRM6.js → chunk-IYM44FUX.js} +30 -26
- package/dist/chunks/{chunk-GRMD7G4J.js → chunk-LQKNI3EG.js} +6 -5
- package/dist/chunks/chunk-NMVODY3P.js +19 -0
- package/dist/chunks/{chunk-O4BUT7BE.js → chunk-ODQHQJLE.js} +3063 -2646
- package/dist/chunks/chunk-RYRJNHL7.js +55 -0
- package/dist/chunks/chunk-SXW6XN4R.js +161 -0
- package/dist/chunks/{chunk-L4ZPMSKQ.js → chunk-T6AZIDZD.js} +43 -363
- package/dist/chunks/chunk-TEEZL3GA.js +851 -0
- package/dist/chunks/{chunk-VZZTHCBW.js → chunk-TMQQYHUX.js} +5 -18
- package/dist/chunks/{chunk-TRFEAYNC.js → chunk-U7M3ZB3Z.js} +345 -304
- package/dist/chunks/{chunk-4EU4AH7E.js → chunk-Y3BUNNRG.js} +186 -144
- package/dist/chunks/{chunk-4PRAB24Y.js → chunk-YM6TZV4L.js} +394 -396
- package/dist/chunks/{chunk-AMTYHUYB.js → chunk-YT5OROR7.js} +22 -8
- package/dist/chunks/{live-app-LOGYUBKB.js → live-app-AZ5N5HBD.js} +25 -46
- package/dist/command-tree.d.ts +4 -1
- package/dist/command-tree.js +4 -1
- package/dist/commands/exec/cleanup.js +4 -4
- package/dist/commands/exec/command.d.ts +54 -15
- package/dist/commands/exec/command.js +51 -46
- package/dist/commands/exec/define-run-command.d.ts +752 -0
- package/dist/commands/exec/define-run-command.js +58 -0
- package/dist/commands/exec/driver-plan.d.ts +30 -0
- package/dist/commands/exec/driver-plan.js +44 -0
- package/dist/commands/exec/driver-refusals.d.ts +89 -0
- package/dist/commands/exec/driver-refusals.js +65 -0
- package/dist/commands/exec/exec-words.d.ts +5 -0
- package/dist/commands/exec/exec-words.js +31 -0
- package/dist/commands/exec/live-view.js +58 -28
- package/dist/commands/exec/mint-failed.js +4 -4
- package/dist/commands/exec/outcomes.d.ts +70 -8
- package/dist/commands/exec/outcomes.js +37 -8
- package/dist/commands/exec/plan-run.js +3 -3
- package/dist/commands/exec/progress.d.ts +35 -15
- package/dist/commands/exec/progress.js +82 -57
- package/dist/commands/exec/resource-flags.d.ts +10 -3
- package/dist/commands/exec/resource-flags.js +25 -14
- package/dist/commands/exec/resource-refusals.d.ts +1 -1
- package/dist/commands/exec/resource-refusals.js +9 -9
- package/dist/commands/exec/run-bin.d.ts +35 -0
- package/dist/commands/exec/run-bin.js +32 -0
- package/dist/commands/exec/run-command.d.ts +84 -24
- package/dist/commands/exec/run-command.js +84 -69
- package/dist/commands/exec/run-metadata.d.ts +29 -17
- package/dist/commands/exec/run-metadata.js +38 -16
- package/dist/commands/exec/snapshot-text.d.ts +40 -0
- package/dist/commands/exec/snapshot-text.js +112 -0
- package/dist/commands/exec/test-plan.d.ts +2 -2
- package/dist/commands/exec/test-plan.js +11 -8
- package/dist/commands/exec/tests-summary.d.ts +21 -12
- package/dist/commands/exec/tests-summary.js +67 -39
- package/dist/commands/exec/text.d.ts +5 -0
- package/dist/commands/exec/text.js +7 -0
- package/dist/commands/exec/view.js +22 -13
- package/dist/commands/exec/waterfall.js +4 -4
- package/dist/commands/exec/worker-chart.d.ts +19 -11
- package/dist/commands/exec/worker-chart.js +66 -36
- package/dist/commands/playwright/command.d.ts +746 -0
- package/dist/commands/playwright/command.js +31 -0
- package/dist/commands/playwright/metadata.js +8 -0
- package/dist/commands/runs/facts.d.ts +21 -8
- package/dist/commands/runs/facts.js +19 -9
- package/dist/commands/runs/list/command.d.ts +34 -8
- package/dist/commands/runs/list/command.js +15 -11
- package/dist/commands/runs/list/outcomes.d.ts +17 -4
- package/dist/commands/runs/logs/command.js +13 -9
- package/dist/commands/runs/logs/outcomes.js +1 -1
- package/dist/commands/runs/show/command.d.ts +36 -8
- package/dist/commands/runs/show/command.js +48 -31
- package/dist/commands/runs/show/metadata.js +1 -1
- package/dist/commands/runs/show/outcomes.d.ts +18 -4
- package/dist/commands/runs/show/outcomes.js +35 -14
- package/dist/commands/snapshots/build/command.d.ts +898 -0
- package/dist/commands/snapshots/build/command.js +511 -0
- package/dist/commands/snapshots/build/metadata.d.ts +28 -0
- package/dist/commands/snapshots/build/metadata.js +34 -0
- package/dist/commands/snapshots/build/outcomes.d.ts +484 -0
- package/dist/commands/snapshots/build/outcomes.js +322 -0
- package/dist/commands/snapshots/list/command.d.ts +272 -0
- package/dist/commands/snapshots/list/command.js +305 -0
- package/dist/commands/snapshots/list/metadata.d.ts +16 -0
- package/dist/commands/snapshots/list/metadata.js +24 -0
- package/dist/commands/snapshots/list/outcomes.d.ts +183 -0
- package/dist/commands/snapshots/list/outcomes.js +257 -0
- package/dist/commands/snapshots/metadata.d.ts +3 -0
- package/dist/commands/snapshots/metadata.js +7 -0
- package/dist/commands/vitest/command.d.ts +267 -298
- package/dist/commands/vitest/command.js +23 -181
- package/dist/commands/vitest/metadata.js +1 -1
- package/dist/config-file/define.d.ts +1 -1
- package/dist/context.d.ts +32 -30
- package/dist/context.js +13 -17
- package/dist/core/before-run.d.ts +5 -5
- package/dist/core/before-run.js +8 -8
- package/dist/core/definition-lookup.d.ts +5 -5
- package/dist/core/definition-lookup.js +13 -12
- package/dist/core/drivers-of.d.ts +23 -0
- package/dist/core/drivers-of.js +13 -0
- package/dist/core/events.d.ts +2 -4
- package/dist/core/gateways.d.ts +32 -24
- package/dist/core/index.d.ts +7 -5
- package/dist/core/index.js +9 -6
- package/dist/core/launcher-context.d.ts +11 -0
- package/dist/core/launcher-context.js +31 -0
- package/dist/core/live/package-bin-gateway.d.ts +6 -0
- package/dist/core/live/package-bin-gateway.js +24 -0
- package/dist/core/package-bin.d.ts +7 -0
- package/dist/core/package-bin.js +30 -0
- package/dist/core/presentations.d.ts +1 -1
- package/dist/core/presentations.js +6 -5
- package/dist/core/{resource-registry.d.ts → resource-definition-set.d.ts} +15 -14
- package/dist/core/resource-definition-set.js +31 -0
- package/dist/core/resource-reports.d.ts +1 -1
- package/dist/core/resource-reports.js +16 -15
- package/dist/core/resource.d.ts +4 -4
- package/dist/core/resources.d.ts +6 -6
- package/dist/core/resources.js +11 -11
- package/dist/core/run-state.d.ts +27 -16
- package/dist/core/run-state.js +50 -18
- package/dist/core/run.d.ts +33 -27
- package/dist/core/run.js +24 -19
- package/dist/core/setup-phases.d.ts +14 -0
- package/dist/core/setup-phases.js +24 -0
- package/dist/core/state-directory.d.ts +2 -2
- package/dist/core/state-directory.js +3 -3
- package/dist/core/timeline.d.ts +4 -2
- package/dist/core/timeline.js +11 -5
- package/dist/extension-commands.js +6 -10
- package/dist/extensions/github/{world.d.ts → context.d.ts} +1 -1
- package/dist/extensions/github/context.js +3 -0
- package/dist/extensions/github/definition.d.ts +1 -1
- package/dist/extensions/github/definition.js +3 -3
- package/dist/extensions/github/extension.d.ts +1 -1
- package/dist/extensions/github/index.d.ts +2 -2
- package/dist/extensions/github/index.js +4 -4
- package/dist/extensions/github/lifecycle.d.ts +3 -3
- package/dist/extensions/github/lifecycle.js +14 -14
- package/dist/extensions/github/live/context.d.ts +6 -0
- package/dist/extensions/github/live/context.js +16 -0
- package/dist/extensions/github/resource.d.ts +1 -1
- package/dist/extensions/playwright/driver.d.ts +8 -0
- package/dist/extensions/playwright/driver.js +60 -0
- package/dist/extensions/playwright/extension.d.ts +2 -0
- package/dist/extensions/playwright/extension.js +12 -0
- package/dist/extensions/playwright/plan/gateways.d.ts +62 -0
- package/dist/extensions/playwright/plan/gateways.js +4 -0
- package/dist/extensions/playwright/plan/list-output.d.ts +26 -0
- package/dist/extensions/playwright/plan/list-output.js +101 -0
- package/dist/extensions/playwright/plan/live/list-gateway.d.ts +15 -0
- package/dist/extensions/playwright/plan/live/list-gateway.js +100 -0
- package/dist/extensions/playwright/plan/plan.d.ts +44 -0
- package/dist/extensions/playwright/plan/plan.js +53 -0
- package/dist/extensions/testserver/command-tree.d.ts +1 -1
- package/dist/extensions/testserver/command-tree.js +2 -2
- package/dist/extensions/testserver/commands/app.d.ts +7 -7
- package/dist/extensions/testserver/commands/pool/create/command.d.ts +5 -5
- package/dist/extensions/testserver/commands/pool/create/command.js +12 -13
- package/dist/extensions/testserver/commands/pool/list/command.js +5 -6
- package/dist/extensions/testserver/{world.d.ts → context.d.ts} +1 -1
- package/dist/extensions/testserver/context.js +4 -0
- package/dist/extensions/testserver/definition.d.ts +2 -2
- package/dist/extensions/testserver/definition.js +8 -7
- package/dist/extensions/testserver/events.d.ts +1 -1
- package/dist/extensions/testserver/extension.d.ts +4 -3
- package/dist/extensions/testserver/extension.js +33 -20
- package/dist/extensions/testserver/index.d.ts +2 -2
- package/dist/extensions/testserver/index.js +2 -2
- package/dist/extensions/testserver/lifecycle.d.ts +6 -5
- package/dist/extensions/testserver/lifecycle.js +9 -8
- package/dist/extensions/testserver/live/context.d.ts +8 -0
- package/dist/extensions/testserver/live/{world.js → context.js} +6 -7
- package/dist/extensions/testserver/options/rules.d.ts +3 -3
- package/dist/extensions/testserver/options/rules.js +5 -4
- package/dist/extensions/testserver/options/sandboxes.d.ts +3 -2
- package/dist/extensions/testserver/options/sandboxes.js +3 -2
- package/dist/extensions/testserver/playwright/index.d.ts +33 -0
- package/dist/extensions/testserver/playwright/index.js +43 -0
- package/dist/extensions/testserver/presentation.d.ts +4 -4
- package/dist/extensions/testserver/presentation.js +7 -7
- package/dist/extensions/testserver/progress.d.ts +3 -3
- package/dist/extensions/testserver/progress.js +3 -3
- package/dist/extensions/testserver/provision.d.ts +2 -2
- package/dist/extensions/testserver/provision.js +10 -10
- package/dist/extensions/testserver/resource.d.ts +2 -2
- package/dist/extensions/testserver/result.d.ts +2 -2
- package/dist/extensions/testserver/result.js +1 -1
- package/dist/extensions/testserver/run/connection.d.ts +1 -1
- package/dist/extensions/testserver/run/connection.js +3 -3
- package/dist/extensions/testserver/run/sandbox.d.ts +31 -0
- package/dist/extensions/testserver/run/sandbox.js +58 -0
- package/dist/extensions/testserver/run-sandbox.d.ts +2 -2
- package/dist/extensions/testserver/run-sandbox.js +3 -3
- package/dist/extensions/testserver/vercel-cli/arguments.d.ts +2 -2
- package/dist/extensions/testserver/vercel-cli/arguments.js +6 -6
- package/dist/extensions/testserver/vercel-cli/auth-config.d.ts +7 -7
- package/dist/extensions/testserver/vercel-cli/auth-config.js +4 -4
- package/dist/extensions/testserver/vercel-cli/clock.js +1 -1
- package/dist/extensions/testserver/vercel-cli/config-files.js +1 -1
- package/dist/extensions/testserver/vercel-cli/context.d.ts +1 -1
- package/dist/extensions/testserver/vercel-cli/context.js +2 -2
- package/dist/extensions/testserver/vercel-cli/entry.d.ts +1 -1
- package/dist/extensions/testserver/vercel-cli/entry.js +1 -1
- package/dist/extensions/testserver/vercel-cli/environment.d.ts +5 -5
- package/dist/extensions/testserver/vercel-cli/environment.js +6 -6
- package/dist/extensions/testserver/vercel-cli/gateways.d.ts +1 -1
- package/dist/extensions/testserver/vercel-cli/gateways.js +3 -3
- package/dist/extensions/testserver/vercel-cli/index.d.ts +1 -1
- package/dist/extensions/testserver/vercel-cli/index.js +8 -9
- package/dist/extensions/testserver/vercel-cli/invocation.d.ts +13 -12
- package/dist/extensions/testserver/vercel-cli/invocation.js +1 -1
- package/dist/extensions/testserver/vercel-cli/{driver.d.ts → invoker.d.ts} +18 -17
- package/dist/extensions/testserver/vercel-cli/{driver.js → invoker.js} +8 -8
- package/dist/extensions/testserver/vercel-cli/live/config-files.d.ts +2 -2
- package/dist/extensions/testserver/vercel-cli/live/config-files.js +2 -2
- package/dist/extensions/testserver/vercel-cli/live/process-gateway.js +1 -1
- package/dist/extensions/testserver/vercel-cli/report.js +2 -2
- package/dist/extensions/testserver/vercel-cli/verbose.js +1 -1
- package/dist/extensions/testserver/vitest/config.d.ts +3 -3
- package/dist/extensions/testserver/vitest/config.js +5 -13
- package/dist/extensions/testserver/vitest/container-scope.d.ts +11 -11
- package/dist/extensions/testserver/vitest/container-scope.js +9 -9
- package/dist/extensions/testserver/vitest/container-start.d.ts +6 -6
- package/dist/extensions/testserver/vitest/container-start.js +14 -11
- package/dist/extensions/testserver/vitest/diagnostics.d.ts +1 -1
- package/dist/extensions/testserver/vitest/fixtures.d.ts +11 -11
- package/dist/extensions/testserver/vitest/fixtures.js +14 -23
- package/dist/extensions/testserver/vitest/index.d.ts +1 -1
- package/dist/extensions/testserver/vitest/index.js +4 -4
- package/dist/extensions/testserver/vitest/types.d.ts +16 -18
- package/dist/extensions/testserver/vitest/types.js +2 -2
- package/dist/extensions/testserver/vitest/worker-sandbox.d.ts +8 -0
- package/dist/extensions/testserver/vitest/worker-sandbox.js +17 -0
- package/dist/extensions/vitest/driver.d.ts +8 -0
- package/dist/extensions/vitest/driver.js +62 -0
- package/dist/extensions/vitest/extension.d.ts +2 -0
- package/dist/extensions/vitest/extension.js +8 -0
- package/dist/{vitest → extensions/vitest/plan}/gateways.d.ts +1 -26
- package/dist/extensions/vitest/plan/gateways.js +3 -0
- package/dist/{vitest → extensions/vitest/plan}/live/list-gateway.d.ts +1 -2
- package/dist/{vitest → extensions/vitest/plan}/live/list-gateway.js +1 -20
- package/dist/extensions/vitest/plan/plan-over.d.ts +38 -0
- package/dist/extensions/vitest/plan/plan-over.js +31 -0
- package/dist/extensions/vitest/plan/plan.d.ts +24 -0
- package/dist/{vitest → extensions/vitest/plan}/plan.js +11 -26
- package/dist/extensions.d.ts +40 -18
- package/dist/extensions.js +49 -22
- package/dist/forward-sigterm.js +1 -1
- package/dist/launcher-resolvers/index.d.ts +1 -1
- package/dist/launcher-resolvers/local-services.d.ts +9 -44
- package/dist/launcher-resolvers/local-services.js +4 -5
- package/dist/live-app.js +7 -6
- package/dist/local-services.d.ts +7 -15
- package/dist/local-services.js +8 -29
- package/dist/playwright/index.d.ts +1 -0
- package/dist/playwright/index.js +4 -0
- package/dist/playwright/reporter.d.ts +96 -0
- package/dist/playwright/reporter.js +162 -0
- package/dist/playwright/worker-index.d.ts +7 -0
- package/dist/playwright/worker-index.js +20 -0
- package/dist/run-directory/index.d.ts +1 -1
- package/dist/run-directory/index.js +3 -3
- package/dist/run-directory/plan.d.ts +3 -3
- package/dist/run-directory/plan.js +5 -5
- package/dist/run-directory/reader.js +2 -2
- package/dist/run-directory/recording.d.ts +8 -5
- package/dist/run-directory/recording.js +5 -5
- package/dist/run-directory/run-collector.d.ts +5 -5
- package/dist/run-directory/run-collector.js +5 -5
- package/dist/run-directory/run-record.d.ts +69 -24
- package/dist/run-directory/run-record.js +39 -19
- package/dist/run-directory/timeline-facts.d.ts +2 -1
- package/dist/run-directory/timeline-facts.js +4 -2
- package/dist/runner/build-snapshots.d.ts +179 -0
- package/dist/runner/build-snapshots.js +235 -0
- package/dist/runner/context.js +2 -1
- package/dist/runner/events.d.ts +71 -32
- package/dist/runner/gateways.d.ts +30 -10
- package/dist/runner/index.d.ts +8 -6
- package/dist/runner/index.js +5 -3
- package/dist/runner/live/checkout-gateway.js +15 -7
- package/dist/runner/live/snapshot-records.js +8 -7
- package/dist/runner/prepare.d.ts +24 -46
- package/dist/runner/prepare.js +27 -20
- package/dist/runner/ready.d.ts +43 -10
- package/dist/runner/ready.js +51 -34
- package/dist/runner/recipe.d.ts +42 -12
- package/dist/runner/recipe.js +36 -7
- package/dist/runner/scope.d.ts +5 -12
- package/dist/runner/scope.js +0 -4
- package/dist/runner/secrets.d.ts +6 -0
- package/dist/runner/secrets.js +10 -0
- package/dist/runner/session.d.ts +46 -18
- package/dist/runner/session.js +58 -29
- package/dist/runner/snapshot-build.d.ts +21 -11
- package/dist/runner/snapshot-build.js +11 -16
- package/dist/runner/snapshot-cache.d.ts +140 -62
- package/dist/runner/snapshot-cache.js +145 -102
- package/dist/runner/snapshot-inspect.d.ts +89 -0
- package/dist/runner/snapshot-inspect.js +173 -0
- package/dist/runner/snapshot-key.d.ts +5 -2
- package/dist/runner/snapshot-key.js +1 -1
- package/dist/runner/snapshot-save.d.ts +34 -20
- package/dist/runner/snapshot-save.js +46 -37
- package/dist/runner/snapshot-start.d.ts +25 -0
- package/dist/runner/snapshot-start.js +16 -0
- package/dist/sdk/extension/commands.d.ts +35 -17
- package/dist/sdk/extension/commands.js +13 -11
- package/dist/sdk/extension/driver.d.ts +143 -0
- package/dist/sdk/extension/driver.js +28 -0
- package/dist/sdk/extension/index.d.ts +2 -1
- package/dist/sdk/extension/index.js +15 -9
- package/dist/sdk/extension/{launcher-supplies.d.ts → launcher-context.d.ts} +3 -3
- package/dist/sdk/extension/launcher-context.js +5 -0
- package/dist/sdk/extension/lifecycle.d.ts +6 -5
- package/dist/sdk/extension/lifecycle.js +2 -2
- package/dist/sdk/extension/resource-definition.d.ts +13 -13
- package/dist/sdk/extension/resource-definition.js +2 -2
- package/dist/sdk/extension/resource.d.ts +13 -13
- package/dist/sdk/extension/resource.js +11 -11
- package/dist/sdk/extension/time.js +2 -2
- package/dist/sdk/index.d.ts +2 -0
- package/dist/sdk/index.js +3 -1
- package/dist/sdk/run/launcher.d.ts +1 -1
- package/dist/sdk/run/launcher.js +4 -3
- package/dist/sdk/run/payload.js +1 -1
- package/dist/sdk/run/test-events.d.ts +24 -18
- package/dist/sdk/run/test-events.js +5 -4
- package/dist/sdk/run/test-result-writer.d.ts +77 -0
- package/dist/sdk/run/test-result-writer.js +143 -0
- package/dist/sdk/run/worker-test-event-writer.d.ts +13 -0
- package/dist/sdk/run/worker-test-event-writer.js +31 -0
- package/dist/vendor/testserver-sdk/container/container.d.ts +1 -6
- package/dist/vendor/testserver-sdk/container/container.js +1 -5
- package/dist/vendor/testserver-sdk/factories/build.d.ts +12 -40
- package/dist/vendor/testserver-sdk/factories/build.js +15 -66
- package/dist/vendor/testserver-sdk/factories/gateways.d.ts +1 -2
- package/dist/vendor/testserver-sdk/factories/index.d.ts +1 -3
- package/dist/vendor/testserver-sdk/factories/index.js +3 -5
- package/dist/vendor/testserver-sdk/index.d.ts +1 -2
- package/dist/vendor/testserver-sdk/index.js +5 -6
- package/dist/vendor/testserver-sdk/records/body.d.ts +1 -1
- package/dist/vendor/testserver-sdk/records/body.js +1 -1
- package/dist/vitest/index.d.ts +2 -1
- package/dist/vitest/index.js +6 -4
- package/dist/vitest/test-events.d.ts +6 -16
- package/dist/vitest/test-events.js +15 -40
- package/dist/vitest/test-results.d.ts +9 -31
- package/dist/vitest/test-results.js +34 -105
- package/dist/vitest/worker-index.d.ts +6 -0
- package/dist/vitest/worker-index.js +17 -0
- package/package.json +23 -9
- package/skills/overview.md +6 -8
- package/skills/read-run-output.md +22 -7
- package/dist/chunks/chunk-FVMQKYTT.js +0 -10
- package/dist/chunks/chunk-SLNKW4ZM.js +0 -40
- package/dist/chunks/chunk-WNIQA5J6.js +0 -19
- package/dist/chunks/chunk-WSIF7SR6.js +0 -10
- package/dist/commands/vitest/outcomes.d.ts +0 -379
- package/dist/commands/vitest/outcomes.js +0 -70
- package/dist/core/launcher-supplies.d.ts +0 -11
- package/dist/core/launcher-supplies.js +0 -28
- package/dist/core/live/terminal-command-gateway.d.ts +0 -8
- package/dist/core/live/terminal-command-gateway.js +0 -49
- package/dist/core/resource-registry.js +0 -30
- package/dist/extensions/github/live/world.d.ts +0 -6
- package/dist/extensions/github/live/world.js +0 -16
- package/dist/extensions/github/world.js +0 -3
- package/dist/extensions/story/command-tree.d.ts +0 -6
- package/dist/extensions/story/command-tree.js +0 -21
- package/dist/extensions/story/commands/app.d.ts +0 -23
- package/dist/extensions/story/commands/app.js +0 -5
- package/dist/extensions/story/commands/run/command.d.ts +0 -211
- package/dist/extensions/story/commands/run/command.js +0 -259
- package/dist/extensions/story/commands/run/metadata.js +0 -8
- package/dist/extensions/story/commands/run/outcomes.d.ts +0 -101
- package/dist/extensions/story/commands/run/outcomes.js +0 -73
- package/dist/extensions/story/commands/tree.d.ts +0 -2
- package/dist/extensions/story/commands/tree.js +0 -6
- package/dist/extensions/story/extension.d.ts +0 -2
- package/dist/extensions/story/extension.js +0 -8
- package/dist/extensions/testserver/live/world.d.ts +0 -8
- package/dist/extensions/testserver/vitest/sandbox.d.ts +0 -25
- package/dist/extensions/testserver/vitest/sandbox.js +0 -43
- package/dist/extensions/testserver/world.js +0 -4
- package/dist/sdk/extension/launcher-supplies.js +0 -3
- package/dist/story/align.d.ts +0 -37
- package/dist/story/align.js +0 -39
- package/dist/story/command-line.d.ts +0 -24
- package/dist/story/command-line.js +0 -88
- package/dist/story/definition.d.ts +0 -59
- package/dist/story/definition.js +0 -9
- package/dist/story/diff.d.ts +0 -9
- package/dist/story/diff.js +0 -97
- package/dist/story/errors.d.ts +0 -14
- package/dist/story/errors.js +0 -21
- package/dist/story/gateways.d.ts +0 -94
- package/dist/story/gateways.js +0 -3
- package/dist/story/host.d.ts +0 -30
- package/dist/story/host.js +0 -97
- package/dist/story/index.d.ts +0 -8
- package/dist/story/index.js +0 -11
- package/dist/story/json.d.ts +0 -16
- package/dist/story/json.js +0 -59
- package/dist/story/launch.d.ts +0 -70
- package/dist/story/launch.js +0 -77
- package/dist/story/live/recording-gateway.d.ts +0 -2
- package/dist/story/live/recording-gateway.js +0 -103
- package/dist/story/orphans.d.ts +0 -35
- package/dist/story/orphans.js +0 -51
- package/dist/story/recording.d.ts +0 -62
- package/dist/story/recording.js +0 -97
- package/dist/story/report.d.ts +0 -42
- package/dist/story/report.js +0 -129
- package/dist/story/sequence.d.ts +0 -30
- package/dist/story/sequence.js +0 -74
- package/dist/story/settle.d.ts +0 -96
- package/dist/story/settle.js +0 -71
- package/dist/story/start.d.ts +0 -50
- package/dist/story/start.js +0 -183
- package/dist/vendor/testserver-sdk/factories/definition.d.ts +0 -39
- package/dist/vendor/testserver-sdk/factories/definition.js +0 -16
- package/dist/vendor/testserver-sdk/factories/definitions.d.ts +0 -169
- package/dist/vendor/testserver-sdk/factories/definitions.js +0 -245
- package/dist/vendor/testserver-sdk/seed/index.d.ts +0 -1
- package/dist/vendor/testserver-sdk/seed/index.js +0 -3
- package/dist/vendor/testserver-sdk/seed/seed.d.ts +0 -221
- package/dist/vendor/testserver-sdk/seed/seed.js +0 -171
- package/dist/vitest/find-vitest.d.ts +0 -7
- package/dist/vitest/find-vitest.js +0 -28
- package/dist/vitest/gateways.js +0 -4
- package/dist/vitest/plan.d.ts +0 -51
- /package/dist/{extensions/story/commands/run → commands/playwright}/metadata.d.ts +0 -0
- /package/dist/{vitest → extensions/vitest/plan}/list-output.d.ts +0 -0
- /package/dist/{vitest → extensions/vitest/plan}/list-output.js +0 -0
|
@@ -11,34 +11,13 @@ export interface VitestListRequest {
|
|
|
11
11
|
readonly args: readonly string[];
|
|
12
12
|
/** Where vitest runs; default the current directory. */
|
|
13
13
|
readonly cwd?: string;
|
|
14
|
-
/** The `vitest` to start, such as the absolute path `
|
|
14
|
+
/** The `vitest` to start, such as the absolute path of a `node_modules/.bin/vitest`; default `vitest` from `PATH`. */
|
|
15
15
|
readonly executable?: string;
|
|
16
16
|
/** How long the listing may take before it is killed. */
|
|
17
17
|
readonly timeoutMs: number;
|
|
18
18
|
/** Stops the listing when it aborts, before it starts or while it runs: the listing is `canceled`. */
|
|
19
19
|
readonly signal?: AbortSignal;
|
|
20
20
|
}
|
|
21
|
-
/** Where to look for `vitest`: in `node_modules/.bin` of `from` and of each directory above it, up to `root`. */
|
|
22
|
-
export interface FindVitestRequest {
|
|
23
|
-
/** The directory vitest runs in, an absolute path. */
|
|
24
|
-
readonly from: string;
|
|
25
|
-
/**
|
|
26
|
-
* The last directory to look in, an absolute path: the repository's root, or the filesystem's root outside a
|
|
27
|
-
* repository. When `from` isn't inside it, the search goes on up to the filesystem's root.
|
|
28
|
-
*/
|
|
29
|
-
readonly root: string;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* The `vitest` found nearest `from`, as an absolute path to its `node_modules/.bin/vitest`; or, when no directory has
|
|
33
|
-
* one, every directory looked in, nearest first (`vitestSearchDirectories`).
|
|
34
|
-
*/
|
|
35
|
-
export type FindVitestResult = {
|
|
36
|
-
readonly ok: true;
|
|
37
|
-
readonly path: string;
|
|
38
|
-
} | {
|
|
39
|
-
readonly ok: false;
|
|
40
|
-
readonly searched: readonly string[];
|
|
41
|
-
};
|
|
42
21
|
/**
|
|
43
22
|
* Why the tests couldn't be listed: `vitest` couldn't be started (not on `PATH` or not found, or no such `cwd`), it
|
|
44
23
|
* didn't finish within `timeoutMs`, it exited other than 0 (with the last line of its stderr that isn't blank or a
|
|
@@ -71,8 +50,4 @@ export type VitestListResult = {
|
|
|
71
50
|
export interface VitestListGateway {
|
|
72
51
|
/** Lists the tests a `vitest run` with the same arguments would run, without running them. */
|
|
73
52
|
listTests(request: VitestListRequest): Promise<VitestListResult>;
|
|
74
|
-
/**
|
|
75
|
-
* Finds the `vitest` a package's scripts would run: the nearest `node_modules/.bin/vitest` from `from` up to `root`.
|
|
76
|
-
*/
|
|
77
|
-
findVitest(request: FindVitestRequest): Promise<FindVitestResult>;
|
|
78
53
|
}
|
|
@@ -5,7 +5,6 @@ import type { VitestListGateway } from "../gateways.ts";
|
|
|
5
5
|
* (`AbortSignal.timeout`), or once the request's `signal` aborts, then waits for the process to exit and answers
|
|
6
6
|
* `timed-out` or `canceled`, `canceled` when the request's `signal` aborted. It waits for the exit, not for the pipes
|
|
7
7
|
* to close, since a process `vitest` left behind could hold them open. Any other `error` is a start failure, answered
|
|
8
|
-
* at once, since no process started.
|
|
9
|
-
* execute, in `vitestSearchDirectories` order.
|
|
8
|
+
* at once, since no process started.
|
|
10
9
|
*/
|
|
11
10
|
export declare const liveVitestListGateway: VitestListGateway;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import { spawn } from "node:child_process";
|
|
2
|
-
import { constants } from "node:fs";
|
|
3
|
-
import { access } from "node:fs/promises";
|
|
4
|
-
import { join } from "node:path";
|
|
5
|
-
import { VITEST_BIN, vitestSearchDirectories } from "../find-vitest.js";
|
|
6
2
|
import { readVitestList } from "../list-output.js";
|
|
7
3
|
/**
|
|
8
4
|
* The live list gateway. `listTests` spawns `vitest list <args> --json` (`listArgv`), the request's `executable` or
|
|
@@ -10,24 +6,9 @@ import { readVitestList } from "../list-output.js";
|
|
|
10
6
|
* (`AbortSignal.timeout`), or once the request's `signal` aborts, then waits for the process to exit and answers
|
|
11
7
|
* `timed-out` or `canceled`, `canceled` when the request's `signal` aborted. It waits for the exit, not for the pipes
|
|
12
8
|
* to close, since a process `vitest` left behind could hold them open. Any other `error` is a start failure, answered
|
|
13
|
-
* at once, since no process started.
|
|
14
|
-
* execute, in `vitestSearchDirectories` order.
|
|
9
|
+
* at once, since no process started.
|
|
15
10
|
*/
|
|
16
11
|
export const liveVitestListGateway = {
|
|
17
|
-
async findVitest({ from, root }) {
|
|
18
|
-
const searched = vitestSearchDirectories(from, root);
|
|
19
|
-
for (const directory of searched) {
|
|
20
|
-
const path = join(directory, VITEST_BIN);
|
|
21
|
-
try {
|
|
22
|
-
await access(path, constants.X_OK);
|
|
23
|
-
return { ok: true, path };
|
|
24
|
-
}
|
|
25
|
-
catch {
|
|
26
|
-
// Not there, or not executable: look further up.
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return { ok: false, searched };
|
|
30
|
-
},
|
|
31
12
|
listTests(request) {
|
|
32
13
|
return new Promise((resolve) => {
|
|
33
14
|
let settled = false;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ListedTest, VitestListFailure, VitestListGateway } from "./gateways.ts";
|
|
2
|
+
/** How long `vitest list` may run by default. */
|
|
3
|
+
export declare const LIST_TIMEOUT_MS = 60000;
|
|
4
|
+
/** How many tests a Vitest run would run, and in how many files. */
|
|
5
|
+
export interface TestPlan {
|
|
6
|
+
readonly tests: number;
|
|
7
|
+
readonly files: number;
|
|
8
|
+
}
|
|
9
|
+
export interface ListVitestTestsOptions {
|
|
10
|
+
/** Passed to `vitest list --json`, as `vitest run` takes them, such as `["--project", "e2e"]`. */
|
|
11
|
+
readonly args: readonly string[];
|
|
12
|
+
/** Where vitest runs; default the current directory. */
|
|
13
|
+
readonly cwd?: string;
|
|
14
|
+
/** The `vitest` to start, such as the path of a `node_modules/.bin/vitest`; default `vitest` from `PATH`. */
|
|
15
|
+
readonly executable?: string;
|
|
16
|
+
/** How long `vitest list` may take; default `LIST_TIMEOUT_MS`, 60s. */
|
|
17
|
+
readonly timeoutMs?: number;
|
|
18
|
+
/** Stops `vitest list` when it aborts: the plan's failure is then `canceled`. */
|
|
19
|
+
readonly signal?: AbortSignal;
|
|
20
|
+
}
|
|
21
|
+
/** A Vitest run's test plan, or why its tests couldn't be listed. */
|
|
22
|
+
export type VitestPlanResult = {
|
|
23
|
+
readonly ok: true;
|
|
24
|
+
readonly plan: TestPlan;
|
|
25
|
+
} | {
|
|
26
|
+
readonly ok: false;
|
|
27
|
+
readonly failure: VitestListFailure;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Lists the tests `vitest run <args>` would run over `gateway`, with `vitest list <args> --json` (`executable`, else
|
|
31
|
+
* `vitest` from `PATH`), and counts them; or says why it couldn't: `vitest` failed to start, didn't finish within
|
|
32
|
+
* `timeoutMs`, exited other than 0 (with the last line of its stderr that isn't a stack frame), printed something other
|
|
33
|
+
* than a list of tests, or was stopped by `signal` (`canceled`). Throws a `TypeError` unless `timeoutMs` is a positive
|
|
34
|
+
* number.
|
|
35
|
+
*/
|
|
36
|
+
export declare function planVitestRunOver(options: ListVitestTestsOptions, gateway: VitestListGateway): Promise<VitestPlanResult>;
|
|
37
|
+
/** The plan of the tests listed: how many, and in how many distinct files. */
|
|
38
|
+
export declare function planOf(tests: readonly ListedTest[]): TestPlan;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Planning a Vitest run over a given list gateway: counting the tests `vitest run <args>` would run. storm's Vitest
|
|
2
|
+
// driver (`../driver.ts`) plans with it over its Context's gateway, and tests plan with it over the fake. The published
|
|
3
|
+
// `plan.ts` plans with it over the live gateway, and this file is not a published export, so a consumer of
|
|
4
|
+
// `@vercel/storm/vitest/plan` sees no gateway. It imports no vitest and nothing of storm outside this folder.
|
|
5
|
+
/** How long `vitest list` may run by default. */
|
|
6
|
+
export const LIST_TIMEOUT_MS = 60_000;
|
|
7
|
+
/**
|
|
8
|
+
* Lists the tests `vitest run <args>` would run over `gateway`, with `vitest list <args> --json` (`executable`, else
|
|
9
|
+
* `vitest` from `PATH`), and counts them; or says why it couldn't: `vitest` failed to start, didn't finish within
|
|
10
|
+
* `timeoutMs`, exited other than 0 (with the last line of its stderr that isn't a stack frame), printed something other
|
|
11
|
+
* than a list of tests, or was stopped by `signal` (`canceled`). Throws a `TypeError` unless `timeoutMs` is a positive
|
|
12
|
+
* number.
|
|
13
|
+
*/
|
|
14
|
+
export async function planVitestRunOver(options, gateway) {
|
|
15
|
+
const timeoutMs = options.timeoutMs ?? LIST_TIMEOUT_MS;
|
|
16
|
+
if (!Number.isFinite(timeoutMs) || timeoutMs <= 0) {
|
|
17
|
+
throw new TypeError(`planVitestRun: timeoutMs is ${String(timeoutMs)}, not a positive number`);
|
|
18
|
+
}
|
|
19
|
+
const listed = await gateway.listTests({
|
|
20
|
+
args: options.args,
|
|
21
|
+
...(options.cwd === undefined ? {} : { cwd: options.cwd }),
|
|
22
|
+
...(options.executable === undefined ? {} : { executable: options.executable }),
|
|
23
|
+
timeoutMs,
|
|
24
|
+
...(options.signal === undefined ? {} : { signal: options.signal }),
|
|
25
|
+
});
|
|
26
|
+
return listed.ok ? { ok: true, plan: planOf(listed.tests) } : { ok: false, failure: listed.failure };
|
|
27
|
+
}
|
|
28
|
+
/** The plan of the tests listed: how many, and in how many distinct files. */
|
|
29
|
+
export function planOf(tests) {
|
|
30
|
+
return { tests: tests.length, files: new Set(tests.map((test) => test.file)).size };
|
|
31
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { VitestListFailure } from "./gateways.ts";
|
|
2
|
+
import { type ListVitestTestsOptions, type TestPlan, type VitestPlanResult } from "./plan-over.ts";
|
|
3
|
+
export type { ListedTest, VitestListFailure } from "./gateways.ts";
|
|
4
|
+
export { LIST_TIMEOUT_MS, type ListVitestTestsOptions, type TestPlan, type VitestPlanResult } from "./plan-over.ts";
|
|
5
|
+
/**
|
|
6
|
+
* Lists the tests `vitest run <args>` would run, with `vitest list <args> --json` (`executable`, else `vitest` from
|
|
7
|
+
* `PATH`), and counts them; or says why it couldn't: `vitest` failed to start, didn't finish within `timeoutMs`, exited
|
|
8
|
+
* other than 0 (with the last line of its stderr that isn't a stack frame), printed something other than a list of
|
|
9
|
+
* tests, or was stopped by `signal` (`canceled`). Throws a `TypeError` unless `timeoutMs` is a positive number.
|
|
10
|
+
*/
|
|
11
|
+
export declare function planVitestRun(options: ListVitestTestsOptions): Promise<VitestPlanResult>;
|
|
12
|
+
/**
|
|
13
|
+
* `planVitestRun`'s plan, rejecting with an `Error` that says why the tests couldn't be listed
|
|
14
|
+
* (`describeVitestListFailure`).
|
|
15
|
+
*/
|
|
16
|
+
export declare function listVitestTests(options: ListVitestTestsOptions): Promise<TestPlan>;
|
|
17
|
+
/** The argv that runs `args` with `executable`, a `vitest`: `<executable> run <args...>`. */
|
|
18
|
+
export declare function vitestRunArgv(executable: string, args: readonly string[]): readonly string[];
|
|
19
|
+
/** The plan `vitest list --json` printed: its tests, and their distinct files. Throws when it isn't a list of tests. */
|
|
20
|
+
export declare function parseVitestList(stdout: string): TestPlan;
|
|
21
|
+
/** A plan as a phrase, such as `65 tests in 19 files` or `1 test in 1 file`. */
|
|
22
|
+
export declare function formatPlan(plan: TestPlan): string;
|
|
23
|
+
/** Why the tests couldn't be listed, as a sentence. */
|
|
24
|
+
export declare function describeVitestListFailure(failure: VitestListFailure): string;
|
|
@@ -1,39 +1,27 @@
|
|
|
1
|
-
// Planning a Vitest run before anything is acquired or started, exported as `@vercel/storm/vitest/plan`:
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
1
|
+
// Planning a Vitest run before anything is acquired or started, exported as `@vercel/storm/vitest/plan`: counting the
|
|
2
|
+
// tests `vitest run <args>` would run, and the `vitest run` argv. A launcher script that counts the tests itself plans
|
|
3
|
+
// with it. storm's Vitest driver (`../driver.ts`) plans over its own Context instead, with `plan-over.ts`, which this
|
|
4
|
+
// file plans with over the live list gateway. It imports no vitest and nothing of storm outside this folder: the
|
|
5
|
+
// launcher and a launcher script run outside a Vitest run.
|
|
5
6
|
import { readVitestList } from "./list-output.js";
|
|
6
7
|
import { liveVitestListGateway } from "./live/list-gateway.js";
|
|
7
|
-
|
|
8
|
-
export {
|
|
9
|
-
/** How long `listVitestTests` lets `vitest list` run by default. */
|
|
10
|
-
export const LIST_TIMEOUT_MS = 60_000;
|
|
8
|
+
import { planOf, planVitestRunOver, } from "./plan-over.js";
|
|
9
|
+
export { LIST_TIMEOUT_MS } from "./plan-over.js";
|
|
11
10
|
/**
|
|
12
11
|
* Lists the tests `vitest run <args>` would run, with `vitest list <args> --json` (`executable`, else `vitest` from
|
|
13
12
|
* `PATH`), and counts them; or says why it couldn't: `vitest` failed to start, didn't finish within `timeoutMs`, exited
|
|
14
13
|
* other than 0 (with the last line of its stderr that isn't a stack frame), printed something other than a list of
|
|
15
14
|
* tests, or was stopped by `signal` (`canceled`). Throws a `TypeError` unless `timeoutMs` is a positive number.
|
|
16
15
|
*/
|
|
17
|
-
export async function planVitestRun(options
|
|
18
|
-
|
|
19
|
-
if (!Number.isFinite(timeoutMs) || timeoutMs <= 0) {
|
|
20
|
-
throw new TypeError(`planVitestRun: timeoutMs is ${String(timeoutMs)}, not a positive number`);
|
|
21
|
-
}
|
|
22
|
-
const listed = await gateway.listTests({
|
|
23
|
-
args: options.args,
|
|
24
|
-
...(options.cwd === undefined ? {} : { cwd: options.cwd }),
|
|
25
|
-
...(options.executable === undefined ? {} : { executable: options.executable }),
|
|
26
|
-
timeoutMs,
|
|
27
|
-
...(options.signal === undefined ? {} : { signal: options.signal }),
|
|
28
|
-
});
|
|
29
|
-
return listed.ok ? { ok: true, plan: planOf(listed.tests) } : { ok: false, failure: listed.failure };
|
|
16
|
+
export async function planVitestRun(options) {
|
|
17
|
+
return await planVitestRunOver(options, liveVitestListGateway);
|
|
30
18
|
}
|
|
31
19
|
/**
|
|
32
20
|
* `planVitestRun`'s plan, rejecting with an `Error` that says why the tests couldn't be listed
|
|
33
21
|
* (`describeVitestListFailure`).
|
|
34
22
|
*/
|
|
35
|
-
export async function listVitestTests(options
|
|
36
|
-
const planned = await planVitestRun(options
|
|
23
|
+
export async function listVitestTests(options) {
|
|
24
|
+
const planned = await planVitestRun(options);
|
|
37
25
|
if (!planned.ok)
|
|
38
26
|
throw new Error(describeVitestListFailure(planned.failure));
|
|
39
27
|
return planned.plan;
|
|
@@ -50,9 +38,6 @@ export function parseVitestList(stdout) {
|
|
|
50
38
|
export function formatPlan(plan) {
|
|
51
39
|
return `${plan.tests} ${plan.tests === 1 ? "test" : "tests"} in ${plan.files} ${plan.files === 1 ? "file" : "files"}`;
|
|
52
40
|
}
|
|
53
|
-
function planOf(tests) {
|
|
54
|
-
return { tests: tests.length, files: new Set(tests.map((test) => test.file)).size };
|
|
55
|
-
}
|
|
56
41
|
/** Why the tests couldn't be listed, as a sentence. */
|
|
57
42
|
export function describeVitestListFailure(failure) {
|
|
58
43
|
switch (failure.kind) {
|
package/dist/extensions.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import type { Driver } from "./sdk/extension/index.ts";
|
|
1
2
|
/**
|
|
2
|
-
* Every extension, in order. Adding an extension adds it here; its resources join `RESOURCES` in this order
|
|
3
|
-
* extension may bring no resource, as the
|
|
3
|
+
* Every extension, in order. Adding an extension adds it here; its resources join `RESOURCES` in this order, and its
|
|
4
|
+
* drivers `DRIVERS`. An extension may bring no resource, as the Vitest and
|
|
5
|
+
* Playwright extensions bring only a driver each.
|
|
4
6
|
*/
|
|
5
7
|
export declare const EXTENSIONS: readonly [import("./sdk/extension/commands.ts").Extension<"github", readonly [import("./sdk/extension/resource-definition.ts").ResourceDefinition<"githubFixtureRepo", {
|
|
6
8
|
readonly repo: {
|
|
@@ -18,13 +20,13 @@ export declare const EXTENSIONS: readonly [import("./sdk/extension/commands.ts")
|
|
|
18
20
|
readonly description: "Whether the run goes on without the GitHub fixture repository when the launcher environment variable its tokenEnv names is unset, overriding resources.githubFixtureRepo.optional in storm.config.ts; default false. --github-optional=false makes the repository required for this run, so a run without its token is refused with github_token_missing before anything starts. Gives the run the GitHub fixture repository resource, whose repo and tokenEnv only storm.config.ts gives.";
|
|
19
21
|
};
|
|
20
22
|
};
|
|
21
|
-
}, import("./extensions/github/index.ts").GitHubFixtureRepoPayload, import("./extensions/github/
|
|
23
|
+
}, import("./extensions/github/index.ts").GitHubFixtureRepoPayload, import("./extensions/github/context.ts").GitHubFixtureRepoContext>], unknown, readonly []>, import("./sdk/extension/commands.ts").Extension<"testserver", readonly [import("./sdk/extension/resource-definition.ts").ResourceDefinition<"testserverPool", {
|
|
22
24
|
readonly sandboxes: {
|
|
23
25
|
readonly schema: import("zod").ZodNumber;
|
|
24
26
|
readonly default: ({ testPlan }: import("./sdk/extension/resource-definition.ts").PlannedRun) => number;
|
|
25
27
|
readonly flag: {
|
|
26
28
|
readonly valueLabel: "N";
|
|
27
|
-
readonly description: "How many Testserver sandboxes the command gets, 1 to 32, overriding resources.testserverPool.sandboxes in storm.config.ts; default 1, or with storm vitest one per 4 test files
|
|
29
|
+
readonly description: "How many Testserver sandboxes the command gets, 1 to 32, overriding resources.testserverPool.sandboxes in storm.config.ts; default 1, or with storm vitest or storm playwright one per 4 test files it counted, at most 8. Gives the run the Testserver pool.";
|
|
28
30
|
};
|
|
29
31
|
};
|
|
30
32
|
readonly build: {
|
|
@@ -58,7 +60,7 @@ export declare const EXTENSIONS: readonly [import("./sdk/extension/commands.ts")
|
|
|
58
60
|
readonly description: "Whether the run may create Testserver sandboxes, overriding resources.testserverPool.create in storm.config.ts; default true. --testserver-create=false runs only on Testserver sandboxes already in the pool, never minting for Testserver or creating: it needs no --scope or --project with --unsandboxed, and takes no --testserver-ttl. --testserver-create turns creating on over the file's create: false. Gives the run the Testserver pool.";
|
|
59
61
|
};
|
|
60
62
|
};
|
|
61
|
-
}, import("./extensions/testserver/run/connection.ts").TestserverConnection, import("./extensions/testserver/
|
|
63
|
+
}, import("./extensions/testserver/run/connection.ts").TestserverConnection, import("./extensions/testserver/context.ts").TestserverPoolContext>], import("./extensions/testserver/commands/app.ts").TestserverLauncherApp, readonly []>, import("./sdk/extension/commands.ts").Extension<"vitest", readonly [], unknown, readonly [Driver<"vitest", import("./extensions/vitest/driver.ts").VitestDriverContext>]>, import("./sdk/extension/commands.ts").Extension<"playwright", readonly [], unknown, readonly [Driver<"playwright", import("./extensions/playwright/driver.ts").PlaywrightDriverContext>]>];
|
|
62
64
|
/**
|
|
63
65
|
* Every extension's resources, each extension's in turn, in the one order everything about the resources follows:
|
|
64
66
|
* the order a run calls their `beforeRun` and their `acquireForRun`, their refusals rank in, the run payload's
|
|
@@ -83,13 +85,13 @@ export declare const RESOURCES: readonly [import("./sdk/extension/resource-defin
|
|
|
83
85
|
readonly description: "Whether the run goes on without the GitHub fixture repository when the launcher environment variable its tokenEnv names is unset, overriding resources.githubFixtureRepo.optional in storm.config.ts; default false. --github-optional=false makes the repository required for this run, so a run without its token is refused with github_token_missing before anything starts. Gives the run the GitHub fixture repository resource, whose repo and tokenEnv only storm.config.ts gives.";
|
|
84
86
|
};
|
|
85
87
|
};
|
|
86
|
-
}, import("./extensions/github/index.ts").GitHubFixtureRepoPayload, import("./extensions/github/
|
|
88
|
+
}, import("./extensions/github/index.ts").GitHubFixtureRepoPayload, import("./extensions/github/context.ts").GitHubFixtureRepoContext>, import("./sdk/extension/resource-definition.ts").ResourceDefinition<"testserverPool", {
|
|
87
89
|
readonly sandboxes: {
|
|
88
90
|
readonly schema: import("zod").ZodNumber;
|
|
89
91
|
readonly default: ({ testPlan }: import("./sdk/extension/resource-definition.ts").PlannedRun) => number;
|
|
90
92
|
readonly flag: {
|
|
91
93
|
readonly valueLabel: "N";
|
|
92
|
-
readonly description: "How many Testserver sandboxes the command gets, 1 to 32, overriding resources.testserverPool.sandboxes in storm.config.ts; default 1, or with storm vitest one per 4 test files
|
|
94
|
+
readonly description: "How many Testserver sandboxes the command gets, 1 to 32, overriding resources.testserverPool.sandboxes in storm.config.ts; default 1, or with storm vitest or storm playwright one per 4 test files it counted, at most 8. Gives the run the Testserver pool.";
|
|
93
95
|
};
|
|
94
96
|
};
|
|
95
97
|
readonly build: {
|
|
@@ -123,22 +125,42 @@ export declare const RESOURCES: readonly [import("./sdk/extension/resource-defin
|
|
|
123
125
|
readonly description: "Whether the run may create Testserver sandboxes, overriding resources.testserverPool.create in storm.config.ts; default true. --testserver-create=false runs only on Testserver sandboxes already in the pool, never minting for Testserver or creating: it needs no --scope or --project with --unsandboxed, and takes no --testserver-ttl. --testserver-create turns creating on over the file's create: false. Gives the run the Testserver pool.";
|
|
124
126
|
};
|
|
125
127
|
};
|
|
126
|
-
}, import("./extensions/testserver/run/connection.ts").TestserverConnection, import("./extensions/testserver/
|
|
128
|
+
}, import("./extensions/testserver/run/connection.ts").TestserverConnection, import("./extensions/testserver/context.ts").TestserverPoolContext>];
|
|
127
129
|
/**
|
|
128
|
-
* The
|
|
129
|
-
* reports and presentations, the run's state and waterfall through the resources' progress, their
|
|
130
|
-
* given
|
|
130
|
+
* The definition set of `RESOURCES`, in their order: what a run, its views and its reports take. It holds every
|
|
131
|
+
* resource's reports and presentations, the run's state and waterfall through the resources' progress, their
|
|
132
|
+
* lifecycles over given Contexts, and their Contexts built from a launcher environment.
|
|
131
133
|
*/
|
|
132
|
-
export declare const
|
|
134
|
+
export declare const DEFINITION_SET: import("./core/resource-definition-set.ts").ResourceDefinitionSet;
|
|
133
135
|
/**
|
|
134
|
-
* Each definition's
|
|
135
|
-
* definition, and what an extension's mount reads its own. Each resource keeps its
|
|
136
|
+
* Each definition's Context, by its name: what the launcher hands each lifecycle, for every resource instance of the
|
|
137
|
+
* definition, and what an extension's mount reads its own. Each resource keeps its Context's type.
|
|
136
138
|
*/
|
|
137
|
-
export type
|
|
138
|
-
readonly [R in (typeof RESOURCES)[number] as R["name"]]: ReturnType<R["
|
|
139
|
+
export type StormResourceContextMap = {
|
|
140
|
+
readonly [R in (typeof RESOURCES)[number] as R["name"]]: ReturnType<R["context"]>;
|
|
139
141
|
};
|
|
140
142
|
/**
|
|
141
|
-
* Every definition's live
|
|
143
|
+
* Every definition's live Context, by its name, each built from what the launcher gives it over `env`, with its own
|
|
142
144
|
* state directory.
|
|
143
145
|
*/
|
|
144
|
-
export declare function
|
|
146
|
+
export declare function liveResourceContexts(env: Readonly<Record<string, string | undefined>>): StormResourceContextMap;
|
|
147
|
+
/**
|
|
148
|
+
* Every extension's drivers, each extension's in turn, each with its own types. Adding a driver adds its
|
|
149
|
+
* `defineDriver` to its extension's `drivers`. The launcher keeps a thin `commands/<name>/` directory for each, whose
|
|
150
|
+
* `command.ts` is the driver's run command (`defineRunCommand`). `storm exec` has no driver, so none is here for it.
|
|
151
|
+
*/
|
|
152
|
+
export declare const DRIVERS: readonly [Driver<"vitest", import("./extensions/vitest/driver.ts").VitestDriverContext>, Driver<"playwright", import("./extensions/playwright/driver.ts").PlaywrightDriverContext>];
|
|
153
|
+
/**
|
|
154
|
+
* The registry's driver named `name`, for the run command of that name. Throws when no extension brings one: a
|
|
155
|
+
* `commands/<name>/` directory whose driver left the registry is a bug in the launcher's tree.
|
|
156
|
+
*/
|
|
157
|
+
export declare function driverNamed(name: string): Driver;
|
|
158
|
+
/**
|
|
159
|
+
* Each driver's Context, by its name: what the launcher hands that driver's plan step. Each driver keeps its Context's
|
|
160
|
+
* type.
|
|
161
|
+
*/
|
|
162
|
+
export type StormDriverContextMap = {
|
|
163
|
+
readonly [D in (typeof DRIVERS)[number] as D["name"]]: ReturnType<D["context"]>;
|
|
164
|
+
};
|
|
165
|
+
/** Every driver's live Context, by its name, each built by its own `context`. */
|
|
166
|
+
export declare function liveDriverContexts(): StormDriverContextMap;
|
package/dist/extensions.js
CHANGED
|
@@ -1,21 +1,26 @@
|
|
|
1
|
-
// The registry, in the composition layer: the one file that takes every extension value. It lists the
|
|
2
|
-
// order (`EXTENSIONS`), takes their resources in that order (`RESOURCES`), each as its `defineResource`
|
|
3
|
-
// and builds from that list the
|
|
4
|
-
// and presentations, the run's state and waterfall, the lifecycles and
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
// and
|
|
9
|
-
//
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
// The extension registry, in the composition layer: the one file that takes every extension value. It lists the
|
|
2
|
+
// extensions in order (`EXTENSIONS`), takes their resources in that order (`RESOURCES`), each as its `defineResource`
|
|
3
|
+
// returned it, and builds from that list the resource definition set (`DEFINITION_SET`, the core's
|
|
4
|
+
// `resourceDefinitionSet`): the resource reports and presentations, the run's state and waterfall, the lifecycles and
|
|
5
|
+
// the Contexts. It types each definition's Context (`StormResourceContextMap`) and builds the live Contexts
|
|
6
|
+
// (`liveResourceContexts`). Beside the resources it takes the extensions' drivers (`DRIVERS`), each as its
|
|
7
|
+
// `defineDriver` returned it, gives a run command its driver by name (`driverNamed`), types each driver's Context
|
|
8
|
+
// (`StormDriverContextMap`) and builds the live ones (`liveDriverContexts`). It imports no command: the commands import
|
|
9
|
+
// it. The extensions' command trees, which help needs without the rest, are in `src/extension-commands.ts`. An
|
|
10
|
+
// extension folder, a driver extension's among them, which brings only a driver, is reached only through its
|
|
11
|
+
// extension value, and only this file takes one (`src/extension-commands.ts` takes only each extension's
|
|
12
|
+
// `command-tree.ts`); `.oxlintrc.json` enforces it.
|
|
13
|
+
import { driversOf, driverContexts, resourceDefinitionSet, resourcesOf } from "./core/index.js";
|
|
12
14
|
import { githubExtension } from "./extensions/github/index.js";
|
|
15
|
+
import { playwrightExtension } from "./extensions/playwright/extension.js";
|
|
13
16
|
import { testserverExtension } from "./extensions/testserver/index.js";
|
|
17
|
+
import { vitestExtension } from "./extensions/vitest/extension.js";
|
|
14
18
|
/**
|
|
15
|
-
* Every extension, in order. Adding an extension adds it here; its resources join `RESOURCES` in this order
|
|
16
|
-
* extension may bring no resource, as the
|
|
19
|
+
* Every extension, in order. Adding an extension adds it here; its resources join `RESOURCES` in this order, and its
|
|
20
|
+
* drivers `DRIVERS`. An extension may bring no resource, as the Vitest and
|
|
21
|
+
* Playwright extensions bring only a driver each.
|
|
17
22
|
*/
|
|
18
|
-
export const EXTENSIONS = [githubExtension, testserverExtension,
|
|
23
|
+
export const EXTENSIONS = [githubExtension, testserverExtension, vitestExtension, playwrightExtension];
|
|
19
24
|
/**
|
|
20
25
|
* Every extension's resources, each extension's in turn, in the one order everything about the resources follows:
|
|
21
26
|
* the order a run calls their `beforeRun` and their `acquireForRun`, their refusals rank in, the run payload's
|
|
@@ -26,16 +31,38 @@ export const EXTENSIONS = [githubExtension, testserverExtension, storyExtension]
|
|
|
26
31
|
*/
|
|
27
32
|
export const RESOURCES = resourcesOf(EXTENSIONS);
|
|
28
33
|
/**
|
|
29
|
-
* The
|
|
30
|
-
* reports and presentations, the run's state and waterfall through the resources' progress, their
|
|
31
|
-
* given
|
|
34
|
+
* The definition set of `RESOURCES`, in their order: what a run, its views and its reports take. It holds every
|
|
35
|
+
* resource's reports and presentations, the run's state and waterfall through the resources' progress, their
|
|
36
|
+
* lifecycles over given Contexts, and their Contexts built from a launcher environment.
|
|
32
37
|
*/
|
|
33
|
-
export const
|
|
38
|
+
export const DEFINITION_SET = resourceDefinitionSet(RESOURCES);
|
|
34
39
|
/**
|
|
35
|
-
* Every definition's live
|
|
40
|
+
* Every definition's live Context, by its name, each built from what the launcher gives it over `env`, with its own
|
|
36
41
|
* state directory.
|
|
37
42
|
*/
|
|
38
|
-
export function
|
|
39
|
-
// The
|
|
40
|
-
|
|
43
|
+
export function liveResourceContexts(env) {
|
|
44
|
+
// The definition set builds one Context per resource of `RESOURCES`, under its definition's name, from its own
|
|
45
|
+
// `context`.
|
|
46
|
+
return DEFINITION_SET.contexts(env);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Every extension's drivers, each extension's in turn, each with its own types. Adding a driver adds its
|
|
50
|
+
* `defineDriver` to its extension's `drivers`. The launcher keeps a thin `commands/<name>/` directory for each, whose
|
|
51
|
+
* `command.ts` is the driver's run command (`defineRunCommand`). `storm exec` has no driver, so none is here for it.
|
|
52
|
+
*/
|
|
53
|
+
export const DRIVERS = driversOf(EXTENSIONS);
|
|
54
|
+
/**
|
|
55
|
+
* The registry's driver named `name`, for the run command of that name. Throws when no extension brings one: a
|
|
56
|
+
* `commands/<name>/` directory whose driver left the registry is a bug in the launcher's tree.
|
|
57
|
+
*/
|
|
58
|
+
export function driverNamed(name) {
|
|
59
|
+
const drivers = DRIVERS;
|
|
60
|
+
const driver = drivers.find((each) => each.name === name);
|
|
61
|
+
if (driver === undefined)
|
|
62
|
+
throw new Error(`No extension in src/extensions.ts brings a driver named ${name}`);
|
|
63
|
+
return driver;
|
|
64
|
+
}
|
|
65
|
+
/** Every driver's live Context, by its name, each built by its own `context`. */
|
|
66
|
+
export function liveDriverContexts() {
|
|
67
|
+
return driverContexts(DRIVERS);
|
|
41
68
|
}
|
package/dist/forward-sigterm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Which of the signals that stop a command storm passes on to a command it runs on this machine: only SIGTERM. Ctrl+C
|
|
2
2
|
// and a closed terminal reach the command directly, through its process group, so passing them on would signal it
|
|
3
|
-
// twice. `exec`'s
|
|
3
|
+
// twice. `exec`'s, `vitest`'s and `playwright`'s run use it.
|
|
4
4
|
import { NodeSignalCancellation } from "@vercel/clinkr/node";
|
|
5
5
|
/** Follows `signal`, Clinkr's command signal, and aborts `terminate` only for a SIGTERM, even one before the call. */
|
|
6
6
|
export function forwardSigterm(signal) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { type CommandCredentialSource, configErrors, type ConfigLoadError, type ConfigResolver, credentialErrors, type CredentialReport, type CredentialResolver, type CredentialSourceError, credentialSourceErrors, type CredentialTarget, type LoadedResourceSettings, type TargetSettings, } from "../config/index.ts";
|
|
2
|
-
export type {
|
|
2
|
+
export type { PackageBinSearch, PackageBinService } from "./local-services.ts";
|
|
@@ -1,57 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Where the
|
|
3
|
-
* directory has one, every directory it looked in, nearest first.
|
|
2
|
+
* Where the package binary service found a binary: the absolute path of the nearest `node_modules/.bin/<name>`; or,
|
|
3
|
+
* when no directory has one, every directory it looked in, nearest first.
|
|
4
4
|
*/
|
|
5
|
-
export type
|
|
5
|
+
export type PackageBinSearch = {
|
|
6
6
|
readonly ok: true;
|
|
7
7
|
readonly path: string;
|
|
8
8
|
} | {
|
|
9
9
|
readonly ok: false;
|
|
10
10
|
readonly searched: readonly string[];
|
|
11
11
|
};
|
|
12
|
-
/** Finds the `vitest` a package's scripts would run, as `storm vitest` finds it for a run on this machine. */
|
|
13
|
-
export interface VitestService {
|
|
14
|
-
/**
|
|
15
|
-
* The nearest `node_modules/.bin/vitest` from `from`, an absolute directory, and each directory above it, up to the
|
|
16
|
-
* root of the Git repository `from` is in, or the filesystem's root outside one.
|
|
17
|
-
*/
|
|
18
|
-
find(from: string): Promise<VitestSearch>;
|
|
19
|
-
}
|
|
20
|
-
/** A command to run in the launcher's terminal. */
|
|
21
|
-
export interface TerminalRunRequest {
|
|
22
|
-
/** The command, run as given, with no shell. `argv[0]` is the executable. */
|
|
23
|
-
readonly argv: readonly string[];
|
|
24
|
-
/** The command's whole environment; nothing else is inherited. */
|
|
25
|
-
readonly env: Readonly<Record<string, string>>;
|
|
26
|
-
/** The directory it runs in, an absolute path. */
|
|
27
|
-
readonly cwd: string;
|
|
28
|
-
/** The command's own signal (Clinkr's `signal`), which aborts on the first SIGINT, SIGTERM or SIGHUP. */
|
|
29
|
-
readonly signal: AbortSignal;
|
|
30
|
-
}
|
|
31
12
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* exits with when it passes the command's end on, as `exec` does: its code, or `128 + n` when signal `n` ended it (1
|
|
35
|
-
* for a signal Node can't number).
|
|
13
|
+
* Finds the binary a package's scripts would run, such as `vitest` or `playwright`, as `storm vitest` finds `vitest`
|
|
14
|
+
* for a run on this machine.
|
|
36
15
|
*/
|
|
37
|
-
export
|
|
38
|
-
readonly kind: "exited";
|
|
39
|
-
readonly code: number;
|
|
40
|
-
readonly status: number;
|
|
41
|
-
} | {
|
|
42
|
-
readonly kind: "signaled";
|
|
43
|
-
readonly signal: string;
|
|
44
|
-
readonly status: number;
|
|
45
|
-
} | {
|
|
46
|
-
readonly kind: "spawn-failed";
|
|
47
|
-
readonly message: string;
|
|
48
|
-
};
|
|
49
|
-
/** Runs a command on this machine in the launcher's terminal. */
|
|
50
|
-
export interface TerminalService {
|
|
16
|
+
export interface PackageBinService {
|
|
51
17
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* SIGTERM is passed on. A second signal makes Clinkr's host exit at once. It never rejects.
|
|
18
|
+
* The nearest `node_modules/.bin/<name>` from `from`, an absolute directory, and each directory above it, up to the
|
|
19
|
+
* root of the Git repository `from` is in, or the filesystem's root outside one.
|
|
55
20
|
*/
|
|
56
|
-
|
|
21
|
+
find(name: string, from: string): Promise<PackageBinSearch>;
|
|
57
22
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// The local services' types (`GLOSSARY.md`, **Local service**): what the launcher gives every command to reach this
|
|
2
|
-
// machine, the
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
// status, and `VitestSearch` that of storm's Vitest integration's `FindVitestResult`.
|
|
2
|
+
// machine, the package binary service (`PackageBinService`), which finds a package's binary, such as `vitest`. The
|
|
3
|
+
// composition layer builds it (`src/local-services.ts`). It refuses nothing: it answers what it found, and the command
|
|
4
|
+
// words it. This file imports nothing, so the module stays left of `core`: `PackageBinSearch` declares the shape of
|
|
5
|
+
// the core's `FindPackageBinResult` itself.
|
|
7
6
|
export {};
|
package/dist/live-app.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
// The app storm's executable hands every command: the live
|
|
2
|
-
// from Clinkr's Node host. Only `bin/storm.ts` loads this module, inside its `app`
|
|
3
|
-
// when a command runs; so help, listings, `--version`, and invocation errors never
|
|
4
|
-
// runner, or the SDK.
|
|
1
|
+
// The app storm's executable hands every command: the live `StormContext`, each resource's and each driver's live
|
|
2
|
+
// Context, and what a run needs from Clinkr's Node host. Only `bin/storm.ts` loads this module, inside its `app`
|
|
3
|
+
// factory, which Clinkr calls only when a command runs; so help, listings, `--version`, and invocation errors never
|
|
4
|
+
// load the extension registry, the runner, or the SDK.
|
|
5
5
|
import { launcherResolvers, liveContext, localServices } from "./context.js";
|
|
6
6
|
import { resolvePresentation } from "./presentation.js";
|
|
7
|
-
import {
|
|
7
|
+
import { liveDriverContexts, liveResourceContexts, RESOURCES } from "./extensions.js";
|
|
8
8
|
import { localUserName } from "./runner/index.js";
|
|
9
9
|
/** The live app over the resolved host, whose commands record their status in `exit`, which the executable reads. */
|
|
10
10
|
export function liveStormApp(host, build, exit) {
|
|
11
11
|
const context = liveContext({ env: host.env });
|
|
12
12
|
return {
|
|
13
13
|
context,
|
|
14
|
-
|
|
14
|
+
resourceContexts: liveResourceContexts(host.env),
|
|
15
|
+
driverContexts: liveDriverContexts(),
|
|
15
16
|
resourceDefinitions: RESOURCES,
|
|
16
17
|
...launcherResolvers({ context, cwd: host.cwd, resourceDefinitions: RESOURCES }),
|
|
17
18
|
...localServices({ context }),
|
package/dist/local-services.d.ts
CHANGED
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
import type { CheckoutGateway } from "./runner/index.ts";
|
|
2
|
-
import {
|
|
3
|
-
import type {
|
|
4
|
-
import type { VitestListGateway } from "./vitest/plan.ts";
|
|
2
|
+
import type { PackageBinGateway } from "./core/index.ts";
|
|
3
|
+
import type { PackageBinService } from "./launcher-resolvers/index.ts";
|
|
5
4
|
/**
|
|
6
|
-
* The
|
|
7
|
-
* in each directory from `from` up to that root, or up to the filesystem's root outside a repository.
|
|
5
|
+
* The package binary service over `checkout`, which says the repository's root, and `packageBins`, which looks for the
|
|
6
|
+
* binary in each directory from `from` up to that root, or up to the filesystem's root outside a repository.
|
|
8
7
|
*/
|
|
9
|
-
export declare function
|
|
8
|
+
export declare function packageBinService(context: {
|
|
10
9
|
readonly checkout: CheckoutGateway;
|
|
11
|
-
readonly
|
|
12
|
-
}):
|
|
13
|
-
/**
|
|
14
|
-
* The terminal service over `terminalCommands`. It passes on only a SIGTERM that aborts the command's signal
|
|
15
|
-
* (`forwardSigterm`), and waits for the command either way.
|
|
16
|
-
*/
|
|
17
|
-
export declare function terminalService(context: {
|
|
18
|
-
readonly terminalCommands: TerminalCommandGateway;
|
|
19
|
-
}): TerminalService;
|
|
10
|
+
readonly packageBins: PackageBinGateway;
|
|
11
|
+
}): PackageBinService;
|