@cnc-tools/storm 0.6.0 → 0.8.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/build-info.js +1 -1
- package/dist/commands/exec/cleanup.d.ts +3 -3
- package/dist/commands/exec/cleanup.js +1 -1
- package/dist/commands/exec/command.d.ts +797 -1
- package/dist/commands/exec/command.js +1 -1
- package/dist/commands/exec/live-view.js +32 -15
- package/dist/commands/exec/metadata.d.ts +5 -2
- package/dist/commands/exec/metadata.js +4 -0
- package/dist/commands/exec/mint-failed.d.ts +28 -0
- package/dist/commands/exec/outcomes.d.ts +526 -0
- package/dist/commands/exec/outcomes.js +9 -0
- package/dist/commands/exec/progress.d.ts +14 -2
- package/dist/commands/exec/progress.js +57 -14
- package/dist/commands/exec/run-command.d.ts +10 -4
- package/dist/commands/exec/run-command.js +41 -8
- package/dist/commands/exec/run-metadata.d.ts +6 -3
- package/dist/commands/exec/run-metadata.js +6 -3
- package/dist/commands/exec/run-record.d.ts +83 -4
- package/dist/commands/exec/run-record.js +49 -1
- package/dist/commands/exec/tests-summary.d.ts +1 -1
- package/dist/commands/exec/tests-summary.js +1 -1
- package/dist/commands/exec/view.js +36 -4
- package/dist/commands/runs/facts.d.ts +25 -0
- package/dist/commands/runs/facts.js +36 -3
- package/dist/commands/runs/list/command.d.ts +154 -1
- package/dist/commands/runs/list/command.js +1 -1
- package/dist/commands/runs/list/outcomes.d.ts +41 -0
- package/dist/commands/runs/logs/command.d.ts +263 -1
- package/dist/commands/runs/logs/command.js +1 -1
- package/dist/commands/runs/logs/outcomes.d.ts +105 -0
- package/dist/commands/runs/show/command.d.ts +354 -1
- package/dist/commands/runs/show/command.js +1 -1
- package/dist/commands/runs/show/metadata.js +1 -1
- package/dist/commands/runs/show/outcomes.d.ts +96 -0
- package/dist/commands/runs/show/outcomes.js +30 -1
- package/dist/commands/vitest/command.d.ts +912 -1
- package/dist/commands/vitest/command.js +1 -1
- package/dist/commands/vitest/metadata.d.ts +5 -2
- package/dist/commands/vitest/metadata.js +4 -0
- package/dist/commands/vitest/outcomes.d.ts +320 -0
- package/dist/config/errors.d.ts +73 -0
- package/dist/config/schema.d.ts +1 -1
- package/dist/config-file/define.d.ts +4 -3
- package/dist/config-file/define.js +1 -1
- package/dist/config-file/toolchain.js +1 -1
- package/dist/core/command-slots.d.ts +8 -2
- package/dist/core/command-slots.js +6 -2
- package/dist/core/events.d.ts +9 -7
- package/dist/core/index.d.ts +1 -1
- package/dist/core/run-state.d.ts +30 -6
- package/dist/core/run-state.js +19 -4
- package/dist/core/run.d.ts +17 -4
- package/dist/core/run.js +61 -25
- package/dist/credential/index.d.ts +1 -0
- package/dist/credential/index.js +1 -0
- package/dist/credential/settle.d.ts +20 -0
- package/dist/credential/target.d.ts +6 -0
- package/dist/credential/target.js +7 -0
- package/dist/resources/github/command.d.ts +54 -2
- package/dist/resources/github/config.js +1 -1
- package/dist/resources/github/index.js +1 -1
- package/dist/resources/github/resource.js +2 -2
- package/dist/resources/testserver/command.d.ts +208 -10
- package/dist/resources/testserver/command.js +7 -0
- package/dist/resources/testserver/commands/create/command.d.ts +808 -1
- package/dist/resources/testserver/commands/create/command.js +64 -23
- package/dist/resources/testserver/commands/create/metadata.js +6 -2
- package/dist/resources/testserver/commands/create/outcomes.d.ts +347 -0
- package/dist/resources/testserver/commands/create/outcomes.js +14 -1
- package/dist/resources/testserver/commands/list/command.d.ts +84 -1
- package/dist/resources/testserver/commands/list/command.js +1 -1
- package/dist/resources/testserver/commands/list/outcomes.d.ts +16 -0
- package/dist/resources/testserver/config.js +14 -4
- package/dist/resources/testserver/events.d.ts +9 -0
- package/dist/resources/testserver/index.js +8 -7
- package/dist/resources/testserver/lane.js +1 -0
- package/dist/resources/testserver/live/gateways.d.ts +2 -0
- package/dist/resources/testserver/live/gateways.js +16 -3
- package/dist/resources/testserver/pool/channels.d.ts +5 -2
- package/dist/resources/testserver/pool/channels.js +1 -1
- package/dist/resources/testserver/pool/create.d.ts +6 -2
- package/dist/resources/testserver/pool/create.js +6 -5
- package/dist/resources/testserver/pool/index.d.ts +1 -0
- package/dist/resources/testserver/pool/index.js +1 -0
- package/dist/resources/testserver/pool/pull-request.d.ts +89 -0
- package/dist/resources/testserver/pool/pull-request.js +85 -0
- package/dist/resources/testserver/pr-build-facts.d.ts +130 -0
- package/dist/resources/testserver/pr-build-facts.js +261 -0
- package/dist/resources/testserver/presentation.d.ts +2 -2
- package/dist/resources/testserver/presentation.js +12 -3
- package/dist/resources/testserver/provider.d.ts +16 -6
- package/dist/resources/testserver/provider.js +46 -15
- package/dist/resources/testserver/pull-request/gateways.d.ts +117 -0
- package/dist/resources/testserver/pull-request/gateways.js +5 -0
- package/dist/resources/testserver/pull-request/index.d.ts +5 -0
- package/dist/resources/testserver/pull-request/index.js +6 -0
- package/dist/resources/testserver/pull-request/live/github-rest.d.ts +28 -0
- package/dist/resources/testserver/pull-request/live/github-rest.js +114 -0
- package/dist/resources/testserver/pull-request/live/github-token-gateway.d.ts +12 -0
- package/dist/resources/testserver/pull-request/live/github-token-gateway.js +39 -0
- package/dist/resources/testserver/pull-request/live/pull-request-gateway.d.ts +10 -0
- package/dist/resources/testserver/pull-request/live/pull-request-gateway.js +27 -0
- package/dist/resources/testserver/pull-request/live/testserver-workflow-gateway.d.ts +21 -0
- package/dist/resources/testserver/pull-request/live/testserver-workflow-gateway.js +64 -0
- package/dist/resources/testserver/ran.d.ts +5 -0
- package/dist/resources/testserver/ran.js +19 -3
- package/dist/resources/testserver/resource.d.ts +5 -1
- package/dist/resources/testserver/resource.js +2 -2
- package/dist/resources/testserver/sandbox/build-reference.d.ts +38 -0
- package/dist/resources/testserver/sandbox/build-reference.js +79 -0
- package/dist/resources/testserver/sandbox/index.d.ts +1 -0
- package/dist/resources/testserver/sandbox/index.js +1 -0
- package/dist/resources.d.ts +265 -15
- package/dist/runner/events.d.ts +64 -1
- package/dist/runner/gateways.d.ts +17 -6
- package/dist/runner/index.d.ts +5 -4
- package/dist/runner/index.js +4 -3
- package/dist/runner/live/snapshot-records.js +18 -4
- package/dist/runner/prepare.d.ts +23 -4
- package/dist/runner/prepare.js +13 -3
- package/dist/runner/ready.d.ts +7 -3
- package/dist/runner/ready.js +11 -5
- package/dist/runner/scope.d.ts +17 -1
- package/dist/runner/scope.js +4 -0
- package/dist/runner/snapshot-build.d.ts +3 -1
- package/dist/runner/snapshot-build.js +12 -2
- package/dist/runner/snapshot-cache.d.ts +46 -8
- package/dist/runner/snapshot-cache.js +60 -11
- package/dist/runner/snapshot-key.d.ts +12 -1
- package/dist/runner/snapshot-key.js +17 -1
- package/dist/runner/snapshot-save.d.ts +53 -0
- package/dist/runner/snapshot-save.js +148 -0
- package/dist/sdk/index.js +2 -2
- package/dist/story/align.d.ts +1 -1
- package/dist/story/align.js +1 -1
- package/dist/story/command-line.d.ts +34 -0
- package/dist/story/command-line.js +100 -0
- package/dist/story/definition.d.ts +22 -15
- package/dist/story/definition.js +2 -2
- package/dist/story/errors.js +1 -1
- package/dist/story/gateways.d.ts +45 -25
- package/dist/story/gateways.js +2 -2
- package/dist/story/host.d.ts +11 -8
- package/dist/story/host.js +37 -37
- package/dist/story/index.d.ts +2 -1
- package/dist/story/index.js +6 -5
- package/dist/story/json.d.ts +1 -1
- package/dist/story/json.js +2 -2
- package/dist/story/live/recording-gateway.d.ts +2 -0
- package/dist/story/live/{artifact-gateway.js → recording-gateway.js} +33 -12
- package/dist/story/mode.d.ts +2 -2
- package/dist/story/mode.js +1 -1
- package/dist/story/orphans.d.ts +23 -5
- package/dist/story/orphans.js +44 -8
- package/dist/story/recording.d.ts +62 -0
- package/dist/story/{artifact.js → recording.js} +31 -27
- package/dist/story/report.d.ts +21 -9
- package/dist/story/report.js +37 -25
- package/dist/story/settle.d.ts +23 -21
- package/dist/story/settle.js +17 -16
- package/dist/story/{run.d.ts → start.d.ts} +18 -17
- package/dist/story/{run.js → start.js} +66 -43
- package/dist/vercel-cli/context.js +1 -1
- package/dist/vercel-cli/index.js +1 -1
- package/dist/vitest/config.js +2 -2
- package/dist/vitest/fixtures.d.ts +1 -1
- package/dist/vitest/fixtures.js +1 -1
- package/dist/vitest/index.js +3 -3
- package/dist/vitest/plan.js +1 -1
- package/package.json +3 -3
- package/skills/overview.md +2 -0
- package/skills/testserver-builds.md +80 -0
- package/dist/story/artifact.d.ts +0 -60
- package/dist/story/live/artifact-gateway.d.ts +0 -2
|
@@ -46,8 +46,33 @@ export declare const runFactsSchema: z.ZodObject<{
|
|
|
46
46
|
id: z.ZodString;
|
|
47
47
|
base: z.ZodString;
|
|
48
48
|
built: z.ZodBoolean;
|
|
49
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
50
|
+
head: z.ZodNullable<z.ZodString>;
|
|
49
51
|
url: z.ZodString;
|
|
50
52
|
}, z.core.$strip>>;
|
|
53
|
+
save: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
54
|
+
kind: z.ZodLiteral<"saved">;
|
|
55
|
+
snapshotId: z.ZodString;
|
|
56
|
+
base: z.ZodString;
|
|
57
|
+
branch: z.ZodString;
|
|
58
|
+
head: z.ZodString;
|
|
59
|
+
ms: z.ZodNumber;
|
|
60
|
+
sizeBytes: z.ZodNumber;
|
|
61
|
+
entryWritten: z.ZodBoolean;
|
|
62
|
+
url: z.ZodString;
|
|
63
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
64
|
+
kind: z.ZodLiteral<"skipped">;
|
|
65
|
+
reason: z.ZodLiteral<"detached-head">;
|
|
66
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
67
|
+
kind: z.ZodLiteral<"failed">;
|
|
68
|
+
step: z.ZodEnum<{
|
|
69
|
+
"save-snapshot": "save-snapshot";
|
|
70
|
+
scrub: "scrub";
|
|
71
|
+
}>;
|
|
72
|
+
message: z.ZodString;
|
|
73
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
74
|
+
kind: z.ZodLiteral<"stopped">;
|
|
75
|
+
}, z.core.$strip>], "kind">>;
|
|
51
76
|
}, z.core.$strip>], "kind">>;
|
|
52
77
|
git: z.ZodNullable<z.ZodObject<{
|
|
53
78
|
branch: z.ZodNullable<z.ZodString>;
|
|
@@ -69,8 +69,40 @@ export const runFactsSchema = z.object({
|
|
|
69
69
|
keptUntil: z.string().nullable(),
|
|
70
70
|
/** How many whole minutes are left until keptUntil, as of reading the run, 0 once it has passed; null when keptUntil is. */
|
|
71
71
|
keptMinutesLeft: z.number().nullable(),
|
|
72
|
-
/** The runner snapshot it started from: its id, the base it is of, which the run's changes went on top of, whether this run built it or reused it, and its page in the Vercel dashboard. Null until known. */
|
|
73
|
-
snapshot: z
|
|
72
|
+
/** The runner snapshot it started from: its id, the base it is of, which the run's changes went on top of, whether this run built it or reused it, for a branch snapshot the branch and HEAD commit of the run that saved it (each null for a base snapshot), and its page in the Vercel dashboard. Null until known. */
|
|
73
|
+
snapshot: z
|
|
74
|
+
.object({
|
|
75
|
+
id: z.string(),
|
|
76
|
+
base: z.string(),
|
|
77
|
+
built: z.boolean(),
|
|
78
|
+
branch: z.string().nullable(),
|
|
79
|
+
head: z.string().nullable(),
|
|
80
|
+
url: z.string(),
|
|
81
|
+
})
|
|
82
|
+
.nullable(),
|
|
83
|
+
/** How saving the runner sandbox as a branch snapshot ended (--save-snapshot), as the run's ran result's runner.save says, with the saved snapshot's page in the Vercel dashboard (`url`, null unless saved); null without the flag. */
|
|
84
|
+
save: z
|
|
85
|
+
.discriminatedUnion("kind", [
|
|
86
|
+
z.object({
|
|
87
|
+
kind: z.literal("saved"),
|
|
88
|
+
snapshotId: z.string(),
|
|
89
|
+
base: z.string(),
|
|
90
|
+
branch: z.string(),
|
|
91
|
+
head: z.string(),
|
|
92
|
+
ms: z.number(),
|
|
93
|
+
sizeBytes: z.number(),
|
|
94
|
+
entryWritten: z.boolean(),
|
|
95
|
+
url: z.string(),
|
|
96
|
+
}),
|
|
97
|
+
z.object({ kind: z.literal("skipped"), reason: z.literal("detached-head") }),
|
|
98
|
+
z.object({
|
|
99
|
+
kind: z.literal("failed"),
|
|
100
|
+
step: z.enum(["scrub", "save-snapshot"]),
|
|
101
|
+
message: z.string(),
|
|
102
|
+
}),
|
|
103
|
+
z.object({ kind: z.literal("stopped") }),
|
|
104
|
+
])
|
|
105
|
+
.nullable(),
|
|
74
106
|
}),
|
|
75
107
|
])
|
|
76
108
|
.nullable(),
|
|
@@ -124,12 +156,13 @@ export function runFacts(run, now) {
|
|
|
124
156
|
function whereFacts(where, now) {
|
|
125
157
|
if (where.kind === "local")
|
|
126
158
|
return { kind: "local" };
|
|
127
|
-
const { sandbox, snapshot, keptUntil } = where;
|
|
159
|
+
const { sandbox, snapshot, keptUntil, save } = where;
|
|
128
160
|
return {
|
|
129
161
|
...where,
|
|
130
162
|
keptMinutesLeft: keptUntil === null ? null : Math.max(0, Math.floor((Date.parse(keptUntil) - now.getTime()) / 60_000)),
|
|
131
163
|
sandboxUrl: sandbox === null ? null : sandboxPage(where, sandbox),
|
|
132
164
|
snapshot: snapshot === null ? null : { ...snapshot, url: snapshotPage(where, snapshot.id) },
|
|
165
|
+
save: save?.kind === "saved" ? { ...save, url: snapshotPage(where, save.snapshotId) } : save,
|
|
133
166
|
};
|
|
134
167
|
}
|
|
135
168
|
/** `scope` as the result reports it. */
|
|
@@ -53,8 +53,145 @@ export declare function command(cmd: CommandBuilder<StormApp>): import("@vercel/
|
|
|
53
53
|
id: z.ZodString;
|
|
54
54
|
base: z.ZodString;
|
|
55
55
|
built: z.ZodBoolean;
|
|
56
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
57
|
+
head: z.ZodNullable<z.ZodString>;
|
|
56
58
|
url: z.ZodString;
|
|
57
59
|
}, z.core.$strip>>;
|
|
60
|
+
save: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
61
|
+
kind: z.ZodLiteral<"saved">;
|
|
62
|
+
snapshotId: z.ZodString;
|
|
63
|
+
base: z.ZodString;
|
|
64
|
+
branch: z.ZodString;
|
|
65
|
+
head: z.ZodString;
|
|
66
|
+
ms: z.ZodNumber;
|
|
67
|
+
sizeBytes: z.ZodNumber;
|
|
68
|
+
entryWritten: z.ZodBoolean;
|
|
69
|
+
url: z.ZodString;
|
|
70
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
71
|
+
kind: z.ZodLiteral<"skipped">;
|
|
72
|
+
reason: z.ZodLiteral<"detached-head">;
|
|
73
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
74
|
+
kind: z.ZodLiteral<"failed">;
|
|
75
|
+
step: z.ZodEnum<{
|
|
76
|
+
"save-snapshot": "save-snapshot";
|
|
77
|
+
scrub: "scrub";
|
|
78
|
+
}>;
|
|
79
|
+
message: z.ZodString;
|
|
80
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
81
|
+
kind: z.ZodLiteral<"stopped">;
|
|
82
|
+
}, z.core.$strip>], "kind">>;
|
|
83
|
+
}, z.core.$strip>], "kind">>;
|
|
84
|
+
git: z.ZodNullable<z.ZodObject<{
|
|
85
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
86
|
+
commit: z.ZodString;
|
|
87
|
+
dirty: z.ZodBoolean;
|
|
88
|
+
}, z.core.$strip>>;
|
|
89
|
+
ended: z.ZodNullable<z.ZodObject<{
|
|
90
|
+
outcome: z.ZodString;
|
|
91
|
+
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
92
|
+
signal: z.ZodNullable<z.ZodString>;
|
|
93
|
+
ms: z.ZodNullable<z.ZodNumber>;
|
|
94
|
+
tests: z.ZodNullable<z.ZodObject<{
|
|
95
|
+
passed: z.ZodNumber;
|
|
96
|
+
failed: z.ZodNumber;
|
|
97
|
+
skipped: z.ZodNumber;
|
|
98
|
+
}, z.core.$strip>>;
|
|
99
|
+
testsIncomplete: z.ZodNullable<z.ZodString>;
|
|
100
|
+
resources: z.ZodNullable<z.ZodType<import("../../../core/resource.ts").ResourceRanFacts<import("../../../resources.ts").Resources>, import("../../../core/resource.ts").ResourceRanFacts<import("../../../resources.ts").Resources>, z.core.$ZodTypeInternals<import("../../../core/resource.ts").ResourceRanFacts<import("../../../resources.ts").Resources>, import("../../../core/resource.ts").ResourceRanFacts<import("../../../resources.ts").Resources>>>>;
|
|
101
|
+
}, z.core.$strip>>;
|
|
102
|
+
}, z.core.$strip>>;
|
|
103
|
+
}, z.core.$strip>;
|
|
104
|
+
}, {
|
|
105
|
+
listed: unknown;
|
|
106
|
+
}, {
|
|
107
|
+
runsUnreadable: z.ZodObject<{
|
|
108
|
+
path: z.ZodString;
|
|
109
|
+
message: z.ZodString;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
}, {
|
|
112
|
+
readonly runsUnreadable: {
|
|
113
|
+
readonly exitCode: 1;
|
|
114
|
+
readonly description: "storm couldn't read the run directories.";
|
|
115
|
+
readonly schema: z.ZodObject<{
|
|
116
|
+
path: z.ZodString;
|
|
117
|
+
message: z.ZodString;
|
|
118
|
+
}, z.core.$strip>;
|
|
119
|
+
readonly render: ({ path, message }: {
|
|
120
|
+
readonly path: string;
|
|
121
|
+
readonly message: string;
|
|
122
|
+
}) => {
|
|
123
|
+
message: string;
|
|
124
|
+
rows: (readonly ["Path", string])[];
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
}>, import("@vercel/clinkr").OutcomeOf<import("@vercel/clinkr").Outcomes<{
|
|
128
|
+
listed: z.ZodObject<{
|
|
129
|
+
scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
130
|
+
kind: z.ZodLiteral<"config">;
|
|
131
|
+
configFile: z.ZodString;
|
|
132
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
133
|
+
kind: z.ZodLiteral<"all">;
|
|
134
|
+
why: z.ZodEnum<{
|
|
135
|
+
flag: "flag";
|
|
136
|
+
"no-config-file": "no-config-file";
|
|
137
|
+
}>;
|
|
138
|
+
}, z.core.$strip>], "kind">;
|
|
139
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
140
|
+
total: z.ZodNumber;
|
|
141
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
142
|
+
id: z.ZodString;
|
|
143
|
+
path: z.ZodString;
|
|
144
|
+
active: z.ZodBoolean;
|
|
145
|
+
startedAt: z.ZodNullable<z.ZodString>;
|
|
146
|
+
cwd: z.ZodNullable<z.ZodString>;
|
|
147
|
+
configFile: z.ZodNullable<z.ZodString>;
|
|
148
|
+
argv: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
149
|
+
where: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
150
|
+
kind: z.ZodLiteral<"local">;
|
|
151
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
152
|
+
kind: z.ZodLiteral<"runner">;
|
|
153
|
+
team: z.ZodString;
|
|
154
|
+
project: z.ZodString;
|
|
155
|
+
region: z.ZodString;
|
|
156
|
+
runtime: z.ZodString;
|
|
157
|
+
vcpus: z.ZodNumber;
|
|
158
|
+
base: z.ZodString;
|
|
159
|
+
baseRef: z.ZodString;
|
|
160
|
+
sandbox: z.ZodNullable<z.ZodString>;
|
|
161
|
+
sandboxUrl: z.ZodNullable<z.ZodString>;
|
|
162
|
+
keptUntil: z.ZodNullable<z.ZodString>;
|
|
163
|
+
keptMinutesLeft: z.ZodNullable<z.ZodNumber>;
|
|
164
|
+
snapshot: z.ZodNullable<z.ZodObject<{
|
|
165
|
+
id: z.ZodString;
|
|
166
|
+
base: z.ZodString;
|
|
167
|
+
built: z.ZodBoolean;
|
|
168
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
169
|
+
head: z.ZodNullable<z.ZodString>;
|
|
170
|
+
url: z.ZodString;
|
|
171
|
+
}, z.core.$strip>>;
|
|
172
|
+
save: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
173
|
+
kind: z.ZodLiteral<"saved">;
|
|
174
|
+
snapshotId: z.ZodString;
|
|
175
|
+
base: z.ZodString;
|
|
176
|
+
branch: z.ZodString;
|
|
177
|
+
head: z.ZodString;
|
|
178
|
+
ms: z.ZodNumber;
|
|
179
|
+
sizeBytes: z.ZodNumber;
|
|
180
|
+
entryWritten: z.ZodBoolean;
|
|
181
|
+
url: z.ZodString;
|
|
182
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
183
|
+
kind: z.ZodLiteral<"skipped">;
|
|
184
|
+
reason: z.ZodLiteral<"detached-head">;
|
|
185
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
186
|
+
kind: z.ZodLiteral<"failed">;
|
|
187
|
+
step: z.ZodEnum<{
|
|
188
|
+
"save-snapshot": "save-snapshot";
|
|
189
|
+
scrub: "scrub";
|
|
190
|
+
}>;
|
|
191
|
+
message: z.ZodString;
|
|
192
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
193
|
+
kind: z.ZodLiteral<"stopped">;
|
|
194
|
+
}, z.core.$strip>], "kind">>;
|
|
58
195
|
}, z.core.$strip>], "kind">>;
|
|
59
196
|
git: z.ZodNullable<z.ZodObject<{
|
|
60
197
|
branch: z.ZodNullable<z.ZodString>;
|
|
@@ -83,4 +220,20 @@ export declare function command(cmd: CommandBuilder<StormApp>): import("@vercel/
|
|
|
83
220
|
path: z.ZodString;
|
|
84
221
|
message: z.ZodString;
|
|
85
222
|
}, z.core.$strip>;
|
|
86
|
-
}
|
|
223
|
+
}, {
|
|
224
|
+
readonly runsUnreadable: {
|
|
225
|
+
readonly exitCode: 1;
|
|
226
|
+
readonly description: "storm couldn't read the run directories.";
|
|
227
|
+
readonly schema: z.ZodObject<{
|
|
228
|
+
path: z.ZodString;
|
|
229
|
+
message: z.ZodString;
|
|
230
|
+
}, z.core.$strip>;
|
|
231
|
+
readonly render: ({ path, message }: {
|
|
232
|
+
readonly path: string;
|
|
233
|
+
readonly message: string;
|
|
234
|
+
}) => {
|
|
235
|
+
message: string;
|
|
236
|
+
rows: (readonly ["Path", string])[];
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
}>>, StormApp, false>;
|
|
@@ -17,7 +17,7 @@ export function command(cmd) {
|
|
|
17
17
|
limit: z.number().int().min(1).default(DEFAULT_LIMIT),
|
|
18
18
|
branch: z.string().min(1).optional(),
|
|
19
19
|
}),
|
|
20
|
-
outcomes,
|
|
20
|
+
response: outcomes,
|
|
21
21
|
handler: async ({ app }, request) => {
|
|
22
22
|
const now = app.context.clock.now();
|
|
23
23
|
const listed = await app.context.runDirectories.list({ now });
|
|
@@ -41,8 +41,33 @@ export declare const outcomes: import("@vercel/clinkr").Outcomes<{
|
|
|
41
41
|
id: z.ZodString;
|
|
42
42
|
base: z.ZodString;
|
|
43
43
|
built: z.ZodBoolean;
|
|
44
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
45
|
+
head: z.ZodNullable<z.ZodString>;
|
|
44
46
|
url: z.ZodString;
|
|
45
47
|
}, z.core.$strip>>;
|
|
48
|
+
save: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
49
|
+
kind: z.ZodLiteral<"saved">;
|
|
50
|
+
snapshotId: z.ZodString;
|
|
51
|
+
base: z.ZodString;
|
|
52
|
+
branch: z.ZodString;
|
|
53
|
+
head: z.ZodString;
|
|
54
|
+
ms: z.ZodNumber;
|
|
55
|
+
sizeBytes: z.ZodNumber;
|
|
56
|
+
entryWritten: z.ZodBoolean;
|
|
57
|
+
url: z.ZodString;
|
|
58
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
59
|
+
kind: z.ZodLiteral<"skipped">;
|
|
60
|
+
reason: z.ZodLiteral<"detached-head">;
|
|
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">>;
|
|
46
71
|
}, z.core.$strip>], "kind">>;
|
|
47
72
|
git: z.ZodNullable<z.ZodObject<{
|
|
48
73
|
branch: z.ZodNullable<z.ZodString>;
|
|
@@ -71,4 +96,20 @@ export declare const outcomes: import("@vercel/clinkr").Outcomes<{
|
|
|
71
96
|
path: z.ZodString;
|
|
72
97
|
message: z.ZodString;
|
|
73
98
|
}, z.core.$strip>;
|
|
99
|
+
}, {
|
|
100
|
+
readonly runsUnreadable: {
|
|
101
|
+
readonly exitCode: 1;
|
|
102
|
+
readonly description: "storm couldn't read the run directories.";
|
|
103
|
+
readonly schema: z.ZodObject<{
|
|
104
|
+
path: z.ZodString;
|
|
105
|
+
message: z.ZodString;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
readonly render: ({ path, message }: {
|
|
108
|
+
readonly path: string;
|
|
109
|
+
readonly message: string;
|
|
110
|
+
}) => {
|
|
111
|
+
message: string;
|
|
112
|
+
rows: (readonly ["Path", string])[];
|
|
113
|
+
};
|
|
114
|
+
};
|
|
74
115
|
}>;
|
|
@@ -69,4 +69,266 @@ export declare function command(cmd: CommandBuilder<StormApp>): import("@vercel/
|
|
|
69
69
|
snapshot: "snapshot";
|
|
70
70
|
}>>;
|
|
71
71
|
}, z.core.$strip>;
|
|
72
|
-
}
|
|
72
|
+
}, {
|
|
73
|
+
readonly runsUnreadable: {
|
|
74
|
+
readonly exitCode: 1;
|
|
75
|
+
readonly description: "storm couldn't read the run directories.";
|
|
76
|
+
readonly schema: z.ZodObject<{
|
|
77
|
+
path: z.ZodString;
|
|
78
|
+
message: z.ZodString;
|
|
79
|
+
}, z.core.$strip>;
|
|
80
|
+
readonly render: ({ path, message }: {
|
|
81
|
+
readonly path: string;
|
|
82
|
+
readonly message: string;
|
|
83
|
+
}) => {
|
|
84
|
+
message: string;
|
|
85
|
+
rows: (readonly ["Path", string])[];
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
readonly runNotFound: {
|
|
89
|
+
readonly exitCode: 1;
|
|
90
|
+
readonly description: "No run directory has the id given: it was never a run on this machine, or it was removed.";
|
|
91
|
+
readonly schema: z.ZodObject<{
|
|
92
|
+
id: z.ZodString;
|
|
93
|
+
}, z.core.$strip>;
|
|
94
|
+
readonly render: ({ id }: {
|
|
95
|
+
readonly id: string;
|
|
96
|
+
}) => {
|
|
97
|
+
message: string;
|
|
98
|
+
next: {
|
|
99
|
+
type: "command";
|
|
100
|
+
argv: string[];
|
|
101
|
+
label: string;
|
|
102
|
+
}[];
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
readonly noRuns: {
|
|
106
|
+
readonly exitCode: 1;
|
|
107
|
+
readonly description: "Without an id, the scope has no run.";
|
|
108
|
+
readonly schema: z.ZodObject<{
|
|
109
|
+
scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
110
|
+
kind: z.ZodLiteral<"config">;
|
|
111
|
+
configFile: z.ZodString;
|
|
112
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
113
|
+
kind: z.ZodLiteral<"all">;
|
|
114
|
+
why: z.ZodEnum<{
|
|
115
|
+
flag: "flag";
|
|
116
|
+
"no-config-file": "no-config-file";
|
|
117
|
+
}>;
|
|
118
|
+
}, z.core.$strip>], "kind">;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
readonly render: ({ scope }: {
|
|
121
|
+
scope: {
|
|
122
|
+
kind: "config";
|
|
123
|
+
configFile: string;
|
|
124
|
+
} | {
|
|
125
|
+
kind: "all";
|
|
126
|
+
why: "flag" | "no-config-file";
|
|
127
|
+
};
|
|
128
|
+
}) => {
|
|
129
|
+
message: string;
|
|
130
|
+
next: {
|
|
131
|
+
type: "command";
|
|
132
|
+
argv: string[];
|
|
133
|
+
label: string;
|
|
134
|
+
}[];
|
|
135
|
+
} | {
|
|
136
|
+
message: string;
|
|
137
|
+
next: {
|
|
138
|
+
type: "text";
|
|
139
|
+
text: string;
|
|
140
|
+
}[];
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
readonly logNotFound: {
|
|
144
|
+
readonly exitCode: 1;
|
|
145
|
+
readonly description: "The run has no log for the step given: the step didn't run, or hasn't written output yet.";
|
|
146
|
+
readonly schema: z.ZodObject<{
|
|
147
|
+
id: z.ZodString;
|
|
148
|
+
step: z.ZodEnum<{
|
|
149
|
+
apply: "apply";
|
|
150
|
+
build: "build";
|
|
151
|
+
command: "command";
|
|
152
|
+
install: "install";
|
|
153
|
+
snapshot: "snapshot";
|
|
154
|
+
}>;
|
|
155
|
+
logs: z.ZodArray<z.ZodEnum<{
|
|
156
|
+
apply: "apply";
|
|
157
|
+
build: "build";
|
|
158
|
+
command: "command";
|
|
159
|
+
install: "install";
|
|
160
|
+
snapshot: "snapshot";
|
|
161
|
+
}>>;
|
|
162
|
+
}, z.core.$strip>;
|
|
163
|
+
readonly render: ({ id, step, logs }: {
|
|
164
|
+
id: string;
|
|
165
|
+
step: "apply" | "build" | "command" | "install" | "snapshot";
|
|
166
|
+
logs: ("apply" | "build" | "command" | "install" | "snapshot")[];
|
|
167
|
+
}) => {
|
|
168
|
+
message: string;
|
|
169
|
+
rows: (readonly ["Logs", string])[];
|
|
170
|
+
next: {
|
|
171
|
+
type: "command";
|
|
172
|
+
argv: string[];
|
|
173
|
+
label: string;
|
|
174
|
+
}[];
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
}>, import("@vercel/clinkr").OutcomeOf<import("@vercel/clinkr").Outcomes<{
|
|
178
|
+
printed: z.ZodObject<{
|
|
179
|
+
runId: z.ZodString;
|
|
180
|
+
step: z.ZodEnum<{
|
|
181
|
+
apply: "apply";
|
|
182
|
+
build: "build";
|
|
183
|
+
command: "command";
|
|
184
|
+
install: "install";
|
|
185
|
+
snapshot: "snapshot";
|
|
186
|
+
}>;
|
|
187
|
+
path: z.ZodString;
|
|
188
|
+
text: z.ZodString;
|
|
189
|
+
}, z.core.$strip>;
|
|
190
|
+
}, {
|
|
191
|
+
printed: unknown;
|
|
192
|
+
}, {
|
|
193
|
+
runsUnreadable: z.ZodObject<{
|
|
194
|
+
path: z.ZodString;
|
|
195
|
+
message: z.ZodString;
|
|
196
|
+
}, z.core.$strip>;
|
|
197
|
+
runNotFound: z.ZodObject<{
|
|
198
|
+
id: z.ZodString;
|
|
199
|
+
}, z.core.$strip>;
|
|
200
|
+
noRuns: z.ZodObject<{
|
|
201
|
+
scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
202
|
+
kind: z.ZodLiteral<"config">;
|
|
203
|
+
configFile: z.ZodString;
|
|
204
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
205
|
+
kind: z.ZodLiteral<"all">;
|
|
206
|
+
why: z.ZodEnum<{
|
|
207
|
+
flag: "flag";
|
|
208
|
+
"no-config-file": "no-config-file";
|
|
209
|
+
}>;
|
|
210
|
+
}, z.core.$strip>], "kind">;
|
|
211
|
+
}, z.core.$strip>;
|
|
212
|
+
logNotFound: z.ZodObject<{
|
|
213
|
+
id: z.ZodString;
|
|
214
|
+
step: z.ZodEnum<{
|
|
215
|
+
apply: "apply";
|
|
216
|
+
build: "build";
|
|
217
|
+
command: "command";
|
|
218
|
+
install: "install";
|
|
219
|
+
snapshot: "snapshot";
|
|
220
|
+
}>;
|
|
221
|
+
logs: z.ZodArray<z.ZodEnum<{
|
|
222
|
+
apply: "apply";
|
|
223
|
+
build: "build";
|
|
224
|
+
command: "command";
|
|
225
|
+
install: "install";
|
|
226
|
+
snapshot: "snapshot";
|
|
227
|
+
}>>;
|
|
228
|
+
}, z.core.$strip>;
|
|
229
|
+
}, {
|
|
230
|
+
readonly runsUnreadable: {
|
|
231
|
+
readonly exitCode: 1;
|
|
232
|
+
readonly description: "storm couldn't read the run directories.";
|
|
233
|
+
readonly schema: z.ZodObject<{
|
|
234
|
+
path: z.ZodString;
|
|
235
|
+
message: z.ZodString;
|
|
236
|
+
}, z.core.$strip>;
|
|
237
|
+
readonly render: ({ path, message }: {
|
|
238
|
+
readonly path: string;
|
|
239
|
+
readonly message: string;
|
|
240
|
+
}) => {
|
|
241
|
+
message: string;
|
|
242
|
+
rows: (readonly ["Path", string])[];
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
readonly runNotFound: {
|
|
246
|
+
readonly exitCode: 1;
|
|
247
|
+
readonly description: "No run directory has the id given: it was never a run on this machine, or it was removed.";
|
|
248
|
+
readonly schema: z.ZodObject<{
|
|
249
|
+
id: z.ZodString;
|
|
250
|
+
}, z.core.$strip>;
|
|
251
|
+
readonly render: ({ id }: {
|
|
252
|
+
readonly id: string;
|
|
253
|
+
}) => {
|
|
254
|
+
message: string;
|
|
255
|
+
next: {
|
|
256
|
+
type: "command";
|
|
257
|
+
argv: string[];
|
|
258
|
+
label: string;
|
|
259
|
+
}[];
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
readonly noRuns: {
|
|
263
|
+
readonly exitCode: 1;
|
|
264
|
+
readonly description: "Without an id, the scope has no run.";
|
|
265
|
+
readonly schema: z.ZodObject<{
|
|
266
|
+
scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
267
|
+
kind: z.ZodLiteral<"config">;
|
|
268
|
+
configFile: z.ZodString;
|
|
269
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
270
|
+
kind: z.ZodLiteral<"all">;
|
|
271
|
+
why: z.ZodEnum<{
|
|
272
|
+
flag: "flag";
|
|
273
|
+
"no-config-file": "no-config-file";
|
|
274
|
+
}>;
|
|
275
|
+
}, z.core.$strip>], "kind">;
|
|
276
|
+
}, z.core.$strip>;
|
|
277
|
+
readonly render: ({ scope }: {
|
|
278
|
+
scope: {
|
|
279
|
+
kind: "config";
|
|
280
|
+
configFile: string;
|
|
281
|
+
} | {
|
|
282
|
+
kind: "all";
|
|
283
|
+
why: "flag" | "no-config-file";
|
|
284
|
+
};
|
|
285
|
+
}) => {
|
|
286
|
+
message: string;
|
|
287
|
+
next: {
|
|
288
|
+
type: "command";
|
|
289
|
+
argv: string[];
|
|
290
|
+
label: string;
|
|
291
|
+
}[];
|
|
292
|
+
} | {
|
|
293
|
+
message: string;
|
|
294
|
+
next: {
|
|
295
|
+
type: "text";
|
|
296
|
+
text: string;
|
|
297
|
+
}[];
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
readonly logNotFound: {
|
|
301
|
+
readonly exitCode: 1;
|
|
302
|
+
readonly description: "The run has no log for the step given: the step didn't run, or hasn't written output yet.";
|
|
303
|
+
readonly schema: z.ZodObject<{
|
|
304
|
+
id: z.ZodString;
|
|
305
|
+
step: z.ZodEnum<{
|
|
306
|
+
apply: "apply";
|
|
307
|
+
build: "build";
|
|
308
|
+
command: "command";
|
|
309
|
+
install: "install";
|
|
310
|
+
snapshot: "snapshot";
|
|
311
|
+
}>;
|
|
312
|
+
logs: z.ZodArray<z.ZodEnum<{
|
|
313
|
+
apply: "apply";
|
|
314
|
+
build: "build";
|
|
315
|
+
command: "command";
|
|
316
|
+
install: "install";
|
|
317
|
+
snapshot: "snapshot";
|
|
318
|
+
}>>;
|
|
319
|
+
}, z.core.$strip>;
|
|
320
|
+
readonly render: ({ id, step, logs }: {
|
|
321
|
+
id: string;
|
|
322
|
+
step: "apply" | "build" | "command" | "install" | "snapshot";
|
|
323
|
+
logs: ("apply" | "build" | "command" | "install" | "snapshot")[];
|
|
324
|
+
}) => {
|
|
325
|
+
message: string;
|
|
326
|
+
rows: (readonly ["Logs", string])[];
|
|
327
|
+
next: {
|
|
328
|
+
type: "command";
|
|
329
|
+
argv: string[];
|
|
330
|
+
label: string;
|
|
331
|
+
}[];
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
}>>, StormApp, false>;
|