@cnc-tools/storm 0.8.1 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/bin/storm.js +3 -14
  2. package/dist/application.d.ts +18 -10
  3. package/dist/application.js +10 -11
  4. package/dist/bin/storm.js +97 -41
  5. package/dist/build-info.js +1 -1
  6. package/dist/chunks/chunk-5CQCRX2L.js +5768 -0
  7. package/dist/chunks/chunk-5U5Q6VZR.js +556 -0
  8. package/dist/chunks/chunk-7O6UN63H.js +63 -0
  9. package/dist/chunks/chunk-I5GZLOLQ.js +38 -0
  10. package/dist/chunks/chunk-NX55IJ5S.js +1842 -0
  11. package/dist/chunks/chunk-OCZJE5XV.js +910 -0
  12. package/dist/chunks/chunk-RRQ2ZGSE.js +1512 -0
  13. package/dist/chunks/chunk-S5NAIZYS.js +13 -0
  14. package/dist/chunks/chunk-UHO5OCEX.js +360 -0
  15. package/dist/chunks/chunk-WBIHJM7D.js +188 -0
  16. package/dist/chunks/chunk-WV6WQFC6.js +436 -0
  17. package/dist/chunks/live-app-X3PW2W42.js +89 -0
  18. package/dist/chunks/version-X7RMSKZI.js +12 -0
  19. package/dist/commands/exec/command.d.ts +32 -0
  20. package/dist/commands/exec/command.js +35 -21
  21. package/dist/commands/exec/metadata.js +66 -58
  22. package/dist/commands/exec/outcomes.d.ts +67 -0
  23. package/dist/commands/exec/outcomes.js +50 -0
  24. package/dist/commands/exec/redaction.js +1 -1
  25. package/dist/commands/exec/run-collector.d.ts +1 -1
  26. package/dist/commands/exec/run-collector.js +1 -1
  27. package/dist/commands/exec/run-command.d.ts +17 -11
  28. package/dist/commands/exec/run-command.js +33 -16
  29. package/dist/commands/exec/run-record.d.ts +1 -1
  30. package/dist/commands/exec/tests-summary.d.ts +1 -1
  31. package/dist/commands/exec/worker-chart.d.ts +1 -1
  32. package/dist/commands/runs/list/command.js +136 -33
  33. package/dist/commands/runs/list/metadata.js +22 -18
  34. package/dist/commands/runs/logs/command.js +131 -48
  35. package/dist/commands/runs/logs/metadata.js +24 -20
  36. package/dist/commands/runs/metadata.js +6 -2
  37. package/dist/commands/runs/past-run.d.ts +1 -1
  38. package/dist/commands/runs/past-run.js +1 -1
  39. package/dist/commands/runs/show/command.js +396 -74
  40. package/dist/commands/runs/show/metadata.js +24 -20
  41. package/dist/commands/vitest/command.d.ts +32 -0
  42. package/dist/commands/vitest/command.js +195 -128
  43. package/dist/commands/vitest/metadata.js +45 -37
  44. package/dist/commands/vitest/outcomes.d.ts +16 -0
  45. package/dist/context.d.ts +1 -1
  46. package/dist/core/events.d.ts +1 -1
  47. package/dist/core/payload.d.ts +1 -1
  48. package/dist/core/payload.js +1 -1
  49. package/dist/core/provider.d.ts +12 -2
  50. package/dist/core/run.d.ts +6 -1
  51. package/dist/core/run.js +2 -2
  52. package/dist/live-app.d.ts +9 -0
  53. package/dist/live-app.js +21 -0
  54. package/dist/resource-commands.d.ts +13 -0
  55. package/dist/resource-commands.js +22 -0
  56. package/dist/resources/github/provider.d.ts +1 -1
  57. package/dist/resources/testserver/command-tree.d.ts +4 -0
  58. package/dist/resources/testserver/command-tree.js +12 -0
  59. package/dist/resources/testserver/commands/create/command.js +373 -194
  60. package/dist/resources/testserver/commands/create/metadata.js +52 -48
  61. package/dist/resources/testserver/commands/list/command.js +195 -50
  62. package/dist/resources/testserver/commands/list/metadata.js +12 -8
  63. package/dist/resources/testserver/provider.d.ts +1 -1
  64. package/dist/resources/testserver/resource-provider.js +2 -8
  65. package/dist/resources.d.ts +0 -3
  66. package/dist/resources.js +5 -10
  67. package/dist/runner/index.d.ts +2 -1
  68. package/dist/runner/index.js +1 -0
  69. package/dist/runner/prepare.d.ts +7 -6
  70. package/dist/runner/prepare.js +1 -1
  71. package/dist/runner/ready.d.ts +6 -0
  72. package/dist/runner/ready.js +33 -5
  73. package/dist/runner/recipe.d.ts +33 -6
  74. package/dist/runner/recipe.js +151 -23
  75. package/dist/runner/remote-command.js +1 -1
  76. package/dist/runner/secrets.d.ts +42 -0
  77. package/dist/runner/secrets.js +44 -0
  78. package/dist/runner/snapshot-build.d.ts +5 -2
  79. package/dist/runner/snapshot-build.js +12 -5
  80. package/dist/runner/snapshot-cache.d.ts +3 -3
  81. package/dist/runner/snapshot-cache.js +2 -2
  82. package/dist/runner/snapshot-key.d.ts +19 -12
  83. package/dist/runner/snapshot-key.js +25 -16
  84. package/dist/runner/snapshot-save.d.ts +5 -3
  85. package/dist/runner/snapshot-save.js +7 -5
  86. package/dist/runner/steps.d.ts +6 -1
  87. package/dist/runner/steps.js +5 -2
  88. package/dist/sdk/host.d.ts +2 -0
  89. package/dist/sdk/host.js +7 -0
  90. package/dist/version.d.ts +2 -2
  91. package/dist/version.js +10 -11
  92. package/dist/vitest/config.d.ts +4 -8
  93. package/dist/vitest/config.js +5 -9
  94. package/dist/vitest/container-scope.d.ts +12 -5
  95. package/dist/vitest/container-scope.js +27 -4
  96. package/dist/vitest/diagnostics.d.ts +8 -2
  97. package/dist/vitest/diagnostics.js +7 -4
  98. package/dist/vitest/fixtures.d.ts +4 -1
  99. package/dist/vitest/fixtures.js +17 -6
  100. package/dist/vitest/plan.d.ts +1 -1
  101. package/dist/vitest/plan.js +2 -2
  102. package/dist/vitest/sandbox.d.ts +6 -0
  103. package/dist/vitest/sandbox.js +6 -0
  104. package/package.json +4 -3
  105. package/skills/overview.md +1 -0
  106. package/bin/node-version.js +0 -24
  107. package/dist/closed-terminal.d.ts +0 -7
  108. package/dist/closed-terminal.js +0 -18
