inversify 6.1.4 → 6.1.5-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -1
- package/README.md +6 -15
- package/{amd → lib/cjs}/annotation/decorator_utils.d.ts +1 -0
- package/lib/cjs/annotation/decorator_utils.d.ts.map +1 -0
- package/{es6 → lib/cjs}/annotation/decorator_utils.js +25 -7
- package/lib/cjs/annotation/decorator_utils.js.map +1 -0
- package/{es6 → lib/cjs}/annotation/inject.d.ts +1 -0
- package/lib/cjs/annotation/inject.d.ts.map +1 -0
- package/{es6 → lib/cjs}/annotation/inject.js +18 -7
- package/lib/cjs/annotation/inject.js.map +1 -0
- package/{amd → lib/cjs}/annotation/inject_base.d.ts +1 -0
- package/lib/cjs/annotation/inject_base.d.ts.map +1 -0
- package/{es6 → lib/cjs}/annotation/inject_base.js +2 -0
- package/lib/cjs/annotation/inject_base.js.map +1 -0
- package/{amd → lib/cjs}/annotation/injectable.d.ts +1 -0
- package/lib/cjs/annotation/injectable.d.ts.map +1 -0
- package/{es6 → lib/cjs}/annotation/injectable.js +19 -7
- package/lib/cjs/annotation/injectable.js.map +1 -0
- package/{es → lib/cjs}/annotation/multi_inject.d.ts +1 -0
- package/lib/cjs/annotation/multi_inject.d.ts.map +1 -0
- package/{es6 → lib/cjs}/annotation/multi_inject.js +18 -7
- package/lib/cjs/annotation/multi_inject.js.map +1 -0
- package/{amd → lib/cjs}/annotation/named.d.ts +1 -0
- package/lib/cjs/annotation/named.d.ts.map +1 -0
- package/{es6 → lib/cjs}/annotation/named.js +19 -7
- package/lib/cjs/annotation/named.js.map +1 -0
- package/{amd → lib/cjs}/annotation/optional.d.ts +1 -0
- package/lib/cjs/annotation/optional.d.ts.map +1 -0
- package/{es6 → lib/cjs}/annotation/optional.js +18 -7
- package/lib/cjs/annotation/optional.js.map +1 -0
- package/{amd → lib/cjs}/annotation/post_construct.d.ts +1 -0
- package/lib/cjs/annotation/post_construct.d.ts.map +1 -0
- package/{es6 → lib/cjs}/annotation/post_construct.js +18 -7
- package/lib/cjs/annotation/post_construct.js.map +1 -0
- package/{es6 → lib/cjs}/annotation/pre_destroy.d.ts +1 -0
- package/lib/cjs/annotation/pre_destroy.d.ts.map +1 -0
- package/{es6 → lib/cjs}/annotation/pre_destroy.js +18 -7
- package/lib/cjs/annotation/pre_destroy.js.map +1 -0
- package/{es → lib/cjs}/annotation/property_event_decorator.d.ts +1 -0
- package/lib/cjs/annotation/property_event_decorator.d.ts.map +1 -0
- package/{es6 → lib/cjs}/annotation/property_event_decorator.js +1 -0
- package/lib/cjs/annotation/property_event_decorator.js.map +1 -0
- package/{amd → lib/cjs}/annotation/tagged.d.ts +1 -0
- package/lib/cjs/annotation/tagged.d.ts.map +1 -0
- package/{es6 → lib/cjs}/annotation/tagged.js +2 -0
- package/lib/cjs/annotation/tagged.js.map +1 -0
- package/{es6 → lib/cjs}/annotation/target_name.d.ts +1 -0
- package/lib/cjs/annotation/target_name.d.ts.map +1 -0
- package/{es6 → lib/cjs}/annotation/target_name.js +18 -7
- package/lib/cjs/annotation/target_name.js.map +1 -0
- package/{es6 → lib/cjs}/annotation/unmanaged.d.ts +1 -0
- package/lib/cjs/annotation/unmanaged.d.ts.map +1 -0
- package/{es6 → lib/cjs}/annotation/unmanaged.js +18 -7
- package/lib/cjs/annotation/unmanaged.js.map +1 -0
- package/{es6 → lib/cjs}/bindings/binding.d.ts +1 -0
- package/lib/cjs/bindings/binding.d.ts.map +1 -0
- package/{es6 → lib/cjs}/bindings/binding.js +29 -0
- package/lib/cjs/bindings/binding.js.map +1 -0
- package/{amd → lib/cjs}/bindings/binding_count.d.ts +1 -0
- package/lib/cjs/bindings/binding_count.d.ts.map +1 -0
- package/lib/{bindings → cjs/bindings}/binding_count.js +1 -0
- package/lib/cjs/bindings/binding_count.js.map +1 -0
- package/{amd → lib/cjs}/constants/error_msgs.d.ts +1 -0
- package/lib/cjs/constants/error_msgs.d.ts.map +1 -0
- package/{es6 → lib/cjs}/constants/error_msgs.js +2 -0
- package/lib/cjs/constants/error_msgs.js.map +1 -0
- package/{es → lib/cjs}/constants/literal_types.d.ts +1 -0
- package/lib/cjs/constants/literal_types.d.ts.map +1 -0
- package/{es6 → lib/cjs}/constants/literal_types.js +4 -0
- package/lib/cjs/constants/literal_types.js.map +1 -0
- package/{amd → lib/cjs}/constants/metadata_keys.d.ts +1 -0
- package/lib/cjs/constants/metadata_keys.d.ts.map +1 -0
- package/{es6 → lib/cjs}/constants/metadata_keys.js +13 -0
- package/lib/cjs/constants/metadata_keys.js.map +1 -0
- package/{es6 → lib/cjs}/container/container.d.ts +3 -0
- package/lib/cjs/container/container.d.ts.map +1 -0
- package/{es6 → lib/cjs}/container/container.js +157 -147
- package/lib/cjs/container/container.js.map +1 -0
- package/{amd → lib/cjs}/container/container_module.d.ts +1 -0
- package/lib/cjs/container/container_module.d.ts.map +1 -0
- package/{es6 → lib/cjs}/container/container_module.js +5 -0
- package/lib/cjs/container/container_module.js.map +1 -0
- package/{es → lib/cjs}/container/container_snapshot.d.ts +1 -0
- package/lib/cjs/container/container_snapshot.d.ts.map +1 -0
- package/{es6 → lib/cjs}/container/container_snapshot.js +6 -0
- package/lib/cjs/container/container_snapshot.js.map +1 -0
- package/{es → lib/cjs}/container/lookup.d.ts +1 -0
- package/lib/cjs/container/lookup.d.ts.map +1 -0
- package/{es6 → lib/cjs}/container/lookup.js +26 -7
- package/lib/cjs/container/lookup.js.map +1 -0
- package/{es6 → lib/cjs}/container/module_activation_store.d.ts +3 -2
- package/lib/cjs/container/module_activation_store.d.ts.map +1 -0
- package/{es6 → lib/cjs}/container/module_activation_store.js +2 -3
- package/lib/cjs/container/module_activation_store.js.map +1 -0
- package/{amd/inversify.d.ts → lib/cjs/index.d.ts} +2 -0
- package/lib/cjs/index.d.ts.map +1 -0
- package/{es6/inversify.js → lib/cjs/index.js} +20 -7
- package/lib/cjs/index.js.map +1 -0
- package/{amd → lib/cjs}/interfaces/interfaces.d.ts +3 -2
- package/lib/cjs/interfaces/interfaces.d.ts.map +1 -0
- package/lib/{interfaces → cjs/interfaces}/interfaces.js +1 -0
- package/lib/cjs/interfaces/interfaces.js.map +1 -0
- package/lib/cjs/package.json +3 -0
- package/{es6 → lib/cjs}/planning/context.d.ts +1 -0
- package/lib/cjs/planning/context.d.ts.map +1 -0
- package/{es6 → lib/cjs}/planning/context.js +5 -0
- package/lib/cjs/planning/context.js.map +1 -0
- package/{es6 → lib/cjs}/planning/metadata.d.ts +1 -0
- package/lib/cjs/planning/metadata.d.ts.map +1 -0
- package/{es6 → lib/cjs}/planning/metadata.js +20 -7
- package/lib/cjs/planning/metadata.js.map +1 -0
- package/{es → lib/cjs}/planning/metadata_reader.d.ts +1 -0
- package/lib/cjs/planning/metadata_reader.d.ts.map +1 -0
- package/{es6 → lib/cjs}/planning/metadata_reader.js +24 -12
- package/lib/cjs/planning/metadata_reader.js.map +1 -0
- package/{amd → lib/cjs}/planning/plan.d.ts +1 -0
- package/lib/cjs/planning/plan.d.ts.map +1 -0
- package/{es6 → lib/cjs}/planning/plan.js +3 -0
- package/lib/cjs/planning/plan.js.map +1 -0
- package/{amd → lib/cjs}/planning/planner.d.ts +1 -0
- package/lib/cjs/planning/planner.d.ts.map +1 -0
- package/{es6 → lib/cjs}/planning/planner.js +27 -7
- package/lib/cjs/planning/planner.js.map +1 -0
- package/{amd → lib/cjs}/planning/queryable_string.d.ts +1 -0
- package/lib/cjs/planning/queryable_string.d.ts.map +1 -0
- package/{es6 → lib/cjs}/planning/queryable_string.js +3 -0
- package/lib/cjs/planning/queryable_string.js.map +1 -0
- package/{amd → lib/cjs}/planning/reflection_utils.d.ts +1 -0
- package/lib/cjs/planning/reflection_utils.d.ts.map +1 -0
- package/{es6 → lib/cjs}/planning/reflection_utils.js +25 -8
- package/lib/cjs/planning/reflection_utils.js.map +1 -0
- package/{amd → lib/cjs}/planning/request.d.ts +1 -0
- package/lib/cjs/planning/request.d.ts.map +1 -0
- package/{es6 → lib/cjs}/planning/request.js +13 -1
- package/lib/cjs/planning/request.js.map +1 -0
- package/{es → lib/cjs}/resolution/instantiation.d.ts +1 -0
- package/lib/cjs/resolution/instantiation.d.ts.map +1 -0
- package/{es6 → lib/cjs}/resolution/instantiation.js +40 -37
- package/lib/cjs/resolution/instantiation.js.map +1 -0
- package/{amd → lib/cjs}/resolution/resolver.d.ts +1 -0
- package/lib/cjs/resolution/resolver.d.ts.map +1 -0
- package/{es6 → lib/cjs}/resolution/resolver.js +39 -20
- package/lib/cjs/resolution/resolver.js.map +1 -0
- package/{amd → lib/cjs}/scope/scope.d.ts +1 -0
- package/lib/cjs/scope/scope.d.ts.map +1 -0
- package/{es6 → lib/cjs}/scope/scope.js +10 -12
- package/lib/cjs/scope/scope.js.map +1 -0
- package/{amd → lib/cjs}/syntax/binding_in_syntax.d.ts +1 -0
- package/lib/cjs/syntax/binding_in_syntax.d.ts.map +1 -0
- package/{es6 → lib/cjs}/syntax/binding_in_syntax.js +2 -0
- package/lib/cjs/syntax/binding_in_syntax.js.map +1 -0
- package/{es6 → lib/cjs}/syntax/binding_in_when_on_syntax.d.ts +1 -0
- package/lib/cjs/syntax/binding_in_when_on_syntax.d.ts.map +1 -0
- package/{es6 → lib/cjs}/syntax/binding_in_when_on_syntax.js +5 -0
- package/lib/cjs/syntax/binding_in_when_on_syntax.js.map +1 -0
- package/{es6 → lib/cjs}/syntax/binding_on_syntax.d.ts +1 -0
- package/lib/cjs/syntax/binding_on_syntax.d.ts.map +1 -0
- package/{es6 → lib/cjs}/syntax/binding_on_syntax.js +2 -0
- package/lib/cjs/syntax/binding_on_syntax.js.map +1 -0
- package/{es → lib/cjs}/syntax/binding_to_syntax.d.ts +1 -0
- package/lib/cjs/syntax/binding_to_syntax.d.ts.map +1 -0
- package/{es6 → lib/cjs}/syntax/binding_to_syntax.js +43 -8
- package/lib/cjs/syntax/binding_to_syntax.js.map +1 -0
- package/{amd → lib/cjs}/syntax/binding_when_on_syntax.d.ts +1 -0
- package/lib/cjs/syntax/binding_when_on_syntax.d.ts.map +1 -0
- package/{es6 → lib/cjs}/syntax/binding_when_on_syntax.js +4 -0
- package/lib/cjs/syntax/binding_when_on_syntax.js.map +1 -0
- package/{es6 → lib/cjs}/syntax/binding_when_syntax.d.ts +1 -0
- package/lib/cjs/syntax/binding_when_syntax.d.ts.map +1 -0
- package/{es6 → lib/cjs}/syntax/binding_when_syntax.js +5 -1
- package/lib/cjs/syntax/binding_when_syntax.js.map +1 -0
- package/{amd → lib/cjs}/syntax/constraint_helpers.d.ts +1 -0
- package/lib/cjs/syntax/constraint_helpers.d.ts.map +1 -0
- package/{es6 → lib/cjs}/syntax/constraint_helpers.js +22 -7
- package/lib/cjs/syntax/constraint_helpers.js.map +1 -0
- package/{amd → lib/cjs}/utils/async.d.ts +1 -0
- package/lib/cjs/utils/async.d.ts.map +1 -0
- package/{es6 → lib/cjs}/utils/async.js +1 -0
- package/lib/cjs/utils/async.js.map +1 -0
- package/{es6 → lib/cjs}/utils/binding_utils.d.ts +1 -0
- package/lib/cjs/utils/binding_utils.d.ts.map +1 -0
- package/{es6 → lib/cjs}/utils/binding_utils.js +21 -7
- package/lib/cjs/utils/binding_utils.js.map +1 -0
- package/{es6 → lib/cjs}/utils/clonable.d.ts +1 -0
- package/lib/cjs/utils/clonable.d.ts.map +1 -0
- package/{es6 → lib/cjs}/utils/clonable.js +1 -0
- package/lib/cjs/utils/clonable.js.map +1 -0
- package/{amd → lib/cjs}/utils/exceptions.d.ts +1 -0
- package/lib/cjs/utils/exceptions.d.ts.map +1 -0
- package/{es6 → lib/cjs}/utils/exceptions.js +18 -7
- package/lib/cjs/utils/exceptions.js.map +1 -0
- package/{es6 → lib/cjs}/utils/factory_type.d.ts +1 -0
- package/lib/cjs/utils/factory_type.d.ts.map +1 -0
- package/{es6 → lib/cjs}/utils/factory_type.js +1 -0
- package/lib/cjs/utils/factory_type.js.map +1 -0
- package/{amd → lib/cjs}/utils/id.d.ts +1 -0
- package/lib/cjs/utils/id.d.ts.map +1 -0
- package/{es6 → lib/cjs}/utils/id.js +1 -0
- package/lib/cjs/utils/id.js.map +1 -0
- package/{amd → lib/cjs}/utils/js.d.ts +1 -0
- package/lib/cjs/utils/js.d.ts.map +1 -0
- package/{es6 → lib/cjs}/utils/js.js +1 -0
- package/lib/cjs/utils/js.js.map +1 -0
- package/{amd → lib/cjs}/utils/serialization.d.ts +1 -0
- package/lib/cjs/utils/serialization.d.ts.map +1 -0
- package/{es6 → lib/cjs}/utils/serialization.js +23 -7
- package/lib/cjs/utils/serialization.js.map +1 -0
- package/{es6/interfaces/interfaces.d.ts → lib/esm/index.d.ts} +207 -8
- package/lib/esm/index.d.ts.map +1 -0
- package/lib/esm/index.js +2 -0
- package/lib/esm/index.js.map +1 -0
- package/package.json +30 -34
- package/amd/annotation/decorator_utils.js +0 -119
- package/amd/annotation/inject.d.ts +0 -5
- package/amd/annotation/inject.js +0 -31
- package/amd/annotation/inject_base.js +0 -16
- package/amd/annotation/injectable.js +0 -40
- package/amd/annotation/lazy_service_identifier.js +0 -4
- package/amd/annotation/multi_inject.d.ts +0 -5
- package/amd/annotation/multi_inject.js +0 -31
- package/amd/annotation/named.js +0 -32
- package/amd/annotation/optional.js +0 -32
- package/amd/annotation/post_construct.js +0 -32
- package/amd/annotation/pre_destroy.d.ts +0 -4
- package/amd/annotation/pre_destroy.js +0 -32
- package/amd/annotation/property_event_decorator.d.ts +0 -4
- package/amd/annotation/property_event_decorator.js +0 -16
- package/amd/annotation/tagged.js +0 -8
- package/amd/annotation/target_name.d.ts +0 -3
- package/amd/annotation/target_name.js +0 -35
- package/amd/annotation/unmanaged.d.ts +0 -3
- package/amd/annotation/unmanaged.js +0 -35
- package/amd/bindings/binding.d.ts +0 -20
- package/amd/bindings/binding.js +0 -40
- package/amd/bindings/binding_count.js +0 -11
- package/amd/constants/error_msgs.js +0 -75
- package/amd/constants/literal_types.d.ts +0 -5
- package/amd/constants/literal_types.js +0 -28
- package/amd/constants/metadata_keys.js +0 -28
- package/amd/container/container.d.ts +0 -73
- package/amd/container/container.js +0 -766
- package/amd/container/container_module.js +0 -21
- package/amd/container/container_snapshot.d.ts +0 -10
- package/amd/container/container_snapshot.js +0 -20
- package/amd/container/lookup.d.ts +0 -17
- package/amd/container/lookup.js +0 -132
- package/amd/container/module_activation_store.d.ts +0 -10
- package/amd/container/module_activation_store.js +0 -51
- package/amd/interfaces/interfaces.js +0 -4
- package/amd/inversify.js +0 -57
- package/amd/planning/context.d.ts +0 -11
- package/amd/planning/context.js +0 -19
- package/amd/planning/metadata.d.ts +0 -8
- package/amd/planning/metadata.js +0 -45
- package/amd/planning/metadata_reader.d.ts +0 -6
- package/amd/planning/metadata_reader.js +0 -49
- package/amd/planning/plan.js +0 -13
- package/amd/planning/planner.js +0 -187
- package/amd/planning/queryable_string.js +0 -33
- package/amd/planning/reflection_utils.js +0 -55
- package/amd/planning/request.js +0 -24
- package/amd/planning/target.js +0 -111
- package/amd/resolution/instantiation.d.ts +0 -3
- package/amd/resolution/instantiation.js +0 -219
- package/amd/resolution/resolver.js +0 -234
- package/amd/scope/scope.js +0 -93
- package/amd/syntax/binding_in_syntax.js +0 -24
- package/amd/syntax/binding_in_when_on_syntax.d.ts +0 -29
- package/amd/syntax/binding_in_when_on_syntax.js +0 -75
- package/amd/syntax/binding_on_syntax.d.ts +0 -8
- package/amd/syntax/binding_on_syntax.js +0 -20
- package/amd/syntax/binding_to_syntax.d.ts +0 -18
- package/amd/syntax/binding_to_syntax.js +0 -116
- package/amd/syntax/binding_when_on_syntax.js +0 -65
- package/amd/syntax/binding_when_syntax.d.ts +0 -21
- package/amd/syntax/binding_when_syntax.js +0 -107
- package/amd/syntax/constraint_helpers.js +0 -66
- package/amd/utils/async.js +0 -17
- package/amd/utils/binding_utils.d.ts +0 -4
- package/amd/utils/binding_utils.js +0 -86
- package/amd/utils/clonable.d.ts +0 -3
- package/amd/utils/clonable.js +0 -11
- package/amd/utils/exceptions.js +0 -46
- package/amd/utils/factory_type.d.ts +0 -5
- package/amd/utils/factory_type.js +0 -11
- package/amd/utils/id.js +0 -9
- package/amd/utils/js.js +0 -18
- package/amd/utils/serialization.js +0 -135
- package/es/annotation/decorator_utils.d.ts +0 -16
- package/es/annotation/decorator_utils.js +0 -90
- package/es/annotation/inject.d.ts +0 -5
- package/es/annotation/inject.js +0 -4
- package/es/annotation/inject_base.d.ts +0 -4
- package/es/annotation/inject_base.js +0 -14
- package/es/annotation/injectable.d.ts +0 -2
- package/es/annotation/injectable.js +0 -13
- package/es/annotation/lazy_service_identifier.js +0 -1
- package/es/annotation/multi_inject.js +0 -4
- package/es/annotation/named.d.ts +0 -2
- package/es/annotation/named.js +0 -7
- package/es/annotation/optional.d.ts +0 -2
- package/es/annotation/optional.js +0 -7
- package/es/annotation/post_construct.d.ts +0 -4
- package/es/annotation/post_construct.js +0 -5
- package/es/annotation/pre_destroy.d.ts +0 -4
- package/es/annotation/pre_destroy.js +0 -5
- package/es/annotation/property_event_decorator.js +0 -13
- package/es/annotation/tagged.d.ts +0 -2
- package/es/annotation/tagged.js +0 -6
- package/es/annotation/target_name.d.ts +0 -3
- package/es/annotation/target_name.js +0 -10
- package/es/annotation/unmanaged.d.ts +0 -3
- package/es/annotation/unmanaged.js +0 -10
- package/es/bindings/binding.d.ts +0 -20
- package/es/bindings/binding.js +0 -37
- package/es/bindings/binding_count.d.ts +0 -5
- package/es/bindings/binding_count.js +0 -6
- package/es/constants/error_msgs.d.ts +0 -30
- package/es/constants/error_msgs.js +0 -62
- package/es/constants/literal_types.js +0 -21
- package/es/constants/metadata_keys.d.ts +0 -13
- package/es/constants/metadata_keys.js +0 -23
- package/es/container/container.d.ts +0 -73
- package/es/container/container.js +0 -750
- package/es/container/container_module.d.ts +0 -11
- package/es/container/container_module.js +0 -17
- package/es/container/container_snapshot.js +0 -15
- package/es/container/lookup.js +0 -105
- package/es/container/module_activation_store.d.ts +0 -10
- package/es/container/module_activation_store.js +0 -47
- package/es/interfaces/interfaces.d.ts +0 -269
- package/es/interfaces/interfaces.js +0 -1
- package/es/inversify.d.ts +0 -24
- package/es/inversify.js +0 -2
- package/es/planning/context.d.ts +0 -11
- package/es/planning/context.js +0 -15
- package/es/planning/metadata.d.ts +0 -8
- package/es/planning/metadata.js +0 -17
- package/es/planning/metadata_reader.js +0 -21
- package/es/planning/plan.d.ts +0 -7
- package/es/planning/plan.js +0 -8
- package/es/planning/planner.d.ts +0 -5
- package/es/planning/planner.js +0 -168
- package/es/planning/queryable_string.d.ts +0 -10
- package/es/planning/queryable_string.js +0 -28
- package/es/planning/reflection_utils.d.ts +0 -5
- package/es/planning/reflection_utils.js +0 -27
- package/es/planning/request.d.ts +0 -14
- package/es/planning/request.js +0 -20
- package/es/planning/target.js +0 -87
- package/es/resolution/instantiation.js +0 -195
- package/es/resolution/resolver.d.ts +0 -3
- package/es/resolution/resolver.js +0 -214
- package/es/scope/scope.d.ts +0 -3
- package/es/scope/scope.js +0 -88
- package/es/syntax/binding_in_syntax.d.ts +0 -9
- package/es/syntax/binding_in_syntax.js +0 -21
- package/es/syntax/binding_in_when_on_syntax.d.ts +0 -29
- package/es/syntax/binding_in_when_on_syntax.js +0 -73
- package/es/syntax/binding_on_syntax.d.ts +0 -8
- package/es/syntax/binding_on_syntax.js +0 -16
- package/es/syntax/binding_to_syntax.js +0 -91
- package/es/syntax/binding_when_on_syntax.d.ts +0 -25
- package/es/syntax/binding_when_on_syntax.js +0 -62
- package/es/syntax/binding_when_syntax.d.ts +0 -21
- package/es/syntax/binding_when_syntax.js +0 -104
- package/es/syntax/constraint_helpers.d.ts +0 -6
- package/es/syntax/constraint_helpers.js +0 -36
- package/es/utils/async.d.ts +0 -3
- package/es/utils/async.js +0 -12
- package/es/utils/binding_utils.d.ts +0 -4
- package/es/utils/binding_utils.js +0 -58
- package/es/utils/clonable.d.ts +0 -3
- package/es/utils/clonable.js +0 -7
- package/es/utils/exceptions.d.ts +0 -2
- package/es/utils/exceptions.js +0 -16
- package/es/utils/factory_type.d.ts +0 -5
- package/es/utils/factory_type.js +0 -6
- package/es/utils/id.d.ts +0 -2
- package/es/utils/id.js +0 -5
- package/es/utils/js.d.ts +0 -1
- package/es/utils/js.js +0 -13
- package/es/utils/serialization.d.ts +0 -10
- package/es/utils/serialization.js +0 -103
- package/es6/annotation/decorator_utils.d.ts +0 -16
- package/es6/annotation/inject_base.d.ts +0 -4
- package/es6/annotation/injectable.d.ts +0 -2
- package/es6/annotation/lazy_service_identifier.js +0 -2
- package/es6/annotation/multi_inject.d.ts +0 -5
- package/es6/annotation/named.d.ts +0 -2
- package/es6/annotation/optional.d.ts +0 -2
- package/es6/annotation/post_construct.d.ts +0 -4
- package/es6/annotation/property_event_decorator.d.ts +0 -4
- package/es6/annotation/tagged.d.ts +0 -2
- package/es6/bindings/binding_count.d.ts +0 -5
- package/es6/bindings/binding_count.js +0 -9
- package/es6/constants/error_msgs.d.ts +0 -30
- package/es6/constants/literal_types.d.ts +0 -5
- package/es6/constants/metadata_keys.d.ts +0 -13
- package/es6/container/container_module.d.ts +0 -11
- package/es6/container/container_snapshot.d.ts +0 -10
- package/es6/container/lookup.d.ts +0 -17
- package/es6/interfaces/interfaces.js +0 -2
- package/es6/inversify.d.ts +0 -24
- package/es6/planning/metadata_reader.d.ts +0 -6
- package/es6/planning/plan.d.ts +0 -7
- package/es6/planning/planner.d.ts +0 -5
- package/es6/planning/queryable_string.d.ts +0 -10
- package/es6/planning/reflection_utils.d.ts +0 -5
- package/es6/planning/request.d.ts +0 -14
- package/es6/planning/target.js +0 -105
- package/es6/resolution/instantiation.d.ts +0 -3
- package/es6/resolution/resolver.d.ts +0 -3
- package/es6/scope/scope.d.ts +0 -3
- package/es6/syntax/binding_in_syntax.d.ts +0 -9
- package/es6/syntax/binding_to_syntax.d.ts +0 -18
- package/es6/syntax/binding_when_on_syntax.d.ts +0 -25
- package/es6/syntax/constraint_helpers.d.ts +0 -6
- package/es6/utils/async.d.ts +0 -3
- package/es6/utils/exceptions.d.ts +0 -2
- package/es6/utils/id.d.ts +0 -2
- package/es6/utils/js.d.ts +0 -1
- package/es6/utils/serialization.d.ts +0 -10
- package/lib/annotation/decorator_utils.d.ts +0 -16
- package/lib/annotation/decorator_utils.js +0 -118
- package/lib/annotation/inject.d.ts +0 -5
- package/lib/annotation/inject.js +0 -30
- package/lib/annotation/inject_base.d.ts +0 -4
- package/lib/annotation/inject_base.js +0 -17
- package/lib/annotation/injectable.d.ts +0 -2
- package/lib/annotation/injectable.js +0 -38
- package/lib/annotation/lazy_service_identifier.d.ts +0 -3
- package/lib/annotation/lazy_service_identifier.js +0 -2
- package/lib/annotation/multi_inject.d.ts +0 -5
- package/lib/annotation/multi_inject.js +0 -30
- package/lib/annotation/named.d.ts +0 -2
- package/lib/annotation/named.js +0 -32
- package/lib/annotation/optional.d.ts +0 -2
- package/lib/annotation/optional.js +0 -32
- package/lib/annotation/post_construct.d.ts +0 -4
- package/lib/annotation/post_construct.js +0 -31
- package/lib/annotation/pre_destroy.d.ts +0 -4
- package/lib/annotation/pre_destroy.js +0 -31
- package/lib/annotation/property_event_decorator.d.ts +0 -4
- package/lib/annotation/property_event_decorator.js +0 -15
- package/lib/annotation/tagged.d.ts +0 -2
- package/lib/annotation/tagged.js +0 -8
- package/lib/annotation/target_name.d.ts +0 -3
- package/lib/annotation/target_name.js +0 -35
- package/lib/annotation/unmanaged.d.ts +0 -3
- package/lib/annotation/unmanaged.js +0 -35
- package/lib/bindings/binding.d.ts +0 -20
- package/lib/bindings/binding.js +0 -40
- package/lib/bindings/binding_count.d.ts +0 -5
- package/lib/constants/error_msgs.d.ts +0 -30
- package/lib/constants/error_msgs.js +0 -73
- package/lib/constants/literal_types.d.ts +0 -5
- package/lib/constants/literal_types.js +0 -26
- package/lib/constants/metadata_keys.d.ts +0 -13
- package/lib/constants/metadata_keys.js +0 -26
- package/lib/container/container.d.ts +0 -73
- package/lib/container/container.js +0 -776
- package/lib/container/container_module.d.ts +0 -11
- package/lib/container/container_module.js +0 -20
- package/lib/container/container_snapshot.d.ts +0 -10
- package/lib/container/container_snapshot.js +0 -18
- package/lib/container/lookup.d.ts +0 -17
- package/lib/container/lookup.js +0 -131
- package/lib/container/module_activation_store.d.ts +0 -10
- package/lib/container/module_activation_store.js +0 -50
- package/lib/interfaces/interfaces.d.ts +0 -269
- package/lib/inversify.d.ts +0 -24
- package/lib/inversify.js +0 -76
- package/lib/planning/context.d.ts +0 -11
- package/lib/planning/context.js +0 -18
- package/lib/planning/metadata.d.ts +0 -8
- package/lib/planning/metadata.js +0 -43
- package/lib/planning/metadata_reader.d.ts +0 -6
- package/lib/planning/metadata_reader.js +0 -47
- package/lib/planning/plan.d.ts +0 -7
- package/lib/planning/plan.js +0 -11
- package/lib/planning/planner.d.ts +0 -5
- package/lib/planning/planner.js +0 -195
- package/lib/planning/queryable_string.d.ts +0 -10
- package/lib/planning/queryable_string.js +0 -31
- package/lib/planning/reflection_utils.d.ts +0 -5
- package/lib/planning/reflection_utils.js +0 -55
- package/lib/planning/request.d.ts +0 -14
- package/lib/planning/request.js +0 -23
- package/lib/planning/target.d.ts +0 -23
- package/lib/planning/target.js +0 -113
- package/lib/resolution/instantiation.d.ts +0 -3
- package/lib/resolution/instantiation.js +0 -220
- package/lib/resolution/resolver.d.ts +0 -3
- package/lib/resolution/resolver.js +0 -239
- package/lib/scope/scope.d.ts +0 -3
- package/lib/scope/scope.js +0 -93
- package/lib/syntax/binding_in_syntax.d.ts +0 -9
- package/lib/syntax/binding_in_syntax.js +0 -24
- package/lib/syntax/binding_in_when_on_syntax.d.ts +0 -29
- package/lib/syntax/binding_in_when_on_syntax.js +0 -76
- package/lib/syntax/binding_on_syntax.d.ts +0 -8
- package/lib/syntax/binding_on_syntax.js +0 -19
- package/lib/syntax/binding_to_syntax.d.ts +0 -18
- package/lib/syntax/binding_to_syntax.js +0 -117
- package/lib/syntax/binding_when_on_syntax.d.ts +0 -25
- package/lib/syntax/binding_when_on_syntax.js +0 -65
- package/lib/syntax/binding_when_syntax.d.ts +0 -21
- package/lib/syntax/binding_when_syntax.js +0 -107
- package/lib/syntax/constraint_helpers.d.ts +0 -6
- package/lib/syntax/constraint_helpers.js +0 -65
- package/lib/tsconfig.tsbuildinfo +0 -1
- package/lib/utils/async.d.ts +0 -3
- package/lib/utils/async.js +0 -15
- package/lib/utils/binding_utils.d.ts +0 -4
- package/lib/utils/binding_utils.js +0 -87
- package/lib/utils/clonable.d.ts +0 -3
- package/lib/utils/clonable.js +0 -9
- package/lib/utils/exceptions.d.ts +0 -2
- package/lib/utils/exceptions.js +0 -44
- package/lib/utils/factory_type.d.ts +0 -5
- package/lib/utils/factory_type.js +0 -9
- package/lib/utils/id.d.ts +0 -2
- package/lib/utils/id.js +0 -7
- package/lib/utils/js.d.ts +0 -1
- package/lib/utils/js.js +0 -16
- package/lib/utils/serialization.d.ts +0 -10
- package/lib/utils/serialization.js +0 -133
- /package/{es → lib/esm}/package.json +0 -0
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { interfaces } from '../interfaces/interfaces';
|
|
2
|
-
declare class BindingWhenSyntax<T> implements interfaces.BindingWhenSyntax<T> {
|
|
3
|
-
private readonly _binding;
|
|
4
|
-
constructor(binding: interfaces.Binding<T>);
|
|
5
|
-
when(constraint: (request: interfaces.Request) => boolean): interfaces.BindingOnSyntax<T>;
|
|
6
|
-
whenTargetNamed(name: string | number | symbol): interfaces.BindingOnSyntax<T>;
|
|
7
|
-
whenTargetIsDefault(): interfaces.BindingOnSyntax<T>;
|
|
8
|
-
whenTargetTagged(tag: string | number | symbol, value: unknown): interfaces.BindingOnSyntax<T>;
|
|
9
|
-
whenInjectedInto(parent: NewableFunction | string): interfaces.BindingOnSyntax<T>;
|
|
10
|
-
whenParentNamed(name: string | number | symbol): interfaces.BindingOnSyntax<T>;
|
|
11
|
-
whenParentTagged(tag: string | number | symbol, value: unknown): interfaces.BindingOnSyntax<T>;
|
|
12
|
-
whenAnyAncestorIs(ancestor: NewableFunction | string): interfaces.BindingOnSyntax<T>;
|
|
13
|
-
whenNoAncestorIs(ancestor: NewableFunction | string): interfaces.BindingOnSyntax<T>;
|
|
14
|
-
whenAnyAncestorNamed(name: string | number | symbol): interfaces.BindingOnSyntax<T>;
|
|
15
|
-
whenNoAncestorNamed(name: string | number | symbol): interfaces.BindingOnSyntax<T>;
|
|
16
|
-
whenAnyAncestorTagged(tag: string | number | symbol, value: unknown): interfaces.BindingOnSyntax<T>;
|
|
17
|
-
whenNoAncestorTagged(tag: string | number | symbol, value: unknown): interfaces.BindingOnSyntax<T>;
|
|
18
|
-
whenAnyAncestorMatches(constraint: (request: interfaces.Request) => boolean): interfaces.BindingOnSyntax<T>;
|
|
19
|
-
whenNoAncestorMatches(constraint: (request: interfaces.Request) => boolean): interfaces.BindingOnSyntax<T>;
|
|
20
|
-
}
|
|
21
|
-
export { BindingWhenSyntax };
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { BindingOnSyntax } from './binding_on_syntax';
|
|
2
|
-
import { namedConstraint, taggedConstraint, traverseAncerstors, typeConstraint, } from './constraint_helpers';
|
|
3
|
-
var BindingWhenSyntax = (function () {
|
|
4
|
-
function BindingWhenSyntax(binding) {
|
|
5
|
-
this._binding = binding;
|
|
6
|
-
}
|
|
7
|
-
BindingWhenSyntax.prototype.when = function (constraint) {
|
|
8
|
-
this._binding.constraint = constraint;
|
|
9
|
-
return new BindingOnSyntax(this._binding);
|
|
10
|
-
};
|
|
11
|
-
BindingWhenSyntax.prototype.whenTargetNamed = function (name) {
|
|
12
|
-
this._binding.constraint = namedConstraint(name);
|
|
13
|
-
return new BindingOnSyntax(this._binding);
|
|
14
|
-
};
|
|
15
|
-
BindingWhenSyntax.prototype.whenTargetIsDefault = function () {
|
|
16
|
-
this._binding.constraint = function (request) {
|
|
17
|
-
if (request === null) {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
var targetIsDefault = request.target !== null &&
|
|
21
|
-
!request.target.isNamed() &&
|
|
22
|
-
!request.target.isTagged();
|
|
23
|
-
return targetIsDefault;
|
|
24
|
-
};
|
|
25
|
-
return new BindingOnSyntax(this._binding);
|
|
26
|
-
};
|
|
27
|
-
BindingWhenSyntax.prototype.whenTargetTagged = function (tag, value) {
|
|
28
|
-
this._binding.constraint = taggedConstraint(tag)(value);
|
|
29
|
-
return new BindingOnSyntax(this._binding);
|
|
30
|
-
};
|
|
31
|
-
BindingWhenSyntax.prototype.whenInjectedInto = function (parent) {
|
|
32
|
-
this._binding.constraint = function (request) {
|
|
33
|
-
return request !== null && typeConstraint(parent)(request.parentRequest);
|
|
34
|
-
};
|
|
35
|
-
return new BindingOnSyntax(this._binding);
|
|
36
|
-
};
|
|
37
|
-
BindingWhenSyntax.prototype.whenParentNamed = function (name) {
|
|
38
|
-
this._binding.constraint = function (request) {
|
|
39
|
-
return request !== null && namedConstraint(name)(request.parentRequest);
|
|
40
|
-
};
|
|
41
|
-
return new BindingOnSyntax(this._binding);
|
|
42
|
-
};
|
|
43
|
-
BindingWhenSyntax.prototype.whenParentTagged = function (tag, value) {
|
|
44
|
-
this._binding.constraint = function (request) {
|
|
45
|
-
return request !== null && taggedConstraint(tag)(value)(request.parentRequest);
|
|
46
|
-
};
|
|
47
|
-
return new BindingOnSyntax(this._binding);
|
|
48
|
-
};
|
|
49
|
-
BindingWhenSyntax.prototype.whenAnyAncestorIs = function (ancestor) {
|
|
50
|
-
this._binding.constraint = function (request) {
|
|
51
|
-
return request !== null && traverseAncerstors(request, typeConstraint(ancestor));
|
|
52
|
-
};
|
|
53
|
-
return new BindingOnSyntax(this._binding);
|
|
54
|
-
};
|
|
55
|
-
BindingWhenSyntax.prototype.whenNoAncestorIs = function (ancestor) {
|
|
56
|
-
this._binding.constraint = function (request) {
|
|
57
|
-
return request !== null &&
|
|
58
|
-
!traverseAncerstors(request, typeConstraint(ancestor));
|
|
59
|
-
};
|
|
60
|
-
return new BindingOnSyntax(this._binding);
|
|
61
|
-
};
|
|
62
|
-
BindingWhenSyntax.prototype.whenAnyAncestorNamed = function (name) {
|
|
63
|
-
this._binding.constraint = function (request) {
|
|
64
|
-
return request !== null && traverseAncerstors(request, namedConstraint(name));
|
|
65
|
-
};
|
|
66
|
-
return new BindingOnSyntax(this._binding);
|
|
67
|
-
};
|
|
68
|
-
BindingWhenSyntax.prototype.whenNoAncestorNamed = function (name) {
|
|
69
|
-
this._binding.constraint = function (request) {
|
|
70
|
-
return request !== null && !traverseAncerstors(request, namedConstraint(name));
|
|
71
|
-
};
|
|
72
|
-
return new BindingOnSyntax(this._binding);
|
|
73
|
-
};
|
|
74
|
-
BindingWhenSyntax.prototype.whenAnyAncestorTagged = function (tag, value) {
|
|
75
|
-
this._binding.constraint = function (request) {
|
|
76
|
-
return request !== null &&
|
|
77
|
-
traverseAncerstors(request, taggedConstraint(tag)(value));
|
|
78
|
-
};
|
|
79
|
-
return new BindingOnSyntax(this._binding);
|
|
80
|
-
};
|
|
81
|
-
BindingWhenSyntax.prototype.whenNoAncestorTagged = function (tag, value) {
|
|
82
|
-
this._binding.constraint = function (request) {
|
|
83
|
-
return request !== null &&
|
|
84
|
-
!traverseAncerstors(request, taggedConstraint(tag)(value));
|
|
85
|
-
};
|
|
86
|
-
return new BindingOnSyntax(this._binding);
|
|
87
|
-
};
|
|
88
|
-
BindingWhenSyntax.prototype.whenAnyAncestorMatches = function (constraint) {
|
|
89
|
-
this._binding.constraint = function (request) {
|
|
90
|
-
return request !== null &&
|
|
91
|
-
traverseAncerstors(request, constraint);
|
|
92
|
-
};
|
|
93
|
-
return new BindingOnSyntax(this._binding);
|
|
94
|
-
};
|
|
95
|
-
BindingWhenSyntax.prototype.whenNoAncestorMatches = function (constraint) {
|
|
96
|
-
this._binding.constraint = function (request) {
|
|
97
|
-
return request !== null &&
|
|
98
|
-
!traverseAncerstors(request, constraint);
|
|
99
|
-
};
|
|
100
|
-
return new BindingOnSyntax(this._binding);
|
|
101
|
-
};
|
|
102
|
-
return BindingWhenSyntax;
|
|
103
|
-
}());
|
|
104
|
-
export { BindingWhenSyntax };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { interfaces } from '../interfaces/interfaces';
|
|
2
|
-
declare const traverseAncerstors: (request: interfaces.Request, constraint: interfaces.ConstraintFunction) => boolean;
|
|
3
|
-
declare const taggedConstraint: (key: string | number | symbol) => (value: unknown) => interfaces.ConstraintFunction;
|
|
4
|
-
declare const namedConstraint: (value: unknown) => interfaces.ConstraintFunction;
|
|
5
|
-
declare const typeConstraint: (type: NewableFunction | string) => (request: interfaces.Request | null) => boolean;
|
|
6
|
-
export { traverseAncerstors, taggedConstraint, namedConstraint, typeConstraint, };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import * as METADATA_KEY from '../constants/metadata_keys';
|
|
2
|
-
import { Metadata } from '../planning/metadata';
|
|
3
|
-
var traverseAncerstors = function (request, constraint) {
|
|
4
|
-
var parent = request.parentRequest;
|
|
5
|
-
if (parent !== null) {
|
|
6
|
-
return constraint(parent) ? true : traverseAncerstors(parent, constraint);
|
|
7
|
-
}
|
|
8
|
-
else {
|
|
9
|
-
return false;
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
var taggedConstraint = function (key) { return function (value) {
|
|
13
|
-
var constraint = function (request) {
|
|
14
|
-
return request !== null &&
|
|
15
|
-
request.target !== null &&
|
|
16
|
-
request.target.matchesTag(key)(value);
|
|
17
|
-
};
|
|
18
|
-
constraint.metaData = new Metadata(key, value);
|
|
19
|
-
return constraint;
|
|
20
|
-
}; };
|
|
21
|
-
var namedConstraint = taggedConstraint(METADATA_KEY.NAMED_TAG);
|
|
22
|
-
var typeConstraint = function (type) { return function (request) {
|
|
23
|
-
var binding = null;
|
|
24
|
-
if (request !== null) {
|
|
25
|
-
binding = request.bindings[0];
|
|
26
|
-
if (typeof type === 'string') {
|
|
27
|
-
return binding.serviceIdentifier === type;
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
var constructor = request.bindings[0].implementationType;
|
|
31
|
-
return type === constructor;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return false;
|
|
35
|
-
}; };
|
|
36
|
-
export { traverseAncerstors, taggedConstraint, namedConstraint, typeConstraint, };
|
package/es/utils/async.d.ts
DELETED
package/es/utils/async.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
function isPromise(object) {
|
|
2
|
-
var isObjectOrFunction = (typeof object === 'object' && object !== null) ||
|
|
3
|
-
typeof object === 'function';
|
|
4
|
-
return (isObjectOrFunction && typeof object.then === 'function');
|
|
5
|
-
}
|
|
6
|
-
function isPromiseOrContainsPromise(object) {
|
|
7
|
-
if (isPromise(object)) {
|
|
8
|
-
return true;
|
|
9
|
-
}
|
|
10
|
-
return Array.isArray(object) && object.some(isPromise);
|
|
11
|
-
}
|
|
12
|
-
export { isPromise, isPromiseOrContainsPromise };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { interfaces } from '../interfaces/interfaces';
|
|
2
|
-
export declare const multiBindToService: (container: interfaces.Container) => (service: interfaces.ServiceIdentifier) => (...types: interfaces.ServiceIdentifier[]) => void;
|
|
3
|
-
export declare const ensureFullyBound: <T = unknown>(binding: interfaces.Binding<T>) => void;
|
|
4
|
-
export declare const getFactoryDetails: <T = unknown>(binding: interfaces.Binding<T>) => interfaces.FactoryDetails;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import * as ERROR_MSGS from '../constants/error_msgs';
|
|
2
|
-
import { BindingTypeEnum } from '../constants/literal_types';
|
|
3
|
-
import { getServiceIdentifierAsString } from '../utils/serialization';
|
|
4
|
-
import { FactoryType } from './factory_type';
|
|
5
|
-
export var multiBindToService = function (container) {
|
|
6
|
-
return function (service) {
|
|
7
|
-
return function () {
|
|
8
|
-
var types = [];
|
|
9
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
10
|
-
types[_i] = arguments[_i];
|
|
11
|
-
}
|
|
12
|
-
types.forEach(function (t) {
|
|
13
|
-
container.bind(t).toService(service);
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export var ensureFullyBound = function (binding) {
|
|
19
|
-
var boundValue = null;
|
|
20
|
-
switch (binding.type) {
|
|
21
|
-
case BindingTypeEnum.ConstantValue:
|
|
22
|
-
case BindingTypeEnum.Function:
|
|
23
|
-
boundValue = binding.cache;
|
|
24
|
-
break;
|
|
25
|
-
case BindingTypeEnum.Constructor:
|
|
26
|
-
case BindingTypeEnum.Instance:
|
|
27
|
-
boundValue = binding.implementationType;
|
|
28
|
-
break;
|
|
29
|
-
case BindingTypeEnum.DynamicValue:
|
|
30
|
-
boundValue = binding.dynamicValue;
|
|
31
|
-
break;
|
|
32
|
-
case BindingTypeEnum.Provider:
|
|
33
|
-
boundValue = binding.provider;
|
|
34
|
-
break;
|
|
35
|
-
case BindingTypeEnum.Factory:
|
|
36
|
-
boundValue = binding.factory;
|
|
37
|
-
break;
|
|
38
|
-
}
|
|
39
|
-
if (boundValue === null) {
|
|
40
|
-
var serviceIdentifierAsString = getServiceIdentifierAsString(binding.serviceIdentifier);
|
|
41
|
-
throw new Error("".concat(ERROR_MSGS.INVALID_BINDING_TYPE, " ").concat(serviceIdentifierAsString));
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
export var getFactoryDetails = function (binding) {
|
|
45
|
-
switch (binding.type) {
|
|
46
|
-
case BindingTypeEnum.Factory:
|
|
47
|
-
return { factory: binding.factory, factoryType: FactoryType.Factory };
|
|
48
|
-
case BindingTypeEnum.Provider:
|
|
49
|
-
return { factory: binding.provider, factoryType: FactoryType.Provider };
|
|
50
|
-
case BindingTypeEnum.DynamicValue:
|
|
51
|
-
return {
|
|
52
|
-
factory: binding.dynamicValue,
|
|
53
|
-
factoryType: FactoryType.DynamicValue,
|
|
54
|
-
};
|
|
55
|
-
default:
|
|
56
|
-
throw new Error("Unexpected factory type ".concat(binding.type));
|
|
57
|
-
}
|
|
58
|
-
};
|
package/es/utils/clonable.d.ts
DELETED
package/es/utils/clonable.js
DELETED
package/es/utils/exceptions.d.ts
DELETED
package/es/utils/exceptions.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as ERROR_MSGS from '../constants/error_msgs';
|
|
2
|
-
export function isStackOverflowException(error) {
|
|
3
|
-
return (error instanceof RangeError ||
|
|
4
|
-
error.message === ERROR_MSGS.STACK_OVERFLOW);
|
|
5
|
-
}
|
|
6
|
-
export var tryAndThrowErrorIfStackOverflow = function (fn, errorCallback) {
|
|
7
|
-
try {
|
|
8
|
-
return fn();
|
|
9
|
-
}
|
|
10
|
-
catch (error) {
|
|
11
|
-
if (isStackOverflowException(error)) {
|
|
12
|
-
throw errorCallback();
|
|
13
|
-
}
|
|
14
|
-
throw error;
|
|
15
|
-
}
|
|
16
|
-
};
|
package/es/utils/factory_type.js
DELETED
package/es/utils/id.d.ts
DELETED
package/es/utils/id.js
DELETED
package/es/utils/js.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getFirstArrayDuplicate<T>(array: T[]): T | undefined;
|
package/es/utils/js.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export function getFirstArrayDuplicate(array) {
|
|
2
|
-
var seenValues = new Set();
|
|
3
|
-
for (var _i = 0, array_1 = array; _i < array_1.length; _i++) {
|
|
4
|
-
var entry = array_1[_i];
|
|
5
|
-
if (seenValues.has(entry)) {
|
|
6
|
-
return entry;
|
|
7
|
-
}
|
|
8
|
-
else {
|
|
9
|
-
seenValues.add(entry);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
return undefined;
|
|
13
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { interfaces } from '../interfaces/interfaces';
|
|
2
|
-
declare function getServiceIdentifierAsString(serviceIdentifier: interfaces.ServiceIdentifier): string;
|
|
3
|
-
declare function listRegisteredBindingsForServiceIdentifier(container: interfaces.Container, serviceIdentifier: string, getBindings: <T>(container: interfaces.Container, serviceIdentifier: interfaces.ServiceIdentifier<T>) => interfaces.Binding<T>[]): string;
|
|
4
|
-
declare function circularDependencyToException(request: interfaces.Request): void;
|
|
5
|
-
declare function listMetadataForTarget(serviceIdentifierString: string, target: interfaces.Target): string;
|
|
6
|
-
declare function getFunctionName(func: {
|
|
7
|
-
name: string | null | undefined;
|
|
8
|
-
}): string;
|
|
9
|
-
declare function getSymbolDescription(symbol: symbol): string;
|
|
10
|
-
export { getFunctionName, getServiceIdentifierAsString, listRegisteredBindingsForServiceIdentifier, listMetadataForTarget, circularDependencyToException, getSymbolDescription, };
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import * as ERROR_MSGS from '../constants/error_msgs';
|
|
2
|
-
function getServiceIdentifierAsString(serviceIdentifier) {
|
|
3
|
-
if (typeof serviceIdentifier === 'function') {
|
|
4
|
-
return serviceIdentifier.name;
|
|
5
|
-
}
|
|
6
|
-
else if (typeof serviceIdentifier === 'symbol') {
|
|
7
|
-
return serviceIdentifier.toString();
|
|
8
|
-
}
|
|
9
|
-
else {
|
|
10
|
-
return serviceIdentifier;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
function listRegisteredBindingsForServiceIdentifier(container, serviceIdentifier, getBindings) {
|
|
14
|
-
var registeredBindingsList = '';
|
|
15
|
-
var registeredBindings = getBindings(container, serviceIdentifier);
|
|
16
|
-
if (registeredBindings.length !== 0) {
|
|
17
|
-
registeredBindingsList = '\nRegistered bindings:';
|
|
18
|
-
registeredBindings.forEach(function (binding) {
|
|
19
|
-
var name = 'Object';
|
|
20
|
-
if (binding.implementationType !== null) {
|
|
21
|
-
name = getFunctionName(binding.implementationType);
|
|
22
|
-
}
|
|
23
|
-
registeredBindingsList = "".concat(registeredBindingsList, "\n ").concat(name);
|
|
24
|
-
if (binding.constraint.metaData) {
|
|
25
|
-
registeredBindingsList = "".concat(registeredBindingsList, " - ").concat(binding.constraint.metaData);
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
return registeredBindingsList;
|
|
30
|
-
}
|
|
31
|
-
function alreadyDependencyChain(request, serviceIdentifier) {
|
|
32
|
-
if (request.parentRequest === null) {
|
|
33
|
-
return false;
|
|
34
|
-
}
|
|
35
|
-
else if (request.parentRequest.serviceIdentifier === serviceIdentifier) {
|
|
36
|
-
return true;
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
return alreadyDependencyChain(request.parentRequest, serviceIdentifier);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
function dependencyChainToString(request) {
|
|
43
|
-
function _createStringArr(req, result) {
|
|
44
|
-
if (result === void 0) { result = []; }
|
|
45
|
-
var serviceIdentifier = getServiceIdentifierAsString(req.serviceIdentifier);
|
|
46
|
-
result.push(serviceIdentifier);
|
|
47
|
-
if (req.parentRequest !== null) {
|
|
48
|
-
return _createStringArr(req.parentRequest, result);
|
|
49
|
-
}
|
|
50
|
-
return result;
|
|
51
|
-
}
|
|
52
|
-
var stringArr = _createStringArr(request);
|
|
53
|
-
return stringArr.reverse().join(' --> ');
|
|
54
|
-
}
|
|
55
|
-
function circularDependencyToException(request) {
|
|
56
|
-
request.childRequests.forEach(function (childRequest) {
|
|
57
|
-
if (alreadyDependencyChain(request, childRequest.serviceIdentifier)) {
|
|
58
|
-
var services = dependencyChainToString(childRequest);
|
|
59
|
-
throw new Error("".concat(ERROR_MSGS.CIRCULAR_DEPENDENCY, " ").concat(services));
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
circularDependencyToException(childRequest);
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
function listMetadataForTarget(serviceIdentifierString, target) {
|
|
67
|
-
if (target.isTagged() || target.isNamed()) {
|
|
68
|
-
var m_1 = '';
|
|
69
|
-
var namedTag = target.getNamedTag();
|
|
70
|
-
var otherTags = target.getCustomTags();
|
|
71
|
-
if (namedTag !== null) {
|
|
72
|
-
m_1 += stringifyMetadata(namedTag) + '\n';
|
|
73
|
-
}
|
|
74
|
-
if (otherTags !== null) {
|
|
75
|
-
otherTags.forEach(function (tag) {
|
|
76
|
-
m_1 += stringifyMetadata(tag) + '\n';
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
return " ".concat(serviceIdentifierString, "\n ").concat(serviceIdentifierString, " - ").concat(m_1);
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
return " ".concat(serviceIdentifierString);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
function getFunctionName(func) {
|
|
86
|
-
if (func.name != null && func.name !== '') {
|
|
87
|
-
return func.name;
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
var name_1 = func.toString();
|
|
91
|
-
var match = name_1.match(/^function\s*([^\s(]+)/);
|
|
92
|
-
return match === null
|
|
93
|
-
? "Anonymous function: ".concat(name_1)
|
|
94
|
-
: match[1];
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
function getSymbolDescription(symbol) {
|
|
98
|
-
return symbol.toString().slice(7, -1);
|
|
99
|
-
}
|
|
100
|
-
function stringifyMetadata(metadata) {
|
|
101
|
-
return "{\"key\":\"".concat(metadata.key.toString(), "\",\"value\":\"").concat(metadata.value.toString(), "\"}");
|
|
102
|
-
}
|
|
103
|
-
export { getFunctionName, getServiceIdentifierAsString, listRegisteredBindingsForServiceIdentifier, listMetadataForTarget, circularDependencyToException, getSymbolDescription, };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { interfaces } from '../interfaces/interfaces';
|
|
2
|
-
type Prototype<T> = {
|
|
3
|
-
[Property in keyof T]: T[Property] extends NewableFunction ? T[Property] : T[Property] | undefined;
|
|
4
|
-
} & {
|
|
5
|
-
constructor: NewableFunction;
|
|
6
|
-
};
|
|
7
|
-
interface ConstructorFunction<T = Record<string, unknown>> {
|
|
8
|
-
prototype: Prototype<T>;
|
|
9
|
-
new (...args: unknown[]): T;
|
|
10
|
-
}
|
|
11
|
-
export type DecoratorTarget<T = unknown> = ConstructorFunction<T> | Prototype<T>;
|
|
12
|
-
declare function tagParameter(annotationTarget: DecoratorTarget, parameterName: string | symbol | undefined, parameterIndex: number, metadata: interfaces.MetadataOrMetadataArray): void;
|
|
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, indexOrPropertyDescriptor?: number | TypedPropertyDescriptor<T>) => void;
|
|
15
|
-
declare function decorate(decorator: DecoratorTarget | ParameterDecorator | MethodDecorator, target: object, parameterIndexOrProperty?: number | string): void;
|
|
16
|
-
export { decorate, tagParameter, tagProperty, createTaggedDecorator };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { LazyServiceIdentifier } from '@inversifyjs/common';
|
|
2
|
-
import { interfaces } from '../interfaces/interfaces';
|
|
3
|
-
import { DecoratorTarget } from './decorator_utils';
|
|
4
|
-
export declare function injectBase(metadataKey: string): <T = unknown>(serviceIdentifier: interfaces.ServiceIdentifier<T> | LazyServiceIdentifier<T>) => (target: DecoratorTarget, targetKey?: string | symbol, indexOrPropertyDescriptor?: number | TypedPropertyDescriptor<T>) => void;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { LazyServiceIdentifier } from '@inversifyjs/common';
|
|
2
|
-
import { interfaces } from '../interfaces/interfaces';
|
|
3
|
-
import { DecoratorTarget } from './decorator_utils';
|
|
4
|
-
declare const multiInject: <T = unknown>(serviceIdentifier: interfaces.ServiceIdentifier<T> | LazyServiceIdentifier<T>) => (target: DecoratorTarget, targetKey?: string | symbol, indexOrPropertyDescriptor?: number | TypedPropertyDescriptor<T>) => void;
|
|
5
|
-
export { multiInject };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BindingCount = void 0;
|
|
4
|
-
var BindingCount;
|
|
5
|
-
(function (BindingCount) {
|
|
6
|
-
BindingCount[BindingCount["MultipleBindingsAvailable"] = 2] = "MultipleBindingsAvailable";
|
|
7
|
-
BindingCount[BindingCount["NoBindingsAvailable"] = 0] = "NoBindingsAvailable";
|
|
8
|
-
BindingCount[BindingCount["OnlyOneBindingAvailable"] = 1] = "OnlyOneBindingAvailable";
|
|
9
|
-
})(BindingCount || (exports.BindingCount = BindingCount = {}));
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export declare const DUPLICATED_INJECTABLE_DECORATOR: string;
|
|
2
|
-
export declare const DUPLICATED_METADATA: string;
|
|
3
|
-
export declare const NULL_ARGUMENT: string;
|
|
4
|
-
export declare const KEY_NOT_FOUND: string;
|
|
5
|
-
export declare const AMBIGUOUS_MATCH: string;
|
|
6
|
-
export declare const CANNOT_UNBIND: string;
|
|
7
|
-
export declare const NOT_REGISTERED: string;
|
|
8
|
-
export declare const TRYING_TO_RESOLVE_BINDINGS: (name: string) => string;
|
|
9
|
-
export declare const UNDEFINED_INJECT_ANNOTATION: (name: string) => string;
|
|
10
|
-
export declare const CIRCULAR_DEPENDENCY: string;
|
|
11
|
-
export declare const INVALID_BINDING_TYPE: string;
|
|
12
|
-
export declare const NO_MORE_SNAPSHOTS_AVAILABLE: string;
|
|
13
|
-
export declare const INVALID_MIDDLEWARE_RETURN: string;
|
|
14
|
-
export declare const INVALID_FUNCTION_BINDING: string;
|
|
15
|
-
export declare const LAZY_IN_SYNC: (key: unknown) => string;
|
|
16
|
-
export declare const INVALID_TO_SELF_VALUE: string;
|
|
17
|
-
export declare const INVALID_DECORATOR_OPERATION: string;
|
|
18
|
-
export declare const ARGUMENTS_LENGTH_MISMATCH: (name: string) => string;
|
|
19
|
-
export declare const CONTAINER_OPTIONS_MUST_BE_AN_OBJECT: string;
|
|
20
|
-
export declare const CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE: string;
|
|
21
|
-
export declare const CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE: string;
|
|
22
|
-
export declare const CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK: string;
|
|
23
|
-
export declare const MULTIPLE_PRE_DESTROY_METHODS: string;
|
|
24
|
-
export declare const MULTIPLE_POST_CONSTRUCT_METHODS: string;
|
|
25
|
-
export declare const ASYNC_UNBIND_REQUIRED: string;
|
|
26
|
-
export declare const POST_CONSTRUCT_ERROR: (clazz: string, errorMessage: string) => string;
|
|
27
|
-
export declare const PRE_DESTROY_ERROR: (clazz: string, errorMessage: string) => string;
|
|
28
|
-
export declare const ON_DEACTIVATION_ERROR: (clazz: string, errorMessage: string) => string;
|
|
29
|
-
export declare const CIRCULAR_DEPENDENCY_IN_FACTORY: (factoryType: string, serviceIdentifier: string) => string;
|
|
30
|
-
export declare const STACK_OVERFLOW: string;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { interfaces } from '../interfaces/interfaces';
|
|
2
|
-
declare const BindingScopeEnum: interfaces.BindingScopeEnum;
|
|
3
|
-
declare const BindingTypeEnum: interfaces.BindingTypeEnum;
|
|
4
|
-
declare const TargetTypeEnum: interfaces.TargetTypeEnum;
|
|
5
|
-
export { BindingScopeEnum, BindingTypeEnum, TargetTypeEnum };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const NAMED_TAG: string;
|
|
2
|
-
export declare const NAME_TAG: string;
|
|
3
|
-
export declare const UNMANAGED_TAG: string;
|
|
4
|
-
export declare const OPTIONAL_TAG: string;
|
|
5
|
-
export declare const INJECT_TAG: string;
|
|
6
|
-
export declare const MULTI_INJECT_TAG: string;
|
|
7
|
-
export declare const TAGGED: string;
|
|
8
|
-
export declare const TAGGED_PROP: string;
|
|
9
|
-
export declare const PARAM_TYPES: string;
|
|
10
|
-
export declare const DESIGN_PARAM_TYPES: string;
|
|
11
|
-
export declare const POST_CONSTRUCT: string;
|
|
12
|
-
export declare const PRE_DESTROY: string;
|
|
13
|
-
export declare const NON_CUSTOM_TAG_KEYS: string[];
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { interfaces } from '../interfaces/interfaces';
|
|
2
|
-
export declare class ContainerModule implements interfaces.ContainerModule {
|
|
3
|
-
id: number;
|
|
4
|
-
registry: interfaces.ContainerModuleCallBack;
|
|
5
|
-
constructor(registry: interfaces.ContainerModuleCallBack);
|
|
6
|
-
}
|
|
7
|
-
export declare class AsyncContainerModule implements interfaces.AsyncContainerModule {
|
|
8
|
-
id: number;
|
|
9
|
-
registry: interfaces.AsyncContainerModuleCallBack;
|
|
10
|
-
constructor(registry: interfaces.AsyncContainerModuleCallBack);
|
|
11
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { interfaces } from '../interfaces/interfaces';
|
|
2
|
-
declare class ContainerSnapshot implements interfaces.ContainerSnapshot {
|
|
3
|
-
bindings: interfaces.Lookup<interfaces.Binding<unknown>>;
|
|
4
|
-
activations: interfaces.Lookup<interfaces.BindingActivation<unknown>>;
|
|
5
|
-
deactivations: interfaces.Lookup<interfaces.BindingDeactivation<unknown>>;
|
|
6
|
-
middleware: interfaces.Next | null;
|
|
7
|
-
moduleActivationStore: interfaces.ModuleActivationStore;
|
|
8
|
-
static of(bindings: interfaces.Lookup<interfaces.Binding<unknown>>, middleware: interfaces.Next | null, activations: interfaces.Lookup<interfaces.BindingActivation<unknown>>, deactivations: interfaces.Lookup<interfaces.BindingDeactivation<unknown>>, moduleActivationStore: interfaces.ModuleActivationStore): ContainerSnapshot;
|
|
9
|
-
}
|
|
10
|
-
export { ContainerSnapshot };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { interfaces } from '../interfaces/interfaces';
|
|
2
|
-
declare class Lookup<T> implements interfaces.Lookup<T> {
|
|
3
|
-
private readonly _map;
|
|
4
|
-
constructor();
|
|
5
|
-
getMap(): Map<interfaces.ServiceIdentifier<unknown>, T[]>;
|
|
6
|
-
add(serviceIdentifier: interfaces.ServiceIdentifier, value: T): void;
|
|
7
|
-
get(serviceIdentifier: interfaces.ServiceIdentifier): T[];
|
|
8
|
-
remove(serviceIdentifier: interfaces.ServiceIdentifier): void;
|
|
9
|
-
removeIntersection(lookup: interfaces.Lookup<T>): void;
|
|
10
|
-
removeByCondition(condition: (item: T) => boolean): T[];
|
|
11
|
-
hasKey(serviceIdentifier: interfaces.ServiceIdentifier): boolean;
|
|
12
|
-
clone(): interfaces.Lookup<T>;
|
|
13
|
-
traverse(func: (key: interfaces.ServiceIdentifier, value: T[]) => void): void;
|
|
14
|
-
private _checkNonNulish;
|
|
15
|
-
private _setValue;
|
|
16
|
-
}
|
|
17
|
-
export { Lookup };
|