@cnc-tools/storm 0.14.2 → 0.16.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 +9 -7
- package/dist/build-info.js +1 -1
- package/dist/chunks/chunk-2MAD5NKK.js +108 -0
- package/dist/chunks/{chunk-HDL4WKIB.js → chunk-3L52KNQA.js} +2 -2
- package/dist/chunks/{chunk-GSC6SRTW.js → chunk-5CCP36QQ.js} +1 -1
- package/dist/chunks/{chunk-43MWZLJR.js → chunk-5VXBKPW6.js} +1 -1
- package/dist/chunks/chunk-7EENF73W.js +782 -0
- package/dist/chunks/{chunk-RA4L2ACU.js → chunk-AWBSONHB.js} +88 -34
- package/dist/chunks/chunk-CK2GZEPK.js +40 -0
- package/dist/chunks/{chunk-BRUIATTR.js → chunk-CN4EFA5J.js} +59 -12
- package/dist/chunks/{chunk-I7AN3DIJ.js → chunk-DC2CDHNK.js} +1928 -738
- package/dist/chunks/{chunk-UUBZTGLV.js → chunk-DWEAHX4T.js} +140 -130
- package/dist/chunks/{chunk-T6AZIDZD.js → chunk-F6N34UWB.js} +12 -244
- package/dist/chunks/chunk-FCQUJDA4.js +963 -0
- package/dist/chunks/{chunk-VH2POPW5.js → chunk-FOZWA52V.js} +635 -79
- package/dist/chunks/{chunk-XZCDA5PE.js → chunk-G3PHMXH5.js} +7 -2
- package/dist/chunks/{chunk-3HBPNQ4Y.js → chunk-HVNK3I45.js} +2 -2
- package/dist/chunks/chunk-OIY3DMF2.js +74 -0
- package/dist/chunks/{chunk-GJOEPJJL.js → chunk-P357TZAY.js} +446 -52
- package/dist/chunks/{chunk-UC6DULWY.js → chunk-R7XVBZOY.js} +130 -39
- package/dist/chunks/chunk-TJNFVNKR.js +246 -0
- package/dist/chunks/{chunk-RUPD4TLT.js → chunk-V4IKA3WI.js} +198 -63
- package/dist/chunks/{chunk-BW2ADH7U.js → chunk-VUPZH7J2.js} +1 -1
- package/dist/chunks/{chunk-LUOHJ3LB.js → chunk-Z5PBVG3Y.js} +1131 -468
- package/dist/chunks/{chunk-GQIL3AHY.js → chunk-ZG3WQ4UF.js} +1 -1
- package/dist/chunks/{live-app-SZGEILCQ.js → live-app-WECQOQ4C.js} +28 -23
- 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 +230 -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 +583 -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 +533 -73
- package/dist/commands/exec/outcomes.js +203 -67
- package/dist/commands/exec/plan-only.d.ts +10 -0
- package/dist/commands/exec/plan-only.js +45 -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 +42 -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 +344 -63
- package/dist/commands/exec/run-command.js +312 -263
- 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 +53 -10
- package/dist/commands/runs/facts.js +60 -32
- package/dist/commands/runs/list/command.d.ts +82 -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 +41 -2
- package/dist/commands/runs/logs/command.d.ts +109 -10
- 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 +52 -3
- package/dist/commands/runs/logs/outcomes.js +110 -6
- package/dist/commands/runs/past-run.d.ts +91 -11
- package/dist/commands/runs/past-run.js +149 -9
- package/dist/commands/runs/show/command.d.ts +574 -12
- 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 +279 -6
- 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 +5 -1
- 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 +163 -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 +1395 -0
- package/dist/commands/test/command.js +581 -0
- package/dist/commands/test/metadata.js +8 -0
- package/dist/commands/test/outcomes.d.ts +768 -0
- package/dist/commands/test/outcomes.js +140 -0
- package/dist/commands/test/plan.d.ts +92 -0
- package/dist/commands/test/plan.js +125 -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 +15 -0
- package/dist/config/check-runner.js +79 -0
- package/dist/config/check-suites.d.ts +14 -0
- package/dist/config/check-suites.js +100 -0
- package/dist/config/gateways.d.ts +31 -3
- package/dist/config/index.d.ts +8 -6
- package/dist/config/index.js +5 -4
- package/dist/config/live/config-gateway.js +5 -2
- 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 +32 -14
- package/dist/config/load.js +162 -116
- 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 +23 -0
- package/dist/config/runner.js +4 -0
- package/dist/config/schema.d.ts +39 -19
- package/dist/config/schema.js +50 -10
- 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/typed-options.d.ts +1 -6
- package/dist/config/typed-options.js +2 -10
- package/dist/config-file/define.d.ts +45 -24
- package/dist/config-file/define.js +9 -8
- package/dist/config-file/runner.d.ts +11 -0
- package/dist/config-file/runner.js +9 -0
- package/dist/config-file/toolchain.d.ts +13 -7
- package/dist/config-file/toolchain.js +51 -35
- package/dist/context.d.ts +12 -8
- package/dist/context.js +9 -3
- 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 +2 -1
- package/dist/core/payload.js +2 -1
- 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 +6 -6
- package/dist/extensions/testserver/resource.js +3 -3
- 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.js +4 -3
- 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 +84 -0
- package/dist/planning/plan-only.js +86 -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 +29 -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 -5
- 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/base.d.ts +0 -6
- package/dist/runner/base.js +0 -15
- package/dist/runner/build-snapshots.d.ts +7 -7
- package/dist/runner/build-snapshots.js +19 -24
- package/dist/runner/events.d.ts +29 -8
- package/dist/runner/gateways.d.ts +54 -6
- package/dist/runner/index.d.ts +6 -4
- package/dist/runner/index.js +3 -2
- package/dist/runner/live/sandbox-gateway.js +173 -31
- 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 +16 -16
- package/dist/runner/prepare.js +11 -12
- 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 +151 -63
- package/dist/runner/recipe.js +277 -200
- package/dist/runner/sandboxed-command.d.ts +22 -8
- package/dist/runner/sandboxed-command.js +33 -10
- 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 +8 -5
- package/dist/runner/snapshot-build.js +56 -29
- package/dist/runner/snapshot-choice.d.ts +37 -0
- package/dist/runner/snapshot-choice.js +38 -0
- package/dist/runner/snapshot-inspect.d.ts +4 -4
- package/dist/runner/snapshot-inspect.js +7 -7
- package/dist/runner/snapshot-key.d.ts +27 -17
- package/dist/runner/snapshot-key.js +51 -26
- 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 +16 -12
- package/dist/sdk/extension/resource-definition.js +10 -4
- package/dist/sdk/extension/resource-factory.js +3 -4
- 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/present.d.ts +3 -3
- package/dist/sdk/run/present.js +1 -3
- 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 +23 -17
- package/skills/plan-runs.md +67 -0
- package/skills/read-run-output.md +51 -19
- package/dist/chunks/chunk-E3QU74NX.js +0 -49
- package/dist/chunks/chunk-HP54VHGY.js +0 -201
- package/dist/chunks/chunk-NMVODY3P.js +0 -19
- package/dist/chunks/chunk-TVMEKVOW.js +0 -607
- 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/config/recipe-run.d.ts +0 -26
- package/dist/config/recipe-run.js +0 -27
- 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
|
@@ -0,0 +1,782 @@
|
|
|
1
|
+
import {
|
|
2
|
+
RUN_CLEANUP,
|
|
3
|
+
acrossSandboxesJobSummaryMarkdown,
|
|
4
|
+
beforeRunStarts,
|
|
5
|
+
buildPlannedFacts,
|
|
6
|
+
checkoutGit,
|
|
7
|
+
commandEnd,
|
|
8
|
+
displayPath,
|
|
9
|
+
lacksFinalResults,
|
|
10
|
+
logsText,
|
|
11
|
+
mapStoppedOutcome,
|
|
12
|
+
plainRenderer,
|
|
13
|
+
planCommandRun,
|
|
14
|
+
plannedSecrets,
|
|
15
|
+
prepareRefusal,
|
|
16
|
+
progressLine,
|
|
17
|
+
recipeResources,
|
|
18
|
+
runLifecycle,
|
|
19
|
+
runPlannedCommand,
|
|
20
|
+
runnerRequestFor,
|
|
21
|
+
sandboxesDefaultErrors,
|
|
22
|
+
sandboxesErrors
|
|
23
|
+
} from "./chunk-Z5PBVG3Y.js";
|
|
24
|
+
import {
|
|
25
|
+
versionText
|
|
26
|
+
} from "./chunk-I5GZLOLQ.js";
|
|
27
|
+
import {
|
|
28
|
+
RESOURCE_FLAG_HELP,
|
|
29
|
+
RESOURCE_USAGE_FLAGS,
|
|
30
|
+
fileListMismatchText,
|
|
31
|
+
fileListMismatches,
|
|
32
|
+
recordedPlan,
|
|
33
|
+
resourceRunExamples,
|
|
34
|
+
testsChart,
|
|
35
|
+
testsSummaryLines,
|
|
36
|
+
waterfallLines
|
|
37
|
+
} from "./chunk-FCQUJDA4.js";
|
|
38
|
+
import {
|
|
39
|
+
DEFINITION_SET
|
|
40
|
+
} from "./chunk-DWEAHX4T.js";
|
|
41
|
+
import {
|
|
42
|
+
redactStrings,
|
|
43
|
+
redactingObserver,
|
|
44
|
+
redactingTerminal,
|
|
45
|
+
redactor
|
|
46
|
+
} from "./chunk-HVNK3I45.js";
|
|
47
|
+
import {
|
|
48
|
+
sandboxConnectPage,
|
|
49
|
+
sandboxStateText,
|
|
50
|
+
sandboxTableLines,
|
|
51
|
+
sandboxTotalsLine,
|
|
52
|
+
sandboxesText
|
|
53
|
+
} from "./chunk-2MAD5NKK.js";
|
|
54
|
+
import {
|
|
55
|
+
recordAcrossSandboxes
|
|
56
|
+
} from "./chunk-P357TZAY.js";
|
|
57
|
+
import {
|
|
58
|
+
isoSecondsText,
|
|
59
|
+
keepTimeText,
|
|
60
|
+
paint,
|
|
61
|
+
seconds
|
|
62
|
+
} from "./chunk-G3PHMXH5.js";
|
|
63
|
+
import {
|
|
64
|
+
acrossSandboxesExitStatus,
|
|
65
|
+
executeAcrossSandboxes,
|
|
66
|
+
timedProgress
|
|
67
|
+
} from "./chunk-FOZWA52V.js";
|
|
68
|
+
import {
|
|
69
|
+
parseKeepTime,
|
|
70
|
+
prepareRunner
|
|
71
|
+
} from "./chunk-DC2CDHNK.js";
|
|
72
|
+
import {
|
|
73
|
+
refused
|
|
74
|
+
} from "./chunk-VL7WFTVQ.js";
|
|
75
|
+
|
|
76
|
+
// src/commands/exec/sandbox-lines.ts
|
|
77
|
+
function sandboxLine(elapsedMs, sandbox, text) {
|
|
78
|
+
return `${`[+${seconds(elapsedMs)}]`.padEnd(8)} runner sandbox ${sandbox} ${text}`;
|
|
79
|
+
}
|
|
80
|
+
function shellWord(argument) {
|
|
81
|
+
return /^[\w@%+=:,./{}-]+$/.test(argument) ? argument : `'${argument.replaceAll("'", `'\\''`)}'`;
|
|
82
|
+
}
|
|
83
|
+
function acrossSandboxesHeaderLines(run) {
|
|
84
|
+
return [
|
|
85
|
+
`storm ${versionText(run.version, run.commit)} \xB7 ${sandboxesText(run.count)} \xB7 ${run.argv.map(shellWord).join(" ")}`,
|
|
86
|
+
`run directory ${run.runDirectory}`
|
|
87
|
+
];
|
|
88
|
+
}
|
|
89
|
+
function sandboxTestsText(totals) {
|
|
90
|
+
if (totals === null || totals === void 0) return void 0;
|
|
91
|
+
const { passed, failed, skipped } = totals;
|
|
92
|
+
if (failed === 0 && skipped === 0) return `${passed} ${passed === 1 ? "test" : "tests"} passed`;
|
|
93
|
+
return [
|
|
94
|
+
...passed > 0 ? [`${passed} passed`] : [],
|
|
95
|
+
...failed > 0 ? [`${failed} failed`] : [],
|
|
96
|
+
...skipped > 0 ? [`${skipped} skipped`] : []
|
|
97
|
+
].join(", ");
|
|
98
|
+
}
|
|
99
|
+
function acrossSandboxesEndLines(input) {
|
|
100
|
+
const style = input.paint ?? paint(false);
|
|
101
|
+
const { records } = input;
|
|
102
|
+
return [
|
|
103
|
+
...input.sandboxes.flatMap(({ sandbox, waterfall }) => [
|
|
104
|
+
"",
|
|
105
|
+
style.strong(` runner sandbox ${sandbox}`),
|
|
106
|
+
...waterfall
|
|
107
|
+
]),
|
|
108
|
+
"",
|
|
109
|
+
...input.tests,
|
|
110
|
+
...sandboxTableLines(records, style),
|
|
111
|
+
` ${sandboxTotalsLine(records)}`,
|
|
112
|
+
...(input.mismatches ?? []).map(
|
|
113
|
+
(mismatch) => style.stopped(
|
|
114
|
+
` ${fileListMismatchText(
|
|
115
|
+
mismatch,
|
|
116
|
+
input.extraMismatchHint === void 0 ? {} : { extraHint: input.extraMismatchHint }
|
|
117
|
+
)}`
|
|
118
|
+
)
|
|
119
|
+
),
|
|
120
|
+
...showsFailed(records, input.runId) ? [` storm runs show ${input.runId ?? ""} --failed`] : [],
|
|
121
|
+
` logs ${input.logs}`
|
|
122
|
+
];
|
|
123
|
+
}
|
|
124
|
+
function showsFailed(records, runId) {
|
|
125
|
+
return runId !== void 0 && records.some(({ state }) => state !== "passed");
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// src/commands/exec/sandbox-progress.ts
|
|
129
|
+
var PROGRESS_INTERVAL_MS = 1e4;
|
|
130
|
+
var FAILED_TEST_LINES = 5;
|
|
131
|
+
var NAMED_RUNNING_FILES = 2;
|
|
132
|
+
var STEP_TEXT = {
|
|
133
|
+
snapshot: "building the runner snapshot",
|
|
134
|
+
apply: "applying the changes",
|
|
135
|
+
install: "installing",
|
|
136
|
+
build: "building"
|
|
137
|
+
};
|
|
138
|
+
function wholeSeconds(ms) {
|
|
139
|
+
return `${Math.max(0, Math.floor(ms / 1e3))}s`;
|
|
140
|
+
}
|
|
141
|
+
function runningFilesText(running, now, named = NAMED_RUNNING_FILES) {
|
|
142
|
+
if (running.size === 0) return void 0;
|
|
143
|
+
const longest = [...running].toSorted(([, a], [, b]) => a - b);
|
|
144
|
+
const shown = longest.slice(0, named).map(([file, since]) => `${file} ${wholeSeconds(now - since)}`);
|
|
145
|
+
const more = longest.length - shown.length;
|
|
146
|
+
return `waiting on ${[...shown, ...more > 0 ? [`${more} more`] : []].join(", ")}`;
|
|
147
|
+
}
|
|
148
|
+
function sandboxProgressText(progress) {
|
|
149
|
+
const { finishedFiles, listed, runningFiles } = progress;
|
|
150
|
+
const files = listed !== null && (finishedFiles > 0 || runningFiles !== void 0) ? [`${finishedFiles} of ${listed} files`] : finishedFiles > 0 ? [`${finishedFiles} ${finishedFiles === 1 ? "file" : "files"} done`] : [];
|
|
151
|
+
const tests = sandboxTestsText(progress.totals);
|
|
152
|
+
const countParts = [...files, ...tests === void 0 ? [] : [tests]];
|
|
153
|
+
const parts = [...countParts, ...runningFiles === void 0 ? [] : [runningFiles]];
|
|
154
|
+
if (parts.length === 0) return void 0;
|
|
155
|
+
return { parts, counts: countParts.join(" \xB7 ") };
|
|
156
|
+
}
|
|
157
|
+
function endedText(ended) {
|
|
158
|
+
const state = sandboxStateText(ended.state);
|
|
159
|
+
if (ended.state === "canceled") return state;
|
|
160
|
+
if (ended.exitCode !== null) return `${state}: exit ${ended.exitCode}`;
|
|
161
|
+
return ended.cause === null ? state : `${state}: ${ended.cause}`;
|
|
162
|
+
}
|
|
163
|
+
function endTone(state, style) {
|
|
164
|
+
if (state === "passed") return style.done;
|
|
165
|
+
return state === "canceled" ? style.stopped : style.failed;
|
|
166
|
+
}
|
|
167
|
+
function sandboxProgress(options) {
|
|
168
|
+
const { count } = options;
|
|
169
|
+
const own = plainRenderer({ github: false });
|
|
170
|
+
let origin;
|
|
171
|
+
let started = false;
|
|
172
|
+
let stopping = false;
|
|
173
|
+
const activities = /* @__PURE__ */ new Map();
|
|
174
|
+
const listed = (sandbox) => options.listed?.[sandbox] ?? null;
|
|
175
|
+
const activity = (sandbox) => {
|
|
176
|
+
const known = activities.get(sandbox);
|
|
177
|
+
if (known !== void 0) return known;
|
|
178
|
+
const fresh = {
|
|
179
|
+
phase: { kind: "waiting" },
|
|
180
|
+
finished: /* @__PURE__ */ new Set(),
|
|
181
|
+
running: /* @__PURE__ */ new Map(),
|
|
182
|
+
totals: void 0,
|
|
183
|
+
failedLines: 0,
|
|
184
|
+
lastLineAt: 0,
|
|
185
|
+
lastCounts: void 0
|
|
186
|
+
};
|
|
187
|
+
activities.set(sandbox, fresh);
|
|
188
|
+
return fresh;
|
|
189
|
+
};
|
|
190
|
+
const progressOf = (sandbox, now, namedRunning) => {
|
|
191
|
+
const current = activity(sandbox);
|
|
192
|
+
return sandboxProgressText({
|
|
193
|
+
finishedFiles: current.finished.size,
|
|
194
|
+
listed: listed(sandbox),
|
|
195
|
+
totals: current.totals,
|
|
196
|
+
runningFiles: runningFilesText(current.running, now, namedRunning)
|
|
197
|
+
});
|
|
198
|
+
};
|
|
199
|
+
const lines = (timed) => {
|
|
200
|
+
const { event, at } = timed;
|
|
201
|
+
const now = at.getTime();
|
|
202
|
+
origin ??= now;
|
|
203
|
+
const elapsed = now - origin;
|
|
204
|
+
const line = (sandbox2, text) => sandboxLine(elapsed, sandbox2, text);
|
|
205
|
+
if (event.kind === "sandboxes-started") {
|
|
206
|
+
started = true;
|
|
207
|
+
return options.header;
|
|
208
|
+
}
|
|
209
|
+
if (event.kind === "sandbox-ended") {
|
|
210
|
+
const current2 = activity(event.sandbox);
|
|
211
|
+
if (current2.phase.kind === "ended" && current2.phase.state === event.state) return [];
|
|
212
|
+
const text = endedText(event);
|
|
213
|
+
if (current2.phase.kind !== "ended") current2.phase = { kind: "ended", text, state: event.state };
|
|
214
|
+
return [line(event.sandbox, text)];
|
|
215
|
+
}
|
|
216
|
+
if (event.kind === "cleanup-started" || event.kind === "cleanup-finished") return [];
|
|
217
|
+
if (event.kind === "runner" && event.event.kind === "step-output") return [];
|
|
218
|
+
if (event.kind !== "sandbox") return own(timed);
|
|
219
|
+
const { sandbox, event: inner } = event;
|
|
220
|
+
const current = activity(sandbox);
|
|
221
|
+
if (inner.kind === "command-started") {
|
|
222
|
+
current.phase = { kind: "running", since: now };
|
|
223
|
+
current.lastLineAt = now;
|
|
224
|
+
return [line(sandbox, "command started")];
|
|
225
|
+
}
|
|
226
|
+
if (inner.kind === "command-ended") {
|
|
227
|
+
const { outcome } = inner;
|
|
228
|
+
const state = outcome.kind === "exited" && outcome.code === 0 ? "passed" : "failed";
|
|
229
|
+
const how = state === "passed" ? "passed" : `failed: ${outcome.kind === "exited" ? `exit ${outcome.code}` : commandEnd(outcome)}`;
|
|
230
|
+
const tests = sandboxTestsText(current.totals);
|
|
231
|
+
const text = `${how} after ${seconds(inner.ms)}${tests === void 0 ? "" : ` \xB7 ${tests}`}`;
|
|
232
|
+
current.phase = { kind: "ended", text, state };
|
|
233
|
+
current.running.clear();
|
|
234
|
+
return [line(sandbox, text)];
|
|
235
|
+
}
|
|
236
|
+
if (inner.kind === "test") {
|
|
237
|
+
const test = inner.event;
|
|
238
|
+
const runs = current.phase.kind === "running";
|
|
239
|
+
if (test.kind === "file-started" && runs) current.running.set(test.file, now);
|
|
240
|
+
if (test.kind === "file-finished") {
|
|
241
|
+
current.running.delete(test.file);
|
|
242
|
+
current.finished.add(test.file);
|
|
243
|
+
}
|
|
244
|
+
if (test.kind !== "test-result") return [];
|
|
245
|
+
const counted = current.totals ?? { passed: 0, failed: 0, skipped: 0 };
|
|
246
|
+
if (test.state === "pass") counted.passed += 1;
|
|
247
|
+
else if (test.state === "fail") counted.failed += 1;
|
|
248
|
+
else counted.skipped += 1;
|
|
249
|
+
current.totals = counted;
|
|
250
|
+
if (test.state !== "fail" || !runs) return [];
|
|
251
|
+
current.failedLines += 1;
|
|
252
|
+
if (current.failedLines <= FAILED_TEST_LINES) return [line(sandbox, `test failed: ${test.file} > ${test.test}`)];
|
|
253
|
+
return current.failedLines === FAILED_TEST_LINES + 1 ? [line(sandbox, "more tests failed; its end line counts them")] : [];
|
|
254
|
+
}
|
|
255
|
+
if (inner.kind !== "runner") return [];
|
|
256
|
+
const runner = inner.event;
|
|
257
|
+
if (current.phase.kind === "waiting" || current.phase.kind === "preparing") {
|
|
258
|
+
if (runner.kind === "runner-sandbox-starting")
|
|
259
|
+
current.phase = { kind: "preparing", text: "starting its runner sandbox", since: now };
|
|
260
|
+
if (runner.kind === "uploading") current.phase = { kind: "preparing", text: "uploading the changes", since: now };
|
|
261
|
+
if (runner.kind === "step-started")
|
|
262
|
+
current.phase = { kind: "preparing", text: STEP_TEXT[runner.phase], since: now };
|
|
263
|
+
}
|
|
264
|
+
if (runner.kind === "sandbox-started" && runner.role === "runner")
|
|
265
|
+
return [line(sandbox, `runner sandbox ${runner.name} started (${seconds(runner.ms)})`)];
|
|
266
|
+
if (runner.kind === "sandbox-kept")
|
|
267
|
+
return [line(sandbox, `runner sandbox ${runner.name} kept until ${isoSecondsText(runner.stopsAt)}`)];
|
|
268
|
+
if (runner.kind !== "stopping" || stopping) return [];
|
|
269
|
+
stopping = true;
|
|
270
|
+
const then = runner.keepMs > 0 ? `keeping each runner sandbox running ${keepTimeText(runner.keepMs)}` : "stopping and deleting the runner's sandboxes";
|
|
271
|
+
return [
|
|
272
|
+
progressLine(elapsed, "cleanup", `stopping: killing each runner sandbox's command that runs, then ${then}\u2026`)
|
|
273
|
+
];
|
|
274
|
+
};
|
|
275
|
+
const tick = (now) => {
|
|
276
|
+
if (origin === void 0) return [];
|
|
277
|
+
const due = [];
|
|
278
|
+
for (const [sandbox, current] of [...activities].toSorted(([a], [b]) => a - b)) {
|
|
279
|
+
const { phase } = current;
|
|
280
|
+
if (phase.kind !== "running" || now - current.lastLineAt < PROGRESS_INTERVAL_MS) continue;
|
|
281
|
+
const progress = progressOf(sandbox, now);
|
|
282
|
+
if (progress === void 0) continue;
|
|
283
|
+
if (progress.counts === current.lastCounts && current.running.size === 0) continue;
|
|
284
|
+
current.lastLineAt = now;
|
|
285
|
+
current.lastCounts = progress.counts;
|
|
286
|
+
due.push(
|
|
287
|
+
sandboxLine(now - origin, sandbox, [`running ${seconds(now - phase.since)}`, ...progress.parts].join(" \xB7 "))
|
|
288
|
+
);
|
|
289
|
+
}
|
|
290
|
+
return due;
|
|
291
|
+
};
|
|
292
|
+
const rows = (now, style = paint(false)) => {
|
|
293
|
+
if (!started) return [];
|
|
294
|
+
return Array.from({ length: count }, (_, index) => {
|
|
295
|
+
const sandbox = index;
|
|
296
|
+
const label = style.strong(` runner sandbox ${sandbox}`);
|
|
297
|
+
const { phase } = activity(sandbox);
|
|
298
|
+
switch (phase.kind) {
|
|
299
|
+
case "waiting":
|
|
300
|
+
return `${label} ${style.faint("waiting")}`;
|
|
301
|
+
case "preparing":
|
|
302
|
+
return `${label} ${style.active(`${phase.text} ${wholeSeconds(now - phase.since)}`)}`;
|
|
303
|
+
case "running": {
|
|
304
|
+
const progress = progressOf(sandbox, now, 1);
|
|
305
|
+
return `${label} ${[seconds(now - phase.since), ...progress?.parts ?? []].join(" \xB7 ")}`;
|
|
306
|
+
}
|
|
307
|
+
case "ended":
|
|
308
|
+
return `${label} ${endTone(phase.state, style)(phase.text)}`;
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
};
|
|
312
|
+
return { lines, tick, rows };
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
// src/commands/exec/sandbox-view.ts
|
|
316
|
+
var PROGRESS_TICK_MS = 1e3;
|
|
317
|
+
function sandboxView(app, progress, status) {
|
|
318
|
+
if (progress === void 0) return { observer: { observe: async () => {
|
|
319
|
+
} }, finish: () => {
|
|
320
|
+
} };
|
|
321
|
+
const { clock, timer } = app.context;
|
|
322
|
+
if (app.presentation.kind === "live") {
|
|
323
|
+
const terminal = app.context.progressTerminal;
|
|
324
|
+
const style = paint(app.presentation.colorDepth !== "none");
|
|
325
|
+
let shown = false;
|
|
326
|
+
let finished2 = false;
|
|
327
|
+
return {
|
|
328
|
+
observer: {
|
|
329
|
+
observe: async (timed) => {
|
|
330
|
+
if (finished2) return;
|
|
331
|
+
const lines = status.lines(timed);
|
|
332
|
+
if (lines.length > 0) terminal.print("stderr", lines.map((line) => `${line}
|
|
333
|
+
`).join(""));
|
|
334
|
+
if (!shown && timed.event.kind === "sandboxes-started") {
|
|
335
|
+
shown = true;
|
|
336
|
+
terminal.show(() => finished2 ? [] : status.rows(clock.now().getTime(), style));
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
finish: () => {
|
|
341
|
+
if (finished2) return;
|
|
342
|
+
finished2 = true;
|
|
343
|
+
if (shown) terminal.settle();
|
|
344
|
+
}
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
let failed = false;
|
|
348
|
+
const write = async (lines) => {
|
|
349
|
+
for (const line of lines) {
|
|
350
|
+
if (failed) return;
|
|
351
|
+
try {
|
|
352
|
+
await progress(line);
|
|
353
|
+
} catch {
|
|
354
|
+
failed = true;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
};
|
|
358
|
+
const finished = new AbortController();
|
|
359
|
+
const tick = async () => {
|
|
360
|
+
for (; ; ) {
|
|
361
|
+
await timer.sleep(PROGRESS_TICK_MS, finished.signal);
|
|
362
|
+
if (finished.signal.aborted) return;
|
|
363
|
+
await write(status.tick(clock.now().getTime()));
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
void tick();
|
|
367
|
+
return {
|
|
368
|
+
observer: { observe: async (timed) => await write(status.lines(timed)) },
|
|
369
|
+
finish: () => finished.abort()
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
// src/commands/exec/across-sandboxes-run.ts
|
|
374
|
+
var SANDBOXES_MAX_KEY = "runner.sandboxes.max";
|
|
375
|
+
var SANDBOXES_DEFAULT_KEY = "runner.sandboxes.default";
|
|
376
|
+
var SHOW_OUTPUT_ACROSS_SANDBOXES = "a run across runner sandboxes prints status lines and no step output, and each runner sandbox entry of its run directory keeps its step logs; drop --show-output.";
|
|
377
|
+
function acrossSandboxesWhere(where) {
|
|
378
|
+
if (where.kind !== "runner") throw new Error("a run across runner sandboxes has a runner");
|
|
379
|
+
return where;
|
|
380
|
+
}
|
|
381
|
+
function sandboxKeepMs(flag) {
|
|
382
|
+
const minutes = flag === void 0 ? 0 : parseKeepTime(flag) ?? 0;
|
|
383
|
+
return minutes * 6e4;
|
|
384
|
+
}
|
|
385
|
+
async function planAskedSandboxesRun(app, request, asked, planSandboxes, signal) {
|
|
386
|
+
return await planCommandRun(
|
|
387
|
+
app,
|
|
388
|
+
request,
|
|
389
|
+
async (planned, planSignal, settings) => {
|
|
390
|
+
const where = acrossSandboxesWhere(planned);
|
|
391
|
+
const { configFile } = settings;
|
|
392
|
+
const policy = where.recipe.sandboxes;
|
|
393
|
+
if (policy === void 0)
|
|
394
|
+
return refused(sandboxesErrors.missingSandboxesMax({ flag: asked.flag, key: SANDBOXES_MAX_KEY, configFile }));
|
|
395
|
+
if (asked.count > policy.max)
|
|
396
|
+
return refused(
|
|
397
|
+
sandboxesErrors.sandboxesOverMax({
|
|
398
|
+
flag: asked.flag,
|
|
399
|
+
sandboxes: asked.count,
|
|
400
|
+
key: SANDBOXES_MAX_KEY,
|
|
401
|
+
max: policy.max,
|
|
402
|
+
configFile
|
|
403
|
+
})
|
|
404
|
+
);
|
|
405
|
+
return await planSandboxes({ where, max: policy.max, settings }, planSignal);
|
|
406
|
+
},
|
|
407
|
+
signal
|
|
408
|
+
);
|
|
409
|
+
}
|
|
410
|
+
async function planDefaultSandboxesRun(app, request, planCommand, planSandboxes, signal) {
|
|
411
|
+
const plan = await planCommandRun(
|
|
412
|
+
app,
|
|
413
|
+
request,
|
|
414
|
+
async (where, planSignal, settings) => {
|
|
415
|
+
const policy = where.kind === "runner" ? where.recipe.sandboxes : void 0;
|
|
416
|
+
if (where.kind !== "runner" || policy?.default === void 0)
|
|
417
|
+
return await planCommand(where, planSignal, settings);
|
|
418
|
+
return await planSandboxes({ where, max: policy.max, settings }, planSignal);
|
|
419
|
+
},
|
|
420
|
+
signal
|
|
421
|
+
);
|
|
422
|
+
if (!plan.ok || plan.planned.sandboxes === void 0) return plan;
|
|
423
|
+
if (request.showOutput)
|
|
424
|
+
return refused(
|
|
425
|
+
sandboxesDefaultErrors.sandboxesDefaultRefused({
|
|
426
|
+
key: SANDBOXES_DEFAULT_KEY,
|
|
427
|
+
sandboxes: plan.planned.sandboxes.sandboxes.length,
|
|
428
|
+
field: "showOutput",
|
|
429
|
+
problem: SHOW_OUTPUT_ACROSS_SANDBOXES,
|
|
430
|
+
configFile: plan.planned.configFile
|
|
431
|
+
})
|
|
432
|
+
);
|
|
433
|
+
return plan;
|
|
434
|
+
}
|
|
435
|
+
async function runPlannedAcrossSandboxes(context, request, spec, planned, lifecycles) {
|
|
436
|
+
const { app, ui, signal } = context;
|
|
437
|
+
const { configFile, argv, where } = planned;
|
|
438
|
+
const sandboxes = planned.sandboxes.sandboxes;
|
|
439
|
+
const count = sandboxes.length;
|
|
440
|
+
const plan = {
|
|
441
|
+
...recordedPlan(planned.testPlan, planned.planOptions) ?? { options: [] },
|
|
442
|
+
sandboxes: planned.sandboxes.count
|
|
443
|
+
};
|
|
444
|
+
const before = await beforeRunStarts(context, lifecycles, planned, request, plan);
|
|
445
|
+
if (!before.ok) return before.refusal;
|
|
446
|
+
const { used } = before;
|
|
447
|
+
const requested = await runnerRequestFor(app, where, used, {
|
|
448
|
+
configFile,
|
|
449
|
+
sandboxes: count,
|
|
450
|
+
keepMs: sandboxKeepMs(request.keepSandbox)
|
|
451
|
+
});
|
|
452
|
+
if (!requested.ok) return requested.refusal;
|
|
453
|
+
const { runner } = requested;
|
|
454
|
+
const secrets = [...used.secrets, ...where.secrets];
|
|
455
|
+
const redact = redactor(secrets);
|
|
456
|
+
const git = await checkoutGit(app.context.checkout, app.cwd);
|
|
457
|
+
const recording = await recordAcrossSandboxes(app.context.runDirectories, {
|
|
458
|
+
definitionSet: DEFINITION_SET,
|
|
459
|
+
clock: app.context.clock,
|
|
460
|
+
cwd: app.cwd,
|
|
461
|
+
configFile,
|
|
462
|
+
argv,
|
|
463
|
+
...spec.test === void 0 ? {} : { test: spec.test },
|
|
464
|
+
plan,
|
|
465
|
+
runner,
|
|
466
|
+
sandboxes,
|
|
467
|
+
git,
|
|
468
|
+
redact: (value) => redactStrings(value, redact)
|
|
469
|
+
});
|
|
470
|
+
const runDirectory = recording.opened.ok ? `${displayPath(recording.opened.path, app.env)}/` : `none: couldn't make ${recording.opened.failure.path}: ${recording.opened.failure.message}`;
|
|
471
|
+
const view = sandboxView(
|
|
472
|
+
app,
|
|
473
|
+
ui.progress,
|
|
474
|
+
sandboxProgress({
|
|
475
|
+
count,
|
|
476
|
+
listed: sandboxes.map(({ files }) => files === null ? null : files.length),
|
|
477
|
+
header: acrossSandboxesHeaderLines({
|
|
478
|
+
version: app.version,
|
|
479
|
+
commit: app.commit,
|
|
480
|
+
argv: argv.map(redact),
|
|
481
|
+
count,
|
|
482
|
+
runDirectory
|
|
483
|
+
}).map(redact)
|
|
484
|
+
})
|
|
485
|
+
);
|
|
486
|
+
const observer = recording.observer(view.observer);
|
|
487
|
+
const outcome = await runLifecycle({
|
|
488
|
+
execute: async () => await executeAcrossSandboxes(
|
|
489
|
+
DEFINITION_SET,
|
|
490
|
+
{
|
|
491
|
+
...app.context,
|
|
492
|
+
sandboxTerminal: (sandbox) => {
|
|
493
|
+
const terminal = recording.terminal(sandbox, app.context.runnerTerminal);
|
|
494
|
+
return secrets.length === 0 ? terminal : redactingTerminal(terminal, redact);
|
|
495
|
+
}
|
|
496
|
+
},
|
|
497
|
+
app.resourceContexts,
|
|
498
|
+
{
|
|
499
|
+
version: app.version,
|
|
500
|
+
commit: app.commit,
|
|
501
|
+
configFile,
|
|
502
|
+
verbose: request.verbose,
|
|
503
|
+
runner,
|
|
504
|
+
sandboxes: sandboxes.map((sandbox) => ({
|
|
505
|
+
argv: sandbox.argv,
|
|
506
|
+
...sandbox.files === null ? {} : { files: sandbox.files }
|
|
507
|
+
})),
|
|
508
|
+
resources: used.requests,
|
|
509
|
+
skipped: used.skipped
|
|
510
|
+
},
|
|
511
|
+
{ signal },
|
|
512
|
+
timedProgress(app.context.clock, secrets.length === 0 ? observer : redactingObserver(observer, redact))
|
|
513
|
+
),
|
|
514
|
+
redact,
|
|
515
|
+
hasSecrets: secrets.length > 0,
|
|
516
|
+
finishView: async () => view.finish(),
|
|
517
|
+
abandonRecording: async () => await recording.abandon()
|
|
518
|
+
});
|
|
519
|
+
view.finish();
|
|
520
|
+
const recorded = await recording.end(outcome);
|
|
521
|
+
const mismatches = outcome.kind === "sandboxes_ran" ? listMismatches(recorded) : [];
|
|
522
|
+
await summarizeAcrossSandboxes(app, ui.progress, {
|
|
523
|
+
command: spec.name,
|
|
524
|
+
hints: spec.hints,
|
|
525
|
+
...spec.extraMismatchHint === void 0 ? {} : { extraMismatchHint: spec.extraMismatchHint },
|
|
526
|
+
recording,
|
|
527
|
+
recorded,
|
|
528
|
+
outcome,
|
|
529
|
+
mismatches
|
|
530
|
+
});
|
|
531
|
+
if (outcome.kind === "sandboxes_ran") {
|
|
532
|
+
app.exit.status = acrossSandboxesExitStatus(outcome.sandboxes);
|
|
533
|
+
const facts = sandboxesRanFacts(app, { outcome, recorded, recording, plan, runner, configFile, mismatches });
|
|
534
|
+
const everyExited0 = outcome.sandboxes.every(({ state, exitCode }) => state === "passed" && exitCode === 0);
|
|
535
|
+
const noFinalTestResults = lacksFinalResults(everyExited0 ? 0 : null, {
|
|
536
|
+
finalResults: recorded.tests.events.filter((event) => event.kind === "test-result").length,
|
|
537
|
+
partial: recorded.tests.unreadable > 0 || recorded.tests.incomplete !== void 0,
|
|
538
|
+
collected: true
|
|
539
|
+
});
|
|
540
|
+
return spec.sandboxesRan(secrets.length === 0 ? facts : redactStrings(facts, redact), noFinalTestResults);
|
|
541
|
+
}
|
|
542
|
+
const keptLines = recorded.sandboxes.flatMap(
|
|
543
|
+
({ record }) => record.name === null || record.keptUntil === null ? [] : [`Kept runner sandbox ${record.sandbox}, ${record.name}, running until ${isoSecondsText(record.keptUntil)}.`]
|
|
544
|
+
);
|
|
545
|
+
return mapStoppedOutcome(outcome, {
|
|
546
|
+
commandLine: outcome.kind === "canceled" && outcome.commandStopped === true ? "Each command that was running was stopped in its runner sandbox." : "The command didn't run.",
|
|
547
|
+
keptLines
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
function listMismatches(recorded) {
|
|
551
|
+
return fileListMismatches(
|
|
552
|
+
recorded.sandboxes.map(({ record, tests }) => ({
|
|
553
|
+
sandbox: record.sandbox,
|
|
554
|
+
files: record.files,
|
|
555
|
+
exitCode: record.exitCode,
|
|
556
|
+
reported: tests.events.map((event) => event.file),
|
|
557
|
+
whole: tests.unreadable === 0 && tests.incomplete === void 0
|
|
558
|
+
}))
|
|
559
|
+
);
|
|
560
|
+
}
|
|
561
|
+
async function summarizeAcrossSandboxes(app, progress, run) {
|
|
562
|
+
const { recording, recorded, hints } = run;
|
|
563
|
+
const { presentation } = app;
|
|
564
|
+
const width = Math.min(Math.max(presentation.columns ?? 80, 60), 120);
|
|
565
|
+
const style = paint(presentation.colorDepth !== "none");
|
|
566
|
+
const events = recorded.sandboxes.flatMap(
|
|
567
|
+
(sandbox) => sandbox.tests.events.map((event) => ({ ...event, sandbox: sandbox.record.sandbox }))
|
|
568
|
+
);
|
|
569
|
+
const testsLines = testsSummaryLines(events, hints, recorded.tests.unreadable, recorded.tests.incomplete);
|
|
570
|
+
const failed = events.some((event) => event.kind === "test-result" && event.state === "fail");
|
|
571
|
+
const opened = recording.opened;
|
|
572
|
+
const summarized = await app.context.jobSummary.appendJobSummary(
|
|
573
|
+
acrossSandboxesJobSummaryMarkdown(
|
|
574
|
+
recorded.sandboxes.map(({ record }) => record),
|
|
575
|
+
{ command: run.command, logs: opened.ok ? opened.path : void 0, details: testsLines }
|
|
576
|
+
)
|
|
577
|
+
);
|
|
578
|
+
if (progress === void 0) return;
|
|
579
|
+
const ranSandboxes = run.outcome.kind === "sandboxes_ran" || run.outcome.kind === "canceled";
|
|
580
|
+
const sandboxes = recorded.sandboxes.map((sandbox) => {
|
|
581
|
+
const tests = sandbox.timeline.rows.find((row) => row.name === "command");
|
|
582
|
+
const charted = tests === void 0 ? void 0 : testsChart(
|
|
583
|
+
sandbox.tests.events,
|
|
584
|
+
hints,
|
|
585
|
+
sandbox.tests.unreadable,
|
|
586
|
+
{ runStartedAt: Date.parse(sandbox.timeline.startedAt), offsetMs: sandbox.workerOffsetMs, tests },
|
|
587
|
+
sandbox.tests.incomplete
|
|
588
|
+
);
|
|
589
|
+
return {
|
|
590
|
+
sandbox: sandbox.record.sandbox,
|
|
591
|
+
waterfall: waterfallLines(sandbox.timeline, {
|
|
592
|
+
width,
|
|
593
|
+
colorDepth: presentation.colorDepth,
|
|
594
|
+
logs: void 0,
|
|
595
|
+
...charted === void 0 ? {} : { workers: charted.lanes, details: charted.notes }
|
|
596
|
+
})
|
|
597
|
+
};
|
|
598
|
+
});
|
|
599
|
+
const [first] = sandboxes;
|
|
600
|
+
const runId = opened.ok ? opened.id : void 0;
|
|
601
|
+
const records = recorded.sandboxes.map(({ record }) => record);
|
|
602
|
+
const lines = acrossSandboxesEndLines({
|
|
603
|
+
sandboxes: ranSandboxes ? sandboxes : [],
|
|
604
|
+
records,
|
|
605
|
+
tests: testsLines,
|
|
606
|
+
runId,
|
|
607
|
+
logs: logsText(recording, recorded.writeFailure, app.env, failed && !showsFailed(records, runId), false),
|
|
608
|
+
mismatches: run.mismatches,
|
|
609
|
+
...run.extraMismatchHint === void 0 ? {} : { extraMismatchHint: run.extraMismatchHint },
|
|
610
|
+
paint: style
|
|
611
|
+
});
|
|
612
|
+
const once = ranSandboxes || first === void 0 ? [] : first.waterfall;
|
|
613
|
+
const summaryFailure = summarized.kind === "failed" ? [` couldn't append to the job summary at ${summarized.failure.path}: ${summarized.failure.message}`] : [];
|
|
614
|
+
for (const line of [...once, ...lines, ...summaryFailure])
|
|
615
|
+
try {
|
|
616
|
+
await progress(line);
|
|
617
|
+
} catch {
|
|
618
|
+
return;
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
function sandboxesRanFacts(app, run) {
|
|
622
|
+
const { outcome, recorded, recording, plan, runner } = run;
|
|
623
|
+
const records = recorded.sandboxes.map(({ record }) => record);
|
|
624
|
+
const count = (state) => records.filter((record) => record.state === state).length;
|
|
625
|
+
const totals = records.flatMap(({ tests }) => tests === null ? [] : [tests]);
|
|
626
|
+
const snapshotState = recorded.state.runner?.snapshot;
|
|
627
|
+
const { entry } = outcome.snapshot;
|
|
628
|
+
return {
|
|
629
|
+
version: app.version,
|
|
630
|
+
commit: app.commit,
|
|
631
|
+
configFile: run.configFile,
|
|
632
|
+
runId: recording.opened.ok ? recording.opened.id : null,
|
|
633
|
+
runDirectory: recording.opened.ok ? recording.opened.path : null,
|
|
634
|
+
sandboxes: records,
|
|
635
|
+
states: {
|
|
636
|
+
passed: count("passed"),
|
|
637
|
+
failed: count("failed"),
|
|
638
|
+
"not-started": count("not-started"),
|
|
639
|
+
canceled: count("canceled")
|
|
640
|
+
},
|
|
641
|
+
tests: totals.length === 0 ? null : {
|
|
642
|
+
passed: totals.reduce((sum, { passed }) => sum + passed, 0),
|
|
643
|
+
failed: totals.reduce((sum, { failed }) => sum + failed, 0),
|
|
644
|
+
skipped: totals.reduce((sum, { skipped }) => sum + skipped, 0)
|
|
645
|
+
},
|
|
646
|
+
plan: {
|
|
647
|
+
...plan,
|
|
648
|
+
options: plan.options.map((option) => ({ ...option })),
|
|
649
|
+
...plan.sandboxes === void 0 ? {} : { sandboxes: { ...plan.sandboxes } }
|
|
650
|
+
},
|
|
651
|
+
resources: DEFINITION_SET.reports.ranFacts(outcome.resources),
|
|
652
|
+
wallMs: recorded.wallMs,
|
|
653
|
+
runner: {
|
|
654
|
+
snapshotId: entry.snapshotId,
|
|
655
|
+
base: entry.base,
|
|
656
|
+
builtBehind: snapshotState !== void 0 && snapshotState.kind !== "building" ? snapshotState.builtBehind : null,
|
|
657
|
+
built: outcome.snapshot.built,
|
|
658
|
+
vcpus: runner.prepared.vcpus,
|
|
659
|
+
region: entry.region,
|
|
660
|
+
runtime: entry.runtime,
|
|
661
|
+
uploadBytes: recorded.uploadBytes
|
|
662
|
+
},
|
|
663
|
+
cleanup: RUN_CLEANUP.facts(outcome),
|
|
664
|
+
kept: outcome.sandboxes.flatMap(({ sandbox, runnerCleanup }) => {
|
|
665
|
+
const kept = runnerCleanup?.kept ?? null;
|
|
666
|
+
return kept === null ? [] : [{ sandbox, name: kept.name, stopsAt: kept.stopsAt, url: sandboxConnectPage(runner.target, kept.name) }];
|
|
667
|
+
}),
|
|
668
|
+
notKept: outcome.sandboxes.flatMap(({ sandbox, runnerCleanup }) => {
|
|
669
|
+
const notKept = runnerCleanup?.notKept ?? null;
|
|
670
|
+
return notKept === null ? [] : [{ sandbox, name: notKept.name, message: notKept.message }];
|
|
671
|
+
}),
|
|
672
|
+
fileListMismatches: run.mismatches.map(({ sandbox, missing, extra }) => ({
|
|
673
|
+
sandbox,
|
|
674
|
+
missing: [...missing],
|
|
675
|
+
extra: [...extra]
|
|
676
|
+
}))
|
|
677
|
+
};
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
// src/commands/exec/run-metadata.ts
|
|
681
|
+
var RUN_USAGE_FLAGS = `${RESOURCE_USAGE_FLAGS} [--credential <SOURCE>] [--scope <TEAM> --project <PROJECT>] [--show-output] [--keep-sandbox <DURATION>] [--verbose] [--plan-only]`;
|
|
682
|
+
var EXEC_USAGE_FLAGS = `${RESOURCE_USAGE_FLAGS} [--credential <SOURCE>] [--scope <TEAM> --project <PROJECT>] [--runner <KIND> | [--show-output] [--keep-sandbox <DURATION>]] [--verbose] [--plan-only]`;
|
|
683
|
+
var ownRunFields = (verbose) => ({
|
|
684
|
+
credential: {
|
|
685
|
+
valueLabel: "SOURCE",
|
|
686
|
+
description: "The credential source: mint, the default, mints one with the vercel CLI for --scope and --project; github-actions requests a GitHub Actions OIDC token, in a GitHub Actions job with permissions id-token: write, anew once it is 4 minutes old, and needs no --scope or --project. Fits the launch machine runner only: the Vercel Sandbox runner needs the mint. Only a run with a resource that takes a credential takes it, as that resource's options decide; otherwise it is credential_unused. This credential is the Vercel OIDC token storm uses for its own calls, not a sandbox credential that runner.credentials declares: the word has both uses until a rename. No config key."
|
|
687
|
+
},
|
|
688
|
+
keepSandbox: {
|
|
689
|
+
valueLabel: "DURATION",
|
|
690
|
+
description: "Keep the runner sandbox running this long once the run ends, however it ends, so you can connect to it from its page in the Vercel dashboard: 0, which stops and deletes it with the run's other sandboxes, or a whole number of minutes or hours up to 5h (30m, 2h). A run keeps its runner sandbox only when this flag or keepSandbox in vercelSandbox({ \u2026 }) asks; by default it stops and deletes it, after a failure too. A kept runner sandbox holds the checkout, the installed packages, and everything the command wrote, including its test output; storm removes nothing from it, and it holds no credential, the recipe's or a resource's, since storm revokes every sandbox credential before it keeps the sandbox. Anyone who can update the Vercel project can connect to it. Refused when the runner recipe sets unsafeSecretEnvVars, because a run that passes secrets into the runner sandbox's environment never keeps its runner sandbox. storm gives the kept runner sandbox no network access before it releases the run's resources: once the run releases its resources, another run can take them. Before it keeps the sandbox, the run ends every process it started there. The run asks Vercel Sandbox to extend the runner sandbox's timeout when it would stop sooner; it never shortens it, so the sandbox may run past the keep time until its own timeout. The run says until when it runs, and storm runs show and runs list say so too. Default: keepSandbox in vercelSandbox({ \u2026 }), else 0; a run across runner sandboxes keeps each runner sandbox only with --keep-sandbox and ignores keepSandbox in vercelSandbox({ \u2026 }). Fits the Vercel Sandbox runner only."
|
|
691
|
+
},
|
|
692
|
+
showOutput: {
|
|
693
|
+
description: "With the Vercel Sandbox runner on a terminal, print the runner's step output (a snapshot build, the install, the build) above the live view instead of keeping only each step's last line there. Plain output always prints it. Either way, the run directory keeps it whole. Fits the Vercel Sandbox runner only. No config key."
|
|
694
|
+
},
|
|
695
|
+
verbose: {
|
|
696
|
+
description: `Print more as it happens: each resource's detailed progress, the runner's step output as with --show-output, and verbose in the run payload, ${verbose}. No config key.`
|
|
697
|
+
},
|
|
698
|
+
planOnly: {
|
|
699
|
+
description: "Plan the run and print the planned run, then exit 0, with nothing started: storm loads storm.config.ts, does the local checks, and runs the plan step, which may list the test files on this machine, and mints nothing, acquires no resource, starts no sandbox, and opens no run directory. It prints the plan line, one line for each runner sandbox with the number of its test files (or its command, for storm exec), and the vCPUs of the runner sandbox; under --json, the planned result holds the test files, the plan with the number of runner sandboxes, where it came from, and its max, runner.sandboxes, each runner sandbox's command and file list, each resource option with its value and where it came from, and the vCPUs. With --sandboxes or --file-lists it shows the plan of those, and a refusal a run gets before it mints, it gets too. It calls no resource's own checks before the run, and needs no credential. No config key."
|
|
700
|
+
},
|
|
701
|
+
scope: {
|
|
702
|
+
valueLabel: "TEAM",
|
|
703
|
+
description: "The control plane team: the Vercel team whose project the credential is minted for and the Vercel Sandbox runner's sandboxes run in. Required, from this flag or scope in storm.config.ts, unless a launch machine run has no resource that takes a credential or takes --credential github-actions."
|
|
704
|
+
},
|
|
705
|
+
project: {
|
|
706
|
+
valueLabel: "PROJECT",
|
|
707
|
+
description: "The control plane project: the Vercel project, within the team, to mint the credential for. Required, from this flag or project in storm.config.ts, unless a launch machine run has no resource that takes a credential or takes --credential github-actions."
|
|
708
|
+
}
|
|
709
|
+
});
|
|
710
|
+
function runFields(verbose) {
|
|
711
|
+
return { ...RESOURCE_FLAG_HELP, ...ownRunFields(verbose) };
|
|
712
|
+
}
|
|
713
|
+
function runHelp(words, field, options = {}) {
|
|
714
|
+
const usageFlags = options.runnerFlag === true ? EXEC_USAGE_FLAGS : RUN_USAGE_FLAGS;
|
|
715
|
+
return {
|
|
716
|
+
usages: [`${usageFlags} ${words.usage}`],
|
|
717
|
+
fields: { ...runFields(words.verbose), [field]: { valueLabel: field, description: words.args } },
|
|
718
|
+
examples: [...words.examples, ...options.includeResourceExamples === true ? resourceRunExamples() : []]
|
|
719
|
+
};
|
|
720
|
+
}
|
|
721
|
+
var DRIVER_SANDBOXES_HELP = {
|
|
722
|
+
valueLabel: "N",
|
|
723
|
+
description: "Run in N runner sandboxes at once, a run across runner sandboxes, with a driver that has file list support, else driver_sandboxes_refused: storm lists the run's test files on this machine, whether or not storm.config.ts sets testPlan, sorts them, deals them in turn into N file lists, the first file to runner sandbox 0's list, the second to runner sandbox 1's, and so on, and runs each file list in its own runner sandbox, all started from one runner snapshot, with the run's arguments unchanged and each runner sandbox's file list in STORM_RUN. With fewer test files than N, the run has one runner sandbox for each test file, and the plan line says so. 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 a warning, file_list_mismatch, for each runner sandbox that reported nothing for a test file of its list or reported a test file not in its list; storm exits 0 when every runner sandbox passed, else 1, warning or not. The run keeps each runner sandbox only with --keep-sandbox. To give your own lists, use --file-lists. Fits the Vercel Sandbox runner only. Not with --show-output. Config key: runner.sandboxes.default, the number of runner sandboxes of a run with neither --sandboxes nor --file-lists, a whole number or a declared { filesPerSandbox, max? } rule, lowered to runner.sandboxes.max when it is above it; with it, every such run is a run across runner sandboxes, also with one runner sandbox."
|
|
724
|
+
};
|
|
725
|
+
var DRIVER_FILE_LISTS_HELP = {
|
|
726
|
+
valueLabel: "PATH",
|
|
727
|
+
description: `Run with your own file lists, a run across runner sandboxes, with a driver that has file list support, else driver_sandboxes_refused: PATH is a JSON file (or - to read from stdin) that holds an array with one array of test file paths for each runner sandbox, in order of runner sandbox index, such as [["test/a.test.ts", "test/b.test.ts"], ["test/c.test.ts"]], each path relative to the project, as the planned result's testFiles under --plan-only --json names it. The number of lists is the number of runner sandboxes, at most runner.sandboxes.max in storm.config.ts; with --sandboxes too, the two numbers must agree. storm lists the run's test files on this machine with the run's arguments, so a file filter among them limits which paths a list can hold, passes each runner sandbox's assigned file list in STORM_RUN while keeping the run's arguments unchanged, and refuses before it mints a file it can't read or that isn't that shape (file_lists_unreadable), an empty list, a test file in two lists, or a number of lists that differs from --sandboxes (invalid_file_lists), a path the listing doesn't have (file_lists_unlisted), and more lists than the max (sandboxes_over_max). A test file in no list is left out of the run, and the plan line says how many it runs: Running 12 of 57 test files in 2 runner sandboxes (--file-lists, max 4). The rest is as with --sandboxes. Fits the Vercel Sandbox runner only. Not with --show-output. It overrides runner.sandboxes.default. No config key.`
|
|
728
|
+
};
|
|
729
|
+
|
|
730
|
+
// src/commands/exec/plan-only.ts
|
|
731
|
+
async function plannedRun(app, plan, lifecycles, planned) {
|
|
732
|
+
const vcpus = await plannedVcpus(app, lifecycles, plan);
|
|
733
|
+
if (!vcpus.ok) return vcpus.refusal;
|
|
734
|
+
return planned(
|
|
735
|
+
buildPlannedFacts({
|
|
736
|
+
version: app.version,
|
|
737
|
+
commit: app.commit,
|
|
738
|
+
configFile: plan.configFile,
|
|
739
|
+
argv: plan.argv,
|
|
740
|
+
where: plan.where,
|
|
741
|
+
testPlan: plan.testPlan,
|
|
742
|
+
planOptions: plan.planOptions,
|
|
743
|
+
testFiles: plan.testFiles,
|
|
744
|
+
sandboxes: plan.sandboxes,
|
|
745
|
+
resources: plan.resources,
|
|
746
|
+
lifecycles,
|
|
747
|
+
vcpus: vcpus.vcpus
|
|
748
|
+
})
|
|
749
|
+
);
|
|
750
|
+
}
|
|
751
|
+
async function plannedVcpus(app, lifecycles, { where, configFile, resources, sandboxes }) {
|
|
752
|
+
if (where.kind !== "runner") return { ok: true, vcpus: null };
|
|
753
|
+
const prepared = await prepareRunner(app.context, {
|
|
754
|
+
cwd: app.cwd,
|
|
755
|
+
recipe: where.recipe,
|
|
756
|
+
vcpuRun: { resources: recipeResources(resources), sandboxes: sandboxes?.sandboxes.length ?? 1 }
|
|
757
|
+
});
|
|
758
|
+
if (prepared.kind === "ok") return { ok: true, vcpus: prepared.prepared.vcpus };
|
|
759
|
+
const refusal = prepareRefusal(prepared, configFile);
|
|
760
|
+
const secrets = plannedSecrets(lifecycles, where, resources);
|
|
761
|
+
return { ok: false, refusal: secrets.length === 0 ? refusal : redactStrings(refusal, redactor(secrets)) };
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
// src/commands/exec/run-planned.ts
|
|
765
|
+
async function runPlanned(context, request, spec, plan) {
|
|
766
|
+
const { planned, lifecycles } = plan;
|
|
767
|
+
if (request.planOnly) return await plannedRun(context.app, planned, lifecycles, (facts) => spec.planned(facts));
|
|
768
|
+
const { sandboxes } = planned;
|
|
769
|
+
if (sandboxes === void 0) return await runPlannedCommand(context, request, spec, planned, lifecycles);
|
|
770
|
+
const where = acrossSandboxesWhere(planned.where);
|
|
771
|
+
return await runPlannedAcrossSandboxes(context, request, spec, { ...planned, sandboxes, where }, lifecycles);
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
export {
|
|
775
|
+
SANDBOXES_DEFAULT_KEY,
|
|
776
|
+
planAskedSandboxesRun,
|
|
777
|
+
planDefaultSandboxesRun,
|
|
778
|
+
runHelp,
|
|
779
|
+
DRIVER_SANDBOXES_HELP,
|
|
780
|
+
DRIVER_FILE_LISTS_HELP,
|
|
781
|
+
runPlanned
|
|
782
|
+
};
|