@codefast/di 0.10.0 → 0.11.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 +293 -0
- package/README.md +71 -7
- package/dist/ambient/active-container.d.ts +13 -11
- package/dist/ambient/active-container.js +8 -6
- package/dist/container/binding-builders.d.ts +25 -7
- package/dist/container/binding-builders.js +110 -42
- package/dist/container/container.d.ts +8 -8
- package/dist/container/container.js +244 -67
- package/dist/core/binding-declaration.d.ts +120 -0
- package/dist/core/binding-declaration.js +186 -0
- package/dist/core/binding-scope.d.ts +2 -2
- package/dist/core/binding.d.ts +61 -9
- package/dist/core/binding.js +49 -2
- package/dist/core/constraint-requirement.d.ts +1 -1
- package/dist/core/module.d.ts +10 -7
- package/dist/core/module.js +17 -3
- package/dist/core/registry.d.ts +17 -13
- package/dist/core/registry.js +155 -59
- package/dist/core/state-epoch.d.ts +18 -1
- package/dist/core/state-epoch.js +17 -0
- package/dist/core/tag.js +1 -1
- package/dist/core/token.d.ts +1 -1
- package/dist/core/types.d.ts +5 -5
- package/dist/decorators/decorator-metadata.d.ts +9 -0
- package/dist/decorators/decorator-metadata.js +20 -0
- package/dist/decorators/inject.d.ts +3 -3
- package/dist/decorators/inject.js +7 -6
- package/dist/decorators/injectable.d.ts +2 -2
- package/dist/decorators/injectable.js +5 -3
- package/dist/decorators/lifecycle-decorators.js +9 -3
- package/dist/errors/errors.d.ts +85 -14
- package/dist/errors/errors.js +100 -20
- package/dist/index.d.ts +37 -35
- package/dist/index.js +20 -19
- package/dist/injection/descriptor.d.ts +3 -3
- package/dist/injection/descriptor.js +3 -7
- package/dist/injection/resolve-options.d.ts +3 -3
- package/dist/injection/resolve-options.js +7 -5
- package/dist/introspection/dependency-graph.d.ts +10 -5
- package/dist/introspection/dependency-graph.js +51 -28
- package/dist/introspection/graph-adapters/cytoscape.d.ts +1 -1
- package/dist/introspection/graph-adapters/dot.d.ts +1 -1
- package/dist/introspection/graph-adapters/mermaid.d.ts +1 -1
- package/dist/introspection/graph-adapters/reactflow.d.ts +1 -1
- package/dist/introspection/graph-adapters/reactflow.js +6 -4
- package/dist/introspection/inspector.d.ts +4 -4
- package/dist/introspection/inspector.js +9 -12
- package/dist/lifecycle/lifecycle-manager.d.ts +4 -4
- package/dist/lifecycle/lifecycle-manager.js +18 -6
- package/dist/lifecycle/scope-manager.d.ts +2 -2
- package/dist/lifecycle/scope-manager.js +31 -13
- package/dist/metadata/metadata-reader-token.d.ts +2 -2
- package/dist/metadata/metadata-reader-token.js +1 -1
- package/dist/metadata/metadata-types.d.ts +3 -3
- package/dist/metadata/symbol-metadata-reader.d.ts +3 -3
- package/dist/metadata/symbol-metadata-reader.js +1 -1
- package/dist/metadata/verifying-metadata-reader.d.ts +5 -4
- package/dist/metadata/verifying-metadata-reader.js +30 -8
- package/dist/resolution/async-fan-out.d.ts +12 -0
- package/dist/resolution/async-fan-out.js +26 -0
- package/dist/resolution/cache/activation-need.d.ts +4 -5
- package/dist/resolution/cache/activation-need.js +11 -18
- package/dist/resolution/cache/binding-lookup-cache.d.ts +5 -12
- package/dist/resolution/cache/binding-lookup-cache.js +32 -19
- package/dist/resolution/cache/class-introspector.d.ts +16 -5
- package/dist/resolution/cache/class-introspector.js +73 -56
- package/dist/resolution/context.d.ts +17 -25
- package/dist/resolution/context.js +47 -56
- package/dist/resolution/path/resolution-path.d.ts +48 -13
- package/dist/resolution/path/resolution-path.js +90 -39
- package/dist/resolution/plan/instantiation-plan.d.ts +5 -5
- package/dist/resolution/plan/instantiation-plan.js +66 -26
- package/dist/resolution/plan/plan-codegen.d.ts +10 -7
- package/dist/resolution/plan/plan-codegen.js +62 -34
- package/dist/resolution/resolver.d.ts +16 -17
- package/dist/resolution/resolver.js +316 -273
- package/dist/resolution/select/binding-select.d.ts +6 -5
- package/dist/resolution/select/binding-select.js +5 -4
- package/dist/resolution/select/constraints.d.ts +3 -3
- package/dist/resolution/select/constraints.js +4 -4
- package/package.json +14 -2
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type { Binding, BindingSlot } from "
|
|
2
|
-
import type { TagKeyMask } from "
|
|
3
|
-
import type { ConstraintContext, ResolveOptions } from "
|
|
1
|
+
import type { Binding, BindingSlot } from "#core/binding";
|
|
2
|
+
import type { TagKeyMask } from "#core/tag";
|
|
3
|
+
import type { ConstraintContext, ResolveOptions } from "#core/types";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* The single candidate a request selects from a list, by slot match then predicate.
|
|
6
|
+
*
|
|
7
|
+
* @remarks `undefined` when nothing matches; throws {@link AmbiguousBindingError} when several do.
|
|
7
8
|
*
|
|
8
9
|
* @since 0.3.16-canary.0
|
|
9
10
|
*/
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { coversTagKeys, NO_TAG_KEYS, slotName, slotNameCriterionOf } from "
|
|
2
|
-
import { AmbiguousBindingError } from "
|
|
1
|
+
import { coversTagKeys, NO_TAG_KEYS, slotName, slotNameCriterionOf } from "#core/tag";
|
|
2
|
+
import { AmbiguousBindingError } from "#errors/errors";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* The single candidate a request selects from a list, by slot match then predicate.
|
|
5
|
+
*
|
|
6
|
+
* @remarks `undefined` when nothing matches; throws {@link AmbiguousBindingError} when several do.
|
|
6
7
|
*
|
|
7
8
|
* @since 0.3.16-canary.0
|
|
8
9
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { BindingTag } from "
|
|
2
|
-
import type { Token } from "
|
|
3
|
-
import type { BindingConstraint, Constructor } from "
|
|
1
|
+
import type { BindingTag } from "#core/tag";
|
|
2
|
+
import type { Token } from "#core/token";
|
|
3
|
+
import type { BindingConstraint, Constructor } from "#core/types";
|
|
4
4
|
/**
|
|
5
5
|
* Matches when the direct parent frame resolves the given token.
|
|
6
6
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { requiringAncestorSlotName, requiringAncestorSlotNames } from "
|
|
2
|
-
import { coversTagKeys, slotName, tagKeyMaskOf } from "
|
|
3
|
-
import { tokenName } from "
|
|
4
|
-
import { EmptyTagCriteriaError } from "
|
|
1
|
+
import { requiringAncestorSlotName, requiringAncestorSlotNames } from "#core/constraint-requirement";
|
|
2
|
+
import { coversTagKeys, slotName, tagKeyMaskOf } from "#core/tag";
|
|
3
|
+
import { tokenName } from "#core/token";
|
|
4
|
+
import { EmptyTagCriteriaError } from "#errors/errors";
|
|
5
5
|
/**
|
|
6
6
|
* Matches when the direct parent frame resolves the given token.
|
|
7
7
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codefast/di",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Lightweight dependency injection primitives for Codefast",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"codefast",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"module": "./dist/index.js",
|
|
33
33
|
"types": "./dist/index.d.ts",
|
|
34
34
|
"imports": {
|
|
35
|
-
"
|
|
35
|
+
"#*": {
|
|
36
36
|
"types": "./dist/*.d.ts",
|
|
37
37
|
"default": "./dist/*.js"
|
|
38
38
|
}
|
|
@@ -58,6 +58,10 @@
|
|
|
58
58
|
"types": "./dist/core/binding.d.ts",
|
|
59
59
|
"import": "./dist/core/binding.js"
|
|
60
60
|
},
|
|
61
|
+
"./core/binding-declaration": {
|
|
62
|
+
"types": "./dist/core/binding-declaration.d.ts",
|
|
63
|
+
"import": "./dist/core/binding-declaration.js"
|
|
64
|
+
},
|
|
61
65
|
"./core/binding-scope": {
|
|
62
66
|
"types": "./dist/core/binding-scope.d.ts",
|
|
63
67
|
"import": "./dist/core/binding-scope.js"
|
|
@@ -98,6 +102,10 @@
|
|
|
98
102
|
"types": "./dist/core/types.d.ts",
|
|
99
103
|
"import": "./dist/core/types.js"
|
|
100
104
|
},
|
|
105
|
+
"./decorators/decorator-metadata": {
|
|
106
|
+
"types": "./dist/decorators/decorator-metadata.d.ts",
|
|
107
|
+
"import": "./dist/decorators/decorator-metadata.js"
|
|
108
|
+
},
|
|
101
109
|
"./decorators/inject": {
|
|
102
110
|
"types": "./dist/decorators/inject.d.ts",
|
|
103
111
|
"import": "./dist/decorators/inject.js"
|
|
@@ -178,6 +186,10 @@
|
|
|
178
186
|
"types": "./dist/metadata/verifying-metadata-reader.d.ts",
|
|
179
187
|
"import": "./dist/metadata/verifying-metadata-reader.js"
|
|
180
188
|
},
|
|
189
|
+
"./resolution/async-fan-out": {
|
|
190
|
+
"types": "./dist/resolution/async-fan-out.d.ts",
|
|
191
|
+
"import": "./dist/resolution/async-fan-out.js"
|
|
192
|
+
},
|
|
181
193
|
"./resolution/cache/activation-need": {
|
|
182
194
|
"types": "./dist/resolution/cache/activation-need.d.ts",
|
|
183
195
|
"import": "./dist/resolution/cache/activation-need.js"
|