@cnc-tools/storm 0.10.0 → 0.11.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 +17 -9
- package/dist/build-info.js +1 -1
- package/dist/chunks/{chunk-YF3ICDBY.js → chunk-3ZZVZPMG.js} +1 -1
- package/dist/chunks/{chunk-JQ2HK4RN.js → chunk-4EU4AH7E.js} +141 -6
- package/dist/chunks/{chunk-ZJ2USLAT.js → chunk-4PRAB24Y.js} +2 -22
- package/dist/chunks/chunk-AMTYHUYB.js +257 -0
- package/dist/chunks/{chunk-WF4KJ7YG.js → chunk-ETCZ6WP7.js} +1 -1
- package/dist/chunks/chunk-FVMQKYTT.js +10 -0
- package/dist/chunks/{chunk-XHJGHJBW.js → chunk-GRMD7G4J.js} +33 -275
- package/dist/chunks/chunk-ICB4BZJX.js +22 -0
- package/dist/chunks/{chunk-AGWW3HDT.js → chunk-KR7WIYLG.js} +1826 -2201
- package/dist/chunks/{chunk-OVXD7GES.js → chunk-L4ZPMSKQ.js} +4 -37
- package/dist/chunks/chunk-NPPJ57W7.js +569 -0
- package/dist/chunks/{chunk-VJQLMGOH.js → chunk-O4BUT7BE.js} +361 -1716
- package/dist/chunks/chunk-OJOKQRM6.js +1457 -0
- package/dist/chunks/chunk-SLNKW4ZM.js +40 -0
- package/dist/chunks/{chunk-AKKNF3WZ.js → chunk-TRFEAYNC.js} +277 -348
- package/dist/chunks/chunk-VZZTHCBW.js +93 -0
- package/dist/chunks/chunk-WNIQA5J6.js +19 -0
- package/dist/chunks/chunk-WSIF7SR6.js +10 -0
- package/dist/chunks/{live-app-RIJM3QFD.js → live-app-LOGYUBKB.js} +52 -7
- package/dist/commands/exec/cleanup.d.ts +3 -3
- package/dist/commands/exec/cleanup.js +6 -2
- package/dist/commands/exec/command.d.ts +3 -3
- package/dist/commands/exec/command.js +17 -10
- package/dist/commands/exec/job-summary.d.ts +1 -1
- package/dist/commands/exec/job-summary.js +1 -1
- package/dist/commands/exec/live-view.js +5 -5
- package/dist/commands/exec/mint-failed.js +1 -1
- package/dist/commands/exec/outcomes.d.ts +2 -2
- package/dist/commands/exec/outcomes.js +7 -8
- package/dist/commands/exec/plan-run.d.ts +3 -5
- package/dist/commands/exec/progress.d.ts +3 -3
- package/dist/commands/exec/progress.js +6 -6
- package/dist/commands/exec/resource-refusals.d.ts +1 -1
- package/dist/commands/exec/resource-refusals.js +1 -1
- package/dist/commands/exec/run-command.d.ts +14 -9
- package/dist/commands/exec/run-command.js +91 -202
- package/dist/commands/exec/run-metadata.d.ts +2 -2
- package/dist/commands/exec/run-metadata.js +3 -3
- package/dist/commands/exec/test-plan.d.ts +1 -35
- package/dist/commands/exec/test-plan.js +4 -24
- package/dist/commands/exec/view.js +3 -3
- package/dist/commands/exec/waterfall.d.ts +3 -1
- package/dist/commands/exec/waterfall.js +18 -1
- package/dist/commands/runs/facts.d.ts +2 -1
- package/dist/commands/runs/facts.js +1 -1
- package/dist/commands/runs/list/command.js +10 -9
- package/dist/commands/runs/logs/command.js +14 -12
- package/dist/commands/runs/past-run.d.ts +3 -27
- package/dist/commands/runs/past-run.js +3 -37
- package/dist/commands/runs/show/command.js +24 -21
- package/dist/commands/runs/show/outcomes.js +2 -2
- package/dist/commands/vitest/command.d.ts +3 -3
- package/dist/commands/vitest/command.js +24 -17
- package/dist/commands/vitest/outcomes.d.ts +1 -1
- package/dist/commands/vitest/outcomes.js +1 -1
- package/dist/config/credential-resolver.d.ts +6 -3
- package/dist/config/credential-resolver.js +6 -5
- package/dist/context.d.ts +27 -9
- package/dist/context.js +19 -8
- package/dist/core/before-run.d.ts +5 -4
- package/dist/core/before-run.js +6 -6
- package/dist/core/definition-lookup.d.ts +22 -0
- package/dist/core/definition-lookup.js +34 -0
- package/dist/core/events.d.ts +5 -19
- package/dist/core/gateways.d.ts +22 -162
- package/dist/core/index.d.ts +10 -11
- package/dist/core/index.js +9 -11
- package/dist/core/launcher-supplies.js +2 -2
- package/dist/core/live/terminal-command-gateway.d.ts +8 -0
- package/dist/core/live/terminal-command-gateway.js +49 -0
- package/dist/core/presentations.d.ts +4 -3
- package/dist/core/presentations.js +4 -5
- package/dist/core/resource-registry.d.ts +35 -51
- package/dist/core/resource-registry.js +27 -54
- package/dist/core/resource-reports.d.ts +37 -4
- package/dist/core/resource-reports.js +34 -5
- package/dist/core/resources.d.ts +4 -3
- package/dist/core/resources.js +2 -4
- package/dist/core/run-state.d.ts +1 -1
- package/dist/core/run-state.js +1 -1
- package/dist/core/run.d.ts +19 -37
- package/dist/core/run.js +59 -114
- package/dist/core/timeline.js +2 -1
- package/dist/credential/events.d.ts +20 -0
- package/dist/credential/events.js +4 -0
- package/dist/credential/index.d.ts +2 -1
- package/dist/credential/index.js +6 -5
- package/dist/credential/source.d.ts +38 -26
- package/dist/credential/source.js +25 -34
- package/dist/extension-commands.d.ts +12 -6
- package/dist/extension-commands.js +18 -11
- package/dist/extensions/story/command-tree.d.ts +6 -0
- package/dist/extensions/story/command-tree.js +21 -0
- package/dist/extensions/story/commands/app.d.ts +23 -0
- package/dist/extensions/story/commands/app.js +5 -0
- package/dist/extensions/story/commands/run/command.d.ts +211 -0
- package/dist/extensions/story/commands/run/command.js +259 -0
- package/dist/extensions/story/commands/run/metadata.d.ts +4 -0
- package/dist/extensions/story/commands/run/metadata.js +8 -0
- package/dist/extensions/story/commands/run/outcomes.d.ts +101 -0
- package/dist/extensions/story/commands/run/outcomes.js +73 -0
- package/dist/extensions/story/commands/tree.d.ts +2 -0
- package/dist/extensions/story/commands/tree.js +6 -0
- package/dist/extensions/story/extension.d.ts +2 -0
- package/dist/extensions/story/extension.js +8 -0
- package/dist/extensions/testserver/command-tree.d.ts +1 -1
- package/dist/extensions/testserver/command-tree.js +0 -1
- package/dist/extensions/testserver/commands/pool/create/command.js +14 -8
- package/dist/extensions/testserver/commands/pool/list/command.js +8 -4
- package/dist/extensions/testserver/vitest/config.d.ts +7 -5
- package/dist/extensions/testserver/vitest/config.js +7 -5
- package/dist/extensions/testserver/vitest/fixtures.d.ts +2 -0
- package/dist/extensions/testserver/vitest/fixtures.js +36 -5
- package/dist/extensions.d.ts +12 -21
- package/dist/extensions.js +22 -34
- package/dist/forward-sigterm.d.ts +8 -0
- package/dist/forward-sigterm.js +18 -0
- package/dist/launcher-resolvers/index.d.ts +1 -0
- package/dist/launcher-resolvers/index.js +2 -1
- package/dist/launcher-resolvers/local-services.d.ts +57 -0
- package/dist/launcher-resolvers/local-services.js +7 -0
- package/dist/live-app.js +2 -1
- package/dist/local-services.d.ts +19 -0
- package/dist/local-services.js +37 -0
- package/dist/run-directory/gateways.d.ts +167 -0
- package/dist/run-directory/gateways.js +2 -0
- package/dist/run-directory/index.d.ts +8 -0
- package/dist/run-directory/index.js +13 -0
- package/dist/run-directory/plan.d.ts +35 -0
- package/dist/run-directory/plan.js +24 -0
- package/dist/run-directory/reader.d.ts +70 -0
- package/dist/run-directory/reader.js +51 -0
- package/dist/run-directory/recording.d.ts +92 -0
- package/dist/run-directory/recording.js +85 -0
- package/dist/{commands/exec → run-directory}/run-collector.d.ts +9 -8
- package/dist/{commands/exec → run-directory}/run-collector.js +8 -10
- package/dist/{core → run-directory}/run-directory.d.ts +3 -3
- package/dist/{core → run-directory}/run-directory.js +2 -2
- package/dist/{commands/exec → run-directory}/run-record.d.ts +29 -7
- package/dist/{commands/exec → run-directory}/run-record.js +79 -5
- package/dist/{commands/exec → run-directory}/timeline-facts.d.ts +4 -8
- package/dist/{commands/exec → run-directory}/timeline-facts.js +8 -24
- package/dist/runner/events.d.ts +6 -5
- package/dist/runner/index.d.ts +13 -17
- package/dist/runner/index.js +10 -14
- package/dist/runner/prepare.d.ts +28 -6
- package/dist/runner/prepare.js +15 -9
- package/dist/runner/recipe.d.ts +14 -0
- package/dist/runner/recipe.js +12 -0
- package/dist/runner/scope.d.ts +18 -11
- package/dist/runner/scope.js +12 -10
- package/dist/runner/session.d.ts +100 -0
- package/dist/runner/session.js +109 -0
- package/dist/runner/snapshot-save.d.ts +3 -2
- package/dist/runner/snapshot-save.js +6 -5
- package/dist/sdk/extension/ci.d.ts +2 -0
- package/dist/sdk/extension/ci.js +6 -0
- package/dist/sdk/extension/commands.d.ts +11 -13
- package/dist/sdk/extension/commands.js +5 -5
- package/dist/sdk/extension/index.d.ts +1 -0
- package/dist/sdk/extension/index.js +1 -0
- package/dist/sdk/extension/lifecycle.d.ts +4 -3
- package/dist/sdk/extension/progress.js +2 -2
- package/dist/sdk/extension/resource.js +1 -1
- package/dist/story/align.d.ts +1 -1
- package/dist/story/align.js +1 -1
- package/dist/story/command-line.d.ts +6 -16
- package/dist/story/command-line.js +11 -23
- package/dist/story/errors.d.ts +1 -1
- package/dist/story/errors.js +1 -1
- package/dist/story/host.d.ts +1 -1
- package/dist/story/host.js +2 -2
- package/dist/story/index.d.ts +2 -2
- package/dist/story/index.js +4 -3
- package/dist/story/launch.d.ts +70 -0
- package/dist/story/launch.js +77 -0
- package/dist/story/report.d.ts +2 -2
- package/dist/story/report.js +3 -4
- package/dist/story/settle.d.ts +7 -7
- package/dist/story/settle.js +5 -5
- package/dist/story/start.d.ts +2 -2
- package/dist/vendor/testserver-sdk/container/container.d.ts +11 -6
- package/dist/vendor/testserver-sdk/container/container.js +38 -16
- package/dist/vendor/testserver-sdk/testserver/failure.d.ts +4 -3
- package/dist/vendor/testserver-sdk/testserver/failure.js +4 -3
- package/package.json +1 -1
- package/skills/overview.md +3 -0
- package/skills/read-run-output.md +2 -2
- package/dist/chunks/chunk-H2VCSNVU.js +0 -351
- package/dist/chunks/chunk-J6ZNYUDV.js +0 -21
- package/dist/core/mint.d.ts +0 -10
- package/dist/core/mint.js +0 -14
- package/dist/story/mode.d.ts +0 -17
- package/dist/story/mode.js +0 -21
- /package/dist/{core → run-directory}/live/run-directory-gateway.d.ts +0 -0
- /package/dist/{core → run-directory}/live/run-directory-gateway.js +0 -0
|
@@ -1,38 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { PlanOption, TestPlanFacts } from "../../run-directory/index.ts";
|
|
2
2
|
import { type RunTestPlan } from "../../sdk/extension/index.ts";
|
|
3
|
-
declare const planOptionSchema: z.ZodObject<{
|
|
4
|
-
path: z.ZodString;
|
|
5
|
-
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
6
|
-
from: z.ZodEnum<{
|
|
7
|
-
default: "default";
|
|
8
|
-
file: "file";
|
|
9
|
-
flag: "flag";
|
|
10
|
-
}>;
|
|
11
|
-
}, z.core.$strip>;
|
|
12
|
-
/**
|
|
13
|
-
* One resource option whose default is a function of the planned run: its key path, value and where the value came
|
|
14
|
-
* from.
|
|
15
|
-
*/
|
|
16
|
-
export type PlanOption = Readonly<z.output<typeof planOptionSchema>>;
|
|
17
|
-
/** A run's test plan, as `vitest`'s `ran` outcome, `run.json` and `runs show` hold it. */
|
|
18
|
-
export declare const planSchema: z.ZodObject<{
|
|
19
|
-
tests: z.ZodNumber;
|
|
20
|
-
files: z.ZodNumber;
|
|
21
|
-
options: z.ZodArray<z.ZodObject<{
|
|
22
|
-
path: z.ZodString;
|
|
23
|
-
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
24
|
-
from: z.ZodEnum<{
|
|
25
|
-
default: "default";
|
|
26
|
-
file: "file";
|
|
27
|
-
flag: "flag";
|
|
28
|
-
}>;
|
|
29
|
-
}, z.core.$strip>>;
|
|
30
|
-
}, z.core.$strip>;
|
|
31
|
-
/**
|
|
32
|
-
* A run's test plan: how many tests `vitest list` counted, in how many files, and each resource option whose default is
|
|
33
|
-
* a function of the planned run, with its value and where that came from.
|
|
34
|
-
*/
|
|
35
|
-
export type TestPlanFacts = Readonly<z.output<typeof planSchema>>;
|
|
36
3
|
/** The plan a run records: with a counted test plan, its counts and `options`; none for a run that counted nothing. */
|
|
37
4
|
export declare function recordedPlan(testPlan: RunTestPlan, options: readonly PlanOption[]): TestPlanFacts | undefined;
|
|
38
5
|
/**
|
|
@@ -42,4 +9,3 @@ export declare function recordedPlan(testPlan: RunTestPlan, options: readonly Pl
|
|
|
42
9
|
export declare function testPlanLine(plan: TestPlanFacts): string;
|
|
43
10
|
/** The plan as a phrase: `65 tests in 19 files; resources.<key>.<option> 5 (--<prefix>-<option>)`. */
|
|
44
11
|
export declare function testPlanText(plan: TestPlanFacts): string;
|
|
45
|
-
export {};
|
|
@@ -1,31 +1,11 @@
|
|
|
1
|
-
// A run's test plan as storm says
|
|
2
|
-
//
|
|
3
|
-
// `
|
|
4
|
-
|
|
1
|
+
// A run's test plan as storm says it: what `vitest` counted before the run, and each resource option whose default is a
|
|
2
|
+
// function of the planned run, with its value and where that came from. `vitest`'s `ran` outcome, `run.json` and
|
|
3
|
+
// `runs show` share its shape, which the run directory module declares (`run-directory/plan.ts`), and `vitest`'s line
|
|
4
|
+
// before the run and `runs show`'s row its text.
|
|
5
5
|
import { CONFIG_FILE_NAME } from "../../config/index.js";
|
|
6
6
|
import { optionKeyPath } from "../../sdk/extension/index.js";
|
|
7
7
|
import { formatPlan } from "../../vitest/plan.js";
|
|
8
8
|
import { RESOURCE_FLAGS } from "./resource-flags.js";
|
|
9
|
-
const planOptionSchema = z.object({
|
|
10
|
-
/** The option's key path, `resources.<key>.<option>`, under its resource key. */
|
|
11
|
-
path: z.string(),
|
|
12
|
-
/** Its value. */
|
|
13
|
-
value: z.union([z.string(), z.number(), z.boolean()]),
|
|
14
|
-
/** Where the value came from: its flag (`flag`), storm.config.ts (`file`), or its default, given the test plan (`default`). */
|
|
15
|
-
from: z.enum(["flag", "file", "default"]),
|
|
16
|
-
});
|
|
17
|
-
/** A run's test plan, as `vitest`'s `ran` outcome, `run.json` and `runs show` hold it. */
|
|
18
|
-
export const planSchema = z.object({
|
|
19
|
-
/** How many tests `vitest list --json <args>` counted. */
|
|
20
|
-
tests: z.number().int().nonnegative(),
|
|
21
|
-
/** How many distinct test files they are in. */
|
|
22
|
-
files: z.number().int().nonnegative(),
|
|
23
|
-
/**
|
|
24
|
-
* Each resource option whose default is a function of the test plan, with its value and where that came from; empty
|
|
25
|
-
* when the run has none.
|
|
26
|
-
*/
|
|
27
|
-
options: z.array(planOptionSchema),
|
|
28
|
-
});
|
|
29
9
|
/** The plan a run records: with a counted test plan, its counts and `options`; none for a run that counted nothing. */
|
|
30
10
|
export function recordedPlan(testPlan, options) {
|
|
31
11
|
return testPlan.kind === "counted"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// on a terminal. Each view also says where the command's output goes, wherever the command runs, so the live region is
|
|
3
3
|
// the one writer on the terminal.
|
|
4
4
|
import { EMPTY_RUN_STATE, } from "../../core/index.js";
|
|
5
|
-
import {
|
|
5
|
+
import { REGISTRY } from "../../extensions.js";
|
|
6
6
|
import { activePhase, headerLine, phaseFrame, phaseRecord } from "./live-view.js";
|
|
7
7
|
import { branchSnapshotSaveText, branchSnapshotsDropText, cacheWriteFailureText, lineProgress, preparedNoteTexts, progressLine, resourceWarningText, skippedText, } from "./progress.js";
|
|
8
8
|
import { paint } from "./text.js";
|
|
@@ -89,7 +89,7 @@ function liveView(context, colors, options) {
|
|
|
89
89
|
observe: async (timed) => {
|
|
90
90
|
if (finished)
|
|
91
91
|
return;
|
|
92
|
-
state =
|
|
92
|
+
state = REGISTRY.applyEvent(state, timed);
|
|
93
93
|
const next = activePhase(state);
|
|
94
94
|
if (next !== phase) {
|
|
95
95
|
print([
|
|
@@ -140,7 +140,7 @@ function noticeLines(timed, origin, verbose) {
|
|
|
140
140
|
case "runner":
|
|
141
141
|
return runnerNoticeLines(event.event, line);
|
|
142
142
|
case "resource":
|
|
143
|
-
return
|
|
143
|
+
return REGISTRY.presentations.notices(event, { verbose }).map(({ lane, text }) => line(lane, text));
|
|
144
144
|
// A line a resource instance reported prints as it is, in its lane, and a warning marked as one.
|
|
145
145
|
case "resource-notice":
|
|
146
146
|
return [line(event.lane, event.text)];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { TimelineFacts } from "../../run-directory/index.ts";
|
|
1
2
|
import { type Paint } from "./text.ts";
|
|
2
|
-
import { type TimelineFacts } from "./timeline-facts.ts";
|
|
3
3
|
import { type WorkerLane } from "./worker-chart.ts";
|
|
4
4
|
/** What the waterfall says beside the timeline. */
|
|
5
5
|
export interface WaterfallExtras {
|
|
@@ -14,5 +14,7 @@ export interface WaterfallExtras {
|
|
|
14
14
|
/** How bars are painted: the critical path's stand out, the idle stretch and the axis are faint. */
|
|
15
15
|
readonly paint?: Paint;
|
|
16
16
|
}
|
|
17
|
+
/** A critical path step: its row's label, and for the runner what it did with its runner snapshot. */
|
|
18
|
+
export declare function criticalPathStep(step: TimelineFacts["criticalPath"][number], timeline: TimelineFacts): string;
|
|
17
19
|
/** The waterfall's lines for `timeline`. */
|
|
18
20
|
export declare function waterfallLines(timeline: TimelineFacts, extras: WaterfallExtras): string[];
|
|
@@ -1,9 +1,26 @@
|
|
|
1
1
|
// The waterfall a run prints once it is done: a time axis, one bar for each lane, the worker chart under the tests
|
|
2
2
|
// lane, the critical path, and where the run directory is. It reads the same with or without color, at 80 columns.
|
|
3
3
|
import { sameRow } from "../../core/index.js";
|
|
4
|
+
import { REGISTRY } from "../../extensions.js";
|
|
4
5
|
import { paint as paintFor, seconds, visibleLength } from "./text.js";
|
|
5
|
-
import { criticalPathStep, LANE_LABELS } from "./timeline-facts.js";
|
|
6
6
|
import { workerLabelWidth, workerLaneLines, workerTailWidth } from "./worker-chart.js";
|
|
7
|
+
/**
|
|
8
|
+
* The labels of the core's lanes, which the waterfall's label column always makes room for, with each resource lane's
|
|
9
|
+
* label, so it lines up the same from run to run.
|
|
10
|
+
*/
|
|
11
|
+
const LANE_LABELS = [
|
|
12
|
+
"credential",
|
|
13
|
+
"runner-setup",
|
|
14
|
+
"tests",
|
|
15
|
+
"cleanup",
|
|
16
|
+
...REGISTRY.presentations.laneKinds.map(({ label }) => label),
|
|
17
|
+
];
|
|
18
|
+
/** A critical path step: its row's label, and for the runner what it did with its runner snapshot. */
|
|
19
|
+
export function criticalPathStep(step, timeline) {
|
|
20
|
+
const row = timeline.rows.find((candidate) => sameRow(candidate, step));
|
|
21
|
+
const label = row?.label ?? step.name;
|
|
22
|
+
return row?.snapshot === undefined ? label : `${label} (snapshot ${row.snapshot})`;
|
|
23
|
+
}
|
|
7
24
|
/**
|
|
8
25
|
* The label column: a space, the widest lane label, such as `runner-setup`, and a space; wider for a worker's
|
|
9
26
|
* label, or for a past run's lane whose label is wider than any lane storm draws now.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type StyledCell } from "@vercel/clinkr/vcli-kit";
|
|
2
2
|
import type { Intent } from "@vercel/clinkr/vcli-kit/theme";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
import type { ListedRun
|
|
4
|
+
import type { ListedRun } from "../../run-directory/index.ts";
|
|
5
|
+
import type { RunScope } from "./past-run.ts";
|
|
5
6
|
/**
|
|
6
7
|
* The run logs `runs logs` prints and `runs show` names: the command log (`command`), then each step's, in the order a
|
|
7
8
|
* person looks for them.
|
|
@@ -79,7 +79,7 @@ export const runFactsSchema = z.object({
|
|
|
79
79
|
url: z.string(),
|
|
80
80
|
})
|
|
81
81
|
.nullable(),
|
|
82
|
-
/** How saving the runner sandbox as a branch snapshot ended
|
|
82
|
+
/** How saving the runner sandbox as a branch snapshot ended, 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 when the run started no save. */
|
|
83
83
|
save: z
|
|
84
84
|
.discriminatedUnion("kind", [
|
|
85
85
|
z.object({
|
|
@@ -21,20 +21,21 @@ import {
|
|
|
21
21
|
tookText,
|
|
22
22
|
totalsText,
|
|
23
23
|
totalsTone
|
|
24
|
-
} from "../../../chunks/chunk-
|
|
25
|
-
import "../../../chunks/chunk-
|
|
26
|
-
import
|
|
24
|
+
} from "../../../chunks/chunk-L4ZPMSKQ.js";
|
|
25
|
+
import "../../../chunks/chunk-VZZTHCBW.js";
|
|
26
|
+
import {
|
|
27
|
+
pastRuns
|
|
28
|
+
} from "../../../chunks/chunk-KR7WIYLG.js";
|
|
27
29
|
import {
|
|
28
30
|
findConfigFile
|
|
29
|
-
} from "../../../chunks/chunk-
|
|
30
|
-
import "../../../chunks/chunk-
|
|
31
|
+
} from "../../../chunks/chunk-O4BUT7BE.js";
|
|
32
|
+
import "../../../chunks/chunk-AMTYHUYB.js";
|
|
31
33
|
import {
|
|
32
34
|
stormCommands
|
|
33
|
-
} from "../../../chunks/chunk-
|
|
34
|
-
import "../../../chunks/chunk-J6ZNYUDV.js";
|
|
35
|
+
} from "../../../chunks/chunk-3ZZVZPMG.js";
|
|
35
36
|
import {
|
|
36
37
|
defineOutcomes
|
|
37
|
-
} from "../../../chunks/chunk-
|
|
38
|
+
} from "../../../chunks/chunk-4PRAB24Y.js";
|
|
38
39
|
|
|
39
40
|
// src/commands/runs/list/command.ts
|
|
40
41
|
import { z as z2 } from "zod";
|
|
@@ -127,7 +128,7 @@ var command_default = stormCommands.define({
|
|
|
127
128
|
response: outcomes,
|
|
128
129
|
handler: async ({ app }, request) => {
|
|
129
130
|
const now = app.context.clock.now();
|
|
130
|
-
const listed = await app.context.runDirectories.list({ now });
|
|
131
|
+
const listed = await pastRuns(app.context.runDirectories).list({ now });
|
|
131
132
|
if (!listed.ok) return outcomes.runsUnreadable({ ...listed.failure });
|
|
132
133
|
const scope = runScope(request.all, await findConfigFile(app.context.config, app.cwd));
|
|
133
134
|
const runs = onBranch(runsInScope(listed.runs, scope), request.branch);
|
|
@@ -8,20 +8,21 @@ import {
|
|
|
8
8
|
runsUnreadable,
|
|
9
9
|
scopeFacts,
|
|
10
10
|
scopeSchema
|
|
11
|
-
} from "../../../chunks/chunk-
|
|
12
|
-
import "../../../chunks/chunk-
|
|
13
|
-
import
|
|
11
|
+
} from "../../../chunks/chunk-L4ZPMSKQ.js";
|
|
12
|
+
import "../../../chunks/chunk-VZZTHCBW.js";
|
|
13
|
+
import {
|
|
14
|
+
pastRuns
|
|
15
|
+
} from "../../../chunks/chunk-KR7WIYLG.js";
|
|
14
16
|
import {
|
|
15
17
|
findConfigFile
|
|
16
|
-
} from "../../../chunks/chunk-
|
|
17
|
-
import "../../../chunks/chunk-
|
|
18
|
+
} from "../../../chunks/chunk-O4BUT7BE.js";
|
|
19
|
+
import "../../../chunks/chunk-AMTYHUYB.js";
|
|
18
20
|
import {
|
|
19
21
|
stormCommands
|
|
20
|
-
} from "../../../chunks/chunk-
|
|
21
|
-
import "../../../chunks/chunk-J6ZNYUDV.js";
|
|
22
|
+
} from "../../../chunks/chunk-3ZZVZPMG.js";
|
|
22
23
|
import {
|
|
23
24
|
defineOutcomes
|
|
24
|
-
} from "../../../chunks/chunk-
|
|
25
|
+
} from "../../../chunks/chunk-4PRAB24Y.js";
|
|
25
26
|
|
|
26
27
|
// src/commands/runs/logs/command.ts
|
|
27
28
|
import { z as z2 } from "zod";
|
|
@@ -111,22 +112,23 @@ var command_default = stormCommands.define({
|
|
|
111
112
|
response: outcomes,
|
|
112
113
|
handler: async ({ app }, request) => {
|
|
113
114
|
const now = app.context.clock.now();
|
|
115
|
+
const runs = pastRuns(app.context.runDirectories);
|
|
114
116
|
let id = request.id;
|
|
115
117
|
if (id === void 0) {
|
|
116
|
-
const listed = await
|
|
118
|
+
const listed = await runs.list({ now });
|
|
117
119
|
if (!listed.ok) return outcomes.runsUnreadable({ ...listed.failure });
|
|
118
120
|
const scope = runScope(request.all, await findConfigFile(app.context.config, app.cwd));
|
|
119
121
|
const run = newest(runsInScope(listed.runs, scope));
|
|
120
122
|
if (run === void 0) return outcomes.noRuns({ scope: scopeFacts(scope) });
|
|
121
123
|
id = run.id;
|
|
122
124
|
}
|
|
123
|
-
const read = await
|
|
125
|
+
const read = await runs.read({ id, now });
|
|
124
126
|
if (read.kind === "failed") return outcomes.runsUnreadable({ ...read.failure });
|
|
125
127
|
if (read.kind === "not-found") return outcomes.runNotFound({ id });
|
|
126
|
-
const logs = LOG_STEPS.filter((
|
|
128
|
+
const logs = LOG_STEPS.filter((step) => read.run.logs.some(({ log: log2 }) => log2 === step));
|
|
127
129
|
const notFound = () => outcomes.logNotFound({ id, step: request.step, logs: [...logs] });
|
|
128
130
|
if (!logs.includes(request.step)) return notFound();
|
|
129
|
-
const log = await
|
|
131
|
+
const log = await runs.readLog({ id, log: request.step });
|
|
130
132
|
if (log.kind === "failed") return outcomes.runsUnreadable({ ...log.failure });
|
|
131
133
|
if (log.kind === "not-found") return notFound();
|
|
132
134
|
return outcomes.printed({ runId: id, step: request.step, path: log.path, text: log.text });
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
3
|
-
import { type RunRecord } from "../exec/run-record.ts";
|
|
4
|
-
import { type TimelineFacts } from "../exec/timeline-facts.ts";
|
|
1
|
+
import type { ListedRun } from "../../run-directory/index.ts";
|
|
2
|
+
import type { TestEvent, TestResultEvent } from "../../sdk/run/launcher.ts";
|
|
5
3
|
/**
|
|
6
4
|
* Which runs a command sees: those of the config file `storm.config.ts` the working directory finds, or every run,
|
|
7
5
|
* by `--all` or because no config file was found.
|
|
@@ -15,18 +13,11 @@ export type RunScope = {
|
|
|
15
13
|
};
|
|
16
14
|
/** The scope for `--all` and the config file found from the working directory, if any. */
|
|
17
15
|
export declare function runScope(all: boolean, configFile: string | undefined): RunScope;
|
|
18
|
-
/** A listed run directory with what its `run.json` records; `record` undefined when it has none it can read. */
|
|
19
|
-
export interface ListedRun {
|
|
20
|
-
readonly id: string;
|
|
21
|
-
readonly path: string;
|
|
22
|
-
readonly active: boolean;
|
|
23
|
-
readonly record: RunRecord | undefined;
|
|
24
|
-
}
|
|
25
16
|
/**
|
|
26
17
|
* The runs in `scope`, newest first, as `listed` holds them. A run of another config file, or whose `run.json` can't be
|
|
27
18
|
* read, such as one an older storm wrote, is only in the `all` scope.
|
|
28
19
|
*/
|
|
29
|
-
export declare function runsInScope(listed: readonly
|
|
20
|
+
export declare function runsInScope(listed: readonly ListedRun[], scope: RunScope): readonly ListedRun[];
|
|
30
21
|
/**
|
|
31
22
|
* The runs in `runs` that started on branch `branch`, by their `run.json`; all of them when `branch` is undefined. A
|
|
32
23
|
* run on a detached HEAD, outside a Git checkout, or whose `run.json` can't be read is on no branch.
|
|
@@ -39,21 +30,6 @@ export declare function onBranch(runs: readonly ListedRun[], branch: string | un
|
|
|
39
30
|
export declare function newestFinished(runs: readonly ListedRun[]): ListedRun | undefined;
|
|
40
31
|
/** The newest run in `runs`, whether it has finished or is still going; undefined when there is none. */
|
|
41
32
|
export declare function newest(runs: readonly ListedRun[]): ListedRun | undefined;
|
|
42
|
-
/**
|
|
43
|
-
* A past run read whole: its listing and record; its tests' final results, from its `tests.jsonl`, which storm
|
|
44
|
-
* writes only once the run is over and only redacted, with how many lines held no test event; and its timeline's
|
|
45
|
-
* facts, when it parses, which the waterfall draws as they are.
|
|
46
|
-
*/
|
|
47
|
-
export interface PastRun extends ListedRun {
|
|
48
|
-
/** Whether its test results were saved: it finished, so its `tests.jsonl` exists. */
|
|
49
|
-
readonly finished: boolean;
|
|
50
|
-
/** Its test events, in the order its `tests.jsonl` holds them; empty unless `finished`. */
|
|
51
|
-
readonly events: readonly TestEvent[];
|
|
52
|
-
readonly unreadableTestLines: number;
|
|
53
|
-
readonly timeline: TimelineFacts | undefined;
|
|
54
|
-
}
|
|
55
|
-
/** `directory` as a past run. */
|
|
56
|
-
export declare function pastRun(directory: PastRunDirectory): PastRun;
|
|
57
33
|
/** The final results among `events`, one per test, in order. */
|
|
58
34
|
export declare function finalResults(events: readonly TestEvent[]): TestResultEvent[];
|
|
59
35
|
/**
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
// what the run directory gateway read. Files it can't read, or from an older storm, leave facts unknown, never
|
|
4
|
-
// an error.
|
|
5
|
-
import { parseTestEvent } from "../../sdk/run/launcher.js";
|
|
6
|
-
import { parseRunRecord } from "../exec/run-record.js";
|
|
7
|
-
import { timelineSchema } from "../exec/timeline-facts.js";
|
|
1
|
+
// Which past runs a `storm runs` command sees, and which of a run's tests it selects. Pure: the commands hand it what
|
|
2
|
+
// the run directory module's reader read (`pastRuns`, `run-directory/`).
|
|
8
3
|
/** The scope for `--all` and the config file found from the working directory, if any. */
|
|
9
4
|
export function runScope(all, configFile) {
|
|
10
5
|
if (all)
|
|
@@ -18,8 +13,7 @@ export function runScope(all, configFile) {
|
|
|
18
13
|
* read, such as one an older storm wrote, is only in the `all` scope.
|
|
19
14
|
*/
|
|
20
15
|
export function runsInScope(listed, scope) {
|
|
21
|
-
|
|
22
|
-
return scope.kind === "all" ? runs : runs.filter(({ record }) => record?.configFile === scope.configFile);
|
|
16
|
+
return scope.kind === "all" ? listed : listed.filter(({ record }) => record?.configFile === scope.configFile);
|
|
23
17
|
}
|
|
24
18
|
/**
|
|
25
19
|
* The runs in `runs` that started on branch `branch`, by their `run.json`; all of them when `branch` is undefined. A
|
|
@@ -39,20 +33,6 @@ export function newestFinished(runs) {
|
|
|
39
33
|
export function newest(runs) {
|
|
40
34
|
return runs[0];
|
|
41
35
|
}
|
|
42
|
-
/** `directory` as a past run. */
|
|
43
|
-
export function pastRun(directory) {
|
|
44
|
-
const parsed = (directory.tests ?? []).map(parseTestEvent);
|
|
45
|
-
return {
|
|
46
|
-
id: directory.id,
|
|
47
|
-
path: directory.path,
|
|
48
|
-
active: directory.active,
|
|
49
|
-
record: parseRunRecord(directory.run),
|
|
50
|
-
finished: directory.tests !== undefined,
|
|
51
|
-
events: parsed.filter((event) => event !== undefined),
|
|
52
|
-
unreadableTestLines: parsed.filter((event) => event === undefined).length,
|
|
53
|
-
timeline: parseTimeline(directory.timeline),
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
36
|
/** The final results among `events`, one per test, in order. */
|
|
57
37
|
export function finalResults(events) {
|
|
58
38
|
return events.flatMap((event) => (event.kind === "test-result" ? [event] : []));
|
|
@@ -68,17 +48,3 @@ export function selected(result, filters) {
|
|
|
68
48
|
return false;
|
|
69
49
|
return true;
|
|
70
50
|
}
|
|
71
|
-
/** `timeline.json`'s text as timeline facts; undefined when there is none, or it doesn't parse. */
|
|
72
|
-
function parseTimeline(text) {
|
|
73
|
-
if (text === undefined)
|
|
74
|
-
return undefined;
|
|
75
|
-
let json;
|
|
76
|
-
try {
|
|
77
|
-
json = JSON.parse(text);
|
|
78
|
-
}
|
|
79
|
-
catch {
|
|
80
|
-
return undefined;
|
|
81
|
-
}
|
|
82
|
-
const parsed = timelineSchema.safeParse(json);
|
|
83
|
-
return parsed.success ? parsed.data : undefined;
|
|
84
|
-
}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
|
+
testPlanText,
|
|
2
3
|
waterfallLines
|
|
3
|
-
} from "../../../chunks/chunk-
|
|
4
|
+
} from "../../../chunks/chunk-4EU4AH7E.js";
|
|
5
|
+
import "../../../chunks/chunk-NPPJ57W7.js";
|
|
6
|
+
import "../../../chunks/chunk-OJOKQRM6.js";
|
|
7
|
+
import "../../../chunks/chunk-GRMD7G4J.js";
|
|
8
|
+
import "../../../chunks/chunk-SLNKW4ZM.js";
|
|
9
|
+
import "../../../chunks/chunk-WSIF7SR6.js";
|
|
10
|
+
import "../../../chunks/chunk-FVMQKYTT.js";
|
|
11
|
+
import "../../../chunks/chunk-ICB4BZJX.js";
|
|
4
12
|
import {
|
|
5
13
|
LOG_STEPS,
|
|
6
14
|
bold,
|
|
@@ -13,7 +21,6 @@ import {
|
|
|
13
21
|
keptText,
|
|
14
22
|
newestFinished,
|
|
15
23
|
paint,
|
|
16
|
-
pastRun,
|
|
17
24
|
runFacts,
|
|
18
25
|
runFactsSchema,
|
|
19
26
|
runNotFound,
|
|
@@ -27,27 +34,25 @@ import {
|
|
|
27
34
|
tookText,
|
|
28
35
|
totalsText,
|
|
29
36
|
totalsTone
|
|
30
|
-
} from "../../../chunks/chunk-
|
|
37
|
+
} from "../../../chunks/chunk-L4ZPMSKQ.js";
|
|
38
|
+
import {
|
|
39
|
+
short
|
|
40
|
+
} from "../../../chunks/chunk-VZZTHCBW.js";
|
|
31
41
|
import {
|
|
42
|
+
pastRuns,
|
|
32
43
|
planSchema,
|
|
33
|
-
testPlanText,
|
|
34
44
|
timelineSchema
|
|
35
|
-
} from "../../../chunks/chunk-
|
|
36
|
-
import {
|
|
37
|
-
runLogFile,
|
|
38
|
-
short
|
|
39
|
-
} from "../../../chunks/chunk-AGWW3HDT.js";
|
|
45
|
+
} from "../../../chunks/chunk-KR7WIYLG.js";
|
|
40
46
|
import {
|
|
41
47
|
findConfigFile
|
|
42
|
-
} from "../../../chunks/chunk-
|
|
43
|
-
import "../../../chunks/chunk-
|
|
48
|
+
} from "../../../chunks/chunk-O4BUT7BE.js";
|
|
49
|
+
import "../../../chunks/chunk-AMTYHUYB.js";
|
|
44
50
|
import {
|
|
45
51
|
stormCommands
|
|
46
|
-
} from "../../../chunks/chunk-
|
|
47
|
-
import "../../../chunks/chunk-J6ZNYUDV.js";
|
|
52
|
+
} from "../../../chunks/chunk-3ZZVZPMG.js";
|
|
48
53
|
import {
|
|
49
54
|
defineOutcomes
|
|
50
|
-
} from "../../../chunks/chunk-
|
|
55
|
+
} from "../../../chunks/chunk-4PRAB24Y.js";
|
|
51
56
|
|
|
52
57
|
// src/commands/runs/show/command.ts
|
|
53
58
|
import { z as z2 } from "zod";
|
|
@@ -352,19 +357,20 @@ var command_default = stormCommands.define({
|
|
|
352
357
|
response: outcomes,
|
|
353
358
|
handler: async ({ app }, request) => {
|
|
354
359
|
const now = app.context.clock.now();
|
|
360
|
+
const runs = pastRuns(app.context.runDirectories);
|
|
355
361
|
let id = request.id;
|
|
356
362
|
if (id === void 0) {
|
|
357
|
-
const listed = await
|
|
363
|
+
const listed = await runs.list({ now });
|
|
358
364
|
if (!listed.ok) return outcomes.runsUnreadable({ ...listed.failure });
|
|
359
365
|
const scope = runScope(request.all, await findConfigFile(app.context.config, app.cwd));
|
|
360
366
|
const newest = newestFinished(runsInScope(listed.runs, scope));
|
|
361
367
|
if (newest === void 0) return outcomes.noRuns({ scope: scopeFacts(scope) });
|
|
362
368
|
id = newest.id;
|
|
363
369
|
}
|
|
364
|
-
const read = await
|
|
370
|
+
const read = await runs.read({ id, now });
|
|
365
371
|
if (read.kind === "failed") return outcomes.runsUnreadable({ ...read.failure });
|
|
366
372
|
if (read.kind === "not-found") return outcomes.runNotFound({ id });
|
|
367
|
-
const run =
|
|
373
|
+
const { run } = read;
|
|
368
374
|
const filters = { failed: request.failed, test: request.test };
|
|
369
375
|
const selecting = request.failed || request.test !== void 0;
|
|
370
376
|
const plan = run.record?.plan;
|
|
@@ -372,10 +378,7 @@ var command_default = stormCommands.define({
|
|
|
372
378
|
...runFacts(run, now),
|
|
373
379
|
plan: plan === void 0 ? null : { ...plan, options: plan.options.map((option) => ({ ...option })) },
|
|
374
380
|
finished: run.finished,
|
|
375
|
-
logs: LOG_STEPS.
|
|
376
|
-
step,
|
|
377
|
-
path: `${run.path}/${runLogFile(step)}`
|
|
378
|
-
})),
|
|
381
|
+
logs: LOG_STEPS.flatMap((step) => run.logs.filter(({ log }) => log === step).map(({ path }) => ({ step, path }))),
|
|
379
382
|
unreadableTestLines: run.unreadableTestLines,
|
|
380
383
|
timeline: run.timeline ?? null,
|
|
381
384
|
selection: { failed: request.failed, test: request.test ?? null },
|
|
@@ -2,8 +2,8 @@ import { capsFor } from "@vercel/clinkr/vcli-kit";
|
|
|
2
2
|
import { bold, paint } from "@vercel/clinkr/vcli-kit/theme";
|
|
3
3
|
import { defineOutcomes } from "@vercel/clinkr";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
import { timelineSchema } from "
|
|
6
|
-
import {
|
|
5
|
+
import { planSchema, timelineSchema } from "../../../run-directory/index.js";
|
|
6
|
+
import { testPlanText } from "../../exec/test-plan.js";
|
|
7
7
|
import { short } from "../../exec/text.js";
|
|
8
8
|
import { waterfallLines } from "../../exec/waterfall.js";
|
|
9
9
|
import { commandText, exitText, exitTone, gitText, keptText, LOG_STEPS, runFactsSchema, runNotFound, runsUnreadable, scopeSchema, startedText, tookText, totalsText, totalsTone, } from "../facts.js";
|
|
@@ -16,7 +16,7 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<z.ZodObject<{
|
|
|
16
16
|
}>>;
|
|
17
17
|
unsandboxed: z.ZodDefault<z.ZodBoolean>;
|
|
18
18
|
rebuildSnapshot: z.ZodDefault<z.ZodBoolean>;
|
|
19
|
-
saveSnapshot: z.
|
|
19
|
+
saveSnapshot: z.ZodOptional<z.ZodBoolean>;
|
|
20
20
|
showOutput: z.ZodDefault<z.ZodBoolean>;
|
|
21
21
|
keepSandbox: z.ZodOptional<z.ZodString>;
|
|
22
22
|
verbose: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -26,7 +26,7 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<z.ZodObject<{
|
|
|
26
26
|
version: z.ZodString;
|
|
27
27
|
commit: z.ZodNullable<z.ZodString>;
|
|
28
28
|
configFile: z.ZodNullable<z.ZodString>;
|
|
29
|
-
resources: z.ZodType<import("../../core/resource-
|
|
29
|
+
resources: z.ZodType<import("../../core/resource-reports.ts").InstanceFacts, import("../../core/resource-reports.ts").InstanceFacts, z.core.$ZodTypeInternals<import("../../core/resource-reports.ts").InstanceFacts, import("../../core/resource-reports.ts").InstanceFacts>>;
|
|
30
30
|
cleanup: z.ZodType<import("../exec/cleanup.ts").StormCleanupFacts, import("../exec/cleanup.ts").StormCleanupFacts, z.core.$ZodTypeInternals<import("../exec/cleanup.ts").StormCleanupFacts, import("../exec/cleanup.ts").StormCleanupFacts>>;
|
|
31
31
|
command: z.ZodObject<{
|
|
32
32
|
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
@@ -402,7 +402,7 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<z.ZodObject<{
|
|
|
402
402
|
version: z.ZodString;
|
|
403
403
|
commit: z.ZodNullable<z.ZodString>;
|
|
404
404
|
configFile: z.ZodNullable<z.ZodString>;
|
|
405
|
-
resources: z.ZodType<import("../../core/resource-
|
|
405
|
+
resources: z.ZodType<import("../../core/resource-reports.ts").InstanceFacts, import("../../core/resource-reports.ts").InstanceFacts, z.core.$ZodTypeInternals<import("../../core/resource-reports.ts").InstanceFacts, import("../../core/resource-reports.ts").InstanceFacts>>;
|
|
406
406
|
cleanup: z.ZodType<import("../exec/cleanup.ts").StormCleanupFacts, import("../exec/cleanup.ts").StormCleanupFacts, z.core.$ZodTypeInternals<import("../exec/cleanup.ts").StormCleanupFacts, import("../exec/cleanup.ts").StormCleanupFacts>>;
|
|
407
407
|
command: z.ZodObject<{
|
|
408
408
|
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
@@ -11,32 +11,40 @@ import {
|
|
|
11
11
|
renderRan,
|
|
12
12
|
runCommand,
|
|
13
13
|
runProblems
|
|
14
|
-
} from "../../chunks/chunk-
|
|
14
|
+
} from "../../chunks/chunk-TRFEAYNC.js";
|
|
15
15
|
import "../../chunks/chunk-I5GZLOLQ.js";
|
|
16
|
-
import "../../chunks/chunk-
|
|
17
|
-
import "../../chunks/chunk-WF4KJ7YG.js";
|
|
16
|
+
import "../../chunks/chunk-WNIQA5J6.js";
|
|
18
17
|
import {
|
|
19
|
-
planSchema,
|
|
20
18
|
resourceRunExamples
|
|
21
|
-
} from "../../chunks/chunk-
|
|
19
|
+
} from "../../chunks/chunk-4EU4AH7E.js";
|
|
22
20
|
import {
|
|
23
21
|
describeVitestListFailure,
|
|
24
22
|
planVitestRun,
|
|
25
23
|
vitestRunArgv
|
|
26
|
-
} from "../../chunks/chunk-
|
|
27
|
-
import "../../chunks/chunk-
|
|
28
|
-
import "../../chunks/chunk-
|
|
24
|
+
} from "../../chunks/chunk-NPPJ57W7.js";
|
|
25
|
+
import "../../chunks/chunk-OJOKQRM6.js";
|
|
26
|
+
import "../../chunks/chunk-GRMD7G4J.js";
|
|
27
|
+
import "../../chunks/chunk-ETCZ6WP7.js";
|
|
28
|
+
import "../../chunks/chunk-SLNKW4ZM.js";
|
|
29
|
+
import "../../chunks/chunk-WSIF7SR6.js";
|
|
30
|
+
import "../../chunks/chunk-FVMQKYTT.js";
|
|
31
|
+
import "../../chunks/chunk-ICB4BZJX.js";
|
|
32
|
+
import "../../chunks/chunk-VZZTHCBW.js";
|
|
33
|
+
import {
|
|
34
|
+
planSchema
|
|
35
|
+
} from "../../chunks/chunk-KR7WIYLG.js";
|
|
36
|
+
import "../../chunks/chunk-O4BUT7BE.js";
|
|
37
|
+
import "../../chunks/chunk-AMTYHUYB.js";
|
|
29
38
|
import {
|
|
30
39
|
stormCommands
|
|
31
|
-
} from "../../chunks/chunk-
|
|
32
|
-
import "../../chunks/chunk-J6ZNYUDV.js";
|
|
40
|
+
} from "../../chunks/chunk-3ZZVZPMG.js";
|
|
33
41
|
import {
|
|
34
42
|
defineOutcomes,
|
|
35
43
|
refused
|
|
36
|
-
} from "../../chunks/chunk-
|
|
44
|
+
} from "../../chunks/chunk-4PRAB24Y.js";
|
|
37
45
|
|
|
38
46
|
// src/commands/vitest/command.ts
|
|
39
|
-
import { join
|
|
47
|
+
import { join } from "node:path";
|
|
40
48
|
import { z as z2 } from "zod";
|
|
41
49
|
|
|
42
50
|
// src/commands/vitest/outcomes.ts
|
|
@@ -138,18 +146,17 @@ var command_default = stormCommands.define({
|
|
|
138
146
|
})
|
|
139
147
|
});
|
|
140
148
|
async function planVitestCommand(app, args, where, signal) {
|
|
141
|
-
const root = await app.context.checkout.repositoryRoot({ cwd: app.cwd });
|
|
142
149
|
let cwd;
|
|
143
|
-
let
|
|
150
|
+
let found;
|
|
144
151
|
if (where.kind === "unsandboxed") {
|
|
145
152
|
cwd = app.cwd;
|
|
146
|
-
|
|
153
|
+
found = await app.vitest.find(cwd);
|
|
147
154
|
} else {
|
|
155
|
+
const root = await app.context.checkout.repositoryRoot({ cwd: app.cwd });
|
|
148
156
|
if (!root.ok) return refused(checkoutFailedRefusal(root.failure));
|
|
149
157
|
cwd = join(root.value, where.recipe.cwd);
|
|
150
|
-
|
|
158
|
+
found = await app.context.vitestList.findVitest({ from: cwd, root: root.value });
|
|
151
159
|
}
|
|
152
|
-
const found = await app.context.vitestList.findVitest({ from: cwd, root: searchRoot });
|
|
153
160
|
if (!found.ok)
|
|
154
161
|
return refused(
|
|
155
162
|
outcomes.vitestListFailed({
|
|
@@ -5,7 +5,7 @@ export declare const outcomes: import("@vercel/clinkr").Outcomes<{
|
|
|
5
5
|
version: z.ZodString;
|
|
6
6
|
commit: z.ZodNullable<z.ZodString>;
|
|
7
7
|
configFile: z.ZodNullable<z.ZodString>;
|
|
8
|
-
resources: z.ZodType<import("../../core/resource-
|
|
8
|
+
resources: z.ZodType<import("../../core/resource-reports.ts").InstanceFacts, import("../../core/resource-reports.ts").InstanceFacts, z.core.$ZodTypeInternals<import("../../core/resource-reports.ts").InstanceFacts, import("../../core/resource-reports.ts").InstanceFacts>>;
|
|
9
9
|
cleanup: z.ZodType<import("../exec/cleanup.ts").StormCleanupFacts, import("../exec/cleanup.ts").StormCleanupFacts, z.core.$ZodTypeInternals<import("../exec/cleanup.ts").StormCleanupFacts, import("../exec/cleanup.ts").StormCleanupFacts>>;
|
|
10
10
|
command: z.ZodObject<{
|
|
11
11
|
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineOutcomes } from "@vercel/clinkr";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { RAN_DESCRIPTION, RUN_ERRORS, ranSchema, renderRan } from "../exec/outcomes.js";
|
|
4
|
-
import { planSchema } from "
|
|
4
|
+
import { planSchema } from "../../run-directory/index.js";
|
|
5
5
|
/** Where `vitest list` ran and what it was given, which both refusals report. */
|
|
6
6
|
const listedShape = {
|
|
7
7
|
/** The arguments given to `vitest run`, which `vitest list --json` was given too. */
|