@overkill-dev/run 0.0.62 → 0.0.64

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 (421) hide show
  1. package/assertion-protocol/assertion-node.d.ts +0 -15
  2. package/assertion-protocol/assertion-node.d.ts.map +1 -1
  3. package/assertion-protocol/assertion-reference.d.ts +0 -21
  4. package/assertion-protocol/assertion-reference.d.ts.map +1 -1
  5. package/assertion-protocol/assertion-reference.js +3 -30
  6. package/assertion-protocol/assertion-reference.js.map +1 -1
  7. package/assertion-protocol/assertions/boolean.d.ts +0 -7
  8. package/assertion-protocol/assertions/boolean.d.ts.map +1 -1
  9. package/assertion-protocol/assertions/collection.d.ts +0 -9
  10. package/assertion-protocol/assertions/collection.d.ts.map +1 -1
  11. package/assertion-protocol/assertions/equality.d.ts +0 -11
  12. package/assertion-protocol/assertions/equality.d.ts.map +1 -1
  13. package/assertion-protocol/assertions/fail.d.ts +0 -5
  14. package/assertion-protocol/assertions/fail.d.ts.map +1 -1
  15. package/assertion-protocol/assertions/numeric.d.ts +0 -13
  16. package/assertion-protocol/assertions/numeric.d.ts.map +1 -1
  17. package/assertion-protocol/assertions/partial.d.ts +0 -9
  18. package/assertion-protocol/assertions/partial.d.ts.map +1 -1
  19. package/assertion-protocol/assertions/presence.d.ts +0 -11
  20. package/assertion-protocol/assertions/presence.d.ts.map +1 -1
  21. package/assertion-protocol/assertions/string.d.ts +0 -13
  22. package/assertion-protocol/assertions/string.d.ts.map +1 -1
  23. package/assertion-protocol/assertions/type-shape.d.ts +0 -19
  24. package/assertion-protocol/assertions/type-shape.d.ts.map +1 -1
  25. package/assertion-protocol/source-location-forwarding.js +15 -9
  26. package/assertion-protocol/source-location-forwarding.js.map +1 -1
  27. package/assertion-protocol/source-location.js +1 -0
  28. package/assertion-protocol/source-location.js.map +1 -1
  29. package/assertion-protocol/thrown-error-record.d.ts +0 -1
  30. package/assertion-protocol/thrown-error-record.d.ts.map +1 -1
  31. package/assertion-protocol/thrown-matcher.d.ts +1 -18
  32. package/assertion-protocol/thrown-matcher.d.ts.map +1 -1
  33. package/compare/serialized-value-shape.d.ts +0 -9
  34. package/compare/serialized-value-shape.d.ts.map +1 -1
  35. package/compare/serialized-value.d.ts +1 -8
  36. package/compare/serialized-value.d.ts.map +1 -1
  37. package/engine/assertion-facade.d.ts +2 -5
  38. package/engine/assertion-facade.d.ts.map +1 -1
  39. package/engine/async-control.d.ts +0 -26
  40. package/engine/async-control.d.ts.map +1 -1
  41. package/engine/async-leak-diagnostics.js +9 -9
  42. package/engine/async-leak-diagnostics.js.map +1 -1
  43. package/engine/case-attempt-execution.js +191 -0
  44. package/engine/case-attempt-execution.js.map +1 -0
  45. package/engine/case-execution.d.ts +5 -16
  46. package/engine/case-execution.d.ts.map +1 -1
  47. package/engine/case-execution.js +25 -24
  48. package/engine/case-execution.js.map +1 -1
  49. package/engine/coverage-artifact.d.ts +1 -14
  50. package/engine/coverage-artifact.d.ts.map +1 -1
  51. package/engine/custom-assertion-recording.js +1 -1
  52. package/engine/custom-assertion-recording.js.map +1 -1
  53. package/engine/engine.d.ts +1 -8
  54. package/engine/engine.d.ts.map +1 -1
  55. package/engine/execution-async-leak-policy.js +3 -10
  56. package/engine/execution-async-leak-policy.js.map +1 -1
  57. package/engine/execution-global-error-observer.d.ts +2 -4
  58. package/engine/execution-global-error-observer.d.ts.map +1 -1
  59. package/engine/execution-global-error-observer.js +20 -46
  60. package/engine/execution-global-error-observer.js.map +1 -1
  61. package/engine/execution-options.d.ts +4 -7
  62. package/engine/execution-options.d.ts.map +1 -1
  63. package/engine/execution-options.js +7 -2
  64. package/engine/execution-options.js.map +1 -1
  65. package/engine/execution-resource-budget-breach.d.ts +0 -9
  66. package/engine/execution-resource-budget-breach.d.ts.map +1 -1
  67. package/engine/execution-resource-budget-tracking.js.map +1 -1
  68. package/engine/execution-resource-tracked-cases.js.map +1 -1
  69. package/engine/execution-result.js.map +1 -1
  70. package/engine/execution-supervision-state.js.map +1 -1
  71. package/engine/execution-supervision.d.ts +0 -16
  72. package/engine/execution-supervision.d.ts.map +1 -1
  73. package/engine/execution-supervision.js +50 -33
  74. package/engine/execution-supervision.js.map +1 -1
  75. package/engine/execution-test-plan-cases.js +6 -126
  76. package/engine/execution-test-plan-cases.js.map +1 -1
  77. package/engine/execution-test-plan-resource-usage.js.map +1 -1
  78. package/engine/execution.d.ts +1 -12
  79. package/engine/execution.d.ts.map +1 -1
  80. package/engine/execution.js +3 -3
  81. package/engine/execution.js.map +1 -1
  82. package/engine/identity.d.ts +3 -6
  83. package/engine/identity.d.ts.map +1 -1
  84. package/engine/reporter-dispatcher.d.ts +1 -11
  85. package/engine/reporter-dispatcher.d.ts.map +1 -1
  86. package/engine/reporter-dispatcher.js +1 -0
  87. package/engine/reporter-dispatcher.js.map +1 -1
  88. package/engine/reporter-event-queue.js.map +1 -1
  89. package/engine/reporter-output.d.ts +0 -6
  90. package/engine/reporter-output.d.ts.map +1 -1
  91. package/engine/reporter.d.ts +2 -17
  92. package/engine/reporter.d.ts.map +1 -1
  93. package/engine/reporter.js.map +1 -1
  94. package/engine/reporting-context.d.ts +1 -13
  95. package/engine/reporting-context.d.ts.map +1 -1
  96. package/engine/require-assertion-facade.d.ts +2 -5
  97. package/engine/require-assertion-facade.d.ts.map +1 -1
  98. package/engine/resource-usage.d.ts +22 -0
  99. package/engine/resource-usage.d.ts.map +1 -0
  100. package/engine/retry-policy.d.ts +4 -0
  101. package/engine/retry-policy.d.ts.map +1 -0
  102. package/engine/retry-policy.js +22 -0
  103. package/engine/retry-policy.js.map +1 -0
  104. package/engine/run-artifact.d.ts +45 -0
  105. package/engine/run-artifact.d.ts.map +1 -0
  106. package/engine/run-result.d.ts +18 -114
  107. package/engine/run-result.d.ts.map +1 -1
  108. package/engine/run-result.js +14 -0
  109. package/engine/run-result.js.map +1 -1
  110. package/engine/run-timings.d.ts +0 -18
  111. package/engine/run-timings.d.ts.map +1 -1
  112. package/engine/runner-error-reporting.js.map +1 -1
  113. package/engine/test-attempt-history.js +24 -0
  114. package/engine/test-attempt-history.js.map +1 -0
  115. package/engine/test-body-resource-attachment.d.ts +0 -12
  116. package/engine/test-body-resource-attachment.d.ts.map +1 -1
  117. package/engine/test-body-resource-attachment.js +3 -134
  118. package/engine/test-body-resource-attachment.js.map +1 -1
  119. package/engine/test-data.d.ts +0 -6
  120. package/engine/test-data.d.ts.map +1 -1
  121. package/engine/test-node.d.ts +0 -21
  122. package/engine/test-node.d.ts.map +1 -1
  123. package/engine/test-node.js +1 -20
  124. package/engine/test-node.js.map +1 -1
  125. package/engine/test-plan.d.ts +1 -4
  126. package/engine/test-plan.d.ts.map +1 -1
  127. package/package.json +21 -7
  128. package/packages/run/config.entry-point.d.ts +2 -0
  129. package/packages/run/config.entry-point.d.ts.map +1 -1
  130. package/packages/run/run.entry-point.d.ts +2 -0
  131. package/packages/run/run.entry-point.d.ts.map +1 -1
  132. package/packages/run/transcript-store.entry-point.d.ts +3 -0
  133. package/packages/run/transcript-store.entry-point.d.ts.map +1 -0
  134. package/packages/run/transcript-store.entry-point.js +2 -0
  135. package/packages/run/transcript-store.entry-point.js.map +1 -0
  136. package/packages/simulation/transcript.entry-point.js +2 -0
  137. package/packages/simulation/transcript.entry-point.js.map +1 -0
  138. package/readme.md +47 -2
  139. package/reporters/human-reporter-rendering.js +12 -3
  140. package/reporters/human-reporter-rendering.js.map +1 -1
  141. package/reporters/line-reporter.js +6 -1
  142. package/reporters/line-reporter.js.map +1 -1
  143. package/reporters/tree-reporter.js +2 -103
  144. package/reporters/tree-reporter.js.map +1 -1
  145. package/resources/resource-definition-shape.d.ts +0 -2
  146. package/resources/resource-definition-shape.d.ts.map +1 -1
  147. package/resources/resource-definition-types.d.ts +1 -96
  148. package/resources/resource-definition-types.d.ts.map +1 -1
  149. package/resources/resource-definition.js.map +1 -1
  150. package/resources/resource-lifecycle-error.d.ts +0 -1
  151. package/resources/resource-lifecycle-error.d.ts.map +1 -1
  152. package/resources/resource-lifecycle-error.js +17 -1
  153. package/resources/resource-lifecycle-error.js.map +1 -1
  154. package/resources/resource-scenario-binding.js +1 -69
  155. package/resources/resource-scenario-binding.js.map +1 -1
  156. package/resources/resource-scenario.d.ts +0 -19
  157. package/resources/resource-scenario.d.ts.map +1 -1
  158. package/resources/resource-session.d.ts +1 -20
  159. package/resources/resource-session.d.ts.map +1 -1
  160. package/resources/resources.d.ts +5 -88
  161. package/resources/resources.d.ts.map +1 -1
  162. package/resources/resources.js +5 -81
  163. package/resources/resources.js.map +1 -1
  164. package/resources/runtime-definition.d.ts +0 -7
  165. package/resources/runtime-definition.d.ts.map +1 -1
  166. package/resources/runtime-definition.js +2 -57
  167. package/resources/runtime-definition.js.map +1 -1
  168. package/resources/runtime-matrix-definition.d.ts +0 -36
  169. package/resources/runtime-matrix-definition.d.ts.map +1 -1
  170. package/run/capability-policy-snapshots.d.ts +0 -19
  171. package/run/capability-policy-snapshots.d.ts.map +1 -1
  172. package/run/capability-policy.js +10 -5
  173. package/run/capability-policy.js.map +1 -1
  174. package/run/collected-run-plan.js.map +1 -1
  175. package/run/command-line-command-namespace.d.ts +0 -5
  176. package/run/command-line-command-namespace.d.ts.map +1 -1
  177. package/run/command-line-command.d.ts +1 -4
  178. package/run/command-line-command.d.ts.map +1 -1
  179. package/run/command-line-runner.d.ts +0 -2
  180. package/run/command-line-runner.d.ts.map +1 -1
  181. package/run/coverage-loaded-sources.js +112 -0
  182. package/run/coverage-loaded-sources.js.map +1 -0
  183. package/run/coverage-native-data.js +18 -0
  184. package/run/coverage-native-data.js.map +1 -0
  185. package/run/coverage-paths.js +45 -4
  186. package/run/coverage-paths.js.map +1 -1
  187. package/run/coverage-reporting.js +37 -123
  188. package/run/coverage-reporting.js.map +1 -1
  189. package/run/coverage-run-record.js +50 -0
  190. package/run/coverage-run-record.js.map +1 -0
  191. package/run/coverage-runtime-source.js +37 -0
  192. package/run/coverage-runtime-source.js.map +1 -0
  193. package/run/coverage-session.js +344 -6
  194. package/run/coverage-session.js.map +1 -1
  195. package/run/coverage-source-map.js +125 -0
  196. package/run/coverage-source-map.js.map +1 -0
  197. package/run/coverage-source-selection.js +120 -0
  198. package/run/coverage-source-selection.js.map +1 -0
  199. package/run/current-process-run-orchestrator.d.ts +1 -5
  200. package/run/current-process-run-orchestrator.d.ts.map +1 -1
  201. package/run/duration-history.d.ts +0 -30
  202. package/run/duration-history.d.ts.map +1 -1
  203. package/run/duration-history.js +1 -0
  204. package/run/duration-history.js.map +1 -1
  205. package/run/node-run-execution.js +25 -0
  206. package/run/node-run-execution.js.map +1 -0
  207. package/run/node-runtime-state-store.js +38 -0
  208. package/run/node-runtime-state-store.js.map +1 -0
  209. package/run/node-worker-pool-factory.js +0 -31
  210. package/run/node-worker-pool-factory.js.map +1 -1
  211. package/run/path-containment.js +6 -1
  212. package/run/path-containment.js.map +1 -1
  213. package/run/permission-denial-runtime-policy.js +21 -13
  214. package/run/permission-denial-runtime-policy.js.map +1 -1
  215. package/run/placement-trace.d.ts +0 -18
  216. package/run/placement-trace.d.ts.map +1 -1
  217. package/run/recorded-coverage-run.js +45 -0
  218. package/run/recorded-coverage-run.js.map +1 -0
  219. package/run/recorded-coverage-session.js +50 -0
  220. package/run/recorded-coverage-session.js.map +1 -0
  221. package/run/resource-lifecycle-composition.d.ts +0 -3
  222. package/run/resource-lifecycle-composition.d.ts.map +1 -1
  223. package/run/resource-lifecycle-composition.js +1 -14
  224. package/run/resource-lifecycle-composition.js.map +1 -1
  225. package/run/resource-lifecycle-session-acquirer.js +11 -6
  226. package/run/resource-lifecycle-session-acquirer.js.map +1 -1
  227. package/run/resource-lifecycle-state.d.ts +4 -5
  228. package/run/resource-lifecycle-state.d.ts.map +1 -1
  229. package/run/resource-lifecycle-state.js +9 -3
  230. package/run/resource-lifecycle-state.js.map +1 -1
  231. package/run/resource-lifecycle.js +36 -10
  232. package/run/resource-lifecycle.js.map +1 -1
  233. package/run/resource-usage.js.map +1 -1
  234. package/run/retry-artifact-retention.js +37 -0
  235. package/run/retry-artifact-retention.js.map +1 -0
  236. package/run/run-collection-source.d.ts +1 -5
  237. package/run/run-collection-source.d.ts.map +1 -1
  238. package/run/run-config-schema.d.ts +25 -4
  239. package/run/run-config-schema.d.ts.map +1 -1
  240. package/run/run-config-schema.js +7 -0
  241. package/run/run-config-schema.js.map +1 -1
  242. package/run/run-config.d.ts +3 -3
  243. package/run/run-config.d.ts.map +1 -1
  244. package/run/run-config.js +4 -0
  245. package/run/run-config.js.map +1 -1
  246. package/run/run-coverage.js +5 -2
  247. package/run/run-coverage.js.map +1 -1
  248. package/run/run-discovery-types.d.ts +0 -14
  249. package/run/run-discovery-types.d.ts.map +1 -1
  250. package/run/run-engine-primitives.d.ts +11 -0
  251. package/run/run-engine-primitives.d.ts.map +1 -0
  252. package/run/run-engine-selection.d.ts +0 -10
  253. package/run/run-engine-selection.d.ts.map +1 -1
  254. package/run/run-errors.d.ts +0 -2
  255. package/run/run-errors.d.ts.map +1 -1
  256. package/run/run-errors.js +1 -0
  257. package/run/run-errors.js.map +1 -1
  258. package/run/run-execution-config.d.ts +5 -0
  259. package/run/run-execution-config.d.ts.map +1 -1
  260. package/run/run-facts.js +2 -0
  261. package/run/run-facts.js.map +1 -1
  262. package/run/run-if-main-options.d.ts +0 -7
  263. package/run/run-if-main-options.d.ts.map +1 -1
  264. package/run/run-if-main-profile.d.ts +0 -1
  265. package/run/run-if-main-profile.d.ts.map +1 -1
  266. package/run/run-if-main.d.ts +0 -1
  267. package/run/run-if-main.d.ts.map +1 -1
  268. package/run/run-isolated-command.js +2 -0
  269. package/run/run-isolated-command.js.map +1 -1
  270. package/run/run-local-command.js +8 -82
  271. package/run/run-local-command.js.map +1 -1
  272. package/run/run-local-coverage.js +72 -0
  273. package/run/run-local-coverage.js.map +1 -0
  274. package/run/run-local-execution.js +1 -0
  275. package/run/run-local-execution.js.map +1 -1
  276. package/run/run-local-resolution.js +6 -3
  277. package/run/run-local-resolution.js.map +1 -1
  278. package/run/run-orchestrator-dependencies.d.ts +2 -7
  279. package/run/run-orchestrator-dependencies.d.ts.map +1 -1
  280. package/run/run-orchestrator.d.ts +0 -8
  281. package/run/run-orchestrator.d.ts.map +1 -1
  282. package/run/run-orchestrator.entry-point.d.ts +1 -1
  283. package/run/run-orchestrator.entry-point.d.ts.map +1 -1
  284. package/run/run-orchestrator.js +6 -18
  285. package/run/run-orchestrator.js.map +1 -1
  286. package/run/run-record-error.js +26 -0
  287. package/run/run-record-error.js.map +1 -0
  288. package/run/run-record-input.js +34 -0
  289. package/run/run-record-input.js.map +1 -0
  290. package/run/run-record-outcomes.d.ts +46 -0
  291. package/run/run-record-outcomes.d.ts.map +1 -0
  292. package/run/run-record-result.js +58 -0
  293. package/run/run-record-result.js.map +1 -0
  294. package/run/run-record-storage.js +51 -0
  295. package/run/run-record-storage.js.map +1 -0
  296. package/run/run-record-types.d.ts +73 -0
  297. package/run/run-record-types.d.ts.map +1 -0
  298. package/run/run-record-versions.js +51 -0
  299. package/run/run-record-versions.js.map +1 -0
  300. package/run/run-record.js +48 -0
  301. package/run/run-record.js.map +1 -0
  302. package/run/run-result-reporting.js +16 -0
  303. package/run/run-result-reporting.js.map +1 -0
  304. package/run/run-selection-filters.d.ts +2 -11
  305. package/run/run-selection-filters.d.ts.map +1 -1
  306. package/run/run-supervised-finalization.js +8 -0
  307. package/run/run-supervised-finalization.js.map +1 -0
  308. package/run/run-supervised-process.js +34 -33
  309. package/run/run-supervised-process.js.map +1 -1
  310. package/run/run-support.js +17 -8
  311. package/run/run-support.js.map +1 -1
  312. package/run/run-test-modules.d.ts +0 -4
  313. package/run/run-test-modules.d.ts.map +1 -1
  314. package/run/run-timing-collection.d.ts +0 -21
  315. package/run/run-timing-collection.d.ts.map +1 -1
  316. package/run/run-types.d.ts +4 -2
  317. package/run/run-types.d.ts.map +1 -1
  318. package/run/run-types.js.map +1 -1
  319. package/run/run.d.ts +0 -3
  320. package/run/run.d.ts.map +1 -1
  321. package/run/supervised-child-execution.js +38 -0
  322. package/run/supervised-child-execution.js.map +1 -0
  323. package/run/supervised-child-process.d.ts +1 -53
  324. package/run/supervised-child-process.d.ts.map +1 -1
  325. package/run/supervised-child-process.js +1 -5
  326. package/run/supervised-child-process.js.map +1 -1
  327. package/run/supervised-child-test-plan.js +2 -0
  328. package/run/supervised-child-test-plan.js.map +1 -1
  329. package/run/supervised-child.js +5 -36
  330. package/run/supervised-child.js.map +1 -1
  331. package/run/supervised-output-capture.js +66 -0
  332. package/run/supervised-output-capture.js.map +1 -0
  333. package/run/supervised-protocol.js.map +1 -1
  334. package/run/supervised-run-collection.js +3 -1
  335. package/run/supervised-run-collection.js.map +1 -1
  336. package/run/supervised-run-resource-policy.js +12 -1
  337. package/run/supervised-run-resource-policy.js.map +1 -1
  338. package/run/supervised-run-runtime.js +16 -27
  339. package/run/supervised-run-runtime.js.map +1 -1
  340. package/run/supervised-run-state.js +64 -81
  341. package/run/supervised-run-state.js.map +1 -1
  342. package/run/supervised-run.js +3 -1
  343. package/run/supervised-run.js.map +1 -1
  344. package/run/worker-pool-collection.js +1 -0
  345. package/run/worker-pool-collection.js.map +1 -1
  346. package/run/worker-pool-command.js +1 -0
  347. package/run/worker-pool-command.js.map +1 -1
  348. package/run/worker-pool-execution.js +2 -1
  349. package/run/worker-pool-execution.js.map +1 -1
  350. package/run/worker-pool-hedged-arbitration.js +4 -0
  351. package/run/worker-pool-hedged-arbitration.js.map +1 -1
  352. package/run/worker-pool-host-process.js.map +1 -1
  353. package/run/worker-pool-host-protocol.js.map +1 -1
  354. package/run/worker-pool-output.js +1 -1
  355. package/run/worker-pool-output.js.map +1 -1
  356. package/run/worker-pool-protocol.js.map +1 -1
  357. package/run/worker-pool-resource-lifecycle-execution.js +1 -0
  358. package/run/worker-pool-resource-lifecycle-execution.js.map +1 -1
  359. package/run/worker-pool-resource-tracking.js +2 -2
  360. package/run/worker-pool-resource-tracking.js.map +1 -1
  361. package/run/worker-pool-results.js +7 -9
  362. package/run/worker-pool-results.js.map +1 -1
  363. package/run/worker-pool-run.js +3 -9
  364. package/run/worker-pool-run.js.map +1 -1
  365. package/run/worker-pool-task-events.js +7 -2
  366. package/run/worker-pool-task-events.js.map +1 -1
  367. package/run/worker-pool-warm-lane-affinity.d.ts +0 -11
  368. package/run/worker-pool-warm-lane-affinity.d.ts.map +1 -1
  369. package/run/worker-pool-worker-plan.js +1 -0
  370. package/run/worker-pool-worker-plan.js.map +1 -1
  371. package/run/worker-pool-worker-resources.js +1 -0
  372. package/run/worker-pool-worker-resources.js.map +1 -1
  373. package/run/worker-pool-worker.js +2 -1
  374. package/run/worker-pool-worker.js.map +1 -1
  375. package/sbom.cdx.json +66 -15
  376. package/transcript/http-transcript.js +3 -0
  377. package/transcript/http-transcript.js.map +1 -0
  378. package/transcript/transcript-store.d.ts +25 -0
  379. package/transcript/transcript-store.d.ts.map +1 -0
  380. package/transcript/transcript-store.js +73 -0
  381. package/transcript/transcript-store.js.map +1 -0
  382. package/assertion-protocol/assertion-evaluation.d.ts +0 -13
  383. package/assertion-protocol/assertion-evaluation.d.ts.map +0 -1
  384. package/assertion-protocol/evaluation.d.ts +0 -32
  385. package/assertion-protocol/evaluation.d.ts.map +0 -1
  386. package/assertion-protocol/source-location-forwarding.d.ts +0 -4
  387. package/assertion-protocol/source-location-forwarding.d.ts.map +0 -1
  388. package/assertion-protocol/source-location.d.ts +0 -8
  389. package/assertion-protocol/source-location.d.ts.map +0 -1
  390. package/compare/comparison-result.d.ts +0 -25
  391. package/compare/comparison-result.d.ts.map +0 -1
  392. package/compare/comparison.d.ts +0 -12
  393. package/compare/comparison.d.ts.map +0 -1
  394. package/engine/async-leak-diagnostics.d.ts +0 -27
  395. package/engine/async-leak-diagnostics.d.ts.map +0 -1
  396. package/engine/custom-assertion-recording.d.ts +0 -33
  397. package/engine/custom-assertion-recording.d.ts.map +0 -1
  398. package/engine/execution-async-leak-policy.d.ts +0 -24
  399. package/engine/execution-async-leak-policy.d.ts.map +0 -1
  400. package/engine/execution-supervision-state.d.ts +0 -30
  401. package/engine/execution-supervision-state.d.ts.map +0 -1
  402. package/engine/reporter-disposal.d.ts +0 -6
  403. package/engine/reporter-disposal.d.ts.map +0 -1
  404. package/packages/engine/assertion-protocol.entry-point.d.ts +0 -10
  405. package/packages/engine/assertion-protocol.entry-point.d.ts.map +0 -1
  406. package/packages/engine/assertion-protocol.entry-point.js +0 -5
  407. package/packages/engine/assertion-protocol.entry-point.js.map +0 -1
  408. package/packages/engine/engine.entry-point.d.ts +0 -58
  409. package/packages/engine/engine.entry-point.d.ts.map +0 -1
  410. package/packages/engine/engine.entry-point.js +0 -75
  411. package/packages/engine/engine.entry-point.js.map +0 -1
  412. package/resources/resource-definition-brand.d.ts +0 -2
  413. package/resources/resource-definition-brand.d.ts.map +0 -1
  414. package/resources/resource-graph.d.ts +0 -24
  415. package/resources/resource-graph.d.ts.map +0 -1
  416. package/resources/resource-scenario-binding.d.ts +0 -37
  417. package/resources/resource-scenario-binding.d.ts.map +0 -1
  418. package/run/duration-history-schema.d.ts +0 -251
  419. package/run/duration-history-schema.d.ts.map +0 -1
  420. package/run/supervised-run-state.d.ts +0 -44
  421. package/run/supervised-run-state.d.ts.map +0 -1
