inversify 6.1.4 → 6.1.5-beta.0
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 +11 -1
- package/README.md +6 -15
- package/es/container/container.d.ts +2 -0
- package/es/container/module_activation_store.d.ts +2 -2
- package/es/interfaces/interfaces.d.ts +2 -2
- package/es/inversify.d.ts +1 -0
- package/es/inversify.js +3 -2
- package/es/inversify.js.LICENSE.txt +14 -0
- package/lib/annotation/decorator_utils.js +31 -25
- package/lib/annotation/inject.js +20 -10
- package/lib/annotation/inject_base.js +6 -6
- package/lib/annotation/injectable.js +20 -10
- package/lib/annotation/multi_inject.js +20 -10
- package/lib/annotation/named.js +20 -10
- package/lib/annotation/optional.js +20 -10
- package/lib/annotation/post_construct.js +21 -11
- package/lib/annotation/pre_destroy.js +21 -11
- package/lib/annotation/property_event_decorator.js +4 -4
- package/lib/annotation/tagged.js +2 -2
- package/lib/annotation/target_name.js +21 -11
- package/lib/annotation/unmanaged.js +21 -11
- package/lib/bindings/binding.js +23 -10
- package/lib/constants/error_msgs.js +15 -29
- package/lib/constants/literal_types.js +3 -3
- package/lib/container/container.d.ts +2 -0
- package/lib/container/container.js +317 -566
- package/lib/container/container_module.js +11 -9
- package/lib/container/container_snapshot.js +10 -8
- package/lib/container/lookup.js +61 -56
- package/lib/container/module_activation_store.d.ts +2 -2
- package/lib/container/module_activation_store.js +21 -24
- package/lib/interfaces/interfaces.d.ts +2 -2
- package/lib/inversify.d.ts +1 -0
- package/lib/inversify.js +19 -8
- package/lib/planning/context.js +12 -9
- package/lib/planning/metadata.js +27 -16
- package/lib/planning/metadata_reader.js +29 -24
- package/lib/planning/plan.js +5 -4
- package/lib/planning/planner.js +62 -53
- package/lib/planning/queryable_string.js +16 -16
- package/lib/planning/reflection_utils.js +25 -17
- package/lib/planning/request.js +15 -8
- package/lib/resolution/instantiation.js +59 -119
- package/lib/resolution/resolver.js +89 -134
- package/lib/scope/scope.js +17 -62
- package/lib/syntax/binding_in_syntax.js +12 -12
- package/lib/syntax/binding_in_when_on_syntax.js +50 -47
- package/lib/syntax/binding_on_syntax.js +9 -9
- package/lib/syntax/binding_to_syntax.js +70 -49
- package/lib/syntax/binding_when_on_syntax.js +42 -40
- package/lib/syntax/binding_when_syntax.js +54 -76
- package/lib/syntax/constraint_helpers.js +31 -23
- package/lib/utils/async.js +1 -1
- package/lib/utils/binding_utils.js +31 -29
- package/lib/utils/exceptions.js +19 -9
- package/lib/utils/id.js +1 -1
- package/lib/utils/js.js +2 -3
- package/lib/utils/serialization.js +42 -33
- package/package.json +14 -15
- package/amd/annotation/decorator_utils.d.ts +0 -16
- 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.d.ts +0 -4
- package/amd/annotation/inject_base.js +0 -16
- package/amd/annotation/injectable.d.ts +0 -2
- 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.d.ts +0 -2
- package/amd/annotation/named.js +0 -32
- package/amd/annotation/optional.d.ts +0 -2
- package/amd/annotation/optional.js +0 -32
- package/amd/annotation/post_construct.d.ts +0 -4
- 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.d.ts +0 -2
- 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.d.ts +0 -5
- package/amd/bindings/binding_count.js +0 -11
- package/amd/constants/error_msgs.d.ts +0 -30
- 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.d.ts +0 -13
- 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.d.ts +0 -11
- 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.d.ts +0 -269
- package/amd/interfaces/interfaces.js +0 -4
- package/amd/inversify.d.ts +0 -24
- 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.d.ts +0 -7
- package/amd/planning/plan.js +0 -13
- package/amd/planning/planner.d.ts +0 -5
- package/amd/planning/planner.js +0 -187
- package/amd/planning/queryable_string.d.ts +0 -10
- package/amd/planning/queryable_string.js +0 -33
- package/amd/planning/reflection_utils.d.ts +0 -5
- package/amd/planning/reflection_utils.js +0 -55
- package/amd/planning/request.d.ts +0 -14
- 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.d.ts +0 -3
- package/amd/resolution/resolver.js +0 -234
- package/amd/scope/scope.d.ts +0 -3
- package/amd/scope/scope.js +0 -93
- package/amd/syntax/binding_in_syntax.d.ts +0 -9
- 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.d.ts +0 -25
- 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.d.ts +0 -6
- package/amd/syntax/constraint_helpers.js +0 -66
- package/amd/utils/async.d.ts +0 -3
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- package/amd/utils/id.js +0 -9
- package/amd/utils/js.d.ts +0 -1
- package/amd/utils/js.js +0 -18
- package/amd/utils/serialization.d.ts +0 -10
- package/amd/utils/serialization.js +0 -135
- package/es6/annotation/decorator_utils.d.ts +0 -16
- package/es6/annotation/decorator_utils.js +0 -114
- package/es6/annotation/inject.d.ts +0 -5
- package/es6/annotation/inject.js +0 -30
- package/es6/annotation/inject_base.d.ts +0 -4
- package/es6/annotation/inject_base.js +0 -17
- package/es6/annotation/injectable.d.ts +0 -2
- package/es6/annotation/injectable.js +0 -38
- package/es6/annotation/lazy_service_identifier.js +0 -2
- package/es6/annotation/multi_inject.d.ts +0 -5
- package/es6/annotation/multi_inject.js +0 -30
- package/es6/annotation/named.d.ts +0 -2
- package/es6/annotation/named.js +0 -32
- package/es6/annotation/optional.d.ts +0 -2
- package/es6/annotation/optional.js +0 -32
- package/es6/annotation/post_construct.d.ts +0 -4
- package/es6/annotation/post_construct.js +0 -31
- package/es6/annotation/pre_destroy.d.ts +0 -4
- package/es6/annotation/pre_destroy.js +0 -31
- package/es6/annotation/property_event_decorator.d.ts +0 -4
- package/es6/annotation/property_event_decorator.js +0 -15
- package/es6/annotation/tagged.d.ts +0 -2
- package/es6/annotation/tagged.js +0 -8
- package/es6/annotation/target_name.d.ts +0 -3
- package/es6/annotation/target_name.js +0 -35
- package/es6/annotation/unmanaged.d.ts +0 -3
- package/es6/annotation/unmanaged.js +0 -35
- package/es6/bindings/binding.d.ts +0 -20
- package/es6/bindings/binding.js +0 -39
- 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/error_msgs.js +0 -59
- package/es6/constants/literal_types.d.ts +0 -5
- package/es6/constants/literal_types.js +0 -26
- package/es6/constants/metadata_keys.d.ts +0 -13
- package/es6/constants/metadata_keys.js +0 -26
- package/es6/container/container.d.ts +0 -73
- package/es6/container/container.js +0 -545
- package/es6/container/container_module.d.ts +0 -11
- package/es6/container/container_module.js +0 -18
- package/es6/container/container_snapshot.d.ts +0 -10
- package/es6/container/container_snapshot.js +0 -15
- package/es6/container/lookup.d.ts +0 -17
- package/es6/container/lookup.js +0 -125
- package/es6/container/module_activation_store.d.ts +0 -10
- package/es6/container/module_activation_store.js +0 -49
- package/es6/interfaces/interfaces.d.ts +0 -269
- package/es6/interfaces/interfaces.js +0 -2
- package/es6/inversify.d.ts +0 -24
- package/es6/inversify.js +0 -76
- package/es6/planning/context.d.ts +0 -11
- package/es6/planning/context.js +0 -17
- package/es6/planning/metadata.d.ts +0 -8
- package/es6/planning/metadata.js +0 -42
- package/es6/planning/metadata_reader.d.ts +0 -6
- package/es6/planning/metadata_reader.js +0 -44
- package/es6/planning/plan.d.ts +0 -7
- package/es6/planning/plan.js +0 -10
- package/es6/planning/planner.d.ts +0 -5
- package/es6/planning/planner.js +0 -194
- package/es6/planning/queryable_string.d.ts +0 -10
- package/es6/planning/queryable_string.js +0 -30
- package/es6/planning/reflection_utils.d.ts +0 -5
- package/es6/planning/reflection_utils.js +0 -53
- package/es6/planning/request.d.ts +0 -14
- package/es6/planning/request.js +0 -22
- package/es6/planning/target.js +0 -105
- package/es6/resolution/instantiation.d.ts +0 -3
- package/es6/resolution/instantiation.js +0 -158
- package/es6/resolution/resolver.d.ts +0 -3
- package/es6/resolution/resolver.js +0 -193
- package/es6/scope/scope.d.ts +0 -3
- package/es6/scope/scope.js +0 -57
- package/es6/syntax/binding_in_syntax.d.ts +0 -9
- package/es6/syntax/binding_in_syntax.js +0 -23
- package/es6/syntax/binding_in_when_on_syntax.d.ts +0 -29
- package/es6/syntax/binding_in_when_on_syntax.js +0 -75
- package/es6/syntax/binding_on_syntax.d.ts +0 -8
- package/es6/syntax/binding_on_syntax.js +0 -18
- package/es6/syntax/binding_to_syntax.d.ts +0 -18
- package/es6/syntax/binding_to_syntax.js +0 -110
- package/es6/syntax/binding_when_on_syntax.d.ts +0 -25
- package/es6/syntax/binding_when_on_syntax.js +0 -64
- package/es6/syntax/binding_when_syntax.d.ts +0 -21
- package/es6/syntax/binding_when_syntax.js +0 -84
- package/es6/syntax/constraint_helpers.d.ts +0 -6
- package/es6/syntax/constraint_helpers.js +0 -63
- package/es6/utils/async.d.ts +0 -3
- package/es6/utils/async.js +0 -15
- package/es6/utils/binding_utils.d.ts +0 -4
- package/es6/utils/binding_utils.js +0 -79
- package/es6/utils/clonable.d.ts +0 -3
- package/es6/utils/clonable.js +0 -9
- package/es6/utils/exceptions.d.ts +0 -2
- package/es6/utils/exceptions.js +0 -44
- package/es6/utils/factory_type.d.ts +0 -5
- package/es6/utils/factory_type.js +0 -9
- package/es6/utils/id.d.ts +0 -2
- package/es6/utils/id.js +0 -7
- package/es6/utils/js.d.ts +0 -1
- package/es6/utils/js.js +0 -15
- package/es6/utils/serialization.d.ts +0 -10
- package/es6/utils/serialization.js +0 -132
package/lib/utils/exceptions.js
CHANGED
|
@@ -15,22 +15,32 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.tryAndThrowErrorIfStackOverflow = void 0;
|
|
27
37
|
exports.isStackOverflowException = isStackOverflowException;
|
|
28
|
-
|
|
38
|
+
const ERROR_MSGS = __importStar(require("../constants/error_msgs"));
|
|
29
39
|
function isStackOverflowException(error) {
|
|
30
40
|
return (error instanceof RangeError ||
|
|
31
41
|
error.message === ERROR_MSGS.STACK_OVERFLOW);
|
|
32
42
|
}
|
|
33
|
-
|
|
43
|
+
const tryAndThrowErrorIfStackOverflow = (fn, errorCallback) => {
|
|
34
44
|
try {
|
|
35
45
|
return fn();
|
|
36
46
|
}
|
package/lib/utils/id.js
CHANGED
package/lib/utils/js.js
CHANGED
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getFirstArrayDuplicate = getFirstArrayDuplicate;
|
|
4
4
|
function getFirstArrayDuplicate(array) {
|
|
5
|
-
|
|
6
|
-
for (
|
|
7
|
-
var entry = array_1[_i];
|
|
5
|
+
const seenValues = new Set();
|
|
6
|
+
for (const entry of array) {
|
|
8
7
|
if (seenValues.has(entry)) {
|
|
9
8
|
return entry;
|
|
10
9
|
}
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.getFunctionName = getFunctionName;
|
|
27
37
|
exports.getServiceIdentifierAsString = getServiceIdentifierAsString;
|
|
@@ -29,7 +39,7 @@ exports.listRegisteredBindingsForServiceIdentifier = listRegisteredBindingsForSe
|
|
|
29
39
|
exports.listMetadataForTarget = listMetadataForTarget;
|
|
30
40
|
exports.circularDependencyToException = circularDependencyToException;
|
|
31
41
|
exports.getSymbolDescription = getSymbolDescription;
|
|
32
|
-
|
|
42
|
+
const ERROR_MSGS = __importStar(require("../constants/error_msgs"));
|
|
33
43
|
function getServiceIdentifierAsString(serviceIdentifier) {
|
|
34
44
|
if (typeof serviceIdentifier === 'function') {
|
|
35
45
|
return serviceIdentifier.name;
|
|
@@ -42,18 +52,18 @@ function getServiceIdentifierAsString(serviceIdentifier) {
|
|
|
42
52
|
}
|
|
43
53
|
}
|
|
44
54
|
function listRegisteredBindingsForServiceIdentifier(container, serviceIdentifier, getBindings) {
|
|
45
|
-
|
|
46
|
-
|
|
55
|
+
let registeredBindingsList = '';
|
|
56
|
+
const registeredBindings = getBindings(container, serviceIdentifier);
|
|
47
57
|
if (registeredBindings.length !== 0) {
|
|
48
58
|
registeredBindingsList = '\nRegistered bindings:';
|
|
49
|
-
registeredBindings.forEach(
|
|
50
|
-
|
|
59
|
+
registeredBindings.forEach((binding) => {
|
|
60
|
+
let name = 'Object';
|
|
51
61
|
if (binding.implementationType !== null) {
|
|
52
62
|
name = getFunctionName(binding.implementationType);
|
|
53
63
|
}
|
|
54
|
-
registeredBindingsList =
|
|
64
|
+
registeredBindingsList = `${registeredBindingsList}\n ${name}`;
|
|
55
65
|
if (binding.constraint.metaData) {
|
|
56
|
-
registeredBindingsList =
|
|
66
|
+
registeredBindingsList = `${registeredBindingsList} - ${binding.constraint.metaData}`;
|
|
57
67
|
}
|
|
58
68
|
});
|
|
59
69
|
}
|
|
@@ -71,23 +81,22 @@ function alreadyDependencyChain(request, serviceIdentifier) {
|
|
|
71
81
|
}
|
|
72
82
|
}
|
|
73
83
|
function dependencyChainToString(request) {
|
|
74
|
-
function _createStringArr(req, result) {
|
|
75
|
-
|
|
76
|
-
var serviceIdentifier = getServiceIdentifierAsString(req.serviceIdentifier);
|
|
84
|
+
function _createStringArr(req, result = []) {
|
|
85
|
+
const serviceIdentifier = getServiceIdentifierAsString(req.serviceIdentifier);
|
|
77
86
|
result.push(serviceIdentifier);
|
|
78
87
|
if (req.parentRequest !== null) {
|
|
79
88
|
return _createStringArr(req.parentRequest, result);
|
|
80
89
|
}
|
|
81
90
|
return result;
|
|
82
91
|
}
|
|
83
|
-
|
|
92
|
+
const stringArr = _createStringArr(request);
|
|
84
93
|
return stringArr.reverse().join(' --> ');
|
|
85
94
|
}
|
|
86
95
|
function circularDependencyToException(request) {
|
|
87
|
-
request.childRequests.forEach(
|
|
96
|
+
request.childRequests.forEach((childRequest) => {
|
|
88
97
|
if (alreadyDependencyChain(request, childRequest.serviceIdentifier)) {
|
|
89
|
-
|
|
90
|
-
throw new Error(
|
|
98
|
+
const services = dependencyChainToString(childRequest);
|
|
99
|
+
throw new Error(`${ERROR_MSGS.CIRCULAR_DEPENDENCY} ${services}`);
|
|
91
100
|
}
|
|
92
101
|
else {
|
|
93
102
|
circularDependencyToException(childRequest);
|
|
@@ -96,21 +105,21 @@ function circularDependencyToException(request) {
|
|
|
96
105
|
}
|
|
97
106
|
function listMetadataForTarget(serviceIdentifierString, target) {
|
|
98
107
|
if (target.isTagged() || target.isNamed()) {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
108
|
+
let m = '';
|
|
109
|
+
const namedTag = target.getNamedTag();
|
|
110
|
+
const otherTags = target.getCustomTags();
|
|
102
111
|
if (namedTag !== null) {
|
|
103
|
-
|
|
112
|
+
m += stringifyMetadata(namedTag) + '\n';
|
|
104
113
|
}
|
|
105
114
|
if (otherTags !== null) {
|
|
106
|
-
otherTags.forEach(
|
|
107
|
-
|
|
115
|
+
otherTags.forEach((tag) => {
|
|
116
|
+
m += stringifyMetadata(tag) + '\n';
|
|
108
117
|
});
|
|
109
118
|
}
|
|
110
|
-
return
|
|
119
|
+
return ` ${serviceIdentifierString}\n ${serviceIdentifierString} - ${m}`;
|
|
111
120
|
}
|
|
112
121
|
else {
|
|
113
|
-
return
|
|
122
|
+
return ` ${serviceIdentifierString}`;
|
|
114
123
|
}
|
|
115
124
|
}
|
|
116
125
|
function getFunctionName(func) {
|
|
@@ -118,10 +127,10 @@ function getFunctionName(func) {
|
|
|
118
127
|
return func.name;
|
|
119
128
|
}
|
|
120
129
|
else {
|
|
121
|
-
|
|
122
|
-
|
|
130
|
+
const name = func.toString();
|
|
131
|
+
const match = name.match(/^function\s*([^\s(]+)/);
|
|
123
132
|
return match === null
|
|
124
|
-
?
|
|
133
|
+
? `Anonymous function: ${name}`
|
|
125
134
|
: match[1];
|
|
126
135
|
}
|
|
127
136
|
}
|
|
@@ -129,5 +138,5 @@ function getSymbolDescription(symbol) {
|
|
|
129
138
|
return symbol.toString().slice(7, -1);
|
|
130
139
|
}
|
|
131
140
|
function stringifyMetadata(metadata) {
|
|
132
|
-
return
|
|
141
|
+
return `{"key":"${metadata.key.toString()}","value":"${metadata.value.toString()}"}`;
|
|
133
142
|
}
|
package/package.json
CHANGED
|
@@ -9,32 +9,34 @@
|
|
|
9
9
|
"@inversifyjs/core": "1.3.4"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
|
-
"@eslint/js": "9.
|
|
12
|
+
"@eslint/js": "9.15.0",
|
|
13
13
|
"@types/chai": "4.3.20",
|
|
14
|
-
"@types/mocha": "10.0.
|
|
14
|
+
"@types/mocha": "10.0.10",
|
|
15
15
|
"@types/sinon": "17.0.3",
|
|
16
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
17
|
-
"@typescript-eslint/parser": "8.
|
|
16
|
+
"@typescript-eslint/eslint-plugin": "8.16.0",
|
|
17
|
+
"@typescript-eslint/parser": "8.16.0",
|
|
18
18
|
"chai": "4.5.0",
|
|
19
|
-
"eslint": "9.
|
|
19
|
+
"eslint": "9.15.0",
|
|
20
20
|
"eslint-config-prettier": "9.1.0",
|
|
21
21
|
"eslint-plugin-prettier": "5.2.1",
|
|
22
22
|
"eslint-plugin-simple-import-sort": "12.1.1",
|
|
23
23
|
"mocha": "10.8.2",
|
|
24
24
|
"nyc": "17.1.0",
|
|
25
|
-
"prettier": "3.
|
|
25
|
+
"prettier": "3.4.0",
|
|
26
26
|
"publish-please": "5.5.2",
|
|
27
|
-
"reflect-metadata": "0.2.2",
|
|
28
27
|
"rimraf": "6.0.1",
|
|
29
28
|
"sinon": "19.0.2",
|
|
30
29
|
"ts-loader": "9.5.1",
|
|
31
30
|
"ts-node": "10.9.2",
|
|
32
|
-
"typescript": "5.
|
|
33
|
-
"typescript-eslint": "8.
|
|
31
|
+
"typescript": "5.7.2",
|
|
32
|
+
"typescript-eslint": "8.16.0",
|
|
34
33
|
"updates": "16.4.0",
|
|
35
34
|
"webpack": "5.96.1",
|
|
36
35
|
"webpack-cli": "5.1.4"
|
|
37
36
|
},
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"reflect-metadata": "~0.2.2"
|
|
39
|
+
},
|
|
38
40
|
"engines": {},
|
|
39
41
|
"homepage": "http://inversify.io",
|
|
40
42
|
"jsnext:main": "es/inversify.js",
|
|
@@ -63,12 +65,10 @@
|
|
|
63
65
|
"url": "https://github.com/inversify/InversifyJS.git"
|
|
64
66
|
},
|
|
65
67
|
"scripts": {
|
|
66
|
-
"build": "npm run build:lib && npm run build:
|
|
67
|
-
"build:amd": "tsc -p src/tsconfig-amd.json",
|
|
68
|
+
"build": "npm run build:lib && npm run build:es",
|
|
68
69
|
"build:es": "webpack && node ./scripts/writeEsmPackageJson.mjs ./es",
|
|
69
|
-
"build:es6": "tsc -p src/tsconfig-es6.json",
|
|
70
70
|
"build:lib": "tsc -p src/tsconfig.json",
|
|
71
|
-
"clean": "rimraf
|
|
71
|
+
"clean": "rimraf es lib",
|
|
72
72
|
"format": "prettier --write ./src/*.ts ./src/**/*.ts ./test/*.ts ./test/**/*.ts",
|
|
73
73
|
"lint": "eslint ./src ./test",
|
|
74
74
|
"postupdate": "git diff-files --quiet package-lock.json || npm test",
|
|
@@ -78,6 +78,5 @@
|
|
|
78
78
|
"update": "updates --update --minor && npm install"
|
|
79
79
|
},
|
|
80
80
|
"sideEffects": false,
|
|
81
|
-
"
|
|
82
|
-
"version": "6.1.4"
|
|
81
|
+
"version": "6.1.5-beta.0"
|
|
83
82
|
}
|
|
@@ -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,119 +0,0 @@
|
|
|
1
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
-
if (k2 === undefined) k2 = k;
|
|
3
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
-
}
|
|
7
|
-
Object.defineProperty(o, k2, desc);
|
|
8
|
-
}) : (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
o[k2] = m[k];
|
|
11
|
-
}));
|
|
12
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
13
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
14
|
-
}) : function(o, v) {
|
|
15
|
-
o["default"] = v;
|
|
16
|
-
});
|
|
17
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
18
|
-
if (mod && mod.__esModule) return mod;
|
|
19
|
-
var result = {};
|
|
20
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
-
__setModuleDefault(result, mod);
|
|
22
|
-
return result;
|
|
23
|
-
};
|
|
24
|
-
define(["require", "exports", "../constants/error_msgs", "../constants/metadata_keys", "../utils/js"], function (require, exports, ERROR_MSGS, METADATA_KEY, js_1) {
|
|
25
|
-
"use strict";
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.decorate = decorate;
|
|
28
|
-
exports.tagParameter = tagParameter;
|
|
29
|
-
exports.tagProperty = tagProperty;
|
|
30
|
-
exports.createTaggedDecorator = createTaggedDecorator;
|
|
31
|
-
ERROR_MSGS = __importStar(ERROR_MSGS);
|
|
32
|
-
METADATA_KEY = __importStar(METADATA_KEY);
|
|
33
|
-
function targetIsConstructorFunction(target) {
|
|
34
|
-
return target.prototype !== undefined;
|
|
35
|
-
}
|
|
36
|
-
function _throwIfMethodParameter(parameterName) {
|
|
37
|
-
if (parameterName !== undefined) {
|
|
38
|
-
throw new Error(ERROR_MSGS.INVALID_DECORATOR_OPERATION);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
function tagParameter(annotationTarget, parameterName, parameterIndex, metadata) {
|
|
42
|
-
_throwIfMethodParameter(parameterName);
|
|
43
|
-
_tagParameterOrProperty(METADATA_KEY.TAGGED, annotationTarget, parameterIndex.toString(), metadata);
|
|
44
|
-
}
|
|
45
|
-
function tagProperty(annotationTarget, propertyName, metadata) {
|
|
46
|
-
if (targetIsConstructorFunction(annotationTarget)) {
|
|
47
|
-
throw new Error(ERROR_MSGS.INVALID_DECORATOR_OPERATION);
|
|
48
|
-
}
|
|
49
|
-
_tagParameterOrProperty(METADATA_KEY.TAGGED_PROP, annotationTarget.constructor, propertyName, metadata);
|
|
50
|
-
}
|
|
51
|
-
function _ensureNoMetadataKeyDuplicates(metadata) {
|
|
52
|
-
var metadatas = [];
|
|
53
|
-
if (Array.isArray(metadata)) {
|
|
54
|
-
metadatas = metadata;
|
|
55
|
-
var duplicate = (0, js_1.getFirstArrayDuplicate)(metadatas.map(function (md) { return md.key; }));
|
|
56
|
-
if (duplicate !== undefined) {
|
|
57
|
-
throw new Error("".concat(ERROR_MSGS.DUPLICATED_METADATA, " ").concat(duplicate.toString()));
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
metadatas = [metadata];
|
|
62
|
-
}
|
|
63
|
-
return metadatas;
|
|
64
|
-
}
|
|
65
|
-
function _tagParameterOrProperty(metadataKey, annotationTarget, key, metadata) {
|
|
66
|
-
var metadatas = _ensureNoMetadataKeyDuplicates(metadata);
|
|
67
|
-
var paramsOrPropertiesMetadata = {};
|
|
68
|
-
if (Reflect.hasOwnMetadata(metadataKey, annotationTarget)) {
|
|
69
|
-
paramsOrPropertiesMetadata = Reflect.getMetadata(metadataKey, annotationTarget);
|
|
70
|
-
}
|
|
71
|
-
var paramOrPropertyMetadata = paramsOrPropertiesMetadata[key];
|
|
72
|
-
if (paramOrPropertyMetadata === undefined) {
|
|
73
|
-
paramOrPropertyMetadata = [];
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
var _loop_1 = function (m) {
|
|
77
|
-
if (metadatas.some(function (md) { return md.key === m.key; })) {
|
|
78
|
-
throw new Error("".concat(ERROR_MSGS.DUPLICATED_METADATA, " ").concat(m.key.toString()));
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
for (var _i = 0, paramOrPropertyMetadata_1 = paramOrPropertyMetadata; _i < paramOrPropertyMetadata_1.length; _i++) {
|
|
82
|
-
var m = paramOrPropertyMetadata_1[_i];
|
|
83
|
-
_loop_1(m);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
paramOrPropertyMetadata.push.apply(paramOrPropertyMetadata, metadatas);
|
|
87
|
-
paramsOrPropertiesMetadata[key] = paramOrPropertyMetadata;
|
|
88
|
-
Reflect.defineMetadata(metadataKey, paramsOrPropertiesMetadata, annotationTarget);
|
|
89
|
-
}
|
|
90
|
-
function createTaggedDecorator(metadata) {
|
|
91
|
-
return function (target, targetKey, indexOrPropertyDescriptor) {
|
|
92
|
-
if (typeof indexOrPropertyDescriptor === 'number') {
|
|
93
|
-
tagParameter(target, targetKey, indexOrPropertyDescriptor, metadata);
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
tagProperty(target, targetKey, metadata);
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
function _decorate(decorators, target) {
|
|
101
|
-
Reflect.decorate(decorators, target);
|
|
102
|
-
}
|
|
103
|
-
function _param(paramIndex, decorator) {
|
|
104
|
-
return function (target, key) {
|
|
105
|
-
decorator(target, key, paramIndex);
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
function decorate(decorator, target, parameterIndexOrProperty) {
|
|
109
|
-
if (typeof parameterIndexOrProperty === 'number') {
|
|
110
|
-
_decorate([_param(parameterIndexOrProperty, decorator)], target);
|
|
111
|
-
}
|
|
112
|
-
else if (typeof parameterIndexOrProperty === 'string') {
|
|
113
|
-
Reflect.decorate([decorator], target, parameterIndexOrProperty);
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
_decorate([decorator], target);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
});
|
|
@@ -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 inject: <T = unknown>(serviceIdentifier: interfaces.ServiceIdentifier<T> | LazyServiceIdentifier<T>) => (target: DecoratorTarget, targetKey?: string | symbol, indexOrPropertyDescriptor?: number | TypedPropertyDescriptor<T>) => void;
|
|
5
|
-
export { inject };
|
package/amd/annotation/inject.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
-
if (k2 === undefined) k2 = k;
|
|
3
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
-
}
|
|
7
|
-
Object.defineProperty(o, k2, desc);
|
|
8
|
-
}) : (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
o[k2] = m[k];
|
|
11
|
-
}));
|
|
12
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
13
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
14
|
-
}) : function(o, v) {
|
|
15
|
-
o["default"] = v;
|
|
16
|
-
});
|
|
17
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
18
|
-
if (mod && mod.__esModule) return mod;
|
|
19
|
-
var result = {};
|
|
20
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
-
__setModuleDefault(result, mod);
|
|
22
|
-
return result;
|
|
23
|
-
};
|
|
24
|
-
define(["require", "exports", "../constants/metadata_keys", "./inject_base"], function (require, exports, METADATA_KEY, inject_base_1) {
|
|
25
|
-
"use strict";
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.inject = void 0;
|
|
28
|
-
METADATA_KEY = __importStar(METADATA_KEY);
|
|
29
|
-
var inject = (0, inject_base_1.injectBase)(METADATA_KEY.INJECT_TAG);
|
|
30
|
-
exports.inject = inject;
|
|
31
|
-
});
|
|
@@ -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,16 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "../constants/error_msgs", "../planning/metadata", "./decorator_utils"], function (require, exports, error_msgs_1, metadata_1, decorator_utils_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.injectBase = injectBase;
|
|
5
|
-
function injectBase(metadataKey) {
|
|
6
|
-
return function (serviceIdentifier) {
|
|
7
|
-
return function (target, targetKey, indexOrPropertyDescriptor) {
|
|
8
|
-
if (serviceIdentifier === undefined) {
|
|
9
|
-
var className = typeof target === 'function' ? target.name : target.constructor.name;
|
|
10
|
-
throw new Error((0, error_msgs_1.UNDEFINED_INJECT_ANNOTATION)(className));
|
|
11
|
-
}
|
|
12
|
-
(0, decorator_utils_1.createTaggedDecorator)(new metadata_1.Metadata(metadataKey, serviceIdentifier))(target, targetKey, indexOrPropertyDescriptor);
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
});
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
-
if (k2 === undefined) k2 = k;
|
|
3
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
-
}
|
|
7
|
-
Object.defineProperty(o, k2, desc);
|
|
8
|
-
}) : (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
o[k2] = m[k];
|
|
11
|
-
}));
|
|
12
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
13
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
14
|
-
}) : function(o, v) {
|
|
15
|
-
o["default"] = v;
|
|
16
|
-
});
|
|
17
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
18
|
-
if (mod && mod.__esModule) return mod;
|
|
19
|
-
var result = {};
|
|
20
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
-
__setModuleDefault(result, mod);
|
|
22
|
-
return result;
|
|
23
|
-
};
|
|
24
|
-
define(["require", "exports", "../constants/error_msgs", "../constants/metadata_keys"], function (require, exports, ERRORS_MSGS, METADATA_KEY) {
|
|
25
|
-
"use strict";
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.injectable = injectable;
|
|
28
|
-
ERRORS_MSGS = __importStar(ERRORS_MSGS);
|
|
29
|
-
METADATA_KEY = __importStar(METADATA_KEY);
|
|
30
|
-
function injectable() {
|
|
31
|
-
return function (target) {
|
|
32
|
-
if (Reflect.hasOwnMetadata(METADATA_KEY.PARAM_TYPES, target)) {
|
|
33
|
-
throw new Error(ERRORS_MSGS.DUPLICATED_INJECTABLE_DECORATOR);
|
|
34
|
-
}
|
|
35
|
-
var types = Reflect.getMetadata(METADATA_KEY.DESIGN_PARAM_TYPES, target) || [];
|
|
36
|
-
Reflect.defineMetadata(METADATA_KEY.PARAM_TYPES, types, target);
|
|
37
|
-
return target;
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
});
|
|
@@ -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,31 +0,0 @@
|
|
|
1
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
-
if (k2 === undefined) k2 = k;
|
|
3
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
-
}
|
|
7
|
-
Object.defineProperty(o, k2, desc);
|
|
8
|
-
}) : (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
o[k2] = m[k];
|
|
11
|
-
}));
|
|
12
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
13
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
14
|
-
}) : function(o, v) {
|
|
15
|
-
o["default"] = v;
|
|
16
|
-
});
|
|
17
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
18
|
-
if (mod && mod.__esModule) return mod;
|
|
19
|
-
var result = {};
|
|
20
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
-
__setModuleDefault(result, mod);
|
|
22
|
-
return result;
|
|
23
|
-
};
|
|
24
|
-
define(["require", "exports", "../constants/metadata_keys", "./inject_base"], function (require, exports, METADATA_KEY, inject_base_1) {
|
|
25
|
-
"use strict";
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.multiInject = void 0;
|
|
28
|
-
METADATA_KEY = __importStar(METADATA_KEY);
|
|
29
|
-
var multiInject = (0, inject_base_1.injectBase)(METADATA_KEY.MULTI_INJECT_TAG);
|
|
30
|
-
exports.multiInject = multiInject;
|
|
31
|
-
});
|
package/amd/annotation/named.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
-
if (k2 === undefined) k2 = k;
|
|
3
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
-
}
|
|
7
|
-
Object.defineProperty(o, k2, desc);
|
|
8
|
-
}) : (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
o[k2] = m[k];
|
|
11
|
-
}));
|
|
12
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
13
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
14
|
-
}) : function(o, v) {
|
|
15
|
-
o["default"] = v;
|
|
16
|
-
});
|
|
17
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
18
|
-
if (mod && mod.__esModule) return mod;
|
|
19
|
-
var result = {};
|
|
20
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
-
__setModuleDefault(result, mod);
|
|
22
|
-
return result;
|
|
23
|
-
};
|
|
24
|
-
define(["require", "exports", "../constants/metadata_keys", "../planning/metadata", "./decorator_utils"], function (require, exports, METADATA_KEY, metadata_1, decorator_utils_1) {
|
|
25
|
-
"use strict";
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.named = named;
|
|
28
|
-
METADATA_KEY = __importStar(METADATA_KEY);
|
|
29
|
-
function named(name) {
|
|
30
|
-
return (0, decorator_utils_1.createTaggedDecorator)(new metadata_1.Metadata(METADATA_KEY.NAMED_TAG, name));
|
|
31
|
-
}
|
|
32
|
-
});
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
-
if (k2 === undefined) k2 = k;
|
|
3
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
-
}
|
|
7
|
-
Object.defineProperty(o, k2, desc);
|
|
8
|
-
}) : (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
o[k2] = m[k];
|
|
11
|
-
}));
|
|
12
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
13
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
14
|
-
}) : function(o, v) {
|
|
15
|
-
o["default"] = v;
|
|
16
|
-
});
|
|
17
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
18
|
-
if (mod && mod.__esModule) return mod;
|
|
19
|
-
var result = {};
|
|
20
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
-
__setModuleDefault(result, mod);
|
|
22
|
-
return result;
|
|
23
|
-
};
|
|
24
|
-
define(["require", "exports", "../constants/metadata_keys", "../planning/metadata", "./decorator_utils"], function (require, exports, METADATA_KEY, metadata_1, decorator_utils_1) {
|
|
25
|
-
"use strict";
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.optional = optional;
|
|
28
|
-
METADATA_KEY = __importStar(METADATA_KEY);
|
|
29
|
-
function optional() {
|
|
30
|
-
return (0, decorator_utils_1.createTaggedDecorator)(new metadata_1.Metadata(METADATA_KEY.OPTIONAL_TAG, true));
|
|
31
|
-
}
|
|
32
|
-
});
|