@@ -1,24 +0,0 @@
1
- // The Node version check `storm.js` runs before it loads anything else. Plain JavaScript without
2
- // syntax newer than Node 12's (no `?.`, no `??`), so an old Node reaches the message instead of a
3
- // syntax error.
4
-
5
- const REQUIRED = [22, 19, 0];
6
-
7
- /**
8
- * The message to print when `version` (as in `process.versions.node`, such as `22.18.0`) is older
9
- * than Node 22.19.0, or `undefined` when it is new enough.
10
- *
11
- * @param {string} version
12
- * @returns {string | undefined}
13
- */
14
- export function nodeVersionProblem(version) {
15
- // A part that isn't a number counts as 0, and so does a missing one.
16
- const parts = version.split(".").map((part) => Number.parseInt(part, 10) || 0);
17
- for (let index = 0; index < REQUIRED.length; index++) {
18
- const part = parts[index] ?? 0;
19
- const required = REQUIRED[index] ?? 0;
20
- if (part > required) return undefined;
21
- if (part < required) return `storm needs Node 22.19 or later (this is Node ${version})`;
22
- }
23
- return undefined;
24
- }
@@ -1,7 +0,0 @@
1
- /** Whether `error` is a write to a terminal that has closed. */
2
- export declare function isClosedTerminalError(error: unknown): boolean;
3
- /**
4
- * The exit status after a closed terminal kept the outcome from being written: the status the command recorded
5
- * (a run's command's code), else 128 + n for the first signal, as Clinkr would have exited, else 1.
6
- */
7
- export declare function closedTerminalStatus(recorded: number | undefined, signalReason: unknown): number;
@@ -1,18 +0,0 @@
1
- // What storm exits with when Clinkr can't write a command's outcome because the terminal has closed. After
2
- // SIGHUP from a closed terminal, a write to it fails with EIO, which Clinkr's writer rejects with (unlike EPIPE, a
3
- // closed pipe, which it ignores). By then the command has returned: a run has stopped and deleted its sandboxes and
4
- // released its leases, and only its outcome went unwritten.
5
- import { NodeSignalCancellation } from "@vercel/clinkr/node";
6
- /** Whether `error` is a write to a terminal that has closed. */
7
- export function isClosedTerminalError(error) {
8
- return error instanceof Error && Reflect.get(error, "code") === "EIO";
9
- }
10
- /**
11
- * The exit status after a closed terminal kept the outcome from being written: the status the command recorded
12
- * (a run's command's code), else 128 + n for the first signal, as Clinkr would have exited, else 1.
13
- */
14
- export function closedTerminalStatus(recorded, signalReason) {
15
- if (recorded !== undefined)
16
- return recorded;
17
- return signalReason instanceof NodeSignalCancellation ? signalReason.exitStatus : 1;
18
- }