assemblerjs 1.1.2 → 1.1.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/index.d.ts +29 -3
- package/dist/index11.js +2 -2
- package/dist/index11.mjs +2 -2
- package/dist/index13.js +2 -2
- package/dist/index13.mjs +2 -2
- package/dist/index16.js +1 -1
- package/dist/index16.mjs +1 -1
- package/dist/index17.js +1 -1
- package/dist/index17.mjs +1 -1
- package/dist/index18.js +1 -1
- package/dist/index18.mjs +1 -1
- package/dist/index19.js +1 -1
- package/dist/index19.mjs +1 -1
- package/dist/index2.js +2 -2
- package/dist/index2.mjs +2 -2
- package/dist/index20.js +1 -1
- package/dist/index20.mjs +1 -1
- package/dist/index21.js +1 -1
- package/dist/index21.mjs +1 -1
- package/dist/index22.js +2 -2
- package/dist/index22.mjs +2 -2
- package/dist/index23.js +2 -2
- package/dist/index23.mjs +2 -2
- package/dist/index24.js +2 -2
- package/dist/index24.mjs +2 -2
- package/dist/index25.js +1 -1
- package/dist/index25.mjs +1 -1
- package/dist/index26.js +1 -1
- package/dist/index26.mjs +1 -1
- package/dist/index27.js +1 -1
- package/dist/index27.mjs +1 -1
- package/dist/index29.js +15 -38
- package/dist/index29.mjs +12 -37
- package/dist/index3.js +1 -1
- package/dist/index3.mjs +1 -1
- package/dist/index30.js +100 -58
- package/dist/index30.mjs +98 -58
- package/dist/index31.js +63 -20
- package/dist/index31.mjs +63 -20
- package/dist/index32.js +23 -57
- package/dist/index32.mjs +23 -57
- package/dist/index33.js +75 -27
- package/dist/index33.mjs +75 -27
- package/dist/index34.js +39 -29
- package/dist/index34.mjs +39 -29
- package/dist/index35.js +32 -18
- package/dist/index35.mjs +32 -15
- package/dist/index36.js +128 -101
- package/dist/index36.mjs +128 -99
- package/dist/index37.js +35 -100
- package/dist/index37.mjs +34 -100
- package/dist/index38.js +18 -24
- package/dist/index38.mjs +18 -24
- package/dist/index39.js +101 -18
- package/dist/index39.mjs +101 -18
- package/dist/index4.js +23 -10
- package/dist/index4.mjs +23 -10
- package/dist/index40.js +25 -25
- package/dist/index40.mjs +25 -24
- package/dist/index41.js +44 -18
- package/dist/index41.mjs +44 -17
- package/dist/index42.js +18 -44
- package/dist/index42.mjs +17 -44
- package/dist/index43.js +26 -191
- package/dist/index43.mjs +25 -191
- package/dist/index44.js +192 -940
- package/dist/index44.mjs +192 -940
- package/dist/index45.js +942 -2
- package/dist/index45.mjs +942 -2
- package/dist/index46.js +2 -2
- package/dist/index46.mjs +2 -2
- package/dist/index47.js +2 -14
- package/dist/index47.mjs +2 -14
- package/dist/index48.js +9 -34
- package/dist/index48.mjs +9 -34
- package/dist/index49.js +32 -55
- package/dist/index49.mjs +32 -54
- package/dist/index50.js +67 -0
- package/dist/index50.mjs +62 -0
- package/package.json +1 -1
package/dist/index44.js
CHANGED
|
@@ -2,946 +2,198 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const core = require('@assemblerjs/core');
|
|
6
|
+
const constants = require('./index28.js');
|
|
7
|
+
const reflection = require('./index29.js');
|
|
8
|
+
const injectableBuilder = require('./index49.js');
|
|
9
|
+
const dependencies = require('./index50.js');
|
|
10
|
+
const helpers = require('./index37.js');
|
|
11
|
+
const hookManager = require('./index33.js');
|
|
12
|
+
const helpers$1 = require('./index3.js');
|
|
13
|
+
const use = require('./index42.js');
|
|
14
|
+
const schema = require('./index30.js');
|
|
15
|
+
const decorators = require('./index11.js');
|
|
16
|
+
const transversalManager = require('./index13.js');
|
|
7
17
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}
|
|
188
|
-
function j(e, t, r, n) {
|
|
189
|
-
for(var i = e.length - 1; i >= 0; --i){
|
|
190
|
-
var a = e[i];
|
|
191
|
-
var u = a(t, r, n);
|
|
192
|
-
if (!D(u) && !C(u)) {
|
|
193
|
-
if (!G(u)) throw new TypeError();
|
|
194
|
-
n = u;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
return n;
|
|
198
|
-
}
|
|
199
|
-
function x(e, t, r) {
|
|
200
|
-
var n = R(e, t, r);
|
|
201
|
-
if (n) return true;
|
|
202
|
-
var i = er(t);
|
|
203
|
-
if (!C(i)) return x(e, i, r);
|
|
204
|
-
return false;
|
|
205
|
-
}
|
|
206
|
-
function R(e, t, r) {
|
|
207
|
-
var n = ef(t, r, false);
|
|
208
|
-
if (D(n)) return false;
|
|
209
|
-
return V(n.OrdinaryHasOwnMetadata(e, t, r));
|
|
210
|
-
}
|
|
211
|
-
function S(e, t, r) {
|
|
212
|
-
var n = R(e, t, r);
|
|
213
|
-
if (n) return K(e, t, r);
|
|
214
|
-
var i = er(t);
|
|
215
|
-
if (!C(i)) return S(e, i, r);
|
|
216
|
-
return undefined;
|
|
217
|
-
}
|
|
218
|
-
function K(e, t, r) {
|
|
219
|
-
var n = ef(t, r, false);
|
|
220
|
-
if (D(n)) return;
|
|
221
|
-
return n.OrdinaryGetOwnMetadata(e, t, r);
|
|
222
|
-
}
|
|
223
|
-
function A(e, t, r, n) {
|
|
224
|
-
var i = ef(r, n, true);
|
|
225
|
-
i.OrdinaryDefineOwnMetadata(e, t, r, n);
|
|
226
|
-
}
|
|
227
|
-
function I(e, t) {
|
|
228
|
-
var r = F(e, t);
|
|
229
|
-
var n = er(e);
|
|
230
|
-
if (n === null) return r;
|
|
231
|
-
var i = I(n, t);
|
|
232
|
-
if (i.length <= 0) return r;
|
|
233
|
-
if (r.length <= 0) return i;
|
|
234
|
-
var a = new d();
|
|
235
|
-
var u = [];
|
|
236
|
-
for(var f = 0, o = r; f < o.length; f++){
|
|
237
|
-
var s = o[f];
|
|
238
|
-
var c = a.has(s);
|
|
239
|
-
if (!c) {
|
|
240
|
-
a.add(s);
|
|
241
|
-
u.push(s);
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
for(var l = 0, h = i; l < h.length; l++){
|
|
245
|
-
var s = h[l];
|
|
246
|
-
var c = a.has(s);
|
|
247
|
-
if (!c) {
|
|
248
|
-
a.add(s);
|
|
249
|
-
u.push(s);
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
return u;
|
|
253
|
-
}
|
|
254
|
-
function F(e, t) {
|
|
255
|
-
var r = ef(e, t, false);
|
|
256
|
-
if (!r) {
|
|
257
|
-
return [];
|
|
258
|
-
}
|
|
259
|
-
return r.OrdinaryOwnMetadataKeys(e, t);
|
|
260
|
-
}
|
|
261
|
-
function z(e) {
|
|
262
|
-
if (e === null) return 1;
|
|
263
|
-
switch(typeof e){
|
|
264
|
-
case "undefined":
|
|
265
|
-
return 0;
|
|
266
|
-
case "boolean":
|
|
267
|
-
return 2;
|
|
268
|
-
case "string":
|
|
269
|
-
return 3;
|
|
270
|
-
case "symbol":
|
|
271
|
-
return 4;
|
|
272
|
-
case "number":
|
|
273
|
-
return 5;
|
|
274
|
-
case "object":
|
|
275
|
-
return e === null ? 1 : 6;
|
|
276
|
-
default:
|
|
277
|
-
return 6;
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
function D(e) {
|
|
281
|
-
return e === undefined;
|
|
282
|
-
}
|
|
283
|
-
function C(e) {
|
|
284
|
-
return e === null;
|
|
285
|
-
}
|
|
286
|
-
function W(e) {
|
|
287
|
-
return typeof e === "symbol";
|
|
288
|
-
}
|
|
289
|
-
function G(e) {
|
|
290
|
-
return typeof e === "object" ? e !== null : typeof e === "function";
|
|
291
|
-
}
|
|
292
|
-
function H(e, t) {
|
|
293
|
-
switch(z(e)){
|
|
294
|
-
case 0:
|
|
295
|
-
return e;
|
|
296
|
-
case 1:
|
|
297
|
-
return e;
|
|
298
|
-
case 2:
|
|
299
|
-
return e;
|
|
300
|
-
case 3:
|
|
301
|
-
return e;
|
|
302
|
-
case 4:
|
|
303
|
-
return e;
|
|
304
|
-
case 5:
|
|
305
|
-
return e;
|
|
306
|
-
}
|
|
307
|
-
var r = "string" ;
|
|
308
|
-
var n = Y(e, i);
|
|
309
|
-
if (n !== undefined) {
|
|
310
|
-
var a = n.call(e, r);
|
|
311
|
-
if (G(a)) throw new TypeError();
|
|
312
|
-
return a;
|
|
313
|
-
}
|
|
314
|
-
return U(e);
|
|
315
|
-
}
|
|
316
|
-
function U(e, t) {
|
|
317
|
-
var i, n, a; {
|
|
318
|
-
var r = e.toString;
|
|
319
|
-
if (J(r)) {
|
|
320
|
-
var n = r.call(e);
|
|
321
|
-
if (!G(n)) return n;
|
|
322
|
-
}
|
|
323
|
-
var i = e.valueOf;
|
|
324
|
-
if (J(i)) {
|
|
325
|
-
var n = i.call(e);
|
|
326
|
-
if (!G(n)) return n;
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
throw new TypeError();
|
|
330
|
-
}
|
|
331
|
-
function V(e) {
|
|
332
|
-
return !!e;
|
|
333
|
-
}
|
|
334
|
-
function L(e) {
|
|
335
|
-
return "" + e;
|
|
336
|
-
}
|
|
337
|
-
function q(e) {
|
|
338
|
-
var t = H(e);
|
|
339
|
-
if (W(t)) return t;
|
|
340
|
-
return L(t);
|
|
341
|
-
}
|
|
342
|
-
function B(e) {
|
|
343
|
-
return Array.isArray ? Array.isArray(e) : e instanceof Object ? e instanceof Array : Object.prototype.toString.call(e) === "[object Array]";
|
|
344
|
-
}
|
|
345
|
-
function J(e) {
|
|
346
|
-
return typeof e === "function";
|
|
347
|
-
}
|
|
348
|
-
function N(e) {
|
|
349
|
-
return typeof e === "function";
|
|
350
|
-
}
|
|
351
|
-
function Q(e) {
|
|
352
|
-
switch(z(e)){
|
|
353
|
-
case 3:
|
|
354
|
-
return true;
|
|
355
|
-
case 4:
|
|
356
|
-
return true;
|
|
357
|
-
default:
|
|
358
|
-
return false;
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
function X(e, t) {
|
|
362
|
-
return e === t || e !== e && t !== t;
|
|
363
|
-
}
|
|
364
|
-
function Y(e, t) {
|
|
365
|
-
var r = e[t];
|
|
366
|
-
if (r === undefined || r === null) return undefined;
|
|
367
|
-
if (!J(r)) throw new TypeError();
|
|
368
|
-
return r;
|
|
369
|
-
}
|
|
370
|
-
function Z(e) {
|
|
371
|
-
var t = Y(e, a);
|
|
372
|
-
if (!J(t)) throw new TypeError();
|
|
373
|
-
var r = t.call(e);
|
|
374
|
-
if (!G(r)) throw new TypeError();
|
|
375
|
-
return r;
|
|
376
|
-
}
|
|
377
|
-
function $(e) {
|
|
378
|
-
return e.value;
|
|
379
|
-
}
|
|
380
|
-
function ee(e) {
|
|
381
|
-
var t = e.next();
|
|
382
|
-
return t.done ? false : t;
|
|
383
|
-
}
|
|
384
|
-
function et(e) {
|
|
385
|
-
var t = e["return"];
|
|
386
|
-
if (t) t.call(e);
|
|
387
|
-
}
|
|
388
|
-
function er(e) {
|
|
389
|
-
var t = Object.getPrototypeOf(e);
|
|
390
|
-
if (typeof e !== "function" || e === c) return t;
|
|
391
|
-
if (t !== c) return t;
|
|
392
|
-
var r = e.prototype;
|
|
393
|
-
var n = r && Object.getPrototypeOf(r);
|
|
394
|
-
if (n == null || n === Object.prototype) return t;
|
|
395
|
-
var i = n.constructor;
|
|
396
|
-
if (typeof i !== "function") return t;
|
|
397
|
-
if (i === e) return t;
|
|
398
|
-
return i;
|
|
399
|
-
}
|
|
400
|
-
function en() {
|
|
401
|
-
var e;
|
|
402
|
-
if (!D(y) && typeof t.Reflect !== "undefined" && !(y in t.Reflect) && typeof t.Reflect.defineMetadata === "function") {
|
|
403
|
-
e = eu(t.Reflect);
|
|
404
|
-
}
|
|
405
|
-
var r;
|
|
406
|
-
var n;
|
|
407
|
-
var i;
|
|
408
|
-
var a = new h();
|
|
409
|
-
var u = {
|
|
410
|
-
registerProvider: f,
|
|
411
|
-
getProvider: s,
|
|
412
|
-
setProvider: v
|
|
413
|
-
};
|
|
414
|
-
return u;
|
|
415
|
-
function f(t) {
|
|
416
|
-
if (!Object.isExtensible(u)) {
|
|
417
|
-
throw new Error("Cannot add provider to a frozen registry.");
|
|
418
|
-
}
|
|
419
|
-
switch(true){
|
|
420
|
-
case e === t:
|
|
421
|
-
break;
|
|
422
|
-
case D(r):
|
|
423
|
-
r = t;
|
|
424
|
-
break;
|
|
425
|
-
case r === t:
|
|
426
|
-
break;
|
|
427
|
-
case D(n):
|
|
428
|
-
n = t;
|
|
429
|
-
break;
|
|
430
|
-
case n === t:
|
|
431
|
-
break;
|
|
432
|
-
default:
|
|
433
|
-
if (i === undefined) i = new d();
|
|
434
|
-
i.add(t);
|
|
435
|
-
break;
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
function o(t, a) {
|
|
439
|
-
if (!D(r)) {
|
|
440
|
-
if (r.isProviderFor(t, a)) return r;
|
|
441
|
-
if (!D(n)) {
|
|
442
|
-
if (n.isProviderFor(t, a)) return r;
|
|
443
|
-
if (!D(i)) {
|
|
444
|
-
var u = Z(i);
|
|
445
|
-
while(true){
|
|
446
|
-
var f = ee(u);
|
|
447
|
-
if (!f) {
|
|
448
|
-
return undefined;
|
|
449
|
-
}
|
|
450
|
-
var o = $(f);
|
|
451
|
-
if (o.isProviderFor(t, a)) {
|
|
452
|
-
et(u);
|
|
453
|
-
return o;
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
if (!D(e) && e.isProviderFor(t, a)) {
|
|
460
|
-
return e;
|
|
461
|
-
}
|
|
462
|
-
return undefined;
|
|
463
|
-
}
|
|
464
|
-
function s(e, t) {
|
|
465
|
-
var r = a.get(e);
|
|
466
|
-
var n;
|
|
467
|
-
if (!D(r)) {
|
|
468
|
-
n = r.get(t);
|
|
469
|
-
}
|
|
470
|
-
if (!D(n)) {
|
|
471
|
-
return n;
|
|
472
|
-
}
|
|
473
|
-
n = o(e, t);
|
|
474
|
-
if (!D(n)) {
|
|
475
|
-
if (D(r)) {
|
|
476
|
-
r = new l();
|
|
477
|
-
a.set(e, r);
|
|
478
|
-
}
|
|
479
|
-
r.set(t, n);
|
|
480
|
-
}
|
|
481
|
-
return n;
|
|
482
|
-
}
|
|
483
|
-
function c(e) {
|
|
484
|
-
if (D(e)) throw new TypeError();
|
|
485
|
-
return r === e || n === e || !D(i) && i.has(e);
|
|
486
|
-
}
|
|
487
|
-
function v(e, t, r) {
|
|
488
|
-
if (!c(r)) {
|
|
489
|
-
throw new Error("Metadata provider not registered.");
|
|
490
|
-
}
|
|
491
|
-
var n = s(e, t);
|
|
492
|
-
if (n !== r) {
|
|
493
|
-
if (!D(n)) {
|
|
494
|
-
return false;
|
|
495
|
-
}
|
|
496
|
-
var i = a.get(e);
|
|
497
|
-
if (D(i)) {
|
|
498
|
-
i = new l();
|
|
499
|
-
a.set(e, i);
|
|
500
|
-
}
|
|
501
|
-
i.set(t, r);
|
|
502
|
-
}
|
|
503
|
-
return true;
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
function ei() {
|
|
507
|
-
var e;
|
|
508
|
-
if (!D(y) && G(t.Reflect) && Object.isExtensible(t.Reflect)) {
|
|
509
|
-
e = t.Reflect[y];
|
|
510
|
-
}
|
|
511
|
-
if (D(e)) {
|
|
512
|
-
e = en();
|
|
513
|
-
}
|
|
514
|
-
if (!D(y) && G(t.Reflect) && Object.isExtensible(t.Reflect)) {
|
|
515
|
-
Object.defineProperty(t.Reflect, y, {
|
|
516
|
-
enumerable: false,
|
|
517
|
-
configurable: false,
|
|
518
|
-
writable: false,
|
|
519
|
-
value: e
|
|
520
|
-
});
|
|
521
|
-
}
|
|
522
|
-
return e;
|
|
523
|
-
}
|
|
524
|
-
function ea(e) {
|
|
525
|
-
var t = new h();
|
|
526
|
-
var r = {
|
|
527
|
-
isProviderFor: function(e, r) {
|
|
528
|
-
var n = t.get(e);
|
|
529
|
-
if (D(n)) return false;
|
|
530
|
-
return n.has(r);
|
|
531
|
-
},
|
|
532
|
-
OrdinaryDefineOwnMetadata: u,
|
|
533
|
-
OrdinaryHasOwnMetadata: i,
|
|
534
|
-
OrdinaryGetOwnMetadata: a,
|
|
535
|
-
OrdinaryOwnMetadataKeys: f,
|
|
536
|
-
OrdinaryDeleteMetadata: o
|
|
537
|
-
};
|
|
538
|
-
v.registerProvider(r);
|
|
539
|
-
return r;
|
|
540
|
-
function n(n, i, a) {
|
|
541
|
-
var u = t.get(n);
|
|
542
|
-
var f = false;
|
|
543
|
-
if (D(u)) {
|
|
544
|
-
if (!a) return undefined;
|
|
545
|
-
u = new l();
|
|
546
|
-
t.set(n, u);
|
|
547
|
-
f = true;
|
|
548
|
-
}
|
|
549
|
-
var o = u.get(i);
|
|
550
|
-
if (D(o)) {
|
|
551
|
-
if (!a) return undefined;
|
|
552
|
-
o = new l();
|
|
553
|
-
u.set(i, o);
|
|
554
|
-
if (!e.setProvider(n, i, r)) {
|
|
555
|
-
u.delete(i);
|
|
556
|
-
if (f) {
|
|
557
|
-
t.delete(n);
|
|
558
|
-
}
|
|
559
|
-
throw new Error("Wrong provider for target.");
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
return o;
|
|
563
|
-
}
|
|
564
|
-
function i(e, t, r) {
|
|
565
|
-
var i = n(t, r, false);
|
|
566
|
-
if (D(i)) return false;
|
|
567
|
-
return V(i.has(e));
|
|
568
|
-
}
|
|
569
|
-
function a(e, t, r) {
|
|
570
|
-
var i = n(t, r, false);
|
|
571
|
-
if (D(i)) return undefined;
|
|
572
|
-
return i.get(e);
|
|
573
|
-
}
|
|
574
|
-
function u(e, t, r, i) {
|
|
575
|
-
var a = n(r, i, true);
|
|
576
|
-
a.set(e, t);
|
|
577
|
-
}
|
|
578
|
-
function f(e, t) {
|
|
579
|
-
var r = [];
|
|
580
|
-
var i = n(e, t, false);
|
|
581
|
-
if (D(i)) return r;
|
|
582
|
-
var a = i.keys();
|
|
583
|
-
var u = Z(a);
|
|
584
|
-
var f = 0;
|
|
585
|
-
while(true){
|
|
586
|
-
var o = ee(u);
|
|
587
|
-
if (!o) {
|
|
588
|
-
r.length = f;
|
|
589
|
-
return r;
|
|
590
|
-
}
|
|
591
|
-
var s = $(o);
|
|
592
|
-
try {
|
|
593
|
-
r[f] = s;
|
|
594
|
-
} catch (e) {
|
|
595
|
-
try {
|
|
596
|
-
et(u);
|
|
597
|
-
} finally{
|
|
598
|
-
throw e;
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
f++;
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
function o(e, r, i) {
|
|
605
|
-
var a = n(r, i, false);
|
|
606
|
-
if (D(a)) return false;
|
|
607
|
-
if (!a.delete(e)) return false;
|
|
608
|
-
if (a.size === 0) {
|
|
609
|
-
var u = t.get(r);
|
|
610
|
-
if (!D(u)) {
|
|
611
|
-
u.delete(i);
|
|
612
|
-
if (u.size === 0) {
|
|
613
|
-
t.delete(u);
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
return true;
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
function eu(e) {
|
|
621
|
-
var t = e.defineMetadata, r = e.hasOwnMetadata, n = e.getOwnMetadata, i = e.getOwnMetadataKeys, a = e.deleteMetadata;
|
|
622
|
-
var u = new h();
|
|
623
|
-
var f = {
|
|
624
|
-
isProviderFor: function(e, t) {
|
|
625
|
-
var r = u.get(e);
|
|
626
|
-
if (!D(r) && r.has(t)) {
|
|
627
|
-
return true;
|
|
628
|
-
}
|
|
629
|
-
if (i(e, t).length) {
|
|
630
|
-
if (D(r)) {
|
|
631
|
-
r = new d();
|
|
632
|
-
u.set(e, r);
|
|
633
|
-
}
|
|
634
|
-
r.add(t);
|
|
635
|
-
return true;
|
|
636
|
-
}
|
|
637
|
-
return false;
|
|
638
|
-
},
|
|
639
|
-
OrdinaryDefineOwnMetadata: t,
|
|
640
|
-
OrdinaryHasOwnMetadata: r,
|
|
641
|
-
OrdinaryGetOwnMetadata: n,
|
|
642
|
-
OrdinaryOwnMetadataKeys: i,
|
|
643
|
-
OrdinaryDeleteMetadata: a
|
|
644
|
-
};
|
|
645
|
-
return f;
|
|
646
|
-
}
|
|
647
|
-
function ef(e, t, r) {
|
|
648
|
-
var n = v.getProvider(e, t);
|
|
649
|
-
if (!D(n)) {
|
|
650
|
-
return n;
|
|
651
|
-
}
|
|
652
|
-
if (r) {
|
|
653
|
-
if (v.setProvider(e, t, p)) {
|
|
654
|
-
return p;
|
|
655
|
-
}
|
|
656
|
-
throw new Error("Illegal state.");
|
|
657
|
-
}
|
|
658
|
-
return undefined;
|
|
659
|
-
}
|
|
660
|
-
function eo() {
|
|
661
|
-
var e = {};
|
|
662
|
-
var t = [];
|
|
663
|
-
var r = function() {
|
|
664
|
-
function e(e, t, r) {
|
|
665
|
-
this._index = 0;
|
|
666
|
-
this._keys = e;
|
|
667
|
-
this._values = t;
|
|
668
|
-
this._selector = r;
|
|
669
|
-
}
|
|
670
|
-
e.prototype["@@iterator"] = function() {
|
|
671
|
-
return this;
|
|
672
|
-
};
|
|
673
|
-
e.prototype[a] = function() {
|
|
674
|
-
return this;
|
|
675
|
-
};
|
|
676
|
-
e.prototype.next = function() {
|
|
677
|
-
var e = this._index;
|
|
678
|
-
if (e >= 0 && e < this._keys.length) {
|
|
679
|
-
var r = this._selector(this._keys[e], this._values[e]);
|
|
680
|
-
if (e + 1 >= this._keys.length) {
|
|
681
|
-
this._index = -1;
|
|
682
|
-
this._keys = t;
|
|
683
|
-
this._values = t;
|
|
684
|
-
} else {
|
|
685
|
-
this._index++;
|
|
686
|
-
}
|
|
687
|
-
return {
|
|
688
|
-
value: r,
|
|
689
|
-
done: false
|
|
690
|
-
};
|
|
691
|
-
}
|
|
692
|
-
return {
|
|
693
|
-
value: undefined,
|
|
694
|
-
done: true
|
|
695
|
-
};
|
|
696
|
-
};
|
|
697
|
-
e.prototype.throw = function(e) {
|
|
698
|
-
if (this._index >= 0) {
|
|
699
|
-
this._index = -1;
|
|
700
|
-
this._keys = t;
|
|
701
|
-
this._values = t;
|
|
702
|
-
}
|
|
703
|
-
throw e;
|
|
704
|
-
};
|
|
705
|
-
e.prototype.return = function(e) {
|
|
706
|
-
if (this._index >= 0) {
|
|
707
|
-
this._index = -1;
|
|
708
|
-
this._keys = t;
|
|
709
|
-
this._values = t;
|
|
710
|
-
}
|
|
711
|
-
return {
|
|
712
|
-
value: e,
|
|
713
|
-
done: true
|
|
714
|
-
};
|
|
715
|
-
};
|
|
716
|
-
return e;
|
|
717
|
-
}();
|
|
718
|
-
var n = function() {
|
|
719
|
-
function t() {
|
|
720
|
-
this._keys = [];
|
|
721
|
-
this._values = [];
|
|
722
|
-
this._cacheKey = e;
|
|
723
|
-
this._cacheIndex = -2;
|
|
724
|
-
}
|
|
725
|
-
Object.defineProperty(t.prototype, "size", {
|
|
726
|
-
get: function() {
|
|
727
|
-
return this._keys.length;
|
|
728
|
-
},
|
|
729
|
-
enumerable: true,
|
|
730
|
-
configurable: true
|
|
731
|
-
});
|
|
732
|
-
t.prototype.has = function(e) {
|
|
733
|
-
return this._find(e, false) >= 0;
|
|
734
|
-
};
|
|
735
|
-
t.prototype.get = function(e) {
|
|
736
|
-
var t = this._find(e, false);
|
|
737
|
-
return t >= 0 ? this._values[t] : undefined;
|
|
738
|
-
};
|
|
739
|
-
t.prototype.set = function(e, t) {
|
|
740
|
-
var r = this._find(e, true);
|
|
741
|
-
this._values[r] = t;
|
|
742
|
-
return this;
|
|
743
|
-
};
|
|
744
|
-
t.prototype.delete = function(t) {
|
|
745
|
-
var r = this._find(t, false);
|
|
746
|
-
if (r >= 0) {
|
|
747
|
-
var n = this._keys.length;
|
|
748
|
-
for(var i = r + 1; i < n; i++){
|
|
749
|
-
this._keys[i - 1] = this._keys[i];
|
|
750
|
-
this._values[i - 1] = this._values[i];
|
|
751
|
-
}
|
|
752
|
-
this._keys.length--;
|
|
753
|
-
this._values.length--;
|
|
754
|
-
if (X(t, this._cacheKey)) {
|
|
755
|
-
this._cacheKey = e;
|
|
756
|
-
this._cacheIndex = -2;
|
|
757
|
-
}
|
|
758
|
-
return true;
|
|
759
|
-
}
|
|
760
|
-
return false;
|
|
761
|
-
};
|
|
762
|
-
t.prototype.clear = function() {
|
|
763
|
-
this._keys.length = 0;
|
|
764
|
-
this._values.length = 0;
|
|
765
|
-
this._cacheKey = e;
|
|
766
|
-
this._cacheIndex = -2;
|
|
767
|
-
};
|
|
768
|
-
t.prototype.keys = function() {
|
|
769
|
-
return new r(this._keys, this._values, i);
|
|
770
|
-
};
|
|
771
|
-
t.prototype.values = function() {
|
|
772
|
-
return new r(this._keys, this._values, u);
|
|
773
|
-
};
|
|
774
|
-
t.prototype.entries = function() {
|
|
775
|
-
return new r(this._keys, this._values, f);
|
|
776
|
-
};
|
|
777
|
-
t.prototype["@@iterator"] = function() {
|
|
778
|
-
return this.entries();
|
|
779
|
-
};
|
|
780
|
-
t.prototype[a] = function() {
|
|
781
|
-
return this.entries();
|
|
782
|
-
};
|
|
783
|
-
t.prototype._find = function(e, t) {
|
|
784
|
-
if (!X(this._cacheKey, e)) {
|
|
785
|
-
this._cacheIndex = -1;
|
|
786
|
-
for(var r = 0; r < this._keys.length; r++){
|
|
787
|
-
if (X(this._keys[r], e)) {
|
|
788
|
-
this._cacheIndex = r;
|
|
789
|
-
break;
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
if (this._cacheIndex < 0 && t) {
|
|
794
|
-
this._cacheIndex = this._keys.length;
|
|
795
|
-
this._keys.push(e);
|
|
796
|
-
this._values.push(undefined);
|
|
797
|
-
}
|
|
798
|
-
return this._cacheIndex;
|
|
799
|
-
};
|
|
800
|
-
return t;
|
|
801
|
-
}();
|
|
802
|
-
return n;
|
|
803
|
-
function i(e, t) {
|
|
804
|
-
return e;
|
|
805
|
-
}
|
|
806
|
-
function u(e, t) {
|
|
807
|
-
return t;
|
|
808
|
-
}
|
|
809
|
-
function f(e, t) {
|
|
810
|
-
return [
|
|
811
|
-
e,
|
|
812
|
-
t
|
|
813
|
-
];
|
|
814
|
-
}
|
|
815
|
-
}
|
|
816
|
-
function es() {
|
|
817
|
-
var e = function() {
|
|
818
|
-
function e() {
|
|
819
|
-
this._map = new l();
|
|
820
|
-
}
|
|
821
|
-
Object.defineProperty(e.prototype, "size", {
|
|
822
|
-
get: function() {
|
|
823
|
-
return this._map.size;
|
|
824
|
-
},
|
|
825
|
-
enumerable: true,
|
|
826
|
-
configurable: true
|
|
827
|
-
});
|
|
828
|
-
e.prototype.has = function(e) {
|
|
829
|
-
return this._map.has(e);
|
|
830
|
-
};
|
|
831
|
-
e.prototype.add = function(e) {
|
|
832
|
-
return this._map.set(e, e), this;
|
|
833
|
-
};
|
|
834
|
-
e.prototype.delete = function(e) {
|
|
835
|
-
return this._map.delete(e);
|
|
836
|
-
};
|
|
837
|
-
e.prototype.clear = function() {
|
|
838
|
-
this._map.clear();
|
|
839
|
-
};
|
|
840
|
-
e.prototype.keys = function() {
|
|
841
|
-
return this._map.keys();
|
|
842
|
-
};
|
|
843
|
-
e.prototype.values = function() {
|
|
844
|
-
return this._map.keys();
|
|
845
|
-
};
|
|
846
|
-
e.prototype.entries = function() {
|
|
847
|
-
return this._map.entries();
|
|
848
|
-
};
|
|
849
|
-
e.prototype["@@iterator"] = function() {
|
|
850
|
-
return this.keys();
|
|
851
|
-
};
|
|
852
|
-
e.prototype[a] = function() {
|
|
853
|
-
return this.keys();
|
|
854
|
-
};
|
|
855
|
-
return e;
|
|
856
|
-
}();
|
|
857
|
-
return e;
|
|
858
|
-
}
|
|
859
|
-
function ec() {
|
|
860
|
-
var e = 16;
|
|
861
|
-
var t = s.create();
|
|
862
|
-
var n = i();
|
|
863
|
-
return function() {
|
|
864
|
-
function e() {
|
|
865
|
-
this._key = i();
|
|
866
|
-
}
|
|
867
|
-
e.prototype.has = function(e) {
|
|
868
|
-
var t = a(e, false);
|
|
869
|
-
return t !== undefined ? s.has(t, this._key) : false;
|
|
870
|
-
};
|
|
871
|
-
e.prototype.get = function(e) {
|
|
872
|
-
var t = a(e, false);
|
|
873
|
-
return t !== undefined ? s.get(t, this._key) : undefined;
|
|
874
|
-
};
|
|
875
|
-
e.prototype.set = function(e, t) {
|
|
876
|
-
var r = a(e, true);
|
|
877
|
-
r[this._key] = t;
|
|
878
|
-
return this;
|
|
879
|
-
};
|
|
880
|
-
e.prototype.delete = function(e) {
|
|
881
|
-
var t = a(e, false);
|
|
882
|
-
return t !== undefined ? delete t[this._key] : false;
|
|
883
|
-
};
|
|
884
|
-
e.prototype.clear = function() {
|
|
885
|
-
this._key = i();
|
|
886
|
-
};
|
|
887
|
-
return e;
|
|
888
|
-
}();
|
|
889
|
-
function i() {
|
|
890
|
-
var e;
|
|
891
|
-
do e = "@@WeakMap@@" + o();
|
|
892
|
-
while (s.has(t, e))
|
|
893
|
-
t[e] = true;
|
|
894
|
-
return e;
|
|
895
|
-
}
|
|
896
|
-
function a(e, t) {
|
|
897
|
-
if (!r.call(e, n)) {
|
|
898
|
-
if (!t) return undefined;
|
|
899
|
-
Object.defineProperty(e, n, {
|
|
900
|
-
value: s.create()
|
|
901
|
-
});
|
|
902
|
-
}
|
|
903
|
-
return e[n];
|
|
904
|
-
}
|
|
905
|
-
function u(e, t) {
|
|
906
|
-
for(var r = 0; r < t; ++r)e[r] = Math.random() * 0xff | 0;
|
|
907
|
-
return e;
|
|
908
|
-
}
|
|
909
|
-
function f(e) {
|
|
910
|
-
if (typeof Uint8Array === "function") {
|
|
911
|
-
var t = new Uint8Array(e);
|
|
912
|
-
if (typeof crypto !== "undefined") {
|
|
913
|
-
crypto.getRandomValues(t);
|
|
914
|
-
} else if (typeof msCrypto !== "undefined") {
|
|
915
|
-
msCrypto.getRandomValues(t);
|
|
916
|
-
} else {
|
|
917
|
-
u(t, e);
|
|
918
|
-
}
|
|
919
|
-
return t;
|
|
920
|
-
}
|
|
921
|
-
return u(new Array(e), e);
|
|
922
|
-
}
|
|
923
|
-
function o() {
|
|
924
|
-
var t = f(e);
|
|
925
|
-
t[6] = t[6] & 0x4f | 0x40;
|
|
926
|
-
t[8] = t[8] & 0xbf | 0x80;
|
|
927
|
-
var r = "";
|
|
928
|
-
for(var n = 0; n < e; ++n){
|
|
929
|
-
var i = t[n];
|
|
930
|
-
if (n === 4 || n === 6 || n === 8) r += "-";
|
|
931
|
-
if (i < 16) r += "0";
|
|
932
|
-
r += i.toString(16).toLowerCase();
|
|
933
|
-
}
|
|
934
|
-
return r;
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
|
-
function el(e) {
|
|
938
|
-
e.__ = undefined;
|
|
939
|
-
delete e.__;
|
|
940
|
-
return e;
|
|
941
|
-
}
|
|
942
|
-
});
|
|
943
|
-
})(e || (e = {}));
|
|
944
|
-
return Reflect.__exports;
|
|
18
|
+
class Injectable {
|
|
19
|
+
static of(t, e, s) {
|
|
20
|
+
return new Injectable(t, e, s);
|
|
21
|
+
}
|
|
22
|
+
resolveTransversalToInjection(t) {
|
|
23
|
+
if (t.length === 1) {
|
|
24
|
+
return [
|
|
25
|
+
t[0]
|
|
26
|
+
];
|
|
27
|
+
} else if (t.length === 2) {
|
|
28
|
+
const s = t[1];
|
|
29
|
+
if (core.isClass(s)) {
|
|
30
|
+
return [
|
|
31
|
+
t[0],
|
|
32
|
+
t[1]
|
|
33
|
+
];
|
|
34
|
+
} else {
|
|
35
|
+
return [
|
|
36
|
+
t[0],
|
|
37
|
+
t[1]
|
|
38
|
+
];
|
|
39
|
+
}
|
|
40
|
+
} else {
|
|
41
|
+
return [
|
|
42
|
+
t[0],
|
|
43
|
+
t[1],
|
|
44
|
+
t[2]
|
|
45
|
+
];
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
dispose() {
|
|
49
|
+
if (this.singletonInstance) {
|
|
50
|
+
helpers.unregisterEvents(this, this.singletonInstance);
|
|
51
|
+
hookManager.HookManager.callHook(this.singletonInstance, 'onDispose', this.publicContext, this.mergedConfiguration || this.configuration);
|
|
52
|
+
core.clearInstance(this.singletonInstance, this.concrete);
|
|
53
|
+
}
|
|
54
|
+
core.clearInstance(this, Injectable);
|
|
55
|
+
}
|
|
56
|
+
build(t) {
|
|
57
|
+
return this.builder.build(t);
|
|
58
|
+
}
|
|
59
|
+
setSingletonInstance(t, e) {
|
|
60
|
+
this.singletonInstance = t;
|
|
61
|
+
if (e) {
|
|
62
|
+
this.mergedConfiguration = e;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
get definition() {
|
|
66
|
+
if (!this.cachedDefinition) {
|
|
67
|
+
if (!this.concrete) {
|
|
68
|
+
this.cachedDefinition = {};
|
|
69
|
+
} else {
|
|
70
|
+
this.cachedDefinition = schema.getDefinition(this.concrete) || {};
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return this.cachedDefinition;
|
|
74
|
+
}
|
|
75
|
+
get isSingleton() {
|
|
76
|
+
return this.definition.singleton ?? false;
|
|
77
|
+
}
|
|
78
|
+
get dependencies() {
|
|
79
|
+
return this.dependenciesIds;
|
|
80
|
+
}
|
|
81
|
+
get singleton() {
|
|
82
|
+
return this.singletonInstance;
|
|
83
|
+
}
|
|
84
|
+
get injections() {
|
|
85
|
+
if (this.cachedInjections === undefined) {
|
|
86
|
+
this.cachedInjections = this.definition.inject || [];
|
|
87
|
+
}
|
|
88
|
+
return this.cachedInjections;
|
|
89
|
+
}
|
|
90
|
+
get objects() {
|
|
91
|
+
if (this.cachedObjects === undefined) {
|
|
92
|
+
this.cachedObjects = this.definition.use || [];
|
|
93
|
+
}
|
|
94
|
+
return this.cachedObjects;
|
|
95
|
+
}
|
|
96
|
+
get transversals() {
|
|
97
|
+
if (this.cachedTransversals === undefined) {
|
|
98
|
+
this.cachedTransversals = this.definition.engage || [];
|
|
99
|
+
}
|
|
100
|
+
return this.cachedTransversals;
|
|
101
|
+
}
|
|
102
|
+
get tags() {
|
|
103
|
+
if (this.cachedTags === undefined) {
|
|
104
|
+
this.cachedTags = this.definition.tags || [];
|
|
105
|
+
}
|
|
106
|
+
return Array.isArray(this.cachedTags) ? this.cachedTags : [
|
|
107
|
+
this.cachedTags
|
|
108
|
+
];
|
|
109
|
+
}
|
|
110
|
+
get globals() {
|
|
111
|
+
if (this.cachedGlobals === undefined) {
|
|
112
|
+
this.cachedGlobals = this.definition.global;
|
|
113
|
+
}
|
|
114
|
+
return this.cachedGlobals;
|
|
115
|
+
}
|
|
116
|
+
get events() {
|
|
117
|
+
if (this.cachedEvents === undefined) {
|
|
118
|
+
this.cachedEvents = this.definition.events || [];
|
|
119
|
+
}
|
|
120
|
+
return this.cachedEvents;
|
|
121
|
+
}
|
|
122
|
+
constructor(t, e, o){
|
|
123
|
+
this.privateContext = e;
|
|
124
|
+
this.publicContext = o;
|
|
125
|
+
this.dependenciesIds = [];
|
|
126
|
+
this.identifier = t.identifier;
|
|
127
|
+
this.concrete = t.concrete;
|
|
128
|
+
this.factory = t.factory;
|
|
129
|
+
this.configuration = t.configuration;
|
|
130
|
+
if (process.env.NODE_ENV !== 'production' && this.concrete && !helpers$1.isAssemblage(this.concrete)) {
|
|
131
|
+
throw new Error(`Class '${this.concrete.name}' is not an Assemblage.`);
|
|
132
|
+
}
|
|
133
|
+
this.builder = new injectableBuilder.InjectableBuilder(this);
|
|
134
|
+
if (this.concrete) {
|
|
135
|
+
reflection.defineCustomMetadata(constants.ReflectValue.AssemblageContext, this.publicContext, this.concrete);
|
|
136
|
+
for (const t of this.transversals){
|
|
137
|
+
const e = this.resolveTransversalToInjection(t);
|
|
138
|
+
this.privateContext.register(e);
|
|
139
|
+
}
|
|
140
|
+
for (const t of this.injections){
|
|
141
|
+
const [e] = t;
|
|
142
|
+
if (decorators.isTransversal(e)) {
|
|
143
|
+
this.privateContext.register(t);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
for (const t of this.injections){
|
|
147
|
+
const [e] = t;
|
|
148
|
+
if (!decorators.isTransversal(e)) {
|
|
149
|
+
this.privateContext.register(t);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
for (const t of this.objects){
|
|
153
|
+
const [e, s] = t;
|
|
154
|
+
const i = use.isFactory(s);
|
|
155
|
+
if (typeof e === 'string' || typeof e === 'symbol') {
|
|
156
|
+
const t = i ? s() : s;
|
|
157
|
+
this.privateContext.use(e, t);
|
|
158
|
+
continue;
|
|
159
|
+
}
|
|
160
|
+
if (this.isSingleton && i) {
|
|
161
|
+
const t = s();
|
|
162
|
+
this.privateContext.register([
|
|
163
|
+
e,
|
|
164
|
+
t
|
|
165
|
+
], true);
|
|
166
|
+
} else {
|
|
167
|
+
this.privateContext.register(t, true);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
const t = transversalManager.TransversalManager.getInstance(this.publicContext);
|
|
171
|
+
for (const e of this.transversals){
|
|
172
|
+
t.registerTransversal(e, this.privateContext);
|
|
173
|
+
}
|
|
174
|
+
for (const e of this.injections){
|
|
175
|
+
const [s] = e;
|
|
176
|
+
if (decorators.isTransversal(s)) {
|
|
177
|
+
const i = e.length > 1 ? e : [
|
|
178
|
+
s
|
|
179
|
+
];
|
|
180
|
+
t.registerTransversal(i, this.privateContext);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
this.dependenciesIds = this.concrete ? dependencies.resolveDependencies(this.concrete) : [];
|
|
184
|
+
if (this.globals) {
|
|
185
|
+
for(const t in this.globals){
|
|
186
|
+
this.privateContext.addGlobal(t, this.globals[t]);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
if (t.instance) {
|
|
191
|
+
this.singletonInstance = t.instance;
|
|
192
|
+
} else if (t.factory) {
|
|
193
|
+
const e = t.factory();
|
|
194
|
+
this.singletonInstance = e;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
945
197
|
}
|
|
946
198
|
|
|
947
|
-
exports.
|
|
199
|
+
exports.Injectable = Injectable;
|