@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
@@ -13,6 +13,8 @@ export type TimelineStepName = string;
13
13
  export interface TimelineStep extends TimelineSpan {
14
14
  readonly name: TimelineStepName;
15
15
  readonly outcome: TimelineOutcome;
16
+ /** The runner's `upload` step's: how many bytes of changes it uploaded; absent on any other step. */
17
+ readonly bytes?: number;
16
18
  }
17
19
  /**
18
20
  * The rows of a waterfall, by name: `mint`, the run's one mint; each resource instance's lane, by its lane's name;
@@ -64,8 +66,8 @@ export interface Timeline {
64
66
  }
65
67
  /**
66
68
  * A run's waterfall, from its final state, with each resource lane's row from the progress of `resources`, the
67
- * registry's resource definitions. A span still running when the run ended is `unfinished`, ending at the run's last
68
- * event.
69
+ * definition set's resource definitions. A span still running when the run ended is `unfinished`, ending at the run's
70
+ * last event.
69
71
  */
70
72
  export declare function timeline(resources: readonly Pick<ResourceDefinition, "name" | "progress">[], state: RunState): Timeline;
71
73
  /** A row by its name and its instance's key, as `sameRow` compares them. */
@@ -1,11 +1,11 @@
1
1
  // A run's waterfall, projected from its final state: when each lane ran, what it did, how long a ready lane waited
2
2
  // for the last one, and the critical path to the command's end. Each resource's progress projects its own lane's row's
3
- // steps and counts (`ResourceProgress.row`); the core lays out every row. Callers project it through the registry
4
- // (`timeline`, `resource-registry.ts`).
3
+ // steps and counts (`ResourceProgress.row`); the core lays out every row. Callers project it through the resource
4
+ // definition set (`timeline`, `resource-definition-set.ts`).
5
5
  /**
6
6
  * A run's waterfall, from its final state, with each resource lane's row from the progress of `resources`, the
7
- * registry's resource definitions. A span still running when the run ended is `unfinished`, ending at the run's last
8
- * event.
7
+ * definition set's resource definitions. A span still running when the run ended is `unfinished`, ending at the run's
8
+ * last event.
9
9
  */
10
10
  export function timeline(resources, state) {
11
11
  const { origin } = state;
@@ -49,7 +49,13 @@ export function timeline(resources, state) {
49
49
  .filter((step) => step.status !== "pending" && !(step.name === "snapshot" && runner.snapshot?.kind === "reused"))
50
50
  .flatMap((step) => step.startedAt === undefined
51
51
  ? []
52
- : [{ name: step.name, ...span({ status: step.status, startedAt: step.startedAt, endedAt: step.endedAt }) }])
52
+ : [
53
+ {
54
+ name: step.name,
55
+ ...span({ status: step.status, startedAt: step.startedAt, endedAt: step.endedAt }),
56
+ ...(step.name === "upload" && runner.uploadBytes !== undefined ? { bytes: runner.uploadBytes } : {}),
57
+ },
58
+ ])
53
59
  .toSorted((a, b) => a.startMs - b.startMs);
54
60
  const snapshot = runner.snapshot?.kind === "building" ? undefined : runner.snapshot?.kind;
55
61
  rows.push(row(RUNNER, runner, { steps, snapshot }));
@@ -1,12 +1,10 @@
1
1
  // The extensions' own command trees, each with the path `application.ts` mounts it at. It is the one file besides the
2
- // registry (`src/extensions.ts`) that names an extension, and it imports only each extension's `command-tree.ts`,
3
- // which loads no resource: help lists `ext testserver` and `story` without loading the registry, the resources, the
4
- // runner, or the SDK. The registry places each tree, not its extension: a resource tool's tree goes under
5
- // `ext <name>`, so its commands can't collide with storm's own, and the story extension's run command goes at the top
6
- // level, as `storm story`, beside `storm vitest`. `.oxlintrc.json` holds this file to `command-tree.ts`;
7
- // `test/unit/extension-commands.test.ts` holds its list to the extensions' `commands`. `scripts/bundle.js` reads the
8
- // list from tsc's build to bundle each tree's commands.
9
- import { storyExtensionCommands } from "./extensions/story/command-tree.js";
2
+ // extension registry (`src/extensions.ts`) that names an extension, and it imports only each extension's
3
+ // `command-tree.ts`, which loads no resource: help lists `ext testserver` without loading the extension registry, the
4
+ // resources, the runner, or the SDK. This file places each tree, not its extension: the tree of an extension that
5
+ // brings a resource goes under `ext <name>`, so its storm commands can't collide with storm's own. `.oxlintrc.json`
6
+ // holds this file to `command-tree.ts`; `test/unit/extension-commands.test.ts` holds its list to the extensions'
7
+ // `commands`. `scripts/bundle.js` reads the list from tsc's build to bundle each tree's commands.
10
8
  import { testserverExtensionCommands } from "./extensions/testserver/command-tree.js";
11
9
  /**
12
10
  * Every extension's command tree, in extension order, with its path, checked against the app Clinkr hands their
@@ -14,8 +12,6 @@ import { testserverExtensionCommands } from "./extensions/testserver/command-tre
14
12
  */
15
13
  export const EXTENSION_COMMANDS = [
16
14
  { commands: testserverExtensionCommands, path: ["ext", "testserver"] },
17
- // A run command, beside `storm vitest`, not a resource tool: `storm story run`.
18
- { commands: storyExtensionCommands, path: ["story"] },
19
15
  ];
20
16
  /**
21
17
  * Every extension's command tree, mounted at its path with its directory under `root`, storm's code root (`src/` or
@@ -4,7 +4,7 @@ import type { Clock } from "../../sdk/extension/index.ts";
4
4
  * What the GitHub fixture repository reaches the outside through: the launcher environment, where its token is,
5
5
  * GitHub's REST API, the random suffix a run prefix ends with, and the clock its time comes from.
6
6
  */
7
- export interface GitHubWorld {
7
+ export interface GitHubFixtureRepoContext {
8
8
  /** The launcher environment, which holds the token in the variable its `tokenEnv` names. */
9
9
  readonly env: Readonly<Record<string, string | undefined>>;
10
10
  /** GitHub's REST API. */
@@ -0,0 +1,3 @@
1
+ // The GitHub fixture repository resource's Context: what it reaches the outside through. `live/context.ts` builds it
2
+ // from the launcher.
3
+ export {};
@@ -23,4 +23,4 @@ export declare const githubFixtureRepoDefinition: import("../../sdk/extension/re
23
23
  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.";
24
24
  };
25
25
  };
26
- }, import("./run/payload.ts").GitHubFixtureRepoPayload, import("./world.ts").GitHubWorld>;
26
+ }, import("./run/payload.ts").GitHubFixtureRepoPayload, import("./context.ts").GitHubFixtureRepoContext>;
@@ -1,13 +1,13 @@
1
1
  // The GitHub fixture repository resource's definition: one `defineResource` call that holds its section