@@ -1,7 +1,345 @@
1
- import 'node:fs/promises';
2
- import 'node:inspector';
3
- import 'node:path';
4
- import "./run-timing-collection.js";
5
- import "./coverage-reporting.js";
6
- import "./coverage-paths.js";
1
+ import { writeFile } from 'node:fs/promises';
2
+ import { Session } from 'node:inspector';
3
+ import path from 'node:path';
4
+ import { emptyTimingSpanMetadata } from "./run-timing-collection.js";
5
+ import { generateCoverageReports } from "./coverage-reporting.js";
6
+ import { createCoveragePaths } from "./coverage-paths.js";
7
+ const percentageFactor = 100;
8
+ const percentagePrecision = 2;
9
+ async function attempt(work) {
10
+ try {
11
+ return { kind: 'success', value: await work() };
12
+ }
13
+ catch (error) {
14
+ return { error, kind: 'failure' };
15
+ }
16
+ }
17
+ async function postProfilerControl(inspector, method) {
18
+ await new Promise(function postCommand(resolve, reject) {
19
+ inspector.post(method, function completeCommand(error) {
20
+ if (error === null) {
21
+ resolve();
22
+ }
23
+ else {
24
+ reject(error);
25
+ }
26
+ });
27
+ });
28
+ }
29
+ async function startPreciseCoverage(inspector) {
30
+ await new Promise(function postCommand(resolve, reject) {
31
+ inspector.post('Profiler.startPreciseCoverage', {
32
+ allowTriggeredUpdates: false,
33
+ callCount: true,
34
+ detailed: true
35
+ }, function completeCommand(error) {
36
+ if (error === null) {
37
+ resolve();
38
+ }
39
+ else {
40
+ reject(error);
41
+ }
42
+ });
43
+ });
44
+ }
45
+ async function takePreciseCoverage(inspector) {
46
+ return await new Promise(function postCommand(resolve, reject) {
47
+ inspector.post('Profiler.takePreciseCoverage', function completeCommand(error, result) {
48
+ if (error === null) {
49
+ resolve(result);
50
+ }
51
+ else {
52
+ reject(error);
53
+ }
54
+ });
55
+ });
56
+ }
57
+ function projectRelativePath(projectRoot, filePath) {
58
+ return path.relative(projectRoot, filePath).split(path.sep).join('/');
59
+ }
60
+ function nextRunArtifactSequence(artifacts) {
61
+ return artifacts.reduce(function nextSequence(sequence, artifact) {
62
+ return artifact.id.scope.kind === 'run' ? Math.max(sequence, artifact.id.sequence + 1) : sequence;
63
+ }, 0);
64
+ }
65
+ function coverageArtifact(paths, artifacts, report) {
66
+ return {
67
+ id: {
68
+ attempt: null,
69
+ runtimes: [],
70
+ scope: { kind: 'run' },
71
+ sequence: nextRunArtifactSequence(artifacts),
72
+ subtype: 'coverage',
73
+ workload: null
74
+ },
75
+ payload: {
76
+ completeness: 'complete',
77
+ directory: projectRelativePath(paths.projectRoot, paths.coverageDirectory),
78
+ kind: 'coverage',
79
+ rawDataDirectory: projectRelativePath(paths.projectRoot, paths.rawDataDirectory),
80
+ reports: report.reports.map(function relativeReportPath(file) {
81
+ return {
82
+ format: file.format,
83
+ path: projectRelativePath(paths.projectRoot, file.path)
84
+ };
85
+ }),
86
+ summary: report.summary
87
+ },
88
+ source: 'v8-native'
89
+ };
90
+ }
91
+ function coverageRunnerError(error, paths, phase) {
92
+ return {
93
+ attributedToAttempt: null,
94
+ attributedTo: null,
95
+ cause: { error, kind: 'coverage-operation', phase },
96
+ diagnostics: [
97
+ { label: 'Coverage phase', value: phase },
98
+ {
99
+ label: 'Coverage directory',
100
+ value: projectRelativePath(paths.projectRoot, paths.coverageDirectory)
101
+ }
102
+ ],
103
+ message: error instanceof Error ? `Coverage failed: ${error.message}` : 'Coverage failed.',
104
+ subtype: 'coverage'
105
+ };
106
+ }
107
+ function resultWithCoverageError(result, error) {
108
+ return {
109
+ ...result,
110
+ runnerErrors: [...result.runnerErrors, error],
111
+ status: 'failed'
112
+ };
113
+ }
114
+ function coverageSourceScope(policy, testFiles) {
115
+ const excludedFiles = new Set(testFiles.map(function resolveTestFile(filePath) {
116
+ return path.resolve(filePath);
117
+ }));
118
+ return policy.sources.mode === 'loaded'
119
+ ? {
120
+ exclude: Array.from(policy.sources.exclude),
121
+ excludedFiles,
122
+ mode: 'loaded'
123
+ }
124
+ : {
125
+ exclude: Array.from(policy.sources.exclude),
126
+ excludedFiles,
127
+ include: [policy.sources.include[0], ...policy.sources.include.slice(1)],
128
+ mode: 'all'
129
+ };
130
+ }
131
+ function coveragePercentage(metric) {
132
+ return metric.total === 0 ? percentageFactor : metric.covered / metric.total * percentageFactor;
133
+ }
134
+ function coveragePercentageText(percentage) {
135
+ return String(Number(percentage.toFixed(percentagePrecision)));
136
+ }
137
+ function thresholdFailures(summary, policy) {
138
+ const metrics = ['lines', 'functions', 'branches'];
139
+ return metrics.flatMap(function failedThreshold(metric) {
140
+ const requiredPercentage = policy.thresholds[metric];
141
+ if (requiredPercentage === null) {
142
+ return [];
143
+ }
144
+ const actualPercentage = coveragePercentage(summary[metric]);
145
+ return actualPercentage < requiredPercentage
146
+ ? [{ actualPercentage, metric, requiredPercentage }]
147
+ : [];
148
+ });
149
+ }
150
+ function coverageThresholdError(failures) {
151
+ const [firstFailure, ...remainingFailures] = failures;
152
+ if (firstFailure === undefined) {
153
+ return null;
154
+ }
155
+ const allFailures = [firstFailure, ...remainingFailures];
156
+ return {
157
+ attributedToAttempt: null,
158
+ attributedTo: null,
159
+ cause: { failures: allFailures, kind: 'coverage-threshold' },
160
+ diagnostics: allFailures.map(function thresholdDiagnostic(failure) {
161
+ return {
162
+ label: `Coverage ${failure.metric}`,
163
+ value: `${coveragePercentageText(failure.actualPercentage)}% is below ${failure.requiredPercentage}%`
164
+ };
165
+ }),
166
+ message: 'Coverage thresholds were not met.',
167
+ subtype: 'coverage'
168
+ };
169
+ }
170
+ function resultWithCoverageArtifact(result, artifact, policy) {
171
+ const thresholdError = coverageThresholdError(thresholdFailures(artifact.payload.summary, policy));
172
+ return thresholdError === null
173
+ ? { ...result, artifacts: [...result.artifacts, artifact] }
174
+ : {
175
+ ...result,
176
+ artifacts: [...result.artifacts, artifact],
177
+ runnerErrors: [...result.runnerErrors, thresholdError],
178
+ status: 'failed'
179
+ };
180
+ }
181
+ async function measureAsync(timing, kind, work) {
182
+ return timing?.measureAsync(kind, emptyTimingSpanMetadata(), work) ?? work();
183
+ }
184
+ async function writeInspectorCoverage(inspector, paths, timing) {
185
+ const coverage = await measureAsync(timing, 'coverage.collect', async function takeCoverage() {
186
+ return await takePreciseCoverage(inspector);
187
+ });
188
+ await writeFile(path.join(paths.rawDataDirectory, `coverage-${process.pid}-in-process.json`), JSON.stringify({ result: coverage.result, timestamp: Date.now() }), 'utf8');
189
+ }
190
+ function createCoverageLifecycle() {
191
+ let disposed = false;
192
+ let started = false;
193
+ return {
194
+ isDisposed() {
195
+ return disposed;
196
+ },
197
+ isStarted() {
198
+ return started;
199
+ },
200
+ markDisposed() {
201
+ disposed = true;
202
+ },
203
+ markStarted() {
204
+ started = true;
205
+ }
206
+ };
207
+ }
208
+ function createCoverageSessionContext(request, paths) {
209
+ const environment = Reflect.get(process, 'env');
210
+ return {
211
+ environment,
212
+ inspector: request.processModel === 'in-process' ? new Session() : null,
213
+ lifecycle: createCoverageLifecycle(),
214
+ paths,
215
+ previousCoverageEnvironment: environment.NODE_V8_COVERAGE,
216
+ request
217
+ };
218
+ }
219
+ function supervisedChildCoverage(context) {
220
+ return context.request.processModel === 'supervised-process'
221
+ ? {
222
+ environment: {
223
+ NODE_DISABLE_COMPILE_CACHE: '1',
224
+ NODE_V8_COVERAGE: context.paths.rawDataDirectory
225
+ },
226
+ writablePath: `${context.paths.rawDataDirectory}${path.sep}*`
227
+ }
228
+ : null;
229
+ }
230
+ async function startCoverage(context) {
231
+ if (context.lifecycle.isStarted()) {
232
+ return;
233
+ }
234
+ context.lifecycle.markStarted();
235
+ await measureAsync(context.request.timing, 'coverage.start', async function startInspectorCoverage() {
236
+ if (context.inspector !== null) {
237
+ Reflect.set(context.environment, 'NODE_V8_COVERAGE', context.paths.rawDataDirectory);
238
+ context.inspector.connect();
239
+ await postProfilerControl(context.inspector, 'Profiler.enable');
240
+ await startPreciseCoverage(context.inspector);
241
+ }
242
+ });
243
+ }
244
+ async function stopInspectorCoverage(context) {
245
+ if (context.inspector === null || !context.lifecycle.isStarted() || context.lifecycle.isDisposed()) {
246
+ return;
247
+ }
248
+ await writeInspectorCoverage(context.inspector, context.paths, context.request.timing);
249
+ await postProfilerControl(context.inspector, 'Profiler.stopPreciseCoverage');
250
+ await postProfilerControl(context.inspector, 'Profiler.disable');
251
+ context.inspector.disconnect();
252
+ }
253
+ function restoreCoverageEnvironment(context) {
254
+ if (context.previousCoverageEnvironment === undefined) {
255
+ Reflect.deleteProperty(context.environment, 'NODE_V8_COVERAGE');
256
+ }
257
+ else {
258
+ Reflect.set(context.environment, 'NODE_V8_COVERAGE', context.previousCoverageEnvironment);
259
+ }
260
+ }
261
+ async function closeInspector(context) {
262
+ if (context.inspector === null || !context.lifecycle.isStarted()) {
263
+ return;
264
+ }
265
+ const { inspector } = context;
266
+ const outcome = await attempt(async function stopProfiler() {
267
+ await postProfilerControl(inspector, 'Profiler.stopPreciseCoverage');
268
+ await postProfilerControl(inspector, 'Profiler.disable');
269
+ });
270
+ inspector.disconnect();
271
+ if (outcome.kind === 'failure') {
272
+ throw outcome.error;
273
+ }
274
+ }
275
+ async function disposeCoverage(context) {
276
+ if (context.lifecycle.isDisposed()) {
277
+ return;
278
+ }
279
+ context.lifecycle.markDisposed();
280
+ const outcome = await attempt(async function closeCoverageInspector() {
281
+ await closeInspector(context);
282
+ });
283
+ restoreCoverageEnvironment(context);
284
+ if (outcome.kind === 'failure') {
285
+ throw outcome.error;
286
+ }
287
+ }
288
+ async function completeCoverageCollection(context) {
289
+ await stopInspectorCoverage(context);
290
+ context.lifecycle.markDisposed();
291
+ restoreCoverageEnvironment(context);
292
+ }
293
+ async function completedCoverageResult(context, result) {
294
+ const report = await measureAsync(context.request.timing, 'coverage.report', async function reportCoverage() {
295
+ return await generateCoverageReports({
296
+ coverageDirectory: context.paths.coverageDirectory,
297
+ outputs: context.request.coverage.outputs,
298
+ projectRoot: context.paths.projectRoot,
299
+ rawDataDirectory: context.paths.rawDataDirectory,
300
+ sourceScope: coverageSourceScope(context.request.coverage, context.request.testFiles)
301
+ });
302
+ });
303
+ const artifact = coverageArtifact(context.paths, result.artifacts, report);
304
+ return resultWithCoverageArtifact(result, artifact, context.request.coverage);
305
+ }
306
+ async function finalizeCoverage(context, result, executionCompleted) {
307
+ const collection = await attempt(async function collectCoverage() {
308
+ await completeCoverageCollection(context);
309
+ });
310
+ if (collection.kind === 'failure') {
311
+ const disposal = await attempt(async function disposeFailedCoverage() {
312
+ await disposeCoverage(context);
313
+ });
314
+ const error = disposal.kind === 'failure'
315
+ ? coverageRunnerError(disposal.error, context.paths, 'dispose')
316
+ : coverageRunnerError(collection.error, context.paths, 'collect');
317
+ return resultWithCoverageError(result, error);
318
+ }
319
+ if (!executionCompleted) {
320
+ return result;
321
+ }
322
+ const report = await attempt(async function reportCoverage() {
323
+ return await completedCoverageResult(context, result);
324
+ });
325
+ return report.kind === 'success'
326
+ ? report.value
327
+ : resultWithCoverageError(result, coverageRunnerError(report.error, context.paths, 'report'));
328
+ }
329
+ export async function createCoverageSession(request) {
330
+ const paths = await createCoveragePaths(request.paths);
331
+ const context = createCoverageSessionContext(request, paths);
332
+ return {
333
+ childProcess: supervisedChildCoverage(context),
334
+ async dispose() {
335
+ await disposeCoverage(context);
336
+ },
337
+ async finalize(result, executionCompleted) {
338
+ return await finalizeCoverage(context, result, executionCompleted);
339
+ },
340
+ async start() {
341
+ await startCoverage(context);
342
+ }
343
+ };
344
+ }
7
345
  //# sourceMappingURL=coverage-session.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"coverage-session.js","sourceRoot":"","sources":["../../../../source/run/coverage-session.ts"],"names":[],"mappings":"AAAA,OAA0B,kBAAkB,CAAC;AAC7C,OAAuC,gBAAgB,CAAC;AACxD,OAAiB,WAAW,CAAC;AAY7B,OAGO,4BAA4B,CAAC;AAEpC,OAIO,yBAAyB,CAAC;AACjC,OAAwD,qBAAqB,CAAC"}
