@cnc-tools/storm 0.11.0 → 0.13.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 (442) hide show
  1. package/dist/bin/storm.js +7 -12
  2. package/dist/build-info.js +1 -1
  3. package/dist/chunks/chunk-2NZXL6OH.js +62 -0
  4. package/dist/chunks/{chunk-3ZZVZPMG.js → chunk-43MWZLJR.js} +1 -1
  5. package/dist/chunks/{chunk-NPPJ57W7.js → chunk-5UMJNVKT.js} +498 -215
  6. package/dist/chunks/{chunk-KR7WIYLG.js → chunk-6EQKA7LI.js} +200 -985
  7. package/dist/chunks/{chunk-4EU4AH7E.js → chunk-AX4EQZUS.js} +186 -144
  8. package/dist/chunks/{chunk-ETCZ6WP7.js → chunk-BW2ADH7U.js} +1 -1
  9. package/dist/chunks/chunk-DOFB2ACU.js +49 -0
  10. package/dist/chunks/chunk-EGNP3S6C.js +161 -0
  11. package/dist/chunks/chunk-GQIL3AHY.js +20 -0
  12. package/dist/chunks/{chunk-ICB4BZJX.js → chunk-GSC6SRTW.js} +7 -2
  13. package/dist/chunks/{chunk-OJOKQRM6.js → chunk-IYM44FUX.js} +30 -26
  14. package/dist/chunks/{chunk-GRMD7G4J.js → chunk-LQKNI3EG.js} +6 -5
  15. package/dist/chunks/chunk-N7E6DAUE.js +40 -0
  16. package/dist/chunks/chunk-NMVODY3P.js +19 -0
  17. package/dist/chunks/{chunk-TRFEAYNC.js → chunk-Q4TKRILH.js} +261 -354
  18. package/dist/chunks/{chunk-VZZTHCBW.js → chunk-RTILVSYQ.js} +5 -18
  19. package/dist/chunks/{chunk-L4ZPMSKQ.js → chunk-T6AZIDZD.js} +43 -363
  20. package/dist/chunks/chunk-X4WBJIOF.js +308 -0
  21. package/dist/chunks/chunk-YGS5VRQT.js +794 -0
  22. package/dist/chunks/{chunk-4PRAB24Y.js → chunk-YM6TZV4L.js} +394 -396
  23. package/dist/chunks/{chunk-AMTYHUYB.js → chunk-YT5OROR7.js} +22 -8
  24. package/dist/chunks/{chunk-O4BUT7BE.js → chunk-ZDJLKF2G.js} +1625 -1583
  25. package/dist/chunks/{live-app-LOGYUBKB.js → live-app-QFHS54SX.js} +25 -46
  26. package/dist/command-tree.d.ts +4 -1
  27. package/dist/command-tree.js +4 -1
  28. package/dist/commands/exec/cleanup.js +4 -4
  29. package/dist/commands/exec/command.d.ts +6 -55
  30. package/dist/commands/exec/command.js +51 -46
  31. package/dist/commands/exec/define-run-command.d.ts +664 -0
  32. package/dist/commands/exec/define-run-command.js +58 -0
  33. package/dist/commands/exec/driver-plan.d.ts +30 -0
  34. package/dist/commands/exec/driver-plan.js +44 -0
  35. package/dist/commands/exec/driver-refusals.d.ts +89 -0
  36. package/dist/commands/exec/driver-refusals.js +65 -0
  37. package/dist/commands/exec/exec-words.d.ts +5 -0
  38. package/dist/commands/exec/exec-words.js +31 -0
  39. package/dist/commands/exec/live-view.js +68 -42
  40. package/dist/commands/exec/mint-failed.js +4 -4
  41. package/dist/commands/exec/outcomes.d.ts +6 -48
  42. package/dist/commands/exec/outcomes.js +10 -12
  43. package/dist/commands/exec/plan-run.js +3 -3
  44. package/dist/commands/exec/progress.d.ts +21 -17
  45. package/dist/commands/exec/progress.js +59 -78
  46. package/dist/commands/exec/resource-flags.d.ts +10 -3
  47. package/dist/commands/exec/resource-flags.js +25 -14
  48. package/dist/commands/exec/resource-refusals.d.ts +1 -1
  49. package/dist/commands/exec/resource-refusals.js +9 -9
  50. package/dist/commands/exec/run-bin.d.ts +35 -0
  51. package/dist/commands/exec/run-bin.js +32 -0
  52. package/dist/commands/exec/run-command.d.ts +64 -23
  53. package/dist/commands/exec/run-command.js +35 -94
  54. package/dist/commands/exec/run-metadata.d.ts +25 -19
  55. package/dist/commands/exec/run-metadata.js +34 -18
  56. package/dist/commands/exec/snapshot-text.d.ts +31 -0
  57. package/dist/commands/exec/snapshot-text.js +72 -0
  58. package/dist/commands/exec/test-plan.d.ts +2 -2
  59. package/dist/commands/exec/test-plan.js +11 -8
  60. package/dist/commands/exec/tests-summary.d.ts +21 -12
  61. package/dist/commands/exec/tests-summary.js +67 -39
  62. package/dist/commands/exec/text.d.ts +5 -0
  63. package/dist/commands/exec/text.js +7 -0
  64. package/dist/commands/exec/view.js +12 -13
  65. package/dist/commands/exec/waterfall.js +4 -4
  66. package/dist/commands/exec/worker-chart.d.ts +19 -11
  67. package/dist/commands/exec/worker-chart.js +66 -36
  68. package/dist/commands/playwright/command.d.ts +658 -0
  69. package/dist/commands/playwright/command.js +31 -0
  70. package/dist/commands/playwright/metadata.js +8 -0
  71. package/dist/commands/runs/facts.d.ts +5 -28
  72. package/dist/commands/runs/facts.js +11 -33
  73. package/dist/commands/runs/list/command.d.ts +4 -50
  74. package/dist/commands/runs/list/command.js +15 -11
  75. package/dist/commands/runs/list/outcomes.d.ts +2 -25
  76. package/dist/commands/runs/logs/command.js +13 -9
  77. package/dist/commands/runs/logs/outcomes.js +1 -1
  78. package/dist/commands/runs/show/command.d.ts +6 -50
  79. package/dist/commands/runs/show/command.js +37 -47
  80. package/dist/commands/runs/show/metadata.js +1 -1
  81. package/dist/commands/runs/show/outcomes.d.ts +3 -25
  82. package/dist/commands/runs/show/outcomes.js +18 -31
  83. package/dist/commands/snapshots/build/command.d.ts +501 -0
  84. package/dist/commands/snapshots/build/command.js +336 -0
  85. package/dist/commands/snapshots/build/metadata.d.ts +28 -0
  86. package/dist/commands/snapshots/build/metadata.js +37 -0
  87. package/dist/commands/snapshots/build/outcomes.d.ts +254 -0
  88. package/dist/commands/snapshots/build/outcomes.js +155 -0
  89. package/dist/commands/snapshots/list/command.d.ts +238 -0
  90. package/dist/commands/snapshots/list/command.js +269 -0
  91. package/dist/commands/snapshots/list/metadata.d.ts +16 -0
  92. package/dist/commands/snapshots/list/metadata.js +24 -0
  93. package/dist/commands/snapshots/list/outcomes.d.ts +148 -0
  94. package/dist/commands/snapshots/list/outcomes.js +217 -0
  95. package/dist/commands/snapshots/metadata.d.ts +3 -0
  96. package/dist/commands/snapshots/metadata.js +7 -0
  97. package/dist/commands/vitest/command.d.ts +185 -304
  98. package/dist/commands/vitest/command.js +23 -181
  99. package/dist/commands/vitest/metadata.js +1 -1
  100. package/dist/config-file/define.d.ts +1 -1
  101. package/dist/context.d.ts +32 -30
  102. package/dist/context.js +13 -17
  103. package/dist/core/before-run.d.ts +5 -5
  104. package/dist/core/before-run.js +8 -8
  105. package/dist/core/definition-lookup.d.ts +5 -5
  106. package/dist/core/definition-lookup.js +13 -12
  107. package/dist/core/drivers-of.d.ts +23 -0
  108. package/dist/core/drivers-of.js +13 -0
  109. package/dist/core/events.d.ts +6 -9
  110. package/dist/core/gateways.d.ts +32 -24
  111. package/dist/core/index.d.ts +7 -5
  112. package/dist/core/index.js +9 -6
  113. package/dist/core/launcher-context.d.ts +11 -0
  114. package/dist/core/launcher-context.js +31 -0
  115. package/dist/core/live/package-bin-gateway.d.ts +6 -0
  116. package/dist/core/live/package-bin-gateway.js +24 -0
  117. package/dist/core/package-bin.d.ts +7 -0
  118. package/dist/core/package-bin.js +30 -0
  119. package/dist/core/presentations.d.ts +1 -1
  120. package/dist/core/presentations.js +6 -5
  121. package/dist/core/{resource-registry.d.ts → resource-definition-set.d.ts} +15 -14
  122. package/dist/core/resource-definition-set.js +31 -0
  123. package/dist/core/resource-reports.d.ts +1 -1
  124. package/dist/core/resource-reports.js +16 -15
  125. package/dist/core/resource.d.ts +4 -4
  126. package/dist/core/resources.d.ts +6 -6
  127. package/dist/core/resources.js +11 -11
  128. package/dist/core/run-state.d.ts +20 -31
  129. package/dist/core/run-state.js +34 -25
  130. package/dist/core/run.d.ts +30 -32
  131. package/dist/core/run.js +33 -39
  132. package/dist/core/setup-phases.d.ts +14 -0
  133. package/dist/core/setup-phases.js +24 -0
  134. package/dist/core/state-directory.d.ts +2 -2
  135. package/dist/core/state-directory.js +3 -3
  136. package/dist/core/timeline.d.ts +4 -2
  137. package/dist/core/timeline.js +11 -5
  138. package/dist/extension-commands.js +6 -10
  139. package/dist/extensions/github/{world.d.ts → context.d.ts} +1 -1
  140. package/dist/extensions/github/context.js +3 -0
  141. package/dist/extensions/github/definition.d.ts +1 -1
  142. package/dist/extensions/github/definition.js +3 -3
  143. package/dist/extensions/github/extension.d.ts +1 -1
  144. package/dist/extensions/github/index.d.ts +2 -2
  145. package/dist/extensions/github/index.js +4 -4
  146. package/dist/extensions/github/lifecycle.d.ts +3 -3
  147. package/dist/extensions/github/lifecycle.js +14 -14
  148. package/dist/extensions/github/live/context.d.ts +6 -0
  149. package/dist/extensions/github/live/context.js +16 -0
  150. package/dist/extensions/github/resource.d.ts +1 -1
  151. package/dist/extensions/playwright/driver.d.ts +8 -0
  152. package/dist/extensions/playwright/driver.js +60 -0
  153. package/dist/extensions/playwright/extension.d.ts +2 -0
  154. package/dist/extensions/playwright/extension.js +12 -0
  155. package/dist/extensions/playwright/plan/gateways.d.ts +62 -0
  156. package/dist/extensions/playwright/plan/gateways.js +4 -0
  157. package/dist/extensions/playwright/plan/list-output.d.ts +26 -0
  158. package/dist/extensions/playwright/plan/list-output.js +101 -0
  159. package/dist/extensions/playwright/plan/live/list-gateway.d.ts +15 -0
  160. package/dist/extensions/playwright/plan/live/list-gateway.js +100 -0
  161. package/dist/extensions/playwright/plan/plan.d.ts +44 -0
  162. package/dist/extensions/playwright/plan/plan.js +53 -0
  163. package/dist/extensions/testserver/command-tree.d.ts +1 -1
  164. package/dist/extensions/testserver/command-tree.js +2 -2
  165. package/dist/extensions/testserver/commands/app.d.ts +7 -7
  166. package/dist/extensions/testserver/commands/pool/create/command.d.ts +5 -5
  167. package/dist/extensions/testserver/commands/pool/create/command.js +12 -13
  168. package/dist/extensions/testserver/commands/pool/list/command.js +5 -6
  169. package/dist/extensions/testserver/{world.d.ts → context.d.ts} +1 -1
  170. package/dist/extensions/testserver/context.js +4 -0
  171. package/dist/extensions/testserver/definition.d.ts +2 -2
  172. package/dist/extensions/testserver/definition.js +8 -7
  173. package/dist/extensions/testserver/events.d.ts +1 -1
  174. package/dist/extensions/testserver/extension.d.ts +4 -3
  175. package/dist/extensions/testserver/extension.js +33 -20
  176. package/dist/extensions/testserver/index.d.ts +2 -2
  177. package/dist/extensions/testserver/index.js +2 -2
  178. package/dist/extensions/testserver/lifecycle.d.ts +6 -5
  179. package/dist/extensions/testserver/lifecycle.js +9 -8
  180. package/dist/extensions/testserver/live/context.d.ts +8 -0
  181. package/dist/extensions/testserver/live/{world.js → context.js} +6 -7
  182. package/dist/extensions/testserver/options/rules.d.ts +3 -3
  183. package/dist/extensions/testserver/options/rules.js +5 -4
  184. package/dist/extensions/testserver/options/sandboxes.d.ts +3 -2
  185. package/dist/extensions/testserver/options/sandboxes.js +3 -2
  186. package/dist/extensions/testserver/playwright/index.d.ts +33 -0
  187. package/dist/extensions/testserver/playwright/index.js +43 -0
  188. package/dist/extensions/testserver/presentation.d.ts +4 -4
  189. package/dist/extensions/testserver/presentation.js +7 -7
  190. package/dist/extensions/testserver/progress.d.ts +3 -3
  191. package/dist/extensions/testserver/progress.js +3 -3
  192. package/dist/extensions/testserver/provision.d.ts +2 -2
  193. package/dist/extensions/testserver/provision.js +10 -10
  194. package/dist/extensions/testserver/resource.d.ts +2 -2
  195. package/dist/extensions/testserver/result.d.ts +2 -2
  196. package/dist/extensions/testserver/result.js +1 -1
  197. package/dist/extensions/testserver/run/connection.d.ts +1 -1
  198. package/dist/extensions/testserver/run/connection.js +3 -3
  199. package/dist/extensions/testserver/run/sandbox.d.ts +31 -0
  200. package/dist/extensions/testserver/run/sandbox.js +58 -0
  201. package/dist/extensions/testserver/run-sandbox.d.ts +2 -2
  202. package/dist/extensions/testserver/run-sandbox.js +3 -3
  203. package/dist/extensions/testserver/vercel-cli/arguments.d.ts +2 -2
  204. package/dist/extensions/testserver/vercel-cli/arguments.js +6 -6
  205. package/dist/extensions/testserver/vercel-cli/auth-config.d.ts +7 -7
  206. package/dist/extensions/testserver/vercel-cli/auth-config.js +4 -4
  207. package/dist/extensions/testserver/vercel-cli/clock.js +1 -1
  208. package/dist/extensions/testserver/vercel-cli/config-files.js +1 -1
  209. package/dist/extensions/testserver/vercel-cli/context.d.ts +1 -1
  210. package/dist/extensions/testserver/vercel-cli/context.js +2 -2
  211. package/dist/extensions/testserver/vercel-cli/entry.d.ts +1 -1
  212. package/dist/extensions/testserver/vercel-cli/entry.js +1 -1
  213. package/dist/extensions/testserver/vercel-cli/environment.d.ts +5 -5
  214. package/dist/extensions/testserver/vercel-cli/environment.js +6 -6
  215. package/dist/extensions/testserver/vercel-cli/gateways.d.ts +1 -1
  216. package/dist/extensions/testserver/vercel-cli/gateways.js +3 -3
  217. package/dist/extensions/testserver/vercel-cli/index.d.ts +1 -1
  218. package/dist/extensions/testserver/vercel-cli/index.js +8 -9
  219. package/dist/extensions/testserver/vercel-cli/invocation.d.ts +13 -12
  220. package/dist/extensions/testserver/vercel-cli/invocation.js +1 -1
  221. package/dist/extensions/testserver/vercel-cli/{driver.d.ts → invoker.d.ts} +18 -17
  222. package/dist/extensions/testserver/vercel-cli/{driver.js → invoker.js} +8 -8
  223. package/dist/extensions/testserver/vercel-cli/live/config-files.d.ts +2 -2
  224. package/dist/extensions/testserver/vercel-cli/live/config-files.js +2 -2
  225. package/dist/extensions/testserver/vercel-cli/live/process-gateway.js +1 -1
  226. package/dist/extensions/testserver/vercel-cli/report.js +2 -2
  227. package/dist/extensions/testserver/vercel-cli/verbose.js +1 -1
  228. package/dist/extensions/testserver/vitest/config.d.ts +3 -3
  229. package/dist/extensions/testserver/vitest/config.js +5 -13
  230. package/dist/extensions/testserver/vitest/container-scope.d.ts +11 -11
  231. package/dist/extensions/testserver/vitest/container-scope.js +9 -9
  232. package/dist/extensions/testserver/vitest/container-start.d.ts +6 -6
  233. package/dist/extensions/testserver/vitest/container-start.js +14 -11
  234. package/dist/extensions/testserver/vitest/diagnostics.d.ts +1 -1
  235. package/dist/extensions/testserver/vitest/fixtures.d.ts +11 -11
  236. package/dist/extensions/testserver/vitest/fixtures.js +14 -23
  237. package/dist/extensions/testserver/vitest/index.d.ts +1 -1
  238. package/dist/extensions/testserver/vitest/index.js +4 -4
  239. package/dist/extensions/testserver/vitest/types.d.ts +16 -18
  240. package/dist/extensions/testserver/vitest/types.js +2 -2
  241. package/dist/extensions/testserver/vitest/worker-sandbox.d.ts +8 -0
  242. package/dist/extensions/testserver/vitest/worker-sandbox.js +17 -0
  243. package/dist/extensions/vitest/driver.d.ts +8 -0
  244. package/dist/extensions/vitest/driver.js +62 -0
  245. package/dist/extensions/vitest/extension.d.ts +2 -0
  246. package/dist/extensions/vitest/extension.js +8 -0
  247. package/dist/{vitest → extensions/vitest/plan}/gateways.d.ts +1 -26
  248. package/dist/extensions/vitest/plan/gateways.js +3 -0
  249. package/dist/{vitest → extensions/vitest/plan}/live/list-gateway.d.ts +1 -2
  250. package/dist/{vitest → extensions/vitest/plan}/live/list-gateway.js +1 -20
  251. package/dist/extensions/vitest/plan/plan-over.d.ts +38 -0
  252. package/dist/extensions/vitest/plan/plan-over.js +31 -0
  253. package/dist/extensions/vitest/plan/plan.d.ts +24 -0
  254. package/dist/{vitest → extensions/vitest/plan}/plan.js +11 -26
  255. package/dist/extensions.d.ts +40 -18
  256. package/dist/extensions.js +49 -22
  257. package/dist/forward-sigterm.js +1 -1
  258. package/dist/launcher-resolvers/index.d.ts +1 -1
  259. package/dist/launcher-resolvers/local-services.d.ts +9 -44
  260. package/dist/launcher-resolvers/local-services.js +4 -5
  261. package/dist/live-app.js +7 -6
  262. package/dist/local-services.d.ts +7 -15
  263. package/dist/local-services.js +8 -29
  264. package/dist/playwright/index.d.ts +1 -0
  265. package/dist/playwright/index.js +4 -0
  266. package/dist/playwright/reporter.d.ts +96 -0
  267. package/dist/playwright/reporter.js +162 -0
  268. package/dist/playwright/worker-index.d.ts +7 -0
  269. package/dist/playwright/worker-index.js +20 -0
  270. package/dist/run-directory/index.d.ts +1 -1
  271. package/dist/run-directory/index.js +2 -3
  272. package/dist/run-directory/plan.d.ts +3 -3
  273. package/dist/run-directory/plan.js +5 -5
  274. package/dist/run-directory/reader.js +2 -2
  275. package/dist/run-directory/recording.d.ts +8 -5
  276. package/dist/run-directory/recording.js +6 -6
  277. package/dist/run-directory/run-collector.d.ts +5 -5
  278. package/dist/run-directory/run-collector.js +5 -5
  279. package/dist/run-directory/run-record.d.ts +17 -90
  280. package/dist/run-directory/run-record.js +15 -55
  281. package/dist/run-directory/timeline-facts.d.ts +2 -1
  282. package/dist/run-directory/timeline-facts.js +4 -2
  283. package/dist/runner/build-snapshots.d.ts +115 -0
  284. package/dist/runner/build-snapshots.js +146 -0
  285. package/dist/runner/context.js +2 -1
  286. package/dist/runner/events.d.ts +24 -69
  287. package/dist/runner/gateways.d.ts +20 -18
  288. package/dist/runner/index.d.ts +8 -7
  289. package/dist/runner/index.js +5 -3
  290. package/dist/runner/live/checkout-gateway.js +15 -7
  291. package/dist/runner/live/snapshot-records.js +7 -17
  292. package/dist/runner/prepare.d.ts +17 -50
  293. package/dist/runner/prepare.js +21 -25
  294. package/dist/runner/ready.d.ts +15 -11
  295. package/dist/runner/ready.js +32 -40
  296. package/dist/runner/recipe.d.ts +4 -18
  297. package/dist/runner/recipe.js +1 -13
  298. package/dist/runner/scope.d.ts +8 -32
  299. package/dist/runner/scope.js +4 -12
  300. package/dist/runner/secrets.d.ts +6 -0
  301. package/dist/runner/secrets.js +10 -0
  302. package/dist/runner/session.d.ts +19 -38
  303. package/dist/runner/session.js +16 -55
  304. package/dist/runner/snapshot-build.d.ts +21 -11
  305. package/dist/runner/snapshot-build.js +11 -16
  306. package/dist/runner/snapshot-cache.d.ts +98 -72
  307. package/dist/runner/snapshot-cache.js +69 -118
  308. package/dist/runner/snapshot-inspect.d.ts +85 -0
  309. package/dist/runner/snapshot-inspect.js +164 -0
  310. package/dist/runner/snapshot-key.d.ts +13 -15
  311. package/dist/runner/snapshot-key.js +15 -22
  312. package/dist/sdk/extension/commands.d.ts +35 -17
  313. package/dist/sdk/extension/commands.js +13 -11
  314. package/dist/sdk/extension/driver.d.ts +143 -0
  315. package/dist/sdk/extension/driver.js +28 -0
  316. package/dist/sdk/extension/index.d.ts +2 -1
  317. package/dist/sdk/extension/index.js +15 -9
  318. package/dist/sdk/extension/{launcher-supplies.d.ts → launcher-context.d.ts} +3 -3
  319. package/dist/sdk/extension/launcher-context.js +5 -0
  320. package/dist/sdk/extension/lifecycle.d.ts +6 -5
  321. package/dist/sdk/extension/lifecycle.js +2 -2
  322. package/dist/sdk/extension/resource-definition.d.ts +13 -13
  323. package/dist/sdk/extension/resource-definition.js +2 -2
  324. package/dist/sdk/extension/resource.d.ts +13 -13
  325. package/dist/sdk/extension/resource.js +11 -11
  326. package/dist/sdk/extension/time.js +2 -2
  327. package/dist/sdk/index.d.ts +2 -0
  328. package/dist/sdk/index.js +3 -1
  329. package/dist/sdk/run/launcher.d.ts +1 -1
  330. package/dist/sdk/run/launcher.js +4 -3
  331. package/dist/sdk/run/payload.js +1 -1
  332. package/dist/sdk/run/test-events.d.ts +24 -18
  333. package/dist/sdk/run/test-events.js +5 -4
  334. package/dist/sdk/run/test-result-writer.d.ts +77 -0
  335. package/dist/sdk/run/test-result-writer.js +143 -0
  336. package/dist/sdk/run/worker-test-event-writer.d.ts +13 -0
  337. package/dist/sdk/run/worker-test-event-writer.js +31 -0
  338. package/dist/vendor/testserver-sdk/container/container.d.ts +1 -6
  339. package/dist/vendor/testserver-sdk/container/container.js +1 -5
  340. package/dist/vendor/testserver-sdk/factories/build.d.ts +12 -40
  341. package/dist/vendor/testserver-sdk/factories/build.js +15 -66
  342. package/dist/vendor/testserver-sdk/factories/gateways.d.ts +1 -2
  343. package/dist/vendor/testserver-sdk/factories/index.d.ts +1 -3
  344. package/dist/vendor/testserver-sdk/factories/index.js +3 -5
  345. package/dist/vendor/testserver-sdk/index.d.ts +1 -2
  346. package/dist/vendor/testserver-sdk/index.js +5 -6
  347. package/dist/vendor/testserver-sdk/records/body.d.ts +1 -1
  348. package/dist/vendor/testserver-sdk/records/body.js +1 -1
  349. package/dist/vitest/index.d.ts +2 -1
  350. package/dist/vitest/index.js +6 -4
  351. package/dist/vitest/test-events.d.ts +6 -16
  352. package/dist/vitest/test-events.js +15 -40
  353. package/dist/vitest/test-results.d.ts +9 -31
  354. package/dist/vitest/test-results.js +34 -105
  355. package/dist/vitest/worker-index.d.ts +6 -0
  356. package/dist/vitest/worker-index.js +17 -0
  357. package/package.json +23 -9
  358. package/skills/overview.md +6 -8
  359. package/skills/read-run-output.md +21 -7
  360. package/dist/chunks/chunk-FVMQKYTT.js +0 -10
  361. package/dist/chunks/chunk-SLNKW4ZM.js +0 -40
  362. package/dist/chunks/chunk-WNIQA5J6.js +0 -19
  363. package/dist/chunks/chunk-WSIF7SR6.js +0 -10
  364. package/dist/commands/vitest/outcomes.d.ts +0 -379
  365. package/dist/commands/vitest/outcomes.js +0 -70
  366. package/dist/core/launcher-supplies.d.ts +0 -11
  367. package/dist/core/launcher-supplies.js +0 -28
  368. package/dist/core/live/terminal-command-gateway.d.ts +0 -8
  369. package/dist/core/live/terminal-command-gateway.js +0 -49
  370. package/dist/core/resource-registry.js +0 -30
  371. package/dist/extensions/github/live/world.d.ts +0 -6
  372. package/dist/extensions/github/live/world.js +0 -16
  373. package/dist/extensions/github/world.js +0 -3
  374. package/dist/extensions/story/command-tree.d.ts +0 -6
  375. package/dist/extensions/story/command-tree.js +0 -21
  376. package/dist/extensions/story/commands/app.d.ts +0 -23
  377. package/dist/extensions/story/commands/app.js +0 -5
  378. package/dist/extensions/story/commands/run/command.d.ts +0 -211
  379. package/dist/extensions/story/commands/run/command.js +0 -259
  380. package/dist/extensions/story/commands/run/metadata.js +0 -8
  381. package/dist/extensions/story/commands/run/outcomes.d.ts +0 -101
  382. package/dist/extensions/story/commands/run/outcomes.js +0 -73
  383. package/dist/extensions/story/commands/tree.d.ts +0 -2
  384. package/dist/extensions/story/commands/tree.js +0 -6
  385. package/dist/extensions/story/extension.d.ts +0 -2
  386. package/dist/extensions/story/extension.js +0 -8
  387. package/dist/extensions/testserver/live/world.d.ts +0 -8
  388. package/dist/extensions/testserver/vitest/sandbox.d.ts +0 -25
  389. package/dist/extensions/testserver/vitest/sandbox.js +0 -43
  390. package/dist/extensions/testserver/world.js +0 -4
  391. package/dist/runner/snapshot-save.d.ts +0 -56
  392. package/dist/runner/snapshot-save.js +0 -151
  393. package/dist/sdk/extension/launcher-supplies.js +0 -3
  394. package/dist/story/align.d.ts +0 -37
  395. package/dist/story/align.js +0 -39
  396. package/dist/story/command-line.d.ts +0 -24
  397. package/dist/story/command-line.js +0 -88
  398. package/dist/story/definition.d.ts +0 -59
  399. package/dist/story/definition.js +0 -9
  400. package/dist/story/diff.d.ts +0 -9
  401. package/dist/story/diff.js +0 -97
  402. package/dist/story/errors.d.ts +0 -14
  403. package/dist/story/errors.js +0 -21
  404. package/dist/story/gateways.d.ts +0 -94
  405. package/dist/story/gateways.js +0 -3
  406. package/dist/story/host.d.ts +0 -30
  407. package/dist/story/host.js +0 -97
  408. package/dist/story/index.d.ts +0 -8
  409. package/dist/story/index.js +0 -11
  410. package/dist/story/json.d.ts +0 -16
  411. package/dist/story/json.js +0 -59
  412. package/dist/story/launch.d.ts +0 -70
  413. package/dist/story/launch.js +0 -77
  414. package/dist/story/live/recording-gateway.d.ts +0 -2
  415. package/dist/story/live/recording-gateway.js +0 -103
  416. package/dist/story/orphans.d.ts +0 -35
  417. package/dist/story/orphans.js +0 -51
  418. package/dist/story/recording.d.ts +0 -62
  419. package/dist/story/recording.js +0 -97
  420. package/dist/story/report.d.ts +0 -42
  421. package/dist/story/report.js +0 -129
  422. package/dist/story/sequence.d.ts +0 -30
  423. package/dist/story/sequence.js +0 -74
  424. package/dist/story/settle.d.ts +0 -96
  425. package/dist/story/settle.js +0 -71
  426. package/dist/story/start.d.ts +0 -50
  427. package/dist/story/start.js +0 -183
  428. package/dist/vendor/testserver-sdk/factories/definition.d.ts +0 -39
  429. package/dist/vendor/testserver-sdk/factories/definition.js +0 -16
  430. package/dist/vendor/testserver-sdk/factories/definitions.d.ts +0 -169
  431. package/dist/vendor/testserver-sdk/factories/definitions.js +0 -245
  432. package/dist/vendor/testserver-sdk/seed/index.d.ts +0 -1
  433. package/dist/vendor/testserver-sdk/seed/index.js +0 -3
  434. package/dist/vendor/testserver-sdk/seed/seed.d.ts +0 -221
  435. package/dist/vendor/testserver-sdk/seed/seed.js +0 -171
  436. package/dist/vitest/find-vitest.d.ts +0 -7
  437. package/dist/vitest/find-vitest.js +0 -28
  438. package/dist/vitest/gateways.js +0 -4
  439. package/dist/vitest/plan.d.ts +0 -51
  440. /package/dist/{extensions/story/commands/run → commands/playwright}/metadata.d.ts +0 -0
  441. /package/dist/{vitest → extensions/vitest/plan}/list-output.d.ts +0 -0
  442. /package/dist/{vitest → extensions/vitest/plan}/list-output.js +0 -0
