inversify 6.1.5-beta.0 → 6.1.5-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/{es → lib/cjs}/annotation/decorator_utils.d.ts +1 -0
- package/lib/cjs/annotation/decorator_utils.d.ts.map +1 -0
- package/lib/{annotation → cjs/annotation}/decorator_utils.js +8 -0
- package/lib/cjs/annotation/decorator_utils.js.map +1 -0
- package/{es → lib/cjs}/annotation/inject.d.ts +1 -0
- package/lib/cjs/annotation/inject.d.ts.map +1 -0
- package/lib/{annotation → cjs/annotation}/inject.js +1 -0
- package/lib/cjs/annotation/inject.js.map +1 -0
- package/{es → lib/cjs}/annotation/inject_base.d.ts +1 -0
- package/lib/cjs/annotation/inject_base.d.ts.map +1 -0
- package/lib/{annotation → cjs/annotation}/inject_base.js +2 -0
- package/lib/cjs/annotation/inject_base.js.map +1 -0
- package/{es → lib/cjs}/annotation/injectable.d.ts +1 -0
- package/lib/cjs/annotation/injectable.d.ts.map +1 -0
- package/lib/{annotation → cjs/annotation}/injectable.js +2 -0
- package/lib/cjs/annotation/injectable.js.map +1 -0
- package/lib/{annotation → cjs/annotation}/multi_inject.d.ts +1 -0
- package/lib/cjs/annotation/multi_inject.d.ts.map +1 -0
- package/lib/{annotation → cjs/annotation}/multi_inject.js +1 -0
- package/lib/cjs/annotation/multi_inject.js.map +1 -0
- package/{es → lib/cjs}/annotation/named.d.ts +1 -0
- package/lib/cjs/annotation/named.d.ts.map +1 -0
- package/lib/{annotation → cjs/annotation}/named.js +2 -0
- package/lib/cjs/annotation/named.js.map +1 -0
- package/{es → lib/cjs}/annotation/optional.d.ts +1 -0
- package/lib/cjs/annotation/optional.d.ts.map +1 -0
- package/lib/{annotation → cjs/annotation}/optional.js +1 -0
- package/lib/cjs/annotation/optional.js.map +1 -0
- package/{es → lib/cjs}/annotation/post_construct.d.ts +1 -0
- package/lib/cjs/annotation/post_construct.d.ts.map +1 -0
- package/lib/{annotation → cjs/annotation}/post_construct.js +1 -0
- package/lib/cjs/annotation/post_construct.js.map +1 -0
- package/{es → lib/cjs}/annotation/pre_destroy.d.ts +1 -0
- package/lib/cjs/annotation/pre_destroy.d.ts.map +1 -0
- package/lib/{annotation → cjs/annotation}/pre_destroy.js +1 -0
- package/lib/cjs/annotation/pre_destroy.js.map +1 -0
- package/lib/{annotation → cjs/annotation}/property_event_decorator.d.ts +1 -0
- package/lib/cjs/annotation/property_event_decorator.d.ts.map +1 -0
- package/lib/{annotation → cjs/annotation}/property_event_decorator.js +1 -0
- package/lib/cjs/annotation/property_event_decorator.js.map +1 -0
- package/{es → lib/cjs}/annotation/tagged.d.ts +1 -0
- package/lib/cjs/annotation/tagged.d.ts.map +1 -0
- package/lib/{annotation → cjs/annotation}/tagged.js +2 -0
- package/lib/cjs/annotation/tagged.js.map +1 -0
- package/lib/{annotation → cjs/annotation}/target_name.d.ts +1 -0
- package/lib/cjs/annotation/target_name.d.ts.map +1 -0
- package/lib/{annotation → cjs/annotation}/target_name.js +1 -0
- package/lib/cjs/annotation/target_name.js.map +1 -0
- package/lib/{annotation → cjs/annotation}/unmanaged.d.ts +1 -0
- package/lib/cjs/annotation/unmanaged.d.ts.map +1 -0
- package/lib/{annotation → cjs/annotation}/unmanaged.js +1 -0
- package/lib/cjs/annotation/unmanaged.js.map +1 -0
- package/lib/{bindings → cjs/bindings}/binding.d.ts +1 -0
- package/lib/cjs/bindings/binding.d.ts.map +1 -0
- package/lib/{bindings → cjs/bindings}/binding.js +15 -0
- package/lib/cjs/bindings/binding.js.map +1 -0
- package/lib/{bindings → cjs/bindings}/binding_count.d.ts +1 -0
- package/lib/cjs/bindings/binding_count.d.ts.map +1 -0
- package/lib/{bindings → cjs/bindings}/binding_count.js +1 -0
- package/lib/cjs/bindings/binding_count.js.map +1 -0
- package/{es → lib/cjs}/constants/error_msgs.d.ts +1 -0
- package/lib/cjs/constants/error_msgs.d.ts.map +1 -0
- package/lib/{constants → cjs/constants}/error_msgs.js +2 -0
- package/lib/cjs/constants/error_msgs.js.map +1 -0
- package/lib/{constants → cjs/constants}/literal_types.d.ts +1 -0
- package/lib/cjs/constants/literal_types.d.ts.map +1 -0
- package/lib/{constants → cjs/constants}/literal_types.js +4 -0
- package/lib/cjs/constants/literal_types.js.map +1 -0
- package/{es → lib/cjs}/constants/metadata_keys.d.ts +1 -0
- package/lib/cjs/constants/metadata_keys.d.ts.map +1 -0
- package/lib/{constants → cjs/constants}/metadata_keys.js +13 -0
- package/lib/cjs/constants/metadata_keys.js.map +1 -0
- package/lib/{container → cjs/container}/container.d.ts +1 -0
- package/lib/cjs/container/container.d.ts.map +1 -0
- package/lib/{container → cjs/container}/container.js +29 -1
- package/lib/cjs/container/container.js.map +1 -0
- package/{es → lib/cjs}/container/container_module.d.ts +1 -0
- package/lib/cjs/container/container_module.d.ts.map +1 -0
- package/lib/{container → cjs/container}/container_module.js +1 -0
- package/lib/cjs/container/container_module.js.map +1 -0
- package/lib/{container → cjs/container}/container_snapshot.d.ts +1 -0
- package/lib/cjs/container/container_snapshot.d.ts.map +1 -0
- package/lib/{container → cjs/container}/container_snapshot.js +1 -0
- package/lib/cjs/container/container_snapshot.js.map +1 -0
- package/lib/{container → cjs/container}/lookup.d.ts +1 -0
- package/lib/cjs/container/lookup.d.ts.map +1 -0
- package/lib/{container → cjs/container}/lookup.js +8 -0
- package/lib/cjs/container/lookup.js.map +1 -0
- package/{es → lib/cjs}/container/module_activation_store.d.ts +1 -0
- package/lib/cjs/container/module_activation_store.d.ts.map +1 -0
- package/lib/{container → cjs/container}/module_activation_store.js +1 -0
- package/lib/cjs/container/module_activation_store.js.map +1 -0
- package/{es/inversify.d.ts → lib/cjs/index.d.ts} +1 -0
- package/lib/cjs/index.d.ts.map +1 -0
- package/lib/{inversify.js → cjs/index.js} +2 -0
- package/lib/cjs/index.js.map +1 -0
- package/{es → lib/cjs}/interfaces/interfaces.d.ts +2 -1
- package/lib/cjs/interfaces/interfaces.d.ts.map +1 -0
- package/lib/{interfaces → cjs/interfaces}/interfaces.js +1 -0
- package/lib/cjs/interfaces/interfaces.js.map +1 -0
- package/lib/cjs/interfaces/interfaces_common_exports.d.ts +4 -0
- package/lib/cjs/interfaces/interfaces_common_exports.d.ts.map +1 -0
- package/lib/{annotation/lazy_service_identifier.js → cjs/interfaces/interfaces_common_exports.js} +1 -0
- package/lib/cjs/interfaces/interfaces_common_exports.js.map +1 -0
- package/lib/cjs/package.json +3 -0
- package/{es → lib/cjs}/planning/context.d.ts +1 -0
- package/lib/cjs/planning/context.d.ts.map +1 -0
- package/lib/{planning → cjs/planning}/context.js +1 -0
- package/lib/cjs/planning/context.js.map +1 -0
- package/lib/{planning → cjs/planning}/metadata.d.ts +1 -0
- package/lib/cjs/planning/metadata.d.ts.map +1 -0
- package/lib/{planning → cjs/planning}/metadata.js +1 -0
- package/lib/cjs/planning/metadata.js.map +1 -0
- package/lib/{planning → cjs/planning}/metadata_reader.d.ts +1 -0
- package/lib/cjs/planning/metadata_reader.d.ts.map +1 -0
- package/lib/{planning → cjs/planning}/metadata_reader.js +4 -0
- package/lib/cjs/planning/metadata_reader.js.map +1 -0
- package/{es → lib/cjs}/planning/plan.d.ts +1 -0
- package/lib/cjs/planning/plan.d.ts.map +1 -0
- package/lib/{planning → cjs/planning}/plan.js +1 -0
- package/lib/cjs/planning/plan.js.map +1 -0
- package/{es → lib/cjs}/planning/planner.d.ts +1 -0
- package/lib/cjs/planning/planner.d.ts.map +1 -0
- package/lib/{planning → cjs/planning}/planner.js +10 -0
- package/lib/cjs/planning/planner.js.map +1 -0
- package/{es → lib/cjs}/planning/queryable_string.d.ts +1 -0
- package/lib/cjs/planning/queryable_string.d.ts.map +1 -0
- package/lib/{planning → cjs/planning}/queryable_string.js +2 -0
- package/lib/cjs/planning/queryable_string.js.map +1 -0
- package/{es → lib/cjs}/planning/reflection_utils.d.ts +1 -0
- package/lib/cjs/planning/reflection_utils.d.ts.map +1 -0
- package/lib/{planning → cjs/planning}/reflection_utils.js +8 -1
- package/lib/cjs/planning/reflection_utils.js.map +1 -0
- package/{es → lib/cjs}/planning/request.d.ts +1 -0
- package/lib/cjs/planning/request.d.ts.map +1 -0
- package/lib/{planning → cjs/planning}/request.js +5 -1
- package/lib/cjs/planning/request.js.map +1 -0
- package/lib/{resolution → cjs/resolution}/instantiation.d.ts +1 -0
- package/lib/cjs/resolution/instantiation.d.ts.map +1 -0
- package/lib/{resolution → cjs/resolution}/instantiation.js +1 -0
- package/lib/cjs/resolution/instantiation.js.map +1 -0
- package/{es → lib/cjs}/resolution/resolver.d.ts +1 -0
- package/lib/cjs/resolution/resolver.d.ts.map +1 -0
- package/lib/{resolution → cjs/resolution}/resolver.js +18 -0
- package/lib/cjs/resolution/resolver.js.map +1 -0
- package/{es → lib/cjs}/scope/scope.d.ts +1 -0
- package/lib/cjs/scope/scope.d.ts.map +1 -0
- package/lib/{scope → cjs/scope}/scope.js +7 -0
- package/lib/cjs/scope/scope.js.map +1 -0
- package/{es → lib/cjs}/syntax/binding_in_syntax.d.ts +1 -0
- package/lib/cjs/syntax/binding_in_syntax.d.ts.map +1 -0
- package/lib/{syntax → cjs/syntax}/binding_in_syntax.js +1 -0
- package/lib/cjs/syntax/binding_in_syntax.js.map +1 -0
- package/{es → lib/cjs}/syntax/binding_in_when_on_syntax.d.ts +1 -0
- package/lib/cjs/syntax/binding_in_when_on_syntax.d.ts.map +1 -0
- package/lib/{syntax → cjs/syntax}/binding_in_when_on_syntax.js +1 -0
- package/lib/cjs/syntax/binding_in_when_on_syntax.js.map +1 -0
- package/{es → lib/cjs}/syntax/binding_on_syntax.d.ts +1 -0
- package/lib/cjs/syntax/binding_on_syntax.d.ts.map +1 -0
- package/lib/{syntax → cjs/syntax}/binding_on_syntax.js +1 -0
- package/lib/cjs/syntax/binding_on_syntax.js.map +1 -0
- package/lib/{syntax → cjs/syntax}/binding_to_syntax.d.ts +1 -0
- package/lib/cjs/syntax/binding_to_syntax.d.ts.map +1 -0
- package/lib/{syntax → cjs/syntax}/binding_to_syntax.js +7 -0
- package/lib/cjs/syntax/binding_to_syntax.js.map +1 -0
- package/{es → lib/cjs}/syntax/binding_when_on_syntax.d.ts +1 -0
- package/lib/cjs/syntax/binding_when_on_syntax.d.ts.map +1 -0
- package/lib/{syntax → cjs/syntax}/binding_when_on_syntax.js +1 -0
- package/lib/cjs/syntax/binding_when_on_syntax.js.map +1 -0
- package/lib/{syntax → cjs/syntax}/binding_when_syntax.d.ts +1 -0
- package/lib/cjs/syntax/binding_when_syntax.d.ts.map +1 -0
- package/lib/{syntax → cjs/syntax}/binding_when_syntax.js +4 -1
- package/lib/cjs/syntax/binding_when_syntax.js.map +1 -0
- package/{es → lib/cjs}/syntax/constraint_helpers.d.ts +1 -0
- package/lib/cjs/syntax/constraint_helpers.d.ts.map +1 -0
- package/lib/{syntax → cjs/syntax}/constraint_helpers.js +5 -0
- package/lib/cjs/syntax/constraint_helpers.js.map +1 -0
- package/{es → lib/cjs}/utils/async.d.ts +1 -0
- package/lib/cjs/utils/async.d.ts.map +1 -0
- package/lib/{utils → cjs/utils}/async.js +1 -0
- package/lib/cjs/utils/async.js.map +1 -0
- package/{es → lib/cjs}/utils/binding_utils.d.ts +1 -0
- package/lib/cjs/utils/binding_utils.d.ts.map +1 -0
- package/lib/{utils → cjs/utils}/binding_utils.js +4 -0
- package/lib/cjs/utils/binding_utils.js.map +1 -0
- package/{es → lib/cjs}/utils/clonable.d.ts +1 -0
- package/lib/cjs/utils/clonable.d.ts.map +1 -0
- package/lib/{utils → cjs/utils}/clonable.js +1 -0
- package/lib/cjs/utils/clonable.js.map +1 -0
- package/{es → lib/cjs}/utils/exceptions.d.ts +1 -0
- package/lib/cjs/utils/exceptions.d.ts.map +1 -0
- package/lib/{utils → cjs/utils}/exceptions.js +1 -0
- package/lib/cjs/utils/exceptions.js.map +1 -0
- package/lib/{utils → cjs/utils}/factory_type.d.ts +1 -0
- package/lib/cjs/utils/factory_type.d.ts.map +1 -0
- package/lib/{utils → cjs/utils}/factory_type.js +1 -0
- package/lib/cjs/utils/factory_type.js.map +1 -0
- package/{es → lib/cjs}/utils/id.d.ts +1 -0
- package/lib/cjs/utils/id.d.ts.map +1 -0
- package/lib/{utils → cjs/utils}/id.js +1 -0
- package/lib/cjs/utils/id.js.map +1 -0
- package/{es → lib/cjs}/utils/js.d.ts +1 -0
- package/lib/cjs/utils/js.d.ts.map +1 -0
- package/lib/{utils → cjs/utils}/js.js +1 -0
- package/lib/cjs/utils/js.js.map +1 -0
- package/{es → lib/cjs}/utils/serialization.d.ts +1 -0
- package/lib/cjs/utils/serialization.d.ts.map +1 -0
- package/lib/{utils → cjs/utils}/serialization.js +6 -0
- package/lib/cjs/utils/serialization.js.map +1 -0
- package/lib/{interfaces/interfaces.d.ts → esm/index.d.ts} +206 -4
- package/lib/esm/index.d.ts.map +1 -0
- package/lib/esm/index.js +2 -0
- package/lib/esm/index.js.map +1 -0
- package/package.json +21 -24
- package/es/annotation/decorator_utils.js +0 -90
- package/es/annotation/inject.js +0 -4
- package/es/annotation/inject_base.js +0 -14
- package/es/annotation/injectable.js +0 -13
- package/es/annotation/lazy_service_identifier.js +0 -1
- package/es/annotation/multi_inject.d.ts +0 -5
- package/es/annotation/multi_inject.js +0 -4
- package/es/annotation/named.js +0 -7
- package/es/annotation/optional.js +0 -7
- package/es/annotation/post_construct.js +0 -5
- package/es/annotation/pre_destroy.js +0 -5
- package/es/annotation/property_event_decorator.d.ts +0 -4
- package/es/annotation/property_event_decorator.js +0 -13
- package/es/annotation/tagged.js +0 -6
- package/es/annotation/target_name.d.ts +0 -3
- package/es/annotation/target_name.js +0 -10
- package/es/annotation/unmanaged.d.ts +0 -3
- package/es/annotation/unmanaged.js +0 -10
- package/es/bindings/binding.d.ts +0 -20
- package/es/bindings/binding.js +0 -37
- package/es/bindings/binding_count.d.ts +0 -5
- package/es/bindings/binding_count.js +0 -6
- package/es/constants/error_msgs.js +0 -62
- package/es/constants/literal_types.d.ts +0 -5
- package/es/constants/literal_types.js +0 -21
- package/es/constants/metadata_keys.js +0 -23
- package/es/container/container.d.ts +0 -75
- package/es/container/container.js +0 -750
- package/es/container/container_module.js +0 -17
- package/es/container/container_snapshot.d.ts +0 -10
- package/es/container/container_snapshot.js +0 -15
- package/es/container/lookup.d.ts +0 -17
- package/es/container/lookup.js +0 -105
- package/es/container/module_activation_store.js +0 -47
- package/es/interfaces/interfaces.js +0 -1
- package/es/inversify.js +0 -3
- package/es/inversify.js.LICENSE.txt +0 -14
- package/es/planning/context.js +0 -15
- package/es/planning/metadata.d.ts +0 -8
- package/es/planning/metadata.js +0 -17
- package/es/planning/metadata_reader.d.ts +0 -6
- package/es/planning/metadata_reader.js +0 -21
- package/es/planning/plan.js +0 -8
- package/es/planning/planner.js +0 -168
- package/es/planning/queryable_string.js +0 -28
- package/es/planning/reflection_utils.js +0 -27
- package/es/planning/request.js +0 -20
- package/es/planning/target.js +0 -87
- package/es/resolution/instantiation.d.ts +0 -3
- package/es/resolution/instantiation.js +0 -195
- package/es/resolution/resolver.js +0 -214
- package/es/scope/scope.js +0 -88
- package/es/syntax/binding_in_syntax.js +0 -21
- package/es/syntax/binding_in_when_on_syntax.js +0 -73
- package/es/syntax/binding_on_syntax.js +0 -16
- package/es/syntax/binding_to_syntax.d.ts +0 -18
- package/es/syntax/binding_to_syntax.js +0 -91
- package/es/syntax/binding_when_on_syntax.js +0 -62
- package/es/syntax/binding_when_syntax.d.ts +0 -21
- package/es/syntax/binding_when_syntax.js +0 -104
- package/es/syntax/constraint_helpers.js +0 -36
- package/es/utils/async.js +0 -12
- package/es/utils/binding_utils.js +0 -58
- package/es/utils/clonable.js +0 -7
- package/es/utils/exceptions.js +0 -16
- package/es/utils/factory_type.d.ts +0 -5
- package/es/utils/factory_type.js +0 -6
- package/es/utils/id.js +0 -5
- package/es/utils/js.js +0 -13
- package/es/utils/serialization.js +0 -103
- package/lib/annotation/decorator_utils.d.ts +0 -16
- package/lib/annotation/inject.d.ts +0 -5
- package/lib/annotation/inject_base.d.ts +0 -4
- package/lib/annotation/injectable.d.ts +0 -2
- package/lib/annotation/lazy_service_identifier.d.ts +0 -3
- package/lib/annotation/named.d.ts +0 -2
- package/lib/annotation/optional.d.ts +0 -2
- package/lib/annotation/post_construct.d.ts +0 -4
- package/lib/annotation/pre_destroy.d.ts +0 -4
- package/lib/annotation/tagged.d.ts +0 -2
- package/lib/constants/error_msgs.d.ts +0 -30
- package/lib/constants/metadata_keys.d.ts +0 -13
- package/lib/container/container_module.d.ts +0 -11
- package/lib/container/module_activation_store.d.ts +0 -10
- package/lib/inversify.d.ts +0 -25
- package/lib/planning/context.d.ts +0 -11
- package/lib/planning/plan.d.ts +0 -7
- package/lib/planning/planner.d.ts +0 -5
- package/lib/planning/queryable_string.d.ts +0 -10
- package/lib/planning/reflection_utils.d.ts +0 -5
- package/lib/planning/request.d.ts +0 -14
- package/lib/planning/target.d.ts +0 -23
- package/lib/planning/target.js +0 -113
- package/lib/resolution/resolver.d.ts +0 -3
- package/lib/scope/scope.d.ts +0 -3
- package/lib/syntax/binding_in_syntax.d.ts +0 -9
- package/lib/syntax/binding_in_when_on_syntax.d.ts +0 -29
- package/lib/syntax/binding_on_syntax.d.ts +0 -8
- package/lib/syntax/binding_when_on_syntax.d.ts +0 -25
- package/lib/syntax/constraint_helpers.d.ts +0 -6
- package/lib/tsconfig.tsbuildinfo +0 -1
- package/lib/utils/async.d.ts +0 -3
- package/lib/utils/binding_utils.d.ts +0 -4
- package/lib/utils/clonable.d.ts +0 -3
- package/lib/utils/exceptions.d.ts +0 -2
- package/lib/utils/id.d.ts +0 -2
- package/lib/utils/js.d.ts +0 -1
- package/lib/utils/serialization.d.ts +0 -10
- /package/{es → lib/esm}/package.json +0 -0
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { id } from '../utils/id';
|
|
2
|
-
var ContainerModule = (function () {
|
|
3
|
-
function ContainerModule(registry) {
|
|
4
|
-
this.id = id();
|
|
5
|
-
this.registry = registry;
|
|
6
|
-
}
|
|
7
|
-
return ContainerModule;
|
|
8
|
-
}());
|
|
9
|
-
export { ContainerModule };
|
|
10
|
-
var AsyncContainerModule = (function () {
|
|
11
|
-
function AsyncContainerModule(registry) {
|
|
12
|
-
this.id = id();
|
|
13
|
-
this.registry = registry;
|
|
14
|
-
}
|
|
15
|
-
return AsyncContainerModule;
|
|
16
|
-
}());
|
|
17
|
-
export { AsyncContainerModule };
|
|
@@ -1,10 +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 };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
var ContainerSnapshot = (function () {
|
|
2
|
-
function ContainerSnapshot() {
|
|
3
|
-
}
|
|
4
|
-
ContainerSnapshot.of = function (bindings, middleware, activations, deactivations, moduleActivationStore) {
|
|
5
|
-
var snapshot = new ContainerSnapshot();
|
|
6
|
-
snapshot.bindings = bindings;
|
|
7
|
-
snapshot.middleware = middleware;
|
|
8
|
-
snapshot.deactivations = deactivations;
|
|
9
|
-
snapshot.activations = activations;
|
|
10
|
-
snapshot.moduleActivationStore = moduleActivationStore;
|
|
11
|
-
return snapshot;
|
|
12
|
-
};
|
|
13
|
-
return ContainerSnapshot;
|
|
14
|
-
}());
|
|
15
|
-
export { ContainerSnapshot };
|
package/es/container/lookup.d.ts
DELETED
|
@@ -1,17 +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 };
|
package/es/container/lookup.js
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import * as ERROR_MSGS from '../constants/error_msgs';
|
|
2
|
-
import { isClonable } from '../utils/clonable';
|
|
3
|
-
var Lookup = (function () {
|
|
4
|
-
function Lookup() {
|
|
5
|
-
this._map = new Map();
|
|
6
|
-
}
|
|
7
|
-
Lookup.prototype.getMap = function () {
|
|
8
|
-
return this._map;
|
|
9
|
-
};
|
|
10
|
-
Lookup.prototype.add = function (serviceIdentifier, value) {
|
|
11
|
-
this._checkNonNulish(serviceIdentifier);
|
|
12
|
-
if (value === null || value === undefined) {
|
|
13
|
-
throw new Error(ERROR_MSGS.NULL_ARGUMENT);
|
|
14
|
-
}
|
|
15
|
-
var entry = this._map.get(serviceIdentifier);
|
|
16
|
-
if (entry !== undefined) {
|
|
17
|
-
entry.push(value);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
this._map.set(serviceIdentifier, [value]);
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
Lookup.prototype.get = function (serviceIdentifier) {
|
|
24
|
-
this._checkNonNulish(serviceIdentifier);
|
|
25
|
-
var entry = this._map.get(serviceIdentifier);
|
|
26
|
-
if (entry !== undefined) {
|
|
27
|
-
return entry;
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
throw new Error(ERROR_MSGS.KEY_NOT_FOUND);
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
Lookup.prototype.remove = function (serviceIdentifier) {
|
|
34
|
-
this._checkNonNulish(serviceIdentifier);
|
|
35
|
-
if (!this._map.delete(serviceIdentifier)) {
|
|
36
|
-
throw new Error(ERROR_MSGS.KEY_NOT_FOUND);
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
Lookup.prototype.removeIntersection = function (lookup) {
|
|
40
|
-
var _this = this;
|
|
41
|
-
this.traverse(function (serviceIdentifier, value) {
|
|
42
|
-
var lookupActivations = lookup.hasKey(serviceIdentifier)
|
|
43
|
-
? lookup.get(serviceIdentifier)
|
|
44
|
-
: undefined;
|
|
45
|
-
if (lookupActivations !== undefined) {
|
|
46
|
-
var filteredValues = value.filter(function (lookupValue) {
|
|
47
|
-
return !lookupActivations.some(function (moduleActivation) { return lookupValue === moduleActivation; });
|
|
48
|
-
});
|
|
49
|
-
_this._setValue(serviceIdentifier, filteredValues);
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
};
|
|
53
|
-
Lookup.prototype.removeByCondition = function (condition) {
|
|
54
|
-
var _this = this;
|
|
55
|
-
var removals = [];
|
|
56
|
-
this._map.forEach(function (entries, key) {
|
|
57
|
-
var updatedEntries = [];
|
|
58
|
-
for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
|
|
59
|
-
var entry = entries_1[_i];
|
|
60
|
-
var remove = condition(entry);
|
|
61
|
-
if (remove) {
|
|
62
|
-
removals.push(entry);
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
updatedEntries.push(entry);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
_this._setValue(key, updatedEntries);
|
|
69
|
-
});
|
|
70
|
-
return removals;
|
|
71
|
-
};
|
|
72
|
-
Lookup.prototype.hasKey = function (serviceIdentifier) {
|
|
73
|
-
this._checkNonNulish(serviceIdentifier);
|
|
74
|
-
return this._map.has(serviceIdentifier);
|
|
75
|
-
};
|
|
76
|
-
Lookup.prototype.clone = function () {
|
|
77
|
-
var copy = new Lookup();
|
|
78
|
-
this._map.forEach(function (value, key) {
|
|
79
|
-
value.forEach(function (b) {
|
|
80
|
-
copy.add(key, isClonable(b) ? b.clone() : b);
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
return copy;
|
|
84
|
-
};
|
|
85
|
-
Lookup.prototype.traverse = function (func) {
|
|
86
|
-
this._map.forEach(function (value, key) {
|
|
87
|
-
func(key, value);
|
|
88
|
-
});
|
|
89
|
-
};
|
|
90
|
-
Lookup.prototype._checkNonNulish = function (value) {
|
|
91
|
-
if (value == null) {
|
|
92
|
-
throw new Error(ERROR_MSGS.NULL_ARGUMENT);
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
Lookup.prototype._setValue = function (serviceIdentifier, value) {
|
|
96
|
-
if (value.length > 0) {
|
|
97
|
-
this._map.set(serviceIdentifier, value);
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
this._map.delete(serviceIdentifier);
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
return Lookup;
|
|
104
|
-
}());
|
|
105
|
-
export { Lookup };
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { Lookup } from './lookup';
|
|
2
|
-
var ModuleActivationStore = (function () {
|
|
3
|
-
function ModuleActivationStore() {
|
|
4
|
-
this._map = new Map();
|
|
5
|
-
}
|
|
6
|
-
ModuleActivationStore.prototype.remove = function (moduleId) {
|
|
7
|
-
var handlers = this._map.get(moduleId);
|
|
8
|
-
if (handlers === undefined) {
|
|
9
|
-
return this._getEmptyHandlersStore();
|
|
10
|
-
}
|
|
11
|
-
this._map.delete(moduleId);
|
|
12
|
-
return handlers;
|
|
13
|
-
};
|
|
14
|
-
ModuleActivationStore.prototype.addDeactivation = function (moduleId, serviceIdentifier, onDeactivation) {
|
|
15
|
-
this._getModuleActivationHandlers(moduleId).onDeactivations.add(serviceIdentifier, onDeactivation);
|
|
16
|
-
};
|
|
17
|
-
ModuleActivationStore.prototype.addActivation = function (moduleId, serviceIdentifier, onActivation) {
|
|
18
|
-
this._getModuleActivationHandlers(moduleId).onActivations.add(serviceIdentifier, onActivation);
|
|
19
|
-
};
|
|
20
|
-
ModuleActivationStore.prototype.clone = function () {
|
|
21
|
-
var clone = new ModuleActivationStore();
|
|
22
|
-
this._map.forEach(function (handlersStore, moduleId) {
|
|
23
|
-
clone._map.set(moduleId, {
|
|
24
|
-
onActivations: handlersStore.onActivations.clone(),
|
|
25
|
-
onDeactivations: handlersStore.onDeactivations.clone(),
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
return clone;
|
|
29
|
-
};
|
|
30
|
-
ModuleActivationStore.prototype._getModuleActivationHandlers = function (moduleId) {
|
|
31
|
-
var moduleActivationHandlers = this._map.get(moduleId);
|
|
32
|
-
if (moduleActivationHandlers === undefined) {
|
|
33
|
-
moduleActivationHandlers = this._getEmptyHandlersStore();
|
|
34
|
-
this._map.set(moduleId, moduleActivationHandlers);
|
|
35
|
-
}
|
|
36
|
-
return moduleActivationHandlers;
|
|
37
|
-
};
|
|
38
|
-
ModuleActivationStore.prototype._getEmptyHandlersStore = function () {
|
|
39
|
-
var handlersStore = {
|
|
40
|
-
onActivations: new Lookup(),
|
|
41
|
-
onDeactivations: new Lookup(),
|
|
42
|
-
};
|
|
43
|
-
return handlersStore;
|
|
44
|
-
};
|
|
45
|
-
return ModuleActivationStore;
|
|
46
|
-
}());
|
|
47
|
-
export { ModuleActivationStore };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|