@cnc-tools/storm 0.7.0 → 0.8.1
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 +771 -1
- package/dist/commands/exec/command.js +1 -1
- package/dist/commands/exec/live-view.js +3 -2
- package/dist/commands/exec/metadata.d.ts +1 -1
- 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 +476 -0
- package/dist/commands/exec/progress.js +3 -5
- package/dist/commands/exec/run-command.d.ts +2 -2
- package/dist/commands/exec/run-metadata.d.ts +1 -1
- package/dist/commands/exec/run-metadata.js +1 -1
- package/dist/commands/exec/tests-summary.d.ts +1 -1
- package/dist/commands/exec/tests-summary.js +1 -1
- package/dist/commands/runs/facts.d.ts +2 -2
- package/dist/commands/runs/facts.js +1 -1
- package/dist/commands/runs/list/command.d.ts +129 -1
- package/dist/commands/runs/list/command.js +1 -1
- package/dist/commands/runs/list/outcomes.d.ts +16 -0
- package/dist/commands/runs/list/outcomes.js +1 -1
- 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/logs/outcomes.js +1 -1
- package/dist/commands/runs/show/command.d.ts +329 -1
- package/dist/commands/runs/show/command.js +1 -1
- package/dist/commands/runs/show/outcomes.d.ts +71 -0
- package/dist/commands/runs/show/outcomes.js +3 -3
- package/dist/commands/vitest/command.d.ts +886 -1
- package/dist/commands/vitest/command.js +1 -1
- package/dist/commands/vitest/metadata.d.ts +1 -1
- package/dist/commands/vitest/metadata.js +4 -0
- package/dist/commands/vitest/outcomes.d.ts +295 -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/index.d.ts +1 -1
- 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 +810 -1
- package/dist/resources/testserver/commands/create/command.js +73 -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 +11 -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 +9 -2
- package/dist/resources/testserver/pool/create.js +8 -5
- package/dist/resources/testserver/pool/gateways.d.ts +6 -0
- package/dist/resources/testserver/pool/index.d.ts +1 -0
- package/dist/resources/testserver/pool/index.js +1 -0
- package/dist/resources/testserver/pool/live/pool-records.js +6 -2
- package/dist/resources/testserver/pool/pull-request.d.ts +96 -0
- package/dist/resources/testserver/pool/pull-request.js +118 -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 +13 -3
- package/dist/resources/testserver/provider.d.ts +16 -6
- package/dist/resources/testserver/provider.js +55 -16
- 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/sdk/index.js +2 -2
- package/dist/story/command-line.d.ts +34 -0
- package/dist/story/command-line.js +100 -0
- package/dist/story/index.d.ts +1 -0
- package/dist/story/index.js +3 -2
- 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 +2 -3
- package/skills/overview.md +2 -0
- package/skills/testserver-builds.md +82 -0
|
@@ -26,7 +26,7 @@ export declare function incompleteText(message: string): string;
|
|
|
26
26
|
* What the tests line says in place of totals when the command's test runner reported attempts but no final results:
|
|
27
27
|
* the Vitest config lacks `stormReporter`, or a `--reporter` on vitest's command line replaced it.
|
|
28
28
|
*/
|
|
29
|
-
export declare const NO_FINAL_RESULTS = "no final test results: add stormReporter() to vitest.config's reporters (@
|
|
29
|
+
export declare const NO_FINAL_RESULTS = "no final test results: add stormReporter() to vitest.config's reporters (@vercel/storm/vitest/config)";
|
|
30
30
|
/**
|
|
31
31
|
* What the summary says about the tests, from `events`, of which `unreadable` lines held none, and `incomplete`, why the
|
|
32
32
|
* final read of the test events file failed.
|
|
@@ -28,7 +28,7 @@ export function incompleteText(message) {
|
|
|
28
28
|
* What the tests line says in place of totals when the command's test runner reported attempts but no final results:
|
|
29
29
|
* the Vitest config lacks `stormReporter`, or a `--reporter` on vitest's command line replaced it.
|
|
30
30
|
*/
|
|
31
|
-
export const NO_FINAL_RESULTS = "no final test results: add stormReporter() to vitest.config's reporters (@
|
|
31
|
+
export const NO_FINAL_RESULTS = "no final test results: add stormReporter() to vitest.config's reporters (@vercel/storm/vitest/config)";
|
|
32
32
|
/**
|
|
33
33
|
* What the summary says about the tests, from `events`, of which `unreadable` lines held none, and `incomplete`, why the
|
|
34
34
|
* final read of the test events file failed.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type StyledCell } from "@
|
|
2
|
-
import type { Intent } from "@
|
|
1
|
+
import { type StyledCell } from "@vercel/clinkr/vcli-kit";
|
|
2
|
+
import type { Intent } from "@vercel/clinkr/vcli-kit/theme";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import type { ListedRun, RunScope } from "./past-run.ts";
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// What `storm runs list`, `storm runs show` and `storm runs logs` report of a run, and the errors they
|
|
2
2
|
// share: shared schemas and the facts built from a past run, so the commands' JSON agree.
|
|
3
|
-
import { muted } from "@
|
|
3
|
+
import { muted } from "@vercel/clinkr/vcli-kit";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { RESOURCE_REPORTS } from "../../resources.js";
|
|
6
6
|
import { sandboxPage, snapshotPage } from "../dashboard.js";
|
|
@@ -108,4 +108,132 @@ export declare function command(cmd: CommandBuilder<StormApp>): import("@vercel/
|
|
|
108
108
|
path: z.ZodString;
|
|
109
109
|
message: z.ZodString;
|
|
110
110
|
}, z.core.$strip>;
|
|
111
|
-
}
|
|
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">>;
|
|
195
|
+
}, z.core.$strip>], "kind">>;
|
|
196
|
+
git: z.ZodNullable<z.ZodObject<{
|
|
197
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
198
|
+
commit: z.ZodString;
|
|
199
|
+
dirty: z.ZodBoolean;
|
|
200
|
+
}, z.core.$strip>>;
|
|
201
|
+
ended: z.ZodNullable<z.ZodObject<{
|
|
202
|
+
outcome: z.ZodString;
|
|
203
|
+
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
204
|
+
signal: z.ZodNullable<z.ZodString>;
|
|
205
|
+
ms: z.ZodNullable<z.ZodNumber>;
|
|
206
|
+
tests: z.ZodNullable<z.ZodObject<{
|
|
207
|
+
passed: z.ZodNumber;
|
|
208
|
+
failed: z.ZodNumber;
|
|
209
|
+
skipped: z.ZodNumber;
|
|
210
|
+
}, z.core.$strip>>;
|
|
211
|
+
testsIncomplete: z.ZodNullable<z.ZodString>;
|
|
212
|
+
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>>>>;
|
|
213
|
+
}, z.core.$strip>>;
|
|
214
|
+
}, z.core.$strip>>;
|
|
215
|
+
}, z.core.$strip>;
|
|
216
|
+
}, {
|
|
217
|
+
listed: unknown;
|
|
218
|
+
}, {
|
|
219
|
+
runsUnreadable: z.ZodObject<{
|
|
220
|
+
path: z.ZodString;
|
|
221
|
+
message: z.ZodString;
|
|
222
|
+
}, z.core.$strip>;
|
|
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 });
|
|
@@ -96,4 +96,20 @@ export declare const outcomes: import("@vercel/clinkr").Outcomes<{
|
|
|
96
96
|
path: z.ZodString;
|
|
97
97
|
message: z.ZodString;
|
|
98
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
|
+
};
|
|
99
115
|
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { muted, path, renderOutcome, status } from "@
|
|
1
|
+
import { muted, path, renderOutcome, status } from "@vercel/clinkr/vcli-kit";
|
|
2
2
|
import { defineOutcomes } from "@vercel/clinkr";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { branchText, commandText, exitText, exitTone, runnerCell, runFactsSchema, runsUnreadable, scopeSchema, scopeText, startedText, tookText, totalsText, totalsTone, } from "../facts.js";
|
|
@@ -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>;
|
|
@@ -52,4 +52,109 @@ export declare const outcomes: import("@vercel/clinkr").Outcomes<{
|
|
|
52
52
|
snapshot: "snapshot";
|
|
53
53
|
}>>;
|
|
54
54
|
}, z.core.$strip>;
|
|
55
|
+
}, {
|
|
56
|
+
readonly runsUnreadable: {
|
|
57
|
+
readonly exitCode: 1;
|
|
58
|
+
readonly description: "storm couldn't read the run directories.";
|
|
59
|
+
readonly schema: z.ZodObject<{
|
|
60
|
+
path: z.ZodString;
|
|
61
|
+
message: z.ZodString;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
readonly render: ({ path, message }: {
|
|
64
|
+
readonly path: string;
|
|
65
|
+
readonly message: string;
|
|
66
|
+
}) => {
|
|
67
|
+
message: string;
|
|
68
|
+
rows: (readonly ["Path", string])[];
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
readonly runNotFound: {
|
|
72
|
+
readonly exitCode: 1;
|
|
73
|
+
readonly description: "No run directory has the id given: it was never a run on this machine, or it was removed.";
|
|
74
|
+
readonly schema: z.ZodObject<{
|
|
75
|
+
id: z.ZodString;
|
|
76
|
+
}, z.core.$strip>;
|
|
77
|
+
readonly render: ({ id }: {
|
|
78
|
+
readonly id: string;
|
|
79
|
+
}) => {
|
|
80
|
+
message: string;
|
|
81
|
+
next: {
|
|
82
|
+
type: "command";
|
|
83
|
+
argv: string[];
|
|
84
|
+
label: string;
|
|
85
|
+
}[];
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
readonly noRuns: {
|
|
89
|
+
readonly exitCode: 1;
|
|
90
|
+
readonly description: "Without an id, the scope has no run.";
|
|
91
|
+
readonly schema: z.ZodObject<{
|
|
92
|
+
scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
93
|
+
kind: z.ZodLiteral<"config">;
|
|
94
|
+
configFile: z.ZodString;
|
|
95
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
96
|
+
kind: z.ZodLiteral<"all">;
|
|
97
|
+
why: z.ZodEnum<{
|
|
98
|
+
flag: "flag";
|
|
99
|
+
"no-config-file": "no-config-file";
|
|
100
|
+
}>;
|
|
101
|
+
}, z.core.$strip>], "kind">;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
readonly render: ({ scope }: {
|
|
104
|
+
scope: {
|
|
105
|
+
kind: "config";
|
|
106
|
+
configFile: string;
|
|
107
|
+
} | {
|
|
108
|
+
kind: "all";
|
|
109
|
+
why: "flag" | "no-config-file";
|
|
110
|
+
};
|
|
111
|
+
}) => {
|
|
112
|
+
message: string;
|
|
113
|
+
next: {
|
|
114
|
+
type: "command";
|
|
115
|
+
argv: string[];
|
|
116
|
+
label: string;
|
|
117
|
+
}[];
|
|
118
|
+
} | {
|
|
119
|
+
message: string;
|
|
120
|
+
next: {
|
|
121
|
+
type: "text";
|
|
122
|
+
text: string;
|
|
123
|
+
}[];
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
readonly logNotFound: {
|
|
127
|
+
readonly exitCode: 1;
|
|
128
|
+
readonly description: "The run has no log for the step given: the step didn't run, or hasn't written output yet.";
|
|
129
|
+
readonly schema: z.ZodObject<{
|
|
130
|
+
id: z.ZodString;
|
|
131
|
+
step: z.ZodEnum<{
|
|
132
|
+
apply: "apply";
|
|
133
|
+
build: "build";
|
|
134
|
+
command: "command";
|
|
135
|
+
install: "install";
|
|
136
|
+
snapshot: "snapshot";
|
|
137
|
+
}>;
|
|
138
|
+
logs: z.ZodArray<z.ZodEnum<{
|
|
139
|
+
apply: "apply";
|
|
140
|
+
build: "build";
|
|
141
|
+
command: "command";
|
|
142
|
+
install: "install";
|
|
143
|
+
snapshot: "snapshot";
|
|
144
|
+
}>>;
|
|
145
|
+
}, z.core.$strip>;
|
|
146
|
+
readonly render: ({ id, step, logs }: {
|
|
147
|
+
id: string;
|
|
148
|
+
step: "apply" | "build" | "command" | "install" | "snapshot";
|
|
149
|
+
logs: ("apply" | "build" | "command" | "install" | "snapshot")[];
|
|
150
|
+
}) => {
|
|
151
|
+
message: string;
|
|
152
|
+
rows: (readonly ["Logs", string])[];
|
|
153
|
+
next: {
|
|
154
|
+
type: "command";
|
|
155
|
+
argv: string[];
|
|
156
|
+
label: string;
|
|
157
|
+
}[];
|
|
158
|
+
};
|
|
159
|
+
};
|
|
55
160
|
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { renderOutcome } from "@
|
|
1
|
+
import { renderOutcome } from "@vercel/clinkr/vcli-kit";
|
|
2
2
|
import { defineOutcomes } from "@vercel/clinkr";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { LOG_STEPS, runNotFound, runsUnreadable, scopeSchema } from "../facts.js";
|