@cnc-tools/storm 0.10.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/storm.js +12 -9
- package/dist/build-info.js +1 -1
- package/dist/chunks/{chunk-YF3ICDBY.js → chunk-43MWZLJR.js} +1 -1
- package/dist/chunks/chunk-4XT5RC5T.js +98 -0
- package/dist/chunks/chunk-7D6LC5JY.js +340 -0
- package/dist/chunks/{chunk-WF4KJ7YG.js → chunk-BW2ADH7U.js} +1 -1
- package/dist/chunks/chunk-FK4RLDEK.js +40 -0
- package/dist/chunks/chunk-FSP3SJ35.js +1429 -0
- package/dist/chunks/{chunk-J6ZNYUDV.js → chunk-GQIL3AHY.js} +2 -3
- package/dist/chunks/chunk-GSC6SRTW.js +27 -0
- package/dist/chunks/chunk-ISGQJIQM.js +852 -0
- package/dist/chunks/chunk-IYM44FUX.js +1461 -0
- package/dist/chunks/{chunk-XHJGHJBW.js → chunk-LQKNI3EG.js} +38 -279
- package/dist/chunks/chunk-NMVODY3P.js +19 -0
- package/dist/chunks/{chunk-VJQLMGOH.js → chunk-ODQHQJLE.js} +2761 -3699
- package/dist/chunks/chunk-RYRJNHL7.js +55 -0
- package/dist/chunks/chunk-SXW6XN4R.js +161 -0
- package/dist/chunks/{chunk-OVXD7GES.js → chunk-T6AZIDZD.js} +43 -396
- package/dist/chunks/chunk-TEEZL3GA.js +851 -0
- package/dist/chunks/chunk-TMQQYHUX.js +80 -0
- package/dist/chunks/{chunk-AKKNF3WZ.js → chunk-U7M3ZB3Z.js} +565 -595
- package/dist/chunks/{chunk-JQ2HK4RN.js → chunk-Y3BUNNRG.js} +234 -57
- package/dist/chunks/{chunk-ZJ2USLAT.js → chunk-YM6TZV4L.js} +394 -416
- package/dist/chunks/chunk-YT5OROR7.js +271 -0
- package/dist/chunks/{live-app-RIJM3QFD.js → live-app-AZ5N5HBD.js} +36 -12
- package/dist/command-tree.d.ts +4 -1
- package/dist/command-tree.js +4 -1
- package/dist/commands/exec/cleanup.d.ts +3 -3
- package/dist/commands/exec/cleanup.js +6 -2
- package/dist/commands/exec/command.d.ts +56 -17
- package/dist/commands/exec/command.js +51 -39
- package/dist/commands/exec/define-run-command.d.ts +752 -0
- package/dist/commands/exec/define-run-command.js +58 -0
- package/dist/commands/exec/driver-plan.d.ts +30 -0
- package/dist/commands/exec/driver-plan.js +44 -0
- package/dist/commands/exec/driver-refusals.d.ts +89 -0
- package/dist/commands/exec/driver-refusals.js +65 -0
- package/dist/commands/exec/exec-words.d.ts +5 -0
- package/dist/commands/exec/exec-words.js +31 -0
- package/dist/commands/exec/job-summary.d.ts +1 -1
- package/dist/commands/exec/job-summary.js +1 -1
- package/dist/commands/exec/live-view.js +58 -28
- package/dist/commands/exec/mint-failed.js +5 -5
- package/dist/commands/exec/outcomes.d.ts +72 -10
- package/dist/commands/exec/outcomes.js +38 -10
- package/dist/commands/exec/plan-run.d.ts +3 -5
- package/dist/commands/exec/plan-run.js +3 -3
- package/dist/commands/exec/progress.d.ts +35 -15
- package/dist/commands/exec/progress.js +82 -57
- package/dist/commands/exec/resource-flags.d.ts +10 -3
- package/dist/commands/exec/resource-flags.js +25 -14
- package/dist/commands/exec/resource-refusals.d.ts +2 -2
- package/dist/commands/exec/resource-refusals.js +10 -10
- package/dist/commands/exec/run-bin.d.ts +35 -0
- package/dist/commands/exec/run-bin.js +32 -0
- package/dist/commands/exec/run-command.d.ts +85 -20
- package/dist/commands/exec/run-command.js +142 -238
- package/dist/commands/exec/run-metadata.d.ts +29 -17
- package/dist/commands/exec/run-metadata.js +38 -16
- package/dist/commands/exec/snapshot-text.d.ts +40 -0
- package/dist/commands/exec/snapshot-text.js +112 -0
- package/dist/commands/exec/test-plan.d.ts +3 -37
- package/dist/commands/exec/test-plan.js +11 -28
- package/dist/commands/exec/tests-summary.d.ts +21 -12
- package/dist/commands/exec/tests-summary.js +67 -39
- package/dist/commands/exec/text.d.ts +5 -0
- package/dist/commands/exec/text.js +7 -0
- package/dist/commands/exec/view.js +22 -13
- package/dist/commands/exec/waterfall.d.ts +3 -1
- package/dist/commands/exec/waterfall.js +20 -3
- package/dist/commands/exec/worker-chart.d.ts +19 -11
- package/dist/commands/exec/worker-chart.js +66 -36
- package/dist/commands/playwright/command.d.ts +746 -0
- package/dist/commands/playwright/command.js +31 -0
- package/dist/commands/playwright/metadata.d.ts +4 -0
- package/dist/commands/playwright/metadata.js +8 -0
- package/dist/commands/runs/facts.d.ts +22 -8
- package/dist/commands/runs/facts.js +19 -9
- package/dist/commands/runs/list/command.d.ts +34 -8
- package/dist/commands/runs/list/command.js +18 -13
- package/dist/commands/runs/list/outcomes.d.ts +17 -4
- package/dist/commands/runs/logs/command.js +20 -14
- package/dist/commands/runs/logs/outcomes.js +1 -1
- package/dist/commands/runs/past-run.d.ts +3 -27
- package/dist/commands/runs/past-run.js +3 -37
- package/dist/commands/runs/show/command.d.ts +36 -8
- package/dist/commands/runs/show/command.js +53 -33
- package/dist/commands/runs/show/metadata.js +1 -1
- package/dist/commands/runs/show/outcomes.d.ts +18 -4
- package/dist/commands/runs/show/outcomes.js +37 -16
- package/dist/commands/snapshots/build/command.d.ts +898 -0
- package/dist/commands/snapshots/build/command.js +511 -0
- package/dist/commands/snapshots/build/metadata.d.ts +28 -0
- package/dist/commands/snapshots/build/metadata.js +34 -0
- package/dist/commands/snapshots/build/outcomes.d.ts +484 -0
- package/dist/commands/snapshots/build/outcomes.js +322 -0
- package/dist/commands/snapshots/list/command.d.ts +272 -0
- package/dist/commands/snapshots/list/command.js +305 -0
- package/dist/commands/snapshots/list/metadata.d.ts +16 -0
- package/dist/commands/snapshots/list/metadata.js +24 -0
- package/dist/commands/snapshots/list/outcomes.d.ts +183 -0
- package/dist/commands/snapshots/list/outcomes.js +257 -0
- package/dist/commands/snapshots/metadata.d.ts +3 -0
- package/dist/commands/snapshots/metadata.js +7 -0
- package/dist/commands/vitest/command.d.ts +267 -298
- package/dist/commands/vitest/command.js +23 -174
- package/dist/commands/vitest/metadata.js +1 -1
- package/dist/config/credential-resolver.d.ts +6 -3
- package/dist/config/credential-resolver.js +6 -5
- package/dist/config-file/define.d.ts +1 -1
- package/dist/context.d.ts +44 -24
- package/dist/context.js +20 -13
- package/dist/core/before-run.d.ts +7 -6
- package/dist/core/before-run.js +9 -9
- package/dist/core/definition-lookup.d.ts +22 -0
- package/dist/core/definition-lookup.js +35 -0
- package/dist/core/drivers-of.d.ts +23 -0
- package/dist/core/drivers-of.js +13 -0
- package/dist/core/events.d.ts +6 -22
- package/dist/core/gateways.d.ts +38 -170
- package/dist/core/index.d.ts +13 -12
- package/dist/core/index.js +12 -11
- package/dist/core/launcher-context.d.ts +11 -0
- package/dist/core/launcher-context.js +31 -0
- package/dist/core/live/package-bin-gateway.d.ts +6 -0
- package/dist/core/live/package-bin-gateway.js +24 -0
- package/dist/core/package-bin.d.ts +7 -0
- package/dist/core/package-bin.js +30 -0
- package/dist/core/presentations.d.ts +5 -4
- package/dist/core/presentations.js +9 -9
- package/dist/core/resource-definition-set.d.ts +39 -0
- package/dist/core/resource-definition-set.js +31 -0
- package/dist/core/resource-reports.d.ts +38 -5
- package/dist/core/resource-reports.js +47 -17
- package/dist/core/resource.d.ts +4 -4
- package/dist/core/resources.d.ts +8 -7
- package/dist/core/resources.js +11 -13
- package/dist/core/run-state.d.ts +27 -16
- package/dist/core/run-state.js +50 -18
- package/dist/core/run.d.ts +42 -54
- package/dist/core/run.js +72 -122
- package/dist/core/setup-phases.d.ts +14 -0
- package/dist/core/setup-phases.js +24 -0
- package/dist/core/state-directory.d.ts +2 -2
- package/dist/core/state-directory.js +3 -3
- package/dist/core/timeline.d.ts +4 -2
- package/dist/core/timeline.js +11 -4
- package/dist/credential/events.d.ts +20 -0
- package/dist/credential/events.js +4 -0
- package/dist/credential/index.d.ts +2 -1
- package/dist/credential/index.js +6 -5
- package/dist/credential/source.d.ts +38 -26
- package/dist/credential/source.js +25 -34
- package/dist/extension-commands.d.ts +12 -6
- package/dist/extension-commands.js +16 -13
- package/dist/extensions/github/{world.d.ts → context.d.ts} +1 -1
- package/dist/extensions/github/context.js +3 -0
- package/dist/extensions/github/definition.d.ts +1 -1
- package/dist/extensions/github/definition.js +3 -3
- package/dist/extensions/github/extension.d.ts +1 -1
- package/dist/extensions/github/index.d.ts +2 -2
- package/dist/extensions/github/index.js +4 -4
- package/dist/extensions/github/lifecycle.d.ts +3 -3
- package/dist/extensions/github/lifecycle.js +14 -14
- package/dist/extensions/github/live/context.d.ts +6 -0
- package/dist/extensions/github/live/context.js +16 -0
- package/dist/extensions/github/resource.d.ts +1 -1
- package/dist/extensions/playwright/driver.d.ts +8 -0
- package/dist/extensions/playwright/driver.js +60 -0
- package/dist/extensions/playwright/extension.d.ts +2 -0
- package/dist/extensions/playwright/extension.js +12 -0
- package/dist/extensions/playwright/plan/gateways.d.ts +62 -0
- package/dist/extensions/playwright/plan/gateways.js +4 -0
- package/dist/extensions/playwright/plan/list-output.d.ts +26 -0
- package/dist/extensions/playwright/plan/list-output.js +101 -0
- package/dist/extensions/playwright/plan/live/list-gateway.d.ts +15 -0
- package/dist/extensions/playwright/plan/live/list-gateway.js +100 -0
- package/dist/extensions/playwright/plan/plan.d.ts +44 -0
- package/dist/extensions/playwright/plan/plan.js +53 -0
- package/dist/extensions/testserver/command-tree.d.ts +2 -2
- package/dist/extensions/testserver/command-tree.js +2 -3
- package/dist/extensions/testserver/commands/app.d.ts +7 -7
- package/dist/extensions/testserver/commands/pool/create/command.d.ts +5 -5
- package/dist/extensions/testserver/commands/pool/create/command.js +17 -12
- package/dist/extensions/testserver/commands/pool/list/command.js +8 -5
- package/dist/extensions/testserver/{world.d.ts → context.d.ts} +1 -1
- package/dist/extensions/testserver/context.js +4 -0
- package/dist/extensions/testserver/definition.d.ts +2 -2
- package/dist/extensions/testserver/definition.js +8 -7
- package/dist/extensions/testserver/events.d.ts +1 -1
- package/dist/extensions/testserver/extension.d.ts +4 -3
- package/dist/extensions/testserver/extension.js +33 -20
- package/dist/extensions/testserver/index.d.ts +2 -2
- package/dist/extensions/testserver/index.js +2 -2
- package/dist/extensions/testserver/lifecycle.d.ts +6 -5
- package/dist/extensions/testserver/lifecycle.js +9 -8
- package/dist/extensions/testserver/live/context.d.ts +8 -0
- package/dist/extensions/testserver/live/{world.js → context.js} +6 -7
- package/dist/extensions/testserver/options/rules.d.ts +3 -3
- package/dist/extensions/testserver/options/rules.js +5 -4
- package/dist/extensions/testserver/options/sandboxes.d.ts +3 -2
- package/dist/extensions/testserver/options/sandboxes.js +3 -2
- package/dist/extensions/testserver/playwright/index.d.ts +33 -0
- package/dist/extensions/testserver/playwright/index.js +43 -0
- package/dist/extensions/testserver/presentation.d.ts +4 -4
- package/dist/extensions/testserver/presentation.js +7 -7
- package/dist/extensions/testserver/progress.d.ts +3 -3
- package/dist/extensions/testserver/progress.js +3 -3
- package/dist/extensions/testserver/provision.d.ts +2 -2
- package/dist/extensions/testserver/provision.js +10 -10
- package/dist/extensions/testserver/resource.d.ts +2 -2
- package/dist/extensions/testserver/result.d.ts +2 -2
- package/dist/extensions/testserver/result.js +1 -1
- package/dist/extensions/testserver/run/connection.d.ts +1 -1
- package/dist/extensions/testserver/run/connection.js +3 -3
- package/dist/extensions/testserver/run/sandbox.d.ts +31 -0
- package/dist/extensions/testserver/run/sandbox.js +58 -0
- package/dist/extensions/testserver/run-sandbox.d.ts +2 -2
- package/dist/extensions/testserver/run-sandbox.js +3 -3
- package/dist/extensions/testserver/vercel-cli/arguments.d.ts +2 -2
- package/dist/extensions/testserver/vercel-cli/arguments.js +6 -6
- package/dist/extensions/testserver/vercel-cli/auth-config.d.ts +7 -7
- package/dist/extensions/testserver/vercel-cli/auth-config.js +4 -4
- package/dist/extensions/testserver/vercel-cli/clock.js +1 -1
- package/dist/extensions/testserver/vercel-cli/config-files.js +1 -1
- package/dist/extensions/testserver/vercel-cli/context.d.ts +1 -1
- package/dist/extensions/testserver/vercel-cli/context.js +2 -2
- package/dist/extensions/testserver/vercel-cli/entry.d.ts +1 -1
- package/dist/extensions/testserver/vercel-cli/entry.js +1 -1
- package/dist/extensions/testserver/vercel-cli/environment.d.ts +5 -5
- package/dist/extensions/testserver/vercel-cli/environment.js +6 -6
- package/dist/extensions/testserver/vercel-cli/gateways.d.ts +1 -1
- package/dist/extensions/testserver/vercel-cli/gateways.js +3 -3
- package/dist/extensions/testserver/vercel-cli/index.d.ts +1 -1
- package/dist/extensions/testserver/vercel-cli/index.js +8 -9
- package/dist/extensions/testserver/vercel-cli/invocation.d.ts +13 -12
- package/dist/extensions/testserver/vercel-cli/invocation.js +1 -1
- package/dist/extensions/testserver/vercel-cli/{driver.d.ts → invoker.d.ts} +18 -17
- package/dist/extensions/testserver/vercel-cli/{driver.js → invoker.js} +8 -8
- package/dist/extensions/testserver/vercel-cli/live/config-files.d.ts +2 -2
- package/dist/extensions/testserver/vercel-cli/live/config-files.js +2 -2
- package/dist/extensions/testserver/vercel-cli/live/process-gateway.js +1 -1
- package/dist/extensions/testserver/vercel-cli/report.js +2 -2
- package/dist/extensions/testserver/vercel-cli/verbose.js +1 -1
- package/dist/extensions/testserver/vitest/config.d.ts +8 -6
- package/dist/extensions/testserver/vitest/config.js +10 -16
- package/dist/extensions/testserver/vitest/container-scope.d.ts +11 -11
- package/dist/extensions/testserver/vitest/container-scope.js +9 -9
- package/dist/extensions/testserver/vitest/container-start.d.ts +6 -6
- package/dist/extensions/testserver/vitest/container-start.js +14 -11
- package/dist/extensions/testserver/vitest/diagnostics.d.ts +1 -1
- package/dist/extensions/testserver/vitest/fixtures.d.ts +12 -10
- package/dist/extensions/testserver/vitest/fixtures.js +44 -22
- package/dist/extensions/testserver/vitest/index.d.ts +1 -1
- package/dist/extensions/testserver/vitest/index.js +4 -4
- package/dist/extensions/testserver/vitest/types.d.ts +16 -18
- package/dist/extensions/testserver/vitest/types.js +2 -2
- package/dist/extensions/testserver/vitest/worker-sandbox.d.ts +8 -0
- package/dist/extensions/testserver/vitest/worker-sandbox.js +17 -0
- package/dist/extensions/vitest/driver.d.ts +8 -0
- package/dist/extensions/vitest/driver.js +62 -0
- package/dist/extensions/vitest/extension.d.ts +2 -0
- package/dist/extensions/vitest/extension.js +8 -0
- package/dist/{vitest → extensions/vitest/plan}/gateways.d.ts +1 -26
- package/dist/extensions/vitest/plan/gateways.js +3 -0
- package/dist/{vitest → extensions/vitest/plan}/live/list-gateway.d.ts +1 -2
- package/dist/{vitest → extensions/vitest/plan}/live/list-gateway.js +1 -20
- package/dist/extensions/vitest/plan/plan-over.d.ts +38 -0
- package/dist/extensions/vitest/plan/plan-over.js +31 -0
- package/dist/extensions/vitest/plan/plan.d.ts +24 -0
- package/dist/{vitest → extensions/vitest/plan}/plan.js +11 -26
- package/dist/extensions.d.ts +43 -30
- package/dist/extensions.js +50 -35
- package/dist/forward-sigterm.d.ts +8 -0
- package/dist/forward-sigterm.js +18 -0
- package/dist/launcher-resolvers/index.d.ts +1 -0
- package/dist/launcher-resolvers/index.js +2 -1
- package/dist/launcher-resolvers/local-services.d.ts +22 -0
- package/dist/launcher-resolvers/local-services.js +6 -0
- package/dist/live-app.js +9 -7
- package/dist/local-services.d.ts +11 -0
- package/dist/local-services.js +16 -0
- package/dist/playwright/index.d.ts +1 -0
- package/dist/playwright/index.js +4 -0
- package/dist/playwright/reporter.d.ts +96 -0
- package/dist/playwright/reporter.js +162 -0
- package/dist/playwright/worker-index.d.ts +7 -0
- package/dist/playwright/worker-index.js +20 -0
- package/dist/run-directory/gateways.d.ts +167 -0
- package/dist/run-directory/gateways.js +2 -0
- package/dist/run-directory/index.d.ts +8 -0
- package/dist/run-directory/index.js +13 -0
- package/dist/run-directory/plan.d.ts +35 -0
- package/dist/run-directory/plan.js +24 -0
- package/dist/run-directory/reader.d.ts +70 -0
- package/dist/run-directory/reader.js +51 -0
- package/dist/run-directory/recording.d.ts +95 -0
- package/dist/run-directory/recording.js +85 -0
- package/dist/{commands/exec → run-directory}/run-collector.d.ts +9 -8
- package/dist/{commands/exec → run-directory}/run-collector.js +8 -10
- package/dist/{core → run-directory}/run-directory.d.ts +3 -3
- package/dist/{core → run-directory}/run-directory.js +2 -2
- package/dist/{commands/exec → run-directory}/run-record.d.ts +94 -27
- package/dist/run-directory/run-record.js +229 -0
- package/dist/{commands/exec → run-directory}/timeline-facts.d.ts +5 -8
- package/dist/{commands/exec → run-directory}/timeline-facts.js +11 -25
- package/dist/runner/build-snapshots.d.ts +179 -0
- package/dist/runner/build-snapshots.js +235 -0
- package/dist/runner/context.js +2 -1
- package/dist/runner/events.d.ts +73 -33
- package/dist/runner/gateways.d.ts +30 -10
- package/dist/runner/index.d.ts +15 -17
- package/dist/runner/index.js +12 -14
- package/dist/runner/live/checkout-gateway.js +15 -7
- package/dist/runner/live/snapshot-records.js +8 -7
- package/dist/runner/prepare.d.ts +26 -26
- package/dist/runner/prepare.js +27 -14
- package/dist/runner/ready.d.ts +43 -10
- package/dist/runner/ready.js +51 -34
- package/dist/runner/recipe.d.ts +48 -4
- package/dist/runner/recipe.js +42 -1
- package/dist/runner/scope.d.ts +13 -13
- package/dist/runner/scope.js +9 -11
- package/dist/runner/secrets.d.ts +6 -0
- package/dist/runner/secrets.js +10 -0
- package/dist/runner/session.d.ts +128 -0
- package/dist/runner/session.js +138 -0
- package/dist/runner/snapshot-build.d.ts +21 -11
- package/dist/runner/snapshot-build.js +11 -16
- package/dist/runner/snapshot-cache.d.ts +140 -62
- package/dist/runner/snapshot-cache.js +145 -102
- package/dist/runner/snapshot-inspect.d.ts +89 -0
- package/dist/runner/snapshot-inspect.js +173 -0
- package/dist/runner/snapshot-key.d.ts +5 -2
- package/dist/runner/snapshot-key.js +1 -1
- package/dist/runner/snapshot-save.d.ts +35 -20
- package/dist/runner/snapshot-save.js +47 -37
- package/dist/runner/snapshot-start.d.ts +25 -0
- package/dist/runner/snapshot-start.js +16 -0
- package/dist/sdk/extension/ci.d.ts +2 -0
- package/dist/sdk/extension/ci.js +6 -0
- package/dist/sdk/extension/commands.d.ts +44 -28
- package/dist/sdk/extension/commands.js +15 -13
- package/dist/sdk/extension/driver.d.ts +143 -0
- package/dist/sdk/extension/driver.js +28 -0
- package/dist/sdk/extension/index.d.ts +3 -1
- package/dist/sdk/extension/index.js +16 -9
- package/dist/sdk/extension/{launcher-supplies.d.ts → launcher-context.d.ts} +3 -3
- package/dist/sdk/extension/launcher-context.js +5 -0
- package/dist/sdk/extension/lifecycle.d.ts +10 -8
- package/dist/sdk/extension/lifecycle.js +2 -2
- package/dist/sdk/extension/progress.js +2 -2
- package/dist/sdk/extension/resource-definition.d.ts +13 -13
- package/dist/sdk/extension/resource-definition.js +2 -2
- package/dist/sdk/extension/resource.d.ts +13 -13
- package/dist/sdk/extension/resource.js +11 -11
- package/dist/sdk/extension/time.js +2 -2
- package/dist/sdk/index.d.ts +2 -0
- package/dist/sdk/index.js +3 -1
- package/dist/sdk/run/launcher.d.ts +1 -1
- package/dist/sdk/run/launcher.js +4 -3
- package/dist/sdk/run/payload.js +1 -1
- package/dist/sdk/run/test-events.d.ts +24 -18
- package/dist/sdk/run/test-events.js +5 -4
- package/dist/sdk/run/test-result-writer.d.ts +77 -0
- package/dist/sdk/run/test-result-writer.js +143 -0
- package/dist/sdk/run/worker-test-event-writer.d.ts +13 -0
- package/dist/sdk/run/worker-test-event-writer.js +31 -0
- package/dist/vendor/testserver-sdk/container/container.d.ts +12 -12
- package/dist/vendor/testserver-sdk/container/container.js +39 -21
- package/dist/vendor/testserver-sdk/factories/build.d.ts +12 -40
- package/dist/vendor/testserver-sdk/factories/build.js +15 -66
- package/dist/vendor/testserver-sdk/factories/gateways.d.ts +1 -2
- package/dist/vendor/testserver-sdk/factories/index.d.ts +1 -3
- package/dist/vendor/testserver-sdk/factories/index.js +3 -5
- package/dist/vendor/testserver-sdk/index.d.ts +1 -2
- package/dist/vendor/testserver-sdk/index.js +5 -6
- package/dist/vendor/testserver-sdk/records/body.d.ts +1 -1
- package/dist/vendor/testserver-sdk/records/body.js +1 -1
- package/dist/vendor/testserver-sdk/testserver/failure.d.ts +4 -3
- package/dist/vendor/testserver-sdk/testserver/failure.js +4 -3
- package/dist/vitest/index.d.ts +2 -1
- package/dist/vitest/index.js +6 -4
- package/dist/vitest/test-events.d.ts +6 -16
- package/dist/vitest/test-events.js +15 -40
- package/dist/vitest/test-results.d.ts +9 -31
- package/dist/vitest/test-results.js +34 -105
- package/dist/vitest/worker-index.d.ts +6 -0
- package/dist/vitest/worker-index.js +17 -0
- package/package.json +23 -9
- package/skills/overview.md +6 -5
- package/skills/read-run-output.md +22 -7
- package/dist/chunks/chunk-AGWW3HDT.js +0 -2559
- package/dist/chunks/chunk-H2VCSNVU.js +0 -351
- package/dist/commands/exec/run-record.js +0 -135
- package/dist/commands/vitest/outcomes.d.ts +0 -379
- package/dist/commands/vitest/outcomes.js +0 -70
- package/dist/core/launcher-supplies.d.ts +0 -11
- package/dist/core/launcher-supplies.js +0 -28
- package/dist/core/mint.d.ts +0 -10
- package/dist/core/mint.js +0 -14
- package/dist/core/resource-registry.d.ts +0 -54
- package/dist/core/resource-registry.js +0 -57
- package/dist/extensions/github/live/world.d.ts +0 -6
- package/dist/extensions/github/live/world.js +0 -16
- package/dist/extensions/github/world.js +0 -3
- package/dist/extensions/testserver/live/world.d.ts +0 -8
- package/dist/extensions/testserver/vitest/sandbox.d.ts +0 -25
- package/dist/extensions/testserver/vitest/sandbox.js +0 -43
- package/dist/extensions/testserver/world.js +0 -4
- package/dist/sdk/extension/launcher-supplies.js +0 -3
- package/dist/story/align.d.ts +0 -37
- package/dist/story/align.js +0 -39
- package/dist/story/command-line.d.ts +0 -34
- package/dist/story/command-line.js +0 -100
- package/dist/story/definition.d.ts +0 -59
- package/dist/story/definition.js +0 -9
- package/dist/story/diff.d.ts +0 -9
- package/dist/story/diff.js +0 -97
- package/dist/story/errors.d.ts +0 -14
- package/dist/story/errors.js +0 -21
- package/dist/story/gateways.d.ts +0 -94
- package/dist/story/gateways.js +0 -3
- package/dist/story/host.d.ts +0 -30
- package/dist/story/host.js +0 -97
- package/dist/story/index.d.ts +0 -8
- package/dist/story/index.js +0 -10
- package/dist/story/json.d.ts +0 -16
- package/dist/story/json.js +0 -59
- package/dist/story/live/recording-gateway.d.ts +0 -2
- package/dist/story/live/recording-gateway.js +0 -103
- package/dist/story/mode.d.ts +0 -17
- package/dist/story/mode.js +0 -21
- package/dist/story/orphans.d.ts +0 -35
- package/dist/story/orphans.js +0 -51
- package/dist/story/recording.d.ts +0 -62
- package/dist/story/recording.js +0 -97
- package/dist/story/report.d.ts +0 -42
- package/dist/story/report.js +0 -130
- package/dist/story/sequence.d.ts +0 -30
- package/dist/story/sequence.js +0 -74
- package/dist/story/settle.d.ts +0 -96
- package/dist/story/settle.js +0 -71
- package/dist/story/start.d.ts +0 -50
- package/dist/story/start.js +0 -183
- package/dist/vendor/testserver-sdk/factories/definition.d.ts +0 -39
- package/dist/vendor/testserver-sdk/factories/definition.js +0 -16
- package/dist/vendor/testserver-sdk/factories/definitions.d.ts +0 -169
- package/dist/vendor/testserver-sdk/factories/definitions.js +0 -245
- package/dist/vendor/testserver-sdk/seed/index.d.ts +0 -1
- package/dist/vendor/testserver-sdk/seed/index.js +0 -3
- package/dist/vendor/testserver-sdk/seed/seed.d.ts +0 -221
- package/dist/vendor/testserver-sdk/seed/seed.js +0 -171
- package/dist/vitest/find-vitest.d.ts +0 -7
- package/dist/vitest/find-vitest.js +0 -28
- package/dist/vitest/gateways.js +0 -4
- package/dist/vitest/plan.d.ts +0 -51
- /package/dist/{vitest → extensions/vitest/plan}/list-output.d.ts +0 -0
- /package/dist/{vitest → extensions/vitest/plan}/list-output.js +0 -0
- /package/dist/{core → run-directory}/live/run-directory-gateway.d.ts +0 -0
- /package/dist/{core → run-directory}/live/run-directory-gateway.js +0 -0
|
@@ -1,24 +1,37 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
DEFINITION_SET,
|
|
3
|
+
EXTENSIONS,
|
|
4
|
+
RESOURCES
|
|
5
|
+
} from "./chunk-ISGQJIQM.js";
|
|
5
6
|
import {
|
|
6
7
|
median,
|
|
7
8
|
paint,
|
|
8
|
-
sameRow,
|
|
9
9
|
seconds,
|
|
10
10
|
shortFile,
|
|
11
11
|
truncate,
|
|
12
12
|
visibleLength
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-TMQQYHUX.js";
|
|
14
|
+
import {
|
|
15
|
+
megabytesText,
|
|
16
|
+
sameRow,
|
|
17
|
+
setupPhaseKey,
|
|
18
|
+
setupPhaseWords
|
|
19
|
+
} from "./chunk-FSP3SJ35.js";
|
|
20
|
+
import {
|
|
21
|
+
CONFIG_FILE_NAME
|
|
22
|
+
} from "./chunk-ODQHQJLE.js";
|
|
23
|
+
import {
|
|
24
|
+
defaultResourceKey,
|
|
25
|
+
optionKeyPath
|
|
26
|
+
} from "./chunk-YT5OROR7.js";
|
|
14
27
|
|
|
15
28
|
// src/commands/exec/tests-summary.ts
|
|
16
29
|
var SLOWEST_FILES = 3;
|
|
17
|
-
function testsSummaryLines(events, unreadable = 0, incomplete) {
|
|
18
|
-
const summary = testsSummary(events, unreadable, incomplete);
|
|
30
|
+
function testsSummaryLines(events, hints, unreadable = 0, incomplete) {
|
|
31
|
+
const summary = testsSummary(events, hints, unreadable, incomplete);
|
|
19
32
|
return [
|
|
20
33
|
summary.tests,
|
|
21
|
-
summary.
|
|
34
|
+
...summary.setups.map((line) => ` ${line}`),
|
|
22
35
|
summary.slowest === void 0 ? void 0 : ` ${summary.slowest}`,
|
|
23
36
|
summary.unreadable,
|
|
24
37
|
summary.incomplete
|
|
@@ -27,8 +40,10 @@ function testsSummaryLines(events, unreadable = 0, incomplete) {
|
|
|
27
40
|
function incompleteText(message) {
|
|
28
41
|
return `the test results may be incomplete: couldn't read the test events file once the command ended: ${message}`;
|
|
29
42
|
}
|
|
30
|
-
|
|
31
|
-
|
|
43
|
+
function noFinalResultsText(hint) {
|
|
44
|
+
return `no final test results: ${hint}`;
|
|
45
|
+
}
|
|
46
|
+
function testsSummary(events, hints, unreadable = 0, incomplete) {
|
|
32
47
|
const results = [];
|
|
33
48
|
const reported = [];
|
|
34
49
|
for (const event of events) {
|
|
@@ -36,7 +51,7 @@ function testsSummary(events, unreadable = 0, incomplete) {
|
|
|
36
51
|
else reported.push(event);
|
|
37
52
|
}
|
|
38
53
|
let tests;
|
|
39
|
-
let
|
|
54
|
+
let setups = [];
|
|
40
55
|
let slowestText;
|
|
41
56
|
if (events.length > 0) {
|
|
42
57
|
const attempts = reported.flatMap((event) => event.kind === "test-attempt-finished" ? [event] : []);
|
|
@@ -45,7 +60,7 @@ function testsSummary(events, unreadable = 0, incomplete) {
|
|
|
45
60
|
let first = Infinity;
|
|
46
61
|
let last = -Infinity;
|
|
47
62
|
for (const event of reported) {
|
|
48
|
-
workers = Math.max(workers, event.worker);
|
|
63
|
+
workers = Math.max(workers, event.worker + 1);
|
|
49
64
|
first = Math.min(first, event.at);
|
|
50
65
|
last = Math.max(last, event.at);
|
|
51
66
|
}
|
|
@@ -53,7 +68,7 @@ function testsSummary(events, unreadable = 0, incomplete) {
|
|
|
53
68
|
const files = new Set(events.map((event) => event.file)).size;
|
|
54
69
|
const filesText = `${files} ${files === 1 ? "file" : "files"}`;
|
|
55
70
|
const outcome = results.length === 0 ? [
|
|
56
|
-
|
|
71
|
+
noFinalResultsText(hints.noFinalResults),
|
|
57
72
|
...attempts.length === 0 ? [] : [`${attempts.length} test ${attempts.length === 1 ? "attempt" : "attempts"}`],
|
|
58
73
|
filesText
|
|
59
74
|
] : resultTotals(results, filesText);
|
|
@@ -62,38 +77,49 @@ function testsSummary(events, unreadable = 0, incomplete) {
|
|
|
62
77
|
`${seconds(testMs)} of attempts on ${workers} ${workers === 1 ? "worker" : "workers"} in ${seconds(wallMs)}${busy}`
|
|
63
78
|
];
|
|
64
79
|
tests = ` tests ${[...outcome, ...timing].join(" \xB7 ")}`;
|
|
65
|
-
|
|
66
|
-
const warmups = [];
|
|
67
|
-
for (const event of reported) {
|
|
68
|
-
if (event.kind !== "container-started" || !event.ok) continue;
|
|
69
|
-
starts.push(event.ms);
|
|
70
|
-
if (event.warmupMs !== void 0) warmups.push(event.warmupMs);
|
|
71
|
-
}
|
|
72
|
-
if (starts.length > 0) {
|
|
73
|
-
let startMs = 0;
|
|
74
|
-
let fastest = Infinity;
|
|
75
|
-
let slowest2 = -Infinity;
|
|
76
|
-
for (const ms of starts) {
|
|
77
|
-
startMs += ms;
|
|
78
|
-
fastest = Math.min(fastest, ms);
|
|
79
|
-
slowest2 = Math.max(slowest2, ms);
|
|
80
|
-
}
|
|
81
|
-
const share = testMs > 0 ? ` \xB7 ~${Math.round(startMs / testMs * 100)}% of attempt time` : "";
|
|
82
|
-
const warmup = warmups.length === 0 ? "" : ` \xB7 warmup median ${seconds(median(warmups) ?? 0)}`;
|
|
83
|
-
containers = `container starts ${starts.length} \xB7 ${seconds(fastest)}\u2013${seconds(slowest2)} \xB7 median ${seconds(median(starts) ?? 0)}${share}${warmup}`;
|
|
84
|
-
}
|
|
80
|
+
setups = setupsText(reported, testMs);
|
|
85
81
|
const slowest = slowestFiles(reported);
|
|
86
82
|
if (slowest.length > 0)
|
|
87
83
|
slowestText = `slowest: ${slowest.map(({ file, ms }) => `${shortFile(file)} ${seconds(ms)}`).join(", ")}`;
|
|
88
84
|
}
|
|
89
85
|
return {
|
|
90
86
|
tests,
|
|
91
|
-
|
|
87
|
+
setups,
|
|
92
88
|
slowest: slowestText,
|
|
93
89
|
unreadable: unreadable > 0 ? ` tests skipped ${unreadable} unreadable test event ${unreadable === 1 ? "line" : "lines"}` : void 0,
|
|
94
90
|
incomplete: incomplete === void 0 ? void 0 : ` tests ${incompleteText(incomplete)}`
|
|
95
91
|
};
|
|
96
92
|
}
|
|
93
|
+
function setupWordsOf(events) {
|
|
94
|
+
return setupPhaseWords(
|
|
95
|
+
events.flatMap((event) => event.kind === "setup-started" || event.kind === "setup-finished" ? [event] : [])
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
function setupsText(events, testMs) {
|
|
99
|
+
const words = setupWordsOf(events);
|
|
100
|
+
const groups = /* @__PURE__ */ new Map();
|
|
101
|
+
for (const event of events) {
|
|
102
|
+
if (event.kind !== "setup-finished" || !event.ok) continue;
|
|
103
|
+
const key = setupPhaseKey(event);
|
|
104
|
+
const group = groups.get(key) ?? { label: words(event), starts: [], warmups: [] };
|
|
105
|
+
groups.set(key, group);
|
|
106
|
+
group.starts.push(event.ms);
|
|
107
|
+
if (event.warmupMs !== void 0) group.warmups.push(event.warmupMs);
|
|
108
|
+
}
|
|
109
|
+
return [...groups.values()].map(({ label, starts, warmups }) => {
|
|
110
|
+
let startMs = 0;
|
|
111
|
+
let fastest = Infinity;
|
|
112
|
+
let slowest = -Infinity;
|
|
113
|
+
for (const ms of starts) {
|
|
114
|
+
startMs += ms;
|
|
115
|
+
fastest = Math.min(fastest, ms);
|
|
116
|
+
slowest = Math.max(slowest, ms);
|
|
117
|
+
}
|
|
118
|
+
const share = testMs > 0 ? ` \xB7 ~${Math.round(startMs / testMs * 100)}% of attempt time` : "";
|
|
119
|
+
const warmup = warmups.length === 0 ? "" : ` \xB7 warmup median ${seconds(median(warmups) ?? 0)}`;
|
|
120
|
+
return `${label} starts ${starts.length} \xB7 ${seconds(fastest)}\u2013${seconds(slowest)} \xB7 median ${seconds(median(starts) ?? 0)}${share}${warmup}`;
|
|
121
|
+
});
|
|
122
|
+
}
|
|
97
123
|
function resultTotals(results, filesText) {
|
|
98
124
|
const count = (state) => results.filter((event) => event.state === state).length;
|
|
99
125
|
const failed = count("fail");
|
|
@@ -124,21 +150,31 @@ var MAX_WORKER_ROWS = 16;
|
|
|
124
150
|
var MAX_LABEL_SHARE = 0.3;
|
|
125
151
|
var MAX_LABEL_WIDTH = 32;
|
|
126
152
|
var INDENT = " ";
|
|
127
|
-
function testsChart(events, unreadable, clock, incomplete) {
|
|
153
|
+
function testsChart(events, hints, unreadable, clock, incomplete) {
|
|
128
154
|
const lanes = workerLanes(events, clock);
|
|
129
155
|
if (lanes.length === 0) return void 0;
|
|
130
|
-
const summary = testsSummary(events, unreadable, incomplete);
|
|
131
|
-
const failed = lanes.reduce((sum, lane) => sum + lane.starts.filter((start) => !start.ok).length, 0);
|
|
156
|
+
const summary = testsSummary(events, hints, unreadable, incomplete);
|
|
132
157
|
const notes = [
|
|
133
158
|
summary.tests,
|
|
134
|
-
summary.
|
|
135
|
-
|
|
159
|
+
...summary.setups.map((line) => ` \u2591 ${line}`),
|
|
160
|
+
...failedSetupsText(lanes, setupWordsOf(events)).map((line) => ` \xD7 ${line}`),
|
|
136
161
|
lanes.some((lane) => lane.files.length > 1) ? " \u2588\u2593 a worker's files, in turn" : void 0,
|
|
137
162
|
summary.unreadable,
|
|
138
163
|
summary.incomplete
|
|
139
164
|
].filter((line) => line !== void 0);
|
|
140
165
|
return { lanes, notes };
|
|
141
166
|
}
|
|
167
|
+
function failedSetupsText(lanes, words) {
|
|
168
|
+
const failed = /* @__PURE__ */ new Map();
|
|
169
|
+
for (const setup of lanes.flatMap((lane) => lane.setups)) {
|
|
170
|
+
if (setup.ok) continue;
|
|
171
|
+
const key = setupPhaseKey(setup);
|
|
172
|
+
const group = failed.get(key) ?? { label: words(setup), count: 0 };
|
|
173
|
+
failed.set(key, group);
|
|
174
|
+
group.count += 1;
|
|
175
|
+
}
|
|
176
|
+
return [...failed.values()].map(({ label, count }) => `${count} ${label} ${count === 1 ? "start" : "starts"} failed`);
|
|
177
|
+
}
|
|
142
178
|
function workerLanes(events, clock) {
|
|
143
179
|
const reported = events.filter((event) => event.kind !== "test-result");
|
|
144
180
|
const lanes = lanesOf(reported, clock.runStartedAt - clock.offsetMs);
|
|
@@ -157,7 +193,7 @@ function workerLanes(events, clock) {
|
|
|
157
193
|
return lanes.map((lane) => ({
|
|
158
194
|
...moved(lane),
|
|
159
195
|
files: lane.files.map((run) => ({ ...moved(run), name: names.get(run.file) ?? run.file })),
|
|
160
|
-
|
|
196
|
+
setups: lane.setups.map(moved)
|
|
161
197
|
}));
|
|
162
198
|
}
|
|
163
199
|
function fileNames(files) {
|
|
@@ -213,10 +249,11 @@ function lanesOf(events, origin) {
|
|
|
213
249
|
const lanes = [];
|
|
214
250
|
for (const [worker, own] of [...byWorker].toSorted(([a], [b]) => a - b)) {
|
|
215
251
|
const files = [];
|
|
216
|
-
const
|
|
252
|
+
const setups = [];
|
|
217
253
|
const tests = /* @__PURE__ */ new Set();
|
|
218
254
|
const openFiles = /* @__PURE__ */ new Map();
|
|
219
|
-
const
|
|
255
|
+
const settingUp = /* @__PURE__ */ new Map();
|
|
256
|
+
const phase = (event) => `${event.file}\0${setupPhaseKey(event)}`;
|
|
220
257
|
let lastMs = -Infinity;
|
|
221
258
|
for (const event of own) {
|
|
222
259
|
const atMs = event.at - origin;
|
|
@@ -231,12 +268,18 @@ function lanesOf(events, origin) {
|
|
|
231
268
|
openFiles.delete(event.file);
|
|
232
269
|
break;
|
|
233
270
|
}
|
|
234
|
-
case "
|
|
235
|
-
|
|
271
|
+
case "setup-started":
|
|
272
|
+
settingUp.set(phase(event), { startMs: atMs, label: event.label, resource: event.resource });
|
|
236
273
|
break;
|
|
237
|
-
case "
|
|
238
|
-
|
|
239
|
-
|
|
274
|
+
case "setup-finished":
|
|
275
|
+
setups.push({
|
|
276
|
+
startMs: atMs - event.ms - (event.warmupMs ?? 0),
|
|
277
|
+
endMs: atMs,
|
|
278
|
+
ok: event.ok,
|
|
279
|
+
label: event.label,
|
|
280
|
+
resource: event.resource
|
|
281
|
+
});
|
|
282
|
+
settingUp.delete(phase(event));
|
|
240
283
|
break;
|
|
241
284
|
case "test-started":
|
|
242
285
|
tests.add(`${event.file}\0${event.test}`);
|
|
@@ -246,7 +289,7 @@ function lanesOf(events, origin) {
|
|
|
246
289
|
}
|
|
247
290
|
}
|
|
248
291
|
for (const [file, startMs2] of openFiles) files.push({ file, startMs: startMs2, endMs: lastMs });
|
|
249
|
-
for (const
|
|
292
|
+
for (const setup of settingUp.values()) setups.push({ ...setup, endMs: lastMs, ok: true });
|
|
250
293
|
if (files.length === 0) continue;
|
|
251
294
|
files.sort((a, b) => a.startMs - b.startMs);
|
|
252
295
|
let startMs = Infinity;
|
|
@@ -258,7 +301,7 @@ function lanesOf(events, origin) {
|
|
|
258
301
|
lanes.push({
|
|
259
302
|
worker,
|
|
260
303
|
files: files.map((run) => ({ ...run, name: run.file })),
|
|
261
|
-
|
|
304
|
+
setups,
|
|
262
305
|
startMs,
|
|
263
306
|
endMs,
|
|
264
307
|
tests: tests.size
|
|
@@ -270,15 +313,18 @@ function shownLanes(lanes) {
|
|
|
270
313
|
if (lanes.length <= MAX_WORKER_ROWS) return lanes;
|
|
271
314
|
return [...lanes].toSorted((a, b) => b.endMs - a.endMs || a.worker - b.worker).slice(0, MAX_WORKER_ROWS).toSorted((a, b) => a.worker - b.worker);
|
|
272
315
|
}
|
|
316
|
+
function workerNumber(lane) {
|
|
317
|
+
return lane.worker + 1;
|
|
318
|
+
}
|
|
273
319
|
function digitsOf(lanes) {
|
|
274
320
|
let worker = 1;
|
|
275
|
-
for (const lane of lanes) worker = Math.max(worker, lane
|
|
321
|
+
for (const lane of lanes) worker = Math.max(worker, workerNumber(lane));
|
|
276
322
|
return String(worker).length;
|
|
277
323
|
}
|
|
278
324
|
function labelText(lane, digits, room) {
|
|
279
325
|
const [first] = lane.files;
|
|
280
326
|
const more = lane.files.length > 1 ? ` +${lane.files.length - 1}` : "";
|
|
281
|
-
const head = `${INDENT}w${String(lane
|
|
327
|
+
const head = `${INDENT}w${String(workerNumber(lane)).padEnd(digits)} `;
|
|
282
328
|
const name = first?.name ?? "";
|
|
283
329
|
return `${head}${shortened(name, Math.max(1, room - head.length - more.length))}${more}`;
|
|
284
330
|
}
|
|
@@ -298,7 +344,7 @@ function workerTailWidth(lanes) {
|
|
|
298
344
|
for (const lane of shownLanes(lanes)) widest = Math.max(widest, tailText(lane).length);
|
|
299
345
|
return widest + 1;
|
|
300
346
|
}
|
|
301
|
-
var GLYPH = { file: "\u2588", "next-file": "\u2593",
|
|
347
|
+
var GLYPH = { file: "\u2588", "next-file": "\u2593", setup: "\u2591", "failed-setup": "\xD7" };
|
|
302
348
|
function laneLines(lane, digits, layout, waitedOn) {
|
|
303
349
|
const { labelWidth, column, width, paint: paint2 } = layout;
|
|
304
350
|
const startColumn = column(lane.startMs);
|
|
@@ -310,7 +356,7 @@ function laneLines(lane, digits, layout, waitedOn) {
|
|
|
310
356
|
for (let index = from; index < to; index += 1) cells[index] = cell;
|
|
311
357
|
};
|
|
312
358
|
lane.files.forEach((run, index) => fill(run, index % 2 === 0 ? "file" : "next-file"));
|
|
313
|
-
for (const
|
|
359
|
+
for (const setup of lane.setups) fill(setup, setup.ok ? "setup" : "failed-setup", !setup.ok);
|
|
314
360
|
const label = labelText(lane, digits, Math.min(labelWidth - 1, labelRoom(width))).padEnd(labelWidth);
|
|
315
361
|
const text = tailText(lane);
|
|
316
362
|
const line = `${label}${paintedBar(cells, paint2, waitedOn)}\u258F${text}`;
|
|
@@ -330,8 +376,8 @@ function paintedBar(cells, paint2, waitedOn) {
|
|
|
330
376
|
let end = index + 1;
|
|
331
377
|
while (end < cells.length && cells[end] === cell) end += 1;
|
|
332
378
|
const run = cell === void 0 ? " ".repeat(end - index) : GLYPH[cell].repeat(end - index);
|
|
333
|
-
if (cell === "
|
|
334
|
-
else if (cell === "failed-
|
|
379
|
+
if (cell === "setup") text += paint2.faint(run);
|
|
380
|
+
else if (cell === "failed-setup") text += paint2.failed(run);
|
|
335
381
|
else if (cell !== void 0 && waitedOn) text += paint2.active(run);
|
|
336
382
|
else text += run;
|
|
337
383
|
index = end;
|
|
@@ -348,6 +394,18 @@ function fittingNames(names, room) {
|
|
|
348
394
|
}
|
|
349
395
|
|
|
350
396
|
// src/commands/exec/waterfall.ts
|
|
397
|
+
var LANE_LABELS = [
|
|
398
|
+
"credential",
|
|
399
|
+
"runner-setup",
|
|
400
|
+
"tests",
|
|
401
|
+
"cleanup",
|
|
402
|
+
...DEFINITION_SET.presentations.laneKinds.map(({ label }) => label)
|
|
403
|
+
];
|
|
404
|
+
function criticalPathStep(step, timeline) {
|
|
405
|
+
const row = timeline.rows.find((candidate) => sameRow(candidate, step));
|
|
406
|
+
const label = row?.label ?? step.name;
|
|
407
|
+
return row?.snapshot === void 0 ? label : `${label} (snapshot ${row.snapshot})`;
|
|
408
|
+
}
|
|
351
409
|
var LABEL_WIDTH = Math.max(...LANE_LABELS.map((label) => label.length)) + 2;
|
|
352
410
|
var TAIL_WIDTH = 14;
|
|
353
411
|
var AXIS_STEPS = [1, 2, 5, 10, 15, 20, 30, 60, 120, 300, 600, 900, 1800, 3600, 7200];
|
|
@@ -411,15 +469,134 @@ function rowLines(row, layout, critical) {
|
|
|
411
469
|
}
|
|
412
470
|
function breakdownText(row) {
|
|
413
471
|
const steps = row.steps.map(
|
|
414
|
-
(step) => `${step.name} ${seconds(step.endMs - step.startMs)}${step.outcome === "done" ? "" : ` ${step.outcome}`}`
|
|
472
|
+
(step) => `${step.name} ${seconds(step.endMs - step.startMs)}${step.bytes === void 0 ? "" : ` (${megabytesText(step.bytes)})`}${step.outcome === "done" ? "" : ` ${step.outcome}`}`
|
|
415
473
|
);
|
|
416
474
|
if (row.sandboxes === void 0) return steps.join(" \xB7 ");
|
|
417
475
|
const counts = `${row.sandboxes.reused} reused, ${row.sandboxes.created} created`;
|
|
418
476
|
return [counts, ...steps.length > 1 ? steps : []].join(" \xB7 ");
|
|
419
477
|
}
|
|
420
478
|
|
|
479
|
+
// src/commands/exec/resource-flags.ts
|
|
480
|
+
import { z } from "zod";
|
|
481
|
+
function flagField(prefix, option) {
|
|
482
|
+
return `${prefix}${option.charAt(0).toUpperCase()}${option.slice(1)}`;
|
|
483
|
+
}
|
|
484
|
+
function flagSpelling(field) {
|
|
485
|
+
return `--${field.replace(/([A-Z]+)([A-Z][a-z])/g, "$1-$2").replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase()}`;
|
|
486
|
+
}
|
|
487
|
+
var RESOURCE_FLAGS = RESOURCES.flatMap((definition) => {
|
|
488
|
+
const options = definition.options;
|
|
489
|
+
return Object.entries(options).flatMap(([option, rule]) => {
|
|
490
|
+
const help = rule.flag;
|
|
491
|
+
if (help === void 0) return [];
|
|
492
|
+
const field = flagField(definition.flagPrefix, option);
|
|
493
|
+
return [
|
|
494
|
+
{
|
|
495
|
+
definition: definition.name,
|
|
496
|
+
resource: defaultResourceKey(definition),
|
|
497
|
+
option,
|
|
498
|
+
field,
|
|
499
|
+
flag: flagSpelling(field),
|
|
500
|
+
rule,
|
|
501
|
+
help
|
|
502
|
+
}
|
|
503
|
+
];
|
|
504
|
+
});
|
|
505
|
+
});
|
|
506
|
+
var RESOURCE_FLAG_HELP = Object.fromEntries(
|
|
507
|
+
RESOURCE_FLAGS.map(({ field, help }) => [field, help])
|
|
508
|
+
);
|
|
509
|
+
var RESOURCE_USAGE_FLAGS = RESOURCE_FLAGS.map(({ flag, help, rule }) => {
|
|
510
|
+
if (help.valueLabel !== void 0) return `[${flag} <${help.valueLabel}>]`;
|
|
511
|
+
return rule.default === true ? `[${flag}=false]` : `[${flag}]`;
|
|
512
|
+
}).join(" ");
|
|
513
|
+
function resourceRunExamples(of) {
|
|
514
|
+
return EXTENSIONS.flatMap(({ examples }) => {
|
|
515
|
+
if (examples === void 0) return [];
|
|
516
|
+
if (of === "exec") return examples.exec;
|
|
517
|
+
return Object.hasOwn(examples.drivers, of.driver) ? examples.drivers[of.driver] ?? [] : [];
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
function baseType(schema, field) {
|
|
521
|
+
let input = schema;
|
|
522
|
+
while (input instanceof z.ZodPipe) input = input.in;
|
|
523
|
+
if (input instanceof z.ZodNumber) return z.number();
|
|
524
|
+
if (input instanceof z.ZodString) return z.string();
|
|
525
|
+
if (input instanceof z.ZodBoolean) return z.boolean();
|
|
526
|
+
if (input instanceof z.ZodEnum) return input;
|
|
527
|
+
throw new Error(`The run flag ${field}'s option schema has no number, string, boolean or enum base`);
|
|
528
|
+
}
|
|
529
|
+
function resourceFlagFields(taken) {
|
|
530
|
+
const fields = {};
|
|
531
|
+
for (const { field, rule } of RESOURCE_FLAGS) {
|
|
532
|
+
if (Object.hasOwn(fields, field) || taken.includes(field))
|
|
533
|
+
throw new Error(`Two run flags share the request field ${field}`);
|
|
534
|
+
fields[field] = baseType(rule.schema, field).optional();
|
|
535
|
+
}
|
|
536
|
+
return fields;
|
|
537
|
+
}
|
|
538
|
+
function readResourceFlags(request) {
|
|
539
|
+
const values = {};
|
|
540
|
+
const problems = [];
|
|
541
|
+
for (const { definition, option, field, flag, rule } of RESOURCE_FLAGS) {
|
|
542
|
+
const value = request[field];
|
|
543
|
+
if (value === void 0) continue;
|
|
544
|
+
const checked = rule.schema.safeParse(value);
|
|
545
|
+
if (checked.success) values[definition] = { ...values[definition], [option]: checked.data };
|
|
546
|
+
else problems.push(...checked.error.issues.map(({ message }) => ({ field, message: `${flag} ${message}.` })));
|
|
547
|
+
}
|
|
548
|
+
if (problems.length > 0) return { ok: false, problems };
|
|
549
|
+
return { ok: true, values };
|
|
550
|
+
}
|
|
551
|
+
function resourceFlagProblems(request) {
|
|
552
|
+
const read = readResourceFlags(request);
|
|
553
|
+
return read.ok ? [] : read.problems;
|
|
554
|
+
}
|
|
555
|
+
function resourceFlagValues(request) {
|
|
556
|
+
const read = readResourceFlags(request);
|
|
557
|
+
if (!read.ok) throw new Error(`The flags should have been refused: ${read.problems.map((p) => p.message).join(" ")}`);
|
|
558
|
+
return read.values;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
// src/commands/exec/test-plan.ts
|
|
562
|
+
function recordedPlan(testPlan, options) {
|
|
563
|
+
return testPlan.kind === "counted" ? { tests: testPlan.tests, files: testPlan.files, options: options.map((option) => ({ ...option })) } : void 0;
|
|
564
|
+
}
|
|
565
|
+
function testPlanLine(plan) {
|
|
566
|
+
return `Running ${testPlanText(plan)}`;
|
|
567
|
+
}
|
|
568
|
+
function testPlanText(plan) {
|
|
569
|
+
return [countText(plan), ...plan.options.map(planOptionText)].join("; ");
|
|
570
|
+
}
|
|
571
|
+
function countText({ tests, files }) {
|
|
572
|
+
return `${tests} ${tests === 1 ? "test" : "tests"} in ${files} ${files === 1 ? "file" : "files"}`;
|
|
573
|
+
}
|
|
574
|
+
function planOptionText({ path, value, from }) {
|
|
575
|
+
return `${path} ${String(value)} (${fromText(path, from)})`;
|
|
576
|
+
}
|
|
577
|
+
function fromText(path, from) {
|
|
578
|
+
switch (from) {
|
|
579
|
+
case "flag":
|
|
580
|
+
return RESOURCE_FLAGS.find(({ resource, option }) => optionKeyPath(resource, option) === path)?.flag ?? "a flag";
|
|
581
|
+
case "file":
|
|
582
|
+
return CONFIG_FILE_NAME;
|
|
583
|
+
case "default":
|
|
584
|
+
return "default";
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
|
|
421
588
|
export {
|
|
422
589
|
testsSummaryLines,
|
|
423
590
|
testsChart,
|
|
424
|
-
|
|
591
|
+
criticalPathStep,
|
|
592
|
+
waterfallLines,
|
|
593
|
+
RESOURCE_FLAG_HELP,
|
|
594
|
+
RESOURCE_USAGE_FLAGS,
|
|
595
|
+
resourceRunExamples,
|
|
596
|
+
resourceFlagFields,
|
|
597
|
+
resourceFlagProblems,
|
|
598
|
+
resourceFlagValues,
|
|
599
|
+
recordedPlan,
|
|
600
|
+
testPlanLine,
|
|
601
|
+
testPlanText
|
|
425
602
|
};
|