@codefast/di 0.5.0-canary.8 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +387 -0
- package/README.md +3 -1
- package/dist/binding.d.ts +41 -22
- package/dist/binding.d.ts.map +1 -1
- package/dist/binding.js +11 -0
- package/dist/binding.js.map +1 -1
- package/dist/container/binding-builders.d.ts.map +1 -1
- package/dist/container/binding-builders.js +8 -5
- package/dist/container/binding-builders.js.map +1 -1
- package/dist/container/container.d.ts.map +1 -1
- package/dist/container/container.js +67 -110
- package/dist/container/container.js.map +1 -1
- package/dist/errors.d.ts +10 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +13 -0
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/introspection/inspector.d.ts +0 -1
- package/dist/introspection/inspector.d.ts.map +1 -1
- package/dist/introspection/inspector.js +2 -7
- package/dist/introspection/inspector.js.map +1 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +46 -33
- package/dist/registry.js.map +1 -1
- package/dist/resolution/activation-need.d.ts +4 -2
- package/dist/resolution/activation-need.d.ts.map +1 -1
- package/dist/resolution/activation-need.js +15 -11
- package/dist/resolution/activation-need.js.map +1 -1
- package/dist/resolution/binding-lookup-cache.d.ts +1 -1
- package/dist/resolution/binding-lookup-cache.d.ts.map +1 -1
- package/dist/resolution/binding-lookup-cache.js +18 -2
- package/dist/resolution/binding-lookup-cache.js.map +1 -1
- package/dist/resolution/binding-scope.d.ts +5 -2
- package/dist/resolution/binding-scope.d.ts.map +1 -1
- package/dist/resolution/binding-scope.js +6 -17
- package/dist/resolution/binding-scope.js.map +1 -1
- package/dist/resolution/binding-select.d.ts +8 -1
- package/dist/resolution/binding-select.d.ts.map +1 -1
- package/dist/resolution/binding-select.js +13 -32
- package/dist/resolution/binding-select.js.map +1 -1
- package/dist/resolution/diagnostics.d.ts +2 -2
- package/dist/resolution/diagnostics.d.ts.map +1 -1
- package/dist/resolution/environment.d.ts +47 -21
- package/dist/resolution/environment.d.ts.map +1 -1
- package/dist/resolution/environment.js +134 -31
- package/dist/resolution/environment.js.map +1 -1
- package/dist/resolution/instantiation-plan.d.ts.map +1 -1
- package/dist/resolution/instantiation-plan.js +1 -1
- package/dist/resolution/instantiation-plan.js.map +1 -1
- package/dist/resolution/lifecycle.d.ts.map +1 -1
- package/dist/resolution/lifecycle.js +46 -53
- package/dist/resolution/lifecycle.js.map +1 -1
- package/dist/resolution/resolution-path.d.ts +82 -6
- package/dist/resolution/resolution-path.d.ts.map +1 -1
- package/dist/resolution/resolution-path.js +66 -8
- package/dist/resolution/resolution-path.js.map +1 -1
- package/dist/resolution/resolve-options.d.ts +41 -4
- package/dist/resolution/resolve-options.d.ts.map +1 -1
- package/dist/resolution/resolve-options.js +25 -1
- package/dist/resolution/resolve-options.js.map +1 -1
- package/dist/resolution/resolver.d.ts +29 -11
- package/dist/resolution/resolver.d.ts.map +1 -1
- package/dist/resolution/resolver.js +417 -564
- package/dist/resolution/resolver.js.map +1 -1
- package/dist/resolution/scope.d.ts +4 -0
- package/dist/resolution/scope.d.ts.map +1 -1
- package/dist/resolution/scope.js +8 -0
- package/dist/resolution/scope.js.map +1 -1
- package/package.json +5 -11
- package/src/binding.ts +46 -23
- package/src/container/binding-builders.ts +8 -5
- package/src/container/container.ts +72 -119
- package/src/errors.ts +17 -0
- package/src/index.ts +3 -1
- package/src/introspection/inspector.ts +2 -8
- package/src/registry.ts +52 -35
- package/src/resolution/activation-need.ts +18 -14
- package/src/resolution/binding-lookup-cache.ts +18 -2
- package/src/resolution/binding-scope.ts +6 -17
- package/src/resolution/binding-select.ts +14 -35
- package/src/resolution/diagnostics.ts +2 -2
- package/src/resolution/environment.ts +181 -35
- package/src/resolution/instantiation-plan.ts +5 -5
- package/src/resolution/lifecycle.ts +55 -53
- package/src/resolution/resolution-path.ts +119 -25
- package/src/resolution/resolve-options.ts +51 -4
- package/src/resolution/resolver.ts +582 -785
- package/src/resolution/scope.ts +10 -0
|
@@ -9,17 +9,20 @@ export class LifecycleManager {
|
|
|
9
9
|
#activationHooks;
|
|
10
10
|
#deactivationHooks;
|
|
11
11
|
#activationVersion = 0;
|
|
12
|
+
// One-entry cache in front of the map: a resolve loop asks about the same token over and over,
|
|
13
|
+
// and registration is the only thing that can change the answer.
|
|
14
|
+
#cachedToken;
|
|
15
|
+
#cachedHooks;
|
|
12
16
|
registerActivation(token, handler) {
|
|
13
17
|
this.#activationVersion += 1;
|
|
18
|
+
this.#cachedToken = undefined;
|
|
19
|
+
this.#cachedHooks = undefined;
|
|
14
20
|
// ✓ TS6.0: Map.getOrInsert (ES2025)
|
|
15
21
|
const list = (this.#activationHooks ??= new Map()).getOrInsert(token, []);
|
|
16
22
|
list.push(handler);
|
|
17
23
|
}
|
|
18
24
|
hasActivationHandlers(token) {
|
|
19
|
-
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
const list = this.#activationHooks.get(token);
|
|
25
|
+
const list = this.activationHandlersFor(token);
|
|
23
26
|
return list !== undefined && list.length > 0;
|
|
24
27
|
}
|
|
25
28
|
get activationVersion() {
|
|
@@ -27,7 +30,18 @@ export class LifecycleManager {
|
|
|
27
30
|
}
|
|
28
31
|
/** Container-level activation handlers for a token — hot-path accessor, no copies. */
|
|
29
32
|
activationHandlersFor(token) {
|
|
30
|
-
|
|
33
|
+
const hooks = this.#activationHooks;
|
|
34
|
+
if (hooks === undefined) {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
const key = token;
|
|
38
|
+
if (key === this.#cachedToken) {
|
|
39
|
+
return this.#cachedHooks;
|
|
40
|
+
}
|
|
41
|
+
const list = hooks.get(key);
|
|
42
|
+
this.#cachedToken = key;
|
|
43
|
+
this.#cachedHooks = list;
|
|
44
|
+
return list;
|
|
31
45
|
}
|
|
32
46
|
registerDeactivation(token, handler) {
|
|
33
47
|
const list = (this.#deactivationHooks ??= new Map()).getOrInsert(token, []);
|
|
@@ -36,18 +50,10 @@ export class LifecycleManager {
|
|
|
36
50
|
async runActivation(resolutionContext, binding, instance, metadataReader) {
|
|
37
51
|
let activatedInstance = instance;
|
|
38
52
|
// 1. @postConstruct() — after TC39 construction (constructor + accessor addInitializer callbacks)
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
if (
|
|
42
|
-
|
|
43
|
-
const method = activatedInstance[methodName];
|
|
44
|
-
if (typeof method === "function") {
|
|
45
|
-
const hookResult = method.call(activatedInstance);
|
|
46
|
-
if (hookResult instanceof Promise) {
|
|
47
|
-
await hookResult;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
53
|
+
for (const methodName of lifecycleMethods(binding, metadataReader, "postConstruct")) {
|
|
54
|
+
const hookResult = callHook(activatedInstance, methodName);
|
|
55
|
+
if (hookResult instanceof Promise) {
|
|
56
|
+
await hookResult;
|
|
51
57
|
}
|
|
52
58
|
}
|
|
53
59
|
// 2. per-binding onActivation
|
|
@@ -68,18 +74,9 @@ export class LifecycleManager {
|
|
|
68
74
|
runActivationSync(resolutionContext, binding, instance, metadataReader) {
|
|
69
75
|
let activatedInstance = instance;
|
|
70
76
|
// 1. @postConstruct() — must be sync (instance fully constructed per TC39 order)
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
for (const methodName of lifecycle.postConstruct) {
|
|
75
|
-
const method = activatedInstance[methodName];
|
|
76
|
-
if (typeof method === "function") {
|
|
77
|
-
const hookResult = method.call(activatedInstance);
|
|
78
|
-
if (hookResult instanceof Promise) {
|
|
79
|
-
throw new AsyncActivationError(tokenName(binding.token), "postConstruct", methodName);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
77
|
+
for (const methodName of lifecycleMethods(binding, metadataReader, "postConstruct")) {
|
|
78
|
+
if (callHook(activatedInstance, methodName) instanceof Promise) {
|
|
79
|
+
throw new AsyncActivationError(tokenName(binding.token), "postConstruct", methodName);
|
|
83
80
|
}
|
|
84
81
|
}
|
|
85
82
|
// 2. per-binding onActivation (must be sync)
|
|
@@ -124,18 +121,10 @@ export class LifecycleManager {
|
|
|
124
121
|
}
|
|
125
122
|
}
|
|
126
123
|
// 3. @preDestroy() — all methods in declaration order
|
|
127
|
-
|
|
128
|
-
const
|
|
129
|
-
if (
|
|
130
|
-
|
|
131
|
-
const method = instance[methodName];
|
|
132
|
-
if (typeof method === "function") {
|
|
133
|
-
const hookResult = method.call(instance);
|
|
134
|
-
if (hookResult instanceof Promise) {
|
|
135
|
-
await hookResult;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
124
|
+
for (const methodName of lifecycleMethods(binding, metadataReader, "preDestroy")) {
|
|
125
|
+
const hookResult = callHook(instance, methodName);
|
|
126
|
+
if (hookResult instanceof Promise) {
|
|
127
|
+
await hookResult;
|
|
139
128
|
}
|
|
140
129
|
}
|
|
141
130
|
}
|
|
@@ -160,18 +149,9 @@ export class LifecycleManager {
|
|
|
160
149
|
}
|
|
161
150
|
}
|
|
162
151
|
// 3. @preDestroy()
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
for (const methodName of lifecycle.preDestroy) {
|
|
167
|
-
const method = instance[methodName];
|
|
168
|
-
if (typeof method === "function") {
|
|
169
|
-
const hookResult = method.call(instance);
|
|
170
|
-
if (hookResult instanceof Promise) {
|
|
171
|
-
throw new AsyncDeactivationError(tokenDisplayName);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
152
|
+
for (const methodName of lifecycleMethods(binding, metadataReader, "preDestroy")) {
|
|
153
|
+
if (callHook(instance, methodName) instanceof Promise) {
|
|
154
|
+
throw new AsyncDeactivationError(tokenDisplayName);
|
|
175
155
|
}
|
|
176
156
|
}
|
|
177
157
|
}
|
|
@@ -180,4 +160,17 @@ export class LifecycleManager {
|
|
|
180
160
|
return this.#activationHooks !== undefined;
|
|
181
161
|
}
|
|
182
162
|
}
|
|
163
|
+
const NO_METHODS = [];
|
|
164
|
+
/** The `@postConstruct` / `@preDestroy` methods a binding declares — only a class can declare any. */
|
|
165
|
+
function lifecycleMethods(binding, metadataReader, phase) {
|
|
166
|
+
if (binding.kind !== "class") {
|
|
167
|
+
return NO_METHODS;
|
|
168
|
+
}
|
|
169
|
+
return metadataReader.getLifecycleMetadata(binding.target)?.[phase] ?? NO_METHODS;
|
|
170
|
+
}
|
|
171
|
+
/** Invokes a hook by name, tolerating a name whose member is not (or no longer) a method. */
|
|
172
|
+
function callHook(instance, methodName) {
|
|
173
|
+
const method = instance[methodName];
|
|
174
|
+
return typeof method === "function" ? method.call(instance) : undefined;
|
|
175
|
+
}
|
|
183
176
|
//# sourceMappingURL=lifecycle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.js","sourceRoot":"","sources":["../../src/resolution/lifecycle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAGxE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGpC;;GAEG;AACH,MAAM,OAAO,gBAAgB;IAC3B,8FAA8F;IAC9F,6DAA6D;IAC7D,gBAAgB,CAAmF;IACnG,kBAAkB,CAAqF;IACvG,kBAAkB,GAAG,CAAC,CAAC;IAEvB,kBAAkB,CAAc,KAAwC,EAAE,OAAiC;QACzG,IAAI,CAAC,kBAAkB,IAAI,CAAC,CAAC;QAC7B,oCAAoC;QACpC,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,gBAAgB,KAAK,IAAI,GAAG,EAAE,CAAC,CAAC,WAAW,CAAC,KAAqC,EAAE,EAAE,CAAC,CAAC;QAC1G,IAAI,CAAC,IAAI,CAAC,OAAqC,CAAC,CAAC;IACnD,CAAC;IAED,qBAAqB,CAAc,KAAwC;QACzE,
|
|
1
|
+
{"version":3,"file":"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AO,EAAE,cAAc,EAAE,YAAY,CAAC,EAAE,CAAC;YACjF,IAAI,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC,YAAY,OAAO,EAAE,CAAC;gBACtD,MAAM,IAAI,sBAAsB,CAAC,gBAAgB,CAAC,CAAC;YACrD,CAAC;QACH,CAAC;IACH,CAAC;IAED,gFAAgF;IAChF,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,gBAAgB,KAAK,SAAS,CAAC;IAC7C,CAAC;CACF;AAED,MAAM,UAAU,GAA0B,EAAE,CAAC;AAE7C,sGAAsG;AACtG,SAAS,gBAAgB,CACvB,OAAuB,EACvB,cAA8B,EAC9B,KAAqC;IAErC,IAAI,OAAO,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;QAC7B,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,OAAO,cAAc,CAAC,oBAAoB,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC;AACpF,CAAC;AAED,6FAA6F;AAC7F,SAAS,QAAQ,CAAC,QAAiB,EAAE,UAAkB;IACrD,MAAM,MAAM,GAAI,QAAoC,CAAC,UAAU,CAAC,CAAC;IACjE,OAAO,OAAO,MAAM,KAAK,UAAU,CAAC,CAAC,CAAE,MAAwB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC7F,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ResolutionFrame } from "#/types";
|
|
1
2
|
/**
|
|
2
3
|
* Where the cycle check switches from a linear `Array.includes` scan to an attached Set.
|
|
3
4
|
*
|
|
@@ -9,14 +10,89 @@ export declare const RESOLUTION_SET_THRESHOLD = 32;
|
|
|
9
10
|
/**
|
|
10
11
|
* Marks a token as in-flight on this path, throwing if it is already there.
|
|
11
12
|
*
|
|
12
|
-
* @remarks Unmark with `resolutionPath.pop()` plus `set?.delete(name)
|
|
13
|
+
* @remarks Unmark with `resolutionPath.pop()` plus `set?.delete(name)`. Sync only — the async lane
|
|
14
|
+
* never removes an entry, so it extends a branch instead; see {@link extendResolutionBranch}.
|
|
15
|
+
*
|
|
16
|
+
* @returns the membership set once the path is deep enough to carry one, else `undefined`.
|
|
17
|
+
*
|
|
18
|
+
* @since 0.5.0-canary.7
|
|
13
19
|
*/
|
|
14
|
-
export declare function enterResolutionPath(resolutionPath: Array<string>, tokenDisplayName: string
|
|
15
|
-
|
|
20
|
+
export declare function enterResolutionPath(resolutionPath: Array<string>, tokenDisplayName: string): Set<string> | undefined;
|
|
21
|
+
declare const BRANCH_BRAND: unique symbol;
|
|
16
22
|
/**
|
|
17
|
-
*
|
|
23
|
+
* A resolution path one async branch owns, so appending to it cannot disturb another branch.
|
|
18
24
|
*
|
|
19
|
-
* @
|
|
25
|
+
* @remarks Only {@link extendResolutionBranch} mints one. That is what makes "may this lane append
|
|
26
|
+
* to this array" a question the compiler answers instead of a rule in a doc — a sync frame's path,
|
|
27
|
+
* which that frame will pop, is a plain `Array<string>` and cannot reach a level that owns its own.
|
|
28
|
+
*
|
|
29
|
+
* @since 0.5.0-canary.9
|
|
30
|
+
*/
|
|
31
|
+
export type OwnedBranchPath = Array<string> & {
|
|
32
|
+
readonly [BRANCH_BRAND]: true;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* The stack half of {@link OwnedBranchPath}, minted only by {@link extendResolutionStackBranch}.
|
|
36
|
+
*
|
|
37
|
+
* @since 0.5.0-canary.9
|
|
38
|
+
*/
|
|
39
|
+
export type OwnedBranchStack = Array<ResolutionFrame> & {
|
|
40
|
+
readonly [BRANCH_BRAND]: true;
|
|
41
|
+
};
|
|
42
|
+
declare const BRANCH_DEPTH_BRAND: unique symbol;
|
|
43
|
+
/**
|
|
44
|
+
* How many leading entries of a path belong to one async branch.
|
|
45
|
+
*
|
|
46
|
+
* @remarks Branded so a bare number cannot be passed: a depth from anywhere but this branch silently
|
|
47
|
+
* re-parents a level.
|
|
48
|
+
*
|
|
49
|
+
* @since 0.5.0-canary.9
|
|
50
|
+
*/
|
|
51
|
+
export type OwnedBranchDepth = number & {
|
|
52
|
+
readonly [BRANCH_DEPTH_BRAND]: true;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* A path no async branch owns yet, so its first extension must copy rather than append.
|
|
56
|
+
*
|
|
57
|
+
* @since 0.5.0-canary.9
|
|
58
|
+
*/
|
|
59
|
+
export declare const UNOWNED_BRANCH = -1;
|
|
60
|
+
/**
|
|
61
|
+
* How far into a path one extension may reach: this branch's own depth, or nobody's.
|
|
62
|
+
*
|
|
63
|
+
* @remarks A union rather than a sentinel hidden inside the branded number, so the two cases are
|
|
64
|
+
* visible at every signature that takes one and `=== UNOWNED_BRANCH` narrows to the owned case.
|
|
65
|
+
*
|
|
66
|
+
* @since 0.5.0-canary.9
|
|
67
|
+
*/
|
|
68
|
+
export type BranchDepth = OwnedBranchDepth | typeof UNOWNED_BRANCH;
|
|
69
|
+
/**
|
|
70
|
+
* The depth a chain's first level extends from, over an array its caller just minted.
|
|
71
|
+
*
|
|
72
|
+
* @since 0.5.0-canary.9
|
|
73
|
+
*/
|
|
74
|
+
export declare const ROOT_BRANCH: OwnedBranchDepth;
|
|
75
|
+
/**
|
|
76
|
+
* A branch's own depth: the length its path had when this level took it.
|
|
77
|
+
*
|
|
78
|
+
* @since 0.5.0-canary.9
|
|
79
|
+
*/
|
|
80
|
+
export declare function branchDepthOf(branch: OwnedBranchPath): OwnedBranchDepth;
|
|
81
|
+
/**
|
|
82
|
+
* Extends one branch of an append-only path, throwing if the entry is already an ancestor.
|
|
83
|
+
*
|
|
84
|
+
* @remarks Appends in place while this branch still owns the next slot, and copies its own prefix
|
|
85
|
+
* once a sibling has claimed it. Nothing is ever removed, so no async level has to observe its own
|
|
86
|
+
* settlement to unwind — see `ARCHITECTURE.md`.
|
|
87
|
+
*
|
|
88
|
+
* @since 0.5.0-canary.9
|
|
89
|
+
*/
|
|
90
|
+
export declare function extendResolutionBranch(resolutionPath: Array<string>, branchDepth: BranchDepth, tokenDisplayName: string): OwnedBranchPath;
|
|
91
|
+
/**
|
|
92
|
+
* The stack half of {@link extendResolutionBranch}; frames carry no cycle to detect.
|
|
93
|
+
*
|
|
94
|
+
* @since 0.5.0-canary.9
|
|
20
95
|
*/
|
|
21
|
-
export declare function
|
|
96
|
+
export declare function extendResolutionStackBranch(resolutionStack: Array<ResolutionFrame>, branchDepth: BranchDepth, frame: ResolutionFrame): OwnedBranchStack;
|
|
97
|
+
export {};
|
|
22
98
|
//# sourceMappingURL=resolution-path.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolution-path.d.ts","sourceRoot":"","sources":["../../src/resolution/resolution-path.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resolution-path.d.ts","sourceRoot":"","sources":["../../src/resolution/resolution-path.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG/C;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAG3C;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,gBAAgB,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,SAAS,CAapH;AAED,OAAO,CAAC,MAAM,YAAY,EAAE,OAAO,MAAM,CAAC;AAE1C;;;;;;;;GAQG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG;IAAE,QAAQ,CAAC,CAAC,YAAY,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC;AAEhF;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,eAAe,CAAC,GAAG;IAAE,QAAQ,CAAC,CAAC,YAAY,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC;AAE1F,OAAO,CAAC,MAAM,kBAAkB,EAAE,OAAO,MAAM,CAAC;AAEhD;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,CAAC,kBAAkB,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC;AAEhF;;;;GAIG;AACH,eAAO,MAAM,cAAc,KAAK,CAAC;AAEjC;;;;;;;GAOG;AACH,MAAM,MAAM,WAAW,GAAG,gBAAgB,GAAG,OAAO,cAAc,CAAC;AAEnE;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAQ,gBAAgB,CAAC;AAEjD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,eAAe,GAAG,gBAAgB,CAEvE;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,EAC7B,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,MAAM,GACvB,eAAe,CAkBjB;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CACzC,eAAe,EAAE,KAAK,CAAC,eAAe,CAAC,EACvC,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,eAAe,GACrB,gBAAgB,CAQlB"}
|
|
@@ -10,12 +10,19 @@ const RESOLUTION_SET_KEY = Symbol("di:resolution-set");
|
|
|
10
10
|
*/
|
|
11
11
|
export const RESOLUTION_SET_THRESHOLD = 32;
|
|
12
12
|
/**
|
|
13
|
+
* Marks a token as in-flight on this path, throwing if it is already there.
|
|
14
|
+
*
|
|
15
|
+
* @remarks Unmark with `resolutionPath.pop()` plus `set?.delete(name)`. Sync only — the async lane
|
|
16
|
+
* never removes an entry, so it extends a branch instead; see {@link extendResolutionBranch}.
|
|
17
|
+
*
|
|
18
|
+
* @returns the membership set once the path is deep enough to carry one, else `undefined`.
|
|
19
|
+
*
|
|
13
20
|
* @since 0.5.0-canary.7
|
|
14
21
|
*/
|
|
15
|
-
export function enterResolutionPath(resolutionPath, tokenDisplayName
|
|
22
|
+
export function enterResolutionPath(resolutionPath, tokenDisplayName) {
|
|
16
23
|
const pathWithSet = resolutionPath;
|
|
17
24
|
let resolutionSet = pathWithSet[RESOLUTION_SET_KEY];
|
|
18
|
-
if (resolutionSet === undefined &&
|
|
25
|
+
if (resolutionSet === undefined && resolutionPath.length >= RESOLUTION_SET_THRESHOLD) {
|
|
19
26
|
resolutionSet = new Set(resolutionPath);
|
|
20
27
|
pathWithSet[RESOLUTION_SET_KEY] = resolutionSet;
|
|
21
28
|
}
|
|
@@ -27,14 +34,65 @@ export function enterResolutionPath(resolutionPath, tokenDisplayName, forceSet)
|
|
|
27
34
|
return resolutionSet;
|
|
28
35
|
}
|
|
29
36
|
/**
|
|
30
|
-
*
|
|
37
|
+
* A path no async branch owns yet, so its first extension must copy rather than append.
|
|
31
38
|
*
|
|
32
|
-
* @since 0.5.0-canary.
|
|
39
|
+
* @since 0.5.0-canary.9
|
|
40
|
+
*/
|
|
41
|
+
export const UNOWNED_BRANCH = -1;
|
|
42
|
+
/**
|
|
43
|
+
* The depth a chain's first level extends from, over an array its caller just minted.
|
|
44
|
+
*
|
|
45
|
+
* @since 0.5.0-canary.9
|
|
46
|
+
*/
|
|
47
|
+
export const ROOT_BRANCH = 0;
|
|
48
|
+
/**
|
|
49
|
+
* A branch's own depth: the length its path had when this level took it.
|
|
50
|
+
*
|
|
51
|
+
* @since 0.5.0-canary.9
|
|
52
|
+
*/
|
|
53
|
+
export function branchDepthOf(branch) {
|
|
54
|
+
return branch.length;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Extends one branch of an append-only path, throwing if the entry is already an ancestor.
|
|
58
|
+
*
|
|
59
|
+
* @remarks Appends in place while this branch still owns the next slot, and copies its own prefix
|
|
60
|
+
* once a sibling has claimed it. Nothing is ever removed, so no async level has to observe its own
|
|
61
|
+
* settlement to unwind — see `ARCHITECTURE.md`.
|
|
62
|
+
*
|
|
63
|
+
* @since 0.5.0-canary.9
|
|
64
|
+
*/
|
|
65
|
+
export function extendResolutionBranch(resolutionPath, branchDepth, tokenDisplayName) {
|
|
66
|
+
const depth = branchDepth === UNOWNED_BRANCH ? resolutionPath.length : branchDepth;
|
|
67
|
+
for (let index = 0; index < depth; index += 1) {
|
|
68
|
+
if (resolutionPath[index] === tokenDisplayName) {
|
|
69
|
+
throw new CircularDependencyError([...resolutionPath.slice(0, depth), tokenDisplayName]);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
// An unowned array belongs to a sync frame that will pop it, or carries a membership Set this
|
|
73
|
+
// lane cannot keep true; copying is what makes the branch's own appends safe.
|
|
74
|
+
if (branchDepth === resolutionPath.length) {
|
|
75
|
+
// The sole mint: appending in place needs a depth that came from a branch already owned, or
|
|
76
|
+
// ROOT_BRANCH over an array its caller minted for this chain alone.
|
|
77
|
+
resolutionPath.push(tokenDisplayName);
|
|
78
|
+
return resolutionPath;
|
|
79
|
+
}
|
|
80
|
+
const branch = resolutionPath.slice(0, depth);
|
|
81
|
+
branch.push(tokenDisplayName);
|
|
82
|
+
return branch;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* The stack half of {@link extendResolutionBranch}; frames carry no cycle to detect.
|
|
86
|
+
*
|
|
87
|
+
* @since 0.5.0-canary.9
|
|
33
88
|
*/
|
|
34
|
-
export function
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
89
|
+
export function extendResolutionStackBranch(resolutionStack, branchDepth, frame) {
|
|
90
|
+
if (branchDepth === resolutionStack.length) {
|
|
91
|
+
resolutionStack.push(frame);
|
|
92
|
+
return resolutionStack;
|
|
38
93
|
}
|
|
94
|
+
const branch = resolutionStack.slice(0, branchDepth === UNOWNED_BRANCH ? resolutionStack.length : branchDepth);
|
|
95
|
+
branch.push(frame);
|
|
96
|
+
return branch;
|
|
39
97
|
}
|
|
40
98
|
//# sourceMappingURL=resolution-path.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolution-path.js","sourceRoot":"","sources":["../../src/resolution/resolution-path.ts"],"names":[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AAG,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE,WAAW,KAAK,cAAc,CAAC,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;IAC/G,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnB,OAAO,MAA0B,CAAC;AACpC,CAAC"}
|
|
@@ -1,5 +1,35 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { BindingTag, ResolveOptions } from "#/types";
|
|
1
|
+
import type { Token } from "#/token";
|
|
2
|
+
import type { BindingTag, Constructor, ResolveOptions } from "#/types";
|
|
3
|
+
/**
|
|
4
|
+
* What one resolvable dependency declares.
|
|
5
|
+
*
|
|
6
|
+
* @remarks Both dependency sources — a constructor's `ParamMetadata` and a `toResolved`
|
|
7
|
+
* `InjectionDescriptor` — are this shape, which is why one resolve routine serves both.
|
|
8
|
+
*
|
|
9
|
+
* @since 0.5.0-canary.9
|
|
10
|
+
*/
|
|
11
|
+
export interface DependencySlot {
|
|
12
|
+
readonly token: Token<unknown> | Constructor;
|
|
13
|
+
readonly optional: boolean;
|
|
14
|
+
readonly multi: boolean;
|
|
15
|
+
readonly name?: string;
|
|
16
|
+
readonly tags?: ReadonlyArray<BindingTag>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A request whose only criterion is a name — the shape the registry has a direct index for.
|
|
20
|
+
*
|
|
21
|
+
* @since 0.5.0-canary.9
|
|
22
|
+
*/
|
|
23
|
+
export declare function isNameOnlyOptions(options: ResolveOptions): options is ResolveOptions & {
|
|
24
|
+
name: string;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* The lone entry of a request whose only criterion is a one-element `tags` list — the shape the
|
|
28
|
+
* registry has a direct tag index for.
|
|
29
|
+
*
|
|
30
|
+
* @since 0.5.0-canary.9
|
|
31
|
+
*/
|
|
32
|
+
export declare function singleTagOnlyOf(options: ResolveOptions): BindingTag | undefined;
|
|
3
33
|
/**
|
|
4
34
|
* Builds a {@link ResolveOptions} safe for `exactOptionalPropertyTypes`:
|
|
5
35
|
* omits keys instead of assigning `undefined`.
|
|
@@ -11,9 +41,16 @@ export declare function injectionSlotToResolveOptions(injectionSlot: {
|
|
|
11
41
|
readonly tags?: ReadonlyArray<BindingTag>;
|
|
12
42
|
}): ResolveOptions | undefined;
|
|
13
43
|
/**
|
|
14
|
-
* Resolve options derived from a binding
|
|
44
|
+
* Resolve options derived from a binding slot (tags may be empty; omits when nothing to match).
|
|
45
|
+
*
|
|
46
|
+
* @remarks Takes the slot structurally rather than as `BindingSlot`, so the slot on a public
|
|
47
|
+
* `BindingSnapshot` — where `name` is an optional property, not a required one holding `undefined` —
|
|
48
|
+
* is accepted by the same call.
|
|
15
49
|
*
|
|
16
50
|
* @since 0.3.16-canary.0
|
|
17
51
|
*/
|
|
18
|
-
export declare function bindingSlotToResolveOptions(bindingSlot:
|
|
52
|
+
export declare function bindingSlotToResolveOptions(bindingSlot: {
|
|
53
|
+
readonly name?: string | undefined;
|
|
54
|
+
readonly tags: ReadonlyArray<BindingTag>;
|
|
55
|
+
}): ResolveOptions | undefined;
|
|
19
56
|
//# sourceMappingURL=resolve-options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-options.d.ts","sourceRoot":"","sources":["../../src/resolution/resolve-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"resolve-options.d.ts","sourceRoot":"","sources":["../../src/resolution/resolve-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEvE;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,WAAW,CAAC;IAC7C,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;CAC3C;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,IAAI,cAAc,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAIvG;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,cAAc,GAAG,UAAU,GAAG,SAAS,CAK/E;AAoBD;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,aAAa,EAAE;IAC3D,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;CAC3C,GAAG,cAAc,GAAG,SAAS,CAE7B;AAED;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CAAC,WAAW,EAAE;IACvD,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;CAC1C,GAAG,cAAc,GAAG,SAAS,CAE7B"}
|
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A request whose only criterion is a name — the shape the registry has a direct index for.
|
|
3
|
+
*
|
|
4
|
+
* @since 0.5.0-canary.9
|
|
5
|
+
*/
|
|
6
|
+
export function isNameOnlyOptions(options) {
|
|
7
|
+
return (options.name !== undefined && options.tag === undefined && (options.tags === undefined || options.tags.length === 0));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The lone entry of a request whose only criterion is a one-element `tags` list — the shape the
|
|
11
|
+
* registry has a direct tag index for.
|
|
12
|
+
*
|
|
13
|
+
* @since 0.5.0-canary.9
|
|
14
|
+
*/
|
|
15
|
+
export function singleTagOnlyOf(options) {
|
|
16
|
+
if (options.name !== undefined || options.tag !== undefined) {
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
return options.tags !== undefined && options.tags.length === 1 ? options.tags[0] : undefined;
|
|
20
|
+
}
|
|
1
21
|
/** Shared core: build a ResolveOptions from already-normalised name + tags. */
|
|
2
22
|
function buildOptions(name, tags) {
|
|
3
23
|
if (name === undefined && tags === undefined) {
|
|
@@ -22,7 +42,11 @@ export function injectionSlotToResolveOptions(injectionSlot) {
|
|
|
22
42
|
return buildOptions(injectionSlot.name, injectionSlot.tags);
|
|
23
43
|
}
|
|
24
44
|
/**
|
|
25
|
-
* Resolve options derived from a binding
|
|
45
|
+
* Resolve options derived from a binding slot (tags may be empty; omits when nothing to match).
|
|
46
|
+
*
|
|
47
|
+
* @remarks Takes the slot structurally rather than as `BindingSlot`, so the slot on a public
|
|
48
|
+
* `BindingSnapshot` — where `name` is an optional property, not a required one holding `undefined` —
|
|
49
|
+
* is accepted by the same call.
|
|
26
50
|
*
|
|
27
51
|
* @since 0.3.16-canary.0
|
|
28
52
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-options.js","sourceRoot":"","sources":["../../src/resolution/resolve-options.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resolve-options.js","sourceRoot":"","sources":["../../src/resolution/resolve-options.ts"],"names":[],"mappings":"AAmBA;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAuB;IACvD,OAAO,CACL,OAAO,CAAC,IAAI,KAAK,SAAS,IAAI,OAAO,CAAC,GAAG,KAAK,SAAS,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CACrH,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AAC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
3
|
import type { MetadataReader } from "#/metadata/metadata-types";
|
|
4
4
|
import type { BindingRegistry } from "#/registry";
|
|
5
|
+
import type { DefaultLookupEntry } from "#/resolution/binding-lookup-cache";
|
|
5
6
|
import type { ResolutionDiagnostics } from "#/resolution/diagnostics";
|
|
6
7
|
import type { ResolverCallbacks } from "#/resolution/environment";
|
|
7
|
-
import { DefaultResolutionContext } from "#/resolution/environment";
|
|
8
8
|
import type { LifecycleManager } from "#/resolution/lifecycle";
|
|
9
|
+
import type { BranchDepth } from "#/resolution/resolution-path";
|
|
9
10
|
import type { ScopeManager } from "#/resolution/scope";
|
|
10
11
|
import type { Token } from "#/token";
|
|
11
12
|
import type { Constructor, ResolutionFrame, ResolveOptions } from "#/types";
|
|
@@ -14,27 +15,44 @@ import type { Constructor, ResolutionFrame, ResolveOptions } from "#/types";
|
|
|
14
15
|
*/
|
|
15
16
|
export declare class DependencyResolver implements ResolverCallbacks {
|
|
16
17
|
#private;
|
|
18
|
+
/**
|
|
19
|
+
* The pair a top-level **sync** resolve reuses instead of minting two arrays per call.
|
|
20
|
+
*
|
|
21
|
+
* @remarks Read directly rather than through an accessor returning both: a shallow resolve is one
|
|
22
|
+
* top-level call, so a call and an object literal there are not amortised over anything. Every sync
|
|
23
|
+
* lane pops what it pushes, so `rootStack.length === 0` means no resolve holds the pair; async
|
|
24
|
+
* appends without popping and mints its own. Keeping the pair stable is also what lets a pooled
|
|
25
|
+
* context skip storing pointers it already holds.
|
|
26
|
+
*/
|
|
27
|
+
readonly rootPath: Array<string>;
|
|
28
|
+
readonly rootStack: Array<ResolutionFrame>;
|
|
17
29
|
constructor(registry: BindingRegistry, scope: ScopeManager, lifecycle: LifecycleManager, metadataReader: MetadataReader, container: Container, parent: DependencyResolver | undefined);
|
|
18
30
|
/** Structural counts for {@link RESOLUTION_DIAGNOSTICS}; see `resolution/diagnostics.ts`. */
|
|
19
|
-
describeCaches(): Pick<ResolutionDiagnostics, "
|
|
31
|
+
describeCaches(): Pick<ResolutionDiagnostics, "compiledPlanCount" | "syncContextPoolSize">;
|
|
20
32
|
/**
|
|
21
33
|
* Binding lookup aligned with `resolve` — used by `Container.validate` without instantiating.
|
|
22
34
|
*/
|
|
23
|
-
peekBindingForValidate(token: Token<unknown> | Constructor, options: ResolveOptions | undefined):
|
|
24
|
-
binding: Binding;
|
|
25
|
-
owner: DependencyResolver;
|
|
26
|
-
} | undefined;
|
|
35
|
+
peekBindingForValidate(token: Token<unknown> | Constructor, options: ResolveOptions | undefined): DefaultLookupEntry<DependencyResolver> | undefined;
|
|
27
36
|
/**
|
|
28
37
|
* Mirrors {@link DependencyResolver.resolveAll} candidate selection only (no instantiation).
|
|
29
38
|
*/
|
|
30
|
-
peekCandidateBindingsForValidate(token: Token<unknown> | Constructor, options: ResolveOptions | undefined):
|
|
39
|
+
peekCandidateBindingsForValidate(token: Token<unknown> | Constructor, options: ResolveOptions | undefined): ReadonlyArray<Binding>;
|
|
31
40
|
resolveFromContext<const Value>(token: Token<Value> | Constructor<Value>, resolutionPath: Array<string>, resolutionStack: Array<ResolutionFrame>): Value;
|
|
32
41
|
resolve<const Value>(token: Token<Value> | Constructor<Value>, options: ResolveOptions | undefined, resolutionPath: Array<string>, resolutionStack: Array<ResolutionFrame>): Value;
|
|
33
42
|
resolveOptional<const Value>(token: Token<Value> | Constructor<Value>, options: ResolveOptions | undefined, resolutionPath: Array<string>, resolutionStack: Array<ResolutionFrame>): Value | undefined;
|
|
34
43
|
resolveAll<const Value>(token: Token<Value> | Constructor<Value>, options: ResolveOptions | undefined, resolutionPath: Array<string>, resolutionStack: Array<ResolutionFrame>): Array<Value>;
|
|
35
|
-
resolveAsyncFromContext<const Value>(token: Token<Value> | Constructor<Value>, resolutionPath: Array<string>, resolutionStack: Array<ResolutionFrame>,
|
|
36
|
-
resolveAsync<const Value>(token: Token<Value> | Constructor<Value>, options: ResolveOptions | undefined, resolutionPath: Array<string>, resolutionStack: Array<ResolutionFrame
|
|
37
|
-
resolveOptionalAsync<const Value>(token: Token<Value> | Constructor<Value>, options: ResolveOptions | undefined, resolutionPath: Array<string>, resolutionStack: Array<ResolutionFrame
|
|
38
|
-
resolveAllAsync<const Value>(token: Token<Value> | Constructor<Value>, options: ResolveOptions | undefined, resolutionPath: Array<string>, resolutionStack: Array<ResolutionFrame
|
|
44
|
+
resolveAsyncFromContext<const Value>(token: Token<Value> | Constructor<Value>, resolutionPath: Array<string>, resolutionStack: Array<ResolutionFrame>, branchDepth: BranchDepth): Promise<Value>;
|
|
45
|
+
resolveAsync<const Value>(token: Token<Value> | Constructor<Value>, options: ResolveOptions | undefined, resolutionPath: Array<string>, resolutionStack: Array<ResolutionFrame>, branchDepth?: BranchDepth): Promise<Value>;
|
|
46
|
+
resolveOptionalAsync<const Value>(token: Token<Value> | Constructor<Value>, options: ResolveOptions | undefined, resolutionPath: Array<string>, resolutionStack: Array<ResolutionFrame>, branchDepth?: BranchDepth): Promise<Value | undefined>;
|
|
47
|
+
resolveAllAsync<const Value>(token: Token<Value> | Constructor<Value>, options: ResolveOptions | undefined, resolutionPath: Array<string>, resolutionStack: Array<ResolutionFrame>, branchDepth?: BranchDepth): Promise<Array<Value>>;
|
|
48
|
+
/**
|
|
49
|
+
* Entry for a request a factory makes from inside an open synchronous cascade.
|
|
50
|
+
*
|
|
51
|
+
* @remarks A request arriving with no cascade open came out of a continuation, so its ancestors
|
|
52
|
+
* are on no call stack — it escapes to the branch lane. See `ARCHITECTURE.md`.
|
|
53
|
+
*/
|
|
54
|
+
resolveAsyncFromCascade(token: Token<unknown> | Constructor): Promise<unknown>;
|
|
55
|
+
/** Entry for a resolve the container starts, which opens the cascade rather than joining one. */
|
|
56
|
+
resolveAsyncFromRoot(token: Token<unknown> | Constructor): Promise<unknown>;
|
|
39
57
|
}
|
|
40
58
|
//# sourceMappingURL=resolver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../src/resolution/resolver.ts"],"names":[],"mappings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