@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,95 @@
|
|
|
1
|
+
import { type ResourceDefinitionSet, type RunObserver, type RunOutcome, type RunRequest, type RunState } from "../core/index.ts";
|
|
2
|
+
import type { RunnerTerminal } from "../runner/index.ts";
|
|
3
|
+
import type { RunDirectoryFailure, RunDirectoryGateway } from "./gateways.ts";
|
|
4
|
+
import type { TestPlanFacts } from "./plan.ts";
|
|
5
|
+
import { type RunTestEvents } from "./run-collector.ts";
|
|
6
|
+
import { type RunRecordGit } from "./run-record.ts";
|
|
7
|
+
import { type TimelineFacts } from "./timeline-facts.ts";
|
|
8
|
+
/** `value` with the run's secrets hidden in every string in it, through arrays and plain objects. */
|
|
9
|
+
export type Redaction = <T>(value: T) => T;
|
|
10
|
+
/**
|
|
11
|
+
* What a run's recording starts from: the resource definition set, the run's start facts, and how to hide the run's
|
|
12
|
+
* secrets.
|
|
13
|
+
*/
|
|
14
|
+
export interface RunRecordingStart {
|
|
15
|
+
/** The definition set the run runs over, which folds its state, projects its timeline and reports its resources. */
|
|
16
|
+
readonly definitionSet: ResourceDefinitionSet;
|
|
17
|
+
readonly startedAt: Date;
|
|
18
|
+
/** The working directory the run started in. */
|
|
19
|
+
readonly cwd: string;
|
|
20
|
+
/** The config file its settings came from; null when none applied. */
|
|
21
|
+
readonly configFile: string | null;
|
|
22
|
+
/** The command. */
|
|
23
|
+
readonly argv: readonly string[];
|
|
24
|
+
/** A `storm vitest` run's test plan; undefined for a run that counted nothing. */
|
|
25
|
+
readonly plan: TestPlanFacts | undefined;
|
|
26
|
+
/** The run's request, which says where its command runs. */
|
|
27
|
+
readonly run: RunRequest;
|
|
28
|
+
/** The Git checkout it started from; null outside one, or when git couldn't say. */
|
|
29
|
+
readonly git: RunRecordGit | null;
|
|
30
|
+
/** Hides the run's secrets: in `run.json`, and in each test event the command staged, before it is kept or written. */
|
|
31
|
+
readonly redact: Redaction;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* How opening the run directory went: its run id and path, and what pruning older ones couldn't remove; or why it
|
|
35
|
+
* couldn't open, which the run goes on without.
|
|
36
|
+
*/
|
|
37
|
+
export type RunRecordingOpened = {
|
|
38
|
+
readonly ok: true;
|
|
39
|
+
readonly id: string;
|
|
40
|
+
readonly path: string;
|
|
41
|
+
readonly pruneFailures: readonly RunDirectoryFailure[];
|
|
42
|
+
} | {
|
|
43
|
+
readonly ok: false;
|
|
44
|
+
readonly failure: RunDirectoryFailure;
|
|
45
|
+
};
|
|
46
|
+
/** What a run recorded once it is over: what its summary and its `ran` outcome read. */
|
|
47
|
+
export interface RunRecorded {
|
|
48
|
+
/** The run's final state, folded from every event. */
|
|
49
|
+
readonly state: RunState;
|
|
50
|
+
/** Its timeline, each row labeled, as `timeline.json` holds it. */
|
|
51
|
+
readonly timeline: TimelineFacts;
|
|
52
|
+
/** Its test events for the summary, without a final result's errors and test output. */
|
|
53
|
+
readonly tests: RunTestEvents;
|
|
54
|
+
/**
|
|
55
|
+
* What to add to the workers' clock to read the run's, from when the run heard each worker test event it followed;
|
|
56
|
+
* 0 when it followed none.
|
|
57
|
+
*/
|
|
58
|
+
readonly workerOffsetMs: number;
|
|
59
|
+
/** The first write to the run directory that failed, or a file closing couldn't remove; undefined when none did. */
|
|
60
|
+
readonly writeFailure: RunDirectoryFailure | undefined;
|
|
61
|
+
}
|
|
62
|
+
/** One run's recording. Each method behaves the same when the run directory couldn't open, and writes nothing. */
|
|
63
|
+
export interface RunRecording {
|
|
64
|
+
readonly opened: RunRecordingOpened;
|
|
65
|
+
/**
|
|
66
|
+
* The test events file a command that stages its test events appends to, which the run payload names; undefined
|
|
67
|
+
* when the run directory couldn't open.
|
|
68
|
+
*/
|
|
69
|
+
readonly testEvents: string | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* The run's one observer, which hears every event, already redacted: folds it into the run's state and streams each
|
|
72
|
+
* test event to the private file that becomes `tests.jsonl`, then hands it to `beside`, the run's view, then writes
|
|
73
|
+
* it to `events.jsonl`, or a step's output to its log.
|
|
74
|
+
*/
|
|
75
|
+
observer(beside: RunObserver): RunObserver;
|
|
76
|
+
/** `terminal`, also writing the command's output, already redacted, to `command.log`. */
|
|
77
|
+
terminal(terminal: RunnerTerminal): RunnerTerminal;
|
|
78
|
+
/** Where step `step`'s whole output is; undefined for a step that writes no log, or without a run directory. */
|
|
79
|
+
stepLog(step: string): string | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* Ends the recording of a run that ended as `outcome`, already redacted: reads the staged test events, publishes
|
|
82
|
+
* `tests.jsonl`, writes `timeline.json`, writes `run.json` with how the run ended, and closes the run directory.
|
|
83
|
+
*/
|
|
84
|
+
end(outcome: RunOutcome): Promise<RunRecorded>;
|
|
85
|
+
/**
|
|
86
|
+
* Ends the recording of a run that threw: closes the run directory, which completes it and removes the staged test
|
|
87
|
+
* events, unpublished.
|
|
88
|
+
*/
|
|
89
|
+
abandon(): Promise<void>;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Starts recording a run in a run directory `gateway` opens, holding `run.json` as the run starts, redacted, and
|
|
93
|
+
* pruning older run directories to the newest `RUN_DIRECTORIES_KEPT`.
|
|
94
|
+
*/
|
|
95
|
+
export declare function recordRun(gateway: RunDirectoryGateway, start: RunRecordingStart): Promise<RunRecording>;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// One run's recording in its run directory: the run directory module's writing half. It opens the run directory with
|
|
2
|
+
// `run.json` as the run starts, folds the run's state from its events while it writes them, its step logs, the
|
|
3
|
+
// command log and its test events, and once the run is over writes how it ended, in one order, then closes it. A run
|
|
4
|
+
// whose run directory couldn't open goes on without one: the recording still folds its state and answers the same,
|
|
5
|
+
// and writes nothing.
|
|
6
|
+
//
|
|
7
|
+
// The order at the end is the reader's contract: the test events the command staged are read and redacted, then
|
|
8
|
+
// `tests.jsonl` is published, then `timeline.json` is written, then `run.json` says how the run ended, and then the run
|
|
9
|
+
// directory closes, which removes the staged test events. A run that threw is abandoned: its run directory closes and
|
|
10
|
+
// its test events are never published, since the run didn't end.
|
|
11
|
+
//
|
|
12
|
+
// The recording's one observer folds each event, hands it to the observer beside it (the run's view), and writes it
|
|
13
|
+
// last. Lanes beside each other emit at once, and the view awaits as it prints, so writing last keeps `events.jsonl` in
|
|
14
|
+
// the order storm has always written it.
|
|
15
|
+
import { observeAll, } from "../core/index.js";
|
|
16
|
+
import { runCollector } from "./run-collector.js";
|
|
17
|
+
import { RUN_DIRECTORIES_KEPT, runDirectoryObserver, stepLog, testEventsPath } from "./run-directory.js";
|
|
18
|
+
import { endedWhere, runEnd, runRecordText, startedWhere } from "./run-record.js";
|
|
19
|
+
import { timelineFacts } from "./timeline-facts.js";
|
|
20
|
+
/**
|
|
21
|
+
* Starts recording a run in a run directory `gateway` opens, holding `run.json` as the run starts, redacted, and
|
|
22
|
+
* pruning older run directories to the newest `RUN_DIRECTORIES_KEPT`.
|
|
23
|
+
*/
|
|
24
|
+
export async function recordRun(gateway, start) {
|
|
25
|
+
const { definitionSet } = start;
|
|
26
|
+
const record = start.redact({
|
|
27
|
+
version: 4,
|
|
28
|
+
startedAt: start.startedAt.toISOString(),
|
|
29
|
+
cwd: start.cwd,
|
|
30
|
+
configFile: start.configFile,
|
|
31
|
+
argv: start.argv,
|
|
32
|
+
...(start.plan === undefined ? {} : { plan: start.plan }),
|
|
33
|
+
where: startedWhere(start.run),
|
|
34
|
+
git: start.git,
|
|
35
|
+
});
|
|
36
|
+
const result = await gateway.open({
|
|
37
|
+
startedAt: start.startedAt,
|
|
38
|
+
keep: RUN_DIRECTORIES_KEPT,
|
|
39
|
+
run: runRecordText(record),
|
|
40
|
+
});
|
|
41
|
+
const directory = result.ok ? result.directory : undefined;
|
|
42
|
+
const opened = result.ok
|
|
43
|
+
? { ok: true, id: result.directory.id, path: result.directory.path, pruneFailures: result.pruneFailures }
|
|
44
|
+
: { ok: false, failure: result.failure };
|
|
45
|
+
const collector = runCollector(definitionSet, directory);
|
|
46
|
+
return {
|
|
47
|
+
opened,
|
|
48
|
+
testEvents: directory === undefined ? undefined : testEventsPath(directory.path),
|
|
49
|
+
observer: (beside) => directory === undefined
|
|
50
|
+
? observeAll(collector.observer, beside)
|
|
51
|
+
: observeAll(collector.observer, beside, runDirectoryObserver(directory)),
|
|
52
|
+
terminal: (terminal) => directory === undefined
|
|
53
|
+
? terminal
|
|
54
|
+
: {
|
|
55
|
+
color: terminal.color,
|
|
56
|
+
writeStdout: (text) => {
|
|
57
|
+
directory.appendCommandOutput(text);
|
|
58
|
+
terminal.writeStdout(text);
|
|
59
|
+
},
|
|
60
|
+
writeStderr: (text) => {
|
|
61
|
+
directory.appendCommandOutput(text);
|
|
62
|
+
terminal.writeStderr(text);
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
stepLog: (step) => (directory === undefined ? undefined : stepLog(directory.path, step)),
|
|
66
|
+
end: async (outcome) => {
|
|
67
|
+
if (directory !== undefined)
|
|
68
|
+
await collector.readStaged(directory, start.redact);
|
|
69
|
+
const { state, tests, workerOffsetMs } = collector.finish();
|
|
70
|
+
const timeline = timelineFacts(definitionSet.timeline(state), definitionSet.presentations.laneKinds);
|
|
71
|
+
directory?.publishTestEvents();
|
|
72
|
+
directory?.writeTimeline(JSON.stringify(timeline, null, 2));
|
|
73
|
+
directory?.writeRun(runRecordText({
|
|
74
|
+
...record,
|
|
75
|
+
where: endedWhere(record.where, state.runner, outcome.kind === "ran" ? (outcome.runner?.save ?? null) : null),
|
|
76
|
+
ended: runEnd(outcome, state.command, tests, definitionSet.reports),
|
|
77
|
+
}));
|
|
78
|
+
const writeFailure = await directory?.close();
|
|
79
|
+
return { state, timeline, tests, workerOffsetMs, writeFailure };
|
|
80
|
+
},
|
|
81
|
+
abandon: async () => {
|
|
82
|
+
await directory?.close();
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type TestEvent } from "
|
|
3
|
-
import {
|
|
1
|
+
import { type ResourceDefinitionSet, type RunObserver, type RunState } from "../core/index.ts";
|
|
2
|
+
import { type TestEvent } from "../sdk/run/launcher.ts";
|
|
3
|
+
import type { RunDirectory } from "./gateways.ts";
|
|
4
|
+
import type { Redaction } from "./recording.ts";
|
|
4
5
|
/** The test events the summary reads, how many lines held none, and why they may be incomplete, when they may. */
|
|
5
6
|
export interface RunTestEvents {
|
|
6
7
|
readonly events: readonly TestEvent[];
|
|
@@ -24,12 +25,12 @@ export interface RunCollector {
|
|
|
24
25
|
* Reads the test events the command staged in the run directory, if it staged any, once, redacting each event before
|
|
25
26
|
* it is kept or written.
|
|
26
27
|
*/
|
|
27
|
-
readStaged(directory: RunDirectory, redact:
|
|
28
|
+
readStaged(directory: RunDirectory, redact: Redaction): Promise<void>;
|
|
28
29
|
finish(): CollectedRun;
|
|
29
30
|
}
|
|
30
31
|
/**
|
|
31
|
-
* A collector that folds every event but a runner step's output into the run's state
|
|
32
|
-
* reads is appended whole to `directory`'s private test events file, when there is one, and kept
|
|
33
|
-
* without a final result's errors and test output.
|
|
32
|
+
* A collector that folds every event but a runner step's output into the run's state, through `definitionSet`. Each
|
|
33
|
+
* test event it hears or reads is appended whole to `directory`'s private test events file, when there is one, and kept
|
|
34
|
+
* for the summary without a final result's errors and test output.
|
|
34
35
|
*/
|
|
35
|
-
export declare function runCollector(directory: RunDirectory | undefined): RunCollector;
|
|
36
|
+
export declare function runCollector(definitionSet: ResourceDefinitionSet, directory: RunDirectory | undefined): RunCollector;
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
// What a run keeps while it goes: its folded state, compact test events for the summary, and the facts needed to read
|
|
2
2
|
// workers' times. Full redacted test events stream to the run directory's private partial file as they arrive, so a
|
|
3
3
|
// run keeps no test output or test errors in memory after it has handed them on.
|
|
4
|
-
import { EMPTY_RUN_STATE } from "
|
|
5
|
-
import {
|
|
6
|
-
import { parseTestEvent, testEventLine } from "../../sdk/run/launcher.js";
|
|
7
|
-
import { redactStrings } from "./redaction.js";
|
|
4
|
+
import { EMPTY_RUN_STATE } from "../core/index.js";
|
|
5
|
+
import { parseTestEvent, testEventLine } from "../sdk/run/launcher.js";
|
|
8
6
|
/**
|
|
9
|
-
* A collector that folds every event but a runner step's output into the run's state
|
|
10
|
-
* reads is appended whole to `directory`'s private test events file, when there is one, and kept
|
|
11
|
-
* without a final result's errors and test output.
|
|
7
|
+
* A collector that folds every event but a runner step's output into the run's state, through `definitionSet`. Each
|
|
8
|
+
* test event it hears or reads is appended whole to `directory`'s private test events file, when there is one, and kept
|
|
9
|
+
* for the summary without a final result's errors and test output.
|
|
12
10
|
*/
|
|
13
|
-
export function runCollector(directory) {
|
|
11
|
+
export function runCollector(definitionSet, directory) {
|
|
14
12
|
let state = EMPTY_RUN_STATE;
|
|
15
13
|
const events = [];
|
|
16
14
|
let unreadable = 0;
|
|
@@ -26,7 +24,7 @@ export function runCollector(directory) {
|
|
|
26
24
|
const { event } = timed;
|
|
27
25
|
if (event.kind === "runner" && event.event.kind === "step-output")
|
|
28
26
|
return;
|
|
29
|
-
state =
|
|
27
|
+
state = definitionSet.applyEvent(state, timed);
|
|
30
28
|
if (event.kind === "test") {
|
|
31
29
|
collect(event.event);
|
|
32
30
|
if (event.event.kind !== "test-result")
|
|
@@ -44,7 +42,7 @@ export function runCollector(directory) {
|
|
|
44
42
|
if (event === undefined)
|
|
45
43
|
unreadable += 1;
|
|
46
44
|
else
|
|
47
|
-
collect(
|
|
45
|
+
collect(redact(event));
|
|
48
46
|
});
|
|
49
47
|
if (!read.ok)
|
|
50
48
|
incomplete ??= read.failure.message;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RunObserver } from "
|
|
1
|
+
import type { RunObserver } from "../core/index.ts";
|
|
2
2
|
import type { RunDirectory, RunDirectoryStep, RunLog } from "./gateways.ts";
|
|
3
3
|
/** The subpath of storm's state directory that holds the run directories. */
|
|
4
4
|
export declare const RUNS_SUBPATH: readonly string[];
|
|
@@ -9,8 +9,8 @@ export declare const RUNS_SUBPATH: readonly string[];
|
|
|
9
9
|
export declare const RUN_DIRECTORIES_KEPT = 1000;
|
|
10
10
|
/**
|
|
11
11
|
* The file that records what a run was, written as its run directory opens and replaced once the run ends: the run's
|
|
12
|
-
* start, working directory, config file, command and kind, and then how it ended. Its
|
|
13
|
-
*
|
|
12
|
+
* start, working directory, config file, command and kind, and then how it ended. Its shape is `run-record.ts`'s; the
|
|
13
|
+
* gateway only stores its text.
|
|
14
14
|
*/
|
|
15
15
|
export declare const RUN_FILE = "run.json";
|
|
16
16
|
/**
|
|
@@ -10,8 +10,8 @@ export const RUNS_SUBPATH = ["runs"];
|
|
|
10
10
|
export const RUN_DIRECTORIES_KEPT = 1000;
|
|
11
11
|
/**
|
|
12
12
|
* The file that records what a run was, written as its run directory opens and replaced once the run ends: the run's
|
|
13
|
-
* start, working directory, config file, command and kind, and then how it ended. Its
|
|
14
|
-
*
|
|
13
|
+
* start, working directory, config file, command and kind, and then how it ended. Its shape is `run-record.ts`'s; the
|
|
14
|
+
* gateway only stores its text.
|
|
15
15
|
*/
|
|
16
16
|
export const RUN_FILE = "run.json";
|
|
17
17
|
/**
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import type { Row } from "@vercel/clinkr";
|
|
2
1
|
import { z } from "zod";
|
|
3
|
-
import type
|
|
4
|
-
import {
|
|
2
|
+
import { type ResourceReports, type RunOutcome, type RunRequest, type RunState } from "../core/index.ts";
|
|
3
|
+
import type { RunnerSave } from "../runner/index.ts";
|
|
4
|
+
import type { Row } from "../sdk/extension/index.ts";
|
|
5
|
+
import type { TestEvent } from "../sdk/run/launcher.ts";
|
|
6
|
+
import { type TestPlanFacts } from "./plan.ts";
|
|
7
|
+
import type { RunTestEvents } from "./run-collector.ts";
|
|
5
8
|
declare const testTotalsSchema: z.ZodObject<{
|
|
6
9
|
passed: z.ZodNumber;
|
|
7
10
|
failed: z.ZodNumber;
|
|
@@ -37,7 +40,7 @@ export type RecordedResources = {
|
|
|
37
40
|
};
|
|
38
41
|
};
|
|
39
42
|
/**
|
|
40
|
-
* How a run ended: its outcome's kind (`ran`, `canceled`, `
|
|
43
|
+
* How a run ended: its outcome's kind (`ran`, `canceled`, `spawn_failed`, …), the status storm exited with and the
|
|
41
44
|
* signal that ended the command, for a run whose command ran (null otherwise), how long the command took (null when it
|
|
42
45
|
* never ended), its tests' totals (null without a final result), why those may be incomplete (null unless a sandboxed
|
|
43
46
|
* run's final read of its test events file failed), what each resource instance it acquired reports of itself, as a
|
|
@@ -54,29 +57,45 @@ declare const snapshotSchema: z.ZodObject<{
|
|
|
54
57
|
built: z.ZodBoolean;
|
|
55
58
|
branch: z.ZodNullable<z.ZodString>;
|
|
56
59
|
head: z.ZodNullable<z.ZodString>;
|
|
60
|
+
kind: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
|
|
61
|
+
base: "base";
|
|
62
|
+
dev: "dev";
|
|
63
|
+
}>>>;
|
|
64
|
+
builtAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
65
|
+
builtBehind: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
57
66
|
}, z.core.$strip>;
|
|
67
|
+
/** Why a run whose command ended on its own started no save of a dev snapshot (`RunnerNoSaveReason`). */
|
|
68
|
+
export declare const noSaveReasonSchema: z.ZodEnum<{
|
|
69
|
+
"already-saved": "already-saved";
|
|
70
|
+
ci: "ci";
|
|
71
|
+
"command-failed": "command-failed";
|
|
72
|
+
"keep-sandbox": "keep-sandbox";
|
|
73
|
+
"no-save-flag": "no-save-flag";
|
|
74
|
+
"not-trusted": "not-trusted";
|
|
75
|
+
recipe: "recipe";
|
|
76
|
+
}>;
|
|
58
77
|
/**
|
|
59
78
|
* The runner snapshot a runner sandbox started from: its id, the base it is of, which the run's changes were uploaded
|
|
60
|
-
* on top of, whether the run built it or reused a cached one, and for a
|
|
61
|
-
*
|
|
79
|
+
* on top of, whether the run built it or reused a cached one, and for a dev snapshot the HEAD commit of the run that
|
|
80
|
+
* saved it and its branch (the commit is null for a base snapshot, the branch for a base snapshot and for a run on a
|
|
81
|
+
* detached HEAD); then its kind, the commit it was built at (a base snapshot's base, or the commit that saved a dev
|
|
82
|
+
* snapshot), and how many commits HEAD has that its built-at commit lacks (`builtBehind`), each null when unknown or in
|
|
83
|
+
* a record written before it existed. A record written before storm required a snapshot's base to be the merge-base
|
|
84
|
+
* may still hold that base's count of commits behind the merge-base, which the schema drops as it reads.
|
|
62
85
|
*/
|
|
63
86
|
export type RunRecordSnapshot = Readonly<z.output<typeof snapshotSchema>>;
|
|
64
87
|
/**
|
|
65
|
-
* How saving the runner sandbox as a
|
|
66
|
-
* report it.
|
|
88
|
+
* How saving the runner sandbox as a dev snapshot ended, as a `ran` outcome and `run.json` report it.
|
|
67
89
|
*/
|
|
68
90
|
export declare const saveSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
69
91
|
kind: z.ZodLiteral<"saved">;
|
|
70
92
|
snapshotId: z.ZodString;
|
|
71
93
|
base: z.ZodString;
|
|
72
|
-
branch: z.ZodString
|
|
94
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
73
95
|
head: z.ZodString;
|
|
74
96
|
ms: z.ZodNumber;
|
|
75
97
|
sizeBytes: z.ZodNumber;
|
|
76
98
|
entryWritten: z.ZodBoolean;
|
|
77
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
78
|
-
kind: z.ZodLiteral<"skipped">;
|
|
79
|
-
reason: z.ZodLiteral<"detached-head">;
|
|
80
99
|
}, z.core.$strip>, z.ZodObject<{
|
|
81
100
|
kind: z.ZodLiteral<"failed">;
|
|
82
101
|
step: z.ZodEnum<{
|
|
@@ -87,7 +106,7 @@ export declare const saveSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
87
106
|
}, z.core.$strip>, z.ZodObject<{
|
|
88
107
|
kind: z.ZodLiteral<"stopped">;
|
|
89
108
|
}, z.core.$strip>], "kind">;
|
|
90
|
-
/** How saving the runner sandbox as a
|
|
109
|
+
/** How saving the runner sandbox as a dev snapshot ended. */
|
|
91
110
|
export type RunRecordSave = z.output<typeof saveSchema>;
|
|
92
111
|
declare const whereSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
93
112
|
kind: z.ZodLiteral<"unsandboxed">;
|
|
@@ -107,20 +126,23 @@ declare const whereSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
107
126
|
built: z.ZodBoolean;
|
|
108
127
|
branch: z.ZodNullable<z.ZodString>;
|
|
109
128
|
head: z.ZodNullable<z.ZodString>;
|
|
129
|
+
kind: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
|
|
130
|
+
base: "base";
|
|
131
|
+
dev: "dev";
|
|
132
|
+
}>>>;
|
|
133
|
+
builtAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
134
|
+
builtBehind: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
110
135
|
}, z.core.$strip>>;
|
|
111
136
|
keptUntil: z.ZodNullable<z.ZodString>;
|
|
112
137
|
save: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
113
138
|
kind: z.ZodLiteral<"saved">;
|
|
114
139
|
snapshotId: z.ZodString;
|
|
115
140
|
base: z.ZodString;
|
|
116
|
-
branch: z.ZodString
|
|
141
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
117
142
|
head: z.ZodString;
|
|
118
143
|
ms: z.ZodNumber;
|
|
119
144
|
sizeBytes: z.ZodNumber;
|
|
120
145
|
entryWritten: z.ZodBoolean;
|
|
121
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
122
|
-
kind: z.ZodLiteral<"skipped">;
|
|
123
|
-
reason: z.ZodLiteral<"detached-head">;
|
|
124
146
|
}, z.core.$strip>, z.ZodObject<{
|
|
125
147
|
kind: z.ZodLiteral<"failed">;
|
|
126
148
|
step: z.ZodEnum<{
|
|
@@ -131,14 +153,26 @@ declare const whereSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
131
153
|
}, z.core.$strip>, z.ZodObject<{
|
|
132
154
|
kind: z.ZodLiteral<"stopped">;
|
|
133
155
|
}, z.core.$strip>], "kind">>;
|
|
156
|
+
uploadBytes: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
157
|
+
noSaveReason: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
|
|
158
|
+
"already-saved": "already-saved";
|
|
159
|
+
ci: "ci";
|
|
160
|
+
"command-failed": "command-failed";
|
|
161
|
+
"keep-sandbox": "keep-sandbox";
|
|
162
|
+
"no-save-flag": "no-save-flag";
|
|
163
|
+
"not-trusted": "not-trusted";
|
|
164
|
+
recipe: "recipe";
|
|
165
|
+
}>>>;
|
|
134
166
|
}, z.core.$strip>], "kind">;
|
|
135
167
|
/**
|
|
136
|
-
* Where
|
|
168
|
+
* Where the command ran: on this machine (`unsandboxed`, with `--unsandboxed`), or in a runner sandbox (`runner`):
|
|
137
169
|
* the control plane team and project it runs in, its region, runtime and vCPUs, and the run's base, HEAD's merge-base
|
|
138
170
|
* with `baseRef`, all known as the run starts; then, once the run is over, the runner sandbox's name and the runner
|
|
139
171
|
* snapshot it started from, each null when the run stopped before it, when the runner sandbox's timeout stops it, as an
|
|
140
|
-
* ISO time, when the run kept it running (null when it stopped and deleted it),
|
|
141
|
-
* ended (null
|
|
172
|
+
* ISO time, when the run kept it running (null when it stopped and deleted it), how saving it as a dev snapshot
|
|
173
|
+
* ended (null when the run started no save), how many bytes of changes the run uploaded, and why a run whose command
|
|
174
|
+
* ended on its own started no save (each null when unknown). A record written by an older storm can name a reused
|
|
175
|
+
* runner snapshot of an older base.
|
|
142
176
|
*/
|
|
143
177
|
export type RunRecordWhere = Readonly<z.output<typeof whereSchema>>;
|
|
144
178
|
declare const gitSchema: z.ZodObject<{
|
|
@@ -153,11 +187,11 @@ declare const gitSchema: z.ZodObject<{
|
|
|
153
187
|
export type RunRecordGit = Readonly<z.output<typeof gitSchema>>;
|
|
154
188
|
/**
|
|
155
189
|
* A `storm vitest` run's test plan: how many tests `vitest list` counted, in how many files, and each resource option
|
|
156
|
-
* whose default is a function of the planned run, with its value and where that came from (`
|
|
190
|
+
* whose default is a function of the planned run, with its value and where that came from (`plan.ts`).
|
|
157
191
|
*/
|
|
158
192
|
export type RunRecordPlan = TestPlanFacts;
|
|
159
193
|
declare const runRecordSchema: z.ZodObject<{
|
|
160
|
-
version: z.ZodLiteral<
|
|
194
|
+
version: z.ZodLiteral<4>;
|
|
161
195
|
startedAt: z.ZodString;
|
|
162
196
|
cwd: z.ZodString;
|
|
163
197
|
configFile: z.ZodNullable<z.ZodString>;
|
|
@@ -193,20 +227,23 @@ declare const runRecordSchema: z.ZodObject<{
|
|
|
193
227
|
built: z.ZodBoolean;
|
|
194
228
|
branch: z.ZodNullable<z.ZodString>;
|
|
195
229
|
head: z.ZodNullable<z.ZodString>;
|
|
230
|
+
kind: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
|
|
231
|
+
base: "base";
|
|
232
|
+
dev: "dev";
|
|
233
|
+
}>>>;
|
|
234
|
+
builtAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
235
|
+
builtBehind: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
196
236
|
}, z.core.$strip>>;
|
|
197
237
|
keptUntil: z.ZodNullable<z.ZodString>;
|
|
198
238
|
save: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
199
239
|
kind: z.ZodLiteral<"saved">;
|
|
200
240
|
snapshotId: z.ZodString;
|
|
201
241
|
base: z.ZodString;
|
|
202
|
-
branch: z.ZodString
|
|
242
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
203
243
|
head: z.ZodString;
|
|
204
244
|
ms: z.ZodNumber;
|
|
205
245
|
sizeBytes: z.ZodNumber;
|
|
206
246
|
entryWritten: z.ZodBoolean;
|
|
207
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
208
|
-
kind: z.ZodLiteral<"skipped">;
|
|
209
|
-
reason: z.ZodLiteral<"detached-head">;
|
|
210
247
|
}, z.core.$strip>, z.ZodObject<{
|
|
211
248
|
kind: z.ZodLiteral<"failed">;
|
|
212
249
|
step: z.ZodEnum<{
|
|
@@ -217,6 +254,16 @@ declare const runRecordSchema: z.ZodObject<{
|
|
|
217
254
|
}, z.core.$strip>, z.ZodObject<{
|
|
218
255
|
kind: z.ZodLiteral<"stopped">;
|
|
219
256
|
}, z.core.$strip>], "kind">>;
|
|
257
|
+
uploadBytes: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
258
|
+
noSaveReason: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
|
|
259
|
+
"already-saved": "already-saved";
|
|
260
|
+
ci: "ci";
|
|
261
|
+
"command-failed": "command-failed";
|
|
262
|
+
"keep-sandbox": "keep-sandbox";
|
|
263
|
+
"no-save-flag": "no-save-flag";
|
|
264
|
+
"not-trusted": "not-trusted";
|
|
265
|
+
recipe: "recipe";
|
|
266
|
+
}>>>;
|
|
220
267
|
}, z.core.$strip>], "kind">;
|
|
221
268
|
git: z.ZodNullable<z.ZodObject<{
|
|
222
269
|
branch: z.ZodNullable<z.ZodString>;
|
|
@@ -251,8 +298,28 @@ export type RunRecord = Readonly<Omit<z.output<typeof runRecordSchema>, "ended">
|
|
|
251
298
|
}>;
|
|
252
299
|
/** `run.json`'s text for `record`. */
|
|
253
300
|
export declare function runRecordText(record: RunRecord): string;
|
|
254
|
-
/** The run `text` records; undefined when there is no text, or it isn't a version
|
|
301
|
+
/** The run `text` records; undefined when there is no text, or it isn't a version 4 `run.json`. */
|
|
255
302
|
export declare function parseRunRecord(text: string | undefined): RunRecord | undefined;
|
|
256
303
|
/** The totals of `events`' final results; null without one. */
|
|
257
304
|
export declare function testTotals(events: readonly TestEvent[]): RunTestTotals | null;
|
|
305
|
+
/**
|
|
306
|
+
* How the run ended, for `run.json`: its outcome's kind; for a run whose command ran, the status storm exits with
|
|
307
|
+
* and the signal that ended the command; how long the command took, from the command's state once it ended on its own
|
|
308
|
+
* (a command the run stopped has none); the totals of its tests' final results, and why they may be incomplete; and a
|
|
309
|
+
* ran outcome's acquired resources' result facts, with the rows `storm runs show` lists for them, each rendered when
|
|
310
|
+
* the resource's acquire answered, so a past run shows them without the definitions that made them.
|
|
311
|
+
*/
|
|
312
|
+
export declare function runEnd(outcome: RunOutcome, ran: RunState["command"], tests: RunTestEvents, reports: ResourceReports): RunRecordEnd;
|
|
313
|
+
/**
|
|
314
|
+
* Where the command runs, as `run.json` records it as the run starts: unsandboxed, or in a runner sandbox, with
|
|
315
|
+
* no sandbox or snapshot yet.
|
|
316
|
+
*/
|
|
317
|
+
export declare function startedWhere(run: RunRequest): RunRecordWhere;
|
|
318
|
+
/**
|
|
319
|
+
* `where` once the run is over, from the runner's final state: for a sandboxed run, the runner sandbox the run started,
|
|
320
|
+
* the runner snapshot it started from, which the run reused or built, when its timeout stops the runner sandbox it
|
|
321
|
+
* kept running, and how saving it as a dev snapshot ended (`save`). Each is null when the run stopped before it,
|
|
322
|
+
* kept no runner sandbox, or saved none.
|
|
323
|
+
*/
|
|
324
|
+
export declare function endedWhere(where: RunRecordWhere, runner: RunState["runner"], save: RunnerSave | null): RunRecordWhere;
|
|
258
325
|
export {};
|