@codyswann/lisa 3.58.0 → 3.59.1
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/{scripts → all/copy-overwrite/scripts}/check-conflict-markers.mjs +15 -8
- package/all/copy-overwrite/scripts/lisa-gates.mjs +1006 -14
- package/dist/cli/gate-report-upstream.d.ts +33 -4
- package/dist/cli/gate-report-upstream.d.ts.map +1 -1
- package/dist/cli/gate-report-upstream.js +69 -11
- package/dist/cli/gate-report-upstream.js.map +1 -1
- package/dist/cli/gate-report.d.ts.map +1 -1
- package/dist/cli/gate-report.js +2 -10
- package/dist/cli/gate-report.js.map +1 -1
- package/dist/configs/vitest/base.d.ts +16 -12
- package/dist/configs/vitest/base.d.ts.map +1 -1
- package/dist/configs/vitest/base.js +51 -0
- package/dist/configs/vitest/base.js.map +1 -1
- package/dist/configs/vitest/cdk.d.ts +2 -2
- package/dist/configs/vitest/cdk.d.ts.map +1 -1
- package/dist/configs/vitest/cdk.js +4 -2
- package/dist/configs/vitest/cdk.js.map +1 -1
- package/dist/configs/vitest/harper-fabric.d.ts +2 -2
- package/dist/configs/vitest/harper-fabric.d.ts.map +1 -1
- package/dist/configs/vitest/harper-fabric.js +4 -2
- package/dist/configs/vitest/harper-fabric.js.map +1 -1
- package/dist/configs/vitest/nestjs.d.ts +2 -2
- package/dist/configs/vitest/nestjs.d.ts.map +1 -1
- package/dist/configs/vitest/nestjs.js +4 -2
- package/dist/configs/vitest/nestjs.js.map +1 -1
- package/dist/configs/vitest/phaser.d.ts +2 -2
- package/dist/configs/vitest/phaser.d.ts.map +1 -1
- package/dist/configs/vitest/phaser.js +4 -2
- package/dist/configs/vitest/phaser.js.map +1 -1
- package/dist/configs/vitest/scratch-global-setup.d.ts +72 -0
- package/dist/configs/vitest/scratch-global-setup.d.ts.map +1 -0
- package/dist/configs/vitest/scratch-global-setup.js +168 -0
- package/dist/configs/vitest/scratch-global-setup.js.map +1 -0
- package/dist/configs/vitest/scratch-setup.d.ts +12 -0
- package/dist/configs/vitest/scratch-setup.d.ts.map +1 -0
- package/dist/configs/vitest/scratch-setup.js +70 -0
- package/dist/configs/vitest/scratch-setup.js.map +1 -0
- package/dist/configs/vitest/scratch.d.ts +192 -0
- package/dist/configs/vitest/scratch.d.ts.map +1 -0
- package/dist/configs/vitest/scratch.js +301 -0
- package/dist/configs/vitest/scratch.js.map +1 -0
- package/dist/configs/vitest/typescript.d.ts +2 -2
- package/dist/configs/vitest/typescript.d.ts.map +1 -1
- package/dist/configs/vitest/typescript.js +4 -2
- 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 +19 -0
- package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +23 -6
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/dist/migrations/ensure-seeded-gates.d.ts +47 -0
- package/dist/migrations/ensure-seeded-gates.d.ts.map +1 -0
- package/dist/migrations/ensure-seeded-gates.js +139 -0
- package/dist/migrations/ensure-seeded-gates.js.map +1 -0
- package/dist/migrations/index.d.ts +1 -0
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/migrations/index.js +3 -0
- package/dist/migrations/index.js.map +1 -1
- package/package.json +2 -2
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- 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-cursor/.claude-plugin/plugin.json +1 -1
- 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/typescript/copy-contents/.husky/pre-push +21 -0
- package/typescript/copy-overwrite/.prettierignore +1 -0
- package/typescript/package-lisa/package.lisa.json +1 -0
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
* unflattering.
|
|
21
21
|
* @module cli/gate-report-upstream
|
|
22
22
|
*/
|
|
23
|
+
import type { GateRegistryModule } from "./gate-report-registry.js";
|
|
23
24
|
import type { AgentHookEvidence, Finding, GateReportRow, UpstreamLimitation } from "./gate-report-types.js";
|
|
24
25
|
/** One limitation, before this report's counts are attached. */
|
|
25
26
|
interface UpstreamCatalogEntry {
|
|
@@ -32,10 +33,36 @@ interface UpstreamCatalogEntry {
|
|
|
32
33
|
/** What the count counts. */
|
|
33
34
|
readonly unit: string;
|
|
34
35
|
}
|
|
35
|
-
/** The
|
|
36
|
+
/** The moments agent hooks fire at, before and after the write. */
|
|
36
37
|
export declare const PRE_TOOL = "pre-tool";
|
|
37
|
-
|
|
38
|
+
export declare const POST_TOOL = "post-tool";
|
|
39
|
+
/**
|
|
40
|
+
* Gates the registry permits declaring at either agent-edit moment.
|
|
41
|
+
*
|
|
42
|
+
* Both moments, deliberately. The boundary is `pre-tool` before the write and
|
|
43
|
+
* `post-tool` after it, and five of the seven shipped edit scripts fire at the
|
|
44
|
+
* latter — so counting only `pre-tool` would report the whole boundary as
|
|
45
|
+
* undeclarable while most of it had just become declarable.
|
|
46
|
+
*
|
|
47
|
+
* It lives beside the two constants rather than with its caller because they
|
|
48
|
+
* are the only thing it reads, and the caller is at its line ceiling.
|
|
49
|
+
* @param registry - The shipped registry
|
|
50
|
+
* @returns How many registry entries list either tool moment
|
|
51
|
+
*/
|
|
52
|
+
export declare function toolMomentLegalGates(registry: GateRegistryModule): number;
|
|
53
|
+
/** The synthetic reason filed when no gate may be declared at those moments. */
|
|
38
54
|
export declare const PRE_TOOL_REASON = "pre-tool-not-declarable";
|
|
55
|
+
/**
|
|
56
|
+
* The synthetic reason filed once they ARE declarable and still unread.
|
|
57
|
+
*
|
|
58
|
+
* The two are deliberately separate rather than one entry with softer wording.
|
|
59
|
+
* When the registry gained `pre-tool` and `post-tool` gates the first reason
|
|
60
|
+
* stopped being true, and an entry keyed only on that would have vanished —
|
|
61
|
+
* leaving the report silent about enforcement that still consults nothing. A
|
|
62
|
+
* control that stops reporting when half its cause is fixed is the failure this
|
|
63
|
+
* whole report exists to surface, so the remaining half gets its own name.
|
|
64
|
+
*/
|
|
65
|
+
export declare const PRE_TOOL_UNWIRED_REASON = "tool-moment-not-wired";
|
|
39
66
|
/**
|
|
40
67
|
* Every machine reason that belongs to Lisa rather than to the project.
|
|
41
68
|
*
|
|
@@ -58,13 +85,15 @@ export declare function isUpstreamFinding(finding: Finding<unknown>): boolean;
|
|
|
58
85
|
* @param options - Report inputs
|
|
59
86
|
* @param options.rows - Every gate row
|
|
60
87
|
* @param options.agentHooks - Edit-time hooks proved active
|
|
61
|
-
* @param options.
|
|
88
|
+
* @param options.toolMomentLegalGates - Gates the registry permits at either
|
|
89
|
+
* tool moment. Counting only `pre-tool` would read the boundary as
|
|
90
|
+
* undeclarable while five of the seven shipped scripts fire at `post-tool`.
|
|
62
91
|
* @returns The limitations, sorted by ticket for a stable payload
|
|
63
92
|
*/
|
|
64
93
|
export declare function collectUpstream(options: {
|
|
65
94
|
rows: readonly GateReportRow[];
|
|
66
95
|
agentHooks: Finding<readonly AgentHookEvidence[]>;
|
|
67
|
-
|
|
96
|
+
toolMomentLegalGates: number;
|
|
68
97
|
}): UpstreamLimitation[];
|
|
69
98
|
export {};
|
|
70
99
|
//# sourceMappingURL=gate-report-upstream.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gate-report-upstream.d.ts","sourceRoot":"","sources":["../../src/cli/gate-report-upstream.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EACV,iBAAiB,EACjB,OAAO,EACP,aAAa,EACb,kBAAkB,EACnB,MAAM,wBAAwB,CAAC;AAEhC,gEAAgE;AAChE,UAAU,oBAAoB;IAC5B,yCAAyC;IACzC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,0CAA0C;IAC1C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,sEAAsE;IACtE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,6BAA6B;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,
|
|
1
|
+
{"version":3,"file":"gate-report-upstream.d.ts","sourceRoot":"","sources":["../../src/cli/gate-report-upstream.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EACV,iBAAiB,EACjB,OAAO,EACP,aAAa,EACb,kBAAkB,EACnB,MAAM,wBAAwB,CAAC;AAEhC,gEAAgE;AAChE,UAAU,oBAAoB;IAC5B,yCAAyC;IACzC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,0CAA0C;IAC1C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,sEAAsE;IACtE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,6BAA6B;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,mEAAmE;AACnE,eAAO,MAAM,QAAQ,aAAa,CAAC;AACnC,eAAO,MAAM,SAAS,cAAc,CAAC;AAErC;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,kBAAkB,GAAG,MAAM,CAIzE;AAED,gFAAgF;AAChF,eAAO,MAAM,eAAe,4BAA4B,CAAC;AAEzD;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,0BAA0B,CAAC;AAE/D;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CACzC,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CA0BrC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAKpE;AA8CD;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE;IACvC,IAAI,EAAE,SAAS,aAAa,EAAE,CAAC;IAC/B,UAAU,EAAE,OAAO,CAAC,SAAS,iBAAiB,EAAE,CAAC,CAAC;IAClD,oBAAoB,EAAE,MAAM,CAAC;CAC9B,GAAG,kBAAkB,EAAE,CAmCvB"}
|
|
@@ -1,7 +1,35 @@
|
|
|
1
|
-
/** The
|
|
1
|
+
/** The moments agent hooks fire at, before and after the write. */
|
|
2
2
|
export const PRE_TOOL = "pre-tool";
|
|
3
|
-
|
|
3
|
+
export const POST_TOOL = "post-tool";
|
|
4
|
+
/**
|
|
5
|
+
* Gates the registry permits declaring at either agent-edit moment.
|
|
6
|
+
*
|
|
7
|
+
* Both moments, deliberately. The boundary is `pre-tool` before the write and
|
|
8
|
+
* `post-tool` after it, and five of the seven shipped edit scripts fire at the
|
|
9
|
+
* latter — so counting only `pre-tool` would report the whole boundary as
|
|
10
|
+
* undeclarable while most of it had just become declarable.
|
|
11
|
+
*
|
|
12
|
+
* It lives beside the two constants rather than with its caller because they
|
|
13
|
+
* are the only thing it reads, and the caller is at its line ceiling.
|
|
14
|
+
* @param registry - The shipped registry
|
|
15
|
+
* @returns How many registry entries list either tool moment
|
|
16
|
+
*/
|
|
17
|
+
export function toolMomentLegalGates(registry) {
|
|
18
|
+
return Object.values(registry.REGISTRY).filter(gate => gate.moments.includes(PRE_TOOL) || gate.moments.includes(POST_TOOL)).length;
|
|
19
|
+
}
|
|
20
|
+
/** The synthetic reason filed when no gate may be declared at those moments. */
|
|
4
21
|
export const PRE_TOOL_REASON = "pre-tool-not-declarable";
|
|
22
|
+
/**
|
|
23
|
+
* The synthetic reason filed once they ARE declarable and still unread.
|
|
24
|
+
*
|
|
25
|
+
* The two are deliberately separate rather than one entry with softer wording.
|
|
26
|
+
* When the registry gained `pre-tool` and `post-tool` gates the first reason
|
|
27
|
+
* stopped being true, and an entry keyed only on that would have vanished —
|
|
28
|
+
* leaving the report silent about enforcement that still consults nothing. A
|
|
29
|
+
* control that stops reporting when half its cause is fixed is the failure this
|
|
30
|
+
* whole report exists to surface, so the remaining half gets its own name.
|
|
31
|
+
*/
|
|
32
|
+
export const PRE_TOOL_UNWIRED_REASON = "tool-moment-not-wired";
|
|
5
33
|
/**
|
|
6
34
|
* Every machine reason that belongs to Lisa rather than to the project.
|
|
7
35
|
*
|
|
@@ -22,6 +50,12 @@ export const UPSTREAM_LIMITATIONS = {
|
|
|
22
50
|
detail: "Formatting, linting, structural scanning and suppression blocking all fire at this moment. They are real enforcement and they are working — but no gate in Lisa's registry may be declared at this moment, so your settings file has no say over any of them. That is an upstream gap in Lisa's vocabulary, not a misconfiguration here.",
|
|
23
51
|
unit: "active scripts",
|
|
24
52
|
},
|
|
53
|
+
[PRE_TOOL_UNWIRED_REASON]: {
|
|
54
|
+
ticket: "CodySwannGT/lisa#2839",
|
|
55
|
+
headline: "Scripts run on every file an agent edits. You can now name those checks in your settings, but the scripts do not read them yet.",
|
|
56
|
+
detail: "Lisa's registry now has gates for what these scripts prove, so the vocabulary exists and a declaration validates. What has not shipped is the other half: each script still runs a fixed command and consults no configuration, so declaring one of these gates does not yet change what happens when an agent edits a file. Nothing about your project causes this, and turning the gate off will not stop the script.",
|
|
57
|
+
unit: "active scripts",
|
|
58
|
+
},
|
|
25
59
|
};
|
|
26
60
|
/**
|
|
27
61
|
* Whether a finding's unknown is one Lisa owns.
|
|
@@ -49,6 +83,21 @@ function cellsCarrying(rows, reason) {
|
|
|
49
83
|
[cell.bucket, cell.facadeReadsDeclaration, cell.commandExists].some(finding => finding.state === "unknown" && finding.reason === reason)).length +
|
|
50
84
|
rows.filter(row => row.merge.state === "unknown" && row.merge.reason === reason).length);
|
|
51
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* The script count for a tool-moment reason, or undefined for any other.
|
|
88
|
+
* @param reason - The catalogue reason being counted
|
|
89
|
+
* @param counts - The two tool-moment script counts
|
|
90
|
+
* @param counts.undeclarable - Scripts running with no declarable gate
|
|
91
|
+
* @param counts.unwired - Scripts running that ignore a declarable gate
|
|
92
|
+
* @returns The count, or undefined when the reason is counted from rows
|
|
93
|
+
*/
|
|
94
|
+
function preToolCountFor(reason, counts) {
|
|
95
|
+
if (reason === PRE_TOOL_REASON)
|
|
96
|
+
return counts.undeclarable;
|
|
97
|
+
if (reason === PRE_TOOL_UNWIRED_REASON)
|
|
98
|
+
return counts.unwired;
|
|
99
|
+
return undefined;
|
|
100
|
+
}
|
|
52
101
|
/**
|
|
53
102
|
* Build the upstream section for one report.
|
|
54
103
|
*
|
|
@@ -57,20 +106,29 @@ function cellsCarrying(rows, reason) {
|
|
|
57
106
|
* @param options - Report inputs
|
|
58
107
|
* @param options.rows - Every gate row
|
|
59
108
|
* @param options.agentHooks - Edit-time hooks proved active
|
|
60
|
-
* @param options.
|
|
109
|
+
* @param options.toolMomentLegalGates - Gates the registry permits at either
|
|
110
|
+
* tool moment. Counting only `pre-tool` would read the boundary as
|
|
111
|
+
* undeclarable while five of the seven shipped scripts fire at `post-tool`.
|
|
61
112
|
* @returns The limitations, sorted by ticket for a stable payload
|
|
62
113
|
*/
|
|
63
114
|
export function collectUpstream(options) {
|
|
64
|
-
const { rows, agentHooks,
|
|
65
|
-
//
|
|
66
|
-
//
|
|
67
|
-
//
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
115
|
+
const { rows, agentHooks, toolMomentLegalGates } = options;
|
|
116
|
+
// Counted in scripts rather than in rows, because the rows are all "not legal
|
|
117
|
+
// here" — precisely the reading that makes ungoverned enforcement look like
|
|
118
|
+
// nothing happening.
|
|
119
|
+
//
|
|
120
|
+
// Which of the two reasons applies depends on the registry this run read, not
|
|
121
|
+
// on the project: before gates existed at these moments the gap was that
|
|
122
|
+
// nothing could be declared; now it is that the scripts do not read what you
|
|
123
|
+
// declare. Exactly one is ever reported, so the count never double-counts a
|
|
124
|
+
// script.
|
|
125
|
+
const active = agentHooks.state === "verified" ? agentHooks.value.length : 0;
|
|
126
|
+
const undeclarable = toolMomentLegalGates === 0 ? active : 0;
|
|
127
|
+
const unwired = toolMomentLegalGates > 0 ? active : 0;
|
|
71
128
|
const counts = Object.keys(UPSTREAM_LIMITATIONS).map((reason) => [
|
|
72
129
|
reason,
|
|
73
|
-
reason
|
|
130
|
+
preToolCountFor(reason, { undeclarable, unwired }) ??
|
|
131
|
+
cellsCarrying(rows, reason),
|
|
74
132
|
]);
|
|
75
133
|
return counts
|
|
76
134
|
.filter(([, affected]) => affected > 0)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gate-report-upstream.js","sourceRoot":"","sources":["../../src/cli/gate-report-upstream.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gate-report-upstream.js","sourceRoot":"","sources":["../../src/cli/gate-report-upstream.ts"],"names":[],"mappings":"AA0CA,mEAAmE;AACnE,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC;AACnC,MAAM,CAAC,MAAM,SA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,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7D,MAAM,OAAO,GAAG,oBAAoB,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IACtD,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,GAAG,CAClD,CAAC,MAAM,EAAoB,EAAE,CAAC;QAC5B,MAAM;QACN,eAAe,CAAC,MAAM,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC;YAChD,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC;KAC9B,CACF,CAAC;IACF,OAAO,MAAM;SACV,MAAM,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,QAAQ,GAAG,CAAC,CAAC;SACtC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,EAAE;QAC1B,MAAM,KAAK,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAC;QAC3C,OAAO;YACL,MAAM;YACN,MAAM,EAAE,KAAK,EAAE,MAAM,IAAI,EAAE;YAC3B,QAAQ,EAAE,KAAK,EAAE,QAAQ,IAAI,EAAE;YAC/B,MAAM,EAAE,KAAK,EAAE,MAAM,IAAI,EAAE;YAC3B,QAAQ;YACR,IAAI,EAAE,KAAK,EAAE,IAAI,IAAI,QAAQ;SAC9B,CAAC;IACJ,CAAC,CAAC;SACD,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;AACpE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gate-report.d.ts","sourceRoot":"","sources":["../../src/cli/gate-report.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gate-report.d.ts","sourceRoot":"","sources":["../../src/cli/gate-report.ts"],"names":[],"mappings":"AA4CA,OAAO,EAEL,KAAK,kBAAkB,EAExB,MAAM,2BAA2B,CAAC;AASnC,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAGL,KAAK,sBAAsB,EAC5B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,4BAA4B,CAAC;AAIpC,OAAO,EAIL,KAAK,UAAU,EAEhB,MAAM,wBAAwB,CAAC;AAWhC,8BAA8B;AAC9B,MAAM,WAAW,iBAAiB;IAChC,iCAAiC;IACjC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,gEAAgE;IAChE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,0DAA0D;IAC1D,QAAQ,CAAC,oBAAoB,CAAC,EAAE,sBAAsB,CAAC;IACvD,0DAA0D;IAC1D,QAAQ,CAAC,iBAAiB,CAAC,EAAE,mBAAmB,CAAC;IACjD,sEAAsE;IACtE,QAAQ,CAAC,oBAAoB,CAAC,EAAE,yBAAyB,CAAC;IAC1D,sEAAsE;IACtE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,MAAM,CAAC;CACjC;AA0BD;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CACxB,QAAQ,EAAE,kBAAkB,EAC5B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,MAAM,EAAE,CASV;AAkLD;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,UAAU,CAAC,CAsErB"}
|
package/dist/cli/gate-report.js
CHANGED
|
@@ -24,7 +24,7 @@ import { buildRow, invertJobTable, } from "./gate-report-assemble.js";
|
|
|
24
24
|
import { collectHookEvidence, } from "./gate-report-executors.js";
|
|
25
25
|
import { facadeFinding, facadeSourceOf, readFacadeFacts, } from "./gate-report-facade.js";
|
|
26
26
|
import { mergeVerdict } from "./gate-report-merge.js";
|
|
27
|
-
import { collectUpstream,
|
|
27
|
+
import { collectUpstream, toolMomentLegalGates, } from "./gate-report-upstream.js";
|
|
28
28
|
import { loadGateRegistry, } from "./gate-report-registry.js";
|
|
29
29
|
import { buildDeclarationDrift, buildRequiredContexts, buildRulesetFinding, liveEnforcement, mergeBlockResolver, } from "./gate-report-joins.js";
|
|
30
30
|
import { readTemplateEnforcement, } from "./gate-report-templates.js";
|
|
@@ -168,14 +168,6 @@ async function readProjectIsUpstream(projectRoot) {
|
|
|
168
168
|
return false;
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
/**
|
|
172
|
-
* Gates the registry permits declaring at the agent-edit moment.
|
|
173
|
-
* @param registry - The shipped registry
|
|
174
|
-
* @returns How many registry entries list `pre-tool` in their moments
|
|
175
|
-
*/
|
|
176
|
-
function preToolLegalGates(registry) {
|
|
177
|
-
return Object.values(registry.REGISTRY).filter(gate => gate.moments.includes(PRE_TOOL)).length;
|
|
178
|
-
}
|
|
179
171
|
/**
|
|
180
172
|
* Every input the report is derived from, read once and in parallel.
|
|
181
173
|
*
|
|
@@ -290,7 +282,7 @@ export async function buildGateReport(options) {
|
|
|
290
282
|
upstream: collectUpstream({
|
|
291
283
|
rows,
|
|
292
284
|
agentHooks,
|
|
293
|
-
|
|
285
|
+
toolMomentLegalGates: toolMomentLegalGates(registry),
|
|
294
286
|
}),
|
|
295
287
|
projectIsUpstream: isUpstream,
|
|
296
288
|
summary: summarise(rows, axis.length),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gate-report.js","sourceRoot":"","sources":["../../src/cli/gate-report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EACL,QAAQ,EACR,cAAc,GAEf,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,mBAAmB,GAEpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,aAAa,EACb,cAAc,EACd,eAAe,GAEhB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,
|
|
1
|
+
{"version":3,"file":"gate-report.js","sourceRoot":"","sources":["../../src/cli/gate-report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EACL,QAAQ,EACR,cAAc,GAEf,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,mBAAmB,GAEpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,aAAa,EACb,cAAc,EACd,eAAe,GAEhB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EACL,eAAe,EACf,oBAAoB,GACrB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,gBAAgB,GAGjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,GAEnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,uBAAuB,GAExB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,6BAA6B,EAC7B,oBAAoB,GAErB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,gBAAgB,EAChB,0BAA0B,GAE3B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,OAAO,EACL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AC,CAAC;IAC5C,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;SACxC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;SAChD,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC;IACzD,OAAO;QACL,OAAO,EAAE,mBAAmB;QAC5B,2EAA2E;QAC3E,sEAAsE;QACtE,cAAc,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,cAAc,EAAE;QAC5D,MAAM,EAAE,MAAM,CAAC,aAAa;QAC5B,YAAY,EAAE,MAAM,CAAC,YAAY;QACjC,UAAU,EAAE,IAAI;QAChB,mBAAmB,EAAE,MAAM,CAAC,QAAQ;QACpC,KAAK,EAAE,IAAI;QACX,QAAQ;QACR,OAAO,EAAE,mBAAmB,CAAC,KAAK,CAAC;QACnC,gBAAgB,EAAE,gBAAgB,CAAC,KAAK,EAAE,SAAS,CAAC;QACpD,gBAAgB,EAAE,qBAAqB,CAAC,KAAK,CAAC;QAC9C,UAAU;QACV,YAAY,EAAE,cAAc,CAAC,MAAM,CAAC;QACpC,QAAQ,EAAE,eAAe,CAAC;YACxB,IAAI;YACJ,UAAU;YACV,oBAAoB,EAAE,oBAAoB,CAAC,QAAQ,CAAC;SACrD,CAAC;QACF,iBAAiB,EAAE,UAAU;QAC7B,OAAO,EAAE,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC;KACtC,CAAC;AACJ,CAAC"}
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Vitest Configuration - Shared Base
|
|
3
|
-
*
|
|
4
|
-
* Exports shared configuration pieces that can be imported by
|
|
5
|
-
* project-specific vitest.config.ts files. Reduces duplication between
|
|
6
|
-
* typescript, nestjs, and other project type configurations.
|
|
7
|
-
*
|
|
8
|
-
* Published as part of the @codyswann/lisa npm package so downstream
|
|
9
|
-
* projects can import these utilities directly from the package.
|
|
10
|
-
* @see https://vitest.dev/config/
|
|
11
|
-
* @module configs/vitest/base
|
|
12
|
-
*/
|
|
13
1
|
import type { ViteUserConfig } from "vitest/config";
|
|
14
2
|
/** Vite UserConfig augmented with Vitest's `test` property */
|
|
15
3
|
type UserConfig = ViteUserConfig;
|
|
@@ -81,6 +69,22 @@ export declare const defaultTestExclusions: readonly string[];
|
|
|
81
69
|
* @returns The worktree exclude globs, or an empty array when already inside a worktree.
|
|
82
70
|
*/
|
|
83
71
|
export declare function worktreeExclusions(): readonly string[];
|
|
72
|
+
/**
|
|
73
|
+
* Setup files that bound and reclaim the suite's temporary directories.
|
|
74
|
+
*
|
|
75
|
+
* Every stack factory spreads this. Without it, each fixture's
|
|
76
|
+
* `mkdtemp(os.tmpdir())` lands directly in the shared platform temp root, which
|
|
77
|
+
* is never emptied while the machine is up and which no in-process cleanup can
|
|
78
|
+
* protect once the runner is killed.
|
|
79
|
+
* @returns Absolute paths to spread into `test.setupFiles`.
|
|
80
|
+
* @see {@link module:configs/vitest/scratch} for the measurements behind this
|
|
81
|
+
*/
|
|
82
|
+
export declare function scratchSetupFiles(): readonly string[];
|
|
83
|
+
/**
|
|
84
|
+
* Global setup that reclaims residue before a run and audits the namespace after it.
|
|
85
|
+
* @returns Absolute paths to spread into `test.globalSetup`.
|
|
86
|
+
*/
|
|
87
|
+
export declare function scratchGlobalSetup(): readonly string[];
|
|
84
88
|
/**
|
|
85
89
|
* Maps portable threshold format (with `global` wrapper) to Vitest's
|
|
86
90
|
* flat threshold format. Projects store thresholds in the portable
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/configs/vitest/base.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/configs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AC7B,gBAaD,CAAC;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,GAC1B,UAAU,kBAAkB,EAC5B,WAAW,kBAAkB,KAC5B,kBAOD,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAAI,GAAG,SAAS,UAAU,EAAE,KAAG,UA4C7D,CAAC"}
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vitest Configuration - Shared Base
|
|
3
|
+
*
|
|
4
|
+
* Exports shared configuration pieces that can be imported by
|
|
5
|
+
* project-specific vitest.config.ts files. Reduces duplication between
|
|
6
|
+
* typescript, nestjs, and other project type configurations.
|
|
7
|
+
*
|
|
8
|
+
* Published as part of the @codyswann/lisa npm package so downstream
|
|
9
|
+
* projects can import these utilities directly from the package.
|
|
10
|
+
* @see https://vitest.dev/config/
|
|
11
|
+
* @module configs/vitest/base
|
|
12
|
+
*/
|
|
13
|
+
import { existsSync } from "node:fs";
|
|
14
|
+
import { fileURLToPath } from "node:url";
|
|
1
15
|
import { isInsideWorktree } from "../worktrees.js";
|
|
2
16
|
/**
|
|
3
17
|
* Default coverage thresholds used when not specified in project config.
|
|
@@ -69,6 +83,43 @@ export function worktreeExclusions() {
|
|
|
69
83
|
? []
|
|
70
84
|
: ["**/.claude/worktrees/**", "**/.worktrees/**"];
|
|
71
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Resolves a sibling module of this file to an absolute path Vitest can load.
|
|
88
|
+
*
|
|
89
|
+
* `setupFiles` and `globalSetup` take file paths rather than functions, and this
|
|
90
|
+
* module is consumed from two places with different extensions: downstream
|
|
91
|
+
* projects import the compiled `dist/` copy, while Lisa's own unit tests import
|
|
92
|
+
* the `src/` TypeScript directly. Probing for the built file first and falling
|
|
93
|
+
* back to the source keeps one wiring correct on both.
|
|
94
|
+
* @param basename - Sibling module name without extension
|
|
95
|
+
* @returns Absolute path to the module.
|
|
96
|
+
*/
|
|
97
|
+
const resolveScratchModule = (basename) => {
|
|
98
|
+
const built = fileURLToPath(new URL(`./${basename}.js`, import.meta.url));
|
|
99
|
+
return existsSync(built)
|
|
100
|
+
? built
|
|
101
|
+
: fileURLToPath(new URL(`./${basename}.ts`, import.meta.url));
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Setup files that bound and reclaim the suite's temporary directories.
|
|
105
|
+
*
|
|
106
|
+
* Every stack factory spreads this. Without it, each fixture's
|
|
107
|
+
* `mkdtemp(os.tmpdir())` lands directly in the shared platform temp root, which
|
|
108
|
+
* is never emptied while the machine is up and which no in-process cleanup can
|
|
109
|
+
* protect once the runner is killed.
|
|
110
|
+
* @returns Absolute paths to spread into `test.setupFiles`.
|
|
111
|
+
* @see {@link module:configs/vitest/scratch} for the measurements behind this
|
|
112
|
+
*/
|
|
113
|
+
export function scratchSetupFiles() {
|
|
114
|
+
return [resolveScratchModule("scratch-setup")];
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Global setup that reclaims residue before a run and audits the namespace after it.
|
|
118
|
+
* @returns Absolute paths to spread into `test.globalSetup`.
|
|
119
|
+
*/
|
|
120
|
+
export function scratchGlobalSetup() {
|
|
121
|
+
return [resolveScratchModule("scratch-global-setup")];
|
|
122
|
+
}
|
|
72
123
|
/**
|
|
73
124
|
* Maps portable threshold format (with `global` wrapper) to Vitest's
|
|
74
125
|
* flat threshold format. Projects store thresholds in the portable
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../src/configs/vitest/base.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../src/configs/vitest/base.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;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,YAAY,CAAC,OAAO,EAAE,UAAU,CAAC;SACxC,CAAC;IACJ,CAAC,EAAE,EAAgB,CAAC,CAAC;AACvB,CAAC,CAAC"}
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
import type { ViteUserConfig } from "vitest/config";
|
|
14
14
|
/** Vite UserConfig augmented with Vitest's `test` property */
|
|
15
15
|
type UserConfig = ViteUserConfig;
|
|
16
|
-
import { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs } from "./base.js";
|
|
16
|
+
import { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, scratchGlobalSetup, scratchSetupFiles } from "./base.js";
|
|
17
17
|
import type { PortableThresholds } from "./base.js";
|
|
18
|
-
export { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, };
|
|
18
|
+
export { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, scratchGlobalSetup, scratchSetupFiles, };
|
|
19
19
|
export type { PortableThresholds };
|
|
20
20
|
/**
|
|
21
21
|
* Options for configuring the CDK Vitest config factory.
|
|
@@ -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,
|
|
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;AAGpD,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,UAyBzB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, } from "./base.js";
|
|
1
|
+
import { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, scratchGlobalSetup, scratchSetupFiles, } from "./base.js";
|
|
2
2
|
// Re-export base utilities for entry-point configs
|
|
3
|
-
export { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, };
|
|
3
|
+
export { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, scratchGlobalSetup, scratchSetupFiles, };
|
|
4
4
|
/**
|
|
5
5
|
* Creates a Vitest configuration for AWS CDK projects.
|
|
6
6
|
*
|
|
@@ -14,6 +14,8 @@ export { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, ma
|
|
|
14
14
|
*/
|
|
15
15
|
export const getCdkVitestConfig = ({ thresholds, } = {}) => ({
|
|
16
16
|
test: {
|
|
17
|
+
setupFiles: [...scratchSetupFiles()],
|
|
18
|
+
globalSetup: [...scratchGlobalSetup()],
|
|
17
19
|
globals: true,
|
|
18
20
|
environment: "node",
|
|
19
21
|
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,
|
|
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"}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* @module configs/vitest/harper-fabric
|
|
6
6
|
*/
|
|
7
7
|
import type { ViteUserConfig } from "vitest/config";
|
|
8
|
-
import { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs } from "./base.js";
|
|
8
|
+
import { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, scratchGlobalSetup, scratchSetupFiles } from "./base.js";
|
|
9
9
|
import type { PortableThresholds } from "./base.js";
|
|
10
|
-
export { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, };
|
|
10
|
+
export { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, scratchGlobalSetup, scratchSetupFiles, };
|
|
11
11
|
export type { PortableThresholds };
|
|
12
12
|
/**
|
|
13
13
|
* Options for configuring the Harper/Fabric Vitest config factory.
|
|
@@ -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,
|
|
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,cAwBlC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, } from "./base.js";
|
|
2
|
-
export { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, };
|
|
1
|
+
import { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, scratchGlobalSetup, scratchSetupFiles, } from "./base.js";
|
|
2
|
+
export { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, scratchGlobalSetup, scratchSetupFiles, };
|
|
3
3
|
/**
|
|
4
4
|
* Creates a Vitest configuration for Harper/Fabric projects.
|
|
5
5
|
* @param options - Configuration options
|
|
@@ -8,6 +8,8 @@ export { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, ma
|
|
|
8
8
|
*/
|
|
9
9
|
export const getHarperFabricVitestConfig = ({ thresholds, } = {}) => ({
|
|
10
10
|
test: {
|
|
11
|
+
setupFiles: [...scratchSetupFiles()],
|
|
12
|
+
globalSetup: [...scratchGlobalSetup()],
|
|
11
13
|
globals: true,
|
|
12
14
|
environment: "node",
|
|
13
15
|
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,
|
|
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"}
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
import type { ViteUserConfig } from "vitest/config";
|
|
14
14
|
/** Vite UserConfig augmented with Vitest's `test` property */
|
|
15
15
|
type UserConfig = ViteUserConfig;
|
|
16
|
-
import { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, worktreeExclusions } from "./base.js";
|
|
16
|
+
import { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, scratchGlobalSetup, scratchSetupFiles, worktreeExclusions } from "./base.js";
|
|
17
17
|
import type { PortableThresholds } from "./base.js";
|
|
18
|
-
export { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, worktreeExclusions, };
|
|
18
|
+
export { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, scratchGlobalSetup, scratchSetupFiles, worktreeExclusions, };
|
|
19
19
|
export type { PortableThresholds };
|
|
20
20
|
/**
|
|
21
21
|
* Options for configuring the NestJS Vitest config factory.
|
|
@@ -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,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AC3B,mFAAmF;IACnF,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;CAC1C;AAwBD;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,GAAI,kBAEnC,mBAAwB,KAAG,UAiB5B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, worktreeExclusions, } from "./base.js";
|
|
1
|
+
import { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, scratchGlobalSetup, scratchSetupFiles, worktreeExclusions, } from "./base.js";
|
|
2
2
|
// Re-export base utilities for entry-point configs
|
|
3
|
-
export { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, worktreeExclusions, };
|
|
3
|
+
export { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, scratchGlobalSetup, scratchSetupFiles, worktreeExclusions, };
|
|
4
4
|
/**
|
|
5
5
|
* NestJS-specific patterns excluded from coverage collection.
|
|
6
6
|
* These are generated or boilerplate files that don't benefit from coverage tracking.
|
|
@@ -34,6 +34,8 @@ const nestjsCoverageExclusions = [
|
|
|
34
34
|
*/
|
|
35
35
|
export const getNestjsVitestConfig = ({ thresholds = defaultThresholds, } = {}) => ({
|
|
36
36
|
test: {
|
|
37
|
+
setupFiles: [...scratchSetupFiles()],
|
|
38
|
+
globalSetup: [...scratchGlobalSetup()],
|
|
37
39
|
globals: true,
|
|
38
40
|
environment: "node",
|
|
39
41
|
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,GACnB,MAAM,WAAW,CAAC;AAInB,mDAAmD;AACnD,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,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,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,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"}
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
* @module configs/vitest/phaser
|
|
9
9
|
*/
|
|
10
10
|
import type { ViteUserConfig } from "vitest/config";
|
|
11
|
-
import { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs } from "./base.js";
|
|
11
|
+
import { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, scratchGlobalSetup, scratchSetupFiles } from "./base.js";
|
|
12
12
|
import type { PortableThresholds } from "./base.js";
|
|
13
|
-
export { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, };
|
|
13
|
+
export { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, scratchGlobalSetup, scratchSetupFiles, };
|
|
14
14
|
export type { PortableThresholds };
|
|
15
15
|
/**
|
|
16
16
|
* Options for configuring the Phaser Vitest config factory.
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,cA2B5B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, } from "./base.js";
|
|
2
|
-
export { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, };
|
|
1
|
+
import { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, scratchGlobalSetup, scratchSetupFiles, } from "./base.js";
|
|
2
|
+
export { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, scratchGlobalSetup, scratchSetupFiles, };
|
|
3
3
|
/**
|
|
4
4
|
* Creates a Vitest configuration for Phaser projects.
|
|
5
5
|
* @param options - Configuration options
|
|
@@ -8,6 +8,8 @@ export { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, ma
|
|
|
8
8
|
*/
|
|
9
9
|
export const getPhaserVitestConfig = ({ thresholds, } = {}) => ({
|
|
10
10
|
test: {
|
|
11
|
+
setupFiles: [...scratchSetupFiles()],
|
|
12
|
+
globalSetup: [...scratchGlobalSetup()],
|
|
11
13
|
globals: true,
|
|
12
14
|
environment: "node",
|
|
13
15
|
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,
|
|
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"}
|