ttsc 0.31.0 → 0.31.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/cmd/platform/main.go +2 -2
- package/internal/sourceprocess/contain_windows.go +10 -13
- package/internal/sourceprocess/started_windows.go +41 -0
- package/internal/sourceprocess/windows_started_publication_distinguishes_pending_from_refusal_test.go +76 -0
- package/internal/watchhelper/run.go +30 -20
- package/internal/watchhelper/run_other.go +4 -4
- package/internal/watchhelper/run_windows.go +471 -0
- package/internal/watchhelper/watchhelper.go +8 -2
- package/internal/watchhelper/windows_notifications_preserve_mutations_without_access_noise_test.go +506 -0
- package/lib/internal/nativeBinary.d.ts +3 -3
- package/lib/internal/nativeBinary.js +3 -3
- package/lib/plugin/internal/load/loadProjectPlugins.d.ts +12 -13
- package/lib/plugin/internal/load/loadProjectPlugins.js +61 -36
- package/lib/plugin/internal/load/loadProjectPlugins.js.map +1 -1
- package/lib/plugin/internal/source/GoEnvironmentReading.d.ts +42 -0
- package/lib/plugin/internal/source/GoEnvironmentReading.js +110 -0
- package/lib/plugin/internal/source/GoEnvironmentReading.js.map +1 -0
- package/lib/plugin/internal/source/NativeSourcePackages.d.ts +7 -7
- package/lib/plugin/internal/source/NativeSourcePackages.js +33 -20
- package/lib/plugin/internal/source/NativeSourcePackages.js.map +1 -1
- package/lib/plugin/internal/source/PluginBuildEnvironmentReadings.d.ts +21 -0
- package/lib/plugin/internal/source/PluginBuildEnvironmentReadings.js +36 -0
- package/lib/plugin/internal/source/PluginBuildEnvironmentReadings.js.map +1 -1
- package/lib/plugin/internal/source/PluginBuildEnvironmentWitness.d.ts +5 -3
- package/lib/plugin/internal/source/PluginBuildEnvironmentWitness.js +14 -8
- package/lib/plugin/internal/source/PluginBuildEnvironmentWitness.js.map +1 -1
- package/lib/plugin/internal/source/SourcePluginWorkspace.d.ts +50 -19
- package/lib/plugin/internal/source/SourcePluginWorkspace.js +109 -22
- package/lib/plugin/internal/source/SourcePluginWorkspace.js.map +1 -1
- package/lib/plugin/internal/source/buildSourcePlugin.d.ts +19 -16
- package/lib/plugin/internal/source/buildSourcePlugin.js +27 -22
- package/lib/plugin/internal/source/buildSourcePlugin.js.map +1 -1
- package/lib/plugin/internal/source/computeCacheKey.d.ts +4 -2
- package/lib/plugin/internal/source/computeCacheKey.js +15 -6
- package/lib/plugin/internal/source/computeCacheKey.js.map +1 -1
- package/lib/plugin/internal/source/hashPluginBuildEnvironment.js +2 -68
- package/lib/plugin/internal/source/hashPluginBuildEnvironment.js.map +1 -1
- package/lib/plugin/internal/source/pluginModuleReplaceDirectories.d.ts +6 -5
- package/lib/plugin/internal/source/pluginModuleReplaceDirectories.js +10 -17
- package/lib/plugin/internal/source/pluginModuleReplaceDirectories.js.map +1 -1
- package/package.json +8 -8
- package/src/internal/nativeBinary.ts +3 -3
- package/src/plugin/internal/load/loadProjectPlugins.ts +209 -117
- package/src/plugin/internal/source/GoEnvironmentReading.ts +109 -0
- package/src/plugin/internal/source/NativeSourcePackages.ts +103 -43
- package/src/plugin/internal/source/PluginBuildEnvironmentReadings.ts +42 -0
- package/src/plugin/internal/source/PluginBuildEnvironmentWitness.ts +18 -8
- package/src/plugin/internal/source/SourcePluginWorkspace.ts +143 -25
- package/src/plugin/internal/source/buildSourcePlugin.ts +62 -34
- package/src/plugin/internal/source/computeCacheKey.ts +26 -8
- package/src/plugin/internal/source/hashPluginBuildEnvironment.ts +8 -76
- package/src/plugin/internal/source/pluginModuleReplaceDirectories.ts +13 -25
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.GoEnvironmentReading = void 0;
|
|
7
|
+
const node_crypto_1 = __importDefault(require("node:crypto"));
|
|
8
|
+
const GoSourceInputs_1 = require("./GoSourceInputs");
|
|
9
|
+
const PluginBuildEnvironmentWitness_1 = require("./PluginBuildEnvironmentWitness");
|
|
10
|
+
const spawnGoTool_1 = require("./spawnGoTool");
|
|
11
|
+
/**
|
|
12
|
+
* Acquire current Go values together with their environment-file evidence.
|
|
13
|
+
* Build digests and syntax readers share this owner; a file-location hint is
|
|
14
|
+
* never a retained positive environment verdict (#1516, #1712).
|
|
15
|
+
*
|
|
16
|
+
* @evidence contracts/common.md#principled-implementation The acquisition pairs actual Go output with native pre-read file evidence; callers retain their own completeness and reuse policy.
|
|
17
|
+
* @evidence contracts/common.md#clear-and-simple-design One namespace owns environment-file discovery and native acquisition for build and manifest clients.
|
|
18
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No handwritten default GOENV path or process-permanent environment success replaces native Go.
|
|
19
|
+
* @evidence contracts/common.md#meaningful-documentation Prose distinguishes observation from a discovery hint and identifies both consumers.
|
|
20
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation The read member owns native observation and execution.
|
|
21
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms The read member owns acquisition and identity costs.
|
|
22
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work The read member owns hint sharing; no result cache is exposed.
|
|
23
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The read member describes the private hint map and delegated native lifetime.
|
|
24
|
+
*/
|
|
25
|
+
var GoEnvironmentReading;
|
|
26
|
+
(function (GoEnvironmentReading) {
|
|
27
|
+
/**
|
|
28
|
+
* The Go environment file each Go tool and environment was last seen to name,
|
|
29
|
+
* which lets a reading witness that file before `go env` reads it.
|
|
30
|
+
*/
|
|
31
|
+
const goEnvironmentFiles = new Map();
|
|
32
|
+
/**
|
|
33
|
+
* Run `go env -json` for the requested keys and `GOENV`, the file `go env -w`
|
|
34
|
+
* writes, witnessing that file before the run reads it.
|
|
35
|
+
*
|
|
36
|
+
* The file decides the reading without being part of it, so only its metadata
|
|
37
|
+
* is kept, and it must be taken before the read: metadata taken after would
|
|
38
|
+
* describe an edit that landed between the two, and a reading of the old
|
|
39
|
+
* content would pass as proven. Which file `go env` reads is known only from
|
|
40
|
+
* its answer, so the file this Go tool and environment named last is
|
|
41
|
+
* witnessed first, and a reading that names another is taken again with that
|
|
42
|
+
* one witnessed. A file that keeps moving between runs leaves the reading
|
|
43
|
+
* unwitnessable, so a kept reading or a build keyed on it never holds.
|
|
44
|
+
*
|
|
45
|
+
* @returns The parsed object, or `undefined` when native acquisition or JSON
|
|
46
|
+
* object decoding failed.
|
|
47
|
+
* @evidence contracts/common.md#principled-implementation Actual Go supplies values and the environment-file path; pre-read metadata and bounded rediscovery preserve the earliest file witness instead of attaching a later state to an earlier read.
|
|
48
|
+
* @evidence contracts/common.md#clear-and-simple-design One acquisition serves build hashing and manifest syntax qualification; callers choose keys and own interpretation and cache admission.
|
|
49
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts A remembered file name is only a discovery hint. Every call executes Go, and unresolved movement marks its witness unproven rather than lending a historical positive verdict.
|
|
50
|
+
* @evidence contracts/common.md#meaningful-documentation Native paragraphs explain why file discovery can repeat and distinguish unavailable acquisition from current authority.
|
|
51
|
+
* @evidence contracts/portability.md#os-neutral-implementation Go reports its actual environment-file location; native path metadata and the existing Go process owner supply observation and execution semantics.
|
|
52
|
+
* @evidence contracts/performance.md#efficient-algorithms Hashing the complete tool/environment identity and up to three native Go queries process full name/value/output bytes. Requested keys contribute argument bytes; file discovery uses metadata rather than an SDK walk.
|
|
53
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Only file-location discovery hints are shared across equal selected-tool/environment identities. Current Go values and file authority are reacquired for every call.
|
|
54
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources The module retains one file-location hint per historical tool/environment identity, without eviction, but no positive reading or native handle. Command capture/retirement belongs to spawnGoTool and the caller owns the transferred witness.
|
|
55
|
+
*/
|
|
56
|
+
function read(goBinary, cwd, env, keys, witness) {
|
|
57
|
+
const memo = node_crypto_1.default.createHash("sha256").update(goBinary);
|
|
58
|
+
for (const [key, value] of Object.entries(env).sort(([left], [right]) => left < right ? -1 : left > right ? 1 : 0)) {
|
|
59
|
+
if (value !== undefined)
|
|
60
|
+
memo.update(`\0${key.length}:${key}${value.length}:${value}`);
|
|
61
|
+
}
|
|
62
|
+
const memoKey = memo.digest("hex");
|
|
63
|
+
let named = goEnvironmentFiles.get(memoKey);
|
|
64
|
+
for (let attempt = 0; attempt < 3; attempt += 1) {
|
|
65
|
+
if (named !== undefined && named !== null)
|
|
66
|
+
PluginBuildEnvironmentWitness_1.PluginBuildEnvironmentWitness.add(witness, named);
|
|
67
|
+
const result = (0, spawnGoTool_1.spawnGoTool)(goBinary, ["env", "-json", ...keys, "GOENV"], {
|
|
68
|
+
cwd,
|
|
69
|
+
encoding: "utf8",
|
|
70
|
+
env: GoSourceInputs_1.GoSourceInputs.goBuildEnv(goBinary, undefined, env),
|
|
71
|
+
windowsHide: true,
|
|
72
|
+
});
|
|
73
|
+
if (result.error !== undefined || result.status !== 0)
|
|
74
|
+
return undefined;
|
|
75
|
+
let parsed;
|
|
76
|
+
try {
|
|
77
|
+
const decoded = JSON.parse(result.stdout);
|
|
78
|
+
if (decoded === null ||
|
|
79
|
+
typeof decoded !== "object" ||
|
|
80
|
+
Array.isArray(decoded))
|
|
81
|
+
return undefined;
|
|
82
|
+
parsed = decoded;
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
return undefined;
|
|
86
|
+
}
|
|
87
|
+
const reported = typeof parsed.GOENV === "string" &&
|
|
88
|
+
parsed.GOENV !== "" &&
|
|
89
|
+
parsed.GOENV !== "off"
|
|
90
|
+
? parsed.GOENV
|
|
91
|
+
: null;
|
|
92
|
+
if (reported === named)
|
|
93
|
+
return parsed;
|
|
94
|
+
if (named !== undefined && named !== null)
|
|
95
|
+
witness?.delete(named);
|
|
96
|
+
named = reported;
|
|
97
|
+
goEnvironmentFiles.set(memoKey, named);
|
|
98
|
+
// No file to witness: the reading depends on none.
|
|
99
|
+
if (named === null)
|
|
100
|
+
return parsed;
|
|
101
|
+
if (witness === undefined)
|
|
102
|
+
return parsed;
|
|
103
|
+
}
|
|
104
|
+
if (named !== undefined && named !== null)
|
|
105
|
+
PluginBuildEnvironmentWitness_1.PluginBuildEnvironmentWitness.refuse(witness, named);
|
|
106
|
+
return undefined;
|
|
107
|
+
}
|
|
108
|
+
GoEnvironmentReading.read = read;
|
|
109
|
+
})(GoEnvironmentReading || (exports.GoEnvironmentReading = GoEnvironmentReading = {}));
|
|
110
|
+
//# sourceMappingURL=GoEnvironmentReading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GoEnvironmentReading.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/GoEnvironmentReading.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAiC;AAEjC,qDAAkD;AAClD,mFAAgF;AAChF,+CAA4C;AAE5C;;;;;;;;;;;;;GAaG;AACH,IAAiB,oBAAoB,CAwFpC;AAxFD,WAAiB,oBAAoB;IACnC;;;OAGG;IACH,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAyB,CAAC;IAE5D;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,SAAgB,IAAI,CAClB,QAAgB,EAChB,GAAW,EACX,GAAsB,EACtB,IAAuB,EACvB,OAAyD;QAEzD,MAAM,IAAI,GAAG,qBAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC1D,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,CACtE,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CACz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;gBACP,OAAO,SAAS,CAAC;YACnB,CAAC;YACD,MAAM,QAAQ,GACZ,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ;gBAChC,MAAM,CAAC,KAAK,KAAK,EAAE;gBACnB,MAAM,CAAC,KAAK,KAAK,KAAK;gBACpB,CAAC,CAAC,MAAM,CAAC,KAAK;gBACd,CAAC,CAAC,IAAI,CAAC;YACX,IAAI,QAAQ,KAAK,KAAK;gBAAE,OAAO,MAAM,CAAC;YACtC,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;gBAAE,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;YAClE,KAAK,GAAG,QAAQ,CAAC;YACjB,kBAAkB,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;YACvC,mDAAmD;YACnD,IAAI,KAAK,KAAK,IAAI;gBAAE,OAAO,MAAM,CAAC;YAClC,IAAI,OAAO,KAAK,SAAS;gBAAE,OAAO,MAAM,CAAC;QAC3C,CAAC;QACD,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;YACvC,6DAA6B,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACvD,OAAO,SAAS,CAAC;IACnB,CAAC;IAxDe,qBAAA,IAAI,OAwDnB,CAAA;AACH,CAAC,EAxFgB,oBAAoB,aAApB,oBAAoB,GAApB,oBAAoB,QAwFpC"}
|
|
@@ -2,8 +2,8 @@ import { SourcePluginWorkspace } from "./SourcePluginWorkspace";
|
|
|
2
2
|
/**
|
|
3
3
|
* Observe Go-selected packages under the native builder's workspace policy.
|
|
4
4
|
*
|
|
5
|
-
* Metadata does not compile dependencies or certify a later build. A cold
|
|
6
|
-
*
|
|
5
|
+
* Metadata does not compile dependencies or certify a later build. A cold build
|
|
6
|
+
* repeats ownership admission in its proven, materialized workspace.
|
|
7
7
|
*
|
|
8
8
|
* @evidence contracts/common.md#principled-implementation The selected Go tool, effective environment, shared workspace writer and actual copied package inputs determine package names and errors; Go remains the build-constraint and package-validity authority.
|
|
9
9
|
* @evidence contracts/common.md#clear-and-simple-design One namespace separates contextual observation, metadata framing and ownership admission; source-only contributions are observed inside their selected host module.
|
|
@@ -84,11 +84,11 @@ export declare namespace NativeSourcePackages {
|
|
|
84
84
|
/**
|
|
85
85
|
* Propose ownership with the candidate-selected tool before final admission.
|
|
86
86
|
*
|
|
87
|
-
* Nested transform sources retain their admitted source-module layout but
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
87
|
+
* Nested transform sources retain their admitted source-module layout but use
|
|
88
|
+
* unchanged generic host root manifests in scratch. Their outer module graph
|
|
89
|
+
* and toolchain are not source-only build authority. Module-root and check
|
|
90
|
+
* sources retain their actual owning module. Executable proposals must agree
|
|
91
|
+
* in the actual own module; linked proposals in each chosen actual host.
|
|
92
92
|
*
|
|
93
93
|
* @evidence contracts/common.md#principled-implementation Candidate tool selection occurs at the original owning module and effective environment; only prospective nested source-only manifests change in owned scratch before Go interprets the normal generated workspace.
|
|
94
94
|
* @evidence contracts/common.md#clear-and-simple-design One grouping pass shares each module/proposal context and returns whether actual own-module observation already occurred.
|
|
@@ -21,8 +21,8 @@ const spawnGoTool_1 = require("./spawnGoTool");
|
|
|
21
21
|
/**
|
|
22
22
|
* Observe Go-selected packages under the native builder's workspace policy.
|
|
23
23
|
*
|
|
24
|
-
* Metadata does not compile dependencies or certify a later build. A cold
|
|
25
|
-
*
|
|
24
|
+
* Metadata does not compile dependencies or certify a later build. A cold build
|
|
25
|
+
* repeats ownership admission in its proven, materialized workspace.
|
|
26
26
|
*
|
|
27
27
|
* @evidence contracts/common.md#principled-implementation The selected Go tool, effective environment, shared workspace writer and actual copied package inputs determine package names and errors; Go remains the build-constraint and package-validity authority.
|
|
28
28
|
* @evidence contracts/common.md#clear-and-simple-design One namespace separates contextual observation, metadata framing and ownership admission; source-only contributions are observed inside their selected host module.
|
|
@@ -80,17 +80,14 @@ var NativeSourcePackages;
|
|
|
80
80
|
const contributor = { source: input.source, name: input.name };
|
|
81
81
|
SourcePluginAdmission_1.SourcePluginAdmission.requireContributorPackage(opts.pluginName, contributor);
|
|
82
82
|
const target = node_path_1.default.resolve(scratch, input.entry);
|
|
83
|
-
if (node_path_1.default.relative(scratch, target).startsWith("..") ||
|
|
83
|
+
if (node_path_1.default.relative(scratch, target).startsWith("..") ||
|
|
84
|
+
target === scratch)
|
|
84
85
|
throw new Error("ttsc: invalid package selection target");
|
|
85
86
|
if (node_fs_1.default.existsSync(target))
|
|
86
87
|
throw new Error(`ttsc: package selection target already exists: ${target}`);
|
|
87
88
|
SourcePluginWorkspace_1.SourcePluginWorkspace.materialize(input.source, target);
|
|
88
89
|
}
|
|
89
|
-
|
|
90
|
-
if (reader === undefined) {
|
|
91
|
-
reader = SourcePluginWorkspace_1.SourcePluginWorkspace.createGoModReader(goBinary, opts.pluginName, env);
|
|
92
|
-
opts.readers?.set(goBinary, reader);
|
|
93
|
-
}
|
|
90
|
+
const reader = SourcePluginWorkspace_1.SourcePluginWorkspace.createGoModReader(goBinary, opts.pluginName, env, opts.readers);
|
|
94
91
|
SourcePluginWorkspace_1.SourcePluginWorkspace.writeGoWork(scratch, SourcePluginWorkspace_1.SourcePluginWorkspace.findTtscOverlayDirs(), goBinary, opts.pluginName, env, reader);
|
|
95
92
|
return read({
|
|
96
93
|
cwd: scratch,
|
|
@@ -141,7 +138,9 @@ var NativeSourcePackages;
|
|
|
141
138
|
readers,
|
|
142
139
|
packages: group.map(({ entry }) => ({ entry })),
|
|
143
140
|
});
|
|
144
|
-
group.forEach(({ index }, offset) => {
|
|
141
|
+
group.forEach(({ index }, offset) => {
|
|
142
|
+
output[index] = observations[offset];
|
|
143
|
+
});
|
|
145
144
|
}
|
|
146
145
|
return output;
|
|
147
146
|
}
|
|
@@ -149,11 +148,11 @@ var NativeSourcePackages;
|
|
|
149
148
|
/**
|
|
150
149
|
* Propose ownership with the candidate-selected tool before final admission.
|
|
151
150
|
*
|
|
152
|
-
* Nested transform sources retain their admitted source-module layout but
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
151
|
+
* Nested transform sources retain their admitted source-module layout but use
|
|
152
|
+
* unchanged generic host root manifests in scratch. Their outer module graph
|
|
153
|
+
* and toolchain are not source-only build authority. Module-root and check
|
|
154
|
+
* sources retain their actual owning module. Executable proposals must agree
|
|
155
|
+
* in the actual own module; linked proposals in each chosen actual host.
|
|
157
156
|
*
|
|
158
157
|
* @evidence contracts/common.md#principled-implementation Candidate tool selection occurs at the original owning module and effective environment; only prospective nested source-only manifests change in owned scratch before Go interprets the normal generated workspace.
|
|
159
158
|
* @evidence contracts/common.md#clear-and-simple-design One grouping pass shares each module/proposal context and returns whether actual own-module observation already occurred.
|
|
@@ -178,7 +177,10 @@ var NativeSourcePackages;
|
|
|
178
177
|
for (const group of groups.values()) {
|
|
179
178
|
const first = inputs[group[0].index];
|
|
180
179
|
const observations = inspect({
|
|
181
|
-
source: first.source,
|
|
180
|
+
source: first.source,
|
|
181
|
+
pluginName: first.label,
|
|
182
|
+
env,
|
|
183
|
+
readers,
|
|
182
184
|
proposal: !group[0].ownModule,
|
|
183
185
|
packages: group.map(({ entry }) => ({ entry })),
|
|
184
186
|
});
|
|
@@ -206,7 +208,14 @@ var NativeSourcePackages;
|
|
|
206
208
|
if (entries.length === 0)
|
|
207
209
|
return [];
|
|
208
210
|
OwnedSynchronousProcess_1.OwnedSynchronousProcess.checkpoint();
|
|
209
|
-
const result = (0, spawnGoTool_1.spawnGoTool)(opts.goBinary, [
|
|
211
|
+
const result = (0, spawnGoTool_1.spawnGoTool)(opts.goBinary, [
|
|
212
|
+
"list",
|
|
213
|
+
...GoSourceInputs_1.GoSourceInputs.BUILD_FLAGS,
|
|
214
|
+
"-find",
|
|
215
|
+
"-e",
|
|
216
|
+
"-json=Dir,Name,GoFiles,CgoFiles,Error",
|
|
217
|
+
...entries,
|
|
218
|
+
], { cwd: opts.cwd, encoding: "utf8", env: opts.env, windowsHide: true });
|
|
210
219
|
OwnedSynchronousProcess_1.OwnedSynchronousProcess.checkpoint();
|
|
211
220
|
if (result.error !== undefined)
|
|
212
221
|
throw new Error(SourcePluginWorkspace_1.SourcePluginWorkspace.goSpawnFailureMessage(`selecting Go packages for plugin "${opts.pluginName}"`, opts.pluginName, opts.goBinary, opts.cwd, result.error));
|
|
@@ -214,7 +223,8 @@ var NativeSourcePackages;
|
|
|
214
223
|
throw new Error(`ttsc: selecting Go packages for plugin "${opts.pluginName}" failed:\n${result.stderr || result.stdout}`);
|
|
215
224
|
const packages = parse(result.stdout);
|
|
216
225
|
const selected = new Map(packages.map((input) => [
|
|
217
|
-
input.Dir === undefined ? undefined : node_fs_1.default.realpathSync.native(input.Dir),
|
|
226
|
+
input.Dir === undefined ? undefined : node_fs_1.default.realpathSync.native(input.Dir),
|
|
227
|
+
input,
|
|
218
228
|
]));
|
|
219
229
|
return opts.entries.map((entry) => {
|
|
220
230
|
const dir = node_fs_1.default.realpathSync.native(node_path_1.default.resolve(opts.cwd, entry));
|
|
@@ -240,7 +250,8 @@ var NativeSourcePackages;
|
|
|
240
250
|
function kind(input, label, expected) {
|
|
241
251
|
if (input.Error !== undefined)
|
|
242
252
|
throw new Error(`ttsc: plugin "${label}" Go package selection failed: ${input.Error.Err}`);
|
|
243
|
-
if (input.Name === undefined ||
|
|
253
|
+
if (input.Name === undefined ||
|
|
254
|
+
(input.GoFiles?.length ?? 0) + (input.CgoFiles?.length ?? 0) === 0)
|
|
244
255
|
throw new Error(`ttsc: plugin "${label}" source has no Go-selected production files: ${input.Dir ?? "unknown package"}`);
|
|
245
256
|
const actual = input.Name === "main" ? "executable" : "linked";
|
|
246
257
|
if (expected !== undefined && actual !== expected)
|
|
@@ -297,8 +308,10 @@ var NativeSourcePackages;
|
|
|
297
308
|
if ((record.Dir !== undefined && typeof record.Dir !== "string") ||
|
|
298
309
|
(record.Name !== undefined && typeof record.Name !== "string") ||
|
|
299
310
|
[record.GoFiles, record.CgoFiles].some((files) => files !== undefined &&
|
|
300
|
-
(!Array.isArray(files) ||
|
|
301
|
-
|
|
311
|
+
(!Array.isArray(files) ||
|
|
312
|
+
files.some((file) => typeof file !== "string"))) ||
|
|
313
|
+
(record.Error !== undefined &&
|
|
314
|
+
(record.Error === null || typeof record.Error.Err !== "string")))
|
|
302
315
|
throw new Error("ttsc: invalid Go package metadata fields");
|
|
303
316
|
packages.push(record);
|
|
304
317
|
start = -1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeSourcePackages.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/NativeSourcePackages.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAyB;AACzB,0DAA6B;AAE7B,iGAA8F;AAC9F,uFAAoF;AACpF,qFAAkF;AAClF,iGAA8F;AAC9F,qDAAkD;AAClD,yDAAsD;AACtD,mEAAgE;AAChE,mEAAgE;AAChE,+EAA4E;AAC5E,2DAAwD;AACxD,mEAAgE;AAChE,+CAA4C;AAE5C;;;;;;;;;;;;;;GAcG;AACH,IAAiB,oBAAoB,CA2UpC;AA3UD,WAAiB,oBAAoB;IA8BnC;;;;;;;;;;;OAWG;IACH,SAAgB,OAAO,CAAC,IAOvB;QACC,MAAM,GAAG,GAAG,uCAAkB,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;QAC9D,MAAM,EAAE,UAAU,EAAE,GAAG,IAAA,6CAAqB,EAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAC3E,MAAM,QAAQ,GAAG,IAAA,qCAAiB,EAAC,GAAG,CAAC,CAAC;QACxC,MAAM,QAAQ,GAAG,mCAAgB,CAAC,qBAAqB,CACrD,QAAQ,CAAC,MAAM,EACf,GAAG,EACH,UAAU,CACX,CAAC;QACF,IAAA,yDAA2B,EAAC,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,CA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SAAS,EAAE,aAAa,EAAE,kBAAkB,CAAC,CAAC;AACpE,CAAC"}
|
|
1
|
+
{"version":3,"file":"NativeSourcePackages.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/NativeSourcePackages.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAyB;AACzB,0DAA6B;AAE7B,iGAA8F;AAC9F,uFAAoF;AACpF,qFAAkF;AAClF,iGAA8F;AAC9F,qDAAkD;AAClD,yDAAsD;AACtD,mEAAgE;AAChE,mEAAgE;AAChE,+EAA4E;AAC5E,2DAAwD;AACxD,mEAAgE;AAChE,+CAA4C;AAE5C;;;;;;;;;;;;;;GAcG;AACH,IAAiB,oBAAoB,CAuYpC;AAvYD,WAAiB,oBAAoB;IA8BnC;;;;;;;;;;;OAWG;IACH,SAAgB,OAAO,CAAC,IAOvB;QACC,MAAM,GAAG,GAAG,uCAAkB,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;QAC9D,MAAM,EAAE,UAAU,EAAE,GAAG,IAAA,6CAAqB,EAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAC3E,MAAM,QAAQ,GAAG,IAAA,qCAAiB,EAAC,GAAG,CAAC,CAAC;QACxC,MAAM,QAAQ,GAAG,mCAAgB,CAAC,qBAAqB,CACrD,QAAQ,CAAC,MAAM,EACf,GAAG,EACH,UAAU,CACX,CAAC;QACF,IAAA,yDAA2B,EAAC,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACxD,MAAM,OAAO,GAAG,IAAA,2DAA4B,EAAC,yBAAyB,CAAC,CAAC;QACxE,IAAI,WAA2C,CAAC;QAChD,IAAI,CAAC;YACH,+CAAsB,CAAC,QAAQ,CAAC;gBAC9B,SAAS,EAAE,OAAO;gBAClB,aAAa,EAAE,CAAC,OAAO,CAAC;aACzB,CAAC,CAAC;YACH,6CAAqB,CAAC,WAAW,CAAC,UAAU,EAA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K,CAAC,OAAO,CAAC,KAAK,CAAC;4BACpB,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CACpD;oBACD,CAAC,MAAM,CAAC,KAAK,KAAK,SAAS;wBACzB,CAAC,MAAM,CAAC,KAAK,KAAK,IAAI,IAAI,OAAO,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,QAAQ,CAAC,CAAC;oBAElE,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;gBAC9D,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBACtB,KAAK,GAAG,CAAC,CAAC,CAAC;YACb,CAAC;QACH,CAAC;QACD,IAAI,KAAK,IAAI,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;QACjE,OAAO,QAAQ,CAAC;IAClB,CAAC;IA/Ce,qBAAA,KAAK,QA+CpB,CAAA;AACH,CAAC,EAvYgB,oBAAoB,aAApB,oBAAoB,GAApB,oBAAoB,QAuYpC;AAED,2EAA2E;AAC3E,SAAS,iBAAiB;IACxB,OAAO,mBAAI,CAAC,OAAO,CAAC,SAAS,EAAE,aAAa,EAAE,kBAAkB,CAAC,CAAC;AACpE,CAAC"}
|
|
@@ -54,6 +54,27 @@ export declare namespace PluginBuildEnvironmentReadings {
|
|
|
54
54
|
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The operation borrows a process-owned record and retains no request history.
|
|
55
55
|
*/
|
|
56
56
|
function cached(directory: string): string | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Qualify a batch in one synchronous observation transaction. Shared SDK
|
|
59
|
+
* paths and the complete variable identity are read once, even when several
|
|
60
|
+
* plugin directories use them. Missing readings remain explicitly missing.
|
|
61
|
+
*
|
|
62
|
+
* WARNING (#1712): this map belongs only to the following synchronous proof.
|
|
63
|
+
* Never retain it across an await, delivery, build boundary or publication. A
|
|
64
|
+
* process-permanent positive witness would miss changed Go tools and GOENV
|
|
65
|
+
* files (#1516); independently checking it in every helper instead multiplies
|
|
66
|
+
* a thousands-file GOROOT scan by modules and proof layers.
|
|
67
|
+
*
|
|
68
|
+
* @evidence contracts/common.md#principled-implementation One current variable snapshot and native path observation are compared against each reading's own expected witness; conflicting expected states cannot both pass.
|
|
69
|
+
* @evidence contracts/common.md#clear-and-simple-design One batch operation owns shared validation without changing synchronous reads or native worker publication boundaries.
|
|
70
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Undefined is retained for absent or stale authority; no positive verdict survives this explicit observation transaction.
|
|
71
|
+
* @evidence contracts/common.md#meaningful-documentation Native paragraphs state scope, missing semantics and the performance/correctness regressions prevented by the lifetime restriction.
|
|
72
|
+
* @evidence contracts/portability.md#os-neutral-implementation Existing native witness keys preserve filesystem, link and ambient-variable distinctions; no platform case assumption is added.
|
|
73
|
+
* @evidence contracts/performance.md#efficient-algorithms Full variables are indexed once; each distinct witnessed path is queried once while each reading compares its own witness entries. Work is proportional to variable bytes, total witness entries and unique native dependencies rather than repeated native SDK scans.
|
|
74
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Only current native observations within this synchronous batch are shared; the returned digests do not authorize reuse after another asynchronous boundary.
|
|
75
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources The native observation map is call-local and the digest map transfers to its immediate proof caller; no handle or historical registry is acquired.
|
|
76
|
+
*/
|
|
77
|
+
function cachedAll(directories: Iterable<string>): ReadonlyMap<string, string | undefined>;
|
|
57
78
|
/**
|
|
58
79
|
* Read synchronously for clients whose API owns synchronous native work.
|
|
59
80
|
* Explicit refresh preserves the original fresh-comparison semantics.
|
|
@@ -61,6 +61,42 @@ var PluginBuildEnvironmentReadings;
|
|
|
61
61
|
: undefined;
|
|
62
62
|
}
|
|
63
63
|
PluginBuildEnvironmentReadings.cached = cached;
|
|
64
|
+
/**
|
|
65
|
+
* Qualify a batch in one synchronous observation transaction. Shared SDK
|
|
66
|
+
* paths and the complete variable identity are read once, even when several
|
|
67
|
+
* plugin directories use them. Missing readings remain explicitly missing.
|
|
68
|
+
*
|
|
69
|
+
* WARNING (#1712): this map belongs only to the following synchronous proof.
|
|
70
|
+
* Never retain it across an await, delivery, build boundary or publication. A
|
|
71
|
+
* process-permanent positive witness would miss changed Go tools and GOENV
|
|
72
|
+
* files (#1516); independently checking it in every helper instead multiplies
|
|
73
|
+
* a thousands-file GOROOT scan by modules and proof layers.
|
|
74
|
+
*
|
|
75
|
+
* @evidence contracts/common.md#principled-implementation One current variable snapshot and native path observation are compared against each reading's own expected witness; conflicting expected states cannot both pass.
|
|
76
|
+
* @evidence contracts/common.md#clear-and-simple-design One batch operation owns shared validation without changing synchronous reads or native worker publication boundaries.
|
|
77
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Undefined is retained for absent or stale authority; no positive verdict survives this explicit observation transaction.
|
|
78
|
+
* @evidence contracts/common.md#meaningful-documentation Native paragraphs state scope, missing semantics and the performance/correctness regressions prevented by the lifetime restriction.
|
|
79
|
+
* @evidence contracts/portability.md#os-neutral-implementation Existing native witness keys preserve filesystem, link and ambient-variable distinctions; no platform case assumption is added.
|
|
80
|
+
* @evidence contracts/performance.md#efficient-algorithms Full variables are indexed once; each distinct witnessed path is queried once while each reading compares its own witness entries. Work is proportional to variable bytes, total witness entries and unique native dependencies rather than repeated native SDK scans.
|
|
81
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Only current native observations within this synchronous batch are shared; the returned digests do not authorize reuse after another asynchronous boundary.
|
|
82
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources The native observation map is call-local and the digest map transfers to its immediate proof caller; no handle or historical registry is acquired.
|
|
83
|
+
*/
|
|
84
|
+
function cachedAll(directories) {
|
|
85
|
+
let variables;
|
|
86
|
+
const current = new Map();
|
|
87
|
+
const result = new Map();
|
|
88
|
+
for (const directory of directories) {
|
|
89
|
+
if (result.has(directory))
|
|
90
|
+
continue;
|
|
91
|
+
const known = readings.get(directory + (variables ??= key("", process.env)));
|
|
92
|
+
result.set(directory, known !== undefined &&
|
|
93
|
+
PluginBuildEnvironmentWitness_1.PluginBuildEnvironmentWitness.holds(known.witness, undefined, current)
|
|
94
|
+
? known.environment
|
|
95
|
+
: undefined);
|
|
96
|
+
}
|
|
97
|
+
return result;
|
|
98
|
+
}
|
|
99
|
+
PluginBuildEnvironmentReadings.cachedAll = cachedAll;
|
|
64
100
|
/**
|
|
65
101
|
* Read synchronously for clients whose API owns synchronous native work.
|
|
66
102
|
* Explicit refresh preserves the original fresh-comparison semantics.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginBuildEnvironmentReadings.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/PluginBuildEnvironmentReadings.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAiC;AACjC,0DAA6B;AAC7B,6DAAwD;AAExD,iGAA8F;AAC9F,mFAAgF;AAChF,qEAAkE;AAElE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,IAAiB,8BAA8B,
|
|
1
|
+
{"version":3,"file":"PluginBuildEnvironmentReadings.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/PluginBuildEnvironmentReadings.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAiC;AACjC,0DAA6B;AAC7B,6DAAwD;AAExD,iGAA8F;AAC9F,mFAAgF;AAChF,qEAAkE;AAElE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,IAAiB,8BAA8B,CAkP9C;AAlPD,WAAiB,8BAA8B;IAkB7C,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAmB,CAAC;IAC5C,MAAM,OAAO,GAAG,IAAI,GAAG,EAA2B,CAAC;IACnD,IAAI,MAA0B,CAAC;IAC/B,IAAI,KAAK,GAAkB,OAAO,CAAC,OAAO,EAAE,CAAC;IAE7C;;;;;;;;;;;;;;OAcG;IACH,SAAgB,MAAM,CAAC,SAAiB;QACtC,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,GAAG,C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AA9B,8BAA8B,QAkP9C"}
|
|
@@ -112,7 +112,9 @@ export declare namespace PluginBuildEnvironmentWitness {
|
|
|
112
112
|
* observation. The existing private opt-in trace retains the first actual
|
|
113
113
|
* mismatch without repeating its lookup or changing the refusal. An optional
|
|
114
114
|
* observation label separates preparation and build epochs in that trace; it
|
|
115
|
-
* does not change validation or authorize publication.
|
|
115
|
+
* does not change validation or authorize publication. A supplied native
|
|
116
|
+
* observation map belongs to one synchronous batch only; never reuse it after
|
|
117
|
+
* an await, delivery, environment mutation or publication boundary.
|
|
116
118
|
*
|
|
117
119
|
* @evidence contracts/common.md#principled-implementation Universal comparison requires every dependency to match its pre-read signature and immediately rejects a refused or changed path.
|
|
118
120
|
* @evidence contracts/common.md#clear-and-simple-design Validation uses the same signature helper as capture, keeping identity and timestamp policy in one place.
|
|
@@ -121,8 +123,8 @@ export declare namespace PluginBuildEnvironmentWitness {
|
|
|
121
123
|
* @evidence contracts/portability.md#os-neutral-implementation Validation reads actual Node metadata using the same link-following semantics as capture.
|
|
122
124
|
* @evidence contracts/performance.md#efficient-algorithms Validation iterates dependencies until mismatch and performs native stat/link queries or ambient-variable serialization. Windows environment matching enumerates names and lowercases text per witnessed variable, so P alone does not bound that work. Native path/link/name/value/numeric bytes contribute cost; file content is not read and unavailable native observations share the helper's missing marker. An enabled private trace serializes the first mismatch's already-computed text through its existing bounded sink.
|
|
123
125
|
*
|
|
124
|
-
* @
|
|
126
|
+
* @evidence contracts/performance.md#reuse-equivalent-work A caller-owned synchronous batch may share current native observations, comparing each witness against its own expected state; ordinary calls and all later observation phases establish new validity.
|
|
125
127
|
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Validation retains no handles or additional historical state.
|
|
126
128
|
*/
|
|
127
|
-
function holds(witness: Record, observation?: string): boolean;
|
|
129
|
+
function holds(witness: Record, observation?: string, currentReadings?: Map<string, string>): boolean;
|
|
128
130
|
}
|
|
@@ -128,7 +128,9 @@ var PluginBuildEnvironmentWitness;
|
|
|
128
128
|
* observation. The existing private opt-in trace retains the first actual
|
|
129
129
|
* mismatch without repeating its lookup or changing the refusal. An optional
|
|
130
130
|
* observation label separates preparation and build epochs in that trace; it
|
|
131
|
-
* does not change validation or authorize publication.
|
|
131
|
+
* does not change validation or authorize publication. A supplied native
|
|
132
|
+
* observation map belongs to one synchronous batch only; never reuse it after
|
|
133
|
+
* an await, delivery, environment mutation or publication boundary.
|
|
132
134
|
*
|
|
133
135
|
* @evidence contracts/common.md#principled-implementation Universal comparison requires every dependency to match its pre-read signature and immediately rejects a refused or changed path.
|
|
134
136
|
* @evidence contracts/common.md#clear-and-simple-design Validation uses the same signature helper as capture, keeping identity and timestamp policy in one place.
|
|
@@ -137,16 +139,20 @@ var PluginBuildEnvironmentWitness;
|
|
|
137
139
|
* @evidence contracts/portability.md#os-neutral-implementation Validation reads actual Node metadata using the same link-following semantics as capture.
|
|
138
140
|
* @evidence contracts/performance.md#efficient-algorithms Validation iterates dependencies until mismatch and performs native stat/link queries or ambient-variable serialization. Windows environment matching enumerates names and lowercases text per witnessed variable, so P alone does not bound that work. Native path/link/name/value/numeric bytes contribute cost; file content is not read and unavailable native observations share the helper's missing marker. An enabled private trace serializes the first mismatch's already-computed text through its existing bounded sink.
|
|
139
141
|
*
|
|
140
|
-
* @
|
|
142
|
+
* @evidence contracts/performance.md#reuse-equivalent-work A caller-owned synchronous batch may share current native observations, comparing each witness against its own expected state; ordinary calls and all later observation phases establish new validity.
|
|
141
143
|
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Validation retains no handles or additional historical state.
|
|
142
144
|
*/
|
|
143
|
-
function holds(witness, observation) {
|
|
145
|
+
function holds(witness, observation, currentReadings) {
|
|
144
146
|
for (const [file, recorded] of witness) {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
?
|
|
149
|
-
:
|
|
147
|
+
let current = currentReadings?.get(file);
|
|
148
|
+
if (current === undefined) {
|
|
149
|
+
current = file.startsWith(ENVIRONMENT_PREFIX)
|
|
150
|
+
? environmentSignature(file.slice(ENVIRONMENT_PREFIX.length))
|
|
151
|
+
: file.startsWith(LINK_PREFIX)
|
|
152
|
+
? linkSignature(file.slice(LINK_PREFIX.length))
|
|
153
|
+
: signature(file);
|
|
154
|
+
currentReadings?.set(file, current);
|
|
155
|
+
}
|
|
150
156
|
if (current !== recorded) {
|
|
151
157
|
E2ETrace_1.E2ETrace.capabilityResolution("plugin-build-environment-witness-mismatch", {
|
|
152
158
|
key: file,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginBuildEnvironmentWitness.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/PluginBuildEnvironmentWitness.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAyB;AAEzB,yDAAsD;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,IAAiB,6BAA6B,
|
|
1
|
+
{"version":3,"file":"PluginBuildEnvironmentWitness.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/PluginBuildEnvironmentWitness.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAyB;AAEzB,yDAAsD;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,IAAiB,6BAA6B,CAgN7C;AAhND,WAAiB,6BAA6B;IAkB5C;;;;;;;;;;;;;OAaG;IACH,SAAgB,GAAG,CACjB,OAA2B,EAC3B,IAAY,EACZ,QAAyB;QAEzB,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,OAAO;QACvD,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC/C,CAAC;IAPe,8BAAA,GAAG,MAOlB,CAAA;IAED;;;;;;;;;;;;;OAaG;IACH,SAAgB,OAAO,CAAC,OAA2B,EAAE,IAAY;QAC/D,MAAM,GAAG,GAAG,WAAW,GAAG,IAAI,CAAC;QAC/B,IA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