@cnc-tools/storm 0.16.0 → 0.17.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.d.ts +22 -13
- package/dist/application.js +21 -10
- package/dist/bin/run.d.ts +18 -0
- package/dist/bin/run.js +31 -0
- package/dist/bin/storm.js +42 -26
- package/dist/build-info.js +1 -1
- package/dist/chunks/{chunk-5CCP36QQ.js → chunk-2RNDPDTJ.js} +2 -2
- package/dist/chunks/chunk-2VP4GRJM.js +1219 -0
- package/dist/chunks/{chunk-P357TZAY.js → chunk-4O5C2XGJ.js} +18 -15
- package/dist/chunks/{chunk-VL7WFTVQ.js → chunk-4WAMTUWZ.js} +419 -340
- package/dist/chunks/{chunk-OIY3DMF2.js → chunk-6UHIJXZG.js} +3 -3
- package/dist/chunks/{chunk-CN4EFA5J.js → chunk-72ZFEMAW.js} +1 -1
- package/dist/chunks/{chunk-CK2GZEPK.js → chunk-7DZE67QM.js} +2 -2
- package/dist/chunks/{chunk-VUPZH7J2.js → chunk-BCBKYOHW.js} +1 -1
- package/dist/chunks/{chunk-2MAD5NKK.js → chunk-CKGZA25H.js} +1 -18
- package/dist/chunks/{chunk-ZG3WQ4UF.js → chunk-D27KILIA.js} +1 -1
- package/dist/chunks/{chunk-V4IKA3WI.js → chunk-DADEYJDW.js} +24 -17
- package/dist/chunks/{chunk-R7XVBZOY.js → chunk-EEENLQHE.js} +59 -11
- package/dist/chunks/chunk-F4MOYHRY.js +198 -0
- package/dist/chunks/{chunk-HVNK3I45.js → chunk-FNBB6V4R.js} +1 -1
- package/dist/chunks/{chunk-G3PHMXH5.js → chunk-GRT3UIBV.js} +18 -1
- package/dist/chunks/chunk-HP3CURSZ.js +88 -0
- package/dist/chunks/{chunk-DWEAHX4T.js → chunk-HWIQ2S7K.js} +5 -5
- package/dist/chunks/chunk-JN3YY6ZH.js +2166 -0
- package/dist/chunks/{chunk-TJNFVNKR.js → chunk-LKTZ5OXS.js} +1 -1
- package/dist/chunks/{chunk-3L52KNQA.js → chunk-M7EKRGVD.js} +8 -8
- package/dist/chunks/chunk-MR77L2GK.js +340 -0
- package/dist/chunks/{chunk-DC2CDHNK.js → chunk-RNAS7JHE.js} +1438 -445
- package/dist/chunks/{chunk-FCQUJDA4.js → chunk-RWIXDDCK.js} +4 -189
- package/dist/chunks/{chunk-5VXBKPW6.js → chunk-WV3DP6NR.js} +1 -1
- package/dist/chunks/{chunk-AWBSONHB.js → chunk-XBDRVFEV.js} +55 -16
- package/dist/chunks/{chunk-FOZWA52V.js → chunk-YEPFSLQR.js} +480 -375
- package/dist/chunks/{live-app-WECQOQ4C.js → live-app-R76JQXZL.js} +15 -13
- package/dist/commands/exec/across-sandboxes-outcomes.d.ts +1 -1
- package/dist/commands/exec/across-sandboxes-outcomes.js +2 -2
- 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 +31 -2
- 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 +34 -8
- package/dist/commands/exec/outcomes.js +30 -23
- package/dist/commands/exec/plan-run.d.ts +58 -150
- package/dist/commands/exec/plan-run.js +232 -88
- 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 +7 -3
- package/dist/commands/runs/facts.js +17 -8
- package/dist/commands/runs/list/command.d.ts +14 -6
- package/dist/commands/runs/list/command.js +10 -10
- package/dist/commands/runs/list/outcomes.d.ts +7 -3
- package/dist/commands/runs/logs/command.js +10 -10
- package/dist/commands/runs/show/command.d.ts +14 -6
- package/dist/commands/runs/show/command.js +30 -28
- package/dist/commands/runs/show/outcomes.d.ts +7 -3
- package/dist/commands/runs/show/outcomes.js +7 -5
- 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 +360 -93
- package/dist/commands/snapshots/build/command.js +446 -150
- 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 +234 -43
- package/dist/commands/snapshots/build/outcomes.js +200 -36
- package/dist/commands/snapshots/list/command.d.ts +366 -25
- package/dist/commands/snapshots/list/command.js +296 -66
- 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 +245 -13
- package/dist/commands/snapshots/list/outcomes.js +221 -50
- 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 +31 -2
- package/dist/commands/test/command.js +49 -252
- package/dist/commands/test/outcomes.d.ts +15 -1
- 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 +1 -1
- package/dist/config-file/toolchain.js +2 -2
- package/dist/context.d.ts +8 -6
- package/dist/context.js +7 -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 +106 -266
- 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 +6 -1
- package/dist/extension-commands.js +15 -1
- 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 +2 -2
- package/dist/run-directory/run-record.d.ts +21 -6
- package/dist/run-directory/run-record.js +12 -9
- package/dist/runner/base.js +1 -1
- package/dist/runner/build-snapshots.d.ts +55 -29
- package/dist/runner/build-snapshots.js +130 -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 +87 -21
- package/dist/runner/gateways.js +1 -1
- package/dist/runner/index.d.ts +11 -7
- package/dist/runner/index.js +9 -4
- 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 +129 -3
- 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 +6 -7
- package/dist/runner/local-snapshot-index.d.ts +199 -0
- package/dist/runner/local-snapshot-index.js +211 -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 +18 -10
- 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 +10 -6
- package/dist/runner/scope.js +10 -3
- package/dist/runner/secrets.d.ts +13 -13
- package/dist/runner/secrets.js +18 -15
- package/dist/runner/session.d.ts +8 -8
- package/dist/runner/session.js +3 -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 +32 -29
- package/dist/runner/snapshot-choice.js +1 -1
- package/dist/runner/snapshot-inspect.d.ts +39 -40
- package/dist/runner/snapshot-inspect.js +55 -35
- package/dist/runner/snapshot-key.d.ts +13 -12
- package/dist/runner/snapshot-key.js +13 -12
- 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} +2 -2
- package/dist/runner/{recipe-check.js → vercel-sandbox-check.js} +3 -2
- package/dist/runner/{recipe.d.ts → vercel-sandbox-options.d.ts} +24 -23
- package/dist/runner/{recipe.js → vercel-sandbox-options.js} +70 -69
- package/dist/runner/{recipe-secrets.d.ts → vercel-sandbox-secrets.d.ts} +6 -6
- package/dist/runner/{recipe-secrets.js → vercel-sandbox-secrets.js} +20 -20
- package/dist/sdk/extension/commands.d.ts +8 -3
- package/dist/sdk/extension/commands.js +3 -1
- 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 +3 -2
- package/skills/overview.md +4 -4
- package/skills/plan-runs.md +1 -1
- package/skills/read-run-output.md +6 -6
- 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/snapshot-cache.d.ts +0 -148
- package/dist/runner/snapshot-cache.js +0 -126
|
@@ -39,10 +39,14 @@ interface GivenSetting {
|
|
|
39
39
|
export declare function requireTarget(scope: GivenSetting | undefined, project: GivenSetting | undefined): Refusable<{
|
|
40
40
|
readonly target: MintTarget;
|
|
41
41
|
}, MissingTarget>;
|
|
42
|
+
/**
|
|
43
|
+
* The control plane team and project the flags or the config file give, as a command shows them, or null when either
|
|
44
|
+
* is unset. With `--credential mint` they are the mint's target.
|
|
45
|
+
*/
|
|
46
|
+
export declare function givenTarget(scope: GivenSetting | undefined, project: GivenSetting | undefined): MintTarget | null;
|
|
42
47
|
/**
|
|
43
48
|
* The credential source `--credential` names: the mint needs the control plane team and project, refusing with
|
|
44
|
-
* `missing_target` when either is unset;
|
|
45
|
-
* unused.
|
|
49
|
+
* `missing_target` when either is unset; `github-actions` and `vercel-oidc` need neither, and leave any given unused.
|
|
46
50
|
*/
|
|
47
51
|
export declare function settleCredential(source: CredentialSourceChoice["source"], scope: GivenSetting | undefined, project: GivenSetting | undefined): Refusable<{
|
|
48
52
|
readonly credential: CredentialSourceChoice;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// How a command settles the credential source `--credential` names, before it gets a credential: the mint needs the
|
|
2
|
-
// control plane team and project, and refuses with `missing_target` without either; a GitHub Actions OIDC token
|
|
3
|
-
// needs neither.
|
|
2
|
+
// control plane team and project, and refuses with `missing_target` without either; a GitHub Actions OIDC token
|
|
3
|
+
// request or `VERCEL_OIDC_TOKEN` needs neither.
|
|
4
4
|
import { defineErrors, refused } from "@vercel/clinkr";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
/** The errors settling a credential source refuses a command with. */
|
|
@@ -34,13 +34,19 @@ export function requireTarget(scope, project) {
|
|
|
34
34
|
}));
|
|
35
35
|
return { ok: true, target: { team: scope.value, project: project.value } };
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* The control plane team and project the flags or the config file give, as a command shows them, or null when either
|
|
39
|
+
* is unset. With `--credential mint` they are the mint's target.
|
|
40
|
+
*/
|
|
41
|
+
export function givenTarget(scope, project) {
|
|
42
|
+
return scope === undefined || project === undefined ? null : { team: scope.value, project: project.value };
|
|
43
|
+
}
|
|
37
44
|
/**
|
|
38
45
|
* The credential source `--credential` names: the mint needs the control plane team and project, refusing with
|
|
39
|
-
* `missing_target` when either is unset;
|
|
40
|
-
* unused.
|
|
46
|
+
* `missing_target` when either is unset; `github-actions` and `vercel-oidc` need neither, and leave any given unused.
|
|
41
47
|
*/
|
|
42
48
|
export function settleCredential(source, scope, project) {
|
|
43
|
-
if (source === "github-actions")
|
|
49
|
+
if (source === "github-actions" || source === "vercel-oidc")
|
|
44
50
|
return { ok: true, credential: { source } };
|
|
45
51
|
const required = requireTarget(scope, project);
|
|
46
52
|
if (!required.ok)
|
package/dist/config/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { type CommandCredentialSource, type CredentialReport, credentialResolver, type CredentialResolver, credentialSourceError, type CredentialSourceError, credentialSourceErrors, type CredentialTarget, } from "./credential-resolver.ts";
|
|
2
|
-
export { credentialErrors, requireTarget, settleCredential } from "./credential-settle.ts";
|
|
1
|
+
export { type CommandCredentialSource, type CommandVercelProjectSource, type CredentialReport, credentialResolver, type CredentialResolver, credentialSourceError, type CredentialSourceError, credentialSourceErrors, type CredentialTarget, } from "./credential-resolver.ts";
|
|
2
|
+
export { credentialErrors, givenTarget, requireTarget, settleCredential } from "./credential-settle.ts";
|
|
3
3
|
export { configErrors, configProblemLine, optionProblemLine } from "./errors.ts";
|
|
4
4
|
export type { ConfigGateway, ConfigImport, ConfigLocation, FileListsFileGateway, FileListsFileRead, } from "./gateways.ts";
|
|
5
5
|
export { liveConfigGateway } from "./live/config-gateway.ts";
|
package/dist/config/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// definition's own names (`defineResource`, the option rules and helpers, the merged options' types) are the extension
|
|
7
7
|
// API's, which a caller imports from `sdk/extension/index.ts`.
|
|
8
8
|
export { credentialResolver, credentialSourceError, credentialSourceErrors, } from "./credential-resolver.js";
|
|
9
|
-
export { credentialErrors, requireTarget, settleCredential } from "./credential-settle.js";
|
|
9
|
+
export { credentialErrors, givenTarget, requireTarget, settleCredential } from "./credential-settle.js";
|
|
10
10
|
export { configErrors, configProblemLine, optionProblemLine } from "./errors.js";
|
|
11
11
|
export { liveConfigGateway } from "./live/config-gateway.js";
|
|
12
12
|
export { liveFileListsFileGateway } from "./live/file-lists-file-gateway.js";
|
package/dist/config/runner.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CheckedVercelSandboxOptions, VercelSandboxOptions } from "../runner/vercel-sandbox-options.ts";
|
|
2
2
|
/** One runner kind storm supports. */
|
|
3
3
|
export type RunnerKind = "launch-machine" | "vercel-sandbox";
|
|
4
4
|
/** The launch machine runner value, made by `launchMachine()`. */
|
|
@@ -6,18 +6,18 @@ export interface LaunchMachineRunner {
|
|
|
6
6
|
readonly kind: "launch-machine";
|
|
7
7
|
}
|
|
8
8
|
/** The Vercel Sandbox runner value, made by `vercelSandbox(options)`. */
|
|
9
|
-
export interface VercelSandboxRunner<TOptions =
|
|
9
|
+
export interface VercelSandboxRunner<TOptions = VercelSandboxOptions> {
|
|
10
10
|
readonly kind: "vercel-sandbox";
|
|
11
11
|
readonly options: TOptions;
|
|
12
12
|
}
|
|
13
13
|
/** A top-level `runner` value in `storm.config.ts`: complete Vercel Sandbox options, or the launch machine. */
|
|
14
14
|
export type RunnerConfig = LaunchMachineRunner | VercelSandboxRunner;
|
|
15
15
|
/** A suite's `runner` value in `storm.config.ts`: complete or partial Vercel Sandbox options, or the launch machine. */
|
|
16
|
-
export type SuiteRunnerConfig = LaunchMachineRunner | VercelSandboxRunner<Partial<
|
|
17
|
-
/** A checked `runner` value after loading `storm.config.ts`, with defaults filled in on
|
|
16
|
+
export type SuiteRunnerConfig = LaunchMachineRunner | VercelSandboxRunner<Partial<VercelSandboxOptions>>;
|
|
17
|
+
/** A checked `runner` value after loading `storm.config.ts`, with defaults filled in on Vercel Sandbox options. */
|
|
18
18
|
export type CheckedRunner = {
|
|
19
19
|
readonly kind: "launch-machine";
|
|
20
20
|
} | {
|
|
21
21
|
readonly kind: "vercel-sandbox";
|
|
22
|
-
readonly
|
|
22
|
+
readonly options: CheckedVercelSandboxOptions;
|
|
23
23
|
};
|
package/dist/config/runner.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// The declared `runner` value in `storm.config.ts` and its checked form: two peer runner kinds, the launch machine
|
|
2
2
|
// (`launchMachine()`) and Vercel Sandbox (`vercelSandbox(options)`). Type-only so `@vercel/storm/config`'s
|
|
3
|
-
// declarations reach only `runner/
|
|
3
|
+
// declarations reach only `runner/vercel-sandbox-options.ts`, never Clinkr or zod.
|
|
4
4
|
export {};
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ export interface ConfigSettings {
|
|
|
44
44
|
export type ConfigSettingKey = keyof ConfigSettings;
|
|
45
45
|
/** A top-level key of `storm.config.ts`: a setting, `resources`, or `suites`. */
|
|
46
46
|
export type ConfigKey = ConfigSettingKey | "resources" | "suites";
|
|
47
|
-
/** The keys whose checked value differs from what the file gives:
|
|
47
|
+
/** The keys whose checked value differs from what the file gives: the Vercel Sandbox runner options gain their defaults. */
|
|
48
48
|
interface CheckedSettingValues {
|
|
49
49
|
readonly runner: CheckedRunner;
|
|
50
50
|
}
|
|
@@ -56,7 +56,7 @@ export type CheckedSettings = {
|
|
|
56
56
|
};
|
|
57
57
|
/**
|
|
58
58
|
* One thing wrong with a value: the path inside the value (empty for the value itself, `["snapshot", "vcpus"]` inside
|
|
59
|
-
*
|
|
59
|
+
* the Vercel Sandbox runner options), and what is wrong, worded to follow the key (`must be …, not …`).
|
|
60
60
|
*/
|
|
61
61
|
export interface ValueProblem {
|
|
62
62
|
readonly path: readonly string[];
|
package/dist/config/schema.js
CHANGED
|
@@ -48,7 +48,7 @@ function checkDriver(value, drivers) {
|
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
50
50
|
* Each top-level setting's rule. Typed against `ConfigSettings`, so a key it gains or loses, or a value type that
|
|
51
|
-
* changes, fails to compile here until its rule follows. A runner
|
|
51
|
+
* changes, fails to compile here until its rule follows. A Vercel Sandbox runner's problems name the key inside the runner options.
|
|
52
52
|
*/
|
|
53
53
|
const SETTING_CHECKS = {
|
|
54
54
|
scope: (value) => checkWith(nonEmptyString, value),
|
|
@@ -6,7 +6,7 @@ export { launchMachine, vercelSandbox } from "./runner.ts";
|
|
|
6
6
|
export { pnpmToolchains } from "./toolchain.ts";
|
|
7
7
|
export type { LaunchMachineRunner, RunnerConfig, RunnerKind, SuiteRunnerConfig, VercelSandboxRunner, } from "../config/runner.ts";
|
|
8
8
|
export type { SuiteConfig, SuiteConfigMap } from "../config/suite.ts";
|
|
9
|
-
export type { CredentialDeclaration,
|
|
9
|
+
export type { CredentialDeclaration, RunnerSandboxCount, RunnerStep, RunnerVcpuCount, RunnerVcpuRule, SandboxCountDefault, SandboxCountDefaultRule, ToolchainStep, UnsafeSecretEnvVar, VercelSandboxOptions, } from "../runner/vercel-sandbox-options.ts";
|
|
10
10
|
export type { Resource } from "../sdk/extension/resource-definition.ts";
|
|
11
11
|
export type { SecretSource } from "../sdk/extension/secret-source.ts";
|
|
12
12
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// The config file's published surface, `@vercel/storm/config`. A user's `storm.config.ts` imports it, so it
|
|
2
2
|
// imports nothing at run time outside `src/config-file/` (`runner.ts` and `toolchain.ts`, which import nothing
|
|
3
3
|
// either): loading it pulls in no Clinkr, zod, or CLI code. Everything it takes from the modules, the top-level
|
|
4
|
-
// settings, the runner value types, the suite types, the runner
|
|
4
|
+
// settings, the runner value types, the suite types, the Vercel Sandbox runner options' types, and the resource's type, is a
|
|
5
5
|
// type-only import, erased at run time. A resource comes from its resource factory, which the config file imports from
|
|
6
6
|
// the resource's own export, `@vercel/storm/<resource>`.
|
|
7
7
|
//
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { LaunchMachineRunner, VercelSandboxRunner } from "../config/runner.ts";
|
|
2
|
-
import type {
|
|
2
|
+
import type { VercelSandboxOptions } from "../runner/vercel-sandbox-options.ts";
|
|
3
3
|
/** Declares the launch machine runner: runs the command on the launch machine as it is, with no isolation. */
|
|
4
4
|
export declare function launchMachine(): LaunchMachineRunner;
|
|
5
5
|
/**
|
|
6
|
-
* Declares the Vercel Sandbox runner with `options`. At the top level of `storm.config.ts`, `options` must be
|
|
7
|
-
*
|
|
6
|
+
* Declares the Vercel Sandbox runner with `options`. At the top level of `storm.config.ts`, `options` must be complete
|
|
7
|
+
* `VercelSandboxOptions`; in a suite under `suites`, `options` may override only the top-level option keys that
|
|
8
8
|
* differ.
|
|
9
9
|
*/
|
|
10
|
-
export declare function vercelSandbox(options:
|
|
11
|
-
export declare function vercelSandbox(options: Partial<
|
|
10
|
+
export declare function vercelSandbox(options: VercelSandboxOptions): VercelSandboxRunner;
|
|
11
|
+
export declare function vercelSandbox(options: Partial<VercelSandboxOptions>): VercelSandboxRunner<Partial<VercelSandboxOptions>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ToolchainStep } from "../runner/
|
|
1
|
+
import type { ToolchainStep } from "../runner/vercel-sandbox-options.ts";
|
|
2
2
|
/**
|
|
3
3
|
* Node program run inside `pnpmToolchains` to read `packageManager` and `engines.node` from the staged `package.json`
|
|
4
4
|
* and print `<nodeMin> <pnpmVersion>`. Exported from this file (not `@vercel/storm/config`) so tests can run it
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// The toolchain steps a pnpm workspace's runner
|
|
2
|
-
// `define.ts`, it imports nothing at run time, so a config file that uses it loads no Clinkr, zod or CLI code.
|
|
1
|
+
// The toolchain steps a pnpm workspace's Vercel Sandbox runner can use, exported from `@vercel/storm/config`. Like
|
|
2
|
+
// `define.ts`, it imports nothing at run time, so a config file that uses it loads no Clinkr, zod, or CLI code.
|
|
3
3
|
/**
|
|
4
4
|
* Node program run inside `pnpmToolchains` to read `packageManager` and `engines.node` from the staged `package.json`
|
|
5
5
|
* and print `<nodeMin> <pnpmVersion>`. Exported from this file (not `@vercel/storm/config`) so tests can run it
|
package/dist/context.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type ConfigGateway, type CredentialResolver, type FileListsFileGateway, type StormConfigResolver } from "./config/index.ts";
|
|
2
|
-
import { type CredentialGateway, type GitHubActionsTokenGateway } from "./credential/index.ts";
|
|
2
|
+
import { type CredentialGateway, type GitHubActionsTokenGateway, type VercelOidcTokenGateway } from "./credential/index.ts";
|
|
3
3
|
import type { PackageBinService } from "./launcher-resolvers/index.ts";
|
|
4
4
|
import type { Presentation } from "./presentation.ts";
|
|
5
5
|
import type { RESOURCES, StormDriverContextMap, StormResourceContextMap } from "./extensions.ts";
|
|
6
6
|
import { type CommandGateway, type JobSummaryGateway, type PackageBinGateway, type ProgressTerminal } from "./core/index.ts";
|
|
7
7
|
import { type RunDirectoryGateway } from "./run-directory/index.ts";
|
|
8
|
-
import { type CheckoutGateway, type RunnerSandboxGateway, type
|
|
8
|
+
import { type CheckoutGateway, type RunnerSandboxGateway, type RunnerSnapshotIndexGateway, type RunnerTerminal } from "./runner/index.ts";
|
|
9
9
|
import { type Clock, type Timer } from "./time/index.ts";
|
|
10
10
|
/**
|
|
11
11
|
* The gateways and DI seams storm's commands reach the outside through. Each resource reaches it through its own
|
|
@@ -16,14 +16,16 @@ export interface StormContext {
|
|
|
16
16
|
readonly credentials: CredentialGateway;
|
|
17
17
|
/** GitHub Actions' OIDC token issuer, for `--credential github-actions`. */
|
|
18
18
|
readonly githubActionsTokens: GitHubActionsTokenGateway;
|
|
19
|
+
/** `VERCEL_OIDC_TOKEN` reader, for `--credential vercel-oidc`. */
|
|
20
|
+
readonly vercelOidcTokens: VercelOidcTokenGateway;
|
|
19
21
|
readonly commands: CommandGateway;
|
|
20
22
|
readonly config: ConfigGateway;
|
|
21
23
|
/** The file lists file a run's `--file-lists` names. */
|
|
22
24
|
readonly fileListsFiles: FileListsFileGateway;
|
|
23
25
|
/** The local Git checkout the runner uploads from. */
|
|
24
26
|
readonly checkout: CheckoutGateway;
|
|
25
|
-
/** The per-machine
|
|
26
|
-
readonly runnerSnapshots:
|
|
27
|
+
/** The per-machine local snapshot index. */
|
|
28
|
+
readonly runnerSnapshots: RunnerSnapshotIndexGateway;
|
|
27
29
|
/** Vercel Sandbox, where runner and build sandboxes run. */
|
|
28
30
|
readonly runnerSandboxes: RunnerSandboxGateway;
|
|
29
31
|
/** The terminal the command's output reaches, wherever the command runs. */
|
|
@@ -113,9 +115,9 @@ export declare function localServices(launcher: {
|
|
|
113
115
|
* The live Context: `vercel` for credentials, and for `--credential github-actions` GitHub Actions' token request, read
|
|
114
116
|
* from `env`'s `ACTIONS_ID_TOKEN_REQUEST_*` at each request, with a 10-second timeout; the command spawned as a
|
|
115
117
|
* real process; `storm.config.ts`
|
|
116
|
-
* imported by Node; for the runner, git and tar on the local checkout, the
|
|
118
|
+
* imported by Node; for the runner, git and tar on the local checkout, the local snapshot index under `env`'s
|
|
117
119
|
* `XDG_STATE_HOME` or `HOME`, Vercel Sandbox through `@vercel/sandbox` (loaded only when the runner first calls it) and
|
|
118
|
-
* this process's stdout and stderr; the run directories beside the
|
|
120
|
+
* this process's stdout and stderr; the run directories beside the local snapshot index; the live view on this
|
|
119
121
|
* process's stderr; the job summary `GITHUB_STEP_SUMMARY` names, if any; a package's binary found in
|
|
120
122
|
* `node_modules/.bin`; and the system timer and clock. When `env` names no place for the state directory, every runner
|
|
121
123
|
* snapshot cache operation fails and says why, which a run treats as an empty cache, and so does opening a run
|
package/dist/context.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
// Context (`liveResourceContexts`, through the registry), and each driver its own (`liveDriverContexts`), which the app
|
|
3
3
|
// holds beside the context, so this file names no resource and no driver's gateway.
|
|
4
4
|
import { configResolver, credentialResolver, liveConfigGateway, liveFileListsFileGateway, } from "./config/index.js";
|
|
5
|
-
import { liveCredentialGateway, liveGitHubActionsTokenGateway, } from "./credential/index.js";
|
|
5
|
+
import { liveCredentialGateway, liveGitHubActionsTokenGateway, liveVercelOidcTokenGateway, } from "./credential/index.js";
|
|
6
6
|
import { packageBinService } from "./local-services.js";
|
|
7
7
|
import { liveCommandGateway, liveJobSummaryGateway, livePackageBinGateway, liveProgressTerminal, resolveStateDirectory, stateDirectoryPattern, } from "./core/index.js";
|
|
8
8
|
import { liveRunDirectoryGateway, RUNS_SUBPATH, unavailableRunDirectoryGateway, } from "./run-directory/index.js";
|
|
9
|
-
import { liveCheckoutGateway, liveRunnerSandboxGateway,
|
|
9
|
+
import { liveCheckoutGateway, liveRunnerSandboxGateway, liveRunnerSnapshotIndexGateway, liveRunnerTerminal, RUNNER_SNAPSHOTS_SUBPATH, unavailableRunnerSnapshotIndexGateway, } from "./runner/index.js";
|
|
10
10
|
import { systemClock, systemTimer } from "./time/index.js";
|
|
11
11
|
/**
|
|
12
12
|
* The launcher resolvers over an app's context, from its working directory, checking the file against every resource
|
|
@@ -31,9 +31,9 @@ export function localServices(launcher) {
|
|
|
31
31
|
* The live Context: `vercel` for credentials, and for `--credential github-actions` GitHub Actions' token request, read
|
|
32
32
|
* from `env`'s `ACTIONS_ID_TOKEN_REQUEST_*` at each request, with a 10-second timeout; the command spawned as a
|
|
33
33
|
* real process; `storm.config.ts`
|
|
34
|
-
* imported by Node; for the runner, git and tar on the local checkout, the
|
|
34
|
+
* imported by Node; for the runner, git and tar on the local checkout, the local snapshot index under `env`'s
|
|
35
35
|
* `XDG_STATE_HOME` or `HOME`, Vercel Sandbox through `@vercel/sandbox` (loaded only when the runner first calls it) and
|
|
36
|
-
* this process's stdout and stderr; the run directories beside the
|
|
36
|
+
* this process's stdout and stderr; the run directories beside the local snapshot index; the live view on this
|
|
37
37
|
* process's stderr; the job summary `GITHUB_STEP_SUMMARY` names, if any; a package's binary found in
|
|
38
38
|
* `node_modules/.bin`; and the system timer and clock. When `env` names no place for the state directory, every runner
|
|
39
39
|
* snapshot cache operation fails and says why, which a run treats as an empty cache, and so does opening a run
|
|
@@ -45,13 +45,14 @@ export function liveContext(options) {
|
|
|
45
45
|
return {
|
|
46
46
|
credentials: liveCredentialGateway(),
|
|
47
47
|
githubActionsTokens: liveGitHubActionsTokenGateway({ env: options.env, timeoutMs: 10_000 }),
|
|
48
|
+
vercelOidcTokens: liveVercelOidcTokenGateway({ env: options.env }),
|
|
48
49
|
commands: liveCommandGateway(),
|
|
49
50
|
config: liveConfigGateway(),
|
|
50
51
|
fileListsFiles: liveFileListsFileGateway(),
|
|
51
52
|
checkout: liveCheckoutGateway(),
|
|
52
53
|
runnerSnapshots: snapshots.ok
|
|
53
|
-
?
|
|
54
|
-
:
|
|
54
|
+
? liveRunnerSnapshotIndexGateway({ directory: snapshots.directory })
|
|
55
|
+
: unavailableRunnerSnapshotIndexGateway(stateDirectoryPattern(RUNNER_SNAPSHOTS_SUBPATH), snapshots.reason),
|
|
55
56
|
runnerSandboxes: liveRunnerSandboxGateway(),
|
|
56
57
|
runnerTerminal: liveRunnerTerminal({
|
|
57
58
|
env: options.env,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type RunnerTerminal } from "../runner/index.ts";
|
|
2
|
+
import { type RunContext, type RunControl, type RunnerCredentialChoice, type RunRunnerRequest } from "./coordinator.ts";
|
|
2
3
|
import type { RunProgress } from "./events.ts";
|
|
4
|
+
import { type AcrossSandboxesOutcome } from "./outcomes.ts";
|
|
3
5
|
import { type ResourceDefinitionSet } from "./resource-definition-set.ts";
|
|
4
6
|
import type { ResourceContextMap, ResourceRequests, ResourceSkip } from "./resource.ts";
|
|
5
|
-
import { type RunContext, type RunControl, type RunRunnerRequest } from "./run.ts";
|
|
6
|
-
import { type AcrossSandboxesOutcome } from "./sandbox-end.ts";
|
|
7
7
|
/** One runner sandbox's command and optional test file list. */
|
|
8
8
|
export interface SandboxCommand {
|
|
9
9
|
readonly argv: readonly string[];
|
|
@@ -22,6 +22,8 @@ export interface AcrossSandboxesRequest {
|
|
|
22
22
|
*/
|
|
23
23
|
readonly sandboxes: readonly SandboxCommand[];
|
|
24
24
|
readonly resources: ResourceRequests;
|
|
25
|
+
/** The credential source the run uses for the runner sandboxes and its resources (`mint` or `vercel-oidc`). */
|
|
26
|
+
readonly credential: RunnerCredentialChoice;
|
|
25
27
|
readonly skipped?: readonly ResourceSkip[];
|
|
26
28
|
}
|
|
27
29
|
/** The gateways and seams a run across runner sandboxes reaches the outside through. */
|
|
@@ -32,10 +34,9 @@ export interface AcrossSandboxesContext extends RunContext {
|
|
|
32
34
|
/**
|
|
33
35
|
* Runs a run across runner sandboxes (`request.sandboxes`) with the resources it asks for (`request.resources`).
|
|
34
36
|
*
|
|
35
|
-
* -
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* runner snapshot failure, then resource refusal.
|
|
37
|
+
* - Opening, credential obtainment, snapshot choice, resource acquire/split, and final release run once for the run.
|
|
38
|
+
* - Snapshot choice and resource acquire/split run concurrently under `coordinateSetup`; sandboxes start readying from
|
|
39
|
+
* the chosen snapshot while resources finish acquiring and splitting.
|
|
39
40
|
* - One runner sandbox's failure or throw never stops the others.
|
|
40
41
|
* - `snapshot_gone` ends the run with `snapshot_gone` only when every runner sandbox reports it; partial
|
|
41
42
|
* `snapshot_gone` ends as `sandboxes_ran` with affected runner sandboxes `not-started`.
|