@cnc-tools/storm 0.10.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 +12 -9
- package/dist/build-info.js +1 -1
- package/dist/chunks/{chunk-YF3ICDBY.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-WF4KJ7YG.js → chunk-BW2ADH7U.js} +1 -1
- package/dist/chunks/chunk-FK4RLDEK.js +40 -0
- package/dist/chunks/chunk-FSP3SJ35.js +1429 -0
- package/dist/chunks/{chunk-J6ZNYUDV.js → chunk-GQIL3AHY.js} +2 -3
- package/dist/chunks/chunk-GSC6SRTW.js +27 -0
- package/dist/chunks/chunk-ISGQJIQM.js +852 -0
- package/dist/chunks/chunk-IYM44FUX.js +1461 -0
- package/dist/chunks/{chunk-XHJGHJBW.js → chunk-LQKNI3EG.js} +38 -279
- package/dist/chunks/chunk-NMVODY3P.js +19 -0
- package/dist/chunks/{chunk-VJQLMGOH.js → chunk-ODQHQJLE.js} +2761 -3699
- package/dist/chunks/chunk-RYRJNHL7.js +55 -0
- package/dist/chunks/chunk-SXW6XN4R.js +161 -0
- package/dist/chunks/{chunk-OVXD7GES.js → chunk-T6AZIDZD.js} +43 -396
- package/dist/chunks/chunk-TEEZL3GA.js +851 -0
- package/dist/chunks/chunk-TMQQYHUX.js +80 -0
- package/dist/chunks/{chunk-AKKNF3WZ.js → chunk-U7M3ZB3Z.js} +565 -595
- package/dist/chunks/{chunk-JQ2HK4RN.js → chunk-Y3BUNNRG.js} +234 -57
- package/dist/chunks/{chunk-ZJ2USLAT.js → chunk-YM6TZV4L.js} +394 -416
- package/dist/chunks/chunk-YT5OROR7.js +271 -0
- package/dist/chunks/{live-app-RIJM3QFD.js → live-app-AZ5N5HBD.js} +36 -12
- package/dist/command-tree.d.ts +4 -1
- package/dist/command-tree.js +4 -1
- package/dist/commands/exec/cleanup.d.ts +3 -3
- package/dist/commands/exec/cleanup.js +6 -2
- package/dist/commands/exec/command.d.ts +56 -17
- package/dist/commands/exec/command.js +51 -39
- 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/job-summary.d.ts +1 -1
- package/dist/commands/exec/job-summary.js +1 -1
- package/dist/commands/exec/live-view.js +58 -28
- package/dist/commands/exec/mint-failed.js +5 -5
- package/dist/commands/exec/outcomes.d.ts +72 -10
- package/dist/commands/exec/outcomes.js +38 -10
- package/dist/commands/exec/plan-run.d.ts +3 -5
- 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 +2 -2
- package/dist/commands/exec/resource-refusals.js +10 -10
- 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 +85 -20
- package/dist/commands/exec/run-command.js +142 -238
- 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 +3 -37
- package/dist/commands/exec/test-plan.js +11 -28
- 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.d.ts +3 -1
- package/dist/commands/exec/waterfall.js +20 -3
- 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.d.ts +4 -0
- package/dist/commands/playwright/metadata.js +8 -0
- package/dist/commands/runs/facts.d.ts +22 -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 +18 -13
- package/dist/commands/runs/list/outcomes.d.ts +17 -4
- package/dist/commands/runs/logs/command.js +20 -14
- package/dist/commands/runs/logs/outcomes.js +1 -1
- package/dist/commands/runs/past-run.d.ts +3 -27
- package/dist/commands/runs/past-run.js +3 -37
- package/dist/commands/runs/show/command.d.ts +36 -8
- package/dist/commands/runs/show/command.js +53 -33
- 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 +37 -16
- 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 -174
- package/dist/commands/vitest/metadata.js +1 -1
- package/dist/config/credential-resolver.d.ts +6 -3
- package/dist/config/credential-resolver.js +6 -5
- package/dist/config-file/define.d.ts +1 -1
- package/dist/context.d.ts +44 -24
- package/dist/context.js +20 -13
- package/dist/core/before-run.d.ts +7 -6
- package/dist/core/before-run.js +9 -9
- package/dist/core/definition-lookup.d.ts +22 -0
- package/dist/core/definition-lookup.js +35 -0
- package/dist/core/drivers-of.d.ts +23 -0
- package/dist/core/drivers-of.js +13 -0
- package/dist/core/events.d.ts +6 -22
- package/dist/core/gateways.d.ts +38 -170
- package/dist/core/index.d.ts +13 -12
- package/dist/core/index.js +12 -11
- 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 +5 -4
- package/dist/core/presentations.js +9 -9
- package/dist/core/resource-definition-set.d.ts +39 -0
- package/dist/core/resource-definition-set.js +31 -0
- package/dist/core/resource-reports.d.ts +38 -5
- package/dist/core/resource-reports.js +47 -17
- package/dist/core/resource.d.ts +4 -4
- package/dist/core/resources.d.ts +8 -7
- package/dist/core/resources.js +11 -13
- package/dist/core/run-state.d.ts +27 -16
- package/dist/core/run-state.js +50 -18
- package/dist/core/run.d.ts +42 -54
- package/dist/core/run.js +72 -122
- 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 -4
- package/dist/credential/events.d.ts +20 -0
- package/dist/credential/events.js +4 -0
- package/dist/credential/index.d.ts +2 -1
- package/dist/credential/index.js +6 -5
- package/dist/credential/source.d.ts +38 -26
- package/dist/credential/source.js +25 -34
- package/dist/extension-commands.d.ts +12 -6
- package/dist/extension-commands.js +16 -13
- 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 +2 -2
- package/dist/extensions/testserver/command-tree.js +2 -3
- 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 +17 -12
- package/dist/extensions/testserver/commands/pool/list/command.js +8 -5
- 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 +8 -6
- package/dist/extensions/testserver/vitest/config.js +10 -16
- 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 +12 -10
- package/dist/extensions/testserver/vitest/fixtures.js +44 -22
- 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 +43 -30
- package/dist/extensions.js +50 -35
- package/dist/forward-sigterm.d.ts +8 -0
- package/dist/forward-sigterm.js +18 -0
- package/dist/launcher-resolvers/index.d.ts +1 -0
- package/dist/launcher-resolvers/index.js +2 -1
- package/dist/launcher-resolvers/local-services.d.ts +22 -0
- package/dist/launcher-resolvers/local-services.js +6 -0
- package/dist/live-app.js +9 -7
- package/dist/local-services.d.ts +11 -0
- package/dist/local-services.js +16 -0
- 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/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 +95 -0
- package/dist/run-directory/recording.js +85 -0
- package/dist/{commands/exec → run-directory}/run-collector.d.ts +9 -8
- package/dist/{commands/exec → run-directory}/run-collector.js +8 -10
- package/dist/{core → run-directory}/run-directory.d.ts +3 -3
- package/dist/{core → run-directory}/run-directory.js +2 -2
- package/dist/{commands/exec → run-directory}/run-record.d.ts +94 -27
- package/dist/run-directory/run-record.js +229 -0
- package/dist/{commands/exec → run-directory}/timeline-facts.d.ts +5 -8
- package/dist/{commands/exec → run-directory}/timeline-facts.js +11 -25
- 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 +73 -33
- package/dist/runner/gateways.d.ts +30 -10
- package/dist/runner/index.d.ts +15 -17
- package/dist/runner/index.js +12 -14
- package/dist/runner/live/checkout-gateway.js +15 -7
- package/dist/runner/live/snapshot-records.js +8 -7
- package/dist/runner/prepare.d.ts +26 -26
- package/dist/runner/prepare.js +27 -14
- package/dist/runner/ready.d.ts +43 -10
- package/dist/runner/ready.js +51 -34
- package/dist/runner/recipe.d.ts +48 -4
- package/dist/runner/recipe.js +42 -1
- package/dist/runner/scope.d.ts +13 -13
- package/dist/runner/scope.js +9 -11
- package/dist/runner/secrets.d.ts +6 -0
- package/dist/runner/secrets.js +10 -0
- package/dist/runner/session.d.ts +128 -0
- package/dist/runner/session.js +138 -0
- 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 +35 -20
- package/dist/runner/snapshot-save.js +47 -37
- package/dist/runner/snapshot-start.d.ts +25 -0
- package/dist/runner/snapshot-start.js +16 -0
- package/dist/sdk/extension/ci.d.ts +2 -0
- package/dist/sdk/extension/ci.js +6 -0
- package/dist/sdk/extension/commands.d.ts +44 -28
- package/dist/sdk/extension/commands.js +15 -13
- package/dist/sdk/extension/driver.d.ts +143 -0
- package/dist/sdk/extension/driver.js +28 -0
- package/dist/sdk/extension/index.d.ts +3 -1
- package/dist/sdk/extension/index.js +16 -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 +10 -8
- package/dist/sdk/extension/lifecycle.js +2 -2
- package/dist/sdk/extension/progress.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 +12 -12
- package/dist/vendor/testserver-sdk/container/container.js +39 -21
- 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/vendor/testserver-sdk/testserver/failure.d.ts +4 -3
- package/dist/vendor/testserver-sdk/testserver/failure.js +4 -3
- 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 -5
- package/skills/read-run-output.md +22 -7
- package/dist/chunks/chunk-AGWW3HDT.js +0 -2559
- package/dist/chunks/chunk-H2VCSNVU.js +0 -351
- package/dist/commands/exec/run-record.js +0 -135
- 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/mint.d.ts +0 -10
- package/dist/core/mint.js +0 -14
- package/dist/core/resource-registry.d.ts +0 -54
- package/dist/core/resource-registry.js +0 -57
- 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/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 -34
- package/dist/story/command-line.js +0 -100
- 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 -10
- package/dist/story/json.d.ts +0 -16
- package/dist/story/json.js +0 -59
- package/dist/story/live/recording-gateway.d.ts +0 -2
- package/dist/story/live/recording-gateway.js +0 -103
- package/dist/story/mode.d.ts +0 -17
- package/dist/story/mode.js +0 -21
- 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 -130
- 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/{vitest → extensions/vitest/plan}/list-output.d.ts +0 -0
- /package/dist/{vitest → extensions/vitest/plan}/list-output.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
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { type CommandTree, type Mount } from "@vercel/clinkr";
|
|
2
2
|
export { type CommandMetadata, type CommandTree, commandTree, defineOutcomes, renderOutcome, type Row, type Warning, } from "@vercel/clinkr";
|
|
3
3
|
/**
|
|
4
|
-
* What an extension's author declares of its commands:
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* What an extension's author declares of its commands: its command tree, whose commands take `App`, the tree's own app;
|
|
5
|
+
* `app`, which projects it from `LauncherApp`, what the mount reads of the launcher's app; the help header of the group
|
|
6
|
+
* storm mounts it as; and the tree's directory. The path of that group is the launcher's (`src/extension-commands.ts`),
|
|
7
|
+
* not the extension's.
|
|
7
8
|
*/
|
|
8
|
-
export interface ExtensionCommandsDefinition<
|
|
9
|
-
/**
|
|
10
|
-
readonly extension: Name;
|
|
11
|
-
/** What the extension adds, in a sentence: the help header of its `storm ext <name>` group. */
|
|
9
|
+
export interface ExtensionCommandsDefinition<LauncherApp, App> {
|
|
10
|
+
/** What the extension adds, in a sentence: the help header of the group storm mounts its commands as. */
|
|
12
11
|
readonly description: string;
|
|
13
12
|
readonly tree: CommandTree<App>;
|
|
14
13
|
/**
|
|
@@ -17,55 +16,72 @@ export interface ExtensionCommandsDefinition<Name extends string, LauncherApp, A
|
|
|
17
16
|
*/
|
|
18
17
|
readonly directory: string;
|
|
19
18
|
/**
|
|
20
|
-
* The tree's app, from the launcher's: what its commands use of it, such as the extension's resources'
|
|
21
|
-
* launcher resolvers. Clinkr calls it when a command of the tree runs, so help never calls it.
|
|
19
|
+
* The tree's app, from the launcher's: what its commands use of it, such as the extension's resources' Contexts and
|
|
20
|
+
* the launcher resolvers. Clinkr calls it when a command of the tree runs, so help never calls it.
|
|
22
21
|
*/
|
|
23
22
|
readonly app: (launcherApp: LauncherApp) => App;
|
|
24
23
|
}
|
|
25
24
|
/**
|
|
26
25
|
* An extension's commands, as `defineExtensionCommands` returns them: the definition but for its tree and its
|
|
27
26
|
* projection, and `mount`, which mounts the tree's directory group, its directory under the code root the launcher
|
|
28
|
-
* gives, at the path the launcher gives, with the extension's description and the projection. A launcher that types
|
|
29
|
-
* mounts with its own app compiles only while that app is a `LauncherApp`.
|
|
27
|
+
* gives, at the path the launcher gives, with the extension's description and the projection. A launcher that types
|
|
28
|
+
* its mounts with its own app compiles only while that app is a `LauncherApp`.
|
|
30
29
|
*/
|
|
31
|
-
export interface ExtensionCommands<
|
|
32
|
-
readonly extension: Name;
|
|
30
|
+
export interface ExtensionCommands<LauncherApp> {
|
|
33
31
|
readonly description: string;
|
|
34
32
|
readonly directory: string;
|
|
35
|
-
readonly mount: (placement:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
readonly mount: (placement: ExtensionCommandsPlacement) => Mount<LauncherApp>;
|
|
34
|
+
}
|
|
35
|
+
/** Where the launcher mounts an extension's commands: the launcher's choice, never the extension's. */
|
|
36
|
+
export interface ExtensionCommandsPlacement {
|
|
37
|
+
/** Where the tree's commands sit in `storm`, such as `["ext", "<name>"]`. */
|
|
38
|
+
readonly path: readonly string[];
|
|
39
|
+
/** Storm's code root (`src/` or `dist/`), which the tree's directory is under. */
|
|
40
|
+
readonly root: string;
|
|
39
41
|
}
|
|
40
42
|
/** Declares an extension's commands. Only this function calls Clinkr's `mount`, since it knows the tree's app type. */
|
|
41
|
-
export declare function defineExtensionCommands<
|
|
43
|
+
export declare function defineExtensionCommands<LauncherApp, App>(definition: ExtensionCommandsDefinition<LauncherApp, App>): ExtensionCommands<LauncherApp>;
|
|
42
44
|
/** A Clinkr example written as `{ argv, description? }`: the arguments after the command's name, and what it does. */
|
|
43
45
|
interface ClinkrExample {
|
|
44
46
|
readonly argv: string;
|
|
45
47
|
readonly description?: string;
|
|
46
48
|
}
|
|
47
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* The run examples an extension brings to the run commands' help, which each lists after its own: those for
|
|
51
|
+
* `storm exec`, which has no driver, and those for each driver's command, by the driver's name
|
|
52
|
+
* (`Driver.name`). A name is a plain string, with no import behind it: examples under a name no driver in the
|
|
53
|
+
* registry has show in no help.
|
|
54
|
+
*/
|
|
48
55
|
export interface RunExamples {
|
|
49
56
|
readonly exec: readonly ClinkrExample[];
|
|
50
|
-
readonly
|
|
57
|
+
readonly drivers: {
|
|
58
|
+
readonly [driver: string]: readonly ClinkrExample[];
|
|
59
|
+
};
|
|
51
60
|
}
|
|
52
61
|
/** What an extension reads of each resource it brings: its definition's name. */
|
|
53
62
|
interface NamedResource {
|
|
54
63
|
readonly name: string;
|
|
55
64
|
}
|
|
65
|
+
/** What an extension reads of each driver it brings: its name. */
|
|
66
|
+
interface NamedDriver {
|
|
67
|
+
readonly name: string;
|
|
68
|
+
}
|
|
56
69
|
/**
|
|
57
|
-
* Extension `Name`, with its resources, in order, each as its `defineResource` returned it; when it
|
|
58
|
-
*
|
|
59
|
-
*
|
|
70
|
+
* Extension `Name`, with its resources, in order, each as its `defineResource` returned it; when it brings any, its
|
|
71
|
+
* drivers, in order, each as its `defineDriver` returned it; when it has commands, its commands (from
|
|
72
|
+
* `defineExtensionCommands`, in its light `command-tree.ts`), whose tree's commands take `LauncherApp`; and when it has
|
|
73
|
+
* any, the run examples its resources' flags bring to the run commands' help (`RunExamples`).
|
|
60
74
|
*/
|
|
61
|
-
export interface Extension<Name extends string, Resources extends readonly NamedResource[], LauncherApp> {
|
|
75
|
+
export interface Extension<Name extends string, Resources extends readonly NamedResource[], LauncherApp, Drivers extends readonly NamedDriver[] = readonly []> {
|
|
62
76
|
readonly name: Name;
|
|
63
77
|
readonly resources: Resources;
|
|
64
|
-
readonly
|
|
78
|
+
readonly drivers?: Drivers;
|
|
79
|
+
readonly commands?: ExtensionCommands<LauncherApp>;
|
|
65
80
|
readonly examples?: RunExamples;
|
|
66
81
|
}
|
|
67
82
|
/**
|
|
68
|
-
* Declares an extension. Its name is
|
|
69
|
-
*
|
|
83
|
+
* Declares an extension. Its name is one command word. Each of its resources comes from `defineResource`, and it may
|
|
84
|
+
* have none, when it brings only commands or drivers. Each of its drivers comes from `defineDriver`. Where its commands
|
|
85
|
+
* go is the launcher's choice (`src/extension-commands.ts`).
|
|
70
86
|
*/
|
|
71
|
-
export declare function defineExtension<const Name extends string, const Resources extends readonly NamedResource[], LauncherApp = unknown>(extension: Extension<Name, Resources, LauncherApp>): Extension<Name, Resources, LauncherApp>;
|
|
87
|
+
export declare function defineExtension<const Name extends string, const Resources extends readonly NamedResource[], LauncherApp = unknown, const Drivers extends readonly NamedDriver[] = readonly []>(extension: Extension<Name, Resources, LauncherApp, Drivers>): Extension<Name, Resources, LauncherApp, Drivers>;
|
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
// An extension as one value (`defineExtension`, `Extension`), its own command tree as storm mounts it, its run
|
|
2
|
-
//
|
|
3
|
-
//
|
|
1
|
+
// An extension as one value (`defineExtension`, `Extension`), its own command tree as storm mounts it, its run examples
|
|
2
|
+
// (`RunExamples`), and what its commands are written with: the extension's light entry for its commands, which loads
|
|
3
|
+
// only Clinkr. An extension's `extension.ts` joins its resources and its drivers with its command tree and its run
|
|
4
4
|
// examples here, so a published resource export, which loads only the resource, never reaches Clinkr. Its
|
|
5
5
|
// `command-tree.ts` declares its commands with `defineExtensionCommands`, and `src/extension-commands.ts` mounts them
|
|
6
|
-
// without loading the extension's resources, so help never loads the registry. The
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
// `
|
|
6
|
+
// without loading the extension's resources, so help never loads the extension registry. The extension doesn't choose
|
|
7
|
+
// where its commands go: `src/extension-commands.ts` gives each tree its path. The extension registry
|
|
8
|
+
// (`src/extensions.ts`) lists the extensions and takes their resources and their drivers in order, and each run
|
|
9
|
+
// command's help lists their run examples for it in that order. Its commands declare their tree, metadata and outcomes
|
|
10
|
+
// with what this entry re-exports of Clinkr (`commandTree`, `CommandMetadata`, `defineOutcomes`, `renderOutcome`,
|
|
11
|
+
// `Row`, `Warning`), so no extension folder imports Clinkr itself. The re-exports reach no published export: only the
|
|
12
|
+
// extension registry and `src/extension-commands.ts` load a command tree. The module's run-time entry, `index.ts`,
|
|
13
|
+
// loads none of this.
|
|
12
14
|
import { join } from "node:path";
|
|
13
15
|
import { mount } from "@vercel/clinkr";
|
|
14
16
|
export { commandTree, defineOutcomes, renderOutcome, } from "@vercel/clinkr";
|
|
15
17
|
/** Declares an extension's commands. Only this function calls Clinkr's `mount`, since it knows the tree's app type. */
|
|
16
18
|
export function defineExtensionCommands(definition) {
|
|
17
|
-
const {
|
|
19
|
+
const { description, tree, directory, app } = definition;
|
|
18
20
|
return {
|
|
19
|
-
extension,
|
|
20
21
|
description,
|
|
21
22
|
directory,
|
|
22
23
|
mount: ({ path, root }) => mount(tree.directory(join(root, directory)), { path, description, app }),
|
|
23
24
|
};
|
|
24
25
|
}
|
|
25
26
|
/**
|
|
26
|
-
* Declares an extension. Its name is
|
|
27
|
-
*
|
|
27
|
+
* Declares an extension. Its name is one command word. Each of its resources comes from `defineResource`, and it may
|
|
28
|
+
* have none, when it brings only commands or drivers. Each of its drivers comes from `defineDriver`. Where its commands
|
|
29
|
+
* go is the launcher's choice (`src/extension-commands.ts`).
|
|
28
30
|
*/
|
|
29
31
|
export function defineExtension(extension) {
|
|
30
32
|
return extension;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/** A driver's words in its command's leaf help. */
|
|
2
|
+
export interface DriverHelp {
|
|
3
|
+
/** The usage after the flags every run takes, such as `[<vitest run args>...] [-- <vitest dash options>...]`. */
|
|
4
|
+
readonly usage: string;
|
|
5
|
+
/** What the driver's arguments are and where they go: their request field's description. */
|
|
6
|
+
readonly args: string;
|
|
7
|
+
/**
|
|
8
|
+
* What `verbose` in the run payload does under the driver's program, which ends the description of the run flag
|
|
9
|
+
* `--verbose`: a clause that follows `… and verbose in the run payload, `, without its full stop, such as
|
|
10
|
+
* `which has its reporters print each test as it finishes`.
|
|
11
|
+
*/
|
|
12
|
+
readonly verbose: string;
|
|
13
|
+
/** The driver's own examples, which its command lists before the run examples the extensions bring. */
|
|
14
|
+
readonly examples: readonly {
|
|
15
|
+
readonly argv: string;
|
|
16
|
+
readonly description: string;
|
|
17
|
+
}[];
|
|
18
|
+
}
|
|
19
|
+
/** What a run's summary says to do next, in words that name the driver's program. */
|
|
20
|
+
export interface DriverHints {
|
|
21
|
+
/**
|
|
22
|
+
* What to do about a run whose tests reported no final result, such as how to list storm's reporter in the program's
|
|
23
|
+
* config. The summary's tests line says it after `no final test results: `.
|
|
24
|
+
*/
|
|
25
|
+
readonly noFinalResults: string;
|
|
26
|
+
}
|
|
27
|
+
/** What a driver's plan step works from. */
|
|
28
|
+
export interface DriverPlanRequest {
|
|
29
|
+
/** The driver's arguments, which the command gets too. */
|
|
30
|
+
readonly args: readonly string[];
|
|
31
|
+
/** The directory on this machine the program runs in to say what it would run. */
|
|
32
|
+
readonly cwd: string;
|
|
33
|
+
/** The program's binary to start there: the path of the one the launcher found. */
|
|
34
|
+
readonly bin: string;
|
|
35
|
+
/** Aborts once the invocation is signaled: the plan step stops what it started and answers `canceled`. */
|
|
36
|
+
readonly signal: AbortSignal;
|
|
37
|
+
}
|
|
38
|
+
/** How a plan step fails, which `driver_plan_failed` carries as `data.kind`. */
|
|
39
|
+
export declare const DRIVER_PLAN_FAILURE_KINDS: readonly ["start-failed", "timed-out", "exited", "unreadable-output"];
|
|
40
|
+
/**
|
|
41
|
+
* How a plan step fails: the program couldn't start (`start-failed`), didn't finish in the time the driver gives it
|
|
42
|
+
* (`timed-out`), exited other than 0 (`exited`), or answered something the driver can't read (`unreadable-output`).
|
|
43
|
+
*/
|
|
44
|
+
export type DriverPlanFailureKind = (typeof DRIVER_PLAN_FAILURE_KINDS)[number];
|
|
45
|
+
/**
|
|
46
|
+
* What a plan step answers: the test plan, the tests the program would run and the files they are in, or why it
|
|
47
|
+
* couldn't say, already worded. `kind` is one of the ways it fails, or `canceled` when the request's signal stopped it,
|
|
48
|
+
* which cancels the run. `message` says what went wrong in the driver's words, with the timeout, the exit code or the
|
|
49
|
+
* signal that ended the program in it; `driver_plan_failed` carries it, and the launcher reads none for `canceled`.
|
|
50
|
+
*/
|
|
51
|
+
export type DriverPlanAnswer = {
|
|
52
|
+
readonly ok: true;
|
|
53
|
+
readonly plan: {
|
|
54
|
+
readonly tests: number;
|
|
55
|
+
readonly files: number;
|
|
56
|
+
};
|
|
57
|
+
} | {
|
|
58
|
+
readonly ok: false;
|
|
59
|
+
readonly kind: DriverPlanFailureKind | "canceled";
|
|
60
|
+
readonly message: string;
|
|
61
|
+
};
|
|
62
|
+
/** Where a plan step ran and what it was given, which both refusals report. */
|
|
63
|
+
export interface DriverPlanned {
|
|
64
|
+
readonly args: readonly string[];
|
|
65
|
+
readonly cwd: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* What a driver's two refusals say, in words that name its program. Each description is the error's own, which
|
|
69
|
+
* `--json-schema` shows.
|
|
70
|
+
*/
|
|
71
|
+
export interface DriverRefusalWords {
|
|
72
|
+
/** `no_matching_tests`: the plan step ran and counted no test. */
|
|
73
|
+
readonly noMatchingTests: {
|
|
74
|
+
readonly description: string;
|
|
75
|
+
/** What went wrong. */
|
|
76
|
+
message(planned: DriverPlanned): string;
|
|
77
|
+
/** What to do next. */
|
|
78
|
+
next(planned: DriverPlanned): string;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* `driver_plan_failed`: the program wasn't found, or the plan step failed. What went wrong is the plan step's
|
|
82
|
+
* `message` (`DriverPlanAnswer`), or the launcher's for a binary it didn't find.
|
|
83
|
+
*/
|
|
84
|
+
readonly planFailed: {
|
|
85
|
+
readonly description: string;
|
|
86
|
+
/** What to do next, for each way the plan step fails. */
|
|
87
|
+
readonly next: {
|
|
88
|
+
readonly [Kind in DriverPlanFailureKind]: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Everything a driver's author writes of it with `defineDriver`:
|
|
94
|
+
*
|
|
95
|
+
* - `name`: its command's word, which `driver_plan_failed` and `no_matching_tests` carry as `data.driver`, and the
|
|
96
|
+
* name the launcher keeps its Context by.
|
|
97
|
+
* - `program`: its program, by the name of the binary the launcher looks for in `node_modules/.bin`.
|
|
98
|
+
* - `context`: its Context, what its plan step reaches the outside through, built live. Tests hand
|
|
99
|
+
* the plan step a Context over fakes.
|
|
100
|
+
* - `launch`: the argv that starts the program with `args`, such as `[bin, "run", ...args]`. `bin` is the path of the
|
|
101
|
+
* binary the launcher found, or the program's bare name where the runner's `PATH` finds it.
|
|
102
|
+
* - `plan`: its plan step, over its Context: asks the program what it would run with the request's arguments, without
|
|
103
|
+
* running it, and words its failure. The launcher calls it once, before anything is minted, acquired or started.
|
|
104
|
+
* - `help`: its part of its command's leaf help.
|
|
105
|
+
* - `hints`: what its run's summary says to do next.
|
|
106
|
+
* - `refusals`: what its two refusals say, beside the message its plan step answers.
|
|
107
|
+
*/
|
|
108
|
+
export interface DriverSpec<Name extends string, Context> {
|
|
109
|
+
readonly name: Name;
|
|
110
|
+
readonly program: {
|
|
111
|
+
readonly bin: string;
|
|
112
|
+
};
|
|
113
|
+
readonly context: () => Context;
|
|
114
|
+
readonly launch: (bin: string, args: readonly string[]) => readonly string[];
|
|
115
|
+
readonly plan: (context: NoInfer<Context>) => (request: DriverPlanRequest) => Promise<DriverPlanAnswer>;
|
|
116
|
+
readonly help: DriverHelp;
|
|
117
|
+
readonly hints: DriverHints;
|
|
118
|
+
readonly refusals: DriverRefusalWords;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* A driver, as `defineDriver` returns it: storm's knowledge of one program that the command starts, such as a test
|
|
122
|
+
* runner. Its name and its Context keep their types. With its type parameters' defaults it is any driver, which the
|
|
123
|
+
* registry's list holds: its plan step takes the Context as `unknown`.
|
|
124
|
+
*/
|
|
125
|
+
export interface Driver<Name extends string = string, Context = unknown> {
|
|
126
|
+
readonly name: Name;
|
|
127
|
+
readonly program: {
|
|
128
|
+
readonly bin: string;
|
|
129
|
+
};
|
|
130
|
+
readonly context: () => Context;
|
|
131
|
+
readonly launch: (bin: string, args: readonly string[]) => readonly string[];
|
|
132
|
+
readonly plan: (context: unknown) => (request: DriverPlanRequest) => Promise<DriverPlanAnswer>;
|
|
133
|
+
readonly help: DriverHelp;
|
|
134
|
+
readonly hints: DriverHints;
|
|
135
|
+
readonly refusals: DriverRefusalWords;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* One driver, as one plain object: its extension lists it (`drivers`, `defineExtension`), and the registry takes it
|
|
139
|
+
* from there. The launcher makes its run command from it.
|
|
140
|
+
*/
|
|
141
|
+
export declare function defineDriver<const Name extends string, Context>(spec: DriverSpec<Name, Context>): Driver<Name, Context>;
|
|
142
|
+
/** Arguments as a person reads them, for a driver's words: `(none)` when there are none. */
|
|
143
|
+
export declare function argsText(args: readonly string[]): string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// How an extension folder writes its driver: one `defineDriver` call, in its `driver.ts`, which holds everything the
|
|
2
|
+
// launcher knows of one program that the command starts (`GLOSSARY.md`, **Driver**), and returns one plain object,
|
|
3
|
+
// the driver (`Driver`). The launcher finds the program, asks the driver's plan step what it would run, starts it, and
|
|
4
|
+
// words its run command's leaf help, its two refusals and its run's summary with the driver's words. A driver has only
|
|
5
|
+
// this launcher side: storm's own code for a test runner is a test runner library, which belongs to no extension.
|
|
6
|
+
//
|
|
7
|
+
// The types flow from the call: its plan step takes the Context its `context` builds. The launcher sees the same object
|
|
8
|
+
// through the bare `Driver`, whose Context is `unknown`; `defineDriver` turns one into the other with its one cast,
|
|
9
|
+
// below. It loads nothing at run time.
|
|
10
|
+
/** How a plan step fails, which `driver_plan_failed` carries as `data.kind`. */
|
|
11
|
+
export const DRIVER_PLAN_FAILURE_KINDS = ["start-failed", "timed-out", "exited", "unreadable-output"];
|
|
12
|
+
/**
|
|
13
|
+
* One driver, as one plain object: its extension lists it (`drivers`, `defineExtension`), and the registry takes it
|
|
14
|
+
* from there. The launcher makes its run command from it.
|
|
15
|
+
*/
|
|
16
|
+
export function defineDriver(spec) {
|
|
17
|
+
const { name, program, context, launch, plan, help, hints, refusals } = spec;
|
|
18
|
+
const driver = { name, program, context, launch, plan, help, hints, refusals };
|
|
19
|
+
// The one cast: the launcher's view of the driver's plan step, whose parameter is the driver's Context and which the
|
|
20
|
+
// launcher calls with `unknown`. Only the Context's routing is left for it to rest on: the launcher hands a Context
|
|
21
|
+
// only to the plan step of the driver that built it, by the driver's name (`planDriverCommand`,
|
|
22
|
+
// `commands/exec/driver-plan.ts`), which `test/unit/commands/driver-plan.test.ts` holds.
|
|
23
|
+
return driver;
|
|
24
|
+
}
|
|
25
|
+
/** Arguments as a person reads them, for a driver's words: `(none)` when there are none. */
|
|
26
|
+
export function argsText(args) {
|
|
27
|
+
return args.length === 0 ? "(none)" : args.join(" ");
|
|
28
|
+
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
export { isCi } from "./ci.ts";
|
|
1
2
|
export { Credential, type GitHubActionsClaims, type VercelProject } from "./credential.ts";
|
|
2
3
|
export { type CredentialDiagnosis, describeCredentialFailure, describeMintFailure, describeTokenRequestFailure, } from "./credential-diagnosis.ts";
|
|
3
4
|
export type { CredentialFailure, CredentialOrigin, CredentialOutcome, CredentialSource, MintFailure, MintStep, MintTarget, TokenAttemptFailure, TokenRequestFailure, TokenRequestVariable, } from "./credential-source.ts";
|
|
4
5
|
export { tokenRequestFailureFacts, tokenRequestFailureShape } from "./token-request-facts.ts";
|
|
5
6
|
export type { Clock, Timer } from "./time.ts";
|
|
6
7
|
export { defineResource, type ResourceSpec } from "./resource.ts";
|
|
8
|
+
export { argsText, defineDriver, type Driver, DRIVER_PLAN_FAILURE_KINDS, type DriverHelp, type DriverHints, type DriverPlanAnswer, type DriverPlanFailureKind, type DriverPlanned, type DriverPlanRequest, type DriverRefusalWords, type DriverSpec, } from "./driver.ts";
|
|
7
9
|
export type { Acquired, AcquireForRunAnswer, AcquireForRunInput, BeforeRunAnswer, BeforeRunInput, LifecycleTypes, MintFailed, NextStep, NoSecrets, Refusal, RefusalContent, ReleaseAfterRunAnswer, ReleaseAfterRunInput, Released, Report, ResourceLifecycle, ResourceUse, ResultAnswer, } from "./lifecycle.ts";
|
|
8
|
-
export type {
|
|
10
|
+
export type { LauncherContext, StateDirectory } from "./launcher-context.ts";
|
|
9
11
|
export type { LaneDraw, Paint, ResourceNotice } from "./presentation.ts";
|
|
10
12
|
export type { LaneOutcome, LaneRow, LaneStates, ResourceProgress } from "./progress.ts";
|
|
11
13
|
export type { Row, Warning } from "./reports.ts";
|
|
@@ -1,22 +1,27 @@
|
|
|
1
|
-
// The extension API, the part of the SDK an extension uses to plug into the launcher: its run-time entry, which loads
|
|
2
|
-
// Clinkr. The SDK declares the extension contract and the launcher implements it, so nothing here imports a launcher
|
|
1
|
+
// The extension API, the part of the SDK an extension uses to plug into the launcher: its run-time entry, which loads
|
|
2
|
+
// no Clinkr. The SDK declares the extension contract and the launcher implements it, so nothing here imports a launcher
|
|
3
3
|
// module (`tools/storm/adr/0001-sdk-declares-the-extension-contract.md`). It is not a published export: only the
|
|
4
4
|
// extensions in this repository use it. A extension folder imports storm through it, its light `commands.ts`
|
|
5
|
-
// (`defineExtension`, with which an extension's `extension.ts` joins its resource definitions, its
|
|
6
|
-
// run examples, and what its `command-tree.ts` and commands are written with, the one SDK file that loads
|
|
7
|
-
// launcher resolvers (`src/launcher-resolvers/`, which only an extension's commands import) and the run
|
|
8
|
-
// entry. The launcher's modules import it too, for the contract they implement. It holds:
|
|
5
|
+
// (`defineExtension`, with which an extension's `extension.ts` joins its resource definitions, its drivers, its command
|
|
6
|
+
// tree and its run examples, and what its `command-tree.ts` and commands are written with, the one SDK file that loads
|
|
7
|
+
// Clinkr), the launcher resolvers (`src/launcher-resolvers/`, which only an extension's commands import) and the run
|
|
8
|
+
// API's launcher entry. The launcher's modules import it too, for the contract they implement. It holds:
|
|
9
9
|
//
|
|
10
10
|
// - how a resource is written: one `defineResource` per resource (`resource.ts`), in its folder's `definition.ts`,
|
|
11
11
|
// which holds its resource definition (`ResourceDefinition`, `resource-definition.ts`): its options, the checks
|
|
12
|
-
// across them, its payload contract, its
|
|
12
|
+
// across them, its payload contract, its Context, its lifecycle and its optional progress; and its resource factory
|
|
13
13
|
// (`resourceFactory`, `ResourceFactory`, `resource-factory.ts`, in its folder's `resource.ts`), which a config file
|
|
14
14
|
// calls to make a resource (`Resource`). Its option rules and their run flags (`OptionRule`, `OptionRules`,
|
|
15
15
|
// `FlagHelp`) come with the option helpers (`booleanOption`, `mustBe`, `nonEmptyString`, `optionKeyPath`, `rules.ts`)
|
|
16
16
|
// and the types its lifecycle reads its options by (`ResolvedOptions`, `OptionSources`);
|
|
17
|
+
// - how a driver is written: one `defineDriver` per driver (`driver.ts`), in its folder's `driver.ts`, which holds
|
|
18
|
+
// what the launcher knows of one program that the command starts (`Driver`): its name, its program, its Context,
|
|
19
|
+
// the argv that starts it, its plan step over its Context (`DriverPlanRequest`, `DriverPlanAnswer`) and its words,
|
|
20
|
+
// its part of its command's help (`DriverHelp`), what its run's summary says to do next (`DriverHints`) and what its
|
|
21
|
+
// two refusals say (`DriverRefusalWords`);
|
|
17
22
|
// - each lifecycle point's input and answer (`lifecycle.ts`), the refusal a lifecycle point words where it refuses
|
|
18
|
-
// (`Refusal`, `RefusalContent`, `NextStep`), and what the launcher hands a
|
|
19
|
-
// `launcher-
|
|
23
|
+
// (`Refusal`, `RefusalContent`, `NextStep`), and what the launcher hands a Context builder (`LauncherContext`,
|
|
24
|
+
// `launcher-context.ts`), with the clock and timer (`Clock`, `Timer`, `time.ts`);
|
|
20
25
|
// - a resource's own progress (`ResourceProgress`, `progress.ts`; `LaneDraw`, `Paint`, `ResourceNotice`,
|
|
21
26
|
// `presentation.ts`; `Span`, `span.ts`), typed by the resource's own event, lane-state and step types, and the rows
|
|
22
27
|
// and warnings a resource renders (`Row`, `Warning`, `reports.ts`);
|
|
@@ -30,10 +35,12 @@
|
|
|
30
35
|
// launcher module, which `test/integration/extension-api-clinkr-free.integration.test.ts` holds, and nothing of
|
|
31
36
|
// `commands.ts`, even for types, so its declarations reach no Clinkr either
|
|
32
37
|
// (`test/integration/package-types.integration.test.ts`).
|
|
38
|
+
export { isCi } from "./ci.js";
|
|
33
39
|
export { Credential } from "./credential.js";
|
|
34
40
|
export { describeCredentialFailure, describeMintFailure, describeTokenRequestFailure, } from "./credential-diagnosis.js";
|
|
35
41
|
export { tokenRequestFailureFacts, tokenRequestFailureShape } from "./token-request-facts.js";
|
|
36
42
|
export { defineResource } from "./resource.js";
|
|
43
|
+
export { argsText, defineDriver, DRIVER_PLAN_FAILURE_KINDS, } from "./driver.js";
|
|
37
44
|
export { defaultResourceKey, resourceCall, NOT_COUNTED, optionKeyPath, } from "./resource-definition.js";
|
|
38
45
|
export { resourceFactory } from "./resource-factory.js";
|
|
39
46
|
export { booleanOption, describeValue, mustBe, nonEmptyString } from "./rules.js";
|
|
@@ -13,10 +13,10 @@ export type StateDirectory = {
|
|
|
13
13
|
readonly pattern: string;
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
|
-
* What the launcher
|
|
17
|
-
* directory, and the launcher's clock and timer, so
|
|
16
|
+
* What the launcher gives a resource definition to build its Context from: the launcher environment, its own state
|
|
17
|
+
* directory, and the launcher's clock and timer, so an extension folder imports no clock or timer of its own.
|
|
18
18
|
*/
|
|
19
|
-
export interface
|
|
19
|
+
export interface LauncherContext {
|
|
20
20
|
readonly env: Readonly<Record<string, string | undefined>>;
|
|
21
21
|
readonly stateDirectory: StateDirectory;
|
|
22
22
|
readonly clock: Clock;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// What the launcher gives a resource definition to build its Context from (`LauncherContext`), which a definition's
|
|
2
|
+
// `context` takes. The core builds it (`launcherContext`, `core/launcher-context.ts`). It is not `StormContext`, which
|
|
3
|
+
// holds what storm's own commands reach the outside through: the launcher builds a `LauncherContext` for one resource
|
|
4
|
+
// definition, from the process environment and the system clock and timer. It names no resource.
|
|
5
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CredentialFailure, CredentialSource } from "./credential-source.ts";
|
|
2
2
|
import type { Row } from "./reports.ts";
|
|
3
|
-
/** What a person or agent can do next about a refusal: run a command, storm's or another tool's, open a page, or read a
|
|
3
|
+
/** What a person or agent can do next about a refusal: run a command, storm's or another tool's, open a page, or read a
|
|
4
|
+
* sentence. */
|
|
4
5
|
export type NextStep = {
|
|
5
6
|
readonly type: "command" | "external";
|
|
6
7
|
readonly argv: readonly string[];
|
|
@@ -43,7 +44,7 @@ export type NoSecrets = Readonly<Record<never, string>>;
|
|
|
43
44
|
* What a run uses a resource with, once its `beforeRun` lets the run go on: the secrets it hands the run, by name,
|
|
44
45
|
* which the run hides as `<token>` and hands its `acquireForRun`; whether it needs the Vercel credential, which the
|
|
45
46
|
* launcher chooses a source for (`--credential`) only when one of the run's resources does; and the launcher
|
|
46
|
-
* environment's variables it hides from the
|
|
47
|
+
* environment's variables it hides from the command (`hiddenVariables`), which the launcher leaves out of the
|
|
47
48
|
* command's environment.
|
|
48
49
|
*/
|
|
49
50
|
export interface ResourceUse<Secrets> {
|
|
@@ -86,12 +87,13 @@ export type Report<Event = never> = [Event] extends [never] ? ReportLines : Repo
|
|
|
86
87
|
readonly progress: (event: Event) => Promise<void>;
|
|
87
88
|
};
|
|
88
89
|
/**
|
|
89
|
-
* What `acquireForRun` works from, beside its
|
|
90
|
+
* What `acquireForRun` works from, beside its Context: only what the launcher owns.
|
|
90
91
|
*
|
|
91
92
|
* - `options` and `secrets`: its resolved options, and the secrets its `beforeRun` handed the run.
|
|
92
|
-
* - `credential`: the run's credential source, which it calls `obtain()` on only when it needs a credential
|
|
93
|
-
*
|
|
94
|
-
*
|
|
93
|
+
* - `credential`: the run's credential source, which it calls `obtain()` on only when it needs a credential, and which
|
|
94
|
+
* the launcher builds once and reports (`minting`, `minted`, `requesting-token`): the mint the run already obtained
|
|
95
|
+
* for its runner sandbox, when it has one, which hands back that one mint's outcome; else the source the run's
|
|
96
|
+
* credential choice names.
|
|
95
97
|
* Undefined when the run chose no source, which it does only when it has no runner sandbox and no resource's
|
|
96
98
|
* `beforeRun` said it needs the Vercel credential (`ResourceUse.needsVercelCredential`).
|
|
97
99
|
* - `take`: what it calls with each thing it takes (`Taken`), as soon as it holds it and before any other await, so the
|
|
@@ -150,7 +152,7 @@ export type AcquireForRunAnswer<Payload, Result = never, Event = never> = {
|
|
|
150
152
|
readonly mintFailed: MintFailed;
|
|
151
153
|
};
|
|
152
154
|
/**
|
|
153
|
-
* What `releaseAfterRun` works from, beside its
|
|
155
|
+
* What `releaseAfterRun` works from, beside its Context: everything its acquire took, in the order it called `take`,
|
|
154
156
|
* whether or not the acquire finished, and what it reports as it goes (`Report`), each thing it couldn't release a
|
|
155
157
|
* warning.
|
|
156
158
|
*/
|
|
@@ -187,7 +189,7 @@ export interface LifecycleTypes {
|
|
|
187
189
|
readonly event: unknown;
|
|
188
190
|
}
|
|
189
191
|
/**
|
|
190
|
-
* The lifecycle of one resource definition, typed by `T`, over the
|
|
192
|
+
* The lifecycle of one resource definition, typed by `T`, over the Context its `lifecycle(context)` was given; with no
|
|
191
193
|
* `T`, any resource's lifecycle as the core calls it. storm calls each on the launch machine. Each is a function
|
|
192
194
|
* property, so its parameter is checked contravariantly.
|
|
193
195
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// A resource definition's lifecycle: what the launcher calls on each of its resource instances, over the definition's
|
|
2
|
-
//
|
|
3
|
-
// folder writes `lifecycle(
|
|
2
|
+
// Context, around a run, all on the launch machine, and what each lifecycle point works from and answers. A resource
|
|
3
|
+
// folder writes `lifecycle(context)` in its `lifecycle.ts`, which its `defineResource` carries, typing each lifecycle
|
|
4
4
|
// point with the inputs and answers below. Each lifecycle point says in its answer how it ended: a lifecycle point that
|
|
5
5
|
// refuses a run words its refusal where it refuses (`Refusal`), a warning takes a snake_case reason of the resource's
|
|
6
6
|
// own, and an acquire's result (`ResultAnswer`) is typed by the lifecycle. The lifecycle holds `beforeRun`, the
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
// waterfall, and draws itself: its live row, its final form, its waterfall label and steps, and its events as plain
|
|
4
4
|
// lines and as the live view's notices. A extension folder writes its progress against its own event, lane-state and
|
|
5
5
|
// step types, and its `defineResource` carries it; the core sees it with its defaults, `unknown` events over a span
|
|
6
|
-
// (`ResourceProgress`). The run's state applies every event through the resource definitions (
|
|
7
|
-
// resource instance's to its own lane state. It names no resource.
|
|
6
|
+
// (`ResourceProgress`). The run's state applies every event through the registry's resource definitions (its
|
|
7
|
+
// `applyEvent`), each resource instance's to its own lane state. It names no resource.
|
|
8
8
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { z } from "zod";
|
|
2
2
|
import type { PayloadContract } from "../run/contract.ts";
|
|
3
|
-
import type {
|
|
3
|
+
import type { LauncherContext } from "./launcher-context.ts";
|
|
4
4
|
import type { ResourceLifecycle } from "./lifecycle.ts";
|
|
5
5
|
import type { ResourceProgress } from "./progress.ts";
|
|
6
6
|
/** Where a value came from: a flag (`--scope`, a command's own option flag), the file, or a default. */
|
|
@@ -11,9 +11,9 @@ export interface Setting<T> {
|
|
|
11
11
|
readonly source: SettingSource;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
* What a run counted before it started: `counted`, the tests `storm vitest`'s `vitest list`
|
|
15
|
-
* are in; `not-counted` for a run that counts nothing, such as `storm
|
|
16
|
-
* such as an extension's own command.
|
|
14
|
+
* What a run counted before it started: `counted`, the tests `storm vitest`'s `vitest list` or `storm playwright`'s
|
|
15
|
+
* `playwright test --list` lists and the files they are in; `not-counted` for a run that counts nothing, such as `storm
|
|
16
|
+
* exec`'s, and for a command that plans no run, such as an extension's own command.
|
|
17
17
|
*/
|
|
18
18
|
export type RunTestPlan = {
|
|
19
19
|
readonly kind: "counted";
|
|
@@ -54,9 +54,9 @@ export interface FlagHelp {
|
|
|
54
54
|
* `schema` checks too. An option whose default is a function takes a string, number or boolean, and the run's test
|
|
55
55
|
* plan lists it with its value and where that came from.
|
|
56
56
|
* - `required`: a resource without this option is a problem.
|
|
57
|
-
* - `flag`: the option's run flag on `exec` and `
|
|
58
|
-
* the launcher makes from `schema`. An option without one comes only from the file or its default. The
|
|
59
|
-
* boolean flag as `--x=false` when its default is true, since only that value changes the request then.
|
|
57
|
+
* - `flag`: the option's run flag on `exec`, `vitest` and `playwright`, `--<flagPrefix>-<option>`, with its help, whose
|
|
58
|
+
* request field the launcher makes from `schema`. An option without one comes only from the file or its default. The
|
|
59
|
+
* usage names a boolean flag as `--x=false` when its default is true, since only that value changes the request then.
|
|
60
60
|
*/
|
|
61
61
|
export interface OptionRule<T> {
|
|
62
62
|
readonly schema: z.ZodType<T>;
|
|
@@ -155,24 +155,24 @@ export type DefaultsFit<Rules> = {
|
|
|
155
155
|
* - `payload`: its payload contract: its name and the check of what storm wrote under `resources.<key>.payload` in the
|
|
156
156
|
* run payload, the section the resource hands its command, which a command reads with
|
|
157
157
|
* `readRunPayload().get(contract)`.
|
|
158
|
-
* - `
|
|
158
|
+
* - `context`: its Context, built live from what the launcher gives (`LauncherContext`), which keeps its type, since an
|
|
159
159
|
* extension's commands read it.
|
|
160
|
-
* - `lifecycle`: its lifecycle over its
|
|
161
|
-
* resource has types of its own (`ResourceLifecycle`).
|
|
160
|
+
* - `lifecycle`: its lifecycle over its Context, which the launcher hands it by its name, seen as `unknown` wherever
|
|
161
|
+
* the resource has types of its own (`ResourceLifecycle`).
|
|
162
162
|
* - `progress`: its own progress, joined with what the views draw of it; absent for a resource without it.
|
|
163
163
|
*
|
|
164
164
|
* `check` is a method, so a list of definitions fits the bare `ResourceDefinition`: a method's parameter is checked
|
|
165
165
|
* both ways, where a function property's would be checked only contravariantly. The definition isn't callable: what a
|
|
166
166
|
* config file calls to make a resource is its resource factory (`resourceFactory`).
|
|
167
167
|
*/
|
|
168
|
-
export interface ResourceDefinition<Name extends string = string, Rules extends OptionRules = OptionRules, Payload = unknown,
|
|
168
|
+
export interface ResourceDefinition<Name extends string = string, Rules extends OptionRules = OptionRules, Payload = unknown, Context = unknown> {
|
|
169
169
|
readonly name: Name;
|
|
170
170
|
readonly flagPrefix: string;
|
|
171
171
|
readonly options: Rules;
|
|
172
172
|
check(settings: OptionSettings<Rules>): readonly OptionProblem<keyof Rules & string>[];
|
|
173
173
|
readonly payload: PayloadContract<Payload>;
|
|
174
|
-
readonly
|
|
175
|
-
readonly lifecycle: (
|
|
174
|
+
readonly context: (launcher: LauncherContext) => Context;
|
|
175
|
+
readonly lifecycle: (context: unknown) => ResourceLifecycle;
|
|
176
176
|
readonly progress?: ResourceProgress;
|
|
177
177
|
}
|
|
178
178
|
/** A definition's option names. */
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// the launcher fulfills it, as one interface (`ResourceDefinition`), with the types storm reads its options and its
|
|
3
3
|
// merged options by. Each extension folder writes its definition with the extension API's `defineResource`
|
|
4
4
|
// (`resource.ts`), and a config file makes a resource with its resource factory (`resource-factory.ts`);
|
|
5
|
-
// the extension API declares the shapes and names no resource. `config` (`load.ts`, `resolve.ts`) loops over the
|
|
6
|
-
// its caller passes in, and keeps each resource as a plain record by its resource key.
|
|
5
|
+
// the extension API declares the shapes and names no resource. `config` (`load.ts`, `resolve.ts`) loops over the
|
|
6
|
+
// definitions its caller passes in, and keeps each resource as a plain record by its resource key.
|
|
7
7
|
/** The planned run of a run that counts nothing, such as `storm exec`'s, or of a command that plans no run. */
|
|
8
8
|
export const NOT_COUNTED = Object.freeze({ testPlan: Object.freeze({ kind: "not-counted" }) });
|
|
9
9
|
/**
|