@cnc-tools/storm 0.12.0 → 0.13.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-4XT5RC5T.js → chunk-2NZXL6OH.js} +6 -42
- package/dist/chunks/{chunk-ISGQJIQM.js → chunk-5UMJNVKT.js} +1 -1
- package/dist/chunks/{chunk-FSP3SJ35.js → chunk-6EQKA7LI.js} +16 -46
- package/dist/chunks/{chunk-Y3BUNNRG.js → chunk-AX4EQZUS.js} +4 -4
- package/dist/chunks/{chunk-RYRJNHL7.js → chunk-DOFB2ACU.js} +3 -9
- package/dist/chunks/{chunk-SXW6XN4R.js → chunk-EGNP3S6C.js} +3 -3
- package/dist/chunks/{chunk-FK4RLDEK.js → chunk-N7E6DAUE.js} +1 -1
- package/dist/chunks/{chunk-U7M3ZB3Z.js → chunk-Q4TKRILH.js} +33 -167
- package/dist/chunks/{chunk-TMQQYHUX.js → chunk-RTILVSYQ.js} +1 -1
- package/dist/chunks/{chunk-7D6LC5JY.js → chunk-X4WBJIOF.js} +7 -39
- package/dist/chunks/{chunk-TEEZL3GA.js → chunk-YGS5VRQT.js} +11 -68
- package/dist/chunks/{chunk-ODQHQJLE.js → chunk-ZDJLKF2G.js} +742 -1117
- package/dist/chunks/{live-app-AZ5N5HBD.js → live-app-QFHS54SX.js} +4 -4
- package/dist/commands/exec/command.d.ts +2 -90
- package/dist/commands/exec/command.js +10 -10
- package/dist/commands/exec/define-run-command.d.ts +2 -90
- package/dist/commands/exec/live-view.js +18 -22
- package/dist/commands/exec/outcomes.d.ts +2 -106
- package/dist/commands/exec/outcomes.js +4 -35
- package/dist/commands/exec/progress.d.ts +3 -19
- package/dist/commands/exec/progress.js +16 -60
- package/dist/commands/exec/run-command.d.ts +4 -23
- package/dist/commands/exec/run-command.js +5 -79
- package/dist/commands/exec/run-metadata.d.ts +0 -6
- package/dist/commands/exec/run-metadata.js +2 -8
- package/dist/commands/exec/snapshot-text.d.ts +7 -16
- package/dist/commands/exec/snapshot-text.js +9 -49
- package/dist/commands/exec/view.js +2 -12
- package/dist/commands/playwright/command.d.ts +2 -90
- package/dist/commands/playwright/command.js +11 -11
- package/dist/commands/runs/facts.d.ts +1 -37
- package/dist/commands/runs/facts.js +4 -36
- package/dist/commands/runs/list/command.d.ts +0 -72
- package/dist/commands/runs/list/command.js +5 -5
- package/dist/commands/runs/list/outcomes.d.ts +0 -36
- package/dist/commands/runs/logs/command.js +5 -5
- package/dist/commands/runs/show/command.d.ts +0 -72
- package/dist/commands/runs/show/command.js +13 -40
- package/dist/commands/runs/show/metadata.js +1 -1
- package/dist/commands/runs/show/outcomes.d.ts +0 -36
- package/dist/commands/runs/show/outcomes.js +8 -42
- package/dist/commands/snapshots/build/command.d.ts +14 -411
- package/dist/commands/snapshots/build/command.js +56 -231
- package/dist/commands/snapshots/build/metadata.js +10 -7
- package/dist/commands/snapshots/build/outcomes.d.ts +11 -241
- package/dist/commands/snapshots/build/outcomes.js +29 -196
- package/dist/commands/snapshots/list/command.d.ts +2 -36
- package/dist/commands/snapshots/list/command.js +17 -53
- package/dist/commands/snapshots/list/metadata.js +1 -1
- package/dist/commands/snapshots/list/outcomes.d.ts +2 -37
- package/dist/commands/snapshots/list/outcomes.js +13 -53
- package/dist/commands/vitest/command.d.ts +2 -90
- package/dist/commands/vitest/command.js +11 -11
- package/dist/core/events.d.ts +5 -6
- package/dist/core/run-state.d.ts +7 -29
- package/dist/core/run-state.js +3 -26
- package/dist/core/run.d.ts +6 -14
- package/dist/core/run.js +17 -28
- package/dist/extensions/testserver/commands/pool/create/command.js +1 -1
- package/dist/run-directory/index.d.ts +1 -1
- package/dist/run-directory/index.js +0 -1
- package/dist/run-directory/recording.js +2 -2
- package/dist/run-directory/run-record.d.ts +14 -132
- package/dist/run-directory/run-record.js +8 -68
- package/dist/runner/build-snapshots.d.ts +50 -114
- package/dist/runner/build-snapshots.js +70 -159
- package/dist/runner/events.d.ts +4 -88
- package/dist/runner/gateways.d.ts +5 -23
- package/dist/runner/index.d.ts +5 -6
- package/dist/runner/index.js +1 -1
- package/dist/runner/live/snapshot-records.js +7 -18
- package/dist/runner/prepare.d.ts +11 -22
- package/dist/runner/prepare.js +6 -17
- package/dist/runner/ready.d.ts +16 -45
- package/dist/runner/ready.js +34 -59
- package/dist/runner/recipe.d.ts +0 -44
- package/dist/runner/recipe.js +0 -41
- package/dist/runner/scope.d.ts +8 -25
- package/dist/runner/scope.js +4 -8
- package/dist/runner/session.d.ts +18 -65
- package/dist/runner/session.js +15 -83
- package/dist/runner/snapshot-build.d.ts +2 -2
- package/dist/runner/snapshot-cache.d.ts +22 -74
- package/dist/runner/snapshot-cache.js +15 -107
- package/dist/runner/snapshot-inspect.d.ts +9 -13
- package/dist/runner/snapshot-inspect.js +48 -57
- package/dist/runner/snapshot-key.d.ts +9 -14
- package/dist/runner/snapshot-key.js +15 -22
- package/package.json +1 -1
- package/skills/read-run-output.md +8 -9
- package/dist/runner/snapshot-save.d.ts +0 -70
- package/dist/runner/snapshot-save.js +0 -160
- package/dist/runner/snapshot-start.d.ts +0 -25
- package/dist/runner/snapshot-start.js +0 -16
|
@@ -7,19 +7,19 @@ import {
|
|
|
7
7
|
runsUnreadable,
|
|
8
8
|
scopeFacts,
|
|
9
9
|
scopeSchema
|
|
10
|
-
} from "../../../chunks/chunk-
|
|
10
|
+
} from "../../../chunks/chunk-X4WBJIOF.js";
|
|
11
11
|
import {
|
|
12
12
|
renderOutcome
|
|
13
13
|
} from "../../../chunks/chunk-T6AZIDZD.js";
|
|
14
14
|
import "../../../chunks/chunk-NMVODY3P.js";
|
|
15
15
|
import {
|
|
16
16
|
pastRuns
|
|
17
|
-
} from "../../../chunks/chunk-
|
|
18
|
-
import "../../../chunks/chunk-
|
|
19
|
-
import "../../../chunks/chunk-
|
|
17
|
+
} from "../../../chunks/chunk-YGS5VRQT.js";
|
|
18
|
+
import "../../../chunks/chunk-RTILVSYQ.js";
|
|
19
|
+
import "../../../chunks/chunk-6EQKA7LI.js";
|
|
20
20
|
import {
|
|
21
21
|
findConfigFile
|
|
22
|
-
} from "../../../chunks/chunk-
|
|
22
|
+
} from "../../../chunks/chunk-ZDJLKF2G.js";
|
|
23
23
|
import "../../../chunks/chunk-YT5OROR7.js";
|
|
24
24
|
import {
|
|
25
25
|
stormCommands
|
|
@@ -38,46 +38,10 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<z.ZodObject<{
|
|
|
38
38
|
id: z.ZodString;
|
|
39
39
|
base: z.ZodString;
|
|
40
40
|
built: z.ZodBoolean;
|
|
41
|
-
branch: z.ZodNullable<z.ZodString>;
|
|
42
|
-
head: z.ZodNullable<z.ZodString>;
|
|
43
|
-
kind: z.ZodNullable<z.ZodEnum<{
|
|
44
|
-
base: "base";
|
|
45
|
-
dev: "dev";
|
|
46
|
-
}>>;
|
|
47
|
-
builtAt: z.ZodNullable<z.ZodString>;
|
|
48
41
|
builtBehind: z.ZodNullable<z.ZodNumber>;
|
|
49
42
|
url: z.ZodString;
|
|
50
43
|
}, z.core.$strip>>;
|
|
51
44
|
uploadBytes: z.ZodNullable<z.ZodNumber>;
|
|
52
|
-
noSaveReason: z.ZodNullable<z.ZodEnum<{
|
|
53
|
-
"already-saved": "already-saved";
|
|
54
|
-
ci: "ci";
|
|
55
|
-
"command-failed": "command-failed";
|
|
56
|
-
"keep-sandbox": "keep-sandbox";
|
|
57
|
-
"no-save-flag": "no-save-flag";
|
|
58
|
-
"not-trusted": "not-trusted";
|
|
59
|
-
recipe: "recipe";
|
|
60
|
-
}>>;
|
|
61
|
-
save: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
62
|
-
kind: z.ZodLiteral<"saved">;
|
|
63
|
-
snapshotId: z.ZodString;
|
|
64
|
-
base: z.ZodString;
|
|
65
|
-
branch: z.ZodNullable<z.ZodString>;
|
|
66
|
-
head: z.ZodString;
|
|
67
|
-
ms: z.ZodNumber;
|
|
68
|
-
sizeBytes: z.ZodNumber;
|
|
69
|
-
entryWritten: z.ZodBoolean;
|
|
70
|
-
url: z.ZodString;
|
|
71
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
72
|
-
kind: z.ZodLiteral<"failed">;
|
|
73
|
-
step: z.ZodEnum<{
|
|
74
|
-
"save-snapshot": "save-snapshot";
|
|
75
|
-
scrub: "scrub";
|
|
76
|
-
}>;
|
|
77
|
-
message: z.ZodString;
|
|
78
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
79
|
-
kind: z.ZodLiteral<"stopped">;
|
|
80
|
-
}, z.core.$strip>], "kind">>;
|
|
81
45
|
}, z.core.$strip>], "kind">>;
|
|
82
46
|
git: z.ZodNullable<z.ZodObject<{
|
|
83
47
|
branch: z.ZodNullable<z.ZodString>;
|
|
@@ -317,46 +281,10 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<z.ZodObject<{
|
|
|
317
281
|
id: z.ZodString;
|
|
318
282
|
base: z.ZodString;
|
|
319
283
|
built: z.ZodBoolean;
|
|
320
|
-
branch: z.ZodNullable<z.ZodString>;
|
|
321
|
-
head: z.ZodNullable<z.ZodString>;
|
|
322
|
-
kind: z.ZodNullable<z.ZodEnum<{
|
|
323
|
-
base: "base";
|
|
324
|
-
dev: "dev";
|
|
325
|
-
}>>;
|
|
326
|
-
builtAt: z.ZodNullable<z.ZodString>;
|
|
327
284
|
builtBehind: z.ZodNullable<z.ZodNumber>;
|
|
328
285
|
url: z.ZodString;
|
|
329
286
|
}, z.core.$strip>>;
|
|
330
287
|
uploadBytes: z.ZodNullable<z.ZodNumber>;
|
|
331
|
-
noSaveReason: z.ZodNullable<z.ZodEnum<{
|
|
332
|
-
"already-saved": "already-saved";
|
|
333
|
-
ci: "ci";
|
|
334
|
-
"command-failed": "command-failed";
|
|
335
|
-
"keep-sandbox": "keep-sandbox";
|
|
336
|
-
"no-save-flag": "no-save-flag";
|
|
337
|
-
"not-trusted": "not-trusted";
|
|
338
|
-
recipe: "recipe";
|
|
339
|
-
}>>;
|
|
340
|
-
save: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
341
|
-
kind: z.ZodLiteral<"saved">;
|
|
342
|
-
snapshotId: z.ZodString;
|
|
343
|
-
base: z.ZodString;
|
|
344
|
-
branch: z.ZodNullable<z.ZodString>;
|
|
345
|
-
head: z.ZodString;
|
|
346
|
-
ms: z.ZodNumber;
|
|
347
|
-
sizeBytes: z.ZodNumber;
|
|
348
|
-
entryWritten: z.ZodBoolean;
|
|
349
|
-
url: z.ZodString;
|
|
350
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
351
|
-
kind: z.ZodLiteral<"failed">;
|
|
352
|
-
step: z.ZodEnum<{
|
|
353
|
-
"save-snapshot": "save-snapshot";
|
|
354
|
-
scrub: "scrub";
|
|
355
|
-
}>;
|
|
356
|
-
message: z.ZodString;
|
|
357
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
358
|
-
kind: z.ZodLiteral<"stopped">;
|
|
359
|
-
}, z.core.$strip>], "kind">>;
|
|
360
288
|
}, z.core.$strip>], "kind">>;
|
|
361
289
|
git: z.ZodNullable<z.ZodObject<{
|
|
362
290
|
branch: z.ZodNullable<z.ZodString>;
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
tookText,
|
|
21
21
|
totalsText,
|
|
22
22
|
totalsTone
|
|
23
|
-
} from "../../../chunks/chunk-
|
|
23
|
+
} from "../../../chunks/chunk-X4WBJIOF.js";
|
|
24
24
|
import {
|
|
25
25
|
bold,
|
|
26
26
|
capsFor,
|
|
@@ -29,12 +29,11 @@ import {
|
|
|
29
29
|
import {
|
|
30
30
|
testPlanText,
|
|
31
31
|
waterfallLines
|
|
32
|
-
} from "../../../chunks/chunk-
|
|
32
|
+
} from "../../../chunks/chunk-AX4EQZUS.js";
|
|
33
33
|
import {
|
|
34
|
-
builtAtText
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
import "../../../chunks/chunk-ISGQJIQM.js";
|
|
34
|
+
builtAtText
|
|
35
|
+
} from "../../../chunks/chunk-2NZXL6OH.js";
|
|
36
|
+
import "../../../chunks/chunk-5UMJNVKT.js";
|
|
38
37
|
import "../../../chunks/chunk-IYM44FUX.js";
|
|
39
38
|
import "../../../chunks/chunk-LQKNI3EG.js";
|
|
40
39
|
import "../../../chunks/chunk-NMVODY3P.js";
|
|
@@ -42,16 +41,16 @@ import {
|
|
|
42
41
|
pastRuns,
|
|
43
42
|
planSchema,
|
|
44
43
|
timelineSchema
|
|
45
|
-
} from "../../../chunks/chunk-
|
|
44
|
+
} from "../../../chunks/chunk-YGS5VRQT.js";
|
|
46
45
|
import {
|
|
47
46
|
short
|
|
48
|
-
} from "../../../chunks/chunk-
|
|
47
|
+
} from "../../../chunks/chunk-RTILVSYQ.js";
|
|
49
48
|
import {
|
|
50
49
|
megabytesText
|
|
51
|
-
} from "../../../chunks/chunk-
|
|
50
|
+
} from "../../../chunks/chunk-6EQKA7LI.js";
|
|
52
51
|
import {
|
|
53
52
|
findConfigFile
|
|
54
|
-
} from "../../../chunks/chunk-
|
|
53
|
+
} from "../../../chunks/chunk-ZDJLKF2G.js";
|
|
55
54
|
import "../../../chunks/chunk-YT5OROR7.js";
|
|
56
55
|
import "../../../chunks/chunk-GQIL3AHY.js";
|
|
57
56
|
import "../../../chunks/chunk-GSC6SRTW.js";
|
|
@@ -258,44 +257,18 @@ function whereRows(shown) {
|
|
|
258
257
|
[
|
|
259
258
|
"Snapshot",
|
|
260
259
|
[
|
|
261
|
-
`${snapshot.id} of ${short(snapshot.base)}, ${snapshot.built ? "built" : "reused"}
|
|
260
|
+
`${snapshot.id} of ${short(snapshot.base)}, ${snapshot.built ? "built" : "reused"}`,
|
|
262
261
|
...snapshotCommitLines(snapshot, where.base),
|
|
263
262
|
` ${snapshot.url}`
|
|
264
263
|
]
|
|
265
264
|
]
|
|
266
265
|
],
|
|
267
|
-
...where.uploadBytes === null ? [] : [["Upload", megabytesText(where.uploadBytes)]]
|
|
268
|
-
...saveRows(where.save, where.noSaveReason)
|
|
266
|
+
...where.uploadBytes === null ? [] : [["Upload", megabytesText(where.uploadBytes)]]
|
|
269
267
|
];
|
|
270
268
|
}
|
|
271
269
|
function snapshotCommitLines(snapshot, mergeBase) {
|
|
272
|
-
const {
|
|
273
|
-
|
|
274
|
-
return [` ${kind} snapshot, ${builtAtText({ builtAt, builtBehind, atMergeBase: builtAt === mergeBase })}`];
|
|
275
|
-
}
|
|
276
|
-
function headText(branch) {
|
|
277
|
-
return branch === null ? "a detached HEAD" : `branch ${branch}`;
|
|
278
|
-
}
|
|
279
|
-
var SAVE_STEPS = { scrub: "scrub", "save-snapshot": "save" };
|
|
280
|
-
function saveRows(save, noSaveReason) {
|
|
281
|
-
if (save === null)
|
|
282
|
-
return noSaveReason === null ? [] : [["Saved", { text: `nothing: ${noSaveText(noSaveReason)}`, tone: "muted" }]];
|
|
283
|
-
switch (save.kind) {
|
|
284
|
-
case "saved":
|
|
285
|
-
return [
|
|
286
|
-
[
|
|
287
|
-
"Saved",
|
|
288
|
-
[
|
|
289
|
-
`${save.snapshotId} of ${short(save.base)}, ${headText(save.branch)} at ${short(save.head)}${save.entryWritten ? "" : ", not in the cache"}`,
|
|
290
|
-
` ${save.url}`
|
|
291
|
-
]
|
|
292
|
-
]
|
|
293
|
-
];
|
|
294
|
-
case "failed":
|
|
295
|
-
return [["Saved", { text: `nothing: the ${SAVE_STEPS[save.step]} failed: ${save.message}`, tone: "muted" }]];
|
|
296
|
-
case "stopped":
|
|
297
|
-
return [["Saved", { text: "nothing: the run stopped", tone: "muted" }]];
|
|
298
|
-
}
|
|
270
|
+
const { base, builtBehind } = snapshot;
|
|
271
|
+
return [` ${builtAtText({ base, builtBehind, mergeBase })}`];
|
|
299
272
|
}
|
|
300
273
|
function keptRows(shown) {
|
|
301
274
|
const kept = keptText(shown);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/commands/runs/show/metadata.ts
|
|
2
2
|
var metadata = {
|
|
3
|
-
description: "Show a past run from its run directory: its command, a storm vitest or storm playwright run's test plan, config file, working directory, the branch and commit it started from, start, how long it took and how it ended; where its command ran, on this machine or in a runner sandbox, with the sandbox's name, region, vCPUs, runtime and page in the Vercel dashboard, until when the run kept it running, with its Connect page while it runs, its control plane team and project, the run's base and the runner snapshot it started from, with
|
|
3
|
+
description: "Show a past run from its run directory: its command, a storm vitest or storm playwright run's test plan, config file, working directory, the branch and commit it started from, start, how long it took and how it ended; where its command ran, on this machine or in a runner sandbox, with the sandbox's name, region, vCPUs, runtime and page in the Vercel dashboard, until when the run kept it running, with its Connect page while it runs, its control plane team and project, the run's base and the runner snapshot it started from, with where it was built and its page; what each resource it acquired reported of itself; the run logs it has, each with the storm runs logs command that prints it; its waterfall; and each test's final result, in color on a terminal that takes it. With --failed or --test, only the selected tests, how many of all they are, and each one's errors and test output, the last 8 MiB of what it printed, failure reports included. Without an id, the newest finished run of the storm.config.ts found from the working directory, or of every config with --all; pass the id `storm vitest` or `storm exec` printed when another run may have finished since. A run's test results are saved once it finishes. Changes nothing.",
|
|
4
4
|
summary: "Show a past run and its tests.",
|
|
5
5
|
help: {
|
|
6
6
|
usages: ["[<id>] [--failed] [--test <TEXT>] [--all]"],
|
|
@@ -28,46 +28,10 @@ export declare const outcomes: import("@vercel/clinkr").Outcomes<{
|
|
|
28
28
|
id: z.ZodString;
|
|
29
29
|
base: z.ZodString;
|
|
30
30
|
built: z.ZodBoolean;
|
|
31
|
-
branch: z.ZodNullable<z.ZodString>;
|
|
32
|
-
head: z.ZodNullable<z.ZodString>;
|
|
33
|
-
kind: z.ZodNullable<z.ZodEnum<{
|
|
34
|
-
base: "base";
|
|
35
|
-
dev: "dev";
|
|
36
|
-
}>>;
|
|
37
|
-
builtAt: z.ZodNullable<z.ZodString>;
|
|
38
31
|
builtBehind: z.ZodNullable<z.ZodNumber>;
|
|
39
32
|
url: z.ZodString;
|
|
40
33
|
}, z.core.$strip>>;
|
|
41
34
|
uploadBytes: z.ZodNullable<z.ZodNumber>;
|
|
42
|
-
noSaveReason: z.ZodNullable<z.ZodEnum<{
|
|
43
|
-
"already-saved": "already-saved";
|
|
44
|
-
ci: "ci";
|
|
45
|
-
"command-failed": "command-failed";
|
|
46
|
-
"keep-sandbox": "keep-sandbox";
|
|
47
|
-
"no-save-flag": "no-save-flag";
|
|
48
|
-
"not-trusted": "not-trusted";
|
|
49
|
-
recipe: "recipe";
|
|
50
|
-
}>>;
|
|
51
|
-
save: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
52
|
-
kind: z.ZodLiteral<"saved">;
|
|
53
|
-
snapshotId: z.ZodString;
|
|
54
|
-
base: z.ZodString;
|
|
55
|
-
branch: z.ZodNullable<z.ZodString>;
|
|
56
|
-
head: z.ZodString;
|
|
57
|
-
ms: z.ZodNumber;
|
|
58
|
-
sizeBytes: z.ZodNumber;
|
|
59
|
-
entryWritten: z.ZodBoolean;
|
|
60
|
-
url: z.ZodString;
|
|
61
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
62
|
-
kind: z.ZodLiteral<"failed">;
|
|
63
|
-
step: z.ZodEnum<{
|
|
64
|
-
"save-snapshot": "save-snapshot";
|
|
65
|
-
scrub: "scrub";
|
|
66
|
-
}>;
|
|
67
|
-
message: z.ZodString;
|
|
68
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
69
|
-
kind: z.ZodLiteral<"stopped">;
|
|
70
|
-
}, z.core.$strip>], "kind">>;
|
|
71
35
|
}, z.core.$strip>], "kind">>;
|
|
72
36
|
git: z.ZodNullable<z.ZodObject<{
|
|
73
37
|
branch: z.ZodNullable<z.ZodString>;
|
|
@@ -5,7 +5,7 @@ import { z } from "zod";
|
|
|
5
5
|
import { planSchema, timelineSchema } from "../../../run-directory/index.js";
|
|
6
6
|
import { testPlanText } from "../../exec/test-plan.js";
|
|
7
7
|
import { megabytesText } from "../../../core/index.js";
|
|
8
|
-
import { builtAtText
|
|
8
|
+
import { builtAtText } from "../../exec/snapshot-text.js";
|
|
9
9
|
import { short } from "../../exec/text.js";
|
|
10
10
|
import { waterfallLines } from "../../exec/waterfall.js";
|
|
11
11
|
import { commandText, exitText, exitTone, gitText, keptText, LOG_STEPS, runFactsSchema, runNotFound, runsUnreadable, scopeSchema, startedText, tookText, totalsText, totalsTone, } from "../facts.js";
|
|
@@ -209,8 +209,8 @@ function lineText(line, p) {
|
|
|
209
209
|
/**
|
|
210
210
|
* Where the command ran: on this machine, or in a runner sandbox, with its page in the Vercel dashboard, until
|
|
211
211
|
* when the run kept it running, the control plane project it ran in, the run's merge-base and the runner snapshot it
|
|
212
|
-
* started from, which the run's changes went on top of, with
|
|
213
|
-
*
|
|
212
|
+
* started from, which the run's changes went on top of, with where it was built and its page, and the upload's size.
|
|
213
|
+
* None when unknown.
|
|
214
214
|
*/
|
|
215
215
|
function whereRows(shown) {
|
|
216
216
|
const { where, ended } = shown;
|
|
@@ -237,56 +237,22 @@ function whereRows(shown) {
|
|
|
237
237
|
[
|
|
238
238
|
"Snapshot",
|
|
239
239
|
[
|
|
240
|
-
`${snapshot.id} of ${short(snapshot.base)}, ${snapshot.built ? "built" : "reused"}
|
|
240
|
+
`${snapshot.id} of ${short(snapshot.base)}, ${snapshot.built ? "built" : "reused"}`,
|
|
241
241
|
...snapshotCommitLines(snapshot, where.base),
|
|
242
242
|
` ${snapshot.url}`,
|
|
243
243
|
],
|
|
244
244
|
],
|
|
245
245
|
]),
|
|
246
246
|
...(where.uploadBytes === null ? [] : [["Upload", megabytesText(where.uploadBytes)]]),
|
|
247
|
-
...saveRows(where.save, where.noSaveReason),
|
|
248
247
|
];
|
|
249
248
|
}
|
|
250
249
|
/**
|
|
251
|
-
* The line that says a runner snapshot
|
|
252
|
-
*
|
|
253
|
-
* record's snapshot of an older base doesn't read as built at the merge-base.
|
|
250
|
+
* The line that says where a runner snapshot was built, in commits. Whether it was built at the merge-base is compared
|
|
251
|
+
* with the record's own merge-base.
|
|
254
252
|
*/
|
|
255
253
|
function snapshotCommitLines(snapshot, mergeBase) {
|
|
256
|
-
const {
|
|
257
|
-
|
|
258
|
-
return [];
|
|
259
|
-
return [` ${kind} snapshot, ${builtAtText({ builtAt, builtBehind, atMergeBase: builtAt === mergeBase })}`];
|
|
260
|
-
}
|
|
261
|
-
/** The HEAD a dev snapshot was saved at, as a row names it: its branch, or that it was detached. */
|
|
262
|
-
function headText(branch) {
|
|
263
|
-
return branch === null ? "a detached HEAD" : `branch ${branch}`;
|
|
264
|
-
}
|
|
265
|
-
/** Each step of a dev snapshot's save, as a person names it. */
|
|
266
|
-
const SAVE_STEPS = { scrub: "scrub", "save-snapshot": "save" };
|
|
267
|
-
/**
|
|
268
|
-
* The row for the dev snapshot the run saved the runner sandbox as, or why it didn't: a save that failed or stopped,
|
|
269
|
-
* or `noSaveReason`, why a run whose command ended on its own started none. None when storm recorded neither.
|
|
270
|
-
*/
|
|
271
|
-
function saveRows(save, noSaveReason) {
|
|
272
|
-
if (save === null)
|
|
273
|
-
return noSaveReason === null ? [] : [["Saved", { text: `nothing: ${noSaveText(noSaveReason)}`, tone: "muted" }]];
|
|
274
|
-
switch (save.kind) {
|
|
275
|
-
case "saved":
|
|
276
|
-
return [
|
|
277
|
-
[
|
|
278
|
-
"Saved",
|
|
279
|
-
[
|
|
280
|
-
`${save.snapshotId} of ${short(save.base)}, ${headText(save.branch)} at ${short(save.head)}${save.entryWritten ? "" : ", not in the cache"}`,
|
|
281
|
-
` ${save.url}`,
|
|
282
|
-
],
|
|
283
|
-
],
|
|
284
|
-
];
|
|
285
|
-
case "failed":
|
|
286
|
-
return [["Saved", { text: `nothing: the ${SAVE_STEPS[save.step]} failed: ${save.message}`, tone: "muted" }]];
|
|
287
|
-
case "stopped":
|
|
288
|
-
return [["Saved", { text: "nothing: the run stopped", tone: "muted" }]];
|
|
289
|
-
}
|
|
254
|
+
const { base, builtBehind } = snapshot;
|
|
255
|
+
return [` ${builtAtText({ base, builtBehind, mergeBase })}`];
|
|
290
256
|
}
|
|
291
257
|
/**
|
|
292
258
|
* The row for the runner sandbox the run kept running, if it did: until when, in success while it still runs, with its
|