@cnc-tools/storm 0.12.0 → 0.14.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 (188) hide show
  1. package/dist/application.js +5 -1
  2. package/dist/bin/storm.js +6 -2
  3. package/dist/build-info.js +1 -1
  4. package/dist/chunks/{chunk-FK4RLDEK.js → chunk-27P2QSIM.js} +1 -1
  5. package/dist/chunks/{chunk-ODQHQJLE.js → chunk-5ED3IDUJ.js} +749 -1121
  6. package/dist/chunks/{chunk-FSP3SJ35.js → chunk-5TMHYH7G.js} +16 -46
  7. package/dist/chunks/{chunk-Y3BUNNRG.js → chunk-BFLYGMG3.js} +12 -7
  8. package/dist/chunks/{chunk-LQKNI3EG.js → chunk-BRUIATTR.js} +6 -6
  9. package/dist/chunks/{chunk-RYRJNHL7.js → chunk-HOKDKP5A.js} +3 -9
  10. package/dist/chunks/{chunk-SXW6XN4R.js → chunk-IVRRGGCD.js} +60 -20
  11. package/dist/chunks/{chunk-TMQQYHUX.js → chunk-QBR5VHJ7.js} +1 -1
  12. package/dist/chunks/{chunk-YT5OROR7.js → chunk-RA4L2ACU.js} +12 -2
  13. package/dist/chunks/{chunk-TEEZL3GA.js → chunk-RKONDLPS.js} +17 -71
  14. package/dist/chunks/{chunk-IYM44FUX.js → chunk-UC6DULWY.js} +2 -2
  15. package/dist/chunks/{chunk-4XT5RC5T.js → chunk-XPCUINWS.js} +6 -42
  16. package/dist/chunks/{chunk-U7M3ZB3Z.js → chunk-YBPTMJUM.js} +123 -180
  17. package/dist/chunks/{chunk-ISGQJIQM.js → chunk-Z5OXOZD3.js} +125 -83
  18. package/dist/chunks/{chunk-7D6LC5JY.js → chunk-ZH5R7W4A.js} +7 -39
  19. package/dist/chunks/{live-app-AZ5N5HBD.js → live-app-FBVWUUMT.js} +7 -7
  20. package/dist/commands/exec/command.d.ts +4 -90
  21. package/dist/commands/exec/command.js +15 -41
  22. package/dist/commands/exec/define-run-command.d.ts +19 -100
  23. package/dist/commands/exec/define-run-command.js +48 -15
  24. package/dist/commands/exec/driver-plan.d.ts +24 -16
  25. package/dist/commands/exec/driver-plan.js +34 -15
  26. package/dist/commands/exec/driver-refusals.js +7 -6
  27. package/dist/commands/exec/exec-words.d.ts +1 -1
  28. package/dist/commands/exec/exec-words.js +8 -2
  29. package/dist/commands/exec/final-results.d.ts +39 -0
  30. package/dist/commands/exec/final-results.js +29 -0
  31. package/dist/commands/exec/live-view.js +18 -22
  32. package/dist/commands/exec/metadata.js +1 -1
  33. package/dist/commands/exec/outcomes.d.ts +15 -109
  34. package/dist/commands/exec/outcomes.js +25 -39
  35. package/dist/commands/exec/plan-run.d.ts +11 -3
  36. package/dist/commands/exec/plan-run.js +3 -2
  37. package/dist/commands/exec/progress.d.ts +3 -19
  38. package/dist/commands/exec/progress.js +16 -60
  39. package/dist/commands/exec/run-command.d.ts +5 -24
  40. package/dist/commands/exec/run-command.js +32 -84
  41. package/dist/commands/exec/run-metadata.d.ts +0 -6
  42. package/dist/commands/exec/run-metadata.js +2 -8
  43. package/dist/commands/exec/snapshot-text.d.ts +7 -16
  44. package/dist/commands/exec/snapshot-text.js +9 -49
  45. package/dist/commands/exec/test-plan.d.ts +2 -1
  46. package/dist/commands/exec/test-plan.js +13 -4
  47. package/dist/commands/exec/tests-summary.d.ts +2 -2
  48. package/dist/commands/exec/view.js +2 -12
  49. package/dist/commands/exec/worker-chart.d.ts +1 -1
  50. package/dist/commands/playwright/command.d.ts +12 -97
  51. package/dist/commands/playwright/command.js +14 -14
  52. package/dist/commands/playwright/metadata.js +2 -2
  53. package/dist/commands/runs/facts.d.ts +1 -37
  54. package/dist/commands/runs/facts.js +4 -36
  55. package/dist/commands/runs/list/command.d.ts +0 -72
  56. package/dist/commands/runs/list/command.js +6 -6
  57. package/dist/commands/runs/list/outcomes.d.ts +0 -36
  58. package/dist/commands/runs/logs/command.js +6 -6
  59. package/dist/commands/runs/show/command.d.ts +2 -74
  60. package/dist/commands/runs/show/command.js +16 -43
  61. package/dist/commands/runs/show/metadata.js +1 -1
  62. package/dist/commands/runs/show/outcomes.d.ts +1 -37
  63. package/dist/commands/runs/show/outcomes.js +8 -42
  64. package/dist/commands/snapshots/build/command.d.ts +14 -411
  65. package/dist/commands/snapshots/build/command.js +59 -234
  66. package/dist/commands/snapshots/build/metadata.js +10 -7
  67. package/dist/commands/snapshots/build/outcomes.d.ts +11 -241
  68. package/dist/commands/snapshots/build/outcomes.js +29 -196
  69. package/dist/commands/snapshots/list/command.d.ts +2 -36
  70. package/dist/commands/snapshots/list/command.js +20 -56
  71. package/dist/commands/snapshots/list/metadata.js +1 -1
  72. package/dist/commands/snapshots/list/outcomes.d.ts +2 -37
  73. package/dist/commands/snapshots/list/outcomes.js +13 -53
  74. package/dist/commands/vitest/command.d.ts +14 -98
  75. package/dist/commands/vitest/command.js +14 -14
  76. package/dist/commands/vitest/metadata.js +2 -2
  77. package/dist/config/resolve.d.ts +1 -1
  78. package/dist/config/resolve.js +2 -1
  79. package/dist/config/schema.d.ts +8 -0
  80. package/dist/config/schema.js +5 -4
  81. package/dist/core/events.d.ts +5 -6
  82. package/dist/core/run-state.d.ts +7 -29
  83. package/dist/core/run-state.js +3 -26
  84. package/dist/core/run.d.ts +6 -14
  85. package/dist/core/run.js +17 -28
  86. package/dist/extensions/playwright/driver.js +17 -10
  87. package/dist/extensions/testserver/commands/pool/create/command.js +4 -4
  88. package/dist/extensions/testserver/commands/pool/list/command.js +2 -2
  89. package/dist/extensions/testserver/definition.d.ts +1 -1
  90. package/dist/extensions/testserver/extension.d.ts +1 -1
  91. package/dist/extensions/testserver/options/rules.d.ts +3 -3
  92. package/dist/extensions/testserver/options/rules.js +5 -5
  93. package/dist/extensions/testserver/resource.d.ts +1 -1
  94. package/dist/extensions/testserver/vercel-cli/index.d.ts +1 -0
  95. package/dist/extensions/testserver/vercel-cli/index.js +1 -0
  96. package/dist/extensions/testserver/vercel-cli/report.js +5 -2
  97. package/dist/extensions/testserver/vercel-cli/session-id.d.ts +8 -0
  98. package/dist/extensions/testserver/vercel-cli/session-id.js +16 -0
  99. package/dist/extensions/testserver/vitest/config.d.ts +2 -2
  100. package/dist/extensions/testserver/vitest/config.js +2 -2
  101. package/dist/extensions/testserver/vitest/container-scope.d.ts +25 -16
  102. package/dist/extensions/testserver/vitest/container-scope.js +32 -13
  103. package/dist/extensions/testserver/vitest/diagnostics.d.ts +5 -4
  104. package/dist/extensions/testserver/vitest/diagnostics.js +15 -8
  105. package/dist/extensions/testserver/vitest/fixtures.d.ts +10 -1
  106. package/dist/extensions/testserver/vitest/fixtures.js +36 -10
  107. package/dist/extensions/testserver/vitest/types.d.ts +9 -0
  108. package/dist/extensions/vitest/driver.js +28 -14
  109. package/dist/extensions/vitest/plan/gateways.d.ts +28 -5
  110. package/dist/extensions/vitest/plan/gateways.js +2 -2
  111. package/dist/extensions/vitest/plan/list-output.d.ts +5 -0
  112. package/dist/extensions/vitest/plan/list-output.js +23 -9
  113. package/dist/extensions/vitest/plan/live/list-gateway.d.ts +3 -2
  114. package/dist/extensions/vitest/plan/live/list-gateway.js +77 -64
  115. package/dist/extensions/vitest/plan/plan-over.d.ts +19 -7
  116. package/dist/extensions/vitest/plan/plan-over.js +18 -7
  117. package/dist/extensions/vitest/plan/plan.d.ts +14 -5
  118. package/dist/extensions/vitest/plan/plan.js +23 -9
  119. package/dist/extensions.d.ts +2 -2
  120. package/dist/run-directory/index.d.ts +1 -1
  121. package/dist/run-directory/index.js +0 -1
  122. package/dist/run-directory/plan.d.ts +3 -2
  123. package/dist/run-directory/plan.js +6 -3
  124. package/dist/run-directory/recording.js +2 -2
  125. package/dist/run-directory/run-record.d.ts +18 -135
  126. package/dist/run-directory/run-record.js +8 -68
  127. package/dist/runner/build-snapshots.d.ts +50 -114
  128. package/dist/runner/build-snapshots.js +70 -159
  129. package/dist/runner/events.d.ts +4 -88
  130. package/dist/runner/gateways.d.ts +5 -23
  131. package/dist/runner/index.d.ts +5 -6
  132. package/dist/runner/index.js +1 -1
  133. package/dist/runner/live/snapshot-records.js +7 -18
  134. package/dist/runner/prepare.d.ts +11 -22
  135. package/dist/runner/prepare.js +6 -17
  136. package/dist/runner/ready.d.ts +16 -45
  137. package/dist/runner/ready.js +34 -59
  138. package/dist/runner/recipe.d.ts +5 -45
  139. package/dist/runner/recipe.js +0 -41
  140. package/dist/runner/sandboxed-command.d.ts +5 -3
  141. package/dist/runner/sandboxed-command.js +10 -4
  142. package/dist/runner/scope.d.ts +8 -25
  143. package/dist/runner/scope.js +4 -8
  144. package/dist/runner/session.d.ts +18 -65
  145. package/dist/runner/session.js +15 -83
  146. package/dist/runner/snapshot-build.d.ts +2 -2
  147. package/dist/runner/snapshot-cache.d.ts +22 -74
  148. package/dist/runner/snapshot-cache.js +15 -107
  149. package/dist/runner/snapshot-inspect.d.ts +9 -13
  150. package/dist/runner/snapshot-inspect.js +48 -57
  151. package/dist/runner/snapshot-key.d.ts +9 -14
  152. package/dist/runner/snapshot-key.js +15 -22
  153. package/dist/sdk/extension/driver.d.ts +32 -6
  154. package/dist/sdk/extension/driver.js +12 -2
  155. package/dist/sdk/extension/index.d.ts +1 -1
  156. package/dist/sdk/extension/index.js +2 -1
  157. package/dist/sdk/extension/resource-definition.d.ts +6 -5
  158. package/dist/vendor/testserver-sdk/container/api-request.d.ts +2 -3
  159. package/dist/vendor/testserver-sdk/container/api-request.js +2 -3
  160. package/dist/vendor/testserver-sdk/container/container.d.ts +12 -2
  161. package/dist/vendor/testserver-sdk/container/container.js +10 -7
  162. package/dist/vendor/testserver-sdk/container/recorder.d.ts +29 -7
  163. package/dist/vendor/testserver-sdk/container/recorder.js +26 -14
  164. package/dist/vendor/testserver-sdk/index.d.ts +1 -1
  165. package/dist/vendor/testserver-sdk/index.js +1 -1
  166. package/dist/vendor/testserver-sdk/proxy/exchange.d.ts +24 -5
  167. package/dist/vendor/testserver-sdk/proxy/exchange.js +43 -25
  168. package/dist/vendor/testserver-sdk/proxy/faulted-exchange.js +15 -10
  169. package/dist/vendor/testserver-sdk/proxy/faults.d.ts +6 -5
  170. package/dist/vendor/testserver-sdk/proxy/proxy.d.ts +10 -1
  171. package/dist/vendor/testserver-sdk/proxy/proxy.js +5 -3
  172. package/dist/vendor/testserver-sdk/proxy/records.d.ts +17 -17
  173. package/dist/vendor/testserver-sdk/proxy/records.js +18 -17
  174. package/dist/vendor/testserver-sdk/records/body.d.ts +7 -9
  175. package/dist/vendor/testserver-sdk/records/body.js +10 -15
  176. package/dist/vendor/testserver-sdk/records/headers.d.ts +79 -0
  177. package/dist/vendor/testserver-sdk/records/headers.js +162 -0
  178. package/dist/vendor/testserver-sdk/records/index.d.ts +2 -1
  179. package/dist/vendor/testserver-sdk/records/index.js +4 -2
  180. package/dist/vendor/testserver-sdk/records/records.d.ts +19 -10
  181. package/package.json +5 -4
  182. package/skills/overview.md +5 -5
  183. package/skills/read-run-output.md +8 -9
  184. package/dist/runner/snapshot-save.d.ts +0 -70
  185. package/dist/runner/snapshot-save.js +0 -160
  186. package/dist/runner/snapshot-start.d.ts +0 -25
  187. package/dist/runner/snapshot-start.js +0 -16
  188. package/skills/testserver-builds.md +0 -82
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  testserverPoolDefinition
3
- } from "./chunk-IYM44FUX.js";
3
+ } from "./chunk-UC6DULWY.js";
4
4
  import {
5
5
  driverContexts,
6
6
  driversOf,
7
7
  resourceDefinitionSet,
8
8
  resourcesOf
9
- } from "./chunk-FSP3SJ35.js";
9
+ } from "./chunk-5TMHYH7G.js";
10
10
  import {
11
11
  argsText,
12
12
  booleanOption,
@@ -14,7 +14,7 @@ import {
14
14
  defineResource,
15
15
  mustBe,
16
16
  resourceFactory
17
- } from "./chunk-YT5OROR7.js";
17
+ } from "./chunk-RA4L2ACU.js";
18
18
  import {
19
19
  testserverExtensionCommands
20
20
  } from "./chunk-GQIL3AHY.js";
