@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.
- package/assertion-protocol/assertion-node.d.ts +0 -15
- package/assertion-protocol/assertion-node.d.ts.map +1 -1
- package/assertion-protocol/assertion-reference.d.ts +0 -21
- package/assertion-protocol/assertion-reference.d.ts.map +1 -1
- package/assertion-protocol/assertion-reference.js +3 -30
- package/assertion-protocol/assertion-reference.js.map +1 -1
- package/assertion-protocol/assertions/boolean.d.ts +0 -7
- package/assertion-protocol/assertions/boolean.d.ts.map +1 -1
- package/assertion-protocol/assertions/collection.d.ts +0 -9
- package/assertion-protocol/assertions/collection.d.ts.map +1 -1
- package/assertion-protocol/assertions/equality.d.ts +0 -11
- package/assertion-protocol/assertions/equality.d.ts.map +1 -1
- package/assertion-protocol/assertions/fail.d.ts +0 -5
- package/assertion-protocol/assertions/fail.d.ts.map +1 -1
- package/assertion-protocol/assertions/numeric.d.ts +0 -13
- package/assertion-protocol/assertions/numeric.d.ts.map +1 -1
- package/assertion-protocol/assertions/partial.d.ts +0 -9
- package/assertion-protocol/assertions/partial.d.ts.map +1 -1
- package/assertion-protocol/assertions/presence.d.ts +0 -11
- package/assertion-protocol/assertions/presence.d.ts.map +1 -1
- package/assertion-protocol/assertions/string.d.ts +0 -13
- package/assertion-protocol/assertions/string.d.ts.map +1 -1
- package/assertion-protocol/assertions/type-shape.d.ts +0 -19
- package/assertion-protocol/assertions/type-shape.d.ts.map +1 -1
- package/assertion-protocol/source-location-forwarding.js +15 -9
- package/assertion-protocol/source-location-forwarding.js.map +1 -1
- package/assertion-protocol/source-location.js +1 -0
- package/assertion-protocol/source-location.js.map +1 -1
- package/assertion-protocol/thrown-error-record.d.ts +0 -1
- package/assertion-protocol/thrown-error-record.d.ts.map +1 -1
- package/assertion-protocol/thrown-matcher.d.ts +1 -18
- package/assertion-protocol/thrown-matcher.d.ts.map +1 -1
- package/compare/serialized-value-shape.d.ts +0 -9
- package/compare/serialized-value-shape.d.ts.map +1 -1
- package/compare/serialized-value.d.ts +1 -8
- package/compare/serialized-value.d.ts.map +1 -1
- package/engine/assertion-facade.d.ts +2 -5
- package/engine/assertion-facade.d.ts.map +1 -1
- package/engine/async-control.d.ts +0 -26
- package/engine/async-control.d.ts.map +1 -1
- package/engine/async-leak-diagnostics.js +9 -9
- package/engine/async-leak-diagnostics.js.map +1 -1
- package/engine/case-attempt-execution.js +191 -0
- package/engine/case-attempt-execution.js.map +1 -0
- package/engine/case-execution.d.ts +5 -16
- package/engine/case-execution.d.ts.map +1 -1
- package/engine/case-execution.js +25 -24
- package/engine/case-execution.js.map +1 -1
- package/engine/coverage-artifact.d.ts +1 -14
- package/engine/coverage-artifact.d.ts.map +1 -1
- package/engine/custom-assertion-recording.js +1 -1
- package/engine/custom-assertion-recording.js.map +1 -1
- package/engine/engine.d.ts +1 -8
- package/engine/engine.d.ts.map +1 -1
- package/engine/execution-async-leak-policy.js +3 -10
- package/engine/execution-async-leak-policy.js.map +1 -1
- package/engine/execution-global-error-observer.d.ts +2 -4
- package/engine/execution-global-error-observer.d.ts.map +1 -1
- package/engine/execution-global-error-observer.js +20 -46
- package/engine/execution-global-error-observer.js.map +1 -1
- package/engine/execution-options.d.ts +4 -7
- package/engine/execution-options.d.ts.map +1 -1
- package/engine/execution-options.js +7 -2
- package/engine/execution-options.js.map +1 -1
- package/engine/execution-resource-budget-breach.d.ts +0 -9
- package/engine/execution-resource-budget-breach.d.ts.map +1 -1
- package/engine/execution-resource-budget-tracking.js.map +1 -1
- package/engine/execution-resource-tracked-cases.js.map +1 -1
- package/engine/execution-result.js.map +1 -1
- package/engine/execution-supervision-state.js.map +1 -1
- package/engine/execution-supervision.d.ts +0 -16
- package/engine/execution-supervision.d.ts.map +1 -1
- package/engine/execution-supervision.js +50 -33
- package/engine/execution-supervision.js.map +1 -1
- package/engine/execution-test-plan-cases.js +6 -126
- package/engine/execution-test-plan-cases.js.map +1 -1
- package/engine/execution-test-plan-resource-usage.js.map +1 -1
- package/engine/execution.d.ts +1 -12
- package/engine/execution.d.ts.map +1 -1
- package/engine/execution.js +3 -3
- package/engine/execution.js.map +1 -1
- package/engine/identity.d.ts +3 -6
- package/engine/identity.d.ts.map +1 -1
- package/engine/reporter-dispatcher.d.ts +1 -11
- package/engine/reporter-dispatcher.d.ts.map +1 -1
- package/engine/reporter-dispatcher.js +1 -0
- package/engine/reporter-dispatcher.js.map +1 -1
- package/engine/reporter-event-queue.js.map +1 -1
- package/engine/reporter-output.d.ts +0 -6
- package/engine/reporter-output.d.ts.map +1 -1
- package/engine/reporter.d.ts +2 -17
- package/engine/reporter.d.ts.map +1 -1
- package/engine/reporter.js.map +1 -1
- package/engine/reporting-context.d.ts +1 -13
- package/engine/reporting-context.d.ts.map +1 -1
- package/engine/require-assertion-facade.d.ts +2 -5
- package/engine/require-assertion-facade.d.ts.map +1 -1
- package/engine/resource-usage.d.ts +22 -0
- package/engine/resource-usage.d.ts.map +1 -0
- package/engine/retry-policy.d.ts +4 -0
- package/engine/retry-policy.d.ts.map +1 -0
- package/engine/retry-policy.js +22 -0
- package/engine/retry-policy.js.map +1 -0
- package/engine/run-artifact.d.ts +45 -0
- package/engine/run-artifact.d.ts.map +1 -0
- package/engine/run-result.d.ts +18 -114
- package/engine/run-result.d.ts.map +1 -1
- package/engine/run-result.js +14 -0
- package/engine/run-result.js.map +1 -1
- package/engine/run-timings.d.ts +0 -18
- package/engine/run-timings.d.ts.map +1 -1
- package/engine/runner-error-reporting.js.map +1 -1
- package/engine/test-attempt-history.js +24 -0
- package/engine/test-attempt-history.js.map +1 -0
- package/engine/test-body-resource-attachment.d.ts +0 -12
- package/engine/test-body-resource-attachment.d.ts.map +1 -1
- package/engine/test-body-resource-attachment.js +3 -134
- package/engine/test-body-resource-attachment.js.map +1 -1
- package/engine/test-data.d.ts +0 -6
- package/engine/test-data.d.ts.map +1 -1
- package/engine/test-node.d.ts +0 -21
- package/engine/test-node.d.ts.map +1 -1
- package/engine/test-node.js +1 -20
- package/engine/test-node.js.map +1 -1
- package/engine/test-plan.d.ts +1 -4
- package/engine/test-plan.d.ts.map +1 -1
- package/package.json +21 -7
- package/packages/run/config.entry-point.d.ts +2 -0
- package/packages/run/config.entry-point.d.ts.map +1 -1
- package/packages/run/run.entry-point.d.ts +2 -0
- package/packages/run/run.entry-point.d.ts.map +1 -1
- package/packages/run/transcript-store.entry-point.d.ts +3 -0
- package/packages/run/transcript-store.entry-point.d.ts.map +1 -0
- package/packages/run/transcript-store.entry-point.js +2 -0
- package/packages/run/transcript-store.entry-point.js.map +1 -0
- package/packages/simulation/transcript.entry-point.js +2 -0
- package/packages/simulation/transcript.entry-point.js.map +1 -0
- package/readme.md +47 -2
- package/reporters/human-reporter-rendering.js +12 -3
- package/reporters/human-reporter-rendering.js.map +1 -1
- package/reporters/line-reporter.js +6 -1
- package/reporters/line-reporter.js.map +1 -1
- package/reporters/tree-reporter.js +2 -103
- package/reporters/tree-reporter.js.map +1 -1
- package/resources/resource-definition-shape.d.ts +0 -2
- package/resources/resource-definition-shape.d.ts.map +1 -1
- package/resources/resource-definition-types.d.ts +1 -96
- package/resources/resource-definition-types.d.ts.map +1 -1
- package/resources/resource-definition.js.map +1 -1
- package/resources/resource-lifecycle-error.d.ts +0 -1
- package/resources/resource-lifecycle-error.d.ts.map +1 -1
- package/resources/resource-lifecycle-error.js +17 -1
- package/resources/resource-lifecycle-error.js.map +1 -1
- package/resources/resource-scenario-binding.js +1 -69
- package/resources/resource-scenario-binding.js.map +1 -1
- package/resources/resource-scenario.d.ts +0 -19
- package/resources/resource-scenario.d.ts.map +1 -1
- package/resources/resource-session.d.ts +1 -20
- package/resources/resource-session.d.ts.map +1 -1
- package/resources/resources.d.ts +5 -88
- package/resources/resources.d.ts.map +1 -1
- package/resources/resources.js +5 -81
- package/resources/resources.js.map +1 -1
- package/resources/runtime-definition.d.ts +0 -7
- package/resources/runtime-definition.d.ts.map +1 -1
- package/resources/runtime-definition.js +2 -57
- package/resources/runtime-definition.js.map +1 -1
- package/resources/runtime-matrix-definition.d.ts +0 -36
- package/resources/runtime-matrix-definition.d.ts.map +1 -1
- package/run/capability-policy-snapshots.d.ts +0 -19
- package/run/capability-policy-snapshots.d.ts.map +1 -1
- package/run/capability-policy.js +10 -5
- package/run/capability-policy.js.map +1 -1
- package/run/collected-run-plan.js.map +1 -1
- package/run/command-line-command-namespace.d.ts +0 -5
- package/run/command-line-command-namespace.d.ts.map +1 -1
- package/run/command-line-command.d.ts +1 -4
- package/run/command-line-command.d.ts.map +1 -1
- package/run/command-line-runner.d.ts +0 -2
- package/run/command-line-runner.d.ts.map +1 -1
- package/run/coverage-loaded-sources.js +112 -0
- package/run/coverage-loaded-sources.js.map +1 -0
- package/run/coverage-native-data.js +18 -0
- package/run/coverage-native-data.js.map +1 -0
- package/run/coverage-paths.js +45 -4
- package/run/coverage-paths.js.map +1 -1
- package/run/coverage-reporting.js +37 -123
- package/run/coverage-reporting.js.map +1 -1
- package/run/coverage-run-record.js +50 -0
- package/run/coverage-run-record.js.map +1 -0
- package/run/coverage-runtime-source.js +37 -0
- package/run/coverage-runtime-source.js.map +1 -0
- package/run/coverage-session.js +344 -6
- package/run/coverage-session.js.map +1 -1
- package/run/coverage-source-map.js +125 -0
- package/run/coverage-source-map.js.map +1 -0
- package/run/coverage-source-selection.js +120 -0
- package/run/coverage-source-selection.js.map +1 -0
- package/run/current-process-run-orchestrator.d.ts +1 -5
- package/run/current-process-run-orchestrator.d.ts.map +1 -1
- package/run/duration-history.d.ts +0 -30
- package/run/duration-history.d.ts.map +1 -1
- package/run/duration-history.js +1 -0
- package/run/duration-history.js.map +1 -1
- package/run/node-run-execution.js +25 -0
- package/run/node-run-execution.js.map +1 -0
- package/run/node-runtime-state-store.js +38 -0
- package/run/node-runtime-state-store.js.map +1 -0
- package/run/node-worker-pool-factory.js +0 -31
- package/run/node-worker-pool-factory.js.map +1 -1
- package/run/path-containment.js +6 -1
- package/run/path-containment.js.map +1 -1
- package/run/permission-denial-runtime-policy.js +21 -13
- package/run/permission-denial-runtime-policy.js.map +1 -1
- package/run/placement-trace.d.ts +0 -18
- package/run/placement-trace.d.ts.map +1 -1
- package/run/recorded-coverage-run.js +45 -0
- package/run/recorded-coverage-run.js.map +1 -0
- package/run/recorded-coverage-session.js +50 -0
- package/run/recorded-coverage-session.js.map +1 -0
- package/run/resource-lifecycle-composition.d.ts +0 -3
- package/run/resource-lifecycle-composition.d.ts.map +1 -1
- package/run/resource-lifecycle-composition.js +1 -14
- package/run/resource-lifecycle-composition.js.map +1 -1
- package/run/resource-lifecycle-session-acquirer.js +11 -6
- package/run/resource-lifecycle-session-acquirer.js.map +1 -1
- package/run/resource-lifecycle-state.d.ts +4 -5
- package/run/resource-lifecycle-state.d.ts.map +1 -1
- package/run/resource-lifecycle-state.js +9 -3
- package/run/resource-lifecycle-state.js.map +1 -1
- package/run/resource-lifecycle.js +36 -10
- package/run/resource-lifecycle.js.map +1 -1
- package/run/resource-usage.js.map +1 -1
- package/run/retry-artifact-retention.js +37 -0
- package/run/retry-artifact-retention.js.map +1 -0
- package/run/run-collection-source.d.ts +1 -5
- package/run/run-collection-source.d.ts.map +1 -1
- package/run/run-config-schema.d.ts +25 -4
- package/run/run-config-schema.d.ts.map +1 -1
- package/run/run-config-schema.js +7 -0
- package/run/run-config-schema.js.map +1 -1
- package/run/run-config.d.ts +3 -3
- package/run/run-config.d.ts.map +1 -1
- package/run/run-config.js +4 -0
- package/run/run-config.js.map +1 -1
- package/run/run-coverage.js +5 -2
- package/run/run-coverage.js.map +1 -1
- package/run/run-discovery-types.d.ts +0 -14
- package/run/run-discovery-types.d.ts.map +1 -1
- package/run/run-engine-primitives.d.ts +11 -0
- package/run/run-engine-primitives.d.ts.map +1 -0
- package/run/run-engine-selection.d.ts +0 -10
- package/run/run-engine-selection.d.ts.map +1 -1
- package/run/run-errors.d.ts +0 -2
- package/run/run-errors.d.ts.map +1 -1
- package/run/run-errors.js +1 -0
- package/run/run-errors.js.map +1 -1
- package/run/run-execution-config.d.ts +5 -0
- package/run/run-execution-config.d.ts.map +1 -1
- package/run/run-facts.js +2 -0
- package/run/run-facts.js.map +1 -1
- package/run/run-if-main-options.d.ts +0 -7
- package/run/run-if-main-options.d.ts.map +1 -1
- package/run/run-if-main-profile.d.ts +0 -1
- package/run/run-if-main-profile.d.ts.map +1 -1
- package/run/run-if-main.d.ts +0 -1
- package/run/run-if-main.d.ts.map +1 -1
- package/run/run-isolated-command.js +2 -0
- package/run/run-isolated-command.js.map +1 -1
- package/run/run-local-command.js +8 -82
- package/run/run-local-command.js.map +1 -1
- package/run/run-local-coverage.js +72 -0
- package/run/run-local-coverage.js.map +1 -0
- package/run/run-local-execution.js +1 -0
- package/run/run-local-execution.js.map +1 -1
- package/run/run-local-resolution.js +6 -3
- package/run/run-local-resolution.js.map +1 -1
- package/run/run-orchestrator-dependencies.d.ts +2 -7
- package/run/run-orchestrator-dependencies.d.ts.map +1 -1
- package/run/run-orchestrator.d.ts +0 -8
- package/run/run-orchestrator.d.ts.map +1 -1
- package/run/run-orchestrator.entry-point.d.ts +1 -1
- package/run/run-orchestrator.entry-point.d.ts.map +1 -1
- package/run/run-orchestrator.js +6 -18
- package/run/run-orchestrator.js.map +1 -1
- package/run/run-record-error.js +26 -0
- package/run/run-record-error.js.map +1 -0
- package/run/run-record-input.js +34 -0
- package/run/run-record-input.js.map +1 -0
- package/run/run-record-outcomes.d.ts +46 -0
- package/run/run-record-outcomes.d.ts.map +1 -0
- package/run/run-record-result.js +58 -0
- package/run/run-record-result.js.map +1 -0
- package/run/run-record-storage.js +51 -0
- package/run/run-record-storage.js.map +1 -0
- package/run/run-record-types.d.ts +73 -0
- package/run/run-record-types.d.ts.map +1 -0
- package/run/run-record-versions.js +51 -0
- package/run/run-record-versions.js.map +1 -0
- package/run/run-record.js +48 -0
- package/run/run-record.js.map +1 -0
- package/run/run-result-reporting.js +16 -0
- package/run/run-result-reporting.js.map +1 -0
- package/run/run-selection-filters.d.ts +2 -11
- package/run/run-selection-filters.d.ts.map +1 -1
- package/run/run-supervised-finalization.js +8 -0
- package/run/run-supervised-finalization.js.map +1 -0
- package/run/run-supervised-process.js +34 -33
- package/run/run-supervised-process.js.map +1 -1
- package/run/run-support.js +17 -8
- package/run/run-support.js.map +1 -1
- package/run/run-test-modules.d.ts +0 -4
- package/run/run-test-modules.d.ts.map +1 -1
- package/run/run-timing-collection.d.ts +0 -21
- package/run/run-timing-collection.d.ts.map +1 -1
- package/run/run-types.d.ts +4 -2
- package/run/run-types.d.ts.map +1 -1
- package/run/run-types.js.map +1 -1
- package/run/run.d.ts +0 -3
- package/run/run.d.ts.map +1 -1
- package/run/supervised-child-execution.js +38 -0
- package/run/supervised-child-execution.js.map +1 -0
- package/run/supervised-child-process.d.ts +1 -53
- package/run/supervised-child-process.d.ts.map +1 -1
- package/run/supervised-child-process.js +1 -5
- package/run/supervised-child-process.js.map +1 -1
- package/run/supervised-child-test-plan.js +2 -0
- package/run/supervised-child-test-plan.js.map +1 -1
- package/run/supervised-child.js +5 -36
- package/run/supervised-child.js.map +1 -1
- package/run/supervised-output-capture.js +66 -0
- package/run/supervised-output-capture.js.map +1 -0
- package/run/supervised-protocol.js.map +1 -1
- package/run/supervised-run-collection.js +3 -1
- package/run/supervised-run-collection.js.map +1 -1
- package/run/supervised-run-resource-policy.js +12 -1
- package/run/supervised-run-resource-policy.js.map +1 -1
- package/run/supervised-run-runtime.js +16 -27
- package/run/supervised-run-runtime.js.map +1 -1
- package/run/supervised-run-state.js +64 -81
- package/run/supervised-run-state.js.map +1 -1
- package/run/supervised-run.js +3 -1
- package/run/supervised-run.js.map +1 -1
- package/run/worker-pool-collection.js +1 -0
- package/run/worker-pool-collection.js.map +1 -1
- package/run/worker-pool-command.js +1 -0
- package/run/worker-pool-command.js.map +1 -1
- package/run/worker-pool-execution.js +2 -1
- package/run/worker-pool-execution.js.map +1 -1
- package/run/worker-pool-hedged-arbitration.js +4 -0
- package/run/worker-pool-hedged-arbitration.js.map +1 -1
- package/run/worker-pool-host-process.js.map +1 -1
- package/run/worker-pool-host-protocol.js.map +1 -1
- package/run/worker-pool-output.js +1 -1
- package/run/worker-pool-output.js.map +1 -1
- package/run/worker-pool-protocol.js.map +1 -1
- package/run/worker-pool-resource-lifecycle-execution.js +1 -0
- package/run/worker-pool-resource-lifecycle-execution.js.map +1 -1
- package/run/worker-pool-resource-tracking.js +2 -2
- package/run/worker-pool-resource-tracking.js.map +1 -1
- package/run/worker-pool-results.js +7 -9
- package/run/worker-pool-results.js.map +1 -1
- package/run/worker-pool-run.js +3 -9
- package/run/worker-pool-run.js.map +1 -1
- package/run/worker-pool-task-events.js +7 -2
- package/run/worker-pool-task-events.js.map +1 -1
- package/run/worker-pool-warm-lane-affinity.d.ts +0 -11
- package/run/worker-pool-warm-lane-affinity.d.ts.map +1 -1
- package/run/worker-pool-worker-plan.js +1 -0
- package/run/worker-pool-worker-plan.js.map +1 -1
- package/run/worker-pool-worker-resources.js +1 -0
- package/run/worker-pool-worker-resources.js.map +1 -1
- package/run/worker-pool-worker.js +2 -1
- package/run/worker-pool-worker.js.map +1 -1
- package/sbom.cdx.json +66 -15
- package/transcript/http-transcript.js +3 -0
- package/transcript/http-transcript.js.map +1 -0
- package/transcript/transcript-store.d.ts +25 -0
- package/transcript/transcript-store.d.ts.map +1 -0
- package/transcript/transcript-store.js +73 -0
- package/transcript/transcript-store.js.map +1 -0
- package/assertion-protocol/assertion-evaluation.d.ts +0 -13
- package/assertion-protocol/assertion-evaluation.d.ts.map +0 -1
- package/assertion-protocol/evaluation.d.ts +0 -32
- package/assertion-protocol/evaluation.d.ts.map +0 -1
- package/assertion-protocol/source-location-forwarding.d.ts +0 -4
- package/assertion-protocol/source-location-forwarding.d.ts.map +0 -1
- package/assertion-protocol/source-location.d.ts +0 -8
- package/assertion-protocol/source-location.d.ts.map +0 -1
- package/compare/comparison-result.d.ts +0 -25
- package/compare/comparison-result.d.ts.map +0 -1
- package/compare/comparison.d.ts +0 -12
- package/compare/comparison.d.ts.map +0 -1
- package/engine/async-leak-diagnostics.d.ts +0 -27
- package/engine/async-leak-diagnostics.d.ts.map +0 -1
- package/engine/custom-assertion-recording.d.ts +0 -33
- package/engine/custom-assertion-recording.d.ts.map +0 -1
- package/engine/execution-async-leak-policy.d.ts +0 -24
- package/engine/execution-async-leak-policy.d.ts.map +0 -1
- package/engine/execution-supervision-state.d.ts +0 -30
- package/engine/execution-supervision-state.d.ts.map +0 -1
- package/engine/reporter-disposal.d.ts +0 -6
- package/engine/reporter-disposal.d.ts.map +0 -1
- package/packages/engine/assertion-protocol.entry-point.d.ts +0 -10
- package/packages/engine/assertion-protocol.entry-point.d.ts.map +0 -1
- package/packages/engine/assertion-protocol.entry-point.js +0 -5
- package/packages/engine/assertion-protocol.entry-point.js.map +0 -1
- package/packages/engine/engine.entry-point.d.ts +0 -58
- package/packages/engine/engine.entry-point.d.ts.map +0 -1
- package/packages/engine/engine.entry-point.js +0 -75
- package/packages/engine/engine.entry-point.js.map +0 -1
- package/resources/resource-definition-brand.d.ts +0 -2
- package/resources/resource-definition-brand.d.ts.map +0 -1
- package/resources/resource-graph.d.ts +0 -24
- package/resources/resource-graph.d.ts.map +0 -1
- package/resources/resource-scenario-binding.d.ts +0 -37
- package/resources/resource-scenario-binding.d.ts.map +0 -1
- package/run/duration-history-schema.d.ts +0 -251
- package/run/duration-history-schema.d.ts.map +0 -1
- package/run/supervised-run-state.d.ts +0 -44
- package/run/supervised-run-state.d.ts.map +0 -1
|
@@ -115,15 +115,18 @@ export async function createLocalRunOrEmptySelectionResultFromInput(command, dep
|
|
|
115
115
|
});
|
|
116
116
|
const plannedCases = selectedNonEmptyTestPlanCases(testPlan, input.request.selection);
|
|
117
117
|
if (plannedCases === null) {
|
|
118
|
-
|
|
118
|
+
const resolvedRun = createEmptyShardResolvedRunFromTestPlan(command, dependencies, input, testPlan);
|
|
119
|
+
return { facts: resolvedRun.facts, run: createEmptySelectionResult(testPlan, dependencies) };
|
|
119
120
|
}
|
|
120
|
-
|
|
121
|
+
const run = await createShardedLocalResolvedRunFromTestPlan(command, dependencies, input, {
|
|
121
122
|
...testPlan,
|
|
122
123
|
cases: plannedCases
|
|
123
124
|
});
|
|
125
|
+
return { facts: run.facts, run };
|
|
124
126
|
}
|
|
125
127
|
export async function createLocalRunOrEmptySelectionResult(command, dependencies, source) {
|
|
126
128
|
const input = await readResolvedRunInput(command, dependencies);
|
|
127
|
-
|
|
129
|
+
const resolved = await createLocalRunOrEmptySelectionResultFromInput(command, dependencies, input, source);
|
|
130
|
+
return resolved.run;
|
|
128
131
|
}
|
|
129
132
|
//# sourceMappingURL=run-local-resolution.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-local-resolution.js","sourceRoot":"","sources":["../../../../source/run/run-local-resolution.ts"],"names":[],"mappings":"AACA,OAAO,EACH,cAAc,EACd,wBAAwB,EAC3B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACH,gCAAgC,EAChC,iCAAiC,EACpC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACH,oBAAoB,EAEvB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,mBAAmB,EAA2B,MAAM,0BAA0B,CAAC;AACxF,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EACH,eAAe,EACf,+BAA+B,EAC/B,qCAAqC,EACrC,6BAA6B,EAC7B,gBAAgB,EACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACH,WAAW,EACX,mBAAmB,EACtB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"run-local-resolution.js","sourceRoot":"","sources":["../../../../source/run/run-local-resolution.ts"],"names":[],"mappings":"AACA,OAAO,EACH,cAAc,EACd,wBAAwB,EAC3B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACH,gCAAgC,EAChC,iCAAiC,EACpC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACH,oBAAoB,EAEvB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QAAQ,CAAC,CAAC;QAEpG,OAAO,EAAE,KAAK,EAAE,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,0BAA0B,CAAC,QAAQ,EAAE,YAAY,CAAC,EAAE,CAAC;IACjG,CAAC;IAED,MAAM,GAAG,GAAG,MAAM,yCAAyC,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE;QACtF,GAAG,QAAQ;QACX,KAAK,EAAE,YAAY;KACtB,CAAC,CAAC;IAEH,OAAO,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC;AACrC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oCAAoC,CACtD,OAAmB,EACnB,YAAyC,EACzC,MAAoC;IAEpC,MAAM,KAAK,GAAG,MAAM,oBAAoB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IAEhE,MAAM,QAAQ,GAAG,MAAM,6CAA6C,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAE3G,OAAO,QAAQ,CAAC,GAAG,CAAC;AACxB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Clock } from '@enormora/clock';
|
|
2
|
-
import type { Engine, Execute, ReporterDispatcher, RunnerError, RunResourceUsageTracker } from '
|
|
2
|
+
import type { Engine, Execute, ReporterDispatcher, RunnerError, RunResourceUsageTracker } from './run-engine-primitives.ts';
|
|
3
3
|
import type { RuntimeCapabilityPolicyDependencies, RuntimeCapabilityPolicyEnvironment } from './capability-policy-snapshots.ts';
|
|
4
4
|
import type { DurationHistoryStore } from './duration-history.ts';
|
|
5
5
|
import type { RunDiscovery } from './run-discovery-types.ts';
|
|
@@ -46,11 +46,6 @@ export type CreatedWorkerPool = {
|
|
|
46
46
|
readonly setHostOutputSink?: (sink: WorkerPoolHostOutputSink | null) => void;
|
|
47
47
|
readonly takeHostRunnerErrors?: () => readonly RunnerError[];
|
|
48
48
|
};
|
|
49
|
-
export type HostRunnerErrors = {
|
|
50
|
-
readonly push: (error: RunnerError) => unknown;
|
|
51
|
-
readonly take: () => readonly RunnerError[];
|
|
52
|
-
};
|
|
53
|
-
export declare function createHostRunnerErrors(): HostRunnerErrors;
|
|
54
49
|
export type RunOrchestratorDependencies = {
|
|
55
50
|
readonly availableParallelism: number;
|
|
56
51
|
readonly createSeed: () => bigint;
|
|
@@ -58,7 +53,7 @@ export type RunOrchestratorDependencies = {
|
|
|
58
53
|
readonly createWorkerPool: (options: WorkerPoolCreationOptions) => CreatedWorkerPool;
|
|
59
54
|
readonly defaultEngine: Engine;
|
|
60
55
|
readonly discoverRunFilesWithProjectRoot: RunDiscovery['discoverRunFilesWithProjectRoot'];
|
|
61
|
-
readonly
|
|
56
|
+
readonly runtimeStateStore: DurationHistoryStore;
|
|
62
57
|
readonly execute: Execute;
|
|
63
58
|
readonly loadRunEngineModule: RunEngineModuleLoader;
|
|
64
59
|
readonly loadRunTestModules: RunTestModuleLoader;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-orchestrator-dependencies.d.ts","sourceRoot":"","sources":["../../../../source/run/run-orchestrator-dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EACR,MAAM,EACN,OAAO,EACP,kBAAkB,EAClB,WAAW,EACX,uBAAuB,EAC1B,MAAM,
|
|
1
|
+
{"version":3,"file":"run-orchestrator-dependencies.d.ts","sourceRoot":"","sources":["../../../../source/run/run-orchestrator-dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EACR,MAAM,EACN,OAAO,EACP,kBAAkB,EAClB,WAAW,EACX,uBAAuB,EAC1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACR,mCAAmC,EACnC,kCAAkC,EACrC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KA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AAK,iBAAiB,CAAC;IACrF,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,+BAA+B,EAAE,YAAY,CAAC,iCAAiC,CAAC,CAAC;IAC1F,QAAQ,CAAC,iBAAiB,EAAE,oBAAoB,CAAC;IACjD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,mBAAmB,EAAE,qBAAqB,CAAC;IACpD,QAAQ,CAAC,kBAAkB,EAAE,mBAAmB,CAAC;IACjD,QAAQ,CAAC,UAAU,EAAE;QACjB,QAAQ,CAAC,MAAM,EAAE;YACb,QAAQ,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;SAC/C,CAAC;QACF,QAAQ,CAAC,MAAM,EAAE;YACb,QAAQ,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;SAC/C,CAAC;KACL,CAAC;IACF,QAAQ,CAAC,uBAAuB,EAAE,mCAAmC,CAAC;IACtE,QAAQ,CAAC,IAAI,EAAE;QACX,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;KAC5B,CAAC;IACF,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAChD,QAAQ,CAAC,oBAAoB,EAAE,6BAA6B,CAAC;IAC7D,QAAQ,CAAC,mBAAmB,EAAE,4BAA4B,CAAC;IAC3D,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC;CAC7B,CAAC"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { type DirectEntrypointRunner } from './run.ts';
|
|
2
1
|
import type { RunOrchestratorDependencies, WorkerPoolHostProcessStarter } from './run-orchestrator-dependencies.ts';
|
|
3
|
-
import type { RunOrchestrator } from './run-types.ts';
|
|
4
2
|
type RuntimeCapabilityPolicyInput = RunOrchestratorDependencies['runtimeCapabilityPolicy'];
|
|
5
3
|
export type NodeRunOrchestratorInput = {
|
|
6
4
|
readonly defaultEngine: RunOrchestratorDependencies['defaultEngine'];
|
|
@@ -23,11 +21,5 @@ export type NodeRunOrchestratorInput = {
|
|
|
23
21
|
readonly writeLine: (line: string) => void;
|
|
24
22
|
};
|
|
25
23
|
};
|
|
26
|
-
export type NodeRunCoordinator = {
|
|
27
|
-
readonly orchestrator: RunOrchestrator;
|
|
28
|
-
readonly runDirectEntrypoint: DirectEntrypointRunner;
|
|
29
|
-
};
|
|
30
|
-
export declare function createNodeRunCoordinator(input: NodeRunOrchestratorInput): NodeRunCoordinator;
|
|
31
|
-
export declare function createNodeRunOrchestrator(input: NodeRunOrchestratorInput): RunOrchestrator;
|
|
32
24
|
export {};
|
|
33
25
|
//# sourceMappingURL=run-orchestrator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-orchestrator.d.ts","sourceRoot":"","sources":["../../../../source/run/run-orchestrator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"run-orchestrator.d.ts","sourceRoot":"","sources":["../../../../source/run/run-orchestrator.ts"],"names":[],"mappings":"AAIA,OAGI,KAGQ,EACR,2BAA2B,EAC3B,4BAA4B,EAC/B,MAAM,oCAAoC,CAAC;KAC9B,4BAEmB,GAAG,2BAA2B,CAAC,yBAAyB,CAAC,CAAC;AAE3F,MAAM,MAAM,wBAAwB,GAAG;IACnC,QAAQ,CAAC,aAAa,EAAE,2BAA2B,CAAC,eAAe,CAAC,CAAC;IACrE,QAAQ,CAAC,+BAA+B,EAAE,2BAA2B,CAAC,iCAAiC,CAAC,CAAC;IACzG,QAAQ,CAAC,qBAAqB,EAAE,4BAA4B,CAAC,uBAAuB,CAAC,CAAC;IACtF,QAAQ,CAAC,kCAAkC,EAAE,4BAA4B,CAAC,oCAAoC,CAAC,CAAC;IAChH,QAAQ,CAAC,IAAI,EAAE,2BAA2B,CAAC,MAAM,CAAC,CAAC;IACnD,QAAQ,CAAC,eAAe,EAAE,4BAA4B,CAAC,iBAAiB,CAAC,CAAC;IAC1E,QAAQ,CAAC,WAAW,EAAE,4BAA4B,CAAC,aAAa,CAAC,CAAC;IAClE,QAAQ,CAAC,mBAAmB,EAAE,2BAA2B,CAAC,qBAAqB,CAAC,CAAC;IACjF,QAAQ,CAAC,kBAAkB,EAAE,2BAA2B,CAAC,oBAAoB,CAAC,CAAC;IAC/E,QAAQ,CAAC,oBAAoB,EAAE,2BAA2B,CAAC,sBAAsB,CAAC,CAAC;IACnF,QAAQ,CAAC,mBAAmB,EAAE,4BAA4B,CAAC;IAC3D,QAAQ,CAAC,MAAM,EAAE;QACb,QAAQ,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;QAC5C,QAAQ,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;KAC9C,CAAC;IACF,QAAQ,CAAC,MAAM,EAAE;QACb,QAAQ,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;QAC5C,QAAQ,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;KAC9C,CAAC;CACL,CAAC;AAEF,MAAM,CAA2B,EAGhC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const orchestrator: import("./run-types.ts").RunOrchestrator
|
|
1
|
+
export declare const orchestrator: import("./run-types.ts").RunOrchestrator;
|
|
2
2
|
//# sourceMappingURL=run-orchestrator.entry-point.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-orchestrator.entry-point.d.ts","sourceRoot":"","sources":["../../../../source/run/run-orchestrator.entry-point.ts"],"names":[],"mappings":"AA+BA,eAAO,MACH,YAAY,
|
|
1
|
+
{"version":3,"file":"run-orchestrator.entry-point.d.ts","sourceRoot":"","sources":["../../../../source/run/run-orchestrator.entry-point.ts"],"names":[],"mappings":"AA+BA,eAAO,MACH,YAAY,0CAMd,CAAC"}
|
package/run/run-orchestrator.js
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import os from 'node:os';
|
|
2
2
|
import { createClock } from '@enormora/clock';
|
|
3
|
-
import { createExecute } from "../engine/execution.js";
|
|
4
3
|
import { createReporterDispatcher } from "../engine/reporter-dispatcher.js";
|
|
5
|
-
import {
|
|
6
|
-
import { createNodeDurationHistoryStore, createWorkerPoolWithHostProcess } from "./node-worker-pool-factory.js";
|
|
4
|
+
import { createNodeExecutionDependencies } from "./node-run-execution.js";
|
|
7
5
|
import { createDirectEntrypointRunner, createRunOrchestrator } from "./run.js";
|
|
8
6
|
import { createRandomRunSeed } from "./run-seed.js";
|
|
9
|
-
function readActiveResourceTypes() {
|
|
10
|
-
return process.getActiveResourcesInfo();
|
|
11
|
-
}
|
|
12
7
|
export function createNodeRunCoordinator(input) {
|
|
13
8
|
const wallClock = createClock();
|
|
14
9
|
const reporterDispatcher = createReporterDispatcher({
|
|
@@ -19,21 +14,14 @@ export function createNodeRunCoordinator(input) {
|
|
|
19
14
|
const dependencies = {
|
|
20
15
|
availableParallelism: os.availableParallelism(),
|
|
21
16
|
createSeed: createRandomRunSeed,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
defaultEngine: input.defaultEngine,
|
|
26
|
-
durationHistoryStore: createNodeDurationHistoryStore(),
|
|
27
|
-
createWorkerPool(options) {
|
|
28
|
-
return createWorkerPoolWithHostProcess(options, input.readEnvironment(), input.startWorkerPoolHost);
|
|
29
|
-
},
|
|
30
|
-
discoverRunFilesWithProjectRoot: input.discoverRunFilesWithProjectRoot,
|
|
31
|
-
execute: createExecute({
|
|
32
|
-
asyncLeakDiagnostics: 'enabled',
|
|
33
|
-
readActiveResourceTypes,
|
|
17
|
+
...createNodeExecutionDependencies({
|
|
18
|
+
readEnvironment: input.readEnvironment,
|
|
34
19
|
reporterDispatcher,
|
|
20
|
+
startWorkerPoolHost: input.startWorkerPoolHost,
|
|
35
21
|
wallClock
|
|
36
22
|
}),
|
|
23
|
+
defaultEngine: input.defaultEngine,
|
|
24
|
+
discoverRunFilesWithProjectRoot: input.discoverRunFilesWithProjectRoot,
|
|
37
25
|
loadRunEngineModule: input.loadRunEngineModule,
|
|
38
26
|
loadRunTestModules: input.loadRunTestModules,
|
|
39
27
|
liveOutput: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-orchestrator.js","sourceRoot":"","sources":["../../../../source/run/run-orchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"run-orchestrator.js","sourceRoot":"","sources":["../../../../source/run/run-orchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EACH,4BAA4B,EAC5B,qBAAqB,EAExB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAoCpD,MAAM,UAAU,wBAAwB,CAAC,KAA+B;IACpE,MAAM,SAAS,GAAG,WAAW,EAAE,CAAC;IAChC,MAAM,kBAAkB,GAAG,wBAAwB,CAAC;QAChD,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,SAAS;KACZ,CAAC,CAAC;IAEH,MAAM,YAAY,GAAgC;QAC9C,oBAAoB,EAAE,EAAE,CAAC,oBAAoB,EAAE;QAC/C,UAAU,EAAE,mBAAmB;QAC/B,GAAG,+BAA+B,CAAC;YAC/B,eAAe,EAAE,KAAK,CAAC,eAAe;YACtC,kBAAkB;YAClB,mBAAmB,EAAE,KAAK,CAAC,mBAAmB;YAC9C,SAAS;SACZ,CAAC;QACF,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,+BAA+B,EAAE,KAAK,CAAC,+BAA+B;QACtE,mBAAmB,EAAE,KAAK,CAAC,mBAAmB;QAC9C,kBAAkB,EAAE,KAAK,CAAC,kBAAkB;QAC5C,UAAU,EAAE;YACR,MAAM,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE;YACrC,MAAM,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE;SACxC;QACD,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,kBAAkB;QAClB,oBAAoB,EAAE,KAAK,CAAC,oBAAoB;QAChD,mBAAmB,EAAE,KAAK,CAAC,mBAAmB;QAC9C,uBAAuB,EAAE;YACrB,qBAAqB,EAAE,KAAK,CAAC,qBAAqB;YAClD,kCAAkC,EAAE,KAAK,CAAC,kCAAkC;YAC5E,eAAe,EAAE,KAAK,CAAC,eAAe;YACtC,WAAW,EAAE,KAAK,CAAC,WAAW;SACjC;QACD,SAAS;KACZ,CAAC;IAEF,OAAO;QACH,YAAY,EAAE,qBAAqB,CAAC,YAAY,CAAC;QACjD,mBAAmB,EAAE,4BAA4B,CAAC,YAAY,CAAC;KAClE,CAAC;AACN,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,KAA+B;IACrE,OAAO,wBAAwB,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC;AACxD,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { RunCollectionError } from "./run-errors.js";
|
|
2
|
+
export class RunRecordError extends RunCollectionError {
|
|
3
|
+
recordPath;
|
|
4
|
+
recordPhase;
|
|
5
|
+
constructor(filePath, options, phase) {
|
|
6
|
+
super(`Failed to persist run record during ${phase}: ${filePath}.`, options, 'runtime-state');
|
|
7
|
+
this.name = 'RunRecordError';
|
|
8
|
+
this.recordPath = filePath;
|
|
9
|
+
this.recordPhase = phase;
|
|
10
|
+
}
|
|
11
|
+
runnerError() {
|
|
12
|
+
return {
|
|
13
|
+
...super.runnerError(),
|
|
14
|
+
diagnostics: [
|
|
15
|
+
{ label: 'Run record phase', value: this.recordPhase },
|
|
16
|
+
{ label: 'Run record path', value: this.recordPath }
|
|
17
|
+
]
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export function runRecordPersistenceError(filePath, phase, error) {
|
|
22
|
+
return new RunRecordError(filePath, {
|
|
23
|
+
cause: { error, kind: 'run-record-persistence', path: filePath, phase }
|
|
24
|
+
}, phase);
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=run-record-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-record-error.js","sourceRoot":"","sources":["../../../../source/run/run-record-error.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAIrD,MAAM,OAAO,cAAe,SAAQ,kBAAkB;IACjC,UAAU,CAAS;IACnB,WAAW,CAAiB;IAE7C,YAAmB,QAAgB,EAAE,OAA+B,EAAE,KAAqB;QACvF,KAAK,CAAC,uCAAuC,KAAK,KAAK,QAAQ,GAAG,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC;QAC9F,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;QAC7B,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC;QAC3B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC7B,CAAC;IAEe,WAAW;QACvB,OAAO;YACH,GAAG,KAAK,CAAC,WAAW,EAAE;YACtB,WAAW,EAAE;gBACT,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE;gBACtD,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE;aACvD;SACJ,CAAC;IACN,CAAC;CACJ;AAED,MAAM,UAAU,yBAAyB,CAAC,QAAgB,EAAE,KAAqB,EAAE,KAAc;IAC7F,OAAO,IAAI,cAAc,CAAC,QAAQ,EAAE;QAChC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,wBAAwB,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE;KAC1E,EAAE,KAAK,CAAC,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { runEngineFacts } from "./run-support.js";
|
|
2
|
+
export function initialRecord(cwd, input, dependencies) {
|
|
3
|
+
if (input.request.seed.value === null) {
|
|
4
|
+
throw new Error('Run recording requires a resolved seed.');
|
|
5
|
+
}
|
|
6
|
+
const seed = input.request.seed.value.toString();
|
|
7
|
+
const startedAt = new Date(dependencies.wallClock.currentUnixEpochMilliseconds);
|
|
8
|
+
return {
|
|
9
|
+
coverage: null,
|
|
10
|
+
cwd,
|
|
11
|
+
engine: runEngineFacts(input.engine),
|
|
12
|
+
environment: {
|
|
13
|
+
node: dependencies.node,
|
|
14
|
+
projectRoot: input.projectRoot,
|
|
15
|
+
runtimeStateDir: input.config.runtimeStateDir
|
|
16
|
+
},
|
|
17
|
+
execution: input.profile.execution,
|
|
18
|
+
facts: null,
|
|
19
|
+
id: dependencies.createId(),
|
|
20
|
+
identities: [],
|
|
21
|
+
kind: 'single',
|
|
22
|
+
loader: input.config.loader,
|
|
23
|
+
placementTrace: null,
|
|
24
|
+
request: { ...input.request, seed: { value: seed } },
|
|
25
|
+
result: null,
|
|
26
|
+
runtime: null,
|
|
27
|
+
seed,
|
|
28
|
+
startedAt: startedAt.toISOString(),
|
|
29
|
+
status: 'started',
|
|
30
|
+
version: 1,
|
|
31
|
+
versions: dependencies.versions
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=run-record-input.js.map
|
|
@@ -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,SAAS;QACjB,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,YAAY,CAAC,QAAQ;KAClC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { Except } from 'type-fest';
|
|
2
|
+
import type { SerializedValue } from '../compare/serialized-value.ts';
|
|
3
|
+
import type { HedgedConflictArtifact, TestAttemptResult, TestFailure, TestOutcome } from '../engine/run-result.ts';
|
|
4
|
+
import type { CapturedOutputArtifact } from '../engine/run-artifact.ts';
|
|
5
|
+
import type { CoverageArtifact } from '../engine/coverage-artifact.ts';
|
|
6
|
+
type RecordedThrownError = {
|
|
7
|
+
readonly kind: 'body-error' | 'cleanup-error';
|
|
8
|
+
readonly error: {
|
|
9
|
+
readonly message: string;
|
|
10
|
+
readonly name: string;
|
|
11
|
+
readonly stack: string | null;
|
|
12
|
+
readonly thrown: SerializedValue;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
type RecordedContractFailure = Except<Extract<TestFailure, {
|
|
16
|
+
readonly kind: 'test-contract';
|
|
17
|
+
}>, 'actual'> & {
|
|
18
|
+
readonly actual: SerializedValue;
|
|
19
|
+
};
|
|
20
|
+
type PreservedTestFailure = Exclude<TestFailure, {
|
|
21
|
+
readonly kind: 'body-error' | 'cleanup-error' | 'test-contract';
|
|
22
|
+
}>;
|
|
23
|
+
export type RunRecordTestFailure = PreservedTestFailure | RecordedContractFailure | RecordedThrownError;
|
|
24
|
+
export type RunRecordTestOutcome = Exclude<TestOutcome, {
|
|
25
|
+
readonly kind: 'fail';
|
|
26
|
+
}> | {
|
|
27
|
+
readonly failures: readonly [RunRecordTestFailure, ...readonly RunRecordTestFailure[]];
|
|
28
|
+
readonly kind: 'fail';
|
|
29
|
+
};
|
|
30
|
+
type RecordedConflictEvidence = {
|
|
31
|
+
readonly attempts: readonly [RunRecordTestAttempt, ...readonly RunRecordTestAttempt[]];
|
|
32
|
+
readonly outcome: RunRecordTestOutcome | null;
|
|
33
|
+
readonly verdict: TestOutcome['kind'] | 'crashed' | 'resource-exhausted' | 'runtime-policy';
|
|
34
|
+
};
|
|
35
|
+
export type RunRecordTestAttempt = Except<TestAttemptResult, 'outcome'> & {
|
|
36
|
+
readonly outcome: RunRecordTestOutcome | null;
|
|
37
|
+
};
|
|
38
|
+
type RecordedConflictArtifact = Except<HedgedConflictArtifact, 'payload'> & {
|
|
39
|
+
readonly payload: Except<HedgedConflictArtifact['payload'], 'authoritative' | 'conflicting'> & {
|
|
40
|
+
readonly authoritative: RecordedConflictEvidence;
|
|
41
|
+
readonly conflicting: RecordedConflictEvidence;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export type RunRecordArtifact = CapturedOutputArtifact | CoverageArtifact | RecordedConflictArtifact;
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=run-record-outcomes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-record-outcomes.d.ts","sourceRoot":"","sources":["../../../../source/run/run-record-outcomes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,KAAK,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACnH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,KAAK,mBAAmB,GAAG;IACvB,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,eAAe,CAAC;IAC9C,QAAQ,CAAC,KAAK,EAAE;QACZ,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;Q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AsB,EAAE,SAAS,CAAC,GAAG;IACxE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,sBAAsB,CAAC,SAAS,CAAC,EAAE,eAAe,GAAG,aAAa,CAAC,GAAG;QAC3F,QAAQ,CAAC,aAAa,EAAE,wBAAwB,CAAC;QACjD,QAAQ,CAAC,WAAW,EAAE,wBAAwB,CAAC;KAClD,CAAC;CACL,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,sBAAsB,GAAG,gBAAgB,GAAG,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { serializeValue } from "../compare/serialized-value.js";
|
|
2
|
+
function recordedFailure(failure) {
|
|
3
|
+
if (failure.kind === 'body-error' || failure.kind === 'cleanup-error') {
|
|
4
|
+
return { ...failure, error: { ...failure.error, thrown: serializeValue(failure.error.thrown) } };
|
|
5
|
+
}
|
|
6
|
+
return failure.kind === 'test-contract' ? { ...failure, actual: serializeValue(failure.actual) } : failure;
|
|
7
|
+
}
|
|
8
|
+
function recordedOutcome(outcome) {
|
|
9
|
+
if (outcome?.kind !== 'fail') {
|
|
10
|
+
return outcome;
|
|
11
|
+
}
|
|
12
|
+
const [first, ...remaining] = outcome.failures;
|
|
13
|
+
return { ...outcome, failures: [recordedFailure(first), ...remaining.map(recordedFailure)] };
|
|
14
|
+
}
|
|
15
|
+
function isHedgedConflict(artifact) {
|
|
16
|
+
return artifact.payload.kind === 'hedged-conflict';
|
|
17
|
+
}
|
|
18
|
+
function recordedAttempts(attempts) {
|
|
19
|
+
function recordAttempt(attempt) {
|
|
20
|
+
return { ...attempt, outcome: recordedOutcome(attempt.outcome) };
|
|
21
|
+
}
|
|
22
|
+
const [first, ...remaining] = attempts;
|
|
23
|
+
return [recordAttempt(first), ...remaining.map(recordAttempt)];
|
|
24
|
+
}
|
|
25
|
+
function recordedArtifact(artifact) {
|
|
26
|
+
if (!isHedgedConflict(artifact)) {
|
|
27
|
+
return artifact;
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
...artifact,
|
|
31
|
+
payload: {
|
|
32
|
+
...artifact.payload,
|
|
33
|
+
authoritative: {
|
|
34
|
+
...artifact.payload.authoritative,
|
|
35
|
+
attempts: recordedAttempts(artifact.payload.authoritative.attempts),
|
|
36
|
+
outcome: recordedOutcome(artifact.payload.authoritative.outcome)
|
|
37
|
+
},
|
|
38
|
+
conflicting: {
|
|
39
|
+
...artifact.payload.conflicting,
|
|
40
|
+
attempts: recordedAttempts(artifact.payload.conflicting.attempts),
|
|
41
|
+
outcome: recordedOutcome(artifact.payload.conflicting.outcome)
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export function recordedRunResult(result) {
|
|
47
|
+
return {
|
|
48
|
+
...result,
|
|
49
|
+
artifacts: result.artifacts.map(recordedArtifact),
|
|
50
|
+
perTest: result.perTest.map(function recordTestOutcome(test) {
|
|
51
|
+
return { ...test, attempts: recordedAttempts(test.attempts), outcome: recordedOutcome(test.outcome) };
|
|
52
|
+
}),
|
|
53
|
+
runnerErrors: result.runnerErrors.map(function recordErrorCause(error) {
|
|
54
|
+
return { ...error, cause: serializeValue(error.cause) };
|
|
55
|
+
})
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=run-record-result.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-record-result.js","sourceRoot":"","sources":["../../../../source/run/run-record-result.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAiBhE,SAAS,eAAe,CAAC,OAAoB;IACzC,IAAI,OAAO,CAAC,IAAI,KAAK,YAAY,IAAI,OAAO,CAAC,IAAI,KAAK,eAAe,EAAE,CAAC;QACpE,OAAO,EAAE,GAAG,OAAO,EAAE,KAAK,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,CAAC,OAAO,CAAC,KAAK,C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ecordPersistenceError } from "./run-record-error.js";
|
|
3
|
+
import { recordedRunResult } from "./run-record-result.js";
|
|
4
|
+
const jsonIndentation = 2;
|
|
5
|
+
async function preserveFailure(storage, result, status) {
|
|
6
|
+
const phase = status === 'completed' ? 'complete' : 'checkpoint';
|
|
7
|
+
try {
|
|
8
|
+
await storage.persist({ ...storage.current(), result: recordedRunResult(result), status }, phase);
|
|
9
|
+
}
|
|
10
|
+
catch {
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
function resultWithPersistenceError(result, error, phase) {
|
|
14
|
+
const runnerError = error.runnerError();
|
|
15
|
+
if (phase === 'complete') {
|
|
16
|
+
recordUndeliveredRunnerError(runnerError);
|
|
17
|
+
}
|
|
18
|
+
return { ...result, runnerErrors: [...result.runnerErrors, runnerError], status: 'failed' };
|
|
19
|
+
}
|
|
20
|
+
export function createRunRecordStorage(filePath, initial, store) {
|
|
21
|
+
let current = initial;
|
|
22
|
+
const storage = {
|
|
23
|
+
current() {
|
|
24
|
+
return current;
|
|
25
|
+
},
|
|
26
|
+
async persist(value, phase) {
|
|
27
|
+
current = value;
|
|
28
|
+
try {
|
|
29
|
+
await store.write(filePath, `${JSON.stringify(value, null, jsonIndentation)}\n`);
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
throw runRecordPersistenceError(filePath, phase, error);
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
async result(result, status) {
|
|
36
|
+
const phase = status === 'completed' ? 'complete' : 'checkpoint';
|
|
37
|
+
try {
|
|
38
|
+
await storage.persist({ ...current, result: recordedRunResult(result), status }, phase);
|
|
39
|
+
return result;
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
const persistenceError = runRecordPersistenceError(filePath, phase, error);
|
|
43
|
+
const failure = resultWithPersistenceError(result, persistenceError, phase);
|
|
44
|
+
await preserveFailure(storage, failure, status);
|
|
45
|
+
return failure;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
return storage;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=run-record-storage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-record-storage.js","sourceRoot":"","sources":["../../../../source/run/run-record-storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAG7F,OAAO,EAAE,yBAAyB,EAA4C,MAAM,uBAAuB,CAAC;AAC5G,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAS3D,MAAM,eAAe,GAAG,CAAC,CAAC;AAE1B,KAAK,UAAU,eAAe,CAC1B,OAAyB,EACzB,MAAiB,EACjB,MAA+B;IAE/B,MAAM,KAAK,GAAG,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC;IACjE,IAAI,CAAC;QACD,MAAM,OAAO,CAAC,OAAO,CACjB,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,iBAAiB,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,EACnE,KAAK,CACR,CAAC;IACN,CAAC;IAAC,MAAM,CAAC;IACT,CAAC;AACL,CAAC;AAED,SAAS,0BAA0B,CAAC,MAAiB,EAAE,KAAqB,EAAE,KAAqB;IAC/F,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;IACxC,IAAI,KAAK,KAAK,UAAU,EAAE,CAAC;QACvB,4BAA4B,CAAC,WAAW,CAAC,CAAC;IAC9C,CAAC;IACD,OAAO,EAAE,GAAG,MAAM,EAAE,YAAY,EAAE,CAAE,GAAG,MAAM,CAAC,YAAY,EAAE,WAAW,CAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AAClG,CAAC;AAED,MAAM,UAAU,sBAAsB,CAClC,QAAgB,EAChB,OAAkB,EAClB,KAAsE;IAEtE,IAAI,OAAO,GAAG,OAAO,CAAC;IACtB,M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ine/identity.ts';
|
|
3
|
+
import type { RunnerError, RunResult } from '../engine/run-result.ts';
|
|
4
|
+
import type { SerializedValue } from '../compare/serialized-value.ts';
|
|
5
|
+
import type { RunRecordArtifact, RunRecordTestAttempt, RunRecordTestOutcome } from './run-record-outcomes.ts';
|
|
6
|
+
import type { PlacementTrace } from './placement-trace.ts';
|
|
7
|
+
import type { RunCoveragePolicy, RunEngineFacts, RunEnvironmentFacts, RunFacts, RunLoaderConfig, RunProfileConfig, RunRequest } from './run-types.ts';
|
|
8
|
+
export type RunRecordCoverage = {
|
|
9
|
+
readonly directory: string;
|
|
10
|
+
readonly policy: RunCoveragePolicy;
|
|
11
|
+
readonly rawDataDirectory: string;
|
|
12
|
+
};
|
|
13
|
+
export type RunRecordVersions = {
|
|
14
|
+
readonly engine: string | null;
|
|
15
|
+
readonly node: string;
|
|
16
|
+
readonly packages: Readonly<Record<string, string>>;
|
|
17
|
+
};
|
|
18
|
+
export type ResolvedRuntime = {
|
|
19
|
+
readonly adapters: readonly {
|
|
20
|
+
readonly name: string;
|
|
21
|
+
readonly version: string;
|
|
22
|
+
}[];
|
|
23
|
+
readonly id: RuntimeId;
|
|
24
|
+
readonly machineClass: string | null;
|
|
25
|
+
readonly nodeVersion: string | null;
|
|
26
|
+
readonly os: string | null;
|
|
27
|
+
};
|
|
28
|
+
type RecordedTestResult = Except<RunResult['perTest'][number], 'attempts' | 'outcome'> & {
|
|
29
|
+
readonly attempts: readonly [RunRecordTestAttempt, ...readonly RunRecordTestAttempt[]];
|
|
30
|
+
readonly outcome: RunRecordTestOutcome | null;
|
|
31
|
+
};
|
|
32
|
+
export type RunRecordResult = Except<RunResult, 'artifacts' | 'perTest' | 'runnerErrors'> & {
|
|
33
|
+
readonly artifacts: readonly RunRecordArtifact[];
|
|
34
|
+
readonly perTest: readonly RecordedTestResult[];
|
|
35
|
+
readonly runnerErrors: readonly (Except<RunnerError, 'cause'> & {
|
|
36
|
+
readonly cause: SerializedValue;
|
|
37
|
+
})[];
|
|
38
|
+
};
|
|
39
|
+
export type RunRecordRequest = Except<RunRequest, 'seed'> & {
|
|
40
|
+
readonly seed: {
|
|
41
|
+
readonly value: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
type RunRecordInputs = {
|
|
45
|
+
readonly coverage: RunRecordCoverage | null;
|
|
46
|
+
readonly cwd: string;
|
|
47
|
+
readonly engine: RunEngineFacts;
|
|
48
|
+
readonly environment: RunEnvironmentFacts;
|
|
49
|
+
readonly execution: RunProfileConfig['execution'];
|
|
50
|
+
readonly facts: RunFacts | null;
|
|
51
|
+
readonly id: string;
|
|
52
|
+
readonly identities: readonly WorkId[];
|
|
53
|
+
readonly kind: 'single';
|
|
54
|
+
readonly loader: RunLoaderConfig;
|
|
55
|
+
readonly placementTrace: PlacementTrace | null;
|
|
56
|
+
readonly request: RunRecordRequest;
|
|
57
|
+
readonly runtime: ResolvedRuntime | null;
|
|
58
|
+
readonly seed: string;
|
|
59
|
+
readonly startedAt: string;
|
|
60
|
+
readonly version: 1;
|
|
61
|
+
readonly versions: RunRecordVersions;
|
|
62
|
+
};
|
|
63
|
+
type CompletedRunRecord = RunRecordInputs & {
|
|
64
|
+
readonly result: RunRecordResult;
|
|
65
|
+
readonly status: 'completed';
|
|
66
|
+
};
|
|
67
|
+
type StartedRunRecord = RunRecordInputs & {
|
|
68
|
+
readonly result: RunRecordResult | null;
|
|
69
|
+
readonly status: 'interrupted' | 'started';
|
|
70
|
+
};
|
|
71
|
+
export type RunRecord = CompletedRunRecord | StartedRunRecord;
|
|
72
|
+
export {};
|
|
73
|
+
//# sourceMappingURL=run-record-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-record-types.d.ts","sourceRoot":"","sources":["../../../../source/run/run-record-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,u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,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,cAAc,EAAE,cAAc,GAAG,IAAI,CAAC;IAC/C,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;IACpB,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;CACxC,CAAC;AAEF,KAAK,kBAAkB,GAAG,eAAe,GAAG;IACxC,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;CAChC,CAAC;AACF,KAAK,gBAAgB,GAAG,eAAe,GAAG;IACtC,QAAQ,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC;IACxC,QAAQ,CAAC,MAAM,EAAE,aAAa,GAAG,SAAS,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,kBAAkB,GAAG,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
const packageVersionSchema = z.object({ name: z.string(), version: z.string() });
|
|
6
|
+
async function parsePackageVersion(manifestPath) {
|
|
7
|
+
const contents = await readFile(manifestPath, 'utf8');
|
|
8
|
+
const parsed = packageVersionSchema.safeParse(JSON.parse(contents));
|
|
9
|
+
return parsed.success ? parsed.data : null;
|
|
10
|
+
}
|
|
11
|
+
async function readPackageVersion(directory) {
|
|
12
|
+
const manifestPath = path.join(directory, 'package.json');
|
|
13
|
+
try {
|
|
14
|
+
return await parsePackageVersion(manifestPath);
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
if (error instanceof Error && Reflect.get(error, 'code') === 'ENOENT' && path.dirname(directory) !== directory) {
|
|
18
|
+
return await readPackageVersion(path.dirname(directory));
|
|
19
|
+
}
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
async function packageVersion(moduleUrl) {
|
|
24
|
+
try {
|
|
25
|
+
return await readPackageVersion(path.dirname(fileURLToPath(moduleUrl)));
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
async function coverageBackendVersion() {
|
|
32
|
+
try {
|
|
33
|
+
return await packageVersion(import.meta.resolve('monocart-coverage-reports'));
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function packageEntries(metadata) {
|
|
40
|
+
return metadata === null || metadata.name === 'overkill' ? [] : [[metadata.name, metadata.version]];
|
|
41
|
+
}
|
|
42
|
+
export async function runRecordVersions(engine, node) {
|
|
43
|
+
const [runner, backend, selectedEngine] = await Promise.all([
|
|
44
|
+
packageVersion(import.meta.url),
|
|
45
|
+
coverageBackendVersion(),
|
|
46
|
+
engine.kind === 'module' ? packageVersion(engine.moduleUrl) : Promise.resolve(null)
|
|
47
|
+
]);
|
|
48
|
+
const packages = Object.fromEntries([runner, backend, selectedEngine].flatMap(packageEntries));
|
|
49
|
+
return { engine: selectedEngine?.version ?? null, node, packages };
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=run-record-versions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-record-versions.js","sourceRoot":"","sources":["../../../../source/run/run-record-versions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EA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ACvE,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { createResultFromResolutionError } from "./run-collection-error-result.js";
|
|
3
|
+
import { RunCollectionError } from "./run-errors.js";
|
|
4
|
+
import { createRunRecordStorage } from "./run-record-storage.js";
|
|
5
|
+
import { recordedRunResult } from "./run-record-result.js";
|
|
6
|
+
import { initialRecord } from "./run-record-input.js";
|
|
7
|
+
export function createRunRecordSession(cwd, input, dependencies) {
|
|
8
|
+
const value = initialRecord(cwd, input, dependencies);
|
|
9
|
+
const filePath = path.resolve(input.projectRoot, input.config.runtimeStateDir, 'runs', `${value.id}.json`);
|
|
10
|
+
const storage = createRunRecordStorage(filePath, value, dependencies.store);
|
|
11
|
+
return {
|
|
12
|
+
async checkpointResult(result) {
|
|
13
|
+
return await storage.result(result, 'started');
|
|
14
|
+
},
|
|
15
|
+
async complete(result) {
|
|
16
|
+
return await storage.result(result, 'completed');
|
|
17
|
+
},
|
|
18
|
+
id: value.id,
|
|
19
|
+
async interrupt(error) {
|
|
20
|
+
const result = recordedRunResult(createResultFromResolutionError(new RunCollectionError('Run interrupted before completion.', { cause: error }, 'crash'), null));
|
|
21
|
+
const previousResult = storage.current().result;
|
|
22
|
+
const interruptedResult = previousResult === null ? result : {
|
|
23
|
+
...previousResult,
|
|
24
|
+
runnerErrors: [...previousResult.runnerErrors, ...result.runnerErrors],
|
|
25
|
+
status: 'failed'
|
|
26
|
+
};
|
|
27
|
+
await storage.persist({
|
|
28
|
+
...storage.current(),
|
|
29
|
+
result: interruptedResult,
|
|
30
|
+
status: 'interrupted'
|
|
31
|
+
}, 'interrupt');
|
|
32
|
+
},
|
|
33
|
+
path: filePath,
|
|
34
|
+
async recordFacts(facts) {
|
|
35
|
+
await storage.persist({
|
|
36
|
+
...storage.current(),
|
|
37
|
+
facts,
|
|
38
|
+
identities: facts.cases.map(function workIdentity(test) {
|
|
39
|
+
return test.workId;
|
|
40
|
+
})
|
|
41
|
+
}, 'facts');
|
|
42
|
+
},
|
|
43
|
+
async start(coverage) {
|
|
44
|
+
await storage.persist({ ...storage.current(), coverage }, 'start');
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=run-record.js.map
|