@cnc-tools/storm 0.17.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 +37 -39
- package/dist/build-info.js +1 -1
- package/dist/chunks/{chunk-4WAMTUWZ.js → chunk-24UYAK4R.js} +88 -67
- package/dist/chunks/{chunk-RNAS7JHE.js → chunk-2JMWUKH3.js} +710 -102
- package/dist/chunks/{chunk-YEPFSLQR.js → chunk-3VXZONGE.js} +2 -2
- package/dist/chunks/{chunk-D27KILIA.js → chunk-55O4FCN4.js} +1 -1
- package/dist/chunks/{chunk-JN3YY6ZH.js → chunk-AS37D43E.js} +27 -20
- package/dist/chunks/{chunk-2VP4GRJM.js → chunk-CQAY6GLP.js} +54 -13
- package/dist/chunks/{chunk-MR77L2GK.js → chunk-DZLU7BYK.js} +5 -5
- package/dist/chunks/{chunk-LKTZ5OXS.js → chunk-EI3XDCEI.js} +1 -1
- package/dist/chunks/{chunk-FNBB6V4R.js → chunk-FDUY3BNF.js} +1 -1
- package/dist/chunks/{chunk-RWIXDDCK.js → chunk-GUCCYCIO.js} +3 -3
- package/dist/chunks/{chunk-6UHIJXZG.js → chunk-HBI4LEMH.js} +2 -2
- package/dist/chunks/{chunk-CKGZA25H.js → chunk-K4MDQPLW.js} +1 -1
- package/dist/chunks/{chunk-F4MOYHRY.js → chunk-KK7PAWIZ.js} +1 -1
- package/dist/chunks/{chunk-GRT3UIBV.js → chunk-KQ5FXRUD.js} +1 -1
- package/dist/chunks/{chunk-WV3DP6NR.js → chunk-LKXHGGGX.js} +1 -1
- package/dist/chunks/{chunk-4O5C2XGJ.js → chunk-LOGHIUUB.js} +6 -6
- package/dist/chunks/{chunk-7DZE67QM.js → chunk-OEPFINFT.js} +2 -2
- package/dist/chunks/{chunk-HWIQ2S7K.js → chunk-OI4AP6Z7.js} +3 -3
- package/dist/chunks/{chunk-DADEYJDW.js → chunk-PMBQWVTW.js} +6 -6
- package/dist/chunks/{chunk-HP3CURSZ.js → chunk-SZMYIIG2.js} +2 -2
- package/dist/chunks/{chunk-2RNDPDTJ.js → chunk-TXCOFC7N.js} +2 -2
- package/dist/chunks/{chunk-BCBKYOHW.js → chunk-UXD3TVWM.js} +1 -1
- package/dist/chunks/{chunk-M7EKRGVD.js → chunk-WNW2QXQK.js} +1 -1
- package/dist/chunks/{live-app-R76JQXZL.js → live-app-UY7BEDUN.js} +9 -7
- package/dist/cli.d.ts +28 -0
- package/dist/cli.js +64 -0
- package/dist/commands/exec/across-sandboxes-outcomes.d.ts +1 -1
- package/dist/commands/exec/across-sandboxes-outcomes.js +1 -1
- package/dist/commands/exec/before-run.d.ts +1 -1
- package/dist/commands/exec/command.d.ts +36 -12
- package/dist/commands/exec/command.js +18 -18
- package/dist/commands/exec/execute-run.js +1 -1
- package/dist/commands/exec/outcomes.d.ts +71 -15
- package/dist/commands/exec/outcomes.js +46 -6
- package/dist/commands/exec/plan-run.d.ts +1 -1
- package/dist/commands/exec/plan-run.js +8 -3
- package/dist/commands/exec/run-metadata.js +1 -1
- package/dist/commands/exec/run-summary.js +1 -1
- package/dist/commands/runs/facts.d.ts +1 -1
- package/dist/commands/runs/facts.js +2 -2
- package/dist/commands/runs/list/command.d.ts +2 -2
- package/dist/commands/runs/list/command.js +9 -9
- package/dist/commands/runs/list/outcomes.d.ts +1 -1
- package/dist/commands/runs/logs/command.js +9 -9
- package/dist/commands/runs/show/command.d.ts +2 -2
- package/dist/commands/runs/show/command.js +16 -16
- package/dist/commands/runs/show/metadata.js +1 -1
- package/dist/commands/runs/show/outcomes.d.ts +1 -1
- package/dist/commands/runs/show/outcomes.js +1 -1
- package/dist/commands/snapshots/build/command.d.ts +22 -14
- package/dist/commands/snapshots/build/command.js +32 -30
- package/dist/commands/snapshots/build/metadata.js +1 -1
- package/dist/commands/snapshots/build/outcomes.d.ts +14 -10
- package/dist/commands/snapshots/build/outcomes.js +1 -1
- package/dist/commands/snapshots/list/command.d.ts +2 -2
- package/dist/commands/snapshots/list/command.js +19 -19
- package/dist/commands/snapshots/list/outcomes.d.ts +2 -2
- package/dist/commands/snapshots/list/outcomes.js +3 -3
- package/dist/commands/snapshots/prune/command.js +14 -14
- package/dist/commands/suites/list/command.js +10 -10
- package/dist/commands/test/command.d.ts +36 -12
- package/dist/commands/test/command.js +20 -20
- package/dist/commands/test/outcomes.d.ts +18 -6
- package/dist/config-file/define.d.ts +1 -1
- package/dist/config-file/toolchain.d.ts +13 -3
- package/dist/config-file/toolchain.js +41 -5
- package/dist/context.d.ts +3 -1
- package/dist/context.js +2 -1
- package/dist/core/outcomes.d.ts +1 -1
- package/dist/core/run.js +1 -1
- package/dist/extension-commands.d.ts +2 -7
- package/dist/extension-commands.js +3 -17
- package/dist/extensions/testserver/commands/pool/create/command.js +3 -3
- package/dist/extensions/testserver/commands/pool/list/command.js +2 -2
- package/dist/run-directory/recording.js +1 -1
- package/dist/run-directory/run-record.d.ts +5 -5
- package/dist/run-directory/run-record.js +5 -5
- package/dist/runner/build-snapshots.d.ts +5 -0
- package/dist/runner/build-snapshots.js +11 -5
- package/dist/runner/gateways.d.ts +37 -4
- package/dist/runner/gh.d.ts +42 -0
- package/dist/runner/gh.js +58 -0
- package/dist/runner/index.d.ts +5 -4
- package/dist/runner/index.js +3 -2
- 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-gateway.js +12 -2
- package/dist/runner/live/snapshot-records.js +10 -9
- package/dist/runner/local-snapshot-index.d.ts +11 -5
- package/dist/runner/local-snapshot-index.js +13 -14
- package/dist/runner/ready.d.ts +1 -1
- package/dist/runner/ready.js +1 -1
- package/dist/runner/scope.d.ts +5 -2
- package/dist/runner/scope.js +6 -2
- package/dist/runner/secrets.d.ts +37 -14
- package/dist/runner/secrets.js +218 -25
- package/dist/runner/session.js +3 -0
- package/dist/runner/shared-snapshot-entry.d.ts +3 -3
- package/dist/runner/shared-snapshot-entry.js +4 -4
- package/dist/runner/shared-snapshot-list.d.ts +1 -1
- package/dist/runner/shared-snapshot-list.js +1 -1
- package/dist/runner/shared-snapshot-lookup.d.ts +1 -1
- package/dist/runner/shared-snapshot-lookup.js +1 -1
- package/dist/runner/snapshot-build.js +54 -25
- package/dist/runner/snapshot-choice.js +1 -0
- package/dist/runner/snapshot-inspect.js +2 -5
- package/dist/runner/snapshot-key.d.ts +21 -7
- package/dist/runner/snapshot-key.js +31 -7
- package/dist/runner/snapshot-source.d.ts +31 -0
- package/dist/runner/snapshot-source.js +122 -0
- package/dist/runner/vercel-sandbox-check.d.ts +2 -0
- package/dist/runner/vercel-sandbox-check.js +6 -2
- package/dist/runner/vercel-sandbox-options.d.ts +36 -6
- package/dist/runner/vercel-sandbox-options.js +62 -19
- package/dist/runner/vercel-sandbox-secrets.d.ts +55 -6
- package/dist/runner/vercel-sandbox-secrets.js +142 -9
- package/dist/sdk/extension/commands.d.ts +3 -8
- package/dist/sdk/extension/commands.js +1 -3
- package/package.json +4 -3
- package/skills/overview.md +1 -1
- package/dist/application.d.ts +0 -30
- package/dist/application.js +0 -41
- package/dist/bin/run.d.ts +0 -18
- package/dist/bin/run.js +0 -31
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
systemClock,
|
|
10
10
|
systemTimer,
|
|
11
11
|
vercelProjectSource
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-2JMWUKH3.js";
|
|
13
13
|
import {
|
|
14
14
|
describeMintFailure,
|
|
15
15
|
describeVercelOidcTokenFailure
|
|
@@ -1744,7 +1744,7 @@ async function runInVercelSandbox(context, runner, input) {
|
|
|
1744
1744
|
uploadBytes: ready.uploadBytes,
|
|
1745
1745
|
vcpus: ready.vcpus,
|
|
1746
1746
|
region: ready.region,
|
|
1747
|
-
|
|
1747
|
+
image: ready.image,
|
|
1748
1748
|
buildMs: ready.buildMs
|
|
1749
1749
|
}
|
|
1750
1750
|
};
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
testsChart,
|
|
5
5
|
testsSummaryLines,
|
|
6
6
|
waterfallLines
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GUCCYCIO.js";
|
|
8
8
|
import {
|
|
9
9
|
LANE_WIDTH,
|
|
10
10
|
commandEnd,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
sharedSnapshotLookupFailedText,
|
|
19
19
|
skippedText,
|
|
20
20
|
snapshotBuildTexts
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-DZLU7BYK.js";
|
|
22
22
|
import {
|
|
23
23
|
versionText
|
|
24
24
|
} from "./chunk-I5GZLOLQ.js";
|
|
@@ -46,16 +46,16 @@ import {
|
|
|
46
46
|
sandboxesDefaultErrors,
|
|
47
47
|
sandboxesErrors,
|
|
48
48
|
vcpuResources
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-CQAY6GLP.js";
|
|
50
50
|
import {
|
|
51
51
|
redactStrings,
|
|
52
52
|
redactingObserver,
|
|
53
53
|
redactingTerminal,
|
|
54
54
|
redactor
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-FDUY3BNF.js";
|
|
56
56
|
import {
|
|
57
57
|
builtAtText
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-WNW2QXQK.js";
|
|
59
59
|
import {
|
|
60
60
|
RESOURCE_FLAG_HELP,
|
|
61
61
|
RESOURCE_USAGE_FLAGS,
|
|
@@ -68,13 +68,13 @@ import {
|
|
|
68
68
|
resourceFlagValues,
|
|
69
69
|
resourceRunExamples,
|
|
70
70
|
testPlanLine
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-KK7PAWIZ.js";
|
|
72
72
|
import {
|
|
73
73
|
DEFINITION_SET
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-OI4AP6Z7.js";
|
|
75
75
|
import {
|
|
76
76
|
NodeSignalCancellation
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-UXD3TVWM.js";
|
|
78
78
|
import {
|
|
79
79
|
SANDBOX_TABLE_HEADER,
|
|
80
80
|
sandboxStateText,
|
|
@@ -82,7 +82,7 @@ import {
|
|
|
82
82
|
sandboxTableRows,
|
|
83
83
|
sandboxTotalsLine,
|
|
84
84
|
sandboxesText
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-K4MDQPLW.js";
|
|
86
86
|
import {
|
|
87
87
|
isoSecondsText,
|
|
88
88
|
keepTimeText,
|
|
@@ -97,11 +97,11 @@ import {
|
|
|
97
97
|
truncate,
|
|
98
98
|
visibleLength,
|
|
99
99
|
withArticle
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-KQ5FXRUD.js";
|
|
101
101
|
import {
|
|
102
102
|
recordAcrossSandboxes,
|
|
103
103
|
recordRun
|
|
104
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-LOGHIUUB.js";
|
|
105
105
|
import {
|
|
106
106
|
EMPTY_RUN_STATE,
|
|
107
107
|
acrossSandboxesExitStatus,
|
|
@@ -113,7 +113,7 @@ import {
|
|
|
113
113
|
setupPhaseKey,
|
|
114
114
|
setupPhaseWords,
|
|
115
115
|
timedProgress
|
|
116
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-3VXZONGE.js";
|
|
117
117
|
import {
|
|
118
118
|
fileSettings,
|
|
119
119
|
givenTarget,
|
|
@@ -125,7 +125,7 @@ import {
|
|
|
125
125
|
resolveSandboxCountDefault,
|
|
126
126
|
settleCredential,
|
|
127
127
|
settleRunResources
|
|
128
|
-
} from "./chunk-
|
|
128
|
+
} from "./chunk-2JMWUKH3.js";
|
|
129
129
|
import {
|
|
130
130
|
NOT_COUNTED,
|
|
131
131
|
SECRET_MIN_LENGTH,
|
|
@@ -134,7 +134,7 @@ import {
|
|
|
134
134
|
} from "./chunk-XBDRVFEV.js";
|
|
135
135
|
import {
|
|
136
136
|
refused
|
|
137
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-24UYAK4R.js";
|
|
138
138
|
|
|
139
139
|
// src/planning/sandbox-placeholders.ts
|
|
140
140
|
var PLACEHOLDER = /(?<!\$)\{(sandbox\+1|sandbox(?:es)?)\}/g;
|
|
@@ -489,7 +489,7 @@ function sandboxesRanFacts(app, run) {
|
|
|
489
489
|
built: outcome.snapshot.built,
|
|
490
490
|
vcpus: runner.prepared.vcpus,
|
|
491
491
|
region: entry.region,
|
|
492
|
-
|
|
492
|
+
image: entry.image,
|
|
493
493
|
uploadBytes: recorded.uploadBytes
|
|
494
494
|
},
|
|
495
495
|
cleanup: RUN_CLEANUP.facts(outcome),
|
|
@@ -1496,7 +1496,7 @@ async function runSingle(context, request, spec, planned, lifecycles) {
|
|
|
1496
1496
|
built: outcome.runner.built,
|
|
1497
1497
|
vcpus: outcome.runner.vcpus,
|
|
1498
1498
|
region: outcome.runner.region,
|
|
1499
|
-
|
|
1499
|
+
image: outcome.runner.image,
|
|
1500
1500
|
buildMs: outcome.runner.buildMs
|
|
1501
1501
|
},
|
|
1502
1502
|
timeline: ran,
|
|
@@ -1877,11 +1877,11 @@ async function planRun(app, request, target, signal) {
|
|
|
1877
1877
|
throw new Error("planRun: --credential github-actions should have been refused for vercel-sandbox");
|
|
1878
1878
|
const targetConfig = givenTarget(settings.scope, settings.project);
|
|
1879
1879
|
const { options } = runner;
|
|
1880
|
-
const credentials = readCredentials(options, app.env);
|
|
1880
|
+
const credentials = await readCredentials(options, app.env, app.context);
|
|
1881
1881
|
if (!credentials.ok)
|
|
1882
1882
|
return refused(
|
|
1883
1883
|
runErrors.credentialsInvalid({
|
|
1884
|
-
|
|
1884
|
+
problems: credentials.problems.map(({ name, problem, detail, hint }) => ({ name, problem, detail, hint })),
|
|
1885
1885
|
minLength: SECRET_MIN_LENGTH,
|
|
1886
1886
|
configFile
|
|
1887
1887
|
})
|
|
@@ -1894,6 +1894,13 @@ async function planRun(app, request, target, signal) {
|
|
|
1894
1894
|
configFile
|
|
1895
1895
|
})
|
|
1896
1896
|
);
|
|
1897
|
+
if (options.managedCredentials.length > 0 && keepFlagMinutes > 0)
|
|
1898
|
+
return refused(
|
|
1899
|
+
runErrors.keepSandboxManagedCredentials({
|
|
1900
|
+
providers: [...options.managedCredentials],
|
|
1901
|
+
configFile
|
|
1902
|
+
})
|
|
1903
|
+
);
|
|
1897
1904
|
const unsafeSecretEnvVars = readUnsafeSecretEnvVars(options, app.env);
|
|
1898
1905
|
if (!unsafeSecretEnvVars.ok)
|
|
1899
1906
|
return refused(
|
|
@@ -1911,7 +1918,7 @@ async function planRun(app, request, target, signal) {
|
|
|
1911
1918
|
target: targetConfig,
|
|
1912
1919
|
credentials: credentials.credentials,
|
|
1913
1920
|
unsafeSecretEnvVars: unsafeSecretEnvVars.values,
|
|
1914
|
-
secrets: [...credentials.
|
|
1921
|
+
secrets: [...credentials.secrets, ...Object.values(unsafeSecretEnvVars.values)]
|
|
1915
1922
|
};
|
|
1916
1923
|
}
|
|
1917
1924
|
const merged = settleRunResources(file, given);
|
|
@@ -2111,7 +2118,7 @@ var ownRunFields = (verbose) => ({
|
|
|
2111
2118
|
},
|
|
2112
2119
|
keepSandbox: {
|
|
2113
2120
|
valueLabel: "DURATION",
|
|
2114
|
-
description: "Keep the runner sandbox running this long once the run ends, however it ends, so you can connect to it from its page in the Vercel dashboard: 0, which stops and deletes it with the run's other sandboxes, or a whole number of minutes or hours up to 5h (30m, 2h). A run keeps its runner sandbox only when this flag or keepSandbox in vercelSandbox({ \u2026 }) asks; by default it stops and deletes it, after a failure too. A kept runner sandbox holds the checkout, the installed packages, and everything the command wrote, including its test output; storm removes nothing from it, and it holds no credential, the runner's or a resource's, since storm revokes every sandbox credential before it keeps the sandbox. Anyone who can update the Vercel project can connect to it. Refused when vercelSandbox({ \u2026 }) sets unsafeSecretEnvVars
|
|
2121
|
+
description: "Keep the runner sandbox running this long once the run ends, however it ends, so you can connect to it from its page in the Vercel dashboard: 0, which stops and deletes it with the run's other sandboxes, or a whole number of minutes or hours up to 5h (30m, 2h). A run keeps its runner sandbox only when this flag or keepSandbox in vercelSandbox({ \u2026 }) asks; by default it stops and deletes it, after a failure too. A kept runner sandbox holds the checkout, the installed packages, and everything the command wrote, including its test output; storm removes nothing from it, and it holds no credential, the runner's or a resource's, since storm revokes every sandbox credential before it keeps the sandbox. Anyone who can update the Vercel project can connect to it. Refused when vercelSandbox({ \u2026 }) sets unsafeSecretEnvVars (because a run that passes secrets into the runner sandbox's environment never keeps its runner sandbox) or managedCredentials (because Vercel Sandbox rejects deny-all on a sandbox with managed credentials, so storm cannot fence it). storm gives the kept runner sandbox no network access before it releases the run's resources: once the run releases its resources, another run can take them. Before it keeps the sandbox, the run ends every process it started there. The run asks Vercel Sandbox to extend the runner sandbox's timeout when it would stop sooner; it never shortens it, so the sandbox may run past the keep time until its own timeout. The run says until when it runs, and storm runs show and runs list say so too. Default: keepSandbox in vercelSandbox({ \u2026 }), else 0; a run across runner sandboxes keeps each runner sandbox only with --keep-sandbox and ignores keepSandbox in vercelSandbox({ \u2026 }). Fits the Vercel Sandbox runner only."
|
|
2115
2122
|
},
|
|
2116
2123
|
showOutput: {
|
|
2117
2124
|
description: "With the Vercel Sandbox runner on a terminal, print the runner's step output (a snapshot build, the install, the build) above the live view instead of keeping only each step's last line there. Plain output always prints it. Either way, the run directory keeps it whole. Fits the Vercel Sandbox runner only. No config key."
|
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
import {
|
|
2
2
|
redactStrings,
|
|
3
3
|
redactor
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FDUY3BNF.js";
|
|
5
5
|
import {
|
|
6
6
|
comparedPath,
|
|
7
7
|
fileListMismatchText,
|
|
8
8
|
plannedTestPlan,
|
|
9
9
|
testPlanLine
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KK7PAWIZ.js";
|
|
11
11
|
import {
|
|
12
12
|
DEFINITION_SET
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-OI4AP6Z7.js";
|
|
14
14
|
import {
|
|
15
15
|
isoSecondsText,
|
|
16
16
|
sandboxConnectPage
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KQ5FXRUD.js";
|
|
18
18
|
import {
|
|
19
19
|
planSchema,
|
|
20
20
|
sandboxRecordSchema,
|
|
21
21
|
timelineSchema
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-LOGHIUUB.js";
|
|
23
23
|
import {
|
|
24
24
|
CONFIG_FILE_NAMES_TEXT,
|
|
25
|
+
CREDENTIAL_PROBLEM_KINDS,
|
|
25
26
|
MAX_RUNNER_SANDBOXES,
|
|
26
27
|
configErrors,
|
|
27
28
|
credentialErrors,
|
|
28
29
|
invalidConfig
|
|
29
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-2JMWUKH3.js";
|
|
30
31
|
import {
|
|
31
32
|
optionKeyPath,
|
|
32
33
|
vercelOidcTokenFailureShape
|
|
@@ -35,7 +36,7 @@ import {
|
|
|
35
36
|
defineErrors,
|
|
36
37
|
defineOutcomes,
|
|
37
38
|
renderOutcome
|
|
38
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-24UYAK4R.js";
|
|
39
40
|
|
|
40
41
|
// src/shared/cleanup.ts
|
|
41
42
|
import { z } from "zod";
|
|
@@ -474,7 +475,7 @@ var sandboxesRanSchema = z5.object({
|
|
|
474
475
|
built: z5.boolean(),
|
|
475
476
|
vcpus: z5.number(),
|
|
476
477
|
region: z5.string(),
|
|
477
|
-
|
|
478
|
+
image: z5.string(),
|
|
478
479
|
uploadBytes: z5.number().nullable()
|
|
479
480
|
}),
|
|
480
481
|
cleanup: RUN_CLEANUP.schema,
|
|
@@ -690,6 +691,20 @@ function listed(names) {
|
|
|
690
691
|
if (names.length <= 1) return names.join("");
|
|
691
692
|
return `${names.slice(0, -1).join(", ")} and ${names.at(-1) ?? ""}`;
|
|
692
693
|
}
|
|
694
|
+
function renderInvalidCredentials(problems, configFile) {
|
|
695
|
+
const hints = [...new Set(problems.map(({ hint }) => hint))];
|
|
696
|
+
return {
|
|
697
|
+
message: `runner.credentials${configFile === null ? "" : ` in ${configFile}`} names ${problems.length === 1 ? "a credential" : "credentials"} storm can't use. The run didn't start.`,
|
|
698
|
+
rows: [["Credentials", problems.map(({ detail }) => detail)]],
|
|
699
|
+
next: [
|
|
700
|
+
{ type: "text", text: hints.join(" ") },
|
|
701
|
+
{
|
|
702
|
+
type: "text",
|
|
703
|
+
text: "Or run on the launch machine with runner: launchMachine() (or --runner launch-machine for storm exec), which reads none of these credentials."
|
|
704
|
+
}
|
|
705
|
+
]
|
|
706
|
+
};
|
|
707
|
+
}
|
|
693
708
|
function renderInvalidSecretVariables(key, rowLabel, variables, minLength, configFile) {
|
|
694
709
|
const named = (problem) => variables.filter((variable) => variable.problem === problem).map(({ name }) => name);
|
|
695
710
|
const [missing, multiline, short] = [named("missing"), named("multiline"), named("short")];
|
|
@@ -820,7 +835,7 @@ var ranSchema = z6.object({
|
|
|
820
835
|
built: z6.boolean(),
|
|
821
836
|
vcpus: z6.number(),
|
|
822
837
|
region: z6.string(),
|
|
823
|
-
|
|
838
|
+
image: z6.string(),
|
|
824
839
|
/** How long the build step took, in milliseconds. */
|
|
825
840
|
buildMs: z6.number()
|
|
826
841
|
}).nullable(),
|
|
@@ -941,16 +956,23 @@ var runErrors = defineErrors({
|
|
|
941
956
|
},
|
|
942
957
|
credentialsInvalid: {
|
|
943
958
|
exitCode: 2,
|
|
944
|
-
description:
|
|
959
|
+
description: "With the Vercel Sandbox runner, one or more sandbox credentials declared by credentials in vercelSandbox({ \u2026 }) can't be read or used on this machine, so the run didn't start: it minted, acquired, and created nothing. Each problem names the credential source, a machine-readable problem code, a human-readable detail, and an actionable next step without revealing any secret value or file contents.",
|
|
945
960
|
schema: z6.object({
|
|
946
|
-
/** Each
|
|
947
|
-
|
|
961
|
+
/** Each credential source storm can't use and why, in the order the runner options first name it. */
|
|
962
|
+
problems: z6.array(
|
|
963
|
+
z6.object({
|
|
964
|
+
name: z6.string(),
|
|
965
|
+
problem: z6.enum(CREDENTIAL_PROBLEM_KINDS),
|
|
966
|
+
detail: z6.string(),
|
|
967
|
+
hint: z6.string()
|
|
968
|
+
})
|
|
969
|
+
),
|
|
948
970
|
/** The fewest characters a credential's value may have. */
|
|
949
971
|
minLength: z6.number(),
|
|
950
972
|
/** The config file that gave the Vercel Sandbox runner options. */
|
|
951
973
|
configFile: z6.string().nullable()
|
|
952
974
|
}),
|
|
953
|
-
render: ({
|
|
975
|
+
render: ({ problems, configFile }) => renderInvalidCredentials(problems, configFile)
|
|
954
976
|
},
|
|
955
977
|
keepSandboxUnsafeSecretEnvVars: {
|
|
956
978
|
exitCode: 2,
|
|
@@ -975,6 +997,25 @@ var runErrors = defineErrors({
|
|
|
975
997
|
]
|
|
976
998
|
})
|
|
977
999
|
},
|
|
1000
|
+
keepSandboxManagedCredentials: {
|
|
1001
|
+
exitCode: 2,
|
|
1002
|
+
description: "With the Vercel Sandbox runner, --keep-sandbox asked to keep the runner sandbox for a runner whose managedCredentials asks Vercel Sandbox to inject managed credentials, so the run didn't start: it minted, acquired, and created nothing. Vercel Sandbox rejects deny-all on a sandbox with managed credentials, so storm cannot fence it before keeping it running.",
|
|
1003
|
+
schema: z6.object({
|
|
1004
|
+
/** The Vercel-managed credential providers the runner declares, in the runner options' order. */
|
|
1005
|
+
providers: z6.array(z6.string()),
|
|
1006
|
+
/** The config file that gave the Vercel Sandbox runner options. */
|
|
1007
|
+
configFile: z6.string().nullable()
|
|
1008
|
+
}),
|
|
1009
|
+
render: ({ providers, configFile }) => ({
|
|
1010
|
+
message: `Can't keep the runner sandbox when runner.managedCredentials${configFile === null ? "" : ` in ${configFile}`} is set (${listed(providers)}). Vercel Sandbox rejects deny-all on a sandbox with managed credentials, so storm cannot fence a kept runner sandbox. The run didn't start.`,
|
|
1011
|
+
next: [
|
|
1012
|
+
{
|
|
1013
|
+
type: "text",
|
|
1014
|
+
text: "Drop --keep-sandbox, or pass --keep-sandbox 0, so the runner sandbox stops and deletes."
|
|
1015
|
+
}
|
|
1016
|
+
]
|
|
1017
|
+
})
|
|
1018
|
+
},
|
|
978
1019
|
unsafeSecretEnvVarsInvalid: {
|
|
979
1020
|
exitCode: 2,
|
|
980
1021
|
description: `With the Vercel Sandbox runner, launcher environment variables named by unsafeSecretEnvVars in vercelSandbox({ \u2026 }) (source: { kind: "env", name }) can't be used, so the run didn't start: it minted, acquired, and created nothing. Each variable has one problem, the first of: missing, unset or empty; multiline, its value holds a carriage return or a line feed, which line-by-line output would split past storm's redaction; short, its value holds fewer than 8 characters, and storm shows each value as <token> wherever it appears in what it prints and writes, so a value that short would hide ordinary output.`,
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
builtAtText,
|
|
6
6
|
rejectionLines,
|
|
7
7
|
snapshotIndexNoteText
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-WNW2QXQK.js";
|
|
9
9
|
import {
|
|
10
10
|
DEFINITION_SET
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-OI4AP6Z7.js";
|
|
12
12
|
import {
|
|
13
13
|
isoSecondsText,
|
|
14
14
|
keepTimeText,
|
|
@@ -16,16 +16,16 @@ import {
|
|
|
16
16
|
releaseText,
|
|
17
17
|
seconds,
|
|
18
18
|
short
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-KQ5FXRUD.js";
|
|
20
20
|
import {
|
|
21
21
|
megabytesText,
|
|
22
22
|
secondsOf,
|
|
23
23
|
secondsText,
|
|
24
24
|
warningTally
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-3VXZONGE.js";
|
|
26
26
|
import {
|
|
27
27
|
mintTargetText
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-2JMWUKH3.js";
|
|
29
29
|
|
|
30
30
|
// src/commands/exec/progress.ts
|
|
31
31
|
function droppingWriter(write) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFINITION_SET
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OI4AP6Z7.js";
|
|
4
4
|
import {
|
|
5
5
|
median,
|
|
6
6
|
seconds,
|
|
7
7
|
shortFile,
|
|
8
8
|
truncate,
|
|
9
9
|
visibleLength
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KQ5FXRUD.js";
|
|
11
11
|
import {
|
|
12
12
|
PALETTE,
|
|
13
13
|
paintSwatch
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
sameRow,
|
|
18
18
|
setupPhaseKey,
|
|
19
19
|
setupPhaseWords
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-3VXZONGE.js";
|
|
21
21
|
|
|
22
22
|
// src/shared/tests-summary.ts
|
|
23
23
|
var SLOWEST_FILES = 3;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
redactor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FDUY3BNF.js";
|
|
4
4
|
import {
|
|
5
5
|
declaredSecretValues,
|
|
6
6
|
effectiveConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2JMWUKH3.js";
|
|
8
8
|
|
|
9
9
|
// src/planning/suites.ts
|
|
10
10
|
function resolveProjectTests(file, driverByName) {
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
commandExitStatus,
|
|
6
6
|
observeAll,
|
|
7
7
|
sandboxEndFacts
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-3VXZONGE.js";
|
|
9
9
|
import {
|
|
10
10
|
parseTestEvent,
|
|
11
11
|
testEventLine
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-2JMWUKH3.js";
|
|
13
13
|
|
|
14
14
|
// src/run-directory/reader.ts
|
|
15
15
|
import { z as z4 } from "zod";
|
|
@@ -158,7 +158,7 @@ var whereSchema = z2.discriminatedUnion("kind", [
|
|
|
158
158
|
team: z2.string().nullable(),
|
|
159
159
|
project: z2.string().nullable(),
|
|
160
160
|
region: z2.string(),
|
|
161
|
-
|
|
161
|
+
image: z2.string(),
|
|
162
162
|
vcpus: z2.number().int().positive(),
|
|
163
163
|
base: z2.string(),
|
|
164
164
|
baseRef: z2.string(),
|
|
@@ -206,7 +206,7 @@ var sandboxRecordSchema = z2.object({
|
|
|
206
206
|
});
|
|
207
207
|
var SANDBOX_TAIL_LINES = 20;
|
|
208
208
|
var runRecordSchema = z2.object({
|
|
209
|
-
version: z2.literal(
|
|
209
|
+
version: z2.literal(6),
|
|
210
210
|
startedAt: z2.string(),
|
|
211
211
|
cwd: z2.string(),
|
|
212
212
|
configFile: z2.string().nullable(),
|
|
@@ -277,7 +277,7 @@ function startedWhere(runner) {
|
|
|
277
277
|
team: target?.team ?? null,
|
|
278
278
|
project: target?.project ?? null,
|
|
279
279
|
region: prepared.options.region,
|
|
280
|
-
|
|
280
|
+
image: prepared.options.image,
|
|
281
281
|
vcpus: prepared.vcpus,
|
|
282
282
|
base: prepared.base,
|
|
283
283
|
baseRef: prepared.baseRef,
|
|
@@ -946,7 +946,7 @@ function summaryEvent(event) {
|
|
|
946
946
|
async function openRecording(gateway, start, extra) {
|
|
947
947
|
const startedAt = start.clock.now();
|
|
948
948
|
const record = start.redact({
|
|
949
|
-
version:
|
|
949
|
+
version: 6,
|
|
950
950
|
startedAt: startedAt.toISOString(),
|
|
951
951
|
cwd: start.cwd,
|
|
952
952
|
configFile: start.configFile,
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
} from "./chunk-EEENLQHE.js";
|
|
4
4
|
import {
|
|
5
5
|
testserverExtensionCommands
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-55O4FCN4.js";
|
|
7
7
|
import {
|
|
8
8
|
defineExtension
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TXCOFC7N.js";
|
|
10
10
|
import {
|
|
11
11
|
driverContexts,
|
|
12
12
|
driversOf,
|
|
13
13
|
resourceDefinitionSet,
|
|
14
14
|
resourcesOf
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-3VXZONGE.js";
|
|
16
16
|
import {
|
|
17
17
|
SECRET_MIN_LENGTH,
|
|
18
18
|
argsText,
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
muted
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EI3XDCEI.js";
|
|
4
4
|
import {
|
|
5
5
|
testTotalsText
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-K4MDQPLW.js";
|
|
7
7
|
import {
|
|
8
8
|
isoSecondsText,
|
|
9
9
|
sandboxPage,
|
|
10
10
|
seconds,
|
|
11
11
|
short,
|
|
12
12
|
snapshotPage
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KQ5FXRUD.js";
|
|
14
14
|
import {
|
|
15
15
|
sandboxRecordSchema
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-LOGHIUUB.js";
|
|
17
17
|
import {
|
|
18
18
|
stripAnsi
|
|
19
19
|
} from "./chunk-F6N34UWB.js";
|
|
@@ -185,8 +185,8 @@ var runFactsSchema = z.object({
|
|
|
185
185
|
project: z.string().nullable(),
|
|
186
186
|
/** The runner sandbox's region, such as iad1. */
|
|
187
187
|
region: z.string(),
|
|
188
|
-
/** The runner sandbox's
|
|
189
|
-
|
|
188
|
+
/** The runner sandbox's image, such as vercel/sandbox/node:al-24. */
|
|
189
|
+
image: z.string(),
|
|
190
190
|
/** The runner sandbox's vCPUs. */
|
|
191
191
|
vcpus: z.number(),
|
|
192
192
|
/** The run's base: HEAD's merge-base with baseRef, a full SHA. */
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
RUN_CLEANUP,
|
|
3
3
|
runErrors,
|
|
4
4
|
runnerFailureFacts
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-CQAY6GLP.js";
|
|
6
6
|
import {
|
|
7
7
|
credentialSourceError,
|
|
8
8
|
givenTarget
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-2JMWUKH3.js";
|
|
10
10
|
|
|
11
11
|
// src/commands/snapshots/access.ts
|
|
12
12
|
import { z } from "zod";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
commandTree,
|
|
3
3
|
mount
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-24UYAK4R.js";
|
|
5
5
|
|
|
6
6
|
// src/sdk/extension/commands.ts
|
|
7
7
|
import { join } from "node:path";
|
|
@@ -10,7 +10,7 @@ function defineExtensionCommands(definition) {
|
|
|
10
10
|
return {
|
|
11
11
|
description,
|
|
12
12
|
directory,
|
|
13
|
-
mount: (
|
|
13
|
+
mount: ({ path, root }) => mount(tree.directory(join(root, directory)), { path, description, app })
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
16
|
function defineExtension(extension) {
|