@cnc-tools/storm 0.15.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/storm.js +1 -1
- package/dist/build-info.js +1 -1
- package/dist/chunks/{chunk-QUHY6FGN.js → chunk-2MAD5NKK.js} +1 -1
- package/dist/chunks/{chunk-XEVHP5ZW.js → chunk-3L52KNQA.js} +1 -1
- package/dist/chunks/{chunk-E4PJNZVG.js → chunk-7EENF73W.js} +12 -13
- package/dist/chunks/{chunk-4U4DZ7VG.js → chunk-CK2GZEPK.js} +1 -1
- package/dist/chunks/{chunk-L36GBUBB.js → chunk-DC2CDHNK.js} +398 -158
- package/dist/chunks/{chunk-PN5ULTTH.js → chunk-DWEAHX4T.js} +1 -1
- package/dist/chunks/{chunk-5GBMR4HM.js → chunk-FCQUJDA4.js} +4 -7
- package/dist/chunks/{chunk-YV7GE6EV.js → chunk-FOZWA52V.js} +1 -1
- package/dist/chunks/{chunk-OX7X4B2L.js → chunk-G3PHMXH5.js} +1 -1
- package/dist/chunks/{chunk-CXAT7ZKP.js → chunk-HVNK3I45.js} +1 -1
- package/dist/chunks/{chunk-QVS7HRU7.js → chunk-OIY3DMF2.js} +2 -2
- package/dist/chunks/{chunk-SZEURWRS.js → chunk-P357TZAY.js} +2 -2
- package/dist/chunks/{chunk-KC4KDJ5K.js → chunk-V4IKA3WI.js} +153 -139
- package/dist/chunks/{chunk-RAQEXKL6.js → chunk-Z5PBVG3Y.js} +26 -18
- package/dist/chunks/{live-app-PI3BAN6Y.js → live-app-WECQOQ4C.js} +4 -4
- package/dist/commands/exec/across-sandboxes-outcomes.js +2 -1
- package/dist/commands/exec/command.d.ts +8 -2
- package/dist/commands/exec/command.js +11 -11
- package/dist/commands/exec/metadata.js +1 -1
- package/dist/commands/exec/outcomes.d.ts +4 -1
- package/dist/commands/exec/outcomes.js +2 -2
- package/dist/commands/exec/plan-only.js +1 -2
- package/dist/commands/exec/planned-outcome.js +8 -1
- package/dist/commands/exec/run-command.d.ts +6 -7
- package/dist/commands/exec/run-command.js +8 -9
- package/dist/commands/exec/run-metadata.js +1 -1
- package/dist/commands/runs/facts.d.ts +2 -1
- package/dist/commands/runs/facts.js +11 -3
- package/dist/commands/runs/list/command.d.ts +2 -0
- package/dist/commands/runs/list/command.js +6 -6
- package/dist/commands/runs/list/outcomes.d.ts +1 -0
- package/dist/commands/runs/logs/command.d.ts +6 -2
- package/dist/commands/runs/logs/command.js +6 -6
- package/dist/commands/runs/logs/outcomes.d.ts +3 -1
- package/dist/commands/runs/past-run.d.ts +14 -5
- package/dist/commands/runs/past-run.js +16 -5
- package/dist/commands/runs/show/command.d.ts +6 -2
- package/dist/commands/runs/show/command.js +9 -9
- package/dist/commands/runs/show/outcomes.d.ts +3 -1
- package/dist/commands/snapshots/build/command.js +11 -11
- package/dist/commands/snapshots/list/command.d.ts +3 -3
- package/dist/commands/snapshots/list/command.js +6 -6
- package/dist/commands/snapshots/list/metadata.js +1 -1
- package/dist/commands/suites/list/command.js +7 -6
- package/dist/commands/suites/list/outcomes.js +2 -2
- package/dist/commands/test/command.d.ts +8 -2
- package/dist/commands/test/command.js +38 -40
- package/dist/commands/test/metadata.js +1 -1
- package/dist/commands/test/outcomes.d.ts +4 -1
- package/dist/commands/test/outcomes.js +2 -2
- package/dist/commands/test/plan.d.ts +2 -2
- package/dist/commands/test/plan.js +2 -5
- package/dist/config/check-runner.d.ts +4 -2
- package/dist/config/check-runner.js +27 -2
- package/dist/config/check-suites.js +1 -0
- package/dist/config/gateways.d.ts +7 -3
- package/dist/config/index.d.ts +2 -3
- package/dist/config/index.js +2 -3
- package/dist/config/live/config-gateway.js +5 -2
- package/dist/config/load.d.ts +21 -4
- package/dist/config/load.js +129 -15
- package/dist/config/runner.d.ts +5 -6
- package/dist/config/runner.js +1 -1
- package/dist/config/schema.d.ts +15 -3
- package/dist/config/schema.js +10 -2
- package/dist/config/typed-options.d.ts +1 -6
- package/dist/config/typed-options.js +2 -10
- package/dist/config-file/define.d.ts +1 -11
- package/dist/config-file/define.js +3 -3
- package/dist/config-file/runner.d.ts +2 -3
- package/dist/config-file/toolchain.d.ts +13 -7
- package/dist/config-file/toolchain.js +51 -35
- package/dist/extensions/github/resource.d.ts +1 -1
- package/dist/extensions/github/resource.js +1 -1
- package/dist/extensions/testserver/commands/pool/create/command.js +1 -1
- package/dist/extensions/testserver/resource.d.ts +2 -2
- package/dist/extensions/testserver/resource.js +2 -2
- package/dist/planning/plan-only.d.ts +4 -1
- package/dist/planning/plan-only.js +5 -2
- package/dist/planning/run-plan.d.ts +1 -2
- package/dist/planning/test-plan.js +1 -2
- package/dist/runner/base.d.ts +0 -6
- package/dist/runner/base.js +0 -15
- package/dist/runner/build-snapshots.js +7 -8
- package/dist/runner/gateways.d.ts +5 -0
- package/dist/runner/index.d.ts +1 -1
- package/dist/runner/live/sandbox-gateway.js +12 -0
- package/dist/runner/prepare.d.ts +16 -15
- package/dist/runner/prepare.js +11 -12
- package/dist/runner/recipe.d.ts +66 -67
- package/dist/runner/recipe.js +204 -120
- package/dist/runner/snapshot-build.d.ts +1 -1
- package/dist/runner/snapshot-build.js +10 -3
- package/dist/runner/snapshot-inspect.d.ts +4 -4
- package/dist/runner/snapshot-inspect.js +7 -7
- package/dist/runner/snapshot-key.d.ts +23 -15
- package/dist/runner/snapshot-key.js +46 -27
- package/dist/sdk/extension/resource-definition.d.ts +3 -2
- package/dist/sdk/extension/resource-definition.js +3 -2
- package/dist/sdk/extension/resource-factory.js +3 -4
- package/dist/sdk/run/present.d.ts +3 -3
- package/dist/sdk/run/present.js +1 -3
- package/package.json +1 -1
- package/skills/overview.md +2 -0
- package/skills/plan-runs.md +1 -1
- package/dist/config/recipe-run.d.ts +0 -33
- package/dist/config/recipe-run.js +0 -28
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
workerLanesFromRecords,
|
|
9
9
|
workerParallelism,
|
|
10
10
|
workerSetupMs
|
|
11
|
-
} from "../../../chunks/chunk-
|
|
12
|
-
import "../../../chunks/chunk-
|
|
11
|
+
} from "../../../chunks/chunk-FCQUJDA4.js";
|
|
12
|
+
import "../../../chunks/chunk-DWEAHX4T.js";
|
|
13
13
|
import "../../../chunks/chunk-R7XVBZOY.js";
|
|
14
14
|
import "../../../chunks/chunk-CN4EFA5J.js";
|
|
15
15
|
import {
|
|
16
16
|
builtAtText
|
|
17
|
-
} from "../../../chunks/chunk-
|
|
17
|
+
} from "../../../chunks/chunk-3L52KNQA.js";
|
|
18
18
|
import "../../../chunks/chunk-ZG3WQ4UF.js";
|
|
19
19
|
import "../../../chunks/chunk-5CCP36QQ.js";
|
|
20
20
|
import {
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
totalAttemptMs,
|
|
49
49
|
totalsText,
|
|
50
50
|
totalsTone
|
|
51
|
-
} from "../../../chunks/chunk-
|
|
51
|
+
} from "../../../chunks/chunk-V4IKA3WI.js";
|
|
52
52
|
import {
|
|
53
53
|
capsFor
|
|
54
54
|
} from "../../../chunks/chunk-TJNFVNKR.js";
|
|
@@ -61,17 +61,17 @@ import {
|
|
|
61
61
|
sandboxesPassedText,
|
|
62
62
|
sandboxesText,
|
|
63
63
|
startedSandboxesText
|
|
64
|
-
} from "../../../chunks/chunk-
|
|
64
|
+
} from "../../../chunks/chunk-2MAD5NKK.js";
|
|
65
65
|
import {
|
|
66
66
|
pastRuns,
|
|
67
67
|
planSchema,
|
|
68
68
|
sandboxRecordSchema,
|
|
69
69
|
timelineSchema
|
|
70
|
-
} from "../../../chunks/chunk-
|
|
70
|
+
} from "../../../chunks/chunk-P357TZAY.js";
|
|
71
71
|
import {
|
|
72
72
|
seconds,
|
|
73
73
|
short
|
|
74
|
-
} from "../../../chunks/chunk-
|
|
74
|
+
} from "../../../chunks/chunk-G3PHMXH5.js";
|
|
75
75
|
import {
|
|
76
76
|
bold,
|
|
77
77
|
paint,
|
|
@@ -79,10 +79,10 @@ import {
|
|
|
79
79
|
} from "../../../chunks/chunk-F6N34UWB.js";
|
|
80
80
|
import {
|
|
81
81
|
megabytesText
|
|
82
|
-
} from "../../../chunks/chunk-
|
|
82
|
+
} from "../../../chunks/chunk-FOZWA52V.js";
|
|
83
83
|
import {
|
|
84
84
|
findConfigFile
|
|
85
|
-
} from "../../../chunks/chunk-
|
|
85
|
+
} from "../../../chunks/chunk-DC2CDHNK.js";
|
|
86
86
|
import "../../../chunks/chunk-AWBSONHB.js";
|
|
87
87
|
import {
|
|
88
88
|
stormCommands
|
|
@@ -396,6 +396,7 @@ export declare const outcomes: import("@vercel/clinkr").Outcomes<{
|
|
|
396
396
|
}, z.core.$strip>, z.ZodObject<{
|
|
397
397
|
kind: z.ZodLiteral<"all">;
|
|
398
398
|
why: z.ZodEnum<{
|
|
399
|
+
"config-file-conflict": "config-file-conflict";
|
|
399
400
|
flag: "flag";
|
|
400
401
|
"no-config-file": "no-config-file";
|
|
401
402
|
}>;
|
|
@@ -486,6 +487,7 @@ export declare const outcomes: import("@vercel/clinkr").Outcomes<{
|
|
|
486
487
|
}, z.core.$strip>, z.ZodObject<{
|
|
487
488
|
kind: z.ZodLiteral<"all">;
|
|
488
489
|
why: z.ZodEnum<{
|
|
490
|
+
"config-file-conflict": "config-file-conflict";
|
|
489
491
|
flag: "flag";
|
|
490
492
|
"no-config-file": "no-config-file";
|
|
491
493
|
}>;
|
|
@@ -497,7 +499,7 @@ export declare const outcomes: import("@vercel/clinkr").Outcomes<{
|
|
|
497
499
|
configFile: string;
|
|
498
500
|
} | {
|
|
499
501
|
kind: "all";
|
|
500
|
-
why: "flag" | "no-config-file";
|
|
502
|
+
why: "config-file-conflict" | "flag" | "no-config-file";
|
|
501
503
|
};
|
|
502
504
|
}) => {
|
|
503
505
|
message: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
suiteNotFoundErrors
|
|
3
|
-
} from "../../../chunks/chunk-
|
|
3
|
+
} from "../../../chunks/chunk-CK2GZEPK.js";
|
|
4
4
|
import {
|
|
5
5
|
RUN_CLEANUP,
|
|
6
6
|
lineProgress,
|
|
@@ -9,33 +9,33 @@ import {
|
|
|
9
9
|
prepareRefusal,
|
|
10
10
|
runErrors,
|
|
11
11
|
runnerFailureFacts
|
|
12
|
-
} from "../../../chunks/chunk-
|
|
12
|
+
} from "../../../chunks/chunk-Z5PBVG3Y.js";
|
|
13
13
|
import "../../../chunks/chunk-I5GZLOLQ.js";
|
|
14
|
-
import "../../../chunks/chunk-
|
|
15
|
-
import "../../../chunks/chunk-
|
|
14
|
+
import "../../../chunks/chunk-FCQUJDA4.js";
|
|
15
|
+
import "../../../chunks/chunk-DWEAHX4T.js";
|
|
16
16
|
import "../../../chunks/chunk-R7XVBZOY.js";
|
|
17
17
|
import "../../../chunks/chunk-CN4EFA5J.js";
|
|
18
18
|
import {
|
|
19
19
|
redactStrings,
|
|
20
20
|
redactor
|
|
21
|
-
} from "../../../chunks/chunk-
|
|
22
|
-
import "../../../chunks/chunk-
|
|
21
|
+
} from "../../../chunks/chunk-HVNK3I45.js";
|
|
22
|
+
import "../../../chunks/chunk-3L52KNQA.js";
|
|
23
23
|
import "../../../chunks/chunk-VUPZH7J2.js";
|
|
24
24
|
import "../../../chunks/chunk-ZG3WQ4UF.js";
|
|
25
25
|
import "../../../chunks/chunk-5CCP36QQ.js";
|
|
26
26
|
import {
|
|
27
27
|
renderOutcome
|
|
28
28
|
} from "../../../chunks/chunk-TJNFVNKR.js";
|
|
29
|
-
import "../../../chunks/chunk-
|
|
30
|
-
import "../../../chunks/chunk-
|
|
29
|
+
import "../../../chunks/chunk-2MAD5NKK.js";
|
|
30
|
+
import "../../../chunks/chunk-P357TZAY.js";
|
|
31
31
|
import {
|
|
32
32
|
seconds,
|
|
33
33
|
short
|
|
34
|
-
} from "../../../chunks/chunk-
|
|
34
|
+
} from "../../../chunks/chunk-G3PHMXH5.js";
|
|
35
35
|
import "../../../chunks/chunk-F6N34UWB.js";
|
|
36
36
|
import {
|
|
37
37
|
megabytesText
|
|
38
|
-
} from "../../../chunks/chunk-
|
|
38
|
+
} from "../../../chunks/chunk-FOZWA52V.js";
|
|
39
39
|
import {
|
|
40
40
|
buildSnapshots,
|
|
41
41
|
configErrors,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
prepareSnapshotBuild,
|
|
48
48
|
readCredentials,
|
|
49
49
|
requireTarget
|
|
50
|
-
} from "../../../chunks/chunk-
|
|
50
|
+
} from "../../../chunks/chunk-DC2CDHNK.js";
|
|
51
51
|
import {
|
|
52
52
|
SECRET_MIN_LENGTH
|
|
53
53
|
} from "../../../chunks/chunk-AWBSONHB.js";
|
|
@@ -4,9 +4,9 @@ import { z } from "zod";
|
|
|
4
4
|
* named suite's effective runner with `--suite`), or of every recipe with `--all` or when no recipe applies, and marks
|
|
5
5
|
* the one a run here starts from, per team and project. Refuses when the effective runner is the launch machine, which
|
|
6
6
|
* has no runner snapshot. The runner module inspects the cache (`inspectSnapshotCache`): this reads the config file,
|
|
7
|
-
* the cache, and
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* the cache, Git, and the recipe's declared base files at the merge-base, mints nothing, starts nothing, and changes
|
|
8
|
+
* nothing: an unreadable declared base file is `invalid_config`, as in a run. Its error can quote a declared base file
|
|
9
|
+
* path, so each declared credential's value that is set shows as `<token>` in it, as in a run; the list refuses
|
|
10
10
|
* no secret, since it needs none. A config file storm can't use is `invalid_config`, and git failing is
|
|
11
11
|
* `checkout_failed`.
|
|
12
12
|
*/
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import {
|
|
2
2
|
suiteNotFoundErrors
|
|
3
|
-
} from "../../../chunks/chunk-
|
|
3
|
+
} from "../../../chunks/chunk-CK2GZEPK.js";
|
|
4
4
|
import {
|
|
5
5
|
redactor
|
|
6
|
-
} from "../../../chunks/chunk-
|
|
6
|
+
} from "../../../chunks/chunk-HVNK3I45.js";
|
|
7
7
|
import {
|
|
8
8
|
REJECTIONS_SHOWN,
|
|
9
9
|
REJECTION_REASONS,
|
|
10
10
|
builtAtText,
|
|
11
11
|
rejectionText
|
|
12
|
-
} from "../../../chunks/chunk-
|
|
12
|
+
} from "../../../chunks/chunk-3L52KNQA.js";
|
|
13
13
|
import {
|
|
14
14
|
path,
|
|
15
15
|
renderOutcome
|
|
16
16
|
} from "../../../chunks/chunk-TJNFVNKR.js";
|
|
17
17
|
import {
|
|
18
18
|
short
|
|
19
|
-
} from "../../../chunks/chunk-
|
|
19
|
+
} from "../../../chunks/chunk-G3PHMXH5.js";
|
|
20
20
|
import "../../../chunks/chunk-F6N34UWB.js";
|
|
21
|
-
import "../../../chunks/chunk-
|
|
21
|
+
import "../../../chunks/chunk-FOZWA52V.js";
|
|
22
22
|
import {
|
|
23
23
|
configErrors,
|
|
24
24
|
declaredSecretValues,
|
|
25
25
|
effectiveConfig,
|
|
26
26
|
inspectSnapshotCache,
|
|
27
27
|
invalidConfig
|
|
28
|
-
} from "../../../chunks/chunk-
|
|
28
|
+
} from "../../../chunks/chunk-DC2CDHNK.js";
|
|
29
29
|
import "../../../chunks/chunk-AWBSONHB.js";
|
|
30
30
|
import {
|
|
31
31
|
stormCommands
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/commands/snapshots/list/metadata.ts
|
|
2
2
|
var metadata = {
|
|
3
|
-
description: "List the runner snapshots cached on this machine, under ${XDG_STATE_HOME:-~/.local/state}/storm/runner/snapshots/, and mark the one a run here starts from. A runner snapshot is a base snapshot, built at a base by the runner recipe's toolchain and prebuild steps: a run builds one at HEAD's merge-base with a base ref when nothing fits, and storm snapshots build builds one without a run. A run starts only from a snapshot whose base is its merge-base and whose snapshot steps
|
|
3
|
+
description: "List the runner snapshots cached on this machine, under ${XDG_STATE_HOME:-~/.local/state}/storm/runner/snapshots/, and mark the one a run here starts from. A runner snapshot is a base snapshot, built at a base by the runner recipe's toolchain and prebuild steps: a run builds one at HEAD's merge-base with a base ref when nothing fits, and storm snapshots build builds one without a run. A run starts only from a snapshot whose base is its merge-base and whose snapshot steps and declared base files match the recipe's there. By default it lists the snapshots of the runner recipe in the storm.config.ts found from the working directory; without one it lists every snapshot and marks none. Each row gives the snapshot's base (with HEAD when it is HEAD's commit, and not in history when HEAD's history doesn't hold it, as after an amend or a rebase), when it was created, when it expires, and its id. The lines after the table say why a run here starts from the marked one, or why it builds a base snapshot, and why it starts from none of the others. It reads the cache, Git, and the recipe's declared base files at the merge-base, as a run does: it mints no credential, starts nothing, and changes nothing. A git failure or an unreadable declared base file at the merge-base ends it with an error, as it would end a run here.",
|
|
4
4
|
summary: "List the cached runner snapshots.",
|
|
5
5
|
aliases: ["ls"],
|
|
6
6
|
help: {
|
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
formatCommandLine,
|
|
3
3
|
listResolvedSuites,
|
|
4
4
|
targetRedactor
|
|
5
|
-
} from "../../../chunks/chunk-
|
|
5
|
+
} from "../../../chunks/chunk-OIY3DMF2.js";
|
|
6
6
|
import {
|
|
7
7
|
DRIVER_NAMES,
|
|
8
8
|
driverNamed
|
|
9
|
-
} from "../../../chunks/chunk-
|
|
9
|
+
} from "../../../chunks/chunk-DWEAHX4T.js";
|
|
10
10
|
import "../../../chunks/chunk-R7XVBZOY.js";
|
|
11
11
|
import "../../../chunks/chunk-CN4EFA5J.js";
|
|
12
12
|
import {
|
|
13
13
|
redactStrings
|
|
14
|
-
} from "../../../chunks/chunk-
|
|
14
|
+
} from "../../../chunks/chunk-HVNK3I45.js";
|
|
15
15
|
import "../../../chunks/chunk-ZG3WQ4UF.js";
|
|
16
16
|
import "../../../chunks/chunk-5CCP36QQ.js";
|
|
17
17
|
import {
|
|
@@ -19,11 +19,12 @@ import {
|
|
|
19
19
|
renderOutcome
|
|
20
20
|
} from "../../../chunks/chunk-TJNFVNKR.js";
|
|
21
21
|
import "../../../chunks/chunk-F6N34UWB.js";
|
|
22
|
-
import "../../../chunks/chunk-
|
|
22
|
+
import "../../../chunks/chunk-FOZWA52V.js";
|
|
23
23
|
import {
|
|
24
24
|
CONFIG_FILE_NAME,
|
|
25
|
+
CONFIG_FILE_NAMES_TEXT,
|
|
25
26
|
configErrors
|
|
26
|
-
} from "../../../chunks/chunk-
|
|
27
|
+
} from "../../../chunks/chunk-DC2CDHNK.js";
|
|
27
28
|
import "../../../chunks/chunk-AWBSONHB.js";
|
|
28
29
|
import {
|
|
29
30
|
stormCommands
|
|
@@ -107,7 +108,7 @@ var outcomes = defineOutcomes({
|
|
|
107
108
|
render: ({ configFile, tests, suites }) => {
|
|
108
109
|
const configRows = configFile === null ? [] : [["Config", path(configFile)]];
|
|
109
110
|
if (tests === null && suites.length === 0) {
|
|
110
|
-
const lead = configFile === null ? `No ${
|
|
111
|
+
const lead = configFile === null ? `No ${CONFIG_FILE_NAMES_TEXT} applies here.` : `${configFile} names no driver and declares no suites.`;
|
|
111
112
|
return renderOutcome({
|
|
112
113
|
message: lead,
|
|
113
114
|
rows: [...configRows],
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { defineOutcomes } from "@vercel/clinkr";
|
|
4
4
|
import { path, renderOutcome } from "@vercel/clinkr/vcli-kit";
|
|
5
5
|
import { z } from "zod";
|
|
6
|
-
import { CONFIG_FILE_NAME, configErrors } from "../../../config/index.js";
|
|
6
|
+
import { CONFIG_FILE_NAME, CONFIG_FILE_NAMES_TEXT, configErrors } from "../../../config/index.js";
|
|
7
7
|
import { DRIVER_NAMES } from "../../../extensions.js";
|
|
8
8
|
import { redactStrings } from "../../../planning/redaction.js";
|
|
9
9
|
import { formatCommandLine } from "../../../planning/suites.js";
|
|
@@ -82,7 +82,7 @@ export const outcomes = defineOutcomes({
|
|
|
82
82
|
const configRows = configFile === null ? [] : [["Config", path(configFile)]];
|
|
83
83
|
if (tests === null && suites.length === 0) {
|
|
84
84
|
const lead = configFile === null
|
|
85
|
-
? `No ${
|
|
85
|
+
? `No ${CONFIG_FILE_NAMES_TEXT} applies here.`
|
|
86
86
|
: `${configFile} names no driver and declares no suites.`;
|
|
87
87
|
return renderOutcome({
|
|
88
88
|
message: lead,
|
|
@@ -254,7 +254,10 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<z.ZodObject<{
|
|
|
254
254
|
testFiles: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
255
255
|
runnerSandboxes: z.ZodNullable<z.ZodObject<{
|
|
256
256
|
max: z.ZodNumber;
|
|
257
|
-
default: z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.
|
|
257
|
+
default: z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
258
|
+
filesPerSandbox: z.ZodNumber;
|
|
259
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
260
|
+
}, z.core.$strip>]>>;
|
|
258
261
|
}, z.core.$strip>>;
|
|
259
262
|
sandboxes: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
260
263
|
sandbox: z.ZodNumber;
|
|
@@ -939,7 +942,10 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<z.ZodObject<{
|
|
|
939
942
|
testFiles: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
940
943
|
runnerSandboxes: z.ZodNullable<z.ZodObject<{
|
|
941
944
|
max: z.ZodNumber;
|
|
942
|
-
default: z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.
|
|
945
|
+
default: z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
946
|
+
filesPerSandbox: z.ZodNumber;
|
|
947
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
948
|
+
}, z.core.$strip>]>>;
|
|
943
949
|
}, z.core.$strip>>;
|
|
944
950
|
sandboxes: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
945
951
|
sandbox: z.ZodNumber;
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
resolveProjectTests,
|
|
4
4
|
resolveSuite,
|
|
5
5
|
targetRedactor
|
|
6
|
-
} from "../../chunks/chunk-
|
|
6
|
+
} from "../../chunks/chunk-OIY3DMF2.js";
|
|
7
7
|
import {
|
|
8
8
|
suiteNamesText,
|
|
9
9
|
suiteNotFoundErrors
|
|
10
|
-
} from "../../chunks/chunk-
|
|
10
|
+
} from "../../chunks/chunk-CK2GZEPK.js";
|
|
11
11
|
import {
|
|
12
12
|
DRIVER_FILE_LISTS_HELP,
|
|
13
13
|
DRIVER_SANDBOXES_HELP,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
planDefaultSandboxesRun,
|
|
17
17
|
runHelp,
|
|
18
18
|
runPlanned
|
|
19
|
-
} from "../../chunks/chunk-
|
|
19
|
+
} from "../../chunks/chunk-7EENF73W.js";
|
|
20
20
|
import {
|
|
21
21
|
PLANNED_DESCRIPTION,
|
|
22
22
|
RAN_DESCRIPTION,
|
|
@@ -40,35 +40,35 @@ import {
|
|
|
40
40
|
sandboxesErrors,
|
|
41
41
|
sandboxesFlagProblems,
|
|
42
42
|
sandboxesRanSchema
|
|
43
|
-
} from "../../chunks/chunk-
|
|
43
|
+
} from "../../chunks/chunk-Z5PBVG3Y.js";
|
|
44
44
|
import "../../chunks/chunk-I5GZLOLQ.js";
|
|
45
45
|
import {
|
|
46
46
|
dealFileLists,
|
|
47
47
|
recordedPlan
|
|
48
|
-
} from "../../chunks/chunk-
|
|
48
|
+
} from "../../chunks/chunk-FCQUJDA4.js";
|
|
49
49
|
import {
|
|
50
50
|
DRIVER_NAMES,
|
|
51
51
|
driverNamed
|
|
52
|
-
} from "../../chunks/chunk-
|
|
52
|
+
} from "../../chunks/chunk-DWEAHX4T.js";
|
|
53
53
|
import "../../chunks/chunk-R7XVBZOY.js";
|
|
54
54
|
import "../../chunks/chunk-CN4EFA5J.js";
|
|
55
|
-
import "../../chunks/chunk-
|
|
56
|
-
import "../../chunks/chunk-
|
|
55
|
+
import "../../chunks/chunk-HVNK3I45.js";
|
|
56
|
+
import "../../chunks/chunk-3L52KNQA.js";
|
|
57
57
|
import "../../chunks/chunk-VUPZH7J2.js";
|
|
58
58
|
import "../../chunks/chunk-ZG3WQ4UF.js";
|
|
59
59
|
import "../../chunks/chunk-5CCP36QQ.js";
|
|
60
|
-
import "../../chunks/chunk-
|
|
60
|
+
import "../../chunks/chunk-2MAD5NKK.js";
|
|
61
61
|
import {
|
|
62
62
|
planSchema
|
|
63
|
-
} from "../../chunks/chunk-
|
|
64
|
-
import "../../chunks/chunk-
|
|
63
|
+
} from "../../chunks/chunk-P357TZAY.js";
|
|
64
|
+
import "../../chunks/chunk-G3PHMXH5.js";
|
|
65
65
|
import "../../chunks/chunk-F6N34UWB.js";
|
|
66
|
-
import "../../chunks/chunk-
|
|
66
|
+
import "../../chunks/chunk-FOZWA52V.js";
|
|
67
67
|
import {
|
|
68
68
|
CONFIG_FILE_NAME,
|
|
69
|
-
|
|
69
|
+
CONFIG_FILE_NAMES_TEXT,
|
|
70
70
|
resolveSandboxCountDefault
|
|
71
|
-
} from "../../chunks/chunk-
|
|
71
|
+
} from "../../chunks/chunk-DC2CDHNK.js";
|
|
72
72
|
import {
|
|
73
73
|
DRIVER_PLAN_FAILURE_KINDS,
|
|
74
74
|
NOT_COUNTED
|
|
@@ -187,7 +187,7 @@ var testErrors = defineErrors({
|
|
|
187
187
|
configFile: z2.string().nullable()
|
|
188
188
|
}),
|
|
189
189
|
render: ({ suites, configFile }) => ({
|
|
190
|
-
message: configFile === null ? `No ${
|
|
190
|
+
message: configFile === null ? `No ${CONFIG_FILE_NAMES_TEXT} applies here, so storm test has no driver to run. The command didn't run.` : `${configFile} names no top-level driver for storm test. The command didn't run.`,
|
|
191
191
|
...suites.length === 0 ? {} : { rows: [["Suites", suiteNamesText(suites)]] },
|
|
192
192
|
next: [
|
|
193
193
|
{
|
|
@@ -423,31 +423,29 @@ async function planTestRun({ app, signal }, driver, errors, args, request, asks)
|
|
|
423
423
|
}
|
|
424
424
|
const planCommand = async (where, planSignal, { testPlan }) => await planDriverCommand(app, driver, errors, args, driverCount(driver, testPlan, countTests), where, planSignal);
|
|
425
425
|
if (driver.fileLists === void 0) return await planCommandRun(app, request, planCommand, signal);
|
|
426
|
-
const planDefaultSandboxes = planDriverSandboxes(
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
};
|
|
450
|
-
});
|
|
426
|
+
const planDefaultSandboxes = planDriverSandboxes(
|
|
427
|
+
({ argv, testFiles, testPlan }, { where, max, settings }) => {
|
|
428
|
+
const sandboxesDefault = where.recipe.sandboxes?.default;
|
|
429
|
+
if (sandboxesDefault === void 0)
|
|
430
|
+
throw new Error("planTestRun: a run across runner sandboxes from the default needs runner.sandboxes.default");
|
|
431
|
+
const resolved = resolveSandboxCountDefault(sandboxesDefault, testPlan);
|
|
432
|
+
const checked = driver.fileLists?.validate(args);
|
|
433
|
+
if (checked !== void 0 && !checked.ok)
|
|
434
|
+
return refused(
|
|
435
|
+
sandboxesDefaultErrors.sandboxesDefaultRefused({
|
|
436
|
+
key: SANDBOXES_DEFAULT_KEY,
|
|
437
|
+
sandboxes: Math.min(resolved, max, testFiles.length),
|
|
438
|
+
field: "args",
|
|
439
|
+
problem: checked.problem,
|
|
440
|
+
configFile: settings.configFile
|
|
441
|
+
})
|
|
442
|
+
);
|
|
443
|
+
return {
|
|
444
|
+
ok: true,
|
|
445
|
+
sandboxes: driverSandboxesRun({ argv, testFiles, asked: { from: "default", default: resolved }, max })
|
|
446
|
+
};
|
|
447
|
+
}
|
|
448
|
+
);
|
|
451
449
|
return await planDefaultSandboxesRun(app, request, planCommand, planDefaultSandboxes, signal);
|
|
452
450
|
}
|
|
453
451
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/commands/test/metadata.ts
|
|
2
2
|
var metadata = {
|
|
3
3
|
summary: "Run the project's tests, or a suite of them.",
|
|
4
|
-
description:
|
|
4
|
+
description: `Run the project's tests declared at the top level of storm.config.ts, or a named suite with --suite <name>. Pass extra arguments for the test runner directly, with dash options after --; command-line arguments go before the config file's args. Where the tests run is declared by runner in storm.config.ts (launchMachine() or vercelSandbox({ \u2026 })); a suite inherits the top-level runner unless it sets its own. With testPlan: true in storm.config.ts or --count-tests, storm counts the tests before the run starts; --count-tests counts each test when a driver otherwise counts only test files. With --sandboxes <n>, --file-lists <path>, or sandboxes.default in vercelSandbox({ \u2026 }), and a driver with file list support, it is a run across runner sandboxes: storm lists the test files on this machine, deals them into file lists (or takes yours), and runs each list in its own runner sandbox, all started from one runner snapshot. With --plan-only, it prints the planned run and starts nothing. storm finds storm.config.ts in the working directory or a parent up to the git worktree's root; storm.config.mts works the same, always loads as an ES module, and suits a package.json without "type": "module", and one directory may hold only one of the two.`
|
|
5
5
|
};
|
|
6
6
|
export {
|
|
7
7
|
metadata
|
|
@@ -316,7 +316,10 @@ export declare const outcomes: import("@vercel/clinkr").Outcomes<{
|
|
|
316
316
|
testFiles: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
317
317
|
runnerSandboxes: z.ZodNullable<z.ZodObject<{
|
|
318
318
|
max: z.ZodNumber;
|
|
319
|
-
default: z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.
|
|
319
|
+
default: z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
320
|
+
filesPerSandbox: z.ZodNumber;
|
|
321
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
322
|
+
}, z.core.$strip>]>>;
|
|
320
323
|
}, z.core.$strip>>;
|
|
321
324
|
sandboxes: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
322
325
|
sandbox: z.ZodNumber;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// `missing_driver`, and `driver_sandboxes_refused`), and the driver's two planning refusals.
|
|
4
4
|
import { defineErrors, defineOutcomes } from "@vercel/clinkr";
|
|
5
5
|
import { z } from "zod";
|
|
6
|
-
import { CONFIG_FILE_NAME } from "../../config/index.js";
|
|
6
|
+
import { CONFIG_FILE_NAME, CONFIG_FILE_NAMES_TEXT } from "../../config/index.js";
|
|
7
7
|
import { DRIVER_NAMES, driverNamed } from "../../extensions.js";
|
|
8
8
|
import { driverRefusals } from "../../planning/driver-refusals.js";
|
|
9
9
|
import { suiteNamesText, suiteNotFoundErrors } from "../../planning/suite-not-found.js";
|
|
@@ -63,7 +63,7 @@ const testErrors = defineErrors({
|
|
|
63
63
|
}),
|
|
64
64
|
render: ({ suites, configFile }) => ({
|
|
65
65
|
message: configFile === null
|
|
66
|
-
? `No ${
|
|
66
|
+
? `No ${CONFIG_FILE_NAMES_TEXT} applies here, so storm test has no driver to run. The command didn't run.`
|
|
67
67
|
: `${configFile} names no top-level driver for storm test. The command didn't run.`,
|
|
68
68
|
...(suites.length === 0 ? {} : { rows: [["Suites", suiteNamesText(suites)]] }),
|
|
69
69
|
next: [
|
|
@@ -61,10 +61,10 @@ export declare function planTestRun({ app, signal }: ExecutionContext<StormApp>,
|
|
|
61
61
|
readonly refusal: import("@vercel/clinkr").CommandError<"unsafe_secret_env_vars_invalid">;
|
|
62
62
|
} | {
|
|
63
63
|
readonly ok: false;
|
|
64
|
-
readonly refusal: import("@vercel/clinkr").CommandError<"
|
|
64
|
+
readonly refusal: import("@vercel/clinkr").CommandError<"sandboxes_default_refused"> | DriverPlanRefusal;
|
|
65
65
|
} | {
|
|
66
66
|
readonly ok: false;
|
|
67
|
-
readonly refusal: import("@vercel/clinkr").CommandError<"
|
|
67
|
+
readonly refusal: import("@vercel/clinkr").CommandError<"file_lists_unlisted"> | DriverPlanRefusal | (import("@vercel/clinkr").CommandError<"missing_sandboxes_max"> | import("@vercel/clinkr").CommandError<"sandboxes_over_max">);
|
|
68
68
|
} | {
|
|
69
69
|
readonly ok: false;
|
|
70
70
|
readonly refusal: import("@vercel/clinkr").CommandError<"file_lists_unreadable"> | import("@vercel/clinkr").CommandError<"invalid_file_lists">;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// run that is not across runner sandboxes, and otherwise by `runner.sandboxes.default` in the effective runner. Each
|
|
4
4
|
// way plans through `planDriverCommand`, and everything after the plan is the run every command shares (`runPlanned`).
|
|
5
5
|
import { refused } from "@vercel/clinkr";
|
|
6
|
-
import { invalidConfig } from "../../config/index.js";
|
|
7
6
|
import { driverCallerFileListsRun, driverSandboxesRun } from "../../planning/driver-file-lists.js";
|
|
8
7
|
import { readFileListsFile } from "../../planning/file-lists-file.js";
|
|
9
8
|
import { resolveSandboxCountDefault } from "../../runner/index.js";
|
|
@@ -108,20 +107,18 @@ export async function planTestRun({ app, signal }, driver, errors, args, request
|
|
|
108
107
|
if (sandboxesDefault === undefined)
|
|
109
108
|
throw new Error("planTestRun: a run across runner sandboxes from the default needs runner.sandboxes.default");
|
|
110
109
|
const resolved = resolveSandboxCountDefault(sandboxesDefault, testPlan);
|
|
111
|
-
if (!resolved.ok)
|
|
112
|
-
return refused(invalidConfig(where.configFile, [{ key: SANDBOXES_DEFAULT_KEY, location: null, problem: resolved.problem }]));
|
|
113
110
|
const checked = driver.fileLists?.validate(args);
|
|
114
111
|
if (checked !== undefined && !checked.ok)
|
|
115
112
|
return refused(sandboxesDefaultErrors.sandboxesDefaultRefused({
|
|
116
113
|
key: SANDBOXES_DEFAULT_KEY,
|
|
117
|
-
sandboxes: Math.min(resolved
|
|
114
|
+
sandboxes: Math.min(resolved, max, testFiles.length),
|
|
118
115
|
field: "args",
|
|
119
116
|
problem: checked.problem,
|
|
120
117
|
configFile: settings.configFile,
|
|
121
118
|
}));
|
|
122
119
|
return {
|
|
123
120
|
ok: true,
|
|
124
|
-
sandboxes: driverSandboxesRun({ argv, testFiles, asked: { from: "default", default: resolved
|
|
121
|
+
sandboxes: driverSandboxesRun({ argv, testFiles, asked: { from: "default", default: resolved }, max }),
|
|
125
122
|
};
|
|
126
123
|
});
|
|
127
124
|
return await planDefaultSandboxesRun(app, request, planCommand, planDefaultSandboxes, signal);
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import { type ResourceDefinition } from "../sdk/extension/index.ts";
|
|
1
2
|
import type { CheckedRunner } from "./runner.ts";
|
|
2
3
|
import type { Checked } from "./schema.ts";
|
|
3
4
|
/**
|
|
4
5
|
* Checks a `runner` value from `storm.config.ts`. When `inherited` is given (the top level's raw `vercelSandbox`
|
|
5
6
|
* options object), a suite's `vercelSandbox` options merge shallowly over `inherited` before `checkRecipe` runs, so
|
|
6
|
-
* the suite may override only the top-level keys that differ.
|
|
7
|
+
* the suite may override only the top-level keys that differ. A declared `vcpus` rule is also checked against
|
|
8
|
+
* `definitions` so unknown resources or options fail at config load.
|
|
7
9
|
*/
|
|
8
|
-
export declare function checkRunner(value: unknown, inherited?: Readonly<Record<string, unknown
|
|
10
|
+
export declare function checkRunner(value: unknown, inherited?: Readonly<Record<string, unknown>>, definitions?: readonly ResourceDefinition[]): Checked<CheckedRunner>;
|
|
9
11
|
/**
|
|
10
12
|
* The raw options object of a top-level `vercelSandbox(...)` value, for a suite's `vercelSandbox(...)` to merge over;
|
|
11
13
|
* undefined when the top level declares no `vercel-sandbox` runner or its options are not a plain object.
|
|
@@ -6,9 +6,10 @@ const FACTORY_HINT = "must be made by vercelSandbox({ … }) or launchMachine()"
|
|
|
6
6
|
/**
|
|
7
7
|
* Checks a `runner` value from `storm.config.ts`. When `inherited` is given (the top level's raw `vercelSandbox`
|
|
8
8
|
* options object), a suite's `vercelSandbox` options merge shallowly over `inherited` before `checkRecipe` runs, so
|
|
9
|
-
* the suite may override only the top-level keys that differ.
|
|
9
|
+
* the suite may override only the top-level keys that differ. A declared `vcpus` rule is also checked against
|
|
10
|
+
* `definitions` so unknown resources or options fail at config load.
|
|
10
11
|
*/
|
|
11
|
-
export function checkRunner(value, inherited) {
|
|
12
|
+
export function checkRunner(value, inherited, definitions = []) {
|
|
12
13
|
if (!isRecord(value)) {
|
|
13
14
|
return { ok: false, problems: [{ path: [], problem: `${FACTORY_HINT}, not ${describeValue(value)}` }] };
|
|
14
15
|
}
|
|
@@ -35,10 +36,34 @@ export function checkRunner(value, inherited) {
|
|
|
35
36
|
const checked = checkRecipe(rawOptions);
|
|
36
37
|
if (!checked.ok)
|
|
37
38
|
return checked;
|
|
39
|
+
const vcpusProblems = checkVcpusRuleDefinitions(checked.value.vcpus, definitions);
|
|
40
|
+
if (vcpusProblems.length > 0)
|
|
41
|
+
return { ok: false, problems: vcpusProblems };
|
|
38
42
|
return { ok: true, value: { kind: "vercel-sandbox", recipe: checked.value } };
|
|
39
43
|
}
|
|
40
44
|
return { ok: false, problems: [{ path: [], problem: `${FACTORY_HINT}, not ${describeValue(value)}` }] };
|
|
41
45
|
}
|
|
46
|
+
/** Checks that a declared `vcpus` rule names a known resource definition and one of its options. */
|
|
47
|
+
function checkVcpusRuleDefinitions(vcpus, definitions) {
|
|
48
|
+
if (typeof vcpus === "number")
|
|
49
|
+
return [];
|
|
50
|
+
const definition = definitions.find((each) => each.name === vcpus.resource);
|
|
51
|
+
if (definition === undefined) {
|
|
52
|
+
const known = definitions.length === 0 ? "none" : definitions.map((each) => each.name).join(", ");
|
|
53
|
+
return [{ path: ["vcpus", "resource"], problem: `is not a resource; storm has ${known}` }];
|
|
54
|
+
}
|
|
55
|
+
if (!Object.hasOwn(definition.options, vcpus.option)) {
|
|
56
|
+
const optionNames = Object.keys(definition.options);
|
|
57
|
+
const available = optionNames.length === 0 ? "none" : optionNames.join(", ");
|
|
58
|
+
return [
|
|
59
|
+
{
|
|
60
|
+
path: ["vcpus", "option"],
|
|
61
|
+
problem: `is not a ${definition.name} option; ${definition.name} has ${available}`,
|
|
62
|
+
},
|
|
63
|
+
];
|
|
64
|
+
}
|
|
65
|
+
return [];
|
|
66
|
+
}
|
|
42
67
|
/**
|
|
43
68
|
* The raw options object of a top-level `vercelSandbox(...)` value, for a suite's `vercelSandbox(...)` to merge over;
|
|
44
69
|
* undefined when the top level declares no `vercel-sandbox` runner or its options are not a plain object.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ConfigFileName } from "./schema.ts";
|
|
1
2
|
/** Where Node said an import failed, in the config file: a line, and a column when it gave one. */
|
|
2
3
|
export interface ConfigLocation {
|
|
3
4
|
readonly line: number;
|
|
@@ -21,10 +22,13 @@ export type ConfigImport = {
|
|
|
21
22
|
readonly message: string;
|
|
22
23
|
readonly location?: ConfigLocation;
|
|
23
24
|
};
|
|
24
|
-
/** What finding and loading
|
|
25
|
+
/** What finding and loading the config file needs from the world. No method rejects. */
|
|
25
26
|
export interface ConfigGateway {
|
|
26
|
-
/**
|
|
27
|
-
|
|
27
|
+
/**
|
|
28
|
+
* The config file names (`CONFIG_FILE_NAMES`) that `directory` holds as files, in that list's order. A directory
|
|
29
|
+
* storm can't read holds none.
|
|
30
|
+
*/
|
|
31
|
+
configFileNames(directory: string): Promise<readonly ConfigFileName[]>;
|
|
28
32
|
/** Whether `directory` is a git worktree's root: it holds `.git`, a directory or a file. */
|
|
29
33
|
isWorktreeRoot(directory: string): Promise<boolean>;
|
|
30
34
|
/** Imports the config file at `path`, running it. */
|