@loopback/metadata 2.1.1 → 2.1.5
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 +32 -0
- package/dist/decorator-factory.js +251 -247
- package/dist/decorator-factory.js.map +1 -1
- package/dist/inspector.js +136 -132
- package/dist/inspector.js.map +1 -1
- package/dist/reflect.js +1 -0
- package/dist/reflect.js.map +1 -1
- package/dist/types.js +1 -0
- package/dist/types.js.map +1 -1
- package/package.json +10 -10
- package/index.d.ts +0 -6
- package/index.js +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,38 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.1.5](https://github.com/strongloop/loopback-next/compare/@loopback/metadata@2.1.4...@loopback/metadata@2.1.5) (2020-05-20)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @loopback/metadata
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [2.1.4](https://github.com/strongloop/loopback-next/compare/@loopback/metadata@2.1.3...@loopback/metadata@2.1.4) (2020-05-19)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @loopback/metadata
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [2.1.3](https://github.com/strongloop/loopback-next/compare/@loopback/metadata@2.1.2...@loopback/metadata@2.1.3) (2020-05-07)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @loopback/metadata
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [2.1.2](https://github.com/strongloop/loopback-next/compare/@loopback/metadata@2.1.1...@loopback/metadata@2.1.2) (2020-04-29)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @loopback/metadata
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
6
38
|
## [2.1.1](https://github.com/strongloop/loopback-next/compare/@loopback/metadata@2.1.0...@loopback/metadata@2.1.1) (2020-04-23)
|
|
7
39
|
|
|
8
40
|
**Note:** Version bump only for package @loopback/metadata
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
// This file is licensed under the MIT License.
|
|
5
5
|
// License text available at https://opensource.org/licenses/MIT
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.MethodMultiDecoratorFactory = exports.MethodParameterDecoratorFactory = exports.ParameterDecoratorFactory = exports.MethodDecoratorFactory = exports.PropertyDecoratorFactory = exports.ClassDecoratorFactory = exports.DecoratorFactory = void 0;
|
|
7
8
|
const tslib_1 = require("tslib");
|
|
8
9
|
const debug_1 = tslib_1.__importDefault(require("debug"));
|
|
9
10
|
const lodash_1 = tslib_1.__importDefault(require("lodash"));
|
|
@@ -31,271 +32,274 @@ const debug = debug_1.default('loopback:metadata:decorator');
|
|
|
31
32
|
* class MyController {}
|
|
32
33
|
* ```
|
|
33
34
|
*/
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
this.
|
|
35
|
+
let DecoratorFactory = /** @class */ (() => {
|
|
36
|
+
class DecoratorFactory {
|
|
37
|
+
/**
|
|
38
|
+
* Construct a new class decorator factory
|
|
39
|
+
* @param key - Metadata key
|
|
40
|
+
* @param spec - Metadata object from the decorator function
|
|
41
|
+
* @param options - Options for the decorator. Default to
|
|
42
|
+
* `{allowInheritance: true}` if not provided
|
|
43
|
+
*/
|
|
44
|
+
constructor(key, spec, options = {}) {
|
|
45
|
+
var _a;
|
|
46
|
+
this.key = key;
|
|
47
|
+
this.spec = spec;
|
|
48
|
+
this.options = options;
|
|
49
|
+
this.options = Object.assign({
|
|
50
|
+
allowInheritance: true,
|
|
51
|
+
cloneInputSpec: true,
|
|
52
|
+
}, options);
|
|
53
|
+
const defaultDecoratorName = this.constructor.name.replace(/Factory$/, '');
|
|
54
|
+
this.decoratorName = (_a = this.options.decoratorName) !== null && _a !== void 0 ? _a : defaultDecoratorName;
|
|
55
|
+
if (this.options.cloneInputSpec) {
|
|
56
|
+
this.spec = DecoratorFactory.cloneDeep(spec);
|
|
57
|
+
}
|
|
55
58
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
return !!(this.options && this.options.allowInheritance);
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Inherit metadata from base classes. By default, this method merges base
|
|
62
|
-
* metadata into the spec if `allowInheritance` is set to `true`. To customize
|
|
63
|
-
* the behavior, this method can be overridden by sub classes.
|
|
64
|
-
*
|
|
65
|
-
* @param inheritedMetadata - Metadata from base classes for the member
|
|
66
|
-
*/
|
|
67
|
-
inherit(inheritedMetadata) {
|
|
68
|
-
if (!this.allowInheritance())
|
|
69
|
-
return this.spec;
|
|
70
|
-
if (inheritedMetadata == null)
|
|
71
|
-
return this.spec;
|
|
72
|
-
if (this.spec == null)
|
|
73
|
-
return inheritedMetadata;
|
|
74
|
-
if (typeof inheritedMetadata !== 'object')
|
|
75
|
-
return this.spec;
|
|
76
|
-
if (Array.isArray(inheritedMetadata) || Array.isArray(this.spec)) {
|
|
77
|
-
// For arrays, we don't merge
|
|
78
|
-
return this.spec;
|
|
59
|
+
allowInheritance() {
|
|
60
|
+
return !!(this.options && this.options.allowInheritance);
|
|
79
61
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
: `${target.constructor.name}.prototype`;
|
|
102
|
-
if (member == null && descriptorOrIndex == null) {
|
|
103
|
-
return `class ${name}`;
|
|
62
|
+
/**
|
|
63
|
+
* Inherit metadata from base classes. By default, this method merges base
|
|
64
|
+
* metadata into the spec if `allowInheritance` is set to `true`. To customize
|
|
65
|
+
* the behavior, this method can be overridden by sub classes.
|
|
66
|
+
*
|
|
67
|
+
* @param inheritedMetadata - Metadata from base classes for the member
|
|
68
|
+
*/
|
|
69
|
+
inherit(inheritedMetadata) {
|
|
70
|
+
if (!this.allowInheritance())
|
|
71
|
+
return this.spec;
|
|
72
|
+
if (inheritedMetadata == null)
|
|
73
|
+
return this.spec;
|
|
74
|
+
if (this.spec == null)
|
|
75
|
+
return inheritedMetadata;
|
|
76
|
+
if (typeof inheritedMetadata !== 'object')
|
|
77
|
+
return this.spec;
|
|
78
|
+
if (Array.isArray(inheritedMetadata) || Array.isArray(this.spec)) {
|
|
79
|
+
// For arrays, we don't merge
|
|
80
|
+
return this.spec;
|
|
81
|
+
}
|
|
82
|
+
return Object.assign(inheritedMetadata, this.spec);
|
|
104
83
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
84
|
+
/**
|
|
85
|
+
* Get the qualified name of a decoration target. For example:
|
|
86
|
+
* ```
|
|
87
|
+
* class MyClass
|
|
88
|
+
* MyClass.constructor[0] // First parameter of the constructor
|
|
89
|
+
* MyClass.myStaticProperty
|
|
90
|
+
* MyClass.myStaticMethod()
|
|
91
|
+
* MyClass.myStaticMethod[0] // First parameter of the myStaticMethod
|
|
92
|
+
* MyClass.prototype.myProperty
|
|
93
|
+
* MyClass.prototype.myMethod()
|
|
94
|
+
* MyClass.prototype.myMethod[1] // Second parameter of myMethod
|
|
95
|
+
* ```
|
|
96
|
+
* @param target - Class or prototype of a class
|
|
97
|
+
* @param member - Optional property/method name
|
|
98
|
+
* @param descriptorOrIndex - Optional method descriptor or parameter index
|
|
99
|
+
*/
|
|
100
|
+
static getTargetName(target, member, descriptorOrIndex) {
|
|
101
|
+
let name = target instanceof Function
|
|
102
|
+
? target.name
|
|
103
|
+
: `${target.constructor.name}.prototype`;
|
|
104
|
+
if (member == null && descriptorOrIndex == null) {
|
|
105
|
+
return `class ${name}`;
|
|
106
|
+
}
|
|
107
|
+
if (member == null)
|
|
108
|
+
member = 'constructor';
|
|
109
|
+
const memberAccessor = typeof member === 'symbol' ? '[' + member.toString() + ']' : '.' + member;
|
|
110
|
+
if (typeof descriptorOrIndex === 'number') {
|
|
111
|
+
// Parameter
|
|
112
|
+
name = `${name}${memberAccessor}[${descriptorOrIndex}]`;
|
|
113
|
+
}
|
|
114
|
+
else if (descriptorOrIndex != null) {
|
|
115
|
+
name = `${name}${memberAccessor}()`;
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
name = `${name}${memberAccessor}`;
|
|
119
|
+
}
|
|
120
|
+
return name;
|
|
111
121
|
}
|
|
112
|
-
|
|
113
|
-
|
|
122
|
+
/**
|
|
123
|
+
* Get the number of parameters for a given constructor or method
|
|
124
|
+
* @param target - Class or the prototype
|
|
125
|
+
* @param member - Method name
|
|
126
|
+
*/
|
|
127
|
+
static getNumberOfParameters(target, member) {
|
|
128
|
+
if (typeof target === 'function' && !member) {
|
|
129
|
+
// constructor
|
|
130
|
+
return target.length;
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
// target[member] is a function
|
|
134
|
+
const method = target[member];
|
|
135
|
+
return method.length;
|
|
136
|
+
}
|
|
114
137
|
}
|
|
115
|
-
|
|
116
|
-
|
|
138
|
+
/**
|
|
139
|
+
* Set a reference to the target class or prototype for a given spec if
|
|
140
|
+
* it's an object
|
|
141
|
+
* @param spec - Metadata spec
|
|
142
|
+
* @param target - Target of the decoration. It is a class or the prototype of
|
|
143
|
+
* a class.
|
|
144
|
+
*/
|
|
145
|
+
withTarget(spec, target) {
|
|
146
|
+
if (typeof spec === 'object' && spec != null) {
|
|
147
|
+
// Add a hidden property for the `target`
|
|
148
|
+
Object.defineProperty(spec, DecoratorFactory.TARGET, {
|
|
149
|
+
value: target,
|
|
150
|
+
enumerable: false,
|
|
151
|
+
// Make sure it won't be redefined on the same object
|
|
152
|
+
configurable: false,
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
return spec;
|
|
117
156
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
157
|
+
/**
|
|
158
|
+
* Get the optional decoration target of a given spec
|
|
159
|
+
* @param spec - Metadata spec
|
|
160
|
+
*/
|
|
161
|
+
getTarget(spec) {
|
|
162
|
+
if (typeof spec === 'object' && spec != null) {
|
|
163
|
+
const specWithTarget = spec;
|
|
164
|
+
return specWithTarget[DecoratorFactory.TARGET];
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
return undefined;
|
|
168
|
+
}
|
|
129
169
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
170
|
+
/**
|
|
171
|
+
* This method is called by the default implementation of the decorator
|
|
172
|
+
* function to merge the spec argument from the decoration with the inherited
|
|
173
|
+
* metadata for a class, all properties, all methods, or all method
|
|
174
|
+
* parameters that are decorated by this decorator.
|
|
175
|
+
*
|
|
176
|
+
* It MUST be overridden by subclasses to process inherited metadata.
|
|
177
|
+
*
|
|
178
|
+
* @param inheritedMetadata - Metadata inherited from the base classes
|
|
179
|
+
* @param target - Decoration target
|
|
180
|
+
* @param member - Optional property or method
|
|
181
|
+
* @param descriptorOrIndex - Optional parameter index or method descriptor
|
|
182
|
+
*/
|
|
183
|
+
mergeWithInherited(inheritedMetadata, target, member, descriptorOrIndex) {
|
|
184
|
+
throw new Error(`mergeWithInherited() is not implemented for ${this.decoratorName}`);
|
|
134
185
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
configurable: false,
|
|
151
|
-
});
|
|
186
|
+
/**
|
|
187
|
+
* This method is called by the default implementation of the decorator
|
|
188
|
+
* function to merge the spec argument from the decoration with the own
|
|
189
|
+
* metadata for a class, all properties, all methods, or all method
|
|
190
|
+
* parameters that are decorated by this decorator.
|
|
191
|
+
*
|
|
192
|
+
* It MUST be overridden by subclasses to process own metadata.
|
|
193
|
+
*
|
|
194
|
+
* @param ownMetadata - Own Metadata exists locally on the target
|
|
195
|
+
* @param target - Decoration target
|
|
196
|
+
* @param member - Optional property or method
|
|
197
|
+
* @param descriptorOrIndex - Optional parameter index or method descriptor
|
|
198
|
+
*/
|
|
199
|
+
mergeWithOwn(ownMetadata, target, member, descriptorOrIndex) {
|
|
200
|
+
throw new Error(`mergeWithOwn() is not implemented for ${this.decoratorName}`);
|
|
152
201
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
const
|
|
162
|
-
return
|
|
202
|
+
/**
|
|
203
|
+
* Create an error to report if the decorator is applied to the target more
|
|
204
|
+
* than once
|
|
205
|
+
* @param target - Decoration target
|
|
206
|
+
* @param member - Optional property or method
|
|
207
|
+
* @param descriptorOrIndex - Optional parameter index or method descriptor
|
|
208
|
+
*/
|
|
209
|
+
duplicateDecorationError(target, member, descriptorOrIndex) {
|
|
210
|
+
const targetName = DecoratorFactory.getTargetName(target, member, descriptorOrIndex);
|
|
211
|
+
return new Error(`${this.decoratorName} cannot be applied more than once on ${targetName}`);
|
|
163
212
|
}
|
|
164
|
-
|
|
165
|
-
|
|
213
|
+
/**
|
|
214
|
+
* Create a decorator function of the given type. Each sub class MUST
|
|
215
|
+
* implement this method.
|
|
216
|
+
*/
|
|
217
|
+
create() {
|
|
218
|
+
throw new Error(`create() is not implemented for ${this.decoratorName}`);
|
|
166
219
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
* function to merge the spec argument from the decoration with the own
|
|
187
|
-
* metadata for a class, all properties, all methods, or all method
|
|
188
|
-
* parameters that are decorated by this decorator.
|
|
189
|
-
*
|
|
190
|
-
* It MUST be overridden by subclasses to process own metadata.
|
|
191
|
-
*
|
|
192
|
-
* @param ownMetadata - Own Metadata exists locally on the target
|
|
193
|
-
* @param target - Decoration target
|
|
194
|
-
* @param member - Optional property or method
|
|
195
|
-
* @param descriptorOrIndex - Optional parameter index or method descriptor
|
|
196
|
-
*/
|
|
197
|
-
mergeWithOwn(ownMetadata, target, member, descriptorOrIndex) {
|
|
198
|
-
throw new Error(`mergeWithOwn() is not implemented for ${this.decoratorName}`);
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* Create an error to report if the decorator is applied to the target more
|
|
202
|
-
* than once
|
|
203
|
-
* @param target - Decoration target
|
|
204
|
-
* @param member - Optional property or method
|
|
205
|
-
* @param descriptorOrIndex - Optional parameter index or method descriptor
|
|
206
|
-
*/
|
|
207
|
-
duplicateDecorationError(target, member, descriptorOrIndex) {
|
|
208
|
-
const targetName = DecoratorFactory.getTargetName(target, member, descriptorOrIndex);
|
|
209
|
-
return new Error(`${this.decoratorName} cannot be applied more than once on ${targetName}`);
|
|
210
|
-
}
|
|
211
|
-
/**
|
|
212
|
-
* Create a decorator function of the given type. Each sub class MUST
|
|
213
|
-
* implement this method.
|
|
214
|
-
*/
|
|
215
|
-
create() {
|
|
216
|
-
throw new Error(`create() is not implemented for ${this.decoratorName}`);
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* Base implementation of the decorator function
|
|
220
|
-
* @param target - Decorator target
|
|
221
|
-
* @param member - Optional property or method
|
|
222
|
-
* @param descriptorOrIndex - Optional method descriptor or parameter index
|
|
223
|
-
*/
|
|
224
|
-
decorate(target, member, descriptorOrIndex) {
|
|
225
|
-
const targetName = DecoratorFactory.getTargetName(target, member, descriptorOrIndex);
|
|
226
|
-
let meta = reflect_1.Reflector.getOwnMetadata(this.key, target);
|
|
227
|
-
if (meta == null && this.allowInheritance()) {
|
|
228
|
-
// Clone the base metadata so that it won't be accidentally
|
|
229
|
-
// mutated by sub classes
|
|
230
|
-
meta = DecoratorFactory.cloneDeep(reflect_1.Reflector.getMetadata(this.key, target));
|
|
231
|
-
meta = this.mergeWithInherited(meta, target, member, descriptorOrIndex);
|
|
232
|
-
/* istanbul ignore if */
|
|
233
|
-
if (debug.enabled) {
|
|
234
|
-
debug('%s: %j', targetName, meta);
|
|
220
|
+
/**
|
|
221
|
+
* Base implementation of the decorator function
|
|
222
|
+
* @param target - Decorator target
|
|
223
|
+
* @param member - Optional property or method
|
|
224
|
+
* @param descriptorOrIndex - Optional method descriptor or parameter index
|
|
225
|
+
*/
|
|
226
|
+
decorate(target, member, descriptorOrIndex) {
|
|
227
|
+
const targetName = DecoratorFactory.getTargetName(target, member, descriptorOrIndex);
|
|
228
|
+
let meta = reflect_1.Reflector.getOwnMetadata(this.key, target);
|
|
229
|
+
if (meta == null && this.allowInheritance()) {
|
|
230
|
+
// Clone the base metadata so that it won't be accidentally
|
|
231
|
+
// mutated by sub classes
|
|
232
|
+
meta = DecoratorFactory.cloneDeep(reflect_1.Reflector.getMetadata(this.key, target));
|
|
233
|
+
meta = this.mergeWithInherited(meta, target, member, descriptorOrIndex);
|
|
234
|
+
/* istanbul ignore if */
|
|
235
|
+
if (debug.enabled) {
|
|
236
|
+
debug('%s: %j', targetName, meta);
|
|
237
|
+
}
|
|
238
|
+
reflect_1.Reflector.defineMetadata(this.key, meta, target);
|
|
235
239
|
}
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
240
|
+
else {
|
|
241
|
+
meta = this.mergeWithOwn(meta, target, member, descriptorOrIndex);
|
|
242
|
+
/* istanbul ignore if */
|
|
243
|
+
if (debug.enabled) {
|
|
244
|
+
debug('%s: %j', targetName, meta);
|
|
245
|
+
}
|
|
246
|
+
reflect_1.Reflector.defineMetadata(this.key, meta, target);
|
|
243
247
|
}
|
|
244
|
-
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Create a decorator function
|
|
251
|
+
* @param key - Metadata key
|
|
252
|
+
* @param spec - Metadata object from the decorator function
|
|
253
|
+
* @param options - Options for the decorator
|
|
254
|
+
*/
|
|
255
|
+
static _createDecorator(key, spec, options) {
|
|
256
|
+
const inst = new this(key.toString(), spec, options);
|
|
257
|
+
return inst.create();
|
|
258
|
+
}
|
|
259
|
+
static cloneDeep(val) {
|
|
260
|
+
if (typeof val !== 'object')
|
|
261
|
+
return val;
|
|
262
|
+
return lodash_1.default.cloneDeepWith(val, v => {
|
|
263
|
+
if (typeof v !== 'object')
|
|
264
|
+
return v;
|
|
265
|
+
if (v == null)
|
|
266
|
+
return v;
|
|
267
|
+
if (v.constructor != null &&
|
|
268
|
+
!DecoratorFactory._cloneableTypes.includes(v.constructor)) {
|
|
269
|
+
// Do not clone instances of classes/constructors, such as Date
|
|
270
|
+
return v;
|
|
271
|
+
}
|
|
272
|
+
return undefined;
|
|
273
|
+
});
|
|
245
274
|
}
|
|
246
275
|
}
|
|
247
276
|
/**
|
|
248
|
-
*
|
|
249
|
-
* @param key - Metadata key
|
|
250
|
-
* @param spec - Metadata object from the decorator function
|
|
251
|
-
* @param options - Options for the decorator
|
|
277
|
+
* A constant to reference the target of a decoration
|
|
252
278
|
*/
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
279
|
+
DecoratorFactory.TARGET = '__decoratorTarget';
|
|
280
|
+
// See https://github.com/lodash/lodash/blob/master/.internal/baseClone.js
|
|
281
|
+
DecoratorFactory._cloneableTypes = [
|
|
282
|
+
Object,
|
|
283
|
+
Array,
|
|
284
|
+
Set,
|
|
285
|
+
Map,
|
|
286
|
+
RegExp,
|
|
287
|
+
Date,
|
|
288
|
+
Buffer,
|
|
289
|
+
ArrayBuffer,
|
|
290
|
+
Float32Array,
|
|
291
|
+
Float64Array,
|
|
292
|
+
Int8Array,
|
|
293
|
+
Int16Array,
|
|
294
|
+
Int32Array,
|
|
295
|
+
Uint8Array,
|
|
296
|
+
Uint8ClampedArray,
|
|
297
|
+
Uint16Array,
|
|
298
|
+
Uint32Array,
|
|
299
|
+
];
|
|
300
|
+
return DecoratorFactory;
|
|
301
|
+
})();
|
|
274
302
|
exports.DecoratorFactory = DecoratorFactory;
|
|
275
|
-
/**
|
|
276
|
-
* A constant to reference the target of a decoration
|
|
277
|
-
*/
|
|
278
|
-
DecoratorFactory.TARGET = '__decoratorTarget';
|
|
279
|
-
// See https://github.com/lodash/lodash/blob/master/.internal/baseClone.js
|
|
280
|
-
DecoratorFactory._cloneableTypes = [
|
|
281
|
-
Object,
|
|
282
|
-
Array,
|
|
283
|
-
Set,
|
|
284
|
-
Map,
|
|
285
|
-
RegExp,
|
|
286
|
-
Date,
|
|
287
|
-
Buffer,
|
|
288
|
-
ArrayBuffer,
|
|
289
|
-
Float32Array,
|
|
290
|
-
Float64Array,
|
|
291
|
-
Int8Array,
|
|
292
|
-
Int16Array,
|
|
293
|
-
Int32Array,
|
|
294
|
-
Uint8Array,
|
|
295
|
-
Uint8ClampedArray,
|
|
296
|
-
Uint16Array,
|
|
297
|
-
Uint32Array,
|
|
298
|
-
];
|
|
299
303
|
/**
|
|
300
304
|
* Factory for class decorators
|
|
301
305
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorator-factory.js","sourceRoot":"","sources":["../src/decorator-factory.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,kCAAkC;AAClC,+CAA+C;AAC/C,gEAAgE;;;AAEhE,0DAAgC;AAChC,4DAAuB;AACvB,uCAAoC;AAEpC,MAAM,KAAK,GAAG,eAAW,CAAC,6BAA6B,CAAC,CAAC;AA8BzD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAa,gBAAgB;IAY3B;;;;;;OAMG;IACH,YACY,GAAW,EACX,IAAO,EACP,UAA4B,EAAE;;QAF9B,QAAG,GAAH,GAAG,CAAQ;QACX,SAAI,GAAJ,IAAI,CAAG;QACP,YAAO,GAAP,OAAO,CAAuB;QAExC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAC1B;YACE,gBAAgB,EAAE,IAAI;YACtB,cAAc,EAAE,IAAI;SACrB,EACD,OAAO,CACR,CAAC;QACF,MAAM,oBAAoB,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QAC3E,IAAI,CAAC,aAAa,SAAG,IAAI,CAAC,OAAO,CAAC,aAAa,mCAAI,oBAAoB,CAAC;QACxE,IAAI,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE;YAC/B,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC,SAAS,CAAC,IAAI,CAAC,CAA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BAAiB,CAAC;IAC3B,CAAC;IAES,YAAY,CACpB,WAA6B,EAC7B,MAAc,EACd,UAAmB,EACnB,gBAAwD;QAExD,WAAW,GAAG,WAAW,IAAI,EAAE,CAAC;QAChC,WAAW,CAAC,UAAW,CAAC,GAAG,IAAI,CAAC,WAAW,CACzC,WAAW,CAAC,UAAW,CAAC,EACxB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CACnC,CAAC;QACF,OAAO,WAAW,CAAC;IACrB,CAAC;IAEO,WAAW,CAAC,MAAW,EAAE,UAAmB;QAClD,IAAI,CAAC,MAAM,EAAE;YACX,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;gBAC7B,MAAM,GAAG,UAAU,CAAC;aACrB;iBAAM;gBACL,MAAM,GAAG,CAAC,UAAU,CAAC,CAAC;aACvB;SACF;aAAM;YACL,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;gBAC7B,MAAM,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC,CAAC;aAC5B;iBAAM;gBACL,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;aACzB;SACF;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAjDD,kEAiDC"}
|
package/dist/inspector.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
// This file is licensed under the MIT License.
|
|
5
5
|
// License text available at https://opensource.org/licenses/MIT
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.MetadataInspector = void 0;
|
|
7
8
|
const reflect_1 = require("./reflect");
|
|
8
9
|
/**
|
|
9
10
|
* TypeScript reflector without a namespace. The TypeScript compiler can be
|
|
@@ -15,142 +16,145 @@ const TSReflector = new reflect_1.NamespacedReflect();
|
|
|
15
16
|
/**
|
|
16
17
|
* Inspector for metadata applied by decorators
|
|
17
18
|
*/
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
: reflect_1.Reflector.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
: reflect_1.Reflector.
|
|
19
|
+
let MetadataInspector = /** @class */ (() => {
|
|
20
|
+
class MetadataInspector {
|
|
21
|
+
/**
|
|
22
|
+
* Get the metadata associated with the given key for a given class
|
|
23
|
+
* @param key - Metadata key
|
|
24
|
+
* @param target - Class that contains the metadata
|
|
25
|
+
* @param options - Options for inspection
|
|
26
|
+
*/
|
|
27
|
+
static getClassMetadata(key, target, options) {
|
|
28
|
+
return (options === null || options === void 0 ? void 0 : options.ownMetadataOnly) ? reflect_1.Reflector.getOwnMetadata(key.toString(), target)
|
|
29
|
+
: reflect_1.Reflector.getMetadata(key.toString(), target);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Define metadata for the given target
|
|
33
|
+
* @param key - Metadata key
|
|
34
|
+
* @param value - Metadata value
|
|
35
|
+
* @param target - Target for the metadata
|
|
36
|
+
* @param member - Optional property or method name
|
|
37
|
+
*/
|
|
38
|
+
static defineMetadata(key, value, target, member) {
|
|
39
|
+
reflect_1.Reflector.defineMetadata(key.toString(), value, target, member);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Get the metadata associated with the given key for all methods of the
|
|
43
|
+
* target class or prototype
|
|
44
|
+
* @param key - Metadata key
|
|
45
|
+
* @param target - Class for static methods or prototype for instance methods
|
|
46
|
+
* @param options - Options for inspection
|
|
47
|
+
*/
|
|
48
|
+
static getAllMethodMetadata(key, target, options) {
|
|
49
|
+
return (options === null || options === void 0 ? void 0 : options.ownMetadataOnly) ? reflect_1.Reflector.getOwnMetadata(key.toString(), target)
|
|
50
|
+
: reflect_1.Reflector.getMetadata(key.toString(), target);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Get the metadata associated with the given key for a given method of the
|
|
54
|
+
* target class or prototype
|
|
55
|
+
* @param key - Metadata key
|
|
56
|
+
* @param target - Class for static methods or prototype for instance methods
|
|
57
|
+
* @param methodName - Method name. If not present, default to '' to use
|
|
58
|
+
* the constructor
|
|
59
|
+
* @param options - Options for inspection
|
|
60
|
+
*/
|
|
61
|
+
static getMethodMetadata(key, target, methodName, options) {
|
|
62
|
+
methodName = methodName !== null && methodName !== void 0 ? methodName : '';
|
|
63
|
+
const meta = (options === null || options === void 0 ? void 0 : options.ownMetadataOnly) ? reflect_1.Reflector.getOwnMetadata(key.toString(), target)
|
|
64
|
+
: reflect_1.Reflector.getMetadata(key.toString(), target);
|
|
65
|
+
return meta === null || meta === void 0 ? void 0 : meta[methodName];
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Get the metadata associated with the given key for all properties of the
|
|
69
|
+
* target class or prototype
|
|
70
|
+
* @param key - Metadata key
|
|
71
|
+
* @param target - Class for static methods or prototype for instance methods
|
|
72
|
+
* @param options - Options for inspection
|
|
73
|
+
*/
|
|
74
|
+
static getAllPropertyMetadata(key, target, options) {
|
|
75
|
+
return (options === null || options === void 0 ? void 0 : options.ownMetadataOnly) ? reflect_1.Reflector.getOwnMetadata(key.toString(), target)
|
|
76
|
+
: reflect_1.Reflector.getMetadata(key.toString(), target);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Get the metadata associated with the given key for a given property of the
|
|
80
|
+
* target class or prototype
|
|
81
|
+
* @param key - Metadata key
|
|
82
|
+
* @param target - Class for static properties or prototype for instance
|
|
83
|
+
* properties
|
|
84
|
+
* @param propertyName - Property name
|
|
85
|
+
* @param options - Options for inspection
|
|
86
|
+
*/
|
|
87
|
+
static getPropertyMetadata(key, target, propertyName, options) {
|
|
88
|
+
const meta = (options === null || options === void 0 ? void 0 : options.ownMetadataOnly) ? reflect_1.Reflector.getOwnMetadata(key.toString(), target)
|
|
89
|
+
: reflect_1.Reflector.getMetadata(key.toString(), target);
|
|
90
|
+
return meta === null || meta === void 0 ? void 0 : meta[propertyName];
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Get the metadata associated with the given key for all parameters of a
|
|
94
|
+
* given method
|
|
95
|
+
* @param key - Metadata key
|
|
96
|
+
* @param target - Class for static methods or prototype for instance methods
|
|
97
|
+
* @param methodName - Method name. If not present, default to '' to use
|
|
98
|
+
* the constructor
|
|
99
|
+
* @param options - Options for inspection
|
|
100
|
+
*/
|
|
101
|
+
static getAllParameterMetadata(key, target, methodName, options) {
|
|
102
|
+
methodName = methodName !== null && methodName !== void 0 ? methodName : '';
|
|
103
|
+
const meta = (options === null || options === void 0 ? void 0 : options.ownMetadataOnly) ? reflect_1.Reflector.getOwnMetadata(key.toString(), target)
|
|
104
|
+
: reflect_1.Reflector.getMetadata(key.toString(), target);
|
|
105
|
+
return meta === null || meta === void 0 ? void 0 : meta[methodName];
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Get the metadata associated with the given key for a parameter of a given
|
|
109
|
+
* method by index
|
|
110
|
+
* @param key - Metadata key
|
|
111
|
+
* @param target - Class for static methods or prototype for instance methods
|
|
112
|
+
* @param methodName - Method name. If not present, default to '' to use
|
|
113
|
+
* the constructor
|
|
114
|
+
* @param index - Index of the parameter, starting with 0
|
|
115
|
+
* @param options - Options for inspection
|
|
116
|
+
*/
|
|
117
|
+
static getParameterMetadata(key, target, methodName, index, options) {
|
|
118
|
+
methodName = methodName || '';
|
|
119
|
+
const meta = (options === null || options === void 0 ? void 0 : options.ownMetadataOnly) ? reflect_1.Reflector.getOwnMetadata(key.toString(), target)
|
|
120
|
+
: reflect_1.Reflector.getMetadata(key.toString(), target);
|
|
121
|
+
const params = meta === null || meta === void 0 ? void 0 : meta[methodName];
|
|
122
|
+
return params === null || params === void 0 ? void 0 : params[index];
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Get TypeScript design time type for a property
|
|
126
|
+
* @param target - Class or prototype
|
|
127
|
+
* @param propertyName - Property name
|
|
128
|
+
*/
|
|
129
|
+
static getDesignTypeForProperty(target, propertyName) {
|
|
130
|
+
return TSReflector.getMetadata('design:type', target, propertyName);
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Get TypeScript design time type for a method
|
|
134
|
+
* @param target - Class or prototype
|
|
135
|
+
* @param methodName - Method name
|
|
136
|
+
*/
|
|
137
|
+
static getDesignTypeForMethod(target, methodName) {
|
|
138
|
+
const type = TSReflector.getMetadata('design:type', target, methodName);
|
|
139
|
+
const parameterTypes = TSReflector.getMetadata('design:paramtypes', target, methodName);
|
|
140
|
+
const returnType = TSReflector.getMetadata('design:returntype', target, methodName);
|
|
141
|
+
return {
|
|
142
|
+
type,
|
|
143
|
+
parameterTypes,
|
|
144
|
+
returnType,
|
|
145
|
+
};
|
|
146
|
+
}
|
|
49
147
|
}
|
|
50
148
|
/**
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* @param key - Metadata key
|
|
54
|
-
* @param target - Class for static methods or prototype for instance methods
|
|
55
|
-
* @param methodName - Method name. If not present, default to '' to use
|
|
56
|
-
* the constructor
|
|
57
|
-
* @param options - Options for inspection
|
|
149
|
+
* Expose Reflector, which is a wrapper of `Reflect` and it uses `loopback`
|
|
150
|
+
* as the namespace prefix for all metadata keys
|
|
58
151
|
*/
|
|
59
|
-
|
|
60
|
-
methodName = methodName !== null && methodName !== void 0 ? methodName : '';
|
|
61
|
-
const meta = (options === null || options === void 0 ? void 0 : options.ownMetadataOnly) ? reflect_1.Reflector.getOwnMetadata(key.toString(), target)
|
|
62
|
-
: reflect_1.Reflector.getMetadata(key.toString(), target);
|
|
63
|
-
return meta === null || meta === void 0 ? void 0 : meta[methodName];
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Get the metadata associated with the given key for all properties of the
|
|
67
|
-
* target class or prototype
|
|
68
|
-
* @param key - Metadata key
|
|
69
|
-
* @param target - Class for static methods or prototype for instance methods
|
|
70
|
-
* @param options - Options for inspection
|
|
71
|
-
*/
|
|
72
|
-
static getAllPropertyMetadata(key, target, options) {
|
|
73
|
-
return (options === null || options === void 0 ? void 0 : options.ownMetadataOnly) ? reflect_1.Reflector.getOwnMetadata(key.toString(), target)
|
|
74
|
-
: reflect_1.Reflector.getMetadata(key.toString(), target);
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Get the metadata associated with the given key for a given property of the
|
|
78
|
-
* target class or prototype
|
|
79
|
-
* @param key - Metadata key
|
|
80
|
-
* @param target - Class for static properties or prototype for instance
|
|
81
|
-
* properties
|
|
82
|
-
* @param propertyName - Property name
|
|
83
|
-
* @param options - Options for inspection
|
|
84
|
-
*/
|
|
85
|
-
static getPropertyMetadata(key, target, propertyName, options) {
|
|
86
|
-
const meta = (options === null || options === void 0 ? void 0 : options.ownMetadataOnly) ? reflect_1.Reflector.getOwnMetadata(key.toString(), target)
|
|
87
|
-
: reflect_1.Reflector.getMetadata(key.toString(), target);
|
|
88
|
-
return meta === null || meta === void 0 ? void 0 : meta[propertyName];
|
|
89
|
-
}
|
|
152
|
+
MetadataInspector.Reflector = reflect_1.Reflector;
|
|
90
153
|
/**
|
|
91
|
-
*
|
|
92
|
-
* given method
|
|
93
|
-
* @param key - Metadata key
|
|
94
|
-
* @param target - Class for static methods or prototype for instance methods
|
|
95
|
-
* @param methodName - Method name. If not present, default to '' to use
|
|
96
|
-
* the constructor
|
|
97
|
-
* @param options - Options for inspection
|
|
154
|
+
* Expose the reflector for TypeScript design-time metadata
|
|
98
155
|
*/
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
: reflect_1.Reflector.getMetadata(key.toString(), target);
|
|
103
|
-
return meta === null || meta === void 0 ? void 0 : meta[methodName];
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Get the metadata associated with the given key for a parameter of a given
|
|
107
|
-
* method by index
|
|
108
|
-
* @param key - Metadata key
|
|
109
|
-
* @param target - Class for static methods or prototype for instance methods
|
|
110
|
-
* @param methodName - Method name. If not present, default to '' to use
|
|
111
|
-
* the constructor
|
|
112
|
-
* @param index - Index of the parameter, starting with 0
|
|
113
|
-
* @param options - Options for inspection
|
|
114
|
-
*/
|
|
115
|
-
static getParameterMetadata(key, target, methodName, index, options) {
|
|
116
|
-
methodName = methodName || '';
|
|
117
|
-
const meta = (options === null || options === void 0 ? void 0 : options.ownMetadataOnly) ? reflect_1.Reflector.getOwnMetadata(key.toString(), target)
|
|
118
|
-
: reflect_1.Reflector.getMetadata(key.toString(), target);
|
|
119
|
-
const params = meta === null || meta === void 0 ? void 0 : meta[methodName];
|
|
120
|
-
return params === null || params === void 0 ? void 0 : params[index];
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Get TypeScript design time type for a property
|
|
124
|
-
* @param target - Class or prototype
|
|
125
|
-
* @param propertyName - Property name
|
|
126
|
-
*/
|
|
127
|
-
static getDesignTypeForProperty(target, propertyName) {
|
|
128
|
-
return TSReflector.getMetadata('design:type', target, propertyName);
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Get TypeScript design time type for a method
|
|
132
|
-
* @param target - Class or prototype
|
|
133
|
-
* @param methodName - Method name
|
|
134
|
-
*/
|
|
135
|
-
static getDesignTypeForMethod(target, methodName) {
|
|
136
|
-
const type = TSReflector.getMetadata('design:type', target, methodName);
|
|
137
|
-
const parameterTypes = TSReflector.getMetadata('design:paramtypes', target, methodName);
|
|
138
|
-
const returnType = TSReflector.getMetadata('design:returntype', target, methodName);
|
|
139
|
-
return {
|
|
140
|
-
type,
|
|
141
|
-
parameterTypes,
|
|
142
|
-
returnType,
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
}
|
|
156
|
+
MetadataInspector.DesignTimeReflector = TSReflector;
|
|
157
|
+
return MetadataInspector;
|
|
158
|
+
})();
|
|
146
159
|
exports.MetadataInspector = MetadataInspector;
|
|
147
|
-
/**
|
|
148
|
-
* Expose Reflector, which is a wrapper of `Reflect` and it uses `loopback`
|
|
149
|
-
* as the namespace prefix for all metadata keys
|
|
150
|
-
*/
|
|
151
|
-
MetadataInspector.Reflector = reflect_1.Reflector;
|
|
152
|
-
/**
|
|
153
|
-
* Expose the reflector for TypeScript design-time metadata
|
|
154
|
-
*/
|
|
155
|
-
MetadataInspector.DesignTimeReflector = TSReflector;
|
|
156
160
|
//# sourceMappingURL=inspector.js.map
|
package/dist/inspector.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspector.js","sourceRoot":"","sources":["../src/inspector.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,kCAAkC;AAClC,+CAA+C;AAC/C,gEAAgE
|
|
1
|
+
{"version":3,"file":"inspector.js","sourceRoot":"","sources":["../src/inspector.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,kCAAkC;AAClC,+CAA+C;AAC/C,gEAAgE;;;AAEhE,uCAAuD;AAQvD;;;;;GAKG;AACH,MAAM,WAAW,GAAG,IAAI,2BAAiB,EAAE,CAAC;AAgB5C;;GAEG;AACH;IAAA,MAAa,iBAAiB;QAW5B;;;;;WAKG;QACH,MAAM,CAAC,gBAAgB,CACrB,GAAmC,EACnC,MAAgB,EAChB,OAA2B;YAE3B,OAAO,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,EAC7B,CAAC,CAAC,mBAAS,CAAC,cAAc,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,MAAM,CAAC;gBAClD,CAAC,CAAC,mBAAS,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,MAAM,CAAC,CAAC;QACpD,CAAC;QAED;;;;;;WAMG;QACH,MAAM,CAAC,cA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AAP,OAAO,CAAE,eAAe,EACrD,CAAC,CAAC,mBAAS,CAAC,cAAc,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,MAAM,CAAC;gBAClD,CAAC,CAAC,mBAAS,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,MAAM,CAAC,CAAC;YAClD,MAAM,MAAM,GAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAG,UAAU,CAAC,CAAC;YAClC,OAAO,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,KAAK,EAAE;QACzB,CAAC;QAED;;;;WAIG;QACH,MAAM,CAAC,wBAAwB,CAC7B,MAAc,EACd,YAAoB;YAEpB,OAAO,WAAW,CAAC,WAAW,CAAC,aAAa,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;QACtE,CAAC;QAED;;;;WAIG;QACH,MAAM,CAAC,sBAAsB,CAC3B,MAAc,EACd,UAAkB;YAElB,MAAM,IAAI,GAAG,WAAW,CAAC,WAAW,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;YACxE,MAAM,cAAc,GAAG,WAAW,CAAC,WAAW,CAC5C,mBAAmB,EACnB,MAAM,EACN,UAAU,CACX,CAAC;YACF,MAAM,UAAU,GAAG,WAAW,CAAC,WAAW,CACxC,mBAAmB,EACnB,MAAM,EACN,UAAU,CACX,CAAC;YACF,OAAO;gBACL,IAAI;gBACJ,cAAc;gBACd,UAAU;aACX,CAAC;QACJ,CAAC;;IA3MD;;;OAGG;IACa,2BAAS,GAAG,mBAAS,CAAC;IACtC;;OAEG;IACa,qCAAmB,GAAG,WAAW,CAAC;IAoMpD,wBAAC;KAAA;AA7MY,8CAAiB"}
|
package/dist/reflect.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
// This file is licensed under the MIT License.
|
|
5
5
|
// License text available at https://opensource.org/licenses/MIT
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.Reflector = exports.NamespacedReflect = void 0;
|
|
7
8
|
require("reflect-metadata");
|
|
8
9
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
9
10
|
/*
|
package/dist/reflect.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reflect.js","sourceRoot":"","sources":["../src/reflect.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,kCAAkC;AAClC,+CAA+C;AAC/C,gEAAgE
|
|
1
|
+
{"version":3,"file":"reflect.js","sourceRoot":"","sources":["../src/reflect.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,kCAAkC;AAClC,+CAA+C;AAC/C,gEAAgE;;;AAEhE,4BAA0B;AAE1B,uDAAuD;AAEvD;;GAEG;AACH,MAAa,iBAAiB;IAC5B;;OAEG;IACH,YAAoB,SAAkB;QAAlB,cAAS,GAAT,SAAS,CAAS;IAAG,CAAC;IAElC,cAAc,CAAC,WAAmB;QACxC,qDAAqD;QACrD,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,GAAG,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC;IAC3E,CAAC;IAED;;OAEG;IACH,cAAc,CACZ,WAAmB,EACnB,aAAkB,EAClB,MAAc,EACd,WAAoB;QAEpB,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;QAC/C,IAAI,WAAW,EAAE;YACf,OAAO,CAAC,cAAc,CAAC,WAAW,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;SACzE;aAAM;YACL,OAAO,CAAC,cAAc,CAAC,WAAW,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC;SAC5D;IACH,CAAC;IAED;;OAEG;IACH,WAAW,CAAC,WAAmB,EAAE,MAAc,EAAE,WAAoB;QACnE,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;QAC/C,IAAI,WAAW,EAAE;YACf,OAAO,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I,CAAC,SAAS,GAAG,GAAG,CAAC;YACpC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;gBACtB,IAAI,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;oBAC7B,0CAA0C;oBAC1C,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;iBAC1C;aACF;SACF;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAcD,QAAQ,CACN,UAAsE,EACtE,MAAc,EACd,SAA2B,EAC3B,UAA+B;QAE/B,IAAI,SAAS,EAAE;YACb,OAAO,OAAO,CAAC,QAAQ,CACoB,UAAU,EACnD,MAAM,EACN,SAAS,EACT,UAAU,CACX,CAAC;SACH;aAAM;YACL,OAAO,OAAO,CAAC,QAAQ,CAAmB,UAAU,EAAY,MAAM,CAAC,CAAC;SACzE;IACH,CAAC;IAED,QAAQ,CACN,WAAmB,EACnB,aAAkB;QAKlB,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;QAC/C,OAAO,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;IACtD,CAAC;CACF;AAlLD,8CAkLC;AAEY,QAAA,SAAS,GAAG,IAAI,iBAAiB,CAAC,UAAU,CAAC,CAAC"}
|
package/dist/types.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
// This file is licensed under the MIT License.
|
|
5
5
|
// License text available at https://opensource.org/licenses/MIT
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.MetadataAccessor = void 0;
|
|
7
8
|
/**
|
|
8
9
|
* A strongly-typed metadata accessor via reflection
|
|
9
10
|
* @typeParam T - Type of the metadata value
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,kCAAkC;AAClC,+CAA+C;AAC/C,gEAAgE
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,kCAAkC;AAClC,+CAA+C;AAC/C,gEAAgE;;;AAWhE;;;;GAIG;AACH,MAAa,gBAAgB;IAC3B,YAAoC,GAAW;QAAX,QAAG,GAAH,GAAG,CAAQ;IAAG,CAAC;IAEnD,QAAQ;QACN,OAAO,IAAI,CAAC,GAAG,CAAC;IAClB,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAA6B,GAAW;QACnD,OAAO,IAAI,gBAAgB,CAAO,GAAG,CAAC,CAAC;IACzC,CAAC;CACF;AAhBD,4CAgBC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loopback/metadata",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.5",
|
|
4
4
|
"description": "LoopBack's metadata utilities for reflection and decoration",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
5
7
|
"engines": {
|
|
6
8
|
"node": ">=10"
|
|
7
9
|
},
|
|
@@ -21,15 +23,15 @@
|
|
|
21
23
|
"debug": "^4.1.1",
|
|
22
24
|
"lodash": "^4.17.15",
|
|
23
25
|
"reflect-metadata": "^0.1.13",
|
|
24
|
-
"tslib": "^
|
|
26
|
+
"tslib": "^2.0.0"
|
|
25
27
|
},
|
|
26
28
|
"devDependencies": {
|
|
27
|
-
"@loopback/build": "^5.
|
|
28
|
-
"@loopback/eslint-config": "^
|
|
29
|
-
"@loopback/testlab": "^3.1.
|
|
29
|
+
"@loopback/build": "^5.4.1",
|
|
30
|
+
"@loopback/eslint-config": "^7.0.1",
|
|
31
|
+
"@loopback/testlab": "^3.1.5",
|
|
30
32
|
"@types/debug": "^4.1.5",
|
|
31
|
-
"@types/lodash": "^4.14.
|
|
32
|
-
"@types/node": "^10.17.
|
|
33
|
+
"@types/lodash": "^4.14.152",
|
|
34
|
+
"@types/node": "^10.17.24"
|
|
33
35
|
},
|
|
34
36
|
"keywords": [
|
|
35
37
|
"LoopBack",
|
|
@@ -38,8 +40,6 @@
|
|
|
38
40
|
],
|
|
39
41
|
"files": [
|
|
40
42
|
"README.md",
|
|
41
|
-
"index.js",
|
|
42
|
-
"index.d.ts",
|
|
43
43
|
"dist",
|
|
44
44
|
"src",
|
|
45
45
|
"!*/__tests__"
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"url": "https://github.com/strongloop/loopback-next.git",
|
|
53
53
|
"directory": "packages/metadata"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "62aea854bf85c5a5995b59e6908fe5409f7eea96"
|
|
56
56
|
}
|
package/index.d.ts
DELETED
package/index.js
DELETED