@codyswann/lisa 4.28.5 → 4.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/all/copy-overwrite/scripts/lisa-gates.mjs +2 -1
- package/all/copy-overwrite/scripts/lisa-hooks/sonar-secrets.sh +3 -2
- package/cdk/create-only/vitest.config.local.ts +5 -1
- package/cdk/package-lisa/package.lisa.json +14 -7
- package/dist/cli/lisa-test-run-bootstrap.d.ts +3 -0
- package/dist/cli/lisa-test-run-bootstrap.d.ts.map +1 -0
- package/dist/cli/lisa-test-run-bootstrap.js +201 -0
- package/dist/cli/lisa-test-run-bootstrap.js.map +1 -0
- package/dist/cli/lisa-test-run-ipc.d.ts +42 -0
- package/dist/cli/lisa-test-run-ipc.d.ts.map +1 -0
- package/dist/cli/lisa-test-run-ipc.js +200 -0
- package/dist/cli/lisa-test-run-ipc.js.map +1 -0
- package/dist/cli/lisa-test-run-process-group.d.ts +30 -0
- package/dist/cli/lisa-test-run-process-group.d.ts.map +1 -0
- package/dist/cli/lisa-test-run-process-group.js +123 -0
- package/dist/cli/lisa-test-run-process-group.js.map +1 -0
- package/dist/cli/lisa-test-run-reaper.d.ts +3 -0
- package/dist/cli/lisa-test-run-reaper.d.ts.map +1 -0
- package/dist/cli/lisa-test-run-reaper.js +195 -0
- package/dist/cli/lisa-test-run-reaper.js.map +1 -0
- package/dist/cli/lisa-test-run-runtime.d.ts +46 -0
- package/dist/cli/lisa-test-run-runtime.d.ts.map +1 -0
- package/dist/cli/lisa-test-run-runtime.js +123 -0
- package/dist/cli/lisa-test-run-runtime.js.map +1 -0
- package/dist/cli/lisa-test-run-supervisor.d.ts +13 -0
- package/dist/cli/lisa-test-run-supervisor.d.ts.map +1 -0
- package/dist/cli/lisa-test-run-supervisor.js +268 -0
- package/dist/cli/lisa-test-run-supervisor.js.map +1 -0
- package/dist/cli/lisa-test-run.d.ts +3 -0
- package/dist/cli/lisa-test-run.d.ts.map +1 -0
- package/dist/cli/lisa-test-run.js +66 -0
- package/dist/cli/lisa-test-run.js.map +1 -0
- package/dist/configs/vitest/base.d.ts.map +1 -1
- package/dist/configs/vitest/base.js +5 -2
- package/dist/configs/vitest/base.js.map +1 -1
- package/dist/configs/vitest/cdk.d.ts +4 -0
- package/dist/configs/vitest/cdk.d.ts.map +1 -1
- package/dist/configs/vitest/cdk.js +5 -0
- package/dist/configs/vitest/cdk.js.map +1 -1
- package/dist/configs/vitest/harper-fabric.d.ts.map +1 -1
- package/dist/configs/vitest/harper-fabric.js +1 -0
- package/dist/configs/vitest/harper-fabric.js.map +1 -1
- package/dist/configs/vitest/nestjs.d.ts.map +1 -1
- package/dist/configs/vitest/nestjs.js +1 -0
- package/dist/configs/vitest/nestjs.js.map +1 -1
- package/dist/configs/vitest/phaser.d.ts.map +1 -1
- package/dist/configs/vitest/phaser.js +1 -0
- package/dist/configs/vitest/phaser.js.map +1 -1
- package/dist/configs/vitest/scratch-authority.d.ts +25 -0
- package/dist/configs/vitest/scratch-authority.d.ts.map +1 -0
- package/dist/configs/vitest/scratch-authority.js +107 -0
- package/dist/configs/vitest/scratch-authority.js.map +1 -0
- package/dist/configs/vitest/scratch-bound-cleanup-programs.d.ts +5 -0
- package/dist/configs/vitest/scratch-bound-cleanup-programs.d.ts.map +1 -0
- package/dist/configs/vitest/scratch-bound-cleanup-programs.js +219 -0
- package/dist/configs/vitest/scratch-bound-cleanup-programs.js.map +1 -0
- package/dist/configs/vitest/scratch-bound-cleanup.d.ts +28 -0
- package/dist/configs/vitest/scratch-bound-cleanup.d.ts.map +1 -0
- package/dist/configs/vitest/scratch-bound-cleanup.js +155 -0
- package/dist/configs/vitest/scratch-bound-cleanup.js.map +1 -0
- package/dist/configs/vitest/scratch-bound-root-cleanup.d.ts +17 -0
- package/dist/configs/vitest/scratch-bound-root-cleanup.d.ts.map +1 -0
- package/dist/configs/vitest/scratch-bound-root-cleanup.js +149 -0
- package/dist/configs/vitest/scratch-bound-root-cleanup.js.map +1 -0
- package/dist/configs/vitest/scratch-global-setup.d.ts +17 -9
- package/dist/configs/vitest/scratch-global-setup.d.ts.map +1 -1
- package/dist/configs/vitest/scratch-global-setup.js +103 -35
- package/dist/configs/vitest/scratch-global-setup.js.map +1 -1
- package/dist/configs/vitest/scratch-leak-setup.d.ts +2 -0
- package/dist/configs/vitest/scratch-leak-setup.d.ts.map +1 -0
- package/dist/configs/vitest/scratch-leak-setup.js +108 -0
- package/dist/configs/vitest/scratch-leak-setup.js.map +1 -0
- package/dist/configs/vitest/scratch-namespace-authority.d.ts +80 -0
- package/dist/configs/vitest/scratch-namespace-authority.d.ts.map +1 -0
- package/dist/configs/vitest/scratch-namespace-authority.js +291 -0
- package/dist/configs/vitest/scratch-namespace-authority.js.map +1 -0
- package/dist/configs/vitest/scratch-owner.d.ts +131 -0
- package/dist/configs/vitest/scratch-owner.d.ts.map +1 -0
- package/dist/configs/vitest/scratch-owner.js +297 -0
- package/dist/configs/vitest/scratch-owner.js.map +1 -0
- package/dist/configs/vitest/scratch-route-profile.d.ts +36 -0
- package/dist/configs/vitest/scratch-route-profile.d.ts.map +1 -0
- package/dist/configs/vitest/scratch-route-profile.js +217 -0
- package/dist/configs/vitest/scratch-route-profile.js.map +1 -0
- package/dist/configs/vitest/scratch-run-root-compatibility.d.ts +33 -0
- package/dist/configs/vitest/scratch-run-root-compatibility.d.ts.map +1 -0
- package/dist/configs/vitest/scratch-run-root-compatibility.js +137 -0
- package/dist/configs/vitest/scratch-run-root-compatibility.js.map +1 -0
- package/dist/configs/vitest/scratch-run-root-intent.d.ts +66 -0
- package/dist/configs/vitest/scratch-run-root-intent.d.ts.map +1 -0
- package/dist/configs/vitest/scratch-run-root-intent.js +183 -0
- package/dist/configs/vitest/scratch-run-root-intent.js.map +1 -0
- package/dist/configs/vitest/scratch-setup.d.ts.map +1 -1
- package/dist/configs/vitest/scratch-setup.js +45 -15
- package/dist/configs/vitest/scratch-setup.js.map +1 -1
- package/dist/configs/vitest/scratch-supervision-intent.d.ts +8 -0
- package/dist/configs/vitest/scratch-supervision-intent.d.ts.map +1 -0
- package/dist/configs/vitest/scratch-supervision-intent.js +125 -0
- package/dist/configs/vitest/scratch-supervision-intent.js.map +1 -0
- package/dist/configs/vitest/scratch-supervision-protocol.d.ts +12 -0
- package/dist/configs/vitest/scratch-supervision-protocol.d.ts.map +1 -0
- package/dist/configs/vitest/scratch-supervision-protocol.js +230 -0
- package/dist/configs/vitest/scratch-supervision-protocol.js.map +1 -0
- package/dist/configs/vitest/scratch-supervision.d.ts +64 -0
- package/dist/configs/vitest/scratch-supervision.d.ts.map +1 -0
- package/dist/configs/vitest/scratch-supervision.js +209 -0
- package/dist/configs/vitest/scratch-supervision.js.map +1 -0
- package/dist/configs/vitest/scratch-sweep.d.ts +66 -0
- package/dist/configs/vitest/scratch-sweep.d.ts.map +1 -0
- package/dist/configs/vitest/scratch-sweep.js +82 -0
- package/dist/configs/vitest/scratch-sweep.js.map +1 -0
- package/dist/configs/vitest/scratch.d.ts +14 -187
- package/dist/configs/vitest/scratch.d.ts.map +1 -1
- package/dist/configs/vitest/scratch.js +18 -285
- package/dist/configs/vitest/scratch.js.map +1 -1
- package/dist/configs/vitest/typescript.d.ts.map +1 -1
- package/dist/configs/vitest/typescript.js +1 -0
- package/dist/configs/vitest/typescript.js.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.js +4 -0
- package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +59 -13
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/expo/package-lisa/package.lisa.json +14 -14
- package/harper-fabric/package-lisa/package.lisa.json +8 -3
- package/nestjs/create-only/vitest.config.local.ts +5 -1
- package/nestjs/package-lisa/package.lisa.json +14 -8
- package/npm-package/package-lisa/package.lisa.json +8 -0
- package/package.json +17 -13
- package/phaser/package-lisa/package.lisa.json +9 -3
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/hooks/sonar-secrets.sh +3 -2
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/hooks/sonar-secrets.sh +3 -2
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/hooks/sonar-secrets.sh +3 -2
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/src/base/hooks/sonar-secrets.sh +3 -2
- package/typescript/create-only/vitest.config.local.ts +5 -1
- package/typescript/package-lisa/package.lisa.json +14 -8
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import { env } from "node:process";
|
|
2
|
+
import { openOwnedScratchRunRoot, prepareOwnedScratchRunRoot, removeOwnedScratchRunRoot, } from "../configs/vitest/scratch.js";
|
|
3
|
+
import { readBoundedScratchNames, removeAuthorizedScratchChildren, } from "../configs/vitest/scratch-authority.js";
|
|
4
|
+
import { SCRATCH_OWNER_FILE } from "../configs/vitest/scratch-owner.js";
|
|
5
|
+
import { processBirthFingerprint } from "../configs/vitest/scratch-owner.js";
|
|
6
|
+
import { SCRATCH_SUPERVISION_LEASE_ENV, createScratchSupervisionLease, } from "../configs/vitest/scratch-supervision.js";
|
|
7
|
+
import { sendMessage, stopBootstrap, waitForExit, waitForMessage, waitForPayload, } from "./lisa-test-run-ipc.js";
|
|
8
|
+
import { assertTestRunPlatform } from "./lisa-test-run-process-group.js";
|
|
9
|
+
import { FORWARDED_SIGNALS, createSignalEscalation, drainSupervisedTarget, forkDetachedSibling, payloadEnvironment, rejectOnReaperExit, } from "./lisa-test-run-runtime.js";
|
|
10
|
+
/** Private deterministic protocol-fault seam, never inherited by the payload. */
|
|
11
|
+
const TEST_FAULT_ENV = "LISA_TEST_RUN_TEST_FAULT";
|
|
12
|
+
/**
|
|
13
|
+
* Prepare the immutable root intent before starting protocol companions.
|
|
14
|
+
* @param profile - Frozen wrapper route profile
|
|
15
|
+
* @returns Immutable root intent
|
|
16
|
+
*/
|
|
17
|
+
function prepareIntent(profile) {
|
|
18
|
+
return prepareOwnedScratchRunRoot(env[TEST_FAULT_ENV] === "birth-unavailable-on-prepare"
|
|
19
|
+
? {
|
|
20
|
+
platform: process.platform,
|
|
21
|
+
processBirthFingerprint: () => undefined,
|
|
22
|
+
suiteLabel: profile.suiteLabel,
|
|
23
|
+
registeredPrefixes: profile.registeredPrefixes,
|
|
24
|
+
}
|
|
25
|
+
: {
|
|
26
|
+
suiteLabel: profile.suiteLabel,
|
|
27
|
+
registeredPrefixes: profile.registeredPrefixes,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Arm both companions and materialize only after root/target acknowledgements.
|
|
32
|
+
* @param state - One foreground supervision state
|
|
33
|
+
*/
|
|
34
|
+
async function armAuthorities(state) {
|
|
35
|
+
await waitForMessage(state.reaper, "REAPER_READY");
|
|
36
|
+
const bootstrap = forkDetachedSibling("lisa-test-run-bootstrap");
|
|
37
|
+
// eslint-disable-next-line functional/immutable-data -- companion handle captured once
|
|
38
|
+
state.bootstrap = bootstrap;
|
|
39
|
+
await waitForMessage(bootstrap, "BOOTSTRAP_READY");
|
|
40
|
+
const birth = processBirthFingerprint(bootstrap.pid ?? 0);
|
|
41
|
+
if (bootstrap.pid === undefined || birth === undefined) {
|
|
42
|
+
throw new Error("Could not bind bootstrap process birth");
|
|
43
|
+
}
|
|
44
|
+
const target = {
|
|
45
|
+
pid: bootstrap.pid,
|
|
46
|
+
pgid: bootstrap.pid,
|
|
47
|
+
processBirthFingerprint: birth,
|
|
48
|
+
};
|
|
49
|
+
// eslint-disable-next-line functional/immutable-data -- target authority captured once
|
|
50
|
+
state.target = target;
|
|
51
|
+
const rootAck = waitForMessage(state.reaper, "ROOT_INTENT_ARMED", state.intent.token);
|
|
52
|
+
await sendMessage(state.reaper, {
|
|
53
|
+
type: "ROOT_INTENT",
|
|
54
|
+
correlation: state.intent.token,
|
|
55
|
+
intent: state.intent,
|
|
56
|
+
});
|
|
57
|
+
await rootAck;
|
|
58
|
+
const targetAck = waitForMessage(state.reaper, "TARGET_ARMED", state.intent.token);
|
|
59
|
+
await sendMessage(state.reaper, {
|
|
60
|
+
type: "TARGET_INTENT",
|
|
61
|
+
correlation: state.intent.token,
|
|
62
|
+
target,
|
|
63
|
+
});
|
|
64
|
+
await targetAck;
|
|
65
|
+
const rootArmed = waitForMessage(state.reaper, "ROOT_ARMED", state.intent.token);
|
|
66
|
+
await sendMessage(state.reaper, {
|
|
67
|
+
type: "MATERIALIZE_ROOT",
|
|
68
|
+
correlation: state.intent.token,
|
|
69
|
+
});
|
|
70
|
+
const acknowledgement = await rootArmed;
|
|
71
|
+
const opened = openOwnedScratchRunRoot(state.intent);
|
|
72
|
+
const acknowledgedRoot = acknowledgement["root"];
|
|
73
|
+
if (opened === undefined ||
|
|
74
|
+
acknowledgedRoot?.canonicalPath !== opened.owner.root.canonicalPath ||
|
|
75
|
+
acknowledgedRoot.dev !== opened.owner.root.dev ||
|
|
76
|
+
acknowledgedRoot.ino !== opened.owner.root.ino) {
|
|
77
|
+
throw new Error("Detached reaper acknowledged a different scratch root identity");
|
|
78
|
+
}
|
|
79
|
+
// eslint-disable-next-line functional/immutable-data -- exact materialization acknowledgement transition
|
|
80
|
+
state.rootMaterialized = true;
|
|
81
|
+
if (env[TEST_FAULT_ENV] === "kill-reaper-after-root") {
|
|
82
|
+
state.reaper.kill("SIGKILL");
|
|
83
|
+
await waitForExit(state.reaper);
|
|
84
|
+
throw new Error("Detached reaper exited after root materialization");
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Send one immutable command after root and target authority are armed.
|
|
89
|
+
* @param state - One foreground supervision state
|
|
90
|
+
* @param argv - Exact payload argv
|
|
91
|
+
* @param profile - Frozen wrapper route profile
|
|
92
|
+
* @param adapter - Explicit payload delivery adapter
|
|
93
|
+
*/
|
|
94
|
+
async function configurePayload(state, argv, profile, adapter) {
|
|
95
|
+
if (state.bootstrap === undefined)
|
|
96
|
+
throw new Error("Bootstrap is not armed");
|
|
97
|
+
const lease = createScratchSupervisionLease(state.intent, {
|
|
98
|
+
suiteLabel: state.intent.suiteLabel,
|
|
99
|
+
registeredPrefixes: state.intent.registeredPrefixes,
|
|
100
|
+
});
|
|
101
|
+
const command = {
|
|
102
|
+
schema: 1,
|
|
103
|
+
argv,
|
|
104
|
+
env: payloadEnvironment(JSON.stringify(lease), profile, adapter === "direct" ? state.intent.rootPath : undefined),
|
|
105
|
+
};
|
|
106
|
+
if (adapter === "direct") {
|
|
107
|
+
// eslint-disable-next-line functional/immutable-data -- immutable invocation snapshot captured once
|
|
108
|
+
state.directBaseline = new Set(readBoundedScratchNames(state.intent.rootPath));
|
|
109
|
+
}
|
|
110
|
+
const commandReady = waitForMessage(state.bootstrap, "COMMAND_READY");
|
|
111
|
+
await sendMessage(state.bootstrap, { type: "COMMAND", command });
|
|
112
|
+
await commandReady;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Attribute and remove direct-adapter scratch additions after the payload drains.
|
|
116
|
+
* @param state - One foreground supervision state
|
|
117
|
+
*/
|
|
118
|
+
function auditDirectScratch(state) {
|
|
119
|
+
if (state.directBaseline === undefined)
|
|
120
|
+
return;
|
|
121
|
+
const opened = openOwnedScratchRunRoot(state.intent);
|
|
122
|
+
if (opened === undefined) {
|
|
123
|
+
throw new Error("Direct scratch root disappeared before invocation audit");
|
|
124
|
+
}
|
|
125
|
+
const additions = readBoundedScratchNames(opened.path).filter(name => name !== SCRATCH_OWNER_FILE && !state.directBaseline?.has(name));
|
|
126
|
+
const unregistered = additions.filter(name => !opened.owner.registeredPrefixes.some(prefix => name.startsWith(prefix)));
|
|
127
|
+
removeAuthorizedScratchChildren({
|
|
128
|
+
parent: opened.owner.root,
|
|
129
|
+
basenames: additions,
|
|
130
|
+
});
|
|
131
|
+
if (unregistered.length > 0) {
|
|
132
|
+
const names = [...unregistered].sort((left, right) => left === right ? 0 : left < right ? -1 : 1);
|
|
133
|
+
throw new Error(`Suite ${opened.owner.suiteLabel} leaked ${String(names.length)} unregistered direct scratch fixture(s): ${names.join(", ")}`);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Report a cleanup verdict without replacing an already-failing payload.
|
|
138
|
+
* @param error - Secondary direct-audit failure
|
|
139
|
+
*/
|
|
140
|
+
function reportPreservedAuditFailure(error) {
|
|
141
|
+
process.stderr.write(`lisa-test-run direct scratch audit also failed: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Execute the armed payload while retaining the first forwarded signal.
|
|
145
|
+
* @param state - One foreground supervision state
|
|
146
|
+
* @returns Exact payload outcome
|
|
147
|
+
*/
|
|
148
|
+
async function executePayload(state) {
|
|
149
|
+
const bootstrap = state.bootstrap;
|
|
150
|
+
const target = state.target;
|
|
151
|
+
if (bootstrap === undefined || target === undefined) {
|
|
152
|
+
throw new Error("Payload authority is not fully armed");
|
|
153
|
+
}
|
|
154
|
+
const escalation = createSignalEscalation(target);
|
|
155
|
+
// eslint-disable-next-line functional/immutable-data -- cancellable handle scoped to this run
|
|
156
|
+
state.signalEscalation = escalation;
|
|
157
|
+
for (const signal of FORWARDED_SIGNALS) {
|
|
158
|
+
// Persistent, not `once`. A one-shot listener is removed the first time it
|
|
159
|
+
// fires, and Node restores that signal's DEFAULT disposition the moment its
|
|
160
|
+
// last listener goes. A second delivery of the same signal during the grace
|
|
161
|
+
// window then kills this process outright — skipping the scratch removal
|
|
162
|
+
// this supervisor exists to guarantee. Ctrl-C pressed twice, or a scheduler
|
|
163
|
+
// that re-sends SIGTERM, is the ordinary case. The `finally` in
|
|
164
|
+
// superviseTestRun removes every one of these before the outcome is
|
|
165
|
+
// re-raised, so staying armed costs nothing.
|
|
166
|
+
process.on(signal, () => {
|
|
167
|
+
if (state.forwardedSignal !== undefined)
|
|
168
|
+
return;
|
|
169
|
+
// eslint-disable-next-line functional/immutable-data -- first observed terminal signal is preserved
|
|
170
|
+
state.forwardedSignal = signal;
|
|
171
|
+
void sendMessage(bootstrap, { type: "SIGNAL", signal }).catch(() => undefined);
|
|
172
|
+
escalation.begin(signal);
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
const outcomePromise = waitForPayload(bootstrap, () => state.forwardedSignal !== undefined);
|
|
176
|
+
await sendMessage(bootstrap, { type: "GO" });
|
|
177
|
+
if (env[TEST_FAULT_ENV] === "kill-reaper-after-go") {
|
|
178
|
+
state.reaper.kill("SIGKILL");
|
|
179
|
+
}
|
|
180
|
+
return await Promise.race([
|
|
181
|
+
outcomePromise,
|
|
182
|
+
rejectOnReaperExit(state.reaper),
|
|
183
|
+
escalation.promise,
|
|
184
|
+
]);
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Drain, clean, and disarm after one payload result.
|
|
188
|
+
* @param state - One foreground supervision state
|
|
189
|
+
* @param outcome - Exact payload outcome
|
|
190
|
+
* @returns Outcome after cleanup and disarm
|
|
191
|
+
*/
|
|
192
|
+
async function finishSuccess(state, outcome) {
|
|
193
|
+
state.signalEscalation?.cancel();
|
|
194
|
+
await drainSupervisedTarget(state.target);
|
|
195
|
+
if (state.bootstrap !== undefined)
|
|
196
|
+
await stopBootstrap(state.bootstrap);
|
|
197
|
+
try {
|
|
198
|
+
auditDirectScratch(state);
|
|
199
|
+
}
|
|
200
|
+
catch (error) {
|
|
201
|
+
if (outcome.code === 0 && outcome.signal === null)
|
|
202
|
+
throw error;
|
|
203
|
+
reportPreservedAuditFailure(error);
|
|
204
|
+
}
|
|
205
|
+
removeOwnedScratchRunRoot(state.intent);
|
|
206
|
+
// eslint-disable-next-line code-organization/enforce-statement-order -- disarm is meaningful only after foreground removal
|
|
207
|
+
const disarmedAck = waitForMessage(state.reaper, "DISARMED");
|
|
208
|
+
await sendMessage(state.reaper, { type: "CLEANED" });
|
|
209
|
+
await disarmedAck;
|
|
210
|
+
await waitForExit(state.reaper);
|
|
211
|
+
// eslint-disable-next-line functional/immutable-data -- terminal verified state
|
|
212
|
+
state.disarmed = true;
|
|
213
|
+
return state.forwardedSignal === undefined
|
|
214
|
+
? outcome
|
|
215
|
+
: { code: null, signal: state.forwardedSignal };
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Best-effort foreground cleanup that never hides a drain authority failure.
|
|
219
|
+
* @param state - One foreground supervision state
|
|
220
|
+
*/
|
|
221
|
+
async function cleanupFailure(state) {
|
|
222
|
+
await drainSupervisedTarget(state.target);
|
|
223
|
+
if (state.bootstrap !== undefined) {
|
|
224
|
+
try {
|
|
225
|
+
await stopBootstrap(state.bootstrap);
|
|
226
|
+
}
|
|
227
|
+
catch {
|
|
228
|
+
state.bootstrap.kill("SIGKILL");
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
if (state.rootMaterialized)
|
|
232
|
+
removeOwnedScratchRunRoot(state.intent);
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Arm and execute one supervised command.
|
|
236
|
+
* @param argv - Exact payload argv
|
|
237
|
+
* @param profile - Frozen wrapper route profile
|
|
238
|
+
* @param adapter - Explicit payload delivery adapter
|
|
239
|
+
* @returns Payload outcome after proven cleanup
|
|
240
|
+
*/
|
|
241
|
+
export async function superviseTestRun(argv, profile, adapter) {
|
|
242
|
+
assertTestRunPlatform();
|
|
243
|
+
delete env[SCRATCH_SUPERVISION_LEASE_ENV];
|
|
244
|
+
// eslint-disable-next-line code-organization/enforce-statement-order -- inherited authority must be cleared before intent preparation
|
|
245
|
+
const state = {
|
|
246
|
+
intent: prepareIntent(profile),
|
|
247
|
+
reaper: forkDetachedSibling("lisa-test-run-reaper"),
|
|
248
|
+
rootMaterialized: false,
|
|
249
|
+
disarmed: false,
|
|
250
|
+
};
|
|
251
|
+
try {
|
|
252
|
+
await armAuthorities(state);
|
|
253
|
+
await configurePayload(state, argv, profile, adapter);
|
|
254
|
+
return await finishSuccess(state, await executePayload(state));
|
|
255
|
+
}
|
|
256
|
+
catch (error) {
|
|
257
|
+
await cleanupFailure(state);
|
|
258
|
+
throw error;
|
|
259
|
+
}
|
|
260
|
+
finally {
|
|
261
|
+
for (const signal of FORWARDED_SIGNALS)
|
|
262
|
+
process.removeAllListeners(signal);
|
|
263
|
+
state.signalEscalation?.cancel();
|
|
264
|
+
if (!state.disarmed && state.reaper.connected)
|
|
265
|
+
state.reaper.disconnect();
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
//# sourceMappingURL=lisa-test-run-supervisor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lisa-test-run-supervisor.js","sourceRoot":"","sources":["../../src/cli/lisa-test-run-supervisor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GA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C,SAAS;YAAE,KAAK,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;IAC3E,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lisa-test-run.d.ts","sourceRoot":"","sources":["../../src/cli/lisa-test-run.ts"],"names":[],"mappings":";AAcA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/** Public entrypoint for birth-bound test supervision and scratch cleanup. */
|
|
3
|
+
// @ts-expect-error -- the shipped JavaScript helper carries the same checked JSDoc signature
|
|
4
|
+
import { invokedAsScript } from "../../scripts/lib/invoked-as-script.mjs";
|
|
5
|
+
import { resolveScratchRouteProfile, } from "../configs/vitest/scratch-route-profile.js";
|
|
6
|
+
import { superviseTestRun, } from "./lisa-test-run-supervisor.js";
|
|
7
|
+
export { assertTestRunPlatform } from "./lisa-test-run-process-group.js";
|
|
8
|
+
/** Dedicated operational-failure exit status. */
|
|
9
|
+
const OPERATIONAL_FAILURE_EXIT = 1;
|
|
10
|
+
/**
|
|
11
|
+
* Parse the exact public `--profile <route> --adapter <kind> -- <command>` syntax.
|
|
12
|
+
* @param argv - Public CLI arguments
|
|
13
|
+
* @returns Validated route profile and payload argv
|
|
14
|
+
*/
|
|
15
|
+
function commandArgv(argv) {
|
|
16
|
+
if (argv[0] !== "--profile" ||
|
|
17
|
+
argv[1] === undefined ||
|
|
18
|
+
argv[2] !== "--adapter" ||
|
|
19
|
+
(argv[3] !== "vitest" && argv[3] !== "direct") ||
|
|
20
|
+
argv[4] !== "--" ||
|
|
21
|
+
argv.length < 6 ||
|
|
22
|
+
argv[5] === undefined) {
|
|
23
|
+
throw new Error("Usage: lisa-test-run --profile <route> --adapter vitest|direct -- <executable> [args...]");
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
profile: resolveScratchRouteProfile(argv[1]),
|
|
27
|
+
adapter: argv[3],
|
|
28
|
+
argv: argv.slice(5),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Parse public input or emit the usage verdict without starting companions.
|
|
33
|
+
* @returns Validated invocation or undefined after a usage verdict
|
|
34
|
+
*/
|
|
35
|
+
function invocationOrExit() {
|
|
36
|
+
try {
|
|
37
|
+
return commandArgv(process.argv.slice(2));
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
process.stderr.write(`${error.message}\n`);
|
|
41
|
+
process.exitCode = 2;
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/** Run the public CLI and preserve the child result only after cleanup. */
|
|
46
|
+
async function main() {
|
|
47
|
+
const invocation = invocationOrExit();
|
|
48
|
+
if (invocation === undefined)
|
|
49
|
+
return;
|
|
50
|
+
try {
|
|
51
|
+
const outcome = await superviseTestRun(invocation.argv, invocation.profile, invocation.adapter);
|
|
52
|
+
if (outcome.signal !== null) {
|
|
53
|
+
process.removeAllListeners(outcome.signal);
|
|
54
|
+
process.kill(process.pid, outcome.signal);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
process.exit(outcome.code ?? OPERATIONAL_FAILURE_EXIT);
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
process.stderr.write(`lisa-test-run failed: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
61
|
+
process.exit(OPERATIONAL_FAILURE_EXIT);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
if (invokedAsScript(import.meta.url))
|
|
65
|
+
void main();
|
|
66
|
+
//# sourceMappingURL=lisa-test-run.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lisa-test-run.js","sourceRoot":"","sources":["../../src/cli/lisa-test-run.ts"],"names":[],"mappings":";AACA,8EAA8E;AAC9E,6FAA6F;AAC7F,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAE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AkB,IAAI,SAAS,MAAM,EAAE,CAItD;AAoBD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,IAAI,SAAS,MAAM,EAAE,CAKrD;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,SAAS,MAAM,EAAE,CAEtD;AAED;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,GACxB,YAAY,kBAAkB,KAC7B,gBAaD,CAAC;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,eAAe,GAC1B,UAAU,kBAAkB,EAC5B,WAAW,kBAAkB,KAC5B,kBAiBF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAAI,GAAG,SAAS,UAAU,EAAE,KAAG,UA4C7D,CAAC"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* project-specific vitest.config.ts files. Reduces duplication between
|
|
6
6
|
* typescript, nestjs, and other project type configurations.
|
|
7
7
|
*
|
|
8
|
-
* Published as part of the
|
|
8
|
+
* Published as part of the `@codyswann/lisa` npm package so downstream
|
|
9
9
|
* projects can import these utilities directly from the package.
|
|
10
10
|
* @see https://vitest.dev/config/
|
|
11
11
|
* @module configs/vitest/base
|
|
@@ -112,7 +112,10 @@ const resolveScratchModule = (basename) => {
|
|
|
112
112
|
* @see {@link module:configs/vitest/scratch} for the measurements behind this
|
|
113
113
|
*/
|
|
114
114
|
export function scratchSetupFiles() {
|
|
115
|
-
return [
|
|
115
|
+
return [
|
|
116
|
+
resolveScratchModule("scratch-setup"),
|
|
117
|
+
resolveScratchModule("scratch-leak-setup"),
|
|
118
|
+
];
|
|
116
119
|
}
|
|
117
120
|
/**
|
|
118
121
|
* Global setup that reclaims residue before a run and audits the namespace after it.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../src/configs/vitest/base.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,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M,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;YACpC,CAAC,CAAC,OAAO,MAAM,KAAK,QAAQ;gBACxB,MAAM,KAAK,IAAI;gBACf,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;gBACtB,OAAO,IAAI,KAAK,QAAQ;gBACxB,IAAI,KAAK,IAAI;gBACb,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;gBACtB,CAAC,CAAC;oBACE,GAAI,MAAkC;oBACtC,GAAI,IAAgC;iBACrC;gBACH,CAAC,CAAC,IAAI,CAAC;QAEb,OAAO,EAAE,GAAG,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACnC,CAAC,EACD,EAAE,GAAG,CAAC,EAAE,CACT,CAAC;IAEJ,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE;QACpC,MAAM,OAAO,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAA4B,CAAC;QAC5D,MAAM,UAAU,GAAG,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAA4B,CAAC;QAElE,OAAO;YACL,GAAG,GAAG;YACN,GAAG,MAAM;YACT,IAAI,EAAE,YAAY,CAAC,OAAO,EAAE,UAAU,CAAC;SACxC,CAAC;IACJ,CAAC,EAAE,EAAgB,CAAC,CAAC;AACvB,CAAC,CAAC"}
|
|
@@ -15,6 +15,10 @@ import type { ViteUserConfig } from "vitest/config";
|
|
|
15
15
|
type UserConfig = ViteUserConfig;
|
|
16
16
|
import { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, scratchGlobalSetup, scratchSetupFiles } from "./base.js";
|
|
17
17
|
import type { PortableThresholds } from "./base.js";
|
|
18
|
+
/** Prefix used by AWS CDK's default CloudAssemblyBuilder output directory. */
|
|
19
|
+
export declare const CDK_SCRATCH_PREFIX = "cdk.out";
|
|
20
|
+
/** Opaque owner label recorded before a CDK suite is collected. */
|
|
21
|
+
export declare const CDK_SCRATCH_SUITE = "cdk";
|
|
18
22
|
export { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, scratchGlobalSetup, scratchSetupFiles, };
|
|
19
23
|
export type { PortableThresholds };
|
|
20
24
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdk.d.ts","sourceRoot":"","sources":["../../../src/configs/vitest/cdk.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,8DAA8D;AAC9D,KAAK,UAAU,GAAG,cAAc,CAAC;AAEjC,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"cdk.d.ts","sourceRoot":"","sources":["../../../src/configs/vitest/cdk.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,8DAA8D;AAC9D,KAAK,UAAU,GAAG,cAAc,CAAC;AAEjC,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEpD,8EAA8E;AAC9E,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAE5C,mEAAmE;AACnE,eAAO,MAAM,iBAAiB,QAAQ,CAAC;AAGvC,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,GAClB,CAAC;AAEF,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC;;GAEG;AACH,UAAU,gBAAgB;IACxB,mFAAmF;IACnF,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;CAC1C;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,GAAI,kBAEhC,gBAAqB,KAAG,UA0BzB,CAAC"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, scratchGlobalSetup, scratchSetupFiles, } from "./base.js";
|
|
2
|
+
/** Prefix used by AWS CDK's default CloudAssemblyBuilder output directory. */
|
|
3
|
+
export const CDK_SCRATCH_PREFIX = "cdk.out";
|
|
4
|
+
/** Opaque owner label recorded before a CDK suite is collected. */
|
|
5
|
+
export const CDK_SCRATCH_SUITE = "cdk";
|
|
2
6
|
// Re-export base utilities for entry-point configs
|
|
3
7
|
export { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, scratchGlobalSetup, scratchSetupFiles, };
|
|
4
8
|
/**
|
|
@@ -16,6 +20,7 @@ export const getCdkVitestConfig = ({ thresholds, } = {}) => ({
|
|
|
16
20
|
test: {
|
|
17
21
|
setupFiles: [...scratchSetupFiles()],
|
|
18
22
|
globalSetup: [...scratchGlobalSetup()],
|
|
23
|
+
sequence: { setupFiles: "list", hooks: "stack" },
|
|
19
24
|
globals: true,
|
|
20
25
|
environment: "node",
|
|
21
26
|
include: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdk.js","sourceRoot":"","sources":["../../../src/configs/vitest/cdk.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,WAAW,CAAC;AAInB,mDAAmD;AACnD,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,GAClB,CAAC;AAYF;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EACjC,UAAU,MACU,EAAE,EAAc,EAAE,CAAC,CAAC;IACxC,IAAI,EAAE;QACJ,UAAU,EAAE,CAAC,GAAG,iBAAiB,EAAE,CAAC;QACpC,WAAW,EAAE,CAAC,GAAG,kBAAkB,EAAE,CAAC;QACtC,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,MAAM;QACnB,OAAO,EAAE;YACP,mBAAmB;YACnB,mBAAmB;YACnB,+BAA+B;YAC/B,+BAA+B;SAChC;QACD,OAAO,EAAE,CAAC,GAAG,qBAAqB,CAAC;QACnC,WAAW,EAAE,KAAK;QAClB,QAAQ,EAAE;YACR,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,CAAC,aAAa,EAAE,cAAc,CAAC;YACxC,OAAO,EAAE,CAAC,GAAG,yBAAyB,CAAC;YACvC,UAAU,EAAE,aAAa,CACvB,UAAU;gBACR,CAAC,CAAC,eAAe,CAAC,iBAAiB,EAAE,UAAU,CAAC;gBAChD,CAAC,CAAC,iBAAiB,CACtB;SACF;KACF;CACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"cdk.js","sourceRoot":"","sources":["../../../src/configs/vitest/cdk.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,WAAW,CAAC;AAInB,8EAA8E;AAC9E,MAAM,CAAC,MAAM,kBAAkB,GAAG,SAAS,CAAC;AAE5C,mEAAmE;AACnE,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC;AAEvC,mDAAmD;AACnD,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,GAClB,CAAC;AAYF;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EACjC,UAAU,MACU,EAAE,EAAc,EAAE,CAAC,CAAC;IACxC,IAAI,EAAE;QACJ,UAAU,EAAE,CAAC,GAAG,iBAAiB,EAAE,CAAC;QACpC,WAAW,EAAE,CAAC,GAAG,kBAAkB,EAAE,CAAC;QACtC,QAAQ,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE;QAChD,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,MAAM;QACnB,OAAO,EAAE;YACP,mBAAmB;YACnB,mBAAmB;YACnB,+BAA+B;YAC/B,+BAA+B;SAChC;QACD,OAAO,EAAE,CAAC,GAAG,qBAAqB,CAAC;QACnC,WAAW,EAAE,KAAK;QAClB,QAAQ,EAAE;YACR,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,CAAC,aAAa,EAAE,cAAc,CAAC;YACxC,OAAO,EAAE,CAAC,GAAG,yBAAyB,CAAC;YACvC,UAAU,EAAE,aAAa,CACvB,UAAU;gBACR,CAAC,CAAC,eAAe,CAAC,iBAAiB,EAAE,UAAU,CAAC;gBAChD,CAAC,CAAC,iBAAiB,CACtB;SACF;KACF;CACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harper-fabric.d.ts","sourceRoot":"","sources":["../../../src/configs/vitest/harper-fabric.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEpD,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,GAClB,CAAC;AAEF,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC;;GAEG;AACH,UAAU,yBAAyB;IACjC,6CAA6C;IAC7C,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;CAC1C;AAED;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,GAAI,kBAEzC,yBAA8B,KAAG,
|
|
1
|
+
{"version":3,"file":"harper-fabric.d.ts","sourceRoot":"","sources":["../../../src/configs/vitest/harper-fabric.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEpD,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,GAClB,CAAC;AAEF,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC;;GAEG;AACH,UAAU,yBAAyB;IACjC,6CAA6C;IAC7C,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;CAC1C;AAED;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,GAAI,kBAEzC,yBAA8B,KAAG,cAyBlC,CAAC"}
|
|
@@ -10,6 +10,7 @@ export const getHarperFabricVitestConfig = ({ thresholds, } = {}) => ({
|
|
|
10
10
|
test: {
|
|
11
11
|
setupFiles: [...scratchSetupFiles()],
|
|
12
12
|
globalSetup: [...scratchGlobalSetup()],
|
|
13
|
+
sequence: { setupFiles: "list", hooks: "stack" },
|
|
13
14
|
globals: true,
|
|
14
15
|
environment: "node",
|
|
15
16
|
include: ["tests/**/*.test.ts", "src/**/*.test.ts"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harper-fabric.js","sourceRoot":"","sources":["../../../src/configs/vitest/harper-fabric.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,GAClB,CAAC;AAYF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,EAC1C,UAAU,MACmB,EAAE,EAAkB,EAAE,CAAC,CAAC;IACrD,IAAI,EAAE;QACJ,UAAU,EAAE,CAAC,GAAG,iBAAiB,EAAE,CAAC;QACpC,WAAW,EAAE,CAAC,GAAG,kBAAkB,EAAE,CAAC;QACtC,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,MAAM;QACnB,OAAO,EAAE,CAAC,oBAAoB,EAAE,kBAAkB,CAAC;QACnD,OAAO,EAAE,CAAC,GAAG,qBAAqB,CAAC;QACnC,WAAW,EAAE,KAAK;QAClB,QAAQ,EAAE;YACR,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,CAAC,aAAa,CAAC;YACxB,OAAO,EAAE;gBACP,GAAG,yBAAyB;gBAC5B,cAAc;gBACd,iBAAiB;aAClB;YACD,UAAU,EAAE,aAAa,CACvB,UAAU;gBACR,CAAC,CAAC,eAAe,CAAC,iBAAiB,EAAE,UAAU,CAAC;gBAChD,CAAC,CAAC,iBAAiB,CACtB;SACF;KACF;CACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"harper-fabric.js","sourceRoot":"","sources":["../../../src/configs/vitest/harper-fabric.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,GAClB,CAAC;AAYF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,EAC1C,UAAU,MACmB,EAAE,EAAkB,EAAE,CAAC,CAAC;IACrD,IAAI,EAAE;QACJ,UAAU,EAAE,CAAC,GAAG,iBAAiB,EAAE,CAAC;QACpC,WAAW,EAAE,CAAC,GAAG,kBAAkB,EAAE,CAAC;QACtC,QAAQ,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE;QAChD,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,MAAM;QACnB,OAAO,EAAE,CAAC,oBAAoB,EAAE,kBAAkB,CAAC;QACnD,OAAO,EAAE,CAAC,GAAG,qBAAqB,CAAC;QACnC,WAAW,EAAE,KAAK;QAClB,QAAQ,EAAE;YACR,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,CAAC,aAAa,CAAC;YACxB,OAAO,EAAE;gBACP,GAAG,yBAAyB;gBAC5B,cAAc;gBACd,iBAAiB;aAClB;YACD,UAAU,EAAE,aAAa,CACvB,UAAU;gBACR,CAAC,CAAC,eAAe,CAAC,iBAAiB,EAAE,UAAU,CAAC;gBAChD,CAAC,CAAC,iBAAiB,CACtB;SACF;KACF;CACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nestjs.d.ts","sourceRoot":"","sources":["../../../src/configs/vitest/nestjs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,8DAA8D;AAC9D,KAAK,UAAU,GAAG,cAAc,CAAC;AAEjC,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAGpD,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB,CAAC;AAEF,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC;;GAEG;AACH,UAAU,mBAAmB;IAC3B,mFAAmF;IACnF,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;CAC1C;AAwBD;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,GAAI,kBAEnC,mBAAwB,KAAG,
|
|
1
|
+
{"version":3,"file":"nestjs.d.ts","sourceRoot":"","sources":["../../../src/configs/vitest/nestjs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,8DAA8D;AAC9D,KAAK,UAAU,GAAG,cAAc,CAAC;AAEjC,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAGpD,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB,CAAC;AAEF,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC;;GAEG;AACH,UAAU,mBAAmB;IAC3B,mFAAmF;IACnF,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;CAC1C;AAwBD;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,GAAI,kBAEnC,mBAAwB,KAAG,UAkB5B,CAAC"}
|
|
@@ -36,6 +36,7 @@ export const getNestjsVitestConfig = ({ thresholds = defaultThresholds, } = {})
|
|
|
36
36
|
test: {
|
|
37
37
|
setupFiles: [...scratchSetupFiles()],
|
|
38
38
|
globalSetup: [...scratchGlobalSetup()],
|
|
39
|
+
sequence: { setupFiles: "list", hooks: "stack" },
|
|
39
40
|
globals: true,
|
|
40
41
|
environment: "node",
|
|
41
42
|
root: "src",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nestjs.js","sourceRoot":"","sources":["../../../src/configs/vitest/nestjs.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,WAAW,CAAC;AAInB,mDAAmD;AACnD,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB,CAAC;AAYF;;;GAGG;AACH,MAAM,wBAAwB,GAAsB;IAClD,GAAG,yBAAyB;IAC5B,gBAAgB;IAChB,aAAa;IACb,eAAe;IACf,cAAc;IACd,eAAe;IACf,gBAAgB;IAChB,iBAAiB;IACjB,cAAc;IACd,mBAAmB;IACnB,mBAAmB;IACnB,2BAA2B;IAC3B,sBAAsB;IACtB,eAAe;IACf,YAAY;CACb,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EACpC,UAAU,GAAG,iBAAiB,MACP,EAAE,EAAc,EAAE,CAAC,CAAC;IAC3C,IAAI,EAAE;QACJ,UAAU,EAAE,CAAC,GAAG,iBAAiB,EAAE,CAAC;QACpC,WAAW,EAAE,CAAC,GAAG,kBAAkB,EAAE,CAAC;QACtC,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,CAAC,cAAc,CAAC;QACzB,OAAO,EAAE,CAAC,GAAG,qBAAqB,EAAE,GAAG,kBAAkB,EAAE,CAAC;QAC5D,WAAW,EAAE,KAAK;QAClB,QAAQ,EAAE;YACR,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,CAAC,SAAS,CAAC;YACpB,OAAO,EAAE,CAAC,GAAG,wBAAwB,EAAE,GAAG,kBAAkB,EAAE,CAAC;YAC/D,UAAU,EAAE,aAAa,CAAC,UAAU,CAAC;SACtC;KACF;CACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"nestjs.js","sourceRoot":"","sources":["../../../src/configs/vitest/nestjs.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,WAAW,CAAC;AAInB,mDAAmD;AACnD,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB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,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEpD,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,GAClB,CAAC;AAEF,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC;;GAEG;AACH,UAAU,mBAAmB;IAC3B,6CAA6C;IAC7C,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;CAC1C;AAED;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAAI,kBAEnC,mBAAwB,KAAG,
|
|
1
|
+
{"version":3,"file":"phaser.d.ts","sourceRoot":"","sources":["../../../src/configs/vitest/phaser.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEpD,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,GAClB,CAAC;AAEF,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC;;GAEG;AACH,UAAU,mBAAmB;IAC3B,6CAA6C;IAC7C,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;CAC1C;AAED;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAAI,kBAEnC,mBAAwB,KAAG,cA4B5B,CAAC"}
|
|
@@ -10,6 +10,7 @@ export const getPhaserVitestConfig = ({ thresholds, } = {}) => ({
|
|
|
10
10
|
test: {
|
|
11
11
|
setupFiles: [...scratchSetupFiles()],
|
|
12
12
|
globalSetup: [...scratchGlobalSetup()],
|
|
13
|
+
sequence: { setupFiles: "list", hooks: "stack" },
|
|
13
14
|
globals: true,
|
|
14
15
|
environment: "node",
|
|
15
16
|
include: ["tests/**/*.test.ts", "src/**/*.test.ts"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phaser.js","sourceRoot":"","sources":["../../../src/configs/vitest/phaser.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,GAClB,CAAC;AAYF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EACpC,UAAU,MACa,EAAE,EAAkB,EAAE,CAAC,CAAC;IAC/C,IAAI,EAAE;QACJ,UAAU,EAAE,CAAC,GAAG,iBAAiB,EAAE,CAAC;QACpC,WAAW,EAAE,CAAC,GAAG,kBAAkB,EAAE,CAAC;QACtC,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,MAAM;QACnB,OAAO,EAAE,CAAC,oBAAoB,EAAE,kBAAkB,CAAC;QACnD,OAAO,EAAE,CAAC,GAAG,qBAAqB,EAAE,cAAc,CAAC;QACnD,WAAW,EAAE,KAAK;QAClB,QAAQ,EAAE;YACR,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,CAAC,aAAa,CAAC;YACxB,OAAO,EAAE;gBACP,GAAG,yBAAyB;gBAC5B,cAAc;gBACd,aAAa;gBACb,eAAe;gBACf,iBAAiB;gBACjB,mBAAmB;aACpB;YACD,UAAU,EAAE,aAAa,CACvB,UAAU;gBACR,CAAC,CAAC,eAAe,CAAC,iBAAiB,EAAE,UAAU,CAAC;gBAChD,CAAC,CAAC,iBAAiB,CACtB;SACF;KACF;CACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"phaser.js","sourceRoot":"","sources":["../../../src/configs/vitest/phaser.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,GAClB,CAAC;AAYF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EACpC,UAAU,MACa,EAAE,EAAkB,EAAE,CAAC,CAAC;IAC/C,IAAI,EAAE;QACJ,UAAU,EAAE,CAAC,GAAG,iBAAiB,EAAE,CAAC;QACpC,WAAW,EAAE,CAAC,GAAG,kBAAkB,EAAE,CAAC;QACtC,QAAQ,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE;QAChD,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,MAAM;QACnB,OAAO,EAAE,CAAC,oBAAoB,EAAE,kBAAkB,CAAC;QACnD,OAAO,EAAE,CAAC,GAAG,qBAAqB,EAAE,cAAc,CAAC;QACnD,WAAW,EAAE,KAAK;QAClB,QAAQ,EAAE;YACR,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,CAAC,aAAa,CAAC;YACxB,OAAO,EAAE;gBACP,GAAG,yBAAyB;gBAC5B,cAAc;gBACd,aAAa;gBACb,eAAe;gBACf,iBAAiB;gBACjB,mBAAmB;aACpB;YACD,UAAU,EAAE,aAAa,CACvB,UAAU;gBACR,CAAC,CAAC,eAAe,CAAC,iBAAiB,EAAE,UAAU,CAAC;gBAChD,CAAC,CAAC,iBAAiB,CACtB;SACF;KACF;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { removeAuthorizedScratchRoot } from "./scratch-bound-root-cleanup.js";
|
|
2
|
+
/** Inputs for one authority-bound namespace sweep. */
|
|
3
|
+
export interface AuthorizedScratchSweepOptions {
|
|
4
|
+
readonly isProcessAlive: (pid: number) => boolean;
|
|
5
|
+
readonly processBirthFingerprint: (pid: number) => string | undefined;
|
|
6
|
+
readonly selfName?: string;
|
|
7
|
+
}
|
|
8
|
+
/** Names removed and preserved by one authority-bound sweep. */
|
|
9
|
+
export interface AuthorizedScratchSweepResult {
|
|
10
|
+
readonly removed: readonly string[];
|
|
11
|
+
readonly kept: readonly string[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Sweep one canonical namespace using durable owner/process-birth authority.
|
|
15
|
+
* @param options - Namespace and process probes
|
|
16
|
+
* @returns Names removed and preserved
|
|
17
|
+
*/
|
|
18
|
+
export declare function sweepAuthorizedScratchNamespace(options: AuthorizedScratchSweepOptions): AuthorizedScratchSweepResult;
|
|
19
|
+
export { BOUND_DIRECTORY_CLEANUP_PROGRAM, removeAuthorizedScratchChild, removeAuthorizedScratchChildren, } from "./scratch-bound-cleanup.js";
|
|
20
|
+
export { removeAuthorizedScratchRoot };
|
|
21
|
+
export { DEFAULT_RECLAIM_AGE_MS, MAX_SCRATCH_NAMESPACE_NAME_BYTES, MAX_SCRATCH_NAMESPACE_SCAN_ENTRIES, RUN_ROOT_PREFIX, SCRATCH_DIRECT_ENTRY_LIMIT, SCRATCH_DIRECT_NAME_BYTES, SCRATCH_QUARANTINE_PREFIX, SCRATCH_NAMESPACE, assertScratchNamespaceAuthority, collectBoundedScratchNames, collectBoundedScratchNamespaceNames, createScratchNamespaceAuthority, parseRunRootName, readBoundedScratchNames, readBoundedScratchNamespace, runRootName, scratchBaseDir, scratchNamespaceDir, } from "./scratch-namespace-authority.js";
|
|
22
|
+
export type { RemoveAuthorizedScratchChildOptions, RemoveAuthorizedScratchChildrenOptions, } from "./scratch-bound-cleanup.js";
|
|
23
|
+
export type { RemoveAuthorizedScratchRootOptions } from "./scratch-bound-root-cleanup.js";
|
|
24
|
+
export type { ScratchNamespaceAuthority, ScratchNamespaceIdentity, } from "./scratch-namespace-authority.js";
|
|
25
|
+
//# sourceMappingURL=scratch-authority.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scratch-authority.d.ts","sourceRoot":"","sources":["../../../src/configs/vitest/scratch-authority.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAE9E,sDAAsD;AACtD,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IAClD,QAAQ,CAAC,uBAAuB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACtE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,gEAAgE;AAChE,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AA+FD;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,6BAA6B,GACrC,4BAA4B,CAU9B;AAED,OAAO,EACL,+BAA+B,EAC/B,4BAA4B,EAC5B,+BAA+B,GAChC,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,2BAA2B,EAAE,CAAC;AAEvC,OAAO,EACL,sBAAsB,EACtB,gCAAgC,EAChC,kCAAkC,EACl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