inversify 6.0.1 → 6.0.3
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/.nyc_output/c29b2307-4e95-47d0-b220-9efcfa7ee49f.json +1 -0
- package/.nyc_output/processinfo/c29b2307-4e95-47d0-b220-9efcfa7ee49f.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -1
- package/CHANGELOG.md +33 -3
- package/README.md +27 -24
- package/amd/annotation/decorator_utils.js +14 -12
- package/amd/annotation/inject.js +5 -2
- package/amd/annotation/inject_base.js +2 -4
- package/amd/annotation/injectable.js +6 -4
- package/amd/annotation/lazy_service_identifier.js +6 -7
- package/amd/annotation/multi_inject.js +5 -2
- package/amd/annotation/named.js +6 -4
- package/amd/annotation/optional.js +6 -4
- package/amd/annotation/post_construct.js +5 -2
- package/amd/annotation/pre_destroy.js +5 -2
- package/amd/annotation/property_event_decorator.js +1 -3
- package/amd/annotation/tagged.js +1 -3
- package/amd/annotation/target_name.js +6 -4
- package/amd/annotation/unmanaged.js +6 -4
- package/amd/bindings/binding.js +0 -1
- package/amd/bindings/binding_count.js +1 -3
- package/amd/constants/error_msgs.js +52 -43
- package/amd/constants/literal_types.js +14 -15
- package/amd/constants/metadata_keys.js +12 -13
- package/amd/container/container.js +27 -18
- package/amd/container/container_module.js +0 -1
- package/amd/container/container_snapshot.js +0 -1
- package/amd/container/lookup.js +5 -2
- package/amd/container/module_activation_store.js +0 -1
- package/amd/interfaces/interfaces.js +1 -3
- package/amd/inversify.js +9 -5
- package/amd/planning/context.js +0 -1
- package/amd/planning/metadata.js +7 -4
- package/amd/planning/metadata_reader.js +5 -2
- package/amd/planning/plan.js +0 -1
- package/amd/planning/planner.js +13 -11
- package/amd/planning/queryable_string.js +3 -4
- package/amd/planning/reflection_utils.js +15 -12
- package/amd/planning/request.js +0 -1
- package/amd/planning/target.js +6 -3
- package/amd/resolution/instantiation.js +19 -13
- package/amd/resolution/resolver.js +10 -8
- package/amd/scope/scope.js +8 -9
- package/amd/syntax/binding_in_syntax.js +0 -1
- package/amd/syntax/binding_in_when_on_syntax.js +0 -1
- package/amd/syntax/binding_on_syntax.js +0 -1
- package/amd/syntax/binding_to_syntax.js +6 -3
- package/amd/syntax/binding_when_on_syntax.js +0 -1
- package/amd/syntax/binding_when_syntax.js +0 -1
- package/amd/syntax/constraint_helpers.js +6 -3
- package/amd/utils/async.js +2 -4
- package/amd/utils/binding_utils.js +9 -6
- package/amd/utils/clonable.js +1 -3
- package/amd/utils/exceptions.js +9 -6
- package/amd/utils/factory_type.js +1 -2
- package/amd/utils/id.js +1 -3
- package/amd/utils/js.js +1 -3
- package/amd/utils/serialization.js +26 -24
- package/es/annotation/decorator_utils.js +8 -9
- package/es/annotation/inject.js +2 -3
- package/es/annotation/inject_base.js +4 -5
- package/es/annotation/injectable.js +2 -3
- package/es/annotation/lazy_service_identifier.js +5 -6
- package/es/annotation/multi_inject.js +2 -3
- package/es/annotation/named.js +3 -4
- package/es/annotation/optional.js +3 -4
- package/es/annotation/post_construct.js +3 -4
- package/es/annotation/pre_destroy.js +3 -4
- package/es/annotation/property_event_decorator.js +1 -2
- package/es/annotation/tagged.js +0 -1
- package/es/annotation/target_name.js +0 -1
- package/es/annotation/unmanaged.js +3 -4
- package/es/bindings/binding.js +2 -3
- package/es/bindings/binding_count.js +1 -3
- package/es/constants/error_msgs.js +52 -43
- package/es/constants/literal_types.js +14 -15
- package/es/constants/metadata_keys.js +12 -13
- package/es/container/container.js +36 -31
- package/es/container/container_module.js +1 -2
- package/es/container/container_snapshot.js +0 -1
- package/es/container/lookup.js +2 -3
- package/es/container/module_activation_store.js +1 -2
- package/es/interfaces/interfaces.js +0 -1
- package/es/inversify.js +24 -24
- package/es/planning/context.js +1 -2
- package/es/planning/metadata.js +3 -4
- package/es/planning/metadata_reader.js +1 -2
- package/es/planning/plan.js +0 -1
- package/es/planning/planner.js +17 -18
- package/es/planning/queryable_string.js +3 -4
- package/es/planning/reflection_utils.js +13 -14
- package/es/planning/request.js +1 -2
- package/es/planning/target.js +1 -2
- package/es/resolution/instantiation.js +17 -14
- package/es/resolution/resolver.js +12 -13
- package/es/scope/scope.js +5 -6
- package/es/syntax/binding_in_syntax.js +2 -3
- package/es/syntax/binding_in_when_on_syntax.js +3 -4
- package/es/syntax/binding_on_syntax.js +1 -2
- package/es/syntax/binding_to_syntax.js +1 -2
- package/es/syntax/binding_when_on_syntax.js +2 -3
- package/es/syntax/binding_when_syntax.js +2 -3
- package/es/syntax/constraint_helpers.js +3 -4
- package/es/utils/async.js +0 -1
- package/es/utils/binding_utils.js +6 -7
- package/es/utils/clonable.js +0 -1
- package/es/utils/exceptions.js +3 -4
- package/es/utils/factory_type.js +0 -1
- package/es/utils/id.js +0 -1
- package/es/utils/js.js +0 -1
- package/es/utils/serialization.js +16 -17
- package/es6/annotation/decorator_utils.js +12 -10
- package/es6/annotation/inject.js +5 -2
- package/es6/annotation/inject_base.js +2 -4
- package/es6/annotation/injectable.js +6 -4
- package/es6/annotation/lazy_service_identifier.js +3 -4
- package/es6/annotation/multi_inject.js +5 -2
- package/es6/annotation/named.js +6 -4
- package/es6/annotation/optional.js +6 -4
- package/es6/annotation/post_construct.js +5 -2
- package/es6/annotation/pre_destroy.js +5 -2
- package/es6/annotation/property_event_decorator.js +1 -3
- package/es6/annotation/tagged.js +1 -3
- package/es6/annotation/target_name.js +6 -4
- package/es6/annotation/unmanaged.js +6 -4
- package/es6/bindings/binding.js +0 -1
- package/es6/bindings/binding_count.js +1 -3
- package/es6/constants/error_msgs.js +46 -38
- package/es6/constants/literal_types.js +14 -15
- package/es6/constants/metadata_keys.js +12 -13
- package/es6/container/container.js +35 -27
- package/es6/container/container_module.js +0 -1
- package/es6/container/container_snapshot.js +0 -1
- package/es6/container/lookup.js +5 -2
- package/es6/container/module_activation_store.js +0 -1
- package/es6/interfaces/interfaces.js +1 -3
- package/es6/inversify.js +9 -4
- package/es6/planning/context.js +0 -1
- package/es6/planning/metadata.js +5 -2
- package/es6/planning/metadata_reader.js +5 -2
- package/es6/planning/plan.js +0 -1
- package/es6/planning/planner.js +12 -10
- package/es6/planning/queryable_string.js +3 -4
- package/es6/planning/reflection_utils.js +12 -9
- package/es6/planning/request.js +0 -1
- package/es6/planning/target.js +6 -3
- package/es6/resolution/instantiation.js +15 -9
- package/es6/resolution/resolver.js +7 -5
- package/es6/scope/scope.js +5 -6
- package/es6/syntax/binding_in_syntax.js +0 -1
- package/es6/syntax/binding_in_when_on_syntax.js +0 -1
- package/es6/syntax/binding_on_syntax.js +0 -1
- package/es6/syntax/binding_to_syntax.js +5 -2
- package/es6/syntax/binding_when_on_syntax.js +0 -1
- package/es6/syntax/binding_when_syntax.js +0 -1
- package/es6/syntax/constraint_helpers.js +6 -3
- package/es6/utils/async.js +2 -4
- package/es6/utils/binding_utils.js +7 -4
- package/es6/utils/clonable.js +1 -3
- package/es6/utils/exceptions.js +9 -6
- package/es6/utils/factory_type.js +1 -2
- package/es6/utils/id.js +1 -3
- package/es6/utils/js.js +1 -3
- package/es6/utils/serialization.js +20 -18
- package/lib/annotation/decorator_utils.d.ts +5 -5
- package/lib/annotation/decorator_utils.js +14 -12
- package/lib/annotation/inject.d.ts +1 -1
- package/lib/annotation/inject.js +5 -2
- package/lib/annotation/inject_base.d.ts +3 -3
- package/lib/annotation/inject_base.js +2 -4
- package/lib/annotation/injectable.d.ts +1 -1
- package/lib/annotation/injectable.js +6 -4
- package/lib/annotation/lazy_service_identifier.d.ts +3 -3
- package/lib/annotation/lazy_service_identifier.js +6 -7
- package/lib/annotation/multi_inject.d.ts +1 -1
- package/lib/annotation/multi_inject.js +5 -2
- package/lib/annotation/named.d.ts +1 -1
- package/lib/annotation/named.js +6 -4
- package/lib/annotation/optional.d.ts +1 -1
- package/lib/annotation/optional.js +6 -4
- package/lib/annotation/post_construct.js +5 -2
- package/lib/annotation/pre_destroy.js +5 -2
- package/lib/annotation/property_event_decorator.js +1 -3
- package/lib/annotation/tagged.d.ts +1 -1
- package/lib/annotation/tagged.js +1 -3
- package/lib/annotation/target_name.d.ts +1 -1
- package/lib/annotation/target_name.js +6 -4
- package/lib/annotation/unmanaged.d.ts +2 -2
- package/lib/annotation/unmanaged.js +6 -4
- package/lib/bindings/binding.d.ts +2 -2
- package/lib/bindings/binding.js +0 -1
- package/lib/bindings/binding_count.d.ts +1 -2
- package/lib/bindings/binding_count.js +1 -3
- package/lib/constants/error_msgs.js +52 -43
- package/lib/constants/literal_types.d.ts +1 -1
- package/lib/constants/literal_types.js +14 -15
- package/lib/constants/metadata_keys.js +12 -13
- package/lib/container/container.d.ts +2 -2
- package/lib/container/container.js +27 -18
- package/lib/container/container_module.d.ts +1 -1
- package/lib/container/container_module.js +0 -1
- package/lib/container/container_snapshot.d.ts +1 -1
- package/lib/container/container_snapshot.js +0 -1
- package/lib/container/lookup.d.ts +1 -1
- package/lib/container/lookup.js +5 -2
- package/lib/container/module_activation_store.d.ts +1 -1
- package/lib/container/module_activation_store.js +0 -1
- package/lib/interfaces/interfaces.d.ts +23 -22
- package/lib/interfaces/interfaces.js +1 -3
- package/lib/inversify.d.ts +24 -23
- package/lib/inversify.js +9 -4
- package/lib/planning/context.d.ts +1 -1
- package/lib/planning/context.js +0 -1
- package/lib/planning/metadata.d.ts +1 -1
- package/lib/planning/metadata.js +7 -4
- package/lib/planning/metadata_reader.d.ts +1 -1
- package/lib/planning/metadata_reader.js +5 -2
- package/lib/planning/plan.d.ts +1 -1
- package/lib/planning/plan.js +0 -1
- package/lib/planning/planner.d.ts +1 -1
- package/lib/planning/planner.js +13 -11
- package/lib/planning/queryable_string.d.ts +1 -1
- package/lib/planning/queryable_string.js +3 -4
- package/lib/planning/reflection_utils.d.ts +2 -2
- package/lib/planning/reflection_utils.js +15 -12
- package/lib/planning/request.d.ts +1 -1
- package/lib/planning/request.js +0 -1
- package/lib/planning/target.js +6 -3
- package/lib/resolution/instantiation.d.ts +1 -1
- package/lib/resolution/instantiation.js +19 -13
- package/lib/resolution/resolver.d.ts +1 -1
- package/lib/resolution/resolver.js +10 -8
- package/lib/scope/scope.d.ts +1 -1
- package/lib/scope/scope.js +8 -9
- package/lib/syntax/binding_in_syntax.d.ts +1 -1
- package/lib/syntax/binding_in_syntax.js +0 -1
- package/lib/syntax/binding_in_when_on_syntax.d.ts +1 -1
- package/lib/syntax/binding_in_when_on_syntax.js +0 -1
- package/lib/syntax/binding_on_syntax.d.ts +1 -1
- package/lib/syntax/binding_on_syntax.js +0 -1
- package/lib/syntax/binding_to_syntax.d.ts +1 -1
- package/lib/syntax/binding_to_syntax.js +6 -3
- package/lib/syntax/binding_when_on_syntax.d.ts +1 -1
- package/lib/syntax/binding_when_on_syntax.js +0 -1
- package/lib/syntax/binding_when_syntax.d.ts +1 -1
- package/lib/syntax/binding_when_syntax.js +0 -1
- package/lib/syntax/constraint_helpers.d.ts +1 -1
- package/lib/syntax/constraint_helpers.js +6 -3
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/utils/async.js +2 -4
- package/lib/utils/binding_utils.d.ts +1 -1
- package/lib/utils/binding_utils.js +9 -6
- package/lib/utils/clonable.d.ts +1 -1
- package/lib/utils/clonable.js +1 -3
- package/lib/utils/exceptions.d.ts +1 -1
- package/lib/utils/exceptions.js +9 -6
- package/lib/utils/factory_type.js +1 -2
- package/lib/utils/id.js +1 -3
- package/lib/utils/js.js +1 -3
- package/lib/utils/serialization.d.ts +1 -1
- package/lib/utils/serialization.js +26 -24
- package/package.json +46 -61
- package/.auditignore +0 -2
- package/.nyc_output/c19faffc-964b-4370-81a6-9b4942f3c35e.json +0 -1
- package/.nyc_output/processinfo/c19faffc-964b-4370-81a6-9b4942f3c35e.json +0 -1
- package/CODE_OF_CONDUCT.md +0 -46
- package/amd/annotation/decorator_utils.js.map +0 -1
- package/amd/annotation/inject.js.map +0 -1
- package/amd/annotation/inject_base.js.map +0 -1
- package/amd/annotation/injectable.js.map +0 -1
- package/amd/annotation/lazy_service_identifier.js.map +0 -1
- package/amd/annotation/multi_inject.js.map +0 -1
- package/amd/annotation/named.js.map +0 -1
- package/amd/annotation/optional.js.map +0 -1
- package/amd/annotation/post_construct.js.map +0 -1
- package/amd/annotation/pre_destroy.js.map +0 -1
- package/amd/annotation/property_event_decorator.js.map +0 -1
- package/amd/annotation/tagged.js.map +0 -1
- package/amd/annotation/target_name.js.map +0 -1
- package/amd/annotation/unmanaged.js.map +0 -1
- package/amd/bindings/binding.js.map +0 -1
- package/amd/bindings/binding_count.js.map +0 -1
- package/amd/constants/error_msgs.js.map +0 -1
- package/amd/constants/literal_types.js.map +0 -1
- package/amd/constants/metadata_keys.js.map +0 -1
- package/amd/container/container.js.map +0 -1
- package/amd/container/container_module.js.map +0 -1
- package/amd/container/container_snapshot.js.map +0 -1
- package/amd/container/lookup.js.map +0 -1
- package/amd/container/module_activation_store.js.map +0 -1
- package/amd/interfaces/interfaces.js.map +0 -1
- package/amd/inversify.js.map +0 -1
- package/amd/planning/context.js.map +0 -1
- package/amd/planning/metadata.js.map +0 -1
- package/amd/planning/metadata_reader.js.map +0 -1
- package/amd/planning/plan.js.map +0 -1
- package/amd/planning/planner.js.map +0 -1
- package/amd/planning/queryable_string.js.map +0 -1
- package/amd/planning/reflection_utils.js.map +0 -1
- package/amd/planning/request.js.map +0 -1
- package/amd/planning/target.js.map +0 -1
- package/amd/resolution/instantiation.js.map +0 -1
- package/amd/resolution/resolver.js.map +0 -1
- package/amd/scope/scope.js.map +0 -1
- package/amd/syntax/binding_in_syntax.js.map +0 -1
- package/amd/syntax/binding_in_when_on_syntax.js.map +0 -1
- package/amd/syntax/binding_on_syntax.js.map +0 -1
- package/amd/syntax/binding_to_syntax.js.map +0 -1
- package/amd/syntax/binding_when_on_syntax.js.map +0 -1
- package/amd/syntax/binding_when_syntax.js.map +0 -1
- package/amd/syntax/constraint_helpers.js.map +0 -1
- package/amd/utils/async.js.map +0 -1
- package/amd/utils/binding_utils.js.map +0 -1
- package/amd/utils/clonable.js.map +0 -1
- package/amd/utils/exceptions.js.map +0 -1
- package/amd/utils/factory_type.js.map +0 -1
- package/amd/utils/id.js.map +0 -1
- package/amd/utils/js.js.map +0 -1
- package/amd/utils/serialization.js.map +0 -1
- package/es/annotation/decorator_utils.js.map +0 -1
- package/es/annotation/inject.js.map +0 -1
- package/es/annotation/inject_base.js.map +0 -1
- package/es/annotation/injectable.js.map +0 -1
- package/es/annotation/lazy_service_identifier.js.map +0 -1
- package/es/annotation/multi_inject.js.map +0 -1
- package/es/annotation/named.js.map +0 -1
- package/es/annotation/optional.js.map +0 -1
- package/es/annotation/post_construct.js.map +0 -1
- package/es/annotation/pre_destroy.js.map +0 -1
- package/es/annotation/property_event_decorator.js.map +0 -1
- package/es/annotation/tagged.js.map +0 -1
- package/es/annotation/target_name.js.map +0 -1
- package/es/annotation/unmanaged.js.map +0 -1
- package/es/bindings/binding.js.map +0 -1
- package/es/bindings/binding_count.js.map +0 -1
- package/es/constants/error_msgs.js.map +0 -1
- package/es/constants/literal_types.js.map +0 -1
- package/es/constants/metadata_keys.js.map +0 -1
- package/es/container/container.js.map +0 -1
- package/es/container/container_module.js.map +0 -1
- package/es/container/container_snapshot.js.map +0 -1
- package/es/container/lookup.js.map +0 -1
- package/es/container/module_activation_store.js.map +0 -1
- package/es/interfaces/interfaces.js.map +0 -1
- package/es/inversify.js.map +0 -1
- package/es/planning/context.js.map +0 -1
- package/es/planning/metadata.js.map +0 -1
- package/es/planning/metadata_reader.js.map +0 -1
- package/es/planning/plan.js.map +0 -1
- package/es/planning/planner.js.map +0 -1
- package/es/planning/queryable_string.js.map +0 -1
- package/es/planning/reflection_utils.js.map +0 -1
- package/es/planning/request.js.map +0 -1
- package/es/planning/target.js.map +0 -1
- package/es/resolution/instantiation.js.map +0 -1
- package/es/resolution/resolver.js.map +0 -1
- package/es/scope/scope.js.map +0 -1
- package/es/syntax/binding_in_syntax.js.map +0 -1
- package/es/syntax/binding_in_when_on_syntax.js.map +0 -1
- package/es/syntax/binding_on_syntax.js.map +0 -1
- package/es/syntax/binding_to_syntax.js.map +0 -1
- package/es/syntax/binding_when_on_syntax.js.map +0 -1
- package/es/syntax/binding_when_syntax.js.map +0 -1
- package/es/syntax/constraint_helpers.js.map +0 -1
- package/es/utils/async.js.map +0 -1
- package/es/utils/binding_utils.js.map +0 -1
- package/es/utils/clonable.js.map +0 -1
- package/es/utils/exceptions.js.map +0 -1
- package/es/utils/factory_type.js.map +0 -1
- package/es/utils/id.js.map +0 -1
- package/es/utils/js.js.map +0 -1
- package/es/utils/serialization.js.map +0 -1
- package/es6/annotation/decorator_utils.js.map +0 -1
- package/es6/annotation/inject.js.map +0 -1
- package/es6/annotation/inject_base.js.map +0 -1
- package/es6/annotation/injectable.js.map +0 -1
- package/es6/annotation/lazy_service_identifier.js.map +0 -1
- package/es6/annotation/multi_inject.js.map +0 -1
- package/es6/annotation/named.js.map +0 -1
- package/es6/annotation/optional.js.map +0 -1
- package/es6/annotation/post_construct.js.map +0 -1
- package/es6/annotation/pre_destroy.js.map +0 -1
- package/es6/annotation/property_event_decorator.js.map +0 -1
- package/es6/annotation/tagged.js.map +0 -1
- package/es6/annotation/target_name.js.map +0 -1
- package/es6/annotation/unmanaged.js.map +0 -1
- package/es6/bindings/binding.js.map +0 -1
- package/es6/bindings/binding_count.js.map +0 -1
- package/es6/constants/error_msgs.js.map +0 -1
- package/es6/constants/literal_types.js.map +0 -1
- package/es6/constants/metadata_keys.js.map +0 -1
- package/es6/container/container.js.map +0 -1
- package/es6/container/container_module.js.map +0 -1
- package/es6/container/container_snapshot.js.map +0 -1
- package/es6/container/lookup.js.map +0 -1
- package/es6/container/module_activation_store.js.map +0 -1
- package/es6/interfaces/interfaces.js.map +0 -1
- package/es6/inversify.js.map +0 -1
- package/es6/planning/context.js.map +0 -1
- package/es6/planning/metadata.js.map +0 -1
- package/es6/planning/metadata_reader.js.map +0 -1
- package/es6/planning/plan.js.map +0 -1
- package/es6/planning/planner.js.map +0 -1
- package/es6/planning/queryable_string.js.map +0 -1
- package/es6/planning/reflection_utils.js.map +0 -1
- package/es6/planning/request.js.map +0 -1
- package/es6/planning/target.js.map +0 -1
- package/es6/resolution/instantiation.js.map +0 -1
- package/es6/resolution/resolver.js.map +0 -1
- package/es6/scope/scope.js.map +0 -1
- package/es6/syntax/binding_in_syntax.js.map +0 -1
- package/es6/syntax/binding_in_when_on_syntax.js.map +0 -1
- package/es6/syntax/binding_on_syntax.js.map +0 -1
- package/es6/syntax/binding_to_syntax.js.map +0 -1
- package/es6/syntax/binding_when_on_syntax.js.map +0 -1
- package/es6/syntax/binding_when_syntax.js.map +0 -1
- package/es6/syntax/constraint_helpers.js.map +0 -1
- package/es6/utils/async.js.map +0 -1
- package/es6/utils/binding_utils.js.map +0 -1
- package/es6/utils/clonable.js.map +0 -1
- package/es6/utils/exceptions.js.map +0 -1
- package/es6/utils/factory_type.js.map +0 -1
- package/es6/utils/id.js.map +0 -1
- package/es6/utils/js.js.map +0 -1
- package/es6/utils/serialization.js.map +0 -1
- package/lib/annotation/decorator_utils.js.map +0 -1
- package/lib/annotation/inject.js.map +0 -1
- package/lib/annotation/inject_base.js.map +0 -1
- package/lib/annotation/injectable.js.map +0 -1
- package/lib/annotation/lazy_service_identifier.js.map +0 -1
- package/lib/annotation/multi_inject.js.map +0 -1
- package/lib/annotation/named.js.map +0 -1
- package/lib/annotation/optional.js.map +0 -1
- package/lib/annotation/post_construct.js.map +0 -1
- package/lib/annotation/pre_destroy.js.map +0 -1
- package/lib/annotation/property_event_decorator.js.map +0 -1
- package/lib/annotation/tagged.js.map +0 -1
- package/lib/annotation/target_name.js.map +0 -1
- package/lib/annotation/unmanaged.js.map +0 -1
- package/lib/bindings/binding.js.map +0 -1
- package/lib/bindings/binding_count.js.map +0 -1
- package/lib/constants/error_msgs.js.map +0 -1
- package/lib/constants/literal_types.js.map +0 -1
- package/lib/constants/metadata_keys.js.map +0 -1
- package/lib/container/container.js.map +0 -1
- package/lib/container/container_module.js.map +0 -1
- package/lib/container/container_snapshot.js.map +0 -1
- package/lib/container/lookup.js.map +0 -1
- package/lib/container/module_activation_store.js.map +0 -1
- package/lib/interfaces/interfaces.js.map +0 -1
- package/lib/inversify.js.map +0 -1
- package/lib/planning/context.js.map +0 -1
- package/lib/planning/metadata.js.map +0 -1
- package/lib/planning/metadata_reader.js.map +0 -1
- package/lib/planning/plan.js.map +0 -1
- package/lib/planning/planner.js.map +0 -1
- package/lib/planning/queryable_string.js.map +0 -1
- package/lib/planning/reflection_utils.js.map +0 -1
- package/lib/planning/request.js.map +0 -1
- package/lib/planning/target.js.map +0 -1
- package/lib/resolution/instantiation.js.map +0 -1
- package/lib/resolution/resolver.js.map +0 -1
- package/lib/scope/scope.js.map +0 -1
- package/lib/syntax/binding_in_syntax.js.map +0 -1
- package/lib/syntax/binding_in_when_on_syntax.js.map +0 -1
- package/lib/syntax/binding_on_syntax.js.map +0 -1
- package/lib/syntax/binding_to_syntax.js.map +0 -1
- package/lib/syntax/binding_when_on_syntax.js.map +0 -1
- package/lib/syntax/binding_when_syntax.js.map +0 -1
- package/lib/syntax/constraint_helpers.js.map +0 -1
- package/lib/utils/async.js.map +0 -1
- package/lib/utils/binding_utils.js.map +0 -1
- package/lib/utils/clonable.js.map +0 -1
- package/lib/utils/exceptions.js.map +0 -1
- package/lib/utils/factory_type.js.map +0 -1
- package/lib/utils/id.js.map +0 -1
- package/lib/utils/js.js.map +0 -1
- package/lib/utils/serialization.js.map +0 -1
- package/mocha.opts +0 -3
|
@@ -2,26 +2,25 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TargetTypeEnum = exports.BindingTypeEnum = exports.BindingScopeEnum = void 0;
|
|
4
4
|
var BindingScopeEnum = {
|
|
5
|
-
Request:
|
|
6
|
-
Singleton:
|
|
7
|
-
Transient:
|
|
5
|
+
Request: 'Request',
|
|
6
|
+
Singleton: 'Singleton',
|
|
7
|
+
Transient: 'Transient'
|
|
8
8
|
};
|
|
9
9
|
exports.BindingScopeEnum = BindingScopeEnum;
|
|
10
10
|
var BindingTypeEnum = {
|
|
11
|
-
ConstantValue:
|
|
12
|
-
Constructor:
|
|
13
|
-
DynamicValue:
|
|
14
|
-
Factory:
|
|
15
|
-
Function:
|
|
16
|
-
Instance:
|
|
17
|
-
Invalid:
|
|
18
|
-
Provider:
|
|
11
|
+
ConstantValue: 'ConstantValue',
|
|
12
|
+
Constructor: 'Constructor',
|
|
13
|
+
DynamicValue: 'DynamicValue',
|
|
14
|
+
Factory: 'Factory',
|
|
15
|
+
Function: 'Function',
|
|
16
|
+
Instance: 'Instance',
|
|
17
|
+
Invalid: 'Invalid',
|
|
18
|
+
Provider: 'Provider'
|
|
19
19
|
};
|
|
20
20
|
exports.BindingTypeEnum = BindingTypeEnum;
|
|
21
21
|
var TargetTypeEnum = {
|
|
22
|
-
ClassProperty:
|
|
23
|
-
ConstructorArgument:
|
|
24
|
-
Variable:
|
|
22
|
+
ClassProperty: 'ClassProperty',
|
|
23
|
+
ConstructorArgument: 'ConstructorArgument',
|
|
24
|
+
Variable: 'Variable'
|
|
25
25
|
};
|
|
26
26
|
exports.TargetTypeEnum = TargetTypeEnum;
|
|
27
|
-
//# sourceMappingURL=literal_types.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NON_CUSTOM_TAG_KEYS = exports.PRE_DESTROY = exports.POST_CONSTRUCT = exports.DESIGN_PARAM_TYPES = exports.PARAM_TYPES = exports.TAGGED_PROP = exports.TAGGED = exports.MULTI_INJECT_TAG = exports.INJECT_TAG = exports.OPTIONAL_TAG = exports.UNMANAGED_TAG = exports.NAME_TAG = exports.NAMED_TAG = void 0;
|
|
4
|
-
exports.NAMED_TAG =
|
|
5
|
-
exports.NAME_TAG =
|
|
6
|
-
exports.UNMANAGED_TAG =
|
|
7
|
-
exports.OPTIONAL_TAG =
|
|
8
|
-
exports.INJECT_TAG =
|
|
9
|
-
exports.MULTI_INJECT_TAG =
|
|
10
|
-
exports.TAGGED =
|
|
11
|
-
exports.TAGGED_PROP =
|
|
12
|
-
exports.PARAM_TYPES =
|
|
13
|
-
exports.DESIGN_PARAM_TYPES =
|
|
14
|
-
exports.POST_CONSTRUCT =
|
|
15
|
-
exports.PRE_DESTROY =
|
|
4
|
+
exports.NAMED_TAG = 'named';
|
|
5
|
+
exports.NAME_TAG = 'name';
|
|
6
|
+
exports.UNMANAGED_TAG = 'unmanaged';
|
|
7
|
+
exports.OPTIONAL_TAG = 'optional';
|
|
8
|
+
exports.INJECT_TAG = 'inject';
|
|
9
|
+
exports.MULTI_INJECT_TAG = 'multi_inject';
|
|
10
|
+
exports.TAGGED = 'inversify:tagged';
|
|
11
|
+
exports.TAGGED_PROP = 'inversify:tagged_props';
|
|
12
|
+
exports.PARAM_TYPES = 'inversify:paramtypes';
|
|
13
|
+
exports.DESIGN_PARAM_TYPES = 'design:paramtypes';
|
|
14
|
+
exports.POST_CONSTRUCT = 'post_construct';
|
|
15
|
+
exports.PRE_DESTROY = 'pre_destroy';
|
|
16
16
|
function getNonCustomTagKeys() {
|
|
17
17
|
return [
|
|
18
18
|
exports.INJECT_TAG,
|
|
@@ -24,4 +24,3 @@ function getNonCustomTagKeys() {
|
|
|
24
24
|
];
|
|
25
25
|
}
|
|
26
26
|
exports.NON_CUSTOM_TAG_KEYS = getNonCustomTagKeys();
|
|
27
|
-
//# sourceMappingURL=metadata_keys.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { interfaces } from
|
|
1
|
+
import { interfaces } from '../interfaces/interfaces';
|
|
2
2
|
declare class Container implements interfaces.Container {
|
|
3
3
|
id: number;
|
|
4
4
|
parent: interfaces.Container | null;
|
|
@@ -25,7 +25,7 @@ declare class Container implements interfaces.Container {
|
|
|
25
25
|
unbindAllAsync(): Promise<void>;
|
|
26
26
|
onActivation<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, onActivation: interfaces.BindingActivation<T>): void;
|
|
27
27
|
onDeactivation<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, onDeactivation: interfaces.BindingDeactivation<T>): void;
|
|
28
|
-
isBound(serviceIdentifier: interfaces.ServiceIdentifier<
|
|
28
|
+
isBound(serviceIdentifier: interfaces.ServiceIdentifier<unknown>): boolean;
|
|
29
29
|
isCurrentBound<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>): boolean;
|
|
30
30
|
isBoundNamed(serviceIdentifier: interfaces.ServiceIdentifier, named: string | number | symbol): boolean;
|
|
31
31
|
isBoundTagged(serviceIdentifier: interfaces.ServiceIdentifier, key: string | number | symbol, value: unknown): boolean;
|
|
@@ -12,7 +12,11 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
};
|
|
13
13
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
14
|
if (k2 === undefined) k2 = k;
|
|
15
|
-
Object.
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
16
20
|
}) : (function(o, m, k, k2) {
|
|
17
21
|
if (k2 === undefined) k2 = k;
|
|
18
22
|
o[k2] = m[k];
|
|
@@ -39,12 +43,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
39
43
|
});
|
|
40
44
|
};
|
|
41
45
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
42
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
43
|
-
return g =
|
|
46
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
47
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
44
48
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
45
49
|
function step(op) {
|
|
46
50
|
if (f) throw new TypeError("Generator is already executing.");
|
|
47
|
-
while (_) try {
|
|
51
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
48
52
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
49
53
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
50
54
|
switch (op[0]) {
|
|
@@ -93,8 +97,8 @@ var module_activation_store_1 = require("./module_activation_store");
|
|
|
93
97
|
var Container = (function () {
|
|
94
98
|
function Container(containerOptions) {
|
|
95
99
|
var options = containerOptions || {};
|
|
96
|
-
if (typeof options !==
|
|
97
|
-
throw new Error(""
|
|
100
|
+
if (typeof options !== 'object') {
|
|
101
|
+
throw new Error("".concat(ERROR_MSGS.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT));
|
|
98
102
|
}
|
|
99
103
|
if (options.defaultScope === undefined) {
|
|
100
104
|
options.defaultScope = literal_types_1.BindingScopeEnum.Transient;
|
|
@@ -102,19 +106,19 @@ var Container = (function () {
|
|
|
102
106
|
else if (options.defaultScope !== literal_types_1.BindingScopeEnum.Singleton &&
|
|
103
107
|
options.defaultScope !== literal_types_1.BindingScopeEnum.Transient &&
|
|
104
108
|
options.defaultScope !== literal_types_1.BindingScopeEnum.Request) {
|
|
105
|
-
throw new Error(""
|
|
109
|
+
throw new Error("".concat(ERROR_MSGS.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE));
|
|
106
110
|
}
|
|
107
111
|
if (options.autoBindInjectable === undefined) {
|
|
108
112
|
options.autoBindInjectable = false;
|
|
109
113
|
}
|
|
110
|
-
else if (typeof options.autoBindInjectable !==
|
|
111
|
-
throw new Error(""
|
|
114
|
+
else if (typeof options.autoBindInjectable !== 'boolean') {
|
|
115
|
+
throw new Error("".concat(ERROR_MSGS.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE));
|
|
112
116
|
}
|
|
113
117
|
if (options.skipBaseClassChecks === undefined) {
|
|
114
118
|
options.skipBaseClassChecks = false;
|
|
115
119
|
}
|
|
116
|
-
else if (typeof options.skipBaseClassChecks !==
|
|
117
|
-
throw new Error(""
|
|
120
|
+
else if (typeof options.skipBaseClassChecks !== 'boolean') {
|
|
121
|
+
throw new Error("".concat(ERROR_MSGS.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK));
|
|
118
122
|
}
|
|
119
123
|
this.options = {
|
|
120
124
|
autoBindInjectable: options.autoBindInjectable,
|
|
@@ -435,9 +439,10 @@ var Container = (function () {
|
|
|
435
439
|
return resolved;
|
|
436
440
|
};
|
|
437
441
|
Container.prototype._preDestroy = function (constructor, instance) {
|
|
442
|
+
var _a, _b;
|
|
438
443
|
if (Reflect.hasMetadata(METADATA_KEY.PRE_DESTROY, constructor)) {
|
|
439
444
|
var data = Reflect.getMetadata(METADATA_KEY.PRE_DESTROY, constructor);
|
|
440
|
-
return instance[data.value]();
|
|
445
|
+
return (_b = (_a = instance)[data.value]) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
441
446
|
}
|
|
442
447
|
};
|
|
443
448
|
Container.prototype._removeModuleHandlers = function (moduleId) {
|
|
@@ -464,7 +469,9 @@ var Container = (function () {
|
|
|
464
469
|
}
|
|
465
470
|
}
|
|
466
471
|
catch (ex) {
|
|
467
|
-
|
|
472
|
+
if (ex instanceof Error) {
|
|
473
|
+
throw new Error(ERROR_MSGS.ON_DEACTIVATION_ERROR(constructor.name, ex.message));
|
|
474
|
+
}
|
|
468
475
|
}
|
|
469
476
|
};
|
|
470
477
|
Container.prototype._handleDeactivationError = function (asyncResult, constructor) {
|
|
@@ -480,7 +487,10 @@ var Container = (function () {
|
|
|
480
487
|
return [3, 3];
|
|
481
488
|
case 2:
|
|
482
489
|
ex_1 = _a.sent();
|
|
483
|
-
|
|
490
|
+
if (ex_1 instanceof Error) {
|
|
491
|
+
throw new Error(ERROR_MSGS.ON_DEACTIVATION_ERROR(constructor.name, ex_1.message));
|
|
492
|
+
}
|
|
493
|
+
return [3, 3];
|
|
484
494
|
case 3: return [2];
|
|
485
495
|
}
|
|
486
496
|
});
|
|
@@ -687,12 +697,12 @@ var Container = (function () {
|
|
|
687
697
|
this._bindingDictionary.remove(serviceIdentifier);
|
|
688
698
|
}
|
|
689
699
|
catch (e) {
|
|
690
|
-
throw new Error(ERROR_MSGS.CANNOT_UNBIND
|
|
700
|
+
throw new Error("".concat(ERROR_MSGS.CANNOT_UNBIND, " ").concat((0, serialization_1.getServiceIdentifierAsString)(serviceIdentifier)));
|
|
691
701
|
}
|
|
692
702
|
};
|
|
693
703
|
Container.prototype._bindingDeactivationAndPreDestroy = function (binding, instance, constructor) {
|
|
694
704
|
var _this = this;
|
|
695
|
-
if (typeof binding.onDeactivation ===
|
|
705
|
+
if (typeof binding.onDeactivation === 'function') {
|
|
696
706
|
var result = binding.onDeactivation(instance);
|
|
697
707
|
if ((0, async_1.isPromise)(result)) {
|
|
698
708
|
return result.then(function () { return _this._preDestroy(constructor, instance); });
|
|
@@ -705,7 +715,7 @@ var Container = (function () {
|
|
|
705
715
|
return __generator(this, function (_a) {
|
|
706
716
|
switch (_a.label) {
|
|
707
717
|
case 0:
|
|
708
|
-
if (!(typeof binding.onDeactivation ===
|
|
718
|
+
if (!(typeof binding.onDeactivation === 'function')) return [3, 2];
|
|
709
719
|
return [4, binding.onDeactivation(instance)];
|
|
710
720
|
case 1:
|
|
711
721
|
_a.sent();
|
|
@@ -721,4 +731,3 @@ var Container = (function () {
|
|
|
721
731
|
return Container;
|
|
722
732
|
}());
|
|
723
733
|
exports.Container = Container;
|
|
724
|
-
//# sourceMappingURL=container.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { interfaces } from
|
|
1
|
+
import { interfaces } from '../interfaces/interfaces';
|
|
2
2
|
declare class ContainerSnapshot implements interfaces.ContainerSnapshot {
|
|
3
3
|
bindings: interfaces.Lookup<interfaces.Binding<unknown>>;
|
|
4
4
|
activations: interfaces.Lookup<interfaces.BindingActivation<unknown>>;
|
package/lib/container/lookup.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
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);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -124,4 +128,3 @@ var Lookup = (function () {
|
|
|
124
128
|
return Lookup;
|
|
125
129
|
}());
|
|
126
130
|
exports.Lookup = Lookup;
|
|
127
|
-
//# sourceMappingURL=lookup.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { interfaces } from
|
|
1
|
+
import { interfaces } from '../interfaces/interfaces';
|
|
2
2
|
export declare class ModuleActivationStore implements interfaces.ModuleActivationStore {
|
|
3
3
|
private _map;
|
|
4
4
|
remove(moduleId: number): interfaces.ModuleActivationHandlers;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { FactoryType } from
|
|
1
|
+
import { FactoryType } from '../utils/factory_type';
|
|
2
2
|
declare namespace interfaces {
|
|
3
3
|
export type DynamicValue<T> = (context: interfaces.Context) => T | Promise<T>;
|
|
4
4
|
export type ContainerResolution<T> = T | Promise<T> | (T | Promise<T>)[];
|
|
5
5
|
type AsyncCallback<TCallback> = TCallback extends (...args: infer TArgs) => infer TResult ? (...args: TArgs) => Promise<TResult> : never;
|
|
6
|
-
export type BindingScope =
|
|
7
|
-
export type BindingType =
|
|
8
|
-
export type TargetType =
|
|
6
|
+
export type BindingScope = 'Singleton' | 'Transient' | 'Request';
|
|
7
|
+
export type BindingType = 'ConstantValue' | 'Constructor' | 'DynamicValue' | 'Factory' | 'Function' | 'Instance' | 'Invalid' | 'Provider';
|
|
8
|
+
export type TargetType = 'ConstructorArgument' | 'ClassProperty' | 'Variable';
|
|
9
9
|
export interface BindingScopeEnum {
|
|
10
10
|
Request: interfaces.BindingScope;
|
|
11
11
|
Singleton: interfaces.BindingScope;
|
|
@@ -26,7 +26,8 @@ declare namespace interfaces {
|
|
|
26
26
|
ClassProperty: interfaces.TargetType;
|
|
27
27
|
Variable: interfaces.TargetType;
|
|
28
28
|
}
|
|
29
|
-
export type Newable<T> = new (...args:
|
|
29
|
+
export type Newable<T> = new (...args: any[]) => T;
|
|
30
|
+
export type Instance<T> = T & Record<string, () => void>;
|
|
30
31
|
export interface Abstract<T> {
|
|
31
32
|
prototype: T;
|
|
32
33
|
}
|
|
@@ -34,11 +35,11 @@ declare namespace interfaces {
|
|
|
34
35
|
export interface Clonable<T> {
|
|
35
36
|
clone(): T;
|
|
36
37
|
}
|
|
37
|
-
export type BindingActivation<T> = (context: interfaces.Context, injectable: T) => T | Promise<T>;
|
|
38
|
-
export type BindingDeactivation<T> = (injectable: T) => void | Promise<void>;
|
|
39
|
-
export interface Binding<TActivated> extends Clonable<Binding<TActivated>> {
|
|
38
|
+
export type BindingActivation<T = unknown> = (context: interfaces.Context, injectable: T) => T | Promise<T>;
|
|
39
|
+
export type BindingDeactivation<T = unknown> = (injectable: T) => void | Promise<void>;
|
|
40
|
+
export interface Binding<TActivated = unknown> extends Clonable<Binding<TActivated>> {
|
|
40
41
|
id: number;
|
|
41
|
-
moduleId: ContainerModuleBase[
|
|
42
|
+
moduleId: ContainerModuleBase['id'];
|
|
42
43
|
activated: boolean;
|
|
43
44
|
serviceIdentifier: ServiceIdentifier<TActivated>;
|
|
44
45
|
constraint: ConstraintFunction;
|
|
@@ -71,10 +72,10 @@ declare namespace interfaces {
|
|
|
71
72
|
isMultiInject: boolean;
|
|
72
73
|
targetType: TargetType;
|
|
73
74
|
serviceIdentifier: interfaces.ServiceIdentifier<T>;
|
|
74
|
-
key?: string | number | symbol;
|
|
75
|
+
key?: string | number | symbol | undefined;
|
|
75
76
|
value?: unknown;
|
|
76
77
|
}
|
|
77
|
-
export type Next = (args: NextArgs) => (
|
|
78
|
+
export type Next = (args: NextArgs) => (unknown | unknown[]);
|
|
78
79
|
export type Middleware = (next: Next) => Next;
|
|
79
80
|
export type ContextInterceptor = (context: interfaces.Context) => interfaces.Context;
|
|
80
81
|
export interface Context {
|
|
@@ -134,7 +135,7 @@ declare namespace interfaces {
|
|
|
134
135
|
}
|
|
135
136
|
export interface ContainerOptions {
|
|
136
137
|
autoBindInjectable?: boolean;
|
|
137
|
-
defaultScope?: BindingScope;
|
|
138
|
+
defaultScope?: BindingScope | undefined;
|
|
138
139
|
skipBaseClassChecks?: boolean;
|
|
139
140
|
}
|
|
140
141
|
export interface Container {
|
|
@@ -177,11 +178,11 @@ declare namespace interfaces {
|
|
|
177
178
|
restore(): void;
|
|
178
179
|
createChild(): Container;
|
|
179
180
|
}
|
|
180
|
-
export type Bind = <T>(serviceIdentifier: ServiceIdentifier<T>) => BindingToSyntax<T>;
|
|
181
|
-
export type Rebind = <T>(serviceIdentifier: ServiceIdentifier<T>) => BindingToSyntax<T>;
|
|
182
|
-
export type Unbind = <T>(serviceIdentifier: ServiceIdentifier<T>) => void;
|
|
183
|
-
export type UnbindAsync = <T>(serviceIdentifier: ServiceIdentifier<T>) => Promise<void>;
|
|
184
|
-
export type IsBound = <T>(serviceIdentifier: ServiceIdentifier<T>) => boolean;
|
|
181
|
+
export type Bind = <T = unknown>(serviceIdentifier: ServiceIdentifier<T>) => BindingToSyntax<T>;
|
|
182
|
+
export type Rebind = <T = unknown>(serviceIdentifier: ServiceIdentifier<T>) => BindingToSyntax<T>;
|
|
183
|
+
export type Unbind = <T = unknown>(serviceIdentifier: ServiceIdentifier<T>) => void;
|
|
184
|
+
export type UnbindAsync = <T = unknown>(serviceIdentifier: ServiceIdentifier<T>) => Promise<void>;
|
|
185
|
+
export type IsBound = <T = unknown>(serviceIdentifier: ServiceIdentifier<T>) => boolean;
|
|
185
186
|
export interface ContainerModuleBase {
|
|
186
187
|
id: number;
|
|
187
188
|
}
|
|
@@ -196,11 +197,11 @@ declare namespace interfaces {
|
|
|
196
197
|
onDeactivations: Lookup<BindingDeactivation<unknown>>;
|
|
197
198
|
}
|
|
198
199
|
export interface ModuleActivationStore extends Clonable<ModuleActivationStore> {
|
|
199
|
-
addDeactivation(moduleId: ContainerModuleBase[
|
|
200
|
-
addActivation(moduleId: ContainerModuleBase[
|
|
201
|
-
remove(moduleId: ContainerModuleBase[
|
|
200
|
+
addDeactivation(moduleId: ContainerModuleBase['id'], serviceIdentifier: ServiceIdentifier<unknown>, onDeactivation: interfaces.BindingDeactivation<unknown>): void;
|
|
201
|
+
addActivation(moduleId: ContainerModuleBase['id'], serviceIdentifier: ServiceIdentifier<unknown>, onActivation: interfaces.BindingActivation<unknown>): void;
|
|
202
|
+
remove(moduleId: ContainerModuleBase['id']): ModuleActivationHandlers;
|
|
202
203
|
}
|
|
203
|
-
export type ContainerModuleCallBack = (bind: interfaces.Bind, unbind: interfaces.Unbind, isBound: interfaces.IsBound, rebind: interfaces.Rebind, unbindAsync: interfaces.UnbindAsync, onActivation: interfaces.Container[
|
|
204
|
+
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;
|
|
204
205
|
export type AsyncContainerModuleCallBack = AsyncCallback<ContainerModuleCallBack>;
|
|
205
206
|
export interface ContainerSnapshot {
|
|
206
207
|
bindings: Lookup<Binding<unknown>>;
|
|
@@ -251,7 +252,7 @@ declare namespace interfaces {
|
|
|
251
252
|
export interface BindingInWhenOnSyntax<T> extends BindingInSyntax<T>, BindingWhenOnSyntax<T> {
|
|
252
253
|
}
|
|
253
254
|
export interface BindingToSyntax<T> {
|
|
254
|
-
to(constructor:
|
|
255
|
+
to(constructor: Newable<T>): BindingInWhenOnSyntax<T>;
|
|
255
256
|
toSelf(): BindingInWhenOnSyntax<T>;
|
|
256
257
|
toConstantValue(value: T): BindingWhenOnSyntax<T>;
|
|
257
258
|
toDynamicValue(func: DynamicValue<T>): BindingInWhenOnSyntax<T>;
|
package/lib/inversify.d.ts
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import * as keys from
|
|
1
|
+
import * as keys from './constants/metadata_keys';
|
|
2
2
|
export declare const METADATA_KEY: typeof keys;
|
|
3
|
-
export { Container } from
|
|
4
|
-
export { BindingScopeEnum, BindingTypeEnum, TargetTypeEnum } from
|
|
5
|
-
export { AsyncContainerModule, ContainerModule } from
|
|
6
|
-
export { createTaggedDecorator } from
|
|
7
|
-
export { injectable } from
|
|
8
|
-
export { tagged } from
|
|
9
|
-
export { named } from
|
|
10
|
-
export { inject } from
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
3
|
+
export { Container } from './container/container';
|
|
4
|
+
export { BindingScopeEnum, BindingTypeEnum, TargetTypeEnum } from './constants/literal_types';
|
|
5
|
+
export { AsyncContainerModule, ContainerModule } from './container/container_module';
|
|
6
|
+
export { createTaggedDecorator } from './annotation/decorator_utils';
|
|
7
|
+
export { injectable } from './annotation/injectable';
|
|
8
|
+
export { tagged } from './annotation/tagged';
|
|
9
|
+
export { named } from './annotation/named';
|
|
10
|
+
export { inject } from './annotation/inject';
|
|
11
|
+
export { LazyServiceIdentifier } from './annotation/lazy_service_identifier';
|
|
12
|
+
export { LazyServiceIdentifier as LazyServiceIdentifer } from './annotation/lazy_service_identifier';
|
|
13
|
+
export { optional } from './annotation/optional';
|
|
14
|
+
export { unmanaged } from './annotation/unmanaged';
|
|
15
|
+
export { multiInject } from './annotation/multi_inject';
|
|
16
|
+
export { targetName } from './annotation/target_name';
|
|
17
|
+
export { postConstruct } from './annotation/post_construct';
|
|
18
|
+
export { preDestroy } from './annotation/pre_destroy';
|
|
19
|
+
export { MetadataReader } from './planning/metadata_reader';
|
|
20
|
+
export { id } from './utils/id';
|
|
21
|
+
export { interfaces } from './interfaces/interfaces';
|
|
22
|
+
export { decorate } from './annotation/decorator_utils';
|
|
23
|
+
export { traverseAncerstors, taggedConstraint, namedConstraint, typeConstraint } from './syntax/constraint_helpers';
|
|
24
|
+
export { getServiceIdentifierAsString } from './utils/serialization';
|
|
25
|
+
export { multiBindToService } from './utils/binding_utils';
|
package/lib/inversify.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
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);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -19,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
19
23
|
return result;
|
|
20
24
|
};
|
|
21
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.multiBindToService = exports.getServiceIdentifierAsString = exports.typeConstraint = exports.namedConstraint = exports.taggedConstraint = exports.traverseAncerstors = exports.decorate = exports.interfaces = exports.id = exports.MetadataReader = exports.preDestroy = exports.postConstruct = exports.targetName = exports.multiInject = exports.unmanaged = exports.optional = exports.LazyServiceIdentifer = exports.inject = exports.named = exports.tagged = exports.injectable = exports.createTaggedDecorator = exports.ContainerModule = exports.AsyncContainerModule = exports.TargetTypeEnum = exports.BindingTypeEnum = exports.BindingScopeEnum = exports.Container = exports.METADATA_KEY = void 0;
|
|
26
|
+
exports.multiBindToService = exports.getServiceIdentifierAsString = exports.typeConstraint = exports.namedConstraint = exports.taggedConstraint = exports.traverseAncerstors = exports.decorate = exports.interfaces = exports.id = exports.MetadataReader = exports.preDestroy = exports.postConstruct = exports.targetName = exports.multiInject = exports.unmanaged = exports.optional = exports.LazyServiceIdentifer = exports.LazyServiceIdentifier = exports.inject = exports.named = exports.tagged = exports.injectable = exports.createTaggedDecorator = exports.ContainerModule = exports.AsyncContainerModule = exports.TargetTypeEnum = exports.BindingTypeEnum = exports.BindingScopeEnum = exports.Container = exports.METADATA_KEY = void 0;
|
|
23
27
|
var keys = __importStar(require("./constants/metadata_keys"));
|
|
24
28
|
exports.METADATA_KEY = keys;
|
|
25
29
|
var container_1 = require("./container/container");
|
|
@@ -42,7 +46,9 @@ Object.defineProperty(exports, "named", { enumerable: true, get: function () { r
|
|
|
42
46
|
var inject_1 = require("./annotation/inject");
|
|
43
47
|
Object.defineProperty(exports, "inject", { enumerable: true, get: function () { return inject_1.inject; } });
|
|
44
48
|
var lazy_service_identifier_1 = require("./annotation/lazy_service_identifier");
|
|
45
|
-
Object.defineProperty(exports, "
|
|
49
|
+
Object.defineProperty(exports, "LazyServiceIdentifier", { enumerable: true, get: function () { return lazy_service_identifier_1.LazyServiceIdentifier; } });
|
|
50
|
+
var lazy_service_identifier_2 = require("./annotation/lazy_service_identifier");
|
|
51
|
+
Object.defineProperty(exports, "LazyServiceIdentifer", { enumerable: true, get: function () { return lazy_service_identifier_2.LazyServiceIdentifier; } });
|
|
46
52
|
var optional_1 = require("./annotation/optional");
|
|
47
53
|
Object.defineProperty(exports, "optional", { enumerable: true, get: function () { return optional_1.optional; } });
|
|
48
54
|
var unmanaged_1 = require("./annotation/unmanaged");
|
|
@@ -72,4 +78,3 @@ var serialization_1 = require("./utils/serialization");
|
|
|
72
78
|
Object.defineProperty(exports, "getServiceIdentifierAsString", { enumerable: true, get: function () { return serialization_1.getServiceIdentifierAsString; } });
|
|
73
79
|
var binding_utils_1 = require("./utils/binding_utils");
|
|
74
80
|
Object.defineProperty(exports, "multiBindToService", { enumerable: true, get: function () { return binding_utils_1.multiBindToService; } });
|
|
75
|
-
//# sourceMappingURL=inversify.js.map
|
package/lib/planning/context.js
CHANGED
package/lib/planning/metadata.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
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);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -28,13 +32,12 @@ var Metadata = (function () {
|
|
|
28
32
|
}
|
|
29
33
|
Metadata.prototype.toString = function () {
|
|
30
34
|
if (this.key === METADATA_KEY.NAMED_TAG) {
|
|
31
|
-
return "named: "
|
|
35
|
+
return "named: ".concat(String(this.value).toString(), " ");
|
|
32
36
|
}
|
|
33
37
|
else {
|
|
34
|
-
return "tagged: { key:"
|
|
38
|
+
return "tagged: { key:".concat(this.key.toString(), ", value: ").concat(String(this.value), " }");
|
|
35
39
|
}
|
|
36
40
|
};
|
|
37
41
|
return Metadata;
|
|
38
42
|
}());
|
|
39
43
|
exports.Metadata = Metadata;
|
|
40
|
-
//# sourceMappingURL=metadata.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { interfaces } from
|
|
1
|
+
import { interfaces } from '../interfaces/interfaces';
|
|
2
2
|
declare class MetadataReader implements interfaces.MetadataReader {
|
|
3
3
|
getConstructorMetadata(constructorFunc: NewableFunction): interfaces.ConstructorMetadata;
|
|
4
4
|
getPropertiesMetadata(constructorFunc: NewableFunction): interfaces.MetadataMap;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
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);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -39,4 +43,3 @@ var MetadataReader = (function () {
|
|
|
39
43
|
return MetadataReader;
|
|
40
44
|
}());
|
|
41
45
|
exports.MetadataReader = MetadataReader;
|
|
42
|
-
//# sourceMappingURL=metadata_reader.js.map
|
package/lib/planning/plan.d.ts
CHANGED
package/lib/planning/plan.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { interfaces } from
|
|
1
|
+
import { interfaces } from '../interfaces/interfaces';
|
|
2
2
|
declare function getBindingDictionary(cntnr: interfaces.Container): interfaces.Lookup<interfaces.Binding<unknown>>;
|
|
3
3
|
declare function plan(metadataReader: interfaces.MetadataReader, container: interfaces.Container, isMultiInject: boolean, targetType: interfaces.TargetType, serviceIdentifier: interfaces.ServiceIdentifier, key?: string | number | symbol, value?: unknown, avoidConstraints?: boolean): interfaces.Context;
|
|
4
4
|
declare function createMockRequest(container: interfaces.Container, serviceIdentifier: interfaces.ServiceIdentifier, key: string | number | symbol, value: unknown): interfaces.Request;
|