@alterior/runtime 3.13.3 → 3.13.4
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/dist/app-options.d.ts +65 -65
- package/dist/app-options.js +26 -26
- package/dist/app-options.js.map +1 -1
- package/dist/application.d.ts +52 -52
- package/dist/application.js +172 -171
- package/dist/application.js.map +1 -1
- package/dist/args.d.ts +7 -7
- package/dist/args.js +13 -13
- package/dist/expose.d.ts +12 -12
- package/dist/expose.d.ts.map +1 -1
- package/dist/expose.js +36 -36
- package/dist/expose.js.map +1 -1
- package/dist/index.d.ts +9 -9
- package/dist/index.js +12 -12
- package/dist/lifecycle.d.ts +24 -24
- package/dist/lifecycle.js +2 -2
- package/dist/module.test.d.ts +1 -1
- package/dist/modules.d.ts +120 -120
- package/dist/modules.js +282 -282
- package/dist/modules.js.map +1 -1
- package/dist/reflector.d.ts +123 -123
- package/dist/reflector.js +306 -306
- package/dist/reflector.js.map +1 -1
- package/dist/roles.service.d.ts +79 -79
- package/dist/roles.service.js +124 -124
- package/dist/roles.service.js.map +1 -1
- package/dist/service.d.ts +24 -24
- package/dist/service.js +19 -19
- package/dist/service.js.map +1 -1
- package/dist/test.d.ts +1 -1
- package/dist.esm/app-options.d.ts +65 -65
- package/dist.esm/app-options.js +23 -23
- package/dist.esm/app-options.js.map +1 -1
- package/dist.esm/application.d.ts +52 -52
- package/dist.esm/application.js +167 -166
- package/dist.esm/application.js.map +1 -1
- package/dist.esm/args.d.ts +7 -7
- package/dist.esm/args.js +9 -9
- package/dist.esm/expose.d.ts +12 -12
- package/dist.esm/expose.d.ts.map +1 -1
- package/dist.esm/expose.js +31 -31
- package/dist.esm/expose.js.map +1 -1
- package/dist.esm/index.d.ts +9 -9
- package/dist.esm/index.js +9 -9
- package/dist.esm/lifecycle.d.ts +24 -24
- package/dist.esm/lifecycle.js +1 -1
- package/dist.esm/module.test.d.ts +1 -1
- package/dist.esm/modules.d.ts +120 -120
- package/dist.esm/modules.js +276 -276
- package/dist.esm/modules.js.map +1 -1
- package/dist.esm/reflector.d.ts +123 -123
- package/dist.esm/reflector.js +296 -296
- package/dist.esm/reflector.js.map +1 -1
- package/dist.esm/roles.service.d.ts +79 -79
- package/dist.esm/roles.service.js +121 -121
- package/dist.esm/roles.service.js.map +1 -1
- package/dist.esm/service.d.ts +24 -24
- package/dist.esm/service.js +15 -15
- package/dist.esm/service.js.map +1 -1
- package/dist.esm/test.d.ts +1 -1
- package/package.json +9 -9
- package/src/application.ts +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -0
- package/tsconfig.json +0 -2
- package/tsconfig.tsbuildinfo +1 -5546
package/dist/reflector.js
CHANGED
|
@@ -1,307 +1,307 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Reflector = exports.Type = exports.Parameter = exports.ConstructorMethod = exports.Field = exports.Method = exports.Property = void 0;
|
|
4
|
-
const annotations_1 = require("@alterior/annotations");
|
|
5
|
-
const common_1 = require("@alterior/common");
|
|
6
|
-
/**
|
|
7
|
-
* Represents a property on a class. A property can also be a field or a method.
|
|
8
|
-
*/
|
|
9
|
-
class Property {
|
|
10
|
-
constructor(_type, _name, _isStatic = false) {
|
|
11
|
-
this._type = _type;
|
|
12
|
-
this._name = _name;
|
|
13
|
-
this._isStatic = _isStatic;
|
|
14
|
-
this._descriptor = null;
|
|
15
|
-
this._visibility = _name[0] === '_' ? 'private' : 'public';
|
|
16
|
-
}
|
|
17
|
-
defineMetadata(key, value) {
|
|
18
|
-
Reflect.defineMetadata(key, value, this.type, this.name);
|
|
19
|
-
}
|
|
20
|
-
getMetadata(key) {
|
|
21
|
-
return Reflect.getMetadata(key, this.type, this.name);
|
|
22
|
-
}
|
|
23
|
-
deleteMetadata(key) {
|
|
24
|
-
Reflect.deleteMetadata(key, this.type, this.name);
|
|
25
|
-
}
|
|
26
|
-
get valueType() {
|
|
27
|
-
if (!this._valueType) {
|
|
28
|
-
let rawType = this.getMetadata('design:type');
|
|
29
|
-
if (!rawType)
|
|
30
|
-
return undefined;
|
|
31
|
-
this._valueType = new Type(rawType);
|
|
32
|
-
}
|
|
33
|
-
return this._valueType;
|
|
34
|
-
}
|
|
35
|
-
get isStatic() {
|
|
36
|
-
return this._isStatic;
|
|
37
|
-
}
|
|
38
|
-
get type() {
|
|
39
|
-
return this._type;
|
|
40
|
-
}
|
|
41
|
-
get annotations() {
|
|
42
|
-
if (!this._annotations) {
|
|
43
|
-
if (this._name === 'constructor')
|
|
44
|
-
this._annotations = annotations_1.Annotations.getClassAnnotations(this._type);
|
|
45
|
-
else
|
|
46
|
-
this._annotations = annotations_1.Annotations.getPropertyAnnotations(this._type, this.name, this.isStatic);
|
|
47
|
-
}
|
|
48
|
-
return this._annotations;
|
|
49
|
-
}
|
|
50
|
-
annotationsOfType(type) {
|
|
51
|
-
return type.filter(this.annotations);
|
|
52
|
-
}
|
|
53
|
-
annotationOfType(type) {
|
|
54
|
-
return type.filter(this.annotations)[0];
|
|
55
|
-
}
|
|
56
|
-
get descriptor() {
|
|
57
|
-
if (!this._descriptor)
|
|
58
|
-
this._descriptor = Object.getOwnPropertyDescriptor(this._type.prototype, this._name);
|
|
59
|
-
return this._descriptor;
|
|
60
|
-
}
|
|
61
|
-
get name() {
|
|
62
|
-
return this._name;
|
|
63
|
-
}
|
|
64
|
-
get visibility() {
|
|
65
|
-
return this._visibility;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
exports.Property = Property;
|
|
69
|
-
/**
|
|
70
|
-
* Represents a method on a class. A method can be a static or instance method, and has a set of parameters
|
|
71
|
-
* and a return type.
|
|
72
|
-
*/
|
|
73
|
-
class Method extends Property {
|
|
74
|
-
constructor(type, name, isStatic = false) {
|
|
75
|
-
super(type, name, isStatic);
|
|
76
|
-
}
|
|
77
|
-
get returnType() {
|
|
78
|
-
if (!this._returnType) {
|
|
79
|
-
let rawType = this.getMetadata('design:returntype');
|
|
80
|
-
if (!rawType)
|
|
81
|
-
return undefined;
|
|
82
|
-
this._returnType = new Type(rawType);
|
|
83
|
-
}
|
|
84
|
-
return this._returnType;
|
|
85
|
-
}
|
|
86
|
-
get parameterTypes() {
|
|
87
|
-
if (!this._parameterTypes) {
|
|
88
|
-
let rawTypes = this.getMetadata('design:paramtypes');
|
|
89
|
-
this._parameterTypes = rawTypes.map(x => x ? new Type(x) : undefined);
|
|
90
|
-
}
|
|
91
|
-
return this._parameterTypes;
|
|
92
|
-
}
|
|
93
|
-
get implementation() {
|
|
94
|
-
return this.type[this.name];
|
|
95
|
-
}
|
|
96
|
-
get parameterNames() {
|
|
97
|
-
if (!this._parameterNames)
|
|
98
|
-
this._parameterNames = (0, common_1.getParameterNames)(this.implementation);
|
|
99
|
-
return this._parameterNames;
|
|
100
|
-
}
|
|
101
|
-
get parameters() {
|
|
102
|
-
let parameterNames = this.parameterNames;
|
|
103
|
-
return [...Array(this.implementation.length).keys()]
|
|
104
|
-
.map(i => new Parameter(this, i, parameterNames[i]));
|
|
105
|
-
}
|
|
106
|
-
get parameterAnnotations() {
|
|
107
|
-
if (!this._parameterAnnotations)
|
|
108
|
-
this._parameterAnnotations = annotations_1.Annotations.getParameterAnnotations(this.type, this.name);
|
|
109
|
-
return this._parameterAnnotations;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
exports.Method = Method;
|
|
113
|
-
class Field extends Property {
|
|
114
|
-
constructor(type, name, isStatic = false) {
|
|
115
|
-
super(type, name, isStatic);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
exports.Field = Field;
|
|
119
|
-
class ConstructorMethod extends Method {
|
|
120
|
-
constructor(type) {
|
|
121
|
-
super(type, 'constructor');
|
|
122
|
-
}
|
|
123
|
-
get parameterAnnotations() {
|
|
124
|
-
if (!this._ctorParameterAnnotations)
|
|
125
|
-
this._ctorParameterAnnotations = annotations_1.Annotations.getConstructorParameterAnnotations(this.type);
|
|
126
|
-
return this._ctorParameterAnnotations;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
exports.ConstructorMethod = ConstructorMethod;
|
|
130
|
-
class Parameter {
|
|
131
|
-
constructor(_method, _index, _name = null) {
|
|
132
|
-
this._method = _method;
|
|
133
|
-
this._index = _index;
|
|
134
|
-
this._name = _name;
|
|
135
|
-
}
|
|
136
|
-
get annotations() {
|
|
137
|
-
return this.method.parameterAnnotations[this.index];
|
|
138
|
-
}
|
|
139
|
-
annotationsOfType(type) {
|
|
140
|
-
return type.filter(this.annotations);
|
|
141
|
-
}
|
|
142
|
-
annotationOfType(type) {
|
|
143
|
-
return type.filter(this.annotations)[0];
|
|
144
|
-
}
|
|
145
|
-
get method() {
|
|
146
|
-
return this._method;
|
|
147
|
-
}
|
|
148
|
-
get valueType() {
|
|
149
|
-
return this.method.parameterTypes[this.index];
|
|
150
|
-
}
|
|
151
|
-
get index() {
|
|
152
|
-
return this._index;
|
|
153
|
-
}
|
|
154
|
-
get name() {
|
|
155
|
-
return this._name;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
exports.Parameter = Parameter;
|
|
159
|
-
/**
|
|
160
|
-
* Represents a class Type and it's metadata
|
|
161
|
-
*/
|
|
162
|
-
class Type {
|
|
163
|
-
constructor(_class) {
|
|
164
|
-
this._class = _class;
|
|
165
|
-
this._staticPropertyNames = [];
|
|
166
|
-
this._staticMethodNames = [];
|
|
167
|
-
this._staticFieldNames = [];
|
|
168
|
-
}
|
|
169
|
-
get name() {
|
|
170
|
-
return this._class.name;
|
|
171
|
-
}
|
|
172
|
-
getMetadata(key) {
|
|
173
|
-
Reflect.getOwnMetadata(key, this._class);
|
|
174
|
-
}
|
|
175
|
-
defineMetadata(key, value) {
|
|
176
|
-
Reflect.defineMetadata(key, value, this._class.prototype);
|
|
177
|
-
}
|
|
178
|
-
deleteMetadata(key) {
|
|
179
|
-
Reflect.deleteMetadata(key, this._class);
|
|
180
|
-
}
|
|
181
|
-
get metadataKeys() {
|
|
182
|
-
if (!this._metadataKeys)
|
|
183
|
-
this._metadataKeys = Reflect.getOwnMetadataKeys(this._class);
|
|
184
|
-
return this._metadataKeys;
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* Get all annotations attached to this class
|
|
188
|
-
*/
|
|
189
|
-
get annotations() {
|
|
190
|
-
if (!this._annotations)
|
|
191
|
-
this._annotations = annotations_1.Annotations.getClassAnnotations(this._class);
|
|
192
|
-
return this._annotations;
|
|
193
|
-
}
|
|
194
|
-
annotationsOfType(type) {
|
|
195
|
-
return type.filter(this.annotations);
|
|
196
|
-
}
|
|
197
|
-
annotationOfType(type) {
|
|
198
|
-
return type.filter(this.annotations)[0];
|
|
199
|
-
}
|
|
200
|
-
fetchPropertyNames() {
|
|
201
|
-
this._propertyNames = Object.getOwnPropertyNames(this._class.prototype);
|
|
202
|
-
for (let propertyName of this._propertyNames) {
|
|
203
|
-
if (typeof this._class.prototype[propertyName] === 'function') {
|
|
204
|
-
this._methodNames.push(propertyName);
|
|
205
|
-
}
|
|
206
|
-
else {
|
|
207
|
-
this._fieldNames.push(propertyName);
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
fetchStaticPropertyNames() {
|
|
212
|
-
this._staticPropertyNames = Object.getOwnPropertyNames(this._class).filter(x => !['length', 'prototype', 'name'].includes(x));
|
|
213
|
-
for (let propertyName of this._staticPropertyNames) {
|
|
214
|
-
if (typeof this._class[propertyName] === 'function') {
|
|
215
|
-
this._staticMethodNames.push(propertyName);
|
|
216
|
-
}
|
|
217
|
-
else {
|
|
218
|
-
this._staticFieldNames.push(propertyName);
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
get staticPropertyNames() {
|
|
223
|
-
if (!this._staticPropertyNames)
|
|
224
|
-
this.fetchStaticPropertyNames();
|
|
225
|
-
return this._staticPropertyNames.slice();
|
|
226
|
-
}
|
|
227
|
-
get staticMethodNames() {
|
|
228
|
-
if (!this._staticPropertyNames)
|
|
229
|
-
this.fetchStaticPropertyNames();
|
|
230
|
-
return this._staticMethodNames.slice();
|
|
231
|
-
}
|
|
232
|
-
get staticFieldNames() {
|
|
233
|
-
if (!this._staticPropertyNames)
|
|
234
|
-
this.fetchStaticPropertyNames();
|
|
235
|
-
return this._staticFieldNames.slice();
|
|
236
|
-
}
|
|
237
|
-
get staticMethods() {
|
|
238
|
-
if (this._staticMethods)
|
|
239
|
-
return this._staticMethods;
|
|
240
|
-
this._staticMethods = this.staticMethodNames.map(methodName => new Method(this._class, methodName, true));
|
|
241
|
-
return this._staticMethods;
|
|
242
|
-
}
|
|
243
|
-
get staticFields() {
|
|
244
|
-
if (this._staticFields)
|
|
245
|
-
return this._staticFields;
|
|
246
|
-
this._staticFields = this.staticFieldNames.map(fieldName => new Field(this._class, fieldName, true));
|
|
247
|
-
return this._staticFields;
|
|
248
|
-
}
|
|
249
|
-
get staticProperties() {
|
|
250
|
-
if (this._staticProperties)
|
|
251
|
-
return this._staticProperties;
|
|
252
|
-
this._staticProperties = [].concat(this.staticFields, this.staticMethods);
|
|
253
|
-
return this._staticProperties;
|
|
254
|
-
}
|
|
255
|
-
get propertyNames() {
|
|
256
|
-
if (!this._propertyNames)
|
|
257
|
-
this.fetchPropertyNames();
|
|
258
|
-
return this._propertyNames.slice();
|
|
259
|
-
}
|
|
260
|
-
get methodNames() {
|
|
261
|
-
if (!this._propertyNames)
|
|
262
|
-
this.fetchPropertyNames();
|
|
263
|
-
return this._methodNames.slice();
|
|
264
|
-
}
|
|
265
|
-
get fieldNames() {
|
|
266
|
-
if (!this._propertyNames)
|
|
267
|
-
this.fetchPropertyNames();
|
|
268
|
-
return this._fieldNames.slice();
|
|
269
|
-
}
|
|
270
|
-
get constructorMethod() {
|
|
271
|
-
if (!this._ctor)
|
|
272
|
-
this._ctor = new ConstructorMethod(this._class);
|
|
273
|
-
return this._ctor;
|
|
274
|
-
}
|
|
275
|
-
get methods() {
|
|
276
|
-
if (this._methods)
|
|
277
|
-
return this._methods;
|
|
278
|
-
this._methods = this.methodNames.map(methodName => new Method(this._class, methodName));
|
|
279
|
-
return this._methods;
|
|
280
|
-
}
|
|
281
|
-
get properties() {
|
|
282
|
-
if (this._properties)
|
|
283
|
-
return this._properties;
|
|
284
|
-
this._properties = [].concat(this.fields, this.methods);
|
|
285
|
-
return this._properties;
|
|
286
|
-
}
|
|
287
|
-
get fields() {
|
|
288
|
-
if (this._fields)
|
|
289
|
-
return this._fields;
|
|
290
|
-
this._fields = this.fieldNames.map(fieldName => new Field(this._class, fieldName));
|
|
291
|
-
return this._fields;
|
|
292
|
-
}
|
|
293
|
-
get base() {
|
|
294
|
-
return new Type(Object.getPrototypeOf(this._class));
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
exports.Type = Type;
|
|
298
|
-
class Reflector {
|
|
299
|
-
getTypeFromInstance(instance) {
|
|
300
|
-
return this.getTypeFromClass(instance.constructor);
|
|
301
|
-
}
|
|
302
|
-
getTypeFromClass(typeClass) {
|
|
303
|
-
return new Type(typeClass);
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
exports.Reflector = Reflector;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Reflector = exports.Type = exports.Parameter = exports.ConstructorMethod = exports.Field = exports.Method = exports.Property = void 0;
|
|
4
|
+
const annotations_1 = require("@alterior/annotations");
|
|
5
|
+
const common_1 = require("@alterior/common");
|
|
6
|
+
/**
|
|
7
|
+
* Represents a property on a class. A property can also be a field or a method.
|
|
8
|
+
*/
|
|
9
|
+
class Property {
|
|
10
|
+
constructor(_type, _name, _isStatic = false) {
|
|
11
|
+
this._type = _type;
|
|
12
|
+
this._name = _name;
|
|
13
|
+
this._isStatic = _isStatic;
|
|
14
|
+
this._descriptor = null;
|
|
15
|
+
this._visibility = _name[0] === '_' ? 'private' : 'public';
|
|
16
|
+
}
|
|
17
|
+
defineMetadata(key, value) {
|
|
18
|
+
Reflect.defineMetadata(key, value, this.type, this.name);
|
|
19
|
+
}
|
|
20
|
+
getMetadata(key) {
|
|
21
|
+
return Reflect.getMetadata(key, this.type, this.name);
|
|
22
|
+
}
|
|
23
|
+
deleteMetadata(key) {
|
|
24
|
+
Reflect.deleteMetadata(key, this.type, this.name);
|
|
25
|
+
}
|
|
26
|
+
get valueType() {
|
|
27
|
+
if (!this._valueType) {
|
|
28
|
+
let rawType = this.getMetadata('design:type');
|
|
29
|
+
if (!rawType)
|
|
30
|
+
return undefined;
|
|
31
|
+
this._valueType = new Type(rawType);
|
|
32
|
+
}
|
|
33
|
+
return this._valueType;
|
|
34
|
+
}
|
|
35
|
+
get isStatic() {
|
|
36
|
+
return this._isStatic;
|
|
37
|
+
}
|
|
38
|
+
get type() {
|
|
39
|
+
return this._type;
|
|
40
|
+
}
|
|
41
|
+
get annotations() {
|
|
42
|
+
if (!this._annotations) {
|
|
43
|
+
if (this._name === 'constructor')
|
|
44
|
+
this._annotations = annotations_1.Annotations.getClassAnnotations(this._type);
|
|
45
|
+
else
|
|
46
|
+
this._annotations = annotations_1.Annotations.getPropertyAnnotations(this._type, this.name, this.isStatic);
|
|
47
|
+
}
|
|
48
|
+
return this._annotations;
|
|
49
|
+
}
|
|
50
|
+
annotationsOfType(type) {
|
|
51
|
+
return type.filter(this.annotations);
|
|
52
|
+
}
|
|
53
|
+
annotationOfType(type) {
|
|
54
|
+
return type.filter(this.annotations)[0];
|
|
55
|
+
}
|
|
56
|
+
get descriptor() {
|
|
57
|
+
if (!this._descriptor)
|
|
58
|
+
this._descriptor = Object.getOwnPropertyDescriptor(this._type.prototype, this._name);
|
|
59
|
+
return this._descriptor;
|
|
60
|
+
}
|
|
61
|
+
get name() {
|
|
62
|
+
return this._name;
|
|
63
|
+
}
|
|
64
|
+
get visibility() {
|
|
65
|
+
return this._visibility;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.Property = Property;
|
|
69
|
+
/**
|
|
70
|
+
* Represents a method on a class. A method can be a static or instance method, and has a set of parameters
|
|
71
|
+
* and a return type.
|
|
72
|
+
*/
|
|
73
|
+
class Method extends Property {
|
|
74
|
+
constructor(type, name, isStatic = false) {
|
|
75
|
+
super(type, name, isStatic);
|
|
76
|
+
}
|
|
77
|
+
get returnType() {
|
|
78
|
+
if (!this._returnType) {
|
|
79
|
+
let rawType = this.getMetadata('design:returntype');
|
|
80
|
+
if (!rawType)
|
|
81
|
+
return undefined;
|
|
82
|
+
this._returnType = new Type(rawType);
|
|
83
|
+
}
|
|
84
|
+
return this._returnType;
|
|
85
|
+
}
|
|
86
|
+
get parameterTypes() {
|
|
87
|
+
if (!this._parameterTypes) {
|
|
88
|
+
let rawTypes = this.getMetadata('design:paramtypes');
|
|
89
|
+
this._parameterTypes = rawTypes.map(x => x ? new Type(x) : undefined);
|
|
90
|
+
}
|
|
91
|
+
return this._parameterTypes;
|
|
92
|
+
}
|
|
93
|
+
get implementation() {
|
|
94
|
+
return this.type[this.name];
|
|
95
|
+
}
|
|
96
|
+
get parameterNames() {
|
|
97
|
+
if (!this._parameterNames)
|
|
98
|
+
this._parameterNames = (0, common_1.getParameterNames)(this.implementation);
|
|
99
|
+
return this._parameterNames;
|
|
100
|
+
}
|
|
101
|
+
get parameters() {
|
|
102
|
+
let parameterNames = this.parameterNames;
|
|
103
|
+
return [...Array(this.implementation.length).keys()]
|
|
104
|
+
.map(i => new Parameter(this, i, parameterNames[i]));
|
|
105
|
+
}
|
|
106
|
+
get parameterAnnotations() {
|
|
107
|
+
if (!this._parameterAnnotations)
|
|
108
|
+
this._parameterAnnotations = annotations_1.Annotations.getParameterAnnotations(this.type, this.name);
|
|
109
|
+
return this._parameterAnnotations;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
exports.Method = Method;
|
|
113
|
+
class Field extends Property {
|
|
114
|
+
constructor(type, name, isStatic = false) {
|
|
115
|
+
super(type, name, isStatic);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
exports.Field = Field;
|
|
119
|
+
class ConstructorMethod extends Method {
|
|
120
|
+
constructor(type) {
|
|
121
|
+
super(type, 'constructor');
|
|
122
|
+
}
|
|
123
|
+
get parameterAnnotations() {
|
|
124
|
+
if (!this._ctorParameterAnnotations)
|
|
125
|
+
this._ctorParameterAnnotations = annotations_1.Annotations.getConstructorParameterAnnotations(this.type);
|
|
126
|
+
return this._ctorParameterAnnotations;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
exports.ConstructorMethod = ConstructorMethod;
|
|
130
|
+
class Parameter {
|
|
131
|
+
constructor(_method, _index, _name = null) {
|
|
132
|
+
this._method = _method;
|
|
133
|
+
this._index = _index;
|
|
134
|
+
this._name = _name;
|
|
135
|
+
}
|
|
136
|
+
get annotations() {
|
|
137
|
+
return this.method.parameterAnnotations[this.index];
|
|
138
|
+
}
|
|
139
|
+
annotationsOfType(type) {
|
|
140
|
+
return type.filter(this.annotations);
|
|
141
|
+
}
|
|
142
|
+
annotationOfType(type) {
|
|
143
|
+
return type.filter(this.annotations)[0];
|
|
144
|
+
}
|
|
145
|
+
get method() {
|
|
146
|
+
return this._method;
|
|
147
|
+
}
|
|
148
|
+
get valueType() {
|
|
149
|
+
return this.method.parameterTypes[this.index];
|
|
150
|
+
}
|
|
151
|
+
get index() {
|
|
152
|
+
return this._index;
|
|
153
|
+
}
|
|
154
|
+
get name() {
|
|
155
|
+
return this._name;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
exports.Parameter = Parameter;
|
|
159
|
+
/**
|
|
160
|
+
* Represents a class Type and it's metadata
|
|
161
|
+
*/
|
|
162
|
+
class Type {
|
|
163
|
+
constructor(_class) {
|
|
164
|
+
this._class = _class;
|
|
165
|
+
this._staticPropertyNames = [];
|
|
166
|
+
this._staticMethodNames = [];
|
|
167
|
+
this._staticFieldNames = [];
|
|
168
|
+
}
|
|
169
|
+
get name() {
|
|
170
|
+
return this._class.name;
|
|
171
|
+
}
|
|
172
|
+
getMetadata(key) {
|
|
173
|
+
Reflect.getOwnMetadata(key, this._class);
|
|
174
|
+
}
|
|
175
|
+
defineMetadata(key, value) {
|
|
176
|
+
Reflect.defineMetadata(key, value, this._class.prototype);
|
|
177
|
+
}
|
|
178
|
+
deleteMetadata(key) {
|
|
179
|
+
Reflect.deleteMetadata(key, this._class);
|
|
180
|
+
}
|
|
181
|
+
get metadataKeys() {
|
|
182
|
+
if (!this._metadataKeys)
|
|
183
|
+
this._metadataKeys = Reflect.getOwnMetadataKeys(this._class);
|
|
184
|
+
return this._metadataKeys;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Get all annotations attached to this class
|
|
188
|
+
*/
|
|
189
|
+
get annotations() {
|
|
190
|
+
if (!this._annotations)
|
|
191
|
+
this._annotations = annotations_1.Annotations.getClassAnnotations(this._class);
|
|
192
|
+
return this._annotations;
|
|
193
|
+
}
|
|
194
|
+
annotationsOfType(type) {
|
|
195
|
+
return type.filter(this.annotations);
|
|
196
|
+
}
|
|
197
|
+
annotationOfType(type) {
|
|
198
|
+
return type.filter(this.annotations)[0];
|
|
199
|
+
}
|
|
200
|
+
fetchPropertyNames() {
|
|
201
|
+
this._propertyNames = Object.getOwnPropertyNames(this._class.prototype);
|
|
202
|
+
for (let propertyName of this._propertyNames) {
|
|
203
|
+
if (typeof this._class.prototype[propertyName] === 'function') {
|
|
204
|
+
this._methodNames.push(propertyName);
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
this._fieldNames.push(propertyName);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
fetchStaticPropertyNames() {
|
|
212
|
+
this._staticPropertyNames = Object.getOwnPropertyNames(this._class).filter(x => !['length', 'prototype', 'name'].includes(x));
|
|
213
|
+
for (let propertyName of this._staticPropertyNames) {
|
|
214
|
+
if (typeof this._class[propertyName] === 'function') {
|
|
215
|
+
this._staticMethodNames.push(propertyName);
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
this._staticFieldNames.push(propertyName);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
get staticPropertyNames() {
|
|
223
|
+
if (!this._staticPropertyNames)
|
|
224
|
+
this.fetchStaticPropertyNames();
|
|
225
|
+
return this._staticPropertyNames.slice();
|
|
226
|
+
}
|
|
227
|
+
get staticMethodNames() {
|
|
228
|
+
if (!this._staticPropertyNames)
|
|
229
|
+
this.fetchStaticPropertyNames();
|
|
230
|
+
return this._staticMethodNames.slice();
|
|
231
|
+
}
|
|
232
|
+
get staticFieldNames() {
|
|
233
|
+
if (!this._staticPropertyNames)
|
|
234
|
+
this.fetchStaticPropertyNames();
|
|
235
|
+
return this._staticFieldNames.slice();
|
|
236
|
+
}
|
|
237
|
+
get staticMethods() {
|
|
238
|
+
if (this._staticMethods)
|
|
239
|
+
return this._staticMethods;
|
|
240
|
+
this._staticMethods = this.staticMethodNames.map(methodName => new Method(this._class, methodName, true));
|
|
241
|
+
return this._staticMethods;
|
|
242
|
+
}
|
|
243
|
+
get staticFields() {
|
|
244
|
+
if (this._staticFields)
|
|
245
|
+
return this._staticFields;
|
|
246
|
+
this._staticFields = this.staticFieldNames.map(fieldName => new Field(this._class, fieldName, true));
|
|
247
|
+
return this._staticFields;
|
|
248
|
+
}
|
|
249
|
+
get staticProperties() {
|
|
250
|
+
if (this._staticProperties)
|
|
251
|
+
return this._staticProperties;
|
|
252
|
+
this._staticProperties = [].concat(this.staticFields, this.staticMethods);
|
|
253
|
+
return this._staticProperties;
|
|
254
|
+
}
|
|
255
|
+
get propertyNames() {
|
|
256
|
+
if (!this._propertyNames)
|
|
257
|
+
this.fetchPropertyNames();
|
|
258
|
+
return this._propertyNames.slice();
|
|
259
|
+
}
|
|
260
|
+
get methodNames() {
|
|
261
|
+
if (!this._propertyNames)
|
|
262
|
+
this.fetchPropertyNames();
|
|
263
|
+
return this._methodNames.slice();
|
|
264
|
+
}
|
|
265
|
+
get fieldNames() {
|
|
266
|
+
if (!this._propertyNames)
|
|
267
|
+
this.fetchPropertyNames();
|
|
268
|
+
return this._fieldNames.slice();
|
|
269
|
+
}
|
|
270
|
+
get constructorMethod() {
|
|
271
|
+
if (!this._ctor)
|
|
272
|
+
this._ctor = new ConstructorMethod(this._class);
|
|
273
|
+
return this._ctor;
|
|
274
|
+
}
|
|
275
|
+
get methods() {
|
|
276
|
+
if (this._methods)
|
|
277
|
+
return this._methods;
|
|
278
|
+
this._methods = this.methodNames.map(methodName => new Method(this._class, methodName));
|
|
279
|
+
return this._methods;
|
|
280
|
+
}
|
|
281
|
+
get properties() {
|
|
282
|
+
if (this._properties)
|
|
283
|
+
return this._properties;
|
|
284
|
+
this._properties = [].concat(this.fields, this.methods);
|
|
285
|
+
return this._properties;
|
|
286
|
+
}
|
|
287
|
+
get fields() {
|
|
288
|
+
if (this._fields)
|
|
289
|
+
return this._fields;
|
|
290
|
+
this._fields = this.fieldNames.map(fieldName => new Field(this._class, fieldName));
|
|
291
|
+
return this._fields;
|
|
292
|
+
}
|
|
293
|
+
get base() {
|
|
294
|
+
return new Type(Object.getPrototypeOf(this._class));
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
exports.Type = Type;
|
|
298
|
+
class Reflector {
|
|
299
|
+
getTypeFromInstance(instance) {
|
|
300
|
+
return this.getTypeFromClass(instance.constructor);
|
|
301
|
+
}
|
|
302
|
+
getTypeFromClass(typeClass) {
|
|
303
|
+
return new Type(typeClass);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
exports.Reflector = Reflector;
|
|
307
307
|
//# sourceMappingURL=reflector.js.map
|
package/dist/reflector.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reflector.js","sourceRoot":"","sources":["../src/reflector.ts"],"names":[],"mappings":";;;AAAA,uDAA6E;AAC7E,6CAAqD;AAQrD;;GAEG;AACH,MAAa,QAAQ;IACjB,YACY,KAAsB,EACtB,KAAc,EACd,YAAsB,KAAK;QAF3B,UAAK,GAAL,KAAK,CAAiB;QACtB,UAA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