@codefast/di 0.8.0 → 0.9.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 +40 -0
- package/LICENSE +1 -1
- package/README.md +256 -164
- package/dist/ambient/active-container.d.ts +1 -2
- package/dist/ambient/active-container.js +1 -2
- package/dist/container/binding-builders.d.ts +12 -13
- package/dist/container/binding-builders.js +1 -2
- package/dist/container/container.d.ts +11 -12
- package/dist/container/container.js +23 -9
- package/dist/core/binding-scope.d.ts +1 -2
- package/dist/core/binding-scope.js +1 -2
- package/dist/core/binding.d.ts +20 -16
- package/dist/core/binding.js +1 -2
- package/dist/core/constraint-requirement.d.ts +20 -6
- package/dist/core/constraint-requirement.js +20 -11
- package/dist/core/constructor-type.d.ts +1 -2
- package/dist/core/constructor-type.js +1 -2
- package/dist/core/map-upsert.d.ts +1 -2
- package/dist/core/map-upsert.js +1 -2
- package/dist/core/module.d.ts +1 -2
- package/dist/core/module.js +1 -2
- package/dist/core/registry.d.ts +1 -2
- package/dist/core/registry.js +1 -2
- package/dist/core/tag.d.ts +3 -4
- package/dist/core/tag.js +3 -4
- package/dist/core/token.d.ts +25 -6
- package/dist/core/token.js +2 -3
- package/dist/core/types.d.ts +9 -4
- package/dist/core/types.js +1 -2
- package/dist/decorators/inject.d.ts +2 -3
- package/dist/decorators/inject.js +7 -6
- package/dist/decorators/injectable.d.ts +1 -2
- package/dist/decorators/injectable.js +1 -2
- package/dist/decorators/lifecycle-decorators.d.ts +1 -2
- package/dist/decorators/lifecycle-decorators.js +1 -2
- package/dist/errors/diagnostics.d.ts +1 -2
- package/dist/errors/diagnostics.js +1 -2
- package/dist/errors/errors.d.ts +5 -3
- package/dist/errors/errors.js +10 -5
- package/dist/index.d.ts +2 -3
- package/dist/index.js +1 -2
- package/dist/injection/descriptor.d.ts +12 -7
- package/dist/injection/descriptor.js +1 -2
- package/dist/injection/resolve-options.d.ts +1 -2
- package/dist/injection/resolve-options.js +1 -2
- package/dist/introspection/dependency-graph.d.ts +1 -2
- package/dist/introspection/dependency-graph.js +1 -2
- package/dist/introspection/graph-adapters/cytoscape.d.ts +1 -2
- package/dist/introspection/graph-adapters/cytoscape.js +1 -2
- package/dist/introspection/graph-adapters/dot.d.ts +1 -2
- package/dist/introspection/graph-adapters/dot.js +1 -2
- package/dist/introspection/graph-adapters/mermaid.d.ts +1 -2
- package/dist/introspection/graph-adapters/mermaid.js +1 -2
- package/dist/introspection/graph-adapters/reactflow.d.ts +1 -2
- package/dist/introspection/graph-adapters/reactflow.js +1 -2
- package/dist/introspection/inspector.d.ts +1 -2
- package/dist/introspection/inspector.js +1 -2
- package/dist/lifecycle/lifecycle-manager.d.ts +1 -2
- package/dist/lifecycle/lifecycle-manager.js +1 -2
- package/dist/lifecycle/scope-manager.d.ts +1 -2
- package/dist/lifecycle/scope-manager.js +1 -2
- package/dist/metadata/metadata-keys.d.ts +1 -2
- package/dist/metadata/metadata-keys.js +1 -2
- package/dist/metadata/metadata-reader-token.d.ts +1 -2
- package/dist/metadata/metadata-reader-token.js +1 -2
- package/dist/metadata/metadata-types.d.ts +1 -2
- package/dist/metadata/metadata-types.js +1 -2
- package/dist/metadata/symbol-metadata-reader.d.ts +1 -2
- package/dist/metadata/symbol-metadata-reader.js +1 -2
- package/dist/metadata/verifying-metadata-reader.d.ts +1 -2
- package/dist/metadata/verifying-metadata-reader.js +1 -2
- package/dist/resolution/cache/activation-need.d.ts +1 -2
- package/dist/resolution/cache/activation-need.js +1 -2
- package/dist/resolution/cache/binding-lookup-cache.d.ts +1 -2
- package/dist/resolution/cache/binding-lookup-cache.js +1 -2
- package/dist/resolution/cache/class-introspector.d.ts +1 -2
- package/dist/resolution/cache/class-introspector.js +1 -2
- package/dist/resolution/context.d.ts +1 -2
- package/dist/resolution/context.js +1 -2
- package/dist/resolution/path/resolution-path.d.ts +1 -2
- package/dist/resolution/path/resolution-path.js +1 -2
- package/dist/resolution/plan/instantiation-plan.d.ts +1 -2
- package/dist/resolution/plan/instantiation-plan.js +1 -2
- package/dist/resolution/resolver.d.ts +1 -2
- package/dist/resolution/resolver.js +1 -2
- package/dist/resolution/select/binding-select.d.ts +1 -2
- package/dist/resolution/select/binding-select.js +1 -2
- package/dist/resolution/select/constraints.d.ts +8 -6
- package/dist/resolution/select/constraints.js +35 -15
- package/package.json +6 -92
- package/dist/ambient/active-container.d.ts.map +0 -1
- package/dist/ambient/active-container.js.map +0 -1
- package/dist/container/binding-builders.d.ts.map +0 -1
- package/dist/container/binding-builders.js.map +0 -1
- package/dist/container/container.d.ts.map +0 -1
- package/dist/container/container.js.map +0 -1
- package/dist/core/binding-scope.d.ts.map +0 -1
- package/dist/core/binding-scope.js.map +0 -1
- package/dist/core/binding.d.ts.map +0 -1
- package/dist/core/binding.js.map +0 -1
- package/dist/core/constraint-requirement.d.ts.map +0 -1
- package/dist/core/constraint-requirement.js.map +0 -1
- package/dist/core/constructor-type.d.ts.map +0 -1
- package/dist/core/constructor-type.js.map +0 -1
- package/dist/core/map-upsert.d.ts.map +0 -1
- package/dist/core/map-upsert.js.map +0 -1
- package/dist/core/module.d.ts.map +0 -1
- package/dist/core/module.js.map +0 -1
- package/dist/core/registry.d.ts.map +0 -1
- package/dist/core/registry.js.map +0 -1
- package/dist/core/tag.d.ts.map +0 -1
- package/dist/core/tag.js.map +0 -1
- package/dist/core/token.d.ts.map +0 -1
- package/dist/core/token.js.map +0 -1
- package/dist/core/types.d.ts.map +0 -1
- package/dist/core/types.js.map +0 -1
- package/dist/decorators/inject.d.ts.map +0 -1
- package/dist/decorators/inject.js.map +0 -1
- package/dist/decorators/injectable.d.ts.map +0 -1
- package/dist/decorators/injectable.js.map +0 -1
- package/dist/decorators/lifecycle-decorators.d.ts.map +0 -1
- package/dist/decorators/lifecycle-decorators.js.map +0 -1
- package/dist/errors/diagnostics.d.ts.map +0 -1
- package/dist/errors/diagnostics.js.map +0 -1
- package/dist/errors/errors.d.ts.map +0 -1
- package/dist/errors/errors.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/injection/descriptor.d.ts.map +0 -1
- package/dist/injection/descriptor.js.map +0 -1
- package/dist/injection/resolve-options.d.ts.map +0 -1
- package/dist/injection/resolve-options.js.map +0 -1
- package/dist/introspection/dependency-graph.d.ts.map +0 -1
- package/dist/introspection/dependency-graph.js.map +0 -1
- package/dist/introspection/graph-adapters/cytoscape.d.ts.map +0 -1
- package/dist/introspection/graph-adapters/cytoscape.js.map +0 -1
- package/dist/introspection/graph-adapters/dot.d.ts.map +0 -1
- package/dist/introspection/graph-adapters/dot.js.map +0 -1
- package/dist/introspection/graph-adapters/mermaid.d.ts.map +0 -1
- package/dist/introspection/graph-adapters/mermaid.js.map +0 -1
- package/dist/introspection/graph-adapters/reactflow.d.ts.map +0 -1
- package/dist/introspection/graph-adapters/reactflow.js.map +0 -1
- package/dist/introspection/inspector.d.ts.map +0 -1
- package/dist/introspection/inspector.js.map +0 -1
- package/dist/lifecycle/lifecycle-manager.d.ts.map +0 -1
- package/dist/lifecycle/lifecycle-manager.js.map +0 -1
- package/dist/lifecycle/scope-manager.d.ts.map +0 -1
- package/dist/lifecycle/scope-manager.js.map +0 -1
- package/dist/metadata/metadata-keys.d.ts.map +0 -1
- package/dist/metadata/metadata-keys.js.map +0 -1
- package/dist/metadata/metadata-reader-token.d.ts.map +0 -1
- package/dist/metadata/metadata-reader-token.js.map +0 -1
- package/dist/metadata/metadata-types.d.ts.map +0 -1
- package/dist/metadata/metadata-types.js.map +0 -1
- package/dist/metadata/symbol-metadata-reader.d.ts.map +0 -1
- package/dist/metadata/symbol-metadata-reader.js.map +0 -1
- package/dist/metadata/verifying-metadata-reader.d.ts.map +0 -1
- package/dist/metadata/verifying-metadata-reader.js.map +0 -1
- package/dist/resolution/cache/activation-need.d.ts.map +0 -1
- package/dist/resolution/cache/activation-need.js.map +0 -1
- package/dist/resolution/cache/binding-lookup-cache.d.ts.map +0 -1
- package/dist/resolution/cache/binding-lookup-cache.js.map +0 -1
- package/dist/resolution/cache/class-introspector.d.ts.map +0 -1
- package/dist/resolution/cache/class-introspector.js.map +0 -1
- package/dist/resolution/context.d.ts.map +0 -1
- package/dist/resolution/context.js.map +0 -1
- package/dist/resolution/path/resolution-path.d.ts.map +0 -1
- package/dist/resolution/path/resolution-path.js.map +0 -1
- package/dist/resolution/plan/instantiation-plan.d.ts.map +0 -1
- package/dist/resolution/plan/instantiation-plan.js.map +0 -1
- package/dist/resolution/resolver.d.ts.map +0 -1
- package/dist/resolution/resolver.js.map +0 -1
- package/dist/resolution/select/binding-select.d.ts.map +0 -1
- package/dist/resolution/select/binding-select.js.map +0 -1
- package/dist/resolution/select/constraints.d.ts.map +0 -1
- package/dist/resolution/select/constraints.js.map +0 -1
- package/src/ambient/active-container.ts +0 -69
- package/src/container/binding-builders.ts +0 -337
- package/src/container/container.ts +0 -972
- package/src/core/binding-scope.ts +0 -15
- package/src/core/binding.ts +0 -505
- package/src/core/constraint-requirement.ts +0 -94
- package/src/core/constructor-type.ts +0 -18
- package/src/core/map-upsert.ts +0 -53
- package/src/core/module.ts +0 -117
- package/src/core/registry.ts +0 -319
- package/src/core/tag.ts +0 -212
- package/src/core/token.ts +0 -31
- package/src/core/types.ts +0 -149
- package/src/decorators/inject.ts +0 -101
- package/src/decorators/injectable.ts +0 -134
- package/src/decorators/lifecycle-decorators.ts +0 -43
- package/src/errors/diagnostics.ts +0 -45
- package/src/errors/errors.ts +0 -499
- package/src/index.ts +0 -139
- package/src/injection/descriptor.ts +0 -218
- package/src/injection/resolve-options.ts +0 -201
- package/src/introspection/dependency-graph.ts +0 -296
- package/src/introspection/graph-adapters/cytoscape.ts +0 -78
- package/src/introspection/graph-adapters/dot.ts +0 -32
- package/src/introspection/graph-adapters/mermaid.ts +0 -61
- package/src/introspection/graph-adapters/reactflow.ts +0 -84
- package/src/introspection/inspector.ts +0 -134
- package/src/lifecycle/lifecycle-manager.ts +0 -272
- package/src/lifecycle/scope-manager.ts +0 -158
- package/src/metadata/metadata-keys.ts +0 -28
- package/src/metadata/metadata-reader-token.ts +0 -10
- package/src/metadata/metadata-types.ts +0 -57
- package/src/metadata/symbol-metadata-reader.ts +0 -126
- package/src/metadata/verifying-metadata-reader.ts +0 -41
- package/src/resolution/cache/activation-need.ts +0 -87
- package/src/resolution/cache/binding-lookup-cache.ts +0 -169
- package/src/resolution/cache/class-introspector.ts +0 -256
- package/src/resolution/context.ts +0 -331
- package/src/resolution/path/resolution-path.ts +0 -167
- package/src/resolution/plan/instantiation-plan.ts +0 -592
- package/src/resolution/resolver.ts +0 -1654
- package/src/resolution/select/binding-select.ts +0 -207
- package/src/resolution/select/constraints.ts +0 -146
package/dist/errors/errors.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ConstraintRequirement } from "#/core/constraint-requirement";
|
|
1
2
|
import type { BindingIdentifier, BindingScope, ResolveOptions } from "#/core/types";
|
|
2
3
|
/**
|
|
3
4
|
* Base class for every error the library throws, each carrying a machine-readable `code`.
|
|
@@ -132,8 +133,10 @@ export declare class UnreachableConstraintError extends DiError {
|
|
|
132
133
|
readonly code = "UNREACHABLE_CONSTRAINT";
|
|
133
134
|
readonly tokenName: string;
|
|
134
135
|
readonly requiredName: string;
|
|
136
|
+
/** The token the name was required on, or `undefined` when the constraint named no token. */
|
|
137
|
+
readonly requiredTokenName: string | undefined;
|
|
135
138
|
readonly helperName: string;
|
|
136
|
-
constructor(tokenName: string,
|
|
139
|
+
constructor(tokenName: string, requirement: ConstraintRequirement);
|
|
137
140
|
}
|
|
138
141
|
/**
|
|
139
142
|
* A container-level lifecycle hook whose token nothing is bound to, so it can never run.
|
|
@@ -289,5 +292,4 @@ export declare class AsyncActivationError extends DiError {
|
|
|
289
292
|
readonly hookKind: "postConstruct" | "onActivation";
|
|
290
293
|
readonly methodName: string | undefined;
|
|
291
294
|
constructor(tokenName: string, hookKind: "postConstruct" | "onActivation", methodName?: string);
|
|
292
|
-
}
|
|
293
|
-
//# sourceMappingURL=errors.d.ts.map
|
|
295
|
+
}
|
package/dist/errors/errors.js
CHANGED
|
@@ -191,11 +191,17 @@ export class UnreachableConstraintError extends DiError {
|
|
|
191
191
|
code = "UNREACHABLE_CONSTRAINT";
|
|
192
192
|
tokenName;
|
|
193
193
|
requiredName;
|
|
194
|
+
/** The token the name was required on, or `undefined` when the constraint named no token. */
|
|
195
|
+
requiredTokenName;
|
|
194
196
|
helperName;
|
|
195
|
-
constructor(tokenName,
|
|
196
|
-
|
|
197
|
+
constructor(tokenName, requirement) {
|
|
198
|
+
const { name, helperName, tokenName: requiredTokenName } = requirement;
|
|
199
|
+
const scope = requiredTokenName === undefined ? "no binding" : `no binding for '${requiredTokenName}'`;
|
|
200
|
+
const target = requiredTokenName === undefined ? "the binding it should match" : `a '${requiredTokenName}' binding`;
|
|
201
|
+
super(`The binding for '${tokenName}' is constrained by ${helperName} waiting on the slot name '${name}', but ${scope} in this container or its ancestors declares it, so the constraint can never hold. Name the slot with .whenNamed('${name}') on ${target}, or correct the name here.`);
|
|
197
202
|
this.tokenName = tokenName;
|
|
198
|
-
this.requiredName =
|
|
203
|
+
this.requiredName = name;
|
|
204
|
+
this.requiredTokenName = requiredTokenName;
|
|
199
205
|
this.helperName = helperName;
|
|
200
206
|
}
|
|
201
207
|
}
|
|
@@ -402,5 +408,4 @@ export class AsyncActivationError extends DiError {
|
|
|
402
408
|
this.hookKind = hookKind;
|
|
403
409
|
this.methodName = methodName;
|
|
404
410
|
}
|
|
405
|
-
}
|
|
406
|
-
//# sourceMappingURL=errors.js.map
|
|
411
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type { ActivationHandler, BindingConstraint, BindingIdentifier, BindingKind, BindingScope, BindingTag, ConstraintContext, Constructor, DependencyKey, DeactivationHandler, ResolutionFrame, ResolveOptions, ResolutionContext, TokenValue, } from "#/core/types";
|
|
2
2
|
export { token, tokenName } from "#/core/token";
|
|
3
|
-
export type { Token } from "#/core/token";
|
|
3
|
+
export type { SlotNamesOf, Token } from "#/core/token";
|
|
4
4
|
export { coversTagKeys, NO_TAG_KEYS, slotName, tag, tagKeyMaskOf } from "#/core/tag";
|
|
5
5
|
export type { TagKey, TagKeyMask } from "#/core/tag";
|
|
6
6
|
export type { AliasBindingBuilder, BindToBuilder, BindingBuilder, ConstantBindingBuilder, ScopedBindingBuilder, SingletonBindingBuilder, SingletonLifecycleBuilder, SlotConstrainedBuilder, TransientBindingBuilder, } from "#/core/binding";
|
|
@@ -32,5 +32,4 @@ export { toCytoscapeGraph } from "#/introspection/graph-adapters/cytoscape";
|
|
|
32
32
|
export type { CytoscapeEdge, CytoscapeElements, CytoscapeNode } from "#/introspection/graph-adapters/cytoscape";
|
|
33
33
|
export { toReactFlowGraph } from "#/introspection/graph-adapters/reactflow";
|
|
34
34
|
export type { ReactFlowEdge, ReactFlowGraph, ReactFlowNode } from "#/introspection/graph-adapters/reactflow";
|
|
35
|
-
export { toMermaidGraph } from "#/introspection/graph-adapters/mermaid";
|
|
36
|
-
//# sourceMappingURL=index.d.ts.map
|
|
35
|
+
export { toMermaidGraph } from "#/introspection/graph-adapters/mermaid";
|
package/dist/index.js
CHANGED
|
@@ -30,5 +30,4 @@ export { AmbiguousBindingError, AsyncActivationError, AsyncDeactivationError, As
|
|
|
30
30
|
export { toDotGraph } from "#/introspection/graph-adapters/dot";
|
|
31
31
|
export { toCytoscapeGraph } from "#/introspection/graph-adapters/cytoscape";
|
|
32
32
|
export { toReactFlowGraph } from "#/introspection/graph-adapters/reactflow";
|
|
33
|
-
export { toMermaidGraph } from "#/introspection/graph-adapters/mermaid";
|
|
34
|
-
//# sourceMappingURL=index.js.map
|
|
33
|
+
export { toMermaidGraph } from "#/introspection/graph-adapters/mermaid";
|
|
@@ -7,8 +7,14 @@ import type { DependencySlot } from "#/injection/resolve-options";
|
|
|
7
7
|
*
|
|
8
8
|
* @since 0.3.16-canary.0
|
|
9
9
|
*/
|
|
10
|
-
export interface InjectOptions {
|
|
11
|
-
|
|
10
|
+
export interface InjectOptions<Names extends string = string> {
|
|
11
|
+
/**
|
|
12
|
+
* The slot name a binding declared with `whenNamed`.
|
|
13
|
+
*
|
|
14
|
+
* @remarks Narrowed to the names the token declares, so a dependency cannot ask for a name no
|
|
15
|
+
* binding could carry; a token declaring none takes any string.
|
|
16
|
+
*/
|
|
17
|
+
name?: Names | undefined;
|
|
12
18
|
/**
|
|
13
19
|
* Single-tag shorthand, equivalent to listing the one pair in `tags`.
|
|
14
20
|
*
|
|
@@ -74,18 +80,17 @@ export declare function normalizeToDescriptor(dependency: InjectableDependency):
|
|
|
74
80
|
*
|
|
75
81
|
* @since 0.6.0
|
|
76
82
|
*/
|
|
77
|
-
export declare function buildInjectionDescriptor<Value>(token: Token<Value> | Constructor<Value>, options?: InjectOptions): InjectionDescriptor<Value>;
|
|
83
|
+
export declare function buildInjectionDescriptor<Value, Names extends string = string>(token: Token<Value, Names> | Constructor<Value>, options?: NoInfer<InjectOptions<Names>>): InjectionDescriptor<Value>;
|
|
78
84
|
/**
|
|
79
85
|
* Creates a descriptor that resolves to `undefined` instead of throwing when no binding matches.
|
|
80
86
|
*
|
|
81
87
|
* @since 0.3.16-canary.0
|
|
82
88
|
*/
|
|
83
|
-
export declare function optional<Value>(token: Token<Value> | Constructor<Value>, options?: InjectOptions): InjectionDescriptor<Value | undefined>;
|
|
89
|
+
export declare function optional<Value, Names extends string = string>(token: Token<Value, Names> | Constructor<Value>, options?: NoInfer<InjectOptions<Names>>): InjectionDescriptor<Value | undefined>;
|
|
84
90
|
/**
|
|
85
91
|
* Creates a descriptor that resolves every matching binding for the token into an array.
|
|
86
92
|
*
|
|
87
93
|
* @since 0.3.16-canary.0
|
|
88
94
|
*/
|
|
89
|
-
export declare function injectAll<Value>(token: Token<Value> | Constructor<Value>, options?: InjectOptions): InjectionDescriptor<Array<Value>>;
|
|
90
|
-
export {};
|
|
91
|
-
//# sourceMappingURL=descriptor.d.ts.map
|
|
95
|
+
export declare function injectAll<Value, Names extends string = string>(token: Token<Value, Names> | Constructor<Value>, options?: NoInfer<InjectOptions<Names>>): InjectionDescriptor<Array<Value>>;
|
|
96
|
+
export {};
|
|
@@ -67,5 +67,4 @@ export declare function singleCriterionForSlot(injectionSlot: DependencySlot): B
|
|
|
67
67
|
export declare function bindingSlotToResolveOptions(bindingSlot: {
|
|
68
68
|
readonly name?: string | undefined;
|
|
69
69
|
readonly tags?: ReadonlyArray<BindingTag> | undefined;
|
|
70
|
-
}): ResolveOptions | undefined;
|
|
71
|
-
//# sourceMappingURL=resolve-options.d.ts.map
|
|
70
|
+
}): ResolveOptions | undefined;
|
|
@@ -53,5 +53,4 @@ export interface GraphOptions {
|
|
|
53
53
|
*
|
|
54
54
|
* @since 0.3.16-canary.0
|
|
55
55
|
*/
|
|
56
|
-
export declare function buildDependencyGraph(registry: BindingRegistry, metadataReader: MetadataReader, options: GraphOptions | undefined, parentRegistry?: BindingRegistry): ContainerGraphJson;
|
|
57
|
-
//# sourceMappingURL=dependency-graph.d.ts.map
|
|
56
|
+
export declare function buildDependencyGraph(registry: BindingRegistry, metadataReader: MetadataReader, options: GraphOptions | undefined, parentRegistry?: BindingRegistry): ContainerGraphJson;
|
|
@@ -158,5 +158,4 @@ export function buildDependencyGraph(registry, metadataReader, options, parentRe
|
|
|
158
158
|
addRegistryBindings(accumulator, parentRegistry, metadataReader, true);
|
|
159
159
|
}
|
|
160
160
|
return { nodes: accumulator.nodes, edges: accumulator.edges, includesParent };
|
|
161
|
-
}
|
|
162
|
-
//# sourceMappingURL=dependency-graph.js.map
|
|
161
|
+
}
|
|
@@ -40,5 +40,4 @@ export type CytoscapeElements = ReadonlyArray<CytoscapeNode | CytoscapeEdge>;
|
|
|
40
40
|
*
|
|
41
41
|
* @since 0.3.16-canary.0
|
|
42
42
|
*/
|
|
43
|
-
export declare function toCytoscapeGraph(graph: ContainerGraphJson): CytoscapeElements;
|
|
44
|
-
//# sourceMappingURL=cytoscape.d.ts.map
|
|
43
|
+
export declare function toCytoscapeGraph(graph: ContainerGraphJson): CytoscapeElements;
|
|
@@ -4,5 +4,4 @@ import type { ContainerGraphJson } from "#/introspection/dependency-graph";
|
|
|
4
4
|
*
|
|
5
5
|
* @since 0.3.16-canary.0
|
|
6
6
|
*/
|
|
7
|
-
export declare function toDotGraph(graph: ContainerGraphJson): string;
|
|
8
|
-
//# sourceMappingURL=dot.d.ts.map
|
|
7
|
+
export declare function toDotGraph(graph: ContainerGraphJson): string;
|
|
@@ -5,5 +5,4 @@ import type { ContainerGraphJson } from "#/introspection/dependency-graph";
|
|
|
5
5
|
*
|
|
6
6
|
* @since 0.6.0
|
|
7
7
|
*/
|
|
8
|
-
export declare function toMermaidGraph(graph: ContainerGraphJson): string;
|
|
9
|
-
//# sourceMappingURL=mermaid.d.ts.map
|
|
8
|
+
export declare function toMermaidGraph(graph: ContainerGraphJson): string;
|
|
@@ -45,5 +45,4 @@ export interface ReactFlowGraph {
|
|
|
45
45
|
*
|
|
46
46
|
* @since 0.5.0-canary.7
|
|
47
47
|
*/
|
|
48
|
-
export declare function toReactFlowGraph(graph: ContainerGraphJson): ReactFlowGraph;
|
|
49
|
-
//# sourceMappingURL=reactflow.d.ts.map
|
|
48
|
+
export declare function toReactFlowGraph(graph: ContainerGraphJson): ReactFlowGraph;
|
|
@@ -40,5 +40,4 @@ export declare class Inspector {
|
|
|
40
40
|
lookupBindings<Value>(token: Token<Value> | Constructor<Value>): ReadonlyArray<BindingSnapshot>;
|
|
41
41
|
has(token: Token<unknown> | Constructor, options?: ResolveOptions, parentHas?: () => boolean): boolean;
|
|
42
42
|
hasOwn(token: Token<unknown> | Constructor, options?: ResolveOptions): boolean;
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=inspector.d.ts.map
|
|
43
|
+
}
|
|
@@ -25,5 +25,4 @@ export declare class LifecycleManager {
|
|
|
25
25
|
runDeactivationSync<Value>(binding: Binding<Value>, instance: Value, metadataReader: MetadataReader): void;
|
|
26
26
|
/** Whether the deferred activation-hook table has had to be built. */
|
|
27
27
|
get isActivationTableBuilt(): boolean;
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=lifecycle-manager.d.ts.map
|
|
28
|
+
}
|
|
@@ -24,5 +24,4 @@ export const INJECT_ACCESSOR_KEY = Symbol("di:inject-accessor");
|
|
|
24
24
|
*
|
|
25
25
|
* @since 0.3.16-canary.0
|
|
26
26
|
*/
|
|
27
|
-
export const METADATA_SYMBOL = Symbol.metadata ?? Symbol.for("Symbol.metadata");
|
|
28
|
-
//# sourceMappingURL=metadata-keys.js.map
|
|
27
|
+
export const METADATA_SYMBOL = Symbol.metadata ?? Symbol.for("Symbol.metadata");
|
|
@@ -5,5 +5,4 @@ import type { MetadataReader } from "#/metadata/metadata-types";
|
|
|
5
5
|
*
|
|
6
6
|
* @since 0.3.16-canary.0
|
|
7
7
|
*/
|
|
8
|
-
export declare const MetadataReaderToken: Token<MetadataReader>;
|
|
9
|
-
//# sourceMappingURL=metadata-reader-token.d.ts.map
|
|
8
|
+
export declare const MetadataReaderToken: Token<MetadataReader>;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=metadata-types.js.map
|
|
1
|
+
export {};
|
|
@@ -114,5 +114,4 @@ function mergeUniqueNames(lists) {
|
|
|
114
114
|
*
|
|
115
115
|
* @since 0.3.16-canary.0
|
|
116
116
|
*/
|
|
117
|
-
export const defaultMetadataReader = new SymbolMetadataReader();
|
|
118
|
-
//# sourceMappingURL=symbol-metadata-reader.js.map
|
|
117
|
+
export const defaultMetadataReader = new SymbolMetadataReader();
|
|
@@ -12,5 +12,4 @@ import type { MetadataReader } from "#/metadata/metadata-types";
|
|
|
12
12
|
*
|
|
13
13
|
* @since 0.6.0
|
|
14
14
|
*/
|
|
15
|
-
export declare function verifyingMetadataReader(reader: MetadataReader): MetadataReader;
|
|
16
|
-
//# sourceMappingURL=verifying-metadata-reader.d.ts.map
|
|
15
|
+
export declare function verifyingMetadataReader(reader: MetadataReader): MetadataReader;
|
|
@@ -41,5 +41,4 @@ export declare class BindingLookupCache<Owner> {
|
|
|
41
41
|
defaultEntry(token: Token<unknown> | Constructor): DefaultLookupEntry<Owner> | null;
|
|
42
42
|
/** `null` when the tag's shape needs the full selection path. */
|
|
43
43
|
taggedEntry(token: Token<unknown> | Constructor, tag: BindingTag): DefaultLookupEntry<Owner> | null;
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=binding-lookup-cache.d.ts.map
|
|
44
|
+
}
|
|
@@ -64,5 +64,4 @@ export declare class ClassIntrospector {
|
|
|
64
64
|
/** True when the class has accessor injection, which reads the container during construction. */
|
|
65
65
|
needsActiveContainer(target: Constructor): boolean;
|
|
66
66
|
instantiate(target: Constructor, deps: Array<unknown>, resolution?: AmbientResolution): unknown;
|
|
67
|
-
}
|
|
68
|
-
//# sourceMappingURL=class-introspector.d.ts.map
|
|
67
|
+
}
|
|
@@ -86,5 +86,4 @@ export declare class AsyncCascadeContext implements ResolutionContext {
|
|
|
86
86
|
*
|
|
87
87
|
* @since 0.3.16-canary.0
|
|
88
88
|
*/
|
|
89
|
-
export declare function buildResolutionFrame(tokenName: string, scope: BindingScope, bindingId: BindingIdentifier, kind: BindingKind, slot: ResolutionFrame["slot"]): ResolutionFrame;
|
|
90
|
-
//# sourceMappingURL=context.d.ts.map
|
|
89
|
+
export declare function buildResolutionFrame(tokenName: string, scope: BindingScope, bindingId: BindingIdentifier, kind: BindingKind, slot: ResolutionFrame["slot"]): ResolutionFrame;
|
|
@@ -90,5 +90,4 @@ export declare function branchDepthOf(branch: OwnedBranchStack): OwnedBranchDept
|
|
|
90
90
|
* @since 0.5.0-canary.9
|
|
91
91
|
*/
|
|
92
92
|
export declare function extendResolutionBranch(resolutionStack: Array<ResolutionFrame>, branchDepth: BranchDepth, frame: ResolutionFrame): OwnedBranchStack;
|
|
93
|
-
export {};
|
|
94
|
-
//# sourceMappingURL=resolution-path.d.ts.map
|
|
93
|
+
export {};
|
|
@@ -63,5 +63,4 @@ export declare class DependencyResolver implements ResolverCallbacks {
|
|
|
63
63
|
resolveAsyncFromCascade(token: Token<unknown> | Constructor): Promise<unknown>;
|
|
64
64
|
/** Entry for a resolve the container starts, which opens the cascade rather than joining one. */
|
|
65
65
|
resolveAsyncFromRoot(token: Token<unknown> | Constructor): Promise<unknown>;
|
|
66
|
-
}
|
|
67
|
-
//# sourceMappingURL=resolver.d.ts.map
|
|
66
|
+
}
|
|
@@ -1266,5 +1266,4 @@ function asyncResolutionErrorFor(binding, resolutionStack) {
|
|
|
1266
1266
|
/** Only a factory is handed the resolution context; everything else gets its deps directly. */
|
|
1267
1267
|
function requiresResolutionContext(binding) {
|
|
1268
1268
|
return binding.kind === "dynamic" || binding.kind === "dynamic-async";
|
|
1269
|
-
}
|
|
1270
|
-
//# sourceMappingURL=resolver.js.map
|
|
1269
|
+
}
|
|
@@ -29,5 +29,4 @@ export declare function matchesSlot(slot: BindingSlot, options: ResolveOptions |
|
|
|
29
29
|
*
|
|
30
30
|
* @since 0.6.0
|
|
31
31
|
*/
|
|
32
|
-
export declare function requestedTagKeyMask(options: ResolveOptions | undefined): TagKeyMask;
|
|
33
|
-
//# sourceMappingURL=binding-select.d.ts.map
|
|
32
|
+
export declare function requestedTagKeyMask(options: ResolveOptions | undefined): TagKeyMask;
|
|
@@ -26,17 +26,20 @@ export declare function whenAnyAncestorIs(token: Token<unknown> | Constructor):
|
|
|
26
26
|
*/
|
|
27
27
|
export declare function whenNoAncestorIs(token: Token<unknown> | Constructor): BindingConstraint;
|
|
28
28
|
/**
|
|
29
|
-
* Matches when the direct parent slot
|
|
29
|
+
* Matches when the direct parent resolves the given token at the slot carrying the given name.
|
|
30
|
+
*
|
|
31
|
+
* @remarks A slot name is a label on one token's bindings, so the token is part of the question — and
|
|
32
|
+
* what types `name` to the names that token declares.
|
|
30
33
|
*
|
|
31
34
|
* @since 0.3.16-canary.0
|
|
32
35
|
*/
|
|
33
|
-
export declare function whenParentNamed(name:
|
|
36
|
+
export declare function whenParentNamed<Names extends string>(token: Token<unknown, Names> | Constructor, name: NoInfer<Names>): BindingConstraint;
|
|
34
37
|
/**
|
|
35
|
-
* Matches when at least one ancestor slot
|
|
38
|
+
* Matches when at least one ancestor resolves the given token at the slot carrying the given name.
|
|
36
39
|
*
|
|
37
40
|
* @since 0.3.16-canary.0
|
|
38
41
|
*/
|
|
39
|
-
export declare function whenAnyAncestorNamed(name:
|
|
42
|
+
export declare function whenAnyAncestorNamed<Names extends string>(token: Token<unknown, Names> | Constructor, name: NoInfer<Names>): BindingConstraint;
|
|
40
43
|
/**
|
|
41
44
|
* Matches when the direct parent slot carries the given tag pair.
|
|
42
45
|
*
|
|
@@ -64,5 +67,4 @@ export declare function whenParentTaggedAll(tags: ReadonlyArray<BindingTag>): Bi
|
|
|
64
67
|
*
|
|
65
68
|
* @since 0.3.16-canary.1
|
|
66
69
|
*/
|
|
67
|
-
export declare function whenAnyAncestorTaggedAll(tags: ReadonlyArray<BindingTag>): BindingConstraint;
|
|
68
|
-
//# sourceMappingURL=constraints.d.ts.map
|
|
70
|
+
export declare function whenAnyAncestorTaggedAll(tags: ReadonlyArray<BindingTag>): BindingConstraint;
|