@cnc-tools/storm 0.14.1 → 0.15.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/application.js +3 -1
- package/dist/bin/storm.js +18 -8
- package/dist/build-info.js +1 -1
- package/dist/chunks/chunk-4U4DZ7VG.js +40 -0
- package/dist/chunks/{chunk-GSC6SRTW.js → chunk-5CCP36QQ.js} +1 -1
- package/dist/chunks/chunk-5GBMR4HM.js +966 -0
- package/dist/chunks/{chunk-43MWZLJR.js → chunk-5VXBKPW6.js} +1 -1
- package/dist/chunks/{chunk-RA4L2ACU.js → chunk-AWBSONHB.js} +88 -34
- package/dist/chunks/{chunk-BRUIATTR.js → chunk-CN4EFA5J.js} +59 -12
- package/dist/chunks/{chunk-27P2QSIM.js → chunk-CXAT7ZKP.js} +2 -2
- package/dist/chunks/chunk-E4PJNZVG.js +783 -0
- package/dist/chunks/{chunk-T6AZIDZD.js → chunk-F6N34UWB.js} +12 -244
- package/dist/chunks/{chunk-ZH5R7W4A.js → chunk-KC4KDJ5K.js} +147 -26
- package/dist/chunks/{chunk-5ED3IDUJ.js → chunk-L36GBUBB.js} +1652 -681
- package/dist/chunks/{chunk-QBR5VHJ7.js → chunk-OX7X4B2L.js} +7 -2
- package/dist/chunks/{chunk-Z5OXOZD3.js → chunk-PN5ULTTH.js} +140 -130
- package/dist/chunks/chunk-QUHY6FGN.js +108 -0
- package/dist/chunks/chunk-QVS7HRU7.js +74 -0
- package/dist/chunks/{chunk-UC6DULWY.js → chunk-R7XVBZOY.js} +130 -39
- package/dist/chunks/{chunk-YBPTMJUM.js → chunk-RAQEXKL6.js} +1120 -465
- package/dist/chunks/{chunk-RKONDLPS.js → chunk-SZEURWRS.js} +446 -52
- package/dist/chunks/chunk-TJNFVNKR.js +246 -0
- package/dist/chunks/{chunk-BW2ADH7U.js → chunk-VUPZH7J2.js} +1 -1
- package/dist/chunks/{chunk-XPCUINWS.js → chunk-XEVHP5ZW.js} +2 -2
- package/dist/chunks/{chunk-5TMHYH7G.js → chunk-YV7GE6EV.js} +638 -80
- package/dist/chunks/{chunk-GQIL3AHY.js → chunk-ZG3WQ4UF.js} +1 -1
- package/dist/chunks/{live-app-FBVWUUMT.js → live-app-PI3BAN6Y.js} +37 -26
- package/dist/command-tree.d.ts +2 -2
- package/dist/command-tree.js +2 -2
- package/dist/commands/exec/across-sandboxes-outcomes.d.ts +364 -0
- package/dist/commands/exec/across-sandboxes-outcomes.js +229 -0
- package/dist/commands/exec/across-sandboxes-run.d.ts +180 -0
- package/dist/commands/exec/across-sandboxes-run.js +339 -0
- package/dist/commands/exec/command.d.ts +577 -75
- package/dist/commands/exec/command.js +165 -32
- package/dist/commands/exec/driver-plan.d.ts +8 -2
- package/dist/commands/exec/driver-plan.js +13 -3
- package/dist/commands/exec/exec-words.d.ts +17 -3
- package/dist/commands/exec/exec-words.js +27 -16
- package/dist/commands/exec/live-view.d.ts +3 -4
- package/dist/commands/exec/live-view.js +37 -28
- package/dist/commands/exec/metadata.js +2 -2
- package/dist/commands/exec/mint-failed.d.ts +4 -4
- package/dist/commands/exec/mint-failed.js +6 -6
- package/dist/commands/exec/outcomes.d.ts +530 -73
- package/dist/commands/exec/outcomes.js +202 -66
- package/dist/commands/exec/plan-only.d.ts +10 -0
- package/dist/commands/exec/plan-only.js +46 -0
- package/dist/commands/exec/plan-run.d.ts +54 -35
- package/dist/commands/exec/plan-run.js +81 -38
- package/dist/commands/exec/planned-outcome.d.ts +15 -0
- package/dist/commands/exec/planned-outcome.js +35 -0
- package/dist/commands/exec/progress.d.ts +2 -2
- package/dist/commands/exec/progress.js +35 -18
- package/dist/commands/exec/resource-refusals.d.ts +2 -2
- package/dist/commands/exec/resource-refusals.js +3 -3
- package/dist/commands/exec/run-bin.d.ts +1 -1
- package/dist/commands/exec/run-bin.js +2 -2
- package/dist/commands/exec/run-command.d.ts +345 -63
- package/dist/commands/exec/run-command.js +308 -258
- package/dist/commands/exec/run-metadata.d.ts +42 -8
- package/dist/commands/exec/run-metadata.js +40 -21
- package/dist/commands/exec/run-planned.d.ts +20 -0
- package/dist/commands/exec/run-planned.js +22 -0
- package/dist/commands/exec/sandbox-lines.d.ts +42 -0
- package/dist/commands/exec/sandbox-lines.js +59 -0
- package/dist/commands/exec/sandbox-progress.d.ts +30 -0
- package/dist/commands/exec/sandbox-progress.js +232 -0
- package/dist/commands/exec/sandbox-view.d.ts +19 -0
- package/dist/commands/exec/sandbox-view.js +72 -0
- package/dist/commands/exec/view.d.ts +3 -2
- package/dist/commands/exec/view.js +10 -6
- package/dist/commands/runs/facts.d.ts +51 -9
- package/dist/commands/runs/facts.js +49 -29
- package/dist/commands/runs/list/command.d.ts +80 -4
- package/dist/commands/runs/list/command.js +11 -10
- package/dist/commands/runs/list/metadata.js +1 -1
- package/dist/commands/runs/list/outcomes.d.ts +40 -2
- package/dist/commands/runs/logs/command.d.ts +103 -8
- package/dist/commands/runs/logs/command.js +139 -24
- package/dist/commands/runs/logs/metadata.d.ts +4 -0
- package/dist/commands/runs/logs/metadata.js +14 -7
- package/dist/commands/runs/logs/outcomes.d.ts +49 -2
- package/dist/commands/runs/logs/outcomes.js +110 -6
- package/dist/commands/runs/past-run.d.ts +77 -6
- package/dist/commands/runs/past-run.js +133 -4
- package/dist/commands/runs/show/command.d.ts +568 -10
- package/dist/commands/runs/show/command.js +634 -119
- package/dist/commands/runs/show/metadata.d.ts +17 -0
- package/dist/commands/runs/show/metadata.js +48 -7
- package/dist/commands/runs/show/outcomes.d.ts +276 -5
- package/dist/commands/runs/show/outcomes.js +484 -96
- package/dist/commands/snapshots/build/command.d.ts +109 -18
- package/dist/commands/snapshots/build/command.js +72 -36
- package/dist/commands/snapshots/build/metadata.d.ts +4 -0
- package/dist/commands/snapshots/build/metadata.js +5 -1
- package/dist/commands/snapshots/build/outcomes.d.ts +53 -8
- package/dist/commands/snapshots/build/outcomes.js +26 -3
- package/dist/commands/snapshots/list/command.d.ts +72 -7
- package/dist/commands/snapshots/list/command.js +57 -24
- package/dist/commands/snapshots/list/metadata.d.ts +4 -0
- package/dist/commands/snapshots/list/metadata.js +4 -0
- package/dist/commands/snapshots/list/outcomes.d.ts +31 -0
- package/dist/commands/snapshots/list/outcomes.js +25 -2
- package/dist/commands/suites/list/command.d.ts +129 -0
- package/dist/commands/suites/list/command.js +162 -0
- package/dist/commands/suites/list/metadata.d.ts +11 -0
- package/dist/commands/suites/list/metadata.js +15 -0
- package/dist/commands/suites/list/outcomes.d.ts +91 -0
- package/dist/commands/suites/list/outcomes.js +122 -0
- package/dist/commands/suites/metadata.js +8 -0
- package/dist/commands/test/command.d.ts +1389 -0
- package/dist/commands/test/command.js +583 -0
- package/dist/commands/test/metadata.js +8 -0
- package/dist/commands/test/outcomes.d.ts +765 -0
- package/dist/commands/test/outcomes.js +140 -0
- package/dist/commands/test/plan.d.ts +92 -0
- package/dist/commands/test/plan.js +128 -0
- package/dist/commands/test/test-words.d.ts +12 -0
- package/dist/commands/test/test-words.js +42 -0
- package/dist/config/check-resources.d.ts +14 -0
- package/dist/config/check-resources.js +98 -0
- package/dist/config/check-runner.d.ts +13 -0
- package/dist/config/check-runner.js +54 -0
- package/dist/config/check-suites.d.ts +14 -0
- package/dist/config/check-suites.js +99 -0
- package/dist/config/gateways.d.ts +24 -0
- package/dist/config/index.d.ts +6 -3
- package/dist/config/index.js +3 -1
- package/dist/config/live/file-lists-file-gateway.d.ts +4 -0
- package/dist/config/live/file-lists-file-gateway.js +27 -0
- package/dist/config/load.d.ts +11 -10
- package/dist/config/load.js +35 -103
- package/dist/config/recipe-run.d.ts +8 -1
- package/dist/config/recipe-run.js +2 -1
- package/dist/config/resolve.d.ts +3 -2
- package/dist/config/resolve.js +6 -3
- package/dist/config/resolver.d.ts +20 -6
- package/dist/config/resolver.js +11 -8
- package/dist/config/runner.d.ts +24 -0
- package/dist/config/runner.js +4 -0
- package/dist/config/schema.d.ts +26 -18
- package/dist/config/schema.js +41 -9
- package/dist/config/settings-file.d.ts +9 -3
- package/dist/config/settings-file.js +41 -4
- package/dist/config/suite.d.ts +39 -0
- package/dist/config/suite.js +5 -0
- package/dist/config-file/define.d.ts +49 -18
- package/dist/config-file/define.js +9 -8
- package/dist/config-file/runner.d.ts +12 -0
- package/dist/config-file/runner.js +9 -0
- package/dist/context.d.ts +13 -8
- package/dist/context.js +13 -4
- package/dist/core/across-sandboxes.d.ts +43 -0
- package/dist/core/across-sandboxes.js +319 -0
- package/dist/core/before-run.d.ts +5 -3
- package/dist/core/before-run.js +12 -1
- package/dist/core/events.d.ts +62 -6
- package/dist/core/events.js +14 -0
- package/dist/core/index.d.ts +4 -2
- package/dist/core/index.js +3 -1
- package/dist/core/payload.d.ts +7 -4
- package/dist/core/payload.js +10 -4
- package/dist/core/presentations.js +1 -1
- package/dist/core/resource.d.ts +1 -1
- package/dist/core/resources.d.ts +56 -6
- package/dist/core/resources.js +81 -5
- package/dist/core/run-state.js +9 -0
- package/dist/core/run.d.ts +77 -15
- package/dist/core/run.js +150 -86
- package/dist/core/sandbox-end.d.ts +64 -0
- package/dist/core/sandbox-end.js +128 -0
- package/dist/core/timeline.d.ts +4 -4
- package/dist/core/timeline.js +3 -3
- package/dist/credential/live/vercel-cli-gateway.d.ts +7 -0
- package/dist/credential/live/vercel-cli-gateway.js +14 -1
- package/dist/extensions/github/context.d.ts +1 -1
- package/dist/extensions/github/definition.d.ts +11 -9
- package/dist/extensions/github/definition.js +8 -6
- package/dist/extensions/github/extension.d.ts +3 -3
- package/dist/extensions/github/fixture-repo.d.ts +21 -2
- package/dist/extensions/github/fixture-repo.js +31 -2
- package/dist/extensions/github/index.d.ts +2 -2
- package/dist/extensions/github/index.js +2 -2
- package/dist/extensions/github/lifecycle.d.ts +16 -6
- package/dist/extensions/github/lifecycle.js +42 -25
- package/dist/extensions/github/options.d.ts +17 -11
- package/dist/extensions/github/options.js +14 -13
- package/dist/extensions/github/refusals.d.ts +23 -6
- package/dist/extensions/github/refusals.js +34 -12
- package/dist/extensions/github/resource.d.ts +21 -12
- package/dist/extensions/github/resource.js +16 -8
- package/dist/extensions/github/run/payload.d.ts +6 -6
- package/dist/extensions/github/run/payload.js +3 -5
- package/dist/extensions/github/split.d.ts +10 -0
- package/dist/extensions/github/split.js +12 -0
- package/dist/extensions/playwright/driver.js +6 -26
- package/dist/extensions/playwright/extension.js +1 -1
- package/dist/extensions/testserver/commands/pool/create/command.js +8 -8
- package/dist/extensions/testserver/commands/pool/list/command.js +4 -4
- package/dist/extensions/testserver/definition.d.ts +4 -4
- package/dist/extensions/testserver/definition.js +41 -31
- package/dist/extensions/testserver/extension.d.ts +4 -5
- package/dist/extensions/testserver/extension.js +14 -41
- package/dist/extensions/testserver/index.d.ts +1 -1
- package/dist/extensions/testserver/index.js +1 -1
- package/dist/extensions/testserver/lifecycle.d.ts +10 -2
- package/dist/extensions/testserver/lifecycle.js +29 -6
- package/dist/extensions/testserver/options/rules.d.ts +5 -5
- package/dist/extensions/testserver/options/rules.js +10 -8
- package/dist/extensions/testserver/options/sandboxes.d.ts +4 -2
- package/dist/extensions/testserver/options/sandboxes.js +8 -3
- package/dist/extensions/testserver/pool/gateways.d.ts +29 -4
- package/dist/extensions/testserver/pool/index.d.ts +2 -2
- package/dist/extensions/testserver/pool/index.js +1 -1
- package/dist/extensions/testserver/pool/lease.d.ts +10 -0
- package/dist/extensions/testserver/pool/lease.js +21 -0
- package/dist/extensions/testserver/pool/live/pool-store-gateway.js +38 -3
- package/dist/extensions/testserver/refusals.d.ts +12 -0
- package/dist/extensions/testserver/refusals.js +18 -0
- package/dist/extensions/testserver/release.d.ts +16 -0
- package/dist/extensions/testserver/release.js +56 -4
- package/dist/extensions/testserver/resource.d.ts +4 -4
- package/dist/extensions/testserver/resource.js +1 -1
- package/dist/extensions/testserver/split.d.ts +9 -0
- package/dist/extensions/testserver/split.js +22 -0
- package/dist/extensions/testserver/vitest/fixtures.d.ts +5 -5
- package/dist/extensions/testserver/vitest/fixtures.js +9 -38
- package/dist/extensions/vitest/driver.d.ts +7 -0
- package/dist/extensions/vitest/driver.js +33 -37
- package/dist/extensions/vitest/extension.js +1 -1
- package/dist/extensions/vitest/plan/plan-over.d.ts +8 -1
- package/dist/extensions/vitest/plan/plan-over.js +16 -2
- package/dist/extensions.d.ts +17 -16
- package/dist/extensions.js +5 -4
- package/dist/forward-sigterm.js +1 -1
- package/dist/launcher-resolvers/local-services.d.ts +1 -1
- package/dist/live-app.d.ts +3 -1
- package/dist/live-app.js +9 -5
- package/dist/local-services.js +1 -1
- package/dist/planning/driver-file-lists.d.ts +61 -0
- package/dist/planning/driver-file-lists.js +66 -0
- package/dist/{commands/exec → planning}/driver-refusals.d.ts +11 -10
- package/dist/{commands/exec → planning}/driver-refusals.js +18 -14
- package/dist/planning/file-lists-file.d.ts +58 -0
- package/dist/planning/file-lists-file.js +105 -0
- package/dist/planning/file-lists.d.ts +28 -0
- package/dist/planning/file-lists.js +52 -0
- package/dist/{commands/exec → planning}/final-results.d.ts +1 -1
- package/dist/{commands/exec → planning}/final-results.js +6 -6
- package/dist/planning/plan-only.d.ts +81 -0
- package/dist/planning/plan-only.js +83 -0
- package/dist/{commands/exec → planning}/redaction.d.ts +2 -2
- package/dist/{commands/exec → planning}/redaction.js +5 -4
- package/dist/{commands/exec → planning}/resource-flags.d.ts +5 -12
- package/dist/{commands/exec → planning}/resource-flags.js +6 -16
- package/dist/planning/run-kind-flags.d.ts +20 -0
- package/dist/planning/run-kind-flags.js +48 -0
- package/dist/planning/run-plan.d.ts +30 -0
- package/dist/planning/run-plan.js +4 -0
- package/dist/planning/sandbox-placeholders.d.ts +22 -0
- package/dist/planning/sandbox-placeholders.js +60 -0
- package/dist/planning/suite-not-found.d.ts +37 -0
- package/dist/planning/suite-not-found.js +36 -0
- package/dist/planning/suites.d.ts +43 -0
- package/dist/planning/suites.js +89 -0
- package/dist/{commands/exec → planning}/test-plan.d.ts +8 -3
- package/dist/{commands/exec → planning}/test-plan.js +32 -4
- package/dist/playwright/reporter.d.ts +20 -8
- package/dist/playwright/reporter.js +195 -15
- package/dist/presentation.d.ts +10 -6
- package/dist/presentation.js +13 -15
- package/dist/run-directory/gateways.d.ts +60 -4
- package/dist/run-directory/index.d.ts +4 -4
- package/dist/run-directory/index.js +2 -1
- package/dist/run-directory/live/run-directory-gateway.js +92 -16
- package/dist/run-directory/plan.d.ts +35 -2
- package/dist/run-directory/plan.js +44 -7
- package/dist/run-directory/reader.d.ts +26 -5
- package/dist/run-directory/reader.js +24 -1
- package/dist/run-directory/recording.d.ts +75 -49
- package/dist/run-directory/recording.js +214 -28
- package/dist/run-directory/run-directory.d.ts +22 -1
- package/dist/run-directory/run-directory.js +24 -0
- package/dist/run-directory/run-record.d.ts +144 -21
- package/dist/run-directory/run-record.js +118 -19
- package/dist/run-directory/timeline-facts.js +4 -4
- package/dist/runner/build-snapshots.d.ts +7 -7
- package/dist/runner/build-snapshots.js +12 -16
- package/dist/runner/events.d.ts +29 -8
- package/dist/runner/gateways.d.ts +59 -8
- package/dist/runner/index.d.ts +6 -4
- package/dist/runner/index.js +3 -2
- package/dist/runner/live/sandbox-gateway.js +177 -33
- package/dist/runner/live/terminal.d.ts +15 -3
- package/dist/runner/live/terminal.js +25 -3
- package/dist/runner/network-policy.d.ts +55 -0
- package/dist/runner/network-policy.js +46 -0
- package/dist/runner/policy-writes.d.ts +40 -0
- package/dist/runner/policy-writes.js +124 -0
- package/dist/runner/prepare.d.ts +6 -7
- package/dist/runner/ready.d.ts +39 -10
- package/dist/runner/ready.js +59 -47
- package/dist/runner/recipe-check.d.ts +6 -0
- package/dist/runner/recipe-check.js +29 -0
- package/dist/runner/recipe-secrets.d.ts +67 -0
- package/dist/runner/recipe-secrets.js +230 -0
- package/dist/runner/recipe.d.ts +118 -28
- package/dist/runner/recipe.js +147 -154
- package/dist/runner/sandboxed-command.d.ts +24 -10
- package/dist/runner/sandboxed-command.js +37 -12
- package/dist/runner/scope.d.ts +107 -21
- package/dist/runner/scope.js +274 -54
- package/dist/runner/secrets.d.ts +42 -31
- package/dist/runner/secrets.js +62 -40
- package/dist/runner/session.d.ts +59 -26
- package/dist/runner/session.js +82 -41
- package/dist/runner/snapshot-build.d.ts +7 -4
- package/dist/runner/snapshot-build.js +48 -28
- package/dist/runner/snapshot-choice.d.ts +37 -0
- package/dist/runner/snapshot-choice.js +38 -0
- package/dist/runner/snapshot-key.d.ts +16 -14
- package/dist/runner/snapshot-key.js +24 -18
- package/dist/runner/steps.d.ts +13 -5
- package/dist/runner/steps.js +34 -4
- package/dist/runner/time-limit.d.ts +10 -0
- package/dist/runner/time-limit.js +43 -0
- package/dist/sdk/extension/commands.d.ts +1 -7
- package/dist/sdk/extension/driver.d.ts +39 -46
- package/dist/sdk/extension/driver.js +6 -6
- package/dist/sdk/extension/index.d.ts +3 -3
- package/dist/sdk/extension/index.js +3 -4
- package/dist/sdk/extension/lifecycle.d.ts +52 -9
- package/dist/sdk/extension/lifecycle.js +1 -1
- package/dist/sdk/extension/resource-definition.d.ts +13 -10
- package/dist/sdk/extension/resource-definition.js +7 -2
- package/dist/sdk/extension/resource.d.ts +2 -2
- package/dist/sdk/extension/secret-source.d.ts +58 -0
- package/dist/sdk/extension/secret-source.js +78 -0
- package/dist/sdk/index.d.ts +2 -2
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/run/launcher.d.ts +1 -1
- package/dist/sdk/run/launcher.js +1 -1
- package/dist/sdk/run/payload.d.ts +16 -1
- package/dist/sdk/run/payload.js +17 -2
- package/dist/sdk/run/redact.js +2 -2
- package/dist/sdk/run/test-events.d.ts +23 -6
- package/dist/sdk/run/test-events.js +6 -4
- package/dist/sdk/run/test-result-writer.d.ts +8 -3
- package/dist/sdk/run/test-result-writer.js +22 -2
- package/dist/{commands/exec → shared}/cleanup.d.ts +3 -3
- package/dist/{commands/exec → shared}/cleanup.js +11 -6
- package/dist/shared/job-summary.d.ts +19 -0
- package/dist/{commands/exec → shared}/job-summary.js +17 -0
- package/dist/shared/sandbox-table.d.ts +48 -0
- package/dist/shared/sandbox-table.js +109 -0
- package/dist/{commands/exec → shared}/snapshot-text.d.ts +1 -1
- package/dist/{commands/exec → shared}/tests-summary.d.ts +22 -6
- package/dist/{commands/exec → shared}/tests-summary.js +74 -31
- package/dist/{commands/exec → shared}/text.d.ts +7 -2
- package/dist/{commands/exec → shared}/text.js +9 -1
- package/dist/{commands/exec → shared}/waterfall.d.ts +8 -6
- package/dist/{commands/exec → shared}/waterfall.js +71 -24
- package/dist/shared/worker-chart.d.ts +172 -0
- package/dist/shared/worker-chart.js +623 -0
- package/dist/vitest/config.d.ts +35 -11
- package/dist/vitest/config.js +47 -14
- package/dist/vitest/index.d.ts +1 -1
- package/dist/vitest/index.js +3 -3
- package/dist/vitest/sequencer.d.ts +23 -0
- package/dist/vitest/sequencer.js +73 -0
- package/dist/vitest/setup.d.ts +1 -0
- package/dist/vitest/setup.js +34 -0
- package/dist/vitest/test-events.d.ts +32 -6
- package/dist/vitest/test-events.js +25 -5
- package/dist/vitest/test-results.d.ts +8 -3
- package/dist/vitest/test-results.js +6 -0
- package/package.json +7 -2
- package/skills/overview.md +21 -17
- package/skills/plan-runs.md +67 -0
- package/skills/read-run-output.md +51 -19
- package/dist/chunks/chunk-BFLYGMG3.js +0 -607
- package/dist/chunks/chunk-HOKDKP5A.js +0 -49
- package/dist/chunks/chunk-IVRRGGCD.js +0 -201
- package/dist/chunks/chunk-NMVODY3P.js +0 -19
- package/dist/commands/exec/define-run-command.d.ts +0 -671
- package/dist/commands/exec/define-run-command.js +0 -91
- package/dist/commands/exec/job-summary.d.ts +0 -10
- package/dist/commands/exec/worker-chart.d.ts +0 -87
- package/dist/commands/exec/worker-chart.js +0 -343
- package/dist/commands/playwright/command.d.ts +0 -661
- package/dist/commands/playwright/command.js +0 -31
- package/dist/commands/playwright/metadata.js +0 -8
- package/dist/commands/vitest/command.d.ts +0 -662
- package/dist/commands/vitest/command.js +0 -31
- package/dist/commands/vitest/metadata.js +0 -8
- package/dist/sdk/extension/ci.d.ts +0 -2
- package/dist/sdk/extension/ci.js +0 -6
- package/dist/chunks/{chunk-YM6TZV4L.js → chunk-VL7WFTVQ.js} +52 -52
- package/dist/commands/{playwright → suites}/metadata.d.ts +1 -1
- package/dist/commands/{vitest → test}/metadata.d.ts +1 -1
- /package/dist/{commands → shared}/dashboard.d.ts +0 -0
- /package/dist/{commands → shared}/dashboard.js +0 -0
- /package/dist/{commands/exec → shared}/snapshot-text.js +0 -0
|
@@ -1,55 +1,188 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
planAskedSandboxesRun,
|
|
3
|
+
runHelp,
|
|
4
|
+
runPlanned
|
|
5
|
+
} from "../../chunks/chunk-E4PJNZVG.js";
|
|
4
6
|
import {
|
|
5
|
-
EXEC_HELP,
|
|
6
|
-
EXEC_HINTS,
|
|
7
7
|
RUN_CLI_OPTIONS,
|
|
8
8
|
RUN_REQUEST_FIELDS,
|
|
9
9
|
outcomes,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
planCommandRun,
|
|
11
|
+
runFlagProblems,
|
|
12
|
+
sandboxesFlagProblems
|
|
13
|
+
} from "../../chunks/chunk-RAQEXKL6.js";
|
|
13
14
|
import "../../chunks/chunk-I5GZLOLQ.js";
|
|
14
|
-
import "../../chunks/chunk-
|
|
15
|
-
import "../../chunks/chunk-
|
|
16
|
-
import "../../chunks/chunk-
|
|
17
|
-
import "../../chunks/chunk-
|
|
18
|
-
import "../../chunks/chunk-
|
|
19
|
-
import "../../chunks/chunk-
|
|
20
|
-
import "../../chunks/chunk-
|
|
21
|
-
import "../../chunks/chunk-
|
|
22
|
-
import "../../chunks/chunk-
|
|
23
|
-
import "../../chunks/chunk-
|
|
24
|
-
import "../../chunks/chunk-
|
|
15
|
+
import "../../chunks/chunk-5GBMR4HM.js";
|
|
16
|
+
import "../../chunks/chunk-PN5ULTTH.js";
|
|
17
|
+
import "../../chunks/chunk-R7XVBZOY.js";
|
|
18
|
+
import "../../chunks/chunk-CN4EFA5J.js";
|
|
19
|
+
import "../../chunks/chunk-CXAT7ZKP.js";
|
|
20
|
+
import "../../chunks/chunk-XEVHP5ZW.js";
|
|
21
|
+
import "../../chunks/chunk-VUPZH7J2.js";
|
|
22
|
+
import "../../chunks/chunk-ZG3WQ4UF.js";
|
|
23
|
+
import "../../chunks/chunk-5CCP36QQ.js";
|
|
24
|
+
import "../../chunks/chunk-QUHY6FGN.js";
|
|
25
|
+
import "../../chunks/chunk-SZEURWRS.js";
|
|
26
|
+
import "../../chunks/chunk-OX7X4B2L.js";
|
|
27
|
+
import "../../chunks/chunk-F6N34UWB.js";
|
|
28
|
+
import "../../chunks/chunk-YV7GE6EV.js";
|
|
29
|
+
import {
|
|
30
|
+
effectiveConfig
|
|
31
|
+
} from "../../chunks/chunk-L36GBUBB.js";
|
|
25
32
|
import {
|
|
26
33
|
NOT_COUNTED
|
|
27
|
-
} from "../../chunks/chunk-
|
|
28
|
-
import "../../chunks/chunk-BW2ADH7U.js";
|
|
29
|
-
import "../../chunks/chunk-GQIL3AHY.js";
|
|
30
|
-
import "../../chunks/chunk-GSC6SRTW.js";
|
|
34
|
+
} from "../../chunks/chunk-AWBSONHB.js";
|
|
31
35
|
import {
|
|
32
36
|
stormCommands
|
|
33
|
-
} from "../../chunks/chunk-
|
|
34
|
-
import "../../chunks/chunk-
|
|
37
|
+
} from "../../chunks/chunk-5VXBKPW6.js";
|
|
38
|
+
import "../../chunks/chunk-VL7WFTVQ.js";
|
|
35
39
|
|
|
36
40
|
// src/commands/exec/command.ts
|
|
37
41
|
import { z } from "zod";
|
|
42
|
+
|
|
43
|
+
// src/planning/sandbox-placeholders.ts
|
|
44
|
+
var PLACEHOLDER = /(?<!\$)\{(sandbox\+1|sandbox(?:es)?)\}/g;
|
|
45
|
+
function placeholdersOf(argv) {
|
|
46
|
+
return new Set(
|
|
47
|
+
argv.flatMap((argument) => [...argument.matchAll(PLACEHOLDER)].map(([, name]) => name))
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
function commandForSandbox(argv, sandbox, count) {
|
|
51
|
+
return argv.map(
|
|
52
|
+
(argument) => argument.replace(
|
|
53
|
+
PLACEHOLDER,
|
|
54
|
+
(_match, name) => String(name === "sandbox" ? sandbox : name === "sandbox+1" ? sandbox + 1 : count)
|
|
55
|
+
)
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
function commandsForSandboxes(argv, count) {
|
|
59
|
+
return Array.from({ length: count }, (_, index) => commandForSandbox(argv, index, count));
|
|
60
|
+
}
|
|
61
|
+
function placeholderListText(names) {
|
|
62
|
+
const words = names.map((name) => `{${name}}`);
|
|
63
|
+
if (words.length <= 2) return words.join(" and ");
|
|
64
|
+
return `${words.slice(0, -1).join(", ")}, and ${words.at(-1) ?? ""}`;
|
|
65
|
+
}
|
|
66
|
+
function placeholderProblems(request) {
|
|
67
|
+
const { sandboxes, command } = request;
|
|
68
|
+
const held = placeholdersOf(command);
|
|
69
|
+
if (sandboxes === void 0)
|
|
70
|
+
return held.size === 0 ? [] : [
|
|
71
|
+
{
|
|
72
|
+
field: "command",
|
|
73
|
+
message: `The command holds ${placeholderListText([...held])}, which only --sandboxes replaces. Add --sandboxes <n>, or write $ before the brace to keep it as it is.`
|
|
74
|
+
}
|
|
75
|
+
];
|
|
76
|
+
return [
|
|
77
|
+
...Number.isInteger(sandboxes) && sandboxes >= 1 ? [] : [{ field: "sandboxes", message: `--sandboxes takes a whole number from 1, not ${sandboxes}.` }],
|
|
78
|
+
...held.has("sandbox") || held.has("sandbox+1") ? [] : [
|
|
79
|
+
{
|
|
80
|
+
field: "command",
|
|
81
|
+
message: "--sandboxes needs {sandbox} or {sandbox+1} in an argument of the command, such as -g {sandbox+1}/{sandboxes}: without it, every runner sandbox runs the same command."
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
];
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// src/commands/exec/exec-words.ts
|
|
88
|
+
var EXEC_HELP = {
|
|
89
|
+
usage: "[--sandboxes <N>] -- <command...>",
|
|
90
|
+
args: "The command to run, after --, as an argument list with no shell. On the launch machine, it gets this machine's working directory and environment, less the launcher variables its resources hide, plus STORM_RUN, and FORCE_COLOR or NO_COLOR only when neither is set and the launcher asks for or opts out of color; in a runner sandbox, the runner recipe's cwd, its env, the runner's PATH, STORM_RUN, and FORCE_COLOR or NO_COLOR only when that env sets neither and the launcher asks for or opts out of color, with paths under the repository's root rewritten.",
|
|
91
|
+
verbose: "which asks the command to print what each test does as it happens, for passing tests too",
|
|
92
|
+
examples: [
|
|
93
|
+
{
|
|
94
|
+
argv: "-- pnpm test",
|
|
95
|
+
description: "Run the package's test script with the runner, team, project, and resources declared at the top level of storm.config.ts."
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
argv: "--keep-sandbox 2h -- pnpm test",
|
|
99
|
+
description: "Run the tests in a runner sandbox and keep it running 2 hours after the run, to debug in it."
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
argv: "--sandboxes 3 -- node scripts/run-group.js {sandbox+1}/{sandboxes}",
|
|
103
|
+
description: "Run the command in 3 runner sandboxes at once, as 1/3, 2/3, and 3/3: storm replaces {sandbox+1} with each runner sandbox's index plus one (from 1, for tools such as Vitest's and Playwright's --shard=i/n or Next.js's run-tests.js -g i/n), {sandbox} with its index from 0, and {sandboxes} with 3. storm.config.ts must set runner.sandboxes.max to 3 or more."
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
argv: "--runner launch-machine -- node scripts/smoke.mjs",
|
|
107
|
+
description: "Run a Node.js script on the launch machine, ignoring any top-level runner in storm.config.ts, with the resources storm.config.ts declares, if any."
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
};
|
|
111
|
+
var EXEC_SANDBOXES_HELP = {
|
|
112
|
+
valueLabel: "N",
|
|
113
|
+
description: "Run the command in N runner sandboxes at once, a run across runner sandboxes: each starts from one runner snapshot and runs the command once with its placeholders replaced: {sandbox} becomes the runner sandbox index, from 0 to N - 1; {sandbox+1} becomes the index plus one, from 1 to N, for commands that count from 1 (such as Vitest's and Playwright's --shard=i/n and Next.js's run-tests.js -g i/n); and {sandboxes} becomes N, in every argument, the first too, but not after a $, so ${sandbox} in a shell script stays as it is. The command must hold {sandbox} or {sandbox+1}, so each runner sandbox runs its own part. N is a whole number from 1 to runner.sandboxes.max in storm.config.ts, and a config file without runner.sandboxes takes no --sandboxes. Each runner sandbox's command output goes only to its command.log in the run directory, under sandboxes/<index>/, and the run prints one status line for each runner sandbox's step, then each runner sandbox's waterfall, a table of the runner sandboxes, and storm exits 0 when every runner sandbox passed, else 1. The run keeps each runner sandbox only with --keep-sandbox. Fits the Vercel Sandbox runner only. Not with --show-output. No config key."
|
|
114
|
+
};
|
|
115
|
+
var RUNNER_FLAG_HELP = {
|
|
116
|
+
valueLabel: "KIND",
|
|
117
|
+
description: "Use the launch machine runner (launch-machine), ignoring any top-level runner in storm.config.ts and needing no config file. The command runs on this machine with no isolation, seeing this machine's files and environment less the variables the resources drop. Without --runner, storm exec uses the runner declared at the top level of storm.config.ts (vercelSandbox({ \u2026 }) or launchMachine())."
|
|
118
|
+
};
|
|
119
|
+
var EXEC_HINTS = {
|
|
120
|
+
// The command's test runner reported no final result. Which one it is the launcher can't tell, so the hint names
|
|
121
|
+
// storm's reporter for each: the Vitest one and the Playwright one, by their published paths.
|
|
122
|
+
noFinalResults: "add storm's reporter to the test runner's config (stormReporter() from @vercel/storm/vitest/config for Vitest, @vercel/storm/playwright/reporter for Playwright)"
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
// src/commands/exec/command.ts
|
|
126
|
+
var help = runHelp(EXEC_HELP, "command", { includeResourceExamples: true, runnerFlag: true });
|
|
38
127
|
var command_default = stormCommands.define({
|
|
39
128
|
requestSchema: z.object({
|
|
40
129
|
...RUN_REQUEST_FIELDS,
|
|
130
|
+
runner: z.enum(["launch-machine"]).optional(),
|
|
131
|
+
sandboxes: z.number().optional(),
|
|
41
132
|
command: z.array(z.string()).min(1, { message: "Give the command to run after --" })
|
|
42
133
|
}),
|
|
43
134
|
cli: { options: RUN_CLI_OPTIONS, positionals: ["command"] },
|
|
44
|
-
help:
|
|
135
|
+
help: {
|
|
136
|
+
...help,
|
|
137
|
+
fields: { ...help.fields, runner: RUNNER_FLAG_HELP, sandboxes: EXEC_SANDBOXES_HELP }
|
|
138
|
+
},
|
|
45
139
|
response: outcomes,
|
|
46
|
-
validate:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
140
|
+
validate: (request) => [
|
|
141
|
+
...runFlagProblems(request),
|
|
142
|
+
...sandboxesFlagProblems(request),
|
|
143
|
+
...placeholderProblems(request)
|
|
144
|
+
],
|
|
145
|
+
handler: async (context, request) => {
|
|
146
|
+
const { app, signal } = context;
|
|
147
|
+
const file = await app.config.loadFile();
|
|
148
|
+
if (!file.ok) return file.refusal;
|
|
149
|
+
const { sandboxes, command } = request;
|
|
150
|
+
const planRequest = { ...request, settingsFile: effectiveConfig(file, null), suite: null };
|
|
151
|
+
const planCommand = async () => ({
|
|
152
|
+
ok: true,
|
|
153
|
+
argv: command,
|
|
154
|
+
testPlan: NOT_COUNTED.testPlan
|
|
155
|
+
});
|
|
156
|
+
const planSandboxes = (count) => async ({ max }) => ({
|
|
157
|
+
ok: true,
|
|
158
|
+
argv: command,
|
|
159
|
+
testPlan: NOT_COUNTED.testPlan,
|
|
160
|
+
sandboxes: {
|
|
161
|
+
count: { count, from: "flag", max },
|
|
162
|
+
sandboxes: commandsForSandboxes(command, count).map((argv) => ({ argv, files: null }))
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
const plan = sandboxes === void 0 ? await planCommandRun(app, planRequest, planCommand, signal) : await planAskedSandboxesRun(
|
|
166
|
+
app,
|
|
167
|
+
planRequest,
|
|
168
|
+
{ count: sandboxes, flag: "--sandboxes" },
|
|
169
|
+
planSandboxes(sandboxes),
|
|
170
|
+
signal
|
|
171
|
+
);
|
|
172
|
+
if (!plan.ok) return plan.refusal;
|
|
173
|
+
return await runPlanned(
|
|
174
|
+
context,
|
|
175
|
+
request,
|
|
176
|
+
{
|
|
177
|
+
name: "exec",
|
|
178
|
+
hints: EXEC_HINTS,
|
|
179
|
+
ran: (facts) => outcomes.ran(facts),
|
|
180
|
+
sandboxesRan: (facts) => outcomes.sandboxesRan(facts),
|
|
181
|
+
planned: (facts) => outcomes.planned(facts)
|
|
182
|
+
},
|
|
183
|
+
plan
|
|
184
|
+
);
|
|
185
|
+
}
|
|
53
186
|
});
|
|
54
187
|
export {
|
|
55
188
|
command_default as default
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import type { StormApp } from "../../context.ts";
|
|
2
2
|
import { type Driver, type RunTestPlan } from "../../sdk/extension/index.ts";
|
|
3
|
-
import type { DriverRefusals } from "
|
|
4
|
-
import
|
|
3
|
+
import type { DriverRefusals } from "../../planning/driver-refusals.ts";
|
|
4
|
+
import type { PlannedWhere } from "../../planning/run-plan.ts";
|
|
5
|
+
import { canceledBeforeStart, type PlannedCommand } from "./plan-run.ts";
|
|
5
6
|
import { checkoutFailedRefusal } from "./run-command.ts";
|
|
7
|
+
/**
|
|
8
|
+
* Whether a driver run counts before it starts: nothing when neither `testPlan` nor `--count-tests` asks; otherwise
|
|
9
|
+
* each test when `--count-tests` was passed or the driver always counts each test (`driver.countsFilesOnly !== true`).
|
|
10
|
+
*/
|
|
11
|
+
export declare function driverCount(driver: Driver, testPlan: boolean, countTests: boolean): DriverCount;
|
|
6
12
|
/**
|
|
7
13
|
* Whether a run counts before it starts, and what: `undefined` counts nothing; otherwise the plan step counts each
|
|
8
14
|
* test, or only the test files where the driver can (`countTests`).
|
|
@@ -6,6 +6,15 @@ import { NOT_COUNTED } from "../../sdk/extension/index.js";
|
|
|
6
6
|
import { canceledBeforeStart } from "./plan-run.js";
|
|
7
7
|
import { findRunBin } from "./run-bin.js";
|
|
8
8
|
import { checkoutFailedRefusal } from "./run-command.js";
|
|
9
|
+
/**
|
|
10
|
+
* Whether a driver run counts before it starts: nothing when neither `testPlan` nor `--count-tests` asks; otherwise
|
|
11
|
+
* each test when `--count-tests` was passed or the driver always counts each test (`driver.countsFilesOnly !== true`).
|
|
12
|
+
*/
|
|
13
|
+
export function driverCount(driver, testPlan, countTests) {
|
|
14
|
+
if (!testPlan && !countTests)
|
|
15
|
+
return undefined;
|
|
16
|
+
return { countTests: driver.countsFilesOnly !== true || countTests };
|
|
17
|
+
}
|
|
9
18
|
/**
|
|
10
19
|
* `driver`'s part of planning a run, before anything is minted, acquired or started. `count` says whether the run
|
|
11
20
|
* counts (`DriverCount`):
|
|
@@ -35,7 +44,7 @@ export async function planDriverCommand(app, driver, errors, args, count, where,
|
|
|
35
44
|
return refused(checkoutFailedRefusal(bin.failure));
|
|
36
45
|
const planned = { args, cwd: bin.cwd };
|
|
37
46
|
if (bin.kind === "not-found")
|
|
38
|
-
return refused(errors.planFailed({ kind: "start-failed", message: `found no ${name} in node_modules/.bin of ${bin.searched.join(", ")}` }, planned));
|
|
47
|
+
return refused(errors.planFailed(driver.name, { kind: "start-failed", message: `found no ${name} in node_modules/.bin of ${bin.searched.join(", ")}` }, planned));
|
|
39
48
|
if (count === undefined)
|
|
40
49
|
return { ok: true, argv: driver.launch(bin.runs, args), testPlan: NOT_COUNTED.testPlan };
|
|
41
50
|
// Each Context goes only to the plan step of the driver that built it, which `defineDriver`'s cast rests on.
|
|
@@ -50,14 +59,15 @@ export async function planDriverCommand(app, driver, errors, args, count, where,
|
|
|
50
59
|
const { kind, message } = answer;
|
|
51
60
|
if (kind === "canceled")
|
|
52
61
|
return refused(canceledBeforeStart());
|
|
53
|
-
return refused(errors.planFailed({ kind, message }, planned));
|
|
62
|
+
return refused(errors.planFailed(driver.name, { kind, message }, planned));
|
|
54
63
|
}
|
|
55
64
|
const { tests, files } = answer.plan;
|
|
56
65
|
if ((tests ?? files) === 0)
|
|
57
|
-
return refused(errors.noMatchingTests(planned));
|
|
66
|
+
return refused(errors.noMatchingTests(driver.name, planned));
|
|
58
67
|
return {
|
|
59
68
|
ok: true,
|
|
60
69
|
argv: driver.launch(bin.runs, args),
|
|
61
70
|
testPlan: { kind: "counted", ...(tests === undefined ? {} : { tests }), files },
|
|
71
|
+
...(answer.testFiles === undefined ? {} : { testFiles: answer.testFiles }),
|
|
62
72
|
};
|
|
63
73
|
}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DriverHints } from "../../sdk/extension/index.ts";
|
|
2
|
+
import type { RunHelpWording } from "./run-metadata.ts";
|
|
2
3
|
/** `exec`'s part of its leaf help: its usage after the run flags, its arguments, `--verbose`'s ending and its examples. */
|
|
3
|
-
export declare const EXEC_HELP:
|
|
4
|
+
export declare const EXEC_HELP: RunHelpWording;
|
|
5
|
+
/**
|
|
6
|
+
* The field description of `--sandboxes` on `storm exec`, with its `{sandbox}`, `{sandbox+1}`, and `{sandboxes}`
|
|
7
|
+
* placeholders.
|
|
8
|
+
*/
|
|
9
|
+
export declare const EXEC_SANDBOXES_HELP: {
|
|
10
|
+
valueLabel: string;
|
|
11
|
+
description: string;
|
|
12
|
+
};
|
|
13
|
+
/** Help for `storm exec`'s `--runner` option. */
|
|
14
|
+
export declare const RUNNER_FLAG_HELP: {
|
|
15
|
+
readonly valueLabel: "KIND";
|
|
16
|
+
readonly description: "Use the launch machine runner (launch-machine), ignoring any top-level runner in storm.config.ts and needing no config file. The command runs on this machine with no isolation, seeing this machine's files and environment less the variables the resources drop. Without --runner, storm exec uses the runner declared at the top level of storm.config.ts (vercelSandbox({ … }) or launchMachine()).";
|
|
17
|
+
};
|
|
4
18
|
/** What an `exec` run says to do next. */
|
|
5
|
-
export declare const EXEC_HINTS: DriverHints
|
|
19
|
+
export declare const EXEC_HINTS: Pick<DriverHints, "noFinalResults">;
|
|
@@ -1,37 +1,48 @@
|
|
|
1
|
-
// `storm exec`'s words: its part of its leaf help,
|
|
2
|
-
// runs the argument list after `--` as it is, and counts nothing
|
|
3
|
-
// or none, so its words name no test runner as the run's: where
|
|
4
|
-
//
|
|
5
|
-
//
|
|
1
|
+
// `storm exec`'s words: its part of its leaf help, its `--sandboxes` and `--runner` flag help, and what its run's
|
|
2
|
+
// summary says to do next. `exec` has no driver: it runs the argument list after `--` as it is, and counts nothing
|
|
3
|
+
// (`command.ts`). Its command may start any test runner or none, so its words name no test runner as the run's: where
|
|
4
|
+
// they must say what to do, they say it for each test runner storm has a reporter for. They use `RunHelpWording` and
|
|
5
|
+
// `DriverHints`, because the shared run engine words help and summaries the same way for `storm test` and `storm exec`.
|
|
6
6
|
/** `exec`'s part of its leaf help: its usage after the run flags, its arguments, `--verbose`'s ending and its examples. */
|
|
7
7
|
export const EXEC_HELP = {
|
|
8
|
-
usage: "-- <command...>",
|
|
9
|
-
args: "The command to run, after --, as an argument list with no shell.
|
|
8
|
+
usage: "[--sandboxes <N>] -- <command...>",
|
|
9
|
+
args: "The command to run, after --, as an argument list with no shell. On the launch machine, it gets this machine's working directory and environment, less the launcher variables its resources hide, plus STORM_RUN, and FORCE_COLOR or NO_COLOR only when neither is set and the launcher asks for or opts out of color; in a runner sandbox, the runner recipe's cwd, its env, the runner's PATH, STORM_RUN, and FORCE_COLOR or NO_COLOR only when that env sets neither and the launcher asks for or opts out of color, with paths under the repository's root rewritten.",
|
|
10
10
|
verbose: "which asks the command to print what each test does as it happens, for passing tests too",
|
|
11
11
|
examples: [
|
|
12
12
|
{
|
|
13
13
|
argv: "-- pnpm test",
|
|
14
|
-
description: "Run the package's test script
|
|
14
|
+
description: "Run the package's test script with the runner, team, project, and resources declared at the top level of storm.config.ts.",
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
argv: "--keep-sandbox 2h -- pnpm test",
|
|
18
18
|
description: "Run the tests in a runner sandbox and keep it running 2 hours after the run, to debug in it.",
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
|
-
argv: "--
|
|
22
|
-
description: "Run
|
|
21
|
+
argv: "--sandboxes 3 -- node scripts/run-group.js {sandbox+1}/{sandboxes}",
|
|
22
|
+
description: "Run the command in 3 runner sandboxes at once, as 1/3, 2/3, and 3/3: storm replaces {sandbox+1} with each runner sandbox's index plus one (from 1, for tools such as Vitest's and Playwright's --shard=i/n or Next.js's run-tests.js -g i/n), {sandbox} with its index from 0, and {sandboxes} with 3. storm.config.ts must set runner.sandboxes.max to 3 or more.",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
argv: "--runner launch-machine -- node scripts/smoke.mjs",
|
|
26
|
+
description: "Run a Node.js script on the launch machine, ignoring any top-level runner in storm.config.ts, with the resources storm.config.ts declares, if any.",
|
|
23
27
|
},
|
|
24
28
|
],
|
|
25
29
|
};
|
|
30
|
+
/**
|
|
31
|
+
* The field description of `--sandboxes` on `storm exec`, with its `{sandbox}`, `{sandbox+1}`, and `{sandboxes}`
|
|
32
|
+
* placeholders.
|
|
33
|
+
*/
|
|
34
|
+
export const EXEC_SANDBOXES_HELP = {
|
|
35
|
+
valueLabel: "N",
|
|
36
|
+
description: "Run the command in N runner sandboxes at once, a run across runner sandboxes: each starts from one runner snapshot and runs the command once with its placeholders replaced: {sandbox} becomes the runner sandbox index, from 0 to N - 1; {sandbox+1} becomes the index plus one, from 1 to N, for commands that count from 1 (such as Vitest's and Playwright's --shard=i/n and Next.js's run-tests.js -g i/n); and {sandboxes} becomes N, in every argument, the first too, but not after a $, so ${sandbox} in a shell script stays as it is. The command must hold {sandbox} or {sandbox+1}, so each runner sandbox runs its own part. N is a whole number from 1 to runner.sandboxes.max in storm.config.ts, and a config file without runner.sandboxes takes no --sandboxes. Each runner sandbox's command output goes only to its command.log in the run directory, under sandboxes/<index>/, and the run prints one status line for each runner sandbox's step, then each runner sandbox's waterfall, a table of the runner sandboxes, and storm exits 0 when every runner sandbox passed, else 1. The run keeps each runner sandbox only with --keep-sandbox. Fits the Vercel Sandbox runner only. Not with --show-output. No config key.",
|
|
37
|
+
};
|
|
38
|
+
/** Help for `storm exec`'s `--runner` option. */
|
|
39
|
+
export const RUNNER_FLAG_HELP = {
|
|
40
|
+
valueLabel: "KIND",
|
|
41
|
+
description: "Use the launch machine runner (launch-machine), ignoring any top-level runner in storm.config.ts and needing no config file. The command runs on this machine with no isolation, seeing this machine's files and environment less the variables the resources drop. Without --runner, storm exec uses the runner declared at the top level of storm.config.ts (vercelSandbox({ … }) or launchMachine()).",
|
|
42
|
+
};
|
|
26
43
|
/** What an `exec` run says to do next. */
|
|
27
44
|
export const EXEC_HINTS = {
|
|
28
45
|
// The command's test runner reported no final result. Which one it is the launcher can't tell, so the hint names
|
|
29
46
|
// storm's reporter for each: the Vitest one and the Playwright one, by their published paths.
|
|
30
47
|
noFinalResults: "add storm's reporter to the test runner's config (stormReporter() from @vercel/storm/vitest/config for Vitest, @vercel/storm/playwright/reporter for Playwright)",
|
|
31
|
-
// The command may run no test at all, so the steps say they apply if it does, and name storm's reporter for each test
|
|
32
|
-
// runner, under either npm name.
|
|
33
|
-
addReporter: [
|
|
34
|
-
'If the command runs tests, add storm\'s reporter to its test runner\'s config: for Vitest, set test.reporters to stormReporters() from "@vercel/storm/vitest/config"; for Playwright, add ["@vercel/storm/playwright/reporter"] to the reporter list. In a package that installs storm as @cnc-tools/storm, use "@cnc-tools/storm/vitest/config" or "@cnc-tools/storm/playwright/reporter".',
|
|
35
|
-
"Remove any --reporter from the test runner's arguments, since it replaces the config's reporters, storm's among them. Then run the same storm exec command again.",
|
|
36
|
-
],
|
|
37
48
|
};
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { type RunState } from "../../core/index.ts";
|
|
2
|
-
import { type Paint } from "
|
|
2
|
+
import { type Paint } from "../../shared/text.ts";
|
|
3
3
|
/**
|
|
4
4
|
* A run's phases, in order. In a sandboxed run the resources' lanes and the runner run at once, as `lanes`;
|
|
5
5
|
* unsandboxed, the resources' lanes run alone, as `resources`.
|
|
6
6
|
*/
|
|
7
|
-
export type LivePhase = "credential" | "lanes" | "resources" | "
|
|
7
|
+
export type LivePhase = "credential" | "lanes" | "resources" | "command" | "cleanup";
|
|
8
8
|
/** The phase that runs now; undefined before the first. */
|
|
9
9
|
export declare function activePhase(state: RunState): LivePhase | undefined;
|
|
10
10
|
/** The run's first line: storm's version and, in a sandboxed run, the base. Like a final form, it isn't cut. */
|
|
11
11
|
export declare function headerLine(state: RunState, paint: Paint): string;
|
|
12
12
|
/**
|
|
13
|
-
* Phase `phase`'s live block at `now`, `width` columns wide. Its height stays the same while the phase runs
|
|
14
|
-
* the tests block grows, once, when its first test event arrives.
|
|
13
|
+
* Phase `phase`'s live block at `now`, `width` columns wide. Its height stays the same while the phase runs.
|
|
15
14
|
*/
|
|
16
15
|
export declare function phaseFrame(state: RunState, phase: LivePhase, now: number, width: number, paint: Paint): string[];
|
|
17
16
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// The live view of a run on a terminal: its phases drawn by pure renderers from the run's state (`RunState`, built
|
|
2
2
|
// by `DEFINITION_SET.applyEvent`). A run goes through its phases in order: the credential, then the resources' lanes
|
|
3
3
|
// and the runner side by side (or the resources' lanes alone, unsandboxed; or the runner alone without a resource
|
|
4
|
-
// lane), then the
|
|
4
|
+
// lane), then the command and the cleanup. The phase that runs shows live in a block of fixed height; once the next one
|
|
5
5
|
// starts, it is printed above for good in its final form. Each resource lane's rows are its presentation's text
|
|
6
6
|
// (`DEFINITION_SET.presentations`), laid out here.
|
|
7
7
|
import { cleanupProblems, megabytesText, setupPhaseKey, setupPhaseWords, } from "../../core/index.js";
|
|
@@ -9,8 +9,8 @@ import { mintTargetText } from "../../credential/index.js";
|
|
|
9
9
|
import { DEFINITION_SET } from "../../extensions.js";
|
|
10
10
|
import { versionText } from "../../version.js";
|
|
11
11
|
import { commandEnd, LANE_WIDTH } from "./progress.js";
|
|
12
|
-
import { builtAtText } from "
|
|
13
|
-
import { isoSecondsText, keepTimeText, releaseText, seconds, short, shortFile, spread, truncate, visibleLength, withArticle, } from "
|
|
12
|
+
import { builtAtText } from "../../shared/snapshot-text.js";
|
|
13
|
+
import { isoSecondsText, keepTimeText, orderText, releaseText, seconds, short, shortFile, spread, truncate, visibleLength, withArticle, } from "../../shared/text.js";
|
|
14
14
|
/** Spinner frames, one each tick. */
|
|
15
15
|
const SPINNER = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];
|
|
16
16
|
/** Where text under a lane row starts: under the lane's text, past ` ✓ command `. */
|
|
@@ -24,7 +24,7 @@ export function activePhase(state) {
|
|
|
24
24
|
if (state.cleanup !== undefined)
|
|
25
25
|
return "cleanup";
|
|
26
26
|
if (state.command !== undefined)
|
|
27
|
-
return "
|
|
27
|
+
return "command";
|
|
28
28
|
if (state.lanesStartedAt !== undefined && state.runner !== undefined)
|
|
29
29
|
return "lanes";
|
|
30
30
|
if (Object.keys(state.resources).length > 0 && state.runner === undefined)
|
|
@@ -51,8 +51,7 @@ export function headerLine(state, paint) {
|
|
|
51
51
|
return paint.strong(header);
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
54
|
-
* Phase `phase`'s live block at `now`, `width` columns wide. Its height stays the same while the phase runs
|
|
55
|
-
* the tests block grows, once, when its first test event arrives.
|
|
54
|
+
* Phase `phase`'s live block at `now`, `width` columns wide. Its height stays the same while the phase runs.
|
|
56
55
|
*/
|
|
57
56
|
export function phaseFrame(state, phase, now, width, paint) {
|
|
58
57
|
const view = {
|
|
@@ -71,8 +70,8 @@ export function phaseFrame(state, phase, now, width, paint) {
|
|
|
71
70
|
return lanesFrame(state, view);
|
|
72
71
|
case "resources":
|
|
73
72
|
return unsandboxedResourcesFrame(state, view);
|
|
74
|
-
case "
|
|
75
|
-
return
|
|
73
|
+
case "command":
|
|
74
|
+
return commandFrame(state, view);
|
|
76
75
|
case "cleanup":
|
|
77
76
|
return state.cleanup === undefined ? [] : [cleanupLine(state.cleanup, state.runner, view, false)];
|
|
78
77
|
}
|
|
@@ -101,8 +100,8 @@ export function phaseRecord(state, phase, width, paint) {
|
|
|
101
100
|
return lanesRecord(state, view);
|
|
102
101
|
case "resources":
|
|
103
102
|
return unsandboxedResourcesRecord(state, view);
|
|
104
|
-
case "
|
|
105
|
-
return state.command === undefined ? [] : [
|
|
103
|
+
case "command":
|
|
104
|
+
return state.command === undefined ? [] : [commandLine(state, state.command, view, false)];
|
|
106
105
|
case "cleanup":
|
|
107
106
|
return state.cleanup === undefined ? [] : [cleanupLine(state.cleanup, state.runner, view, true)];
|
|
108
107
|
}
|
|
@@ -327,18 +326,18 @@ function unsandboxedResourcesRecord(state, view) {
|
|
|
327
326
|
return [];
|
|
328
327
|
return [...(mint === undefined ? [] : [credentialLine(mint, view)]), ...lanes];
|
|
329
328
|
}
|
|
330
|
-
/** The
|
|
331
|
-
function
|
|
332
|
-
return state.command === undefined ? [] : [
|
|
329
|
+
/** The command block: one row, which says what the tests have done so far once their first test event arrives. */
|
|
330
|
+
function commandFrame(state, view) {
|
|
331
|
+
return state.command === undefined ? [] : [commandLine(state, state.command, view, true)];
|
|
333
332
|
}
|
|
334
|
-
/** How long a file runs before the
|
|
333
|
+
/** How long a file runs before the command row names it as the longest running. */
|
|
335
334
|
const LONG_FILE_MS = 10_000;
|
|
336
335
|
/**
|
|
337
|
-
* The
|
|
336
|
+
* The command row. Live, once a test event arrived, what the tests have done so far, how many files run and how many
|
|
338
337
|
* of those wait on a setup phase, and the file that has run longest once it passes 10 seconds; until then, and in its
|
|
339
338
|
* final form, the command and how it ended.
|
|
340
339
|
*/
|
|
341
|
-
function
|
|
340
|
+
function commandLine(state, command, view, live) {
|
|
342
341
|
const { tests } = state;
|
|
343
342
|
const end = command.outcome === undefined ? undefined : endText(command.outcome);
|
|
344
343
|
const parts = [command.argv.join(" ")];
|
|
@@ -346,7 +345,7 @@ function testsLine(state, command, view, live) {
|
|
|
346
345
|
parts.push(end);
|
|
347
346
|
else if (live && state.stopping)
|
|
348
347
|
parts.push("stopping");
|
|
349
|
-
const head =
|
|
348
|
+
const head = laneHead(view.glyph(command.status), "command");
|
|
350
349
|
const time = elapsed(view, command.startedAt, command.endedAt);
|
|
351
350
|
const text = live && end === undefined && !state.stopping && tests !== undefined
|
|
352
351
|
? testsProgress(tests, view, view.width - visibleLength(head) - visibleLength(time) - 1)
|
|
@@ -403,27 +402,37 @@ function waitingText(waiting) {
|
|
|
403
402
|
*/
|
|
404
403
|
function cleanupLine(cleanup, runner, view, record) {
|
|
405
404
|
const done = record || cleanup.status !== "running";
|
|
406
|
-
const
|
|
407
|
-
const { keepMs } = cleanup;
|
|
405
|
+
const { keepMs, resources } = cleanup;
|
|
408
406
|
const text = !done && cleanup.waiting
|
|
409
407
|
? `${WAITING_FOR_SNAPSHOT}…`
|
|
410
408
|
: keepMs === null
|
|
411
|
-
? (
|
|
412
|
-
:
|
|
409
|
+
? (releaseText(resources, done) ?? "nothing to release")
|
|
410
|
+
: orderText(runnerSandboxSteps(keepMs, resources, runner, done));
|
|
413
411
|
const leftBehind = cleanupProblems(cleanup);
|
|
414
412
|
const ending = done ? (leftBehind === 0 ? "" : `: ${leftBehind} left behind`) : "…";
|
|
415
413
|
return view.row(` ${view.glyph(cleanup.status)} cleanup ${text}${!done && cleanup.waiting ? "" : ending}`, elapsed(view, cleanup.startedAt, cleanup.endedAt));
|
|
416
414
|
}
|
|
417
415
|
/**
|
|
418
|
-
* What cleanup does with the runner sandbox
|
|
419
|
-
*
|
|
416
|
+
* What cleanup does with the runner sandbox and the resource instances it releases (`resources`), in order, as the
|
|
417
|
+
* cleanup row says. Once it kept the runner sandbox running, it released them, then kept it. While it runs with a keep
|
|
418
|
+
* time above 0, it gives the runner sandbox no network access, releases, then keeps it running; with a keep time of 0
|
|
419
|
+
* it stops it, releases, then deletes it, or with no release stops and deletes it. Its final form, when it didn't keep
|
|
420
|
+
* the runner sandbox, says it stopped it, released, then deleted it.
|
|
420
421
|
*/
|
|
421
|
-
function
|
|
422
|
+
function runnerSandboxSteps(keepMs, resources, runner, done) {
|
|
422
423
|
const kept = runner?.kept;
|
|
424
|
+
// The scope keeps the runner sandbox only after the release.
|
|
425
|
+
const release = releaseText(resources, done || kept !== undefined);
|
|
426
|
+
const released = release === undefined ? [] : [release];
|
|
423
427
|
if (kept !== undefined)
|
|
424
|
-
return `kept the runner sandbox until ${isoSecondsText(kept.stopsAt)}
|
|
425
|
-
|
|
426
|
-
|
|
428
|
+
return [...released, `kept the runner sandbox until ${isoSecondsText(kept.stopsAt)}, with no network access`];
|
|
429
|
+
if (!done && keepMs > 0)
|
|
430
|
+
return ["giving the runner sandbox no network access", ...released, `keeping it running ${keepTimeText(keepMs)}`];
|
|
431
|
+
if (release === undefined)
|
|
432
|
+
return [`${done ? "stopped and deleted" : "stopping and deleting"} the runner sandbox`];
|
|
433
|
+
return done
|
|
434
|
+
? ["stopped the runner sandbox", release, "deleted it"]
|
|
435
|
+
: ["stopping the runner sandbox", release, "deleting it"];
|
|
427
436
|
}
|
|
428
437
|
function statusGlyph(status, now, paint) {
|
|
429
438
|
switch (status) {
|
|
@@ -439,7 +448,7 @@ function statusGlyph(status, now, paint) {
|
|
|
439
448
|
return paint.stopped("■");
|
|
440
449
|
}
|
|
441
450
|
}
|
|
442
|
-
/** How the command ended, after its argument list on the
|
|
451
|
+
/** How the command ended, after its argument list on the command row. */
|
|
443
452
|
function endText(outcome) {
|
|
444
453
|
return outcome === "stopped" ? "stopped" : commandEnd(outcome);
|
|
445
454
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/commands/exec/metadata.ts
|
|
2
2
|
var metadata = {
|
|
3
|
-
description:
|
|
4
|
-
summary: "Run any command
|
|
3
|
+
description: `Run any command, the argument list after --, as it is, with the run payload in STORM_RUN. For a project's tests declared in storm.config.ts, use storm test, which finds the driver's program and can count the tests and size the run first (testPlan in storm.config.ts or --count-tests); exec counts nothing and sizes nothing. Where the command runs is the runner declared at the top level of storm.config.ts (launchMachine() or vercelSandbox({ \u2026 })), or --runner launch-machine, which runs on the launch machine and needs no config file. On the launch machine, the command runs on this machine in the working directory, with this machine's environment less the launcher environment variables the run's resources hide, plus STORM_RUN, and FORCE_COLOR or NO_COLOR only when neither is set and the launcher asks for or opts out of color. With vercelSandbox({ \u2026 }), it runs in a runner sandbox, a Vercel Sandbox readied from the runner recipe in storm.config.ts, in the recipe's cwd, with the runner sandbox's own environment, a PATH that starts with node_modules/.bin of that cwd and of the repository's root, the recipe's env, FORCE_COLOR or NO_COLOR only when that env sets neither and the launcher asks for or opts out of color (a plain non-TTY launcher gets neither), any variables declared in the recipe's unsafeSecretEnvVars (each read from its source, { kind: "env", name }; command-only, never in steps or snapshots, and incompatible with keeping the runner sandbox), and STORM_RUN, and nothing else from this machine's environment; during the toolchain and prebuild steps of a snapshot build, then from the install until the command has ended, never during the upload or the apply, the Sandbox firewall adds each credential the recipe's credentials key declares\u2014the value read from its source ({ kind: "env", name })\u2014as its header to the requests to its domain, GET and HEAD only by default, answering every other request to that domain with 403, or every request with requests: "all", so the value never enters the runner sandbox; storm shows each value as <token> in what it prints and writes, and a run in a runner sandbox refuses before it starts when one of them is unset, holds a line break, or is shorter than 8 characters; each path under the repository's root in its arguments points at the runner sandbox's copy, and each in its output back at this checkout. The run has each resource that storm.config.ts declares under resources or that one of the resource's own flags names, unless the resource skips itself: it first acquires each one, while the Vercel Sandbox runner readies its runner sandbox, hands it to the command under the run payload's resources, and releases it once the command has stopped; without one, the run payload names no resource. While the command runs in a runner sandbox, and only then, the Sandbox firewall adds each sandbox credential a resource gives the command to the requests to its domain, replacing a header of that name the request carries, so the value never enters the runner sandbox; a resource that gives one needs a runner sandbox, so a run on the launch machine that uses it is refused with resource_needs_runner_sandbox before it starts. Each resource's flags and examples are below, and its own commands are under storm ext. Shows on stderr what runs when and what runs at once, live on a terminal and one line at a time elsewhere, then a waterfall of the run's lanes naming its critical path, and exits with the command's code. Each run writes what it was and how it ended, its events, its steps' output, its command's output, its test events, and its timeline to a run directory under \${XDG_STATE_HOME:-~/.local/state}/storm/runs/, named for its run id, keeping the newest 1000 completed ones and every one whose run is still going; the summary names the run id, storm runs show reads the run back, and storm runs logs prints its command's output and its steps' logs. A flag overrides storm.config.ts, found in the working directory or a parent up to the git worktree's root and checked whole, which overrides the built-in default. A resource's secrets, such as a token it reads from this machine's environment, show as <token> in what the run prints and writes. With --sandboxes <n> and the Vercel Sandbox runner, it is a run across runner sandboxes: one mint and one runner snapshot serve n runner sandboxes, which start at once, and each runner sandbox runs the command with {sandbox} replaced by its runner sandbox index (from 0), {sandbox+1} by its index plus one, and {sandboxes} by n; storm.config.ts must set runner.sandboxes.max; each resource of the run is acquired once and split across the runner sandboxes, each runner sandbox getting its own part; it prints status lines and no command output, each runner sandbox's output goes to its own command log in the run directory, and storm exits 0 when every runner sandbox passed, else 1.`,
|
|
4
|
+
summary: "Run any command with the declared runner or on the launch machine."
|
|
5
5
|
};
|
|
6
6
|
export {
|
|
7
7
|
metadata
|
|
@@ -6,19 +6,19 @@ export declare const mintFailedErrors: import("@vercel/clinkr").SharedErrors<{
|
|
|
6
6
|
cause: z.ZodString;
|
|
7
7
|
fix: z.ZodString;
|
|
8
8
|
runner: z.ZodBoolean;
|
|
9
|
-
cleanup: z.ZodType<import("
|
|
9
|
+
cleanup: z.ZodType<import("../../shared/cleanup.ts").StormCleanupFacts, import("../../shared/cleanup.ts").StormCleanupFacts, z.core.$ZodTypeInternals<import("../../shared/cleanup.ts").StormCleanupFacts, import("../../shared/cleanup.ts").StormCleanupFacts>>;
|
|
10
10
|
}, z.core.$strip>;
|
|
11
11
|
}, {
|
|
12
12
|
readonly mintFailed: {
|
|
13
13
|
readonly exitCode: 1;
|
|
14
|
-
readonly description: "The vercel CLI couldn't mint a credential, so the command didn't run.
|
|
14
|
+
readonly description: "The vercel CLI couldn't mint a credential, so the command didn't run. With the Vercel Sandbox runner, the credential was for the runner sandbox, which always needs one; on the launch machine, for a resource that couldn't go on without it.";
|
|
15
15
|
readonly schema: z.ZodObject<{
|
|
16
16
|
team: z.ZodString;
|
|
17
17
|
project: z.ZodString;
|
|
18
18
|
cause: z.ZodString;
|
|
19
19
|
fix: z.ZodString;
|
|
20
20
|
runner: z.ZodBoolean;
|
|
21
|
-
cleanup: z.ZodType<import("
|
|
21
|
+
cleanup: z.ZodType<import("../../shared/cleanup.ts").StormCleanupFacts, import("../../shared/cleanup.ts").StormCleanupFacts, z.core.$ZodTypeInternals<import("../../shared/cleanup.ts").StormCleanupFacts, import("../../shared/cleanup.ts").StormCleanupFacts>>;
|
|
22
22
|
}, z.core.$strip>;
|
|
23
23
|
readonly render: ({ cause, fix, runner, cleanup }: {
|
|
24
24
|
team: string;
|
|
@@ -26,7 +26,7 @@ export declare const mintFailedErrors: import("@vercel/clinkr").SharedErrors<{
|
|
|
26
26
|
cause: string;
|
|
27
27
|
fix: string;
|
|
28
28
|
runner: boolean;
|
|
29
|
-
cleanup: import("
|
|
29
|
+
cleanup: import("../../shared/cleanup.ts").StormCleanupFacts;
|
|
30
30
|
}) => {
|
|
31
31
|
message: string;
|
|
32
32
|
rows?: readonly import("@vercel/clinkr").Row[];
|