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
|
@@ -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,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
19
23
|
return result;
|
|
20
24
|
};
|
|
21
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.getFunctionName =
|
|
26
|
+
exports.getFunctionName = void 0;
|
|
27
|
+
exports.getDependencies = getDependencies;
|
|
28
|
+
exports.getBaseClassDependencyCount = getBaseClassDependencyCount;
|
|
23
29
|
const lazy_service_identifier_1 = require("../annotation/lazy_service_identifier");
|
|
24
30
|
const ERROR_MSGS = __importStar(require("../constants/error_msgs"));
|
|
25
31
|
const literal_types_1 = require("../constants/literal_types");
|
|
@@ -31,7 +37,6 @@ function getDependencies(metadataReader, func) {
|
|
|
31
37
|
const constructorName = (0, serialization_1.getFunctionName)(func);
|
|
32
38
|
return getTargets(metadataReader, constructorName, func, false);
|
|
33
39
|
}
|
|
34
|
-
exports.getDependencies = getDependencies;
|
|
35
40
|
function getTargets(metadataReader, constructorName, func, isBaseClass) {
|
|
36
41
|
const metadata = metadataReader.getConstructorMetadata(func);
|
|
37
42
|
const serviceIdentifiers = metadata.compilerGeneratedMetadata;
|
|
@@ -57,16 +62,16 @@ function getConstructorArgsAsTarget(index, isBaseClass, constructorName, service
|
|
|
57
62
|
const metadata = formatTargetMetadata(targetMetadata);
|
|
58
63
|
const isManaged = metadata.unmanaged !== true;
|
|
59
64
|
let serviceIdentifier = serviceIdentifiers[index];
|
|
60
|
-
const injectIdentifier =
|
|
61
|
-
serviceIdentifier = (injectIdentifier
|
|
62
|
-
if (serviceIdentifier instanceof lazy_service_identifier_1.
|
|
65
|
+
const injectIdentifier = metadata.inject || metadata.multiInject;
|
|
66
|
+
serviceIdentifier = (injectIdentifier ? injectIdentifier : serviceIdentifier);
|
|
67
|
+
if (serviceIdentifier instanceof lazy_service_identifier_1.LazyServiceIdentifier) {
|
|
63
68
|
serviceIdentifier = serviceIdentifier.unwrap();
|
|
64
69
|
}
|
|
65
70
|
if (isManaged) {
|
|
66
71
|
const isObject = serviceIdentifier === Object;
|
|
67
72
|
const isFunction = serviceIdentifier === Function;
|
|
68
73
|
const isUndefined = serviceIdentifier === undefined;
|
|
69
|
-
const isUnknownType =
|
|
74
|
+
const isUnknownType = isObject || isFunction || isUndefined;
|
|
70
75
|
if (!isBaseClass && isUnknownType) {
|
|
71
76
|
const msg = `${ERROR_MSGS.MISSING_INJECT_ANNOTATION} argument ${index} in class ${constructorName}.`;
|
|
72
77
|
throw new Error(msg);
|
|
@@ -140,7 +145,6 @@ function getBaseClassDependencyCount(metadataReader, func) {
|
|
|
140
145
|
return 0;
|
|
141
146
|
}
|
|
142
147
|
}
|
|
143
|
-
exports.getBaseClassDependencyCount = getBaseClassDependencyCount;
|
|
144
148
|
function formatTargetMetadata(targetMetadata) {
|
|
145
149
|
const targetMetadataMap = {};
|
|
146
150
|
targetMetadata.forEach((m) => {
|
|
@@ -153,4 +157,3 @@ function formatTargetMetadata(targetMetadata) {
|
|
|
153
157
|
unmanaged: targetMetadataMap[METADATA_KEY.UNMANAGED_TAG]
|
|
154
158
|
};
|
|
155
159
|
}
|
|
156
|
-
//# sourceMappingURL=reflection_utils.js.map
|
package/es6/planning/request.js
CHANGED
package/es6/planning/target.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];
|
|
@@ -31,7 +35,7 @@ class Target {
|
|
|
31
35
|
this.type = type;
|
|
32
36
|
this.serviceIdentifier = serviceIdentifier;
|
|
33
37
|
const queryableName = typeof identifier === 'symbol' ? (0, serialization_1.getSymbolDescription)(identifier) : identifier;
|
|
34
|
-
this.name = new queryable_string_1.QueryableString(queryableName ||
|
|
38
|
+
this.name = new queryable_string_1.QueryableString(queryableName || '');
|
|
35
39
|
this.identifier = identifier;
|
|
36
40
|
this.metadata = new Array();
|
|
37
41
|
let metadataItem = null;
|
|
@@ -97,4 +101,3 @@ class Target {
|
|
|
97
101
|
}
|
|
98
102
|
}
|
|
99
103
|
exports.Target = Target;
|
|
100
|
-
//# sourceMappingURL=target.js.map
|
|
@@ -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,7 +32,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
28
32
|
});
|
|
29
33
|
};
|
|
30
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
exports.resolveInstance =
|
|
35
|
+
exports.resolveInstance = resolveInstance;
|
|
32
36
|
const error_msgs_1 = require("../constants/error_msgs");
|
|
33
37
|
const literal_types_1 = require("../constants/literal_types");
|
|
34
38
|
const METADATA_KEY = __importStar(require("../constants/metadata_keys"));
|
|
@@ -72,7 +76,9 @@ function createInstanceWithInjections(args) {
|
|
|
72
76
|
args.propertyRequests.forEach((r, index) => {
|
|
73
77
|
const property = r.target.identifier;
|
|
74
78
|
const injection = args.propertyInjections[index];
|
|
75
|
-
|
|
79
|
+
if (!r.target.isOptional() || injection !== undefined) {
|
|
80
|
+
instance[property] = injection;
|
|
81
|
+
}
|
|
76
82
|
});
|
|
77
83
|
return instance;
|
|
78
84
|
}
|
|
@@ -114,7 +120,9 @@ function _postConstruct(constr, instance) {
|
|
|
114
120
|
return (_b = (_a = instance)[data.value]) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
115
121
|
}
|
|
116
122
|
catch (e) {
|
|
117
|
-
|
|
123
|
+
if (e instanceof Error) {
|
|
124
|
+
throw new Error((0, error_msgs_1.POST_CONSTRUCT_ERROR)(constr.name, e.message));
|
|
125
|
+
}
|
|
118
126
|
}
|
|
119
127
|
}
|
|
120
128
|
}
|
|
@@ -125,9 +133,9 @@ function _validateInstanceResolution(binding, constr) {
|
|
|
125
133
|
}
|
|
126
134
|
function _throwIfHandlingDeactivation(binding, constr) {
|
|
127
135
|
const scopeErrorMessage = `Class cannot be instantiated in ${binding.scope === literal_types_1.BindingScopeEnum.Request ?
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
if (typeof binding.onDeactivation ===
|
|
136
|
+
'request' :
|
|
137
|
+
'transient'} scope.`;
|
|
138
|
+
if (typeof binding.onDeactivation === 'function') {
|
|
131
139
|
throw new Error((0, error_msgs_1.ON_DEACTIVATION_ERROR)(constr.name, scopeErrorMessage));
|
|
132
140
|
}
|
|
133
141
|
if (Reflect.hasMetadata(METADATA_KEY.PRE_DESTROY, constr)) {
|
|
@@ -144,5 +152,3 @@ function resolveInstance(binding, constr, childRequests, resolveRequest) {
|
|
|
144
152
|
return _getInstanceAfterPostConstruct(constr, result);
|
|
145
153
|
}
|
|
146
154
|
}
|
|
147
|
-
exports.resolveInstance = resolveInstance;
|
|
148
|
-
//# sourceMappingURL=instantiation.js.map
|
|
@@ -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,7 +32,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
28
32
|
});
|
|
29
33
|
};
|
|
30
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
exports.resolve =
|
|
35
|
+
exports.resolve = resolve;
|
|
32
36
|
const ERROR_MSGS = __importStar(require("../constants/error_msgs"));
|
|
33
37
|
const literal_types_1 = require("../constants/literal_types");
|
|
34
38
|
const planner_1 = require("../planning/planner");
|
|
@@ -127,7 +131,7 @@ function _onActivation(request, binding, resolved) {
|
|
|
127
131
|
}
|
|
128
132
|
const _bindingActivation = (context, binding, previousResult) => {
|
|
129
133
|
let result;
|
|
130
|
-
if (typeof binding.onActivation ===
|
|
134
|
+
if (typeof binding.onActivation === 'function') {
|
|
131
135
|
result = binding.onActivation(context, previousResult);
|
|
132
136
|
}
|
|
133
137
|
else {
|
|
@@ -184,5 +188,3 @@ function resolve(context) {
|
|
|
184
188
|
const _f = _resolveRequest(context.plan.rootRequest.requestScope);
|
|
185
189
|
return _f(context.plan.rootRequest);
|
|
186
190
|
}
|
|
187
|
-
exports.resolve = resolve;
|
|
188
|
-
//# sourceMappingURL=resolver.js.map
|
package/es6/scope/scope.js
CHANGED
|
@@ -10,13 +10,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.saveToScope = exports.tryGetFromScope = void 0;
|
|
13
|
-
const
|
|
13
|
+
const literal_types_1 = require("../constants/literal_types");
|
|
14
14
|
const async_1 = require("../utils/async");
|
|
15
15
|
const tryGetFromScope = (requestScope, binding) => {
|
|
16
|
-
if ((binding.scope ===
|
|
16
|
+
if ((binding.scope === literal_types_1.BindingScopeEnum.Singleton) && binding.activated) {
|
|
17
17
|
return binding.cache;
|
|
18
18
|
}
|
|
19
|
-
if (binding.scope ===
|
|
19
|
+
if (binding.scope === literal_types_1.BindingScopeEnum.Request &&
|
|
20
20
|
requestScope.has(binding.id)) {
|
|
21
21
|
return requestScope.get(binding.id);
|
|
22
22
|
}
|
|
@@ -24,10 +24,10 @@ const tryGetFromScope = (requestScope, binding) => {
|
|
|
24
24
|
};
|
|
25
25
|
exports.tryGetFromScope = tryGetFromScope;
|
|
26
26
|
const saveToScope = (requestScope, binding, result) => {
|
|
27
|
-
if (binding.scope ===
|
|
27
|
+
if (binding.scope === literal_types_1.BindingScopeEnum.Singleton) {
|
|
28
28
|
_saveToSingletonScope(binding, result);
|
|
29
29
|
}
|
|
30
|
-
if (binding.scope ===
|
|
30
|
+
if (binding.scope === literal_types_1.BindingScopeEnum.Request) {
|
|
31
31
|
_saveToRequestScope(requestScope, binding, result);
|
|
32
32
|
}
|
|
33
33
|
};
|
|
@@ -55,4 +55,3 @@ const _saveAsyncResultToSingletonScope = (binding, asyncResult) => __awaiter(voi
|
|
|
55
55
|
throw ex;
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
|
-
//# sourceMappingURL=scope.js.map
|
|
@@ -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];
|
|
@@ -103,4 +107,3 @@ class BindingToSyntax {
|
|
|
103
107
|
}
|
|
104
108
|
}
|
|
105
109
|
exports.BindingToSyntax = BindingToSyntax;
|
|
106
|
-
//# sourceMappingURL=binding_to_syntax.js.map
|
|
@@ -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];
|
|
@@ -44,7 +48,7 @@ const typeConstraint = (type) => (request) => {
|
|
|
44
48
|
let binding = null;
|
|
45
49
|
if (request !== null) {
|
|
46
50
|
binding = request.bindings[0];
|
|
47
|
-
if (typeof type ===
|
|
51
|
+
if (typeof type === 'string') {
|
|
48
52
|
const serviceIdentifier = binding.serviceIdentifier;
|
|
49
53
|
return serviceIdentifier === type;
|
|
50
54
|
}
|
|
@@ -56,4 +60,3 @@ const typeConstraint = (type) => (request) => {
|
|
|
56
60
|
return false;
|
|
57
61
|
};
|
|
58
62
|
exports.typeConstraint = typeConstraint;
|
|
59
|
-
//# sourceMappingURL=constraint_helpers.js.map
|
package/es6/utils/async.js
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.isPromise = isPromise;
|
|
4
|
+
exports.isPromiseOrContainsPromise = isPromiseOrContainsPromise;
|
|
4
5
|
function isPromise(object) {
|
|
5
6
|
const isObjectOrFunction = (typeof object === 'object' && object !== null) || typeof object === 'function';
|
|
6
7
|
return isObjectOrFunction && typeof object.then === "function";
|
|
7
8
|
}
|
|
8
|
-
exports.isPromise = isPromise;
|
|
9
9
|
function isPromiseOrContainsPromise(object) {
|
|
10
10
|
if (isPromise(object)) {
|
|
11
11
|
return true;
|
|
12
12
|
}
|
|
13
13
|
return Array.isArray(object) && object.some(isPromise);
|
|
14
14
|
}
|
|
15
|
-
exports.isPromiseOrContainsPromise = isPromiseOrContainsPromise;
|
|
16
|
-
//# sourceMappingURL=async.js.map
|
|
@@ -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];
|
|
@@ -20,7 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
20
24
|
};
|
|
21
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
26
|
exports.getFactoryDetails = exports.ensureFullyBound = exports.multiBindToService = void 0;
|
|
23
|
-
const
|
|
27
|
+
const serialization_1 = require("../utils/serialization");
|
|
24
28
|
const ERROR_MSGS = __importStar(require("../constants/error_msgs"));
|
|
25
29
|
const literal_types_1 = require("../constants/literal_types");
|
|
26
30
|
const factory_type_1 = require("./factory_type");
|
|
@@ -48,7 +52,7 @@ const ensureFullyBound = (binding) => {
|
|
|
48
52
|
break;
|
|
49
53
|
}
|
|
50
54
|
if (boundValue === null) {
|
|
51
|
-
const serviceIdentifierAsString = (0,
|
|
55
|
+
const serviceIdentifierAsString = (0, serialization_1.getServiceIdentifierAsString)(binding.serviceIdentifier);
|
|
52
56
|
throw new Error(`${ERROR_MSGS.INVALID_BINDING_TYPE} ${serviceIdentifierAsString}`);
|
|
53
57
|
}
|
|
54
58
|
};
|
|
@@ -66,4 +70,3 @@ const getFactoryDetails = (binding) => {
|
|
|
66
70
|
}
|
|
67
71
|
};
|
|
68
72
|
exports.getFactoryDetails = getFactoryDetails;
|
|
69
|
-
//# sourceMappingURL=binding_utils.js.map
|
package/es6/utils/clonable.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isClonable =
|
|
3
|
+
exports.isClonable = isClonable;
|
|
4
4
|
function isClonable(obj) {
|
|
5
5
|
return (typeof obj === 'object')
|
|
6
6
|
&& (obj !== null)
|
|
7
7
|
&& ('clone' in obj)
|
|
8
8
|
&& typeof obj.clone === 'function';
|
|
9
9
|
}
|
|
10
|
-
exports.isClonable = isClonable;
|
|
11
|
-
//# sourceMappingURL=clonable.js.map
|
package/es6/utils/exceptions.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,23 +23,22 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
19
23
|
return result;
|
|
20
24
|
};
|
|
21
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.tryAndThrowErrorIfStackOverflow =
|
|
26
|
+
exports.tryAndThrowErrorIfStackOverflow = void 0;
|
|
27
|
+
exports.isStackOverflowException = isStackOverflowException;
|
|
23
28
|
const ERROR_MSGS = __importStar(require("../constants/error_msgs"));
|
|
24
|
-
function
|
|
29
|
+
function isStackOverflowException(error) {
|
|
25
30
|
return (error instanceof RangeError ||
|
|
26
31
|
error.message === ERROR_MSGS.STACK_OVERFLOW);
|
|
27
32
|
}
|
|
28
|
-
exports.isStackOverflowExeption = isStackOverflowExeption;
|
|
29
33
|
const tryAndThrowErrorIfStackOverflow = (fn, errorCallback) => {
|
|
30
34
|
try {
|
|
31
35
|
return fn();
|
|
32
36
|
}
|
|
33
37
|
catch (error) {
|
|
34
|
-
if (
|
|
38
|
+
if (isStackOverflowException(error)) {
|
|
35
39
|
error = errorCallback();
|
|
36
40
|
}
|
|
37
41
|
throw error;
|
|
38
42
|
}
|
|
39
43
|
};
|
|
40
44
|
exports.tryAndThrowErrorIfStackOverflow = tryAndThrowErrorIfStackOverflow;
|
|
41
|
-
//# sourceMappingURL=exceptions.js.map
|
|
@@ -6,5 +6,4 @@ var FactoryType;
|
|
|
6
6
|
FactoryType["DynamicValue"] = "toDynamicValue";
|
|
7
7
|
FactoryType["Factory"] = "toFactory";
|
|
8
8
|
FactoryType["Provider"] = "toProvider";
|
|
9
|
-
})(FactoryType
|
|
10
|
-
//# sourceMappingURL=factory_type.js.map
|
|
9
|
+
})(FactoryType || (exports.FactoryType = FactoryType = {}));
|
package/es6/utils/id.js
CHANGED
package/es6/utils/js.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getFirstArrayDuplicate =
|
|
3
|
+
exports.getFirstArrayDuplicate = getFirstArrayDuplicate;
|
|
4
4
|
function getFirstArrayDuplicate(array) {
|
|
5
5
|
const seenValues = new Set();
|
|
6
6
|
for (const entry of array) {
|
|
@@ -13,5 +13,3 @@ function getFirstArrayDuplicate(array) {
|
|
|
13
13
|
}
|
|
14
14
|
return undefined;
|
|
15
15
|
}
|
|
16
|
-
exports.getFirstArrayDuplicate = getFirstArrayDuplicate;
|
|
17
|
-
//# sourceMappingURL=js.js.map
|
|
@@ -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,14 +23,19 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
19
23
|
return result;
|
|
20
24
|
};
|
|
21
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.
|
|
26
|
+
exports.getFunctionName = getFunctionName;
|
|
27
|
+
exports.getServiceIdentifierAsString = getServiceIdentifierAsString;
|
|
28
|
+
exports.listRegisteredBindingsForServiceIdentifier = listRegisteredBindingsForServiceIdentifier;
|
|
29
|
+
exports.listMetadataForTarget = listMetadataForTarget;
|
|
30
|
+
exports.circularDependencyToException = circularDependencyToException;
|
|
31
|
+
exports.getSymbolDescription = getSymbolDescription;
|
|
23
32
|
const ERROR_MSGS = __importStar(require("../constants/error_msgs"));
|
|
24
33
|
function getServiceIdentifierAsString(serviceIdentifier) {
|
|
25
|
-
if (typeof serviceIdentifier ===
|
|
34
|
+
if (typeof serviceIdentifier === 'function') {
|
|
26
35
|
const _serviceIdentifier = serviceIdentifier;
|
|
27
36
|
return _serviceIdentifier.name;
|
|
28
37
|
}
|
|
29
|
-
else if (typeof serviceIdentifier ===
|
|
38
|
+
else if (typeof serviceIdentifier === 'symbol') {
|
|
30
39
|
return serviceIdentifier.toString();
|
|
31
40
|
}
|
|
32
41
|
else {
|
|
@@ -34,14 +43,13 @@ function getServiceIdentifierAsString(serviceIdentifier) {
|
|
|
34
43
|
return _serviceIdentifier;
|
|
35
44
|
}
|
|
36
45
|
}
|
|
37
|
-
exports.getServiceIdentifierAsString = getServiceIdentifierAsString;
|
|
38
46
|
function listRegisteredBindingsForServiceIdentifier(container, serviceIdentifier, getBindings) {
|
|
39
|
-
let registeredBindingsList =
|
|
47
|
+
let registeredBindingsList = '';
|
|
40
48
|
const registeredBindings = getBindings(container, serviceIdentifier);
|
|
41
49
|
if (registeredBindings.length !== 0) {
|
|
42
|
-
registeredBindingsList =
|
|
50
|
+
registeredBindingsList = '\nRegistered bindings:';
|
|
43
51
|
registeredBindings.forEach((binding) => {
|
|
44
|
-
let name =
|
|
52
|
+
let name = 'Object';
|
|
45
53
|
if (binding.implementationType !== null) {
|
|
46
54
|
name = getFunctionName(binding.implementationType);
|
|
47
55
|
}
|
|
@@ -53,7 +61,6 @@ function listRegisteredBindingsForServiceIdentifier(container, serviceIdentifier
|
|
|
53
61
|
}
|
|
54
62
|
return registeredBindingsList;
|
|
55
63
|
}
|
|
56
|
-
exports.listRegisteredBindingsForServiceIdentifier = listRegisteredBindingsForServiceIdentifier;
|
|
57
64
|
function alreadyDependencyChain(request, serviceIdentifier) {
|
|
58
65
|
if (request.parentRequest === null) {
|
|
59
66
|
return false;
|
|
@@ -75,7 +82,7 @@ function dependencyChainToString(request) {
|
|
|
75
82
|
return result;
|
|
76
83
|
}
|
|
77
84
|
const stringArr = _createStringArr(request);
|
|
78
|
-
return stringArr.reverse().join(
|
|
85
|
+
return stringArr.reverse().join(' --> ');
|
|
79
86
|
}
|
|
80
87
|
function circularDependencyToException(request) {
|
|
81
88
|
request.childRequests.forEach((childRequest) => {
|
|
@@ -88,18 +95,17 @@ function circularDependencyToException(request) {
|
|
|
88
95
|
}
|
|
89
96
|
});
|
|
90
97
|
}
|
|
91
|
-
exports.circularDependencyToException = circularDependencyToException;
|
|
92
98
|
function listMetadataForTarget(serviceIdentifierString, target) {
|
|
93
99
|
if (target.isTagged() || target.isNamed()) {
|
|
94
|
-
let m =
|
|
100
|
+
let m = '';
|
|
95
101
|
const namedTag = target.getNamedTag();
|
|
96
102
|
const otherTags = target.getCustomTags();
|
|
97
103
|
if (namedTag !== null) {
|
|
98
|
-
m += namedTag.toString() +
|
|
104
|
+
m += namedTag.toString() + '\n';
|
|
99
105
|
}
|
|
100
106
|
if (otherTags !== null) {
|
|
101
107
|
otherTags.forEach((tag) => {
|
|
102
|
-
m += tag.toString() +
|
|
108
|
+
m += tag.toString() + '\n';
|
|
103
109
|
});
|
|
104
110
|
}
|
|
105
111
|
return ` ${serviceIdentifierString}\n ${serviceIdentifierString} - ${m}`;
|
|
@@ -108,7 +114,6 @@ function listMetadataForTarget(serviceIdentifierString, target) {
|
|
|
108
114
|
return ` ${serviceIdentifierString}`;
|
|
109
115
|
}
|
|
110
116
|
}
|
|
111
|
-
exports.listMetadataForTarget = listMetadataForTarget;
|
|
112
117
|
function getFunctionName(func) {
|
|
113
118
|
if (func.name) {
|
|
114
119
|
return func.name;
|
|
@@ -119,9 +124,6 @@ function getFunctionName(func) {
|
|
|
119
124
|
return match ? match[1] : `Anonymous function: ${name}`;
|
|
120
125
|
}
|
|
121
126
|
}
|
|
122
|
-
exports.getFunctionName = getFunctionName;
|
|
123
127
|
function getSymbolDescription(symbol) {
|
|
124
128
|
return symbol.toString().slice(7, -1);
|
|
125
129
|
}
|
|
126
|
-
exports.getSymbolDescription = getSymbolDescription;
|
|
127
|
-
//# sourceMappingURL=serialization.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { interfaces } from
|
|
2
|
-
|
|
1
|
+
import { interfaces } from '../interfaces/interfaces';
|
|
2
|
+
type Prototype<T> = {
|
|
3
3
|
[Property in keyof T]: T[Property] extends NewableFunction ? T[Property] : T[Property] | undefined;
|
|
4
4
|
} & {
|
|
5
5
|
constructor: NewableFunction;
|
|
@@ -8,9 +8,9 @@ interface ConstructorFunction<T = Record<string, unknown>> {
|
|
|
8
8
|
new (...args: unknown[]): T;
|
|
9
9
|
prototype: Prototype<T>;
|
|
10
10
|
}
|
|
11
|
-
export
|
|
11
|
+
export type DecoratorTarget<T = unknown> = ConstructorFunction<T> | Prototype<T>;
|
|
12
12
|
declare function tagParameter(annotationTarget: DecoratorTarget, parameterName: string | symbol | undefined, parameterIndex: number, metadata: interfaces.MetadataOrMetadataArray): void;
|
|
13
13
|
declare function tagProperty(annotationTarget: DecoratorTarget, propertyName: string | symbol, metadata: interfaces.MetadataOrMetadataArray): void;
|
|
14
|
-
declare function createTaggedDecorator(metadata: interfaces.MetadataOrMetadataArray): <T>(target: DecoratorTarget, targetKey?: string | symbol
|
|
15
|
-
declare function decorate(decorator: (DecoratorTarget | ParameterDecorator | MethodDecorator), target:
|
|
14
|
+
declare function createTaggedDecorator(metadata: interfaces.MetadataOrMetadataArray): <T>(target: DecoratorTarget, targetKey?: string | symbol, indexOrPropertyDescriptor?: number | TypedPropertyDescriptor<T>) => void;
|
|
15
|
+
declare function decorate(decorator: (DecoratorTarget | ParameterDecorator | MethodDecorator), target: object, parameterIndexOrProperty?: number | string): void;
|
|
16
16
|
export { decorate, tagParameter, tagProperty, createTaggedDecorator };
|