2
2
  // `resources.githubFixtureRepo` in `storm.config.ts`, with its option rules (`options.ts`), its payload contract
3
- // (`payload.ts`, `@vercel/storm/github/payload`), its world and its lifecycle, which words its refusals in
3
+ // (`payload.ts`, `@vercel/storm/github/payload`), its Context and its lifecycle, which words its refusals in
4
4
  // `refusals.ts`. A config file makes its resource with its resource factory, `githubFixtureRepo({ … })` (`resource.ts`,
5
5
  // `@vercel/storm/github`). `config` loads and merges against it; its lifecycle reads the options and their sources
6
6
  // before the run starts. It has no progress of its own, its acquire answers no result, so a ran outcome says nothing of
7
7
  // it, and it has no commands, so its extension (`extension.ts`) only lists it.
8
8
  import { defineResource } from "../../sdk/extension/index.js";
9
9
  import { githubFixtureRepoLifecycle } from "./lifecycle.js";
10
- import { liveGitHubWorld } from "./live/world.js";
10
+ import { liveGitHubFixtureRepoContext } from "./live/context.js";
11
11
  import { githubFixtureRepoRules } from "./options.js";
12
12
  import { GITHUB_FIXTURE_REPO_NAME, githubFixtureRepoPayload } from "./run/payload.js";
