@cnc-tools/storm 0.16.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/storm.js +54 -40
- package/dist/build-info.js +1 -1
- package/dist/chunks/{chunk-VL7WFTVQ.js → chunk-24UYAK4R.js} +465 -365
- package/dist/chunks/{chunk-DC2CDHNK.js → chunk-2JMWUKH3.js} +2074 -473
- package/dist/chunks/{chunk-FOZWA52V.js → chunk-3VXZONGE.js} +481 -376
- package/dist/chunks/{chunk-ZG3WQ4UF.js → chunk-55O4FCN4.js} +1 -1
- package/dist/chunks/{chunk-CN4EFA5J.js → chunk-72ZFEMAW.js} +1 -1
- package/dist/chunks/chunk-AS37D43E.js +2173 -0
- package/dist/chunks/chunk-CQAY6GLP.js +1260 -0
- package/dist/chunks/chunk-DZLU7BYK.js +340 -0
- package/dist/chunks/{chunk-R7XVBZOY.js → chunk-EEENLQHE.js} +59 -11
- package/dist/chunks/{chunk-TJNFVNKR.js → chunk-EI3XDCEI.js} +1 -1
- package/dist/chunks/{chunk-HVNK3I45.js → chunk-FDUY3BNF.js} +1 -1
- package/dist/chunks/{chunk-FCQUJDA4.js → chunk-GUCCYCIO.js} +4 -189
- package/dist/chunks/{chunk-OIY3DMF2.js → chunk-HBI4LEMH.js} +3 -3
- package/dist/chunks/{chunk-2MAD5NKK.js → chunk-K4MDQPLW.js} +1 -18
- package/dist/chunks/chunk-KK7PAWIZ.js +198 -0
- package/dist/chunks/{chunk-G3PHMXH5.js → chunk-KQ5FXRUD.js} +18 -1
- package/dist/chunks/{chunk-5VXBKPW6.js → chunk-LKXHGGGX.js} +1 -1
- package/dist/chunks/{chunk-P357TZAY.js → chunk-LOGHIUUB.js} +21 -18
- package/dist/chunks/{chunk-CK2GZEPK.js → chunk-OEPFINFT.js} +2 -2
- package/dist/chunks/{chunk-DWEAHX4T.js → chunk-OI4AP6Z7.js} +5 -5
- package/dist/chunks/{chunk-V4IKA3WI.js → chunk-PMBQWVTW.js} +26 -19
- package/dist/chunks/chunk-SZMYIIG2.js +88 -0
- package/dist/chunks/{chunk-5CCP36QQ.js → chunk-TXCOFC7N.js} +1 -1
- package/dist/chunks/{chunk-VUPZH7J2.js → chunk-UXD3TVWM.js} +1 -1
- package/dist/chunks/{chunk-3L52KNQA.js → chunk-WNW2QXQK.js} +8 -8
- package/dist/chunks/{chunk-AWBSONHB.js → chunk-XBDRVFEV.js} +55 -16
- package/dist/chunks/{live-app-WECQOQ4C.js → live-app-UY7BEDUN.js} +17 -13
- package/dist/cli.d.ts +28 -0
- package/dist/cli.js +64 -0
- package/dist/commands/exec/across-sandboxes-outcomes.d.ts +2 -2
- package/dist/commands/exec/across-sandboxes-outcomes.js +3 -3
- package/dist/commands/exec/before-run.d.ts +123 -0
- package/dist/commands/exec/before-run.js +105 -0
- package/dist/commands/exec/command.d.ts +67 -14
- package/dist/commands/exec/command.js +31 -95
- package/dist/commands/exec/driver-plan.d.ts +9 -4
- package/dist/commands/exec/driver-plan.js +8 -8
- package/dist/commands/exec/exec-words.js +1 -1
- package/dist/commands/exec/execute-run.d.ts +39 -0
- package/dist/commands/exec/execute-run.js +325 -0
- package/dist/commands/exec/live-view.d.ts +3 -3
- package/dist/commands/exec/live-view.js +16 -15
- package/dist/commands/exec/metadata.js +1 -1
- package/dist/commands/exec/mint-failed.d.ts +38 -0
- package/dist/commands/exec/mint-failed.js +27 -4
- package/dist/commands/exec/outcomes.d.ts +104 -22
- package/dist/commands/exec/outcomes.js +73 -26
- package/dist/commands/exec/plan-run.d.ts +58 -150
- package/dist/commands/exec/plan-run.js +239 -90
- package/dist/commands/exec/progress.d.ts +10 -6
- package/dist/commands/exec/progress.js +38 -25
- package/dist/commands/exec/run-bin.d.ts +11 -11
- package/dist/commands/exec/run-bin.js +9 -9
- package/dist/commands/exec/run-flags.d.ts +69 -0
- package/dist/commands/exec/run-flags.js +58 -0
- package/dist/commands/exec/run-metadata.js +4 -4
- package/dist/commands/exec/run-summary.d.ts +58 -0
- package/dist/commands/exec/run-summary.js +205 -0
- package/dist/commands/exec/runner-refusals.d.ts +82 -0
- package/dist/commands/exec/runner-refusals.js +71 -0
- package/dist/commands/exec/sandbox-progress.js +3 -0
- package/dist/commands/exec/stopped-outcome.d.ts +12 -0
- package/dist/commands/exec/stopped-outcome.js +77 -0
- package/dist/commands/exec/view.d.ts +20 -11
- package/dist/commands/exec/view.js +103 -47
- package/dist/commands/runs/facts.d.ts +8 -4
- package/dist/commands/runs/facts.js +19 -10
- package/dist/commands/runs/list/command.d.ts +16 -8
- package/dist/commands/runs/list/command.js +10 -10
- package/dist/commands/runs/list/outcomes.d.ts +8 -4
- package/dist/commands/runs/logs/command.js +10 -10
- package/dist/commands/runs/show/command.d.ts +16 -8
- package/dist/commands/runs/show/command.js +31 -29
- package/dist/commands/runs/show/metadata.js +1 -1
- package/dist/commands/runs/show/outcomes.d.ts +8 -4
- package/dist/commands/runs/show/outcomes.js +8 -6
- package/dist/commands/snapshots/access.d.ts +111 -0
- package/dist/commands/snapshots/access.js +96 -0
- package/dist/commands/snapshots/build/command.d.ts +376 -101
- package/dist/commands/snapshots/build/command.js +447 -149
- package/dist/commands/snapshots/build/metadata.d.ts +10 -0
- package/dist/commands/snapshots/build/metadata.js +31 -11
- package/dist/commands/snapshots/build/outcomes.d.ts +242 -47
- package/dist/commands/snapshots/build/outcomes.js +200 -36
- package/dist/commands/snapshots/list/command.d.ts +368 -27
- package/dist/commands/snapshots/list/command.js +298 -68
- package/dist/commands/snapshots/list/metadata.d.ts +16 -0
- package/dist/commands/snapshots/list/metadata.js +29 -6
- package/dist/commands/snapshots/list/outcomes.d.ts +247 -15
- package/dist/commands/snapshots/list/outcomes.js +223 -52
- package/dist/commands/snapshots/metadata.js +1 -1
- package/dist/commands/snapshots/prune/command.d.ts +430 -0
- package/dist/commands/snapshots/prune/command.js +161 -0
- package/dist/commands/snapshots/prune/metadata.d.ts +28 -0
- package/dist/commands/snapshots/prune/metadata.js +39 -0
- package/dist/commands/snapshots/prune/outcomes.d.ts +208 -0
- package/dist/commands/snapshots/prune/outcomes.js +78 -0
- package/dist/commands/suites/list/command.js +17 -17
- package/dist/commands/suites/list/outcomes.js +2 -2
- package/dist/commands/test/command.d.ts +67 -14
- package/dist/commands/test/command.js +49 -252
- package/dist/commands/test/outcomes.d.ts +33 -7
- package/dist/config/check-runner.d.ts +3 -3
- package/dist/config/check-runner.js +8 -7
- package/dist/config/credential-resolver.d.ts +50 -5
- package/dist/config/credential-resolver.js +51 -19
- package/dist/config/credential-settle.d.ts +6 -2
- package/dist/config/credential-settle.js +11 -5
- package/dist/config/index.d.ts +2 -2
- package/dist/config/index.js +1 -1
- package/dist/config/runner.d.ts +5 -5
- package/dist/config/runner.js +1 -1
- package/dist/config/schema.d.ts +2 -2
- package/dist/config/schema.js +1 -1
- package/dist/config-file/define.d.ts +1 -1
- package/dist/config-file/define.js +1 -1
- package/dist/config-file/runner.d.ts +5 -5
- package/dist/config-file/toolchain.d.ts +14 -4
- package/dist/config-file/toolchain.js +43 -7
- package/dist/context.d.ts +10 -6
- package/dist/context.js +8 -6
- package/dist/core/across-sandboxes.d.ts +7 -6
- package/dist/core/across-sandboxes.js +123 -152
- package/dist/core/coordinator.d.ts +166 -0
- package/dist/core/coordinator.js +233 -0
- package/dist/core/events.d.ts +2 -2
- package/dist/core/index.d.ts +4 -2
- package/dist/core/index.js +1 -1
- package/dist/core/outcomes.d.ts +148 -0
- package/dist/core/{sandbox-end.js → outcomes.js} +28 -4
- package/dist/core/resources.d.ts +31 -53
- package/dist/core/resources.js +32 -70
- package/dist/core/run-state.d.ts +7 -1
- package/dist/core/run-state.js +2 -0
- package/dist/core/run.d.ts +32 -236
- package/dist/core/run.js +107 -267
- package/dist/core/state-directory.d.ts +1 -1
- package/dist/core/state-directory.js +2 -2
- package/dist/credential/gateways.d.ts +15 -1
- package/dist/credential/index.d.ts +4 -3
- package/dist/credential/index.js +3 -2
- package/dist/credential/live/vercel-cli-gateway.d.ts +1 -1
- package/dist/credential/live/vercel-cli-gateway.js +1 -1
- package/dist/credential/live/vercel-oidc-token-gateway.d.ts +11 -0
- package/dist/credential/live/vercel-oidc-token-gateway.js +16 -0
- package/dist/credential/source.d.ts +73 -6
- package/dist/credential/source.js +55 -2
- package/dist/extension-commands.d.ts +1 -1
- package/dist/extension-commands.js +2 -2
- package/dist/extensions/testserver/commands/pool/create/command.d.ts +35 -2
- package/dist/extensions/testserver/commands/pool/create/command.js +7 -7
- package/dist/extensions/testserver/commands/pool/create/metadata.js +5 -5
- package/dist/extensions/testserver/commands/pool/create/outcomes.d.ts +17 -1
- package/dist/extensions/testserver/commands/pool/list/command.js +4 -4
- package/dist/extensions/testserver/credential-facts.d.ts +6 -2
- package/dist/extensions/testserver/credential-facts.js +29 -11
- package/dist/extensions/testserver/lifecycle.js +7 -1
- package/dist/extensions/testserver/limit.d.ts +3 -0
- package/dist/extensions/testserver/limit.js +3 -0
- package/dist/extensions/testserver/provision.d.ts +8 -1
- package/dist/extensions/testserver/provision.js +8 -3
- package/dist/extensions/testserver/refusals.d.ts +6 -1
- package/dist/extensions/testserver/refusals.js +16 -1
- package/dist/extensions/testserver/resource.d.ts +1 -1
- package/dist/extensions/testserver/resource.js +1 -1
- package/dist/extensions/testserver/result.d.ts +1 -1
- package/dist/extensions/testserver/result.js +9 -4
- package/dist/planning/driver-file-lists.d.ts +0 -15
- package/dist/planning/driver-file-lists.js +2 -21
- package/dist/planning/plan-only.d.ts +3 -14
- package/dist/planning/plan-only.js +11 -20
- package/dist/planning/run-kind-flags.js +2 -2
- package/dist/planning/run-plan.d.ts +45 -12
- package/dist/planning/run-plan.js +4 -3
- package/dist/planning/suites.d.ts +1 -1
- package/dist/planning/suites.js +2 -2
- package/dist/planning/test-plan.d.ts +9 -0
- package/dist/planning/test-plan.js +9 -0
- package/dist/run-directory/recording.js +3 -3
- package/dist/run-directory/run-record.d.ts +26 -11
- package/dist/run-directory/run-record.js +16 -13
- package/dist/runner/base.js +1 -1
- package/dist/runner/build-snapshots.d.ts +60 -29
- package/dist/runner/build-snapshots.js +136 -29
- package/dist/runner/context.d.ts +15 -7
- package/dist/runner/context.js +19 -6
- package/dist/runner/events.d.ts +16 -10
- package/dist/runner/gateways.d.ts +122 -23
- package/dist/runner/gateways.js +1 -1
- package/dist/runner/gh.d.ts +42 -0
- package/dist/runner/gh.js +58 -0
- package/dist/runner/index.d.ts +13 -8
- package/dist/runner/index.js +12 -6
- package/dist/runner/live/checkout-gateway.js +7 -0
- package/dist/runner/live/gh-output.d.ts +17 -0
- package/dist/runner/live/gh-output.js +37 -0
- package/dist/runner/live/gh-token-gateway.d.ts +13 -0
- package/dist/runner/live/gh-token-gateway.js +51 -0
- package/dist/runner/live/sandbox-errors.d.ts +2 -0
- package/dist/runner/live/sandbox-errors.js +4 -0
- package/dist/runner/live/sandbox-gateway.js +140 -4
- package/dist/runner/live/snapshot-index-gateway.d.ts +12 -0
- package/dist/runner/live/{snapshot-cache-gateway.js → snapshot-index-gateway.js} +11 -11
- package/dist/runner/live/snapshot-records.js +12 -12
- package/dist/runner/local-snapshot-index.d.ts +205 -0
- package/dist/runner/local-snapshot-index.js +210 -0
- package/dist/runner/network-policy.d.ts +6 -6
- package/dist/runner/network-policy.js +7 -7
- package/dist/runner/policy-writes.d.ts +1 -1
- package/dist/runner/policy-writes.js +1 -1
- package/dist/runner/prepare.d.ts +14 -14
- package/dist/runner/prepare.js +20 -11
- package/dist/runner/ready.d.ts +19 -11
- package/dist/runner/ready.js +104 -33
- package/dist/runner/sandboxed-command.d.ts +3 -3
- package/dist/runner/sandboxed-command.js +3 -3
- package/dist/runner/scope.d.ts +15 -8
- package/dist/runner/scope.js +16 -5
- package/dist/runner/secrets.d.ts +41 -18
- package/dist/runner/secrets.js +226 -30
- package/dist/runner/session.d.ts +8 -8
- package/dist/runner/session.js +6 -3
- package/dist/runner/shared-snapshot-entry.d.ts +92 -0
- package/dist/runner/shared-snapshot-entry.js +168 -0
- package/dist/runner/shared-snapshot-list.d.ts +81 -0
- package/dist/runner/shared-snapshot-list.js +155 -0
- package/dist/runner/shared-snapshot-lookup.d.ts +51 -0
- package/dist/runner/shared-snapshot-lookup.js +118 -0
- package/dist/runner/shared-snapshot-prune.d.ts +58 -0
- package/dist/runner/shared-snapshot-prune.js +133 -0
- package/dist/runner/snapshot-build.d.ts +42 -14
- package/dist/runner/snapshot-build.js +79 -47
- package/dist/runner/snapshot-choice.js +2 -1
- package/dist/runner/snapshot-inspect.d.ts +39 -40
- package/dist/runner/snapshot-inspect.js +52 -35
- package/dist/runner/snapshot-key.d.ts +32 -17
- package/dist/runner/snapshot-key.js +43 -18
- package/dist/runner/snapshot-source.d.ts +31 -0
- package/dist/runner/snapshot-source.js +122 -0
- package/dist/runner/steps.d.ts +1 -1
- package/dist/runner/steps.js +1 -1
- package/dist/runner/{recipe-check.d.ts → vercel-sandbox-check.d.ts} +4 -2
- package/dist/runner/{recipe-check.js → vercel-sandbox-check.js} +7 -2
- package/dist/runner/{recipe.d.ts → vercel-sandbox-options.d.ts} +59 -28
- package/dist/runner/{recipe.js → vercel-sandbox-options.js} +128 -84
- package/dist/runner/vercel-sandbox-secrets.d.ts +116 -0
- package/dist/runner/{recipe-secrets.js → vercel-sandbox-secrets.js} +159 -26
- package/dist/sdk/extension/credential-diagnosis.d.ts +3 -1
- package/dist/sdk/extension/credential-diagnosis.js +25 -5
- package/dist/sdk/extension/credential-source.d.ts +20 -3
- package/dist/sdk/extension/credential-source.js +4 -4
- package/dist/sdk/extension/index.d.ts +3 -2
- package/dist/sdk/extension/index.js +2 -1
- package/dist/sdk/extension/resource-definition.d.ts +1 -1
- package/dist/sdk/extension/secret-source.d.ts +1 -1
- package/dist/sdk/extension/secret-source.js +1 -1
- package/dist/sdk/extension/vercel-oidc-facts.d.ts +20 -0
- package/dist/sdk/extension/vercel-oidc-facts.js +20 -0
- package/dist/shared/cleanup.d.ts +3 -3
- package/dist/shared/cleanup.js +15 -5
- package/dist/shared/snapshot-text.d.ts +4 -4
- package/dist/shared/snapshot-text.js +11 -11
- package/dist/time/duration.js +1 -1
- package/package.json +5 -3
- package/skills/overview.md +4 -4
- package/skills/plan-runs.md +1 -1
- package/skills/read-run-output.md +6 -6
- package/dist/application.d.ts +0 -21
- package/dist/application.js +0 -30
- package/dist/chunks/chunk-7EENF73W.js +0 -782
- package/dist/chunks/chunk-Z5PBVG3Y.js +0 -2599
- package/dist/commands/exec/across-sandboxes-run.d.ts +0 -180
- package/dist/commands/exec/across-sandboxes-run.js +0 -339
- package/dist/commands/exec/plan-only.d.ts +0 -10
- package/dist/commands/exec/plan-only.js +0 -45
- package/dist/commands/exec/run-command.d.ts +0 -475
- package/dist/commands/exec/run-command.js +0 -603
- package/dist/commands/exec/run-planned.d.ts +0 -20
- package/dist/commands/exec/run-planned.js +0 -22
- package/dist/commands/exec/sandbox-view.d.ts +0 -19
- package/dist/commands/exec/sandbox-view.js +0 -72
- package/dist/commands/test/plan.d.ts +0 -92
- package/dist/commands/test/plan.js +0 -125
- package/dist/core/sandbox-end.d.ts +0 -64
- package/dist/runner/live/snapshot-cache-gateway.d.ts +0 -12
- package/dist/runner/recipe-secrets.d.ts +0 -67
- package/dist/runner/snapshot-cache.d.ts +0 -148
- package/dist/runner/snapshot-cache.js +0 -126
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
|
-
fileListMismatchText,
|
|
3
|
-
fileListMismatches,
|
|
4
|
-
testPlanText,
|
|
5
2
|
waterfallLines,
|
|
6
3
|
workerLaneNotes,
|
|
7
4
|
workerLanes,
|
|
8
5
|
workerLanesFromRecords,
|
|
9
6
|
workerParallelism,
|
|
10
7
|
workerSetupMs
|
|
11
|
-
} from "../../../chunks/chunk-
|
|
12
|
-
import "../../../chunks/chunk-DWEAHX4T.js";
|
|
13
|
-
import "../../../chunks/chunk-R7XVBZOY.js";
|
|
14
|
-
import "../../../chunks/chunk-CN4EFA5J.js";
|
|
8
|
+
} from "../../../chunks/chunk-GUCCYCIO.js";
|
|
15
9
|
import {
|
|
16
10
|
builtAtText
|
|
17
|
-
} from "../../../chunks/chunk-
|
|
18
|
-
import
|
|
19
|
-
|
|
11
|
+
} from "../../../chunks/chunk-WNW2QXQK.js";
|
|
12
|
+
import {
|
|
13
|
+
fileListMismatchText,
|
|
14
|
+
fileListMismatches,
|
|
15
|
+
testPlanText
|
|
16
|
+
} from "../../../chunks/chunk-KK7PAWIZ.js";
|
|
17
|
+
import "../../../chunks/chunk-OI4AP6Z7.js";
|
|
18
|
+
import "../../../chunks/chunk-EEENLQHE.js";
|
|
19
|
+
import "../../../chunks/chunk-72ZFEMAW.js";
|
|
20
|
+
import "../../../chunks/chunk-55O4FCN4.js";
|
|
21
|
+
import "../../../chunks/chunk-TXCOFC7N.js";
|
|
20
22
|
import {
|
|
21
23
|
LOG_STEPS,
|
|
22
24
|
commandText,
|
|
@@ -48,30 +50,30 @@ import {
|
|
|
48
50
|
totalAttemptMs,
|
|
49
51
|
totalsText,
|
|
50
52
|
totalsTone
|
|
51
|
-
} from "../../../chunks/chunk-
|
|
53
|
+
} from "../../../chunks/chunk-PMBQWVTW.js";
|
|
52
54
|
import {
|
|
53
55
|
capsFor
|
|
54
|
-
} from "../../../chunks/chunk-
|
|
56
|
+
} from "../../../chunks/chunk-EI3XDCEI.js";
|
|
55
57
|
import {
|
|
56
58
|
SANDBOX_TABLE_HEADER,
|
|
57
59
|
sandboxCauseText,
|
|
58
|
-
sandboxPage,
|
|
59
60
|
sandboxStateText,
|
|
60
61
|
sandboxTableRows,
|
|
61
62
|
sandboxesPassedText,
|
|
62
63
|
sandboxesText,
|
|
63
64
|
startedSandboxesText
|
|
64
|
-
} from "../../../chunks/chunk-
|
|
65
|
+
} from "../../../chunks/chunk-K4MDQPLW.js";
|
|
66
|
+
import {
|
|
67
|
+
sandboxPage,
|
|
68
|
+
seconds,
|
|
69
|
+
short
|
|
70
|
+
} from "../../../chunks/chunk-KQ5FXRUD.js";
|
|
65
71
|
import {
|
|
66
72
|
pastRuns,
|
|
67
73
|
planSchema,
|
|
68
74
|
sandboxRecordSchema,
|
|
69
75
|
timelineSchema
|
|
70
|
-
} from "../../../chunks/chunk-
|
|
71
|
-
import {
|
|
72
|
-
seconds,
|
|
73
|
-
short
|
|
74
|
-
} from "../../../chunks/chunk-G3PHMXH5.js";
|
|
76
|
+
} from "../../../chunks/chunk-LOGHIUUB.js";
|
|
75
77
|
import {
|
|
76
78
|
bold,
|
|
77
79
|
paint,
|
|
@@ -79,17 +81,17 @@ import {
|
|
|
79
81
|
} from "../../../chunks/chunk-F6N34UWB.js";
|
|
80
82
|
import {
|
|
81
83
|
megabytesText
|
|
82
|
-
} from "../../../chunks/chunk-
|
|
84
|
+
} from "../../../chunks/chunk-3VXZONGE.js";
|
|
83
85
|
import {
|
|
84
86
|
findConfigFile
|
|
85
|
-
} from "../../../chunks/chunk-
|
|
86
|
-
import "../../../chunks/chunk-
|
|
87
|
+
} from "../../../chunks/chunk-2JMWUKH3.js";
|
|
88
|
+
import "../../../chunks/chunk-XBDRVFEV.js";
|
|
87
89
|
import {
|
|
88
90
|
stormCommands
|
|
89
|
-
} from "../../../chunks/chunk-
|
|
91
|
+
} from "../../../chunks/chunk-LKXHGGGX.js";
|
|
90
92
|
import {
|
|
91
93
|
defineOutcomes
|
|
92
|
-
} from "../../../chunks/chunk-
|
|
94
|
+
} from "../../../chunks/chunk-24UYAK4R.js";
|
|
93
95
|
|
|
94
96
|
// src/commands/runs/show/command.ts
|
|
95
97
|
import { z as z2 } from "zod";
|
|
@@ -533,22 +535,22 @@ function whereRows(shown) {
|
|
|
533
535
|
const { where, ended } = shown;
|
|
534
536
|
if (where === null) return [];
|
|
535
537
|
if (where.kind === "launch-machine") return [["Ran on", "this machine"]];
|
|
536
|
-
const shape = `${where.region}, ${where.vcpus} vCPUs, ${where.
|
|
538
|
+
const shape = `${where.region}, ${where.vcpus} vCPUs, ${where.image}`;
|
|
537
539
|
const sandbox = shown.sandboxes !== null ? `${startedSandboxesText(shown.sandboxes, ended !== null)} (${shape})` : where.sandbox !== null ? `runner sandbox ${where.sandbox} (${shape})` : ended === null ? `runner sandbox (${shape})` : `runner sandbox, none started (${shape})`;
|
|
538
540
|
const { snapshot } = where;
|
|
539
541
|
return [
|
|
540
542
|
["Ran in", sandbox],
|
|
541
543
|
...where.sandboxUrl === null ? [] : [["Runner sandbox page", where.sandboxUrl]],
|
|
542
544
|
...keptRows(shown),
|
|
543
|
-
["Vercel project", `${where.team}/${where.project}`],
|
|
545
|
+
...where.team === null || where.project === null ? [] : [["Vercel project", `${where.team}/${where.project}`]],
|
|
544
546
|
["Merge-base", `${short(where.base)}, of HEAD and ${where.baseRef}`],
|
|
545
547
|
...snapshot === null ? [] : [
|
|
546
548
|
[
|
|
547
549
|
"Snapshot",
|
|
548
550
|
[
|
|
549
|
-
`${snapshot.id} of ${short(snapshot.base)}, ${snapshot.built ? "built" : "reused"}`,
|
|
551
|
+
`${snapshot.id} of ${short(snapshot.base)}, ${snapshot.built ? "built" : snapshot.source === "shared" ? "reused from the shared snapshot index" : "reused"}`,
|
|
550
552
|
...snapshotCommitLines(snapshot, where.base),
|
|
551
|
-
` ${snapshot.url}`
|
|
553
|
+
...snapshot.url === null ? [] : [` ${snapshot.url}`]
|
|
552
554
|
]
|
|
553
555
|
]
|
|
554
556
|
],
|
|
@@ -640,7 +642,7 @@ function sandboxSection(shown, sandbox, p) {
|
|
|
640
642
|
["Command", commandText({ argv: sandbox.argv })],
|
|
641
643
|
[
|
|
642
644
|
"Runner sandbox",
|
|
643
|
-
sandbox.name === null ? { text: "none started", tone: "muted" } : where?.kind === "vercel-sandbox" ? [sandbox.name, ` ${sandboxPage(where, sandbox.name)}`] : sandbox.name
|
|
645
|
+
sandbox.name === null ? { text: "none started", tone: "muted" } : where?.kind === "vercel-sandbox" && where.team !== null && where.project !== null ? [sandbox.name, ` ${sandboxPage({ team: where.team, project: where.project }, sandbox.name)}`] : sandbox.name
|
|
644
646
|
],
|
|
645
647
|
[
|
|
646
648
|
"Logs",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/commands/runs/show/metadata.ts
|
|
2
2
|
var metadata = {
|
|
3
|
-
description: "Show a past run from its run directory: its command, a storm test run's test plan, config file, working directory, the branch and commit it started from, start, how long it took, and how it ended; where its command ran, on this machine or in a runner sandbox, with the sandbox's name, region, vCPUs,
|
|
3
|
+
description: "Show a past run from its run directory: its command, a storm test run's test plan, config file, working directory, the branch and commit it started from, start, how long it took, and how it ended; where its command ran, on this machine or in a runner sandbox, with the sandbox's name, region, vCPUs, image, and page in the Vercel dashboard, until when the run kept it running, with its Connect page while it runs, its control plane team and project, the run's base and the runner snapshot it started from, with where it was built and its page; what each resource it acquired reported of itself; the run logs it has, each with the storm runs logs command that prints it; its waterfall, with a concurrency sparkline under command whenever worker events exist (or every worker row sorted by finish time descending with --workers); and each test's final result and duration, in color on a terminal that takes it. With --failed, --test, or --worker, only the selected tests, how many of all they are, and each one's errors and test output, the last 8 MiB of what it printed, failure reports included. With --slowest, sort the test table by duration descending. For a run across runner sandboxes, how many of its runner sandboxes passed, a table with one row for each runner sandbox (its state, exit code, preparation time, command time, tests, and name), one waterfall for each runner sandbox, and each test's runner sandbox; each runner sandbox's workers under its waterfall, with its own worker indexes from w0; --sandbox limits the tests and the waterfall to one runner sandbox, and --worker needs it, and --failed adds a section for each runner sandbox that did not pass, with its cause, its command, the paths of its logs, and the last lines of its command log. With --json, each test file with its runner sandbox, its time, and how its tests ended (files), for every run. Without an id, the newest finished run of the storm.config.ts found from the working directory, or of every config with --all; pass the id `storm test` or `storm exec` printed when another run may have finished since. A run's test results are saved once it finishes. Changes nothing.",
|
|
4
4
|
summary: "Show a past run and its tests.",
|
|
5
5
|
help: {
|
|
6
6
|
usages: [
|
|
@@ -12,10 +12,10 @@ export declare const outcomes: import("@vercel/clinkr").Outcomes<{
|
|
|
12
12
|
kind: z.ZodLiteral<"launch-machine">;
|
|
13
13
|
}, z.core.$strip>, z.ZodObject<{
|
|
14
14
|
kind: z.ZodLiteral<"vercel-sandbox">;
|
|
15
|
-
team: z.ZodString
|
|
16
|
-
project: z.ZodString
|
|
15
|
+
team: z.ZodNullable<z.ZodString>;
|
|
16
|
+
project: z.ZodNullable<z.ZodString>;
|
|
17
17
|
region: z.ZodString;
|
|
18
|
-
|
|
18
|
+
image: z.ZodString;
|
|
19
19
|
vcpus: z.ZodNumber;
|
|
20
20
|
base: z.ZodString;
|
|
21
21
|
baseRef: z.ZodString;
|
|
@@ -28,7 +28,11 @@ export declare const outcomes: import("@vercel/clinkr").Outcomes<{
|
|
|
28
28
|
base: z.ZodString;
|
|
29
29
|
built: z.ZodBoolean;
|
|
30
30
|
builtBehind: z.ZodNullable<z.ZodNumber>;
|
|
31
|
-
|
|
31
|
+
source: z.ZodNullable<z.ZodEnum<{
|
|
32
|
+
local: "local";
|
|
33
|
+
shared: "shared";
|
|
34
|
+
}>>;
|
|
35
|
+
url: z.ZodNullable<z.ZodString>;
|
|
32
36
|
}, z.core.$strip>>;
|
|
33
37
|
uploadBytes: z.ZodNullable<z.ZodNumber>;
|
|
34
38
|
}, z.core.$strip>], "kind">>;
|
|
@@ -495,7 +495,7 @@ function whereRows(shown) {
|
|
|
495
495
|
return [];
|
|
496
496
|
if (where.kind === "launch-machine")
|
|
497
497
|
return [["Ran on", "this machine"]];
|
|
498
|
-
const shape = `${where.region}, ${where.vcpus} vCPUs, ${where.
|
|
498
|
+
const shape = `${where.region}, ${where.vcpus} vCPUs, ${where.image}`;
|
|
499
499
|
const sandbox = shown.sandboxes !== null
|
|
500
500
|
? `${startedSandboxesText(shown.sandboxes, ended !== null)} (${shape})`
|
|
501
501
|
: where.sandbox !== null
|
|
@@ -508,7 +508,9 @@ function whereRows(shown) {
|
|
|
508
508
|
["Ran in", sandbox],
|
|
509
509
|
...(where.sandboxUrl === null ? [] : [["Runner sandbox page", where.sandboxUrl]]),
|
|
510
510
|
...keptRows(shown),
|
|
511
|
-
|
|
511
|
+
...(where.team === null || where.project === null
|
|
512
|
+
? []
|
|
513
|
+
: [["Vercel project", `${where.team}/${where.project}`]]),
|
|
512
514
|
["Merge-base", `${short(where.base)}, of HEAD and ${where.baseRef}`],
|
|
513
515
|
...(snapshot === null
|
|
514
516
|
? []
|
|
@@ -516,9 +518,9 @@ function whereRows(shown) {
|
|
|
516
518
|
[
|
|
517
519
|
"Snapshot",
|
|
518
520
|
[
|
|
519
|
-
`${snapshot.id} of ${short(snapshot.base)}, ${snapshot.built ? "built" : "reused"}`,
|
|
521
|
+
`${snapshot.id} of ${short(snapshot.base)}, ${snapshot.built ? "built" : snapshot.source === "shared" ? "reused from the shared snapshot index" : "reused"}`,
|
|
520
522
|
...snapshotCommitLines(snapshot, where.base),
|
|
521
|
-
` ${snapshot.url}
|
|
523
|
+
...(snapshot.url === null ? [] : [` ${snapshot.url}`]),
|
|
522
524
|
],
|
|
523
525
|
],
|
|
524
526
|
]),
|
|
@@ -648,8 +650,8 @@ function sandboxSection(shown, sandbox, p) {
|
|
|
648
650
|
"Runner sandbox",
|
|
649
651
|
sandbox.name === null
|
|
650
652
|
? { text: "none started", tone: "muted" }
|
|
651
|
-
: where?.kind === "vercel-sandbox"
|
|
652
|
-
? [sandbox.name, ` ${sandboxPage(where, sandbox.name)}`]
|
|
653
|
+
: where?.kind === "vercel-sandbox" && where.team !== null && where.project !== null
|
|
654
|
+
? [sandbox.name, ` ${sandboxPage({ team: where.team, project: where.project }, sandbox.name)}`]
|
|
653
655
|
: sandbox.name,
|
|
654
656
|
],
|
|
655
657
|
[
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { StormApp } from "../../context.ts";
|
|
3
|
+
import { type credentialErrors, type CredentialSourceError, type CredentialTarget } from "../../config/index.ts";
|
|
4
|
+
import type { MintTarget } from "../../credential/index.ts";
|
|
5
|
+
import type { SandboxAccess } from "../../runner/index.ts";
|
|
6
|
+
import { runErrors } from "../exec/outcomes.ts";
|
|
7
|
+
/** Which credential source a `storm snapshots` command accepts (`mint` or `vercel-oidc`). */
|
|
8
|
+
export type SnapshotCredentialKind = "mint" | "vercel-oidc";
|
|
9
|
+
/**
|
|
10
|
+
* The request fields every `storm snapshots` command takes for its credential: `--credential`, `--scope`, and
|
|
11
|
+
* `--project`. Each command's help says what the team and project are for there, so the help stays in its metadata.
|
|
12
|
+
*/
|
|
13
|
+
export declare const SNAPSHOT_ACCESS_FIELDS: {
|
|
14
|
+
credential: z.ZodDefault<z.ZodEnum<{
|
|
15
|
+
mint: "mint";
|
|
16
|
+
"vercel-oidc": "vercel-oidc";
|
|
17
|
+
}>>;
|
|
18
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
19
|
+
project: z.ZodOptional<z.ZodString>;
|
|
20
|
+
};
|
|
21
|
+
/** The CLI options of those fields: `-p` for `--project`. */
|
|
22
|
+
export declare const SNAPSHOT_ACCESS_CLI: {
|
|
23
|
+
options: {
|
|
24
|
+
project: {
|
|
25
|
+
short: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
/** The Vercel project a `storm snapshots` result or error names. */
|
|
30
|
+
export declare const PROJECT_FIELDS: {
|
|
31
|
+
/** The canonical team and project IDs from the credential. */
|
|
32
|
+
teamId: z.ZodString;
|
|
33
|
+
projectId: z.ZodString;
|
|
34
|
+
/** The display team and project slugs from flags or `storm.config.ts`, or null when unset. */
|
|
35
|
+
team: z.ZodNullable<z.ZodString>;
|
|
36
|
+
project: z.ZodNullable<z.ZodString>;
|
|
37
|
+
};
|
|
38
|
+
/** The Vercel project a `storm snapshots` result or error names, as `PROJECT_FIELDS` holds it. */
|
|
39
|
+
export interface ProjectFacts {
|
|
40
|
+
readonly teamId: string;
|
|
41
|
+
readonly projectId: string;
|
|
42
|
+
readonly team: string | null;
|
|
43
|
+
readonly project: string | null;
|
|
44
|
+
}
|
|
45
|
+
/** The Sandbox access and canonical/display Vercel project fields obtained for a `storm snapshots` command. */
|
|
46
|
+
export interface SnapshotSandboxAccess {
|
|
47
|
+
readonly access: SandboxAccess;
|
|
48
|
+
/** The target team and project slugs from flags or `storm.config.ts`, or null when either is unset. */
|
|
49
|
+
readonly target: MintTarget | null;
|
|
50
|
+
/** The canonical team and project IDs from the credential. */
|
|
51
|
+
readonly teamId: string;
|
|
52
|
+
readonly projectId: string;
|
|
53
|
+
/** The display team slug from flags or `storm.config.ts`, or null when unset. */
|
|
54
|
+
readonly team: string | null;
|
|
55
|
+
/** The display project slug from flags or `storm.config.ts`, or null when unset. */
|
|
56
|
+
readonly project: string | null;
|
|
57
|
+
}
|
|
58
|
+
/** Human display label for a Vercel project: `team/project` slugs when known, else `teamId/projectId`. */
|
|
59
|
+
export declare function projectDisplayText(owner: ProjectFacts): string;
|
|
60
|
+
/**
|
|
61
|
+
* The `shared_list_failed` error of a `storm snapshots` command that lists the shared snapshot index: the Vercel
|
|
62
|
+
* Sandbox API failed on the listing. `description` says what the command did not do, `consequence` follows the
|
|
63
|
+
* project in its message (such as ", so nothing was deleted"), and `next` says what to do.
|
|
64
|
+
*/
|
|
65
|
+
export declare function sharedListFailedError(words: {
|
|
66
|
+
readonly description: string;
|
|
67
|
+
readonly consequence: string;
|
|
68
|
+
readonly next: string;
|
|
69
|
+
}): {
|
|
70
|
+
exitCode: 1;
|
|
71
|
+
description: string;
|
|
72
|
+
schema: z.ZodObject<{
|
|
73
|
+
teamId: z.ZodString;
|
|
74
|
+
projectId: z.ZodString;
|
|
75
|
+
team: z.ZodNullable<z.ZodString>;
|
|
76
|
+
project: z.ZodNullable<z.ZodString>;
|
|
77
|
+
message: z.ZodString;
|
|
78
|
+
}, z.core.$strip>;
|
|
79
|
+
render: (facts: ProjectFacts & {
|
|
80
|
+
readonly message: string;
|
|
81
|
+
}) => {
|
|
82
|
+
message: string;
|
|
83
|
+
next: {
|
|
84
|
+
type: "text";
|
|
85
|
+
text: string;
|
|
86
|
+
}[];
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
/** Why obtaining Sandbox access for a `storm snapshots` command failed. */
|
|
90
|
+
export type SnapshotAccessRefusal = CredentialSourceError | ReturnType<typeof runErrors.runnerFailed>;
|
|
91
|
+
/** A settled credential source for a `storm snapshots` command, ready to obtain `SandboxAccess` on demand. */
|
|
92
|
+
export interface SettledSnapshotAccess {
|
|
93
|
+
readonly target: MintTarget | null;
|
|
94
|
+
obtain(): Promise<({
|
|
95
|
+
readonly ok: true;
|
|
96
|
+
} & SnapshotSandboxAccess) | {
|
|
97
|
+
readonly ok: false;
|
|
98
|
+
readonly refusal: SnapshotAccessRefusal;
|
|
99
|
+
}>;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Settles `--credential`, `--scope`, and `--project` for a `storm snapshots` command without minting or reading a
|
|
103
|
+
* token yet. Refuses with `missing_target` when `credential` is `mint` and either `scope` or `project` is unset.
|
|
104
|
+
*/
|
|
105
|
+
export declare function settleSnapshotAccess(app: Pick<StormApp, "credentials">, credential: SnapshotCredentialKind, settings: CredentialTarget, progress: ((line: string) => Promise<void>) | undefined): {
|
|
106
|
+
readonly ok: true;
|
|
107
|
+
readonly settled: SettledSnapshotAccess;
|
|
108
|
+
} | {
|
|
109
|
+
readonly ok: false;
|
|
110
|
+
readonly refusal: ReturnType<typeof credentialErrors.missingTarget>;
|
|
111
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// Shared credential settlement and Sandbox access helper for `storm snapshots` commands (`build`, `list`, and `prune`).
|
|
2
|
+
// Settles the credential source up front so `missing_target` refuses before any local Git or cache work, then obtains
|
|
3
|
+
// a `SandboxAccess` and the display team/project on demand.
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { credentialSourceError, givenTarget, } from "../../config/index.js";
|
|
6
|
+
import { RUN_CLEANUP } from "../../shared/cleanup.js";
|
|
7
|
+
import { runErrors } from "../exec/outcomes.js";
|
|
8
|
+
import { runnerFailureFacts } from "../exec/runner-refusals.js";
|
|
9
|
+
/**
|
|
10
|
+
* The request fields every `storm snapshots` command takes for its credential: `--credential`, `--scope`, and
|
|
11
|
+
* `--project`. Each command's help says what the team and project are for there, so the help stays in its metadata.
|
|
12
|
+
*/
|
|
13
|
+
export const SNAPSHOT_ACCESS_FIELDS = {
|
|
14
|
+
credential: z.enum(["mint", "vercel-oidc"]).default("mint"),
|
|
15
|
+
scope: z.string().min(1).optional(),
|
|
16
|
+
project: z.string().min(1).optional(),
|
|
17
|
+
};
|
|
18
|
+
/** The CLI options of those fields: `-p` for `--project`. */
|
|
19
|
+
export const SNAPSHOT_ACCESS_CLI = { options: { project: { short: "p" } } };
|
|
20
|
+
/** The Vercel project a `storm snapshots` result or error names. */
|
|
21
|
+
export const PROJECT_FIELDS = {
|
|
22
|
+
/** The canonical team and project IDs from the credential. */
|
|
23
|
+
teamId: z.string(),
|
|
24
|
+
projectId: z.string(),
|
|
25
|
+
/** The display team and project slugs from flags or `storm.config.ts`, or null when unset. */
|
|
26
|
+
team: z.string().nullable(),
|
|
27
|
+
project: z.string().nullable(),
|
|
28
|
+
};
|
|
29
|
+
/** Human display label for a Vercel project: `team/project` slugs when known, else `teamId/projectId`. */
|
|
30
|
+
export function projectDisplayText(owner) {
|
|
31
|
+
return owner.team !== null && owner.project !== null
|
|
32
|
+
? `${owner.team}/${owner.project}`
|
|
33
|
+
: `${owner.teamId}/${owner.projectId}`;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The `shared_list_failed` error of a `storm snapshots` command that lists the shared snapshot index: the Vercel
|
|
37
|
+
* Sandbox API failed on the listing. `description` says what the command did not do, `consequence` follows the
|
|
38
|
+
* project in its message (such as ", so nothing was deleted"), and `next` says what to do.
|
|
39
|
+
*/
|
|
40
|
+
export function sharedListFailedError(words) {
|
|
41
|
+
return {
|
|
42
|
+
exitCode: 1,
|
|
43
|
+
description: words.description,
|
|
44
|
+
schema: z.object({
|
|
45
|
+
...PROJECT_FIELDS,
|
|
46
|
+
/** What the Sandbox API said. */
|
|
47
|
+
message: z.string(),
|
|
48
|
+
}),
|
|
49
|
+
render: (facts) => ({
|
|
50
|
+
message: `Couldn't list the shared snapshot index of ${projectDisplayText(facts)}${words.consequence}: ${facts.message}`,
|
|
51
|
+
next: [{ type: "text", text: words.next }],
|
|
52
|
+
}),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Settles `--credential`, `--scope`, and `--project` for a `storm snapshots` command without minting or reading a
|
|
57
|
+
* token yet. Refuses with `missing_target` when `credential` is `mint` and either `scope` or `project` is unset.
|
|
58
|
+
*/
|
|
59
|
+
export function settleSnapshotAccess(app, credential, settings, progress) {
|
|
60
|
+
const chosen = app.credentials.vercelProjectSource(credential, settings, { progress });
|
|
61
|
+
if (!chosen.ok)
|
|
62
|
+
return chosen;
|
|
63
|
+
const target = givenTarget(settings.scope, settings.project);
|
|
64
|
+
return {
|
|
65
|
+
ok: true,
|
|
66
|
+
settled: {
|
|
67
|
+
target,
|
|
68
|
+
obtain: () => obtainSnapshotAccess(chosen.source, target),
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
async function obtainSnapshotAccess(source, target) {
|
|
73
|
+
const got = await source.obtain();
|
|
74
|
+
if (!got.ok) {
|
|
75
|
+
const { failure } = got;
|
|
76
|
+
return {
|
|
77
|
+
ok: false,
|
|
78
|
+
refusal: failure.source === "claims-missing"
|
|
79
|
+
? runErrors.runnerFailed({
|
|
80
|
+
failure: runnerFailureFacts({ kind: "credential-claims-missing", target: failure.target }),
|
|
81
|
+
cleanup: RUN_CLEANUP.facts({ runnerCleanup: null, resourceCleanup: {} }),
|
|
82
|
+
})
|
|
83
|
+
: credentialSourceError(failure),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
const { project } = got;
|
|
87
|
+
return {
|
|
88
|
+
ok: true,
|
|
89
|
+
access: { credential: got.credential, ...project },
|
|
90
|
+
target,
|
|
91
|
+
teamId: project.teamId,
|
|
92
|
+
projectId: project.projectId,
|
|
93
|
+
team: target?.team ?? null,
|
|
94
|
+
project: target?.project ?? null,
|
|
95
|
+
};
|
|
96
|
+
}
|