inversify 6.2.1 → 7.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +66 -1
- package/README.md +3 -0
- package/lib/cjs/index.d.ts +3 -29
- package/lib/cjs/index.d.ts.map +1 -1
- package/lib/cjs/index.js +19 -90
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/index.d.ts +3 -504
- package/lib/esm/index.d.ts.map +1 -1
- package/lib/esm/index.js +1 -1
- package/lib/esm/index.js.map +1 -1
- package/package.json +13 -12
- package/lib/cjs/annotation/decorator_utils.d.ts +0 -17
- package/lib/cjs/annotation/decorator_utils.d.ts.map +0 -1
- package/lib/cjs/annotation/decorator_utils.js +0 -132
- package/lib/cjs/annotation/decorator_utils.js.map +0 -1
- package/lib/cjs/annotation/inject.d.ts +0 -6
- package/lib/cjs/annotation/inject.d.ts.map +0 -1
- package/lib/cjs/annotation/inject.js +0 -41
- package/lib/cjs/annotation/inject.js.map +0 -1
- package/lib/cjs/annotation/inject_base.d.ts +0 -5
- package/lib/cjs/annotation/inject_base.d.ts.map +0 -1
- package/lib/cjs/annotation/inject_base.js +0 -19
- package/lib/cjs/annotation/inject_base.js.map +0 -1
- package/lib/cjs/annotation/injectable.d.ts +0 -3
- package/lib/cjs/annotation/injectable.d.ts.map +0 -1
- package/lib/cjs/annotation/injectable.js +0 -50
- package/lib/cjs/annotation/injectable.js.map +0 -1
- package/lib/cjs/annotation/multi_inject.d.ts +0 -6
- package/lib/cjs/annotation/multi_inject.d.ts.map +0 -1
- package/lib/cjs/annotation/multi_inject.js +0 -41
- package/lib/cjs/annotation/multi_inject.js.map +0 -1
- package/lib/cjs/annotation/named.d.ts +0 -3
- package/lib/cjs/annotation/named.d.ts.map +0 -1
- package/lib/cjs/annotation/named.js +0 -44
- package/lib/cjs/annotation/named.js.map +0 -1
- package/lib/cjs/annotation/optional.d.ts +0 -3
- package/lib/cjs/annotation/optional.d.ts.map +0 -1
- package/lib/cjs/annotation/optional.js +0 -43
- package/lib/cjs/annotation/optional.js.map +0 -1
- package/lib/cjs/annotation/post_construct.d.ts +0 -5
- package/lib/cjs/annotation/post_construct.d.ts.map +0 -1
- package/lib/cjs/annotation/post_construct.js +0 -42
- package/lib/cjs/annotation/post_construct.js.map +0 -1
- package/lib/cjs/annotation/pre_destroy.d.ts +0 -5
- package/lib/cjs/annotation/pre_destroy.d.ts.map +0 -1
- package/lib/cjs/annotation/pre_destroy.js +0 -42
- package/lib/cjs/annotation/pre_destroy.js.map +0 -1
- package/lib/cjs/annotation/property_event_decorator.d.ts +0 -5
- package/lib/cjs/annotation/property_event_decorator.d.ts.map +0 -1
- package/lib/cjs/annotation/property_event_decorator.js +0 -16
- package/lib/cjs/annotation/property_event_decorator.js.map +0 -1
- package/lib/cjs/annotation/tagged.d.ts +0 -3
- package/lib/cjs/annotation/tagged.d.ts.map +0 -1
- package/lib/cjs/annotation/tagged.js +0 -10
- package/lib/cjs/annotation/tagged.js.map +0 -1
- package/lib/cjs/annotation/target_name.d.ts +0 -4
- package/lib/cjs/annotation/target_name.d.ts.map +0 -1
- package/lib/cjs/annotation/target_name.js +0 -46
- package/lib/cjs/annotation/target_name.js.map +0 -1
- package/lib/cjs/annotation/unmanaged.d.ts +0 -4
- package/lib/cjs/annotation/unmanaged.d.ts.map +0 -1
- package/lib/cjs/annotation/unmanaged.js +0 -46
- package/lib/cjs/annotation/unmanaged.js.map +0 -1
- package/lib/cjs/bindings/binding.d.ts +0 -21
- package/lib/cjs/bindings/binding.d.ts.map +0 -1
- package/lib/cjs/bindings/binding.js +0 -68
- package/lib/cjs/bindings/binding.js.map +0 -1
- package/lib/cjs/bindings/binding_count.d.ts +0 -6
- package/lib/cjs/bindings/binding_count.d.ts.map +0 -1
- package/lib/cjs/bindings/binding_count.js +0 -10
- package/lib/cjs/bindings/binding_count.js.map +0 -1
- package/lib/cjs/constants/error_msgs.d.ts +0 -31
- package/lib/cjs/constants/error_msgs.d.ts.map +0 -1
- package/lib/cjs/constants/error_msgs.js +0 -61
- package/lib/cjs/constants/error_msgs.js.map +0 -1
- package/lib/cjs/constants/literal_types.d.ts +0 -6
- package/lib/cjs/constants/literal_types.d.ts.map +0 -1
- package/lib/cjs/constants/literal_types.js +0 -30
- package/lib/cjs/constants/literal_types.js.map +0 -1
- package/lib/cjs/constants/metadata_keys.d.ts +0 -14
- package/lib/cjs/constants/metadata_keys.d.ts.map +0 -1
- package/lib/cjs/constants/metadata_keys.js +0 -39
- package/lib/cjs/constants/metadata_keys.js.map +0 -1
- package/lib/cjs/container/container.d.ts +0 -89
- package/lib/cjs/container/container.d.ts.map +0 -1
- package/lib/cjs/container/container.js +0 -622
- package/lib/cjs/container/container.js.map +0 -1
- package/lib/cjs/container/container_module.d.ts +0 -12
- package/lib/cjs/container/container_module.d.ts.map +0 -1
- package/lib/cjs/container/container_module.js +0 -23
- package/lib/cjs/container/container_module.js.map +0 -1
- package/lib/cjs/container/container_snapshot.d.ts +0 -11
- package/lib/cjs/container/container_snapshot.d.ts.map +0 -1
- package/lib/cjs/container/container_snapshot.js +0 -21
- package/lib/cjs/container/container_snapshot.js.map +0 -1
- package/lib/cjs/container/lookup.d.ts +0 -18
- package/lib/cjs/container/lookup.d.ts.map +0 -1
- package/lib/cjs/container/lookup.js +0 -144
- package/lib/cjs/container/lookup.js.map +0 -1
- package/lib/cjs/container/module_activation_store.d.ts +0 -11
- package/lib/cjs/container/module_activation_store.d.ts.map +0 -1
- package/lib/cjs/container/module_activation_store.js +0 -48
- package/lib/cjs/container/module_activation_store.js.map +0 -1
- package/lib/cjs/interfaces/interfaces.d.ts +0 -286
- package/lib/cjs/interfaces/interfaces.d.ts.map +0 -1
- package/lib/cjs/interfaces/interfaces.js +0 -3
- package/lib/cjs/interfaces/interfaces.js.map +0 -1
- package/lib/cjs/interfaces/interfaces_common_exports.d.ts +0 -4
- package/lib/cjs/interfaces/interfaces_common_exports.d.ts.map +0 -1
- package/lib/cjs/interfaces/interfaces_common_exports.js +0 -3
- package/lib/cjs/interfaces/interfaces_common_exports.js.map +0 -1
- package/lib/cjs/planning/context.d.ts +0 -12
- package/lib/cjs/planning/context.d.ts.map +0 -1
- package/lib/cjs/planning/context.js +0 -22
- package/lib/cjs/planning/context.js.map +0 -1
- package/lib/cjs/planning/metadata.d.ts +0 -9
- package/lib/cjs/planning/metadata.d.ts.map +0 -1
- package/lib/cjs/planning/metadata.js +0 -55
- package/lib/cjs/planning/metadata.js.map +0 -1
- package/lib/cjs/planning/metadata_reader.d.ts +0 -7
- package/lib/cjs/planning/metadata_reader.d.ts.map +0 -1
- package/lib/cjs/planning/metadata_reader.js +0 -56
- package/lib/cjs/planning/metadata_reader.js.map +0 -1
- package/lib/cjs/planning/plan.d.ts +0 -8
- package/lib/cjs/planning/plan.d.ts.map +0 -1
- package/lib/cjs/planning/plan.js +0 -13
- package/lib/cjs/planning/plan.js.map +0 -1
- package/lib/cjs/planning/planner.d.ts +0 -13
- package/lib/cjs/planning/planner.d.ts.map +0 -1
- package/lib/cjs/planning/planner.js +0 -217
- package/lib/cjs/planning/planner.js.map +0 -1
- package/lib/cjs/planning/queryable_string.d.ts +0 -11
- package/lib/cjs/planning/queryable_string.d.ts.map +0 -1
- package/lib/cjs/planning/queryable_string.js +0 -33
- package/lib/cjs/planning/queryable_string.js.map +0 -1
- package/lib/cjs/planning/reflection_utils.d.ts +0 -6
- package/lib/cjs/planning/reflection_utils.d.ts.map +0 -1
- package/lib/cjs/planning/reflection_utils.js +0 -67
- package/lib/cjs/planning/reflection_utils.js.map +0 -1
- package/lib/cjs/planning/request.d.ts +0 -15
- package/lib/cjs/planning/request.d.ts.map +0 -1
- package/lib/cjs/planning/request.js +0 -34
- package/lib/cjs/planning/request.js.map +0 -1
- package/lib/cjs/resolution/instantiation.d.ts +0 -4
- package/lib/cjs/resolution/instantiation.d.ts.map +0 -1
- package/lib/cjs/resolution/instantiation.js +0 -161
- package/lib/cjs/resolution/instantiation.js.map +0 -1
- package/lib/cjs/resolution/resolver.d.ts +0 -4
- package/lib/cjs/resolution/resolver.d.ts.map +0 -1
- package/lib/cjs/resolution/resolver.js +0 -212
- package/lib/cjs/resolution/resolver.js.map +0 -1
- package/lib/cjs/scope/scope.d.ts +0 -4
- package/lib/cjs/scope/scope.d.ts.map +0 -1
- package/lib/cjs/scope/scope.js +0 -55
- package/lib/cjs/scope/scope.js.map +0 -1
- package/lib/cjs/syntax/binding_in_syntax.d.ts +0 -10
- package/lib/cjs/syntax/binding_in_syntax.d.ts.map +0 -1
- package/lib/cjs/syntax/binding_in_syntax.js +0 -25
- package/lib/cjs/syntax/binding_in_syntax.js.map +0 -1
- package/lib/cjs/syntax/binding_in_when_on_syntax.d.ts +0 -30
- package/lib/cjs/syntax/binding_in_when_on_syntax.d.ts.map +0 -1
- package/lib/cjs/syntax/binding_in_when_on_syntax.js +0 -80
- package/lib/cjs/syntax/binding_in_when_on_syntax.js.map +0 -1
- package/lib/cjs/syntax/binding_on_syntax.d.ts +0 -9
- package/lib/cjs/syntax/binding_on_syntax.d.ts.map +0 -1
- package/lib/cjs/syntax/binding_on_syntax.js +0 -20
- package/lib/cjs/syntax/binding_on_syntax.js.map +0 -1
- package/lib/cjs/syntax/binding_to_syntax.d.ts +0 -19
- package/lib/cjs/syntax/binding_to_syntax.d.ts.map +0 -1
- package/lib/cjs/syntax/binding_to_syntax.js +0 -145
- package/lib/cjs/syntax/binding_to_syntax.js.map +0 -1
- package/lib/cjs/syntax/binding_when_on_syntax.d.ts +0 -26
- package/lib/cjs/syntax/binding_when_on_syntax.d.ts.map +0 -1
- package/lib/cjs/syntax/binding_when_on_syntax.js +0 -68
- package/lib/cjs/syntax/binding_when_on_syntax.js.map +0 -1
- package/lib/cjs/syntax/binding_when_syntax.d.ts +0 -22
- package/lib/cjs/syntax/binding_when_syntax.d.ts.map +0 -1
- package/lib/cjs/syntax/binding_when_syntax.js +0 -88
- package/lib/cjs/syntax/binding_when_syntax.js.map +0 -1
- package/lib/cjs/syntax/constraint_helpers.d.ts +0 -7
- package/lib/cjs/syntax/constraint_helpers.d.ts.map +0 -1
- package/lib/cjs/syntax/constraint_helpers.js +0 -78
- package/lib/cjs/syntax/constraint_helpers.js.map +0 -1
- package/lib/cjs/utils/async.d.ts +0 -4
- package/lib/cjs/utils/async.d.ts.map +0 -1
- package/lib/cjs/utils/async.js +0 -16
- package/lib/cjs/utils/async.js.map +0 -1
- package/lib/cjs/utils/binding_utils.d.ts +0 -5
- package/lib/cjs/utils/binding_utils.d.ts.map +0 -1
- package/lib/cjs/utils/binding_utils.js +0 -93
- package/lib/cjs/utils/binding_utils.js.map +0 -1
- package/lib/cjs/utils/clonable.d.ts +0 -4
- package/lib/cjs/utils/clonable.d.ts.map +0 -1
- package/lib/cjs/utils/clonable.js +0 -10
- package/lib/cjs/utils/clonable.js.map +0 -1
- package/lib/cjs/utils/exceptions.d.ts +0 -3
- package/lib/cjs/utils/exceptions.d.ts.map +0 -1
- package/lib/cjs/utils/exceptions.js +0 -55
- package/lib/cjs/utils/exceptions.js.map +0 -1
- package/lib/cjs/utils/factory_type.d.ts +0 -6
- package/lib/cjs/utils/factory_type.d.ts.map +0 -1
- package/lib/cjs/utils/factory_type.js +0 -10
- package/lib/cjs/utils/factory_type.js.map +0 -1
- package/lib/cjs/utils/get_base_type.d.ts +0 -3
- package/lib/cjs/utils/get_base_type.d.ts.map +0 -1
- package/lib/cjs/utils/get_base_type.js +0 -10
- package/lib/cjs/utils/get_base_type.js.map +0 -1
- package/lib/cjs/utils/id.d.ts +0 -3
- package/lib/cjs/utils/id.d.ts.map +0 -1
- package/lib/cjs/utils/id.js +0 -8
- package/lib/cjs/utils/id.js.map +0 -1
- package/lib/cjs/utils/js.d.ts +0 -2
- package/lib/cjs/utils/js.d.ts.map +0 -1
- package/lib/cjs/utils/js.js +0 -16
- package/lib/cjs/utils/js.js.map +0 -1
- package/lib/cjs/utils/serialization.d.ts +0 -11
- package/lib/cjs/utils/serialization.d.ts.map +0 -1
- package/lib/cjs/utils/serialization.js +0 -148
- package/lib/cjs/utils/serialization.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"container_module.d.ts","sourceRoot":"","sources":["../../../src/container/container_module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAGtD,qBAAa,eAAgB,YAAW,UAAU,CAAC,eAAe;IACzD,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,UAAU,CAAC,uBAAuB,CAAC;gBAExC,QAAQ,EAAE,UAAU,CAAC,uBAAuB;CAIzD;AAED,qBAAa,oBAAqB,YAAW,UAAU,CAAC,oBAAoB;IACnE,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,UAAU,CAAC,4BAA4B,CAAC;gBAE7C,QAAQ,EAAE,UAAU,CAAC,4BAA4B;CAI9D"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AsyncContainerModule = exports.ContainerModule = void 0;
|
|
4
|
-
const id_1 = require("../utils/id");
|
|
5
|
-
class ContainerModule {
|
|
6
|
-
id;
|
|
7
|
-
registry;
|
|
8
|
-
constructor(registry) {
|
|
9
|
-
this.id = (0, id_1.id)();
|
|
10
|
-
this.registry = registry;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
exports.ContainerModule = ContainerModule;
|
|
14
|
-
class AsyncContainerModule {
|
|
15
|
-
id;
|
|
16
|
-
registry;
|
|
17
|
-
constructor(registry) {
|
|
18
|
-
this.id = (0, id_1.id)();
|
|
19
|
-
this.registry = registry;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.AsyncContainerModule = AsyncContainerModule;
|
|
23
|
-
//# sourceMappingURL=container_module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"container_module.js","sourceRoot":"","sources":["../../../src/container/container_module.ts"],"names":[],"mappings":";;;AACA,oCAAiC;AAEjC,MAAa,eAAe;IACnB,EAAE,CAAS;IACX,QAAQ,CAAqC;IAEpD,YAAY,QAA4C;QACtD,IAAI,CAAC,EAAE,GAAG,IAAA,OAAE,GAAE,CAAC;QACf,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;CACF;AARD,0CAQC;AAED,MAAa,oBAAoB;IACxB,EAAE,CAAS;IACX,QAAQ,CAA0C;IAEzD,YAAY,QAAiD;QAC3D,IAAI,CAAC,EAAE,GAAG,IAAA,OAAE,GAAE,CAAC;QACf,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;CACF;AARD,oDAQC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { interfaces } from '../interfaces/interfaces';
|
|
2
|
-
declare class ContainerSnapshot implements interfaces.ContainerSnapshot {
|
|
3
|
-
bindings: interfaces.Lookup<interfaces.Binding<unknown>>;
|
|
4
|
-
activations: interfaces.Lookup<interfaces.BindingActivation<unknown>>;
|
|
5
|
-
deactivations: interfaces.Lookup<interfaces.BindingDeactivation<unknown>>;
|
|
6
|
-
middleware: interfaces.Next | null;
|
|
7
|
-
moduleActivationStore: interfaces.ModuleActivationStore;
|
|
8
|
-
static of(bindings: interfaces.Lookup<interfaces.Binding<unknown>>, middleware: interfaces.Next | null, activations: interfaces.Lookup<interfaces.BindingActivation<unknown>>, deactivations: interfaces.Lookup<interfaces.BindingDeactivation<unknown>>, moduleActivationStore: interfaces.ModuleActivationStore): ContainerSnapshot;
|
|
9
|
-
}
|
|
10
|
-
export { ContainerSnapshot };
|
|
11
|
-
//# sourceMappingURL=container_snapshot.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"container_snapshot.d.ts","sourceRoot":"","sources":["../../../src/container/container_snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,cAAM,iBAAkB,YAAW,UAAU,CAAC,iBAAiB;IACtD,QAAQ,EAAG,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;IAC1D,WAAW,EAAG,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC;IACvE,aAAa,EAAG,UAAU,CAAC,MAAM,CACtC,UAAU,CAAC,mBAAmB,CAAC,OAAO,CAAC,CACxC,CAAC;IACK,UAAU,EAAG,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC;IACpC,qBAAqB,EAAG,UAAU,CAAC,qBAAqB,CAAC;WAElD,EAAE,CACd,QAAQ,EAAE,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EACxD,UAAU,EAAE,UAAU,CAAC,IAAI,GAAG,IAAI,EAClC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,EACrE,aAAa,EAAE,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,EACzE,qBAAqB,EAAE,UAAU,CAAC,qBAAqB;CAU1D;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ContainerSnapshot = void 0;
|
|
4
|
-
class ContainerSnapshot {
|
|
5
|
-
bindings;
|
|
6
|
-
activations;
|
|
7
|
-
deactivations;
|
|
8
|
-
middleware;
|
|
9
|
-
moduleActivationStore;
|
|
10
|
-
static of(bindings, middleware, activations, deactivations, moduleActivationStore) {
|
|
11
|
-
const snapshot = new ContainerSnapshot();
|
|
12
|
-
snapshot.bindings = bindings;
|
|
13
|
-
snapshot.middleware = middleware;
|
|
14
|
-
snapshot.deactivations = deactivations;
|
|
15
|
-
snapshot.activations = activations;
|
|
16
|
-
snapshot.moduleActivationStore = moduleActivationStore;
|
|
17
|
-
return snapshot;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
exports.ContainerSnapshot = ContainerSnapshot;
|
|
21
|
-
//# sourceMappingURL=container_snapshot.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"container_snapshot.js","sourceRoot":"","sources":["../../../src/container/container_snapshot.ts"],"names":[],"mappings":";;;AAEA,MAAM,iBAAiB;IACd,QAAQ,CAAkD;IAC1D,WAAW,CAA4D;IACvE,aAAa,CAElB;IACK,UAAU,CAA0B;IACpC,qBAAqB,CAAoC;IAEzD,MAAM,CAAC,EAAE,CACd,QAAwD,EACxD,UAAkC,EAClC,WAAqE,EACrE,aAAyE,EACzE,qBAAuD;QAEvD,MAAM,QAAQ,GAAsB,IAAI,iBAAiB,EAAE,CAAC;QAC5D,QAAQ,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAC7B,QAAQ,CAAC,UAAU,GAAG,UAAU,CAAC;QACjC,QAAQ,CAAC,aAAa,GAAG,aAAa,CAAC;QACvC,QAAQ,CAAC,WAAW,GAAG,WAAW,CAAC;QACnC,QAAQ,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;QACvD,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AAEQ,8CAAiB"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { interfaces } from '../interfaces/interfaces';
|
|
2
|
-
declare class Lookup<T> implements interfaces.Lookup<T> {
|
|
3
|
-
private readonly _map;
|
|
4
|
-
constructor();
|
|
5
|
-
getMap(): Map<interfaces.ServiceIdentifier<unknown>, T[]>;
|
|
6
|
-
add(serviceIdentifier: interfaces.ServiceIdentifier, value: T): void;
|
|
7
|
-
get(serviceIdentifier: interfaces.ServiceIdentifier): T[];
|
|
8
|
-
remove(serviceIdentifier: interfaces.ServiceIdentifier): void;
|
|
9
|
-
removeIntersection(lookup: interfaces.Lookup<T>): void;
|
|
10
|
-
removeByCondition(condition: (item: T) => boolean): T[];
|
|
11
|
-
hasKey(serviceIdentifier: interfaces.ServiceIdentifier): boolean;
|
|
12
|
-
clone(): interfaces.Lookup<T>;
|
|
13
|
-
traverse(func: (key: interfaces.ServiceIdentifier, value: T[]) => void): void;
|
|
14
|
-
private _checkNonNulish;
|
|
15
|
-
private _setValue;
|
|
16
|
-
}
|
|
17
|
-
export { Lookup };
|
|
18
|
-
//# sourceMappingURL=lookup.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lookup.d.ts","sourceRoot":"","sources":["../../../src/container/lookup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAGtD,cAAM,MAAM,CAAC,CAAC,CAAE,YAAW,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;IAE7C,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAyC;;IAMvD,MAAM;IAKN,GAAG,CAAC,iBAAiB,EAAE,UAAU,CAAC,iBAAiB,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI;IAgBpE,GAAG,CAAC,iBAAiB,EAAE,UAAU,CAAC,iBAAiB,GAAG,CAAC,EAAE;IAazD,MAAM,CAAC,iBAAiB,EAAE,UAAU,CAAC,iBAAiB,GAAG,IAAI;IAQ7D,kBAAkB,CAAC,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI;IAyBtD,iBAAiB,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,GAAG,CAAC,EAAE;IAqBvD,MAAM,CAAC,iBAAiB,EAAE,UAAU,CAAC,iBAAiB,GAAG,OAAO;IAQhE,KAAK,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;IAY7B,QAAQ,CACb,IAAI,EAAE,CAAC,GAAG,EAAE,UAAU,CAAC,iBAAiB,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,IAAI,GAC5D,IAAI;IAMP,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,SAAS;CAUlB;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.Lookup = void 0;
|
|
37
|
-
const ERROR_MSGS = __importStar(require("../constants/error_msgs"));
|
|
38
|
-
const clonable_1 = require("../utils/clonable");
|
|
39
|
-
class Lookup {
|
|
40
|
-
// dictionary used store multiple values for each key <key>
|
|
41
|
-
_map;
|
|
42
|
-
constructor() {
|
|
43
|
-
this._map = new Map();
|
|
44
|
-
}
|
|
45
|
-
getMap() {
|
|
46
|
-
return this._map;
|
|
47
|
-
}
|
|
48
|
-
// adds a new entry to _map
|
|
49
|
-
add(serviceIdentifier, value) {
|
|
50
|
-
this._checkNonNulish(serviceIdentifier);
|
|
51
|
-
if (value === null || value === undefined) {
|
|
52
|
-
throw new Error(ERROR_MSGS.NULL_ARGUMENT);
|
|
53
|
-
}
|
|
54
|
-
const entry = this._map.get(serviceIdentifier);
|
|
55
|
-
if (entry !== undefined) {
|
|
56
|
-
entry.push(value);
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
this._map.set(serviceIdentifier, [value]);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
// gets the value of a entry by its key (serviceIdentifier)
|
|
63
|
-
get(serviceIdentifier) {
|
|
64
|
-
this._checkNonNulish(serviceIdentifier);
|
|
65
|
-
const entry = this._map.get(serviceIdentifier);
|
|
66
|
-
if (entry !== undefined) {
|
|
67
|
-
return entry;
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
throw new Error(ERROR_MSGS.KEY_NOT_FOUND);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
// removes a entry from _map by its key (serviceIdentifier)
|
|
74
|
-
remove(serviceIdentifier) {
|
|
75
|
-
this._checkNonNulish(serviceIdentifier);
|
|
76
|
-
if (!this._map.delete(serviceIdentifier)) {
|
|
77
|
-
throw new Error(ERROR_MSGS.KEY_NOT_FOUND);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
removeIntersection(lookup) {
|
|
81
|
-
this.traverse((serviceIdentifier, value) => {
|
|
82
|
-
const lookupActivations = lookup.hasKey(serviceIdentifier)
|
|
83
|
-
? lookup.get(serviceIdentifier)
|
|
84
|
-
: undefined;
|
|
85
|
-
if (lookupActivations !== undefined) {
|
|
86
|
-
const filteredValues = value.filter((lookupValue) => !lookupActivations.some((moduleActivation) => lookupValue === moduleActivation));
|
|
87
|
-
this._setValue(serviceIdentifier, filteredValues);
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
removeByCondition(condition) {
|
|
92
|
-
const removals = [];
|
|
93
|
-
this._map.forEach((entries, key) => {
|
|
94
|
-
const updatedEntries = [];
|
|
95
|
-
for (const entry of entries) {
|
|
96
|
-
const remove = condition(entry);
|
|
97
|
-
if (remove) {
|
|
98
|
-
removals.push(entry);
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
updatedEntries.push(entry);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
this._setValue(key, updatedEntries);
|
|
105
|
-
});
|
|
106
|
-
return removals;
|
|
107
|
-
}
|
|
108
|
-
// returns true if _map contains a key (serviceIdentifier)
|
|
109
|
-
hasKey(serviceIdentifier) {
|
|
110
|
-
this._checkNonNulish(serviceIdentifier);
|
|
111
|
-
return this._map.has(serviceIdentifier);
|
|
112
|
-
}
|
|
113
|
-
// returns a new Lookup instance; note: this is not a deep clone, only Lookup related data structure (dictionary) is
|
|
114
|
-
// cloned, content remains the same
|
|
115
|
-
clone() {
|
|
116
|
-
const copy = new Lookup();
|
|
117
|
-
this._map.forEach((value, key) => {
|
|
118
|
-
value.forEach((b) => {
|
|
119
|
-
copy.add(key, (0, clonable_1.isClonable)(b) ? b.clone() : b);
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
return copy;
|
|
123
|
-
}
|
|
124
|
-
traverse(func) {
|
|
125
|
-
this._map.forEach((value, key) => {
|
|
126
|
-
func(key, value);
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
_checkNonNulish(value) {
|
|
130
|
-
if (value == null) {
|
|
131
|
-
throw new Error(ERROR_MSGS.NULL_ARGUMENT);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
_setValue(serviceIdentifier, value) {
|
|
135
|
-
if (value.length > 0) {
|
|
136
|
-
this._map.set(serviceIdentifier, value);
|
|
137
|
-
}
|
|
138
|
-
else {
|
|
139
|
-
this._map.delete(serviceIdentifier);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
exports.Lookup = Lookup;
|
|
144
|
-
//# sourceMappingURL=lookup.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lookup.js","sourceRoot":"","sources":["../../../src/container/lookup.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { interfaces } from '../interfaces/interfaces';
|
|
2
|
-
export declare class ModuleActivationStore implements interfaces.ModuleActivationStore {
|
|
3
|
-
private readonly _map;
|
|
4
|
-
remove(moduleId: number): interfaces.ModuleActivationHandlers;
|
|
5
|
-
addDeactivation<T>(moduleId: number, serviceIdentifier: interfaces.ServiceIdentifier<T>, onDeactivation: interfaces.BindingDeactivation<T>): void;
|
|
6
|
-
addActivation<T>(moduleId: number, serviceIdentifier: interfaces.ServiceIdentifier<T>, onActivation: interfaces.BindingActivation<T>): void;
|
|
7
|
-
clone(): interfaces.ModuleActivationStore;
|
|
8
|
-
private _getModuleActivationHandlers;
|
|
9
|
-
private _getEmptyHandlersStore;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=module_activation_store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module_activation_store.d.ts","sourceRoot":"","sources":["../../../src/container/module_activation_store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAGtD,qBAAa,qBAAsB,YAAW,UAAU,CAAC,qBAAqB;IAC5E,OAAO,CAAC,QAAQ,CAAC,IAAI,CACT;IAEL,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAC,wBAAwB;IAa7D,eAAe,CAAC,CAAC,EACtB,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAClD,cAAc,EAAE,UAAU,CAAC,mBAAmB,CAAC,CAAC,CAAC;IAQ5C,aAAa,CAAC,CAAC,EACpB,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAClD,YAAY,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAQxC,KAAK,IAAI,UAAU,CAAC,qBAAqB;IAkBhD,OAAO,CAAC,4BAA4B;IAepC,OAAO,CAAC,sBAAsB;CAO/B"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ModuleActivationStore = void 0;
|
|
4
|
-
const lookup_1 = require("./lookup");
|
|
5
|
-
class ModuleActivationStore {
|
|
6
|
-
_map = new Map();
|
|
7
|
-
remove(moduleId) {
|
|
8
|
-
const handlers = this._map.get(moduleId);
|
|
9
|
-
if (handlers === undefined) {
|
|
10
|
-
return this._getEmptyHandlersStore();
|
|
11
|
-
}
|
|
12
|
-
this._map.delete(moduleId);
|
|
13
|
-
return handlers;
|
|
14
|
-
}
|
|
15
|
-
addDeactivation(moduleId, serviceIdentifier, onDeactivation) {
|
|
16
|
-
this._getModuleActivationHandlers(moduleId).onDeactivations.add(serviceIdentifier, onDeactivation);
|
|
17
|
-
}
|
|
18
|
-
addActivation(moduleId, serviceIdentifier, onActivation) {
|
|
19
|
-
this._getModuleActivationHandlers(moduleId).onActivations.add(serviceIdentifier, onActivation);
|
|
20
|
-
}
|
|
21
|
-
clone() {
|
|
22
|
-
const clone = new ModuleActivationStore();
|
|
23
|
-
this._map.forEach((handlersStore, moduleId) => {
|
|
24
|
-
clone._map.set(moduleId, {
|
|
25
|
-
onActivations: handlersStore.onActivations.clone(),
|
|
26
|
-
onDeactivations: handlersStore.onDeactivations.clone(),
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
return clone;
|
|
30
|
-
}
|
|
31
|
-
_getModuleActivationHandlers(moduleId) {
|
|
32
|
-
let moduleActivationHandlers = this._map.get(moduleId);
|
|
33
|
-
if (moduleActivationHandlers === undefined) {
|
|
34
|
-
moduleActivationHandlers = this._getEmptyHandlersStore();
|
|
35
|
-
this._map.set(moduleId, moduleActivationHandlers);
|
|
36
|
-
}
|
|
37
|
-
return moduleActivationHandlers;
|
|
38
|
-
}
|
|
39
|
-
_getEmptyHandlersStore() {
|
|
40
|
-
const handlersStore = {
|
|
41
|
-
onActivations: new lookup_1.Lookup(),
|
|
42
|
-
onDeactivations: new lookup_1.Lookup(),
|
|
43
|
-
};
|
|
44
|
-
return handlersStore;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
exports.ModuleActivationStore = ModuleActivationStore;
|
|
48
|
-
//# sourceMappingURL=module_activation_store.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module_activation_store.js","sourceRoot":"","sources":["../../../src/container/module_activation_store.ts"],"names":[],"mappings":";;;AACA,qCAAkC;AAElC,MAAa,qBAAqB;IACf,IAAI,GACnB,IAAI,GAAG,EAAE,CAAC;IAEL,MAAM,CAAC,QAAgB;QAC5B,MAAM,QAAQ,GACZ,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAE1B,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,OAAO,IAAI,CAAC,sBAAsB,EAAE,CAAC;QACvC,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAE3B,OAAO,QAAQ,CAAC;IAClB,CAAC;IAEM,eAAe,CACpB,QAAgB,EAChB,iBAAkD,EAClD,cAAiD;QAEjD,IAAI,CAAC,4BAA4B,CAAC,QAAQ,CAAC,CAAC,eAAe,CAAC,GAAG,CAC7D,iBAAiB,EACjB,cAAyD,CAC1D,CAAC;IACJ,CAAC;IAEM,aAAa,CAClB,QAAgB,EAChB,iBAAkD,EAClD,YAA6C;QAE7C,IAAI,CAAC,4BAA4B,CAAC,QAAQ,CAAC,CAAC,aAAa,CAAC,GAAG,CAC3D,iBAAiB,EACjB,YAAqD,CACtD,CAAC;IACJ,CAAC;IAEM,KAAK;QACV,MAAM,KAAK,GAA0B,IAAI,qBAAqB,EAAE,CAAC;QAEjE,IAAI,CAAC,IAAI,CAAC,OAAO,CACf,CACE,aAAkD,EAClD,QAAgB,EAChB,EAAE;YACF,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE;gBACvB,aAAa,EAAE,aAAa,CAAC,aAAa,CAAC,KAAK,EAAE;gBAClD,eAAe,EAAE,aAAa,CAAC,eAAe,CAAC,KAAK,EAAE;aACvD,CAAC,CAAC;QACL,CAAC,CACF,CAAC;QAEF,OAAO,KAAK,CAAC;IACf,CAAC;IAEO,4BAA4B,CAClC,QAAgB;QAEhB,IAAI,wBAAwB,GAEZ,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAExC,IAAI,wBAAwB,KAAK,SAAS,EAAE,CAAC;YAC3C,wBAAwB,GAAG,IAAI,CAAC,sBAAsB,EAAE,CAAC;YACzD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,wBAAwB,CAAC,CAAC;QACpD,CAAC;QAED,OAAO,wBAAwB,CAAC;IAClC,CAAC;IAEO,sBAAsB;QAC5B,MAAM,aAAa,GAAwC;YACzD,aAAa,EAAE,IAAI,eAAM,EAAE;YAC3B,eAAe,EAAE,IAAI,eAAM,EAAE;SAC9B,CAAC;QACF,OAAO,aAAa,CAAC;IACvB,CAAC;CACF;AA/ED,sDA+EC"}
|
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
import { LegacyTarget } from '@inversifyjs/core';
|
|
2
|
-
import { FactoryType } from '../utils/factory_type';
|
|
3
|
-
import { CommonNewable, CommonServiceIdentifier } from './interfaces_common_exports';
|
|
4
|
-
declare namespace interfaces {
|
|
5
|
-
export type DynamicValue<T> = (context: interfaces.Context) => T | Promise<T>;
|
|
6
|
-
export type ContainerResolution<T> = undefined | T | Promise<T> | (T | Promise<T>)[];
|
|
7
|
-
type AsyncCallback<TCallback> = TCallback extends (...args: infer TArgs) => infer TResult ? (...args: TArgs) => Promise<TResult> : never;
|
|
8
|
-
export type BindingScope = 'Singleton' | 'Transient' | 'Request';
|
|
9
|
-
export type BindingType = 'ConstantValue' | 'Constructor' | 'DynamicValue' | 'Factory' | 'Function' | 'Instance' | 'Invalid' | 'Provider';
|
|
10
|
-
export type TargetType = 'ConstructorArgument' | 'ClassProperty' | 'Variable';
|
|
11
|
-
export interface BindingScopeEnum {
|
|
12
|
-
Request: interfaces.BindingScope;
|
|
13
|
-
Singleton: interfaces.BindingScope;
|
|
14
|
-
Transient: interfaces.BindingScope;
|
|
15
|
-
}
|
|
16
|
-
export interface BindingTypeEnum {
|
|
17
|
-
ConstantValue: interfaces.BindingType;
|
|
18
|
-
Constructor: interfaces.BindingType;
|
|
19
|
-
DynamicValue: interfaces.BindingType;
|
|
20
|
-
Factory: interfaces.BindingType;
|
|
21
|
-
Function: interfaces.BindingType;
|
|
22
|
-
Instance: interfaces.BindingType;
|
|
23
|
-
Invalid: interfaces.BindingType;
|
|
24
|
-
Provider: interfaces.BindingType;
|
|
25
|
-
}
|
|
26
|
-
export interface TargetTypeEnum {
|
|
27
|
-
ConstructorArgument: interfaces.TargetType;
|
|
28
|
-
ClassProperty: interfaces.TargetType;
|
|
29
|
-
Variable: interfaces.TargetType;
|
|
30
|
-
}
|
|
31
|
-
export type Newable<TInstance = unknown> = CommonNewable<TInstance>;
|
|
32
|
-
export type Instance<T> = T & Record<string, () => void>;
|
|
33
|
-
export interface Abstract<T> {
|
|
34
|
-
prototype: T;
|
|
35
|
-
}
|
|
36
|
-
export type ServiceIdentifier<T = unknown> = CommonServiceIdentifier<T>;
|
|
37
|
-
export interface Clonable<T> {
|
|
38
|
-
clone(): T;
|
|
39
|
-
}
|
|
40
|
-
export type BindingActivation<T = unknown> = (context: interfaces.Context, injectable: T) => T | Promise<T>;
|
|
41
|
-
export type BindingDeactivation<T = unknown> = (injectable: T) => void | Promise<void>;
|
|
42
|
-
export interface Binding<TActivated = unknown> extends Clonable<Binding<TActivated>> {
|
|
43
|
-
id: number;
|
|
44
|
-
moduleId: ContainerModuleBase['id'];
|
|
45
|
-
activated: boolean;
|
|
46
|
-
serviceIdentifier: ServiceIdentifier<TActivated>;
|
|
47
|
-
constraint: ConstraintFunction;
|
|
48
|
-
dynamicValue: DynamicValue<TActivated> | null;
|
|
49
|
-
scope: BindingScope;
|
|
50
|
-
type: BindingType;
|
|
51
|
-
implementationType: Newable<TActivated> | TActivated | null;
|
|
52
|
-
factory: FactoryCreator<unknown> | null;
|
|
53
|
-
provider: ProviderCreator<unknown> | null;
|
|
54
|
-
onActivation: BindingActivation<TActivated> | null;
|
|
55
|
-
onDeactivation: BindingDeactivation<TActivated> | null;
|
|
56
|
-
cache: null | TActivated | Promise<TActivated>;
|
|
57
|
-
}
|
|
58
|
-
export type SimpleFactory<T, U extends unknown[] = unknown[]> = (...args: U) => T;
|
|
59
|
-
export type MultiFactory<T, U extends unknown[] = unknown[], V extends unknown[] = unknown[]> = (...args: U) => SimpleFactory<T, V>;
|
|
60
|
-
export type Factory<T, U extends unknown[] = unknown[], V extends unknown[] = unknown[]> = SimpleFactory<T, U> | MultiFactory<T, U, V>;
|
|
61
|
-
export type FactoryCreator<T, U extends unknown[] = unknown[], V extends unknown[] = unknown[]> = (context: Context) => Factory<T, U, V>;
|
|
62
|
-
export type AutoNamedFactory<T> = SimpleFactory<T, [string]>;
|
|
63
|
-
export type AutoFactory<T> = SimpleFactory<T, []>;
|
|
64
|
-
export type FactoryTypeFunction<T = unknown> = (context: interfaces.Context) => T | Promise<T>;
|
|
65
|
-
export interface FactoryDetails {
|
|
66
|
-
factoryType: FactoryType;
|
|
67
|
-
factory: FactoryTypeFunction | null;
|
|
68
|
-
}
|
|
69
|
-
export type Provider<T> = (...args: any[]) => ((...args: any[]) => Promise<T>) | Promise<T>;
|
|
70
|
-
export type ProviderCreator<T> = (context: Context) => Provider<T>;
|
|
71
|
-
export interface NextArgs<T = unknown> {
|
|
72
|
-
avoidConstraints: boolean;
|
|
73
|
-
contextInterceptor: (contexts: Context) => Context;
|
|
74
|
-
isMultiInject: boolean;
|
|
75
|
-
isOptional?: boolean;
|
|
76
|
-
targetType: TargetType;
|
|
77
|
-
serviceIdentifier: interfaces.ServiceIdentifier<T>;
|
|
78
|
-
key?: string | number | symbol | undefined;
|
|
79
|
-
value?: unknown;
|
|
80
|
-
}
|
|
81
|
-
export type Next = (args: NextArgs) => unknown | unknown[];
|
|
82
|
-
export type Middleware = (next: Next) => Next;
|
|
83
|
-
export type ContextInterceptor = (context: interfaces.Context) => interfaces.Context;
|
|
84
|
-
export interface Context {
|
|
85
|
-
id: number;
|
|
86
|
-
container: Container;
|
|
87
|
-
plan: Plan;
|
|
88
|
-
currentRequest: Request;
|
|
89
|
-
addPlan(plan: Plan): void;
|
|
90
|
-
setCurrentRequest(request: Request): void;
|
|
91
|
-
}
|
|
92
|
-
export type MetadataOrMetadataArray = Metadata | Metadata[];
|
|
93
|
-
export interface Metadata<TValue = unknown> {
|
|
94
|
-
key: string | number | symbol;
|
|
95
|
-
value: TValue;
|
|
96
|
-
}
|
|
97
|
-
export interface Plan {
|
|
98
|
-
parentContext: Context;
|
|
99
|
-
rootRequest: Request;
|
|
100
|
-
}
|
|
101
|
-
export interface QueryableString {
|
|
102
|
-
startsWith(searchString: string): boolean;
|
|
103
|
-
endsWith(searchString: string): boolean;
|
|
104
|
-
contains(searchString: string): boolean;
|
|
105
|
-
equals(compareString: string): boolean;
|
|
106
|
-
value(): string;
|
|
107
|
-
}
|
|
108
|
-
export type ResolveRequestHandler = (request: interfaces.Request) => unknown;
|
|
109
|
-
export type RequestScope = Map<unknown, unknown>;
|
|
110
|
-
export interface Request {
|
|
111
|
-
id: number;
|
|
112
|
-
serviceIdentifier: ServiceIdentifier;
|
|
113
|
-
parentContext: Context;
|
|
114
|
-
parentRequest: Request | null;
|
|
115
|
-
childRequests: Request[];
|
|
116
|
-
target: Target;
|
|
117
|
-
bindings: Binding<unknown>[];
|
|
118
|
-
requestScope: RequestScope | null;
|
|
119
|
-
addChildRequest(serviceIdentifier: ServiceIdentifier, bindings: Binding<unknown> | Binding<unknown>[], target: Target): Request;
|
|
120
|
-
}
|
|
121
|
-
export type Target = LegacyTarget;
|
|
122
|
-
export interface ContainerOptions {
|
|
123
|
-
autoBindInjectable?: boolean;
|
|
124
|
-
defaultScope?: BindingScope | undefined;
|
|
125
|
-
skipBaseClassChecks?: boolean;
|
|
126
|
-
}
|
|
127
|
-
export interface GetAllOptions {
|
|
128
|
-
enforceBindingConstraints?: boolean;
|
|
129
|
-
}
|
|
130
|
-
export interface Container {
|
|
131
|
-
id: number;
|
|
132
|
-
parent: Container | null;
|
|
133
|
-
options: ContainerOptions;
|
|
134
|
-
bind<T>(serviceIdentifier: ServiceIdentifier<T>): BindingToSyntax<T>;
|
|
135
|
-
rebind<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>): interfaces.BindingToSyntax<T>;
|
|
136
|
-
rebindAsync<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>): Promise<interfaces.BindingToSyntax<T>>;
|
|
137
|
-
unbind(serviceIdentifier: ServiceIdentifier): void;
|
|
138
|
-
unbindAsync(serviceIdentifier: interfaces.ServiceIdentifier): Promise<void>;
|
|
139
|
-
unbindAll(): void;
|
|
140
|
-
unbindAllAsync(): Promise<void>;
|
|
141
|
-
isBound(serviceIdentifier: ServiceIdentifier): boolean;
|
|
142
|
-
isCurrentBound<T>(serviceIdentifier: ServiceIdentifier<T>): boolean;
|
|
143
|
-
isBoundNamed(serviceIdentifier: ServiceIdentifier, named: string | number | symbol): boolean;
|
|
144
|
-
isBoundTagged(serviceIdentifier: ServiceIdentifier, key: string | number | symbol, value: unknown): boolean;
|
|
145
|
-
get<T>(serviceIdentifier: ServiceIdentifier<T>): T;
|
|
146
|
-
getNamed<T>(serviceIdentifier: ServiceIdentifier<T>, named: string | number | symbol): T;
|
|
147
|
-
getTagged<T>(serviceIdentifier: ServiceIdentifier<T>, key: string | number | symbol, value: unknown): T;
|
|
148
|
-
getAll<T>(serviceIdentifier: ServiceIdentifier<T>, options?: GetAllOptions): T[];
|
|
149
|
-
getAllTagged<T>(serviceIdentifier: ServiceIdentifier<T>, key: string | number | symbol, value: unknown): T[];
|
|
150
|
-
getAllNamed<T>(serviceIdentifier: ServiceIdentifier<T>, named: string | number | symbol): T[];
|
|
151
|
-
getAsync<T>(serviceIdentifier: ServiceIdentifier<T>): Promise<T>;
|
|
152
|
-
getNamedAsync<T>(serviceIdentifier: ServiceIdentifier<T>, named: string | number | symbol): Promise<T>;
|
|
153
|
-
getTaggedAsync<T>(serviceIdentifier: ServiceIdentifier<T>, key: string | number | symbol, value: unknown): Promise<T>;
|
|
154
|
-
getAllAsync<T>(serviceIdentifier: ServiceIdentifier<T>, options?: GetAllOptions): Promise<T[]>;
|
|
155
|
-
getAllTaggedAsync<T>(serviceIdentifier: ServiceIdentifier<T>, key: string | number | symbol, value: unknown): Promise<T[]>;
|
|
156
|
-
getAllNamedAsync<T>(serviceIdentifier: ServiceIdentifier<T>, named: string | number | symbol): Promise<T[]>;
|
|
157
|
-
onActivation<T>(serviceIdentifier: ServiceIdentifier<T>, onActivation: BindingActivation<T>): void;
|
|
158
|
-
onDeactivation<T>(serviceIdentifier: ServiceIdentifier<T>, onDeactivation: BindingDeactivation<T>): void;
|
|
159
|
-
resolve<T>(constructorFunction: interfaces.Newable<T>): T;
|
|
160
|
-
tryGet<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>): T | undefined;
|
|
161
|
-
tryGetAsync<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>): Promise<T | undefined>;
|
|
162
|
-
tryGetTagged<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, key: string | number | symbol, value: unknown): T | undefined;
|
|
163
|
-
tryGetTaggedAsync<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, key: string | number | symbol, value: unknown): Promise<T | undefined>;
|
|
164
|
-
tryGetNamed<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, named: string | number | symbol): T | undefined;
|
|
165
|
-
tryGetNamedAsync<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, named: string | number | symbol): Promise<T | undefined>;
|
|
166
|
-
tryGetAll<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, options?: interfaces.GetAllOptions): T[];
|
|
167
|
-
tryGetAllAsync<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, options?: interfaces.GetAllOptions): Promise<T[]>;
|
|
168
|
-
tryGetAllTagged<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, key: string | number | symbol, value: unknown): T[];
|
|
169
|
-
tryGetAllTaggedAsync<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, key: string | number | symbol, value: unknown): Promise<T[]>;
|
|
170
|
-
tryGetAllNamed<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, named: string | number | symbol): T[];
|
|
171
|
-
tryGetAllNamedAsync<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, named: string | number | symbol): Promise<T[]>;
|
|
172
|
-
load(...modules: ContainerModule[]): void;
|
|
173
|
-
loadAsync(...modules: AsyncContainerModule[]): Promise<void>;
|
|
174
|
-
unload(...modules: ContainerModuleBase[]): void;
|
|
175
|
-
unloadAsync(...modules: ContainerModuleBase[]): Promise<void>;
|
|
176
|
-
applyCustomMetadataReader(metadataReader: MetadataReader): void;
|
|
177
|
-
applyMiddleware(...middleware: Middleware[]): void;
|
|
178
|
-
snapshot(): void;
|
|
179
|
-
restore(): void;
|
|
180
|
-
createChild(): Container;
|
|
181
|
-
}
|
|
182
|
-
export type Bind = <T = unknown>(serviceIdentifier: ServiceIdentifier<T>) => BindingToSyntax<T>;
|
|
183
|
-
export type Rebind = <T = unknown>(serviceIdentifier: ServiceIdentifier<T>) => BindingToSyntax<T>;
|
|
184
|
-
export type Unbind = <T = unknown>(serviceIdentifier: ServiceIdentifier<T>) => void;
|
|
185
|
-
export type UnbindAsync = <T = unknown>(serviceIdentifier: ServiceIdentifier<T>) => Promise<void>;
|
|
186
|
-
export type IsBound = <T = unknown>(serviceIdentifier: ServiceIdentifier<T>) => boolean;
|
|
187
|
-
export interface ContainerModuleBase {
|
|
188
|
-
id: number;
|
|
189
|
-
}
|
|
190
|
-
export interface ContainerModule extends ContainerModuleBase {
|
|
191
|
-
registry: ContainerModuleCallBack;
|
|
192
|
-
}
|
|
193
|
-
export interface AsyncContainerModule extends ContainerModuleBase {
|
|
194
|
-
registry: AsyncContainerModuleCallBack;
|
|
195
|
-
}
|
|
196
|
-
export interface ModuleActivationHandlers {
|
|
197
|
-
onActivations: Lookup<BindingActivation<unknown>>;
|
|
198
|
-
onDeactivations: Lookup<BindingDeactivation<unknown>>;
|
|
199
|
-
}
|
|
200
|
-
export interface ModuleActivationStore extends Clonable<ModuleActivationStore> {
|
|
201
|
-
addDeactivation<T>(moduleId: ContainerModuleBase['id'], serviceIdentifier: ServiceIdentifier<T>, onDeactivation: interfaces.BindingDeactivation<T>): void;
|
|
202
|
-
addActivation<T>(moduleId: ContainerModuleBase['id'], serviceIdentifier: ServiceIdentifier<T>, onActivation: interfaces.BindingActivation<T>): void;
|
|
203
|
-
remove(moduleId: ContainerModuleBase['id']): ModuleActivationHandlers;
|
|
204
|
-
}
|
|
205
|
-
export type ContainerModuleCallBack = (bind: interfaces.Bind, unbind: interfaces.Unbind, isBound: interfaces.IsBound, rebind: interfaces.Rebind, unbindAsync: interfaces.UnbindAsync, onActivation: interfaces.Container['onActivation'], onDeactivation: interfaces.Container['onDeactivation']) => void;
|
|
206
|
-
export type AsyncContainerModuleCallBack = AsyncCallback<ContainerModuleCallBack>;
|
|
207
|
-
export interface ContainerSnapshot {
|
|
208
|
-
bindings: Lookup<Binding<unknown>>;
|
|
209
|
-
activations: Lookup<BindingActivation<unknown>>;
|
|
210
|
-
deactivations: Lookup<BindingDeactivation<unknown>>;
|
|
211
|
-
middleware: Next | null;
|
|
212
|
-
moduleActivationStore: interfaces.ModuleActivationStore;
|
|
213
|
-
}
|
|
214
|
-
export interface Lookup<T> extends Clonable<Lookup<T>> {
|
|
215
|
-
add(serviceIdentifier: ServiceIdentifier, value: T): void;
|
|
216
|
-
getMap(): Map<interfaces.ServiceIdentifier, T[]>;
|
|
217
|
-
get(serviceIdentifier: ServiceIdentifier): T[];
|
|
218
|
-
remove(serviceIdentifier: interfaces.ServiceIdentifier): void;
|
|
219
|
-
removeByCondition(condition: (item: T) => boolean): T[];
|
|
220
|
-
removeIntersection(lookup: interfaces.Lookup<T>): void;
|
|
221
|
-
hasKey(serviceIdentifier: ServiceIdentifier): boolean;
|
|
222
|
-
clone(): Lookup<T>;
|
|
223
|
-
traverse(func: (key: interfaces.ServiceIdentifier, value: T[]) => void): void;
|
|
224
|
-
}
|
|
225
|
-
export interface BindingOnSyntax<T> {
|
|
226
|
-
onActivation(fn: (context: Context, injectable: T) => T | Promise<T>): BindingWhenSyntax<T>;
|
|
227
|
-
onDeactivation(fn: (injectable: T) => void | Promise<void>): BindingWhenSyntax<T>;
|
|
228
|
-
}
|
|
229
|
-
export interface BindingWhenSyntax<T> {
|
|
230
|
-
when(constraint: (request: Request) => boolean): BindingOnSyntax<T>;
|
|
231
|
-
whenTargetNamed(name: string | number | symbol): BindingOnSyntax<T>;
|
|
232
|
-
whenTargetIsDefault(): BindingOnSyntax<T>;
|
|
233
|
-
whenTargetTagged(tag: string | number | symbol, value: unknown): BindingOnSyntax<T>;
|
|
234
|
-
whenInjectedInto(parent: NewableFunction | string): BindingOnSyntax<T>;
|
|
235
|
-
whenParentNamed(name: string | number | symbol): BindingOnSyntax<T>;
|
|
236
|
-
whenParentTagged(tag: string | number | symbol, value: unknown): BindingOnSyntax<T>;
|
|
237
|
-
whenAnyAncestorIs(ancestor: NewableFunction | string): BindingOnSyntax<T>;
|
|
238
|
-
whenNoAncestorIs(ancestor: NewableFunction | string): BindingOnSyntax<T>;
|
|
239
|
-
whenAnyAncestorNamed(name: string | number | symbol): BindingOnSyntax<T>;
|
|
240
|
-
whenAnyAncestorTagged(tag: string | number | symbol, value: unknown): BindingOnSyntax<T>;
|
|
241
|
-
whenNoAncestorNamed(name: string | number | symbol): BindingOnSyntax<T>;
|
|
242
|
-
whenNoAncestorTagged(tag: string | number | symbol, value: unknown): BindingOnSyntax<T>;
|
|
243
|
-
whenAnyAncestorMatches(constraint: (request: Request) => boolean): BindingOnSyntax<T>;
|
|
244
|
-
whenNoAncestorMatches(constraint: (request: Request) => boolean): BindingOnSyntax<T>;
|
|
245
|
-
}
|
|
246
|
-
export interface BindingWhenOnSyntax<T> extends BindingWhenSyntax<T>, BindingOnSyntax<T> {
|
|
247
|
-
}
|
|
248
|
-
export interface BindingInSyntax<T> {
|
|
249
|
-
inSingletonScope(): BindingWhenOnSyntax<T>;
|
|
250
|
-
inTransientScope(): BindingWhenOnSyntax<T>;
|
|
251
|
-
inRequestScope(): BindingWhenOnSyntax<T>;
|
|
252
|
-
}
|
|
253
|
-
export interface BindingInWhenOnSyntax<T> extends BindingInSyntax<T>, BindingWhenOnSyntax<T> {
|
|
254
|
-
}
|
|
255
|
-
export interface BindingToSyntax<T> {
|
|
256
|
-
to(constructor: Newable<T>): BindingInWhenOnSyntax<T>;
|
|
257
|
-
toSelf(): BindingInWhenOnSyntax<T>;
|
|
258
|
-
toConstantValue(value: T): BindingWhenOnSyntax<T>;
|
|
259
|
-
toDynamicValue(func: DynamicValue<T>): BindingInWhenOnSyntax<T>;
|
|
260
|
-
toConstructor<T2>(constructor: Newable<T2>): BindingWhenOnSyntax<T>;
|
|
261
|
-
toFactory<T2, T3 extends unknown[] = unknown[], T4 extends unknown[] = unknown[]>(factory: FactoryCreator<T2, T3, T4>): BindingWhenOnSyntax<T>;
|
|
262
|
-
toFunction(func: T): BindingWhenOnSyntax<T>;
|
|
263
|
-
toAutoFactory<T2>(serviceIdentifier: ServiceIdentifier<T2>): BindingWhenOnSyntax<T>;
|
|
264
|
-
toAutoNamedFactory<T2>(serviceIdentifier: ServiceIdentifier<T2>): BindingWhenOnSyntax<T>;
|
|
265
|
-
toProvider<T2>(provider: ProviderCreator<T2>): BindingWhenOnSyntax<T>;
|
|
266
|
-
toService(service: ServiceIdentifier<T>): void;
|
|
267
|
-
}
|
|
268
|
-
export interface ConstraintFunction {
|
|
269
|
-
(request: Request | null): boolean;
|
|
270
|
-
metaData?: Metadata;
|
|
271
|
-
}
|
|
272
|
-
export interface MetadataReader {
|
|
273
|
-
getConstructorMetadata(constructorFunc: NewableFunction): ConstructorMetadata;
|
|
274
|
-
getPropertiesMetadata(constructorFunc: NewableFunction): MetadataMap;
|
|
275
|
-
}
|
|
276
|
-
export interface MetadataMap {
|
|
277
|
-
[propertyNameOrArgumentIndex: string | symbol]: Metadata[];
|
|
278
|
-
}
|
|
279
|
-
export interface ConstructorMetadata {
|
|
280
|
-
compilerGeneratedMetadata: NewableFunction[] | undefined;
|
|
281
|
-
userGeneratedMetadata: MetadataMap;
|
|
282
|
-
}
|
|
283
|
-
export {};
|
|
284
|
-
}
|
|
285
|
-
export type { interfaces };
|
|
286
|
-
//# sourceMappingURL=interfaces.d.ts.map
|