@overkill-dev/run 0.0.84 → 0.0.86

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 (618) hide show
  1. package/attachments/failure-artifact-stream.js +2 -2
  2. package/attachments/failure-artifact-stream.js.map +1 -1
  3. package/attachments/run-json-artifact.js +1 -1
  4. package/attachments/run-json-artifact.js.map +1 -1
  5. package/baselines/calibration-store.js +2 -2
  6. package/baselines/calibration-store.js.map +1 -1
  7. package/baselines/performance-adapter.d.ts +2 -2
  8. package/baselines/performance-adapter.d.ts.map +1 -1
  9. package/baselines/performance-baseline.d.ts +2 -2
  10. package/baselines/performance-baseline.d.ts.map +1 -1
  11. package/baselines/performance-baseline.js +1 -1
  12. package/baselines/performance-baseline.js.map +1 -1
  13. package/baselines/performance-check.js +2 -2
  14. package/baselines/performance-check.js.map +1 -1
  15. package/baselines/performance-evaluation.js +1 -1
  16. package/baselines/performance-evaluation.js.map +1 -1
  17. package/baselines/performance-observation.js +1 -1
  18. package/baselines/performance-observation.js.map +1 -1
  19. package/baselines/performance-plan.js +3 -3
  20. package/baselines/performance-plan.js.map +1 -1
  21. package/baselines/performance-store.js +2 -2
  22. package/baselines/performance-store.js.map +1 -1
  23. package/baselines/performance-workflow.js +2 -2
  24. package/baselines/performance-workflow.js.map +1 -1
  25. package/bench/benchmark-statistics-schema.d.ts +1 -1
  26. package/bench/benchmark-statistics-schema.d.ts.map +1 -1
  27. package/bench/calibration-evidence.js +1 -1
  28. package/bench/calibration-evidence.js.map +1 -1
  29. package/bench/calibration-report.d.ts +1 -1
  30. package/bench/calibration-report.d.ts.map +1 -1
  31. package/bench/timeline-schema.js +1 -1
  32. package/bench/timeline-schema.js.map +1 -1
  33. package/config/config.js +1 -1
  34. package/config/config.js.map +1 -1
  35. package/config/execution.d.ts +1 -1
  36. package/config/execution.d.ts.map +1 -1
  37. package/config/property-policy.js +1 -1
  38. package/config/property-policy.js.map +1 -1
  39. package/config/schema.d.ts +4 -4
  40. package/config/schema.d.ts.map +1 -1
  41. package/config/schema.js +2 -2
  42. package/config/schema.js.map +1 -1
  43. package/config/types.d.ts +6 -6
  44. package/config/types.d.ts.map +1 -1
  45. package/package.json +4 -28
  46. package/packages/run/run.entry-point.d.ts +3 -3
  47. package/packages/run/run.entry-point.d.ts.map +1 -1
  48. package/packages/run/run.entry-point.js +1 -1
  49. package/packages/run/run.entry-point.js.map +1 -1
  50. package/reporters/human-reporter-rendering.js +2 -2
  51. package/reporters/human-reporter-rendering.js.map +1 -1
  52. package/reporters/line-failure-rendering.js +1 -1
  53. package/reporters/line-failure-rendering.js.map +1 -1
  54. package/reporters/line-reporter.js +2 -2
  55. package/reporters/line-reporter.js.map +1 -1
  56. package/reporters/progress-reporter.js +1 -1
  57. package/reporters/progress-reporter.js.map +1 -1
  58. package/reporters/tree-reporter.js +1 -1
  59. package/reporters/tree-reporter.js.map +1 -1
  60. package/resources/resource-definition-shape.d.ts +1 -1
  61. package/resources/resource-definition-shape.d.ts.map +1 -1
  62. package/resources/resource-workload-binding.js +2 -2
  63. package/resources/resource-workload-binding.js.map +1 -1
  64. package/run/attachment-connection.js +1 -0
  65. package/run/attachment-connection.js.map +1 -1
  66. package/run/attachment-eligibility.js +1 -1
  67. package/run/attachment-eligibility.js.map +1 -1
  68. package/run/attachment-execution.js +2 -2
  69. package/run/attachment-execution.js.map +1 -1
  70. package/run/attachment-failure.js +1 -1
  71. package/run/attachment-failure.js.map +1 -1
  72. package/run/attachment-protocol.js +1 -1
  73. package/run/attachment-protocol.js.map +1 -1
  74. package/run/attachment-reporter.js +2 -2
  75. package/run/attachment-reporter.js.map +1 -1
  76. package/run/attachment-results.js +3 -3
  77. package/run/attachment-results.js.map +1 -1
  78. package/run/attachment-retention.js +1 -1
  79. package/run/attachment-retention.js.map +1 -1
  80. package/run/attachment-server.js +1 -0
  81. package/run/attachment-server.js.map +1 -1
  82. package/run/attachment-store.js +1 -1
  83. package/run/attachment-store.js.map +1 -1
  84. package/run/benchmark-baseline-commands.js +1 -1
  85. package/run/benchmark-baseline-commands.js.map +1 -1
  86. package/run/benchmark-baseline-finalization.js +1 -1
  87. package/run/benchmark-baseline-finalization.js.map +1 -1
  88. package/run/benchmark-garbage-collection.js +1 -1
  89. package/run/benchmark-garbage-collection.js.map +1 -1
  90. package/run/benchmark-policy-schema.js +1 -1
  91. package/run/benchmark-policy-schema.js.map +1 -1
  92. package/run/benchmark-report-metadata.js +1 -1
  93. package/run/benchmark-report-metadata.js.map +1 -1
  94. package/run/benchmark-result-schema.js +1 -1
  95. package/run/benchmark-result-schema.js.map +1 -1
  96. package/run/calibration-capture-session.js +2 -2
  97. package/run/calibration-capture-session.js.map +1 -1
  98. package/run/calibration-inventory.js +2 -2
  99. package/run/calibration-inventory.js.map +1 -1
  100. package/run/calibration-maintenance.js +1 -1
  101. package/run/calibration-maintenance.js.map +1 -1
  102. package/run/capability-policy-snapshots.d.ts +1 -1
  103. package/run/capability-policy-snapshots.d.ts.map +1 -1
  104. package/run/capability-policy.js +3 -3
  105. package/run/capability-policy.js.map +1 -1
  106. package/run/collected-run-execution.js +1 -1
  107. package/run/collected-run-execution.js.map +1 -1
  108. package/run/collected-run-plan-schema.js +2 -2
  109. package/run/collected-run-plan-schema.js.map +1 -1
  110. package/run/collected-run-plan.js +4 -4
  111. package/run/collected-run-plan.js.map +1 -1
  112. package/run/command-line-command.d.ts +1 -1
  113. package/run/command-line-command.d.ts.map +1 -1
  114. package/run/command-line-command.js +1 -1
  115. package/run/command-line-command.js.map +1 -1
  116. package/run/command-line-config.d.ts +1 -1
  117. package/run/command-line-config.d.ts.map +1 -1
  118. package/run/default-direct-reporter.js +1 -1
  119. package/run/default-direct-reporter.js.map +1 -1
  120. package/run/default-run-engine.js +7 -7
  121. package/run/default-run-engine.js.map +1 -1
  122. package/run/direct-entrypoint-collection.js +3 -3
  123. package/run/direct-entrypoint-collection.js.map +1 -1
  124. package/run/execution-plan-resolution.js +1 -1
  125. package/run/execution-plan-resolution.js.map +1 -1
  126. package/run/execution-session-child.js +1 -1
  127. package/run/execution-session-child.js.map +1 -1
  128. package/run/execution-session-collected.js +1 -1
  129. package/run/execution-session-collected.js.map +1 -1
  130. package/run/execution-session-host.js +1 -1
  131. package/run/execution-session-host.js.map +1 -1
  132. package/run/execution-session-lifecycle.js +2 -2
  133. package/run/execution-session-lifecycle.js.map +1 -1
  134. package/run/execution-session-observation.js +1 -1
  135. package/run/execution-session-observation.js.map +1 -1
  136. package/run/execution-session-schema.js +1 -1
  137. package/run/execution-session-schema.js.map +1 -1
  138. package/run/execution-session-types.d.ts +1 -1
  139. package/run/execution-session-types.d.ts.map +1 -1
  140. package/run/execution-session.js +1 -1
  141. package/run/execution-session.js.map +1 -1
  142. package/run/failure-artifact-retention.js +2 -2
  143. package/run/failure-artifact-retention.js.map +1 -1
  144. package/run/frozen-run-policy.js +1 -1
  145. package/run/frozen-run-policy.js.map +1 -1
  146. package/run/initialized-run-collection.js +1 -1
  147. package/run/initialized-run-collection.js.map +1 -1
  148. package/run/node-command-line-runner.d.ts +1 -1
  149. package/run/node-command-line-runner.d.ts.map +1 -1
  150. package/run/node-process-policy-observation.js +1 -1
  151. package/run/node-process-policy-observation.js.map +1 -1
  152. package/run/node-run-execution.js +1 -1
  153. package/run/node-run-execution.js.map +1 -1
  154. package/run/node-run-orchestrator-dependencies.js +1 -1
  155. package/run/node-run-orchestrator-dependencies.js.map +1 -1
  156. package/run/permission-denial-runtime-policy.js +3 -3
  157. package/run/permission-denial-runtime-policy.js.map +1 -1
  158. package/run/placement-trace.d.ts +2 -2
  159. package/run/placement-trace.d.ts.map +1 -1
  160. package/run/property-collection.js +1 -1
  161. package/run/property-collection.js.map +1 -1
  162. package/run/recorded-coverage-session.js +1 -1
  163. package/run/recorded-coverage-session.js.map +1 -1
  164. package/run/reporter-event-schema.js +1 -1
  165. package/run/reporter-event-schema.js.map +1 -1
  166. package/run/resource-lifecycle-boundaries.js +1 -1
  167. package/run/resource-lifecycle-boundaries.js.map +1 -1
  168. package/run/resource-lifecycle-cache-identity.js +2 -2
  169. package/run/resource-lifecycle-cache-identity.js.map +1 -1
  170. package/run/resource-lifecycle-composition.d.ts +1 -1
  171. package/run/resource-lifecycle-composition.d.ts.map +1 -1
  172. package/run/resource-lifecycle-error.d.ts +1 -1
  173. package/run/resource-lifecycle-error.d.ts.map +1 -1
  174. package/run/resource-lifecycle-error.js +1 -1
  175. package/run/resource-lifecycle-error.js.map +1 -1
  176. package/run/resource-lifecycle-session-acquirer.js +1 -1
  177. package/run/resource-lifecycle-session-acquirer.js.map +1 -1
  178. package/run/resource-lifecycle-state.d.ts +3 -3
  179. package/run/resource-lifecycle-state.d.ts.map +1 -1
  180. package/run/resource-lifecycle-state.js +2 -2
  181. package/run/resource-lifecycle-state.js.map +1 -1
  182. package/run/resource-ownership-plan.d.ts +2 -2
  183. package/run/resource-ownership-plan.d.ts.map +1 -1
  184. package/run/retry-artifact-retention.js +1 -1
  185. package/run/retry-artifact-retention.js.map +1 -1
  186. package/run/run-artifact-schema.d.ts +1 -1
  187. package/run/run-artifact-schema.d.ts.map +1 -1
  188. package/run/run-case-facts.js +1 -1
  189. package/run/run-case-facts.js.map +1 -1
  190. package/run/run-collection-error-result.js +2 -2
  191. package/run/run-collection-error-result.js.map +1 -1
  192. package/run/run-discovery-types.d.ts +1 -1
  193. package/run/run-discovery-types.d.ts.map +1 -1
  194. package/run/run-engine-primitives.d.ts +8 -8
  195. package/run/run-engine-primitives.d.ts.map +1 -1
  196. package/run/run-engine-selection.d.ts +1 -1
  197. package/run/run-engine-selection.d.ts.map +1 -1
  198. package/run/run-errors.d.ts +2 -2
  199. package/run/run-errors.d.ts.map +1 -1
  200. package/run/run-errors.js +1 -1
  201. package/run/run-errors.js.map +1 -1
  202. package/run/run-if-main-options.d.ts +3 -3
  203. package/run/run-if-main-options.d.ts.map +1 -1
  204. package/run/run-if-main.d.ts +1 -1
  205. package/run/run-if-main.d.ts.map +1 -1
  206. package/run/run-list-renderer.js +2 -2
  207. package/run/run-list-renderer.js.map +1 -1
  208. package/run/run-local-sharding.js +1 -1
  209. package/run/run-local-sharding.js.map +1 -1
  210. package/run/run-local-test-plan.js +21 -17
  211. package/run/run-local-test-plan.js.map +1 -1
  212. package/run/run-record-outcomes.d.ts +5 -5
  213. package/run/run-record-outcomes.d.ts.map +1 -1
  214. package/run/run-record-result.d.ts +1 -1
  215. package/run/run-record-result.d.ts.map +1 -1
  216. package/run/run-record-result.js +2 -2
  217. package/run/run-record-result.js.map +1 -1
  218. package/run/run-record-storage.js +1 -1
  219. package/run/run-record-storage.js.map +1 -1
  220. package/run/run-record-types.d.ts +3 -3
  221. package/run/run-record-types.d.ts.map +1 -1
  222. package/run/run-request-types.d.ts +3 -3
  223. package/run/run-request-types.d.ts.map +1 -1
  224. package/run/run-result-reporting.js +1 -1
  225. package/run/run-result-reporting.js.map +1 -1
  226. package/run/run-result-schema.d.ts +1 -1
  227. package/run/run-result-schema.d.ts.map +1 -1
  228. package/run/run-runtime-schema.js +1 -1
  229. package/run/run-runtime-schema.js.map +1 -1
  230. package/run/run-selection-filters.d.ts +2 -2
  231. package/run/run-selection-filters.d.ts.map +1 -1
  232. package/run/run-selection-filters.js +1 -1
  233. package/run/run-selection-filters.js.map +1 -1
  234. package/run/run-selection.js +2 -2
  235. package/run/run-selection.js.map +1 -1
  236. package/run/run-sharding.js +1 -1
  237. package/run/run-sharding.js.map +1 -1
  238. package/run/run-test-modules.d.ts +3 -3
  239. package/run/run-test-modules.d.ts.map +1 -1
  240. package/run/run-timing-collection.d.ts +2 -2
  241. package/run/run-timing-collection.d.ts.map +1 -1
  242. package/run/run-timing-collection.js +1 -1
  243. package/run/run-timing-collection.js.map +1 -1
  244. package/run/run-types.d.ts +1 -1
  245. package/run/run-types.d.ts.map +1 -1
  246. package/run/run-validation.js +1 -1
  247. package/run/run-validation.js.map +1 -1
  248. package/run/simulation-witness.js +1 -1
  249. package/run/simulation-witness.js.map +1 -1
  250. package/run/supervised-child-execution.js +5 -4
  251. package/run/supervised-child-execution.js.map +1 -1
  252. package/run/supervised-child-test-plan.js +1 -1
  253. package/run/supervised-child-test-plan.js.map +1 -1
  254. package/run/supervised-child.js +3 -3
  255. package/run/supervised-child.js.map +1 -1
  256. package/run/supervised-output-capture.js +1 -1
  257. package/run/supervised-output-capture.js.map +1 -1
  258. package/run/supervised-protocol.js +1 -1
  259. package/run/supervised-protocol.js.map +1 -1
  260. package/run/supervised-run-process-policy.js +2 -2
  261. package/run/supervised-run-process-policy.js.map +1 -1
  262. package/run/supervised-run-runtime.js +1 -1
  263. package/run/supervised-run-runtime.js.map +1 -1
  264. package/run/supervised-run-state.js +3 -3
  265. package/run/supervised-run-state.js.map +1 -1
  266. package/run/work-unit-identity.js +1 -1
  267. package/run/work-unit-identity.js.map +1 -1
  268. package/run/work-unit-planning.js +1 -1
  269. package/run/work-unit-planning.js.map +1 -1
  270. package/run/work-unit-resource-constraints.js +2 -2
  271. package/run/work-unit-resource-constraints.js.map +1 -1
  272. package/run/worker-execution-engine.js +2 -2
  273. package/run/worker-execution-engine.js.map +1 -1
  274. package/run/worker-pool-hedge-dispatch.js +1 -1
  275. package/run/worker-pool-hedge-dispatch.js.map +1 -1
  276. package/run/worker-pool-hedged-arbitration.js +1 -1
  277. package/run/worker-pool-hedged-arbitration.js.map +1 -1
  278. package/run/worker-pool-host.entry-point.js +1 -1
  279. package/run/worker-pool-host.entry-point.js.map +1 -1
  280. package/run/worker-pool-output.js +1 -1
  281. package/run/worker-pool-output.js.map +1 -1
  282. package/run/worker-pool-pending-splitting.js +1 -1
  283. package/run/worker-pool-pending-splitting.js.map +1 -1
  284. package/run/worker-pool-placement-planning.js +1 -1
  285. package/run/worker-pool-placement-planning.js.map +1 -1
  286. package/run/worker-pool-protocol.js +1 -0
  287. package/run/worker-pool-protocol.js.map +1 -1
  288. package/run/worker-pool-resource-lifecycle-execution.js +1 -1
  289. package/run/worker-pool-resource-lifecycle-execution.js.map +1 -1
  290. package/run/worker-pool-results.js +1 -1
  291. package/run/worker-pool-results.js.map +1 -1
  292. package/run/worker-pool-task-events.js +2 -2
  293. package/run/worker-pool-task-events.js.map +1 -1
  294. package/run/worker-pool-warm-lane-affinity.js +1 -1
  295. package/run/worker-pool-warm-lane-affinity.js.map +1 -1
  296. package/run/worker-pool-work-load.js +1 -1
  297. package/run/worker-pool-work-load.js.map +1 -1
  298. package/run/worker-pool-worker-plan.js +2 -2
  299. package/run/worker-pool-worker-plan.js.map +1 -1
  300. package/run/worker-pool-worker-resources.js +1 -1
  301. package/run/worker-pool-worker-resources.js.map +1 -1
  302. package/run/worker-pool-worker.js +1 -1
  303. package/run/worker-pool-worker.js.map +1 -1
  304. package/run/workload-input-validation.js +1 -1
  305. package/run/workload-input-validation.js.map +1 -1
  306. package/software-bill-of-materials.cyclonedx.json +21 -38
  307. package/transcript/http-transcript-artifact.js +1 -1
  308. package/transcript/http-transcript-artifact.js.map +1 -1
  309. package/assertion-protocol/assertion-evaluation.js +0 -6
  310. package/assertion-protocol/assertion-evaluation.js.map +0 -1
  311. package/assertion-protocol/assertion-node-shape.d.ts +0 -81
  312. package/assertion-protocol/assertion-node-shape.d.ts.map +0 -1
  313. package/assertion-protocol/assertion-node.d.ts +0 -82
  314. package/assertion-protocol/assertion-node.d.ts.map +0 -1
  315. package/assertion-protocol/assertion-node.js +0 -33
  316. package/assertion-protocol/assertion-node.js.map +0 -1
  317. package/assertion-protocol/assertion-reference.d.ts +0 -50
  318. package/assertion-protocol/assertion-reference.d.ts.map +0 -1
  319. package/assertion-protocol/assertion-reference.js +0 -22
  320. package/assertion-protocol/assertion-reference.js.map +0 -1
  321. package/assertion-protocol/assertions/boolean.d.ts +0 -4
  322. package/assertion-protocol/assertions/boolean.d.ts.map +0 -1
  323. package/assertion-protocol/assertions/boolean.js +0 -12
  324. package/assertion-protocol/assertions/boolean.js.map +0 -1
  325. package/assertion-protocol/assertions/collection.d.ts +0 -13
  326. package/assertion-protocol/assertions/collection.d.ts.map +0 -1
  327. package/assertion-protocol/assertions/collection.js +0 -21
  328. package/assertion-protocol/assertions/collection.js.map +0 -1
  329. package/assertion-protocol/assertions/dispatch.js +0 -47
  330. package/assertion-protocol/assertions/dispatch.js.map +0 -1
  331. package/assertion-protocol/assertions/equality.d.ts +0 -6
  332. package/assertion-protocol/assertions/equality.d.ts.map +0 -1
  333. package/assertion-protocol/assertions/equality.js +0 -24
  334. package/assertion-protocol/assertions/equality.js.map +0 -1
  335. package/assertion-protocol/assertions/fail.d.ts +0 -8
  336. package/assertion-protocol/assertions/fail.d.ts.map +0 -1
  337. package/assertion-protocol/assertions/fail.js +0 -8
  338. package/assertion-protocol/assertions/fail.js.map +0 -1
  339. package/assertion-protocol/assertions/numeric.d.ts +0 -16
  340. package/assertion-protocol/assertions/numeric.d.ts.map +0 -1
  341. package/assertion-protocol/assertions/numeric.js +0 -43
  342. package/assertion-protocol/assertions/numeric.js.map +0 -1
  343. package/assertion-protocol/assertions/partial.d.ts +0 -5
  344. package/assertion-protocol/assertions/partial.d.ts.map +0 -1
  345. package/assertion-protocol/assertions/partial.js +0 -17
  346. package/assertion-protocol/assertions/partial.js.map +0 -1
  347. package/assertion-protocol/assertions/presence.d.ts +0 -6
  348. package/assertion-protocol/assertions/presence.d.ts.map +0 -1
  349. package/assertion-protocol/assertions/presence.js +0 -20
  350. package/assertion-protocol/assertions/presence.js.map +0 -1
  351. package/assertion-protocol/assertions/string.d.ts +0 -15
  352. package/assertion-protocol/assertions/string.d.ts.map +0 -1
  353. package/assertion-protocol/assertions/string.js +0 -33
  354. package/assertion-protocol/assertions/string.js.map +0 -1
  355. package/assertion-protocol/assertions/type-shape.d.ts +0 -23
  356. package/assertion-protocol/assertions/type-shape.d.ts.map +0 -1
  357. package/assertion-protocol/assertions/type-shape.js +0 -43
  358. package/assertion-protocol/assertions/type-shape.js.map +0 -1
  359. package/assertion-protocol/collection-count.js +0 -42
  360. package/assertion-protocol/collection-count.js.map +0 -1
  361. package/assertion-protocol/evaluation.js +0 -175
  362. package/assertion-protocol/evaluation.js.map +0 -1
  363. package/assertion-protocol/partial-matching.js +0 -13
  364. package/assertion-protocol/partial-matching.js.map +0 -1
  365. package/assertion-protocol/source-location-forwarding.js +0 -32
  366. package/assertion-protocol/source-location-forwarding.js.map +0 -1
  367. package/assertion-protocol/source-location.js +0 -119
  368. package/assertion-protocol/source-location.js.map +0 -1
  369. package/assertion-protocol/thrown-error-record.d.ts +0 -7
  370. package/assertion-protocol/thrown-error-record.d.ts.map +0 -1
  371. package/assertion-protocol/thrown-error-record.js +0 -17
  372. package/assertion-protocol/thrown-error-record.js.map +0 -1
  373. package/assertion-protocol/thrown-matcher.d.ts +0 -34
  374. package/assertion-protocol/thrown-matcher.d.ts.map +0 -1
  375. package/assertion-protocol/thrown-matcher.js +0 -201
  376. package/assertion-protocol/thrown-matcher.js.map +0 -1
  377. package/attachments/json-snapshot.js +0 -125
  378. package/attachments/json-snapshot.js.map +0 -1
  379. package/canonical-identity.js +0 -54
  380. package/canonical-identity.js.map +0 -1
  381. package/compare/comparison-result.js +0 -47
  382. package/compare/comparison-result.js.map +0 -1
  383. package/compare/comparison-state.js +0 -20
  384. package/compare/comparison-state.js.map +0 -1
  385. package/compare/comparison.js +0 -78
  386. package/compare/comparison.js.map +0 -1
  387. package/compare/diff-path.js +0 -37
  388. package/compare/diff-path.js.map +0 -1
  389. package/compare/raw-comparison.js +0 -285
  390. package/compare/raw-comparison.js.map +0 -1
  391. package/compare/serialized-value-classification.js +0 -99
  392. package/compare/serialized-value-classification.js.map +0 -1
  393. package/compare/serialized-value-shape.d.ts +0 -134
  394. package/compare/serialized-value-shape.d.ts.map +0 -1
  395. package/compare/serialized-value-shape.js +0 -12
  396. package/compare/serialized-value-shape.js.map +0 -1
  397. package/compare/serialized-value-state.js +0 -55
  398. package/compare/serialized-value-state.js.map +0 -1
  399. package/compare/serialized-value.d.ts +0 -4
  400. package/compare/serialized-value.d.ts.map +0 -1
  401. package/compare/serialized-value.js +0 -389
  402. package/compare/serialized-value.js.map +0 -1
  403. package/compare/structured-diff.js +0 -382
  404. package/compare/structured-diff.js.map +0 -1
  405. package/compare/value-classification.js +0 -112
  406. package/compare/value-classification.js.map +0 -1
  407. package/diff/binary-diff.js +0 -49
  408. package/diff/binary-diff.js.map +0 -1
  409. package/diff/diff-shape.d.ts +0 -122
  410. package/diff/diff-shape.d.ts.map +0 -1
  411. package/diff/string-diff.js +0 -22
  412. package/diff/string-diff.js.map +0 -1
  413. package/engine/assertion-facade.d.ts +0 -47
  414. package/engine/assertion-facade.d.ts.map +0 -1
  415. package/engine/assertion-facade.js +0 -362
  416. package/engine/assertion-facade.js.map +0 -1
  417. package/engine/assertion-recorder.d.ts +0 -12
  418. package/engine/assertion-recorder.d.ts.map +0 -1
  419. package/engine/assertion-recorder.js +0 -251
  420. package/engine/assertion-recorder.js.map +0 -1
  421. package/engine/async-control.d.ts +0 -7
  422. package/engine/async-control.d.ts.map +0 -1
  423. package/engine/async-control.js +0 -162
  424. package/engine/async-control.js.map +0 -1
  425. package/engine/async-leak-diagnostics.js +0 -188
  426. package/engine/async-leak-diagnostics.js.map +0 -1
  427. package/engine/benchmark-environment.d.ts +0 -8
  428. package/engine/benchmark-environment.d.ts.map +0 -1
  429. package/engine/benchmark-garbage-collection.d.ts +0 -8
  430. package/engine/benchmark-garbage-collection.d.ts.map +0 -1
  431. package/engine/benchmark-garbage-collection.js +0 -4
  432. package/engine/benchmark-garbage-collection.js.map +0 -1
  433. package/engine/benchmark-limits.js +0 -3
  434. package/engine/benchmark-limits.js.map +0 -1
  435. package/engine/benchmark-node.d.ts +0 -37
  436. package/engine/benchmark-node.d.ts.map +0 -1
  437. package/engine/benchmark-node.js +0 -9
  438. package/engine/benchmark-node.js.map +0 -1
  439. package/engine/benchmark-result.d.ts +0 -247
  440. package/engine/benchmark-result.d.ts.map +0 -1
  441. package/engine/benchmark-result.js +0 -2
  442. package/engine/benchmark-result.js.map +0 -1
  443. package/engine/benchmark-timeline.d.ts +0 -12
  444. package/engine/benchmark-timeline.d.ts.map +0 -1
  445. package/engine/case-attempt-execution.js +0 -234
  446. package/engine/case-attempt-execution.js.map +0 -1
  447. package/engine/case-body-execution.js +0 -232
  448. package/engine/case-body-execution.js.map +0 -1
  449. package/engine/case-execution-lifecycle.js +0 -22
  450. package/engine/case-execution-lifecycle.js.map +0 -1
  451. package/engine/case-execution.d.ts +0 -14
  452. package/engine/case-execution.d.ts.map +0 -1
  453. package/engine/case-execution.js +0 -225
  454. package/engine/case-execution.js.map +0 -1
  455. package/engine/case-interruption.js +0 -26
  456. package/engine/case-interruption.js.map +0 -1
  457. package/engine/coverage-artifact.d.ts +0 -36
  458. package/engine/coverage-artifact.d.ts.map +0 -1
  459. package/engine/custom-assertion-recording.js +0 -175
  460. package/engine/custom-assertion-recording.js.map +0 -1
  461. package/engine/engine.d.ts +0 -21
  462. package/engine/engine.d.ts.map +0 -1
  463. package/engine/engine.js +0 -35
  464. package/engine/engine.js.map +0 -1
  465. package/engine/execution-async-leak-policy.d.ts +0 -3
  466. package/engine/execution-async-leak-policy.d.ts.map +0 -1
  467. package/engine/execution-async-leak-policy.js +0 -95
  468. package/engine/execution-async-leak-policy.js.map +0 -1
  469. package/engine/execution-error-ownership.d.ts +0 -6
  470. package/engine/execution-error-ownership.d.ts.map +0 -1
  471. package/engine/execution-error-ownership.js +0 -83
  472. package/engine/execution-error-ownership.js.map +0 -1
  473. package/engine/execution-global-error-observer.d.ts +0 -15
  474. package/engine/execution-global-error-observer.d.ts.map +0 -1
  475. package/engine/execution-global-error-observer.js +0 -276
  476. package/engine/execution-global-error-observer.js.map +0 -1
  477. package/engine/execution-observation.js +0 -212
  478. package/engine/execution-observation.js.map +0 -1
  479. package/engine/execution-options.d.ts +0 -39
  480. package/engine/execution-options.d.ts.map +0 -1
  481. package/engine/execution-options.js +0 -42
  482. package/engine/execution-options.js.map +0 -1
  483. package/engine/execution-preparation.d.ts +0 -13
  484. package/engine/execution-preparation.d.ts.map +0 -1
  485. package/engine/execution-preparation.js +0 -34
  486. package/engine/execution-preparation.js.map +0 -1
  487. package/engine/execution-process-budget-breach.d.ts +0 -8
  488. package/engine/execution-process-budget-breach.d.ts.map +0 -1
  489. package/engine/execution-process-budget-breach.js +0 -30
  490. package/engine/execution-process-budget-breach.js.map +0 -1
  491. package/engine/execution-process-budget-tracking.js +0 -33
  492. package/engine/execution-process-budget-tracking.js.map +0 -1
  493. package/engine/execution-process-tracked-cases.js +0 -40
  494. package/engine/execution-process-tracked-cases.js.map +0 -1
  495. package/engine/execution-result.js +0 -120
  496. package/engine/execution-result.js.map +0 -1
  497. package/engine/execution-supervision-state.js +0 -54
  498. package/engine/execution-supervision-state.js.map +0 -1
  499. package/engine/execution-supervision.d.ts +0 -16
  500. package/engine/execution-supervision.d.ts.map +0 -1
  501. package/engine/execution-supervision.js +0 -345
  502. package/engine/execution-supervision.js.map +0 -1
  503. package/engine/execution-test-plan-cases.js +0 -216
  504. package/engine/execution-test-plan-cases.js.map +0 -1
  505. package/engine/execution-test-plan-process-usage.js +0 -14
  506. package/engine/execution-test-plan-process-usage.js.map +0 -1
  507. package/engine/execution.d.ts +0 -8
  508. package/engine/execution.d.ts.map +0 -1
  509. package/engine/execution.js +0 -71
  510. package/engine/execution.js.map +0 -1
  511. package/engine/identity.d.ts +0 -31
  512. package/engine/identity.d.ts.map +0 -1
  513. package/engine/identity.js +0 -68
  514. package/engine/identity.js.map +0 -1
  515. package/engine/native-resource-observation.js +0 -70
  516. package/engine/native-resource-observation.js.map +0 -1
  517. package/engine/node-assertion-error.js +0 -47
  518. package/engine/node-assertion-error.js.map +0 -1
  519. package/engine/process-usage-growth.js +0 -12
  520. package/engine/process-usage-growth.js.map +0 -1
  521. package/engine/process-usage.d.ts +0 -22
  522. package/engine/process-usage.d.ts.map +0 -1
  523. package/engine/property-node.d.ts +0 -30
  524. package/engine/property-node.d.ts.map +0 -1
  525. package/engine/property-node.js +0 -9
  526. package/engine/property-node.js.map +0 -1
  527. package/engine/recorded-assertion-failure.js +0 -30
  528. package/engine/recorded-assertion-failure.js.map +0 -1
  529. package/engine/reporter-dispatcher.d.ts +0 -17
  530. package/engine/reporter-dispatcher.d.ts.map +0 -1
  531. package/engine/reporter-dispatcher.js +0 -316
  532. package/engine/reporter-dispatcher.js.map +0 -1
  533. package/engine/reporter-disposal.js +0 -13
  534. package/engine/reporter-disposal.js.map +0 -1
  535. package/engine/reporter-error-delivery-tracking.js +0 -33
  536. package/engine/reporter-error-delivery-tracking.js.map +0 -1
  537. package/engine/reporter-event-queue.js +0 -55
  538. package/engine/reporter-event-queue.js.map +0 -1
  539. package/engine/reporter-managed-output.js +0 -105
  540. package/engine/reporter-managed-output.js.map +0 -1
  541. package/engine/reporter-output-scope.js +0 -65
  542. package/engine/reporter-output-scope.js.map +0 -1
  543. package/engine/reporter-output.d.ts +0 -28
  544. package/engine/reporter-output.d.ts.map +0 -1
  545. package/engine/reporter-output.js +0 -17
  546. package/engine/reporter-output.js.map +0 -1
  547. package/engine/reporter.d.ts +0 -197
  548. package/engine/reporter.d.ts.map +0 -1
  549. package/engine/reporter.js +0 -111
  550. package/engine/reporter.js.map +0 -1
  551. package/engine/reporting-context.d.ts +0 -6
  552. package/engine/reporting-context.d.ts.map +0 -1
  553. package/engine/reporting-context.js +0 -74
  554. package/engine/reporting-context.js.map +0 -1
  555. package/engine/require-assertion-facade.d.ts +0 -18
  556. package/engine/require-assertion-facade.d.ts.map +0 -1
  557. package/engine/require-assertion-facade.js +0 -128
  558. package/engine/require-assertion-facade.js.map +0 -1
  559. package/engine/resource-owner-observation.js +0 -143
  560. package/engine/resource-owner-observation.js.map +0 -1
  561. package/engine/retry-policy.d.ts +0 -4
  562. package/engine/retry-policy.d.ts.map +0 -1
  563. package/engine/retry-policy.js +0 -22
  564. package/engine/retry-policy.js.map +0 -1
  565. package/engine/run-artifact.d.ts +0 -45
  566. package/engine/run-artifact.d.ts.map +0 -1
  567. package/engine/run-result.d.ts +0 -215
  568. package/engine/run-result.d.ts.map +0 -1
  569. package/engine/run-result.js +0 -202
  570. package/engine/run-result.js.map +0 -1
  571. package/engine/run-timings.d.ts +0 -57
  572. package/engine/run-timings.d.ts.map +0 -1
  573. package/engine/run-timings.js +0 -120
  574. package/engine/run-timings.js.map +0 -1
  575. package/engine/runner-error-reporting.js +0 -29
  576. package/engine/runner-error-reporting.js.map +0 -1
  577. package/engine/runtime-attachment.d.ts +0 -82
  578. package/engine/runtime-attachment.d.ts.map +0 -1
  579. package/engine/test-attempt-history.js +0 -25
  580. package/engine/test-attempt-history.js.map +0 -1
  581. package/engine/test-body-resource-attachment.d.ts +0 -53
  582. package/engine/test-body-resource-attachment.d.ts.map +0 -1
  583. package/engine/test-body-resource-attachment.js +0 -30
  584. package/engine/test-body-resource-attachment.js.map +0 -1
  585. package/engine/test-body.d.ts +0 -16
  586. package/engine/test-body.d.ts.map +0 -1
  587. package/engine/test-body.js +0 -51
  588. package/engine/test-body.js.map +0 -1
  589. package/engine/test-data.d.ts +0 -25
  590. package/engine/test-data.d.ts.map +0 -1
  591. package/engine/test-data.js +0 -126
  592. package/engine/test-data.js.map +0 -1
  593. package/engine/test-node.d.ts +0 -178
  594. package/engine/test-node.d.ts.map +0 -1
  595. package/engine/test-node.js +0 -226
  596. package/engine/test-node.js.map +0 -1
  597. package/engine/test-plan.d.ts +0 -52
  598. package/engine/test-plan.d.ts.map +0 -1
  599. package/engine/test-plan.js +0 -315
  600. package/engine/test-plan.js.map +0 -1
  601. package/engine/test-scope-lifecycle.js +0 -65
  602. package/engine/test-scope-lifecycle.js.map +0 -1
  603. package/engine/throwing-test-scope.js +0 -27
  604. package/engine/throwing-test-scope.js.map +0 -1
  605. package/engine/workload-input.d.ts +0 -3
  606. package/engine/workload-input.d.ts.map +0 -1
  607. package/engine/workload-input.js +0 -54
  608. package/engine/workload-input.js.map +0 -1
  609. package/engine/workload-parameters.d.ts +0 -3
  610. package/engine/workload-parameters.d.ts.map +0 -1
  611. package/engine/workload-parameters.js +0 -67
  612. package/engine/workload-parameters.js.map +0 -1
  613. package/engine/workload-test-case.d.ts +0 -8
  614. package/engine/workload-test-case.d.ts.map +0 -1
  615. package/engine/workload-test-case.js +0 -33
  616. package/engine/workload-test-case.js.map +0 -1
  617. package/stored-value.js +0 -12
  618. package/stored-value.js.map +0 -1
