@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,23 +1,29 @@
|
|
|
1
1
|
import { test as vitestTest } from "vitest";
|
|
2
2
|
import { readRunPayload } from "../../../sdk/index.js";
|
|
3
|
-
import {
|
|
4
|
-
import { featureFlagsKey, seeder, startContainer, startProxy, } from "../../../vendor/testserver-sdk/index.js";
|
|
3
|
+
import { featureFlagsKey, startContainer, startProxy, } from "../../../vendor/testserver-sdk/index.js";
|
|
5
4
|
import { CONTAINER_SCOPE, closeFile, FileContainer, provideContainer, warmNewContainer, } from "./container-scope.js";
|
|
6
5
|
import { containerStartReport, proxyFailureReport, proxyRequestReport, proxyTestserverFailure } from "./diagnostics.js";
|
|
7
|
-
import {
|
|
6
|
+
import { workerTestserverUrl } from "./worker-sandbox.js";
|
|
8
7
|
import { acquireOwned, Acquisitions, countTests, testEventReporter, testEventState } from "../../../vitest/index.js";
|
|
9
8
|
import { reportedStart } from "./container-start.js";
|
|
10
|
-
/**
|
|
11
|
-
* The Testserver URL of this worker's Testserver sandbox, `sandboxes[(VITEST_POOL_ID - 1) % N]` of the Testserver
|
|
12
|
-
* connection the run payload holds. Throws outside a storm run, and outside a vitest worker.
|
|
13
|
-
*/
|
|
14
|
-
function workerTestserverUrl() {
|
|
15
|
-
return sandboxForWorker(readRunPayload().get(testserverConnection), process.env["VITEST_POOL_ID"]);
|
|
16
|
-
}
|
|
17
9
|
/** The default `warmServices`: no service is warmed. */
|
|
18
10
|
const NO_SERVICES = [];
|
|
19
11
|
/** The default `featureFlags`: none. */
|
|
20
12
|
const NO_FEATURE_FLAGS = {};
|
|
13
|
+
/**
|
|
14
|
+
* `container`, the `container` fixture's value as another fixture reads it, or an error when there is none. Vitest
|
|
15
|
+
* before 5.0.4 never sets up again a test's fixture whose setup threw, and hands its dependents `undefined` in every
|
|
16
|
+
* later attempt (vitest-dev/vitest#11237). The library sets a container up again for one retry (`stormContainer`);
|
|
17
|
+
* when that fails too, a later attempt has none, and this says so in place of a `TypeError` from the first read of it.
|
|
18
|
+
*/
|
|
19
|
+
function startedContainer(container) {
|
|
20
|
+
if (container === undefined) {
|
|
21
|
+
throw new Error("storm: this attempt at the test has no container. Setting it up failed in each earlier attempt, whose errors " +
|
|
22
|
+
"say why. Vitest before 5.0.4 doesn't set a fixture up again after its setup throws " +
|
|
23
|
+
"(vitest-dev/vitest#11237), so the Testserver Vitest fixtures can set a container up again for one retry only.");
|
|
24
|
+
}
|
|
25
|
+
return container;
|
|
26
|
+
}
|
|
21
27
|
// The fixture chain, as vitest types it; published as `test` below, under its named type.
|
|
22
28
|
const fixtures = vitestTest
|
|
23
29
|
.extend("testserverUrl", { scope: "worker" }, () => workerTestserverUrl())
|
|
@@ -65,7 +71,9 @@ const fixtures = vitestTest
|
|
|
65
71
|
.extend("containerScope", CONTAINER_SCOPE)
|
|
66
72
|
.extend("warmServices", NO_SERVICES)
|
|
67
73
|
.extend("featureFlags", NO_FEATURE_FLAGS)
|
|
68
|
-
|
|
74
|
+
// How the test's container is set up, for the fixture that hands it `onCleanup` (`stormContainer`, or `container`
|
|
75
|
+
// in its place). Setting this up starts nothing and never throws.
|
|
76
|
+
.extend("stormContainerSetup", ({ containerScope, warmServices, featureFlags, stormFile, stormTestserverFailure, stormEvents, testserverUrl, verbose, task, signal, onTestFailed, }) => async (onCleanup) => {
|
|
69
77
|
// Starts a container labeled `name` with `featureFlags`, then warms `warmServices`, both the start's test's, in
|
|
70
78
|
// it, reporting both as one container start. Under a verbose run, each container start prints as it ends, for
|
|
71
79
|
// passing tests too, saying when it replaced the file's container and why.
|
|
@@ -103,8 +111,20 @@ const fixtures = vitestTest
|
|
|
103
111
|
task.meta.storm = { testserverUrl, testId: container.testId };
|
|
104
112
|
return container;
|
|
105
113
|
})
|
|
106
|
-
|
|
114
|
+
// The test's container, which `container` hands on. The two are apart for Vitest before 5.0.4, which never sets up
|
|
115
|
+
// again a test's fixture whose setup threw, and hands its dependents `undefined` in every later attempt
|
|
116
|
+
// (vitest-dev/vitest#11237). So a retry after this one threw finds it `undefined`, and `container`, whose setup
|
|
117
|
+
// Vitest has not run yet, sets the container up itself. That covers one retry: when `container` throws too, a
|
|
118
|
+
// later attempt has no container (`startedContainer`). Later Vitest sets this one up again for every attempt.
|
|
119
|
+
// Remove the split once storm's Vitest peer range (`package.json`) requires 5.0.4 or later: `container` becomes the
|
|
120
|
+
// one fixture again, and `stormContainerSetup`, `stormContainer` and `startedContainer` go.
|
|
121
|
+
.extend("stormContainer", ({ stormContainerSetup }, { onCleanup }) => stormContainerSetup(onCleanup))
|
|
122
|
+
.extend("container", ({ stormContainer, stormContainerSetup }, { onCleanup }) => {
|
|
123
|
+
const provided = stormContainer;
|
|
124
|
+
return provided ?? stormContainerSetup(onCleanup);
|
|
125
|
+
})
|
|
107
126
|
.extend("proxy", async ({ container, stormFile, stormTestserverFailure, verbose, signal, onTestFailed, onTestFinished }, { onCleanup }) => {
|
|
127
|
+
startedContainer(container);
|
|
108
128
|
// Under a verbose run, each request prints as the proxy records it, for passing tests too.
|
|
109
129
|
const onRequest = verbose
|
|
110
130
|
? (record) => console.error(proxyRequestReport(container.testId, record, (text) => container.redact(text)))
|
|
@@ -144,15 +164,16 @@ const fixtures = vitestTest
|
|
|
144
164
|
* the file's start and finish, each attempt at a test, its start and how it ended, and each container start and how
|
|
145
165
|
* long it took. A retried test reports each attempt; its final result comes from `stormReporter`
|
|
146
166
|
* (`@vercel/storm/vitest/config`), in vitest's main process. `stormEvents`, `stormFileEvents` and
|
|
147
|
-
* `stormTestEvents` are the
|
|
167
|
+
* `stormTestEvents` are the library's own, which tests don't use.
|
|
148
168
|
*
|
|
149
169
|
* - `verbose` (per worker): whether the run is verbose, under a run's `--verbose`, from the run payload. Then
|
|
150
170
|
* `container` prints each container start and `proxy` each request as it is recorded, for passing tests too, and
|
|
151
|
-
* a test's own fixture can print what it does, as the Vercel CLI
|
|
152
|
-
* - `testserverUrl` (per worker): this worker's Testserver sandbox, `sandboxes[
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
171
|
+
* a test's own fixture can print what it does, as the Vercel CLI invoker's invocations.
|
|
172
|
+
* - `testserverUrl` (per worker): this worker's Testserver sandbox, `sandboxes[workerIndex % N]` from the Testserver
|
|
173
|
+
* connection the run payload holds (`readRunPayload().get(testserverConnection)`), by the worker's worker index,
|
|
174
|
+
* its `VITEST_POOL_ID` less one (`workerTestserverUrl`, `worker-sandbox.ts`). Outside a storm run, or with a
|
|
175
|
+
* `VITEST_POOL_ID` that isn't a positive integer, it throws, so the test fails rather than skips.
|
|
176
|
+
* - `stormFile` (per file): the library's own state for the file, which tests don't use: its `container`, the
|
|
156
177
|
* holder of the file's container, and its `acquisitions`, the container and proxy starts still in flight. Creating
|
|
157
178
|
* it starts nothing. When the file finishes, it ends the file's container once any start in flight settles, and
|
|
158
179
|
* waits for every other start, so the file's worker can't exit while one is still starting.
|
|
@@ -174,7 +195,8 @@ const fixtures = vitestTest
|
|
|
174
195
|
* A concurrent test fails instead. In `'test'` scope, a container started for the test, labeled with the test's
|
|
175
196
|
* name, and ended after it. The test's `task.meta.storm` records the Testserver URL and, once the test has the
|
|
176
197
|
* container, its test id.
|
|
177
|
-
*
|
|
198
|
+
* A retry of a test whose container failed to start starts one again, once: Vitest before 5.0.4 sets no fixture up
|
|
199
|
+
* again after its setup throws, so in a later attempt `proxy` fails, saying the attempt has no container.
|
|
178
200
|
* - `proxy`: a proxy adding `container`'s test id, per test, closed after it. Once closed, its cleanup fails the
|
|
179
201
|
* test when a fault rule forwarded a request and Testserver failed (`fault.upstream.error`), or Testserver refused a
|
|
180
202
|
* request because it had stopped the container; a rule with hits left doesn't.
|
|
@@ -189,7 +211,7 @@ const fixtures = vitestTest
|
|
|
189
211
|
* prints the requests it received, each a fault rule matched tagged with the fault, then each fault rule with hits
|
|
190
212
|
* left. Tokens are redacted throughout.
|
|
191
213
|
*/
|
|
192
|
-
// The chain also holds the
|
|
193
|
-
// `
|
|
194
|
-
// `
|
|
214
|
+
// The chain also holds the library's own fixtures (`stormEvents`, `stormFileEvents`, `stormTestEvents`, `stormFile`,
|
|
215
|
+
// `stormTestserverFailure`, `stormContainerSetup`, `stormContainer`), which exist at run time but aren't published,
|
|
216
|
+
// so vitest's types can't see the chain as a `TestserverTest`; the cast drops them from the type.
|
|
195
217
|
export const test = fixtures;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { CONTAINER_SCOPE, type ContainerScope } from "./container-scope.ts";
|
|
2
2
|
export { test } from "./fixtures.ts";
|
|
3
|
-
export type {
|
|
3
|
+
export type { TestserverScopeMap, TestserverTest, TestserverTestContext, TestserverTestFixtureSet, TestserverWorkerFixtureSet, } from "./types.ts";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
// The Testserver fixtures
|
|
2
|
-
//
|
|
3
|
-
// `containerScope` is `'test'`),
|
|
1
|
+
// The Testserver Vitest fixtures, a support library exported as `@vercel/storm/testserver/vitest`: vitest's `test`
|
|
2
|
+
// extended with fixtures for the worker's Testserver sandbox, a container (shared by a test file's tests unless
|
|
3
|
+
// `containerScope` is `'test'`), and its proxy. A `vitest.config.ts` can't import it, since extending
|
|
4
4
|
// vitest's `test` throws there; `testserverWorkers` is in `./config.ts` (`@vercel/storm/testserver/vitest/config`) for
|
|
5
5
|
// that reason, and isn't re-exported here. It imports storm only through the run API (`src/sdk/index.ts`) and storm's
|
|
6
|
-
//
|
|
6
|
+
// Vitest library's entry (`src/vitest/index.ts`), with the Testserver extension's `run/` directory and the Testserver
|
|
7
7
|
// SDK. Besides those, it depends only on Node builtins and `vitest`, an optional peer dependency of `@vercel/storm`;
|
|
8
8
|
// `.oxlintrc.json` checks the boundary.
|
|
9
9
|
export { CONTAINER_SCOPE } from "./container-scope.js";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { TestAPI } from "vitest";
|
|
2
|
-
import type { Container, ContainerProxy, FeatureFlags,
|
|
2
|
+
import type { Container, ContainerProxy, FeatureFlags, TestserverServiceId } from "../../../vendor/testserver-sdk/index.js";
|
|
3
3
|
import type { ContainerScope } from "./container-scope.ts";
|
|
4
|
-
/** The
|
|
5
|
-
export interface
|
|
4
|
+
/** The library's fixtures set up once per worker. */
|
|
5
|
+
export interface TestserverWorkerFixtureSet {
|
|
6
6
|
/** This worker's Testserver sandbox, `sandboxes[(VITEST_POOL_ID - 1) % N]` of the run payload's Testserver pool. */
|
|
7
7
|
testserverUrl: string;
|
|
8
8
|
/** Whether the run is verbose (its `--verbose`). */
|
|
9
9
|
verbose: boolean;
|
|
10
10
|
}
|
|
11
|
-
/** The
|
|
12
|
-
export interface
|
|
11
|
+
/** The library's fixtures set up for each test. */
|
|
12
|
+
export interface TestserverTestFixtureSet {
|
|
13
13
|
/** How long `container` lives: `'file'` (the default) or `'test'`, set with `test.override`. */
|
|
14
14
|
containerScope: ContainerScope;
|
|
15
15
|
/**
|
|
@@ -27,42 +27,40 @@ export interface StormTestFixtures {
|
|
|
27
27
|
featureFlags: FeatureFlags;
|
|
28
28
|
/** The file's container in `'file'` scope, or the test's own in `'test'` scope. */
|
|
29
29
|
container: Container;
|
|
30
|
-
/** A `Seeder` over `container`. */
|
|
31
|
-
seed: Seeder;
|
|
32
30
|
/** A proxy adding `container`'s test id, closed after the test. */
|
|
33
31
|
proxy: ContainerProxy;
|
|
34
32
|
}
|
|
35
33
|
/**
|
|
36
|
-
* The fixtures a test of the
|
|
34
|
+
* The fixtures a test of the library's `test` can ask for. The library's own fixtures for its state and test events
|
|
37
35
|
* exist at run time too, but aren't named here: tests don't use them.
|
|
38
36
|
*/
|
|
39
|
-
export interface
|
|
37
|
+
export interface TestserverTestContext extends TestserverWorkerFixtureSet, TestserverTestFixtureSet {
|
|
40
38
|
}
|
|
41
39
|
/**
|
|
42
40
|
* A suite's own fixtures by scope, keyed as in vitest's object-form `test.extend<{ $worker?, $file?, $test? }>`.
|
|
43
41
|
*/
|
|
44
|
-
export interface
|
|
42
|
+
export interface TestserverScopeMap {
|
|
45
43
|
$worker?: object;
|
|
46
44
|
$file?: object;
|
|
47
45
|
$test?: object;
|
|
48
46
|
}
|
|
49
47
|
/** The fixtures `F` names for scope `K`, or `object` when it names none. */
|
|
50
|
-
type ScopeOf<F extends
|
|
48
|
+
type ScopeOf<F extends TestserverScopeMap, K extends keyof TestserverScopeMap> = K extends keyof F ? [Exclude<F[K], undefined>] extends [never] ? object : Exclude<F[K], undefined> : object;
|
|
51
49
|
/**
|
|
52
|
-
* The type of the
|
|
50
|
+
* The type of the library's `test`, or of a suite's `test` that extends it with its own fixtures, by scope:
|
|
53
51
|
*
|
|
54
52
|
* ```ts
|
|
55
|
-
* export const test:
|
|
53
|
+
* export const test: TestserverTest<{ $test: { vercel: VercelCli } }> = storm.extend("vercel", ...);
|
|
56
54
|
* ```
|
|
57
55
|
*
|
|
58
56
|
* `$__worker`, `$__file` and `$__test` are the markers vitest's builder `extend` reads to tell a later fixture which
|
|
59
57
|
* fixtures its scope can see. vitest doesn't export the types that write them, so this is the one place storm
|
|
60
|
-
* names them; `test/unit/vitest/test-types.test.ts` pins them, so a vitest release that changes
|
|
61
|
-
* storm's checks rather than a suite's.
|
|
58
|
+
* names them; `test/unit/extensions/testserver/vitest/test-types.test.ts` pins them, so a vitest release that changes
|
|
59
|
+
* them fails storm's checks rather than a suite's.
|
|
62
60
|
*/
|
|
63
|
-
export type
|
|
64
|
-
readonly $__worker?:
|
|
61
|
+
export type TestserverTest<F extends TestserverScopeMap = TestserverScopeMap> = TestAPI<TestserverTestContext & ScopeOf<F, "$worker"> & ScopeOf<F, "$file"> & ScopeOf<F, "$test"> & {
|
|
62
|
+
readonly $__worker?: TestserverWorkerFixtureSet & ScopeOf<F, "$worker">;
|
|
65
63
|
readonly $__file?: ScopeOf<F, "$file">;
|
|
66
|
-
readonly $__test?:
|
|
64
|
+
readonly $__test?: TestserverTestFixtureSet & ScopeOf<F, "$test">;
|
|
67
65
|
}>;
|
|
68
66
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// The published types of the Vitest
|
|
2
|
-
// suite's `test` that extends it. Types only; it imports nothing from `./fixtures.ts`, so a module that names a
|
|
1
|
+
// The published types of the Testserver Vitest fixtures' `test`: the fixtures it names and `TestserverTest`, the type
|
|
2
|
+
// of a suite's `test` that extends it. Types only; it imports nothing from `./fixtures.ts`, so a module that names a
|
|
3
3
|
// fixture type doesn't extend vitest's `test`.
|
|
4
4
|
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Testserver URL of this Vitest worker's Testserver sandbox: `sandboxes[workerIndex % N]` of the Testserver
|
|
3
|
+
* connection the run payload in `env` holds, the worker index being the worker's `VITEST_POOL_ID` less one, so pool
|
|
4
|
+
* id 1 uses the first Testserver sandbox. Throws a `RunPayloadError` outside a storm run, and an `Error` outside a
|
|
5
|
+
* Vitest worker, where the pool id is missing or not a positive integer, or when the run has no Testserver sandbox
|
|
6
|
+
* (`NO_TESTSERVER_MESSAGE`). It never falls back to the first Testserver sandbox.
|
|
7
|
+
*/
|
|
8
|
+
export declare function workerTestserverUrl(env?: Readonly<Record<string, string | undefined>>): string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Which of the run's Testserver sandboxes a Vitest worker uses. The worker's index is storm's Vitest
|
|
2
|
+
// library's (`workerIndex`, `src/vitest/index.ts`), and the arithmetic the extension's `run/` directory's
|
|
3
|
+
// (`../run/sandbox.ts`), which the Testserver Playwright helpers spread their workers with too. No vitest import.
|
|
4
|
+
import { readRunPayload } from "../../../sdk/index.js";
|
|
5
|
+
import { workerIndex } from "../../../vitest/index.js";
|
|
6
|
+
import { testserverConnection } from "../run/connection.js";
|
|
7
|
+
import { sandboxAt } from "../run/sandbox.js";
|
|
8
|
+
/**
|
|
9
|
+
* The Testserver URL of this Vitest worker's Testserver sandbox: `sandboxes[workerIndex % N]` of the Testserver
|
|
10
|
+
* connection the run payload in `env` holds, the worker index being the worker's `VITEST_POOL_ID` less one, so pool
|
|
11
|
+
* id 1 uses the first Testserver sandbox. Throws a `RunPayloadError` outside a storm run, and an `Error` outside a
|
|
12
|
+
* Vitest worker, where the pool id is missing or not a positive integer, or when the run has no Testserver sandbox
|
|
13
|
+
* (`NO_TESTSERVER_MESSAGE`). It never falls back to the first Testserver sandbox.
|
|
14
|
+
*/
|
|
15
|
+
export function workerTestserverUrl(env = process.env) {
|
|
16
|
+
return sandboxAt(readRunPayload(env).get(testserverConnection), workerIndex(env));
|
|
17
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { VitestListGateway } from "./plan/gateways.ts";
|
|
2
|
+
/**
|
|
3
|
+
* The Vitest driver's Context: what its plan step reaches vitest on this machine through, to count the tests.
|
|
4
|
+
*/
|
|
5
|
+
export interface VitestDriverContext {
|
|
6
|
+
readonly list: VitestListGateway;
|
|
7
|
+
}
|
|
8
|
+
export declare const vitestDriver: import("../../sdk/extension/driver.ts").Driver<"vitest", VitestDriverContext>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// storm's Vitest driver: what the launcher knows of vitest, the program `storm vitest`'s command starts. It names the
|
|
2
|
+
// binary, builds the `vitest run` argv, counts the tests with `vitest list` over its Context (`plan/`), and holds
|
|
3
|
+
// the words that name vitest: `storm vitest`'s leaf help, what its run's summary says to do next, and what its two
|
|
4
|
+
// refusals say. The launcher makes `storm vitest` from it (`defineRunCommand`), reaching it through the registry
|
|
5
|
+
// (`src/extensions.ts`).
|
|
6
|
+
import { argsText, defineDriver } from "../../sdk/extension/index.js";
|
|
7
|
+
import { liveVitestListGateway } from "./plan/live/list-gateway.js";
|
|
8
|
+
import { describeVitestListFailure, vitestRunArgv } from "./plan/plan.js";
|
|
9
|
+
import { planVitestRunOver } from "./plan/plan-over.js";
|
|
10
|
+
export const vitestDriver = defineDriver({
|
|
11
|
+
name: "vitest",
|
|
12
|
+
program: { bin: "vitest" },
|
|
13
|
+
context: () => ({ list: liveVitestListGateway }),
|
|
14
|
+
launch: vitestRunArgv,
|
|
15
|
+
// `vitest list --json <args>`, which may take 60s (`LIST_TIMEOUT_MS`); a failure in `describeVitestListFailure`'s
|
|
16
|
+
// words.
|
|
17
|
+
plan: ({ list }) => async ({ args, cwd, bin, signal }) => {
|
|
18
|
+
const planned = await planVitestRunOver({ args, cwd, executable: bin, signal }, list);
|
|
19
|
+
if (planned.ok)
|
|
20
|
+
return planned;
|
|
21
|
+
const { failure } = planned;
|
|
22
|
+
return { ok: false, kind: failure.kind, message: describeVitestListFailure(failure) };
|
|
23
|
+
},
|
|
24
|
+
help: {
|
|
25
|
+
usage: "[<vitest run args>...] [-- <vitest dash options>...]",
|
|
26
|
+
args: "What vitest run gets, unchanged and in order: every argument that isn't one of storm's flags, such as file filters, then everything after --, such as -t or --project. vitest list --json gets the same arguments when it counts the tests.",
|
|
27
|
+
// What a Vitest project's storm code does with the run payload's `verbose`: `stormReporters()` picks vitest's
|
|
28
|
+
// `verbose` reporter (`@vercel/storm/vitest/config`), and an extension's Vitest fixtures print as each test
|
|
29
|
+
// goes.
|
|
30
|
+
verbose: "which has storm's Vitest reporters print each test as it finishes and an extension's Vitest fixtures print each setup phase, proxied request, and vercel invocation, for passing tests too",
|
|
31
|
+
examples: [
|
|
32
|
+
{
|
|
33
|
+
argv: "",
|
|
34
|
+
description: "Run every test in a runner sandbox, with the runner recipe, team, project and resources from storm.config.ts, each resource that sizes itself sized from the test count.",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
argv: "test/api -- -t creates",
|
|
38
|
+
description: "Run the tests named creates in the files under test/api.",
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
hints: {
|
|
43
|
+
// No final result: the Vitest config lacks `stormReporter`, or a `--reporter` on vitest's command line replaced it.
|
|
44
|
+
noFinalResults: "add stormReporter() to vitest.config's reporters (@vercel/storm/vitest/config)",
|
|
45
|
+
},
|
|
46
|
+
refusals: {
|
|
47
|
+
noMatchingTests: {
|
|
48
|
+
description: "vitest list found no test for the arguments given to vitest run, so nothing was minted, acquired or started.",
|
|
49
|
+
message: ({ args, cwd }) => `vitest list found no test for vitest run ${argsText(args)} in ${cwd}. The command didn't run.`,
|
|
50
|
+
next: ({ args }) => `Change the arguments given to vitest run (${argsText(args)}), then retry. Put vitest's own dash options after --.`,
|
|
51
|
+
},
|
|
52
|
+
planFailed: {
|
|
53
|
+
description: "storm couldn't count the tests before the run: vitest wasn't found or failed to start, didn't finish within 60s, exited other than 0, or printed something other than a list of tests. Nothing was minted, acquired or started.",
|
|
54
|
+
next: {
|
|
55
|
+
"start-failed": "Install vitest in the package, or run the command with storm exec, which counts nothing.",
|
|
56
|
+
"timed-out": "Check why vitest list doesn't finish, such as a global setup that waits, then retry.",
|
|
57
|
+
exited: "Fix what vitest list reports, then retry. vitest list takes the arguments vitest run does, but refuses some run-only options.",
|
|
58
|
+
"unreadable-output": "Check that the package's vitest prints its list with --json, then retry.",
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/** The Vitest extension. Its one driver is storm's Vitest driver. */
|
|
2
|
+
export declare const vitestExtension: import("../../sdk/extension/commands.ts").Extension<"vitest", readonly [], unknown, readonly [import("../../sdk/extension/driver.ts").Driver<"vitest", import("./driver.ts").VitestDriverContext>]>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// The Vitest extension: storm's Vitest driver (`driver.ts`), which it lists for the registry (`src/extensions.ts`). It
|
|
2
|
+
// brings no resource and no commands of its own: the launcher makes `storm vitest` from the driver. The one value the
|
|
3
|
+
// folder hands the registry. What test code uses with Vitest is the test runner library (`src/vitest/`), which knows
|
|
4
|
+
// nothing of this extension.
|
|
5
|
+
import { defineExtension } from "../../sdk/extension/commands.js";
|
|
6
|
+
import { vitestDriver } from "./driver.js";
|
|
7
|
+
/** The Vitest extension. Its one driver is storm's Vitest driver. */
|
|
8
|
+
export const vitestExtension = defineExtension({ name: "vitest", resources: [], drivers: [vitestDriver] });
|
|
@@ -11,34 +11,13 @@ export interface VitestListRequest {
|
|
|
11
11
|
readonly args: readonly string[];
|
|
12
12
|
/** Where vitest runs; default the current directory. */
|
|
13
13
|
readonly cwd?: string;
|
|
14
|
-
/** The `vitest` to start, such as the absolute path `
|
|
14
|
+
/** The `vitest` to start, such as the absolute path of a `node_modules/.bin/vitest`; default `vitest` from `PATH`. */
|
|
15
15
|
readonly executable?: string;
|
|
16
16
|
/** How long the listing may take before it is killed. */
|
|
17
17
|
readonly timeoutMs: number;
|
|
18
18
|
/** Stops the listing when it aborts, before it starts or while it runs: the listing is `canceled`. */
|
|
19
19
|
readonly signal?: AbortSignal;
|
|
20
20
|
}
|
|
21
|
-
/** Where to look for `vitest`: in `node_modules/.bin` of `from` and of each directory above it, up to `root`. */
|
|
22
|
-
export interface FindVitestRequest {
|
|
23
|
-
/** The directory vitest runs in, an absolute path. */
|
|
24
|
-
readonly from: string;
|
|
25
|
-
/**
|
|
26
|
-
* The last directory to look in, an absolute path: the repository's root, or the filesystem's root outside a
|
|
27
|
-
* repository. When `from` isn't inside it, the search goes on up to the filesystem's root.
|
|
28
|
-
*/
|
|
29
|
-
readonly root: string;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* The `vitest` found nearest `from`, as an absolute path to its `node_modules/.bin/vitest`; or, when no directory has
|
|
33
|
-
* one, every directory looked in, nearest first (`vitestSearchDirectories`).
|
|
34
|
-
*/
|
|
35
|
-
export type FindVitestResult = {
|
|
36
|
-
readonly ok: true;
|
|
37
|
-
readonly path: string;
|
|
38
|
-
} | {
|
|
39
|
-
readonly ok: false;
|
|
40
|
-
readonly searched: readonly string[];
|
|
41
|
-
};
|
|
42
21
|
/**
|
|
43
22
|
* Why the tests couldn't be listed: `vitest` couldn't be started (not on `PATH` or not found, or no such `cwd`), it
|
|
44
23
|
* didn't finish within `timeoutMs`, it exited other than 0 (with the last line of its stderr that isn't blank or a
|
|
@@ -71,8 +50,4 @@ export type VitestListResult = {
|
|
|
71
50
|
export interface VitestListGateway {
|
|
72
51
|
/** Lists the tests a `vitest run` with the same arguments would run, without running them. */
|
|
73
52
|
listTests(request: VitestListRequest): Promise<VitestListResult>;
|
|
74
|
-
/**
|
|
75
|
-
* Finds the `vitest` a package's scripts would run: the nearest `node_modules/.bin/vitest` from `from` up to `root`.
|
|
76
|
-
*/
|
|
77
|
-
findVitest(request: FindVitestRequest): Promise<FindVitestResult>;
|
|
78
53
|
}
|
|
@@ -5,7 +5,6 @@ import type { VitestListGateway } from "../gateways.ts";
|
|
|
5
5
|
* (`AbortSignal.timeout`), or once the request's `signal` aborts, then waits for the process to exit and answers
|
|
6
6
|
* `timed-out` or `canceled`, `canceled` when the request's `signal` aborted. It waits for the exit, not for the pipes
|
|
7
7
|
* to close, since a process `vitest` left behind could hold them open. Any other `error` is a start failure, answered
|
|
8
|
-
* at once, since no process started.
|
|
9
|
-
* execute, in `vitestSearchDirectories` order.
|
|
8
|
+
* at once, since no process started.
|
|
10
9
|
*/
|
|
11
10
|
export declare const liveVitestListGateway: VitestListGateway;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import { spawn } from "node:child_process";
|
|
2
|
-
import { constants } from "node:fs";
|
|
3
|
-
import { access } from "node:fs/promises";
|
|
4
|
-
import { join } from "node:path";
|
|
5
|
-
import { VITEST_BIN, vitestSearchDirectories } from "../find-vitest.js";
|
|
6
2
|
import { readVitestList } from "../list-output.js";
|
|
7
3
|
/**
|
|
8
4
|
* The live list gateway. `listTests` spawns `vitest list <args> --json` (`listArgv`), the request's `executable` or
|
|
@@ -10,24 +6,9 @@ import { readVitestList } from "../list-output.js";
|
|
|
10
6
|
* (`AbortSignal.timeout`), or once the request's `signal` aborts, then waits for the process to exit and answers
|
|
11
7
|
* `timed-out` or `canceled`, `canceled` when the request's `signal` aborted. It waits for the exit, not for the pipes
|
|
12
8
|
* to close, since a process `vitest` left behind could hold them open. Any other `error` is a start failure, answered
|
|
13
|
-
* at once, since no process started.
|
|
14
|
-
* execute, in `vitestSearchDirectories` order.
|
|
9
|
+
* at once, since no process started.
|
|
15
10
|
*/
|
|
16
11
|
export const liveVitestListGateway = {
|
|
17
|
-
async findVitest({ from, root }) {
|
|
18
|
-
const searched = vitestSearchDirectories(from, root);
|
|
19
|
-
for (const directory of searched) {
|
|
20
|
-
const path = join(directory, VITEST_BIN);
|
|
21
|
-
try {
|
|
22
|
-
await access(path, constants.X_OK);
|
|
23
|
-
return { ok: true, path };
|
|
24
|
-
}
|
|
25
|
-
catch {
|
|
26
|
-
// Not there, or not executable: look further up.
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return { ok: false, searched };
|
|
30
|
-
},
|
|
31
12
|
listTests(request) {
|
|
32
13
|
return new Promise((resolve) => {
|
|
33
14
|
let settled = false;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ListedTest, VitestListFailure, VitestListGateway } from "./gateways.ts";
|
|
2
|
+
/** How long `vitest list` may run by default. */
|
|
3
|
+
export declare const LIST_TIMEOUT_MS = 60000;
|
|
4
|
+
/** How many tests a Vitest run would run, and in how many files. */
|
|
5
|
+
export interface TestPlan {
|
|
6
|
+
readonly tests: number;
|
|
7
|
+
readonly files: number;
|
|
8
|
+
}
|
|
9
|
+
export interface ListVitestTestsOptions {
|
|
10
|
+
/** Passed to `vitest list --json`, as `vitest run` takes them, such as `["--project", "e2e"]`. */
|
|
11
|
+
readonly args: readonly string[];
|
|
12
|
+
/** Where vitest runs; default the current directory. */
|
|
13
|
+
readonly cwd?: string;
|
|
14
|
+
/** The `vitest` to start, such as the path of a `node_modules/.bin/vitest`; default `vitest` from `PATH`. */
|
|
15
|
+
readonly executable?: string;
|
|
16
|
+
/** How long `vitest list` may take; default `LIST_TIMEOUT_MS`, 60s. */
|
|
17
|
+
readonly timeoutMs?: number;
|
|
18
|
+
/** Stops `vitest list` when it aborts: the plan's failure is then `canceled`. */
|
|
19
|
+
readonly signal?: AbortSignal;
|
|
20
|
+
}
|
|
21
|
+
/** A Vitest run's test plan, or why its tests couldn't be listed. */
|
|
22
|
+
export type VitestPlanResult = {
|
|
23
|
+
readonly ok: true;
|
|
24
|
+
readonly plan: TestPlan;
|
|
25
|
+
} | {
|
|
26
|
+
readonly ok: false;
|
|
27
|
+
readonly failure: VitestListFailure;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Lists the tests `vitest run <args>` would run over `gateway`, with `vitest list <args> --json` (`executable`, else
|
|
31
|
+
* `vitest` from `PATH`), and counts them; or says why it couldn't: `vitest` failed to start, didn't finish within
|
|
32
|
+
* `timeoutMs`, exited other than 0 (with the last line of its stderr that isn't a stack frame), printed something other
|
|
33
|
+
* than a list of tests, or was stopped by `signal` (`canceled`). Throws a `TypeError` unless `timeoutMs` is a positive
|
|
34
|
+
* number.
|
|
35
|
+
*/
|
|
36
|
+
export declare function planVitestRunOver(options: ListVitestTestsOptions, gateway: VitestListGateway): Promise<VitestPlanResult>;
|
|
37
|
+
/** The plan of the tests listed: how many, and in how many distinct files. */
|
|
38
|
+
export declare function planOf(tests: readonly ListedTest[]): TestPlan;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Planning a Vitest run over a given list gateway: counting the tests `vitest run <args>` would run. storm's Vitest
|
|
2
|
+
// driver (`../driver.ts`) plans with it over its Context's gateway, and tests plan with it over the fake. The published
|
|
3
|
+
// `plan.ts` plans with it over the live gateway, and this file is not a published export, so a consumer of
|
|
4
|
+
// `@vercel/storm/vitest/plan` sees no gateway. It imports no vitest and nothing of storm outside this folder.
|
|
5
|
+
/** How long `vitest list` may run by default. */
|
|
6
|
+
export const LIST_TIMEOUT_MS = 60_000;
|
|
7
|
+
/**
|
|
8
|
+
* Lists the tests `vitest run <args>` would run over `gateway`, with `vitest list <args> --json` (`executable`, else
|
|
9
|
+
* `vitest` from `PATH`), and counts them; or says why it couldn't: `vitest` failed to start, didn't finish within
|
|
10
|
+
* `timeoutMs`, exited other than 0 (with the last line of its stderr that isn't a stack frame), printed something other
|
|
11
|
+
* than a list of tests, or was stopped by `signal` (`canceled`). Throws a `TypeError` unless `timeoutMs` is a positive
|
|
12
|
+
* number.
|
|
13
|
+
*/
|
|
14
|
+
export async function planVitestRunOver(options, gateway) {
|
|
15
|
+
const timeoutMs = options.timeoutMs ?? LIST_TIMEOUT_MS;
|
|
16
|
+
if (!Number.isFinite(timeoutMs) || timeoutMs <= 0) {
|
|
17
|
+
throw new TypeError(`planVitestRun: timeoutMs is ${String(timeoutMs)}, not a positive number`);
|
|
18
|
+
}
|
|
19
|
+
const listed = await gateway.listTests({
|
|
20
|
+
args: options.args,
|
|
21
|
+
...(options.cwd === undefined ? {} : { cwd: options.cwd }),
|
|
22
|
+
...(options.executable === undefined ? {} : { executable: options.executable }),
|
|
23
|
+
timeoutMs,
|
|
24
|
+
...(options.signal === undefined ? {} : { signal: options.signal }),
|
|
25
|
+
});
|
|
26
|
+
return listed.ok ? { ok: true, plan: planOf(listed.tests) } : { ok: false, failure: listed.failure };
|
|
27
|
+
}
|
|
28
|
+
/** The plan of the tests listed: how many, and in how many distinct files. */
|
|
29
|
+
export function planOf(tests) {
|
|
30
|
+
return { tests: tests.length, files: new Set(tests.map((test) => test.file)).size };
|
|
31
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { VitestListFailure } from "./gateways.ts";
|
|
2
|
+
import { type ListVitestTestsOptions, type TestPlan, type VitestPlanResult } from "./plan-over.ts";
|
|
3
|
+
export type { ListedTest, VitestListFailure } from "./gateways.ts";
|
|
4
|
+
export { LIST_TIMEOUT_MS, type ListVitestTestsOptions, type TestPlan, type VitestPlanResult } from "./plan-over.ts";
|
|
5
|
+
/**
|
|
6
|
+
* Lists the tests `vitest run <args>` would run, with `vitest list <args> --json` (`executable`, else `vitest` from
|
|
7
|
+
* `PATH`), and counts them; or says why it couldn't: `vitest` failed to start, didn't finish within `timeoutMs`, exited
|
|
8
|
+
* other than 0 (with the last line of its stderr that isn't a stack frame), printed something other than a list of
|
|
9
|
+
* tests, or was stopped by `signal` (`canceled`). Throws a `TypeError` unless `timeoutMs` is a positive number.
|
|
10
|
+
*/
|
|
11
|
+
export declare function planVitestRun(options: ListVitestTestsOptions): Promise<VitestPlanResult>;
|
|
12
|
+
/**
|
|
13
|
+
* `planVitestRun`'s plan, rejecting with an `Error` that says why the tests couldn't be listed
|
|
14
|
+
* (`describeVitestListFailure`).
|
|
15
|
+
*/
|
|
16
|
+
export declare function listVitestTests(options: ListVitestTestsOptions): Promise<TestPlan>;
|
|
17
|
+
/** The argv that runs `args` with `executable`, a `vitest`: `<executable> run <args...>`. */
|
|
18
|
+
export declare function vitestRunArgv(executable: string, args: readonly string[]): readonly string[];
|
|
19
|
+
/** The plan `vitest list --json` printed: its tests, and their distinct files. Throws when it isn't a list of tests. */
|
|
20
|
+
export declare function parseVitestList(stdout: string): TestPlan;
|
|
21
|
+
/** A plan as a phrase, such as `65 tests in 19 files` or `1 test in 1 file`. */
|
|
22
|
+
export declare function formatPlan(plan: TestPlan): string;
|
|
23
|
+
/** Why the tests couldn't be listed, as a sentence. */
|
|
24
|
+
export declare function describeVitestListFailure(failure: VitestListFailure): string;
|
|
@@ -1,39 +1,27 @@
|
|
|
1
|
-
// Planning a Vitest run before anything is acquired or started, exported as `@vercel/storm/vitest/plan`:
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
1
|
+
// Planning a Vitest run before anything is acquired or started, exported as `@vercel/storm/vitest/plan`: counting the
|
|
2
|
+
// tests `vitest run <args>` would run, and the `vitest run` argv. A launcher script that counts the tests itself plans
|
|
3
|
+
// with it. storm's Vitest driver (`../driver.ts`) plans over its own Context instead, with `plan-over.ts`, which this
|
|
4
|
+
// file plans with over the live list gateway. It imports no vitest and nothing of storm outside this folder: the
|
|
5
|
+
// launcher and a launcher script run outside a Vitest run.
|
|
5
6
|
import { readVitestList } from "./list-output.js";
|
|
6
7
|
import { liveVitestListGateway } from "./live/list-gateway.js";
|
|
7
|
-
|
|
8
|
-
export {
|
|
9
|
-
/** How long `listVitestTests` lets `vitest list` run by default. */
|
|
10
|
-
export const LIST_TIMEOUT_MS = 60_000;
|
|
8
|
+
import { planOf, planVitestRunOver, } from "./plan-over.js";
|
|
9
|
+
export { LIST_TIMEOUT_MS } from "./plan-over.js";
|
|
11
10
|
/**
|
|
12
11
|
* Lists the tests `vitest run <args>` would run, with `vitest list <args> --json` (`executable`, else `vitest` from
|
|
13
12
|
* `PATH`), and counts them; or says why it couldn't: `vitest` failed to start, didn't finish within `timeoutMs`, exited
|
|
14
13
|
* other than 0 (with the last line of its stderr that isn't a stack frame), printed something other than a list of
|
|
15
14
|
* tests, or was stopped by `signal` (`canceled`). Throws a `TypeError` unless `timeoutMs` is a positive number.
|
|
16
15
|
*/
|
|
17
|
-
export async function planVitestRun(options
|
|
18
|
-
|
|
19
|
-
if (!Number.isFinite(timeoutMs) || timeoutMs <= 0) {
|
|
20
|
-
throw new TypeError(`planVitestRun: timeoutMs is ${String(timeoutMs)}, not a positive number`);
|
|
21
|
-
}
|
|
22
|
-
const listed = await gateway.listTests({
|
|
23
|
-
args: options.args,
|
|
24
|
-
...(options.cwd === undefined ? {} : { cwd: options.cwd }),
|
|
25
|
-
...(options.executable === undefined ? {} : { executable: options.executable }),
|
|
26
|
-
timeoutMs,
|
|
27
|
-
...(options.signal === undefined ? {} : { signal: options.signal }),
|
|
28
|
-
});
|
|
29
|
-
return listed.ok ? { ok: true, plan: planOf(listed.tests) } : { ok: false, failure: listed.failure };
|
|
16
|
+
export async function planVitestRun(options) {
|
|
17
|
+
return await planVitestRunOver(options, liveVitestListGateway);
|
|
30
18
|
}
|
|
31
19
|
/**
|
|
32
20
|
* `planVitestRun`'s plan, rejecting with an `Error` that says why the tests couldn't be listed
|
|
33
21
|
* (`describeVitestListFailure`).
|
|
34
22
|
*/
|
|
35
|
-
export async function listVitestTests(options
|
|
36
|
-
const planned = await planVitestRun(options
|
|
23
|
+
export async function listVitestTests(options) {
|
|
24
|
+
const planned = await planVitestRun(options);
|
|
37
25
|
if (!planned.ok)
|
|
38
26
|
throw new Error(describeVitestListFailure(planned.failure));
|
|
39
27
|
return planned.plan;
|
|
@@ -50,9 +38,6 @@ export function parseVitestList(stdout) {
|
|
|
50
38
|
export function formatPlan(plan) {
|
|
51
39
|
return `${plan.tests} ${plan.tests === 1 ? "test" : "tests"} in ${plan.files} ${plan.files === 1 ? "file" : "files"}`;
|
|
52
40
|
}
|
|
53
|
-
function planOf(tests) {
|
|
54
|
-
return { tests: tests.length, files: new Set(tests.map((test) => test.file)).size };
|
|
55
|
-
}
|
|
56
41
|
/** Why the tests couldn't be listed, as a sentence. */
|
|
57
42
|
export function describeVitestListFailure(failure) {
|
|
58
43
|
switch (failure.kind) {
|