@cnc-tools/storm 0.7.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.
Files changed (113) hide show
  1. package/dist/build-info.js +1 -1
  2. package/dist/commands/exec/cleanup.d.ts +3 -3
  3. package/dist/commands/exec/cleanup.js +1 -1
  4. package/dist/commands/exec/command.d.ts +771 -1
  5. package/dist/commands/exec/command.js +1 -1
  6. package/dist/commands/exec/live-view.js +3 -2
  7. package/dist/commands/exec/metadata.d.ts +1 -1
  8. package/dist/commands/exec/metadata.js +4 -0
  9. package/dist/commands/exec/mint-failed.d.ts +28 -0
  10. package/dist/commands/exec/outcomes.d.ts +476 -0
  11. package/dist/commands/exec/progress.js +3 -5
  12. package/dist/commands/exec/run-command.d.ts +2 -2
  13. package/dist/commands/exec/run-metadata.d.ts +1 -1
  14. package/dist/commands/exec/run-metadata.js +1 -1
  15. package/dist/commands/exec/tests-summary.d.ts +1 -1
  16. package/dist/commands/exec/tests-summary.js +1 -1
  17. package/dist/commands/runs/list/command.d.ts +129 -1
  18. package/dist/commands/runs/list/command.js +1 -1
  19. package/dist/commands/runs/list/outcomes.d.ts +16 -0
  20. package/dist/commands/runs/logs/command.d.ts +263 -1
  21. package/dist/commands/runs/logs/command.js +1 -1
  22. package/dist/commands/runs/logs/outcomes.d.ts +105 -0
  23. package/dist/commands/runs/show/command.d.ts +329 -1
  24. package/dist/commands/runs/show/command.js +1 -1
  25. package/dist/commands/runs/show/outcomes.d.ts +71 -0
  26. package/dist/commands/vitest/command.d.ts +886 -1
  27. package/dist/commands/vitest/command.js +1 -1
  28. package/dist/commands/vitest/metadata.d.ts +1 -1
  29. package/dist/commands/vitest/metadata.js +4 -0
  30. package/dist/commands/vitest/outcomes.d.ts +295 -0
  31. package/dist/config/errors.d.ts +73 -0
  32. package/dist/config/schema.d.ts +1 -1
  33. package/dist/config-file/define.d.ts +4 -3
  34. package/dist/config-file/define.js +1 -1
  35. package/dist/config-file/toolchain.js +1 -1
  36. package/dist/core/command-slots.d.ts +8 -2
  37. package/dist/core/command-slots.js +6 -2
  38. package/dist/core/index.d.ts +1 -1
  39. package/dist/credential/index.d.ts +1 -0
  40. package/dist/credential/index.js +1 -0
  41. package/dist/credential/settle.d.ts +20 -0
  42. package/dist/credential/target.d.ts +6 -0
  43. package/dist/credential/target.js +7 -0
  44. package/dist/resources/github/command.d.ts +54 -2
  45. package/dist/resources/github/config.js +1 -1
  46. package/dist/resources/github/index.js +1 -1
  47. package/dist/resources/github/resource.js +2 -2
  48. package/dist/resources/testserver/command.d.ts +208 -10
  49. package/dist/resources/testserver/command.js +7 -0
  50. package/dist/resources/testserver/commands/create/command.d.ts +808 -1
  51. package/dist/resources/testserver/commands/create/command.js +64 -23
  52. package/dist/resources/testserver/commands/create/metadata.js +6 -2
  53. package/dist/resources/testserver/commands/create/outcomes.d.ts +347 -0
  54. package/dist/resources/testserver/commands/create/outcomes.js +14 -1
  55. package/dist/resources/testserver/commands/list/command.d.ts +84 -1
  56. package/dist/resources/testserver/commands/list/command.js +1 -1
  57. package/dist/resources/testserver/commands/list/outcomes.d.ts +16 -0
  58. package/dist/resources/testserver/config.js +14 -4
  59. package/dist/resources/testserver/events.d.ts +9 -0
  60. package/dist/resources/testserver/index.js +8 -7
  61. package/dist/resources/testserver/lane.js +1 -0
  62. package/dist/resources/testserver/live/gateways.d.ts +2 -0
  63. package/dist/resources/testserver/live/gateways.js +16 -3
  64. package/dist/resources/testserver/pool/channels.d.ts +5 -2
  65. package/dist/resources/testserver/pool/channels.js +1 -1
  66. package/dist/resources/testserver/pool/create.d.ts +6 -2
  67. package/dist/resources/testserver/pool/create.js +6 -5
  68. package/dist/resources/testserver/pool/index.d.ts +1 -0
  69. package/dist/resources/testserver/pool/index.js +1 -0
  70. package/dist/resources/testserver/pool/pull-request.d.ts +89 -0
  71. package/dist/resources/testserver/pool/pull-request.js +85 -0
  72. package/dist/resources/testserver/pr-build-facts.d.ts +130 -0
  73. package/dist/resources/testserver/pr-build-facts.js +261 -0
  74. package/dist/resources/testserver/presentation.d.ts +2 -2
  75. package/dist/resources/testserver/presentation.js +12 -3
  76. package/dist/resources/testserver/provider.d.ts +16 -6
  77. package/dist/resources/testserver/provider.js +46 -15
  78. package/dist/resources/testserver/pull-request/gateways.d.ts +117 -0
  79. package/dist/resources/testserver/pull-request/gateways.js +5 -0
  80. package/dist/resources/testserver/pull-request/index.d.ts +5 -0
  81. package/dist/resources/testserver/pull-request/index.js +6 -0
  82. package/dist/resources/testserver/pull-request/live/github-rest.d.ts +28 -0
  83. package/dist/resources/testserver/pull-request/live/github-rest.js +114 -0
  84. package/dist/resources/testserver/pull-request/live/github-token-gateway.d.ts +12 -0
  85. package/dist/resources/testserver/pull-request/live/github-token-gateway.js +39 -0
  86. package/dist/resources/testserver/pull-request/live/pull-request-gateway.d.ts +10 -0
  87. package/dist/resources/testserver/pull-request/live/pull-request-gateway.js +27 -0
  88. package/dist/resources/testserver/pull-request/live/testserver-workflow-gateway.d.ts +21 -0
  89. package/dist/resources/testserver/pull-request/live/testserver-workflow-gateway.js +64 -0
  90. package/dist/resources/testserver/ran.d.ts +5 -0
  91. package/dist/resources/testserver/ran.js +19 -3
  92. package/dist/resources/testserver/resource.d.ts +5 -1
  93. package/dist/resources/testserver/resource.js +2 -2
  94. package/dist/resources/testserver/sandbox/build-reference.d.ts +38 -0
  95. package/dist/resources/testserver/sandbox/build-reference.js +79 -0
  96. package/dist/resources/testserver/sandbox/index.d.ts +1 -0
  97. package/dist/resources/testserver/sandbox/index.js +1 -0
  98. package/dist/resources.d.ts +265 -15
  99. package/dist/sdk/index.js +2 -2
  100. package/dist/story/command-line.d.ts +34 -0
  101. package/dist/story/command-line.js +100 -0
  102. package/dist/story/index.d.ts +1 -0
  103. package/dist/story/index.js +3 -2
  104. package/dist/vercel-cli/context.js +1 -1
  105. package/dist/vercel-cli/index.js +1 -1
  106. package/dist/vitest/config.js +2 -2
  107. package/dist/vitest/fixtures.d.ts +1 -1
  108. package/dist/vitest/fixtures.js +1 -1
  109. package/dist/vitest/index.js +3 -3
  110. package/dist/vitest/plan.js +1 -1
  111. package/package.json +3 -3
  112. package/skills/overview.md +2 -0
  113. package/skills/testserver-builds.md +80 -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 (@cnc-tools/storm/vitest/config)";
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 (@cnc-tools/storm/vitest/config)";
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.
@@ -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
- }>, StormApp, false>;
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
  }>;
@@ -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
- }>, StormApp, false>;
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>;
@@ -17,7 +17,7 @@ export function command(cmd) {
17
17
  all: z.boolean().default(false),
18
18
  }),
19
19
  cli: { positionals: ["id"] },
20
- outcomes,
20
+ response: outcomes,
21
21
  handler: async ({ app }, request) => {
22
22
  const now = app.context.clock.now();
23
23
  let id = request.id;
@@ -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
  }>;