13
13
  /**
@@ -24,6 +24,6 @@ export const githubFixtureRepoDefinition = defineResource({
24
24
  flagPrefix: "github",
25
25
  options: githubFixtureRepoRules,
26
26
  payload: githubFixtureRepoPayload,
27
- world: liveGitHubWorld,
27
+ context: liveGitHubFixtureRepoContext,
28
28
  lifecycle: githubFixtureRepoLifecycle,
29
29
  });
@@ -15,4 +15,4 @@ export declare const githubExtension: import("../../sdk/extension/commands.ts").
15
15
  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.";
16
16
  };
17
17
  };
18
- }, import("./resource.ts").GitHubFixtureRepoPayload, import("./world.ts").GitHubWorld>], unknown>;
18
+ }, import("./resource.ts").GitHubFixtureRepoPayload, import("./context.ts").GitHubFixtureRepoContext>], unknown, readonly []>;
@@ -5,9 +5,9 @@ export { githubExtension } from "./extension.ts";
5
5
  export { cleanupFixtureRepo, failureText, FIXTURE_RUN_PREFIX_PATTERN, FIXTURE_RUN_PREFIX_ROOT, type FixtureRepoCleanupFailure, fixtureRepoPayload, type FixtureRepoReleaseFacts, type FixtureRepoRequest, fixtureRunPrefix, type OpenedFixtureRepo, type OpenFixtureRepoOutcome, openFixtureRepo, } from "./fixture-repo.ts";
6
6
  export type { DeleteFixtureBranchResult, GitHubFixtureRepoFacts, GitHubFixtureRepoFailure, GitHubFixtureRepoGateway, ListFixtureBranchesResult, ReadFixtureRepoResult, } from "./gateways.ts";
7
7
  export { liveGitHubFixtureRepoGateway, type LiveGitHubFixtureRepoOptions } from "./live/fixture-repo-gateway.ts";
8
- export { GITHUB_API_ORIGIN, liveGitHubWorld } from "./live/world.ts";
8
+ export { GITHUB_API_ORIGIN, liveGitHubFixtureRepoContext } from "./live/context.ts";
9
9
  export { githubFixtureRepoDefinition } from "./definition.ts";
10
10
  export { githubFixtureRepo, type GitHubFixtureRepoEntry } from "./resource.ts";
11
11
  export { type GitHubFixtureRepoOptions, githubFixtureRepoRules, type GitHubFixtureRepoSources } from "./options.ts";
12
12
  export { checkGitHubFixtureRepoPayload, GITHUB_FIXTURE_REPO_NAME, type GitHubFixtureRepoPayload, githubFixtureRepoPayload, } from "./run/payload.ts";
13
- export type { GitHubWorld } from "./world.ts";
13
+ export type { GitHubFixtureRepoContext } from "./context.ts";
@@ -1,16 +1,16 @@
1
1
  // The GitHub fixture repository resource's folder: the repository the run opens before its command and cleans up after
2
2
  // it, its definition (`definition.ts`) with its option rules (`options.ts`) and its payload contract (`payload.ts`,
3
3
  // `@vercel/storm/github/payload`), its resource factory (`resource.ts`, `@vercel/storm/github`), its lifecycle with how
4
- // it refuses (`refusals.ts`), what releasing it reports, its gateway, and its world (`world.ts`) and live world. The
5
- // GitHub extension (`extension.ts`) lists the definition for the registry (`src/extensions.ts`), the one place outside
6
- // this folder that takes it. The rest of what it exports is for tests.
4
+ // it refuses (`refusals.ts`), what releasing it reports, its gateway, and its Context (`context.ts`) and live Context.
5
+ // The GitHub extension (`extension.ts`) lists the definition for the registry (`src/extensions.ts`), the one place
6
+ // outside this folder that takes it. The rest of what it exports is for tests.
7
7
  export { fixtureRepoCleanedText, fixtureRepoCleanupFailureText, fixtureRepoCleanupWarnings, githubFixtureRepoReleased, } from "./release.js";
8
8
  export { githubFixtureRepoUnavailable, githubTokenMissing } from "./refusals.js";
9
9
  export { githubFixtureRepoLifecycle } from "./lifecycle.js";
10
10
  export { githubExtension } from "./extension.js";
11
11
  export { cleanupFixtureRepo, failureText, FIXTURE_RUN_PREFIX_PATTERN, FIXTURE_RUN_PREFIX_ROOT, fixtureRepoPayload, fixtureRunPrefix, openFixtureRepo, } from "./fixture-repo.js";
12
12
  export { liveGitHubFixtureRepoGateway } from "./live/fixture-repo-gateway.js";
13
- export { GITHUB_API_ORIGIN, liveGitHubWorld } from "./live/world.js";
13
+ export { GITHUB_API_ORIGIN, liveGitHubFixtureRepoContext } from "./live/context.js";
14
14
  export { githubFixtureRepoDefinition } from "./definition.js";
15
15
  export { githubFixtureRepo } from "./resource.js";
16
16
  export { githubFixtureRepoRules } from "./options.js";
@@ -2,13 +2,13 @@ import type { AcquireForRunAnswer, AcquireForRunInput, BeforeRunAnswer, BeforeRu
2
2
  import { type OpenedFixtureRepo } from "./fixture-repo.ts";
3
3
  import type { GitHubFixtureRepoOptions, GitHubFixtureRepoSources } from "./options.ts";
4
4
  import type { GitHubFixtureRepoPayload } from "./run/payload.ts";
5
- import type { GitHubWorld } from "./world.ts";
5
+ import type { GitHubFixtureRepoContext } from "./context.ts";
6
6
  /** The token its `beforeRun` read from the launcher environment, which the command gets in its run payload. */
7
7
  type Secrets = {
8
8
  readonly token: string;
9
9
  };
10
10
  /**
11
- * The GitHub fixture repository's lifecycle over `world`. Its acquire takes at most one repository, with the token,
11
+ * The GitHub fixture repository's lifecycle over `context`. Its acquire takes at most one repository, with the token,
12
12
  * which never goes into a line it reports.
13
13
  * - `acquireForRun` opens the repository (`openFixtureRepo`) with the token its `beforeRun` handed the run, with the
14
14
  *run prefix's time from the clock and its suffix from `randomSuffix`; it hands the opened repository to `take` before
@@ -19,7 +19,7 @@ type Secrets = {
19
19
  * what that did, each thing it couldn't do a warning, and answers, when it deleted them all, that they are deleted.
20
20
  * An acquire that opened none took nothing.
21
21
  */
