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,11 +2,9 @@ define(["require", "exports"], function (require, exports) {
|
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.BindingCount = void 0;
|
|
5
|
-
|
|
5
|
+
exports.BindingCount = {
|
|
6
6
|
MultipleBindingsAvailable: 2,
|
|
7
7
|
NoBindingsAvailable: 0,
|
|
8
8
|
OnlyOneBindingAvailable: 1
|
|
9
9
|
};
|
|
10
|
-
exports.BindingCount = BindingCount;
|
|
11
10
|
});
|
|
12
|
-
//# sourceMappingURL=binding_count.js.map
|
|
@@ -2,64 +2,73 @@ define(["require", "exports"], function (require, exports) {
|
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.STACK_OVERFLOW = exports.CIRCULAR_DEPENDENCY_IN_FACTORY = exports.ON_DEACTIVATION_ERROR = exports.PRE_DESTROY_ERROR = exports.POST_CONSTRUCT_ERROR = exports.ASYNC_UNBIND_REQUIRED = exports.MULTIPLE_POST_CONSTRUCT_METHODS = exports.MULTIPLE_PRE_DESTROY_METHODS = exports.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK = exports.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE = exports.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE = exports.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT = exports.ARGUMENTS_LENGTH_MISMATCH = exports.INVALID_DECORATOR_OPERATION = exports.INVALID_TO_SELF_VALUE = exports.LAZY_IN_SYNC = exports.INVALID_FUNCTION_BINDING = exports.INVALID_MIDDLEWARE_RETURN = exports.NO_MORE_SNAPSHOTS_AVAILABLE = exports.INVALID_BINDING_TYPE = exports.NOT_IMPLEMENTED = exports.CIRCULAR_DEPENDENCY = exports.UNDEFINED_INJECT_ANNOTATION = exports.MISSING_INJECT_ANNOTATION = exports.MISSING_INJECTABLE_ANNOTATION = exports.NOT_REGISTERED = exports.CANNOT_UNBIND = exports.AMBIGUOUS_MATCH = exports.KEY_NOT_FOUND = exports.NULL_ARGUMENT = exports.DUPLICATED_METADATA = exports.DUPLICATED_INJECTABLE_DECORATOR = void 0;
|
|
5
|
-
exports.DUPLICATED_INJECTABLE_DECORATOR =
|
|
6
|
-
exports.DUPLICATED_METADATA =
|
|
7
|
-
exports.NULL_ARGUMENT =
|
|
8
|
-
exports.KEY_NOT_FOUND =
|
|
9
|
-
exports.AMBIGUOUS_MATCH =
|
|
10
|
-
exports.CANNOT_UNBIND =
|
|
11
|
-
exports.NOT_REGISTERED =
|
|
12
|
-
exports.MISSING_INJECTABLE_ANNOTATION =
|
|
13
|
-
exports.MISSING_INJECT_ANNOTATION =
|
|
5
|
+
exports.DUPLICATED_INJECTABLE_DECORATOR = 'Cannot apply @injectable decorator multiple times.';
|
|
6
|
+
exports.DUPLICATED_METADATA = 'Metadata key was used more than once in a parameter:';
|
|
7
|
+
exports.NULL_ARGUMENT = 'NULL argument';
|
|
8
|
+
exports.KEY_NOT_FOUND = 'Key Not Found';
|
|
9
|
+
exports.AMBIGUOUS_MATCH = 'Ambiguous match found for serviceIdentifier:';
|
|
10
|
+
exports.CANNOT_UNBIND = 'Could not unbind serviceIdentifier:';
|
|
11
|
+
exports.NOT_REGISTERED = 'No matching bindings found for serviceIdentifier:';
|
|
12
|
+
exports.MISSING_INJECTABLE_ANNOTATION = 'Missing required @injectable annotation in:';
|
|
13
|
+
exports.MISSING_INJECT_ANNOTATION = 'Missing required @inject or @multiInject annotation in:';
|
|
14
14
|
var UNDEFINED_INJECT_ANNOTATION = function (name) {
|
|
15
|
-
return "@inject called with undefined this could mean that the class "
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
return "@inject called with undefined this could mean that the class ".concat(name, " has ") +
|
|
16
|
+
'a circular dependency problem. You can use a LazyServiceIdentifer to ' +
|
|
17
|
+
'overcome this limitation.';
|
|
18
18
|
};
|
|
19
19
|
exports.UNDEFINED_INJECT_ANNOTATION = UNDEFINED_INJECT_ANNOTATION;
|
|
20
|
-
exports.CIRCULAR_DEPENDENCY =
|
|
21
|
-
exports.NOT_IMPLEMENTED =
|
|
22
|
-
exports.INVALID_BINDING_TYPE =
|
|
23
|
-
exports.NO_MORE_SNAPSHOTS_AVAILABLE =
|
|
24
|
-
exports.INVALID_MIDDLEWARE_RETURN =
|
|
25
|
-
exports.INVALID_FUNCTION_BINDING =
|
|
26
|
-
var LAZY_IN_SYNC = function (key) { return "You are attempting to construct
|
|
20
|
+
exports.CIRCULAR_DEPENDENCY = 'Circular dependency found:';
|
|
21
|
+
exports.NOT_IMPLEMENTED = 'Sorry, this feature is not fully implemented yet.';
|
|
22
|
+
exports.INVALID_BINDING_TYPE = 'Invalid binding type:';
|
|
23
|
+
exports.NO_MORE_SNAPSHOTS_AVAILABLE = 'No snapshot available to restore.';
|
|
24
|
+
exports.INVALID_MIDDLEWARE_RETURN = 'Invalid return type in middleware. Middleware must return!';
|
|
25
|
+
exports.INVALID_FUNCTION_BINDING = 'Value provided to function binding must be a function!';
|
|
26
|
+
var LAZY_IN_SYNC = function (key) { return "You are attempting to construct ".concat(keyToString(key), " in a synchronous way ") +
|
|
27
|
+
'but it has asynchronous dependencies.'; };
|
|
27
28
|
exports.LAZY_IN_SYNC = LAZY_IN_SYNC;
|
|
28
|
-
exports.INVALID_TO_SELF_VALUE =
|
|
29
|
-
|
|
30
|
-
exports.INVALID_DECORATOR_OPERATION =
|
|
31
|
-
|
|
29
|
+
exports.INVALID_TO_SELF_VALUE = 'The toSelf function can only be applied when a constructor is ' +
|
|
30
|
+
'used as service identifier';
|
|
31
|
+
exports.INVALID_DECORATOR_OPERATION = 'The @inject @multiInject @tagged and @named decorators ' +
|
|
32
|
+
'must be applied to the parameters of a class constructor or a class property.';
|
|
32
33
|
var ARGUMENTS_LENGTH_MISMATCH = function () {
|
|
33
34
|
var values = [];
|
|
34
35
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
35
36
|
values[_i] = arguments[_i];
|
|
36
37
|
}
|
|
37
|
-
return
|
|
38
|
-
(values[0]
|
|
38
|
+
return 'The number of constructor arguments in the derived class ' +
|
|
39
|
+
"".concat(values[0], " must be >= than the number of constructor arguments of its base class.");
|
|
39
40
|
};
|
|
40
41
|
exports.ARGUMENTS_LENGTH_MISMATCH = ARGUMENTS_LENGTH_MISMATCH;
|
|
41
|
-
exports.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT =
|
|
42
|
-
|
|
43
|
-
exports.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE =
|
|
44
|
-
|
|
45
|
-
exports.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE =
|
|
46
|
-
|
|
47
|
-
exports.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK =
|
|
48
|
-
|
|
49
|
-
exports.MULTIPLE_PRE_DESTROY_METHODS =
|
|
50
|
-
exports.MULTIPLE_POST_CONSTRUCT_METHODS =
|
|
51
|
-
exports.ASYNC_UNBIND_REQUIRED =
|
|
52
|
-
var POST_CONSTRUCT_ERROR = function (clazz, errorMessage) { return "@postConstruct error in class "
|
|
42
|
+
exports.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT = 'Invalid Container constructor argument. Container options ' +
|
|
43
|
+
'must be an object.';
|
|
44
|
+
exports.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE = 'Invalid Container option. Default scope must ' +
|
|
45
|
+
'be a string ("singleton" or "transient").';
|
|
46
|
+
exports.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE = 'Invalid Container option. Auto bind injectable must ' +
|
|
47
|
+
'be a boolean';
|
|
48
|
+
exports.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK = 'Invalid Container option. Skip base check must ' +
|
|
49
|
+
'be a boolean';
|
|
50
|
+
exports.MULTIPLE_PRE_DESTROY_METHODS = 'Cannot apply @preDestroy decorator multiple times in the same class';
|
|
51
|
+
exports.MULTIPLE_POST_CONSTRUCT_METHODS = 'Cannot apply @postConstruct decorator multiple times in the same class';
|
|
52
|
+
exports.ASYNC_UNBIND_REQUIRED = 'Attempting to unbind dependency with asynchronous destruction (@preDestroy or onDeactivation)';
|
|
53
|
+
var POST_CONSTRUCT_ERROR = function (clazz, errorMessage) { return "@postConstruct error in class ".concat(clazz, ": ").concat(errorMessage); };
|
|
53
54
|
exports.POST_CONSTRUCT_ERROR = POST_CONSTRUCT_ERROR;
|
|
54
|
-
var PRE_DESTROY_ERROR = function (clazz, errorMessage) { return "@preDestroy error in class "
|
|
55
|
+
var PRE_DESTROY_ERROR = function (clazz, errorMessage) { return "@preDestroy error in class ".concat(clazz, ": ").concat(errorMessage); };
|
|
55
56
|
exports.PRE_DESTROY_ERROR = PRE_DESTROY_ERROR;
|
|
56
|
-
var ON_DEACTIVATION_ERROR = function (clazz, errorMessage) { return "onDeactivation() error in class "
|
|
57
|
+
var ON_DEACTIVATION_ERROR = function (clazz, errorMessage) { return "onDeactivation() error in class ".concat(clazz, ": ").concat(errorMessage); };
|
|
57
58
|
exports.ON_DEACTIVATION_ERROR = ON_DEACTIVATION_ERROR;
|
|
58
59
|
var CIRCULAR_DEPENDENCY_IN_FACTORY = function (factoryType, serviceIdentifier) {
|
|
59
|
-
return "It looks like there is a circular dependency in one of the '"
|
|
60
|
-
|
|
60
|
+
return "It looks like there is a circular dependency in one of the '".concat(factoryType, "' bindings. Please investigate bindings with ") +
|
|
61
|
+
"service identifier '".concat(serviceIdentifier, "'.");
|
|
61
62
|
};
|
|
62
63
|
exports.CIRCULAR_DEPENDENCY_IN_FACTORY = CIRCULAR_DEPENDENCY_IN_FACTORY;
|
|
63
|
-
exports.STACK_OVERFLOW =
|
|
64
|
+
exports.STACK_OVERFLOW = 'Maximum call stack size exceeded';
|
|
65
|
+
function keyToString(key) {
|
|
66
|
+
if (typeof key === 'function') {
|
|
67
|
+
return "[function/class ".concat(key.name || '<anonymous>', "]");
|
|
68
|
+
}
|
|
69
|
+
if (typeof key === 'symbol') {
|
|
70
|
+
return key.toString();
|
|
71
|
+
}
|
|
72
|
+
return "'".concat(key, "'");
|
|
73
|
+
}
|
|
64
74
|
});
|
|
65
|
-
//# sourceMappingURL=error_msgs.js.map
|
|
@@ -3,27 +3,26 @@ define(["require", "exports"], function (require, exports) {
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.TargetTypeEnum = exports.BindingTypeEnum = exports.BindingScopeEnum = void 0;
|
|
5
5
|
var BindingScopeEnum = {
|
|
6
|
-
Request:
|
|
7
|
-
Singleton:
|
|
8
|
-
Transient:
|
|
6
|
+
Request: 'Request',
|
|
7
|
+
Singleton: 'Singleton',
|
|
8
|
+
Transient: 'Transient'
|
|
9
9
|
};
|
|
10
10
|
exports.BindingScopeEnum = BindingScopeEnum;
|
|
11
11
|
var BindingTypeEnum = {
|
|
12
|
-
ConstantValue:
|
|
13
|
-
Constructor:
|
|
14
|
-
DynamicValue:
|
|
15
|
-
Factory:
|
|
16
|
-
Function:
|
|
17
|
-
Instance:
|
|
18
|
-
Invalid:
|
|
19
|
-
Provider:
|
|
12
|
+
ConstantValue: 'ConstantValue',
|
|
13
|
+
Constructor: 'Constructor',
|
|
14
|
+
DynamicValue: 'DynamicValue',
|
|
15
|
+
Factory: 'Factory',
|
|
16
|
+
Function: 'Function',
|
|
17
|
+
Instance: 'Instance',
|
|
18
|
+
Invalid: 'Invalid',
|
|
19
|
+
Provider: 'Provider'
|
|
20
20
|
};
|
|
21
21
|
exports.BindingTypeEnum = BindingTypeEnum;
|
|
22
22
|
var TargetTypeEnum = {
|
|
23
|
-
ClassProperty:
|
|
24
|
-
ConstructorArgument:
|
|
25
|
-
Variable:
|
|
23
|
+
ClassProperty: 'ClassProperty',
|
|
24
|
+
ConstructorArgument: 'ConstructorArgument',
|
|
25
|
+
Variable: 'Variable'
|
|
26
26
|
};
|
|
27
27
|
exports.TargetTypeEnum = TargetTypeEnum;
|
|
28
28
|
});
|
|
29
|
-
//# sourceMappingURL=literal_types.js.map
|
|
@@ -2,18 +2,18 @@ define(["require", "exports"], function (require, exports) {
|
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
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;
|
|
5
|
-
exports.NAMED_TAG =
|
|
6
|
-
exports.NAME_TAG =
|
|
7
|
-
exports.UNMANAGED_TAG =
|
|
8
|
-
exports.OPTIONAL_TAG =
|
|
9
|
-
exports.INJECT_TAG =
|
|
10
|
-
exports.MULTI_INJECT_TAG =
|
|
11
|
-
exports.TAGGED =
|
|
12
|
-
exports.TAGGED_PROP =
|
|
13
|
-
exports.PARAM_TYPES =
|
|
14
|
-
exports.DESIGN_PARAM_TYPES =
|
|
15
|
-
exports.POST_CONSTRUCT =
|
|
16
|
-
exports.PRE_DESTROY =
|
|
5
|
+
exports.NAMED_TAG = 'named';
|
|
6
|
+
exports.NAME_TAG = 'name';
|
|
7
|
+
exports.UNMANAGED_TAG = 'unmanaged';
|
|
8
|
+
exports.OPTIONAL_TAG = 'optional';
|
|
9
|
+
exports.INJECT_TAG = 'inject';
|
|
10
|
+
exports.MULTI_INJECT_TAG = 'multi_inject';
|
|
11
|
+
exports.TAGGED = 'inversify:tagged';
|
|
12
|
+
exports.TAGGED_PROP = 'inversify:tagged_props';
|
|
13
|
+
exports.PARAM_TYPES = 'inversify:paramtypes';
|
|
14
|
+
exports.DESIGN_PARAM_TYPES = 'design:paramtypes';
|
|
15
|
+
exports.POST_CONSTRUCT = 'post_construct';
|
|
16
|
+
exports.PRE_DESTROY = 'pre_destroy';
|
|
17
17
|
function getNonCustomTagKeys() {
|
|
18
18
|
return [
|
|
19
19
|
exports.INJECT_TAG,
|
|
@@ -26,4 +26,3 @@ define(["require", "exports"], function (require, exports) {
|
|
|
26
26
|
}
|
|
27
27
|
exports.NON_CUSTOM_TAG_KEYS = getNonCustomTagKeys();
|
|
28
28
|
});
|
|
29
|
-
//# sourceMappingURL=metadata_keys.js.map
|
|
@@ -11,7 +11,11 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
13
13
|
if (k2 === undefined) k2 = k;
|
|
14
|
-
Object.
|
|
14
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
15
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
16
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
17
|
+
}
|
|
18
|
+
Object.defineProperty(o, k2, desc);
|
|
15
19
|
}) : (function(o, m, k, k2) {
|
|
16
20
|
if (k2 === undefined) k2 = k;
|
|
17
21
|
o[k2] = m[k];
|
|
@@ -38,12 +42,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
38
42
|
});
|
|
39
43
|
};
|
|
40
44
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
41
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
42
|
-
return g =
|
|
45
|
+
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);
|
|
46
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
43
47
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
44
48
|
function step(op) {
|
|
45
49
|
if (f) throw new TypeError("Generator is already executing.");
|
|
46
|
-
while (_) try {
|
|
50
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
47
51
|
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;
|
|
48
52
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
49
53
|
switch (op[0]) {
|
|
@@ -82,8 +86,8 @@ define(["require", "exports", "../bindings/binding", "../constants/error_msgs",
|
|
|
82
86
|
var Container = (function () {
|
|
83
87
|
function Container(containerOptions) {
|
|
84
88
|
var options = containerOptions || {};
|
|
85
|
-
if (typeof options !==
|
|
86
|
-
throw new Error(""
|
|
89
|
+
if (typeof options !== 'object') {
|
|
90
|
+
throw new Error("".concat(ERROR_MSGS.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT));
|
|
87
91
|
}
|
|
88
92
|
if (options.defaultScope === undefined) {
|
|
89
93
|
options.defaultScope = literal_types_1.BindingScopeEnum.Transient;
|
|
@@ -91,19 +95,19 @@ define(["require", "exports", "../bindings/binding", "../constants/error_msgs",
|
|
|
91
95
|
else if (options.defaultScope !== literal_types_1.BindingScopeEnum.Singleton &&
|
|
92
96
|
options.defaultScope !== literal_types_1.BindingScopeEnum.Transient &&
|
|
93
97
|
options.defaultScope !== literal_types_1.BindingScopeEnum.Request) {
|
|
94
|
-
throw new Error(""
|
|
98
|
+
throw new Error("".concat(ERROR_MSGS.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE));
|
|
95
99
|
}
|
|
96
100
|
if (options.autoBindInjectable === undefined) {
|
|
97
101
|
options.autoBindInjectable = false;
|
|
98
102
|
}
|
|
99
|
-
else if (typeof options.autoBindInjectable !==
|
|
100
|
-
throw new Error(""
|
|
103
|
+
else if (typeof options.autoBindInjectable !== 'boolean') {
|
|
104
|
+
throw new Error("".concat(ERROR_MSGS.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE));
|
|
101
105
|
}
|
|
102
106
|
if (options.skipBaseClassChecks === undefined) {
|
|
103
107
|
options.skipBaseClassChecks = false;
|
|
104
108
|
}
|
|
105
|
-
else if (typeof options.skipBaseClassChecks !==
|
|
106
|
-
throw new Error(""
|
|
109
|
+
else if (typeof options.skipBaseClassChecks !== 'boolean') {
|
|
110
|
+
throw new Error("".concat(ERROR_MSGS.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK));
|
|
107
111
|
}
|
|
108
112
|
this.options = {
|
|
109
113
|
autoBindInjectable: options.autoBindInjectable,
|
|
@@ -424,9 +428,10 @@ define(["require", "exports", "../bindings/binding", "../constants/error_msgs",
|
|
|
424
428
|
return resolved;
|
|
425
429
|
};
|
|
426
430
|
Container.prototype._preDestroy = function (constructor, instance) {
|
|
431
|
+
var _a, _b;
|
|
427
432
|
if (Reflect.hasMetadata(METADATA_KEY.PRE_DESTROY, constructor)) {
|
|
428
433
|
var data = Reflect.getMetadata(METADATA_KEY.PRE_DESTROY, constructor);
|
|
429
|
-
return instance[data.value]();
|
|
434
|
+
return (_b = (_a = instance)[data.value]) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
430
435
|
}
|
|
431
436
|
};
|
|
432
437
|
Container.prototype._removeModuleHandlers = function (moduleId) {
|
|
@@ -453,7 +458,9 @@ define(["require", "exports", "../bindings/binding", "../constants/error_msgs",
|
|
|
453
458
|
}
|
|
454
459
|
}
|
|
455
460
|
catch (ex) {
|
|
456
|
-
|
|
461
|
+
if (ex instanceof Error) {
|
|
462
|
+
throw new Error(ERROR_MSGS.ON_DEACTIVATION_ERROR(constructor.name, ex.message));
|
|
463
|
+
}
|
|
457
464
|
}
|
|
458
465
|
};
|
|
459
466
|
Container.prototype._handleDeactivationError = function (asyncResult, constructor) {
|
|
@@ -469,7 +476,10 @@ define(["require", "exports", "../bindings/binding", "../constants/error_msgs",
|
|
|
469
476
|
return [3, 3];
|
|
470
477
|
case 2:
|
|
471
478
|
ex_1 = _a.sent();
|
|
472
|
-
|
|
479
|
+
if (ex_1 instanceof Error) {
|
|
480
|
+
throw new Error(ERROR_MSGS.ON_DEACTIVATION_ERROR(constructor.name, ex_1.message));
|
|
481
|
+
}
|
|
482
|
+
return [3, 3];
|
|
473
483
|
case 3: return [2];
|
|
474
484
|
}
|
|
475
485
|
});
|
|
@@ -676,12 +686,12 @@ define(["require", "exports", "../bindings/binding", "../constants/error_msgs",
|
|
|
676
686
|
this._bindingDictionary.remove(serviceIdentifier);
|
|
677
687
|
}
|
|
678
688
|
catch (e) {
|
|
679
|
-
throw new Error(ERROR_MSGS.CANNOT_UNBIND
|
|
689
|
+
throw new Error("".concat(ERROR_MSGS.CANNOT_UNBIND, " ").concat((0, serialization_1.getServiceIdentifierAsString)(serviceIdentifier)));
|
|
680
690
|
}
|
|
681
691
|
};
|
|
682
692
|
Container.prototype._bindingDeactivationAndPreDestroy = function (binding, instance, constructor) {
|
|
683
693
|
var _this = this;
|
|
684
|
-
if (typeof binding.onDeactivation ===
|
|
694
|
+
if (typeof binding.onDeactivation === 'function') {
|
|
685
695
|
var result = binding.onDeactivation(instance);
|
|
686
696
|
if ((0, async_1.isPromise)(result)) {
|
|
687
697
|
return result.then(function () { return _this._preDestroy(constructor, instance); });
|
|
@@ -694,7 +704,7 @@ define(["require", "exports", "../bindings/binding", "../constants/error_msgs",
|
|
|
694
704
|
return __generator(this, function (_a) {
|
|
695
705
|
switch (_a.label) {
|
|
696
706
|
case 0:
|
|
697
|
-
if (!(typeof binding.onDeactivation ===
|
|
707
|
+
if (!(typeof binding.onDeactivation === 'function')) return [3, 2];
|
|
698
708
|
return [4, binding.onDeactivation(instance)];
|
|
699
709
|
case 1:
|
|
700
710
|
_a.sent();
|
|
@@ -711,4 +721,3 @@ define(["require", "exports", "../bindings/binding", "../constants/error_msgs",
|
|
|
711
721
|
}());
|
|
712
722
|
exports.Container = Container;
|
|
713
723
|
});
|
|
714
|
-
//# sourceMappingURL=container.js.map
|
package/amd/container/lookup.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
2
|
if (k2 === undefined) k2 = k;
|
|
3
|
-
Object.
|
|
3
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(o, k2, desc);
|
|
4
8
|
}) : (function(o, m, k, k2) {
|
|
5
9
|
if (k2 === undefined) k2 = k;
|
|
6
10
|
o[k2] = m[k];
|
|
@@ -125,4 +129,3 @@ define(["require", "exports", "../constants/error_msgs", "../utils/clonable"], f
|
|
|
125
129
|
}());
|
|
126
130
|
exports.Lookup = Lookup;
|
|
127
131
|
});
|
|
128
|
-
//# sourceMappingURL=lookup.js.map
|
|
@@ -5,7 +5,5 @@ define(["require", "exports"], function (require, exports) {
|
|
|
5
5
|
var interfaces;
|
|
6
6
|
(function (interfaces) {
|
|
7
7
|
;
|
|
8
|
-
})(interfaces || (interfaces = {}));
|
|
9
|
-
exports.interfaces = interfaces;
|
|
8
|
+
})(interfaces || (exports.interfaces = interfaces = {}));
|
|
10
9
|
});
|
|
11
|
-
//# sourceMappingURL=interfaces.js.map
|
package/amd/inversify.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
2
|
if (k2 === undefined) k2 = k;
|
|
3
|
-
Object.
|
|
3
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(o, k2, desc);
|
|
4
8
|
}) : (function(o, m, k, k2) {
|
|
5
9
|
if (k2 === undefined) k2 = k;
|
|
6
10
|
o[k2] = m[k];
|
|
@@ -17,10 +21,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
17
21
|
__setModuleDefault(result, mod);
|
|
18
22
|
return result;
|
|
19
23
|
};
|
|
20
|
-
define(["require", "exports", "./constants/metadata_keys", "./container/container", "./constants/literal_types", "./container/container_module", "./annotation/decorator_utils", "./annotation/injectable", "./annotation/tagged", "./annotation/named", "./annotation/inject", "./annotation/lazy_service_identifier", "./annotation/optional", "./annotation/unmanaged", "./annotation/multi_inject", "./annotation/target_name", "./annotation/post_construct", "./annotation/pre_destroy", "./planning/metadata_reader", "./utils/id", "./interfaces/interfaces", "./annotation/decorator_utils", "./syntax/constraint_helpers", "./utils/serialization", "./utils/binding_utils"], function (require, exports, keys, container_1, literal_types_1, container_module_1, decorator_utils_1, injectable_1, tagged_1, named_1, inject_1, lazy_service_identifier_1, optional_1, unmanaged_1, multi_inject_1, target_name_1, post_construct_1, pre_destroy_1, metadata_reader_1, id_1, interfaces_1, decorator_utils_2, constraint_helpers_1, serialization_1, binding_utils_1) {
|
|
24
|
+
define(["require", "exports", "./constants/metadata_keys", "./container/container", "./constants/literal_types", "./container/container_module", "./annotation/decorator_utils", "./annotation/injectable", "./annotation/tagged", "./annotation/named", "./annotation/inject", "./annotation/lazy_service_identifier", "./annotation/lazy_service_identifier", "./annotation/optional", "./annotation/unmanaged", "./annotation/multi_inject", "./annotation/target_name", "./annotation/post_construct", "./annotation/pre_destroy", "./planning/metadata_reader", "./utils/id", "./interfaces/interfaces", "./annotation/decorator_utils", "./syntax/constraint_helpers", "./utils/serialization", "./utils/binding_utils"], function (require, exports, keys, container_1, literal_types_1, container_module_1, decorator_utils_1, injectable_1, tagged_1, named_1, inject_1, lazy_service_identifier_1, lazy_service_identifier_2, optional_1, unmanaged_1, multi_inject_1, target_name_1, post_construct_1, pre_destroy_1, metadata_reader_1, id_1, interfaces_1, decorator_utils_2, constraint_helpers_1, serialization_1, binding_utils_1) {
|
|
21
25
|
"use strict";
|
|
22
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
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;
|
|
27
|
+
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;
|
|
24
28
|
keys = __importStar(keys);
|
|
25
29
|
exports.METADATA_KEY = keys;
|
|
26
30
|
Object.defineProperty(exports, "Container", { enumerable: true, get: function () { return container_1.Container; } });
|
|
@@ -34,7 +38,8 @@ define(["require", "exports", "./constants/metadata_keys", "./container/containe
|
|
|
34
38
|
Object.defineProperty(exports, "tagged", { enumerable: true, get: function () { return tagged_1.tagged; } });
|
|
35
39
|
Object.defineProperty(exports, "named", { enumerable: true, get: function () { return named_1.named; } });
|
|
36
40
|
Object.defineProperty(exports, "inject", { enumerable: true, get: function () { return inject_1.inject; } });
|
|
37
|
-
Object.defineProperty(exports, "
|
|
41
|
+
Object.defineProperty(exports, "LazyServiceIdentifier", { enumerable: true, get: function () { return lazy_service_identifier_1.LazyServiceIdentifier; } });
|
|
42
|
+
Object.defineProperty(exports, "LazyServiceIdentifer", { enumerable: true, get: function () { return lazy_service_identifier_2.LazyServiceIdentifier; } });
|
|
38
43
|
Object.defineProperty(exports, "optional", { enumerable: true, get: function () { return optional_1.optional; } });
|
|
39
44
|
Object.defineProperty(exports, "unmanaged", { enumerable: true, get: function () { return unmanaged_1.unmanaged; } });
|
|
40
45
|
Object.defineProperty(exports, "multiInject", { enumerable: true, get: function () { return multi_inject_1.multiInject; } });
|
|
@@ -52,4 +57,3 @@ define(["require", "exports", "./constants/metadata_keys", "./container/containe
|
|
|
52
57
|
Object.defineProperty(exports, "getServiceIdentifierAsString", { enumerable: true, get: function () { return serialization_1.getServiceIdentifierAsString; } });
|
|
53
58
|
Object.defineProperty(exports, "multiBindToService", { enumerable: true, get: function () { return binding_utils_1.multiBindToService; } });
|
|
54
59
|
});
|
|
55
|
-
//# sourceMappingURL=inversify.js.map
|
package/amd/planning/context.js
CHANGED
package/amd/planning/metadata.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
2
|
if (k2 === undefined) k2 = k;
|
|
3
|
-
Object.
|
|
3
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(o, k2, desc);
|
|
4
8
|
}) : (function(o, m, k, k2) {
|
|
5
9
|
if (k2 === undefined) k2 = k;
|
|
6
10
|
o[k2] = m[k];
|
|
@@ -29,14 +33,13 @@ define(["require", "exports", "../constants/metadata_keys"], function (require,
|
|
|
29
33
|
}
|
|
30
34
|
Metadata.prototype.toString = function () {
|
|
31
35
|
if (this.key === METADATA_KEY.NAMED_TAG) {
|
|
32
|
-
return "named: "
|
|
36
|
+
return "named: ".concat(String(this.value).toString(), " ");
|
|
33
37
|
}
|
|
34
38
|
else {
|
|
35
|
-
return "tagged: { key:"
|
|
39
|
+
return "tagged: { key:".concat(this.key.toString(), ", value: ").concat(String(this.value), " }");
|
|
36
40
|
}
|
|
37
41
|
};
|
|
38
42
|
return Metadata;
|
|
39
43
|
}());
|
|
40
44
|
exports.Metadata = Metadata;
|
|
41
45
|
});
|
|
42
|
-
//# sourceMappingURL=metadata.js.map
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
2
|
if (k2 === undefined) k2 = k;
|
|
3
|
-
Object.
|
|
3
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(o, k2, desc);
|
|
4
8
|
}) : (function(o, m, k, k2) {
|
|
5
9
|
if (k2 === undefined) k2 = k;
|
|
6
10
|
o[k2] = m[k];
|
|
@@ -41,4 +45,3 @@ define(["require", "exports", "../constants/metadata_keys"], function (require,
|
|
|
41
45
|
}());
|
|
42
46
|
exports.MetadataReader = MetadataReader;
|
|
43
47
|
});
|
|
44
|
-
//# sourceMappingURL=metadata_reader.js.map
|
package/amd/planning/plan.js
CHANGED
package/amd/planning/planner.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
2
|
if (k2 === undefined) k2 = k;
|
|
3
|
-
Object.
|
|
3
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(o, k2, desc);
|
|
4
8
|
}) : (function(o, m, k, k2) {
|
|
5
9
|
if (k2 === undefined) k2 = k;
|
|
6
10
|
o[k2] = m[k];
|
|
@@ -20,13 +24,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
20
24
|
define(["require", "exports", "../bindings/binding_count", "../constants/error_msgs", "../constants/literal_types", "../constants/metadata_keys", "../utils/exceptions", "../utils/serialization", "./context", "./metadata", "./plan", "./reflection_utils", "./request", "./target"], function (require, exports, binding_count_1, ERROR_MSGS, literal_types_1, METADATA_KEY, exceptions_1, serialization_1, context_1, metadata_1, plan_1, reflection_utils_1, request_1, target_1) {
|
|
21
25
|
"use strict";
|
|
22
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.
|
|
27
|
+
exports.plan = plan;
|
|
28
|
+
exports.createMockRequest = createMockRequest;
|
|
29
|
+
exports.getBindingDictionary = getBindingDictionary;
|
|
24
30
|
ERROR_MSGS = __importStar(ERROR_MSGS);
|
|
25
31
|
METADATA_KEY = __importStar(METADATA_KEY);
|
|
26
32
|
function getBindingDictionary(cntnr) {
|
|
27
33
|
return cntnr._bindingDictionary;
|
|
28
34
|
}
|
|
29
|
-
exports.getBindingDictionary = getBindingDictionary;
|
|
30
35
|
function _createTarget(isMultiInject, targetType, serviceIdentifier, name, key, value) {
|
|
31
36
|
var metadataKey = isMultiInject ? METADATA_KEY.MULTI_INJECT_TAG : METADATA_KEY.INJECT_TAG;
|
|
32
37
|
var injectMetadata = new metadata_1.Metadata(metadataKey, serviceIdentifier);
|
|
@@ -42,7 +47,7 @@ define(["require", "exports", "../bindings/binding_count", "../constants/error_m
|
|
|
42
47
|
var activeBindings = [];
|
|
43
48
|
if (bindings.length === binding_count_1.BindingCount.NoBindingsAvailable &&
|
|
44
49
|
context.container.options.autoBindInjectable &&
|
|
45
|
-
typeof target.serviceIdentifier ===
|
|
50
|
+
typeof target.serviceIdentifier === 'function' &&
|
|
46
51
|
metadataReader.getConstructorMetadata(target.serviceIdentifier).compilerGeneratedMetadata) {
|
|
47
52
|
context.container.bind(target.serviceIdentifier).toSelf();
|
|
48
53
|
bindings = getBindings(context.container, target.serviceIdentifier);
|
|
@@ -78,7 +83,7 @@ define(["require", "exports", "../bindings/binding_count", "../constants/error_m
|
|
|
78
83
|
default:
|
|
79
84
|
if (!target.isArray()) {
|
|
80
85
|
var serviceIdentifierString = (0, serialization_1.getServiceIdentifierAsString)(serviceIdentifier);
|
|
81
|
-
var msg = ERROR_MSGS.AMBIGUOUS_MATCH
|
|
86
|
+
var msg = "".concat(ERROR_MSGS.AMBIGUOUS_MATCH, " ").concat(serviceIdentifierString);
|
|
82
87
|
msg += (0, serialization_1.listRegisteredBindingsForServiceIdentifier)(container, serviceIdentifierString, getBindings);
|
|
83
88
|
throw new Error(msg);
|
|
84
89
|
}
|
|
@@ -140,25 +145,22 @@ define(["require", "exports", "../bindings/binding_count", "../constants/error_m
|
|
|
140
145
|
function plan(metadataReader, container, isMultiInject, targetType, serviceIdentifier, key, value, avoidConstraints) {
|
|
141
146
|
if (avoidConstraints === void 0) { avoidConstraints = false; }
|
|
142
147
|
var context = new context_1.Context(container);
|
|
143
|
-
var target = _createTarget(isMultiInject, targetType, serviceIdentifier,
|
|
148
|
+
var target = _createTarget(isMultiInject, targetType, serviceIdentifier, '', key, value);
|
|
144
149
|
try {
|
|
145
150
|
_createSubRequests(metadataReader, avoidConstraints, serviceIdentifier, context, null, target);
|
|
146
151
|
return context;
|
|
147
152
|
}
|
|
148
153
|
catch (error) {
|
|
149
|
-
if ((0, exceptions_1.
|
|
154
|
+
if ((0, exceptions_1.isStackOverflowException)(error)) {
|
|
150
155
|
(0, serialization_1.circularDependencyToException)(context.plan.rootRequest);
|
|
151
156
|
}
|
|
152
157
|
throw error;
|
|
153
158
|
}
|
|
154
159
|
}
|
|
155
|
-
exports.plan = plan;
|
|
156
160
|
function createMockRequest(container, serviceIdentifier, key, value) {
|
|
157
|
-
var target = new target_1.Target(literal_types_1.TargetTypeEnum.Variable,
|
|
161
|
+
var target = new target_1.Target(literal_types_1.TargetTypeEnum.Variable, '', serviceIdentifier, new metadata_1.Metadata(key, value));
|
|
158
162
|
var context = new context_1.Context(container);
|
|
159
163
|
var request = new request_1.Request(serviceIdentifier, context, null, [], target);
|
|
160
164
|
return request;
|
|
161
165
|
}
|
|
162
|
-
exports.createMockRequest = createMockRequest;
|
|
163
166
|
});
|
|
164
|
-
//# sourceMappingURL=planner.js.map
|
|
@@ -10,9 +10,9 @@ define(["require", "exports"], function (require, exports) {
|
|
|
10
10
|
return this.str.indexOf(searchString) === 0;
|
|
11
11
|
};
|
|
12
12
|
QueryableString.prototype.endsWith = function (searchString) {
|
|
13
|
-
var reverseString =
|
|
14
|
-
var reverseSearchString = searchString.split(
|
|
15
|
-
reverseString = this.str.split(
|
|
13
|
+
var reverseString = '';
|
|
14
|
+
var reverseSearchString = searchString.split('').reverse().join('');
|
|
15
|
+
reverseString = this.str.split('').reverse().join('');
|
|
16
16
|
return this.startsWith.call({ str: reverseString }, reverseSearchString);
|
|
17
17
|
};
|
|
18
18
|
QueryableString.prototype.contains = function (searchString) {
|
|
@@ -28,4 +28,3 @@ define(["require", "exports"], function (require, exports) {
|
|
|
28
28
|
}());
|
|
29
29
|
exports.QueryableString = QueryableString;
|
|
30
30
|
});
|
|
31
|
-
//# sourceMappingURL=queryable_string.js.map
|