@@ -11,34 +11,13 @@ export interface VitestListRequest {
11
11
  readonly args: readonly string[];
12
12
  /** Where vitest runs; default the current directory. */
13
13
  readonly cwd?: string;
14
- /** The `vitest` to start, such as the absolute path `findVitest` found; default `vitest` from `PATH`. */
14
+ /** The `vitest` to start, such as the absolute path of a `node_modules/.bin/vitest`; default `vitest` from `PATH`. */
15
15
  readonly executable?: string;
16
16
  /** How long the listing may take before it is killed. */
17
17
  readonly timeoutMs: number;
18
18
  /** Stops the listing when it aborts, before it starts or while it runs: the listing is `canceled`. */
19
19
  readonly signal?: AbortSignal;
20
20
  }
21
- /** Where to look for `vitest`: in `node_modules/.bin` of `from` and of each directory above it, up to `root`. */
22
- export interface FindVitestRequest {
23
- /** The directory vitest runs in, an absolute path. */
24
- readonly from: string;
25
- /**
26
- * The last directory to look in, an absolute path: the repository's root, or the filesystem's root outside a
27
- * repository. When `from` isn't inside it, the search goes on up to the filesystem's root.
28
- */
29
- readonly root: string;
30
- }
31
- /**
32
- * The `vitest` found nearest `from`, as an absolute path to its `node_modules/.bin/vitest`; or, when no directory has
33
- * one, every directory looked in, nearest first (`vitestSearchDirectories`).
34
- */
35
- export type FindVitestResult = {
36
- readonly ok: true;
37
- readonly path: string;
38
- } | {
39
- readonly ok: false;
40
- readonly searched: readonly string[];
41
- };
42
21
  /**
43
22
  * Why the tests couldn't be listed: `vitest` couldn't be started (not on `PATH` or not found, or no such `cwd`), it
44
23
  * didn't finish within `timeoutMs`, it exited other than 0 (with the last line of its stderr that isn't blank or a
@@ -71,8 +50,4 @@ export type VitestListResult = {
71
50
  export interface VitestListGateway {
72
51
  /** Lists the tests a `vitest run` with the same arguments would run, without running them. */