22
- export declare function githubFixtureRepoLifecycle(world: GitHubWorld): {
22
+ export declare function githubFixtureRepoLifecycle(context: GitHubFixtureRepoContext): {
23
23
  secrets: ({ options }: {
24
24
  readonly options: GitHubFixtureRepoOptions;
25
25
  }) => readonly string[];
@@ -1,19 +1,19 @@
1
- // The GitHub fixture repository resource's lifecycle, over its world. Before the run starts it reads the token from the
2
- // launcher environment variable its `tokenEnv` names, in the world's `env`. With the token, the run uses the repository
3
- // and hides the token as `<token>` in what it prints and writes; without it, an optional repository is skipped, and a
4
- // required one refuses the run (`github_token_missing`, `refusals.ts`). It never needs the Vercel credential. Acquiring
5
- // it checks the token can read the repository and picks the run prefix; releasing it deletes every branch under the run
6
- // prefix. It has no progress of its own: it reports only lines and warnings (`report`).
1
+ // The GitHub fixture repository resource's lifecycle, over its Context. Before the run starts it reads the token from
2
+ // the launcher environment variable its `tokenEnv` names, in the Context's `env`. With the token, the run uses the
3
+ // repository and hides the token as `<token>` in what it prints and writes; without it, an optional repository is
4
+ // skipped, and a required one refuses the run (`github_token_missing`, `refusals.ts`). It never needs the Vercel
5
+ // credential. Acquiring it checks the token can read the repository and picks the run prefix; releasing it deletes
6
+ // every branch under the run prefix. It has no progress of its own: it reports only lines and warnings (`report`).
7
7
  import { cleanupFixtureRepo, fixtureRepoPayload, openFixtureRepo } from "./fixture-repo.js";
8
8
  import { githubFixtureRepoUnavailable, githubTokenMissing } from "./refusals.js";
9
9
  import { fixtureRepoCleanedText, fixtureRepoCleanupWarnings, githubFixtureRepoReleased } from "./release.js";
10
10
  /** The token in the launcher environment variable `tokenEnv` names; none when it is unset or empty. */
11
- function tokenIn(world, tokenEnv) {
12
- const token = world.env[tokenEnv];
11
+ function tokenIn(context, tokenEnv) {
12
+ const token = context.env[tokenEnv];
13
13
  return token === undefined || token === "" ? undefined : token;
14
14
  }
15
15
  /**
16
- * The GitHub fixture repository's lifecycle over `world`. Its acquire takes at most one repository, with the token,
16
+ * The GitHub fixture repository's lifecycle over `context`. Its acquire takes at most one repository, with the token,
17
17
  * which never goes into a line it reports.
18
18
  * - `acquireForRun` opens the repository (`openFixtureRepo`) with the token its `beforeRun` handed the run, with the
19
19
  *run prefix's time from the clock and its suffix from `randomSuffix`; it hands the opened repository to `take` before
@@ -24,16 +24,16 @@ function tokenIn(world, tokenEnv) {
24
24
  * what that did, each thing it couldn't do a warning, and answers, when it deleted them all, that they are deleted.
25
25
  * An acquire that opened none took nothing.
26
26
  */
27
- export function githubFixtureRepoLifecycle(world) {
27
+ export function githubFixtureRepoLifecycle(context) {
28
28
  return {
29
29
  // No I/O: the token, when the launcher has it, for a refusal that comes before `beforeRun`.
30
30
  secrets: ({ options }) => {
31
- const token = tokenIn(world, options.tokenEnv);
31
+ const token = tokenIn(context, options.tokenEnv);
32
32
  return token === undefined ? [] : [token];
33
33
  },
34
34
  beforeRun: async ({ options, sources, }) => {
35
35
  const { repo, tokenEnv, optional } = options;
36
- const token = tokenIn(world, tokenEnv);
36
+ const token = tokenIn(context, tokenEnv);
37
37
  if (token !== undefined)
38
38
  return { use: { secrets: { token }, needsVercelCredential: false, hiddenVariables: [] } };
39
39
  if (optional)
@@ -43,7 +43,7 @@ export function githubFixtureRepoLifecycle(world) {
43
43
  return githubTokenMissing({ tokenEnv, repo, requiredBy: sources.optional === "flag" ? "flag" : "config" });
44
44
  },
45
45
  acquireForRun: async ({ options, secrets, take, report, }) => {
46
- const opened = await openFixtureRepo(world, { repo: options.repo, token: secrets.token }, { startedAt: world.clock.now(), suffix: world.randomSuffix() });
46
+ const opened = await openFixtureRepo(context, { repo: options.repo, token: secrets.token }, { startedAt: context.clock.now(), suffix: context.randomSuffix() });
47
47
  if (opened.kind === "unavailable")
48
48
  return githubFixtureRepoUnavailable({
49
49
  repo: opened.repo,
@@ -59,7 +59,7 @@ export function githubFixtureRepoLifecycle(world) {
59
59
  // An acquire takes at most one GitHub fixture repository.
60
60
  if (repo === undefined)
61
61
  return { nothingTaken: true };
62
- const cleaned = await cleanupFixtureRepo(world, repo);
62
+ const cleaned = await cleanupFixtureRepo(context, repo);
63
63
  await report.cleanup(fixtureRepoCleanedText(repo.nameWithOwner, cleaned));
64
64
  for (const { reason, message } of fixtureRepoCleanupWarnings(cleaned))
65
65
  await report.warning(reason, message);
@@ -0,0 +1,6 @@
1
+ import type { LauncherContext } from "../../../sdk/extension/index.ts";
2
+ import type { GitHubFixtureRepoContext } from "../context.ts";
3
+ /** GitHub's REST API origin, which the GitHub fixture repository resource calls. */
4
+ export declare const GITHUB_API_ORIGIN = "https://api.github.com";
5
+ /** The GitHub fixture repository's Context, live, over the launcher environment. */
6
+ export declare function liveGitHubFixtureRepoContext({ env, clock }: LauncherContext): GitHubFixtureRepoContext;
@@ -0,0 +1,16 @@
1
+ // The GitHub fixture repository resource's live Context: the launcher environment, GitHub's REST API at
2
+ // `api.github.com`, with a 10-second timeout per call, 8 random hex digits for a run prefix's suffix, and the
3
+ // launcher's clock, which a run prefix's time comes from.
4
+ import { randomBytes } from "node:crypto";
5
+ import { liveGitHubFixtureRepoGateway } from "./fixture-repo-gateway.js";
6
+ /** GitHub's REST API origin, which the GitHub fixture repository resource calls. */
7
+ export const GITHUB_API_ORIGIN = "https://api.github.com";
8
+ /** The GitHub fixture repository's Context, live, over the launcher environment. */
9
+ export function liveGitHubFixtureRepoContext({ env, clock }) {
10
+ return {
11
+ env,
12
+ githubFixtureRepos: liveGitHubFixtureRepoGateway({ origin: GITHUB_API_ORIGIN, timeoutMs: 10_000 }),
13
+ randomSuffix: () => randomBytes(4).toString("hex"),
14
+ clock,
15
+ };
16
+ }
@@ -31,6 +31,6 @@ export declare const githubFixtureRepo: import("../../sdk/extension/resource-fac
31
31
  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.";
32
32
  };
33
33
  };
34
- }, import("./run/payload.ts").GitHubFixtureRepoPayload, import("./world.ts").GitHubWorld>>;
34
+ }, import("./run/payload.ts").GitHubFixtureRepoPayload, import("./context.ts").GitHubFixtureRepoContext>>;
35
35
  /** The GitHub fixture repository resource's entry, which `githubFixtureRepo()` makes for `resources.githubFixtureRepo`. */
36
36
  export type GitHubFixtureRepoEntry = ReturnType<typeof githubFixtureRepo>;
@@ -0,0 +1,8 @@
1
+ import { type PlaywrightListGateway } from "./plan/plan.ts";
2
+ /**
3
+ * The Playwright driver's Context: what its plan step reaches Playwright on this machine through, to count the tests.
4
+ */
5
+ export interface PlaywrightDriverContext {
6
+ readonly list: PlaywrightListGateway;
7
+ }
8
+ export declare const playwrightDriver: import("../../sdk/extension/driver.ts").Driver<"playwright", PlaywrightDriverContext>;
@@ -0,0 +1,60 @@
1
+ // storm's Playwright driver: what the launcher knows of Playwright, the program `storm playwright`'s command starts.
2
+ // It names the binary, builds the `playwright test` argv, counts the tests with `playwright test --list` through its
3
+ // gateway (`plan/`), a test once per Playwright project that runs it, and holds the words that name Playwright:
4
+ // `storm playwright`'s leaf help, what its run's summary says to do next, and what its two refusals say. The launcher
5
+ // makes `storm playwright` from it (`defineRunCommand`), reaching it through the registry (`src/extensions.ts`).
6
+ import { argsText, defineDriver } from "../../sdk/extension/index.js";
7
+ import { describePlaywrightListFailure, livePlaywrightListGateway, planPlaywrightRun, playwrightRunArgv, } from "./plan/plan.js";
8
+ export const playwrightDriver = defineDriver({
9
+ name: "playwright",
10
+ program: { bin: "playwright" },
11
+ context: () => ({ list: livePlaywrightListGateway }),
12
+ launch: playwrightRunArgv,
13
+ // `playwright test <args> --list`, which may take 120s (`LIST_TIMEOUT_MS`); a failure in
14
+ // `describePlaywrightListFailure`'s words.
15
+ plan: ({ list }) => async ({ args, cwd, bin, signal }) => {
16
+ const planned = await planPlaywrightRun({ args, cwd, executable: bin, signal }, list);
17
+ if (planned.ok)
18
+ return planned;
19
+ const { failure } = planned;
20
+ return { ok: false, kind: failure.kind, message: describePlaywrightListFailure(failure) };
21
+ },
22
+ help: {
23
+ usage: "[<playwright test args>...] [-- <playwright dash options>...]",
24
+ 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.",
25
+ // Nothing storm brings a Playwright project reads the run payload's `verbose`: storm's Playwright reporter never
26
+ // prints (`printsToStdio()` is false).
27
+ verbose: "which test code can read; storm's Playwright reporter prints nothing either way",
28
+ examples: [
29
+ {
30
+ argv: "",
31
+ 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.",
32
+ },
33
+ {
34
+ argv: "--unsandboxed tests/login.spec.ts -- --project chromium",
35
+ description: "Run the chromium project's tests in tests/login.spec.ts on this machine.",
36
+ },
37
+ ],
38
+ },
39
+ hints: {
40
+ // No final result: the Playwright config doesn't list storm's Playwright reporter, or a `--reporter` on
41
+ // Playwright's command line replaced it. A config lists a reporter as a tuple of its module name.
42
+ noFinalResults: 'add ["@vercel/storm/playwright/reporter"] to the reporter list in playwright.config',
43
+ },
44
+ refusals: {
45
+ noMatchingTests: {
46
+ description: "playwright test --list found no test for the arguments given to playwright test, so nothing was minted, acquired or started.",
47
+ message: ({ args, cwd }) => `playwright test --list found no test for playwright test ${argsText(args)} in ${cwd}. The command didn't run.`,
48
+ next: ({ args }) => `Change the arguments given to playwright test (${argsText(args)}), then retry. Put Playwright's own dash options after --.`,
49
+ },
50
+ planFailed: {
51
+ 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.",
52
+ next: {
53
+ "start-failed": "Install @playwright/test in the package, or run the command with storm exec, which counts nothing.",
54
+ "timed-out": "Check why playwright test --list doesn't finish, such as a config file that waits, then retry.",
55
+ exited: "Fix what playwright test --list reports, then retry.",
56
+ "unreadable-output": "Check that the package's playwright writes its list with --reporter=json to the file PLAYWRIGHT_JSON_OUTPUT_FILE names, then retry.",
57
+ },
58
+ },
59
+ },
60
+ });
@@ -0,0 +1,2 @@
1
+ /** The Playwright extension. Its one driver is storm's Playwright driver. */
2
+ export declare const playwrightExtension: import("../../sdk/extension/commands.ts").Extension<"playwright", readonly [], unknown, readonly [import("../../sdk/extension/driver.ts").Driver<"playwright", import("./driver.ts").PlaywrightDriverContext>]>;
@@ -0,0 +1,12 @@
1
+ // The Playwright extension: storm's Playwright driver (`driver.ts`), which it lists for the registry
2
+ // (`src/extensions.ts`). It brings no resource and no commands of its own: the launcher makes `storm playwright` from
3
+ // the driver. The one value the folder hands the registry. What test code uses with Playwright is the test runner
4
+ // library (`src/playwright/`), which knows nothing of this extension.
5
+ import { defineExtension } from "../../sdk/extension/commands.js";
6
+ import { playwrightDriver } from "./driver.js";
7
+ /** The Playwright extension. Its one driver is storm's Playwright driver. */
8
+ export const playwrightExtension = defineExtension({
9
+ name: "playwright",
10
+ resources: [],
11
+ drivers: [playwrightDriver],
12
+ });
@@ -0,0 +1,62 @@
1
+ /** One test `playwright test --list` names: a test in one Playwright project. */
2
+ export interface ListedTest {
3
+ /** Its full name, its `describe` titles and its own joined by ` > `. */
4
+ readonly name: string;
5
+ /** The absolute path of its file. */
6
+ readonly file: string;
7
+ /** The Playwright project that runs it; a test in two projects is listed twice. */
8
+ readonly project: string;
9
+ }
10
+ /** What to list: `playwright test` with `args`, such as a project and file filters, and `--list`. */
11
+ export interface PlaywrightListRequest {
12
+ /** Passed to `playwright test --list`, as `playwright test` takes them. */
13
+ readonly args: readonly string[];
14
+ /** Where Playwright runs; default the current directory. */
15
+ readonly cwd?: string;
16
+ /**
17
+ * The `playwright` to start, such as the absolute path of a `node_modules/.bin/playwright`; default `playwright`
18
+ * from `PATH`.
19
+ */
20
+ readonly executable?: string;
21
+ /** How long the listing may take before it is killed. */
22
+ readonly timeoutMs: number;
23
+ /** Stops the listing when it aborts, before it starts or while it runs: the listing is `canceled`. */
24
+ readonly signal?: AbortSignal;
25
+ }
26
+ /**
27
+ * Why the tests couldn't be listed: `playwright` couldn't be started (not on `PATH` or not found, or no such `cwd`),
28
+ * it didn't finish within `timeoutMs`, it exited other than 0 (with the first error its report holds, else the last
29
+ * line of its stderr that isn't blank or a stack frame, empty when there is neither), its report wasn't a list of
30
+ * tests, or the request's `signal` stopped it.
31
+ */
32
+ export type PlaywrightListFailure = {
33
+ readonly kind: "start-failed";
34
+ readonly message: string;
35
+ } | {
36
+ readonly kind: "timed-out";
37
+ readonly timeoutMs: number;
38
+ } | {
39
+ readonly kind: "exited";
40
+ readonly exitCode: number | null;
41
+ readonly signal: string | null;
42
+ readonly said: string;
43
+ } | {
44
+ readonly kind: "unreadable-output";
45
+ readonly message: string;
46
+ } | {
47
+ readonly kind: "canceled";
48
+ };
49
+ export type PlaywrightListResult = {
50
+ readonly ok: true;
51
+ readonly tests: readonly ListedTest[];
52
+ } | {
53
+ readonly ok: false;
54
+ readonly failure: PlaywrightListFailure;
55
+ };
56
+ export interface PlaywrightListGateway {
57
+ /**
58
+ * Lists the tests a `playwright test` with the same arguments would run, without running them. Arguments that
59
+ * match no test list none: that is no failure.
60
+ */
61
+ listTests(request: PlaywrightListRequest): Promise<PlaywrightListResult>;
62
+ }
@@ -0,0 +1,4 @@
1
+ // storm's Playwright driver's gateway: listing the tests a `playwright test` would run, before any resource is
2
+ // acquired. The live gateway is `live/list-gateway.ts`; the fake is
3
+ // `test/fakes/extensions/playwright/plan/list-gateway.ts`.
4
+ export {};
@@ -0,0 +1,26 @@
1
+ import type { ListedTest, PlaywrightListResult } from "./gateways.ts";
2
+ /** What a JSON report of a listing holds: its tests, and the message of each error Playwright reported. */
3
+ export interface PlaywrightList {
4
+ readonly tests: readonly ListedTest[];
5
+ readonly errors: readonly string[];
6
+ }
7
+ /**
8
+ * The tests and errors `report` names, the text of a JSON report. Throws an `Error` when it isn't JSON, or isn't a
9
+ * report.
10
+ */
11
+ export declare function readPlaywrightList(report: string): PlaywrightList;
12
+ /** How a listing's process ended, and what it left. */
13
+ export interface PlaywrightListEnd {
14
+ readonly exitCode: number | null;
15
+ readonly signal: string | null;
16
+ /** The JSON report's text; undefined when the process wrote none. */
17
+ readonly report: string | undefined;
18
+ readonly stderr: string;
19
+ }
20
+ /**
21
+ * What a listing that ran to its end answers. Exit 0 with a report lists its tests. Playwright exits 1 when the
22
+ * arguments match no test, with that as its report's only error: that lists no test, and is no failure. Any other
23
+ * exit is `exited`, with the first line of the report's first error, else stderr's last line that isn't a stack frame.
24
+ * A report that can't be read, or exit 0 without one, is `unreadable-output`.
25
+ */
26
+ export declare function playwrightListResult(end: PlaywrightListEnd): PlaywrightListResult;
@@ -0,0 +1,101 @@
1
+ // Reading what `playwright test --list --reporter=json` leaves: its JSON report, which names each test once per
2
+ // Playwright project, and how the listing ended. Pure, so the live gateway's tests need no process.
3
+ import { resolve } from "node:path";
4
+ import { z } from "zod";
5
+ /** A spec in the JSON report: one test's declaration, with one entry in `tests` per project that runs it. */
6
+ const SPEC = z.looseObject({
7
+ title: z.string(),
8
+ /** Its file, relative to the config's `rootDir`. */
9
+ file: z.string(),
10
+ tests: z.array(z.looseObject({ projectName: z.string() })),
11
+ });
12
+ const SUITE = z.lazy(() => z.looseObject({ title: z.string(), specs: z.array(SPEC).optional(), suites: z.array(SUITE).optional() }));
13
+ /** The JSON report; other fields, such as `stats`, pass through unchecked. */
14
+ const REPORT = z.looseObject({
15
+ config: z.looseObject({ rootDir: z.string() }),
16
+ suites: z.array(SUITE),
17
+ errors: z.array(z.looseObject({ message: z.string().optional() })).optional(),
18
+ });
19
+ /**
20
+ * The tests and errors `report` names, the text of a JSON report. Throws an `Error` when it isn't JSON, or isn't a
21
+ * report.
22
+ */
23
+ export function readPlaywrightList(report) {
24
+ let document;
25
+ try {
26
+ document = JSON.parse(report);
27
+ }
28
+ catch {
29
+ throw new Error("`playwright test --list --reporter=json` did not write JSON");
30
+ }
31
+ const parsed = REPORT.safeParse(document);
32
+ if (!parsed.success)
33
+ throw new Error("`playwright test --list --reporter=json` did not write a list of tests");
34
+ const { config, suites, errors } = parsed.data;
35
+ const tests = [];
36
+ // A top suite is a file, whose title is its path: a test's name starts below it.
37
+ for (const file of suites)
38
+ collect(file, [], config.rootDir, tests);
39
+ return { tests, errors: (errors ?? []).map(({ message }) => message ?? "") };
40
+ }
41
+ function collect(suite, titles, rootDir, into) {
42
+ for (const spec of suite.specs ?? []) {
43
+ const name = [...titles, spec.title].join(" > ");
44
+ const file = resolve(rootDir, spec.file);
45
+ for (const { projectName } of spec.tests)
46
+ into.push({ name, file, project: projectName });
47
+ }
48
+ for (const nested of suite.suites ?? [])
49
+ collect(nested, [...titles, nested.title], rootDir, into);
50
+ }
51
+ /** What Playwright's error says when its arguments match no test. */
52
+ const NO_TESTS_FOUND = /^Error: No tests found\b/;
53
+ /**
54
+ * What a listing that ran to its end answers. Exit 0 with a report lists its tests. Playwright exits 1 when the
55
+ * arguments match no test, with that as its report's only error: that lists no test, and is no failure. Any other
56
+ * exit is `exited`, with the first line of the report's first error, else stderr's last line that isn't a stack frame.
57
+ * A report that can't be read, or exit 0 without one, is `unreadable-output`.
58
+ */
59
+ export function playwrightListResult(end) {
60
+ let list;
61
+ if (end.report !== undefined) {
62
+ try {
63
+ list = readPlaywrightList(end.report);
64
+ }
65
+ catch (error) {
66
+ if (end.exitCode === 0)
67
+ return { ok: false, failure: { kind: "unreadable-output", message: error.message } };
68
+ }
69
+ }
70
+ if (end.exitCode === 0) {
71
+ if (list !== undefined)
72
+ return { ok: true, tests: list.tests };
73
+ return {
74
+ ok: false,
75
+ failure: { kind: "unreadable-output", message: "`playwright test --list --reporter=json` wrote no report" },
76
+ };
77
+ }
78
+ if (list !== undefined && list.tests.length === 0 && list.errors.length > 0) {
79
+ if (list.errors.every((message) => NO_TESTS_FOUND.test(message)))
80
+ return { ok: true, tests: [] };
81
+ }
82
+ const said = firstLine(list?.errors.find((message) => message !== "") ?? "") || lastLine(end.stderr);
83
+ return { ok: false, failure: { kind: "exited", exitCode: end.exitCode, signal: end.signal, said } };
84
+ }
85
+ /** The first line of `text` that isn't blank, trimmed; empty when there is none. */
86
+ function firstLine(text) {
87
+ return (text
88
+ .split(/\r?\n/)
89
+ .map((line) => line.trim())
90
+ .find((line) => line !== "") ?? "");
91
+ }
92
+ /**
93
+ * The last line of `text` that is neither blank nor a stack frame (`at …`), trimmed, so an error's stack leaves its
94
+ * message; empty when there is none.
95
+ */
96
+ function lastLine(text) {
97
+ return (text
98
+ .split(/\r?\n/)
99
+ .map((line) => line.trim())
100
+ .findLast((line) => line !== "" && !/^at\s/.test(line)) ?? "");
101
+ }
@@ -0,0 +1,15 @@
1
+ import type { PlaywrightListGateway } from "../gateways.ts";
2
+ /**
3
+ * The live list gateway. `listTests` spawns `playwright test <args> --list --reporter=json`, with the listing flags
4
+ * before the first `--` among `args` (`listArgv`), the
5
+ * request's `executable` or `playwright` from `PATH`, no shell, in `cwd`, with stdin and stdout ignored and this
6
+ * process's environment. The JSON reporter writes its report to a file in a temporary directory of the listing's own
7
+ * (`PLAYWRIGHT_JSON_OUTPUT_FILE`), not to stdout, where a config file or a package it loads may print too; the
8
+ * directory is removed once the listing has answered. `--list` loads the config and the test files, and neither runs
9
+ * the config's global setup nor starts its web server. It sends SIGTERM after `timeoutMs` (`AbortSignal.timeout`), or
10
+ * once the request's `signal` aborts, then waits for the process to exit and answers `timed-out` or `canceled`,
11
+ * `canceled` when the request's `signal` aborted. It waits for the exit, not for the pipe to close, since a process
12
+ * `playwright` left behind could hold it open. Any other `error` is a start failure, answered at once, since no
13
+ * process started.
14
+ */
15
+ export declare const livePlaywrightListGateway: PlaywrightListGateway;