@adimm/x-injection 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -6
- package/dist/index.cjs +115 -90
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +86 -47
- package/dist/index.d.ts +86 -47
- package/dist/index.js +118 -97
- package/dist/index.js.map +1 -1
- package/package.json +9 -5
package/dist/index.js
CHANGED
|
@@ -1,66 +1,70 @@
|
|
|
1
1
|
var e = Object.defineProperty, i = (i, t) => e(i, "name", {
|
|
2
2
|
value: t,
|
|
3
3
|
configurable: !0
|
|
4
|
-
}), t = "GlobalAppModule"
|
|
4
|
+
}), t = "GlobalAppModule";
|
|
5
5
|
|
|
6
|
-
import { injectable as
|
|
6
|
+
import { injectable as n } from "inversify";
|
|
7
7
|
|
|
8
|
-
var r, s
|
|
8
|
+
var o, r, s = function(e) {
|
|
9
9
|
return e[e.Singleton = 0] = "Singleton", e[e.Transient = 1] = "Transient", e[e.Request = 2] = "Request",
|
|
10
10
|
e;
|
|
11
11
|
}({});
|
|
12
12
|
|
|
13
|
-
function
|
|
13
|
+
function d(e) {
|
|
14
14
|
switch (e) {
|
|
15
|
-
case
|
|
15
|
+
case s.Singleton:
|
|
16
16
|
return "Singleton";
|
|
17
17
|
|
|
18
|
-
case
|
|
18
|
+
case s.Transient:
|
|
19
19
|
return "Transient";
|
|
20
20
|
|
|
21
|
-
case
|
|
21
|
+
case s.Request:
|
|
22
22
|
return "Request";
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
function
|
|
26
|
+
function c(e) {
|
|
27
27
|
switch (e) {
|
|
28
28
|
case "Singleton":
|
|
29
|
-
return
|
|
29
|
+
return s.Singleton;
|
|
30
30
|
|
|
31
31
|
case "Transient":
|
|
32
|
-
return
|
|
32
|
+
return s.Transient;
|
|
33
33
|
|
|
34
34
|
case "Request":
|
|
35
|
-
return
|
|
35
|
+
return s.Request;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
i(
|
|
39
|
+
i(d, "injectionScopeToBindingScope"), i(c, "bindingScopeToInjectionScope");
|
|
40
40
|
|
|
41
|
-
import { getClassMetadata as
|
|
41
|
+
import { getClassMetadata as a } from "@inversifyjs/core";
|
|
42
42
|
|
|
43
|
-
function
|
|
43
|
+
function u(e) {
|
|
44
44
|
return "function" == typeof e && /^class\s/.test(Function.prototype.toString.call(e));
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
function
|
|
47
|
+
function h(e) {
|
|
48
48
|
return "[object Object]" === Object.prototype.toString.call(e);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
function
|
|
52
|
-
if (!1 ===
|
|
51
|
+
function f(e) {
|
|
52
|
+
if (!1 === h(e)) return !1;
|
|
53
53
|
const i = e.constructor;
|
|
54
54
|
if (void 0 === i) return !0;
|
|
55
55
|
const t = i.prototype;
|
|
56
|
-
return !1 !==
|
|
56
|
+
return !1 !== h(t) && !1 !== t.hasOwnProperty("isPrototypeOf");
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function l(e) {
|
|
60
|
+
return "function" == typeof e;
|
|
57
61
|
}
|
|
58
62
|
|
|
59
63
|
function p(e) {
|
|
60
|
-
return void 0 === e ?
|
|
64
|
+
return void 0 === e ? n() : n(d(e));
|
|
61
65
|
}
|
|
62
66
|
|
|
63
|
-
i(
|
|
67
|
+
i(u, "isClass"), i(h, "isObject"), i(f, "isPlainObject"), function(e) {
|
|
64
68
|
function t(e) {
|
|
65
69
|
return v(e) && "useClass" in e;
|
|
66
70
|
}
|
|
@@ -71,7 +75,7 @@ i(h, "isClass"), i(f, "isObject"), i(l, "isPlainObject"), function(e) {
|
|
|
71
75
|
return v(e) && "useFactory" in e;
|
|
72
76
|
}
|
|
73
77
|
function r(e) {
|
|
74
|
-
return "string" == typeof e || "symbol" == typeof e ||
|
|
78
|
+
return "string" == typeof e || "symbol" == typeof e || u(e) || "function" == typeof e;
|
|
75
79
|
}
|
|
76
80
|
function s(e) {
|
|
77
81
|
return r(e) ? e : e.provide;
|
|
@@ -79,33 +83,33 @@ i(h, "isClass"), i(f, "isObject"), i(l, "isPlainObject"), function(e) {
|
|
|
79
83
|
function d(e) {
|
|
80
84
|
return e.map((e => s(e)));
|
|
81
85
|
}
|
|
82
|
-
function
|
|
86
|
+
function h(e, i) {
|
|
83
87
|
return p(e) ?? g(e) ?? i;
|
|
84
88
|
}
|
|
85
|
-
function
|
|
89
|
+
function l(e) {
|
|
86
90
|
if (v(e)) return e;
|
|
87
91
|
}
|
|
88
92
|
function p(e) {
|
|
89
|
-
const i =
|
|
93
|
+
const i = l(e);
|
|
90
94
|
if (i) return i.scope;
|
|
91
95
|
}
|
|
92
96
|
function g(e) {
|
|
93
97
|
const i = s(e);
|
|
94
|
-
if (!
|
|
95
|
-
const t =
|
|
96
|
-
return t ?
|
|
98
|
+
if (!u(i)) return;
|
|
99
|
+
const t = a(i)?.scope;
|
|
100
|
+
return t ? c(t) : void 0;
|
|
97
101
|
}
|
|
98
102
|
function v(e) {
|
|
99
|
-
return
|
|
103
|
+
return f(e) && "object" == typeof e && "provide" in e;
|
|
100
104
|
}
|
|
101
105
|
i(t, "isClassToken"), e.isClassToken = t, i(n, "isValueToken"), e.isValueToken = n,
|
|
102
106
|
i(o, "isFactoryToken"), e.isFactoryToken = o, i(r, "isProviderIdentifier"), e.isProviderIdentifier = r,
|
|
103
107
|
i(s, "toServiceIdentifier"), e.toServiceIdentifier = s, i(d, "toServiceIdentifiers"),
|
|
104
|
-
e.toServiceIdentifiers = d, i(
|
|
105
|
-
i(
|
|
108
|
+
e.toServiceIdentifiers = d, i(h, "getInjectionScopeByPriority"), e.getInjectionScopeByPriority = h,
|
|
109
|
+
i(l, "tryGetProviderOptions"), e.tryGetProviderOptions = l, i(p, "tryGetScopeFromProvider"),
|
|
106
110
|
e.tryGetScopeFromProvider = p, i(g, "tryGetDecoratorScopeFromClass"), e.tryGetDecoratorScopeFromClass = g,
|
|
107
111
|
i(v, "hasProvideProperty");
|
|
108
|
-
}(
|
|
112
|
+
}(o || (o = {})), function(e) {
|
|
109
113
|
function t(e) {
|
|
110
114
|
return e;
|
|
111
115
|
}
|
|
@@ -114,12 +118,12 @@ i(h, "isClass"), i(f, "isObject"), i(l, "isPlainObject"), function(e) {
|
|
|
114
118
|
}
|
|
115
119
|
i(t, "buildInternalConstructorParams"), e.buildInternalConstructorParams = t, i(n, "isDynamicExport"),
|
|
116
120
|
e.isDynamicExport = n;
|
|
117
|
-
}(
|
|
121
|
+
}(r || (r = {})), i(l, "isClassOrFunction"), i(p, "Injectable");
|
|
118
122
|
|
|
119
123
|
import { inject as g } from "inversify";
|
|
120
124
|
|
|
121
125
|
function v(e) {
|
|
122
|
-
return g(
|
|
126
|
+
return g(o.toServiceIdentifier(e));
|
|
123
127
|
}
|
|
124
128
|
|
|
125
129
|
i(v, "Inject");
|
|
@@ -127,7 +131,7 @@ i(v, "Inject");
|
|
|
127
131
|
import { multiInject as S } from "inversify";
|
|
128
132
|
|
|
129
133
|
function y(e) {
|
|
130
|
-
return S(
|
|
134
|
+
return S(o.toServiceIdentifier(e));
|
|
131
135
|
}
|
|
132
136
|
|
|
133
137
|
i(y, "MultiInject");
|
|
@@ -209,7 +213,7 @@ var x = class e extends Error {
|
|
|
209
213
|
constructor(e) {
|
|
210
214
|
super(e, "Has been disposed! You can re-initialize it by using the `_lazyInit` method.");
|
|
211
215
|
}
|
|
212
|
-
},
|
|
216
|
+
}, F = class e extends A {
|
|
213
217
|
static {
|
|
214
218
|
i(this, "XInjectionDynamicExportsOutOfRange");
|
|
215
219
|
}
|
|
@@ -217,17 +221,25 @@ var x = class e extends Error {
|
|
|
217
221
|
constructor(e) {
|
|
218
222
|
super(e, `The 'ProviderModule.${e.toString()}' is trying to dynamically export providers/modules out of the declared range of the static exports!`);
|
|
219
223
|
}
|
|
224
|
+
}, O = class e extends A {
|
|
225
|
+
static {
|
|
226
|
+
i(this, "XInjectionProviderModuleMissingIdentifierError");
|
|
227
|
+
}
|
|
228
|
+
name=e.name;
|
|
229
|
+
constructor(e) {
|
|
230
|
+
super(e, "An `identifier` must be supplied!");
|
|
231
|
+
}
|
|
220
232
|
};
|
|
221
233
|
|
|
222
|
-
import { Container as
|
|
234
|
+
import { Container as N } from "inversify";
|
|
223
235
|
|
|
224
|
-
var
|
|
236
|
+
var U = new N({
|
|
225
237
|
defaultScope: "Singleton"
|
|
226
238
|
});
|
|
227
239
|
|
|
228
|
-
import { Container as
|
|
240
|
+
import { Container as G } from "inversify";
|
|
229
241
|
|
|
230
|
-
var
|
|
242
|
+
var V = class {
|
|
231
243
|
static {
|
|
232
244
|
i(this, "ProviderModuleUtils");
|
|
233
245
|
}
|
|
@@ -240,55 +252,56 @@ var G = class {
|
|
|
240
252
|
this.module = e, this.moduleNaked = e.toNaked();
|
|
241
253
|
}
|
|
242
254
|
bindToContainer(e, i) {
|
|
243
|
-
return
|
|
255
|
+
return o.isProviderIdentifier(e) ? this.bindSelfTokenToContainer(e, i) : o.isClassToken(e) ? this.bindClassTokenToContainer(e, i) : o.isValueToken(e) ? this.bindValueTokenToContainer(e) : !!o.isFactoryToken(e) && this.bindFactoryTokenToContainer(e, i);
|
|
244
256
|
}
|
|
245
257
|
bindManyToContainer(e, i) {
|
|
246
258
|
e.forEach((e => this.bindToContainer(e, i)));
|
|
247
259
|
}
|
|
248
260
|
bindSelfTokenToContainer(e, i) {
|
|
249
|
-
return this.setBindingScope(e, this.container.bind(
|
|
261
|
+
return this.setBindingScope(e, this.container.bind(o.toServiceIdentifier(e)).toSelf(), i),
|
|
250
262
|
this.moduleNaked.__isCurrentBound(e);
|
|
251
263
|
}
|
|
252
264
|
bindClassTokenToContainer(e, i) {
|
|
253
|
-
return this.setBindingOnEvent(e, this.setWhenBinding(e, this.setBindingScope(e, this.container.bind(
|
|
265
|
+
return this.setBindingOnEvent(e, this.setWhenBinding(e, this.setBindingScope(e, this.container.bind(o.toServiceIdentifier(e)).to(e.useClass), i))),
|
|
254
266
|
this.moduleNaked.__isCurrentBound(e);
|
|
255
267
|
}
|
|
256
268
|
bindValueTokenToContainer(e) {
|
|
257
|
-
return this.setBindingOnEvent(e, this.setWhenBinding(e, this.container.bind(
|
|
269
|
+
return this.setBindingOnEvent(e, this.setWhenBinding(e, this.container.bind(o.toServiceIdentifier(e)).toConstantValue(e.useValue))),
|
|
258
270
|
this.moduleNaked.__isCurrentBound(e);
|
|
259
271
|
}
|
|
260
272
|
bindFactoryTokenToContainer(e, i) {
|
|
261
|
-
return this.setBindingOnEvent(e, this.setWhenBinding(e, this.setBindingScope(e, this.container.bind(
|
|
273
|
+
return this.setBindingOnEvent(e, this.setWhenBinding(e, this.setBindingScope(e, this.container.bind(o.toServiceIdentifier(e)).toResolvedValue(e.useFactory, o.toServiceIdentifiers(e.inject ?? [])), i))),
|
|
262
274
|
this.moduleNaked.__isCurrentBound(e);
|
|
263
275
|
}
|
|
264
276
|
setBindingScope(e, i, t) {
|
|
265
|
-
if (
|
|
266
|
-
switch (
|
|
267
|
-
case
|
|
277
|
+
if (o.isValueToken(e)) return i;
|
|
278
|
+
switch (o.getInjectionScopeByPriority(e, t)) {
|
|
279
|
+
case s.Singleton:
|
|
268
280
|
return i.inSingletonScope();
|
|
269
281
|
|
|
270
|
-
case
|
|
282
|
+
case s.Transient:
|
|
271
283
|
return i.inTransientScope();
|
|
272
284
|
|
|
273
|
-
case
|
|
285
|
+
case s.Request:
|
|
274
286
|
return i.inRequestScope();
|
|
275
287
|
}
|
|
276
288
|
}
|
|
277
289
|
setWhenBinding(e, i) {
|
|
278
|
-
if (
|
|
290
|
+
if (o.isProviderIdentifier(e)) return i;
|
|
279
291
|
const t = e.when;
|
|
280
292
|
return t ? i.when(t) : i;
|
|
281
293
|
}
|
|
282
294
|
setBindingOnEvent(e, i) {
|
|
283
|
-
if (
|
|
295
|
+
if (o.isProviderIdentifier(e)) return;
|
|
284
296
|
const t = e;
|
|
285
297
|
t.onEvent?.activation && i.onActivation(t.onEvent.activation), t.onEvent?.deactivation && i.onDeactivation(t.onEvent.deactivation);
|
|
286
298
|
}
|
|
287
|
-
},
|
|
299
|
+
}, q = class e {
|
|
288
300
|
static {
|
|
289
301
|
i(this, "ProviderModule");
|
|
290
302
|
}
|
|
291
303
|
identifier;
|
|
304
|
+
isDisposed=!1;
|
|
292
305
|
isAppModule;
|
|
293
306
|
container;
|
|
294
307
|
defaultScope;
|
|
@@ -300,17 +313,18 @@ var G = class {
|
|
|
300
313
|
exports;
|
|
301
314
|
imports;
|
|
302
315
|
registeredBindingSideEffects;
|
|
303
|
-
constructor({identifier: e
|
|
304
|
-
const
|
|
305
|
-
this.identifier = e, this.isAppModule =
|
|
316
|
+
constructor({identifier: e, imports: i, providers: t, exports: n, defaultScope: o, dynamicExports: r, onReady: s, onDispose: d, ...c}) {
|
|
317
|
+
const a = c;
|
|
318
|
+
this.identifier = this.setIdentifier(e), this.isAppModule = a.isAppModule ?? !1,
|
|
319
|
+
this.isAppModule || this._lazyInit({
|
|
306
320
|
imports: i,
|
|
307
321
|
providers: t,
|
|
308
|
-
exports:
|
|
309
|
-
defaultScope:
|
|
310
|
-
dynamicExports:
|
|
311
|
-
onReady:
|
|
312
|
-
onDispose:
|
|
313
|
-
...
|
|
322
|
+
exports: n,
|
|
323
|
+
defaultScope: o,
|
|
324
|
+
dynamicExports: r,
|
|
325
|
+
onReady: s,
|
|
326
|
+
onDispose: d,
|
|
327
|
+
...c
|
|
314
328
|
});
|
|
315
329
|
}
|
|
316
330
|
get(e, i) {
|
|
@@ -320,44 +334,48 @@ var G = class {
|
|
|
320
334
|
}
|
|
321
335
|
getMany(...e) {
|
|
322
336
|
return e.map((e => {
|
|
323
|
-
const i =
|
|
337
|
+
const i = f(e) && "provider" in e;
|
|
324
338
|
return this.get(i ? e.provider : e, !!i && e.isOptional);
|
|
325
339
|
}));
|
|
326
340
|
}
|
|
327
341
|
onActivationEvent(e, i) {
|
|
328
|
-
this.container.onActivation(
|
|
342
|
+
this.container.onActivation(o.toServiceIdentifier(e), i);
|
|
329
343
|
}
|
|
330
344
|
onDeactivationEvent(e, i) {
|
|
331
|
-
this.container.onDeactivation(
|
|
345
|
+
this.container.onDeactivation(o.toServiceIdentifier(e), i);
|
|
332
346
|
}
|
|
333
347
|
toNaked() {
|
|
334
348
|
return this;
|
|
335
349
|
}
|
|
336
350
|
toString() {
|
|
337
|
-
return this.identifier
|
|
351
|
+
return this.identifier?.description ?? "Unknown";
|
|
352
|
+
}
|
|
353
|
+
setIdentifier(e) {
|
|
354
|
+
if (!e) throw new O(this);
|
|
355
|
+
return e;
|
|
338
356
|
}
|
|
339
357
|
prepareContainer(e) {
|
|
340
|
-
return this.isAppModule ? e.container?.() ??
|
|
341
|
-
e.container()) : new
|
|
342
|
-
parent:
|
|
358
|
+
return this.isAppModule ? e.container?.() ?? U : e.container ? (console.warn(`[xInjection]: The '${this.toString()}' module is using a dynamic container!`),
|
|
359
|
+
e.container()) : new G({
|
|
360
|
+
parent: U,
|
|
343
361
|
defaultScope: this.defaultScope.inversify
|
|
344
362
|
});
|
|
345
363
|
}
|
|
346
364
|
injectImportedModules(t) {
|
|
347
365
|
t && 0 !== t.length && t.forEach((t => {
|
|
348
366
|
if ("GlobalAppModule" === t.toString()) throw new A(this, "The 'GlobalAppModule' can't be imported!");
|
|
349
|
-
const n = t._getExportableModulesAndProviders(),
|
|
350
|
-
void 0 !==
|
|
351
|
-
(
|
|
367
|
+
const n = t._getExportableModulesAndProviders(), r = t.dynamicExports?.(this, n);
|
|
368
|
+
void 0 !== r && this.shouldThrowWhenModuleDynamicExportsDontMatchTheStaticExports(t, n, r),
|
|
369
|
+
(r ?? n).forEach((n => {
|
|
352
370
|
if (n instanceof e) {
|
|
353
371
|
const e = n.toNaked();
|
|
354
372
|
return void this.injectImportedModules([ e ]);
|
|
355
373
|
}
|
|
356
|
-
const
|
|
374
|
+
const r = n;
|
|
357
375
|
this.moduleUtils.bindToContainer({
|
|
358
|
-
scope:
|
|
359
|
-
provide:
|
|
360
|
-
useFactory: i((() =>
|
|
376
|
+
scope: o.getInjectionScopeByPriority(r, t.defaultScope.native),
|
|
377
|
+
provide: o.toServiceIdentifier(r),
|
|
378
|
+
useFactory: i((() => this._importedDependencyFactory(r, t)), "useFactory")
|
|
361
379
|
}, t.defaultScope.native);
|
|
362
380
|
}));
|
|
363
381
|
}));
|
|
@@ -383,23 +401,26 @@ var G = class {
|
|
|
383
401
|
this.registeredBindingSideEffects.delete(e)) : this.registeredBindingSideEffects.forEach((({onUnbindEffects: e}) => e.forEach((e => e())))));
|
|
384
402
|
}
|
|
385
403
|
shouldThrowWhenModuleDynamicExportsDontMatchTheStaticExports(e, i, t) {
|
|
386
|
-
if (t.length > i.length || t.some((e => !i.includes(e)))) throw new
|
|
404
|
+
if (t.length > i.length || t.some((e => !i.includes(e)))) throw new F(e);
|
|
387
405
|
}
|
|
388
406
|
shouldThrowIfDisposed() {
|
|
389
407
|
if (null === this.container) throw new R(this);
|
|
390
408
|
}
|
|
409
|
+
_importedDependencyFactory(e, i) {
|
|
410
|
+
return i.get(e);
|
|
411
|
+
}
|
|
391
412
|
async _dispose() {
|
|
392
413
|
await (this.onDispose?.(this)), await this.__unbindAll(), this.container = null,
|
|
393
414
|
this.imports = null, this.providers = null, this.exports = null, this.dynamicExports = null,
|
|
394
|
-
this.registeredBindingSideEffects = null;
|
|
415
|
+
this.registeredBindingSideEffects = null, this.isDisposed = !0;
|
|
395
416
|
}
|
|
396
|
-
_lazyInit({imports: e = [], providers: i = [], exports: t = [], defaultScope: n =
|
|
397
|
-
this.imports = e, this.providers = i, this.exports = t, this.defaultScope = {
|
|
417
|
+
_lazyInit({imports: e = [], providers: i = [], exports: t = [], defaultScope: n = s.Singleton, dynamicExports: o, onReady: r, onDispose: c, ...a}) {
|
|
418
|
+
this.isDisposed = !1, this.imports = e, this.providers = i, this.exports = t, this.defaultScope = {
|
|
398
419
|
native: n,
|
|
399
|
-
inversify:
|
|
400
|
-
}, this.dynamicExports = o, this.onReady = r, this.onDispose =
|
|
420
|
+
inversify: d(n)
|
|
421
|
+
}, this.dynamicExports = o, this.onReady = r, this.onDispose = c, this.container = this.prepareContainer({
|
|
401
422
|
...a
|
|
402
|
-
}), this.moduleUtils = new
|
|
423
|
+
}), this.moduleUtils = new V(this), this.registeredBindingSideEffects = new Map,
|
|
403
424
|
this.injectImportedModules(this._getImportedModules()), this.injectProviders(),
|
|
404
425
|
this.onReady?.(this);
|
|
405
426
|
}
|
|
@@ -426,26 +447,26 @@ var G = class {
|
|
|
426
447
|
}
|
|
427
448
|
__bind(e) {
|
|
428
449
|
this.shouldThrowIfDisposed();
|
|
429
|
-
const i = this.container.bind(
|
|
450
|
+
const i = this.container.bind(o.toServiceIdentifier(e));
|
|
430
451
|
return this.invokeRegisteredBindingSideEffects(e, "onBind"), i;
|
|
431
452
|
}
|
|
432
453
|
__get(e, i) {
|
|
433
|
-
return this.shouldThrowIfDisposed(), this.container.get(
|
|
454
|
+
return this.shouldThrowIfDisposed(), this.container.get(o.toServiceIdentifier(e), i);
|
|
434
455
|
}
|
|
435
456
|
async __getAsync(e, i) {
|
|
436
|
-
return this.shouldThrowIfDisposed(), this.container.getAsync(
|
|
457
|
+
return this.shouldThrowIfDisposed(), this.container.getAsync(o.toServiceIdentifier(e), i);
|
|
437
458
|
}
|
|
438
459
|
__getAll(e, i) {
|
|
439
|
-
return this.shouldThrowIfDisposed(), this.container.getAll(
|
|
460
|
+
return this.shouldThrowIfDisposed(), this.container.getAll(o.toServiceIdentifier(e), i);
|
|
440
461
|
}
|
|
441
462
|
async __getAllAsync(e, i) {
|
|
442
|
-
return this.shouldThrowIfDisposed(), this.container.getAllAsync(
|
|
463
|
+
return this.shouldThrowIfDisposed(), this.container.getAllAsync(o.toServiceIdentifier(e), i);
|
|
443
464
|
}
|
|
444
465
|
__isBound(e, i) {
|
|
445
|
-
return this.shouldThrowIfDisposed(), this.container.isBound(
|
|
466
|
+
return this.shouldThrowIfDisposed(), this.container.isBound(o.toServiceIdentifier(e), i);
|
|
446
467
|
}
|
|
447
468
|
__isCurrentBound(e, i) {
|
|
448
|
-
return this.shouldThrowIfDisposed(), this.container.isCurrentBound(
|
|
469
|
+
return this.shouldThrowIfDisposed(), this.container.isCurrentBound(o.toServiceIdentifier(e), i);
|
|
449
470
|
}
|
|
450
471
|
__takeSnapshot() {
|
|
451
472
|
this.shouldThrowIfDisposed(), this.container.snapshot();
|
|
@@ -455,33 +476,33 @@ var G = class {
|
|
|
455
476
|
}
|
|
456
477
|
async __rebind(e) {
|
|
457
478
|
this.shouldThrowIfDisposed();
|
|
458
|
-
const i = await this.container.rebind(
|
|
479
|
+
const i = await this.container.rebind(o.toServiceIdentifier(e));
|
|
459
480
|
return this.invokeRegisteredBindingSideEffects(e, "onRebind"), i;
|
|
460
481
|
}
|
|
461
482
|
__rebindSync(e) {
|
|
462
483
|
this.shouldThrowIfDisposed();
|
|
463
|
-
const i = this.container.rebindSync(
|
|
484
|
+
const i = this.container.rebindSync(o.toServiceIdentifier(e));
|
|
464
485
|
return this.invokeRegisteredBindingSideEffects(e, "onRebind"), i;
|
|
465
486
|
}
|
|
466
487
|
async __unbind(e) {
|
|
467
|
-
this.shouldThrowIfDisposed(), await this.container.unbind(
|
|
488
|
+
this.shouldThrowIfDisposed(), await this.container.unbind(o.toServiceIdentifier(e)),
|
|
468
489
|
this.removeRegisteredBindingSideEffects(e);
|
|
469
490
|
}
|
|
470
491
|
__unbindSync(e) {
|
|
471
|
-
this.shouldThrowIfDisposed(), this.container.unbindSync(
|
|
492
|
+
this.shouldThrowIfDisposed(), this.container.unbindSync(o.toServiceIdentifier(e)),
|
|
472
493
|
this.removeRegisteredBindingSideEffects(e);
|
|
473
494
|
}
|
|
474
495
|
async __unbindAll() {
|
|
475
496
|
this.shouldThrowIfDisposed(), await this.container.unbindAll(), this.removeRegisteredBindingSideEffects("all");
|
|
476
497
|
}
|
|
477
|
-
},
|
|
498
|
+
}, W = class extends q {
|
|
478
499
|
static {
|
|
479
500
|
i(this, "GlobalAppModule");
|
|
480
501
|
}
|
|
481
502
|
nakedModule=this;
|
|
482
503
|
isLoaded=!1;
|
|
483
504
|
constructor() {
|
|
484
|
-
super(
|
|
505
|
+
super(r.buildInternalConstructorParams({
|
|
485
506
|
identifier: Symbol(t),
|
|
486
507
|
isAppModule: !0
|
|
487
508
|
}));
|
|
@@ -496,6 +517,6 @@ var G = class {
|
|
|
496
517
|
async _dispose() {
|
|
497
518
|
this.isLoaded = !1, super._dispose();
|
|
498
519
|
}
|
|
499
|
-
},
|
|
520
|
+
}, $ = new W;
|
|
500
521
|
|
|
501
|
-
export {
|
|
522
|
+
export { $ as AppModule, t as GLOBAL_APP_MODULE_ID, W as GlobalAppModule, U as GlobalContainer, v as Inject, I as InjectFromBase, p as Injectable, s as InjectionScope, y as MultiInject, E as Named, _ as Optional, w as PostConstruct, C as PreDestroy, q as ProviderModule, r as ProviderModuleHelpers, o as ProviderTokenHelpers, M as Tagged, j as Unmanaged, F as XInjectionDynamicExportsOutOfRange, x as XInjectionError, R as XInjectionProviderModuleDisposedError, A as XInjectionProviderModuleError, O as XInjectionProviderModuleMissingIdentifierError, c as bindingScopeToInjectionScope, d as injectionScopeToBindingScope, u as isClass, l as isClassOrFunction, f as isPlainObject };//# sourceMappingURL=index.js.map
|