@@ -1,382 +0,0 @@
1
- import { createBinaryDiff, shouldUseBinarySummary } from "../diff/binary-diff.js";
2
- import { comparisonResult, emptyPath, failedResult, firstDiffPath, valueMismatch } from "./comparison-result.js";
3
- import { bytesFrom, compareExactly, comparePartially, mapEntries, rawProperty, setValues, sortedKeys } from "./raw-comparison.js";
4
- import { byteSegment, indexSegment, mapKeySegment, mapValueSegment, propertySegment, setValueSegment } from "./diff-path.js";
5
- import { serializeValue } from "./serialized-value.js";
6
- import { byteSourcePair, isByteSource, isDateValue, isErrorValue, isMapCandidate, isOpaqueIdentityValue, isRegExpValue, isSetCandidate, mapPair, prototypeOf, setPair } from "./value-classification.js";
7
- function compareByMode(actual, expected, mode) {
8
- return mode === 'partial' ? comparePartially(actual, expected) : compareExactly(actual, expected);
9
- }
10
- function objectMissingOperation(expectedKey, expectedValue, mode) {
11
- const path = [propertySegment(expectedKey)];
12
- return mode === 'partial'
13
- ? { operation: 'missing-property', path, value: serializeValue(expectedValue) }
14
- : { operation: 'remove', path, value: serializeValue(expectedValue) };
15
- }
16
- function objectReplacementOperation(actualValue, expectedValue, expectedKey, mode) {
17
- return compareByMode(actualValue, expectedValue, mode)
18
- ? null
19
- : {
20
- from: serializeValue(expectedValue),
21
- operation: 'replace',
22
- path: [propertySegment(expectedKey)],
23
- to: serializeValue(actualValue)
24
- };
25
- }
26
- function objectExpectedOperation(expectedKey, context) {
27
- const expectedValue = rawProperty(context.expected, expectedKey).value;
28
- if (!context.actualKeys.includes(expectedKey)) {
29
- return objectMissingOperation(expectedKey, expectedValue, context.mode);
30
- }
31
- const actualValue = rawProperty(context.actual, expectedKey).value;
32
- return objectReplacementOperation(actualValue, expectedValue, expectedKey, context.mode);
33
- }
34
- function objectAddedOperations(actual, actualKeys, expectedKeys, mode) {
35
- if (mode === 'partial') {
36
- return [];
37
- }
38
- return actualKeys
39
- .filter(function missingFromExpected(actualKey) {
40
- return !expectedKeys.includes(actualKey);
41
- })
42
- .map(function toAddOperation(actualKey) {
43
- return {
44
- operation: 'add',
45
- path: [propertySegment(actualKey)],
46
- value: serializeValue(rawProperty(actual, actualKey).value)
47
- };
48
- });
49
- }
50
- function objectKeyDiff(actual, expected, mode) {
51
- const actualKeys = sortedKeys(actual);
52
- const expectedKeys = sortedKeys(expected);
53
- if (actualKeys === null || expectedKeys === null) {
54
- return valueMismatch(actual, expected);
55
- }
56
- const context = { actual, actualKeys, expected, mode };
57
- const operations = [
58
- ...expectedKeys.flatMap(function operationForKey(expectedKey) {
59
- const operation = objectExpectedOperation(expectedKey, context);
60
- return operation === null ? [] : [operation];
61
- }),
62
- ...objectAddedOperations(actual, actualKeys, expectedKeys, mode)
63
- ];
64
- return comparisonResult({
65
- actual,
66
- diff: { kind: 'object', operations },
67
- expected,
68
- passed: operations.length === 0,
69
- path: operations[0]?.path ?? emptyPath
70
- });
71
- }
72
- function objectDiff(actual, expected, mode) {
73
- return mode === 'exact' && prototypeOf(actual) !== prototypeOf(expected)
74
- ? valueMismatch(actual, expected)
75
- : objectKeyDiff(actual, expected, mode);
76
- }
77
- function missingArrayIndexOperation(expected, index, mode) {
78
- return mode === 'partial'
79
- ? { index, operation: 'missing-index', value: serializeValue(expected[index]) }
80
- : { operation: 'remove', path: [indexSegment(index)], value: serializeValue(expected[index]) };
81
- }
82
- function arrayReplacementOperation(actual, expected, index, mode) {
83
- if (compareByMode(actual[index], expected[index], mode)) {
84
- return null;
85
- }
86
- return {
87
- from: serializeValue(expected[index]),
88
- operation: 'replace',
89
- path: [indexSegment(index)],
90
- to: serializeValue(actual[index])
91
- };
92
- }
93
- function arrayIndexOperation(actual, expected, index, mode) {
94
- const actualHasIndex = Object.hasOwn(actual, index);
95
- const expectedHasIndex = Object.hasOwn(expected, index);
96
- if (!expectedHasIndex) {
97
- return actualHasIndex
98
- ? { operation: 'add', path: [indexSegment(index)], value: serializeValue(actual[index]) }
99
- : null;
100
- }
101
- if (!actualHasIndex) {
102
- return missingArrayIndexOperation(expected, index, mode);
103
- }
104
- return arrayReplacementOperation(actual, expected, index, mode);
105
- }
106
- function arrayDiff(actual, expected, mode) {
107
- const length = mode === 'partial' ? expected.length : Math.max(actual.length, expected.length);
108
- const operations = Array
109
- .from({ length }, function operationAtIndex(_ignoredValue, index) {
110
- return arrayIndexOperation(actual, expected, index, mode);
111
- })
112
- .filter(function operationExists(operation) {
113
- return operation !== null;
114
- });
115
- return comparisonResult({
116
- actual,
117
- diff: { kind: 'array', operations },
118
- expected,
119
- passed: operations.length === 0,
120
- path: firstDiffPath({ kind: 'array', operations })
121
- });
122
- }
123
- function missingMapEntryOperation(expectedEntry, mode) {
124
- return mode === 'partial'
125
- ? {
126
- key: serializeValue(expectedEntry.key),
127
- operation: 'missing-entry',
128
- value: serializeValue(expectedEntry.value)
129
- }
130
- : {
131
- operation: 'remove',
132
- path: [mapKeySegment(expectedEntry.key)],
133
- value: serializeValue(expectedEntry.value)
134
- };
135
- }
136
- function mapExpectedOperation(expectedEntry, actualEntries, matchedActualIndexes, mode) {
137
- const matchIndex = actualEntries.findIndex(function matchingKey(actualEntry, index) {
138
- return !matchedActualIndexes.has(index) && compareExactly(actualEntry.key, expectedEntry.key);
139
- });
140
- if (matchIndex === -1) {
141
- return { matchedIndex: null, operation: missingMapEntryOperation(expectedEntry, mode) };
142
- }
143
- const actualEntry = actualEntries[matchIndex];
144
- if (actualEntry === undefined || compareByMode(actualEntry.value, expectedEntry.value, mode)) {
145
- return { matchedIndex: matchIndex, operation: null };
146
- }
147
- return {
148
- matchedIndex: matchIndex,
149
- operation: {
150
- from: serializeValue(expectedEntry.value),
151
- operation: 'replace',
152
- path: [mapValueSegment(expectedEntry.key)],
153
- to: serializeValue(actualEntry.value)
154
- }
155
- };
156
- }
157
- function mapAddedOperations(actualEntries, matchedActualIndexes, mode) {
158
- if (mode === 'partial') {
159
- return [];
160
- }
161
- return actualEntries.flatMap(function extraEntry(actualEntry, index) {
162
- return matchedActualIndexes.has(index)
163
- ? []
164
- : [{
165
- operation: 'add',
166
- path: [mapKeySegment(actualEntry.key)],
167
- value: serializeValue(actualEntry.value)
168
- }];
169
- });
170
- }
171
- function mapDiff(actual, expected, mode) {
172
- const actualEntries = mapEntries(actual);
173
- const expectedEntries = mapEntries(expected);
174
- const matchedActualIndexes = new Set();
175
- const expectedOperations = expectedEntries.flatMap(function operationForEntry(expectedEntry) {
176
- const result = mapExpectedOperation(expectedEntry, actualEntries, matchedActualIndexes, mode);
177
- if (result.matchedIndex !== null) {
178
- matchedActualIndexes.add(result.matchedIndex);
179
- }
180
- return result.operation === null ? [] : [result.operation];
181
- });
182
- const operations = [
183
- ...expectedOperations,
184
- ...mapAddedOperations(actualEntries, matchedActualIndexes, mode)
185
- ];
186
- return comparisonResult({
187
- actual,
188
- diff: { kind: 'map', operations },
189
- expected,
190
- passed: operations.length === 0,
191
- path: firstDiffPath({ kind: 'map', operations })
192
- });
193
- }
194
- function setMissingOperation(expectedValue, mode) {
195
- return mode === 'partial'
196
- ? { operation: 'missing-member', value: serializeValue(expectedValue) }
197
- : {
198
- operation: 'remove',
199
- path: [setValueSegment(expectedValue)],
200
- value: serializeValue(expectedValue)
201
- };
202
- }
203
- function setAddedOperations(actualValues, matchedActualIndexes, mode) {
204
- if (mode === 'partial') {
205
- return [];
206
- }
207
- return actualValues.flatMap(function extraValue(actualValue, index) {
208
- return matchedActualIndexes.has(index)
209
- ? []
210
- : [{
211
- operation: 'add',
212
- path: [setValueSegment(actualValue)],
213
- value: serializeValue(actualValue)
214
- }];
215
- });
216
- }
217
- function setDiff(actual, expected, mode) {
218
- const actualValues = setValues(actual);
219
- const expectedValues = setValues(expected);
220
- const matchedActualIndexes = new Set();
221
- const missingOperations = expectedValues.flatMap(function operationForValue(expectedValue) {
222
- const matchIndex = actualValues.findIndex(function matchingValue(actualValue, index) {
223
- return !matchedActualIndexes.has(index) && compareByMode(actualValue, expectedValue, mode);
224
- });
225
- if (matchIndex === -1) {
226
- return [setMissingOperation(expectedValue, mode)];
227
- }
228
- matchedActualIndexes.add(matchIndex);
229
- return [];
230
- });
231
- const operations = [
232
- ...missingOperations,
233
- ...setAddedOperations(actualValues, matchedActualIndexes, mode)
234
- ];
235
- return comparisonResult({
236
- actual,
237
- diff: { kind: 'set', operations },
238
- expected,
239
- passed: operations.length === 0,
240
- path: firstDiffPath({ kind: 'set', operations })
241
- });
242
- }
243
- function byteOperation(actualBytes, expectedBytes, offset) {
244
- return actualBytes[offset] === expectedBytes[offset]
245
- ? null
246
- : {
247
- from: serializeValue(expectedBytes[offset]),
248
- operation: 'replace',
249
- path: [byteSegment(offset)],
250
- to: serializeValue(actualBytes[offset])
251
- };
252
- }
253
- function byteDiff(actual, expected) {
254
- const actualBytes = bytesFrom(actual);
255
- const expectedBytes = bytesFrom(expected);
256
- if (shouldUseBinarySummary(expectedBytes, actualBytes)) {
257
- return failedResult(actual, expected, createBinaryDiff(expectedBytes, actualBytes));
258
- }
259
- const length = Math.max(actualBytes.length, expectedBytes.length);
260
- const operations = Array
261
- .from({ length }, function operationForOffset(_ignoredValue, offset) {
262
- return byteOperation(actualBytes, expectedBytes, offset);
263
- })
264
- .filter(function operationExists(operation) {
265
- return operation !== null;
266
- });
267
- return comparisonResult({
268
- actual,
269
- diff: { kind: 'array', operations },
270
- expected,
271
- passed: operations.length === 0,
272
- path: firstDiffPath({ kind: 'array', operations })
273
- });
274
- }
275
- function errorHeaderOperations(actual, expected) {
276
- const operations = [];
277
- if (actual.name !== expected.name) {
278
- operations.push({
279
- from: serializeValue(expected.name),
280
- operation: 'replace',
281
- path: [propertySegment('name')],
282
- to: serializeValue(actual.name)
283
- });
284
- }
285
- if (actual.message !== expected.message) {
286
- operations.push({
287
- from: serializeValue(expected.message),
288
- operation: 'replace',
289
- path: [propertySegment('message')],
290
- to: serializeValue(actual.message)
291
- });
292
- }
293
- return operations;
294
- }
295
- function errorDiff(actual, expected, mode) {
296
- const enumerableDiff = objectDiff(actual, expected, mode);
297
- const enumerableOperations = enumerableDiff.diff?.kind === 'object' ? enumerableDiff.diff.operations : [];
298
- const operations = [
299
- ...errorHeaderOperations(actual, expected),
300
- ...enumerableOperations
301
- ];
302
- return comparisonResult({
303
- actual,
304
- diff: { kind: 'object', operations },
305
- expected,
306
- passed: operations.length === 0,
307
- path: operations[0]?.path ?? emptyPath
308
- });
309
- }
310
- function unsupportedSpecialObjectDiff(actual, expected) {
311
- const unsupported = [
312
- isDateValue(actual),
313
- isDateValue(expected),
314
- isRegExpValue(actual),
315
- isRegExpValue(expected),
316
- isOpaqueIdentityValue(actual),
317
- isOpaqueIdentityValue(expected)
318
- ]
319
- .some(Boolean);
320
- return unsupported
321
- ? valueMismatch(actual, expected)
322
- : null;
323
- }
324
- function errorObjectDiff(actual, expected, mode) {
325
- if (!isErrorValue(actual) && !isErrorValue(expected)) {
326
- return null;
327
- }
328
- return isErrorValue(actual) && isErrorValue(expected) && prototypeOf(actual) === prototypeOf(expected)
329
- ? errorDiff(actual, expected, mode)
330
- : valueMismatch(actual, expected);
331
- }
332
- function mapObjectDiff(actual, expected, mode) {
333
- const matchedMapPair = mapPair(actual, expected);
334
- if (matchedMapPair !== null) {
335
- return mapDiff(matchedMapPair.actual, matchedMapPair.expected, mode);
336
- }
337
- return isMapCandidate(actual) || isMapCandidate(expected) ? valueMismatch(actual, expected) : null;
338
- }
339
- function setObjectDiff(actual, expected, mode) {
340
- const matchedSetPair = setPair(actual, expected);
341
- if (matchedSetPair !== null) {
342
- return setDiff(matchedSetPair.actual, matchedSetPair.expected, mode);
343
- }
344
- return isSetCandidate(actual) || isSetCandidate(expected) ? valueMismatch(actual, expected) : null;
345
- }
346
- function objectPairDiff(actual, expected, mode) {
347
- return unsupportedSpecialObjectDiff(actual, expected) ??
348
- errorObjectDiff(actual, expected, mode) ??
349
- mapObjectDiff(actual, expected, mode) ??
350
- setObjectDiff(actual, expected, mode) ??
351
- objectDiff(actual, expected, mode);
352
- }
353
- function arrayDiffRule(actual, expected, mode) {
354
- return Array.isArray(actual) && Array.isArray(expected) ? arrayDiff(actual, expected, mode) : null;
355
- }
356
- function byteDiffRule(actual, expected, mode) {
357
- const matchedBytes = byteSourcePair(actual, expected);
358
- return mode === 'exact' && matchedBytes !== null ? byteDiff(matchedBytes.actual, matchedBytes.expected) : null;
359
- }
360
- function byteMismatchRule(actual, expected) {
361
- return isByteSource(actual) || isByteSource(expected) ? valueMismatch(actual, expected) : null;
362
- }
363
- function isReferenceValue(value) {
364
- return value !== null && typeof value === 'object';
365
- }
366
- function referenceDiffRule(actual, expected, mode) {
367
- return isReferenceValue(actual) && isReferenceValue(expected) ? objectPairDiff(actual, expected, mode) : null;
368
- }
369
- function diffFor(actual, expected, mode) {
370
- return arrayDiffRule(actual, expected, mode) ??
371
- byteDiffRule(actual, expected, mode) ??
372
- byteMismatchRule(actual, expected) ??
373
- referenceDiffRule(actual, expected, mode) ??
374
- valueMismatch(actual, expected);
375
- }
376
- export function exactStructuredDiff(actual, expected) {
377
- return diffFor(actual, expected, 'exact');
378
- }
379
- export function partialStructuredDiff(actual, expected) {
380
- return diffFor(actual, expected, 'partial');
381
- }
382
- //# sourceMappingURL=structured-diff.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"structured-diff.js","sourceRoot":"","sources":["../../../../source/compare/structured-diff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAOlF,OAAO,EACH,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,aAAa,EACb,aAAa,EAEhB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACH,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,SAAS,EACT,UAAU,EAEb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAC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AAC,MAAe,EAAE,QAAiB;IAClE,OAAO,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,MAAe,EAAE,QAAiB;IACpE,OAAO,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;AAChD,CAAC"}
@@ -1,112 +0,0 @@
1
- function isArrayBufferValue(value) {
2
- try {
3
- return value instanceof ArrayBuffer;
4
- }
5
- catch {
6
- return false;
7
- }
8
- }
9
- function isArrayBufferView(value) {
10
- try {
11
- return ArrayBuffer.isView(value);
12
- }
13
- catch {
14
- return false;
15
- }
16
- }
17
- export function isByteSource(value) {
18
- return isArrayBufferValue(value) || isArrayBufferView(value);
19
- }
20
- export function byteSourcePair(actual, expected) {
21
- if (isArrayBufferValue(actual) && isArrayBufferValue(expected)) {
22
- return { actual, expected };
23
- }
24
- return isArrayBufferView(actual) && isArrayBufferView(expected) && actual.constructor === expected.constructor
25
- ? { actual, expected }
26
- : null;
27
- }
28
- export function isDateValue(value) {
29
- try {
30
- return value instanceof Date;
31
- }
32
- catch {
33
- return false;
34
- }
35
- }
36
- export function isRegExpValue(value) {
37
- try {
38
- return value instanceof RegExp;
39
- }
40
- catch {
41
- return false;
42
- }
43
- }
44
- export function isErrorValue(value) {
45
- try {
46
- return value instanceof Error;
47
- }
48
- catch {
49
- return false;
50
- }
51
- }
52
- function isMapValue(value) {
53
- try {
54
- return Object.getPrototypeOf(value) === Map.prototype;
55
- }
56
- catch {
57
- return false;
58
- }
59
- }
60
- function isSetValue(value) {
61
- try {
62
- return Object.getPrototypeOf(value) === Set.prototype;
63
- }
64
- catch {
65
- return false;
66
- }
67
- }
68
- export function mapPair(actual, expected) {
69
- return isMapValue(actual) && isMapValue(expected) ? { actual, expected } : null;
70
- }
71
- export function setPair(actual, expected) {
72
- return isSetValue(actual) && isSetValue(expected) ? { actual, expected } : null;
73
- }
74
- export const isMapCandidate = isMapValue;
75
- export const isSetCandidate = isSetValue;
76
- function isPromiseValue(value) {
77
- try {
78
- return value instanceof Promise;
79
- }
80
- catch {
81
- return false;
82
- }
83
- }
84
- function isWeakMapValue(value) {
85
- try {
86
- return value instanceof WeakMap;
87
- }
88
- catch {
89
- return false;
90
- }
91
- }
92
- function isWeakSetValue(value) {
93
- try {
94
- return value instanceof WeakSet;
95
- }
96
- catch {
97
- return false;
98
- }
99
- }
100
- export function isOpaqueIdentityValue(value) {
101
- return isPromiseValue(value) || isWeakMapValue(value) || isWeakSetValue(value);
102
- }
103
- export function prototypeOf(value) {
104
- try {
105
- const prototype = Object.getPrototypeOf(value);
106
- return prototype;
107
- }
108
- catch {
109
- return null;
110
- }
111
- }
112
- //# sourceMappingURL=value-classification.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"value-classification.js","sourceRoot":"","sources":["../../../../source/compare/value-classification.ts"],"names":[],"mappings":"AAiBA,SAAS,kBAAkB,CAAC,KAAc;IACtC,IAAI,CAAC;QACD,OAAO,KAAK,YAAY,WAAW,CAAC;IACxC,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,KAAK,CAAC;IACjB,CAAC;AACL,CAAC;AAED,SAAS,iBAAiB,CAAC,KAAc;IACrC,IAAI,CAAC;QACD,OAAO,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,KAAK,CAAC;IACjB,CAAC;AACL,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAc;IACvC,OAAO,kBAAkB,CAAC,KAAK,CAAC,IAAI,iBAAiB,CAAC,KAAK,CAAC,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,MAAe,EAAE,QAAiB;IAC7D,IAAI,kBAAkB,CAAC,MAAM,CAAC,IAAI,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC7D,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;IAChC,CAAC;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}
@@ -1,49 +0,0 @@
1
- import { createHash } from 'node:crypto';
2
- const byteArrayDiffLimit = 100;
3
- const binaryRangeLimit = 5;
4
- const binaryRangeSize = 8;
5
- function hashBytes(bytes) {
6
- return createHash('sha256').update(Uint8Array.from(bytes)).digest('hex');
7
- }
8
- function nextDifferentOffset(expected, actual, offset, length) {
9
- let nextOffset = offset;
10
- while (nextOffset < length && expected[nextOffset] === actual[nextOffset]) {
11
- nextOffset += 1;
12
- }
13
- return nextOffset;
14
- }
15
- function diffRange(expected, actual, offset, length) {
16
- const rangeEnd = Math.min(length, offset + binaryRangeSize);
17
- return {
18
- actual: actual.slice(offset, rangeEnd),
19
- expected: expected.slice(offset, rangeEnd),
20
- offset
21
- };
22
- }
23
- function differingRanges(expected, actual) {
24
- const ranges = [];
25
- const length = Math.max(expected.length, actual.length);
26
- let offset = 0;
27
- while (offset < length && ranges.length < binaryRangeLimit) {
28
- const rangeOffset = nextDifferentOffset(expected, actual, offset, length);
29
- if (rangeOffset < length) {
30
- ranges.push(diffRange(expected, actual, rangeOffset, length));
31
- }
32
- offset = rangeOffset + binaryRangeSize;
33
- }
34
- return ranges;
35
- }
36
- export function createBinaryDiff(expected, actual) {
37
- return {
38
- actualHash: hashBytes(actual),
39
- actualSize: actual.length,
40
- expectedHash: hashBytes(expected),
41
- expectedSize: expected.length,
42
- kind: 'binary',
43
- ranges: differingRanges(expected, actual)
44
- };
45
- }
46
- export function shouldUseBinarySummary(expected, actual) {
47
- return expected.length > byteArrayDiffLimit || actual.length > byteArrayDiffLimit;
48
- }
49
- //# sourceMappingURL=binary-diff.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"binary-diff.js","sourceRoot":"","sources":["../../../../source/diff/binary-diff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAC/B,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAC3B,MAAM,eAAe,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