@@ -529,14 +529,14 @@ var playwrightDriver = defineDriver({
529
529
  },
530
530
  help: {
531
531
  usage: "[<playwright test args>...] [-- <playwright dash options>...]",
532
- args: "What playwright test gets, unchanged and in order: every argument that isn't one of storm's flags, such as file filters, then everything after --, such as --project or --grep. Give file filters before --: Playwright reads each argument after --project as another project. playwright test --list gets the same arguments when it counts the tests.",
532
+ args: "What playwright test gets, unchanged and in order: every argument that isn't one of storm's flags, such as file filters, then everything after --, such as --project or --grep. Give file filters before --: Playwright reads each argument after --project as another project. playwright test --list gets the same arguments when it counts the tests, where storm.config.ts sets testPlan.",
533
533
  // Nothing storm brings a Playwright project reads the run payload's `verbose`: storm's Playwright reporter never
534
534
  // prints (`printsToStdio()` is false).
535
535
  verbose: "which test code can read; storm's Playwright reporter prints nothing either way",
536
536
  examples: [
537
537
  {
538
538
  argv: "",
539
- description: "Run every test in a runner sandbox, with the runner recipe, team, project and resources from storm.config.ts, each resource that sizes itself sized from the test count."
539
+ description: "Run every test in a runner sandbox, with the runner recipe, team, project and resources from storm.config.ts. Where it sets testPlan, storm counts the tests first, and each resource that sizes itself is sized from that count."
540
540
  },
541
541
  {
542
542
  argv: "--unsandboxed tests/login.spec.ts -- --project chromium",
@@ -547,18 +547,24 @@ var playwrightDriver = defineDriver({
547
547
  hints: {
548
548
  // No final result: the Playwright config doesn't list storm's Playwright reporter, or a `--reporter` on
549
549
  // Playwright's command line replaced it. A config lists a reporter as a tuple of its module name.
550
- noFinalResults: 'add ["@vercel/storm/playwright/reporter"] to the reporter list in playwright.config'
550
+ noFinalResults: 'add ["@vercel/storm/playwright/reporter"] to the reporter list in playwright.config',
551
+ // storm's Playwright reporter prints nothing, so the steps keep a reporter a person reads beside it. The package may
552
+ // install storm under either of its npm names.
553
+ addReporter: [
554
+ 'In the Playwright config the run loads (playwright.config.ts, or the file --config names), set reporter to a list that holds ["@vercel/storm/playwright/reporter"], as in defineConfig({ reporter: [["list"], ["@vercel/storm/playwright/reporter"]] }). If reporter already names reporters, keep them and add ["@vercel/storm/playwright/reporter"] to the list. In a package that installs storm as @cnc-tools/storm, name "@cnc-tools/storm/playwright/reporter".',
555
+ "Remove any --reporter from the arguments given to playwright test, since it replaces the config's reporters, storm's among them. Then run the same storm playwright command again."
556
+ ]
551
557
  },
552
558
  refusals: {
553
559
  noMatchingTests: {
554
- description: "playwright test --list found no test for the arguments given to playwright test, so nothing was minted, acquired or started.",
560
+ description: "storm.config.ts sets testPlan, and playwright test --list found no test for the arguments given to playwright test, so nothing was minted, acquired or started.",
555
561
  message: ({ args, cwd }) => `playwright test --list found no test for playwright test ${argsText(args)} in ${cwd}. The command didn't run.`,
556
562
  next: ({ args }) => `Change the arguments given to playwright test (${argsText(args)}), then retry. Put Playwright's own dash options after --.`
557
563
  },
558
564
  planFailed: {
559
- description: "storm couldn't count the tests before the run: playwright wasn't found or failed to start, didn't finish within 120s, exited other than 0, or wrote something other than a list of tests. Nothing was minted, acquired or started.",
565
+ description: "storm couldn't plan the run: playwright wasn't found, or, where storm.config.ts sets testPlan, playwright test --list failed to start, didn't finish within 120s, exited other than 0, or wrote something other than a list of tests. Nothing was minted, acquired or started.",
560
566
  next: {
561
- "start-failed": "Install @playwright/test in the package, or run the command with storm exec, which counts nothing.",
567
+ "start-failed": "Install @playwright/test in the package, or run the command with storm exec, which needs no playwright.",
562
568
  "timed-out": "Check why playwright test --list doesn't finish, such as a config file that waits, then retry.",
563
569
  exited: "Fix what playwright test --list reports, then retry.",
564
570
  "unreadable-output": "Check that the package's playwright writes its list with --reporter=json to the file PLAYWRIGHT_JSON_OUTPUT_FILE names, then retry."
@@ -652,78 +658,93 @@ import { spawn as spawn2 } from "node:child_process";
652
658
  // src/extensions/vitest/plan/list-output.ts
653
659
  import { z as z4 } from "zod";
654
660
  var VITEST_LIST = z4.array(z4.looseObject({ name: z4.string(), file: z4.string() }));
661
+ var VITEST_FILE_LIST = z4.array(z4.looseObject({ file: z4.string() }));
655
662
  function readVitestList(stdout) {
656
- let document;
663
+ const parsed = VITEST_LIST.safeParse(readJson(stdout, "`vitest list --json`"));
664
+ if (!parsed.success) throw new Error("`vitest list --json` did not print a list of tests");
665
+ return parsed.data.map(({ name, file }) => ({ name, file }));
666
+ }
667
+ function readVitestFileList(stdout) {
668
+ const parsed = VITEST_FILE_LIST.safeParse(readJson(stdout, "`vitest list --filesOnly --json`"));
669
+ if (!parsed.success) throw new Error("`vitest list --filesOnly --json` did not print a list of files");
670
+ return parsed.data.map(({ file }) => file);
671
+ }
672
+ function readJson(stdout, command) {
657
673
  try {
658
- document = JSON.parse(stdout);
674
+ return JSON.parse(stdout);
659
675
  } catch {
660
- throw new Error("`vitest list --json` did not print JSON");
676
+ throw new Error(`${command} did not print JSON`);
661
677
  }
662
- const parsed = VITEST_LIST.safeParse(document);
663
- if (!parsed.success) throw new Error("`vitest list --json` did not print a list of tests");
664
- return parsed.data.map(({ name, file }) => ({ name, file }));
665
678
  }
666
679
 
667
680
  // src/extensions/vitest/plan/live/list-gateway.ts
668
681
  var liveVitestListGateway = {
669
- listTests(request) {
670
- return new Promise((resolve2) => {
671
- let settled = false;
672
- const settle = (result) => {
673
- if (settled) return;
674
- settled = true;
675
- resolve2(result);
676
- };
677
- const timeout = AbortSignal.timeout(request.timeoutMs);
678
- const child = spawn2(request.executable ?? "vitest", listArgv2(request.args), {
679
- ...request.cwd === void 0 ? {} : { cwd: request.cwd },
680
- stdio: ["ignore", "pipe", "pipe"],
681
- signal: request.signal === void 0 ? timeout : AbortSignal.any([timeout, request.signal])
682
- });
683
- let stopped;
684
- let stdout = "";
685
- let stderr = "";
686
- child.stdout.setEncoding("utf8").on("data", (chunk) => {
687
- stdout += chunk;
688
- });
689
- child.stderr.setEncoding("utf8").on("data", (chunk) => {
690
- stderr += chunk;
691
- });
692
- child.on("error", (error) => {
693
- if (error.name !== "AbortError") {
694
- settle({ ok: false, failure: { kind: "start-failed", message: error.message } });
695
- return;
696
- }
697
- stopped = request.signal?.aborted === true ? { kind: "canceled" } : { kind: "timed-out", timeoutMs: request.timeoutMs };
698
- if (child.exitCode !== null || child.signalCode !== null) settle({ ok: false, failure: stopped });
699
- });
700
- child.on("exit", () => {
701
- if (stopped !== void 0) settle({ ok: false, failure: stopped });
702
- });
703
- child.on("close", (exitCode, signal) => {
704
- if (stopped !== void 0) {
705
- settle({ ok: false, failure: stopped });
706
- return;
707
- }
708
- if (exitCode !== 0) {
709
- settle({ ok: false, failure: { kind: "exited", exitCode, signal, lastStderrLine: lastLine2(stderr) } });
710
- return;
711
- }
712
- try {
713
- settle({ ok: true, tests: readVitestList(stdout) });
714
- } catch (error) {
715
- settle({ ok: false, failure: { kind: "unreadable-output", message: error.message } });
716
- }
717
- });
718
- });
682
+ async listTests(request) {
683
+ const listed = await runList(request, ["--json"], readVitestList);
684
+ return listed.ok ? { ok: true, tests: listed.value } : listed;
685
+ },
686
+ async listFiles(request) {
687
+ const listed = await runList(request, ["--filesOnly", "--json"], readVitestFileList);
688
+ return listed.ok ? { ok: true, files: listed.value } : listed;
719
689
  }
720
690
  };
691
+ function runList(request, flags, read) {
692
+ return new Promise((resolve2) => {
693
+ let settled = false;
694
+ const settle = (result) => {
695
+ if (settled) return;
696
+ settled = true;
697
+ resolve2(result);
698
+ };
699
+ const timeout = AbortSignal.timeout(request.timeoutMs);
700
+ const child = spawn2(request.executable ?? "vitest", listArgv2(request.args, flags), {
701
+ ...request.cwd === void 0 ? {} : { cwd: request.cwd },
702
+ stdio: ["ignore", "pipe", "pipe"],
703
+ signal: request.signal === void 0 ? timeout : AbortSignal.any([timeout, request.signal])
704
+ });
705
+ let stopped;
706
+ let stdout = "";
707
+ let stderr = "";
708
+ child.stdout.setEncoding("utf8").on("data", (chunk) => {
709
+ stdout += chunk;
710
+ });
711
+ child.stderr.setEncoding("utf8").on("data", (chunk) => {
712
+ stderr += chunk;
713
+ });
714
+ child.on("error", (error) => {
715
+ if (error.name !== "AbortError") {
716
+ settle({ ok: false, failure: { kind: "start-failed", message: error.message } });
717
+ return;
718
+ }
719
+ stopped = request.signal?.aborted === true ? { kind: "canceled" } : { kind: "timed-out", timeoutMs: request.timeoutMs };
720
+ if (child.exitCode !== null || child.signalCode !== null) settle({ ok: false, failure: stopped });
721
+ });
722
+ child.on("exit", () => {
723
+ if (stopped !== void 0) settle({ ok: false, failure: stopped });
724
+ });
725
+ child.on("close", (exitCode, signal) => {
726
+ if (stopped !== void 0) {
727
+ settle({ ok: false, failure: stopped });
728
+ return;
729
+ }
730
+ if (exitCode !== 0) {
731
+ settle({ ok: false, failure: { kind: "exited", exitCode, signal, lastStderrLine: lastLine2(stderr) } });
732
+ return;
733
+ }
734
+ try {
735
+ settle({ ok: true, value: read(stdout) });
736
+ } catch (error) {
737
+ settle({ ok: false, failure: { kind: "unreadable-output", message: error.message } });
738
+ }
739
+ });
740
+ });
741
+ }
721
742
  function lastLine2(text) {
722
743
  return text.split(/\r?\n/).map((line) => line.trim()).findLast((line) => line !== "" && !/^at\s/.test(line)) ?? "";
723
744
  }
724
- function listArgv2(args) {
745
+ function listArgv2(args, flags) {
725
746
  const end = args.indexOf("--");
726
- return end === -1 ? ["list", ...args, "--json"] : ["list", ...args.slice(0, end), "--json", ...args.slice(end)];
747
+ return end === -1 ? ["list", ...args, ...flags] : ["list", ...args.slice(0, end), ...flags, ...args.slice(end)];
727
748
  }
728
749
 
729
750
  // src/extensions/vitest/plan/plan-over.ts
@@ -733,18 +754,26 @@ async function planVitestRunOver(options, gateway) {
733
754
  if (!Number.isFinite(timeoutMs) || timeoutMs <= 0) {
734
755
  throw new TypeError(`planVitestRun: timeoutMs is ${String(timeoutMs)}, not a positive number`);
735
756
  }
736
- const listed = await gateway.listTests({
757
+ const request = {
737
758
  args: options.args,
738
759
  ...options.cwd === void 0 ? {} : { cwd: options.cwd },
739
760
  ...options.executable === void 0 ? {} : { executable: options.executable },
740
761
  timeoutMs,
741
762
  ...options.signal === void 0 ? {} : { signal: options.signal }
742
- });
743
- return listed.ok ? { ok: true, plan: planOf2(listed.tests) } : { ok: false, failure: listed.failure };
763
+ };
764
+ if (options.countTests === true) {
765
+ const listed2 = await gateway.listTests(request);
766
+ return listed2.ok ? { ok: true, plan: planOf2(listed2.tests) } : { ok: false, failure: listed2.failure };
767
+ }
768
+ const listed = await gateway.listFiles(request);
769
+ return listed.ok ? { ok: true, plan: planOfFiles(listed.files) } : { ok: false, failure: listed.failure };
744
770
  }
745
771
  function planOf2(tests) {
746
772
  return { tests: tests.length, files: new Set(tests.map((test) => test.file)).size };
747
773
  }
774
+ function planOfFiles(files) {
775
+ return { files: new Set(files).size };
776
+ }
748
777
 
749
778
  // src/extensions/vitest/plan/plan.ts
750
779
  function vitestRunArgv(executable, args) {
@@ -773,17 +802,20 @@ var vitestDriver = defineDriver({
773
802
  program: { bin: "vitest" },
774
803
  context: () => ({ list: liveVitestListGateway }),
775
804
  launch: vitestRunArgv,
776
- // `vitest list --json <args>`, which may take 60s (`LIST_TIMEOUT_MS`); a failure in `describeVitestListFailure`'s
777
- // words.
778
- plan: ({ list }) => async ({ args, cwd, bin, signal }) => {
779
- const planned = await planVitestRunOver({ args, cwd, executable: bin, signal }, list);
805
+ // For a run that counts, `vitest list <args> --filesOnly --json`, or `vitest list <args> --json` under
806
+ // `--count-tests`, which may take 60s (`LIST_TIMEOUT_MS`); a failure in `describeVitestListFailure`'s words.
807
+ plan: ({ list }) => async ({ args, cwd, bin, countTests, signal }) => {
808
+ const planned = await planVitestRunOver({ args, cwd, executable: bin, countTests, signal }, list);
780
809
  if (planned.ok) return planned;
781
810
  const { failure } = planned;
782
811
  return { ok: false, kind: failure.kind, message: describeVitestListFailure(failure) };
783
812
  },
813
+ countTests: {
814
+ description: "Count each test before the run with vitest list --json, not only the test files with vitest list --filesOnly --json. vitest list then imports every test file on this machine to collect its tests, which can take most of a minute for a suite of hundreds of files and needs what the test files import to resolve here, such as a current build of the workspace's packages. In return, the run refuses with no_matching_tests when a -t matches no test, and its test plan holds the number of tests. It counts whether or not storm.config.ts sets testPlan. Without it, a run whose storm.config.ts sets testPlan counts only the files, which applies the file filters and --project but not -t: a -t that matches no test starts the run, and vitest run skips every test and exits 0."
815
+ },
784
816
  help: {
785
- usage: "[<vitest run args>...] [-- <vitest dash options>...]",
786
- args: "What vitest run gets, unchanged and in order: every argument that isn't one of storm's flags, such as file filters, then everything after --, such as -t or --project. vitest list --json gets the same arguments when it counts the tests.",
817
+ usage: "[--count-tests] [<vitest run args>...] [-- <vitest dash options>...]",
818
+ args: "What vitest run gets, unchanged and in order: every argument that isn't one of storm's flags, such as file filters, then everything after --, such as -t or --project. vitest list gets the same arguments when it counts the test files, where storm.config.ts sets testPlan, or the tests with --count-tests.",
787
819
  // What a Vitest project's storm code does with the run payload's `verbose`: `stormReporters()` picks vitest's
788
820
  // `verbose` reporter (`@vercel/storm/vitest/config`), and an extension's Vitest fixtures print as each test
789
821
  // goes.
@@ -791,31 +823,41 @@ var vitestDriver = defineDriver({
791
823
  examples: [
792
824
  {
793
825
  argv: "",
794
- description: "Run every test in a runner sandbox, with the runner recipe, team, project and resources from storm.config.ts, each resource that sizes itself sized from the test count."
826
+ description: "Run every test in a runner sandbox, with the runner recipe, team, project and resources from storm.config.ts. Where it sets testPlan, storm counts the test files first, and each resource that sizes itself is sized from that count."
795
827
  },
796
828
  {
797
829
  argv: "test/api -- -t creates",
798
830
  description: "Run the tests named creates in the files under test/api."
831
+ },
832
+ {
833
+ argv: "--count-tests test/api -- -t creates",
834
+ description: "Count the tests named creates in the files under test/api before the run, refusing with no_matching_tests when there is none, then run them."
799
835
  }
800
836
  ]
801
837
  },
802
838
  hints: {
803
839
  // No final result: the Vitest config lacks `stormReporter`, or a `--reporter` on vitest's command line replaced it.
804
- noFinalResults: "add stormReporter() to vitest.config's reporters (@vercel/storm/vitest/config)"
840
+ noFinalResults: "add stormReporter() to vitest.config's reporters (@vercel/storm/vitest/config)",
841
+ // `stormReporters()` keeps vitest's own output and reports nothing outside a storm run, so the steps add it
842
+ // unconditionally. The package may install storm under either of its npm names.
843
+ addReporter: [
844
+ 'In the Vitest config the run loads (vitest.config.ts, or the file --config names), import { stormReporters } from "@vercel/storm/vitest/config" and set test.reporters to stormReporters(), as in defineConfig({ test: { reporters: stormReporters() } }). If test.reporters already lists reporters, keep them and add stormReporter() from the same module to the list instead. In a package that installs storm as @cnc-tools/storm, import from "@cnc-tools/storm/vitest/config".',
845
+ "Remove any --reporter from the arguments given to vitest run, since it replaces the config's reporters, storm's among them. Then run the same storm vitest command again."
846
+ ]
805
847
  },
806
848
  refusals: {
807
849
  noMatchingTests: {
808
- description: "vitest list found no test for the arguments given to vitest run, so nothing was minted, acquired or started.",
850
+ description: "The run counts, since storm.config.ts sets testPlan or the run took --count-tests, and vitest list found no test file for the arguments given to vitest run, or no test with --count-tests, so nothing was minted, acquired or started.",
809
851
  message: ({ args, cwd }) => `vitest list found no test for vitest run ${argsText(args)} in ${cwd}. The command didn't run.`,
810
852
  next: ({ args }) => `Change the arguments given to vitest run (${argsText(args)}), then retry. Put vitest's own dash options after --.`
811
853
  },
812
854
  planFailed: {
813
- description: "storm couldn't count the tests before the run: vitest wasn't found or failed to start, didn't finish within 60s, exited other than 0, or printed something other than a list of tests. Nothing was minted, acquired or started.",
855
+ description: "storm couldn't plan the run: vitest wasn't found, or, for a run that counts, vitest list failed to start, didn't finish within 60s, exited other than 0, or printed something other than a list of files or tests. Nothing was minted, acquired or started.",
814
856
  next: {
815
- "start-failed": "Install vitest in the package, or run the command with storm exec, which counts nothing.",
816
- "timed-out": "Check why vitest list doesn't finish, such as a global setup that waits, then retry.",
857
+ "start-failed": "Install vitest in the package, or run the command with storm exec, which needs no vitest.",
858
+ "timed-out": "Check why vitest list doesn't finish, such as a global setup that waits, then retry. Without --count-tests it counts only the files, which imports no test file, and without testPlan in storm.config.ts it counts nothing.",
817
859
  exited: "Fix what vitest list reports, then retry. vitest list takes the arguments vitest run does, but refuses some run-only options.",
818
- "unreadable-output": "Check that the package's vitest prints its list with --json, then retry."
860
+ "unreadable-output": "Check that the package's vitest prints its list with --json, and with --filesOnly --json, then retry."
819
861
  }
820
862
  }
821
863
  }
@@ -5,14 +5,11 @@ import {
5
5
  sandboxPage,
6
6
  snapshotPage
7
7
  } from "./chunk-NMVODY3P.js";
8
- import {
9
- noSaveReasonSchema
10
- } from "./chunk-TEEZL3GA.js";
11
8
  import {
12
9
  isoSecondsText,
13
10
  seconds,
14
11
  short
15
- } from "./chunk-TMQQYHUX.js";
12
+ } from "./chunk-QBR5VHJ7.js";
16
13
 
17
14
  // src/commands/runs/facts.ts
18
15
  import { z } from "zod";
@@ -73,45 +70,17 @@ var runFactsSchema = z.object({
73
70
  keptUntil: z.string().nullable(),
74
71
  /** How many whole minutes are left until keptUntil, as of reading the run, 0 once it has passed; null when keptUntil is. */
75
72
  keptMinutesLeft: z.number().nullable(),
76
- /** The runner snapshot it started from: its id, the base it is of, which the run's changes went on top of, whether this run built it or reused it, for a dev snapshot the HEAD commit of the run that saved it and its branch (the commit is null for a base snapshot, the branch for a base snapshot and for a run on a detached HEAD), and its page in the Vercel dashboard. Null until known. */
73
+ /** The runner snapshot it started from: its id, the base it is of, which the run's changes went on top of, whether this run built it or reused it, and its page in the Vercel dashboard. Null until known. */
77
74
  snapshot: z.object({
78
75
  id: z.string(),
79
76
  base: z.string(),
80
77
  built: z.boolean(),
81
- branch: z.string().nullable(),
82
- head: z.string().nullable(),
83
- /** Its kind, a base snapshot or a dev snapshot; null in a record written before storm recorded it. */
84
- kind: z.enum(["base", "dev"]).nullable(),
85
- /** The commit it was built at, a full SHA: a base snapshot's base, or the commit that saved a dev snapshot; null when unknown. */
86
- builtAt: z.string().nullable(),
87
- /** How many commits the run's HEAD had that its built-at commit lacks; null when unknown. */
78
+ /** How many commits the run's HEAD had that its base, the commit it was built at, lacks; null when the run state had no count. */
88
79
  builtBehind: z.number().nullable(),
89
80
  url: z.string()
90
81
  }).nullable(),
91
- /** How many bytes of changes the run uploaded to the runner sandbox; null when unknown. */
92
- uploadBytes: z.number().nullable(),
93
- /** Why the run, whose command ended on its own, started no save of a dev snapshot; null when it started one, or when unknown. */
94
- noSaveReason: noSaveReasonSchema.nullable(),
95
- /** How saving the runner sandbox as a dev 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. */
96
- save: z.discriminatedUnion("kind", [
97
- z.object({
98
- kind: z.literal("saved"),
99
- snapshotId: z.string(),
100
- base: z.string(),
101
- branch: z.string().nullable(),
102
- head: z.string(),
103
- ms: z.number(),
104
- sizeBytes: z.number(),
105
- entryWritten: z.boolean(),
106
- url: z.string()
107
- }),
108
- z.object({
109
- kind: z.literal("failed"),
110
- step: z.enum(["scrub", "save-snapshot"]),
111
- message: z.string()
112
- }),
113
- z.object({ kind: z.literal("stopped") })
114
- ]).nullable()
82
+ /** How many bytes of changes the run uploaded to the runner sandbox; null when the run stopped before the upload. */
83
+ uploadBytes: z.number().nullable()
115
84
  })
116
85
  ]).nullable(),
117
86
  /** The Git checkout it started from: HEAD's branch (null when detached), its commit, and whether the working tree had uncommitted changes or untracked files. Null outside a Git checkout, or when unknown. */
@@ -167,13 +136,12 @@ function runFacts(run, now) {
167
136
  }
168
137
  function whereFacts(where, now) {
169
138
  if (where.kind === "unsandboxed") return { kind: "unsandboxed" };
170
- const { sandbox, snapshot, keptUntil, save } = where;
139
+ const { sandbox, snapshot, keptUntil } = where;
171
140
  return {
172
141
  ...where,
173
142
  keptMinutesLeft: keptUntil === null ? null : Math.max(0, Math.floor((Date.parse(keptUntil) - now.getTime()) / 6e4)),
174
143
  sandboxUrl: sandbox === null ? null : sandboxPage(where, sandbox),
175
- snapshot: snapshot === null ? null : { ...snapshot, url: snapshotPage(where, snapshot.id) },
176
- save: save?.kind === "saved" ? { ...save, url: snapshotPage(where, save.snapshotId) } : save
144
+ snapshot: snapshot === null ? null : { ...snapshot, url: snapshotPage(where, snapshot.id) }
177
145
  };
178
146
  }
179
147
  function scopeFacts(scope) {
@@ -2,14 +2,14 @@ import {
2
2
  RESOURCES,
3
3
  liveDriverContexts,
4
4
  liveResourceContexts
5
- } from "./chunk-ISGQJIQM.js";
6
- import "./chunk-IYM44FUX.js";
7
- import "./chunk-LQKNI3EG.js";
5
+ } from "./chunk-Z5OXOZD3.js";
6
+ import "./chunk-UC6DULWY.js";
7
+ import "./chunk-BRUIATTR.js";
8
8
  import {
9
9
  RUNS_SUBPATH,
10
10
  liveRunDirectoryGateway,
11
11
  unavailableRunDirectoryGateway
12
- } from "./chunk-TEEZL3GA.js";
12
+ } from "./chunk-RKONDLPS.js";
13
13
  import {
14
14
  liveCommandGateway,
15
15
  liveJobSummaryGateway,
@@ -17,7 +17,7 @@ import {
17
17
  liveProgressTerminal,
18
18
  resolveStateDirectory,
19
19
  stateDirectoryPattern
20
- } from "./chunk-FSP3SJ35.js";
20
+ } from "./chunk-5TMHYH7G.js";
21
21
  import {
22
22
  RUNNER_SNAPSHOTS_SUBPATH,
23
23
  configResolver,
@@ -33,8 +33,8 @@ import {
33
33
  systemClock,
34
34
  systemTimer,
35
35
  unavailableRunnerSnapshotCacheGateway
36
- } from "./chunk-ODQHQJLE.js";
37
- import "./chunk-YT5OROR7.js";
36
+ } from "./chunk-5ED3IDUJ.js";
37
+ import "./chunk-RA4L2ACU.js";
38
38
  import "./chunk-GQIL3AHY.js";
39
39
  import "./chunk-GSC6SRTW.js";
40
40
  import "./chunk-YM6TZV4L.js";
@@ -7,8 +7,6 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<z.ZodObject<{
7
7
  mint: "mint";
8
8
  }>>;
9
9
  unsandboxed: z.ZodDefault<z.ZodBoolean>;
10
- saveDevSnapshot: z.ZodOptional<z.ZodBoolean>;
11
- noReuseDevSnapshot: z.ZodDefault<z.ZodBoolean>;
12
10
  showOutput: z.ZodDefault<z.ZodBoolean>;
13
11
  keepSandbox: z.ZodOptional<z.ZodString>;
14
12
  verbose: z.ZodDefault<z.ZodBoolean>;
@@ -27,48 +25,13 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<z.ZodObject<{
27
25
  runner: z.ZodNullable<z.ZodObject<{
28
26
  snapshotId: z.ZodString;
29
27
  base: z.ZodString;
30
- snapshotBranch: z.ZodNullable<z.ZodString>;
31
- snapshotHead: z.ZodNullable<z.ZodString>;
32
- snapshotKind: z.ZodEnum<{
33
- base: "base";
34
- dev: "dev";
35
- }>;
36
- snapshotBuiltAt: z.ZodString;
37
- builtBehind: z.ZodNullable<z.ZodNumber>;
28
+ builtBehind: z.ZodNumber;
38
29
  uploadBytes: z.ZodNumber;
39
30
  built: z.ZodBoolean;
40
31
  vcpus: z.ZodNumber;
41
32
  region: z.ZodString;
42
33
  runtime: z.ZodString;
43
34
  buildMs: z.ZodNumber;
44
- save: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
45
- kind: z.ZodLiteral<"saved">;
46
- snapshotId: z.ZodString;
47
- base: z.ZodString;
48
- branch: z.ZodNullable<z.ZodString>;
49
- head: z.ZodString;
50
- ms: z.ZodNumber;
51
- sizeBytes: z.ZodNumber;
52
- entryWritten: z.ZodBoolean;
53
- }, z.core.$strip>, z.ZodObject<{
54
- kind: z.ZodLiteral<"failed">;
55
- step: z.ZodEnum<{
56
- "save-snapshot": "save-snapshot";
57
- scrub: "scrub";
58
- }>;
59
- message: z.ZodString;
60
- }, z.core.$strip>, z.ZodObject<{
61
- kind: z.ZodLiteral<"stopped">;
62
- }, z.core.$strip>], "kind">>;
63
- noSaveReason: z.ZodNullable<z.ZodEnum<{
64
- "already-saved": "already-saved";
65
- ci: "ci";
66
- "command-failed": "command-failed";
67
- "keep-sandbox": "keep-sandbox";
68
- "no-save-flag": "no-save-flag";
69
- "not-trusted": "not-trusted";
70
- recipe: "recipe";
71
- }>>;
72
35
  }, z.core.$strip>>;
73
36
  timeline: z.ZodObject<{
74
37
  startedAt: z.ZodString;
@@ -113,6 +76,7 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<z.ZodObject<{
113
76
  }, z.core.$strip>>;
114
77
  }, z.core.$strip>;
115
78
  runId: z.ZodNullable<z.ZodString>;
79
+ noFinalTestResults: z.ZodBoolean;
116
80
  }, z.core.$strip>;
117
81
  }, {
118
82
  ran: unknown;
@@ -121,10 +85,6 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<z.ZodObject<{
121
85
  flags: string[];
122
86
  configFile: string | null;
123
87
  }]>;
124
- devSnapshotsNotTrusted: import("@vercel/clinkr").SharedError<"dev_snapshots_not_trusted", [data: {
125
- flag: string;
126
- configFile: string | null;
127
- }]>;
128
88
  invalidConfig: import("@vercel/clinkr").SharedError<"invalid_config", [data: {
129
89
  file: string;
130
90
  problems: {
@@ -232,10 +192,6 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<z.ZodObject<{
232
192
  flags: string[];
233
193
  configFile: string | null;
234
194
  }]>;
235
- devSnapshotsNotTrusted: import("@vercel/clinkr").SharedError<"dev_snapshots_not_trusted", [data: {
236
- flag: string;
237
- configFile: string | null;
238
- }]>;
239
195
  invalidConfig: import("@vercel/clinkr").SharedError<"invalid_config", [data: {
240
196
  file: string;
241
197
  problems: {
@@ -352,48 +308,13 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<z.ZodObject<{
352
308
  runner: z.ZodNullable<z.ZodObject<{
353
309
  snapshotId: z.ZodString;
354
310
  base: z.ZodString;
355
- snapshotBranch: z.ZodNullable<z.ZodString>;
356
- snapshotHead: z.ZodNullable<z.ZodString>;
357
- snapshotKind: z.ZodEnum<{
358
- base: "base";
359
- dev: "dev";
360
- }>;
361
- snapshotBuiltAt: z.ZodString;
362
- builtBehind: z.ZodNullable<z.ZodNumber>;
311
+ builtBehind: z.ZodNumber;
363
312
  uploadBytes: z.ZodNumber;
364
313
  built: z.ZodBoolean;
365
314
  vcpus: z.ZodNumber;
366
315
  region: z.ZodString;
367
316
  runtime: z.ZodString;
368
317
  buildMs: z.ZodNumber;
369
- save: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
370
- kind: z.ZodLiteral<"saved">;
371
- snapshotId: z.ZodString;
372
- base: z.ZodString;
373
- branch: z.ZodNullable<z.ZodString>;
374
- head: z.ZodString;
375
- ms: z.ZodNumber;
376
- sizeBytes: z.ZodNumber;
377
- entryWritten: z.ZodBoolean;
378
- }, z.core.$strip>, z.ZodObject<{
379
- kind: z.ZodLiteral<"failed">;
380
- step: z.ZodEnum<{
381
- "save-snapshot": "save-snapshot";
382
- scrub: "scrub";
383
- }>;
384
- message: z.ZodString;
385
- }, z.core.$strip>, z.ZodObject<{
386
- kind: z.ZodLiteral<"stopped">;
387
- }, z.core.$strip>], "kind">>;
388
- noSaveReason: z.ZodNullable<z.ZodEnum<{
389
- "already-saved": "already-saved";
390
- ci: "ci";
391
- "command-failed": "command-failed";
392
- "keep-sandbox": "keep-sandbox";
393
- "no-save-flag": "no-save-flag";
394
- "not-trusted": "not-trusted";
395
- recipe: "recipe";
396
- }>>;
397
318
  }, z.core.$strip>>;
398
319
  timeline: z.ZodObject<{
399
320
  startedAt: z.ZodString;
@@ -438,6 +359,7 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<z.ZodObject<{
438
359
  }, z.core.$strip>>;
439
360
  }, z.core.$strip>;
440
361
  runId: z.ZodNullable<z.ZodString>;
362
+ noFinalTestResults: z.ZodBoolean;
441
363
  }, z.core.$strip>;
442
364
  }, {
443
365
  ran: unknown;
@@ -446,10 +368,6 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<z.ZodObject<{
446
368
  flags: string[];
447
369
  configFile: string | null;
448
370
  }]>;
449
- devSnapshotsNotTrusted: import("@vercel/clinkr").SharedError<"dev_snapshots_not_trusted", [data: {
450
- flag: string;
451
- configFile: string | null;
452
- }]>;
453
371
  invalidConfig: import("@vercel/clinkr").SharedError<"invalid_config", [data: {
454
372
  file: string;
455
373
  problems: {
@@ -557,10 +475,6 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<z.ZodObject<{
557
475
  flags: string[];
558
476
  configFile: string | null;
559
477
  }]>;
560
- devSnapshotsNotTrusted: import("@vercel/clinkr").SharedError<"dev_snapshots_not_trusted", [data: {
561
- flag: string;
562
- configFile: string | null;
563
- }]>;
564
478
  invalidConfig: import("@vercel/clinkr").SharedError<"invalid_config", [data: {
565
479
  file: string;
566
480
  problems: {