@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
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { basename } from "node:path";
|
|
2
|
+
import { muted, path, renderOutcome } from "@vercel/clinkr/vcli-kit";
|
|
3
|
+
import { defineOutcomes } from "@vercel/clinkr";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { configErrors } from "../../../config/index.js";
|
|
6
|
+
import { builtAtText, REJECTION_REASONS, REJECTIONS_SHOWN, rejectionText } from "../../exec/snapshot-text.js";
|
|
7
|
+
import { short } from "../../exec/text.js";
|
|
8
|
+
/** Why a run here doesn't start from a snapshot: a run's own reasons, or that it is another recipe's. */
|
|
9
|
+
const reasonSchema = z.enum([...REJECTION_REASONS, "other-recipe"]);
|
|
10
|
+
const snapshotSchema = z.object({
|
|
11
|
+
/** The snapshot's id in Vercel Sandbox. */
|
|
12
|
+
snapshotId: z.string(),
|
|
13
|
+
/** A base snapshot, built from a base by the recipe's toolchain and prebuild steps, or a dev snapshot, saved from a run's runner sandbox. */
|
|
14
|
+
kind: z.enum(["base", "dev"]),
|
|
15
|
+
/** The runner recipe's name, region and runtime it was built for. */
|
|
16
|
+
recipe: z.string(),
|
|
17
|
+
region: z.string(),
|
|
18
|
+
runtime: z.string(),
|
|
19
|
+
/** The team and project ids it was built for. */
|
|
20
|
+
teamId: z.string(),
|
|
21
|
+
projectId: z.string(),
|
|
22
|
+
/** Its base, a full SHA: the commit whose tracked files its repository holds. */
|
|
23
|
+
base: z.string(),
|
|
24
|
+
/** The commit it was built at, a full SHA: a base snapshot's base, or the commit that saved a dev snapshot. */
|
|
25
|
+
builtAt: z.string(),
|
|
26
|
+
/** Whether HEAD is the built-at commit or holds it in its history; null when storm didn't check. */
|
|
27
|
+
inHistory: z.boolean().nullable(),
|
|
28
|
+
/** How many commits HEAD has that the built-at commit lacks, 0 for HEAD's commit; null when HEAD's history doesn't hold it or storm didn't count. */
|
|
29
|
+
builtBehind: z.number().nullable(),
|
|
30
|
+
/** Which checkout may start from it: any for a base snapshot; for a dev snapshot, here when this checkout saved it, other when another did; null for a dev snapshot outside a Git checkout. */
|
|
31
|
+
checkout: z.enum(["any", "here", "other"]).nullable(),
|
|
32
|
+
/** For a dev snapshot, the root of the checkout that saved it; null for a base snapshot. */
|
|
33
|
+
repoRoot: z.string().nullable(),
|
|
34
|
+
/** For a dev snapshot, the branch of the run that saved it; null for a base snapshot and for a run on a detached HEAD. */
|
|
35
|
+
branch: z.string().nullable(),
|
|
36
|
+
/** When it was created and when it expires, as ISO times. */
|
|
37
|
+
createdAt: z.string(),
|
|
38
|
+
expiresAt: z.string(),
|
|
39
|
+
/** Whether it had expired when storm read the cache. */
|
|
40
|
+
expired: z.boolean(),
|
|
41
|
+
/** Whether a run here, with a credential for its team and project, starts from it. */
|
|
42
|
+
picked: z.boolean(),
|
|
43
|
+
/** Why a run here doesn't start from it; null for a picked one, and when storm picked for no recipe. */
|
|
44
|
+
reason: reasonSchema.nullable(),
|
|
45
|
+
});
|
|
46
|
+
const listedSchema = z.object({
|
|
47
|
+
/** Where the runner snapshot cache lives. */
|
|
48
|
+
directory: z.string(),
|
|
49
|
+
/** The config file whose runner recipe storm picked for; null when none applies. */
|
|
50
|
+
configFile: z.string().nullable(),
|
|
51
|
+
/** The recipe a run here uses, when storm marked what it starts from; else why it marked nothing: the directory is in no Git checkout, no runner recipe applies, or no base ref of the recipe shares history with HEAD. */
|
|
52
|
+
picking: z.discriminatedUnion("kind", [
|
|
53
|
+
z.object({ kind: z.literal("recipe"), recipe: z.string() }),
|
|
54
|
+
z.object({ kind: z.literal("none"), why: z.enum(["no-checkout", "no-recipe", "no-base"]) }),
|
|
55
|
+
]),
|
|
56
|
+
/** Whether --all asked for other recipes' snapshots too. */
|
|
57
|
+
all: z.boolean(),
|
|
58
|
+
/** HEAD's commit, a full SHA; null outside a Git checkout. */
|
|
59
|
+
head: z.string().nullable(),
|
|
60
|
+
/** HEAD's merge-base with a base ref of the recipe, a full SHA, and that ref; null when storm picked for no recipe. */
|
|
61
|
+
mergeBase: z.string().nullable(),
|
|
62
|
+
mergeBaseRef: z.string().nullable(),
|
|
63
|
+
/** When storm read the cache, as an ISO time: what "ago" and "in" count from. */
|
|
64
|
+
readAt: z.string(),
|
|
65
|
+
/** The snapshots, in the table's order. */
|
|
66
|
+
snapshots: z.array(snapshotSchema),
|
|
67
|
+
/** The cache files storm can't read, each with why. */
|
|
68
|
+
unreadable: z.array(z.object({ file: z.string(), reason: z.string() })),
|
|
69
|
+
});
|
|
70
|
+
/** One inspected snapshot as the result reports it. */
|
|
71
|
+
export function snapshotFacts(snapshot) {
|
|
72
|
+
const { entry } = snapshot;
|
|
73
|
+
return {
|
|
74
|
+
snapshotId: entry.snapshotId,
|
|
75
|
+
kind: snapshot.kind,
|
|
76
|
+
recipe: entry.recipeName,
|
|
77
|
+
region: entry.region,
|
|
78
|
+
runtime: entry.runtime,
|
|
79
|
+
teamId: entry.teamId,
|
|
80
|
+
projectId: entry.projectId,
|
|
81
|
+
base: entry.base,
|
|
82
|
+
builtAt: snapshot.builtAt,
|
|
83
|
+
inHistory: snapshot.inHistory,
|
|
84
|
+
builtBehind: snapshot.builtBehind,
|
|
85
|
+
checkout: snapshot.kind === "base" ? "any" : snapshot.savedHere === null ? null : snapshot.savedHere ? "here" : "other",
|
|
86
|
+
repoRoot: entry.repoRoot ?? null,
|
|
87
|
+
branch: entry.branch ?? null,
|
|
88
|
+
createdAt: entry.createdAt,
|
|
89
|
+
expiresAt: entry.expiresAt,
|
|
90
|
+
expired: snapshot.expired,
|
|
91
|
+
picked: snapshot.picked,
|
|
92
|
+
reason: snapshot.reason,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* The snapshots in the table's order: those built in HEAD's history first, fewest commits behind HEAD first, and
|
|
97
|
+
* those storm couldn't count last; at one count the base snapshot before a dev snapshot, this checkout's before
|
|
98
|
+
* another's; then the newest, then by id.
|
|
99
|
+
*/
|
|
100
|
+
export function inTableOrder(snapshots) {
|
|
101
|
+
const last = Number.MAX_SAFE_INTEGER;
|
|
102
|
+
return snapshots.toSorted((a, b) => (a.builtBehind ?? last) - (b.builtBehind ?? last) ||
|
|
103
|
+
Number(a.kind === "dev") - Number(b.kind === "dev") ||
|
|
104
|
+
Number(b.checkout === "here") - Number(a.checkout === "here") ||
|
|
105
|
+
Date.parse(b.createdAt) - Date.parse(a.createdAt) ||
|
|
106
|
+
a.snapshotId.localeCompare(b.snapshotId));
|
|
107
|
+
}
|
|
108
|
+
/** A span of time as the table says it: whole days, else hours, else minutes. */
|
|
109
|
+
function spanText(ms) {
|
|
110
|
+
const minutes = Math.floor(Math.abs(ms) / 60_000);
|
|
111
|
+
if (minutes >= 24 * 60)
|
|
112
|
+
return `${Math.floor(minutes / (24 * 60))}d`;
|
|
113
|
+
return minutes >= 60 ? `${Math.floor(minutes / 60)}h` : `${minutes}m`;
|
|
114
|
+
}
|
|
115
|
+
/** The built-at cell: the commit, with `HEAD` when it is HEAD's commit and `not in history` when HEAD lacks it. */
|
|
116
|
+
function builtAtCell(snapshot) {
|
|
117
|
+
const where = snapshot.builtBehind === 0 ? ", HEAD" : snapshot.inHistory === false ? ", not in history" : "";
|
|
118
|
+
return `${short(snapshot.builtAt)}${where}`;
|
|
119
|
+
}
|
|
120
|
+
/** The checkout cell: `any`, `here`, or the other checkout's directory name. */
|
|
121
|
+
function checkoutCell(snapshot) {
|
|
122
|
+
if (snapshot.checkout === "any" || snapshot.checkout === "here")
|
|
123
|
+
return snapshot.checkout;
|
|
124
|
+
return snapshot.repoRoot === null ? muted("-") : basename(snapshot.repoRoot);
|
|
125
|
+
}
|
|
126
|
+
/** The table's rows, one per snapshot, with a `RECIPE` column under `--all`. */
|
|
127
|
+
function tableOf(listed) {
|
|
128
|
+
const now = Date.parse(listed.readAt);
|
|
129
|
+
const recipeColumn = listed.all || listed.picking.kind === "none";
|
|
130
|
+
return {
|
|
131
|
+
columns: [
|
|
132
|
+
"",
|
|
133
|
+
"KIND",
|
|
134
|
+
"BUILT AT",
|
|
135
|
+
"BASE",
|
|
136
|
+
"CHECKOUT",
|
|
137
|
+
"BRANCH",
|
|
138
|
+
"CREATED",
|
|
139
|
+
"EXPIRES",
|
|
140
|
+
...(recipeColumn ? ["RECIPE"] : []),
|
|
141
|
+
"ID",
|
|
142
|
+
],
|
|
143
|
+
rows: listed.snapshots.map((snapshot) => [
|
|
144
|
+
snapshot.picked ? "▸" : "",
|
|
145
|
+
snapshot.kind,
|
|
146
|
+
builtAtCell(snapshot),
|
|
147
|
+
short(snapshot.base),
|
|
148
|
+
checkoutCell(snapshot),
|
|
149
|
+
snapshot.branch ?? "",
|
|
150
|
+
`${spanText(now - Date.parse(snapshot.createdAt))} ago`,
|
|
151
|
+
snapshot.expired ? "expired" : `in ${spanText(Date.parse(snapshot.expiresAt) - now)}`,
|
|
152
|
+
...(recipeColumn ? [snapshot.recipe] : []),
|
|
153
|
+
snapshot.snapshotId,
|
|
154
|
+
]),
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
/** Why storm marked no snapshot, when it picked for no recipe. */
|
|
158
|
+
const UNPICKED_TEXT = {
|
|
159
|
+
"no-checkout": "This directory is in no Git checkout, so storm can't say which snapshot a run starts from.",
|
|
160
|
+
"no-recipe": "No runner recipe applies here, so no run here starts from one of them.",
|
|
161
|
+
"no-base": "No base ref of the runner recipe shares history with HEAD, so a run here can't pick a base.",
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* The lines after the table: for each team and project, the snapshot a run here starts from, or that it builds a
|
|
165
|
+
* base snapshot; then why it starts from none of the recipe's others, `REJECTIONS_SHOWN` at most.
|
|
166
|
+
*/
|
|
167
|
+
function explanationOf(listed) {
|
|
168
|
+
if (listed.picking.kind === "none")
|
|
169
|
+
return UNPICKED_TEXT[listed.picking.why];
|
|
170
|
+
const ofRecipe = listed.snapshots.filter((snapshot) => snapshot.reason !== "other-recipe");
|
|
171
|
+
const owners = [...new Set(ofRecipe.map(({ teamId, projectId }) => `${teamId}/${projectId}`))];
|
|
172
|
+
const building = listed.mergeBase === null
|
|
173
|
+
? "builds a base snapshot"
|
|
174
|
+
: `builds a base snapshot at the merge-base (${short(listed.mergeBase)})`;
|
|
175
|
+
const lines = [];
|
|
176
|
+
if (owners.length === 0)
|
|
177
|
+
lines.push(`A run here ${building}: the cache holds no snapshot of recipe ${listed.picking.recipe}.`);
|
|
178
|
+
for (const owner of owners) {
|
|
179
|
+
const who = owners.length === 1 ? "A run here" : `A run here for team and project ${owner}`;
|
|
180
|
+
const owned = ofRecipe.filter((snapshot) => `${snapshot.teamId}/${snapshot.projectId}` === owner);
|
|
181
|
+
const pick = owned.find((snapshot) => snapshot.picked);
|
|
182
|
+
lines.push(pick !== undefined
|
|
183
|
+
? `${who} starts from ${pick.snapshotId}, ${builtAtText({ ...pick, atMergeBase: pick.builtAt === listed.mergeBase })}.`
|
|
184
|
+
: `${who} ${building}: no cached snapshot fits.`);
|
|
185
|
+
}
|
|
186
|
+
if (owners.length > 1)
|
|
187
|
+
lines.push("The run's credential decides the team and project.");
|
|
188
|
+
const others = ofRecipe.filter((snapshot) => !snapshot.picked && snapshot.reason !== null && snapshot.reason !== "other-recipe");
|
|
189
|
+
for (const snapshot of others.slice(0, REJECTIONS_SHOWN))
|
|
190
|
+
lines.push(` ${snapshot.snapshotId}: ${rejectionText(snapshot.reason, snapshot)}`);
|
|
191
|
+
if (others.length > REJECTIONS_SHOWN)
|
|
192
|
+
lines.push(` and ${others.length - REJECTIONS_SHOWN} more: --json lists each one's reason`);
|
|
193
|
+
return lines.join("\n");
|
|
194
|
+
}
|
|
195
|
+
/** How `snapshots list` ends. */
|
|
196
|
+
export const outcomes = defineOutcomes({
|
|
197
|
+
results: {
|
|
198
|
+
listed: {
|
|
199
|
+
schema: listedSchema,
|
|
200
|
+
description: "The cached runner snapshots in the scope, with the one a run here starts from marked; none is an empty list.",
|
|
201
|
+
render: (listed) => renderOutcome({
|
|
202
|
+
rows: [
|
|
203
|
+
["Cache", path(listed.directory)],
|
|
204
|
+
...(listed.picking.kind === "recipe" ? [["Recipe", listed.picking.recipe]] : []),
|
|
205
|
+
...(listed.configFile === null ? [] : [["Config", path(listed.configFile)]]),
|
|
206
|
+
],
|
|
207
|
+
...(listed.snapshots.length === 0 ? {} : { table: tableOf(listed) }),
|
|
208
|
+
message: listed.snapshots.length === 0 && listed.picking.kind === "none"
|
|
209
|
+
? `No runner snapshots are cached. ${UNPICKED_TEXT[listed.picking.why]}`
|
|
210
|
+
: explanationOf(listed),
|
|
211
|
+
...(listed.unreadable.length === 0
|
|
212
|
+
? {}
|
|
213
|
+
: {
|
|
214
|
+
warnings: listed.unreadable.map(({ file, reason }) => ({
|
|
215
|
+
reason: "snapshot_file_unreadable",
|
|
216
|
+
message: `storm can't read the cache file ${file}: ${reason}. No run starts from it.`,
|
|
217
|
+
})),
|
|
218
|
+
}),
|
|
219
|
+
next: [
|
|
220
|
+
{
|
|
221
|
+
type: "text",
|
|
222
|
+
text: "storm snapshots build builds what a run here would start from, without a test run: a base snapshot when none fits, then a dev snapshot at HEAD's commit.",
|
|
223
|
+
},
|
|
224
|
+
],
|
|
225
|
+
}),
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
errors: {
|
|
229
|
+
invalidConfig: configErrors.invalidConfig,
|
|
230
|
+
snapshotCacheUnreadable: {
|
|
231
|
+
exitCode: 1,
|
|
232
|
+
description: "storm couldn't read the runner snapshot cache's directory.",
|
|
233
|
+
schema: z.object({
|
|
234
|
+
/** The directory the read failed on. */
|
|
235
|
+
path: z.string(),
|
|
236
|
+
/** What the OS said. */
|
|
237
|
+
message: z.string(),
|
|
238
|
+
}),
|
|
239
|
+
render: ({ path: where, message }) => ({
|
|
240
|
+
message: `Couldn't read the runner snapshot cache: ${message}`,
|
|
241
|
+
rows: [["Path", where]],
|
|
242
|
+
}),
|
|
243
|
+
},
|
|
244
|
+
checkoutFailed: {
|
|
245
|
+
exitCode: 1,
|
|
246
|
+
description: "git failed while storm checked the checkout or a cached snapshot's commit, as a run here would refuse.",
|
|
247
|
+
schema: z.object({
|
|
248
|
+
/** What git said. */
|
|
249
|
+
message: z.string(),
|
|
250
|
+
}),
|
|
251
|
+
render: ({ message }) => ({
|
|
252
|
+
message: `git failed on this machine: ${message}.`,
|
|
253
|
+
next: [{ type: "text", text: "Fix the checkout, then run again." }],
|
|
254
|
+
}),
|
|
255
|
+
},
|
|
256
|
+
},
|
|
257
|
+
});
|