@qlzt/dsh-app-boot 0.0.0-stage → 0.2.1-alpha.2
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/LICENSE +21 -0
- package/README.i18n.yaml +73 -0
- package/README.md +221 -2
- package/README.zh.md +222 -0
- package/lib/index.js +4293 -0
- package/lib/types/compatibility-preflight.d.ts +26 -0
- package/lib/types/config-schema/collect.d.ts +16 -0
- package/lib/types/config-schema/document.d.ts +13 -0
- package/lib/types/config-schema/index.d.ts +19 -0
- package/lib/types/config-schema/native.d.ts +9 -0
- package/lib/types/config-schema/pattern.d.ts +8 -0
- package/lib/types/config-schema/projector.d.ts +20 -0
- package/lib/types/config-schema/types.d.ts +95 -0
- package/lib/types/index.d.ts +327 -0
- package/lib/types/official-bundle-packages.d.ts +4 -0
- package/lib/types/official-bundles.d.ts +12 -0
- package/lib/types/official-bundles.generated.d.ts +5 -0
- package/lib/types/package-meta.d.ts +29 -0
- package/lib/types/plugin-compatibility.d.ts +35 -0
- package/lib/types/profile-compatibility.d.ts +50 -0
- package/lib/types/profile-context.d.ts +51 -0
- package/lib/types/profile-plugins.d.ts +60 -0
- package/lib/types/profile-resolution/legacy-links.d.ts +15 -0
- package/lib/types/profile-resolution/resolver.d.ts +45 -0
- package/lib/types/profile-resolution/service.d.ts +66 -0
- package/lib/types/profile-resolution/worker-bootstrap.d.ts +3 -0
- package/lib/types/profile-sanitize.d.ts +13 -0
- package/lib/types/profile.d.ts +277 -0
- package/lib/worker/profile-resolution-bootstrap.js +728 -0
- package/package.json +65 -4
|
@@ -0,0 +1,728 @@
|
|
|
1
|
+
import { createRequire, isBuiltin } from "node:module";
|
|
2
|
+
import { getEnvironmentData } from "node:worker_threads";
|
|
3
|
+
import { existsSync, readFileSync, realpathSync, statSync } from "node:fs";
|
|
4
|
+
import { basename, dirname, join, resolve, sep } from "node:path";
|
|
5
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
6
|
+
//#region ../../../node_modules/.pnpm/resolve.exports@2.0.3/node_modules/resolve.exports/dist/index.mjs
|
|
7
|
+
function e(e, n, r) {
|
|
8
|
+
throw new Error(r ? `No known conditions for "${n}" specifier in "${e}" package` : `Missing "${n}" specifier in "${e}" package`);
|
|
9
|
+
}
|
|
10
|
+
function n(n, i, o, f) {
|
|
11
|
+
let s, u, l = r(n, o), c = function(e) {
|
|
12
|
+
let n = new Set(["default", ...e.conditions || []]);
|
|
13
|
+
return e.unsafe || n.add(e.require ? "require" : "import"), e.unsafe || n.add(e.browser ? "browser" : "node"), n;
|
|
14
|
+
}(f || {}), a = i[l];
|
|
15
|
+
if (void 0 === a) {
|
|
16
|
+
let e, n, r, t;
|
|
17
|
+
for (t in i) n && t.length < n.length || ("/" === t[t.length - 1] && l.startsWith(t) ? (u = l.substring(t.length), n = t) : t.length > 1 && (r = t.indexOf("*", 1), ~r && (e = RegExp("^" + t.substring(0, r) + "(.*)" + t.substring(1 + r) + "$").exec(l), e && e[1] && (u = e[1], n = t))));
|
|
18
|
+
a = i[n];
|
|
19
|
+
}
|
|
20
|
+
return a || e(n, l), s = t(a, c), s || e(n, l, 1), u && function(e, n) {
|
|
21
|
+
let r, t = 0, i = e.length, o = /[*]/g, f = /[/]$/;
|
|
22
|
+
for (; t < i; t++) e[t] = o.test(r = e[t]) ? r.replace(o, n) : f.test(r) ? r + n : r;
|
|
23
|
+
}(s, u), s;
|
|
24
|
+
}
|
|
25
|
+
function r(e, n, r) {
|
|
26
|
+
if (e === n || "." === n) return ".";
|
|
27
|
+
let t = e + "/", i = t.length, o = n.slice(0, i) === t, f = o ? n.slice(i) : n;
|
|
28
|
+
return "#" === f[0] ? f : o || !r ? "./" === f.slice(0, 2) ? f : "./" + f : f;
|
|
29
|
+
}
|
|
30
|
+
function t(e, n, r) {
|
|
31
|
+
if (e) {
|
|
32
|
+
if ("string" == typeof e) return r && r.add(e), [e];
|
|
33
|
+
let i, o;
|
|
34
|
+
if (Array.isArray(e)) {
|
|
35
|
+
for (o = r || /* @__PURE__ */ new Set(), i = 0; i < e.length; i++) t(e[i], n, o);
|
|
36
|
+
if (!r && o.size) return [...o];
|
|
37
|
+
} else for (i in e) if (n.has(i)) return t(e[i], n, r);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function f(e, r, t) {
|
|
41
|
+
if (e.imports) return n(e.name, e.imports, r, t);
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region lib/types/profile-resolution/resolver.js
|
|
45
|
+
/** In-memory profile package routing for Node's default ESM and CommonJS loaders. */
|
|
46
|
+
const EMPTY_ATTRIBUTES = Object.freeze({});
|
|
47
|
+
/**
|
|
48
|
+
* Split a bare request into its package name without allocating path segments.
|
|
49
|
+
* @param request - module specifier to classify.
|
|
50
|
+
* @returns the bare package name, or undefined for non-package requests.
|
|
51
|
+
*/
|
|
52
|
+
function barePackageName(request) {
|
|
53
|
+
if (!request || request[0] === "." || request[0] === "/" || request[0] === "\\" || request[0] === "#" || request.includes(":") || isBuiltin(request)) return;
|
|
54
|
+
const first = request.indexOf("/");
|
|
55
|
+
if (request[0] !== "@") return first < 0 ? request : request.slice(0, first);
|
|
56
|
+
if (first < 0) return;
|
|
57
|
+
const second = request.indexOf("/", first + 1);
|
|
58
|
+
return second < 0 ? request : request.slice(0, second);
|
|
59
|
+
}
|
|
60
|
+
function canonicalPath(path) {
|
|
61
|
+
try {
|
|
62
|
+
return realpathSync(path);
|
|
63
|
+
} catch {
|
|
64
|
+
return resolve(path);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function prefixes(path) {
|
|
68
|
+
const configured = resolve(path) + sep;
|
|
69
|
+
const canonical = canonicalPath(path) + sep;
|
|
70
|
+
return canonical === configured ? [configured] : [configured, canonical];
|
|
71
|
+
}
|
|
72
|
+
function compileResolution(resolution) {
|
|
73
|
+
return {
|
|
74
|
+
entries: new Map(resolution.entries.map((entry) => [entry.name, entry])),
|
|
75
|
+
profilesDir: resolution.profilesDir,
|
|
76
|
+
profileDir: resolution.profileDir,
|
|
77
|
+
profilePaths: prefixes(resolution.profilesDir),
|
|
78
|
+
profile: resolution.profileDir === void 0 ? [] : prefixes(resolution.profileDir),
|
|
79
|
+
installationPaths: [...new Set(resolution.entries.filter((entry) => entry.scope === "installation").flatMap((entry) => prefixes(entry.packageDir)))],
|
|
80
|
+
linkedPaths: resolution.linkedRoots.flatMap((root) => prefixes(root.realPath)),
|
|
81
|
+
localPackageNames: new Set(resolution.localPackageNames),
|
|
82
|
+
esmRoutes: /* @__PURE__ */ new Map(),
|
|
83
|
+
cjsRoutes: /* @__PURE__ */ new Map()
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The interception layer of a profile is `<profileParent>/node_modules`: an entry occupies its name there, so its
|
|
88
|
+
* subpath misses continue above it, and a name without an entry continues at it.
|
|
89
|
+
*/
|
|
90
|
+
function computeProfileLayer(dir, active) {
|
|
91
|
+
const profileParent = dirname(dir);
|
|
92
|
+
return {
|
|
93
|
+
kind: "profile",
|
|
94
|
+
active,
|
|
95
|
+
localPrefix: dir + sep,
|
|
96
|
+
nativeAfter: join(profileParent, "package.json"),
|
|
97
|
+
after: join(dirname(profileParent), "package.json")
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
/** The interception layer of a module path: from its profile directory inside a profiles tree, or its linked root. */
|
|
101
|
+
function findInterceptionLayer(path, resolution) {
|
|
102
|
+
const treeRoot = resolution.profilePaths.find((prefix) => path.startsWith(prefix));
|
|
103
|
+
const activeProfile = resolution.profile.find((prefix) => path.startsWith(prefix));
|
|
104
|
+
const dir = treeRoot !== void 0 ? profileChild(path, treeRoot) : activeProfile?.slice(0, -1);
|
|
105
|
+
if (dir !== void 0) return computeProfileLayer(dir, activeProfile !== void 0);
|
|
106
|
+
if (!startsWithin(path, resolution.linkedPaths)) return void 0;
|
|
107
|
+
if (startsWithin(path, resolution.installationPaths)) return void 0;
|
|
108
|
+
return { kind: "linked" };
|
|
109
|
+
}
|
|
110
|
+
/** Package names a directory's current manifest lists as peers; an unreadable manifest lists none. */
|
|
111
|
+
function readPeerNames(directory) {
|
|
112
|
+
try {
|
|
113
|
+
const peers = JSON.parse(readFileSync(join(directory, "package.json"), "utf8")).peerDependencies;
|
|
114
|
+
return new Set(peers !== null && typeof peers === "object" ? Object.keys(peers) : []);
|
|
115
|
+
} catch (_error) {
|
|
116
|
+
return /* @__PURE__ */ new Set();
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
function startsWithin(path, roots) {
|
|
120
|
+
for (const root of roots) if (path.startsWith(root)) return true;
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* The profile directory owning a module inside the profiles tree: the first path segment below the tree root.
|
|
125
|
+
* @param path - module path below `treePrefix`.
|
|
126
|
+
* @param treePrefix - profiles directory with a trailing separator.
|
|
127
|
+
* @returns the profile directory without a trailing separator.
|
|
128
|
+
*/
|
|
129
|
+
function profileChild(path, treePrefix) {
|
|
130
|
+
const rest = path.slice(treePrefix.length);
|
|
131
|
+
const end = rest.indexOf(sep);
|
|
132
|
+
return treePrefix + (end < 0 ? rest : rest.slice(0, end));
|
|
133
|
+
}
|
|
134
|
+
function nativePackageDir(parent, name) {
|
|
135
|
+
for (const searchPath of createRequire(parent).resolve.paths(name)) {
|
|
136
|
+
const candidate = join(searchPath, name);
|
|
137
|
+
if (existsSync(join(candidate, "package.json"))) return candidate;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
function localPackageCandidate(searchPath, name, flavor) {
|
|
141
|
+
const candidate = join(searchPath, name);
|
|
142
|
+
const stat = statSync(candidate, { throwIfNoEntry: false });
|
|
143
|
+
return (flavor === "esm" ? stat?.isDirectory() === true : stat !== void 0 || [
|
|
144
|
+
".js",
|
|
145
|
+
".json",
|
|
146
|
+
".node"
|
|
147
|
+
].some((extension) => existsSync(candidate + extension))) ? candidate : void 0;
|
|
148
|
+
}
|
|
149
|
+
function selfReferenceName(parent) {
|
|
150
|
+
let current = dirname(parent);
|
|
151
|
+
while (true) {
|
|
152
|
+
const manifestPath = join(current, "package.json");
|
|
153
|
+
if (existsSync(manifestPath)) {
|
|
154
|
+
let manifest;
|
|
155
|
+
try {
|
|
156
|
+
manifest = JSON.parse(readFileSync(manifestPath, "utf8"));
|
|
157
|
+
} catch (_error) {
|
|
158
|
+
return null;
|
|
159
|
+
}
|
|
160
|
+
return typeof manifest.name === "string" && manifest.exports != null ? manifest.name : false;
|
|
161
|
+
}
|
|
162
|
+
/* v8 ignore next -- scoped module requests normally find an owning manifest before node_modules. */
|
|
163
|
+
if (basename(current) === "node_modules") return false;
|
|
164
|
+
const next = dirname(current);
|
|
165
|
+
if (next === current) return false;
|
|
166
|
+
current = next;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
function packageImportsTarget(parent, request, conditions) {
|
|
170
|
+
let current = dirname(parent);
|
|
171
|
+
while (true) {
|
|
172
|
+
const manifestPath = join(current, "package.json");
|
|
173
|
+
if (existsSync(manifestPath)) {
|
|
174
|
+
let manifest;
|
|
175
|
+
try {
|
|
176
|
+
manifest = JSON.parse(readFileSync(manifestPath, "utf8"));
|
|
177
|
+
} catch (_error) {
|
|
178
|
+
/* v8 ignore next -- native resolution cannot report MODULE_NOT_FOUND after an invalid scope manifest */
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
try {
|
|
182
|
+
const target = f(manifest, request, {
|
|
183
|
+
conditions: [...conditions],
|
|
184
|
+
unsafe: true
|
|
185
|
+
})?.[0];
|
|
186
|
+
return target !== void 0 && barePackageName(target) !== void 0 ? {
|
|
187
|
+
specifier: target,
|
|
188
|
+
parentURL: pathToFileURL(manifestPath).href
|
|
189
|
+
} : void 0;
|
|
190
|
+
} catch (_error) {
|
|
191
|
+
/* v8 ignore next -- native resolution cannot report MODULE_NOT_FOUND before selecting a valid mapping */
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
if (basename(current) === "node_modules") return void 0;
|
|
196
|
+
const next = dirname(current);
|
|
197
|
+
/* v8 ignore next -- a MODULE_NOT_FOUND package-import target always has an owning package scope */
|
|
198
|
+
if (next === current) return void 0;
|
|
199
|
+
current = next;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
function packageSearchPaths(entry, request, cjs) {
|
|
203
|
+
const name = barePackageName(request);
|
|
204
|
+
/* v8 ignore next -- interception routes are created only for bare package requests */
|
|
205
|
+
if (name === void 0) return cjs._nodeModulePaths(dirname(entry.declarer));
|
|
206
|
+
const suffix = sep + name.split("/").join(sep);
|
|
207
|
+
return entry.packageDir.endsWith(suffix) ? [entry.packageDir.slice(0, -suffix.length)] : cjs._nodeModulePaths(dirname(entry.declarer));
|
|
208
|
+
}
|
|
209
|
+
function localCandidateOwnsResolution(candidate, resolved, request, name) {
|
|
210
|
+
if (startsWithin(resolved, prefixes(candidate))) return true;
|
|
211
|
+
if (sameResolution(candidate, resolved)) return true;
|
|
212
|
+
if ([
|
|
213
|
+
".js",
|
|
214
|
+
".json",
|
|
215
|
+
".node"
|
|
216
|
+
].some((extension) => sameResolution(candidate + extension, resolved))) return true;
|
|
217
|
+
/* v8 ignore next -- a bounded native lookup can escape a candidate only through its root legacy main */
|
|
218
|
+
if (request !== name) return false;
|
|
219
|
+
try {
|
|
220
|
+
const manifest = JSON.parse(readFileSync(join(candidate, "package.json"), "utf8"));
|
|
221
|
+
/* v8 ignore next -- a bounded native lookup outside the package directory requires a legacy main */
|
|
222
|
+
if (typeof manifest.main !== "string") return false;
|
|
223
|
+
return sameResolution(createRequire(join(candidate, "package.json")).resolve(resolve(candidate, manifest.main)), resolved);
|
|
224
|
+
} catch (_error) {
|
|
225
|
+
/* v8 ignore next -- this helper runs only after the same native resolution succeeded */
|
|
226
|
+
return false;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
function isUnselectedPackageMiss(error) {
|
|
230
|
+
const failure = error;
|
|
231
|
+
return failure.code === "MODULE_NOT_FOUND" && failure.path === void 0;
|
|
232
|
+
}
|
|
233
|
+
function sameResolution(left, right) {
|
|
234
|
+
if (left === right) return true;
|
|
235
|
+
return canonicalPath(left) === canonicalPath(right);
|
|
236
|
+
}
|
|
237
|
+
/** One mutable pointer to the immutable runtime resolution. */
|
|
238
|
+
var ResolutionRouter = class {
|
|
239
|
+
nodeModulePaths;
|
|
240
|
+
current;
|
|
241
|
+
linkedTargets;
|
|
242
|
+
constructor(resolution, nodeModulePaths) {
|
|
243
|
+
this.nodeModulePaths = nodeModulePaths;
|
|
244
|
+
this.current = compileResolution(resolution);
|
|
245
|
+
this.linkedTargets = new Map(resolution.linkedRoots.map((root) => [root.name, root.realPath]));
|
|
246
|
+
}
|
|
247
|
+
replace(successor) {
|
|
248
|
+
const entries = new Map(successor.entries.map((entry) => [entry.name, entry]));
|
|
249
|
+
if (successor.profilesDir !== this.current.profilesDir || successor.profileDir !== this.current.profileDir) throw new Error("profile resolution: a successor cannot change its profile scope");
|
|
250
|
+
for (const [name, current] of this.current.entries) {
|
|
251
|
+
const next = entries.get(name);
|
|
252
|
+
if (next === void 0 && current.scope === "profile") continue;
|
|
253
|
+
if (next === void 0 || !sameResolution(current.packageDir, next.packageDir) || current.scope === "installation" && !sameResolution(current.declarer, next.declarer) || current.version !== next.version || current.scope !== next.scope) throw new Error(`profile resolution: replacing ${JSON.stringify(name)} requires a process restart`);
|
|
254
|
+
}
|
|
255
|
+
const localPackageNames = new Set(successor.localPackageNames);
|
|
256
|
+
for (const name of localPackageNames) if (!this.current.localPackageNames.has(name) && this.current.entries.has(name)) throw new Error(`profile resolution: overriding ${JSON.stringify(name)} locally requires a process restart`);
|
|
257
|
+
for (const root of successor.linkedRoots) {
|
|
258
|
+
const previous = this.linkedTargets.get(root.name);
|
|
259
|
+
if (previous !== void 0 && !sameResolution(previous, root.realPath)) throw new Error(`profile resolution: relinking ${JSON.stringify(root.name)} requires a process restart`);
|
|
260
|
+
}
|
|
261
|
+
const next = compileResolution(successor);
|
|
262
|
+
for (const { name, realPath } of successor.linkedRoots) if (!this.linkedTargets.has(name)) this.linkedTargets.set(name, realPath);
|
|
263
|
+
this.current = next;
|
|
264
|
+
}
|
|
265
|
+
/** Whether a module path has an interception layer: it lies in the profiles tree, the active profile, or a linked root. */
|
|
266
|
+
hasInterceptionLayerForPath(path) {
|
|
267
|
+
return findInterceptionLayer(path, this.current) !== void 0;
|
|
268
|
+
}
|
|
269
|
+
/** Whether an importer URL is scoped; the answer is memoized with the importer's routes. */
|
|
270
|
+
hasInterceptionLayerForUrl(parentURL) {
|
|
271
|
+
return this.getOrCreateParentRoutesForUrl(parentURL) !== false;
|
|
272
|
+
}
|
|
273
|
+
createParentRoutes(parent, resolution) {
|
|
274
|
+
const layer = findInterceptionLayer(parent, resolution);
|
|
275
|
+
return layer === void 0 ? void 0 : {
|
|
276
|
+
parent,
|
|
277
|
+
layer,
|
|
278
|
+
requests: /* @__PURE__ */ new Map()
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
getOrCreateParentRoutesForUrl(parentURL) {
|
|
282
|
+
const resolution = this.current;
|
|
283
|
+
let parentRoutes = resolution.esmRoutes.get(parentURL);
|
|
284
|
+
if (parentRoutes !== void 0) return parentRoutes;
|
|
285
|
+
let parent;
|
|
286
|
+
try {
|
|
287
|
+
parent = fileURLToPath(parentURL);
|
|
288
|
+
} catch {
|
|
289
|
+
parent = void 0;
|
|
290
|
+
}
|
|
291
|
+
parentRoutes = parent === void 0 ? false : this.createParentRoutes(parent, resolution) ?? false;
|
|
292
|
+
resolution.esmRoutes.set(parentURL, parentRoutes);
|
|
293
|
+
return parentRoutes;
|
|
294
|
+
}
|
|
295
|
+
routeScoped(request, parentRoutes, resolution, flavor, cjs) {
|
|
296
|
+
const { parent, layer, requests } = parentRoutes;
|
|
297
|
+
const memo = layer.kind === "profile" && (cjs === void 0 || cjs.cacheable);
|
|
298
|
+
const name = barePackageName(request);
|
|
299
|
+
if (name === void 0) return void 0;
|
|
300
|
+
if (parentRoutes.selfReferenceName === void 0 || !memo) parentRoutes.selfReferenceName = selfReferenceName(parent);
|
|
301
|
+
if (parentRoutes.selfReferenceName === name || parentRoutes.selfReferenceName === null) {
|
|
302
|
+
const state = { route: { kind: "native" } };
|
|
303
|
+
if (memo) requests.set(request, state);
|
|
304
|
+
return state;
|
|
305
|
+
}
|
|
306
|
+
if (layer.kind === "linked") return this.routeLinked(request, name, parent, resolution, flavor, cjs);
|
|
307
|
+
const target = resolution.entries.get(name);
|
|
308
|
+
const candidates = [];
|
|
309
|
+
const localSearchPaths = [];
|
|
310
|
+
for (const searchPath of createRequire(parent).resolve.paths(name)) {
|
|
311
|
+
if (!searchPath.startsWith(layer.localPrefix)) break;
|
|
312
|
+
localSearchPaths.push(searchPath);
|
|
313
|
+
const candidate = localPackageCandidate(searchPath, name, flavor);
|
|
314
|
+
if (candidate !== void 0) candidates.push(candidate);
|
|
315
|
+
}
|
|
316
|
+
if (candidates.length > 0) if (cjs !== void 0) try {
|
|
317
|
+
const resolved = cjs.resolveNative(localSearchPaths);
|
|
318
|
+
const selected = candidates.find((candidate) => localCandidateOwnsResolution(candidate, resolved, request, name));
|
|
319
|
+
if (selected !== void 0) {
|
|
320
|
+
const state = {
|
|
321
|
+
route: {
|
|
322
|
+
kind: "native",
|
|
323
|
+
packageDir: selected
|
|
324
|
+
},
|
|
325
|
+
packageDir: selected,
|
|
326
|
+
cjs: resolved
|
|
327
|
+
};
|
|
328
|
+
if (memo) requests.set(request, state);
|
|
329
|
+
return state;
|
|
330
|
+
}
|
|
331
|
+
} catch (error) {
|
|
332
|
+
if (!isUnselectedPackageMiss(error)) throw error;
|
|
333
|
+
}
|
|
334
|
+
else {
|
|
335
|
+
const selected = candidates[0];
|
|
336
|
+
const state = {
|
|
337
|
+
route: {
|
|
338
|
+
kind: "native",
|
|
339
|
+
packageDir: selected
|
|
340
|
+
},
|
|
341
|
+
packageDir: selected
|
|
342
|
+
};
|
|
343
|
+
requests.set(request, state);
|
|
344
|
+
return state;
|
|
345
|
+
}
|
|
346
|
+
const route = target !== void 0 && (target.scope === "installation" || layer.active) ? {
|
|
347
|
+
kind: "interception",
|
|
348
|
+
entry: target,
|
|
349
|
+
after: layer.after
|
|
350
|
+
} : {
|
|
351
|
+
kind: "native-after-interception",
|
|
352
|
+
parent: layer.nativeAfter
|
|
353
|
+
};
|
|
354
|
+
const state = { route };
|
|
355
|
+
if (route.kind === "interception" && memo) requests.set(request, state);
|
|
356
|
+
return state;
|
|
357
|
+
}
|
|
358
|
+
routeLinked(request, name, parent, resolution, flavor, cjs) {
|
|
359
|
+
const target = resolution.entries.get(name);
|
|
360
|
+
if (target === void 0) return { route: { kind: "native" } };
|
|
361
|
+
const ancestors = this.nodeModulePaths(dirname(parent));
|
|
362
|
+
const ancestorSet = new Set(ancestors);
|
|
363
|
+
const searchPaths = flavor === "esm" ? ancestors : createRequire(parent).resolve.paths(name);
|
|
364
|
+
for (const searchPath of searchPaths) {
|
|
365
|
+
const directory = dirname(searchPath);
|
|
366
|
+
if (ancestorSet.has(searchPath) && readPeerNames(directory).has(name)) {
|
|
367
|
+
const route = {
|
|
368
|
+
kind: "interception",
|
|
369
|
+
entry: target,
|
|
370
|
+
after: join(dirname(directory), "package.json")
|
|
371
|
+
};
|
|
372
|
+
if (cjs === void 0) return { route };
|
|
373
|
+
try {
|
|
374
|
+
const resolved = cjs.resolveEntry(target, route.after);
|
|
375
|
+
if (localCandidateOwnsResolution(target.packageDir, resolved, request, name)) return {
|
|
376
|
+
route,
|
|
377
|
+
packageDir: target.packageDir,
|
|
378
|
+
cjs: resolved
|
|
379
|
+
};
|
|
380
|
+
} catch (error) {
|
|
381
|
+
if (!isUnselectedPackageMiss(error)) throw error;
|
|
382
|
+
}
|
|
383
|
+
continue;
|
|
384
|
+
}
|
|
385
|
+
const candidate = localPackageCandidate(searchPath, name, flavor);
|
|
386
|
+
if (candidate === void 0) continue;
|
|
387
|
+
if (cjs === void 0) return {
|
|
388
|
+
route: {
|
|
389
|
+
kind: "native",
|
|
390
|
+
packageDir: candidate
|
|
391
|
+
},
|
|
392
|
+
packageDir: candidate
|
|
393
|
+
};
|
|
394
|
+
try {
|
|
395
|
+
const resolved = cjs.resolveNative([searchPath]);
|
|
396
|
+
if (localCandidateOwnsResolution(candidate, resolved, request, name)) return {
|
|
397
|
+
route: {
|
|
398
|
+
kind: "native",
|
|
399
|
+
packageDir: candidate
|
|
400
|
+
},
|
|
401
|
+
packageDir: candidate,
|
|
402
|
+
cjs: resolved
|
|
403
|
+
};
|
|
404
|
+
} catch (error) {
|
|
405
|
+
if (!isUnselectedPackageMiss(error)) throw error;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
return cjs === void 0 ? { route: { kind: "native" } } : {
|
|
409
|
+
route: { kind: "native" },
|
|
410
|
+
cjs: cjs.resolveNative([])
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
routeLocalPackage(request, parentRoutes, resolution) {
|
|
414
|
+
const name = barePackageName(request);
|
|
415
|
+
const { layer } = parentRoutes;
|
|
416
|
+
if (name === void 0 || layer.kind !== "profile" || !layer.active || !resolution.localPackageNames.has(name)) return void 0;
|
|
417
|
+
const state = { route: { kind: "native" } };
|
|
418
|
+
parentRoutes.requests.set(request, state);
|
|
419
|
+
return state;
|
|
420
|
+
}
|
|
421
|
+
routeUrl(request, parentURL) {
|
|
422
|
+
const resolution = this.current;
|
|
423
|
+
const parentRoutes = this.getOrCreateParentRoutesForUrl(parentURL);
|
|
424
|
+
if (parentRoutes === false) return void 0;
|
|
425
|
+
const cached = parentRoutes.requests.get(request);
|
|
426
|
+
if (cached !== void 0) return cached;
|
|
427
|
+
const local = this.routeLocalPackage(request, parentRoutes, resolution);
|
|
428
|
+
if (local !== void 0) return local;
|
|
429
|
+
return this.routeScoped(request, parentRoutes, resolution, "esm");
|
|
430
|
+
}
|
|
431
|
+
routePath(request, parent, cjs) {
|
|
432
|
+
const resolution = this.current;
|
|
433
|
+
let parentRoutes = resolution.cjsRoutes.get(parent);
|
|
434
|
+
if (parentRoutes === false) return void 0;
|
|
435
|
+
const cached = cjs.cacheable ? parentRoutes?.requests.get(request) : void 0;
|
|
436
|
+
if (cached !== void 0) return cached;
|
|
437
|
+
if (parentRoutes === void 0) {
|
|
438
|
+
parentRoutes = this.createParentRoutes(parent, resolution) ?? false;
|
|
439
|
+
resolution.cjsRoutes.set(parent, parentRoutes);
|
|
440
|
+
if (parentRoutes === false) return void 0;
|
|
441
|
+
}
|
|
442
|
+
return this.routeScoped(request, parentRoutes, resolution, "cjs", cjs);
|
|
443
|
+
}
|
|
444
|
+
packageDir(specifier, parentURL) {
|
|
445
|
+
const name = barePackageName(specifier);
|
|
446
|
+
if (name === void 0) return void 0;
|
|
447
|
+
const state = this.routeUrl(name, parentURL);
|
|
448
|
+
if (state?.route.kind === "interception") return state.route.entry.packageDir;
|
|
449
|
+
if (state?.packageDir !== void 0) return state.packageDir;
|
|
450
|
+
let parent;
|
|
451
|
+
try {
|
|
452
|
+
parent = state?.route.kind === "native-after-interception" ? state.route.parent : fileURLToPath(parentURL);
|
|
453
|
+
} catch {
|
|
454
|
+
return;
|
|
455
|
+
}
|
|
456
|
+
const found = nativePackageDir(parent, name);
|
|
457
|
+
if (state !== void 0 && found !== void 0) state.packageDir = found;
|
|
458
|
+
return found;
|
|
459
|
+
}
|
|
460
|
+
};
|
|
461
|
+
function internalModules() {
|
|
462
|
+
const addon = createRequire(import.meta.url)("node-addon-require-builtin");
|
|
463
|
+
const esmModule = addon.requireBuiltin("internal/modules/esm/loader");
|
|
464
|
+
const cjsModule = addon.requireBuiltin("internal/modules/cjs/loader");
|
|
465
|
+
const cjsHelpers = addon.requireBuiltin("internal/modules/helpers");
|
|
466
|
+
const esmUtils = addon.requireBuiltin("internal/modules/esm/utils");
|
|
467
|
+
const esmResolve = addon.requireBuiltin("internal/modules/esm/resolve");
|
|
468
|
+
const esm = esmModule.getOrInitializeCascadedLoader();
|
|
469
|
+
const modern = "getOrCreateModuleJob" in esm;
|
|
470
|
+
/* v8 ignore start -- the supported Node 22/24/26 matrix validates each available Internal interface */
|
|
471
|
+
if (typeof esm.resolveSync !== "function" || typeof Reflect.get(esm, modern ? "getOrCreateModuleJob" : "getModuleJobForImport") !== "function" || !modern && typeof Reflect.get(esm, "resolve") !== "function" || typeof cjsModule.Module._resolveFilename !== "function" || typeof cjsHelpers.getCjsConditions !== "function" || typeof esmUtils.getDefaultConditions !== "function" || typeof esmResolve.defaultResolve !== "function") throw new Error("profile resolution: unsupported Node module loader");
|
|
472
|
+
/* v8 ignore stop */
|
|
473
|
+
return {
|
|
474
|
+
esm,
|
|
475
|
+
esmDefaultResolve: (specifier, context) => esmResolve.defaultResolve(specifier, context),
|
|
476
|
+
esmConditions: esmUtils.getDefaultConditions(),
|
|
477
|
+
cjs: cjsModule.Module,
|
|
478
|
+
cjsConditions: cjsHelpers.getCjsConditions(),
|
|
479
|
+
modern
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
* Replace a resolver error's message and the same text in its stack.
|
|
484
|
+
* Node's module-hooks thread serializes errors and returns the stack accessor as a read-only configurable
|
|
485
|
+
* data property, so a rejected stack assignment redefines the property value.
|
|
486
|
+
* @param error - resolver error to update in place.
|
|
487
|
+
* @param message - replacement message.
|
|
488
|
+
*/
|
|
489
|
+
function replaceErrorMessage(error, message) {
|
|
490
|
+
const { message: originalMessage, stack } = error;
|
|
491
|
+
error.message = message;
|
|
492
|
+
/* v8 ignore next -- Node's resolver errors always carry a stack */
|
|
493
|
+
if (stack === void 0) return;
|
|
494
|
+
const replaced = stack.replace(originalMessage, message);
|
|
495
|
+
if (!Reflect.set(error, "stack", replaced)) Object.defineProperty(error, "stack", { value: replaced });
|
|
496
|
+
}
|
|
497
|
+
function throwWithImporter(error, routedParent, parent) {
|
|
498
|
+
const code = error.code;
|
|
499
|
+
if (error instanceof Error && (code === "ERR_MODULE_NOT_FOUND" || code === "ERR_PACKAGE_PATH_NOT_EXPORTED")) {
|
|
500
|
+
const routedPath = fileURLToPath(routedParent);
|
|
501
|
+
const parentPath = fileURLToPath(parent);
|
|
502
|
+
replaceErrorMessage(error, error.message.replaceAll(routedParent, parent).replaceAll(routedPath, parentPath));
|
|
503
|
+
}
|
|
504
|
+
throw error;
|
|
505
|
+
}
|
|
506
|
+
function throwWithoutCjsAnchor(error, anchor) {
|
|
507
|
+
const resolved = error;
|
|
508
|
+
const requireStack = resolved.requireStack;
|
|
509
|
+
if (error instanceof Error && resolved.code === "MODULE_NOT_FOUND" && requireStack?.[0] !== void 0 && sameResolution(requireStack[0], anchor)) {
|
|
510
|
+
const originalMessage = error.message;
|
|
511
|
+
const originalBlock = `\nRequire stack:\n${requireStack.map((path) => `- ${path}`).join("\n")}`;
|
|
512
|
+
const remaining = requireStack.slice(1);
|
|
513
|
+
/* v8 ignore next -- routed calls always retain the original importing module */
|
|
514
|
+
const replacement = remaining.length === 0 ? "" : `\nRequire stack:\n${remaining.map((path) => `- ${path}`).join("\n")}`;
|
|
515
|
+
error.message = originalMessage.replace(originalBlock, replacement);
|
|
516
|
+
resolved.requireStack = remaining;
|
|
517
|
+
const stack = error.stack;
|
|
518
|
+
/* v8 ignore next -- Node's resolver errors always carry a stack */
|
|
519
|
+
if (stack !== void 0) error.stack = stack.replace(originalMessage, error.message);
|
|
520
|
+
}
|
|
521
|
+
throw error;
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* Install one runtime resolution as the interception on Node's default ESM and CommonJS resolvers.
|
|
525
|
+
* @param resolution - complete package table and profile scope.
|
|
526
|
+
* @returns an interception that publishes a successor or restores the native methods.
|
|
527
|
+
*/
|
|
528
|
+
function installRuntimeInterception(resolution) {
|
|
529
|
+
const { esm, esmDefaultResolve, esmConditions, cjs, cjsConditions, modern } = internalModules();
|
|
530
|
+
const router = new ResolutionRouter(resolution, (directory) => cjs._nodeModulePaths(directory));
|
|
531
|
+
let delegatedEsm;
|
|
532
|
+
const adaptEsm = (native) => {
|
|
533
|
+
const adapted = (request, parent, attributes) => {
|
|
534
|
+
const delegated = delegatedEsm;
|
|
535
|
+
/* v8 ignore next -- reentry requires a separate synchronous Node hook; supported launches install none */
|
|
536
|
+
if (delegated !== void 0 && delegated.parent === parent && delegated.request === request) return native(request, parent, attributes);
|
|
537
|
+
if (parent === void 0 || !router.hasInterceptionLayerForUrl(parent)) return native(request, parent, attributes);
|
|
538
|
+
const state = router.routeUrl(request, parent);
|
|
539
|
+
if (state === void 0) {
|
|
540
|
+
const target = request[0] === "#" ? packageImportsTarget(fileURLToPath(parent), request, esmConditions) : void 0;
|
|
541
|
+
if (target === void 0) return native(request, parent, attributes);
|
|
542
|
+
const restoreImporter = (error) => throwWithImporter(error, target.parentURL, parent);
|
|
543
|
+
let expected;
|
|
544
|
+
try {
|
|
545
|
+
expected = adapted(target.specifier, target.parentURL, attributes);
|
|
546
|
+
/* v8 ignore next -- Node 24+ resolves synchronously; the Node 22 matrix covers its Promise result */
|
|
547
|
+
if (expected instanceof Promise) expected = expected.catch(restoreImporter);
|
|
548
|
+
} catch (error) {
|
|
549
|
+
return restoreImporter(error);
|
|
550
|
+
}
|
|
551
|
+
return expected;
|
|
552
|
+
}
|
|
553
|
+
const cacheable = attributes === EMPTY_ATTRIBUTES || Object.keys(attributes).length === 0;
|
|
554
|
+
if (cacheable && state.esm !== void 0) return state.esm;
|
|
555
|
+
const route = state.route;
|
|
556
|
+
if (route.kind === "native") {
|
|
557
|
+
const result = native(request, parent, attributes);
|
|
558
|
+
if (cacheable && !(result instanceof Promise)) state.esm = result;
|
|
559
|
+
return result;
|
|
560
|
+
}
|
|
561
|
+
const routedParent = pathToFileURL(route.kind === "interception" ? route.entry.declarer : route.parent).href;
|
|
562
|
+
const previous = delegatedEsm;
|
|
563
|
+
delegatedEsm = {
|
|
564
|
+
parent: routedParent,
|
|
565
|
+
request
|
|
566
|
+
};
|
|
567
|
+
const restoreImporter = (error) => throwWithImporter(error, routedParent, parent);
|
|
568
|
+
try {
|
|
569
|
+
let result;
|
|
570
|
+
try {
|
|
571
|
+
result = native(request, routedParent, attributes);
|
|
572
|
+
} catch (error) {
|
|
573
|
+
return restoreImporter(error);
|
|
574
|
+
}
|
|
575
|
+
/* v8 ignore next -- Node 24+ resolves synchronously; the Node 22 matrix covers its Promise result */
|
|
576
|
+
if (result instanceof Promise) return result.catch(restoreImporter);
|
|
577
|
+
if (cacheable) state.esm = result;
|
|
578
|
+
return result;
|
|
579
|
+
} finally {
|
|
580
|
+
delegatedEsm = previous;
|
|
581
|
+
}
|
|
582
|
+
};
|
|
583
|
+
return adapted;
|
|
584
|
+
};
|
|
585
|
+
let restoreEsm;
|
|
586
|
+
/* v8 ignore else -- CI coverage runs Node 24 v2; the Node 22 matrix exercises the v1 adapter */
|
|
587
|
+
if (modern) {
|
|
588
|
+
const loader = esm;
|
|
589
|
+
const original = Reflect.get(loader, "resolveSync");
|
|
590
|
+
const resolveRequest = adaptEsm((request, parent, attributes) => original.call(loader, parent, {
|
|
591
|
+
specifier: request,
|
|
592
|
+
attributes
|
|
593
|
+
}));
|
|
594
|
+
const wrapped = (parent, request, ...rest) => rest.length ? Reflect.apply(original, loader, [
|
|
595
|
+
parent,
|
|
596
|
+
request,
|
|
597
|
+
...rest
|
|
598
|
+
]) : resolveRequest(request.specifier, parent, request.attributes ?? EMPTY_ATTRIBUTES);
|
|
599
|
+
loader.resolveSync = wrapped;
|
|
600
|
+
restoreEsm = () => {
|
|
601
|
+
/* v8 ignore else -- interceptions are disposed in reverse installation order */
|
|
602
|
+
if (loader.resolveSync === wrapped) loader.resolveSync = original;
|
|
603
|
+
};
|
|
604
|
+
} else {
|
|
605
|
+
const loader = esm;
|
|
606
|
+
const original = Reflect.get(loader, "resolve");
|
|
607
|
+
const originalSync = Reflect.get(loader, "resolveSync");
|
|
608
|
+
const resolveRequest = adaptEsm((request, parent, attributes) => original.call(loader, request, parent, attributes));
|
|
609
|
+
const resolveRequestSync = adaptEsm((request, parent, attributes) => originalSync.call(loader, request, parent, attributes));
|
|
610
|
+
const wrapped = (request, parent, attributes = EMPTY_ATTRIBUTES) => resolveRequest(request, parent, attributes);
|
|
611
|
+
const wrappedSync = (request, parent, attributes = EMPTY_ATTRIBUTES) => resolveRequestSync(request, parent, attributes);
|
|
612
|
+
loader.resolve = wrapped;
|
|
613
|
+
loader.resolveSync = wrappedSync;
|
|
614
|
+
restoreEsm = () => {
|
|
615
|
+
if (loader.resolve === wrapped) loader.resolve = original;
|
|
616
|
+
if (loader.resolveSync === wrappedSync) loader.resolveSync = originalSync;
|
|
617
|
+
};
|
|
618
|
+
}
|
|
619
|
+
const originalFilename = Reflect.get(cjs, "_resolveFilename");
|
|
620
|
+
let delegatedCjs = 0;
|
|
621
|
+
const resolveRoutedCjs = (request, routed, parent, main, options) => {
|
|
622
|
+
const anchor = routed.kind === "interception" ? routed.entry.declarer : routed.parent;
|
|
623
|
+
const synthetic = new cjs(anchor);
|
|
624
|
+
synthetic.parent = parent;
|
|
625
|
+
synthetic.filename = anchor;
|
|
626
|
+
synthetic.paths = routed.kind === "interception" ? packageSearchPaths(routed.entry, request, cjs) : cjs._nodeModulePaths(dirname(anchor));
|
|
627
|
+
try {
|
|
628
|
+
return originalFilename.call(cjs, request, synthetic, main, options);
|
|
629
|
+
} catch (error) {
|
|
630
|
+
return throwWithoutCjsAnchor(error, anchor);
|
|
631
|
+
}
|
|
632
|
+
};
|
|
633
|
+
const resolveNativeCjs = (request, searchPaths, parent, parentFilename, main, conditions) => {
|
|
634
|
+
const synthetic = new cjs(parentFilename);
|
|
635
|
+
if (parent.parent !== void 0) synthetic.parent = parent.parent;
|
|
636
|
+
synthetic.filename = parentFilename;
|
|
637
|
+
synthetic.paths = [...searchPaths];
|
|
638
|
+
const options = conditions === void 0 ? void 0 : { conditions };
|
|
639
|
+
return originalFilename.call(cjs, request, synthetic, main, options);
|
|
640
|
+
};
|
|
641
|
+
const resolvePackageImportCjs = (target, conditions) => {
|
|
642
|
+
const state = router.routeUrl(target.specifier, target.parentURL);
|
|
643
|
+
const resolveFrom = (parentURL) => fileURLToPath(esmDefaultResolve(target.specifier, {
|
|
644
|
+
parentURL,
|
|
645
|
+
conditions: [...conditions]
|
|
646
|
+
}).url);
|
|
647
|
+
/* v8 ignore next -- the target manifest was found inside the established profile scope */
|
|
648
|
+
if (state === void 0) return resolveFrom(target.parentURL);
|
|
649
|
+
if (state.route.kind === "native") return resolveFrom(target.parentURL);
|
|
650
|
+
const route = state.route;
|
|
651
|
+
if (route.kind === "native-after-interception") return resolveFrom(pathToFileURL(route.parent).href);
|
|
652
|
+
return resolveFrom(pathToFileURL(route.entry.declarer).href);
|
|
653
|
+
};
|
|
654
|
+
const wrappedFilename = (request, parent, main, options) => {
|
|
655
|
+
if (delegatedCjs || !parent?.filename || options?.paths !== void 0) return originalFilename.call(cjs, request, parent, main, options);
|
|
656
|
+
const parentFilename = parent.filename;
|
|
657
|
+
const cacheable = options?.conditions === void 0;
|
|
658
|
+
const routedOptions = options?.conditions === void 0 ? void 0 : { conditions: options.conditions };
|
|
659
|
+
const state = router.routePath(request, parentFilename, {
|
|
660
|
+
cacheable,
|
|
661
|
+
resolveNative: (searchPaths) => resolveNativeCjs(request, searchPaths, parent, parentFilename, main, options?.conditions),
|
|
662
|
+
resolveEntry: (entry, after) => {
|
|
663
|
+
delegatedCjs++;
|
|
664
|
+
try {
|
|
665
|
+
return resolveRoutedCjs(request, {
|
|
666
|
+
kind: "interception",
|
|
667
|
+
entry,
|
|
668
|
+
after
|
|
669
|
+
}, parent, main, routedOptions);
|
|
670
|
+
} finally {
|
|
671
|
+
delegatedCjs--;
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
});
|
|
675
|
+
if (state === void 0) {
|
|
676
|
+
const scoped = router.hasInterceptionLayerForPath(parentFilename);
|
|
677
|
+
const conditions = options?.conditions ?? cjsConditions;
|
|
678
|
+
const target = request[0] === "#" && scoped ? packageImportsTarget(parentFilename, request, conditions) : void 0;
|
|
679
|
+
if (target === void 0) return originalFilename.call(cjs, request, parent, main, options);
|
|
680
|
+
return resolvePackageImportCjs(target, conditions);
|
|
681
|
+
}
|
|
682
|
+
if (state.cjs !== void 0) return state.cjs;
|
|
683
|
+
const route = state.route;
|
|
684
|
+
if (route.kind === "native") {
|
|
685
|
+
const result = originalFilename.call(cjs, request, parent, main, options);
|
|
686
|
+
if (cacheable) state.cjs = result;
|
|
687
|
+
return result;
|
|
688
|
+
}
|
|
689
|
+
delegatedCjs++;
|
|
690
|
+
try {
|
|
691
|
+
let expected;
|
|
692
|
+
try {
|
|
693
|
+
expected = resolveRoutedCjs(request, route, parent, main, routedOptions);
|
|
694
|
+
} catch (error) {
|
|
695
|
+
if (route.kind !== "interception" || !isUnselectedPackageMiss(error)) throw error;
|
|
696
|
+
expected = resolveRoutedCjs(request, {
|
|
697
|
+
kind: "native-after-interception",
|
|
698
|
+
parent: route.after
|
|
699
|
+
}, parent, main, routedOptions);
|
|
700
|
+
}
|
|
701
|
+
if (cacheable) state.cjs = expected;
|
|
702
|
+
return expected;
|
|
703
|
+
} finally {
|
|
704
|
+
delegatedCjs--;
|
|
705
|
+
}
|
|
706
|
+
};
|
|
707
|
+
cjs._resolveFilename = wrappedFilename;
|
|
708
|
+
return {
|
|
709
|
+
packageDir(specifier, parentURL) {
|
|
710
|
+
return router.packageDir(specifier, parentURL);
|
|
711
|
+
},
|
|
712
|
+
replace(next) {
|
|
713
|
+
router.replace(next);
|
|
714
|
+
},
|
|
715
|
+
dispose() {
|
|
716
|
+
/* v8 ignore else -- interceptions are disposed in reverse installation order */
|
|
717
|
+
if (cjs._resolveFilename === wrappedFilename) cjs._resolveFilename = originalFilename;
|
|
718
|
+
restoreEsm();
|
|
719
|
+
}
|
|
720
|
+
};
|
|
721
|
+
}
|
|
722
|
+
//#endregion
|
|
723
|
+
//#region lib/types/profile-resolution/worker-bootstrap.js
|
|
724
|
+
/** Install the inherited runtime resolution in one Harness-owned Worker. */
|
|
725
|
+
const registration = getEnvironmentData("@qlzt/dsh-app-boot/profile-resolution");
|
|
726
|
+
if (registration !== void 0) installRuntimeInterception(registration.resolution);
|
|
727
|
+
//#endregion
|
|
728
|
+
export {};
|