@overkill-dev/run 0.0.63 → 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/source-location-forwarding.js +14 -2
- 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/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 -3
- 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 -0
- package/engine/coverage-artifact.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 -1
- package/engine/execution-global-error-observer.d.ts.map +1 -1
- package/engine/execution-global-error-observer.js +19 -15
- package/engine/execution-global-error-observer.js.map +1 -1
- package/engine/execution-options.d.ts +4 -1
- 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-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.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.js +3 -3
- package/engine/execution.js.map +1 -1
- package/engine/identity.d.ts +3 -0
- package/engine/identity.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.d.ts +2 -1
- package/engine/reporter.d.ts.map +1 -1
- package/engine/reporter.js.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 +17 -52
- 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/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/package.json +17 -6
- 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 +11 -2
- 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/resources/resources.d.ts.map +1 -1
- package/resources/resources.js +3 -6
- package/resources/resources.js.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/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 +104 -8
- 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/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/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-session-acquirer.js +11 -6
- package/run/resource-lifecycle-session-acquirer.js.map +1 -1
- package/run/resource-lifecycle-state.d.ts +4 -2
- 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-config-schema.d.ts +25 -0
- 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 -2
- 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-engine-primitives.d.ts +2 -1
- package/run/run-engine-primitives.d.ts.map +1 -1
- 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-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 +1 -1
- package/run/run-orchestrator-dependencies.d.ts.map +1 -1
- package/run/run-orchestrator.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-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-types.d.ts +4 -1
- package/run/run-types.d.ts.map +1 -1
- package/run/run-types.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 +1 -0
- 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-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 +2 -2
- 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-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 +1 -0
- package/run/worker-pool-worker.js.map +1 -1
- package/sbom.cdx.json +65 -14
- 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
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
2
|
+
const transcriptIdentity = Symbol.for('@overkill-dev/transcript');
|
|
3
|
+
const activeTranscriptScope = new AsyncLocalStorage();
|
|
4
|
+
const noEntries = Object.freeze([]);
|
|
5
|
+
function validIndex(index) {
|
|
6
|
+
return Number.isSafeInteger(index) && index >= 0;
|
|
7
|
+
}
|
|
8
|
+
export function brandTranscriptView(subject) {
|
|
9
|
+
Object.defineProperty(subject, transcriptIdentity, {
|
|
10
|
+
enumerable: false,
|
|
11
|
+
value: true
|
|
12
|
+
});
|
|
13
|
+
return Object.freeze(subject);
|
|
14
|
+
}
|
|
15
|
+
export function currentTranscriptScope() {
|
|
16
|
+
return activeTranscriptScope.getStore() ?? null;
|
|
17
|
+
}
|
|
18
|
+
export async function runWithTranscriptScope(scope, run) {
|
|
19
|
+
return await activeTranscriptScope.run(scope, run);
|
|
20
|
+
}
|
|
21
|
+
function brandedView(currentEntries) {
|
|
22
|
+
const view = {
|
|
23
|
+
get entries() {
|
|
24
|
+
return currentEntries();
|
|
25
|
+
},
|
|
26
|
+
get entryCount() {
|
|
27
|
+
return currentEntries().length;
|
|
28
|
+
},
|
|
29
|
+
get firstEntry() {
|
|
30
|
+
return currentEntries()[0] ?? null;
|
|
31
|
+
},
|
|
32
|
+
get lastEntry() {
|
|
33
|
+
return currentEntries().at(-1) ?? null;
|
|
34
|
+
},
|
|
35
|
+
nthEntry(index) {
|
|
36
|
+
return validIndex(index) ? currentEntries()[index] ?? null : null;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
return brandTranscriptView(view);
|
|
40
|
+
}
|
|
41
|
+
export function createTranscriptStore() {
|
|
42
|
+
const entries = [];
|
|
43
|
+
let scopedEntries = new WeakMap();
|
|
44
|
+
function recordInScope(scope, entry) {
|
|
45
|
+
entries.push(entry);
|
|
46
|
+
if (scope !== null) {
|
|
47
|
+
const scopeEntries = scopedEntries.get(scope) ?? [];
|
|
48
|
+
scopeEntries.push(entry);
|
|
49
|
+
scopedEntries.set(scope, scopeEntries);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function currentEntries() {
|
|
53
|
+
const scope = currentTranscriptScope();
|
|
54
|
+
return scope === null ? entries : scopedEntries.get(scope) ?? noEntries;
|
|
55
|
+
}
|
|
56
|
+
return Object.freeze({
|
|
57
|
+
record(...entry) {
|
|
58
|
+
recordInScope(currentTranscriptScope(), entry);
|
|
59
|
+
},
|
|
60
|
+
recordInScope(scope, ...entry) {
|
|
61
|
+
recordInScope(scope, entry);
|
|
62
|
+
},
|
|
63
|
+
reset() {
|
|
64
|
+
entries.length = 0;
|
|
65
|
+
scopedEntries = new WeakMap();
|
|
66
|
+
},
|
|
67
|
+
view: brandedView(currentEntries)
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
export function isTranscriptView(value) {
|
|
71
|
+
return typeof value === 'object' && value !== null && Reflect.get(value, transcriptIdentity) === true;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=transcript-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcript-store.js","sourceRoot":"","sources":["../../../../source/transcript/transcript-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;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