1
+ {"version":3,"file":"coverage-session.js","sourceRoot":"","sources":["../../../../source/run/coverage-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAiB,MAAM,gBAAgB,CAAC;AACxD,OAAO,IAAI,MAAM,WAAW,CAAC;AAQ7B,OAAO,EACH,uBAAuB,EAE1B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACH,uBAAuB,EAG1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAsB,MAAM,qBAAqB,CAAC;AA2C9E,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAC7B,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAE9B,KAAK,UAAU,OAAO,CAAQ,IAA0B;IACpD,IAAI,CAAC;QACD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,IAAI,EAAE,EAAE,CAAC;IACpD,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACtB,OAAO,EAAE,KAAK,EAAE,IAAI,EAA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AAM,MAAM,GAAG,MAAM,OAAO,CAAC,KAAK,UAAU,cAAc;QACtD,OAAO,MAAM,uBAAuB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC1D,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC,IAAI,KAAK,SAAS;QAC5B,CAAC,CAAC,MAAM,CAAC,KAAK;QACd,CAAC,CAAC,uBAAuB,CAAC,MAAM,EAAE,mBAAmB,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;AACtG,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,OAA+B;IACvE,MAAM,KAAK,GAAG,MAAM,mBAAmB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACvD,MAAM,OAAO,GAAG,4BAA4B,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAE7D,OAAO;QACH,YAAY,EAAE,uBAAuB,CAAC,OAAO,CAAC;QAC9C,KAAK,CAAC,OAAO;YACT,MAAM,eAAe,CAAC,OAAO,CAAC,CAAC;QACnC,CAAC;QACD,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,kBAAkB;YACrC,OAAO,MAAM,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,kBAAkB,CAAC,CAAC;QACvE,CAAC;QACD,KAAK,CAAC,KAAK;YACP,MAAM,aAAa,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC;KACJ,CAAC;AACN,CAAC"}
@@ -0,0 +1,125 @@
1
+ import { readFile } from 'node:fs/promises';
2
+ import { fileURLToPath } from 'node:url';
3
+ import { AnyMap, decodedMappings, encodedMappings } from '@jridgewell/trace-mapping';
4
+ import convertSourceMap from 'convert-source-map';
5
+ import { z } from 'zod/v4';
6
+ import { inspectCoverageSource } from "./coverage-runtime-source.js";
7
+ const sourceMapVersion = 3;
8
+ const namedMappingSize = 5;
9
+ const sourceMapSchema = z.lazy(function coverageMapSchema() {
10
+ return z.union([
11
+ z.object({
12
+ ignoreList: z.array(z.number().int().nonnegative()).default([]),
13
+ mappings: z.string().regex(/^[A-Za-z0-9+/;,]*$/u),
14
+ names: z.array(z.string()).default([]),
15
+ sourceRoot: z.string().default(''),
16
+ sources: z.array(z.string().nullable()),
17
+ sourcesContent: z.array(z.string().nullable()).default([]),
18
+ version: z.literal(sourceMapVersion)
19
+ }),
20
+ z.object({
21
+ sections: z.array(z.object({
22
+ map: sourceMapSchema,
23
+ offset: z.object({ column: z.number().int().nonnegative(), line: z.number().int().nonnegative() })
24
+ })),
25
+ version: z.literal(sourceMapVersion)
26
+ })
27
+ ]);
28
+ });
29
+ const cachedMapSchema = z.object({ data: z.unknown().default(null) });
30
+ function validMappingSegment(segment, map) {
31
+ if (segment.some(function invalidCoordinate(value) {
32
+ return !Number.isSafeInteger(value) || value < 0;
33
+ })) {
34
+ return false;
35
+ }
36
+ if (segment.length === 1) {
37
+ return true;
38
+ }
39
+ const source = segment[1];
40
+ const name = segment.length === namedMappingSize ? segment.at(-1) : undefined;
41
+ return source < map.sources.length && (name === undefined || name < map.names.length);
42
+ }
43
+ function validateMappings(map, hasRuntime) {
44
+ const mappings = decodedMappings(map);
45
+ const segments = mappings.flat();
46
+ const valid = segments.every(function validSegment(segment) {
47
+ return validMappingSegment(segment, map);
48
+ });
49
+ const hasOriginal = segments.some(function mapsOriginal(segment) {
50
+ return segment.length > 1;
51
+ });
52
+ if (!valid || hasRuntime && !hasOriginal) {
53
+ throw new Error('Source map has no usable original mappings.');
54
+ }
55
+ }
56
+ async function readMapContent(url) {
57
+ if (url.protocol === 'file:') {
58
+ return await readFile(url, 'utf8');
59
+ }
60
+ const response = await fetch(url);
61
+ if (!response.ok) {
62
+ throw new Error(`Source map ${url.href} returned HTTP ${response.status}.`);
63
+ }
64
+ return await response.text();
65
+ }
66
+ async function readReferencedMap(url) {
67
+ const content = await readMapContent(url);
68
+ return new AnyMap(sourceMapSchema.parse(JSON.parse(content)), url.href);
69
+ }
70
+ async function readMapReference(reference, scriptUrl) {
71
+ const url = new URL(reference, scriptUrl);
72
+ try {
73
+ return await readReferencedMap(url);
74
+ }
75
+ catch (error) {
76
+ throw new Error(`Source map ${url.href} failed: ${String(error)}`, { cause: error });
77
+ }
78
+ }
79
+ async function declaredCoverageMap(request) {
80
+ const inspection = inspectCoverageSource(request.source, fileURLToPath(request.url));
81
+ const comments = inspection.comments.join('\n');
82
+ const inline = convertSourceMap.fromSource(comments);
83
+ if (inline !== null) {
84
+ return new AnyMap(sourceMapSchema.parse(inline.toObject()), request.url);
85
+ }
86
+ const references = Array.from(comments.matchAll(convertSourceMap.mapFileCommentRegex));
87
+ const [, lineReference, blockReference] = references.at(-1) ?? [];
88
+ const reference = lineReference ?? blockReference;
89
+ return reference === undefined ? null : await readMapReference(reference, request.url);
90
+ }
91
+ async function resolveCoverageMap(request) {
92
+ const declared = await declaredCoverageMap(request);
93
+ if (declared !== null) {
94
+ return declared;
95
+ }
96
+ const cached = cachedMapSchema.parse(request.cached ?? {});
97
+ return cached.data === null ? null : new AnyMap(sourceMapSchema.parse(cached.data), request.url);
98
+ }
99
+ async function resolveValidatedCoverageMap(request) {
100
+ const map = await resolveCoverageMap(request);
101
+ if (map !== null) {
102
+ validateMappings(map, inspectCoverageSource(request.source, fileURLToPath(request.url)).hasRuntime);
103
+ }
104
+ return map;
105
+ }
106
+ export async function readCoverageSourceMap(request) {
107
+ try {
108
+ return await resolveValidatedCoverageMap(request);
109
+ }
110
+ catch (error) {
111
+ throw new Error(`Coverage source map failed for ${request.url}: ${String(error)}`, { cause: error });
112
+ }
113
+ }
114
+ export function normalizedCoverageSourceMap(map, sourcesContent) {
115
+ return {
116
+ ignoreList: map.ignoreList ?? [],
117
+ mappings: encodedMappings(map),
118
+ names: map.names,
119
+ sourceRoot: '',
120
+ sources: map.resolvedSources,
121
+ sourcesContent: Array.from(sourcesContent),
122
+ version: sourceMapVersion
123
+ };
124
+ }
125
+ //# sourceMappingURL=coverage-source-map.js.map
@@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IAAI,KAAK,CAAC,kCAAkC,OAAO,CAAC,GAAG,KAAK,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IACzG,CAAC;AACL,CAAC;AAED,MAAM,UAAU,2BAA2B,CAAC,GAAa,EAAE,cAAiC;IACxF,OAAO;QACH,UAAU,EAAE,GAAG,CAAC,UAAU,IAAI,EAAE;QAChC,QAAQ,EAAE,eAAe,CAAC,GAAG,CAAC;QAC9B,KAAK,EAAE,GAAG,CAAC,KAAK;QAChB,UAAU,EAAE,EAAE;QACd,OAAO,EAAE,GAAG,CAAC,eAAe;QAC5B,cAAc,EAAE,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC;QAC1C,OAAO,EAAE,gBAAgB;KAC5B,CAAC;AACN,CAAC"}
@@ -0,0 +1,120 @@
1
+ import { glob, readFile } from 'node:fs/promises';
2
+ import path from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+ import { prepareLoadedCoverageSources } from "./coverage-loaded-sources.js";
5
+ import { isPathInside } from "./path-containment.js";
6
+ import { readNativeCoverageBatches } from "./coverage-native-data.js";
7
+ import { inspectCoverageSource, isSupportedCoverageSource, isTypeScriptCoverageSource, transformCoverageSource } from "./coverage-runtime-source.js";
8
+ function sourceFilePath(sourcePath, projectRoot) {
9
+ return path.resolve(projectRoot, sourcePath);
10
+ }
11
+ function includedProjectFile(filePath, projectRoot, excludedFiles) {
12
+ const resolvedPath = path.resolve(filePath);
13
+ return isPathInside(projectRoot, resolvedPath) &&
14
+ !resolvedPath.split(path.sep).includes('node_modules') &&
15
+ !excludedFiles.has(resolvedPath);
16
+ }
17
+ function matchesSourcePatterns(filePath, projectRoot, include, exclude) {
18
+ const relativePath = path.relative(projectRoot, filePath).split(path.sep).join('/');
19
+ return include.some(function matchesInclude(pattern) {
20
+ return path.matchesGlob(relativePath, pattern);
21
+ }) && exclude.every(function matchesExclude(pattern) {
22
+ return !path.matchesGlob(relativePath, pattern);
23
+ });
24
+ }
25
+ function includedSourceFile(filePath, request) {
26
+ if (!includedProjectFile(filePath, request.projectRoot, request.sourceScope.excludedFiles)) {
27
+ return false;
28
+ }
29
+ if (request.sourceScope.mode === 'all') {
30
+ return matchesSourcePatterns(filePath, request.projectRoot, request.sourceScope.include, request.sourceScope.exclude);
31
+ }
32
+ return request.sourceScope.exclude.every(function matchesExclude(pattern) {
33
+ const relativePath = path.relative(request.projectRoot, filePath).split(path.sep).join('/');
34
+ return !path.matchesGlob(relativePath, pattern);
35
+ });
36
+ }
37
+ async function isRuntimeSourceFile(filePath, request) {
38
+ if (!isSupportedCoverageSource(filePath) || !includedSourceFile(filePath, request)) {
39
+ return false;
40
+ }
41
+ if (!isTypeScriptCoverageSource(filePath)) {
42
+ return true;
43
+ }
44
+ return inspectCoverageSource(await readFile(filePath, 'utf8'), filePath).hasRuntime;
45
+ }
46
+ async function allRuntimeFiles(request, sourceScope) {
47
+ const runtimeFiles = new Set();
48
+ const matchedFiles = glob(sourceScope.include, {
49
+ cwd: request.projectRoot,
50
+ exclude: sourceScope.exclude
51
+ });
52
+ for await (const relativePath of matchedFiles) {
53
+ const filePath = path.resolve(request.projectRoot, relativePath);
54
+ if (await isRuntimeSourceFile(filePath, request)) {
55
+ runtimeFiles.add(filePath);
56
+ }
57
+ }
58
+ return runtimeFiles;
59
+ }
60
+ function allFilesOptions(request, runtimeFiles) {
61
+ const { sourceScope } = request;
62
+ if (sourceScope.mode === 'loaded') {
63
+ return null;
64
+ }
65
+ return {
66
+ dir: request.projectRoot,
67
+ filter(filePath) {
68
+ const resolvedPath = path.resolve(filePath);
69
+ return runtimeFiles.has(resolvedPath);
70
+ },
71
+ async transformer(entry) {
72
+ if (isTypeScriptCoverageSource(entry.url)) {
73
+ Object.assign(entry, transformCoverageSource(entry.source, entry.url));
74
+ }
75
+ }
76
+ };
77
+ }
78
+ export async function prepareCoverageSources(request) {
79
+ const batches = await readNativeCoverageBatches(request.rawDataDirectory);
80
+ const loaded = await prepareLoadedCoverageSources({
81
+ batches,
82
+ excludedFiles: request.sourceScope.excludedFiles,
83
+ includeSource(filePath) {
84
+ return includedSourceFile(filePath, request);
85
+ },
86
+ projectRoot: request.projectRoot
87
+ });
88
+ const resolvedRequest = {
89
+ ...request,
90
+ sourceScope: { ...request.sourceScope, excludedFiles: loaded.excludedFiles }
91
+ };
92
+ const runtimeFiles = resolvedRequest.sourceScope.mode === 'all'
93
+ ? await allRuntimeFiles(resolvedRequest, resolvedRequest.sourceScope)
94
+ : new Set();
95
+ const all = allFilesOptions(request, runtimeFiles);
96
+ return {
97
+ all,
98
+ batches,
99
+ entryIncluded(entry) {
100
+ return loaded.entries.has(entry.url);
101
+ },
102
+ onEntry(entry) {
103
+ const map = loaded.maps.get(entry.url);
104
+ if (map !== undefined) {
105
+ Object.assign(entry, { sourceMap: map });
106
+ }
107
+ },
108
+ sourcePath(sourcePath, info) {
109
+ return typeof info.url === 'string' && info.url.startsWith('file:')
110
+ ? path.relative(request.projectRoot, fileURLToPath(info.url)).split(path.sep).join('/')
111
+ : sourcePath;
112
+ },
113
+ sourceIncluded(sourcePath) {
114
+ const filePath = sourceFilePath(sourcePath, request.projectRoot);
115
+ return loaded.sources.has(filePath) ||
116
+ runtimeFiles.has(filePath);
117
+ }
118
+ };
119
+ }
120
+ //# sourceMappingURL=coverage-source-selection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coverage-source-selection.js","sourceRoot":"","sources":["../../../../source/run/coverage-source-selection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,OAAO,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,yBAAyB,EAA4B,MA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AE,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;gBACvF,CAAC,CAAC,UAAU,CAAC;QACrB,CAAC;QACD,cAAc,CAAC,UAAU;YACrB,MAAM,QAAQ,GAAG,cAAc,CAAC,UAAU,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;YAEjE,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC;gBAC/B,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACnC,CAAC;KACJ,CAAC;AACN,CAAC"}
@@ -1,6 +1,4 @@
1
- import type { Engine } from '../engine/engine.ts';
2
- import { type NodeRunCoordinator, type NodeRunOrchestratorInput } from './run-orchestrator.ts';
3
- import type { RunOrchestrator } from './run-types.ts';
1
+ import { type NodeRunOrchestratorInput } from './run-orchestrator.ts';
4
2
  export type CurrentProcessRunOrchestratorDependencies = {
5
3
  readonly discoverRunFilesWithProjectRoot: NodeRunOrchestratorInput['discoverRunFilesWithProjectRoot'];
6
4
  readonly loadRunEngineModule: NodeRunOrchestratorInput['loadRunEngineModule'];
@@ -8,6 +6,4 @@ export type CurrentProcessRunOrchestratorDependencies = {
8
6
  readonly startSupervisedChild: NodeRunOrchestratorInput['startSupervisedChild'];
9
7
  readonly startWorkerPoolHost: NodeRunOrchestratorInput['startWorkerPoolHost'];
10
8
  };
11
- export declare function createCurrentProcessRunOrchestrator(defaultEngine: Engine, dependencies: CurrentProcessRunOrchestratorDependencies): RunOrchestrator;
12
- export declare function createCurrentProcessRunCoordinator(defaultEngine: Engine, dependencies: CurrentProcessRunOrchestratorDependencies): NodeRunCoordinator;
13
9
  //# sourceMappingURL=current-process-run-orchestrator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"current-process-run-orchestrator.d.ts","sourceRoot":"","sources":["../../../../source/run/current-process-run-orchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAMlD,OAAO,EAGH,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAChC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,MAAM,MAAM,yCAAyC,GAAG;IACpD,QAAQ,CAAC,+BAA+B,EAAE,wBAAwB,CAAC,iCAAiC,CAAC,CAAC;IACtG,QAAQ,CAAC,mBAAmB,EAAE,wBAAwB,CAAC,qBAAqB,CAAC,CAAC;IAC9E,QAAQ,CAAC,kBAAkB,EAAE,wBAAwB,CAAC,oBAAoB,CAAC,CAAC;IAC5E,QAAQ,CAAC,oBAAoB,EAAE,wBAAwB,CAAC,sBAAsB,CAAC,CAAC;IAChF,QAAQ,CAAC,mBAAmB,EAAE,wBAAwB,CAAC,qBAAqB,CAAC,CAAC;CACjF,CAAC;AAkBF,wBAAgB,mCAAmC,CAC/C,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,yCAAyC,GACxD,eAAe,CA4BjB;AAED,wBAAgB,kCAAkC,CAC9C,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,yCAAyC,GACxD,kBAAkB,CA4BpB"}
1
+ {"version":3,"file":"current-process-run-orchestrator.d.ts","sourceRoot":"","sources":["../../../../source/run/current-process-run-orchestrator.ts"],"names":[],"mappings":"AAAA,OAAY,OASH,wBACwB,EAChC,MAAM,uBAAuB,CAAC;MAGzB,MAAM,yCAAyC,GAAG;IACpD,QAAQ,CAAC,+BAA+B,EAAE,wBAAwB,CAAC,iCAAiC,CAAC,CAAC;IACtG,QAAQ,CAAC,mBAAmB,EAAE,wBAAwB,CAAC,qBAAqB,CAAC,CAAC;IAC9E,QAAQ,CAAC,kBAAkB,EAAE,wBAAwB,CAAC,oBAAoB,CAAC,CAAC;IAC5E,QAAQ,CAAC,oBAAoB,EAAE,wBAAwB,CAAC,sBAAsB,CAAC,CAAC;IAChF,QAAQ,CAAC,mBAAmB,EAAE,wBAAwB,CAAC,qBAAqB,CAAC,CAAC;CACjF,CAAC"}