73
52
  listTests(request: VitestListRequest): Promise<VitestListResult>;
74
- /**
75
- * Finds the `vitest` a package's scripts would run: the nearest `node_modules/.bin/vitest` from `from` up to `root`.
76
- */
77
- findVitest(request: FindVitestRequest): Promise<FindVitestResult>;
78
53
  }
@@ -0,0 +1,3 @@
1
+ // storm's Vitest driver's gateway: listing the tests a `vitest run` would run, before any resource is acquired. The
2
+ // live gateway is `live/list-gateway.ts`; the fake is `test/fakes/extensions/vitest/plan/list-gateway.ts`.
3
+ export {};
@@ -5,7 +5,6 @@ import type { VitestListGateway } from "../gateways.ts";
5
5
  * (`AbortSignal.timeout`), or once the request's `signal` aborts, then waits for the process to exit and answers
6
6
  * `timed-out` or `canceled`, `canceled` when the request's `signal` aborted. It waits for the exit, not for the pipes
7
7
  * to close, since a process `vitest` left behind could hold them open. Any other `error` is a start failure, answered
8
- * at once, since no process started. `findVitest` answers the first `node_modules/.bin/vitest` this process may
9
- * execute, in `vitestSearchDirectories` order.
8
+ * at once, since no process started.
10
9
  */
