@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
|
@@ -44,10 +44,15 @@ export interface TestResultWriter {
|
|
|
44
44
|
/** Keeps `content`, a console write the test `id` made, as the end of its test output so far. */
|
|
45
45
|
output(id: string, content: string): void;
|
|
46
46
|
/**
|
|
47
|
-
* Appends the test's final result as a `test-result` event, with the time
|
|
48
|
-
* output, and drops any later result for the same `id`. A result that can't be written as a
|
|
47
|
+
* Appends the test's final result as a `test-result` event, with the time (`at`, defaulting to `now()`), its errors
|
|
48
|
+
* cut to size and its test output, and drops any later result for the same `id`. A result that can't be written as a
|
|
49
|
+
* line is dropped alone.
|
|
49
50
|
*/
|
|
50
|
-
write(result: ReportedTestResult): void;
|
|
51
|
+
write(result: ReportedTestResult, at?: number): void;
|
|
52
|
+
/** Appends a main-process `file-started` event for `file` (no worker index). */
|
|
53
|
+
fileStarted(file: string): void;
|
|
54
|
+
/** Appends a main-process `file-finished` event for `file` (no worker index), at `at` (defaulting to `now()`). */
|
|
55
|
+
fileFinished(file: string, at?: number): void;
|
|
51
56
|
/** Drops the test output held for tests no result was written for, once the test run has ended. */
|
|
52
57
|
end(): void;
|
|
53
58
|
}
|
|
@@ -46,7 +46,7 @@ export function testResultWriter(env, append = (path, text) => appendFileSync(pa
|
|
|
46
46
|
// result is cut to the limit.
|
|
47
47
|
outputs.set(id, grown.text.length > 2 * OUTPUT_CHARS ? keepLast(grown, OUTPUT_CHARS) : grown);
|
|
48
48
|
},
|
|
49
|
-
write: (result) => {
|
|
49
|
+
write: (result, at) => {
|
|
50
50
|
if (path === undefined || !accepts(result.id))
|
|
51
51
|
return;
|
|
52
52
|
written.add(result.id);
|
|
@@ -64,7 +64,7 @@ export function testResultWriter(env, append = (path, text) => appendFileSync(pa
|
|
|
64
64
|
state: result.state,
|
|
65
65
|
retryCount: result.retryCount,
|
|
66
66
|
flaky: result.flaky,
|
|
67
|
-
at: now(),
|
|
67
|
+
at: at ?? now(),
|
|
68
68
|
...(errors.length > 0 ? { errors } : {}),
|
|
69
69
|
...(output === undefined ? {} : { output }),
|
|
70
70
|
});
|
|
@@ -80,6 +80,26 @@ export function testResultWriter(env, append = (path, text) => appendFileSync(pa
|
|
|
80
80
|
failed = true;
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
|
+
fileStarted: (file) => {
|
|
84
|
+
if (path === undefined || failed || file === "")
|
|
85
|
+
return;
|
|
86
|
+
try {
|
|
87
|
+
append(path, `${testEventLine({ kind: "file-started", file, at: now() })}\n`);
|
|
88
|
+
}
|
|
89
|
+
catch {
|
|
90
|
+
failed = true;
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
fileFinished: (file, at) => {
|
|
94
|
+
if (path === undefined || failed || file === "")
|
|
95
|
+
return;
|
|
96
|
+
try {
|
|
97
|
+
append(path, `${testEventLine({ kind: "file-finished", file, at: at ?? now() })}\n`);
|
|
98
|
+
}
|
|
99
|
+
catch {
|
|
100
|
+
failed = true;
|
|
101
|
+
}
|
|
102
|
+
},
|
|
83
103
|
end: () => {
|
|
84
104
|
outputs.clear();
|
|
85
105
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Row } from "@vercel/clinkr";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import type { InstanceWarnings, ResourceCleanupRecords, RunnerCleanupFacts } from "
|
|
3
|
+
import type { InstanceWarnings, ResourceCleanupRecords, RunnerCleanupFacts } from "../core/index.ts";
|
|
4
4
|
/** One of the runner's sandboxes the run couldn't stop; its own timeout stops it. */
|
|
5
5
|
declare const notStoppedSchema: z.ZodObject<{
|
|
6
6
|
name: z.ZodString;
|
|
@@ -20,7 +20,7 @@ declare const notDeletedSchema: z.ZodObject<{
|
|
|
20
20
|
}>;
|
|
21
21
|
message: z.ZodString;
|
|
22
22
|
}, z.core.$strip>;
|
|
23
|
-
/** The runner sandbox the run kept running once it ended, so a person can connect to it. */
|
|
23
|
+
/** The runner sandbox the run kept running once it ended, with no network access, so a person can connect to it. */
|
|
24
24
|
declare const keptSchema: z.ZodObject<{
|
|
25
25
|
name: z.ZodString;
|
|
26
26
|
stopsAt: z.ZodString;
|
|
@@ -77,7 +77,7 @@ export declare function notKeptText(sandbox: z.infer<typeof notKeptSchema>): str
|
|
|
77
77
|
* Rows for the runner sandbox the run kept running, or couldn't keep, and the runner's sandboxes that couldn't be
|
|
78
78
|
* stopped or deleted, when there are any.
|
|
79
79
|
*/
|
|
80
|
-
export declare function runnerCleanupRows(cleanup: RunnerCleanup | null): (readonly ["
|
|
80
|
+
export declare function runnerCleanupRows(cleanup: RunnerCleanup | null): (readonly ["Runner sandbox kept", readonly [`${string}, running until ${string}, with no network access`, string]] | readonly ["Runner sandbox not kept", string] | readonly ["Sandboxes not deleted", string[]] | readonly ["Sandboxes not stopped", string[]])[];
|
|
81
81
|
/** Warnings for the runner sandbox the run couldn't keep running, and the sandboxes that couldn't be stopped or deleted. */
|
|
82
82
|
export declare function runnerCleanupWarnings(cleanup: RunnerCleanup | null): {
|
|
83
83
|
reason: string;
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
// among them (`resource-refusals.ts`). `RUN_CLEANUP` is the run's cleanup over the resource definition set's resource
|
|
8
8
|
// reports (`DEFINITION_SET.reports`, `src/extensions.ts`).
|
|
9
9
|
import { z } from "zod";
|
|
10
|
-
import { DEFINITION_SET } from "
|
|
11
|
-
import { sandboxConnectPage } from "
|
|
10
|
+
import { DEFINITION_SET } from "../extensions.js";
|
|
11
|
+
import { sandboxConnectPage } from "./dashboard.js";
|
|
12
12
|
import { isoSecondsText } from "./text.js";
|
|
13
13
|
/** One of the runner's sandboxes the run couldn't stop; its own timeout stops it. */
|
|
14
14
|
const notStoppedSchema = z.object({
|
|
@@ -24,7 +24,7 @@ const notDeletedSchema = z.object({
|
|
|
24
24
|
role: z.enum(["runner", "snapshot-build"]),
|
|
25
25
|
message: z.string(),
|
|
26
26
|
});
|
|
27
|
-
/** The runner sandbox the run kept running once it ended, so a person can connect to it. */
|
|
27
|
+
/** The runner sandbox the run kept running once it ended, with no network access, so a person can connect to it. */
|
|
28
28
|
const keptSchema = z.object({
|
|
29
29
|
name: z.string(),
|
|
30
30
|
/** When its timeout stops it, as an ISO time: the keep time from when the run ended, or later. */
|
|
@@ -58,7 +58,7 @@ export function notDeletedText(sandbox) {
|
|
|
58
58
|
}
|
|
59
59
|
/** The runner sandbox a run kept running, as a sentence. */
|
|
60
60
|
export function keptText(kept) {
|
|
61
|
-
return `Kept the runner sandbox ${kept.name} running until ${isoSecondsText(kept.stopsAt)}, so you can connect to it: ${kept.url}`;
|
|
61
|
+
return `Kept the runner sandbox ${kept.name} running until ${isoSecondsText(kept.stopsAt)}, with no network access, so you can connect to it: ${kept.url}`;
|
|
62
62
|
}
|
|
63
63
|
/** The runner sandbox a run couldn't keep running, as a sentence. */
|
|
64
64
|
export function notKeptText(sandbox) {
|
|
@@ -75,8 +75,13 @@ export function runnerCleanupRows(cleanup) {
|
|
|
75
75
|
return [
|
|
76
76
|
...(kept === null
|
|
77
77
|
? []
|
|
78
|
-
: [
|
|
79
|
-
|
|
78
|
+
: [
|
|
79
|
+
[
|
|
80
|
+
"Runner sandbox kept",
|
|
81
|
+
[`${kept.name}, running until ${isoSecondsText(kept.stopsAt)}, with no network access`, kept.url],
|
|
82
|
+
],
|
|
83
|
+
]),
|
|
84
|
+
...(notKept === null ? [] : [["Runner sandbox not kept", notKeptText(notKept)]]),
|
|
80
85
|
...(cleanup.notStopped.length === 0
|
|
81
86
|
? []
|
|
82
87
|
: [["Sandboxes not stopped", cleanup.notStopped.map(notStoppedText)]]),
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SandboxRecord, TimelineFacts } from "../run-directory/index.ts";
|
|
2
|
+
/**
|
|
3
|
+
* The job summary's Markdown for `timeline`, headed with the invoking command, `storm <command>`; `details` are
|
|
4
|
+
* lines after the critical path, such as the tests'.
|
|
5
|
+
*/
|
|
6
|
+
export declare function jobSummaryMarkdown(timeline: TimelineFacts, extras: {
|
|
7
|
+
readonly command: string;
|
|
8
|
+
readonly logs: string | undefined;
|
|
9
|
+
readonly details?: readonly string[];
|
|
10
|
+
}): string;
|
|
11
|
+
/**
|
|
12
|
+
* The job summary's Markdown for a run across runner sandboxes, headed with the invoking command, `storm <command>`:
|
|
13
|
+
* the runner sandbox table, the totals line, the tests' lines (`details`), and where its run directory is.
|
|
14
|
+
*/
|
|
15
|
+
export declare function acrossSandboxesJobSummaryMarkdown(records: readonly SandboxRecord[], extras: {
|
|
16
|
+
readonly command: string;
|
|
17
|
+
readonly logs: string | undefined;
|
|
18
|
+
readonly details?: readonly string[];
|
|
19
|
+
}): string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// The Markdown summary a run appends to a GitHub Actions job summary: its waterfall as a table, the critical path,
|
|
2
2
|
// and where its run directory is, so a CI run that uploads it as an artifact can find it.
|
|
3
|
+
import { SANDBOX_TABLE_HEADER, sandboxTableRows, sandboxTotalsLine } from "./sandbox-table.js";
|
|
3
4
|
import { seconds } from "./text.js";
|
|
4
5
|
import { criticalPathStep } from "./waterfall.js";
|
|
5
6
|
/**
|
|
@@ -32,3 +33,19 @@ function tableRow(row) {
|
|
|
32
33
|
const idle = row.idleMs > 0 ? seconds(row.idleMs) : "";
|
|
33
34
|
return `| ${row.label}${outcome} | +${seconds(row.startMs)} | ${seconds(row.endMs - row.startMs)} | ${idle} | ${steps} |`;
|
|
34
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* The job summary's Markdown for a run across runner sandboxes, headed with the invoking command, `storm <command>`:
|
|
38
|
+
* the runner sandbox table, the totals line, the tests' lines (`details`), and where its run directory is.
|
|
39
|
+
*/
|
|
40
|
+
export function acrossSandboxesJobSummaryMarkdown(records, extras) {
|
|
41
|
+
const lines = [`### storm ${extras.command}`, ""];
|
|
42
|
+
const rows = sandboxTableRows(records);
|
|
43
|
+
lines.push(`| ${SANDBOX_TABLE_HEADER.join(" | ")} |`, `| ${SANDBOX_TABLE_HEADER.map((_, column) => (column >= 2 && column <= 4 ? "---:" : "---")).join(" | ")} |`, ...rows.map((row) => `| ${row.map((cell) => cell.replaceAll("|", "\\|")).join(" | ")} |`), "", sandboxTotalsLine(records), "");
|
|
44
|
+
for (const detail of extras.details ?? [])
|
|
45
|
+
lines.push(`${detail.trim()} `);
|
|
46
|
+
if ((extras.details ?? []).length > 0)
|
|
47
|
+
lines.push("");
|
|
48
|
+
if (extras.logs !== undefined)
|
|
49
|
+
lines.push(`Run directory: \`${extras.logs}\``, "");
|
|
50
|
+
return lines.join("\n");
|
|
51
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { SandboxRecord, SandboxState } from "../run-directory/index.ts";
|
|
2
|
+
import { type Paint } from "./text.ts";
|
|
3
|
+
/** The runner sandbox table's columns. */
|
|
4
|
+
export declare const SANDBOX_TABLE_HEADER: readonly ["RUNNER SANDBOX", "STATE", "EXIT", "PREPARED", "COMMAND", "TESTS", "NAME"];
|
|
5
|
+
/** Tests' totals, such as `5 passed · 1 failed`, `no tests`, or `-` when unknown (null). */
|
|
6
|
+
export declare function testTotalsText(totals: {
|
|
7
|
+
readonly passed: number;
|
|
8
|
+
readonly failed: number;
|
|
9
|
+
readonly skipped: number;
|
|
10
|
+
} | null): string;
|
|
11
|
+
/** A runner sandbox state as a person reads it: the state, with a space for a dash, such as `not started`. */
|
|
12
|
+
export declare function sandboxStateText(state: SandboxState): string;
|
|
13
|
+
/** `count` runner sandboxes, such as `1 runner sandbox` or `2 runner sandboxes`. */
|
|
14
|
+
export declare function sandboxesText(count: number): string;
|
|
15
|
+
/**
|
|
16
|
+
* What follows the exit status of a run across runner sandboxes that has ended: how many of its runner sandboxes
|
|
17
|
+
* passed, such as ` (1 of 2 runner sandboxes passed)`.
|
|
18
|
+
*/
|
|
19
|
+
export declare function sandboxesPassedText(sandboxes: readonly Pick<SandboxRecord, "state">[]): string;
|
|
20
|
+
/**
|
|
21
|
+
* Where a run across runner sandboxes ran its commands: `2 runner sandboxes`. Once the run has ended (`ended`), only
|
|
22
|
+
* the runner sandboxes that started count, and the ones that never started are named: `1 runner sandbox, 1 not
|
|
23
|
+
* started`.
|
|
24
|
+
*/
|
|
25
|
+
export declare function startedSandboxesText(sandboxes: readonly Pick<SandboxRecord, "name">[], ended: boolean): string;
|
|
26
|
+
/** What a row of the runner sandbox table reads of a runner sandbox's record. */
|
|
27
|
+
export type SandboxTableRecord = Pick<SandboxRecord, "sandbox" | "state" | "exitCode" | "preparedMs" | "commandMs" | "tests" | "name" | "keptUntil">;
|
|
28
|
+
/**
|
|
29
|
+
* The runner sandbox table's rows, one for each runner sandbox, under `SANDBOX_TABLE_HEADER`: its runner sandbox index,
|
|
30
|
+
* its runner sandbox state, its command's exit code, the time from the run's start to its command's start, how long its
|
|
31
|
+
* command took, its tests' totals, and its runner sandbox, with until when the run kept it; `-` for each that is
|
|
32
|
+
* unknown.
|
|
33
|
+
*/
|
|
34
|
+
export declare function sandboxTableRows(sandboxes: readonly SandboxTableRecord[]): string[][];
|
|
35
|
+
/**
|
|
36
|
+
* Why a runner sandbox is in its runner sandbox state, as one line: its record's cause, or for a runner sandbox whose
|
|
37
|
+
* command exited, the exit code; `-` when neither is known, such as for a pending runner sandbox.
|
|
38
|
+
*/
|
|
39
|
+
export declare function sandboxCauseText(sandbox: Pick<SandboxRecord, "cause" | "exitCode">): string;
|
|
40
|
+
/**
|
|
41
|
+
* How many runner sandboxes are in each runner sandbox state, as the totals line says it: `3 runner sandboxes: 2
|
|
42
|
+
* passed, 1 failed`.
|
|
43
|
+
*/
|
|
44
|
+
export declare function sandboxTotalsLine(records: readonly Pick<SandboxRecord, "state">[]): string;
|
|
45
|
+
/**
|
|
46
|
+
* The runner sandbox table as lines, under its header, each column as wide as its widest cell, the state in its color.
|
|
47
|
+
*/
|
|
48
|
+
export declare function sandboxTableLines(records: readonly SandboxRecord[], style?: Paint): string[];
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
// Shared formatting for the summaries and tables of a run across runner sandboxes, reused by `storm runs show`, the
|
|
2
|
+
// run's end summary, and the GitHub Actions job summary with no import between `commands/exec/` and `commands/runs/`.
|
|
3
|
+
import { isoSecondsText, paint as paintFor, seconds } from "./text.js";
|
|
4
|
+
/** The runner sandbox table's columns. */
|
|
5
|
+
export const SANDBOX_TABLE_HEADER = [
|
|
6
|
+
"RUNNER SANDBOX",
|
|
7
|
+
"STATE",
|
|
8
|
+
"EXIT",
|
|
9
|
+
"PREPARED",
|
|
10
|
+
"COMMAND",
|
|
11
|
+
"TESTS",
|
|
12
|
+
"NAME",
|
|
13
|
+
];
|
|
14
|
+
/** Tests' totals, such as `5 passed · 1 failed`, `no tests`, or `-` when unknown (null). */
|
|
15
|
+
export function testTotalsText(totals) {
|
|
16
|
+
if (totals === null)
|
|
17
|
+
return "-";
|
|
18
|
+
const parts = [
|
|
19
|
+
...(totals.passed > 0 ? [`${totals.passed} passed`] : []),
|
|
20
|
+
...(totals.failed > 0 ? [`${totals.failed} failed`] : []),
|
|
21
|
+
...(totals.skipped > 0 ? [`${totals.skipped} skipped`] : []),
|
|
22
|
+
];
|
|
23
|
+
return parts.length === 0 ? "no tests" : parts.join(" · ");
|
|
24
|
+
}
|
|
25
|
+
/** A runner sandbox state as a person reads it: the state, with a space for a dash, such as `not started`. */
|
|
26
|
+
export function sandboxStateText(state) {
|
|
27
|
+
return state.replace("-", " ");
|
|
28
|
+
}
|
|
29
|
+
/** `count` runner sandboxes, such as `1 runner sandbox` or `2 runner sandboxes`. */
|
|
30
|
+
export function sandboxesText(count) {
|
|
31
|
+
return `${count} ${count === 1 ? "runner sandbox" : "runner sandboxes"}`;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* What follows the exit status of a run across runner sandboxes that has ended: how many of its runner sandboxes
|
|
35
|
+
* passed, such as ` (1 of 2 runner sandboxes passed)`.
|
|
36
|
+
*/
|
|
37
|
+
export function sandboxesPassedText(sandboxes) {
|
|
38
|
+
const passed = sandboxes.filter(({ state }) => state === "passed").length;
|
|
39
|
+
return ` (${passed} of ${sandboxesText(sandboxes.length)} passed)`;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Where a run across runner sandboxes ran its commands: `2 runner sandboxes`. Once the run has ended (`ended`), only
|
|
43
|
+
* the runner sandboxes that started count, and the ones that never started are named: `1 runner sandbox, 1 not
|
|
44
|
+
* started`.
|
|
45
|
+
*/
|
|
46
|
+
export function startedSandboxesText(sandboxes, ended) {
|
|
47
|
+
const started = ended ? sandboxes.filter(({ name }) => name !== null).length : sandboxes.length;
|
|
48
|
+
const missing = sandboxes.length - started;
|
|
49
|
+
return `${started} runner ${started === 1 ? "sandbox" : "sandboxes"}${missing === 0 ? "" : `, ${missing} not started`}`;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* The runner sandbox table's rows, one for each runner sandbox, under `SANDBOX_TABLE_HEADER`: its runner sandbox index,
|
|
53
|
+
* its runner sandbox state, its command's exit code, the time from the run's start to its command's start, how long its
|
|
54
|
+
* command took, its tests' totals, and its runner sandbox, with until when the run kept it; `-` for each that is
|
|
55
|
+
* unknown.
|
|
56
|
+
*/
|
|
57
|
+
export function sandboxTableRows(sandboxes) {
|
|
58
|
+
const time = (ms) => (ms === null ? "-" : seconds(ms));
|
|
59
|
+
return sandboxes.map((each) => [
|
|
60
|
+
String(each.sandbox),
|
|
61
|
+
sandboxStateText(each.state),
|
|
62
|
+
each.exitCode === null ? "-" : String(each.exitCode),
|
|
63
|
+
time(each.preparedMs),
|
|
64
|
+
time(each.commandMs),
|
|
65
|
+
testTotalsText(each.tests),
|
|
66
|
+
each.name === null
|
|
67
|
+
? "-"
|
|
68
|
+
: `${each.name}${each.keptUntil === null ? "" : ` (kept until ${isoSecondsText(each.keptUntil)})`}`,
|
|
69
|
+
]);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Why a runner sandbox is in its runner sandbox state, as one line: its record's cause, or for a runner sandbox whose
|
|
73
|
+
* command exited, the exit code; `-` when neither is known, such as for a pending runner sandbox.
|
|
74
|
+
*/
|
|
75
|
+
export function sandboxCauseText(sandbox) {
|
|
76
|
+
if (sandbox.cause !== null)
|
|
77
|
+
return sandbox.cause;
|
|
78
|
+
return sandbox.exitCode === null ? "-" : `the command exited ${sandbox.exitCode}`;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* How many runner sandboxes are in each runner sandbox state, as the totals line says it: `3 runner sandboxes: 2
|
|
82
|
+
* passed, 1 failed`.
|
|
83
|
+
*/
|
|
84
|
+
export function sandboxTotalsLine(records) {
|
|
85
|
+
const states = ["passed", "failed", "not-started", "canceled", "pending"];
|
|
86
|
+
const counted = states.flatMap((state) => {
|
|
87
|
+
const number = records.filter((record) => record.state === state).length;
|
|
88
|
+
return number === 0 ? [] : [`${number} ${sandboxStateText(state)}`];
|
|
89
|
+
});
|
|
90
|
+
return `${sandboxesText(records.length)}: ${counted.join(", ")}`;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* The runner sandbox table as lines, under its header, each column as wide as its widest cell, the state in its color.
|
|
94
|
+
*/
|
|
95
|
+
export function sandboxTableLines(records, style = paintFor(false)) {
|
|
96
|
+
const rows = [[...SANDBOX_TABLE_HEADER], ...sandboxTableRows(records)];
|
|
97
|
+
const widths = SANDBOX_TABLE_HEADER.map((_, column) => Math.max(...rows.map((row) => row[column]?.length ?? 0)));
|
|
98
|
+
const tone = (state) => state === "passed" ? style.done : state === "canceled" || state === "pending" ? style.stopped : style.failed;
|
|
99
|
+
return rows.map((row, index) => {
|
|
100
|
+
const record = index === 0 ? undefined : records[index - 1];
|
|
101
|
+
const cells = row.map((cell, column) => {
|
|
102
|
+
const padded = column === row.length - 1 ? cell : cell.padEnd(widths[column] ?? 0);
|
|
103
|
+
if (index === 0)
|
|
104
|
+
return style.strong(padded);
|
|
105
|
+
return column === 1 && record !== undefined ? tone(record.state)(padded) : padded;
|
|
106
|
+
});
|
|
107
|
+
return ` ${cells.join(" ")}`.trimEnd();
|
|
108
|
+
});
|
|
109
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RejectedSnapshot, SnapshotCacheNote, SnapshotRejectionReason } from "
|
|
1
|
+
import type { RejectedSnapshot, SnapshotCacheNote, SnapshotRejectionReason } from "../runner/index.ts";
|
|
2
2
|
/** How many of the snapshots a run doesn't start from its build line lists, before it counts the rest. */
|
|
3
3
|
export declare const REJECTIONS_SHOWN = 5;
|
|
4
4
|
/** `count` commits, as text: `1 commit`, `24 commits`. */
|
|
@@ -1,6 +1,17 @@
|
|
|
1
|
-
import { setupPhaseWords } from "
|
|
2
|
-
import type { DriverHints } from "
|
|
3
|
-
import type { TestEvent } from "
|
|
1
|
+
import { type SetupPhaseName, setupPhaseWords } from "../core/index.ts";
|
|
2
|
+
import type { DriverHints } from "../sdk/extension/index.ts";
|
|
3
|
+
import type { TestEvent } from "../sdk/run/launcher.ts";
|
|
4
|
+
/** One finished, successful setup phase as the setup summary counts it. */
|
|
5
|
+
export interface SetupPhaseTiming {
|
|
6
|
+
readonly label: string;
|
|
7
|
+
readonly resource: string;
|
|
8
|
+
readonly ms: number;
|
|
9
|
+
readonly warmupMs?: number | undefined;
|
|
10
|
+
}
|
|
11
|
+
/** A test event, optionally tagged with the 0-based runner sandbox index that emitted it. */
|
|
12
|
+
export type SandboxTaggedTestEvent = TestEvent & {
|
|
13
|
+
readonly sandbox?: number | undefined;
|
|
14
|
+
};
|
|
4
15
|
/**
|
|
5
16
|
* What the summary says about the tests, a line apiece: `tests`, the totals and how busy the workers were;
|
|
6
17
|
* `setups`, a line for each resource's setup phases under each label (`setupsText`); `slowest`, the slowest files;
|
|
@@ -21,7 +32,7 @@ export interface TestsSummary {
|
|
|
21
32
|
* driver (`hints`), and counts the workers' test attempts instead. `unreadable` counts the lines in the test events
|
|
22
33
|
* file that held none; `incomplete` is why the final read of the test events failed, when it did.
|
|
23
34
|
*/
|
|
24
|
-
export declare function testsSummaryLines(events: readonly
|
|
35
|
+
export declare function testsSummaryLines(events: readonly SandboxTaggedTestEvent[], hints: Pick<DriverHints, "noFinalResults">, unreadable?: number, incomplete?: string): string[];
|
|
25
36
|
/** What the summary says when the final read of the test events failed with `message`. */
|
|
26
37
|
export declare function incompleteText(message: string): string;
|
|
27
38
|
/**
|
|
@@ -35,9 +46,14 @@ export declare function noFinalResultsText(hint: string): string;
|
|
|
35
46
|
* What the summary says about the tests, from `events`, of which `unreadable` lines held none, and `incomplete`, why the
|
|
36
47
|
* final read of the test events file failed. `hints` are the run's driver's, for a run with no final result.
|
|
37
48
|
*/
|
|
38
|
-
export declare function testsSummary(events: readonly
|
|
49
|
+
export declare function testsSummary(events: readonly SandboxTaggedTestEvent[], hints: Pick<DriverHints, "noFinalResults">, unreadable?: number, incomplete?: string): TestsSummary;
|
|
39
50
|
/**
|
|
40
51
|
* How the setup phases in `events` are worded, every view's alike (`setupPhaseWords`): by label, and with the
|
|
41
52
|
* resource beside it where two resources' phases share one.
|
|
42
53
|
*/
|
|
43
|
-
export declare function setupWordsOf(events: readonly
|
|
54
|
+
export declare function setupWordsOf(events: readonly SandboxTaggedTestEvent[]): ReturnType<typeof setupPhaseWords>;
|
|
55
|
+
/**
|
|
56
|
+
* Formats one summary line per resource and setup label from finished, successful setup phases (`phases`), disambiguated
|
|
57
|
+
* against all setup phases (`allPhases`), with each group's share of `testMs` when non-zero.
|
|
58
|
+
*/
|
|
59
|
+
export declare function formatSetupPhases(phases: readonly SetupPhaseTiming[], allPhases: readonly SetupPhaseName[], testMs: number): string[];
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// they were, and the slowest files. It names no test runner: what to do about a run with no final test results is the
|
|
4
4
|
// run's driver's to say (`DriverHints`), and its callers hand it the driver's hints. It names nothing a worker sets up
|
|
5
5
|
// either: a setup phase's line takes its word from the label the phase's writer supplied.
|
|
6
|
-
import { setupPhaseKey, setupPhaseWords } from "
|
|
6
|
+
import { setupPhaseKey, setupPhaseWords } from "../core/index.js";
|
|
7
7
|
import { median, seconds, shortFile } from "./text.js";
|
|
8
8
|
/** How many slowest files the summary names. */
|
|
9
9
|
const SLOWEST_FILES = 3;
|
|
@@ -46,7 +46,7 @@ export function testsSummary(events, hints, unreadable = 0, incomplete) {
|
|
|
46
46
|
for (const event of events) {
|
|
47
47
|
if (event.kind === "test-result")
|
|
48
48
|
results.push(event);
|
|
49
|
-
else
|
|
49
|
+
else if ("worker" in event && event.worker !== undefined)
|
|
50
50
|
reported.push(event);
|
|
51
51
|
}
|
|
52
52
|
let tests;
|
|
@@ -55,15 +55,20 @@ export function testsSummary(events, hints, unreadable = 0, incomplete) {
|
|
|
55
55
|
if (events.length > 0) {
|
|
56
56
|
const attempts = reported.flatMap((event) => (event.kind === "test-attempt-finished" ? [event] : []));
|
|
57
57
|
const testMs = attempts.reduce((sum, event) => sum + event.ms, 0);
|
|
58
|
-
|
|
58
|
+
// Worker indexes count from 0 within each runner sandbox (under key -1 for a run that is not across runner
|
|
59
|
+
// sandboxes), so aggregate per runner sandbox to avoid colliding worker 0 across runner sandboxes.
|
|
60
|
+
const workersBySandbox = new Map();
|
|
59
61
|
let first = Infinity;
|
|
60
62
|
let last = -Infinity;
|
|
61
63
|
for (const event of reported) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
const sandbox = event.sandbox ?? -1;
|
|
65
|
+
workersBySandbox.set(sandbox, Math.max(workersBySandbox.get(sandbox) ?? 0, event.worker + 1));
|
|
64
66
|
first = Math.min(first, event.at);
|
|
65
67
|
last = Math.max(last, event.at);
|
|
66
68
|
}
|
|
69
|
+
let workers = 0;
|
|
70
|
+
for (const count of workersBySandbox.values())
|
|
71
|
+
workers += count;
|
|
67
72
|
const wallMs = reported.length === 0 ? 0 : last - first;
|
|
68
73
|
const files = new Set(events.map((event) => event.file)).size;
|
|
69
74
|
const filesText = `${files} ${files === 1 ? "file" : "files"}`;
|
|
@@ -84,7 +89,7 @@ export function testsSummary(events, hints, unreadable = 0, incomplete) {
|
|
|
84
89
|
];
|
|
85
90
|
tests = ` tests ${[...outcome, ...timing].join(" · ")}`;
|
|
86
91
|
setups = setupsText(reported, testMs);
|
|
87
|
-
const slowest = slowestFiles(
|
|
92
|
+
const slowest = slowestFiles(events);
|
|
88
93
|
if (slowest.length > 0)
|
|
89
94
|
slowestText = `slowest: ${slowest.map(({ file, ms }) => `${shortFile(file)} ${seconds(ms)}`).join(", ")}`;
|
|
90
95
|
}
|
|
@@ -106,24 +111,19 @@ export function setupWordsOf(events) {
|
|
|
106
111
|
return setupPhaseWords(events.flatMap((event) => (event.kind === "setup-started" || event.kind === "setup-finished" ? [event] : [])));
|
|
107
112
|
}
|
|
108
113
|
/**
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
* with the label as its writer worded it, and its resource beside it where another resource's phases share it
|
|
112
|
-
* (`<label> (<resource>) starts 5`), how many there were, the fastest, the slowest and the median, their share of `testMs`, the
|
|
113
|
-
* test attempts' time, when there is any, and the median of the warmups after them, when any was warmed.
|
|
114
|
+
* Formats one summary line per resource and setup label from finished, successful setup phases (`phases`), disambiguated
|
|
115
|
+
* against all setup phases (`allPhases`), with each group's share of `testMs` when non-zero.
|
|
114
116
|
*/
|
|
115
|
-
function
|
|
116
|
-
const words =
|
|
117
|
+
export function formatSetupPhases(phases, allPhases, testMs) {
|
|
118
|
+
const words = setupPhaseWords(allPhases);
|
|
117
119
|
const groups = new Map();
|
|
118
|
-
for (const
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
const key = setupPhaseKey(event);
|
|
122
|
-
const group = groups.get(key) ?? { label: words(event), starts: [], warmups: [] };
|
|
120
|
+
for (const phase of phases) {
|
|
121
|
+
const key = setupPhaseKey(phase);
|
|
122
|
+
const group = groups.get(key) ?? { label: words(phase), starts: [], warmups: [] };
|
|
123
123
|
groups.set(key, group);
|
|
124
|
-
group.starts.push(
|
|
125
|
-
if (
|
|
126
|
-
group.warmups.push(
|
|
124
|
+
group.starts.push(phase.ms);
|
|
125
|
+
if (phase.warmupMs !== undefined)
|
|
126
|
+
group.warmups.push(phase.warmupMs);
|
|
127
127
|
}
|
|
128
128
|
return [...groups.values()].map(({ label, starts, warmups }) => {
|
|
129
129
|
let startMs = 0;
|
|
@@ -139,6 +139,20 @@ function setupsText(events, testMs) {
|
|
|
139
139
|
return `${label} starts ${starts.length} · ${seconds(fastest)}–${seconds(slowest)} · median ${seconds(median(starts) ?? 0)}${share}${warmup}`;
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
|
+
/**
|
|
143
|
+
* A line for each resource's setup phases under each label (`setupPhaseKey`), in the order each first succeeded, from
|
|
144
|
+
* the phases that succeeded: `<label> starts 5 · 2.2s–4.0s · median 3.3s · ~55% of attempt time · warmup median 2.1s`,
|
|
145
|
+
* with the label as its writer worded it, and its resource beside it where another resource's phases share it
|
|
146
|
+
* (`<label> (<resource>) starts 5`), how many there were, the fastest, the slowest, and the median, their share of
|
|
147
|
+
* `testMs`, the test attempts' time, when there is any, and the median of the warmups after them, when any was warmed.
|
|
148
|
+
*/
|
|
149
|
+
function setupsText(events, testMs) {
|
|
150
|
+
const allPhases = events.flatMap((event) => event.kind === "setup-started" || event.kind === "setup-finished" ? [event] : []);
|
|
151
|
+
const succeeded = events.flatMap((event) => event.kind === "setup-finished" && event.ok
|
|
152
|
+
? [{ label: event.label, resource: event.resource, ms: event.ms, warmupMs: event.warmupMs }]
|
|
153
|
+
: []);
|
|
154
|
+
return formatSetupPhases(succeeded, allPhases, testMs);
|
|
155
|
+
}
|
|
142
156
|
/** `2 passed · 1 failed · 1 skipped · 2 files`, with failed and skipped only when there are some. */
|
|
143
157
|
function resultTotals(results, filesText) {
|
|
144
158
|
const count = (state) => results.filter((event) => event.state === state).length;
|
|
@@ -151,19 +165,48 @@ function resultTotals(results, filesText) {
|
|
|
151
165
|
filesText,
|
|
152
166
|
];
|
|
153
167
|
}
|
|
154
|
-
/**
|
|
168
|
+
/**
|
|
169
|
+
* The files that took longest, from each file's start to its finish. Prefers worker-scoped timings for a `(runner
|
|
170
|
+
* sandbox, file)` when present, falling back to main-process reporter file timings when no worker event exists, so a
|
|
171
|
+
* file reported by both is counted once.
|
|
172
|
+
*/
|
|
155
173
|
function slowestFiles(events) {
|
|
156
|
-
const
|
|
157
|
-
const
|
|
174
|
+
const workerStarted = new Map();
|
|
175
|
+
const workerDurations = [];
|
|
176
|
+
const workerFiles = new Set();
|
|
177
|
+
const mainSpan = new Map();
|
|
158
178
|
for (const event of events) {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
179
|
+
if (event.kind !== "file-started" && event.kind !== "file-finished")
|
|
180
|
+
continue;
|
|
181
|
+
const sandbox = event.sandbox ?? -1;
|
|
182
|
+
const fileKey = `${sandbox}\u0000${event.file}`;
|
|
183
|
+
if ("worker" in event && event.worker !== undefined) {
|
|
184
|
+
const key = `${sandbox}\u0000${event.worker}\u0000${event.file}`;
|
|
185
|
+
if (event.kind === "file-started")
|
|
186
|
+
workerStarted.set(key, event.at);
|
|
187
|
+
else {
|
|
188
|
+
const at = workerStarted.get(key);
|
|
189
|
+
if (at !== undefined) {
|
|
190
|
+
workerFiles.add(fileKey);
|
|
191
|
+
workerDurations.push({ sandbox, file: event.file, ms: Math.max(0, event.at - at) });
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
const held = mainSpan.get(fileKey) ?? { sandbox, file: event.file };
|
|
197
|
+
mainSpan.set(fileKey, held);
|
|
198
|
+
if (event.kind === "file-started")
|
|
199
|
+
held.started = Math.min(held.started ?? event.at, event.at);
|
|
200
|
+
else
|
|
201
|
+
held.finished = Math.max(held.finished ?? event.at, event.at);
|
|
166
202
|
}
|
|
167
203
|
}
|
|
204
|
+
const durations = workerDurations.map(({ file, ms }) => ({ file, ms }));
|
|
205
|
+
for (const [fileKey, span] of mainSpan) {
|
|
206
|
+
if (workerFiles.has(fileKey))
|
|
207
|
+
continue;
|
|
208
|
+
if (span.started !== undefined && span.finished !== undefined)
|
|
209
|
+
durations.push({ file: span.file, ms: Math.max(0, span.finished - span.started) });
|
|
210
|
+
}
|
|
168
211
|
return durations.toSorted((a, b) => b.ms - a.ms).slice(0, SLOWEST_FILES);
|
|
169
212
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Paint } from "
|
|
1
|
+
import type { Paint } from "../sdk/extension/index.ts";
|
|
2
2
|
/** `ms` as progress and the summaries show it: seconds to one decimal and `s`. */
|
|
3
3
|
export declare function seconds(ms: number): string;
|
|
4
4
|
/** A keep time as progress names it: whole hours as `2h`, otherwise minutes, such as `30m` or `90m`. */
|
|
@@ -9,6 +9,11 @@ export declare function keepTimeText(ms: number): string;
|
|
|
9
9
|
* What releasing each does, such as what it gives back, is its own: its cleanup lines say it.
|
|
10
10
|
*/
|
|
11
11
|
export declare function releaseText(resources: readonly string[], done: boolean): string | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Steps in the order they happen, as one phrase: `a`, `a, then b`, or `a, b, then c`. The cleanup line, the stopping
|
|
14
|
+
* line, and the live view's cleanup row say cleanup's order so.
|
|
15
|
+
*/
|
|
16
|
+
export declare function orderText(steps: readonly string[]): string;
|
|
12
17
|
/** An ISO time as progress and `storm runs` show it: to the second, in UTC. */
|
|
13
18
|
export declare function isoSecondsText(iso: string): string;
|
|
14
19
|
/** A commit as progress names it: its first 12 characters. */
|
|
@@ -22,7 +27,7 @@ export declare function shortFile(file: string): string;
|
|
|
22
27
|
export declare function withArticle(label: string): string;
|
|
23
28
|
/** The middle of a sorted list, or the mean of its two middles. */
|
|
24
29
|
export declare function median(values: readonly number[]): number | undefined;
|
|
25
|
-
export type { Paint } from "
|
|
30
|
+
export type { Paint } from "../sdk/extension/index.ts";
|
|
26
31
|
/** The paint for `color`: green, red, yellow, cyan, dim and bold, or none. */
|
|
27
32
|
export declare function paint(color: boolean): Paint;
|
|
28
33
|
/** `text`'s width in columns, color codes left out; each character counts as one. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Text helpers the run's progress, live view and summaries share: durations, commits and test files as they show,
|
|
2
2
|
// color codes by role, and widths that skip them.
|
|
3
|
-
import { secondsOf, secondsText } from "
|
|
3
|
+
import { secondsOf, secondsText } from "../core/index.js";
|
|
4
4
|
/** `ms` as progress and the summaries show it: seconds to one decimal and `s`. */
|
|
5
5
|
export function seconds(ms) {
|
|
6
6
|
return secondsText(secondsOf(ms));
|
|
@@ -18,6 +18,14 @@ export function keepTimeText(ms) {
|
|
|
18
18
|
export function releaseText(resources, done) {
|
|
19
19
|
return resources.length === 0 ? undefined : `${done ? "released" : "releasing"} ${resources.join(", ")}`;
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Steps in the order they happen, as one phrase: `a`, `a, then b`, or `a, b, then c`. The cleanup line, the stopping
|
|
23
|
+
* line, and the live view's cleanup row say cleanup's order so.
|
|
24
|
+
*/
|
|
25
|
+
export function orderText(steps) {
|
|
26
|
+
const last = steps.at(-1) ?? "";
|
|
27
|
+
return steps.length < 2 ? last : `${steps.slice(0, -1).join(", ")}, then ${last}`;
|
|
28
|
+
}
|
|
21
29
|
/** An ISO time as progress and `storm runs` show it: to the second, in UTC. */
|
|
22
30
|
export function isoSecondsText(iso) {
|
|
23
31
|
return iso.replace(/\.\d+Z$/, "Z");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
3
|
-
import { type WorkerLane } from "./worker-chart.ts";
|
|
1
|
+
import type { ColorDepth } from "@vercel/clinkr";
|
|
2
|
+
import type { TimelineFacts } from "../run-directory/index.ts";
|
|
3
|
+
import { type WorkerLane, type WorkerView } from "./worker-chart.ts";
|
|
4
4
|
/** What the waterfall says beside the timeline. */
|
|
5
5
|
export interface WaterfallExtras {
|
|
6
6
|
/** The terminal's width, at least 60. */
|
|
@@ -9,10 +9,12 @@ export interface WaterfallExtras {
|
|
|
9
9
|
readonly logs: string | undefined;
|
|
10
10
|
/** Lines between the critical path and the logs line, such as the tests' summary. */
|
|
11
11
|
readonly details?: readonly string[];
|
|
12
|
-
/** The worker chart, drawn under the `
|
|
12
|
+
/** The worker chart, drawn under the `command` row as its breakdown; none when empty. */
|
|
13
13
|
readonly workers?: readonly WorkerLane[];
|
|
14
|
-
/** How
|
|
15
|
-
readonly
|
|
14
|
+
/** How to draw `workers` under the `command` row: a 1-line concurrency sparkline (default), or the sparkline plus per-worker rows (`"lanes"`). */
|
|
15
|
+
readonly workerView?: WorkerView;
|
|
16
|
+
/** The terminal's color depth, defaulting to `"none"` (no ANSI escape sequences). */
|
|
17
|
+
readonly colorDepth?: ColorDepth;
|
|
16
18
|
}
|
|
17
19
|
/** A critical path step: its row's label, and for the runner what it did with its runner snapshot. */
|
|
18
20
|
export declare function criticalPathStep(step: TimelineFacts["criticalPath"][number], timeline: TimelineFacts): string;
|