11
10
  export declare const liveVitestListGateway: VitestListGateway;
@@ -1,8 +1,4 @@
1
1
  import { spawn } from "node:child_process";
2
- import { constants } from "node:fs";
3
- import { access } from "node:fs/promises";
4
- import { join } from "node:path";
5
- import { VITEST_BIN, vitestSearchDirectories } from "../find-vitest.js";
6
2
  import { readVitestList } from "../list-output.js";
7
3
  /**
8
4
  * The live list gateway. `listTests` spawns `vitest list <args> --json` (`listArgv`), the request's `executable` or
@@ -10,24 +6,9 @@ import { readVitestList } from "../list-output.js";
10
6
  * (`AbortSignal.timeout`), or once the request's `signal` aborts, then waits for the process to exit and answers
11
7
  * `timed-out` or `canceled`, `canceled` when the request's `signal` aborted. It waits for the exit, not for the pipes
12
8
  * to close, since a process `vitest` left behind could hold them open. Any other `error` is a start failure, answered
13
- * at once, since no process started. `findVitest` answers the first `node_modules/.bin/vitest` this process may
14
- * execute, in `vitestSearchDirectories` order.
9
+ * at once, since no process started.
15
10
  */
16
11
  export const liveVitestListGateway = {
17
- async findVitest({ from, root }) {
18
- const searched = vitestSearchDirectories(from, root);
19
- for (const directory of searched) {
20
- const path = join(directory, VITEST_BIN);
21
- try {
22
- await access(path, constants.X_OK);
23
- return { ok: true, path };
24
- }
25
- catch {
26
- // Not there, or not executable: look further up.
27
- }
28
- }
29
- return { ok: false, searched };
30
- },
31
12
  listTests(request) {
32
13
  return new Promise((resolve) => {
33
14
  let settled = false;
@@ -0,0 +1,38 @@
1
+ import type { ListedTest, VitestListFailure, VitestListGateway } from "./gateways.ts";
2
+ /** How long `vitest list` may run by default. */
3
+ export declare const LIST_TIMEOUT_MS = 60000;
4
+ /** How many tests a Vitest run would run, and in how many files. */
5
+ export interface TestPlan {
6
+ readonly tests: number;
7
+ readonly files: number;
8
+ }
9
+ export interface ListVitestTestsOptions {
10
+ /** Passed to `vitest list --json`, as `vitest run` takes them, such as `["--project", "e2e"]`. */
11
+ readonly args: readonly string[];
12
+ /** Where vitest runs; default the current directory. */
13
+ readonly cwd?: string;
14
+ /** The `vitest` to start, such as the path of a `node_modules/.bin/vitest`; default `vitest` from `PATH`. */
15
+ readonly executable?: string;
16
+ /** How long `vitest list` may take; default `LIST_TIMEOUT_MS`, 60s. */
17
+ readonly timeoutMs?: number;
18
+ /** Stops `vitest list` when it aborts: the plan's failure is then `canceled`. */
19
+ readonly signal?: AbortSignal;
20
+ }
21
+ /** A Vitest run's test plan, or why its tests couldn't be listed. */
22
+ export type VitestPlanResult = {
23
+ readonly ok: true;
24
+ readonly plan: TestPlan;
25
+ } | {
26
+ readonly ok: false;
27
+ readonly failure: VitestListFailure;
28
+ };
29
+ /**
30
+ * Lists the tests `vitest run <args>` would run over `gateway`, with `vitest list <args> --json` (`executable`, else
31
+ * `vitest` from `PATH`), and counts them; or says why it couldn't: `vitest` failed to start, didn't finish within
32
+ * `timeoutMs`, exited other than 0 (with the last line of its stderr that isn't a stack frame), printed something other
33
+ * than a list of tests, or was stopped by `signal` (`canceled`). Throws a `TypeError` unless `timeoutMs` is a positive
34
+ * number.
35
+ */
36
+ export declare function planVitestRunOver(options: ListVitestTestsOptions, gateway: VitestListGateway): Promise<VitestPlanResult>;
37
+ /** The plan of the tests listed: how many, and in how many distinct files. */
38
+ export declare function planOf(tests: readonly ListedTest[]): TestPlan;
@@ -0,0 +1,31 @@
1
+ // Planning a Vitest run over a given list gateway: counting the tests `vitest run <args>` would run. storm's Vitest
2
+ // driver (`../driver.ts`) plans with it over its Context's gateway, and tests plan with it over the fake. The published
3
+ // `plan.ts` plans with it over the live gateway, and this file is not a published export, so a consumer of
4
+ // `@vercel/storm/vitest/plan` sees no gateway. It imports no vitest and nothing of storm outside this folder.
5
+ /** How long `vitest list` may run by default. */
6
+ export const LIST_TIMEOUT_MS = 60_000;
7
+ /**
8
+ * Lists the tests `vitest run <args>` would run over `gateway`, with `vitest list <args> --json` (`executable`, else
9
+ * `vitest` from `PATH`), and counts them; or says why it couldn't: `vitest` failed to start, didn't finish within
10
+ * `timeoutMs`, exited other than 0 (with the last line of its stderr that isn't a stack frame), printed something other
11
+ * than a list of tests, or was stopped by `signal` (`canceled`). Throws a `TypeError` unless `timeoutMs` is a positive
12
+ * number.
13
+ */
14
+ export async function planVitestRunOver(options, gateway) {
15
+ const timeoutMs = options.timeoutMs ?? LIST_TIMEOUT_MS;
16
+ if (!Number.isFinite(timeoutMs) || timeoutMs <= 0) {
17
+ throw new TypeError(`planVitestRun: timeoutMs is ${String(timeoutMs)}, not a positive number`);
18
+ }
19
+ const listed = await gateway.listTests({
20
+ args: options.args,
21
+ ...(options.cwd === undefined ? {} : { cwd: options.cwd }),
22
+ ...(options.executable === undefined ? {} : { executable: options.executable }),
23
+ timeoutMs,
24
+ ...(options.signal === undefined ? {} : { signal: options.signal }),
25
+ });
26
+ return listed.ok ? { ok: true, plan: planOf(listed.tests) } : { ok: false, failure: listed.failure };
27
+ }
28
+ /** The plan of the tests listed: how many, and in how many distinct files. */
29
+ export function planOf(tests) {
30
+ return { tests: tests.length, files: new Set(tests.map((test) => test.file)).size };
31
+ }
@@ -0,0 +1,24 @@
1
+ import type { VitestListFailure } from "./gateways.ts";
2
+ import { type ListVitestTestsOptions, type TestPlan, type VitestPlanResult } from "./plan-over.ts";
3
+ export type { ListedTest, VitestListFailure } from "./gateways.ts";
4
+ export { LIST_TIMEOUT_MS, type ListVitestTestsOptions, type TestPlan, type VitestPlanResult } from "./plan-over.ts";
5
+ /**
6
+ * Lists the tests `vitest run <args>` would run, with `vitest list <args> --json` (`executable`, else `vitest` from
7
+ * `PATH`), and counts them; or says why it couldn't: `vitest` failed to start, didn't finish within `timeoutMs`, exited
8
+ * other than 0 (with the last line of its stderr that isn't a stack frame), printed something other than a list of
9
+ * tests, or was stopped by `signal` (`canceled`). Throws a `TypeError` unless `timeoutMs` is a positive number.
10
+ */
11
+ export declare function planVitestRun(options: ListVitestTestsOptions): Promise<VitestPlanResult>;
12
+ /**
13
+ * `planVitestRun`'s plan, rejecting with an `Error` that says why the tests couldn't be listed
14
+ * (`describeVitestListFailure`).
15
+ */
16
+ export declare function listVitestTests(options: ListVitestTestsOptions): Promise<TestPlan>;
17
+ /** The argv that runs `args` with `executable`, a `vitest`: `<executable> run <args...>`. */
18
+ export declare function vitestRunArgv(executable: string, args: readonly string[]): readonly string[];
19
+ /** The plan `vitest list --json` printed: its tests, and their distinct files. Throws when it isn't a list of tests. */
20
+ export declare function parseVitestList(stdout: string): TestPlan;
21
+ /** A plan as a phrase, such as `65 tests in 19 files` or `1 test in 1 file`. */
22
+ export declare function formatPlan(plan: TestPlan): string;
23
+ /** Why the tests couldn't be listed, as a sentence. */
24
+ export declare function describeVitestListFailure(failure: VitestListFailure): string;
@@ -1,39 +1,27 @@
1
- // Planning a Vitest run before anything is acquired or started, exported as `@vercel/storm/vitest/plan`: finding
2
- // `vitest` in `node_modules/.bin`, counting the tests `vitest run <args>` would run, and the `vitest run` argv. It is
3
- // the CLI's one entry point into storm's Vitest integration: `storm vitest` imports it and nothing else of it. Like
4
- // `config.ts`, it imports no vitest: the CLI and a launcher script run outside a Vitest run.
1
+ // Planning a Vitest run before anything is acquired or started, exported as `@vercel/storm/vitest/plan`: counting the
2
+ // tests `vitest run <args>` would run, and the `vitest run` argv. A launcher script that counts the tests itself plans
3
+ // with it. storm's Vitest driver (`../driver.ts`) plans over its own Context instead, with `plan-over.ts`, which this
4
+ // file plans with over the live list gateway. It imports no vitest and nothing of storm outside this folder: the
5
+ // launcher and a launcher script run outside a Vitest run.
5
6
  import { readVitestList } from "./list-output.js";
6
7
  import { liveVitestListGateway } from "./live/list-gateway.js";
7
- export { VITEST_BIN, vitestSearchDirectories } from "./find-vitest.js";
8
- export { liveVitestListGateway } from "./live/list-gateway.js";
9
- /** How long `listVitestTests` lets `vitest list` run by default. */
10
- export const LIST_TIMEOUT_MS = 60_000;
8
+ import { planOf, planVitestRunOver, } from "./plan-over.js";
9
+ export { LIST_TIMEOUT_MS } from "./plan-over.js";
11
10
  /**
12
11
  * Lists the tests `vitest run <args>` would run, with `vitest list <args> --json` (`executable`, else `vitest` from
13
12
  * `PATH`), and counts them; or says why it couldn't: `vitest` failed to start, didn't finish within `timeoutMs`, exited
14
13
  * other than 0 (with the last line of its stderr that isn't a stack frame), printed something other than a list of
15
14
  * tests, or was stopped by `signal` (`canceled`). Throws a `TypeError` unless `timeoutMs` is a positive number.
16
15
  */
17
- export async function planVitestRun(options, gateway = liveVitestListGateway) {
18
- const timeoutMs = options.timeoutMs ?? LIST_TIMEOUT_MS;
19
- if (!Number.isFinite(timeoutMs) || timeoutMs <= 0) {
20
- throw new TypeError(`planVitestRun: timeoutMs is ${String(timeoutMs)}, not a positive number`);
21
- }
22
- const listed = await gateway.listTests({
23
- args: options.args,
24
- ...(options.cwd === undefined ? {} : { cwd: options.cwd }),
25
- ...(options.executable === undefined ? {} : { executable: options.executable }),
26
- timeoutMs,
27
- ...(options.signal === undefined ? {} : { signal: options.signal }),
28
- });
29
- return listed.ok ? { ok: true, plan: planOf(listed.tests) } : { ok: false, failure: listed.failure };
16
+ export async function planVitestRun(options) {
17
+ return await planVitestRunOver(options, liveVitestListGateway);
30
18
  }
31
19
  /**
32
20
  * `planVitestRun`'s plan, rejecting with an `Error` that says why the tests couldn't be listed
33
21
  * (`describeVitestListFailure`).
34
22
  */
35
- export async function listVitestTests(options, gateway = liveVitestListGateway) {
36
- const planned = await planVitestRun(options, gateway);
23
+ export async function listVitestTests(options) {
24
+ const planned = await planVitestRun(options);
37
25
  if (!planned.ok)
38
26
  throw new Error(describeVitestListFailure(planned.failure));
39
27
  return planned.plan;
@@ -50,9 +38,6 @@ export function parseVitestList(stdout) {
50
38
  export function formatPlan(plan) {
51
39
  return `${plan.tests} ${plan.tests === 1 ? "test" : "tests"} in ${plan.files} ${plan.files === 1 ? "file" : "files"}`;
52
40
  }
53
- function planOf(tests) {
54
- return { tests: tests.length, files: new Set(tests.map((test) => test.file)).size };
55
- }
56
41
  /** Why the tests couldn't be listed, as a sentence. */
57
42
  export function describeVitestListFailure(failure) {
58
43
  switch (failure.kind) {
@@ -1,6 +1,8 @@
1
+ import type { Driver } from "./sdk/extension/index.ts";
1
2
  /**
2
- * Every extension, in order. Adding an extension adds it here; its resources join `RESOURCES` in this order. An
3
- * extension may bring no resource, as the story extension brings only `storm story run`.
3
+ * Every extension, in order. Adding an extension adds it here; its resources join `RESOURCES` in this order, and its
4
+ * drivers `DRIVERS`. An extension may bring no resource, as the Vitest and
5
+ * Playwright extensions bring only a driver each.
4
6
  */
5
7
  export declare const EXTENSIONS: readonly [import("./sdk/extension/commands.ts").Extension<"github", readonly [import("./sdk/extension/resource-definition.ts").ResourceDefinition<"githubFixtureRepo", {
6
8
  readonly repo: {
@@ -18,13 +20,13 @@ export declare const EXTENSIONS: readonly [import("./sdk/extension/commands.ts")
18
20
  readonly description: "Whether the run goes on without the GitHub fixture repository when the launcher environment variable its tokenEnv names is unset, overriding resources.githubFixtureRepo.optional in storm.config.ts; default false. --github-optional=false makes the repository required for this run, so a run without its token is refused with github_token_missing before anything starts. Gives the run the GitHub fixture repository resource, whose repo and tokenEnv only storm.config.ts gives.";
19
21
  };
20
22
  };
21
- }, import("./extensions/github/index.ts").GitHubFixtureRepoPayload, import("./extensions/github/world.ts").GitHubWorld>], unknown>, import("./sdk/extension/commands.ts").Extension<"testserver", readonly [import("./sdk/extension/resource-definition.ts").ResourceDefinition<"testserverPool", {
23
+ }, import("./extensions/github/index.ts").GitHubFixtureRepoPayload, import("./extensions/github/context.ts").GitHubFixtureRepoContext>], unknown, readonly []>, import("./sdk/extension/commands.ts").Extension<"testserver", readonly [import("./sdk/extension/resource-definition.ts").ResourceDefinition<"testserverPool", {
22
24
  readonly sandboxes: {
23
25
  readonly schema: import("zod").ZodNumber;
24
26
  readonly default: ({ testPlan }: import("./sdk/extension/resource-definition.ts").PlannedRun) => number;
25
27
  readonly flag: {
26
28
  readonly valueLabel: "N";
27
- readonly description: "How many Testserver sandboxes the command gets, 1 to 32, overriding resources.testserverPool.sandboxes in storm.config.ts; default 1, or with storm vitest one per 4 test files vitest list counted, at most 8. Gives the run the Testserver pool.";
29
+ readonly description: "How many Testserver sandboxes the command gets, 1 to 32, overriding resources.testserverPool.sandboxes in storm.config.ts; default 1, or with storm vitest or storm playwright one per 4 test files it counted, at most 8. Gives the run the Testserver pool.";
28
30
  };
29
31
  };
30
32
  readonly build: {
@@ -58,7 +60,7 @@ export declare const EXTENSIONS: readonly [import("./sdk/extension/commands.ts")
58
60
  readonly description: "Whether the run may create Testserver sandboxes, overriding resources.testserverPool.create in storm.config.ts; default true. --testserver-create=false runs only on Testserver sandboxes already in the pool, never minting for Testserver or creating: it needs no --scope or --project with --unsandboxed, and takes no --testserver-ttl. --testserver-create turns creating on over the file's create: false. Gives the run the Testserver pool.";
59
61
  };
60
62
  };
61
- }, import("./extensions/testserver/run/connection.ts").TestserverConnection, import("./extensions/testserver/world.ts").TestserverWorld>], import("./extensions/testserver/commands/app.ts").TestserverLauncherApp>, import("./sdk/extension/commands.ts").Extension<"story", readonly [], import("./extensions/story/commands/app.ts").StoryCommandApp>];
63
+ }, import("./extensions/testserver/run/connection.ts").TestserverConnection, import("./extensions/testserver/context.ts").TestserverPoolContext>], import("./extensions/testserver/commands/app.ts").TestserverLauncherApp, readonly []>, import("./sdk/extension/commands.ts").Extension<"vitest", readonly [], unknown, readonly [Driver<"vitest", import("./extensions/vitest/driver.ts").VitestDriverContext>]>, import("./sdk/extension/commands.ts").Extension<"playwright", readonly [], unknown, readonly [Driver<"playwright", import("./extensions/playwright/driver.ts").PlaywrightDriverContext>]>];
62
64
  /**
63
65
  * Every extension's resources, each extension's in turn, in the one order everything about the resources follows:
64
66
  * the order a run calls their `beforeRun` and their `acquireForRun`, their refusals rank in, the run payload's
@@ -83,13 +85,13 @@ export declare const RESOURCES: readonly [import("./sdk/extension/resource-defin
83
85
  readonly description: "Whether the run goes on without the GitHub fixture repository when the launcher environment variable its tokenEnv names is unset, overriding resources.githubFixtureRepo.optional in storm.config.ts; default false. --github-optional=false makes the repository required for this run, so a run without its token is refused with github_token_missing before anything starts. Gives the run the GitHub fixture repository resource, whose repo and tokenEnv only storm.config.ts gives.";
84
86
  };
85
87
  };
86
- }, import("./extensions/github/index.ts").GitHubFixtureRepoPayload, import("./extensions/github/world.ts").GitHubWorld>, import("./sdk/extension/resource-definition.ts").ResourceDefinition<"testserverPool", {
88
+ }, import("./extensions/github/index.ts").GitHubFixtureRepoPayload, import("./extensions/github/context.ts").GitHubFixtureRepoContext>, import("./sdk/extension/resource-definition.ts").ResourceDefinition<"testserverPool", {
87
89
  readonly sandboxes: {
88
90
  readonly schema: import("zod").ZodNumber;
89
91
  readonly default: ({ testPlan }: import("./sdk/extension/resource-definition.ts").PlannedRun) => number;
90
92
  readonly flag: {
91
93
  readonly valueLabel: "N";
92
- readonly description: "How many Testserver sandboxes the command gets, 1 to 32, overriding resources.testserverPool.sandboxes in storm.config.ts; default 1, or with storm vitest one per 4 test files vitest list counted, at most 8. Gives the run the Testserver pool.";
94
+ readonly description: "How many Testserver sandboxes the command gets, 1 to 32, overriding resources.testserverPool.sandboxes in storm.config.ts; default 1, or with storm vitest or storm playwright one per 4 test files it counted, at most 8. Gives the run the Testserver pool.";
93
95
  };
94
96
  };
95
97
  readonly build: {
@@ -123,22 +125,42 @@ export declare const RESOURCES: readonly [import("./sdk/extension/resource-defin
123
125
  readonly description: "Whether the run may create Testserver sandboxes, overriding resources.testserverPool.create in storm.config.ts; default true. --testserver-create=false runs only on Testserver sandboxes already in the pool, never minting for Testserver or creating: it needs no --scope or --project with --unsandboxed, and takes no --testserver-ttl. --testserver-create turns creating on over the file's create: false. Gives the run the Testserver pool.";
124
126
  };
125
127
  };
126
- }, import("./extensions/testserver/run/connection.ts").TestserverConnection, import("./extensions/testserver/world.ts").TestserverWorld>];
128
+ }, import("./extensions/testserver/run/connection.ts").TestserverConnection, import("./extensions/testserver/context.ts").TestserverPoolContext>];
127
129
  /**
128
- * The registry of `RESOURCES`, in their order: what a run, its views and its reports take. It holds every resource's
129
- * reports and presentations, the run's state and waterfall through the resources' progress, their lifecycles over
130
- * given worlds, and their worlds built from a launcher environment.
130
+ * The definition set of `RESOURCES`, in their order: what a run, its views and its reports take. It holds every
131
+ * resource's reports and presentations, the run's state and waterfall through the resources' progress, their
132
+ * lifecycles over given Contexts, and their Contexts built from a launcher environment.
131
133
  */
132
- export declare const REGISTRY: import("./core/resource-registry.ts").ResourceRegistry;
134
+ export declare const DEFINITION_SET: import("./core/resource-definition-set.ts").ResourceDefinitionSet;
133
135
  /**
134
- * Each definition's world, by its name: what the launcher hands each lifecycle, for every resource instance of the
135
- * definition, and what an extension's mount reads its own. Each resource keeps its world's type.
136
+ * Each definition's Context, by its name: what the launcher hands each lifecycle, for every resource instance of the
137
+ * definition, and what an extension's mount reads its own. Each resource keeps its Context's type.
136
138
  */
137
- export type StormWorlds = {
138
- readonly [R in (typeof RESOURCES)[number] as R["name"]]: ReturnType<R["world"]>;
139
+ export type StormResourceContextMap = {
140
+ readonly [R in (typeof RESOURCES)[number] as R["name"]]: ReturnType<R["context"]>;
139
141
  };
140
142
  /**
141
- * Every definition's live world, by its name, each built from what the launcher supplies it over `env`, with its own
143
+ * Every definition's live Context, by its name, each built from what the launcher gives it over `env`, with its own
142
144
  * state directory.
143
145
  */
144
- export declare function liveWorlds(env: Readonly<Record<string, string | undefined>>): StormWorlds;
146
+ export declare function liveResourceContexts(env: Readonly<Record<string, string | undefined>>): StormResourceContextMap;
147
+ /**
148
+ * Every extension's drivers, each extension's in turn, each with its own types. Adding a driver adds its
149
+ * `defineDriver` to its extension's `drivers`. The launcher keeps a thin `commands/<name>/` directory for each, whose
150
+ * `command.ts` is the driver's run command (`defineRunCommand`). `storm exec` has no driver, so none is here for it.
151
+ */
152
+ export declare const DRIVERS: readonly [Driver<"vitest", import("./extensions/vitest/driver.ts").VitestDriverContext>, Driver<"playwright", import("./extensions/playwright/driver.ts").PlaywrightDriverContext>];
153
+ /**
154
+ * The registry's driver named `name`, for the run command of that name. Throws when no extension brings one: a
155
+ * `commands/<name>/` directory whose driver left the registry is a bug in the launcher's tree.
156
+ */
157
+ export declare function driverNamed(name: string): Driver;
158
+ /**
159
+ * Each driver's Context, by its name: what the launcher hands that driver's plan step. Each driver keeps its Context's
160
+ * type.
161
+ */
162
+ export type StormDriverContextMap = {
163
+ readonly [D in (typeof DRIVERS)[number] as D["name"]]: ReturnType<D["context"]>;
164
+ };
165
+ /** Every driver's live Context, by its name, each built by its own `context`. */
166
+ export declare function liveDriverContexts(): StormDriverContextMap;
@@ -1,21 +1,26 @@
1
- // The registry, in the composition layer: the one file that takes every extension value. It lists the extensions in
2
- // order (`EXTENSIONS`), takes their resources in that order (`RESOURCES`), each as its `defineResource` returned it,
3
- // and builds from that list the one registry value (`REGISTRY`, the core's `resourceRegistry`): the resource reports
4
- // and presentations, the run's state and waterfall, the lifecycles and the worlds. It types each definition's world
5
- // (`StormWorlds`) and builds the live worlds (`liveWorlds`). It imports no command: the commands import it. The
6
- // extensions' command trees, which help needs without the rest, are in `src/extension-commands.ts`. An extension
7
- // folder, the story extension's among them, which brings only commands, is reached only through its extension value,
8
- // and only this file takes one (`src/extension-commands.ts` takes only each extension's `command-tree.ts`);
9
- // `.oxlintrc.json` enforces it.
10
- import { resourceRegistry, resourcesOf } from "./core/index.js";
11
- import { storyExtension } from "./extensions/story/extension.js";
1
+ // The extension registry, in the composition layer: the one file that takes every extension value. It lists the
2
+ // extensions in order (`EXTENSIONS`), takes their resources in that order (`RESOURCES`), each as its `defineResource`
3
+ // returned it, and builds from that list the resource definition set (`DEFINITION_SET`, the core's
4
+ // `resourceDefinitionSet`): the resource reports and presentations, the run's state and waterfall, the lifecycles and
5
+ // the Contexts. It types each definition's Context (`StormResourceContextMap`) and builds the live Contexts
6
+ // (`liveResourceContexts`). Beside the resources it takes the extensions' drivers (`DRIVERS`), each as its
7
+ // `defineDriver` returned it, gives a run command its driver by name (`driverNamed`), types each driver's Context
8
+ // (`StormDriverContextMap`) and builds the live ones (`liveDriverContexts`). It imports no command: the commands import
9
+ // it. The extensions' command trees, which help needs without the rest, are in `src/extension-commands.ts`. An
10
+ // extension folder, a driver extension's among them, which brings only a driver, is reached only through its
11
+ // extension value, and only this file takes one (`src/extension-commands.ts` takes only each extension's
12
+ // `command-tree.ts`); `.oxlintrc.json` enforces it.
13
+ import { driversOf, driverContexts, resourceDefinitionSet, resourcesOf } from "./core/index.js";
12
14
  import { githubExtension } from "./extensions/github/index.js";
15
+ import { playwrightExtension } from "./extensions/playwright/extension.js";
13
16
  import { testserverExtension } from "./extensions/testserver/index.js";
17
+ import { vitestExtension } from "./extensions/vitest/extension.js";
14
18
  /**
15
- * Every extension, in order. Adding an extension adds it here; its resources join `RESOURCES` in this order. An
16
- * extension may bring no resource, as the story extension brings only `storm story run`.
19
+ * Every extension, in order. Adding an extension adds it here; its resources join `RESOURCES` in this order, and its
20
+ * drivers `DRIVERS`. An extension may bring no resource, as the Vitest and
21
+ * Playwright extensions bring only a driver each.
17
22
  */
18
- export const EXTENSIONS = [githubExtension, testserverExtension, storyExtension];
23
+ export const EXTENSIONS = [githubExtension, testserverExtension, vitestExtension, playwrightExtension];
19
24
  /**
20
25
  * Every extension's resources, each extension's in turn, in the one order everything about the resources follows:
21
26
  * the order a run calls their `beforeRun` and their `acquireForRun`, their refusals rank in, the run payload's
@@ -26,16 +31,38 @@ export const EXTENSIONS = [githubExtension, testserverExtension, storyExtension]
26
31
  */
27
32
  export const RESOURCES = resourcesOf(EXTENSIONS);
28
33
  /**
29
- * The registry of `RESOURCES`, in their order: what a run, its views and its reports take. It holds every resource's
30
- * reports and presentations, the run's state and waterfall through the resources' progress, their lifecycles over
31
- * given worlds, and their worlds built from a launcher environment.
34
+ * The definition set of `RESOURCES`, in their order: what a run, its views and its reports take. It holds every
35
+ * resource's reports and presentations, the run's state and waterfall through the resources' progress, their
36
+ * lifecycles over given Contexts, and their Contexts built from a launcher environment.
32
37
  */
33
- export const REGISTRY = resourceRegistry(RESOURCES);
38
+ export const DEFINITION_SET = resourceDefinitionSet(RESOURCES);
34
39
  /**
35
- * Every definition's live world, by its name, each built from what the launcher supplies it over `env`, with its own
40
+ * Every definition's live Context, by its name, each built from what the launcher gives it over `env`, with its own
36
41
  * state directory.
37
42
  */
38
- export function liveWorlds(env) {
39
- // The registry builds one world per resource of `RESOURCES`, under its definition's name, from its own `world`.
40
- return REGISTRY.worlds(env);
43
+ export function liveResourceContexts(env) {
44
+ // The definition set builds one Context per resource of `RESOURCES`, under its definition's name, from its own
45
+ // `context`.
46
+ return DEFINITION_SET.contexts(env);
47
+ }
48
+ /**
49
+ * Every extension's drivers, each extension's in turn, each with its own types. Adding a driver adds its
50
+ * `defineDriver` to its extension's `drivers`. The launcher keeps a thin `commands/<name>/` directory for each, whose
51
+ * `command.ts` is the driver's run command (`defineRunCommand`). `storm exec` has no driver, so none is here for it.
52
+ */
53
+ export const DRIVERS = driversOf(EXTENSIONS);
54
+ /**
55
+ * The registry's driver named `name`, for the run command of that name. Throws when no extension brings one: a
56
+ * `commands/<name>/` directory whose driver left the registry is a bug in the launcher's tree.
57
+ */
58
+ export function driverNamed(name) {
59
+ const drivers = DRIVERS;
60
+ const driver = drivers.find((each) => each.name === name);
61
+ if (driver === undefined)
62
+ throw new Error(`No extension in src/extensions.ts brings a driver named ${name}`);
63
+ return driver;
64
+ }
65
+ /** Every driver's live Context, by its name, each built by its own `context`. */
66
+ export function liveDriverContexts() {
67
+ return driverContexts(DRIVERS);
41
68
  }
@@ -1,6 +1,6 @@
1
1
  // Which of the signals that stop a command storm passes on to a command it runs on this machine: only SIGTERM. Ctrl+C
2
2
  // and a closed terminal reach the command directly, through its process group, so passing them on would signal it
3
- // twice. `exec`'s and `vitest`'s run and the terminal local service share it.
3
+ // twice. `exec`'s, `vitest`'s and `playwright`'s run use it.
4
4
  import { NodeSignalCancellation } from "@vercel/clinkr/node";
5
5
  /** Follows `signal`, Clinkr's command signal, and aborts `terminate` only for a SIGTERM, even one before the call. */
6
6
  export function forwardSigterm(signal) {
@@ -1,2 +1,2 @@
1
1
  export { type CommandCredentialSource, configErrors, type ConfigLoadError, type ConfigResolver, credentialErrors, type CredentialReport, type CredentialResolver, type CredentialSourceError, credentialSourceErrors, type CredentialTarget, type LoadedResourceSettings, type TargetSettings, } from "../config/index.ts";
2
- export type { TerminalRunOutcome, TerminalRunRequest, TerminalService, VitestSearch, VitestService, } from "./local-services.ts";
2
+ export type { PackageBinSearch, PackageBinService } from "./local-services.ts";
@@ -1,57 +1,22 @@
1
1
  /**
2
- * Where the vitest service found `vitest`: the absolute path of the nearest `node_modules/.bin/vitest`; or, when no
3
- * directory has one, every directory it looked in, nearest first.
2
+ * Where the package binary service found a binary: the absolute path of the nearest `node_modules/.bin/<name>`; or,
3
+ * when no directory has one, every directory it looked in, nearest first.
4
4
  */
5
- export type VitestSearch = {
5
+ export type PackageBinSearch = {
6
6
  readonly ok: true;
7
7
  readonly path: string;
8
8
  } | {
9
9
  readonly ok: false;
10
10
  readonly searched: readonly string[];
11
11
  };
12
- /** Finds the `vitest` a package's scripts would run, as `storm vitest` finds it for a run on this machine. */
13
- export interface VitestService {
14
- /**
15
- * The nearest `node_modules/.bin/vitest` from `from`, an absolute directory, and each directory above it, up to the
16
- * root of the Git repository `from` is in, or the filesystem's root outside one.
17
- */
18
- find(from: string): Promise<VitestSearch>;
19
- }
20
- /** A command to run in the launcher's terminal. */
21
- export interface TerminalRunRequest {
22
- /** The command, run as given, with no shell. `argv[0]` is the executable. */
23
- readonly argv: readonly string[];
24
- /** The command's whole environment; nothing else is inherited. */
25
- readonly env: Readonly<Record<string, string>>;
26
- /** The directory it runs in, an absolute path. */
27
- readonly cwd: string;
28
- /** The command's own signal (Clinkr's `signal`), which aborts on the first SIGINT, SIGTERM or SIGHUP. */
29
- readonly signal: AbortSignal;
30
- }
31
12
  /**
32
- * How a command in the launcher's terminal ended: it exited with `code`, a signal ended it (`signal`, such as
33
- * `SIGINT`), or it never started (`spawn-failed`, with what the OS said). A command that ran carries the `status` storm
34
- * exits with when it passes the command's end on, as `exec` does: its code, or `128 + n` when signal `n` ended it (1
35
- * for a signal Node can't number).
13
+ * Finds the binary a package's scripts would run, such as `vitest` or `playwright`, as `storm vitest` finds `vitest`
14
+ * for a run on this machine.
36
15
  */
37
- export type TerminalRunOutcome = {
38
- readonly kind: "exited";
39
- readonly code: number;
40
- readonly status: number;
41
- } | {
42
- readonly kind: "signaled";
43
- readonly signal: string;
44
- readonly status: number;
45
- } | {
46
- readonly kind: "spawn-failed";
47
- readonly message: string;
48
- };
49
- /** Runs a command on this machine in the launcher's terminal. */
50
- export interface TerminalService {
16
+ export interface PackageBinService {
51
17
  /**
52
- * Runs `argv` in `cwd` with `env`, sharing storm's stdin, stdout and stderr, and waits for it to exit. Ctrl+C and a
53
- * closed terminal reach the command directly through its process group, so of the signals that abort `signal` only
54
- * SIGTERM is passed on. A second signal makes Clinkr's host exit at once. It never rejects.
18
+ * The nearest `node_modules/.bin/<name>` from `from`, an absolute directory, and each directory above it, up to the
19
+ * root of the Git repository `from` is in, or the filesystem's root outside one.
55
20
  */
56
- run(request: TerminalRunRequest): Promise<TerminalRunOutcome>;
21
+ find(name: string, from: string): Promise<PackageBinSearch>;
57
22
  }
@@ -1,7 +1,6 @@
1
1
  // The local services' types (`GLOSSARY.md`, **Local service**): what the launcher gives every command to reach this
2
- // machine, the vitest service (`VitestService`), which finds `vitest`, and the terminal service (`TerminalService`),
3
- // which runs a command in the launcher's terminal. The composition layer builds them (`src/local-services.ts`). They
4
- // refuse nothing: each answers what happened, and the command words it. This file imports nothing, so the module
5
- // stays left of `core`: `TerminalRunOutcome` declares the shape of the core's `CommandOutcome` itself, with the exit
6
- // status, and `VitestSearch` that of storm's Vitest integration's `FindVitestResult`.
2
+ // machine, the package binary service (`PackageBinService`), which finds a package's binary, such as `vitest`. The
3
+ // composition layer builds it (`src/local-services.ts`). It refuses nothing: it answers what it found, and the command
4
+ // words it. This file imports nothing, so the module stays left of `core`: `PackageBinSearch` declares the shape of
5
+ // the core's `FindPackageBinResult` itself.
7
6
  export {};
package/dist/live-app.js CHANGED
@@ -1,17 +1,18 @@
1
- // The app storm's executable hands every command: the live Context, each resource's live world and what a run needs
2
- // from Clinkr's Node host. Only `bin/storm.ts` loads this module, inside its `app` factory, which Clinkr calls only
3
- // when a command runs; so help, listings, `--version`, and invocation errors never load the resource registry, the
4
- // runner, or the SDK.
1
+ // The app storm's executable hands every command: the live `StormContext`, each resource's and each driver's live
2
+ // Context, and what a run needs from Clinkr's Node host. Only `bin/storm.ts` loads this module, inside its `app`
3
+ // factory, which Clinkr calls only when a command runs; so help, listings, `--version`, and invocation errors never
4
+ // load the extension registry, the runner, or the SDK.
5
5
  import { launcherResolvers, liveContext, localServices } from "./context.js";
6
6
  import { resolvePresentation } from "./presentation.js";
7
- import { liveWorlds, RESOURCES } from "./extensions.js";
7
+ import { liveDriverContexts, liveResourceContexts, RESOURCES } from "./extensions.js";
8
8
  import { localUserName } from "./runner/index.js";
9
9
  /** The live app over the resolved host, whose commands record their status in `exit`, which the executable reads. */
10
10
  export function liveStormApp(host, build, exit) {
11
11
  const context = liveContext({ env: host.env });
12
12
  return {
13
13
  context,
14
- worlds: liveWorlds(host.env),
14
+ resourceContexts: liveResourceContexts(host.env),
15
+ driverContexts: liveDriverContexts(),
15
16
  resourceDefinitions: RESOURCES,
16
17
  ...launcherResolvers({ context, cwd: host.cwd, resourceDefinitions: RESOURCES }),
17
18
  ...localServices({ context }),
@@ -1,19 +1,11 @@
1
1
  import type { CheckoutGateway } from "./runner/index.ts";
2
- import { type TerminalCommandGateway } from "./core/index.ts";
3
- import type { TerminalService, VitestService } from "./launcher-resolvers/index.ts";
4
- import type { VitestListGateway } from "./vitest/plan.ts";
2
+ import type { PackageBinGateway } from "./core/index.ts";
3
+ import type { PackageBinService } from "./launcher-resolvers/index.ts";
5
4
  /**
6
- * The vitest service over `checkout`, which says the repository's root, and `vitestList`, which looks for `vitest`
7
- * in each directory from `from` up to that root, or up to the filesystem's root outside a repository.
5
+ * The package binary service over `checkout`, which says the repository's root, and `packageBins`, which looks for the
6
+ * binary in each directory from `from` up to that root, or up to the filesystem's root outside a repository.
8
7
  */
9
- export declare function vitestService(context: {
8
+ export declare function packageBinService(context: {
10
9
  readonly checkout: CheckoutGateway;
11
- readonly vitestList: VitestListGateway;
12
- }): VitestService;
13
- /**
14
- * The terminal service over `terminalCommands`. It passes on only a SIGTERM that aborts the command's signal
15
- * (`forwardSigterm`), and waits for the command either way.
16
- */
17
- export declare function terminalService(context: {
18
- readonly terminalCommands: TerminalCommandGateway;
19
- }): TerminalService;
10
+ readonly packageBins: PackageBinGateway;
11
+ }): PackageBinService;