@rocketmakers/ioc 0.3.10 → 0.3.11
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 +14 -0
- package/lib/index.js +2466 -902
- package/package.json +12 -9
package/lib/index.js
CHANGED
|
@@ -77,7 +77,7 @@ var LazyServiceIdentifier = class {
|
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
79
|
|
|
80
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
80
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/index.js
|
|
81
81
|
var import_lite = require("reflect-metadata/lite");
|
|
82
82
|
|
|
83
83
|
// ../../../../node_modules/.pnpm/@inversifyjs+reflect-metadata-utils@1.5.0_reflect-metadata@0.2.2/node_modules/@inversifyjs/reflect-metadata-utils/lib/reflectMetadata/utils/getOwnReflectMetadata.js
|
|
@@ -97,7 +97,7 @@ function updateOwnReflectMetadata(target, metadataKey, buildDefaultValue, callba
|
|
|
97
97
|
Reflect.defineMetadata(metadataKey, updatedMetadata, target, propertyKey);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
100
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/binding/actions/getBindingId.js
|
|
101
101
|
var ID_METADATA = "@inversifyjs/container/bindingId";
|
|
102
102
|
function getBindingId() {
|
|
103
103
|
const bindingId = getOwnReflectMetadata(Object, ID_METADATA) ?? 0;
|
|
@@ -109,14 +109,14 @@ function getBindingId() {
|
|
|
109
109
|
return bindingId;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
112
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/binding/models/BindingScope.js
|
|
113
113
|
var bindingScopeValues = {
|
|
114
114
|
Request: "Request",
|
|
115
115
|
Singleton: "Singleton",
|
|
116
116
|
Transient: "Transient"
|
|
117
117
|
};
|
|
118
118
|
|
|
119
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
119
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/binding/models/BindingType.js
|
|
120
120
|
var bindingTypeValues = {
|
|
121
121
|
ConstantValue: "ConstantValue",
|
|
122
122
|
DynamicValue: "DynamicValue",
|
|
@@ -126,14 +126,14 @@ var bindingTypeValues = {
|
|
|
126
126
|
ServiceRedirection: "ServiceRedirection"
|
|
127
127
|
};
|
|
128
128
|
|
|
129
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
129
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/common/calculations/chain.js
|
|
130
130
|
function* chain(...iterables) {
|
|
131
131
|
for (const iterable of iterables) {
|
|
132
132
|
yield* iterable;
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
136
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/common/models/OneToManyMapStar.js
|
|
137
137
|
var NOT_FOUND_INDEX = -1;
|
|
138
138
|
var OneToManyMapStar = class _OneToManyMapStar {
|
|
139
139
|
#modelToRelationMap;
|
|
@@ -283,7 +283,64 @@ var OneToManyMapStar = class _OneToManyMapStar {
|
|
|
283
283
|
}
|
|
284
284
|
};
|
|
285
285
|
|
|
286
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
286
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/common/models/WeakList.js
|
|
287
|
+
var DEFAULT_MINIMUM_LENGTH_TO_REALLOCATE = 8;
|
|
288
|
+
var DEFAULT_MODULUS_TO_REALLOCATE_ON_PUSH = 1024;
|
|
289
|
+
var MIN_DEAD_REFS_FOR_REALLOCATION_PERCENTAGE = 0.5;
|
|
290
|
+
var WeakList = class {
|
|
291
|
+
#list;
|
|
292
|
+
#minimumLengthToReallocate;
|
|
293
|
+
#modulusToReallocateOnPush;
|
|
294
|
+
constructor() {
|
|
295
|
+
this.#list = [];
|
|
296
|
+
this.#minimumLengthToReallocate = DEFAULT_MINIMUM_LENGTH_TO_REALLOCATE;
|
|
297
|
+
this.#modulusToReallocateOnPush = DEFAULT_MODULUS_TO_REALLOCATE_ON_PUSH;
|
|
298
|
+
}
|
|
299
|
+
*[Symbol.iterator]() {
|
|
300
|
+
let deadRefCount = 0;
|
|
301
|
+
for (const weakRef of this.#list) {
|
|
302
|
+
const value = weakRef.deref();
|
|
303
|
+
if (value === void 0) {
|
|
304
|
+
++deadRefCount;
|
|
305
|
+
} else {
|
|
306
|
+
yield value;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
if (this.#list.length >= this.#minimumLengthToReallocate && this.#shouldReallocate(deadRefCount)) {
|
|
310
|
+
this.#reallocate(deadRefCount);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
push(value) {
|
|
314
|
+
const weakRef = new WeakRef(value);
|
|
315
|
+
this.#list.push(weakRef);
|
|
316
|
+
if (this.#list.length >= this.#minimumLengthToReallocate && this.#list.length % this.#modulusToReallocateOnPush === 0) {
|
|
317
|
+
let deadRefCount = 0;
|
|
318
|
+
for (const ref of this.#list) {
|
|
319
|
+
if (ref.deref() === void 0) {
|
|
320
|
+
++deadRefCount;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
if (this.#shouldReallocate(deadRefCount)) {
|
|
324
|
+
this.#reallocate(deadRefCount);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
#reallocate(deadRefCount) {
|
|
329
|
+
const newList = new Array(this.#list.length - deadRefCount);
|
|
330
|
+
let i = 0;
|
|
331
|
+
for (const ref of this.#list) {
|
|
332
|
+
if (ref.deref()) {
|
|
333
|
+
newList[i++] = ref;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
this.#list = newList;
|
|
337
|
+
}
|
|
338
|
+
#shouldReallocate(deadRefCount) {
|
|
339
|
+
return deadRefCount >= this.#list.length * MIN_DEAD_REFS_FOR_REALLOCATION_PERCENTAGE;
|
|
340
|
+
}
|
|
341
|
+
};
|
|
342
|
+
|
|
343
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/binding/services/ActivationsService.js
|
|
287
344
|
var ActivationRelationKind;
|
|
288
345
|
(function(ActivationRelationKind2) {
|
|
289
346
|
ActivationRelationKind2["moduleId"] = "moduleId";
|
|
@@ -292,6 +349,7 @@ var ActivationRelationKind;
|
|
|
292
349
|
var ActivationsService = class _ActivationsService {
|
|
293
350
|
#activationMaps;
|
|
294
351
|
#getParent;
|
|
352
|
+
#serviceToActivationSubscribersOnceMap;
|
|
295
353
|
constructor(getParent, activationMaps) {
|
|
296
354
|
this.#activationMaps = activationMaps ?? new OneToManyMapStar({
|
|
297
355
|
moduleId: {
|
|
@@ -302,31 +360,37 @@ var ActivationsService = class _ActivationsService {
|
|
|
302
360
|
}
|
|
303
361
|
});
|
|
304
362
|
this.#getParent = getParent;
|
|
363
|
+
this.#serviceToActivationSubscribersOnceMap = /* @__PURE__ */ new Map();
|
|
305
364
|
}
|
|
306
365
|
static build(getParent) {
|
|
307
366
|
return new _ActivationsService(getParent);
|
|
308
367
|
}
|
|
309
368
|
add(activation, relation) {
|
|
310
369
|
this.#activationMaps.add(activation, relation);
|
|
370
|
+
this.#triggerActivationAdded(relation[ActivationRelationKind.serviceId], activation);
|
|
371
|
+
}
|
|
372
|
+
subscribeOnce(serviceIdentifier, subscriber) {
|
|
373
|
+
let subscribersOnce = this.#serviceToActivationSubscribersOnceMap.get(serviceIdentifier);
|
|
374
|
+
if (subscribersOnce === void 0) {
|
|
375
|
+
subscribersOnce = new WeakList();
|
|
376
|
+
this.#serviceToActivationSubscribersOnceMap.set(serviceIdentifier, subscribersOnce);
|
|
377
|
+
}
|
|
378
|
+
subscribersOnce.push(subscriber);
|
|
311
379
|
}
|
|
312
380
|
clone() {
|
|
313
381
|
const clone = new _ActivationsService(this.#getParent, this.#activationMaps.clone());
|
|
314
382
|
return clone;
|
|
315
383
|
}
|
|
316
384
|
get(serviceIdentifier) {
|
|
317
|
-
const activationIterables = [];
|
|
318
385
|
const activations = this.#activationMaps.get(ActivationRelationKind.serviceId, serviceIdentifier);
|
|
319
|
-
if (activations !== void 0) {
|
|
320
|
-
activationIterables.push(activations);
|
|
321
|
-
}
|
|
322
386
|
const parentActivations = this.#getParent()?.get(serviceIdentifier);
|
|
323
|
-
if (
|
|
324
|
-
|
|
387
|
+
if (activations === void 0) {
|
|
388
|
+
return parentActivations;
|
|
325
389
|
}
|
|
326
|
-
if (
|
|
327
|
-
return
|
|
390
|
+
if (parentActivations === void 0) {
|
|
391
|
+
return activations;
|
|
328
392
|
}
|
|
329
|
-
return chain(
|
|
393
|
+
return chain(activations, parentActivations);
|
|
330
394
|
}
|
|
331
395
|
removeAllByModuleId(moduleId) {
|
|
332
396
|
this.#activationMaps.removeByRelation(ActivationRelationKind.moduleId, moduleId);
|
|
@@ -334,12 +398,21 @@ var ActivationsService = class _ActivationsService {
|
|
|
334
398
|
removeAllByServiceId(serviceId) {
|
|
335
399
|
this.#activationMaps.removeByRelation(ActivationRelationKind.serviceId, serviceId);
|
|
336
400
|
}
|
|
401
|
+
#triggerActivationAdded(serviceId, activation) {
|
|
402
|
+
const subscribersOnce = this.#serviceToActivationSubscribersOnceMap.get(serviceId);
|
|
403
|
+
if (subscribersOnce !== void 0) {
|
|
404
|
+
for (const subscriber of subscribersOnce) {
|
|
405
|
+
subscriber.onActivationAdded(serviceId, activation);
|
|
406
|
+
}
|
|
407
|
+
this.#serviceToActivationSubscribersOnceMap.delete(serviceId);
|
|
408
|
+
}
|
|
409
|
+
}
|
|
337
410
|
};
|
|
338
411
|
|
|
339
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
412
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/reflectMetadata/data/classMetadataReflectKey.js
|
|
340
413
|
var classMetadataReflectKey = "@inversifyjs/core/classMetadataReflectKey";
|
|
341
414
|
|
|
342
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
415
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/calculations/getDefaultClassMetadata.js
|
|
343
416
|
function getDefaultClassMetadata() {
|
|
344
417
|
return {
|
|
345
418
|
constructorArguments: [],
|
|
@@ -352,16 +425,16 @@ function getDefaultClassMetadata() {
|
|
|
352
425
|
};
|
|
353
426
|
}
|
|
354
427
|
|
|
355
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
428
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/reflectMetadata/data/pendingClassMetadataCountReflectKey.js
|
|
356
429
|
var pendingClassMetadataCountReflectKey = "@inversifyjs/core/pendingClassMetadataCountReflectKey";
|
|
357
430
|
|
|
358
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
431
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/calculations/isPendingClassMetadata.js
|
|
359
432
|
function isPendingClassMetadata(type) {
|
|
360
433
|
const pendingClassMetadataCount = getOwnReflectMetadata(type, pendingClassMetadataCountReflectKey);
|
|
361
434
|
return pendingClassMetadataCount !== void 0 && pendingClassMetadataCount !== 0;
|
|
362
435
|
}
|
|
363
436
|
|
|
364
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
437
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/error/models/InversifyCoreError.js
|
|
365
438
|
var isAppErrorSymbol = /* @__PURE__ */ Symbol.for("@inversifyjs/core/InversifyCoreError");
|
|
366
439
|
var InversifyCoreError = class _InversifyCoreError extends Error {
|
|
367
440
|
[isAppErrorSymbol];
|
|
@@ -379,7 +452,7 @@ var InversifyCoreError = class _InversifyCoreError extends Error {
|
|
|
379
452
|
}
|
|
380
453
|
};
|
|
381
454
|
|
|
382
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
455
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/error/models/InversifyCoreErrorKind.js
|
|
383
456
|
var InversifyCoreErrorKind;
|
|
384
457
|
(function(InversifyCoreErrorKind2) {
|
|
385
458
|
InversifyCoreErrorKind2[InversifyCoreErrorKind2["injectionDecoratorConflict"] = 0] = "injectionDecoratorConflict";
|
|
@@ -390,13 +463,13 @@ var InversifyCoreErrorKind;
|
|
|
390
463
|
InversifyCoreErrorKind2[InversifyCoreErrorKind2["unknown"] = 5] = "unknown";
|
|
391
464
|
})(InversifyCoreErrorKind || (InversifyCoreErrorKind = {}));
|
|
392
465
|
|
|
393
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
466
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/models/MaybeClassElementMetadataKind.js
|
|
394
467
|
var MaybeClassElementMetadataKind;
|
|
395
468
|
(function(MaybeClassElementMetadataKind2) {
|
|
396
469
|
MaybeClassElementMetadataKind2[MaybeClassElementMetadataKind2["unknown"] = 32] = "unknown";
|
|
397
470
|
})(MaybeClassElementMetadataKind || (MaybeClassElementMetadataKind = {}));
|
|
398
471
|
|
|
399
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
472
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/calculations/throwAtInvalidClassMetadata.js
|
|
400
473
|
function throwAtInvalidClassMetadata(type, classMetadata) {
|
|
401
474
|
const errors = [];
|
|
402
475
|
for (let i = 0; i < classMetadata.constructorArguments.length; ++i) {
|
|
@@ -424,7 +497,7 @@ This might be caused by one of the following reasons:
|
|
|
424
497
|
${errors.join("\n\n")}`);
|
|
425
498
|
}
|
|
426
499
|
|
|
427
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
500
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/calculations/validateConstructorMetadataArray.js
|
|
428
501
|
function validateConstructorMetadataArray(type, value) {
|
|
429
502
|
const undefinedIndexes = [];
|
|
430
503
|
if (value.length < type.length) {
|
|
@@ -448,7 +521,7 @@ If you're using typescript and want to rely on auto injection, set "emitDecorato
|
|
|
448
521
|
}
|
|
449
522
|
}
|
|
450
523
|
|
|
451
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
524
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/calculations/getClassMetadata.js
|
|
452
525
|
function getClassMetadata(type) {
|
|
453
526
|
const classMetadata = getOwnReflectMetadata(type, classMetadataReflectKey) ?? getDefaultClassMetadata();
|
|
454
527
|
if (isPendingClassMetadata(type)) {
|
|
@@ -459,7 +532,7 @@ function getClassMetadata(type) {
|
|
|
459
532
|
}
|
|
460
533
|
}
|
|
461
534
|
|
|
462
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
535
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/binding/calculations/buildInstanceBinding.js
|
|
463
536
|
function buildInstanceBinding(autobindOptions, serviceIdentifier) {
|
|
464
537
|
const classMetadata = getClassMetadata(serviceIdentifier);
|
|
465
538
|
const scope = classMetadata.scope ?? autobindOptions.scope;
|
|
@@ -480,7 +553,7 @@ function buildInstanceBinding(autobindOptions, serviceIdentifier) {
|
|
|
480
553
|
};
|
|
481
554
|
}
|
|
482
555
|
|
|
483
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
556
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/binding/calculations/cloneBindingCache.js
|
|
484
557
|
function cloneBindingCache(cache) {
|
|
485
558
|
if (cache.isRight) {
|
|
486
559
|
return {
|
|
@@ -491,7 +564,7 @@ function cloneBindingCache(cache) {
|
|
|
491
564
|
return cache;
|
|
492
565
|
}
|
|
493
566
|
|
|
494
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
567
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/binding/calculations/cloneConstantValueBinding.js
|
|
495
568
|
function cloneConstantValueBinding(binding) {
|
|
496
569
|
return {
|
|
497
570
|
cache: cloneBindingCache(binding.cache),
|
|
@@ -508,7 +581,7 @@ function cloneConstantValueBinding(binding) {
|
|
|
508
581
|
};
|
|
509
582
|
}
|
|
510
583
|
|
|
511
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
584
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/binding/calculations/cloneDynamicValueBinding.js
|
|
512
585
|
function cloneDynamicValueBinding(binding) {
|
|
513
586
|
return {
|
|
514
587
|
cache: cloneBindingCache(binding.cache),
|
|
@@ -525,7 +598,7 @@ function cloneDynamicValueBinding(binding) {
|
|
|
525
598
|
};
|
|
526
599
|
}
|
|
527
600
|
|
|
528
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
601
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/binding/calculations/cloneFactoryBinding.js
|
|
529
602
|
function cloneFactoryBinding(binding) {
|
|
530
603
|
return {
|
|
531
604
|
cache: cloneBindingCache(binding.cache),
|
|
@@ -541,7 +614,7 @@ function cloneFactoryBinding(binding) {
|
|
|
541
614
|
};
|
|
542
615
|
}
|
|
543
616
|
|
|
544
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
617
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/binding/calculations/cloneInstanceBinding.js
|
|
545
618
|
function cloneInstanceBinding(binding) {
|
|
546
619
|
return {
|
|
547
620
|
cache: cloneBindingCache(binding.cache),
|
|
@@ -557,7 +630,7 @@ function cloneInstanceBinding(binding) {
|
|
|
557
630
|
};
|
|
558
631
|
}
|
|
559
632
|
|
|
560
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
633
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/binding/calculations/cloneResolvedValueBinding.js
|
|
561
634
|
function cloneResolvedValueBinding(binding) {
|
|
562
635
|
return {
|
|
563
636
|
cache: cloneBindingCache(binding.cache),
|
|
@@ -574,7 +647,7 @@ function cloneResolvedValueBinding(binding) {
|
|
|
574
647
|
};
|
|
575
648
|
}
|
|
576
649
|
|
|
577
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
650
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/binding/calculations/cloneServiceRedirectionBinding.js
|
|
578
651
|
function cloneServiceRedirectionBinding(binding) {
|
|
579
652
|
return {
|
|
580
653
|
id: binding.id,
|
|
@@ -586,7 +659,7 @@ function cloneServiceRedirectionBinding(binding) {
|
|
|
586
659
|
};
|
|
587
660
|
}
|
|
588
661
|
|
|
589
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
662
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/binding/calculations/cloneBinding.js
|
|
590
663
|
function cloneBinding(binding) {
|
|
591
664
|
switch (binding.type) {
|
|
592
665
|
case bindingTypeValues.ConstantValue:
|
|
@@ -604,7 +677,7 @@ function cloneBinding(binding) {
|
|
|
604
677
|
}
|
|
605
678
|
}
|
|
606
679
|
|
|
607
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
680
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/binding/services/BindingService.js
|
|
608
681
|
var BindingRelationKind;
|
|
609
682
|
(function(BindingRelationKind2) {
|
|
610
683
|
BindingRelationKind2["id"] = "id";
|
|
@@ -721,7 +794,7 @@ var BindingService = class _BindingService {
|
|
|
721
794
|
}
|
|
722
795
|
};
|
|
723
796
|
|
|
724
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
797
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/binding/services/DeactivationsService.js
|
|
725
798
|
var DeactivationRelationKind;
|
|
726
799
|
(function(DeactivationRelationKind2) {
|
|
727
800
|
DeactivationRelationKind2["moduleId"] = "moduleId";
|
|
@@ -774,7 +847,7 @@ var DeactivationsService = class _DeactivationsService {
|
|
|
774
847
|
}
|
|
775
848
|
};
|
|
776
849
|
|
|
777
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
850
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/decorator/actions/decorate.js
|
|
778
851
|
function decorate(decorators, target, parameterIndexOrProperty, parameterIndex) {
|
|
779
852
|
const parsedDecorators = Array.isArray(decorators) ? decorators : [decorators];
|
|
780
853
|
if (parameterIndexOrProperty === void 0) {
|
|
@@ -796,12 +869,12 @@ function decorate(decorators, target, parameterIndexOrProperty, parameterIndex)
|
|
|
796
869
|
}
|
|
797
870
|
}
|
|
798
871
|
|
|
799
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
872
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/calculations/getDefaultPendingClassMetadataCount.js
|
|
800
873
|
function getDefaultPendingClassMetadataCount() {
|
|
801
874
|
return 0;
|
|
802
875
|
}
|
|
803
876
|
|
|
804
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
877
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/actions/decrementPendingClassMetadataCount.js
|
|
805
878
|
function decrementPendingClassMetadataCount(type) {
|
|
806
879
|
return (metadata) => {
|
|
807
880
|
if (metadata !== void 0 && metadata.kind === MaybeClassElementMetadataKind.unknown) {
|
|
@@ -810,7 +883,7 @@ function decrementPendingClassMetadataCount(type) {
|
|
|
810
883
|
};
|
|
811
884
|
}
|
|
812
885
|
|
|
813
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
886
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/models/ClassElementMetadataKind.js
|
|
814
887
|
var ClassElementMetadataKind;
|
|
815
888
|
(function(ClassElementMetadataKind2) {
|
|
816
889
|
ClassElementMetadataKind2[ClassElementMetadataKind2["multipleInjection"] = 0] = "multipleInjection";
|
|
@@ -818,7 +891,7 @@ var ClassElementMetadataKind;
|
|
|
818
891
|
ClassElementMetadataKind2[ClassElementMetadataKind2["unmanaged"] = 2] = "unmanaged";
|
|
819
892
|
})(ClassElementMetadataKind || (ClassElementMetadataKind = {}));
|
|
820
893
|
|
|
821
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
894
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/calculations/buildClassElementMetadataFromMaybeClassElementMetadata.js
|
|
822
895
|
function buildClassElementMetadataFromMaybeClassElementMetadata(buildDefaultMetadata, buildMetadataFromMaybeManagedMetadata) {
|
|
823
896
|
return (...params) => (metadata) => {
|
|
824
897
|
if (metadata === void 0) {
|
|
@@ -831,7 +904,7 @@ function buildClassElementMetadataFromMaybeClassElementMetadata(buildDefaultMeta
|
|
|
831
904
|
};
|
|
832
905
|
}
|
|
833
906
|
|
|
834
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
907
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/calculations/buildDefaultManagedMetadata.js
|
|
835
908
|
function buildDefaultManagedMetadata(kind, serviceIdentifier, options) {
|
|
836
909
|
if (kind === ClassElementMetadataKind.multipleInjection) {
|
|
837
910
|
return {
|
|
@@ -853,14 +926,14 @@ function buildDefaultManagedMetadata(kind, serviceIdentifier, options) {
|
|
|
853
926
|
}
|
|
854
927
|
}
|
|
855
928
|
|
|
856
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
929
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/calculations/assertMetadataFromTypescriptIfManaged.js
|
|
857
930
|
function assertMetadataFromTypescriptIfManaged(metadata) {
|
|
858
931
|
if (metadata.kind !== MaybeClassElementMetadataKind.unknown && metadata.isFromTypescriptParamType !== true) {
|
|
859
932
|
throw new InversifyCoreError(InversifyCoreErrorKind.injectionDecoratorConflict, "Unexpected injection found. Multiple @inject, @multiInject or @unmanaged decorators found");
|
|
860
933
|
}
|
|
861
934
|
}
|
|
862
935
|
|
|
863
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
936
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/calculations/buildManagedMetadataFromMaybeManagedMetadata.js
|
|
864
937
|
function buildManagedMetadataFromMaybeManagedMetadata(metadata, kind, serviceIdentifier, options) {
|
|
865
938
|
assertMetadataFromTypescriptIfManaged(metadata);
|
|
866
939
|
if (kind === ClassElementMetadataKind.multipleInjection) {
|
|
@@ -879,10 +952,10 @@ function buildManagedMetadataFromMaybeManagedMetadata(metadata, kind, serviceIde
|
|
|
879
952
|
}
|
|
880
953
|
}
|
|
881
954
|
|
|
882
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
955
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/calculations/buildManagedMetadataFromMaybeClassElementMetadata.js
|
|
883
956
|
var buildManagedMetadataFromMaybeClassElementMetadata = buildClassElementMetadataFromMaybeClassElementMetadata(buildDefaultManagedMetadata, buildManagedMetadataFromMaybeManagedMetadata);
|
|
884
957
|
|
|
885
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
958
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/actions/updateMaybeClassMetadataConstructorArgument.js
|
|
886
959
|
function updateMaybeClassMetadataConstructorArgument(updateMetadata, index) {
|
|
887
960
|
return (classMetadata) => {
|
|
888
961
|
const propertyMetadata = classMetadata.constructorArguments[index];
|
|
@@ -891,7 +964,7 @@ function updateMaybeClassMetadataConstructorArgument(updateMetadata, index) {
|
|
|
891
964
|
};
|
|
892
965
|
}
|
|
893
966
|
|
|
894
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
967
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/actions/updateMaybeClassMetadataProperty.js
|
|
895
968
|
function updateMaybeClassMetadataProperty(updateMetadata, propertyKey) {
|
|
896
969
|
return (classMetadata) => {
|
|
897
970
|
const propertyMetadata = classMetadata.properties.get(propertyKey);
|
|
@@ -900,7 +973,7 @@ function updateMaybeClassMetadataProperty(updateMetadata, propertyKey) {
|
|
|
900
973
|
};
|
|
901
974
|
}
|
|
902
975
|
|
|
903
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
976
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/decorator/models/DecoratorInfoKind.js
|
|
904
977
|
var DecoratorInfoKind;
|
|
905
978
|
(function(DecoratorInfoKind2) {
|
|
906
979
|
DecoratorInfoKind2[DecoratorInfoKind2["method"] = 0] = "method";
|
|
@@ -908,7 +981,7 @@ var DecoratorInfoKind;
|
|
|
908
981
|
DecoratorInfoKind2[DecoratorInfoKind2["property"] = 2] = "property";
|
|
909
982
|
})(DecoratorInfoKind || (DecoratorInfoKind = {}));
|
|
910
983
|
|
|
911
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
984
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/decorator/calculations/getDecoratorInfo.js
|
|
912
985
|
function getDecoratorInfo(target, propertyKey, parameterIndexOrDescriptor) {
|
|
913
986
|
if (parameterIndexOrDescriptor === void 0) {
|
|
914
987
|
if (propertyKey === void 0) {
|
|
@@ -936,7 +1009,7 @@ function getDecoratorInfo(target, propertyKey, parameterIndexOrDescriptor) {
|
|
|
936
1009
|
};
|
|
937
1010
|
}
|
|
938
1011
|
|
|
939
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1012
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/decorator/calculations/stringifyDecoratorInfo.js
|
|
940
1013
|
function stringifyDecoratorInfo(decoratorTargetInfo) {
|
|
941
1014
|
switch (decoratorTargetInfo.kind) {
|
|
942
1015
|
case DecoratorInfoKind.method:
|
|
@@ -948,7 +1021,7 @@ function stringifyDecoratorInfo(decoratorTargetInfo) {
|
|
|
948
1021
|
}
|
|
949
1022
|
}
|
|
950
1023
|
|
|
951
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1024
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/calculations/handleInjectionError.js
|
|
952
1025
|
function handleInjectionError(target, propertyKey, parameterIndex, error) {
|
|
953
1026
|
if (InversifyCoreError.isErrorOfKind(error, InversifyCoreErrorKind.injectionDecoratorConflict)) {
|
|
954
1027
|
const info = getDecoratorInfo(target, propertyKey, parameterIndex);
|
|
@@ -965,7 +1038,7 @@ ${stringifyDecoratorInfo(info)}`, { cause: error });
|
|
|
965
1038
|
throw error;
|
|
966
1039
|
}
|
|
967
1040
|
|
|
968
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1041
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/decorators/injectBase.js
|
|
969
1042
|
function injectBase(updateMetadata, updatePendingClassMetadataCount) {
|
|
970
1043
|
const decorator = (target, propertyKey, parameterIndexOrDescriptor) => {
|
|
971
1044
|
try {
|
|
@@ -1028,16 +1101,16 @@ function isPropertySetter(descriptor) {
|
|
|
1028
1101
|
return descriptor.set !== void 0;
|
|
1029
1102
|
}
|
|
1030
1103
|
|
|
1031
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1104
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/decorators/inject.js
|
|
1032
1105
|
function inject(serviceIdentifier) {
|
|
1033
1106
|
const updateMetadata = buildManagedMetadataFromMaybeClassElementMetadata(ClassElementMetadataKind.singleInjection, serviceIdentifier);
|
|
1034
1107
|
return injectBase(updateMetadata, decrementPendingClassMetadataCount);
|
|
1035
1108
|
}
|
|
1036
1109
|
|
|
1037
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1110
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/reflectMetadata/data/classIsInjectableFlagReflectKey.js
|
|
1038
1111
|
var classIsInjectableFlagReflectKey = "@inversifyjs/core/classIsInjectableFlagReflectKey";
|
|
1039
1112
|
|
|
1040
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1113
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/actions/setIsInjectableFlag.js
|
|
1041
1114
|
function setIsInjectableFlag(target) {
|
|
1042
1115
|
const isInjectableFlag = getOwnReflectMetadata(target, classIsInjectableFlagReflectKey);
|
|
1043
1116
|
if (isInjectableFlag !== void 0) {
|
|
@@ -1046,10 +1119,10 @@ function setIsInjectableFlag(target) {
|
|
|
1046
1119
|
setReflectMetadata(target, classIsInjectableFlagReflectKey, true);
|
|
1047
1120
|
}
|
|
1048
1121
|
|
|
1049
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1122
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/reflectMetadata/data/typescriptDesignParameterTypesReflectKey.js
|
|
1050
1123
|
var typescriptParameterTypesReflectKey = "design:paramtypes";
|
|
1051
1124
|
|
|
1052
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1125
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/calculations/buildClassElementMetadataFromTypescriptParameterType.js
|
|
1053
1126
|
function buildClassElementMetadataFromTypescriptParameterType(type) {
|
|
1054
1127
|
return {
|
|
1055
1128
|
isFromTypescriptParamType: true,
|
|
@@ -1061,7 +1134,7 @@ function buildClassElementMetadataFromTypescriptParameterType(type) {
|
|
|
1061
1134
|
};
|
|
1062
1135
|
}
|
|
1063
1136
|
|
|
1064
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1137
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/calculations/isUserlandEmittedType.js
|
|
1065
1138
|
var NON_USERLAND_TYPES = [
|
|
1066
1139
|
Array,
|
|
1067
1140
|
BigInt,
|
|
@@ -1075,7 +1148,7 @@ function isUserlandEmittedType(type) {
|
|
|
1075
1148
|
return !NON_USERLAND_TYPES.includes(type);
|
|
1076
1149
|
}
|
|
1077
1150
|
|
|
1078
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1151
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/actions/updateClassMetadataWithTypescriptParameterTypes.js
|
|
1079
1152
|
function updateClassMetadataWithTypescriptParameterTypes(target) {
|
|
1080
1153
|
const typescriptConstructorArguments = getOwnReflectMetadata(target, typescriptParameterTypesReflectKey);
|
|
1081
1154
|
if (typescriptConstructorArguments !== void 0) {
|
|
@@ -1093,7 +1166,7 @@ function updateMaybeClassMetadataWithTypescriptClassMetadata(typescriptConstruct
|
|
|
1093
1166
|
};
|
|
1094
1167
|
}
|
|
1095
1168
|
|
|
1096
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1169
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/decorators/injectable.js
|
|
1097
1170
|
function injectable(scope) {
|
|
1098
1171
|
return (target) => {
|
|
1099
1172
|
setIsInjectableFlag(target);
|
|
@@ -1107,14 +1180,14 @@ function injectable(scope) {
|
|
|
1107
1180
|
};
|
|
1108
1181
|
}
|
|
1109
1182
|
|
|
1110
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1183
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/calculations/buildDefaultUnmanagedMetadata.js
|
|
1111
1184
|
function buildDefaultUnmanagedMetadata() {
|
|
1112
1185
|
return {
|
|
1113
1186
|
kind: ClassElementMetadataKind.unmanaged
|
|
1114
1187
|
};
|
|
1115
1188
|
}
|
|
1116
1189
|
|
|
1117
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1190
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/calculations/buildUnmanagedMetadataFromMaybeManagedMetadata.js
|
|
1118
1191
|
function buildUnmanagedMetadataFromMaybeManagedMetadata(metadata) {
|
|
1119
1192
|
assertMetadataFromTypescriptIfManaged(metadata);
|
|
1120
1193
|
if (hasManagedMetadata(metadata)) {
|
|
@@ -1126,23 +1199,23 @@ function hasManagedMetadata(metadata) {
|
|
|
1126
1199
|
return metadata.name !== void 0 || metadata.optional || metadata.tags.size > 0;
|
|
1127
1200
|
}
|
|
1128
1201
|
|
|
1129
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1202
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/calculations/buildUnmanagedMetadataFromMaybeClassElementMetadata.js
|
|
1130
1203
|
var buildUnmanagedMetadataFromMaybeClassElementMetadata = buildClassElementMetadataFromMaybeClassElementMetadata(buildDefaultUnmanagedMetadata, buildUnmanagedMetadataFromMaybeManagedMetadata);
|
|
1131
1204
|
|
|
1132
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1205
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/decorators/unmanaged.js
|
|
1133
1206
|
function unmanaged() {
|
|
1134
1207
|
const updateMetadata = buildUnmanagedMetadataFromMaybeClassElementMetadata();
|
|
1135
1208
|
return injectBase(updateMetadata, decrementPendingClassMetadataCount);
|
|
1136
1209
|
}
|
|
1137
1210
|
|
|
1138
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1211
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/metadata/models/ResolvedValueElementMetadataKind.js
|
|
1139
1212
|
var ResolvedValueElementMetadataKind;
|
|
1140
1213
|
(function(ResolvedValueElementMetadataKind2) {
|
|
1141
1214
|
ResolvedValueElementMetadataKind2[ResolvedValueElementMetadataKind2["multipleInjection"] = 0] = "multipleInjection";
|
|
1142
1215
|
ResolvedValueElementMetadataKind2[ResolvedValueElementMetadataKind2["singleInjection"] = 1] = "singleInjection";
|
|
1143
1216
|
})(ResolvedValueElementMetadataKind || (ResolvedValueElementMetadataKind = {}));
|
|
1144
1217
|
|
|
1145
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1218
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/buildGetPlanOptionsFromPlanParams.js
|
|
1146
1219
|
function buildGetPlanOptionsFromPlanParams(params) {
|
|
1147
1220
|
if (params.rootConstraints.isMultiple) {
|
|
1148
1221
|
return {
|
|
@@ -1164,7 +1237,242 @@ function buildGetPlanOptionsFromPlanParams(params) {
|
|
|
1164
1237
|
}
|
|
1165
1238
|
}
|
|
1166
1239
|
|
|
1167
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1240
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/binding/models/BindingConstraintsImplementation.js
|
|
1241
|
+
var BindingConstraintsImplementation = class _BindingConstraintsImplementation {
|
|
1242
|
+
#node;
|
|
1243
|
+
constructor(node) {
|
|
1244
|
+
this.#node = node;
|
|
1245
|
+
}
|
|
1246
|
+
get name() {
|
|
1247
|
+
return this.#node.elem.name;
|
|
1248
|
+
}
|
|
1249
|
+
get serviceIdentifier() {
|
|
1250
|
+
return this.#node.elem.serviceIdentifier;
|
|
1251
|
+
}
|
|
1252
|
+
get tags() {
|
|
1253
|
+
return this.#node.elem.tags;
|
|
1254
|
+
}
|
|
1255
|
+
getAncestor() {
|
|
1256
|
+
this.#node.elem.getAncestorsCalled = true;
|
|
1257
|
+
if (this.#node.previous === void 0) {
|
|
1258
|
+
return void 0;
|
|
1259
|
+
}
|
|
1260
|
+
return new _BindingConstraintsImplementation(this.#node.previous);
|
|
1261
|
+
}
|
|
1262
|
+
};
|
|
1263
|
+
|
|
1264
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/isPlanServiceRedirectionBindingNode.js
|
|
1265
|
+
var REDIRECTION_KEY = "redirection";
|
|
1266
|
+
function isPlanServiceRedirectionBindingNode(node) {
|
|
1267
|
+
return REDIRECTION_KEY in node;
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveServiceRedirectionBindingNode.js
|
|
1271
|
+
function resolveBindingNode(params, planBindingNode) {
|
|
1272
|
+
if (isPlanServiceRedirectionBindingNode(planBindingNode)) {
|
|
1273
|
+
return resolveServiceRedirectionBindingNode(params, planBindingNode);
|
|
1274
|
+
}
|
|
1275
|
+
return [planBindingNode.resolve(params)];
|
|
1276
|
+
}
|
|
1277
|
+
function resolveServiceRedirectionBindingNode(params, node) {
|
|
1278
|
+
if (node.redirection.bindings === void 0) {
|
|
1279
|
+
return [];
|
|
1280
|
+
}
|
|
1281
|
+
if (Array.isArray(node.redirection.bindings)) {
|
|
1282
|
+
return node.redirection.bindings.flatMap((binding) => resolveBindingNode(params, binding));
|
|
1283
|
+
}
|
|
1284
|
+
return resolveBindingNode(params, node.redirection.bindings);
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveMultipleBindingServiceNode.js
|
|
1288
|
+
function resolveMultipleBindingServiceNode(params, bindings) {
|
|
1289
|
+
const resolvedValues = [];
|
|
1290
|
+
for (const binding of bindings) {
|
|
1291
|
+
if (isPlanServiceRedirectionBindingNode(binding)) {
|
|
1292
|
+
resolvedValues.push(...resolveServiceRedirectionBindingNode(params, binding));
|
|
1293
|
+
} else {
|
|
1294
|
+
resolvedValues.push(binding.resolve(params));
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
if (resolvedValues.some(isPromise)) {
|
|
1298
|
+
return Promise.all(resolvedValues);
|
|
1299
|
+
}
|
|
1300
|
+
return resolvedValues;
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/models/PlanMultipleBindingServiceNodeImplementation.js
|
|
1304
|
+
var PlanMultipleBindingServiceNodeImplementation = class {
|
|
1305
|
+
bindings;
|
|
1306
|
+
serviceIdentifier;
|
|
1307
|
+
isContextFree;
|
|
1308
|
+
constructor(bindings, serviceIdentifier) {
|
|
1309
|
+
this.bindings = bindings;
|
|
1310
|
+
this.serviceIdentifier = serviceIdentifier;
|
|
1311
|
+
this.isContextFree = true;
|
|
1312
|
+
}
|
|
1313
|
+
resolve(params) {
|
|
1314
|
+
return resolveMultipleBindingServiceNode(params, this.bindings);
|
|
1315
|
+
}
|
|
1316
|
+
};
|
|
1317
|
+
|
|
1318
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/models/DynamicallyResolvableBindingNode.js
|
|
1319
|
+
var isDynamicallyResolvableBindingNodeSymbol = /* @__PURE__ */ Symbol.for("@inversifyjs/core/DynamicallyResolvableBindingNode");
|
|
1320
|
+
|
|
1321
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/isDynamicallyResolvableBindingNode.js
|
|
1322
|
+
function isDynamicallyResolvableBindingNode(node) {
|
|
1323
|
+
return node[isDynamicallyResolvableBindingNodeSymbol] === true;
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/models/PlanSingleBindingServiceNode.js
|
|
1327
|
+
var UNDEFINED_RESOLVE = () => void 0;
|
|
1328
|
+
var RESOLVE_KEY = "resolve";
|
|
1329
|
+
var PlanSingleBindingServiceNodeImplementation = class {
|
|
1330
|
+
serviceIdentifier;
|
|
1331
|
+
isContextFree;
|
|
1332
|
+
resolve;
|
|
1333
|
+
#binding;
|
|
1334
|
+
constructor(serviceIdentifier) {
|
|
1335
|
+
this.serviceIdentifier = serviceIdentifier;
|
|
1336
|
+
this.isContextFree = true;
|
|
1337
|
+
this.resolve = UNDEFINED_RESOLVE;
|
|
1338
|
+
}
|
|
1339
|
+
get bindings() {
|
|
1340
|
+
return this.#binding;
|
|
1341
|
+
}
|
|
1342
|
+
set bindings(value) {
|
|
1343
|
+
this.#binding = value;
|
|
1344
|
+
if (value === void 0) {
|
|
1345
|
+
this.resolve = UNDEFINED_RESOLVE;
|
|
1346
|
+
} else {
|
|
1347
|
+
this.resolve = Object.hasOwn(value, RESOLVE_KEY) ? value.resolve : value.resolve.bind(value);
|
|
1348
|
+
if (isDynamicallyResolvableBindingNode(value)) {
|
|
1349
|
+
const serviceNodeWeakReference = new WeakRef(this);
|
|
1350
|
+
value.addOnResolverChangedHandler((newResolver) => {
|
|
1351
|
+
const serviceNode = serviceNodeWeakReference.deref();
|
|
1352
|
+
if (serviceNode !== void 0) {
|
|
1353
|
+
serviceNode.resolve = newResolver;
|
|
1354
|
+
}
|
|
1355
|
+
});
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1359
|
+
};
|
|
1360
|
+
|
|
1361
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/buildFilteredServiceBindings.js
|
|
1362
|
+
function buildFilteredServiceBindings(params, bindingConstraints, options) {
|
|
1363
|
+
const serviceIdentifier = options?.customServiceIdentifier ?? bindingConstraints.serviceIdentifier;
|
|
1364
|
+
const serviceBindings = options?.chained === true ? [...params.operations.getBindingsChained(serviceIdentifier)] : [...params.operations.getBindings(serviceIdentifier) ?? []];
|
|
1365
|
+
const filteredBindings = serviceBindings.filter((binding) => binding.isSatisfiedBy(bindingConstraints));
|
|
1366
|
+
if (filteredBindings.length === 0 && params.autobindOptions !== void 0 && typeof serviceIdentifier === "function") {
|
|
1367
|
+
const binding = buildInstanceBinding(params.autobindOptions, serviceIdentifier);
|
|
1368
|
+
params.operations.setBinding(binding);
|
|
1369
|
+
if (binding.isSatisfiedBy(bindingConstraints)) {
|
|
1370
|
+
filteredBindings.push(binding);
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
return filteredBindings;
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/binding/calculations/stringifyBinding.js
|
|
1377
|
+
function stringifyBinding(binding) {
|
|
1378
|
+
switch (binding.type) {
|
|
1379
|
+
case bindingTypeValues.Instance:
|
|
1380
|
+
return `[ type: "${binding.type}", serviceIdentifier: "${stringifyServiceIdentifier(binding.serviceIdentifier)}", scope: "${binding.scope}", implementationType: "${binding.implementationType.name}" ]`;
|
|
1381
|
+
case bindingTypeValues.ServiceRedirection:
|
|
1382
|
+
return `[ type: "${binding.type}", serviceIdentifier: "${stringifyServiceIdentifier(binding.serviceIdentifier)}", redirection: "${stringifyServiceIdentifier(binding.targetServiceIdentifier)}" ]`;
|
|
1383
|
+
default:
|
|
1384
|
+
return `[ type: "${binding.type}", serviceIdentifier: "${stringifyServiceIdentifier(binding.serviceIdentifier)}", scope: "${binding.scope}" ]`;
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/throwErrorWhenUnexpectedBindingsAmountFound.js
|
|
1389
|
+
var SINGLE_SERVICE_NODE_BINDINGS = 1;
|
|
1390
|
+
function throwErrorWhenUnexpectedBindingsAmountFound(bindingNodes, isOptional, bindingConstraintNode) {
|
|
1391
|
+
const serviceIdentifier = bindingConstraintNode.elem.serviceIdentifier;
|
|
1392
|
+
const parentServiceIdentifier = bindingConstraintNode.previous?.elem.serviceIdentifier;
|
|
1393
|
+
if (Array.isArray(bindingNodes)) {
|
|
1394
|
+
throwErrorWhenMultipleUnexpectedBindingsAmountFound(bindingNodes, isOptional, serviceIdentifier, parentServiceIdentifier, bindingConstraintNode.elem);
|
|
1395
|
+
} else {
|
|
1396
|
+
throwErrorWhenSingleUnexpectedBindingFound(bindingNodes, isOptional, serviceIdentifier, parentServiceIdentifier, bindingConstraintNode.elem);
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
function throwBindingNotFoundError(serviceIdentifier, parentServiceIdentifier, bindingConstraints) {
|
|
1400
|
+
const errorMessage = `No bindings found for service: "${stringifyServiceIdentifier(serviceIdentifier)}".
|
|
1401
|
+
|
|
1402
|
+
Trying to resolve bindings for "${stringifyParentServiceIdentifier(serviceIdentifier, parentServiceIdentifier)}".${stringifyBindingConstraints(bindingConstraints)}`;
|
|
1403
|
+
throw new InversifyCoreError(InversifyCoreErrorKind.planning, errorMessage);
|
|
1404
|
+
}
|
|
1405
|
+
function throwErrorWhenMultipleUnexpectedBindingsAmountFound(bindingNodes, isOptional, serviceIdentifier, parentServiceIdentifier, bindingConstraints) {
|
|
1406
|
+
if (bindingNodes.length === SINGLE_SERVICE_NODE_BINDINGS) {
|
|
1407
|
+
return;
|
|
1408
|
+
}
|
|
1409
|
+
if (bindingNodes.length === 0) {
|
|
1410
|
+
if (!isOptional) {
|
|
1411
|
+
throwBindingNotFoundError(serviceIdentifier, parentServiceIdentifier, bindingConstraints);
|
|
1412
|
+
}
|
|
1413
|
+
} else {
|
|
1414
|
+
const errorMessage = `Ambiguous bindings found for service: "${stringifyServiceIdentifier(serviceIdentifier)}".
|
|
1415
|
+
|
|
1416
|
+
Registered bindings:
|
|
1417
|
+
|
|
1418
|
+
${bindingNodes.map((bindingNode) => stringifyBinding(bindingNode.binding)).join("\n")}
|
|
1419
|
+
|
|
1420
|
+
Trying to resolve bindings for "${stringifyParentServiceIdentifier(serviceIdentifier, parentServiceIdentifier)}".${stringifyBindingConstraints(bindingConstraints)}`;
|
|
1421
|
+
throw new InversifyCoreError(InversifyCoreErrorKind.planning, errorMessage);
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
function throwErrorWhenSingleUnexpectedBindingFound(bindingNode, isOptional, serviceIdentifier, parentServiceIdentifier, bindingConstraints) {
|
|
1425
|
+
if (bindingNode === void 0 && !isOptional) {
|
|
1426
|
+
throwBindingNotFoundError(serviceIdentifier, parentServiceIdentifier, bindingConstraints);
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
function stringifyParentServiceIdentifier(serviceIdentifier, parentServiceIdentifier) {
|
|
1430
|
+
return parentServiceIdentifier === void 0 ? `${stringifyServiceIdentifier(serviceIdentifier)} (Root service)` : stringifyServiceIdentifier(parentServiceIdentifier);
|
|
1431
|
+
}
|
|
1432
|
+
function stringifyBindingConstraints(bindingConstraints) {
|
|
1433
|
+
const stringifiedTags = bindingConstraints.tags.size === 0 ? "" : `
|
|
1434
|
+
- tags:
|
|
1435
|
+
- ${[...bindingConstraints.tags.keys()].map((key) => key.toString()).join("\n - ")}`;
|
|
1436
|
+
return `
|
|
1437
|
+
|
|
1438
|
+
Binding constraints:
|
|
1439
|
+
- service identifier: ${stringifyServiceIdentifier(bindingConstraints.serviceIdentifier)}
|
|
1440
|
+
- name: ${bindingConstraints.name?.toString() ?? "-"}${stringifiedTags}`;
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/curryBuildPlanServiceNodeFromOptions.js
|
|
1444
|
+
function curryBuildPlanServiceNodeFromOptions(buildServiceNodeBindings3) {
|
|
1445
|
+
return (params, bindingConstraintsList, options) => {
|
|
1446
|
+
const serviceIdentifier = options.serviceIdentifier;
|
|
1447
|
+
const updatedBindingConstraintsList = bindingConstraintsList.concat({
|
|
1448
|
+
getAncestorsCalled: false,
|
|
1449
|
+
name: options.name,
|
|
1450
|
+
serviceIdentifier,
|
|
1451
|
+
tags: options.tags
|
|
1452
|
+
});
|
|
1453
|
+
const bindingConstraints = new BindingConstraintsImplementation(updatedBindingConstraintsList.last);
|
|
1454
|
+
const chained = options.isMultiple && options.chained;
|
|
1455
|
+
const filteredServiceBindings = buildFilteredServiceBindings(params, bindingConstraints, {
|
|
1456
|
+
chained
|
|
1457
|
+
});
|
|
1458
|
+
const serviceNodeBindings = [];
|
|
1459
|
+
if (options.isMultiple) {
|
|
1460
|
+
const serviceNode2 = new PlanMultipleBindingServiceNodeImplementation(serviceNodeBindings, serviceIdentifier);
|
|
1461
|
+
serviceNodeBindings.push(...buildServiceNodeBindings3(params, updatedBindingConstraintsList, filteredServiceBindings, serviceNode2, options));
|
|
1462
|
+
serviceNode2.isContextFree = !updatedBindingConstraintsList.last.elem.getAncestorsCalled;
|
|
1463
|
+
return serviceNode2;
|
|
1464
|
+
}
|
|
1465
|
+
const serviceNode = new PlanSingleBindingServiceNodeImplementation(serviceIdentifier);
|
|
1466
|
+
serviceNodeBindings.push(...buildServiceNodeBindings3(params, updatedBindingConstraintsList, filteredServiceBindings, serviceNode, options));
|
|
1467
|
+
serviceNode.isContextFree = !updatedBindingConstraintsList.last.elem.getAncestorsCalled;
|
|
1468
|
+
throwErrorWhenUnexpectedBindingsAmountFound(serviceNodeBindings, options.optional, updatedBindingConstraintsList.last);
|
|
1469
|
+
const [planBindingNode] = serviceNodeBindings;
|
|
1470
|
+
serviceNode.bindings = planBindingNode;
|
|
1471
|
+
return serviceNode;
|
|
1472
|
+
};
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/error/calculations/isStackOverflowError.js
|
|
1168
1476
|
var STACK_OVERFLOW_PATTERNS = /stack space|call stack|too much recursion/i;
|
|
1169
1477
|
var SPIDER_MONKEY_REGEXP = /too much recursion/;
|
|
1170
1478
|
function isStackOverflowError(error) {
|
|
@@ -1181,7 +1489,7 @@ function isStackOverflowError(error) {
|
|
|
1181
1489
|
}
|
|
1182
1490
|
}
|
|
1183
1491
|
|
|
1184
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1492
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/handlePlanError.js
|
|
1185
1493
|
function extractLikelyCircularDependency(params) {
|
|
1186
1494
|
const serviceIdentifiers = /* @__PURE__ */ new Set();
|
|
1187
1495
|
for (const serviceIdentifier of params.servicesBranch) {
|
|
@@ -1207,7 +1515,7 @@ function stringifyServiceIdentifierTrace(serviceIdentifiers) {
|
|
|
1207
1515
|
return serviceIdentifiersArray.map(stringifyServiceIdentifier).join(" -> ");
|
|
1208
1516
|
}
|
|
1209
1517
|
|
|
1210
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1518
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/models/LazyPlanServiceNode.js
|
|
1211
1519
|
var isLazyPlanServiceNodeSymbol = /* @__PURE__ */ Symbol.for("@inversifyjs/core/LazyPlanServiceNode");
|
|
1212
1520
|
var LazyPlanServiceNode = class {
|
|
1213
1521
|
[isLazyPlanServiceNodeSymbol];
|
|
@@ -1242,6 +1550,9 @@ var LazyPlanServiceNode = class {
|
|
|
1242
1550
|
isExpanded() {
|
|
1243
1551
|
return this._serviceNode !== void 0;
|
|
1244
1552
|
}
|
|
1553
|
+
resolve(params) {
|
|
1554
|
+
return this._getNode().resolve(params);
|
|
1555
|
+
}
|
|
1245
1556
|
_getNode() {
|
|
1246
1557
|
if (this._serviceNode === void 0) {
|
|
1247
1558
|
this._serviceNode = this._buildPlanServiceNode();
|
|
@@ -1250,46 +1561,32 @@ var LazyPlanServiceNode = class {
|
|
|
1250
1561
|
}
|
|
1251
1562
|
};
|
|
1252
1563
|
|
|
1253
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
}
|
|
1259
|
-
get name() {
|
|
1260
|
-
return this.#node.elem.name;
|
|
1261
|
-
}
|
|
1262
|
-
get serviceIdentifier() {
|
|
1263
|
-
return this.#node.elem.serviceIdentifier;
|
|
1264
|
-
}
|
|
1265
|
-
get tags() {
|
|
1266
|
-
return this.#node.elem.tags;
|
|
1267
|
-
}
|
|
1268
|
-
getAncestor() {
|
|
1269
|
-
this.#node.elem.getAncestorsCalled = true;
|
|
1270
|
-
if (this.#node.previous === void 0) {
|
|
1271
|
-
return void 0;
|
|
1272
|
-
}
|
|
1273
|
-
return new _BindingConstraintsImplementation(this.#node.previous);
|
|
1564
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/common/calculations/buildBuildServiceNodeOptionsFromPlanParamsConstraints.js
|
|
1565
|
+
function buildBuildServiceNodeOptionsFromPlanParamsConstraints(constraints) {
|
|
1566
|
+
const tags = /* @__PURE__ */ new Map();
|
|
1567
|
+
if (constraints.tag !== void 0) {
|
|
1568
|
+
tags.set(constraints.tag.key, constraints.tag.value);
|
|
1274
1569
|
}
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
params.operations.setBinding(binding);
|
|
1285
|
-
if (binding.isSatisfiedBy(bindingConstraints)) {
|
|
1286
|
-
filteredBindings.push(binding);
|
|
1287
|
-
}
|
|
1570
|
+
if (constraints.isMultiple) {
|
|
1571
|
+
return {
|
|
1572
|
+
chained: constraints.chained,
|
|
1573
|
+
isMultiple: constraints.isMultiple,
|
|
1574
|
+
name: constraints.name,
|
|
1575
|
+
optional: constraints.isOptional ?? false,
|
|
1576
|
+
serviceIdentifier: constraints.serviceIdentifier,
|
|
1577
|
+
tags
|
|
1578
|
+
};
|
|
1288
1579
|
}
|
|
1289
|
-
return
|
|
1580
|
+
return {
|
|
1581
|
+
isMultiple: constraints.isMultiple,
|
|
1582
|
+
name: constraints.name,
|
|
1583
|
+
optional: constraints.isOptional ?? false,
|
|
1584
|
+
serviceIdentifier: constraints.serviceIdentifier,
|
|
1585
|
+
tags
|
|
1586
|
+
};
|
|
1290
1587
|
}
|
|
1291
1588
|
|
|
1292
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1589
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/common/models/SingleImmutableLinkedList.js
|
|
1293
1590
|
var SingleImmutableLinkedList = class _SingleImmutableLinkedList {
|
|
1294
1591
|
last;
|
|
1295
1592
|
length;
|
|
@@ -1324,7 +1621,7 @@ var SingleImmutableLinkedList = class _SingleImmutableLinkedList {
|
|
|
1324
1621
|
}
|
|
1325
1622
|
};
|
|
1326
1623
|
|
|
1327
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1624
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/buildPlanBindingConstraintsList.js
|
|
1328
1625
|
function buildPlanBindingConstraintsList(params) {
|
|
1329
1626
|
const tags = /* @__PURE__ */ new Map();
|
|
1330
1627
|
if (params.rootConstraints.tag !== void 0) {
|
|
@@ -1341,218 +1638,1809 @@ function buildPlanBindingConstraintsList(params) {
|
|
|
1341
1638
|
}, 1);
|
|
1342
1639
|
}
|
|
1343
1640
|
|
|
1344
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1345
|
-
function
|
|
1346
|
-
return
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1641
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/actions/curryBuildPlanServiceNode.js
|
|
1642
|
+
function curryBuildPlanServiceNode(buildServiceNodeBindings3) {
|
|
1643
|
+
return (params) => {
|
|
1644
|
+
const bindingConstraintsList = buildPlanBindingConstraintsList(params);
|
|
1645
|
+
const bindingConstraints = new BindingConstraintsImplementation(bindingConstraintsList.last);
|
|
1646
|
+
const chained = params.rootConstraints.isMultiple && params.rootConstraints.chained;
|
|
1647
|
+
const filteredServiceBindings = buildFilteredServiceBindings(params, bindingConstraints, {
|
|
1648
|
+
chained
|
|
1649
|
+
});
|
|
1650
|
+
const serviceNodeBindings = [];
|
|
1651
|
+
if (params.rootConstraints.isMultiple) {
|
|
1652
|
+
const serviceNode2 = new PlanMultipleBindingServiceNodeImplementation(serviceNodeBindings, params.rootConstraints.serviceIdentifier);
|
|
1653
|
+
serviceNodeBindings.push(...buildServiceNodeBindings3(params, bindingConstraintsList, filteredServiceBindings, serviceNode2, buildBuildServiceNodeOptionsFromPlanParamsConstraints(params.rootConstraints)));
|
|
1654
|
+
serviceNode2.isContextFree = !bindingConstraintsList.last.elem.getAncestorsCalled;
|
|
1655
|
+
return serviceNode2;
|
|
1656
|
+
}
|
|
1657
|
+
const serviceNode = new PlanSingleBindingServiceNodeImplementation(params.rootConstraints.serviceIdentifier);
|
|
1658
|
+
serviceNodeBindings.push(...buildServiceNodeBindings3(params, bindingConstraintsList, filteredServiceBindings, serviceNode, buildBuildServiceNodeOptionsFromPlanParamsConstraints(params.rootConstraints)));
|
|
1659
|
+
serviceNode.isContextFree = !bindingConstraintsList.last.elem.getAncestorsCalled;
|
|
1660
|
+
throwErrorWhenUnexpectedBindingsAmountFound(serviceNodeBindings, params.rootConstraints.isOptional ?? false, bindingConstraintsList.last);
|
|
1661
|
+
const [planBindingNode] = serviceNodeBindings;
|
|
1662
|
+
serviceNode.bindings = planBindingNode;
|
|
1663
|
+
return serviceNode;
|
|
1664
|
+
};
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/cacheResolvedValue.js
|
|
1668
|
+
function cacheResolvedValue(binding, resolvedValue) {
|
|
1669
|
+
if (isPromise(resolvedValue)) {
|
|
1670
|
+
binding.cache = {
|
|
1671
|
+
isRight: true,
|
|
1672
|
+
value: resolvedValue
|
|
1673
|
+
};
|
|
1674
|
+
return resolvedValue.then((syncResolvedValue) => cacheSyncResolvedValue(binding, syncResolvedValue));
|
|
1358
1675
|
}
|
|
1676
|
+
return cacheSyncResolvedValue(binding, resolvedValue);
|
|
1677
|
+
}
|
|
1678
|
+
function cacheSyncResolvedValue(binding, resolvedValue) {
|
|
1679
|
+
binding.cache = {
|
|
1680
|
+
isRight: true,
|
|
1681
|
+
value: resolvedValue
|
|
1682
|
+
};
|
|
1683
|
+
return resolvedValue;
|
|
1359
1684
|
}
|
|
1360
1685
|
|
|
1361
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1362
|
-
function
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
throwErrorWhenSingleUnexpectedBindingFound(bindingNodes, isOptional, serviceIdentifier, parentServiceIdentifier, bindingConstraintNode.elem, serviceRedirections);
|
|
1686
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveBindingActivationsFromIteratorAsync.js
|
|
1687
|
+
async function resolveBindingActivationsFromIteratorAsync(params, value, activationsIterator) {
|
|
1688
|
+
let activatedValue = await value;
|
|
1689
|
+
let activationIteratorResult = activationsIterator.next();
|
|
1690
|
+
while (activationIteratorResult.done !== true) {
|
|
1691
|
+
activatedValue = await activationIteratorResult.value(params.context, activatedValue);
|
|
1692
|
+
activationIteratorResult = activationsIterator.next();
|
|
1369
1693
|
}
|
|
1694
|
+
return activatedValue;
|
|
1370
1695
|
}
|
|
1371
|
-
function throwBindingNotFoundError(serviceIdentifier, parentServiceIdentifier, bindingConstraints, serviceRedirections) {
|
|
1372
|
-
const lastResolvedServiceIdentifier = serviceRedirections[serviceRedirections.length - 1] ?? serviceIdentifier;
|
|
1373
|
-
const errorMessage = `No bindings found for service: "${stringifyServiceIdentifier(lastResolvedServiceIdentifier)}".
|
|
1374
1696
|
|
|
1375
|
-
|
|
1376
|
-
|
|
1697
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveBindingActivationsFromIterator.js
|
|
1698
|
+
function resolveBindingActivationsFromIterator(params, value, activationsIterator) {
|
|
1699
|
+
let activatedValue = value;
|
|
1700
|
+
let activationIteratorResult = activationsIterator.next();
|
|
1701
|
+
while (activationIteratorResult.done !== true) {
|
|
1702
|
+
const nextActivatedValue = activationIteratorResult.value(params.context, activatedValue);
|
|
1703
|
+
if (isPromise(nextActivatedValue)) {
|
|
1704
|
+
return resolveBindingActivationsFromIteratorAsync(params, nextActivatedValue, activationsIterator);
|
|
1705
|
+
} else {
|
|
1706
|
+
activatedValue = nextActivatedValue;
|
|
1707
|
+
}
|
|
1708
|
+
activationIteratorResult = activationsIterator.next();
|
|
1709
|
+
}
|
|
1710
|
+
return activatedValue;
|
|
1377
1711
|
}
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1712
|
+
|
|
1713
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveBindingServiceActivations.js
|
|
1714
|
+
function resolveBindingServiceActivations(params, serviceIdentifier, value) {
|
|
1715
|
+
const activations = params.context.getActivations(serviceIdentifier);
|
|
1716
|
+
if (activations === void 0) {
|
|
1717
|
+
return value;
|
|
1718
|
+
}
|
|
1719
|
+
if (isPromise(value)) {
|
|
1720
|
+
return resolveBindingActivationsFromIteratorAsync(params, value, activations[Symbol.iterator]());
|
|
1721
|
+
}
|
|
1722
|
+
return resolveBindingActivationsFromIterator(params, value, activations[Symbol.iterator]());
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveBindingActivations.js
|
|
1726
|
+
function resolveBindingActivations(params, binding, value) {
|
|
1727
|
+
let activationResult = value;
|
|
1728
|
+
if (binding.onActivation !== void 0) {
|
|
1729
|
+
const onActivation = binding.onActivation;
|
|
1730
|
+
if (isPromise(activationResult)) {
|
|
1731
|
+
activationResult = activationResult.then((resolved) => onActivation(params.context, resolved));
|
|
1732
|
+
} else {
|
|
1733
|
+
activationResult = onActivation(params.context, activationResult);
|
|
1734
|
+
}
|
|
1735
|
+
}
|
|
1736
|
+
return resolveBindingServiceActivations(params, binding.serviceIdentifier, activationResult);
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveScoped.js
|
|
1740
|
+
function resolveScoped(node, resolve2) {
|
|
1741
|
+
const binding = node.binding;
|
|
1742
|
+
switch (binding.scope) {
|
|
1743
|
+
case bindingScopeValues.Singleton: {
|
|
1744
|
+
return (params) => {
|
|
1745
|
+
if (binding.cache.isRight) {
|
|
1746
|
+
return binding.cache.value;
|
|
1747
|
+
}
|
|
1748
|
+
const resolvedValue = resolveBindingActivations(params, binding, resolve2(params, node));
|
|
1749
|
+
return cacheResolvedValue(binding, resolvedValue);
|
|
1750
|
+
};
|
|
1751
|
+
}
|
|
1752
|
+
case bindingScopeValues.Request: {
|
|
1753
|
+
return (params) => {
|
|
1754
|
+
if (params.requestScopeCache?.has(binding.id) === true) {
|
|
1755
|
+
return params.requestScopeCache.get(binding.id);
|
|
1756
|
+
}
|
|
1757
|
+
const resolvedValue = resolveBindingActivations(params, binding, resolve2(params, node));
|
|
1758
|
+
(params.requestScopeCache ??= /* @__PURE__ */ new Map()).set(binding.id, resolvedValue);
|
|
1759
|
+
return resolvedValue;
|
|
1760
|
+
};
|
|
1761
|
+
}
|
|
1762
|
+
case bindingScopeValues.Transient:
|
|
1763
|
+
return (params) => resolveBindingActivations(params, binding, resolve2(params, node));
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1767
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/models/ConstantValueBindingNode.js
|
|
1768
|
+
var ConstantValueBindingNode = class {
|
|
1769
|
+
binding;
|
|
1770
|
+
resolve;
|
|
1771
|
+
constructor(binding) {
|
|
1772
|
+
this.binding = binding;
|
|
1773
|
+
this.resolve = resolveScoped(this, (_params, node) => node.binding.value);
|
|
1774
|
+
}
|
|
1775
|
+
};
|
|
1776
|
+
|
|
1777
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveScopedWithNoActivations.js
|
|
1778
|
+
function resolveScopedWithNoActivations(binding, resolve2) {
|
|
1779
|
+
switch (binding.scope) {
|
|
1780
|
+
case bindingScopeValues.Singleton: {
|
|
1781
|
+
return (params) => {
|
|
1782
|
+
if (binding.cache.isRight) {
|
|
1783
|
+
return binding.cache.value;
|
|
1784
|
+
}
|
|
1785
|
+
const resolvedValue = resolve2(params);
|
|
1786
|
+
return cacheResolvedValue(binding, resolvedValue);
|
|
1787
|
+
};
|
|
1788
|
+
}
|
|
1789
|
+
case bindingScopeValues.Request: {
|
|
1790
|
+
return (params) => {
|
|
1791
|
+
if (params.requestScopeCache?.has(binding.id) === true) {
|
|
1792
|
+
return params.requestScopeCache.get(binding.id);
|
|
1793
|
+
}
|
|
1794
|
+
const resolvedValue = resolve2(params);
|
|
1795
|
+
(params.requestScopeCache ??= /* @__PURE__ */ new Map()).set(binding.id, resolvedValue);
|
|
1796
|
+
return resolvedValue;
|
|
1797
|
+
};
|
|
1798
|
+
}
|
|
1799
|
+
case bindingScopeValues.Transient:
|
|
1800
|
+
return resolve2;
|
|
1801
|
+
}
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1804
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveServiceActivations.js
|
|
1805
|
+
function resolveServiceActivations(serviceIdentifier) {
|
|
1806
|
+
return (params, value) => {
|
|
1807
|
+
const activations = params.context.getActivations(serviceIdentifier);
|
|
1808
|
+
if (activations === void 0) {
|
|
1809
|
+
return value;
|
|
1810
|
+
}
|
|
1811
|
+
if (isPromise(value)) {
|
|
1812
|
+
return resolveBindingActivationsFromIteratorAsync(params, value, activations[Symbol.iterator]());
|
|
1813
|
+
}
|
|
1814
|
+
return resolveBindingActivationsFromIterator(params, value, activations[Symbol.iterator]());
|
|
1815
|
+
};
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1818
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/buildNoActivationsDynamicValueBindingNodeResolver.js
|
|
1819
|
+
function buildNoActivationsDynamicValueBindingNodeResolver(node, areServiceActivations) {
|
|
1820
|
+
const serviceIdentifier = node.binding.serviceIdentifier;
|
|
1821
|
+
const resolveActivations = areServiceActivations ? resolveServiceActivations(serviceIdentifier) : void 0;
|
|
1822
|
+
const resolveNode = resolveActivations === void 0 ? (params) => node.binding.value(params.context) : (params) => resolveActivations(params, node.binding.value(params.context));
|
|
1823
|
+
return resolveScopedWithNoActivations(node.binding, resolveNode);
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/models/DynamicValueBindingNode.js
|
|
1827
|
+
var resolveScopedDynamicValueBindingNode = (node) => resolveScoped(node, (params, node2) => node2.binding.value(params.context));
|
|
1828
|
+
var DynamicValueBindingNode = class {
|
|
1829
|
+
binding;
|
|
1830
|
+
[isDynamicallyResolvableBindingNodeSymbol];
|
|
1831
|
+
resolve;
|
|
1832
|
+
#onResolverChangedHandlers;
|
|
1833
|
+
constructor(binding, params) {
|
|
1834
|
+
this.binding = binding;
|
|
1835
|
+
this[isDynamicallyResolvableBindingNodeSymbol] = true;
|
|
1836
|
+
const areServiceActivations = params.operations.getActivations(binding.serviceIdentifier) !== void 0;
|
|
1837
|
+
this.#onResolverChangedHandlers = void 0;
|
|
1838
|
+
this.resolve = this.#buildDynamicValueBindingNodeResolver(areServiceActivations);
|
|
1839
|
+
if (!areServiceActivations && this.#areNoBindingActivationsDefined()) {
|
|
1840
|
+
params.operations.subscribeActivationAddedOnce(binding.serviceIdentifier, this);
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
onActivationAdded() {
|
|
1844
|
+
this.resolve = this.#buildDynamicValueBindingNodeResolver(true);
|
|
1845
|
+
if (this.#onResolverChangedHandlers !== void 0) {
|
|
1846
|
+
for (const handler of this.#onResolverChangedHandlers) {
|
|
1847
|
+
handler(this.resolve);
|
|
1848
|
+
}
|
|
1849
|
+
}
|
|
1850
|
+
}
|
|
1851
|
+
addOnResolverChangedHandler(callback) {
|
|
1852
|
+
if (this.#onResolverChangedHandlers === void 0) {
|
|
1853
|
+
this.#onResolverChangedHandlers = [];
|
|
1854
|
+
}
|
|
1855
|
+
this.#onResolverChangedHandlers.push(callback);
|
|
1856
|
+
}
|
|
1857
|
+
#buildDynamicValueBindingNodeResolver(areServiceActivations) {
|
|
1858
|
+
if (this.#areNoBindingActivationsDefined()) {
|
|
1859
|
+
return buildNoActivationsDynamicValueBindingNodeResolver(this, areServiceActivations);
|
|
1860
|
+
}
|
|
1861
|
+
return resolveScopedDynamicValueBindingNode(this);
|
|
1862
|
+
}
|
|
1863
|
+
#areNoBindingActivationsDefined() {
|
|
1864
|
+
return this.binding.onActivation === void 0;
|
|
1865
|
+
}
|
|
1866
|
+
};
|
|
1867
|
+
|
|
1868
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/models/FactoryBindingNodeImplementation.js
|
|
1869
|
+
var FactoryBindingNodeImplementation = class {
|
|
1870
|
+
binding;
|
|
1871
|
+
resolve;
|
|
1872
|
+
constructor(binding) {
|
|
1873
|
+
this.binding = binding;
|
|
1874
|
+
this.resolve = resolveScoped(this, (params, node) => node.binding.factory(params.context));
|
|
1875
|
+
}
|
|
1876
|
+
};
|
|
1877
|
+
|
|
1878
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveInstanceBindingConstructorParams.js
|
|
1879
|
+
function resolveInstanceBindingConstructorParams(params, node) {
|
|
1880
|
+
const constructorResolvedValues = [];
|
|
1881
|
+
let promiseValueFound = false;
|
|
1882
|
+
for (const constructorParam of node.constructorParams) {
|
|
1883
|
+
const resolvedValue = constructorParam.resolve(params);
|
|
1884
|
+
if (!promiseValueFound && isPromise(resolvedValue)) {
|
|
1885
|
+
promiseValueFound = true;
|
|
1886
|
+
}
|
|
1887
|
+
constructorResolvedValues.push(resolvedValue);
|
|
1888
|
+
}
|
|
1889
|
+
return promiseValueFound ? Promise.all(constructorResolvedValues) : constructorResolvedValues;
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveInstanceBindingNode.js
|
|
1893
|
+
function resolveInstanceBindingNode(resolveInstanceBindingConstructorParams2, resolveInstanceBindingNodeAsyncFromConstructorParams2, resolveInstanceBindingNodeFromConstructorParams2) {
|
|
1894
|
+
return (params, node) => {
|
|
1895
|
+
const constructorValues = resolveInstanceBindingConstructorParams2(params, node);
|
|
1896
|
+
if (isPromise(constructorValues)) {
|
|
1897
|
+
return resolveInstanceBindingNodeAsyncFromConstructorParams2(constructorValues, params, node);
|
|
1898
|
+
}
|
|
1899
|
+
return resolveInstanceBindingNodeFromConstructorParams2(constructorValues, params, node);
|
|
1900
|
+
};
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolvePostConstruct.js
|
|
1904
|
+
function resolvePostConstruct(instance, binding, postConstructMethodName) {
|
|
1905
|
+
const postConstructResult = invokePostConstruct(instance, binding, postConstructMethodName);
|
|
1906
|
+
if (isPromise(postConstructResult)) {
|
|
1907
|
+
return postConstructResult.then(() => instance);
|
|
1908
|
+
}
|
|
1909
|
+
return instance;
|
|
1910
|
+
}
|
|
1911
|
+
function invokePostConstruct(instance, binding, postConstructMethodName) {
|
|
1912
|
+
if (postConstructMethodName in instance) {
|
|
1913
|
+
if (typeof instance[postConstructMethodName] === "function") {
|
|
1914
|
+
let postConstructResult;
|
|
1915
|
+
try {
|
|
1916
|
+
postConstructResult = instance[postConstructMethodName]();
|
|
1917
|
+
} catch (error) {
|
|
1918
|
+
throw new InversifyCoreError(InversifyCoreErrorKind.resolution, `Unexpected error found when calling "${postConstructMethodName.toString()}" @postConstruct decorated method on class "${binding.implementationType.name}"`, {
|
|
1919
|
+
cause: error
|
|
1920
|
+
});
|
|
1921
|
+
}
|
|
1922
|
+
if (isPromise(postConstructResult)) {
|
|
1923
|
+
return invokePostConstructAsync(binding, postConstructMethodName, postConstructResult);
|
|
1924
|
+
}
|
|
1925
|
+
} else {
|
|
1926
|
+
throw new InversifyCoreError(InversifyCoreErrorKind.resolution, `Expecting a "${postConstructMethodName.toString()}" method when resolving "${binding.implementationType.name}" class @postConstruct decorated method, a non function property was found instead.`);
|
|
1382
1927
|
}
|
|
1383
1928
|
} else {
|
|
1384
|
-
|
|
1385
|
-
|
|
1929
|
+
throw new InversifyCoreError(InversifyCoreErrorKind.resolution, `Expecting a "${postConstructMethodName.toString()}" property when resolving "${binding.implementationType.name}" class @postConstruct decorated method, none found.`);
|
|
1930
|
+
}
|
|
1931
|
+
}
|
|
1932
|
+
async function invokePostConstructAsync(binding, postConstructMethodName, postConstructResult) {
|
|
1933
|
+
try {
|
|
1934
|
+
await postConstructResult;
|
|
1935
|
+
} catch (error) {
|
|
1936
|
+
throw new InversifyCoreError(InversifyCoreErrorKind.resolution, `Unexpected error found when calling "${postConstructMethodName.toString()}" @postConstruct decorated method on class "${binding.implementationType.name}"`, {
|
|
1937
|
+
cause: error
|
|
1938
|
+
});
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
1386
1941
|
|
|
1387
|
-
|
|
1942
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/setInstanceProperties.js
|
|
1943
|
+
function setInstanceProperties(params, instance, node) {
|
|
1944
|
+
const propertyAssignmentPromises = [];
|
|
1945
|
+
for (const [propertyKey, propertyNode] of node.propertyParams) {
|
|
1946
|
+
const metadata = node.classMetadata.properties.get(propertyKey);
|
|
1947
|
+
if (metadata === void 0) {
|
|
1948
|
+
throw new InversifyCoreError(InversifyCoreErrorKind.resolution, `Expecting metadata at property "${propertyKey.toString()}", none found`);
|
|
1949
|
+
}
|
|
1950
|
+
if (metadata.kind !== ClassElementMetadataKind.unmanaged && propertyNode.bindings !== void 0) {
|
|
1951
|
+
instance[propertyKey] = propertyNode.resolve(params);
|
|
1952
|
+
if (isPromise(instance[propertyKey])) {
|
|
1953
|
+
propertyAssignmentPromises.push((async () => {
|
|
1954
|
+
instance[propertyKey] = await instance[propertyKey];
|
|
1955
|
+
})());
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
}
|
|
1959
|
+
if (propertyAssignmentPromises.length > 0) {
|
|
1960
|
+
return Promise.all(propertyAssignmentPromises).then(() => void 0);
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1388
1963
|
|
|
1389
|
-
|
|
1964
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveInstanceBindingNodeFromConstructorParams.js
|
|
1965
|
+
function resolveAllPostConstructMethods(instance, binding, postConstructMethodNames) {
|
|
1966
|
+
if (postConstructMethodNames.size === 0) {
|
|
1967
|
+
return instance;
|
|
1968
|
+
}
|
|
1969
|
+
let result = instance;
|
|
1970
|
+
for (const methodName of postConstructMethodNames) {
|
|
1971
|
+
if (isPromise(result)) {
|
|
1972
|
+
result = result.then((resolvedInstance) => resolvePostConstruct(resolvedInstance, binding, methodName));
|
|
1973
|
+
} else {
|
|
1974
|
+
result = resolvePostConstruct(result, binding, methodName);
|
|
1975
|
+
}
|
|
1976
|
+
}
|
|
1977
|
+
return result;
|
|
1978
|
+
}
|
|
1979
|
+
function resolveInstanceBindingNodeFromConstructorParams(constructorValues, params, node) {
|
|
1980
|
+
const instance = new node.binding.implementationType(...constructorValues);
|
|
1981
|
+
const propertiesAssignmentResult = setInstanceProperties(params, instance, node);
|
|
1982
|
+
if (isPromise(propertiesAssignmentResult)) {
|
|
1983
|
+
return propertiesAssignmentResult.then(() => resolveAllPostConstructMethods(instance, node.binding, node.classMetadata.lifecycle.postConstructMethodNames));
|
|
1984
|
+
}
|
|
1985
|
+
return resolveAllPostConstructMethods(instance, node.binding, node.classMetadata.lifecycle.postConstructMethodNames);
|
|
1986
|
+
}
|
|
1390
1987
|
|
|
1391
|
-
|
|
1392
|
-
|
|
1988
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveInstanceBindingNodeAsyncFromConstructorParams.js
|
|
1989
|
+
async function resolveInstanceBindingNodeAsyncFromConstructorParams(constructorValues, params, node) {
|
|
1990
|
+
const constructorResolvedValues = await constructorValues;
|
|
1991
|
+
return resolveInstanceBindingNodeFromConstructorParams(constructorResolvedValues, params, node);
|
|
1992
|
+
}
|
|
1993
|
+
|
|
1994
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/buildConstructorArgumentsResolver.js
|
|
1995
|
+
function buildConstructorArgumentsResolver(node, resolveAsyncValues, resolveActivations) {
|
|
1996
|
+
const constructorArgumentsCount = node.classMetadata.constructorArguments.length;
|
|
1997
|
+
function resolveConstructorValues(params) {
|
|
1998
|
+
const values = new Array(constructorArgumentsCount);
|
|
1999
|
+
for (let index = 0; index < constructorArgumentsCount; index++) {
|
|
2000
|
+
values[index] = node.constructorParams[index].resolve(params);
|
|
2001
|
+
}
|
|
2002
|
+
return values;
|
|
1393
2003
|
}
|
|
2004
|
+
if (node.classMetadata.properties.size === 0) {
|
|
2005
|
+
if (resolveActivations === void 0) {
|
|
2006
|
+
return function resolveNode(params) {
|
|
2007
|
+
const values = resolveConstructorValues(params);
|
|
2008
|
+
function build(...resolvedValues) {
|
|
2009
|
+
return new node.binding.implementationType(...resolvedValues);
|
|
2010
|
+
}
|
|
2011
|
+
return resolveAsyncValues(...values, build);
|
|
2012
|
+
};
|
|
2013
|
+
}
|
|
2014
|
+
return function resolveNode(params) {
|
|
2015
|
+
const values = resolveConstructorValues(params);
|
|
2016
|
+
const build = (...resolvedValues) => resolveActivations(params, new node.binding.implementationType(...resolvedValues));
|
|
2017
|
+
return resolveAsyncValues(...values, build);
|
|
2018
|
+
};
|
|
2019
|
+
}
|
|
2020
|
+
if (resolveActivations === void 0) {
|
|
2021
|
+
return function resolveNode(params) {
|
|
2022
|
+
const values = resolveConstructorValues(params);
|
|
2023
|
+
function build(...resolvedValues) {
|
|
2024
|
+
const instance = new node.binding.implementationType(...resolvedValues);
|
|
2025
|
+
const propertiesAssignmentResult = setInstanceProperties(params, instance, node);
|
|
2026
|
+
if (isPromise(propertiesAssignmentResult)) {
|
|
2027
|
+
return propertiesAssignmentResult.then(() => instance);
|
|
2028
|
+
}
|
|
2029
|
+
return instance;
|
|
2030
|
+
}
|
|
2031
|
+
return resolveAsyncValues(...values, build);
|
|
2032
|
+
};
|
|
2033
|
+
}
|
|
2034
|
+
return function resolveNode(params) {
|
|
2035
|
+
const values = resolveConstructorValues(params);
|
|
2036
|
+
const build = (...resolvedValues) => {
|
|
2037
|
+
const instance = new node.binding.implementationType(...resolvedValues);
|
|
2038
|
+
const propertiesAssignmentResult = setInstanceProperties(params, instance, node);
|
|
2039
|
+
if (isPromise(propertiesAssignmentResult)) {
|
|
2040
|
+
return propertiesAssignmentResult.then(() => resolveActivations(params, instance));
|
|
2041
|
+
}
|
|
2042
|
+
return resolveActivations(params, instance);
|
|
2043
|
+
};
|
|
2044
|
+
return resolveAsyncValues(...values, build);
|
|
2045
|
+
};
|
|
1394
2046
|
}
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
2047
|
+
|
|
2048
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/resolveFour.js
|
|
2049
|
+
var TWO_PARAMS = 2;
|
|
2050
|
+
var THREE_PARAMS = 3;
|
|
2051
|
+
var FOUR_PARAMS = 4;
|
|
2052
|
+
function resolveFour(value1, value2, value3, value4, build) {
|
|
2053
|
+
if (isPromise(value1)) {
|
|
2054
|
+
if (isPromise(value2)) {
|
|
2055
|
+
if (isPromise(value3)) {
|
|
2056
|
+
if (isPromise(value4)) {
|
|
2057
|
+
return new Promise((resolve2, reject) => {
|
|
2058
|
+
let resolvedValues = 0;
|
|
2059
|
+
let resolvedValue1;
|
|
2060
|
+
let resolvedValue2;
|
|
2061
|
+
let resolvedValue3;
|
|
2062
|
+
let resolvedValue4;
|
|
2063
|
+
void value1.then((resolvedValue) => {
|
|
2064
|
+
if (++resolvedValues === FOUR_PARAMS) {
|
|
2065
|
+
resolve2(build(resolvedValue, resolvedValue2, resolvedValue3, resolvedValue4));
|
|
2066
|
+
} else {
|
|
2067
|
+
resolvedValue1 = resolvedValue;
|
|
2068
|
+
}
|
|
2069
|
+
}).catch(reject);
|
|
2070
|
+
void value2.then((resolvedValue) => {
|
|
2071
|
+
if (++resolvedValues === FOUR_PARAMS) {
|
|
2072
|
+
resolve2(build(resolvedValue1, resolvedValue, resolvedValue3, resolvedValue4));
|
|
2073
|
+
} else {
|
|
2074
|
+
resolvedValue2 = resolvedValue;
|
|
2075
|
+
}
|
|
2076
|
+
}).catch(reject);
|
|
2077
|
+
void value3.then((resolvedValue) => {
|
|
2078
|
+
if (++resolvedValues === FOUR_PARAMS) {
|
|
2079
|
+
resolve2(build(resolvedValue1, resolvedValue2, resolvedValue, resolvedValue4));
|
|
2080
|
+
} else {
|
|
2081
|
+
resolvedValue3 = resolvedValue;
|
|
2082
|
+
}
|
|
2083
|
+
}).catch(reject);
|
|
2084
|
+
void value4.then((resolvedValue) => {
|
|
2085
|
+
if (++resolvedValues === FOUR_PARAMS) {
|
|
2086
|
+
resolve2(build(resolvedValue1, resolvedValue2, resolvedValue3, resolvedValue));
|
|
2087
|
+
} else {
|
|
2088
|
+
resolvedValue4 = resolvedValue;
|
|
2089
|
+
}
|
|
2090
|
+
}).catch(reject);
|
|
2091
|
+
});
|
|
2092
|
+
}
|
|
2093
|
+
return new Promise((resolve2, reject) => {
|
|
2094
|
+
let resolvedValues = 0;
|
|
2095
|
+
let resolvedValue1;
|
|
2096
|
+
let resolvedValue2;
|
|
2097
|
+
let resolvedValue3;
|
|
2098
|
+
void value1.then((resolvedValue) => {
|
|
2099
|
+
if (++resolvedValues === THREE_PARAMS) {
|
|
2100
|
+
resolve2(build(resolvedValue, resolvedValue2, resolvedValue3, value4));
|
|
2101
|
+
} else {
|
|
2102
|
+
resolvedValue1 = resolvedValue;
|
|
2103
|
+
}
|
|
2104
|
+
}).catch(reject);
|
|
2105
|
+
void value2.then((resolvedValue) => {
|
|
2106
|
+
if (++resolvedValues === THREE_PARAMS) {
|
|
2107
|
+
resolve2(build(resolvedValue1, resolvedValue, resolvedValue3, value4));
|
|
2108
|
+
} else {
|
|
2109
|
+
resolvedValue2 = resolvedValue;
|
|
2110
|
+
}
|
|
2111
|
+
}).catch(reject);
|
|
2112
|
+
void value3.then((resolvedValue) => {
|
|
2113
|
+
if (++resolvedValues === THREE_PARAMS) {
|
|
2114
|
+
resolve2(build(resolvedValue1, resolvedValue2, resolvedValue, value4));
|
|
2115
|
+
} else {
|
|
2116
|
+
resolvedValue3 = resolvedValue;
|
|
2117
|
+
}
|
|
2118
|
+
}).catch(reject);
|
|
2119
|
+
});
|
|
2120
|
+
}
|
|
2121
|
+
if (isPromise(value4)) {
|
|
2122
|
+
return new Promise((resolve2, reject) => {
|
|
2123
|
+
let resolvedValues = 0;
|
|
2124
|
+
let resolvedValue1;
|
|
2125
|
+
let resolvedValue2;
|
|
2126
|
+
let resolvedValue4;
|
|
2127
|
+
void value1.then((resolvedValue) => {
|
|
2128
|
+
if (++resolvedValues === THREE_PARAMS) {
|
|
2129
|
+
resolve2(build(resolvedValue, resolvedValue2, value3, resolvedValue4));
|
|
2130
|
+
} else {
|
|
2131
|
+
resolvedValue1 = resolvedValue;
|
|
2132
|
+
}
|
|
2133
|
+
}).catch(reject);
|
|
2134
|
+
void value2.then((resolvedValue) => {
|
|
2135
|
+
if (++resolvedValues === THREE_PARAMS) {
|
|
2136
|
+
resolve2(build(resolvedValue1, resolvedValue, value3, resolvedValue4));
|
|
2137
|
+
} else {
|
|
2138
|
+
resolvedValue2 = resolvedValue;
|
|
2139
|
+
}
|
|
2140
|
+
}).catch(reject);
|
|
2141
|
+
void value4.then((resolvedValue) => {
|
|
2142
|
+
if (++resolvedValues === THREE_PARAMS) {
|
|
2143
|
+
resolve2(build(resolvedValue1, resolvedValue2, value3, resolvedValue));
|
|
2144
|
+
} else {
|
|
2145
|
+
resolvedValue4 = resolvedValue;
|
|
2146
|
+
}
|
|
2147
|
+
}).catch(reject);
|
|
2148
|
+
});
|
|
2149
|
+
}
|
|
2150
|
+
return new Promise((resolve2, reject) => {
|
|
2151
|
+
let resolvedValues = 0;
|
|
2152
|
+
let resolvedValue1;
|
|
2153
|
+
let resolvedValue2;
|
|
2154
|
+
void value1.then((resolvedValue) => {
|
|
2155
|
+
if (++resolvedValues === TWO_PARAMS) {
|
|
2156
|
+
resolve2(build(resolvedValue, resolvedValue2, value3, value4));
|
|
2157
|
+
} else {
|
|
2158
|
+
resolvedValue1 = resolvedValue;
|
|
2159
|
+
}
|
|
2160
|
+
}).catch(reject);
|
|
2161
|
+
void value2.then((resolvedValue) => {
|
|
2162
|
+
if (++resolvedValues === TWO_PARAMS) {
|
|
2163
|
+
resolve2(build(resolvedValue1, resolvedValue, value3, value4));
|
|
2164
|
+
} else {
|
|
2165
|
+
resolvedValue2 = resolvedValue;
|
|
2166
|
+
}
|
|
2167
|
+
}).catch(reject);
|
|
2168
|
+
});
|
|
2169
|
+
}
|
|
2170
|
+
if (isPromise(value3)) {
|
|
2171
|
+
if (isPromise(value4)) {
|
|
2172
|
+
return new Promise((resolve2, reject) => {
|
|
2173
|
+
let resolvedValues = 0;
|
|
2174
|
+
let resolvedValue1;
|
|
2175
|
+
let resolvedValue3;
|
|
2176
|
+
let resolvedValue4;
|
|
2177
|
+
void value1.then((resolvedValue) => {
|
|
2178
|
+
if (++resolvedValues === THREE_PARAMS) {
|
|
2179
|
+
resolve2(build(resolvedValue, value2, resolvedValue3, resolvedValue4));
|
|
2180
|
+
} else {
|
|
2181
|
+
resolvedValue1 = resolvedValue;
|
|
2182
|
+
}
|
|
2183
|
+
}).catch(reject);
|
|
2184
|
+
void value3.then((resolvedValue) => {
|
|
2185
|
+
if (++resolvedValues === THREE_PARAMS) {
|
|
2186
|
+
resolve2(build(resolvedValue1, value2, resolvedValue, resolvedValue4));
|
|
2187
|
+
} else {
|
|
2188
|
+
resolvedValue3 = resolvedValue;
|
|
2189
|
+
}
|
|
2190
|
+
}).catch(reject);
|
|
2191
|
+
void value4.then((resolvedValue) => {
|
|
2192
|
+
if (++resolvedValues === THREE_PARAMS) {
|
|
2193
|
+
resolve2(build(resolvedValue1, value2, resolvedValue3, resolvedValue));
|
|
2194
|
+
} else {
|
|
2195
|
+
resolvedValue4 = resolvedValue;
|
|
2196
|
+
}
|
|
2197
|
+
}).catch(reject);
|
|
2198
|
+
});
|
|
2199
|
+
}
|
|
2200
|
+
return new Promise((resolve2, reject) => {
|
|
2201
|
+
let resolvedValues = 0;
|
|
2202
|
+
let resolvedValue1;
|
|
2203
|
+
let resolvedValue3;
|
|
2204
|
+
void value1.then((resolvedValue) => {
|
|
2205
|
+
if (++resolvedValues === TWO_PARAMS) {
|
|
2206
|
+
resolve2(build(resolvedValue, value2, resolvedValue3, value4));
|
|
2207
|
+
} else {
|
|
2208
|
+
resolvedValue1 = resolvedValue;
|
|
2209
|
+
}
|
|
2210
|
+
}).catch(reject);
|
|
2211
|
+
void value3.then((resolvedValue) => {
|
|
2212
|
+
if (++resolvedValues === TWO_PARAMS) {
|
|
2213
|
+
resolve2(build(resolvedValue1, value2, resolvedValue, value4));
|
|
2214
|
+
} else {
|
|
2215
|
+
resolvedValue3 = resolvedValue;
|
|
2216
|
+
}
|
|
2217
|
+
}).catch(reject);
|
|
2218
|
+
});
|
|
2219
|
+
}
|
|
2220
|
+
if (isPromise(value4)) {
|
|
2221
|
+
return new Promise((resolve2, reject) => {
|
|
2222
|
+
let resolvedValues = 0;
|
|
2223
|
+
let resolvedValue1;
|
|
2224
|
+
let resolvedValue4;
|
|
2225
|
+
void value1.then((resolvedValue) => {
|
|
2226
|
+
if (++resolvedValues === TWO_PARAMS) {
|
|
2227
|
+
resolve2(build(resolvedValue, value2, value3, resolvedValue4));
|
|
2228
|
+
} else {
|
|
2229
|
+
resolvedValue1 = resolvedValue;
|
|
2230
|
+
}
|
|
2231
|
+
}).catch(reject);
|
|
2232
|
+
void value4.then((resolvedValue) => {
|
|
2233
|
+
if (++resolvedValues === TWO_PARAMS) {
|
|
2234
|
+
resolve2(build(resolvedValue1, value2, value3, resolvedValue));
|
|
2235
|
+
} else {
|
|
2236
|
+
resolvedValue4 = resolvedValue;
|
|
2237
|
+
}
|
|
2238
|
+
}).catch(reject);
|
|
2239
|
+
});
|
|
2240
|
+
}
|
|
2241
|
+
return value1.then(async (resolvedValue1) => build(resolvedValue1, value2, value3, value4));
|
|
2242
|
+
}
|
|
2243
|
+
if (isPromise(value2)) {
|
|
2244
|
+
if (isPromise(value3)) {
|
|
2245
|
+
if (isPromise(value4)) {
|
|
2246
|
+
return new Promise((resolve2, reject) => {
|
|
2247
|
+
let resolvedValues = 0;
|
|
2248
|
+
let resolvedValue2;
|
|
2249
|
+
let resolvedValue3;
|
|
2250
|
+
let resolvedValue4;
|
|
2251
|
+
void value2.then((resolvedValue) => {
|
|
2252
|
+
if (++resolvedValues === THREE_PARAMS) {
|
|
2253
|
+
resolve2(build(value1, resolvedValue, resolvedValue3, resolvedValue4));
|
|
2254
|
+
} else {
|
|
2255
|
+
resolvedValue2 = resolvedValue;
|
|
2256
|
+
}
|
|
2257
|
+
}).catch(reject);
|
|
2258
|
+
void value3.then((resolvedValue) => {
|
|
2259
|
+
if (++resolvedValues === THREE_PARAMS) {
|
|
2260
|
+
resolve2(build(value1, resolvedValue2, resolvedValue, resolvedValue4));
|
|
2261
|
+
} else {
|
|
2262
|
+
resolvedValue3 = resolvedValue;
|
|
2263
|
+
}
|
|
2264
|
+
}).catch(reject);
|
|
2265
|
+
void value4.then((resolvedValue) => {
|
|
2266
|
+
if (++resolvedValues === THREE_PARAMS) {
|
|
2267
|
+
resolve2(build(value1, resolvedValue2, resolvedValue3, resolvedValue));
|
|
2268
|
+
} else {
|
|
2269
|
+
resolvedValue4 = resolvedValue;
|
|
2270
|
+
}
|
|
2271
|
+
}).catch(reject);
|
|
2272
|
+
});
|
|
2273
|
+
}
|
|
2274
|
+
return new Promise((resolve2, reject) => {
|
|
2275
|
+
let resolvedValues = 0;
|
|
2276
|
+
let resolvedValue2;
|
|
2277
|
+
let resolvedValue3;
|
|
2278
|
+
void value2.then((resolvedValue) => {
|
|
2279
|
+
if (++resolvedValues === TWO_PARAMS) {
|
|
2280
|
+
resolve2(build(value1, resolvedValue, resolvedValue3, value4));
|
|
2281
|
+
} else {
|
|
2282
|
+
resolvedValue2 = resolvedValue;
|
|
2283
|
+
}
|
|
2284
|
+
}).catch(reject);
|
|
2285
|
+
void value3.then((resolvedValue) => {
|
|
2286
|
+
if (++resolvedValues === TWO_PARAMS) {
|
|
2287
|
+
resolve2(build(value1, resolvedValue2, resolvedValue, value4));
|
|
2288
|
+
} else {
|
|
2289
|
+
resolvedValue3 = resolvedValue;
|
|
2290
|
+
}
|
|
2291
|
+
}).catch(reject);
|
|
2292
|
+
});
|
|
2293
|
+
}
|
|
2294
|
+
if (isPromise(value4)) {
|
|
2295
|
+
return new Promise((resolve2, reject) => {
|
|
2296
|
+
let resolvedValues = 0;
|
|
2297
|
+
let resolvedValue2;
|
|
2298
|
+
let resolvedValue4;
|
|
2299
|
+
void value2.then((resolvedValue) => {
|
|
2300
|
+
if (++resolvedValues === TWO_PARAMS) {
|
|
2301
|
+
resolve2(build(value1, resolvedValue, value3, resolvedValue4));
|
|
2302
|
+
} else {
|
|
2303
|
+
resolvedValue2 = resolvedValue;
|
|
2304
|
+
}
|
|
2305
|
+
}).catch(reject);
|
|
2306
|
+
void value4.then((resolvedValue) => {
|
|
2307
|
+
if (++resolvedValues === TWO_PARAMS) {
|
|
2308
|
+
resolve2(build(value1, resolvedValue2, value3, resolvedValue));
|
|
2309
|
+
} else {
|
|
2310
|
+
resolvedValue4 = resolvedValue;
|
|
2311
|
+
}
|
|
2312
|
+
}).catch(reject);
|
|
2313
|
+
});
|
|
2314
|
+
}
|
|
2315
|
+
return value2.then(async (resolvedValue2) => build(value1, resolvedValue2, value3, value4));
|
|
2316
|
+
}
|
|
2317
|
+
if (isPromise(value3)) {
|
|
2318
|
+
if (isPromise(value4)) {
|
|
2319
|
+
return new Promise((resolve2, reject) => {
|
|
2320
|
+
let resolvedValues = 0;
|
|
2321
|
+
let resolvedValue3;
|
|
2322
|
+
let resolvedValue4;
|
|
2323
|
+
void value3.then((resolvedValue) => {
|
|
2324
|
+
if (++resolvedValues === TWO_PARAMS) {
|
|
2325
|
+
resolve2(build(value1, value2, resolvedValue, resolvedValue4));
|
|
2326
|
+
} else {
|
|
2327
|
+
resolvedValue3 = resolvedValue;
|
|
2328
|
+
}
|
|
2329
|
+
}).catch(reject);
|
|
2330
|
+
void value4.then((resolvedValue) => {
|
|
2331
|
+
if (++resolvedValues === TWO_PARAMS) {
|
|
2332
|
+
resolve2(build(value1, value2, resolvedValue3, resolvedValue));
|
|
2333
|
+
} else {
|
|
2334
|
+
resolvedValue4 = resolvedValue;
|
|
2335
|
+
}
|
|
2336
|
+
}).catch(reject);
|
|
2337
|
+
});
|
|
2338
|
+
}
|
|
2339
|
+
return value3.then(async (resolvedValue3) => build(value1, value2, resolvedValue3, value4));
|
|
2340
|
+
}
|
|
2341
|
+
if (isPromise(value4)) {
|
|
2342
|
+
return value4.then(async (resolvedValue4) => build(value1, value2, value3, resolvedValue4));
|
|
1398
2343
|
}
|
|
2344
|
+
return build(value1, value2, value3, value4);
|
|
1399
2345
|
}
|
|
1400
|
-
|
|
1401
|
-
|
|
2346
|
+
|
|
2347
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/buildFourConstructorArgumentResolver.js
|
|
2348
|
+
function buildFourConstructorArgumentResolver(node, resolveActivations) {
|
|
2349
|
+
if (node.classMetadata.properties.size === 0) {
|
|
2350
|
+
if (resolveActivations === void 0) {
|
|
2351
|
+
return function resolveNode(params) {
|
|
2352
|
+
const resolvedValue0 = node.constructorParams[0].resolve(params);
|
|
2353
|
+
const resolvedValue1 = node.constructorParams[1].resolve(params);
|
|
2354
|
+
const resolvedValue2 = node.constructorParams[2].resolve(params);
|
|
2355
|
+
const resolvedValue3 = node.constructorParams[3].resolve(params);
|
|
2356
|
+
return resolveFour(resolvedValue0, resolvedValue1, resolvedValue2, resolvedValue3, (resolvedValue02, resolvedValue12, resolvedValue22, resolvedValue32) => new node.binding.implementationType(resolvedValue02, resolvedValue12, resolvedValue22, resolvedValue32));
|
|
2357
|
+
};
|
|
2358
|
+
}
|
|
2359
|
+
return function resolveNode(params) {
|
|
2360
|
+
const resolvedValue0 = node.constructorParams[0].resolve(params);
|
|
2361
|
+
const resolvedValue1 = node.constructorParams[1].resolve(params);
|
|
2362
|
+
const resolvedValue2 = node.constructorParams[2].resolve(params);
|
|
2363
|
+
const resolvedValue3 = node.constructorParams[3].resolve(params);
|
|
2364
|
+
return resolveFour(resolvedValue0, resolvedValue1, resolvedValue2, resolvedValue3, (resolvedValue02, resolvedValue12, resolvedValue22, resolvedValue32) => resolveActivations(params, new node.binding.implementationType(resolvedValue02, resolvedValue12, resolvedValue22, resolvedValue32)));
|
|
2365
|
+
};
|
|
2366
|
+
}
|
|
2367
|
+
if (resolveActivations === void 0) {
|
|
2368
|
+
const finalizeInstance2 = (params, instance) => {
|
|
2369
|
+
const propertiesAssignmentResult = setInstanceProperties(params, instance, node);
|
|
2370
|
+
if (isPromise(propertiesAssignmentResult)) {
|
|
2371
|
+
return propertiesAssignmentResult.then(() => instance);
|
|
2372
|
+
}
|
|
2373
|
+
return instance;
|
|
2374
|
+
};
|
|
2375
|
+
return function resolveNode(params) {
|
|
2376
|
+
const resolvedValue0 = node.constructorParams[0].resolve(params);
|
|
2377
|
+
const resolvedValue1 = node.constructorParams[1].resolve(params);
|
|
2378
|
+
const resolvedValue2 = node.constructorParams[2].resolve(params);
|
|
2379
|
+
const resolvedValue3 = node.constructorParams[3].resolve(params);
|
|
2380
|
+
return resolveFour(resolvedValue0, resolvedValue1, resolvedValue2, resolvedValue3, (resolvedValue02, resolvedValue12, resolvedValue22, resolvedValue32) => finalizeInstance2(params, new node.binding.implementationType(resolvedValue02, resolvedValue12, resolvedValue22, resolvedValue32)));
|
|
2381
|
+
};
|
|
2382
|
+
}
|
|
2383
|
+
const finalizeInstance = (params, instance) => {
|
|
2384
|
+
const propertiesAssignmentResult = setInstanceProperties(params, instance, node);
|
|
2385
|
+
if (isPromise(propertiesAssignmentResult)) {
|
|
2386
|
+
return propertiesAssignmentResult.then(() => resolveActivations(params, instance));
|
|
2387
|
+
}
|
|
2388
|
+
return resolveActivations(params, instance);
|
|
2389
|
+
};
|
|
2390
|
+
return function resolveNode(params) {
|
|
2391
|
+
const resolvedValue0 = node.constructorParams[0].resolve(params);
|
|
2392
|
+
const resolvedValue1 = node.constructorParams[1].resolve(params);
|
|
2393
|
+
const resolvedValue2 = node.constructorParams[2].resolve(params);
|
|
2394
|
+
const resolvedValue3 = node.constructorParams[3].resolve(params);
|
|
2395
|
+
return resolveFour(resolvedValue0, resolvedValue1, resolvedValue2, resolvedValue3, (resolvedValue02, resolvedValue12, resolvedValue22, resolvedValue32) => finalizeInstance(params, new node.binding.implementationType(resolvedValue02, resolvedValue12, resolvedValue22, resolvedValue32)));
|
|
2396
|
+
};
|
|
1402
2397
|
}
|
|
1403
|
-
function stringifyBindingConstraints(bindingConstraints) {
|
|
1404
|
-
const stringifiedTags = bindingConstraints.tags.size === 0 ? "" : `
|
|
1405
|
-
- tags:
|
|
1406
|
-
- ${[...bindingConstraints.tags.keys()].map((key) => key.toString()).join("\n - ")}`;
|
|
1407
|
-
return `
|
|
1408
2398
|
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
2399
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/buildOneConstructorArgumentResolver.js
|
|
2400
|
+
function buildOneConstructorArgumentResolver(node, resolveActivations) {
|
|
2401
|
+
if (node.classMetadata.properties.size === 0) {
|
|
2402
|
+
if (resolveActivations === void 0) {
|
|
2403
|
+
return function resolveNode(params) {
|
|
2404
|
+
const resolvedValue = node.constructorParams[0].resolve(params);
|
|
2405
|
+
if (isPromise(resolvedValue)) {
|
|
2406
|
+
return resolvedValue.then((resolvedValue2) => new node.binding.implementationType(resolvedValue2));
|
|
2407
|
+
}
|
|
2408
|
+
return new node.binding.implementationType(resolvedValue);
|
|
2409
|
+
};
|
|
2410
|
+
}
|
|
2411
|
+
return function resolveNode(params) {
|
|
2412
|
+
const resolvedValue = node.constructorParams[0].resolve(params);
|
|
2413
|
+
if (isPromise(resolvedValue)) {
|
|
2414
|
+
return resolvedValue.then((resolvedValue2) => resolveActivations(params, new node.binding.implementationType(resolvedValue2)));
|
|
2415
|
+
}
|
|
2416
|
+
return resolveActivations(params, new node.binding.implementationType(resolvedValue));
|
|
2417
|
+
};
|
|
2418
|
+
}
|
|
2419
|
+
if (resolveActivations === void 0) {
|
|
2420
|
+
const finalizeInstance2 = (params, instance) => {
|
|
2421
|
+
const propertiesAssignmentResult = setInstanceProperties(params, instance, node);
|
|
2422
|
+
if (isPromise(propertiesAssignmentResult)) {
|
|
2423
|
+
return propertiesAssignmentResult.then(() => instance);
|
|
2424
|
+
}
|
|
2425
|
+
return instance;
|
|
2426
|
+
};
|
|
2427
|
+
return function resolveNode(params) {
|
|
2428
|
+
const resolvedValue = node.constructorParams[0].resolve(params);
|
|
2429
|
+
if (isPromise(resolvedValue)) {
|
|
2430
|
+
return resolvedValue.then((resolvedValue2) => finalizeInstance2(params, new node.binding.implementationType(resolvedValue2)));
|
|
2431
|
+
}
|
|
2432
|
+
return finalizeInstance2(params, new node.binding.implementationType(resolvedValue));
|
|
2433
|
+
};
|
|
2434
|
+
}
|
|
2435
|
+
const finalizeInstance = (params, instance) => {
|
|
2436
|
+
const propertiesAssignmentResult = setInstanceProperties(params, instance, node);
|
|
2437
|
+
if (isPromise(propertiesAssignmentResult)) {
|
|
2438
|
+
return propertiesAssignmentResult.then(() => resolveActivations(params, instance));
|
|
2439
|
+
}
|
|
2440
|
+
return resolveActivations(params, instance);
|
|
2441
|
+
};
|
|
2442
|
+
return function resolveNode(params) {
|
|
2443
|
+
const resolvedValue = node.constructorParams[0].resolve(params);
|
|
2444
|
+
if (isPromise(resolvedValue)) {
|
|
2445
|
+
return resolvedValue.then((resolvedValue2) => finalizeInstance(params, new node.binding.implementationType(resolvedValue2)));
|
|
2446
|
+
}
|
|
2447
|
+
return finalizeInstance(params, new node.binding.implementationType(resolvedValue));
|
|
2448
|
+
};
|
|
2449
|
+
}
|
|
2450
|
+
|
|
2451
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/resolveThree.js
|
|
2452
|
+
var TWO_PARAMS2 = 2;
|
|
2453
|
+
var THREE_PARAMS2 = 3;
|
|
2454
|
+
function resolveThree(value1, value2, value3, build) {
|
|
2455
|
+
if (isPromise(value1)) {
|
|
2456
|
+
if (isPromise(value2)) {
|
|
2457
|
+
if (isPromise(value3)) {
|
|
2458
|
+
return new Promise((resolve2, reject) => {
|
|
2459
|
+
let resolvedValues = 0;
|
|
2460
|
+
let resolvedValue1;
|
|
2461
|
+
let resolvedValue2;
|
|
2462
|
+
let resolvedValue3;
|
|
2463
|
+
void value1.then((resolvedValue) => {
|
|
2464
|
+
if (++resolvedValues === THREE_PARAMS2) {
|
|
2465
|
+
resolve2(build(resolvedValue, resolvedValue2, resolvedValue3));
|
|
2466
|
+
} else {
|
|
2467
|
+
resolvedValue1 = resolvedValue;
|
|
2468
|
+
}
|
|
2469
|
+
}).catch(reject);
|
|
2470
|
+
void value2.then((resolvedValue) => {
|
|
2471
|
+
if (++resolvedValues === THREE_PARAMS2) {
|
|
2472
|
+
resolve2(build(resolvedValue1, resolvedValue, resolvedValue3));
|
|
2473
|
+
} else {
|
|
2474
|
+
resolvedValue2 = resolvedValue;
|
|
2475
|
+
}
|
|
2476
|
+
}).catch(reject);
|
|
2477
|
+
void value3.then((resolvedValue) => {
|
|
2478
|
+
if (++resolvedValues === THREE_PARAMS2) {
|
|
2479
|
+
resolve2(build(resolvedValue1, resolvedValue2, resolvedValue));
|
|
2480
|
+
} else {
|
|
2481
|
+
resolvedValue3 = resolvedValue;
|
|
2482
|
+
}
|
|
2483
|
+
}).catch(reject);
|
|
2484
|
+
});
|
|
2485
|
+
}
|
|
2486
|
+
return new Promise((resolve2, reject) => {
|
|
2487
|
+
let resolvedValues = 0;
|
|
2488
|
+
let resolvedValue1;
|
|
2489
|
+
let resolvedValue2;
|
|
2490
|
+
void value1.then((resolvedValue) => {
|
|
2491
|
+
if (++resolvedValues === TWO_PARAMS2) {
|
|
2492
|
+
resolve2(build(resolvedValue, resolvedValue2, value3));
|
|
2493
|
+
} else {
|
|
2494
|
+
resolvedValue1 = resolvedValue;
|
|
2495
|
+
}
|
|
2496
|
+
}).catch(reject);
|
|
2497
|
+
void value2.then((resolvedValue) => {
|
|
2498
|
+
if (++resolvedValues === TWO_PARAMS2) {
|
|
2499
|
+
resolve2(build(resolvedValue1, resolvedValue, value3));
|
|
2500
|
+
} else {
|
|
2501
|
+
resolvedValue2 = resolvedValue;
|
|
2502
|
+
}
|
|
2503
|
+
}).catch(reject);
|
|
2504
|
+
});
|
|
2505
|
+
}
|
|
2506
|
+
if (isPromise(value3)) {
|
|
2507
|
+
return new Promise((resolve2, reject) => {
|
|
2508
|
+
let resolvedValues = 0;
|
|
2509
|
+
let resolvedValue1;
|
|
2510
|
+
let resolvedValue3;
|
|
2511
|
+
void value1.then((resolvedValue) => {
|
|
2512
|
+
if (++resolvedValues === TWO_PARAMS2) {
|
|
2513
|
+
resolve2(build(resolvedValue, value2, resolvedValue3));
|
|
2514
|
+
} else {
|
|
2515
|
+
resolvedValue1 = resolvedValue;
|
|
2516
|
+
}
|
|
2517
|
+
}).catch(reject);
|
|
2518
|
+
void value3.then((resolvedValue) => {
|
|
2519
|
+
if (++resolvedValues === TWO_PARAMS2) {
|
|
2520
|
+
resolve2(build(resolvedValue1, value2, resolvedValue));
|
|
2521
|
+
} else {
|
|
2522
|
+
resolvedValue3 = resolvedValue;
|
|
2523
|
+
}
|
|
2524
|
+
}).catch(reject);
|
|
2525
|
+
});
|
|
2526
|
+
}
|
|
2527
|
+
return value1.then(async (resolvedValue1) => build(resolvedValue1, value2, value3));
|
|
2528
|
+
}
|
|
2529
|
+
if (isPromise(value2)) {
|
|
2530
|
+
if (isPromise(value3)) {
|
|
2531
|
+
return new Promise((resolve2, reject) => {
|
|
2532
|
+
let resolvedValues = 0;
|
|
2533
|
+
let resolvedValue2;
|
|
2534
|
+
let resolvedValue3;
|
|
2535
|
+
void value2.then((resolvedValue) => {
|
|
2536
|
+
if (++resolvedValues === TWO_PARAMS2) {
|
|
2537
|
+
resolve2(build(value1, resolvedValue, resolvedValue3));
|
|
2538
|
+
} else {
|
|
2539
|
+
resolvedValue2 = resolvedValue;
|
|
2540
|
+
}
|
|
2541
|
+
}).catch(reject);
|
|
2542
|
+
void value3.then((resolvedValue) => {
|
|
2543
|
+
if (++resolvedValues === TWO_PARAMS2) {
|
|
2544
|
+
resolve2(build(value1, resolvedValue2, resolvedValue));
|
|
2545
|
+
} else {
|
|
2546
|
+
resolvedValue3 = resolvedValue;
|
|
2547
|
+
}
|
|
2548
|
+
}).catch(reject);
|
|
2549
|
+
});
|
|
2550
|
+
}
|
|
2551
|
+
return value2.then(async (resolvedValue2) => build(value1, resolvedValue2, value3));
|
|
2552
|
+
}
|
|
2553
|
+
if (isPromise(value3)) {
|
|
2554
|
+
return value3.then(async (resolvedValue3) => build(value1, value2, resolvedValue3));
|
|
2555
|
+
}
|
|
2556
|
+
return build(value1, value2, value3);
|
|
1412
2557
|
}
|
|
1413
|
-
function stringifyServiceRedirections(serviceRedirections) {
|
|
1414
|
-
return serviceRedirections.length === 0 ? "" : `
|
|
1415
2558
|
|
|
1416
|
-
-
|
|
1417
|
-
|
|
2559
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/buildThreeConstructorArgumentResolver.js
|
|
2560
|
+
function buildThreeConstructorArgumentResolver(node, resolveActivations) {
|
|
2561
|
+
if (node.classMetadata.properties.size === 0) {
|
|
2562
|
+
if (resolveActivations === void 0) {
|
|
2563
|
+
return function resolveNode(params) {
|
|
2564
|
+
const resolvedValue0 = node.constructorParams[0].resolve(params);
|
|
2565
|
+
const resolvedValue1 = node.constructorParams[1].resolve(params);
|
|
2566
|
+
const resolvedValue2 = node.constructorParams[2].resolve(params);
|
|
2567
|
+
return resolveThree(resolvedValue0, resolvedValue1, resolvedValue2, (resolvedValue02, resolvedValue12, resolvedValue22) => new node.binding.implementationType(resolvedValue02, resolvedValue12, resolvedValue22));
|
|
2568
|
+
};
|
|
2569
|
+
}
|
|
2570
|
+
return function resolveNode(params) {
|
|
2571
|
+
const resolvedValue0 = node.constructorParams[0].resolve(params);
|
|
2572
|
+
const resolvedValue1 = node.constructorParams[1].resolve(params);
|
|
2573
|
+
const resolvedValue2 = node.constructorParams[2].resolve(params);
|
|
2574
|
+
return resolveThree(resolvedValue0, resolvedValue1, resolvedValue2, (resolvedValue02, resolvedValue12, resolvedValue22) => resolveActivations(params, new node.binding.implementationType(resolvedValue02, resolvedValue12, resolvedValue22)));
|
|
2575
|
+
};
|
|
2576
|
+
}
|
|
2577
|
+
if (resolveActivations === void 0) {
|
|
2578
|
+
const finalizeInstance2 = (params, instance) => {
|
|
2579
|
+
const propertiesAssignmentResult = setInstanceProperties(params, instance, node);
|
|
2580
|
+
if (isPromise(propertiesAssignmentResult)) {
|
|
2581
|
+
return propertiesAssignmentResult.then(() => instance);
|
|
2582
|
+
}
|
|
2583
|
+
return instance;
|
|
2584
|
+
};
|
|
2585
|
+
return function resolveNode(params) {
|
|
2586
|
+
const resolvedValue0 = node.constructorParams[0].resolve(params);
|
|
2587
|
+
const resolvedValue1 = node.constructorParams[1].resolve(params);
|
|
2588
|
+
const resolvedValue2 = node.constructorParams[2].resolve(params);
|
|
2589
|
+
return resolveThree(resolvedValue0, resolvedValue1, resolvedValue2, (resolvedValue02, resolvedValue12, resolvedValue22) => finalizeInstance2(params, new node.binding.implementationType(resolvedValue02, resolvedValue12, resolvedValue22)));
|
|
2590
|
+
};
|
|
2591
|
+
}
|
|
2592
|
+
const finalizeInstance = (params, instance) => {
|
|
2593
|
+
const propertiesAssignmentResult = setInstanceProperties(params, instance, node);
|
|
2594
|
+
if (isPromise(propertiesAssignmentResult)) {
|
|
2595
|
+
return propertiesAssignmentResult.then(() => resolveActivations(params, instance));
|
|
2596
|
+
}
|
|
2597
|
+
return resolveActivations(params, instance);
|
|
2598
|
+
};
|
|
2599
|
+
return function resolveNode(params) {
|
|
2600
|
+
const resolvedValue0 = node.constructorParams[0].resolve(params);
|
|
2601
|
+
const resolvedValue1 = node.constructorParams[1].resolve(params);
|
|
2602
|
+
const resolvedValue2 = node.constructorParams[2].resolve(params);
|
|
2603
|
+
return resolveThree(resolvedValue0, resolvedValue1, resolvedValue2, (resolvedValue02, resolvedValue12, resolvedValue22) => finalizeInstance(params, new node.binding.implementationType(resolvedValue02, resolvedValue12, resolvedValue22)));
|
|
2604
|
+
};
|
|
1418
2605
|
}
|
|
1419
2606
|
|
|
1420
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1421
|
-
var
|
|
1422
|
-
function
|
|
1423
|
-
if (
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
2607
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/resolveTwo.js
|
|
2608
|
+
var PARAMS = 2;
|
|
2609
|
+
function resolveTwo(value1, value2, build) {
|
|
2610
|
+
if (isPromise(value1)) {
|
|
2611
|
+
if (isPromise(value2)) {
|
|
2612
|
+
return new Promise((resolve2, reject) => {
|
|
2613
|
+
let resolvedValues = 0;
|
|
2614
|
+
let resolvedValue1;
|
|
2615
|
+
let resolvedValue2;
|
|
2616
|
+
void value1.then((resolvedValue) => {
|
|
2617
|
+
if (++resolvedValues === PARAMS) {
|
|
2618
|
+
resolve2(build(resolvedValue, resolvedValue2));
|
|
2619
|
+
} else {
|
|
2620
|
+
resolvedValue1 = resolvedValue;
|
|
2621
|
+
}
|
|
2622
|
+
}).catch(reject);
|
|
2623
|
+
void value2.then((resolvedValue) => {
|
|
2624
|
+
if (++resolvedValues === PARAMS) {
|
|
2625
|
+
resolve2(build(resolvedValue1, resolvedValue));
|
|
2626
|
+
} else {
|
|
2627
|
+
resolvedValue2 = resolvedValue;
|
|
2628
|
+
}
|
|
2629
|
+
}).catch(reject);
|
|
2630
|
+
});
|
|
1430
2631
|
}
|
|
1431
|
-
return;
|
|
2632
|
+
return value1.then(async (resolvedValue1) => build(resolvedValue1, value2));
|
|
1432
2633
|
}
|
|
1433
|
-
|
|
2634
|
+
if (isPromise(value2)) {
|
|
2635
|
+
return value2.then(async (resolvedValue2) => build(value1, resolvedValue2));
|
|
2636
|
+
}
|
|
2637
|
+
return build(value1, value2);
|
|
1434
2638
|
}
|
|
1435
2639
|
|
|
1436
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
2640
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/buildTwoConstructorArgumentResolver.js
|
|
2641
|
+
function buildTwoConstructorArgumentResolver(node, resolveActivations) {
|
|
2642
|
+
if (node.classMetadata.properties.size === 0) {
|
|
2643
|
+
if (resolveActivations === void 0) {
|
|
2644
|
+
return function resolveNode(params) {
|
|
2645
|
+
const resolvedValue0 = node.constructorParams[0].resolve(params);
|
|
2646
|
+
const resolvedValue1 = node.constructorParams[1].resolve(params);
|
|
2647
|
+
return resolveTwo(resolvedValue0, resolvedValue1, (resolvedValue02, resolvedValue12) => new node.binding.implementationType(resolvedValue02, resolvedValue12));
|
|
2648
|
+
};
|
|
2649
|
+
}
|
|
2650
|
+
return function resolveNode(params) {
|
|
2651
|
+
const resolvedValue0 = node.constructorParams[0].resolve(params);
|
|
2652
|
+
const resolvedValue1 = node.constructorParams[1].resolve(params);
|
|
2653
|
+
return resolveTwo(resolvedValue0, resolvedValue1, (resolvedValue02, resolvedValue12) => resolveActivations(params, new node.binding.implementationType(resolvedValue02, resolvedValue12)));
|
|
2654
|
+
};
|
|
2655
|
+
}
|
|
2656
|
+
if (resolveActivations === void 0) {
|
|
2657
|
+
const finalizeInstance2 = (params, instance) => {
|
|
2658
|
+
const propertiesAssignmentResult = setInstanceProperties(params, instance, node);
|
|
2659
|
+
if (isPromise(propertiesAssignmentResult)) {
|
|
2660
|
+
return propertiesAssignmentResult.then(() => instance);
|
|
1444
2661
|
}
|
|
1445
|
-
return;
|
|
2662
|
+
return instance;
|
|
2663
|
+
};
|
|
2664
|
+
return function resolveNode(params) {
|
|
2665
|
+
const resolvedValue0 = node.constructorParams[0].resolve(params);
|
|
2666
|
+
const resolvedValue1 = node.constructorParams[1].resolve(params);
|
|
2667
|
+
return resolveTwo(resolvedValue0, resolvedValue1, (resolvedValue02, resolvedValue12) => finalizeInstance2(params, new node.binding.implementationType(resolvedValue02, resolvedValue12)));
|
|
2668
|
+
};
|
|
2669
|
+
}
|
|
2670
|
+
const finalizeInstance = (params, instance) => {
|
|
2671
|
+
const propertiesAssignmentResult = setInstanceProperties(params, instance, node);
|
|
2672
|
+
if (isPromise(propertiesAssignmentResult)) {
|
|
2673
|
+
return propertiesAssignmentResult.then(() => resolveActivations(params, instance));
|
|
2674
|
+
}
|
|
2675
|
+
return resolveActivations(params, instance);
|
|
2676
|
+
};
|
|
2677
|
+
return function resolveNode(params) {
|
|
2678
|
+
const resolvedValue0 = node.constructorParams[0].resolve(params);
|
|
2679
|
+
const resolvedValue1 = node.constructorParams[1].resolve(params);
|
|
2680
|
+
return resolveTwo(resolvedValue0, resolvedValue1, (resolvedValue02, resolvedValue12) => finalizeInstance(params, new node.binding.implementationType(resolvedValue02, resolvedValue12)));
|
|
2681
|
+
};
|
|
2682
|
+
}
|
|
2683
|
+
|
|
2684
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/buildZeroConstructorArgumentsResolver.js
|
|
2685
|
+
function buildZeroConstructorArgumentsResolver(node, resolveActivations) {
|
|
2686
|
+
if (node.classMetadata.properties.size === 0) {
|
|
2687
|
+
if (resolveActivations === void 0) {
|
|
2688
|
+
return function resolveNode(_params) {
|
|
2689
|
+
return new node.binding.implementationType();
|
|
2690
|
+
};
|
|
1446
2691
|
}
|
|
2692
|
+
return function resolveNode(params) {
|
|
2693
|
+
return resolveActivations(params, new node.binding.implementationType());
|
|
2694
|
+
};
|
|
2695
|
+
}
|
|
2696
|
+
if (resolveActivations === void 0) {
|
|
2697
|
+
return function resolveNode(params) {
|
|
2698
|
+
const instance = new node.binding.implementationType();
|
|
2699
|
+
const propertiesAssignmentResult = setInstanceProperties(params, instance, node);
|
|
2700
|
+
if (isPromise(propertiesAssignmentResult)) {
|
|
2701
|
+
return propertiesAssignmentResult.then(() => instance);
|
|
2702
|
+
}
|
|
2703
|
+
return instance;
|
|
2704
|
+
};
|
|
1447
2705
|
}
|
|
1448
|
-
|
|
2706
|
+
return function resolveNode(params) {
|
|
2707
|
+
const instance = new node.binding.implementationType();
|
|
2708
|
+
const propertiesAssignmentResult = setInstanceProperties(params, instance, node);
|
|
2709
|
+
if (isPromise(propertiesAssignmentResult)) {
|
|
2710
|
+
return propertiesAssignmentResult.then(() => resolveActivations(params, instance));
|
|
2711
|
+
}
|
|
2712
|
+
return resolveActivations(params, instance);
|
|
2713
|
+
};
|
|
1449
2714
|
}
|
|
1450
2715
|
|
|
1451
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1452
|
-
function
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
2716
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/resolveMany.js
|
|
2717
|
+
function resolveMany(...args) {
|
|
2718
|
+
const build = args[args.length - 1];
|
|
2719
|
+
const values = args.slice(0, -1);
|
|
2720
|
+
for (const value of values) {
|
|
2721
|
+
if (isPromise(value)) {
|
|
2722
|
+
return Promise.all(values).then(
|
|
2723
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call
|
|
2724
|
+
(resolvedValues) => build(...resolvedValues)
|
|
2725
|
+
);
|
|
2726
|
+
}
|
|
2727
|
+
}
|
|
2728
|
+
return build(...values);
|
|
2729
|
+
}
|
|
2730
|
+
|
|
2731
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/buildNoActivationsInstanceBindingNodeResolver.js
|
|
2732
|
+
var ZERO_CONSTRUCTOR_ARGUMENTS = 0;
|
|
2733
|
+
var ONE_CONSTRUCTOR_ARGUMENT = 1;
|
|
2734
|
+
var TWO_CONSTRUCTOR_ARGUMENTS = 2;
|
|
2735
|
+
var THREE_CONSTRUCTOR_ARGUMENTS = 3;
|
|
2736
|
+
var FOUR_CONSTRUCTOR_ARGUMENTS = 4;
|
|
2737
|
+
function buildNoActivationsInstanceBindingNodeResolver(node, areServiceActivations) {
|
|
2738
|
+
const serviceIdentifier = node.binding.serviceIdentifier;
|
|
2739
|
+
const resolveActivations = areServiceActivations ? resolveServiceActivations(serviceIdentifier) : void 0;
|
|
2740
|
+
let resolveNode;
|
|
2741
|
+
switch (node.classMetadata.constructorArguments.length) {
|
|
2742
|
+
case ZERO_CONSTRUCTOR_ARGUMENTS:
|
|
2743
|
+
resolveNode = buildZeroConstructorArgumentsResolver(node, resolveActivations);
|
|
2744
|
+
break;
|
|
2745
|
+
case ONE_CONSTRUCTOR_ARGUMENT:
|
|
2746
|
+
resolveNode = buildOneConstructorArgumentResolver(node, resolveActivations);
|
|
2747
|
+
break;
|
|
2748
|
+
case TWO_CONSTRUCTOR_ARGUMENTS:
|
|
2749
|
+
resolveNode = buildTwoConstructorArgumentResolver(node, resolveActivations);
|
|
2750
|
+
break;
|
|
2751
|
+
case THREE_CONSTRUCTOR_ARGUMENTS:
|
|
2752
|
+
resolveNode = buildThreeConstructorArgumentResolver(node, resolveActivations);
|
|
2753
|
+
break;
|
|
2754
|
+
case FOUR_CONSTRUCTOR_ARGUMENTS:
|
|
2755
|
+
resolveNode = buildFourConstructorArgumentResolver(node, resolveActivations);
|
|
2756
|
+
break;
|
|
2757
|
+
default:
|
|
2758
|
+
resolveNode = buildConstructorArgumentsResolver(node, resolveMany, resolveActivations);
|
|
2759
|
+
}
|
|
2760
|
+
return resolveScopedWithNoActivations(node.binding, resolveNode);
|
|
2761
|
+
}
|
|
2762
|
+
|
|
2763
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/getGeneratedResolverId.js
|
|
2764
|
+
var nextGeneratedResolverId = 0;
|
|
2765
|
+
function getGeneratedResolverId() {
|
|
2766
|
+
return nextGeneratedResolverId++;
|
|
2767
|
+
}
|
|
2768
|
+
|
|
2769
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/buildConstructorArgumentsResolverJit.js
|
|
2770
|
+
function buildConstructorArgumentsResolverJit(node, implementationType, resolveAsyncValues, resolveActivations) {
|
|
2771
|
+
const id = getGeneratedResolverId().toString();
|
|
2772
|
+
const constructorArgumentsCount = node.classMetadata.constructorArguments.length;
|
|
2773
|
+
const constructorArgumentIndexes = Array.from({ length: constructorArgumentsCount }, (_, index) => index);
|
|
2774
|
+
const constructorValuesConcatenation = constructorArgumentIndexes.map((index) => `value$${index.toString()}`).join(", ");
|
|
2775
|
+
let constructorValuesDeclarations = "";
|
|
2776
|
+
for (const index of constructorArgumentIndexes) {
|
|
2777
|
+
constructorValuesDeclarations += `const value$${index.toString()} = node$${id}.constructorParams[${index.toString()}].resolve(params$${id});
|
|
2778
|
+
`;
|
|
2779
|
+
}
|
|
2780
|
+
const propertiesArgumentsCount = node.classMetadata.properties.size;
|
|
2781
|
+
const propertiesArgumentIndexes = Array.from({ length: propertiesArgumentsCount }, (_, index) => index);
|
|
2782
|
+
const propertiesValuesConcatenation = propertiesArgumentIndexes.map((index) => `property$${index.toString()}`).join(", ");
|
|
2783
|
+
let propertyValuesDeclarations = `let propertyIterator = node$${id}.propertyParams.entries();
|
|
2784
|
+
`;
|
|
2785
|
+
for (const index of propertiesArgumentIndexes) {
|
|
2786
|
+
propertyValuesDeclarations += `const propertyNode$${index.toString()} = propertyIterator.next().value;
|
|
2787
|
+
const propertyKey$${index.toString()} = propertyNode$${index.toString()}[0];
|
|
2788
|
+
const propertyBound$${index.toString()} = propertyNode$${index.toString()}[1].bindings !== undefined;
|
|
2789
|
+
const property$${index.toString()} = propertyBound$${index.toString()} ? propertyNode$${index.toString()}[1].resolve(params$${id}) : undefined;
|
|
2790
|
+
`;
|
|
2791
|
+
}
|
|
2792
|
+
const propertyAssignments = propertiesArgumentIndexes.map((index) => `if (propertyBound$${index.toString()}) { instance[propertyKey$${index.toString()}] = property$${index.toString()}; }`).join(" \n");
|
|
2793
|
+
const resolveAsyncValuesArguments = [
|
|
2794
|
+
constructorValuesConcatenation,
|
|
2795
|
+
propertiesValuesConcatenation
|
|
2796
|
+
].filter((value) => value.length > 0).join(", ");
|
|
2797
|
+
const resolveAsyncValuesBuildArguments = resolveAsyncValuesArguments;
|
|
2798
|
+
if (resolveActivations === void 0) {
|
|
2799
|
+
const buildResolveNodeBody2 = propertiesArgumentsCount === 0 ? `return function resolveNode$${id}(params$${id}) {
|
|
2800
|
+
${constructorValuesDeclarations}
|
|
2801
|
+
|
|
2802
|
+
return resolveAsyncValues$${id}(
|
|
2803
|
+
${constructorValuesConcatenation},
|
|
2804
|
+
function (${constructorValuesConcatenation}) {
|
|
2805
|
+
return new ctor$${id}(${constructorValuesConcatenation});
|
|
2806
|
+
},
|
|
2807
|
+
);
|
|
2808
|
+
}` : `return function resolveNode$${id}(params$${id}) {
|
|
2809
|
+
${constructorValuesDeclarations}
|
|
2810
|
+
|
|
2811
|
+
${propertyValuesDeclarations}
|
|
2812
|
+
|
|
2813
|
+
return resolveAsyncValues$${id}(
|
|
2814
|
+
${resolveAsyncValuesArguments},
|
|
2815
|
+
function (${resolveAsyncValuesBuildArguments}) {
|
|
2816
|
+
const instance = new ctor$${id}(${constructorValuesConcatenation});
|
|
2817
|
+
|
|
2818
|
+
${propertyAssignments}
|
|
2819
|
+
|
|
2820
|
+
return instance;
|
|
2821
|
+
},
|
|
2822
|
+
);
|
|
2823
|
+
}`;
|
|
2824
|
+
const buildResolveNode2 = new Function(`node$${id}`, `ctor$${id}`, `resolveAsyncValues$${id}`, buildResolveNodeBody2);
|
|
2825
|
+
return buildResolveNode2(node, implementationType, resolveAsyncValues);
|
|
2826
|
+
}
|
|
2827
|
+
const buildResolveNodeBody = propertiesArgumentsCount === 0 ? `return function resolveNode$${id}(params$${id}) {
|
|
2828
|
+
${constructorValuesDeclarations}
|
|
2829
|
+
|
|
2830
|
+
return resolveAsyncValues$${id}(
|
|
2831
|
+
${constructorValuesConcatenation},
|
|
2832
|
+
function (${constructorValuesConcatenation}) {
|
|
2833
|
+
return activate$${id}(
|
|
2834
|
+
params$${id},
|
|
2835
|
+
new ctor$${id}(${constructorValuesConcatenation}),
|
|
2836
|
+
);
|
|
2837
|
+
},
|
|
2838
|
+
);
|
|
2839
|
+
}` : `return function resolveNode$${id}(params$${id}) {
|
|
2840
|
+
${constructorValuesDeclarations}
|
|
2841
|
+
|
|
2842
|
+
${propertyValuesDeclarations}
|
|
2843
|
+
|
|
2844
|
+
return resolveAsyncValues$${id}(
|
|
2845
|
+
${resolveAsyncValuesArguments},
|
|
2846
|
+
function (${resolveAsyncValuesBuildArguments}) {
|
|
2847
|
+
const instance = new ctor$${id}(${constructorValuesConcatenation});
|
|
2848
|
+
|
|
2849
|
+
${propertyAssignments}
|
|
2850
|
+
|
|
2851
|
+
return activate$${id}(
|
|
2852
|
+
params$${id},
|
|
2853
|
+
instance,
|
|
2854
|
+
);
|
|
2855
|
+
},
|
|
2856
|
+
);
|
|
2857
|
+
}`;
|
|
2858
|
+
const buildResolveNode = new Function(`node$${id}`, `ctor$${id}`, `activate$${id}`, `resolveAsyncValues$${id}`, buildResolveNodeBody);
|
|
2859
|
+
return buildResolveNode(node, implementationType, resolveActivations, resolveAsyncValues);
|
|
2860
|
+
}
|
|
2861
|
+
|
|
2862
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/buildOneConstructorArgumentResolverJit.js
|
|
2863
|
+
function buildOneConstructorArgumentResolverJit(node, implementationType, resolveActivations) {
|
|
2864
|
+
const id = getGeneratedResolverId().toString();
|
|
2865
|
+
if (resolveActivations === void 0) {
|
|
2866
|
+
const buildResolveNode2 = new Function(`node$${id}`, `ctor$${id}`, `isPromise$${id}`, `return function resolveNode$${id}(params$${id}) {
|
|
2867
|
+
const resolvedValue$${id} = node$${id}.constructorParams[0].resolve(params$${id});
|
|
2868
|
+
|
|
2869
|
+
if (isPromise$${id}(resolvedValue$${id})) {
|
|
2870
|
+
return resolvedValue$${id}.then(function (resolvedValue$${id}) {
|
|
2871
|
+
return new ctor$${id}(resolvedValue$${id});
|
|
2872
|
+
});
|
|
2873
|
+
}
|
|
2874
|
+
|
|
2875
|
+
return new ctor$${id}(resolvedValue$${id});
|
|
2876
|
+
};`);
|
|
2877
|
+
return buildResolveNode2(node, implementationType, isPromise);
|
|
2878
|
+
}
|
|
2879
|
+
const buildResolveNode = new Function(`node$${id}`, `ctor$${id}`, `activate$${id}`, `isPromise$${id}`, `return function resolveNode$${id}(params$${id}) {
|
|
2880
|
+
const resolvedValue$${id} = node$${id}.constructorParams[0].resolve(params$${id});
|
|
2881
|
+
|
|
2882
|
+
if (isPromise$${id}(resolvedValue$${id})) {
|
|
2883
|
+
return resolvedValue$${id}.then(function (resolvedValue$${id}) {
|
|
2884
|
+
return activate$${id}(params$${id}, new ctor$${id}(resolvedValue$${id}));
|
|
2885
|
+
});
|
|
2886
|
+
}
|
|
2887
|
+
|
|
2888
|
+
return activate$${id}(params$${id}, new ctor$${id}(resolvedValue$${id}));
|
|
2889
|
+
};`);
|
|
2890
|
+
return buildResolveNode(node, implementationType, resolveActivations, isPromise);
|
|
2891
|
+
}
|
|
2892
|
+
|
|
2893
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/buildOnePropertyArgumentResolverJit.js
|
|
2894
|
+
function buildOnePropertyArgumentResolverJit(node, implementationType, resolveActivations) {
|
|
2895
|
+
const id = getGeneratedResolverId().toString();
|
|
2896
|
+
if (resolveActivations === void 0) {
|
|
2897
|
+
const buildResolveNode2 = new Function(`node$${id}`, `ctor$${id}`, `isPromise$${id}`, `return function resolveNode$${id}(params$${id}) {
|
|
2898
|
+
const propertyEntry$${id} = node$${id}.propertyParams.entries().next().value;
|
|
2899
|
+
const propertyKey$${id} = propertyEntry$${id}[0];
|
|
2900
|
+
const instance$${id} = new ctor$${id}();
|
|
2901
|
+
|
|
2902
|
+
if (propertyEntry$${id}[1].bindings === undefined) {
|
|
2903
|
+
return instance$${id};
|
|
2904
|
+
}
|
|
2905
|
+
|
|
2906
|
+
const resolvedValue$${id} = propertyEntry$${id}[1].resolve(params$${id});
|
|
2907
|
+
|
|
2908
|
+
if (isPromise$${id}(resolvedValue$${id})) {
|
|
2909
|
+
return resolvedValue$${id}.then(function (resolvedValue$${id}) {
|
|
2910
|
+
instance$${id}[propertyKey$${id}] = resolvedValue$${id};
|
|
2911
|
+
return instance$${id};
|
|
2912
|
+
});
|
|
2913
|
+
}
|
|
2914
|
+
|
|
2915
|
+
instance$${id}[propertyKey$${id}] = resolvedValue$${id};
|
|
2916
|
+
return instance$${id};
|
|
2917
|
+
};`);
|
|
2918
|
+
return buildResolveNode2(node, implementationType, isPromise);
|
|
2919
|
+
}
|
|
2920
|
+
const buildResolveNode = new Function(`node$${id}`, `ctor$${id}`, `activate$${id}`, `isPromise$${id}`, `return function resolveNode$${id}(params$${id}) {
|
|
2921
|
+
const propertyEntry$${id} = node$${id}.propertyParams.entries().next().value;
|
|
2922
|
+
const propertyKey$${id} = propertyEntry$${id}[0];
|
|
2923
|
+
const instance$${id} = new ctor$${id}();
|
|
2924
|
+
|
|
2925
|
+
if (propertyEntry$${id}[1].bindings === undefined) {
|
|
2926
|
+
return activate$${id}(params$${id}, instance$${id});
|
|
2927
|
+
}
|
|
2928
|
+
|
|
2929
|
+
const resolvedValue$${id} = propertyEntry$${id}[1].resolve(params$${id});
|
|
2930
|
+
|
|
2931
|
+
if (isPromise$${id}(resolvedValue$${id})) {
|
|
2932
|
+
return resolvedValue$${id}.then(function (resolvedValue$${id}) {
|
|
2933
|
+
instance$${id}[propertyKey$${id}] = resolvedValue$${id};
|
|
2934
|
+
return activate$${id}(params$${id}, instance$${id});
|
|
2935
|
+
});
|
|
2936
|
+
}
|
|
2937
|
+
|
|
2938
|
+
instance$${id}[propertyKey$${id}] = resolvedValue$${id};
|
|
2939
|
+
return activate$${id}(params$${id}, instance$${id});
|
|
2940
|
+
};`);
|
|
2941
|
+
return buildResolveNode(node, implementationType, resolveActivations, isPromise);
|
|
2942
|
+
}
|
|
2943
|
+
|
|
2944
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/buildResolveMany.js
|
|
2945
|
+
function buildResolveMany(node) {
|
|
2946
|
+
const id = getGeneratedResolverId().toString();
|
|
2947
|
+
const argumentsCount = node.classMetadata.constructorArguments.length + node.classMetadata.properties.size;
|
|
2948
|
+
const argumentIndexes = Array.from({ length: argumentsCount }, (_, index) => index);
|
|
2949
|
+
const valueConcatenation = argumentIndexes.map((index) => `value$${index.toString()}`).join(", ");
|
|
2950
|
+
const resolvedValueConcatenation = argumentIndexes.map((index) => `resolvedValue$${index.toString()}`).join(", ");
|
|
2951
|
+
const parametersConcatenation = [valueConcatenation, `build$${id}`].filter((value) => value.length > 0).join(", ");
|
|
2952
|
+
const isPromiseChecks = argumentIndexes.map((index) => `isPromise$${id}(value$${index.toString()})`).join(" || ") || "false";
|
|
2953
|
+
const buildResolveManyFunction = new Function(`isPromise$${id}`, `return function resolveMany$${id}(${parametersConcatenation}) {
|
|
2954
|
+
if (${isPromiseChecks}) {
|
|
2955
|
+
return Promise.all([${valueConcatenation}]).then(
|
|
2956
|
+
function ([${resolvedValueConcatenation}]) {
|
|
2957
|
+
return build$${id}(${resolvedValueConcatenation});
|
|
2958
|
+
},
|
|
2959
|
+
);
|
|
2960
|
+
}
|
|
2961
|
+
|
|
2962
|
+
return build$${id}(${valueConcatenation});
|
|
2963
|
+
};`);
|
|
2964
|
+
return buildResolveManyFunction(isPromise);
|
|
2965
|
+
}
|
|
2966
|
+
|
|
2967
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/buildZeroConstructorArgumentsResolverJit.js
|
|
2968
|
+
function buildZeroConstructorArgumentsResolverJit(implementationType, resolveActivations) {
|
|
2969
|
+
const id = getGeneratedResolverId().toString();
|
|
2970
|
+
if (resolveActivations === void 0) {
|
|
2971
|
+
const buildResolveNode2 = (
|
|
2972
|
+
// eslint-disable-next-line @typescript-eslint/no-implied-eval
|
|
2973
|
+
new Function(`ctor$${id}`, `return function resolveNode$${id}(params$${id}) {
|
|
2974
|
+
return new ctor$${id}();
|
|
2975
|
+
};`)
|
|
2976
|
+
);
|
|
2977
|
+
return buildResolveNode2(implementationType);
|
|
2978
|
+
}
|
|
2979
|
+
const buildResolveNode = (
|
|
2980
|
+
// eslint-disable-next-line @typescript-eslint/no-implied-eval
|
|
2981
|
+
new Function(`ctor$${id}`, `activate$${id}`, `return function resolveNode$${id}(params$${id}) {
|
|
2982
|
+
return activate$${id}(params$${id}, new ctor$${id}());
|
|
2983
|
+
};`)
|
|
2984
|
+
);
|
|
2985
|
+
return buildResolveNode(implementationType, resolveActivations);
|
|
2986
|
+
}
|
|
2987
|
+
|
|
2988
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/buildNoActivationsInstanceBindingNodeResolverJit.js
|
|
2989
|
+
var ZERO_CONSTRUCTOR_ARGUMENTS2 = 0;
|
|
2990
|
+
var ONE_CONSTRUCTOR_ARGUMENT2 = 1;
|
|
2991
|
+
var TWO_CONSTRUCTOR_ARGUMENTS2 = 2;
|
|
2992
|
+
var THREE_CONSTRUCTOR_ARGUMENTS2 = 3;
|
|
2993
|
+
var FOUR_CONSTRUCTOR_ARGUMENTS2 = 4;
|
|
2994
|
+
function buildNoActivationsInstanceBindingNodeResolverJit(node, areServiceActivations) {
|
|
2995
|
+
const implementationType = node.binding.implementationType;
|
|
2996
|
+
const serviceIdentifier = node.binding.serviceIdentifier;
|
|
2997
|
+
const resolveActivations = areServiceActivations ? resolveServiceActivations(serviceIdentifier) : void 0;
|
|
2998
|
+
let resolveNode;
|
|
2999
|
+
switch (node.classMetadata.constructorArguments.length + node.classMetadata.properties.size) {
|
|
3000
|
+
case ZERO_CONSTRUCTOR_ARGUMENTS2:
|
|
3001
|
+
resolveNode = buildZeroConstructorArgumentsResolverJit(implementationType, resolveActivations);
|
|
3002
|
+
break;
|
|
3003
|
+
case ONE_CONSTRUCTOR_ARGUMENT2:
|
|
3004
|
+
resolveNode = node.classMetadata.properties.size === 0 ? buildOneConstructorArgumentResolverJit(node, implementationType, resolveActivations) : buildOnePropertyArgumentResolverJit(node, implementationType, resolveActivations);
|
|
3005
|
+
break;
|
|
3006
|
+
case TWO_CONSTRUCTOR_ARGUMENTS2:
|
|
3007
|
+
resolveNode = buildConstructorArgumentsResolverJit(node, implementationType, resolveTwo, resolveActivations);
|
|
3008
|
+
break;
|
|
3009
|
+
case THREE_CONSTRUCTOR_ARGUMENTS2:
|
|
3010
|
+
resolveNode = buildConstructorArgumentsResolverJit(node, implementationType, resolveThree, resolveActivations);
|
|
3011
|
+
break;
|
|
3012
|
+
case FOUR_CONSTRUCTOR_ARGUMENTS2:
|
|
3013
|
+
resolveNode = buildConstructorArgumentsResolverJit(node, implementationType, resolveFour, resolveActivations);
|
|
3014
|
+
break;
|
|
3015
|
+
default:
|
|
3016
|
+
resolveNode = buildConstructorArgumentsResolverJit(node, implementationType, buildResolveMany(node), resolveActivations);
|
|
3017
|
+
}
|
|
3018
|
+
return resolveScopedWithNoActivations(node.binding, resolveNode);
|
|
3019
|
+
}
|
|
3020
|
+
|
|
3021
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/models/InstanceBindingNodeImplementation.js
|
|
3022
|
+
var resolveInstanceBindingNode2 = resolveInstanceBindingNode(resolveInstanceBindingConstructorParams, resolveInstanceBindingNodeAsyncFromConstructorParams, resolveInstanceBindingNodeFromConstructorParams);
|
|
3023
|
+
var resolveScopedInstanceBindingNode = (node) => resolveScoped(node, resolveInstanceBindingNode2);
|
|
3024
|
+
var InstanceBindingNodeImplementation = class {
|
|
3025
|
+
binding;
|
|
3026
|
+
classMetadata;
|
|
3027
|
+
[isDynamicallyResolvableBindingNodeSymbol];
|
|
3028
|
+
constructorParams;
|
|
3029
|
+
propertyParams;
|
|
3030
|
+
resolve;
|
|
3031
|
+
#jitEnabled;
|
|
3032
|
+
#onResolverChangedHandlers;
|
|
3033
|
+
constructor(binding, classMetadata, params) {
|
|
3034
|
+
this.binding = binding;
|
|
3035
|
+
this.classMetadata = classMetadata;
|
|
3036
|
+
this[isDynamicallyResolvableBindingNodeSymbol] = true;
|
|
3037
|
+
this.constructorParams = [];
|
|
3038
|
+
this.propertyParams = /* @__PURE__ */ new Map();
|
|
3039
|
+
this.#jitEnabled = params.jitEnabled;
|
|
3040
|
+
const areServiceActivations = params.operations.getActivations(binding.serviceIdentifier) !== void 0;
|
|
3041
|
+
this.#onResolverChangedHandlers = void 0;
|
|
3042
|
+
this.resolve = this.#buildInstanceBindingNodeResolver(areServiceActivations);
|
|
3043
|
+
if (!areServiceActivations && this.#areNoBindingActivationsNorPostConstructsDefined()) {
|
|
3044
|
+
params.operations.subscribeActivationAddedOnce(binding.serviceIdentifier, this);
|
|
3045
|
+
}
|
|
3046
|
+
}
|
|
3047
|
+
onActivationAdded() {
|
|
3048
|
+
this.resolve = this.#buildInstanceBindingNodeResolver(true);
|
|
3049
|
+
if (this.#onResolverChangedHandlers !== void 0) {
|
|
3050
|
+
for (const handler of this.#onResolverChangedHandlers) {
|
|
3051
|
+
handler(this.resolve);
|
|
3052
|
+
}
|
|
3053
|
+
}
|
|
3054
|
+
}
|
|
3055
|
+
addOnResolverChangedHandler(callback) {
|
|
3056
|
+
if (this.#onResolverChangedHandlers === void 0) {
|
|
3057
|
+
this.#onResolverChangedHandlers = [];
|
|
3058
|
+
}
|
|
3059
|
+
this.#onResolverChangedHandlers.push(callback);
|
|
3060
|
+
}
|
|
3061
|
+
#buildInstanceBindingNodeResolver(areServiceActivations) {
|
|
3062
|
+
if (this.#areNoBindingActivationsNorPostConstructsDefined()) {
|
|
3063
|
+
if (this.#jitEnabled && this.binding.scope !== bindingScopeValues.Singleton) {
|
|
3064
|
+
return buildNoActivationsInstanceBindingNodeResolverJit(this, areServiceActivations);
|
|
3065
|
+
} else {
|
|
3066
|
+
return buildNoActivationsInstanceBindingNodeResolver(this, areServiceActivations);
|
|
3067
|
+
}
|
|
3068
|
+
}
|
|
3069
|
+
return resolveScopedInstanceBindingNode(this);
|
|
3070
|
+
}
|
|
3071
|
+
#areNoBindingActivationsNorPostConstructsDefined() {
|
|
3072
|
+
return this.classMetadata.lifecycle.postConstructMethodNames.size === 0 && this.binding.onActivation === void 0;
|
|
3073
|
+
}
|
|
3074
|
+
};
|
|
3075
|
+
|
|
3076
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/models/PlanServiceRedirectionBindingNodeImplementation.js
|
|
3077
|
+
var PlanServiceRedirectionBindingNodeImplementation = class {
|
|
3078
|
+
binding;
|
|
3079
|
+
#redirection;
|
|
3080
|
+
#resolve;
|
|
3081
|
+
constructor(binding) {
|
|
3082
|
+
this.binding = binding;
|
|
3083
|
+
this.#redirection = void 0;
|
|
3084
|
+
this.#resolve = void 0;
|
|
3085
|
+
}
|
|
3086
|
+
get redirection() {
|
|
3087
|
+
return this.#redirection;
|
|
3088
|
+
}
|
|
3089
|
+
set redirection(value) {
|
|
3090
|
+
this.#redirection = value;
|
|
3091
|
+
if (value.bindings === void 0) {
|
|
3092
|
+
this.#resolve = () => void 0;
|
|
3093
|
+
} else {
|
|
3094
|
+
if (Array.isArray(value.bindings)) {
|
|
3095
|
+
this.#resolve = () => {
|
|
3096
|
+
throw new InversifyCoreError(InversifyCoreErrorKind.planning, "Unexpected resolver call for multiple bindings redirection");
|
|
3097
|
+
};
|
|
3098
|
+
} else {
|
|
3099
|
+
this.#resolve = (params) => (
|
|
3100
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
3101
|
+
value.bindings.resolve(params)
|
|
3102
|
+
);
|
|
3103
|
+
}
|
|
3104
|
+
}
|
|
3105
|
+
}
|
|
3106
|
+
resolve(params) {
|
|
3107
|
+
return this.#resolve(params);
|
|
3108
|
+
}
|
|
3109
|
+
};
|
|
3110
|
+
|
|
3111
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveResolvedValueBindingParams.js
|
|
3112
|
+
function resolveResolvedValueBindingParams(params, node) {
|
|
3113
|
+
const paramsResolvedValues = [];
|
|
3114
|
+
let promiseValueFound = false;
|
|
3115
|
+
for (const param of node.params) {
|
|
3116
|
+
const resolvedValue = param.resolve(params);
|
|
3117
|
+
if (!promiseValueFound && isPromise(resolvedValue)) {
|
|
3118
|
+
promiseValueFound = true;
|
|
3119
|
+
}
|
|
3120
|
+
paramsResolvedValues.push(resolvedValue);
|
|
3121
|
+
}
|
|
3122
|
+
return promiseValueFound ? Promise.all(paramsResolvedValues) : paramsResolvedValues;
|
|
3123
|
+
}
|
|
3124
|
+
|
|
3125
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveResolvedValueBindingNode.js
|
|
3126
|
+
function resolveResolvedValueBindingNode(params, node) {
|
|
3127
|
+
const paramValues = (
|
|
3128
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3129
|
+
resolveResolvedValueBindingParams(params, node)
|
|
3130
|
+
);
|
|
3131
|
+
if (isPromise(paramValues)) {
|
|
3132
|
+
return paramValues.then((resolvedParamValues) => node.binding.factory(...resolvedParamValues));
|
|
3133
|
+
}
|
|
3134
|
+
return node.binding.factory(...paramValues);
|
|
3135
|
+
}
|
|
3136
|
+
|
|
3137
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/buildFourResolvedValueArgumentResolver.js
|
|
3138
|
+
function buildFourResolvedValueArgumentResolver(node, resolveActivations) {
|
|
3139
|
+
if (resolveActivations === void 0) {
|
|
3140
|
+
return function resolveNode(params) {
|
|
3141
|
+
const resolvedValue0 = node.params[0].resolve(params);
|
|
3142
|
+
const resolvedValue1 = node.params[1].resolve(params);
|
|
3143
|
+
const resolvedValue2 = node.params[2].resolve(params);
|
|
3144
|
+
const resolvedValue3 = node.params[3].resolve(params);
|
|
3145
|
+
return resolveFour(resolvedValue0, resolvedValue1, resolvedValue2, resolvedValue3, (resolvedValue02, resolvedValue12, resolvedValue22, resolvedValue32) => node.binding.factory(resolvedValue02, resolvedValue12, resolvedValue22, resolvedValue32));
|
|
1465
3146
|
};
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
3147
|
+
}
|
|
3148
|
+
return function resolveNode(params) {
|
|
3149
|
+
const resolvedValue0 = node.params[0].resolve(params);
|
|
3150
|
+
const resolvedValue1 = node.params[1].resolve(params);
|
|
3151
|
+
const resolvedValue2 = node.params[2].resolve(params);
|
|
3152
|
+
const resolvedValue3 = node.params[3].resolve(params);
|
|
3153
|
+
return resolveFour(resolvedValue0, resolvedValue1, resolvedValue2, resolvedValue3, (resolvedValue02, resolvedValue12, resolvedValue22, resolvedValue32) => resolveActivations(params, node.binding.factory(resolvedValue02, resolvedValue12, resolvedValue22, resolvedValue32)));
|
|
3154
|
+
};
|
|
3155
|
+
}
|
|
3156
|
+
|
|
3157
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/buildOneResolvedValueArgumentResolver.js
|
|
3158
|
+
function buildOneResolvedValueArgumentResolver(node, resolveActivations) {
|
|
3159
|
+
if (resolveActivations === void 0) {
|
|
3160
|
+
return function resolveNode(params) {
|
|
3161
|
+
const resolvedValue = node.params[0].resolve(params);
|
|
3162
|
+
if (isPromise(resolvedValue)) {
|
|
3163
|
+
return resolvedValue.then((resolvedValue2) => node.binding.factory(resolvedValue2));
|
|
3164
|
+
}
|
|
3165
|
+
return node.binding.factory(resolvedValue);
|
|
3166
|
+
};
|
|
3167
|
+
}
|
|
3168
|
+
return function resolveNode(params) {
|
|
3169
|
+
const resolvedValue = node.params[0].resolve(params);
|
|
3170
|
+
if (isPromise(resolvedValue)) {
|
|
3171
|
+
return resolvedValue.then((resolvedValue2) => resolveActivations(params, node.binding.factory(resolvedValue2)));
|
|
1472
3172
|
}
|
|
1473
|
-
return
|
|
3173
|
+
return resolveActivations(params, node.binding.factory(resolvedValue));
|
|
1474
3174
|
};
|
|
1475
3175
|
}
|
|
1476
3176
|
|
|
1477
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1478
|
-
function
|
|
1479
|
-
|
|
3177
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/buildThreeResolvedValueArgumentResolver.js
|
|
3178
|
+
function buildThreeResolvedValueArgumentResolver(node, resolveActivations) {
|
|
3179
|
+
if (resolveActivations === void 0) {
|
|
3180
|
+
return function resolveNode(params) {
|
|
3181
|
+
const resolvedValue0 = node.params[0].resolve(params);
|
|
3182
|
+
const resolvedValue1 = node.params[1].resolve(params);
|
|
3183
|
+
const resolvedValue2 = node.params[2].resolve(params);
|
|
3184
|
+
return resolveThree(resolvedValue0, resolvedValue1, resolvedValue2, (resolvedValue02, resolvedValue12, resolvedValue22) => node.binding.factory(resolvedValue02, resolvedValue12, resolvedValue22));
|
|
3185
|
+
};
|
|
3186
|
+
}
|
|
3187
|
+
return function resolveNode(params) {
|
|
3188
|
+
const resolvedValue0 = node.params[0].resolve(params);
|
|
3189
|
+
const resolvedValue1 = node.params[1].resolve(params);
|
|
3190
|
+
const resolvedValue2 = node.params[2].resolve(params);
|
|
3191
|
+
return resolveThree(resolvedValue0, resolvedValue1, resolvedValue2, (resolvedValue02, resolvedValue12, resolvedValue22) => resolveActivations(params, node.binding.factory(resolvedValue02, resolvedValue12, resolvedValue22)));
|
|
3192
|
+
};
|
|
1480
3193
|
}
|
|
1481
3194
|
|
|
1482
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1483
|
-
function
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
serviceIdentifier,
|
|
1490
|
-
tags: elementMetadata.tags
|
|
1491
|
-
});
|
|
1492
|
-
const bindingConstraints = new BindingConstraintsImplementation(updatedBindingConstraintsList.last);
|
|
1493
|
-
const chained = elementMetadata.kind === ClassElementMetadataKind.multipleInjection && elementMetadata.chained;
|
|
1494
|
-
const filteredServiceBindings = buildFilteredServiceBindings(params, bindingConstraints, {
|
|
1495
|
-
chained
|
|
1496
|
-
});
|
|
1497
|
-
const serviceNodeBindings = [];
|
|
1498
|
-
const serviceNode = {
|
|
1499
|
-
bindings: serviceNodeBindings,
|
|
1500
|
-
isContextFree: true,
|
|
1501
|
-
serviceIdentifier
|
|
3195
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/buildTwoResolvedValueArgumentResolver.js
|
|
3196
|
+
function buildTwoResolvedValueArgumentResolver(node, resolveActivations) {
|
|
3197
|
+
if (resolveActivations === void 0) {
|
|
3198
|
+
return function resolveNode(params) {
|
|
3199
|
+
const resolvedValue0 = node.params[0].resolve(params);
|
|
3200
|
+
const resolvedValue1 = node.params[1].resolve(params);
|
|
3201
|
+
return resolveTwo(resolvedValue0, resolvedValue1, (resolvedValue02, resolvedValue12) => node.binding.factory(resolvedValue02, resolvedValue12));
|
|
1502
3202
|
};
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
serviceNode.bindings = planBindingNode;
|
|
1509
|
-
}
|
|
1510
|
-
return serviceNode;
|
|
3203
|
+
}
|
|
3204
|
+
return function resolveNode(params) {
|
|
3205
|
+
const resolvedValue0 = node.params[0].resolve(params);
|
|
3206
|
+
const resolvedValue1 = node.params[1].resolve(params);
|
|
3207
|
+
return resolveTwo(resolvedValue0, resolvedValue1, (resolvedValue02, resolvedValue12) => resolveActivations(params, node.binding.factory(resolvedValue02, resolvedValue12)));
|
|
1511
3208
|
};
|
|
1512
3209
|
}
|
|
1513
3210
|
|
|
1514
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1515
|
-
function
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
getAncestorsCalled: false,
|
|
1520
|
-
name: elementMetadata.name,
|
|
1521
|
-
serviceIdentifier,
|
|
1522
|
-
tags: elementMetadata.tags
|
|
1523
|
-
});
|
|
1524
|
-
const bindingConstraints = new BindingConstraintsImplementation(updatedBindingConstraintsList.last);
|
|
1525
|
-
const chained = elementMetadata.kind === ResolvedValueElementMetadataKind.multipleInjection && elementMetadata.chained;
|
|
1526
|
-
const filteredServiceBindings = buildFilteredServiceBindings(params, bindingConstraints, {
|
|
1527
|
-
chained
|
|
1528
|
-
});
|
|
1529
|
-
const serviceNodeBindings = [];
|
|
1530
|
-
const serviceNode = {
|
|
1531
|
-
bindings: serviceNodeBindings,
|
|
1532
|
-
isContextFree: true,
|
|
1533
|
-
serviceIdentifier
|
|
3211
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/buildZeroResolvedValueArgumentsResolver.js
|
|
3212
|
+
function buildZeroResolvedValueArgumentsResolver(node, resolveActivations) {
|
|
3213
|
+
if (resolveActivations === void 0) {
|
|
3214
|
+
return function resolveNode(_params) {
|
|
3215
|
+
return node.binding.factory();
|
|
1534
3216
|
};
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
checkServiceNodeSingleInjectionBindings(serviceNode, elementMetadata.optional, updatedBindingConstraintsList.last);
|
|
1539
|
-
const [planBindingNode] = serviceNodeBindings;
|
|
1540
|
-
serviceNode.bindings = planBindingNode;
|
|
1541
|
-
}
|
|
1542
|
-
return serviceNode;
|
|
3217
|
+
}
|
|
3218
|
+
return function resolveNode(params) {
|
|
3219
|
+
return resolveActivations(params, node.binding.factory());
|
|
1543
3220
|
};
|
|
1544
3221
|
}
|
|
1545
3222
|
|
|
1546
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
3223
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/buildNoActivationsResolvedValueBindingNodeResolver.js
|
|
3224
|
+
var ZERO_PARAMS = 0;
|
|
3225
|
+
var ONE_PARAM = 1;
|
|
3226
|
+
var TWO_PARAMS3 = 2;
|
|
3227
|
+
var THREE_PARAMS3 = 3;
|
|
3228
|
+
var FOUR_PARAMS2 = 4;
|
|
3229
|
+
function buildNoActivationsResolvedValueBindingNodeResolver(node, areServiceActivations) {
|
|
3230
|
+
const serviceIdentifier = node.binding.serviceIdentifier;
|
|
3231
|
+
const resolveActivations = areServiceActivations ? resolveServiceActivations(serviceIdentifier) : void 0;
|
|
3232
|
+
let resolveNode;
|
|
3233
|
+
switch (node.binding.metadata.arguments.length) {
|
|
3234
|
+
case ZERO_PARAMS:
|
|
3235
|
+
resolveNode = buildZeroResolvedValueArgumentsResolver(node, resolveActivations);
|
|
3236
|
+
break;
|
|
3237
|
+
case ONE_PARAM:
|
|
3238
|
+
resolveNode = buildOneResolvedValueArgumentResolver(node, resolveActivations);
|
|
3239
|
+
break;
|
|
3240
|
+
case TWO_PARAMS3:
|
|
3241
|
+
resolveNode = buildTwoResolvedValueArgumentResolver(node, resolveActivations);
|
|
3242
|
+
break;
|
|
3243
|
+
case THREE_PARAMS3:
|
|
3244
|
+
resolveNode = buildThreeResolvedValueArgumentResolver(node, resolveActivations);
|
|
3245
|
+
break;
|
|
3246
|
+
case FOUR_PARAMS2:
|
|
3247
|
+
resolveNode = buildFourResolvedValueArgumentResolver(node, resolveActivations);
|
|
3248
|
+
break;
|
|
3249
|
+
default:
|
|
3250
|
+
resolveNode = resolveActivations === void 0 ? (params) => resolveResolvedValueBindingNode(params, node) : (params) => resolveActivations(params, resolveResolvedValueBindingNode(params, node));
|
|
3251
|
+
}
|
|
3252
|
+
return resolveScopedWithNoActivations(node.binding, resolveNode);
|
|
3253
|
+
}
|
|
3254
|
+
|
|
3255
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/buildOneResolvedValueArgumentResolverJit.js
|
|
3256
|
+
function buildOneResolvedValueArgumentResolverJit(node, resolveActivations) {
|
|
3257
|
+
const id = getGeneratedResolverId().toString();
|
|
3258
|
+
if (resolveActivations === void 0) {
|
|
3259
|
+
const buildResolveNode2 = new Function(`node$${id}`, `isPromise$${id}`, `return function resolveNode$${id}(params$${id}) {
|
|
3260
|
+
const resolvedValue$${id} = node$${id}.params[0].resolve(params$${id});
|
|
3261
|
+
|
|
3262
|
+
if (isPromise$${id}(resolvedValue$${id})) {
|
|
3263
|
+
return resolvedValue$${id}.then(function (resolvedValue$${id}) {
|
|
3264
|
+
return node$${id}.binding.factory(resolvedValue$${id});
|
|
3265
|
+
});
|
|
3266
|
+
}
|
|
3267
|
+
|
|
3268
|
+
return node$${id}.binding.factory(resolvedValue$${id});
|
|
3269
|
+
};`);
|
|
3270
|
+
return buildResolveNode2(node, isPromise);
|
|
3271
|
+
}
|
|
3272
|
+
const buildResolveNode = new Function(`node$${id}`, `activate$${id}`, `isPromise$${id}`, `return function resolveNode$${id}(params$${id}) {
|
|
3273
|
+
const resolvedValue$${id} = node$${id}.params[0].resolve(params$${id});
|
|
3274
|
+
|
|
3275
|
+
if (isPromise$${id}(resolvedValue$${id})) {
|
|
3276
|
+
return resolvedValue$${id}.then(function (resolvedValue$${id}) {
|
|
3277
|
+
return activate$${id}(params$${id}, node$${id}.binding.factory(resolvedValue$${id}));
|
|
3278
|
+
});
|
|
3279
|
+
}
|
|
3280
|
+
|
|
3281
|
+
return activate$${id}(params$${id}, node$${id}.binding.factory(resolvedValue$${id}));
|
|
3282
|
+
};`);
|
|
3283
|
+
return buildResolveNode(node, resolveActivations, isPromise);
|
|
3284
|
+
}
|
|
3285
|
+
|
|
3286
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/buildResolvedValueArgumentsResolverJit.js
|
|
3287
|
+
function buildResolvedValueArgumentsResolverJit(node, resolveAsyncValues, resolveActivations) {
|
|
3288
|
+
const id = getGeneratedResolverId().toString();
|
|
3289
|
+
const argumentIndexes = Array.from({ length: node.binding.metadata.arguments.length }, (_, index) => index);
|
|
3290
|
+
const resolvedValueConcatenation = argumentIndexes.map((index) => `value$${index.toString()}`).join(", ");
|
|
3291
|
+
let resolvedValueDeclarations = "";
|
|
3292
|
+
for (const index of argumentIndexes) {
|
|
3293
|
+
resolvedValueDeclarations += `const value$${index.toString()} = node$${id}.params[${index.toString()}].resolve(params$${id});
|
|
3294
|
+
`;
|
|
3295
|
+
}
|
|
3296
|
+
if (resolveActivations === void 0) {
|
|
3297
|
+
const buildResolveNode2 = new Function(`node$${id}`, `resolveAsyncValues$${id}`, `return function resolveNode$${id}(params$${id}) {
|
|
3298
|
+
${resolvedValueDeclarations}
|
|
3299
|
+
|
|
3300
|
+
return resolveAsyncValues$${id}(
|
|
3301
|
+
${resolvedValueConcatenation},
|
|
3302
|
+
function (${resolvedValueConcatenation}) {
|
|
3303
|
+
return node$${id}.binding.factory(${resolvedValueConcatenation});
|
|
3304
|
+
},
|
|
3305
|
+
);
|
|
3306
|
+
}`);
|
|
3307
|
+
return buildResolveNode2(node, resolveAsyncValues);
|
|
3308
|
+
}
|
|
3309
|
+
const buildResolveNode = new Function(`node$${id}`, `activate$${id}`, `resolveAsyncValues$${id}`, `return function resolveNode$${id}(params$${id}) {
|
|
3310
|
+
${resolvedValueDeclarations}
|
|
3311
|
+
|
|
3312
|
+
return resolveAsyncValues$${id}(
|
|
3313
|
+
${resolvedValueConcatenation},
|
|
3314
|
+
function (${resolvedValueConcatenation}) {
|
|
3315
|
+
return activate$${id}(
|
|
3316
|
+
params$${id},
|
|
3317
|
+
node$${id}.binding.factory(${resolvedValueConcatenation}),
|
|
3318
|
+
);
|
|
3319
|
+
},
|
|
3320
|
+
);
|
|
3321
|
+
}`);
|
|
3322
|
+
return buildResolveNode(node, resolveActivations, resolveAsyncValues);
|
|
3323
|
+
}
|
|
3324
|
+
|
|
3325
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/buildZeroResolvedValueArgumentsResolverJit.js
|
|
3326
|
+
function buildZeroResolvedValueArgumentsResolverJit(node, resolveActivations) {
|
|
3327
|
+
const id = getGeneratedResolverId().toString();
|
|
3328
|
+
if (resolveActivations === void 0) {
|
|
3329
|
+
const buildResolveNode2 = new Function(`node$${id}`, `return function resolveNode$${id}(params$${id}) {
|
|
3330
|
+
return node$${id}.binding.factory();
|
|
3331
|
+
};`);
|
|
3332
|
+
return buildResolveNode2(node);
|
|
3333
|
+
}
|
|
3334
|
+
const buildResolveNode = new Function(`node$${id}`, `activate$${id}`, `return function resolveNode$${id}(params$${id}) {
|
|
3335
|
+
return activate$${id}(params$${id}, node$${id}.binding.factory());
|
|
3336
|
+
};`);
|
|
3337
|
+
return buildResolveNode(node, resolveActivations);
|
|
3338
|
+
}
|
|
3339
|
+
|
|
3340
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/buildNoActivationsResolvedValueBindingNodeResolverJit.js
|
|
3341
|
+
var ZERO_PARAMS2 = 0;
|
|
3342
|
+
var ONE_PARAM2 = 1;
|
|
3343
|
+
var TWO_PARAMS4 = 2;
|
|
3344
|
+
var THREE_PARAMS4 = 3;
|
|
3345
|
+
var FOUR_PARAMS3 = 4;
|
|
3346
|
+
function buildNoActivationsResolvedValueBindingNodeResolverJit(node, areServiceActivations) {
|
|
3347
|
+
const serviceIdentifier = node.binding.serviceIdentifier;
|
|
3348
|
+
const resolveActivations = areServiceActivations ? resolveServiceActivations(serviceIdentifier) : void 0;
|
|
3349
|
+
let resolveNode;
|
|
3350
|
+
switch (node.binding.metadata.arguments.length) {
|
|
3351
|
+
case ZERO_PARAMS2:
|
|
3352
|
+
resolveNode = buildZeroResolvedValueArgumentsResolverJit(node, resolveActivations);
|
|
3353
|
+
break;
|
|
3354
|
+
case ONE_PARAM2:
|
|
3355
|
+
resolveNode = buildOneResolvedValueArgumentResolverJit(node, resolveActivations);
|
|
3356
|
+
break;
|
|
3357
|
+
case TWO_PARAMS4:
|
|
3358
|
+
resolveNode = buildResolvedValueArgumentsResolverJit(node, resolveTwo, resolveActivations);
|
|
3359
|
+
break;
|
|
3360
|
+
case THREE_PARAMS4:
|
|
3361
|
+
resolveNode = buildResolvedValueArgumentsResolverJit(node, resolveThree, resolveActivations);
|
|
3362
|
+
break;
|
|
3363
|
+
case FOUR_PARAMS3:
|
|
3364
|
+
resolveNode = buildResolvedValueArgumentsResolverJit(node, resolveFour, resolveActivations);
|
|
3365
|
+
break;
|
|
3366
|
+
default:
|
|
3367
|
+
resolveNode = buildResolvedValueArgumentsResolverJit(node, resolveMany, resolveActivations);
|
|
3368
|
+
}
|
|
3369
|
+
return resolveScopedWithNoActivations(node.binding, resolveNode);
|
|
3370
|
+
}
|
|
3371
|
+
|
|
3372
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/models/ResolvedValueBindingNodeImplementation.js
|
|
3373
|
+
var resolveScopedResolvedValueBindingNode = (node) => resolveScoped(node, resolveResolvedValueBindingNode);
|
|
3374
|
+
var ResolvedValueBindingNodeImplementation = class {
|
|
3375
|
+
binding;
|
|
3376
|
+
[isDynamicallyResolvableBindingNodeSymbol];
|
|
3377
|
+
params;
|
|
3378
|
+
resolve;
|
|
3379
|
+
#jitEnabled;
|
|
3380
|
+
#onResolverChangedHandlers;
|
|
3381
|
+
constructor(binding, params) {
|
|
3382
|
+
this.binding = binding;
|
|
3383
|
+
this[isDynamicallyResolvableBindingNodeSymbol] = true;
|
|
3384
|
+
this.params = [];
|
|
3385
|
+
this.#jitEnabled = params.jitEnabled;
|
|
3386
|
+
const areServiceActivations = params.operations.getActivations(binding.serviceIdentifier) !== void 0;
|
|
3387
|
+
this.#onResolverChangedHandlers = void 0;
|
|
3388
|
+
this.resolve = this.#buildResolvedValueBindingNodeResolver(areServiceActivations);
|
|
3389
|
+
if (!areServiceActivations && this.#areNoBindingActivationsDefined()) {
|
|
3390
|
+
params.operations.subscribeActivationAddedOnce(binding.serviceIdentifier, this);
|
|
3391
|
+
}
|
|
3392
|
+
}
|
|
3393
|
+
onActivationAdded() {
|
|
3394
|
+
this.resolve = this.#buildResolvedValueBindingNodeResolver(true);
|
|
3395
|
+
if (this.#onResolverChangedHandlers !== void 0) {
|
|
3396
|
+
for (const handler of this.#onResolverChangedHandlers) {
|
|
3397
|
+
handler(this.resolve);
|
|
3398
|
+
}
|
|
3399
|
+
}
|
|
3400
|
+
}
|
|
3401
|
+
addOnResolverChangedHandler(callback) {
|
|
3402
|
+
if (this.#onResolverChangedHandlers === void 0) {
|
|
3403
|
+
this.#onResolverChangedHandlers = [];
|
|
3404
|
+
}
|
|
3405
|
+
this.#onResolverChangedHandlers.push(callback);
|
|
3406
|
+
}
|
|
3407
|
+
#buildResolvedValueBindingNodeResolver(areServiceActivations) {
|
|
3408
|
+
if (this.#areNoBindingActivationsDefined()) {
|
|
3409
|
+
if (this.#jitEnabled && this.binding.scope !== bindingScopeValues.Singleton) {
|
|
3410
|
+
return buildNoActivationsResolvedValueBindingNodeResolverJit(this, areServiceActivations);
|
|
3411
|
+
} else {
|
|
3412
|
+
return buildNoActivationsResolvedValueBindingNodeResolver(this, areServiceActivations);
|
|
3413
|
+
}
|
|
3414
|
+
}
|
|
3415
|
+
return resolveScopedResolvedValueBindingNode(this);
|
|
3416
|
+
}
|
|
3417
|
+
#areNoBindingActivationsDefined() {
|
|
3418
|
+
return this.binding.onActivation === void 0;
|
|
3419
|
+
}
|
|
3420
|
+
};
|
|
3421
|
+
|
|
3422
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/actions/curryBuildServiceNodeBindings.js
|
|
1547
3423
|
function curryBuildServiceNodeBindings(subplan3) {
|
|
1548
3424
|
const buildInstancePlanBindingNode = curryBuildInstancePlanBindingNode(subplan3);
|
|
1549
3425
|
const buildResolvedValuePlanBindingNode = curryBuildResolvedValuePlanBindingNode(subplan3);
|
|
1550
|
-
const buildServiceNodeBindings3 = (params, bindingConstraintsList, serviceBindings, parentNode,
|
|
3426
|
+
const buildServiceNodeBindings3 = (params, bindingConstraintsList, serviceBindings, parentNode, buildServiceNodeOptions) => {
|
|
1551
3427
|
const serviceIdentifier = isPlanServiceRedirectionBindingNode(parentNode) ? parentNode.binding.targetServiceIdentifier : parentNode.serviceIdentifier;
|
|
1552
3428
|
params.servicesBranch.push(serviceIdentifier);
|
|
1553
3429
|
const planBindingNodes = [];
|
|
1554
3430
|
for (const binding of serviceBindings) {
|
|
3431
|
+
if (binding.type === bindingTypeValues.Factory) {
|
|
3432
|
+
planBindingNodes.push(new FactoryBindingNodeImplementation(binding));
|
|
3433
|
+
continue;
|
|
3434
|
+
}
|
|
1555
3435
|
switch (binding.type) {
|
|
3436
|
+
case bindingTypeValues.ConstantValue: {
|
|
3437
|
+
planBindingNodes.push(new ConstantValueBindingNode(binding));
|
|
3438
|
+
break;
|
|
3439
|
+
}
|
|
3440
|
+
case bindingTypeValues.DynamicValue: {
|
|
3441
|
+
planBindingNodes.push(new DynamicValueBindingNode(binding, params));
|
|
3442
|
+
break;
|
|
3443
|
+
}
|
|
1556
3444
|
case bindingTypeValues.Instance: {
|
|
1557
3445
|
planBindingNodes.push(buildInstancePlanBindingNode(params, binding, bindingConstraintsList));
|
|
1558
3446
|
break;
|
|
@@ -1562,33 +3450,25 @@ function curryBuildServiceNodeBindings(subplan3) {
|
|
|
1562
3450
|
break;
|
|
1563
3451
|
}
|
|
1564
3452
|
case bindingTypeValues.ServiceRedirection: {
|
|
1565
|
-
const planBindingNode = buildServiceRedirectionPlanBindingNode(params, bindingConstraintsList, binding,
|
|
3453
|
+
const planBindingNode = buildServiceRedirectionPlanBindingNode(params, bindingConstraintsList, binding, buildServiceNodeOptions);
|
|
1566
3454
|
planBindingNodes.push(planBindingNode);
|
|
1567
3455
|
break;
|
|
1568
3456
|
}
|
|
1569
|
-
default:
|
|
1570
|
-
planBindingNodes.push({
|
|
1571
|
-
binding
|
|
1572
|
-
});
|
|
1573
3457
|
}
|
|
1574
3458
|
}
|
|
1575
3459
|
params.servicesBranch.pop();
|
|
1576
3460
|
return planBindingNodes;
|
|
1577
3461
|
};
|
|
1578
|
-
const buildServiceRedirectionPlanBindingNode = curryBuildServiceRedirectionPlanBindingNode(
|
|
3462
|
+
const buildServiceRedirectionPlanBindingNode = curryBuildServiceRedirectionPlanBindingNode(subplan3);
|
|
1579
3463
|
return buildServiceNodeBindings3;
|
|
1580
3464
|
}
|
|
1581
3465
|
function curryBuildInstancePlanBindingNode(subplan3) {
|
|
1582
3466
|
return (params, binding, bindingConstraintsList) => {
|
|
1583
3467
|
const classMetadata = params.operations.getClassMetadata(binding.implementationType);
|
|
1584
|
-
const childNode =
|
|
1585
|
-
binding,
|
|
1586
|
-
classMetadata,
|
|
1587
|
-
constructorParams: [],
|
|
1588
|
-
propertyParams: /* @__PURE__ */ new Map()
|
|
1589
|
-
};
|
|
3468
|
+
const childNode = new InstanceBindingNodeImplementation(binding, classMetadata, params);
|
|
1590
3469
|
const subplanParams = {
|
|
1591
3470
|
autobindOptions: params.autobindOptions,
|
|
3471
|
+
jitEnabled: params.jitEnabled,
|
|
1592
3472
|
node: childNode,
|
|
1593
3473
|
operations: params.operations,
|
|
1594
3474
|
servicesBranch: params.servicesBranch
|
|
@@ -1598,12 +3478,27 @@ function curryBuildInstancePlanBindingNode(subplan3) {
|
|
|
1598
3478
|
}
|
|
1599
3479
|
function curryBuildResolvedValuePlanBindingNode(subplan3) {
|
|
1600
3480
|
return (params, binding, bindingConstraintsList) => {
|
|
1601
|
-
const childNode =
|
|
1602
|
-
|
|
1603
|
-
|
|
3481
|
+
const childNode = new ResolvedValueBindingNodeImplementation(binding, params);
|
|
3482
|
+
const subplanParams = {
|
|
3483
|
+
autobindOptions: params.autobindOptions,
|
|
3484
|
+
jitEnabled: params.jitEnabled,
|
|
3485
|
+
node: childNode,
|
|
3486
|
+
operations: params.operations,
|
|
3487
|
+
servicesBranch: params.servicesBranch
|
|
1604
3488
|
};
|
|
3489
|
+
return subplan3(subplanParams, bindingConstraintsList);
|
|
3490
|
+
};
|
|
3491
|
+
}
|
|
3492
|
+
function curryBuildServiceRedirectionPlanBindingNode(subplan3) {
|
|
3493
|
+
return (params, bindingConstraintsList, binding, buildServiceNodeOptions) => {
|
|
3494
|
+
const childNode = new PlanServiceRedirectionBindingNodeImplementation(binding);
|
|
1605
3495
|
const subplanParams = {
|
|
1606
3496
|
autobindOptions: params.autobindOptions,
|
|
3497
|
+
buildServiceNodeOptions: {
|
|
3498
|
+
...buildServiceNodeOptions,
|
|
3499
|
+
serviceIdentifier: binding.targetServiceIdentifier
|
|
3500
|
+
},
|
|
3501
|
+
jitEnabled: params.jitEnabled,
|
|
1607
3502
|
node: childNode,
|
|
1608
3503
|
operations: params.operations,
|
|
1609
3504
|
servicesBranch: params.servicesBranch
|
|
@@ -1611,28 +3506,98 @@ function curryBuildResolvedValuePlanBindingNode(subplan3) {
|
|
|
1611
3506
|
return subplan3(subplanParams, bindingConstraintsList);
|
|
1612
3507
|
};
|
|
1613
3508
|
}
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
3509
|
+
|
|
3510
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/common/calculations/buildBuildServiceNodeOptionsFromClassElementMetadata.js
|
|
3511
|
+
function buildBuildServiceNodeOptionsFromClassElementMetadata(elementMetadata) {
|
|
3512
|
+
const serviceIdentifier = LazyServiceIdentifier.is(elementMetadata.value) ? elementMetadata.value.unwrap() : elementMetadata.value;
|
|
3513
|
+
if (elementMetadata.kind === ClassElementMetadataKind.multipleInjection) {
|
|
3514
|
+
return {
|
|
3515
|
+
chained: elementMetadata.chained,
|
|
3516
|
+
isMultiple: true,
|
|
3517
|
+
name: elementMetadata.name,
|
|
3518
|
+
optional: elementMetadata.optional,
|
|
3519
|
+
serviceIdentifier,
|
|
3520
|
+
tags: elementMetadata.tags
|
|
1619
3521
|
};
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
3522
|
+
}
|
|
3523
|
+
return {
|
|
3524
|
+
isMultiple: false,
|
|
3525
|
+
name: elementMetadata.name,
|
|
3526
|
+
optional: elementMetadata.optional,
|
|
3527
|
+
serviceIdentifier,
|
|
3528
|
+
tags: elementMetadata.tags
|
|
3529
|
+
};
|
|
3530
|
+
}
|
|
3531
|
+
|
|
3532
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/common/calculations/buildBuildServiceNodeOptionsFromResolvedValueElementMetadata.js
|
|
3533
|
+
function buildBuildServiceNodeOptionsFromResolvedValueElementMetadata(elementMetadata) {
|
|
3534
|
+
const serviceIdentifier = LazyServiceIdentifier.is(elementMetadata.value) ? elementMetadata.value.unwrap() : elementMetadata.value;
|
|
3535
|
+
if (elementMetadata.kind === ResolvedValueElementMetadataKind.multipleInjection) {
|
|
3536
|
+
return {
|
|
3537
|
+
chained: elementMetadata.chained,
|
|
3538
|
+
isMultiple: true,
|
|
3539
|
+
name: elementMetadata.name,
|
|
3540
|
+
optional: elementMetadata.optional,
|
|
3541
|
+
serviceIdentifier,
|
|
3542
|
+
tags: elementMetadata.tags
|
|
3543
|
+
};
|
|
3544
|
+
}
|
|
3545
|
+
return {
|
|
3546
|
+
isMultiple: false,
|
|
3547
|
+
name: elementMetadata.name,
|
|
3548
|
+
optional: elementMetadata.optional,
|
|
3549
|
+
serviceIdentifier,
|
|
3550
|
+
tags: elementMetadata.tags
|
|
1627
3551
|
};
|
|
1628
3552
|
}
|
|
1629
3553
|
|
|
1630
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
3554
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/buildConstructorNoParamNode.js
|
|
3555
|
+
var CONSTRUCTOR_NO_PARAM_NODE = {
|
|
3556
|
+
isNoParam: true,
|
|
3557
|
+
resolve: () => void 0
|
|
3558
|
+
};
|
|
3559
|
+
function buildConstructorNoParamNode() {
|
|
3560
|
+
return CONSTRUCTOR_NO_PARAM_NODE;
|
|
3561
|
+
}
|
|
3562
|
+
|
|
3563
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/isInstanceBindingNode.js
|
|
1631
3564
|
function isInstanceBindingNode(node) {
|
|
1632
3565
|
return node.binding.type === bindingTypeValues.Instance;
|
|
1633
3566
|
}
|
|
1634
3567
|
|
|
1635
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
3568
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/tryBuildGetPlanOptionsFromBuildServiceNodeOptions.js
|
|
3569
|
+
function tryBuildGetPlanOptionsFromBuildServiceNodeOptions(options) {
|
|
3570
|
+
let tag;
|
|
3571
|
+
if (options.tags.size === 0) {
|
|
3572
|
+
tag = void 0;
|
|
3573
|
+
} else if (options.tags.size === 1) {
|
|
3574
|
+
const [key, value] = options.tags.entries().next().value;
|
|
3575
|
+
tag = { key, value };
|
|
3576
|
+
} else {
|
|
3577
|
+
return void 0;
|
|
3578
|
+
}
|
|
3579
|
+
const serviceIdentifier = LazyServiceIdentifier.is(options.serviceIdentifier) ? options.serviceIdentifier.unwrap() : options.serviceIdentifier;
|
|
3580
|
+
if (options.isMultiple) {
|
|
3581
|
+
return {
|
|
3582
|
+
chained: options.chained,
|
|
3583
|
+
isMultiple: true,
|
|
3584
|
+
name: options.name,
|
|
3585
|
+
optional: options.optional,
|
|
3586
|
+
serviceIdentifier,
|
|
3587
|
+
tag
|
|
3588
|
+
};
|
|
3589
|
+
} else {
|
|
3590
|
+
return {
|
|
3591
|
+
isMultiple: false,
|
|
3592
|
+
name: options.name,
|
|
3593
|
+
optional: options.optional,
|
|
3594
|
+
serviceIdentifier,
|
|
3595
|
+
tag
|
|
3596
|
+
};
|
|
3597
|
+
}
|
|
3598
|
+
}
|
|
3599
|
+
|
|
3600
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/tryBuildGetPlanOptionsFromManagedClassElementMetadata.js
|
|
1636
3601
|
function tryBuildGetPlanOptionsFromManagedClassElementMetadata(elementMetadata) {
|
|
1637
3602
|
let tag;
|
|
1638
3603
|
if (elementMetadata.tags.size === 0) {
|
|
@@ -1664,7 +3629,7 @@ function tryBuildGetPlanOptionsFromManagedClassElementMetadata(elementMetadata)
|
|
|
1664
3629
|
}
|
|
1665
3630
|
}
|
|
1666
3631
|
|
|
1667
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
3632
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/tryBuildGetPlanOptionsFromResolvedValueElementMetadata.js
|
|
1668
3633
|
function tryBuildGetPlanOptionsFromResolvedValueElementMetadata(resolvedValueElementMetadata) {
|
|
1669
3634
|
let tag;
|
|
1670
3635
|
if (resolvedValueElementMetadata.tags.size === 0) {
|
|
@@ -1696,7 +3661,7 @@ function tryBuildGetPlanOptionsFromResolvedValueElementMetadata(resolvedValueEle
|
|
|
1696
3661
|
}
|
|
1697
3662
|
}
|
|
1698
3663
|
|
|
1699
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
3664
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/actions/cacheNonRootPlanServiceNode.js
|
|
1700
3665
|
function cacheNonRootPlanServiceNode(getPlanOptions, operations, planServiceNode, context) {
|
|
1701
3666
|
if (getPlanOptions !== void 0 && (LazyPlanServiceNode.is(planServiceNode) && !planServiceNode.isExpanded() || planServiceNode.isContextFree)) {
|
|
1702
3667
|
const planResult = {
|
|
@@ -1710,57 +3675,46 @@ function cacheNonRootPlanServiceNode(getPlanOptions, operations, planServiceNode
|
|
|
1710
3675
|
}
|
|
1711
3676
|
}
|
|
1712
3677
|
|
|
1713
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
3678
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/actions/currySubplan.js
|
|
1714
3679
|
var MAX_PLAN_DEPTH = 500;
|
|
1715
|
-
var
|
|
1716
|
-
#params;
|
|
1717
|
-
#buildLazyPlanServiceNodeNodeFromClassElementMetadata;
|
|
1718
|
-
#bindingConstraintsList;
|
|
1719
|
-
#elementMetadata;
|
|
1720
|
-
constructor(params, buildLazyPlanServiceNodeNodeFromClassElementMetadata, bindingConstraintsList, elementMetadata, serviceNode) {
|
|
1721
|
-
super(serviceNode, getServiceFromMaybeLazyServiceIdentifier(elementMetadata.value));
|
|
1722
|
-
this.#buildLazyPlanServiceNodeNodeFromClassElementMetadata = buildLazyPlanServiceNodeNodeFromClassElementMetadata;
|
|
1723
|
-
this.#params = params;
|
|
1724
|
-
this.#bindingConstraintsList = bindingConstraintsList;
|
|
1725
|
-
this.#elementMetadata = elementMetadata;
|
|
1726
|
-
}
|
|
1727
|
-
_buildPlanServiceNode() {
|
|
1728
|
-
return this.#buildLazyPlanServiceNodeNodeFromClassElementMetadata(this.#params, this.#bindingConstraintsList, this.#elementMetadata);
|
|
1729
|
-
}
|
|
1730
|
-
};
|
|
1731
|
-
var LazyResolvedValueMetadataPlanServiceNode = class extends LazyPlanServiceNode {
|
|
3680
|
+
var LazySubPlanServiceNode = class extends LazyPlanServiceNode {
|
|
1732
3681
|
#params;
|
|
1733
|
-
#
|
|
3682
|
+
#buildLazyPlanServiceNodeFromOptions;
|
|
1734
3683
|
#bindingConstraintsList;
|
|
1735
|
-
#
|
|
1736
|
-
constructor(params,
|
|
1737
|
-
super(serviceNode,
|
|
3684
|
+
#options;
|
|
3685
|
+
constructor(params, buildLazyPlanServiceNodeFromOptions, bindingConstraintsList, options, serviceNode) {
|
|
3686
|
+
super(serviceNode, options.serviceIdentifier);
|
|
3687
|
+
this.#buildLazyPlanServiceNodeFromOptions = buildLazyPlanServiceNodeFromOptions;
|
|
1738
3688
|
this.#params = params;
|
|
1739
|
-
this.#buildLazyPlanServiceNodeNodeFromResolvedValueElementMetadata = buildLazyPlanServiceNodeNodeFromResolvedValueElementMetadata;
|
|
1740
3689
|
this.#bindingConstraintsList = bindingConstraintsList;
|
|
1741
|
-
this.#
|
|
3690
|
+
this.#options = options;
|
|
1742
3691
|
}
|
|
1743
3692
|
_buildPlanServiceNode() {
|
|
1744
|
-
return this.#
|
|
3693
|
+
return this.#buildLazyPlanServiceNodeFromOptions(this.#params, this.#bindingConstraintsList, this.#options);
|
|
1745
3694
|
}
|
|
1746
3695
|
};
|
|
1747
|
-
function currySubplan(
|
|
1748
|
-
const subplanInstanceBindingNode = currySubplanInstanceBindingNode(
|
|
1749
|
-
const
|
|
3696
|
+
function currySubplan(buildLazyPlanServiceNodeFromOptions, buildPlanServiceNodeFromOptions2) {
|
|
3697
|
+
const subplanInstanceBindingNode = currySubplanInstanceBindingNode(buildLazyPlanServiceNodeFromOptions, buildPlanServiceNodeFromOptions2);
|
|
3698
|
+
const subplanRedirectionBindingNode = currySubplanRedirectionBindingNode(buildLazyPlanServiceNodeFromOptions, buildPlanServiceNodeFromOptions2);
|
|
3699
|
+
const subplanResolvedValueBindingNode = currySubplanResolvedValueBindingNode(buildLazyPlanServiceNodeFromOptions, buildPlanServiceNodeFromOptions2);
|
|
1750
3700
|
return (params, bindingConstraintsList) => {
|
|
1751
3701
|
if (isInstanceBindingNode(params.node)) {
|
|
1752
3702
|
return subplanInstanceBindingNode(params, params.node, bindingConstraintsList);
|
|
1753
3703
|
} else {
|
|
1754
|
-
|
|
3704
|
+
if (isPlanServiceRedirectionBindingNode(params.node)) {
|
|
3705
|
+
return subplanRedirectionBindingNode(params, params.node, bindingConstraintsList);
|
|
3706
|
+
} else {
|
|
3707
|
+
return subplanResolvedValueBindingNode(params, params.node, bindingConstraintsList);
|
|
3708
|
+
}
|
|
1755
3709
|
}
|
|
1756
3710
|
};
|
|
1757
3711
|
}
|
|
1758
|
-
function currySubplanInstanceBindingNode(
|
|
1759
|
-
const handlePlanServiceNodeBuildFromClassElementMetadata = curryHandlePlanServiceNodeBuildFromClassElementMetadata(
|
|
3712
|
+
function currySubplanInstanceBindingNode(buildLazyPlanServiceNodeFromOptions, buildPlanServiceNodeFromOptions2) {
|
|
3713
|
+
const handlePlanServiceNodeBuildFromClassElementMetadata = curryHandlePlanServiceNodeBuildFromClassElementMetadata(buildLazyPlanServiceNodeFromOptions, buildPlanServiceNodeFromOptions2);
|
|
1760
3714
|
return (params, node, bindingConstraintsList) => {
|
|
1761
3715
|
const classMetadata = node.classMetadata;
|
|
1762
3716
|
for (const [index, elementMetadata] of classMetadata.constructorArguments.entries()) {
|
|
1763
|
-
node.constructorParams[index] = handlePlanServiceNodeBuildFromClassElementMetadata(params, bindingConstraintsList, elementMetadata);
|
|
3717
|
+
node.constructorParams[index] = handlePlanServiceNodeBuildFromClassElementMetadata(params, bindingConstraintsList, elementMetadata) ?? buildConstructorNoParamNode();
|
|
1764
3718
|
}
|
|
1765
3719
|
for (const [propertyKey, elementMetadata] of classMetadata.properties) {
|
|
1766
3720
|
const planServiceNode = handlePlanServiceNodeBuildFromClassElementMetadata(params, bindingConstraintsList, elementMetadata);
|
|
@@ -1771,8 +3725,23 @@ function currySubplanInstanceBindingNode(buildLazyPlanServiceNodeNodeFromClassEl
|
|
|
1771
3725
|
return params.node;
|
|
1772
3726
|
};
|
|
1773
3727
|
}
|
|
1774
|
-
function
|
|
1775
|
-
const
|
|
3728
|
+
function currySubplanRedirectionBindingNode(buildLazyPlanServiceNodeFromOptions, buildPlanServiceNodeFromOptions2) {
|
|
3729
|
+
const handlePlanServiceNodeBuildFromRedirectionSubplanParams = curryHandlePlanServiceNodeBuildFromRedirectionSubplanParams(buildLazyPlanServiceNodeFromOptions, buildPlanServiceNodeFromOptions2);
|
|
3730
|
+
return (params, node, bindingConstraintsList) => {
|
|
3731
|
+
const redirectionSubplanParams = {
|
|
3732
|
+
autobindOptions: params.autobindOptions,
|
|
3733
|
+
buildServiceNodeOptions: params.buildServiceNodeOptions,
|
|
3734
|
+
jitEnabled: params.jitEnabled,
|
|
3735
|
+
node,
|
|
3736
|
+
operations: params.operations,
|
|
3737
|
+
servicesBranch: params.servicesBranch
|
|
3738
|
+
};
|
|
3739
|
+
node.redirection = handlePlanServiceNodeBuildFromRedirectionSubplanParams(redirectionSubplanParams, bindingConstraintsList);
|
|
3740
|
+
return node;
|
|
3741
|
+
};
|
|
3742
|
+
}
|
|
3743
|
+
function currySubplanResolvedValueBindingNode(buildLazyPlanServiceNodeFromOptions, buildPlanServiceNodeFromOptions2) {
|
|
3744
|
+
const handlePlanServiceNodeBuildFromResolvedValueElementMetadata = curryHandlePlanServiceNodeBuildFromResolvedValueElementMetadata(buildLazyPlanServiceNodeFromOptions, buildPlanServiceNodeFromOptions2);
|
|
1776
3745
|
return (params, node, bindingConstraintsList) => {
|
|
1777
3746
|
const resolvedValueMetadata = node.binding.metadata;
|
|
1778
3747
|
for (const [index, elementMetadata] of resolvedValueMetadata.arguments.entries()) {
|
|
@@ -1781,7 +3750,7 @@ function currySubplanResolvedValueBindingNode(buildLazyPlanServiceNodeNodeFromRe
|
|
|
1781
3750
|
return params.node;
|
|
1782
3751
|
};
|
|
1783
3752
|
}
|
|
1784
|
-
function curryHandlePlanServiceNodeBuildFromClassElementMetadata(
|
|
3753
|
+
function curryHandlePlanServiceNodeBuildFromClassElementMetadata(buildLazyPlanServiceNodeFromOptions, buildPlanServiceNodeFromOptions2) {
|
|
1785
3754
|
return (params, bindingConstraintsList, elementMetadata) => {
|
|
1786
3755
|
if (elementMetadata.kind === ClassElementMetadataKind.unmanaged) {
|
|
1787
3756
|
return void 0;
|
|
@@ -1796,18 +3765,40 @@ function curryHandlePlanServiceNodeBuildFromClassElementMetadata(buildLazyPlanSe
|
|
|
1796
3765
|
return planResult.tree.root;
|
|
1797
3766
|
}
|
|
1798
3767
|
}
|
|
1799
|
-
const
|
|
1800
|
-
const
|
|
3768
|
+
const options = buildBuildServiceNodeOptionsFromClassElementMetadata(elementMetadata);
|
|
3769
|
+
const serviceNode = buildPlanServiceNodeFromOptions2(params, bindingConstraintsList, options);
|
|
3770
|
+
const lazyPlanServiceNode = new LazySubPlanServiceNode(params, buildLazyPlanServiceNodeFromOptions, bindingConstraintsList, options, serviceNode);
|
|
3771
|
+
cacheNonRootPlanServiceNode(getPlanOptions, params.operations, lazyPlanServiceNode, {
|
|
3772
|
+
bindingConstraintsList,
|
|
3773
|
+
buildServiceNodeOptions: options
|
|
3774
|
+
});
|
|
3775
|
+
return lazyPlanServiceNode;
|
|
3776
|
+
};
|
|
3777
|
+
}
|
|
3778
|
+
function curryHandlePlanServiceNodeBuildFromRedirectionSubplanParams(buildLazyPlanServiceNodeFromOptions, buildPlanServiceNodeFromOptions2) {
|
|
3779
|
+
return (params, bindingConstraintsList) => {
|
|
3780
|
+
const getPlanOptions = tryBuildGetPlanOptionsFromBuildServiceNodeOptions(params.buildServiceNodeOptions);
|
|
3781
|
+
if (getPlanOptions !== void 0) {
|
|
3782
|
+
const planResult = params.operations.getPlan(getPlanOptions);
|
|
3783
|
+
if (planResult !== void 0 && planResult.tree.root.isContextFree) {
|
|
3784
|
+
return planResult.tree.root;
|
|
3785
|
+
}
|
|
3786
|
+
}
|
|
3787
|
+
const options = params.buildServiceNodeOptions;
|
|
3788
|
+
const serviceNode = buildPlanServiceNodeFromOptions2(params, bindingConstraintsList, options);
|
|
3789
|
+
const lazyPlanServiceNode = new LazySubPlanServiceNode(params, buildLazyPlanServiceNodeFromOptions, bindingConstraintsList, options, serviceNode);
|
|
1801
3790
|
cacheNonRootPlanServiceNode(getPlanOptions, params.operations, lazyPlanServiceNode, {
|
|
1802
3791
|
bindingConstraintsList,
|
|
1803
|
-
|
|
1804
|
-
optionalBindings: elementMetadata.optional
|
|
3792
|
+
buildServiceNodeOptions: options
|
|
1805
3793
|
});
|
|
1806
3794
|
return lazyPlanServiceNode;
|
|
1807
3795
|
};
|
|
1808
3796
|
}
|
|
1809
|
-
function curryHandlePlanServiceNodeBuildFromResolvedValueElementMetadata(
|
|
3797
|
+
function curryHandlePlanServiceNodeBuildFromResolvedValueElementMetadata(buildLazyPlanServiceNodeFromOptions, buildPlanServiceNodeFromOptions2) {
|
|
1810
3798
|
return (params, bindingConstraintsList, elementMetadata) => {
|
|
3799
|
+
if (bindingConstraintsList.length > MAX_PLAN_DEPTH) {
|
|
3800
|
+
throw new InversifyCoreError(InversifyCoreErrorKind.planningMaxDepthExceeded, "Maximum plan depth exceeded. This is likely caused by a circular dependency.");
|
|
3801
|
+
}
|
|
1811
3802
|
const getPlanOptions = tryBuildGetPlanOptionsFromResolvedValueElementMetadata(elementMetadata);
|
|
1812
3803
|
if (getPlanOptions !== void 0) {
|
|
1813
3804
|
const planResult = params.operations.getPlan(getPlanOptions);
|
|
@@ -1815,18 +3806,18 @@ function curryHandlePlanServiceNodeBuildFromResolvedValueElementMetadata(buildLa
|
|
|
1815
3806
|
return planResult.tree.root;
|
|
1816
3807
|
}
|
|
1817
3808
|
}
|
|
1818
|
-
const
|
|
1819
|
-
const
|
|
3809
|
+
const options = buildBuildServiceNodeOptionsFromResolvedValueElementMetadata(elementMetadata);
|
|
3810
|
+
const serviceNode = buildPlanServiceNodeFromOptions2(params, bindingConstraintsList, options);
|
|
3811
|
+
const lazyPlanServiceNode = new LazySubPlanServiceNode(params, buildLazyPlanServiceNodeFromOptions, bindingConstraintsList, options, serviceNode);
|
|
1820
3812
|
cacheNonRootPlanServiceNode(getPlanOptions, params.operations, lazyPlanServiceNode, {
|
|
1821
3813
|
bindingConstraintsList,
|
|
1822
|
-
|
|
1823
|
-
optionalBindings: elementMetadata.optional
|
|
3814
|
+
buildServiceNodeOptions: options
|
|
1824
3815
|
});
|
|
1825
3816
|
return lazyPlanServiceNode;
|
|
1826
3817
|
};
|
|
1827
3818
|
}
|
|
1828
3819
|
|
|
1829
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
3820
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/actions/plan.js
|
|
1830
3821
|
var LazyRootPlanServiceNode = class extends LazyPlanServiceNode {
|
|
1831
3822
|
#params;
|
|
1832
3823
|
constructor(params, serviceNode) {
|
|
@@ -1837,12 +3828,11 @@ var LazyRootPlanServiceNode = class extends LazyPlanServiceNode {
|
|
|
1837
3828
|
return buildPlanServiceNode(this.#params);
|
|
1838
3829
|
}
|
|
1839
3830
|
};
|
|
1840
|
-
var
|
|
1841
|
-
var
|
|
1842
|
-
var subplan = currySubplan(buildPlanServiceNodeFromClassElementMetadata, buildPlanServiceNodeFromResolvedValueElementMetadata, buildPlanServiceNodeFromClassElementMetadata, buildPlanServiceNodeFromResolvedValueElementMetadata);
|
|
3831
|
+
var buildPlanServiceNodeFromOptions = curryBuildPlanServiceNodeFromOptions(circularBuildServiceNodeBindings);
|
|
3832
|
+
var subplan = currySubplan(buildPlanServiceNodeFromOptions, buildPlanServiceNodeFromOptions);
|
|
1843
3833
|
var buildServiceNodeBindings = curryBuildServiceNodeBindings(subplan);
|
|
1844
|
-
function circularBuildServiceNodeBindings(params, bindingConstraintsList, serviceBindings, parentNode,
|
|
1845
|
-
return buildServiceNodeBindings(params, bindingConstraintsList, serviceBindings, parentNode,
|
|
3834
|
+
function circularBuildServiceNodeBindings(params, bindingConstraintsList, serviceBindings, parentNode, buildServiceNodeOptions) {
|
|
3835
|
+
return buildServiceNodeBindings(params, bindingConstraintsList, serviceBindings, parentNode, buildServiceNodeOptions);
|
|
1846
3836
|
}
|
|
1847
3837
|
var buildPlanServiceNode = curryBuildPlanServiceNode(buildServiceNodeBindings);
|
|
1848
3838
|
function plan(params) {
|
|
@@ -1861,95 +3851,28 @@ function plan(params) {
|
|
|
1861
3851
|
params.operations.setPlan(getPlanOptions, planResult);
|
|
1862
3852
|
return planResult;
|
|
1863
3853
|
} catch (error) {
|
|
1864
|
-
handlePlanError(params, error);
|
|
1865
|
-
}
|
|
1866
|
-
}
|
|
1867
|
-
|
|
1868
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/models/CacheBindingInvalidationKind.js
|
|
1869
|
-
var CacheBindingInvalidationKind;
|
|
1870
|
-
(function(CacheBindingInvalidationKind2) {
|
|
1871
|
-
CacheBindingInvalidationKind2["bindingAdded"] = "bindingAdded";
|
|
1872
|
-
CacheBindingInvalidationKind2["bindingRemoved"] = "bindingRemoved";
|
|
1873
|
-
})(CacheBindingInvalidationKind || (CacheBindingInvalidationKind = {}));
|
|
1874
|
-
|
|
1875
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/common/models/WeakList.js
|
|
1876
|
-
var DEFAULT_MINIMUM_LENGTH_TO_REALLOCATE = 8;
|
|
1877
|
-
var DEFAULT_MODULUS_TO_REALLOCATE_ON_PUSH = 1024;
|
|
1878
|
-
var MIN_DEAD_REFS_FOR_REALLOCATION_PERCENTAGE = 0.5;
|
|
1879
|
-
var WeakList = class {
|
|
1880
|
-
#list;
|
|
1881
|
-
#minimumLengthToReallocate;
|
|
1882
|
-
#modulusToReallocateOnPush;
|
|
1883
|
-
constructor() {
|
|
1884
|
-
this.#list = [];
|
|
1885
|
-
this.#minimumLengthToReallocate = DEFAULT_MINIMUM_LENGTH_TO_REALLOCATE;
|
|
1886
|
-
this.#modulusToReallocateOnPush = DEFAULT_MODULUS_TO_REALLOCATE_ON_PUSH;
|
|
1887
|
-
}
|
|
1888
|
-
*[Symbol.iterator]() {
|
|
1889
|
-
let deadRefCount = 0;
|
|
1890
|
-
for (const weakRef of this.#list) {
|
|
1891
|
-
const value = weakRef.deref();
|
|
1892
|
-
if (value === void 0) {
|
|
1893
|
-
++deadRefCount;
|
|
1894
|
-
} else {
|
|
1895
|
-
yield value;
|
|
1896
|
-
}
|
|
1897
|
-
}
|
|
1898
|
-
if (this.#list.length >= this.#minimumLengthToReallocate && this.#shouldReallocate(deadRefCount)) {
|
|
1899
|
-
this.#reallocate(deadRefCount);
|
|
1900
|
-
}
|
|
1901
|
-
}
|
|
1902
|
-
push(value) {
|
|
1903
|
-
const weakRef = new WeakRef(value);
|
|
1904
|
-
this.#list.push(weakRef);
|
|
1905
|
-
if (this.#list.length >= this.#minimumLengthToReallocate && this.#list.length % this.#modulusToReallocateOnPush === 0) {
|
|
1906
|
-
let deadRefCount = 0;
|
|
1907
|
-
for (const ref of this.#list) {
|
|
1908
|
-
if (ref.deref() === void 0) {
|
|
1909
|
-
++deadRefCount;
|
|
1910
|
-
}
|
|
1911
|
-
}
|
|
1912
|
-
if (this.#shouldReallocate(deadRefCount)) {
|
|
1913
|
-
this.#reallocate(deadRefCount);
|
|
1914
|
-
}
|
|
1915
|
-
}
|
|
1916
|
-
}
|
|
1917
|
-
#reallocate(deadRefCount) {
|
|
1918
|
-
const newList = new Array(this.#list.length - deadRefCount);
|
|
1919
|
-
let i = 0;
|
|
1920
|
-
for (const ref of this.#list) {
|
|
1921
|
-
if (ref.deref()) {
|
|
1922
|
-
newList[i++] = ref;
|
|
1923
|
-
}
|
|
1924
|
-
}
|
|
1925
|
-
this.#list = newList;
|
|
1926
|
-
}
|
|
1927
|
-
#shouldReallocate(deadRefCount) {
|
|
1928
|
-
return deadRefCount >= this.#list.length * MIN_DEAD_REFS_FOR_REALLOCATION_PERCENTAGE;
|
|
1929
|
-
}
|
|
1930
|
-
};
|
|
1931
|
-
|
|
1932
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/actions/curryLazyBuildPlanServiceNodeFromClassElementMetadata.js
|
|
1933
|
-
function curryLazyBuildPlanServiceNodeFromClassElementMetadata(buildServiceNodeBindings3) {
|
|
1934
|
-
const buildPlanServiceNodeFromClassElementMetadata2 = curryBuildPlanServiceNodeFromClassElementMetadata(buildServiceNodeBindings3);
|
|
1935
|
-
return (params, bindingConstraintsList, elementMetadata) => {
|
|
1936
|
-
try {
|
|
1937
|
-
return buildPlanServiceNodeFromClassElementMetadata2(params, bindingConstraintsList, elementMetadata);
|
|
1938
|
-
} catch (error) {
|
|
1939
|
-
if (InversifyCoreError.isErrorOfKind(error, InversifyCoreErrorKind.planning)) {
|
|
1940
|
-
return void 0;
|
|
1941
|
-
}
|
|
1942
|
-
throw error;
|
|
1943
|
-
}
|
|
1944
|
-
};
|
|
3854
|
+
handlePlanError(params, error);
|
|
3855
|
+
}
|
|
1945
3856
|
}
|
|
1946
3857
|
|
|
1947
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1948
|
-
function
|
|
1949
|
-
|
|
1950
|
-
|
|
3858
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/isConstructorNoParamNode.js
|
|
3859
|
+
function isConstructorNoParamNode(value) {
|
|
3860
|
+
return value.isNoParam === true;
|
|
3861
|
+
}
|
|
3862
|
+
|
|
3863
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/models/CacheBindingInvalidationKind.js
|
|
3864
|
+
var CacheBindingInvalidationKind;
|
|
3865
|
+
(function(CacheBindingInvalidationKind2) {
|
|
3866
|
+
CacheBindingInvalidationKind2["bindingAdded"] = "bindingAdded";
|
|
3867
|
+
CacheBindingInvalidationKind2["bindingRemoved"] = "bindingRemoved";
|
|
3868
|
+
})(CacheBindingInvalidationKind || (CacheBindingInvalidationKind = {}));
|
|
3869
|
+
|
|
3870
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/curryLazyBuildPlanServiceNodeFromOptions.js
|
|
3871
|
+
function curryLazyBuildPlanServiceNodeFromOptions(buildServiceNodeBindings3) {
|
|
3872
|
+
const buildPlanServiceNodeFromOptions2 = curryBuildPlanServiceNodeFromOptions(buildServiceNodeBindings3);
|
|
3873
|
+
return (params, bindingConstraintsList, options) => {
|
|
1951
3874
|
try {
|
|
1952
|
-
return
|
|
3875
|
+
return buildPlanServiceNodeFromOptions2(params, bindingConstraintsList, options);
|
|
1953
3876
|
} catch (error) {
|
|
1954
3877
|
if (InversifyCoreError.isErrorOfKind(error, InversifyCoreErrorKind.planning)) {
|
|
1955
3878
|
return void 0;
|
|
@@ -1959,18 +3882,14 @@ function curryLazyBuildPlanServiceNodeFromResolvedValueElementMetadata(buildServ
|
|
|
1959
3882
|
};
|
|
1960
3883
|
}
|
|
1961
3884
|
|
|
1962
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
1963
|
-
var subplan2 = currySubplan(
|
|
3885
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/actions/addServiceNodeBindingIfContextFree.js
|
|
3886
|
+
var subplan2 = currySubplan(buildPlanServiceNodeFromOptions, circularLazyBuildPlanServiceNodeFromOptions);
|
|
1964
3887
|
var buildServiceNodeBindings2 = curryBuildServiceNodeBindings(subplan2);
|
|
1965
|
-
var
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
return lazyBuildPlanServiceNodeFromClassElementMetadata(params, bindingConstraintsList, elementMetadata);
|
|
1969
|
-
}
|
|
1970
|
-
function circularLazyBuildPlanServiceNodeFromResolvedValueElementMetadata(params, bindingConstraintsList, elementMetadata) {
|
|
1971
|
-
return lazyBuildPlanServiceNodeFromResolvedValueElementMetadata(params, bindingConstraintsList, elementMetadata);
|
|
3888
|
+
var lazyBuildPlanServiceNodeFromOptions = curryLazyBuildPlanServiceNodeFromOptions(buildServiceNodeBindings2);
|
|
3889
|
+
function circularLazyBuildPlanServiceNodeFromOptions(params, bindingConstraintsList, options) {
|
|
3890
|
+
return lazyBuildPlanServiceNodeFromOptions(params, bindingConstraintsList, options);
|
|
1972
3891
|
}
|
|
1973
|
-
function addServiceNodeBindingIfContextFree(params, serviceNode, binding, bindingConstraintsList,
|
|
3892
|
+
function addServiceNodeBindingIfContextFree(params, serviceNode, binding, bindingConstraintsList, buildServiceNodeOptions) {
|
|
1974
3893
|
if (LazyPlanServiceNode.is(serviceNode) && !serviceNode.isExpanded()) {
|
|
1975
3894
|
return {
|
|
1976
3895
|
isContextFreeBinding: true,
|
|
@@ -1984,12 +3903,12 @@ function addServiceNodeBindingIfContextFree(params, serviceNode, binding, bindin
|
|
|
1984
3903
|
shouldInvalidateServiceNode: false
|
|
1985
3904
|
};
|
|
1986
3905
|
}
|
|
1987
|
-
return addServiceNodeSatisfiedBindingIfContextFree(params, serviceNode, binding, bindingConstraintsList,
|
|
3906
|
+
return addServiceNodeSatisfiedBindingIfContextFree(params, serviceNode, binding, bindingConstraintsList, buildServiceNodeOptions);
|
|
1988
3907
|
}
|
|
1989
|
-
function addServiceNodeSatisfiedBindingIfContextFree(params, serviceNode, binding, bindingConstraintsList,
|
|
3908
|
+
function addServiceNodeSatisfiedBindingIfContextFree(params, serviceNode, binding, bindingConstraintsList, buildServiceNodeOptions) {
|
|
1990
3909
|
let serviceNodeBinding;
|
|
1991
3910
|
try {
|
|
1992
|
-
[serviceNodeBinding] = buildServiceNodeBindings2(params, bindingConstraintsList, [binding], serviceNode,
|
|
3911
|
+
[serviceNodeBinding] = buildServiceNodeBindings2(params, bindingConstraintsList, [binding], serviceNode, buildServiceNodeOptions);
|
|
1993
3912
|
} catch (error) {
|
|
1994
3913
|
if (isStackOverflowError(error) || InversifyCoreError.isErrorOfKind(error, InversifyCoreErrorKind.planningMaxDepthExceeded)) {
|
|
1995
3914
|
return {
|
|
@@ -2023,7 +3942,7 @@ function addServiceNodeBindingNodeIfContextFree(serviceNode, serviceNodeBinding)
|
|
|
2023
3942
|
};
|
|
2024
3943
|
}
|
|
2025
3944
|
|
|
2026
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
3945
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/actions/addRootServiceNodeBindingIfContextFree.js
|
|
2027
3946
|
function addRootServiceNodeBindingIfContextFree(params, serviceNode, binding) {
|
|
2028
3947
|
if (LazyPlanServiceNode.is(serviceNode) && !serviceNode.isExpanded()) {
|
|
2029
3948
|
return {
|
|
@@ -2032,11 +3951,10 @@ function addRootServiceNodeBindingIfContextFree(params, serviceNode, binding) {
|
|
|
2032
3951
|
};
|
|
2033
3952
|
}
|
|
2034
3953
|
const bindingConstraintsList = buildPlanBindingConstraintsList(params);
|
|
2035
|
-
|
|
2036
|
-
return addServiceNodeBindingIfContextFree(params, serviceNode, binding, bindingConstraintsList, chained);
|
|
3954
|
+
return addServiceNodeBindingIfContextFree(params, serviceNode, binding, bindingConstraintsList, buildBuildServiceNodeOptionsFromPlanParamsConstraints(params.rootConstraints));
|
|
2037
3955
|
}
|
|
2038
3956
|
|
|
2039
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
3957
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/actions/removeServiceNodeBindingIfContextFree.js
|
|
2040
3958
|
function removeServiceNodeBindingIfContextFree(serviceNode, binding, bindingConstraintsList, optionalBindings) {
|
|
2041
3959
|
if (LazyPlanServiceNode.is(serviceNode) && !serviceNode.isExpanded()) {
|
|
2042
3960
|
return {
|
|
@@ -2079,7 +3997,7 @@ function removeServiceNodeBindingIfContextFree(serviceNode, binding, bindingCons
|
|
|
2079
3997
|
};
|
|
2080
3998
|
}
|
|
2081
3999
|
|
|
2082
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
4000
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/actions/removeRootServiceNodeBindingIfContextFree.js
|
|
2083
4001
|
function removeRootServiceNodeBindingIfContextFree(params, serviceNode, binding) {
|
|
2084
4002
|
if (LazyPlanServiceNode.is(serviceNode) && !serviceNode.isExpanded()) {
|
|
2085
4003
|
return {
|
|
@@ -2091,19 +4009,22 @@ function removeRootServiceNodeBindingIfContextFree(params, serviceNode, binding)
|
|
|
2091
4009
|
return removeServiceNodeBindingIfContextFree(serviceNode, binding, bindingConstraintsList, params.rootConstraints.isOptional ?? false);
|
|
2092
4010
|
}
|
|
2093
4011
|
|
|
2094
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
4012
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/services/PlanResultCacheService.js
|
|
4013
|
+
var NO_OPTIONS_INDEX = 0;
|
|
2095
4014
|
var CHAINED_MASK = 4;
|
|
2096
4015
|
var IS_MULTIPLE_MASK = 2;
|
|
2097
4016
|
var OPTIONAL_MASK = 1;
|
|
2098
4017
|
var MAP_ARRAY_LENGTH = 8;
|
|
2099
4018
|
var PlanResultCacheService = class {
|
|
4019
|
+
#jitEnabled;
|
|
2100
4020
|
#serviceIdToNonCachedServiceNodeMapMap;
|
|
2101
4021
|
#serviceIdToValuePlanMap;
|
|
2102
4022
|
#namedServiceIdToValuePlanMap;
|
|
2103
4023
|
#namedTaggedServiceIdToValuePlanMap;
|
|
2104
4024
|
#taggedServiceIdToValuePlanMap;
|
|
2105
4025
|
#subscribers;
|
|
2106
|
-
constructor() {
|
|
4026
|
+
constructor(jitEnabled) {
|
|
4027
|
+
this.#jitEnabled = jitEnabled;
|
|
2107
4028
|
this.#serviceIdToNonCachedServiceNodeMapMap = /* @__PURE__ */ new Map();
|
|
2108
4029
|
this.#serviceIdToValuePlanMap = this.#buildInitializedMapArray();
|
|
2109
4030
|
this.#namedServiceIdToValuePlanMap = this.#buildInitializedMapArray();
|
|
@@ -2119,6 +4040,9 @@ var PlanResultCacheService = class {
|
|
|
2119
4040
|
subscriber.clearCache();
|
|
2120
4041
|
}
|
|
2121
4042
|
}
|
|
4043
|
+
getByServiceIdentifier(serviceIdentifier) {
|
|
4044
|
+
return this.#serviceIdToValuePlanMap[NO_OPTIONS_INDEX].get(serviceIdentifier);
|
|
4045
|
+
}
|
|
2122
4046
|
get(options) {
|
|
2123
4047
|
if (options.name === void 0) {
|
|
2124
4048
|
if (options.tag === void 0) {
|
|
@@ -2205,6 +4129,7 @@ var PlanResultCacheService = class {
|
|
|
2205
4129
|
}
|
|
2206
4130
|
return {
|
|
2207
4131
|
autobindOptions: void 0,
|
|
4132
|
+
jitEnabled: this.#jitEnabled,
|
|
2208
4133
|
operations: invalidation.operations,
|
|
2209
4134
|
rootConstraints: planParamsConstraint,
|
|
2210
4135
|
servicesBranch: []
|
|
@@ -2267,13 +4192,11 @@ var PlanResultCacheService = class {
|
|
|
2267
4192
|
#invalidateNonCachePlanBindingNodeDescendents(planBindingNode) {
|
|
2268
4193
|
switch (planBindingNode.binding.type) {
|
|
2269
4194
|
case bindingTypeValues.ServiceRedirection:
|
|
2270
|
-
|
|
2271
|
-
this.#invalidateNonCachePlanBindingNodeDescendents(redirection);
|
|
2272
|
-
}
|
|
4195
|
+
this.#invalidateNonCachePlanServiceNode(planBindingNode.redirection);
|
|
2273
4196
|
break;
|
|
2274
4197
|
case bindingTypeValues.Instance:
|
|
2275
4198
|
for (const constructorParam of planBindingNode.constructorParams) {
|
|
2276
|
-
if (constructorParam
|
|
4199
|
+
if (!isConstructorNoParamNode(constructorParam)) {
|
|
2277
4200
|
this.#invalidateNonCachePlanServiceNode(constructorParam);
|
|
2278
4201
|
}
|
|
2279
4202
|
}
|
|
@@ -2320,9 +4243,10 @@ var PlanResultCacheService = class {
|
|
|
2320
4243
|
for (const [serviceNode, context] of serviceNonCachedServiceNodeMap) {
|
|
2321
4244
|
const result = addServiceNodeBindingIfContextFree({
|
|
2322
4245
|
autobindOptions: void 0,
|
|
4246
|
+
jitEnabled: this.#jitEnabled,
|
|
2323
4247
|
operations: invalidation.operations,
|
|
2324
4248
|
servicesBranch: []
|
|
2325
|
-
}, serviceNode, invalidation.binding, context.bindingConstraintsList, context.
|
|
4249
|
+
}, serviceNode, invalidation.binding, context.bindingConstraintsList, context.buildServiceNodeOptions);
|
|
2326
4250
|
if (result.isContextFreeBinding) {
|
|
2327
4251
|
if (result.shouldInvalidateServiceNode && LazyPlanServiceNode.is(serviceNode)) {
|
|
2328
4252
|
this.#invalidateNonCachePlanServiceNodeDescendents(serviceNode);
|
|
@@ -2335,7 +4259,7 @@ var PlanResultCacheService = class {
|
|
|
2335
4259
|
break;
|
|
2336
4260
|
case CacheBindingInvalidationKind.bindingRemoved:
|
|
2337
4261
|
for (const [serviceNode, context] of serviceNonCachedServiceNodeMap) {
|
|
2338
|
-
const result = removeServiceNodeBindingIfContextFree(serviceNode, invalidation.binding, context.bindingConstraintsList, context.
|
|
4262
|
+
const result = removeServiceNodeBindingIfContextFree(serviceNode, invalidation.binding, context.bindingConstraintsList, context.buildServiceNodeOptions.optional);
|
|
2339
4263
|
if (result.isContextFreeBinding) {
|
|
2340
4264
|
if (result.bindingNodeRemoved !== void 0) {
|
|
2341
4265
|
this.#invalidateNonCachePlanBindingNodeDescendents(result.bindingNodeRemoved);
|
|
@@ -2403,7 +4327,7 @@ var PlanResultCacheService = class {
|
|
|
2403
4327
|
}
|
|
2404
4328
|
};
|
|
2405
4329
|
|
|
2406
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
4330
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/planning/calculations/handleResolveError.js
|
|
2407
4331
|
var INDEX_NOT_FOUND = -1;
|
|
2408
4332
|
function handleResolveError(params, error) {
|
|
2409
4333
|
if (isStackOverflowError(error) || InversifyCoreError.isErrorOfKind(error, InversifyCoreErrorKind.planningMaxDepthExceeded)) {
|
|
@@ -2448,16 +4372,14 @@ function getChildServiceNodes(serviceNode) {
|
|
|
2448
4372
|
}
|
|
2449
4373
|
const processBindingNode = (bindingNode) => {
|
|
2450
4374
|
if (isPlanServiceRedirectionBindingNode(bindingNode)) {
|
|
2451
|
-
|
|
2452
|
-
processBindingNode(redirection);
|
|
2453
|
-
}
|
|
4375
|
+
children.push(...getChildServiceNodes(bindingNode.redirection));
|
|
2454
4376
|
return;
|
|
2455
4377
|
}
|
|
2456
4378
|
switch (bindingNode.binding.type) {
|
|
2457
4379
|
case bindingTypeValues.Instance: {
|
|
2458
4380
|
const instanceNode = bindingNode;
|
|
2459
4381
|
for (const ctorParam of instanceNode.constructorParams) {
|
|
2460
|
-
if (ctorParam
|
|
4382
|
+
if (!isConstructorNoParamNode(ctorParam)) {
|
|
2461
4383
|
children.push(ctorParam);
|
|
2462
4384
|
}
|
|
2463
4385
|
}
|
|
@@ -2494,399 +4416,22 @@ function stringifyServiceIdentifierTrace2(serviceIdentifiers) {
|
|
|
2494
4416
|
return serviceIdentifiersArray.map(stringifyServiceIdentifier).join(" -> ");
|
|
2495
4417
|
}
|
|
2496
4418
|
|
|
2497
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
2498
|
-
function resolveConstantValueBindingCallback(_params, binding) {
|
|
2499
|
-
return binding.value;
|
|
2500
|
-
}
|
|
2501
|
-
|
|
2502
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/cacheResolvedValue.js
|
|
2503
|
-
function cacheResolvedValue(binding, resolvedValue) {
|
|
2504
|
-
if (isPromise(resolvedValue)) {
|
|
2505
|
-
binding.cache = {
|
|
2506
|
-
isRight: true,
|
|
2507
|
-
value: resolvedValue
|
|
2508
|
-
};
|
|
2509
|
-
return resolvedValue.then((syncResolvedValue) => cacheSyncResolvedValue(binding, syncResolvedValue));
|
|
2510
|
-
}
|
|
2511
|
-
return cacheSyncResolvedValue(binding, resolvedValue);
|
|
2512
|
-
}
|
|
2513
|
-
function cacheSyncResolvedValue(binding, resolvedValue) {
|
|
2514
|
-
binding.cache = {
|
|
2515
|
-
isRight: true,
|
|
2516
|
-
value: resolvedValue
|
|
2517
|
-
};
|
|
2518
|
-
return resolvedValue;
|
|
2519
|
-
}
|
|
2520
|
-
|
|
2521
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveBindingServiceActivations.js
|
|
2522
|
-
function resolveBindingServiceActivations(params, serviceIdentifier, value) {
|
|
2523
|
-
const activations = params.getActivations(serviceIdentifier);
|
|
2524
|
-
if (activations === void 0) {
|
|
2525
|
-
return value;
|
|
2526
|
-
}
|
|
2527
|
-
if (isPromise(value)) {
|
|
2528
|
-
return resolveBindingActivationsFromIteratorAsync(params, value, activations[Symbol.iterator]());
|
|
2529
|
-
}
|
|
2530
|
-
return resolveBindingActivationsFromIterator(params, value, activations[Symbol.iterator]());
|
|
2531
|
-
}
|
|
2532
|
-
function resolveBindingActivationsFromIterator(params, value, activationsIterator) {
|
|
2533
|
-
let activatedValue = value;
|
|
2534
|
-
let activationIteratorResult = activationsIterator.next();
|
|
2535
|
-
while (activationIteratorResult.done !== true) {
|
|
2536
|
-
const nextActivatedValue = activationIteratorResult.value(params.context, activatedValue);
|
|
2537
|
-
if (isPromise(nextActivatedValue)) {
|
|
2538
|
-
return resolveBindingActivationsFromIteratorAsync(params, nextActivatedValue, activationsIterator);
|
|
2539
|
-
} else {
|
|
2540
|
-
activatedValue = nextActivatedValue;
|
|
2541
|
-
}
|
|
2542
|
-
activationIteratorResult = activationsIterator.next();
|
|
2543
|
-
}
|
|
2544
|
-
return activatedValue;
|
|
2545
|
-
}
|
|
2546
|
-
async function resolveBindingActivationsFromIteratorAsync(params, value, activationsIterator) {
|
|
2547
|
-
let activatedValue = await value;
|
|
2548
|
-
let activationIteratorResult = activationsIterator.next();
|
|
2549
|
-
while (activationIteratorResult.done !== true) {
|
|
2550
|
-
activatedValue = await activationIteratorResult.value(params.context, activatedValue);
|
|
2551
|
-
activationIteratorResult = activationsIterator.next();
|
|
2552
|
-
}
|
|
2553
|
-
return activatedValue;
|
|
2554
|
-
}
|
|
2555
|
-
|
|
2556
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveBindingActivations.js
|
|
2557
|
-
function resolveBindingActivations(params, binding, value) {
|
|
2558
|
-
let activationResult = value;
|
|
2559
|
-
if (binding.onActivation !== void 0) {
|
|
2560
|
-
const onActivation = binding.onActivation;
|
|
2561
|
-
if (isPromise(activationResult)) {
|
|
2562
|
-
activationResult = activationResult.then((resolved) => onActivation(params.context, resolved));
|
|
2563
|
-
} else {
|
|
2564
|
-
activationResult = onActivation(params.context, activationResult);
|
|
2565
|
-
}
|
|
2566
|
-
}
|
|
2567
|
-
return resolveBindingServiceActivations(params, binding.serviceIdentifier, activationResult);
|
|
2568
|
-
}
|
|
2569
|
-
|
|
2570
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveSingletonScopedBinding.js
|
|
2571
|
-
function resolveSingletonScopedBinding(resolve2) {
|
|
2572
|
-
return (params, binding) => {
|
|
2573
|
-
if (binding.cache.isRight) {
|
|
2574
|
-
return binding.cache.value;
|
|
2575
|
-
}
|
|
2576
|
-
const resolvedValue = resolveBindingActivations(params, binding, resolve2(params, binding));
|
|
2577
|
-
return cacheResolvedValue(binding, resolvedValue);
|
|
2578
|
-
};
|
|
2579
|
-
}
|
|
2580
|
-
|
|
2581
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveConstantValueBinding.js
|
|
2582
|
-
var resolveConstantValueBinding = resolveSingletonScopedBinding(resolveConstantValueBindingCallback);
|
|
2583
|
-
|
|
2584
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/calculations/resolveDynamicValueBindingCallback.js
|
|
2585
|
-
function resolveDynamicValueBindingCallback(params, binding) {
|
|
2586
|
-
return binding.value(params.context);
|
|
2587
|
-
}
|
|
2588
|
-
|
|
2589
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/common/calculations/getSelf.js
|
|
2590
|
-
function getSelf(self) {
|
|
2591
|
-
return self;
|
|
2592
|
-
}
|
|
2593
|
-
|
|
2594
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveScoped.js
|
|
2595
|
-
function resolveScoped(getBinding, resolve2) {
|
|
2596
|
-
return (params, arg) => {
|
|
2597
|
-
const binding = getBinding(arg);
|
|
2598
|
-
switch (binding.scope) {
|
|
2599
|
-
case bindingScopeValues.Singleton: {
|
|
2600
|
-
if (binding.cache.isRight) {
|
|
2601
|
-
return binding.cache.value;
|
|
2602
|
-
}
|
|
2603
|
-
const resolvedValue = resolveBindingActivations(params, binding, resolve2(params, arg));
|
|
2604
|
-
return cacheResolvedValue(binding, resolvedValue);
|
|
2605
|
-
}
|
|
2606
|
-
case bindingScopeValues.Request: {
|
|
2607
|
-
if (params.requestScopeCache.has(binding.id)) {
|
|
2608
|
-
return params.requestScopeCache.get(binding.id);
|
|
2609
|
-
}
|
|
2610
|
-
const resolvedValue = resolveBindingActivations(params, binding, resolve2(params, arg));
|
|
2611
|
-
params.requestScopeCache.set(binding.id, resolvedValue);
|
|
2612
|
-
return resolvedValue;
|
|
2613
|
-
}
|
|
2614
|
-
case bindingScopeValues.Transient:
|
|
2615
|
-
return resolveBindingActivations(params, binding, resolve2(params, arg));
|
|
2616
|
-
}
|
|
2617
|
-
};
|
|
2618
|
-
}
|
|
2619
|
-
|
|
2620
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveScopedBinding.js
|
|
2621
|
-
var resolveScopedBinding = (resolve2) => resolveScoped(getSelf, resolve2);
|
|
2622
|
-
|
|
2623
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveDynamicValueBinding.js
|
|
2624
|
-
var resolveDynamicValueBinding = resolveScopedBinding(resolveDynamicValueBindingCallback);
|
|
2625
|
-
|
|
2626
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/calculations/resolveFactoryBindingCallback.js
|
|
2627
|
-
function resolveFactoryBindingCallback(params, binding) {
|
|
2628
|
-
return binding.factory(params.context);
|
|
2629
|
-
}
|
|
2630
|
-
|
|
2631
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveFactoryBinding.js
|
|
2632
|
-
var resolveFactoryBinding = resolveSingletonScopedBinding(resolveFactoryBindingCallback);
|
|
2633
|
-
|
|
2634
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveInstanceBindingConstructorParams.js
|
|
2635
|
-
function resolveInstanceBindingConstructorParams(resolveServiceNode2) {
|
|
2636
|
-
return (params, node) => {
|
|
2637
|
-
const constructorResolvedValues = [];
|
|
2638
|
-
for (const constructorParam of node.constructorParams) {
|
|
2639
|
-
if (constructorParam === void 0) {
|
|
2640
|
-
constructorResolvedValues.push(void 0);
|
|
2641
|
-
} else {
|
|
2642
|
-
constructorResolvedValues.push(resolveServiceNode2(params, constructorParam));
|
|
2643
|
-
}
|
|
2644
|
-
}
|
|
2645
|
-
return constructorResolvedValues.some(isPromise) ? Promise.all(constructorResolvedValues) : constructorResolvedValues;
|
|
2646
|
-
};
|
|
2647
|
-
}
|
|
2648
|
-
|
|
2649
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveInstanceBindingNode.js
|
|
2650
|
-
function resolveInstanceBindingNode(resolveInstanceBindingConstructorParams2, resolveInstanceBindingNodeAsyncFromConstructorParams2, resolveInstanceBindingNodeFromConstructorParams2) {
|
|
2651
|
-
return (params, node) => {
|
|
2652
|
-
const constructorValues = resolveInstanceBindingConstructorParams2(params, node);
|
|
2653
|
-
if (isPromise(constructorValues)) {
|
|
2654
|
-
return resolveInstanceBindingNodeAsyncFromConstructorParams2(constructorValues, params, node);
|
|
2655
|
-
}
|
|
2656
|
-
return resolveInstanceBindingNodeFromConstructorParams2(constructorValues, params, node);
|
|
2657
|
-
};
|
|
2658
|
-
}
|
|
2659
|
-
|
|
2660
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveInstanceBindingNodeAsyncFromConstructorParams.js
|
|
2661
|
-
function resolveInstanceBindingNodeAsyncFromConstructorParams(resolveInstanceBindingNodeFromConstructorParams2) {
|
|
2662
|
-
return async (constructorValues, params, node) => {
|
|
2663
|
-
const constructorResolvedValues = await constructorValues;
|
|
2664
|
-
return resolveInstanceBindingNodeFromConstructorParams2(constructorResolvedValues, params, node);
|
|
2665
|
-
};
|
|
2666
|
-
}
|
|
2667
|
-
|
|
2668
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolvePostConstruct.js
|
|
2669
|
-
function resolvePostConstruct(instance, binding, postConstructMethodName) {
|
|
2670
|
-
const postConstructResult = invokePostConstruct(instance, binding, postConstructMethodName);
|
|
2671
|
-
if (isPromise(postConstructResult)) {
|
|
2672
|
-
return postConstructResult.then(() => instance);
|
|
2673
|
-
}
|
|
2674
|
-
return instance;
|
|
2675
|
-
}
|
|
2676
|
-
function invokePostConstruct(instance, binding, postConstructMethodName) {
|
|
2677
|
-
if (postConstructMethodName in instance) {
|
|
2678
|
-
if (typeof instance[postConstructMethodName] === "function") {
|
|
2679
|
-
let postConstructResult;
|
|
2680
|
-
try {
|
|
2681
|
-
postConstructResult = instance[postConstructMethodName]();
|
|
2682
|
-
} catch (error) {
|
|
2683
|
-
throw new InversifyCoreError(InversifyCoreErrorKind.resolution, `Unexpected error found when calling "${postConstructMethodName.toString()}" @postConstruct decorated method on class "${binding.implementationType.name}"`, {
|
|
2684
|
-
cause: error
|
|
2685
|
-
});
|
|
2686
|
-
}
|
|
2687
|
-
if (isPromise(postConstructResult)) {
|
|
2688
|
-
return invokePostConstructAsync(binding, postConstructMethodName, postConstructResult);
|
|
2689
|
-
}
|
|
2690
|
-
} else {
|
|
2691
|
-
throw new InversifyCoreError(InversifyCoreErrorKind.resolution, `Expecting a "${postConstructMethodName.toString()}" method when resolving "${binding.implementationType.name}" class @postConstruct decorated method, a non function property was found instead.`);
|
|
2692
|
-
}
|
|
2693
|
-
} else {
|
|
2694
|
-
throw new InversifyCoreError(InversifyCoreErrorKind.resolution, `Expecting a "${postConstructMethodName.toString()}" property when resolving "${binding.implementationType.name}" class @postConstruct decorated method, none found.`);
|
|
2695
|
-
}
|
|
2696
|
-
}
|
|
2697
|
-
async function invokePostConstructAsync(binding, postConstructMethodName, postConstructResult) {
|
|
2698
|
-
try {
|
|
2699
|
-
await postConstructResult;
|
|
2700
|
-
} catch (error) {
|
|
2701
|
-
throw new InversifyCoreError(InversifyCoreErrorKind.resolution, `Unexpected error found when calling "${postConstructMethodName.toString()}" @postConstruct decorated method on class "${binding.implementationType.name}"`, {
|
|
2702
|
-
cause: error
|
|
2703
|
-
});
|
|
2704
|
-
}
|
|
2705
|
-
}
|
|
2706
|
-
|
|
2707
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveInstanceBindingNodeFromConstructorParams.js
|
|
2708
|
-
function resolveAllPostConstructMethods(instance, binding, postConstructMethodNames) {
|
|
2709
|
-
if (postConstructMethodNames.size === 0) {
|
|
2710
|
-
return instance;
|
|
2711
|
-
}
|
|
2712
|
-
let result = instance;
|
|
2713
|
-
for (const methodName of postConstructMethodNames) {
|
|
2714
|
-
if (isPromise(result)) {
|
|
2715
|
-
result = result.then((resolvedInstance) => resolvePostConstruct(resolvedInstance, binding, methodName));
|
|
2716
|
-
} else {
|
|
2717
|
-
result = resolvePostConstruct(result, binding, methodName);
|
|
2718
|
-
}
|
|
2719
|
-
}
|
|
2720
|
-
return result;
|
|
2721
|
-
}
|
|
2722
|
-
function resolveInstanceBindingNodeFromConstructorParams(setInstanceProperties3) {
|
|
2723
|
-
return (constructorValues, params, node) => {
|
|
2724
|
-
const instance = new node.binding.implementationType(...constructorValues);
|
|
2725
|
-
const propertiesAssignmentResult = setInstanceProperties3(params, instance, node);
|
|
2726
|
-
if (isPromise(propertiesAssignmentResult)) {
|
|
2727
|
-
return propertiesAssignmentResult.then(() => resolveAllPostConstructMethods(instance, node.binding, node.classMetadata.lifecycle.postConstructMethodNames));
|
|
2728
|
-
}
|
|
2729
|
-
return resolveAllPostConstructMethods(instance, node.binding, node.classMetadata.lifecycle.postConstructMethodNames);
|
|
2730
|
-
};
|
|
2731
|
-
}
|
|
2732
|
-
|
|
2733
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveResolvedValueBindingNode.js
|
|
2734
|
-
function resolveResolvedValueBindingNode(resolveResolvedValueBindingParams2) {
|
|
2735
|
-
return (params, node) => {
|
|
2736
|
-
const paramValues = resolveResolvedValueBindingParams2(params, node);
|
|
2737
|
-
if (isPromise(paramValues)) {
|
|
2738
|
-
return paramValues.then((resolvedParamValues) => node.binding.factory(...resolvedParamValues));
|
|
2739
|
-
}
|
|
2740
|
-
return node.binding.factory(...paramValues);
|
|
2741
|
-
};
|
|
2742
|
-
}
|
|
2743
|
-
|
|
2744
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveResolvedValueBindingParams.js
|
|
2745
|
-
function resolveResolvedValueBindingParams(resolveServiceNode2) {
|
|
2746
|
-
return (params, node) => {
|
|
2747
|
-
const paramsResolvedValues = [];
|
|
2748
|
-
for (const param of node.params) {
|
|
2749
|
-
paramsResolvedValues.push(resolveServiceNode2(params, param));
|
|
2750
|
-
}
|
|
2751
|
-
return paramsResolvedValues.some(isPromise) ? Promise.all(paramsResolvedValues) : paramsResolvedValues;
|
|
2752
|
-
};
|
|
2753
|
-
}
|
|
2754
|
-
|
|
2755
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/calculations/getInstanceNodeBinding.js
|
|
2756
|
-
function getInstanceNodeBinding(node) {
|
|
2757
|
-
return node.binding;
|
|
2758
|
-
}
|
|
2759
|
-
|
|
2760
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveScopedInstanceBindingNode.js
|
|
2761
|
-
var resolveScopedInstanceBindingNode = (resolve2) => resolveScoped(getInstanceNodeBinding, resolve2);
|
|
2762
|
-
|
|
2763
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/calculations/getResolvedValueNodeBinding.js
|
|
2764
|
-
function getResolvedValueNodeBinding(node) {
|
|
2765
|
-
return node.binding;
|
|
2766
|
-
}
|
|
2767
|
-
|
|
2768
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveScopedResolvedValueBindingNode.js
|
|
2769
|
-
var resolveScopedResolvedValueBindingNode = (resolve2) => resolveScoped(getResolvedValueNodeBinding, resolve2);
|
|
2770
|
-
|
|
2771
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveServiceRedirectionBindingNode.js
|
|
2772
|
-
function resolveServiceRedirectionBindingNode(resolveBindingNode2) {
|
|
2773
|
-
function innerResolveServiceRedirectionBindingNode(params, node) {
|
|
2774
|
-
const resolvedValues = [];
|
|
2775
|
-
for (const redirection of node.redirections) {
|
|
2776
|
-
if (isPlanServiceRedirectionBindingNode(redirection)) {
|
|
2777
|
-
resolvedValues.push(...innerResolveServiceRedirectionBindingNode(params, redirection));
|
|
2778
|
-
} else {
|
|
2779
|
-
resolvedValues.push(resolveBindingNode2(params, redirection));
|
|
2780
|
-
}
|
|
2781
|
-
}
|
|
2782
|
-
return resolvedValues;
|
|
2783
|
-
}
|
|
2784
|
-
return innerResolveServiceRedirectionBindingNode;
|
|
2785
|
-
}
|
|
2786
|
-
|
|
2787
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/setInstanceProperties.js
|
|
2788
|
-
function setInstanceProperties(resolveServiceNode2) {
|
|
2789
|
-
return (params, instance, node) => {
|
|
2790
|
-
const propertyAssignmentPromises = [];
|
|
2791
|
-
for (const [propertyKey, propertyNode] of node.propertyParams) {
|
|
2792
|
-
const metadata = node.classMetadata.properties.get(propertyKey);
|
|
2793
|
-
if (metadata === void 0) {
|
|
2794
|
-
throw new InversifyCoreError(InversifyCoreErrorKind.resolution, `Expecting metadata at property "${propertyKey.toString()}", none found`);
|
|
2795
|
-
}
|
|
2796
|
-
if (metadata.kind !== ClassElementMetadataKind.unmanaged && propertyNode.bindings !== void 0) {
|
|
2797
|
-
instance[propertyKey] = resolveServiceNode2(params, propertyNode);
|
|
2798
|
-
if (isPromise(instance[propertyKey])) {
|
|
2799
|
-
propertyAssignmentPromises.push((async () => {
|
|
2800
|
-
instance[propertyKey] = await instance[propertyKey];
|
|
2801
|
-
})());
|
|
2802
|
-
}
|
|
2803
|
-
}
|
|
2804
|
-
}
|
|
2805
|
-
if (propertyAssignmentPromises.length > 0) {
|
|
2806
|
-
return Promise.all(propertyAssignmentPromises).then(() => void 0);
|
|
2807
|
-
}
|
|
2808
|
-
};
|
|
2809
|
-
}
|
|
2810
|
-
|
|
2811
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@10.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolve.js
|
|
2812
|
-
var setInstanceProperties2 = setInstanceProperties(resolveServiceNode);
|
|
2813
|
-
var resolveServiceRedirectionBindingNode2 = resolveServiceRedirectionBindingNode(resolveBindingNode);
|
|
2814
|
-
var resolveInstanceBindingNode2 = resolveInstanceBindingNode(
|
|
2815
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2816
|
-
resolveInstanceBindingConstructorParams(resolveServiceNode),
|
|
2817
|
-
resolveInstanceBindingNodeAsyncFromConstructorParams(resolveInstanceBindingNodeFromConstructorParams(setInstanceProperties2)),
|
|
2818
|
-
resolveInstanceBindingNodeFromConstructorParams(setInstanceProperties2)
|
|
2819
|
-
);
|
|
2820
|
-
var resolveResolvedValueBindingNode2 = resolveResolvedValueBindingNode(
|
|
2821
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2822
|
-
resolveResolvedValueBindingParams(resolveServiceNode)
|
|
2823
|
-
);
|
|
2824
|
-
var resolveScopedInstanceBindingNode2 = resolveScopedInstanceBindingNode(resolveInstanceBindingNode2);
|
|
2825
|
-
var resolveScopedResolvedValueBindingNode2 = resolveScopedResolvedValueBindingNode(resolveResolvedValueBindingNode2);
|
|
4419
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolve.js
|
|
2826
4420
|
function resolve(params) {
|
|
2827
4421
|
try {
|
|
2828
4422
|
const serviceNode = params.planResult.tree.root;
|
|
2829
|
-
return
|
|
4423
|
+
return serviceNode.resolve(params);
|
|
2830
4424
|
} catch (error) {
|
|
2831
4425
|
handleResolveError(params, error);
|
|
2832
4426
|
}
|
|
2833
4427
|
}
|
|
2834
|
-
function resolveBindingNode(params, planBindingNode) {
|
|
2835
|
-
switch (planBindingNode.binding.type) {
|
|
2836
|
-
case bindingTypeValues.ConstantValue:
|
|
2837
|
-
return resolveConstantValueBinding(params, planBindingNode.binding);
|
|
2838
|
-
case bindingTypeValues.DynamicValue:
|
|
2839
|
-
return resolveDynamicValueBinding(params, planBindingNode.binding);
|
|
2840
|
-
case bindingTypeValues.Factory:
|
|
2841
|
-
return resolveFactoryBinding(params, planBindingNode.binding);
|
|
2842
|
-
case bindingTypeValues.Instance:
|
|
2843
|
-
return resolveScopedInstanceBindingNode2(params, planBindingNode);
|
|
2844
|
-
case bindingTypeValues.ResolvedValue:
|
|
2845
|
-
return resolveScopedResolvedValueBindingNode2(params, planBindingNode);
|
|
2846
|
-
}
|
|
2847
|
-
}
|
|
2848
|
-
function resolveServiceNode(params, serviceNode) {
|
|
2849
|
-
if (serviceNode.bindings === void 0) {
|
|
2850
|
-
return void 0;
|
|
2851
|
-
}
|
|
2852
|
-
if (Array.isArray(serviceNode.bindings)) {
|
|
2853
|
-
return resolveMultipleBindingServiceNode(params, serviceNode.bindings);
|
|
2854
|
-
}
|
|
2855
|
-
return resolveSingleBindingServiceNode(params, serviceNode.bindings);
|
|
2856
|
-
}
|
|
2857
|
-
function resolveMultipleBindingServiceNode(params, bindings) {
|
|
2858
|
-
const resolvedValues = [];
|
|
2859
|
-
for (const binding of bindings) {
|
|
2860
|
-
if (isPlanServiceRedirectionBindingNode(binding)) {
|
|
2861
|
-
resolvedValues.push(...resolveServiceRedirectionBindingNode2(params, binding));
|
|
2862
|
-
} else {
|
|
2863
|
-
resolvedValues.push(resolveBindingNode(params, binding));
|
|
2864
|
-
}
|
|
2865
|
-
}
|
|
2866
|
-
if (resolvedValues.some(isPromise)) {
|
|
2867
|
-
return Promise.all(resolvedValues);
|
|
2868
|
-
}
|
|
2869
|
-
return resolvedValues;
|
|
2870
|
-
}
|
|
2871
|
-
function resolveSingleBindingServiceNode(params, binding) {
|
|
2872
|
-
if (isPlanServiceRedirectionBindingNode(binding)) {
|
|
2873
|
-
const resolvedValues = resolveServiceRedirectionBindingNode2(params, binding);
|
|
2874
|
-
if (resolvedValues.length === 1) {
|
|
2875
|
-
return resolvedValues[0];
|
|
2876
|
-
} else {
|
|
2877
|
-
throw new InversifyCoreError(InversifyCoreErrorKind.resolution, "Unexpected multiple resolved values on single injection");
|
|
2878
|
-
}
|
|
2879
|
-
} else {
|
|
2880
|
-
return resolveBindingNode(params, binding);
|
|
2881
|
-
}
|
|
2882
|
-
}
|
|
2883
4428
|
|
|
2884
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
4429
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/binding/calculations/isScopedBinding.js
|
|
2885
4430
|
function isScopedBinding(binding) {
|
|
2886
4431
|
return binding.scope !== void 0;
|
|
2887
4432
|
}
|
|
2888
4433
|
|
|
2889
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
4434
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveBindingPreDestroy.js
|
|
2890
4435
|
function resolveBindingPreDestroy(params, binding) {
|
|
2891
4436
|
if (binding.type === bindingTypeValues.Instance) {
|
|
2892
4437
|
const classMetadata = params.getClassMetadata(binding.implementationType);
|
|
@@ -2920,7 +4465,7 @@ function resolveInstancePreDestroyMethods(classMetadata, instance) {
|
|
|
2920
4465
|
return result;
|
|
2921
4466
|
}
|
|
2922
4467
|
|
|
2923
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
4468
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveBindingServiceDeactivations.js
|
|
2924
4469
|
function resolveBindingServiceDeactivations(params, serviceIdentifier, value) {
|
|
2925
4470
|
const deactivations = params.getDeactivations(serviceIdentifier);
|
|
2926
4471
|
if (deactivations === void 0) {
|
|
@@ -2950,7 +4495,7 @@ async function resolveBindingDeactivationsFromIteratorAsync(value, deactivations
|
|
|
2950
4495
|
}
|
|
2951
4496
|
}
|
|
2952
4497
|
|
|
2953
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
4498
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveBindingDeactivations.js
|
|
2954
4499
|
function resolveBindingDeactivations(params, binding) {
|
|
2955
4500
|
const preDestroyResult = resolveBindingPreDestroy(params, binding);
|
|
2956
4501
|
if (preDestroyResult === void 0) {
|
|
@@ -2978,7 +4523,7 @@ function resolveBindingDeactivationsAfterPreDestroyFromValue(params, binding, re
|
|
|
2978
4523
|
}
|
|
2979
4524
|
}
|
|
2980
4525
|
|
|
2981
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
4526
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveBindingsDeactivations.js
|
|
2982
4527
|
function resolveBindingsDeactivations(params, bindings) {
|
|
2983
4528
|
if (bindings === void 0) {
|
|
2984
4529
|
return;
|
|
@@ -3005,34 +4550,34 @@ function filterCachedSinglentonScopedBindings(bindings) {
|
|
|
3005
4550
|
return filteredBindings;
|
|
3006
4551
|
}
|
|
3007
4552
|
|
|
3008
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
4553
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveModuleDeactivations.js
|
|
3009
4554
|
function resolveModuleDeactivations(params, moduleId) {
|
|
3010
4555
|
const bindings = params.getBindingsFromModule(moduleId);
|
|
3011
4556
|
return resolveBindingsDeactivations(params, bindings);
|
|
3012
4557
|
}
|
|
3013
4558
|
|
|
3014
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+core@
|
|
4559
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+core@15.0.1_reflect-metadata@0.2.2/node_modules/@inversifyjs/core/lib/resolution/actions/resolveServiceDeactivations.js
|
|
3015
4560
|
function resolveServiceDeactivations(params, serviceIdentifier) {
|
|
3016
4561
|
const bindings = params.getBindings(serviceIdentifier);
|
|
3017
4562
|
return resolveBindingsDeactivations(params, bindings);
|
|
3018
4563
|
}
|
|
3019
4564
|
|
|
3020
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4565
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/binding/models/BindingIdentifier.js
|
|
3021
4566
|
var bindingIdentifierSymbol = /* @__PURE__ */ Symbol.for("@inversifyjs/container/bindingIdentifier");
|
|
3022
4567
|
|
|
3023
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4568
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/binding/calculations/isBindingIdentifier.js
|
|
3024
4569
|
function isBindingIdentifier(value) {
|
|
3025
4570
|
return typeof value === "object" && value !== null && value[bindingIdentifierSymbol] === true;
|
|
3026
4571
|
}
|
|
3027
4572
|
|
|
3028
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4573
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/container/binding/utils/BindingConstraintUtils.js
|
|
3029
4574
|
var BindingConstraintUtils = class {
|
|
3030
4575
|
static always = (_bindingConstraints) => {
|
|
3031
4576
|
return true;
|
|
3032
4577
|
};
|
|
3033
4578
|
};
|
|
3034
4579
|
|
|
3035
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4580
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/error/models/InversifyContainerError.js
|
|
3036
4581
|
var isAppErrorSymbol2 = /* @__PURE__ */ Symbol.for("@inversifyjs/container/InversifyContainerError");
|
|
3037
4582
|
var InversifyContainerError = class _InversifyContainerError extends Error {
|
|
3038
4583
|
[isAppErrorSymbol2];
|
|
@@ -3050,13 +4595,13 @@ var InversifyContainerError = class _InversifyContainerError extends Error {
|
|
|
3050
4595
|
}
|
|
3051
4596
|
};
|
|
3052
4597
|
|
|
3053
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4598
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/error/models/InversifyContainerErrorKind.js
|
|
3054
4599
|
var InversifyContainerErrorKind;
|
|
3055
4600
|
(function(InversifyContainerErrorKind2) {
|
|
3056
4601
|
InversifyContainerErrorKind2[InversifyContainerErrorKind2["invalidOperation"] = 0] = "invalidOperation";
|
|
3057
4602
|
})(InversifyContainerErrorKind || (InversifyContainerErrorKind = {}));
|
|
3058
4603
|
|
|
3059
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4604
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/binding/calculations/buildBindingIdentifier.js
|
|
3060
4605
|
function buildBindingIdentifier(binding) {
|
|
3061
4606
|
return {
|
|
3062
4607
|
[bindingIdentifierSymbol]: true,
|
|
@@ -3064,7 +4609,7 @@ function buildBindingIdentifier(binding) {
|
|
|
3064
4609
|
};
|
|
3065
4610
|
}
|
|
3066
4611
|
|
|
3067
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4612
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/binding/calculations/isAnyAncestorBindingConstraints.js
|
|
3068
4613
|
function isAnyAncestorBindingConstraints(condition) {
|
|
3069
4614
|
return (constraints) => {
|
|
3070
4615
|
for (let ancestorMetadata = constraints.getAncestor(); ancestorMetadata !== void 0; ancestorMetadata = ancestorMetadata.getAncestor()) {
|
|
@@ -3076,47 +4621,47 @@ function isAnyAncestorBindingConstraints(condition) {
|
|
|
3076
4621
|
};
|
|
3077
4622
|
}
|
|
3078
4623
|
|
|
3079
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4624
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/binding/calculations/isBindingConstraintsWithName.js
|
|
3080
4625
|
function isBindingConstraintsWithName(name) {
|
|
3081
4626
|
return (constraints) => constraints.name === name;
|
|
3082
4627
|
}
|
|
3083
4628
|
|
|
3084
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4629
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/binding/calculations/isAnyAncestorBindingConstraintsWithName.js
|
|
3085
4630
|
function isAnyAncestorBindingConstraintsWithName(name) {
|
|
3086
4631
|
return isAnyAncestorBindingConstraints(isBindingConstraintsWithName(name));
|
|
3087
4632
|
}
|
|
3088
4633
|
|
|
3089
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4634
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/binding/calculations/isBindingConstraintsWithServiceId.js
|
|
3090
4635
|
function isBindingConstraintsWithServiceId(serviceId) {
|
|
3091
4636
|
return (constraints) => constraints.serviceIdentifier === serviceId;
|
|
3092
4637
|
}
|
|
3093
4638
|
|
|
3094
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4639
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/binding/calculations/isAnyAncestorBindingConstraintsWithServiceId.js
|
|
3095
4640
|
function isAnyAncestorBindingConstraintsWithServiceId(serviceId) {
|
|
3096
4641
|
return isAnyAncestorBindingConstraints(isBindingConstraintsWithServiceId(serviceId));
|
|
3097
4642
|
}
|
|
3098
4643
|
|
|
3099
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4644
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/binding/calculations/isBindingConstraintsWithTag.js
|
|
3100
4645
|
function isBindingConstraintsWithTag(tag, value) {
|
|
3101
4646
|
return (constraints) => constraints.tags.has(tag) && constraints.tags.get(tag) === value;
|
|
3102
4647
|
}
|
|
3103
4648
|
|
|
3104
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4649
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/binding/calculations/isAnyAncestorBindingConstraintsWithTag.js
|
|
3105
4650
|
function isAnyAncestorBindingConstraintsWithTag(tag, value) {
|
|
3106
4651
|
return isAnyAncestorBindingConstraints(isBindingConstraintsWithTag(tag, value));
|
|
3107
4652
|
}
|
|
3108
4653
|
|
|
3109
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4654
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/binding/calculations/isBindingConstraintsWithNoNameNorTags.js
|
|
3110
4655
|
function isBindingConstraintsWithNoNameNorTags(constraints) {
|
|
3111
4656
|
return constraints.name === void 0 && constraints.tags.size === 0;
|
|
3112
4657
|
}
|
|
3113
4658
|
|
|
3114
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4659
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/binding/calculations/isMultipleResolvedValueMetadataInjectOptions.js
|
|
3115
4660
|
function isMultipleResolvedValueMetadataInjectOptions(options) {
|
|
3116
4661
|
return options.isMultiple === true;
|
|
3117
4662
|
}
|
|
3118
4663
|
|
|
3119
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4664
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/binding/calculations/isNoAncestorBindingConstraints.js
|
|
3120
4665
|
function isNoAncestorBindingConstraints(condition) {
|
|
3121
4666
|
const isAnyAncestorBindingConstraintsConstraint = isAnyAncestorBindingConstraints(condition);
|
|
3122
4667
|
return (constraints) => {
|
|
@@ -3124,22 +4669,22 @@ function isNoAncestorBindingConstraints(condition) {
|
|
|
3124
4669
|
};
|
|
3125
4670
|
}
|
|
3126
4671
|
|
|
3127
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4672
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/binding/calculations/isNoAncestorBindingConstraintsWithName.js
|
|
3128
4673
|
function isNoAncestorBindingConstraintsWithName(name) {
|
|
3129
4674
|
return isNoAncestorBindingConstraints(isBindingConstraintsWithName(name));
|
|
3130
4675
|
}
|
|
3131
4676
|
|
|
3132
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4677
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/binding/calculations/isNoAncestorBindingConstraintsWithServiceId.js
|
|
3133
4678
|
function isNoAncestorBindingConstraintsWithServiceId(serviceId) {
|
|
3134
4679
|
return isNoAncestorBindingConstraints(isBindingConstraintsWithServiceId(serviceId));
|
|
3135
4680
|
}
|
|
3136
4681
|
|
|
3137
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4682
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/binding/calculations/isNoAncestorBindingConstraintsWithTag.js
|
|
3138
4683
|
function isNoAncestorBindingConstraintsWithTag(tag, value) {
|
|
3139
4684
|
return isNoAncestorBindingConstraints(isBindingConstraintsWithTag(tag, value));
|
|
3140
4685
|
}
|
|
3141
4686
|
|
|
3142
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4687
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/binding/calculations/isNotParentBindingConstraints.js
|
|
3143
4688
|
function isNotParentBindingConstraints(condition) {
|
|
3144
4689
|
return (constraints) => {
|
|
3145
4690
|
const ancestorMetadata = constraints.getAncestor();
|
|
@@ -3147,22 +4692,22 @@ function isNotParentBindingConstraints(condition) {
|
|
|
3147
4692
|
};
|
|
3148
4693
|
}
|
|
3149
4694
|
|
|
3150
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4695
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/binding/calculations/isNotParentBindingConstraintsWithName.js
|
|
3151
4696
|
function isNotParentBindingConstraintsWithName(name) {
|
|
3152
4697
|
return isNotParentBindingConstraints(isBindingConstraintsWithName(name));
|
|
3153
4698
|
}
|
|
3154
4699
|
|
|
3155
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4700
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/binding/calculations/isNotParentBindingConstraintsWithServiceId.js
|
|
3156
4701
|
function isNotParentBindingConstraintsWithServiceId(serviceId) {
|
|
3157
4702
|
return isNotParentBindingConstraints(isBindingConstraintsWithServiceId(serviceId));
|
|
3158
4703
|
}
|
|
3159
4704
|
|
|
3160
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4705
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/binding/calculations/isNotParentBindingConstraintsWithTag.js
|
|
3161
4706
|
function isNotParentBindingConstraintsWithTag(tag, value) {
|
|
3162
4707
|
return isNotParentBindingConstraints(isBindingConstraintsWithTag(tag, value));
|
|
3163
4708
|
}
|
|
3164
4709
|
|
|
3165
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4710
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/binding/calculations/isParentBindingConstraints.js
|
|
3166
4711
|
function isParentBindingConstraints(condition) {
|
|
3167
4712
|
return (constraints) => {
|
|
3168
4713
|
const ancestorMetadata = constraints.getAncestor();
|
|
@@ -3170,27 +4715,27 @@ function isParentBindingConstraints(condition) {
|
|
|
3170
4715
|
};
|
|
3171
4716
|
}
|
|
3172
4717
|
|
|
3173
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4718
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/binding/calculations/isParentBindingConstraintsWithName.js
|
|
3174
4719
|
function isParentBindingConstraintsWithName(name) {
|
|
3175
4720
|
return isParentBindingConstraints(isBindingConstraintsWithName(name));
|
|
3176
4721
|
}
|
|
3177
4722
|
|
|
3178
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4723
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/binding/calculations/isParentBindingConstraintsWithServiceId.js
|
|
3179
4724
|
function isParentBindingConstraintsWithServiceId(serviceId) {
|
|
3180
4725
|
return isParentBindingConstraints(isBindingConstraintsWithServiceId(serviceId));
|
|
3181
4726
|
}
|
|
3182
4727
|
|
|
3183
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4728
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/binding/calculations/isParentBindingConstraintsWithTag.js
|
|
3184
4729
|
function isParentBindingConstraintsWithTag(tag, value) {
|
|
3185
4730
|
return isParentBindingConstraints(isBindingConstraintsWithTag(tag, value));
|
|
3186
4731
|
}
|
|
3187
4732
|
|
|
3188
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4733
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/binding/calculations/isResolvedValueMetadataInjectOptions.js
|
|
3189
4734
|
function isResolvedValueMetadataInjectOptions(options) {
|
|
3190
4735
|
return typeof options === "object" && !LazyServiceIdentifier.is(options);
|
|
3191
4736
|
}
|
|
3192
4737
|
|
|
3193
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
4738
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/binding/models/BindingFluentSyntaxImplementation.js
|
|
3194
4739
|
var BindInFluentSyntaxImplementation = class {
|
|
3195
4740
|
#binding;
|
|
3196
4741
|
constructor(binding) {
|
|
@@ -3500,7 +5045,7 @@ var BindInWhenOnFluentSyntaxImplementation = class extends BindWhenOnFluentSynta
|
|
|
3500
5045
|
}
|
|
3501
5046
|
};
|
|
3502
5047
|
|
|
3503
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
5048
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/common/actions/getFirstIteratorResult.js
|
|
3504
5049
|
function getFirstIteratorResult(iterator) {
|
|
3505
5050
|
if (iterator === void 0) {
|
|
3506
5051
|
return void 0;
|
|
@@ -3512,12 +5057,12 @@ function getFirstIteratorResult(iterator) {
|
|
|
3512
5057
|
return firstIteratorResult.value;
|
|
3513
5058
|
}
|
|
3514
5059
|
|
|
3515
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
5060
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/common/calculations/getFirstIterableResult.js
|
|
3516
5061
|
function getFirstIterableResult(iterable) {
|
|
3517
5062
|
return getFirstIteratorResult(iterable?.[Symbol.iterator]());
|
|
3518
5063
|
}
|
|
3519
5064
|
|
|
3520
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
5065
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/container/services/BindingManager.js
|
|
3521
5066
|
var BindingManager = class {
|
|
3522
5067
|
#deactivationParams;
|
|
3523
5068
|
#defaultScope;
|
|
@@ -3687,7 +5232,7 @@ var BindingManager = class {
|
|
|
3687
5232
|
}
|
|
3688
5233
|
};
|
|
3689
5234
|
|
|
3690
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
5235
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/container/services/ContainerModuleManager.js
|
|
3691
5236
|
var ContainerModuleManager = class {
|
|
3692
5237
|
#bindingManager;
|
|
3693
5238
|
#deactivationParams;
|
|
@@ -3774,14 +5319,14 @@ var ContainerModuleManager = class {
|
|
|
3774
5319
|
}
|
|
3775
5320
|
};
|
|
3776
5321
|
|
|
3777
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
5322
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/container/actions/resetDeactivationParams.js
|
|
3778
5323
|
function resetDeactivationParams(serviceReferenceManager, deactivationParams) {
|
|
3779
5324
|
deactivationParams.getBindings = serviceReferenceManager.bindingService.get.bind(serviceReferenceManager.bindingService);
|
|
3780
5325
|
deactivationParams.getBindingsFromModule = serviceReferenceManager.bindingService.getByModuleId.bind(serviceReferenceManager.bindingService);
|
|
3781
5326
|
deactivationParams.getDeactivations = serviceReferenceManager.deactivationService.get.bind(serviceReferenceManager.deactivationService);
|
|
3782
5327
|
}
|
|
3783
5328
|
|
|
3784
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
5329
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/container/calculations/buildDeactivationParams.js
|
|
3785
5330
|
function buildDeactivationParams(serviceReferenceManager) {
|
|
3786
5331
|
return {
|
|
3787
5332
|
getBindings: serviceReferenceManager.bindingService.get.bind(serviceReferenceManager.bindingService),
|
|
@@ -3791,7 +5336,7 @@ function buildDeactivationParams(serviceReferenceManager) {
|
|
|
3791
5336
|
};
|
|
3792
5337
|
}
|
|
3793
5338
|
|
|
3794
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
5339
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/container/services/DeactivationParamsManager.js
|
|
3795
5340
|
var DeactivationParamsManager = class {
|
|
3796
5341
|
deactivationParams;
|
|
3797
5342
|
constructor(serviceReferenceManager) {
|
|
@@ -3802,25 +5347,33 @@ var DeactivationParamsManager = class {
|
|
|
3802
5347
|
}
|
|
3803
5348
|
};
|
|
3804
5349
|
|
|
3805
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
5350
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/container/services/PlanParamsOperationsManager.js
|
|
3806
5351
|
var PlanParamsOperationsManager = class {
|
|
3807
5352
|
planParamsOperations;
|
|
3808
5353
|
#serviceReferenceManager;
|
|
3809
5354
|
constructor(serviceReferenceManager) {
|
|
3810
5355
|
this.#serviceReferenceManager = serviceReferenceManager;
|
|
3811
5356
|
this.planParamsOperations = {
|
|
5357
|
+
getActivations: this.#getActivations.bind(this),
|
|
3812
5358
|
getBindings: this.#serviceReferenceManager.bindingService.get.bind(this.#serviceReferenceManager.bindingService),
|
|
3813
5359
|
getBindingsChained: this.#serviceReferenceManager.bindingService.getChained.bind(this.#serviceReferenceManager.bindingService),
|
|
3814
5360
|
getClassMetadata,
|
|
3815
5361
|
getPlan: this.#serviceReferenceManager.planResultCacheService.get.bind(this.#serviceReferenceManager.planResultCacheService),
|
|
3816
5362
|
setBinding: this.#setBinding.bind(this),
|
|
3817
5363
|
setNonCachedServiceNode: this.#serviceReferenceManager.planResultCacheService.setNonCachedServiceNode.bind(this.#serviceReferenceManager.planResultCacheService),
|
|
3818
|
-
setPlan: this.#serviceReferenceManager.planResultCacheService.set.bind(this.#serviceReferenceManager.planResultCacheService)
|
|
5364
|
+
setPlan: this.#serviceReferenceManager.planResultCacheService.set.bind(this.#serviceReferenceManager.planResultCacheService),
|
|
5365
|
+
subscribeActivationAddedOnce: this.#subscribeActivationAddedOnce.bind(this)
|
|
3819
5366
|
};
|
|
3820
5367
|
this.#serviceReferenceManager.onReset(() => {
|
|
3821
5368
|
this.#resetComputedProperties();
|
|
3822
5369
|
});
|
|
3823
5370
|
}
|
|
5371
|
+
#getActivations(serviceIdentifier) {
|
|
5372
|
+
return this.#serviceReferenceManager.activationService.get(serviceIdentifier);
|
|
5373
|
+
}
|
|
5374
|
+
#subscribeActivationAddedOnce(serviceIdentifier, subscriber) {
|
|
5375
|
+
this.#serviceReferenceManager.activationService.subscribeOnce(serviceIdentifier, subscriber);
|
|
5376
|
+
}
|
|
3824
5377
|
#resetComputedProperties() {
|
|
3825
5378
|
this.planParamsOperations.getBindings = this.#serviceReferenceManager.bindingService.get.bind(this.#serviceReferenceManager.bindingService);
|
|
3826
5379
|
this.planParamsOperations.getBindingsChained = this.#serviceReferenceManager.bindingService.getChained.bind(this.#serviceReferenceManager.bindingService);
|
|
@@ -3836,7 +5389,7 @@ var PlanParamsOperationsManager = class {
|
|
|
3836
5389
|
}
|
|
3837
5390
|
};
|
|
3838
5391
|
|
|
3839
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
5392
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/container/services/PlanResultCacheManager.js
|
|
3840
5393
|
var PlanResultCacheManager = class {
|
|
3841
5394
|
#planParamsOperationsManager;
|
|
3842
5395
|
#serviceReferenceManager;
|
|
@@ -3864,7 +5417,7 @@ var Plugin = class {
|
|
|
3864
5417
|
}
|
|
3865
5418
|
};
|
|
3866
5419
|
|
|
3867
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
5420
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/container/services/PluginManager.js
|
|
3868
5421
|
var PluginManager = class {
|
|
3869
5422
|
#pluginApi;
|
|
3870
5423
|
#pluginContext;
|
|
@@ -3916,7 +5469,7 @@ var PluginManager = class {
|
|
|
3916
5469
|
}
|
|
3917
5470
|
};
|
|
3918
5471
|
|
|
3919
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
5472
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/container/services/ServiceReferenceManager.js
|
|
3920
5473
|
var ServiceReferenceManager = class {
|
|
3921
5474
|
activationService;
|
|
3922
5475
|
bindingService;
|
|
@@ -3944,22 +5497,24 @@ var ServiceReferenceManager = class {
|
|
|
3944
5497
|
}
|
|
3945
5498
|
};
|
|
3946
5499
|
|
|
3947
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
5500
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/container/services/ServiceResolutionManager.js
|
|
3948
5501
|
var ServiceResolutionManager = class {
|
|
3949
5502
|
#autobind;
|
|
3950
5503
|
#defaultScope;
|
|
3951
5504
|
#getActivationsResolutionParam;
|
|
5505
|
+
#jitEnabled;
|
|
3952
5506
|
#resolutionContext;
|
|
3953
5507
|
#onPlanHandlers;
|
|
3954
5508
|
#planParamsOperationsManager;
|
|
3955
5509
|
#serviceReferenceManager;
|
|
3956
|
-
constructor(planParamsOperationsManager, serviceReferenceManager, autobind, defaultScope) {
|
|
5510
|
+
constructor(planParamsOperationsManager, serviceReferenceManager, autobind, defaultScope, jitEnabled) {
|
|
3957
5511
|
this.#planParamsOperationsManager = planParamsOperationsManager;
|
|
3958
5512
|
this.#serviceReferenceManager = serviceReferenceManager;
|
|
5513
|
+
this.#getActivationsResolutionParam = (serviceIdentifier) => this.#serviceReferenceManager.activationService.get(serviceIdentifier);
|
|
3959
5514
|
this.#resolutionContext = this.#buildResolutionContext();
|
|
3960
5515
|
this.#autobind = autobind;
|
|
3961
5516
|
this.#defaultScope = defaultScope;
|
|
3962
|
-
this.#
|
|
5517
|
+
this.#jitEnabled = jitEnabled;
|
|
3963
5518
|
this.#onPlanHandlers = [];
|
|
3964
5519
|
this.#serviceReferenceManager.onReset(() => {
|
|
3965
5520
|
this.#resetComputedProperties();
|
|
@@ -4023,6 +5578,7 @@ var ServiceResolutionManager = class {
|
|
|
4023
5578
|
autobindOptions: options?.autobind ?? this.#autobind ? {
|
|
4024
5579
|
scope: this.#defaultScope
|
|
4025
5580
|
} : void 0,
|
|
5581
|
+
jitEnabled: this.#jitEnabled,
|
|
4026
5582
|
operations: this.#planParamsOperationsManager.planParamsOperations,
|
|
4027
5583
|
rootConstraints: this.#buildPlanParamsConstraints(serviceIdentifier, isMultiple, options),
|
|
4028
5584
|
servicesBranch: []
|
|
@@ -4045,6 +5601,12 @@ var ServiceResolutionManager = class {
|
|
|
4045
5601
|
}
|
|
4046
5602
|
}
|
|
4047
5603
|
#buildPlanResult(isMultiple, serviceIdentifier, options) {
|
|
5604
|
+
if (!isMultiple && options === void 0) {
|
|
5605
|
+
const cachedPlanResultFromServiceIdentifier = this.#serviceReferenceManager.planResultCacheService.getByServiceIdentifier(serviceIdentifier);
|
|
5606
|
+
if (cachedPlanResultFromServiceIdentifier !== void 0) {
|
|
5607
|
+
return cachedPlanResultFromServiceIdentifier;
|
|
5608
|
+
}
|
|
5609
|
+
}
|
|
4048
5610
|
const getPlanOptions = this.#buildGetPlanOptions(isMultiple, serviceIdentifier, options);
|
|
4049
5611
|
const planResultFromCache = this.#serviceReferenceManager.planResultCacheService.get(getPlanOptions);
|
|
4050
5612
|
if (planResultFromCache !== void 0) {
|
|
@@ -4059,6 +5621,7 @@ var ServiceResolutionManager = class {
|
|
|
4059
5621
|
#buildResolutionContext() {
|
|
4060
5622
|
return {
|
|
4061
5623
|
get: this.get.bind(this),
|
|
5624
|
+
getActivations: this.#getActivationsResolutionParam,
|
|
4062
5625
|
getAll: this.getAll.bind(this),
|
|
4063
5626
|
getAllAsync: this.getAllAsync.bind(this),
|
|
4064
5627
|
getAsync: this.getAsync.bind(this)
|
|
@@ -4068,9 +5631,8 @@ var ServiceResolutionManager = class {
|
|
|
4068
5631
|
#getFromPlanResult(planResult) {
|
|
4069
5632
|
return resolve({
|
|
4070
5633
|
context: this.#resolutionContext,
|
|
4071
|
-
getActivations: this.#getActivationsResolutionParam,
|
|
4072
5634
|
planResult,
|
|
4073
|
-
requestScopeCache:
|
|
5635
|
+
requestScopeCache: void 0
|
|
4074
5636
|
});
|
|
4075
5637
|
}
|
|
4076
5638
|
#handlePlanParamsRootConstraints(planParams, options) {
|
|
@@ -4095,7 +5657,7 @@ var ServiceResolutionManager = class {
|
|
|
4095
5657
|
}
|
|
4096
5658
|
};
|
|
4097
5659
|
|
|
4098
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
5660
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/container/services/SnapshotManager.js
|
|
4099
5661
|
var SnapshotManager = class {
|
|
4100
5662
|
#serviceReferenceManager;
|
|
4101
5663
|
#snapshots;
|
|
@@ -4119,8 +5681,9 @@ var SnapshotManager = class {
|
|
|
4119
5681
|
}
|
|
4120
5682
|
};
|
|
4121
5683
|
|
|
4122
|
-
// ../../../../node_modules/.pnpm/@inversifyjs+container@
|
|
5684
|
+
// ../../../../node_modules/.pnpm/@inversifyjs+container@3.1.3_reflect-metadata@0.2.2/node_modules/@inversifyjs/container/lib/container/services/Container.js
|
|
4123
5685
|
var DEFAULT_DEFAULT_SCOPE = bindingScopeValues.Transient;
|
|
5686
|
+
var DEFAULT_JITLESS = true;
|
|
4124
5687
|
var Container = class {
|
|
4125
5688
|
#bindingManager;
|
|
4126
5689
|
#containerModuleManager;
|
|
@@ -4131,13 +5694,14 @@ var Container = class {
|
|
|
4131
5694
|
constructor(options) {
|
|
4132
5695
|
const autobind = options?.autobind ?? false;
|
|
4133
5696
|
const defaultScope = options?.defaultScope ?? DEFAULT_DEFAULT_SCOPE;
|
|
4134
|
-
|
|
5697
|
+
const jitless = options?.jitless ?? DEFAULT_JITLESS;
|
|
5698
|
+
this.#serviceReferenceManager = this.#buildServiceReferenceManager(options, autobind, defaultScope, jitless);
|
|
4135
5699
|
const planParamsOperationsManager = new PlanParamsOperationsManager(this.#serviceReferenceManager);
|
|
4136
5700
|
const planResultCacheManager = new PlanResultCacheManager(planParamsOperationsManager, this.#serviceReferenceManager);
|
|
4137
5701
|
const deactivationParamsManager = new DeactivationParamsManager(this.#serviceReferenceManager);
|
|
4138
5702
|
this.#bindingManager = new BindingManager(deactivationParamsManager.deactivationParams, defaultScope, planResultCacheManager, this.#serviceReferenceManager);
|
|
4139
5703
|
this.#containerModuleManager = new ContainerModuleManager(this.#bindingManager, deactivationParamsManager.deactivationParams, defaultScope, planResultCacheManager, this.#serviceReferenceManager);
|
|
4140
|
-
this.#serviceResolutionManager = new ServiceResolutionManager(planParamsOperationsManager, this.#serviceReferenceManager, autobind, defaultScope);
|
|
5704
|
+
this.#serviceResolutionManager = new ServiceResolutionManager(planParamsOperationsManager, this.#serviceReferenceManager, autobind, defaultScope, !jitless);
|
|
4141
5705
|
this.#pluginManager = new PluginManager(this, this.#serviceReferenceManager, this.#serviceResolutionManager);
|
|
4142
5706
|
this.#snapshotManager = new SnapshotManager(this.#serviceReferenceManager);
|
|
4143
5707
|
}
|
|
@@ -4217,12 +5781,12 @@ var Container = class {
|
|
|
4217
5781
|
}
|
|
4218
5782
|
return void 0;
|
|
4219
5783
|
}
|
|
4220
|
-
#buildServiceReferenceManager(options, autobind, defaultScope) {
|
|
5784
|
+
#buildServiceReferenceManager(options, autobind, defaultScope, jitless) {
|
|
4221
5785
|
const autobindOptions = this.#buildAutobindOptions(autobind, defaultScope);
|
|
4222
5786
|
if (options?.parent === void 0) {
|
|
4223
|
-
return new ServiceReferenceManager(ActivationsService.build(() => void 0), BindingService.build(() => void 0, autobindOptions), DeactivationsService.build(() => void 0), new PlanResultCacheService());
|
|
5787
|
+
return new ServiceReferenceManager(ActivationsService.build(() => void 0), BindingService.build(() => void 0, autobindOptions), DeactivationsService.build(() => void 0), new PlanResultCacheService(!jitless));
|
|
4224
5788
|
}
|
|
4225
|
-
const planResultCacheService = new PlanResultCacheService();
|
|
5789
|
+
const planResultCacheService = new PlanResultCacheService(!jitless);
|
|
4226
5790
|
const parent = options.parent;
|
|
4227
5791
|
parent.#serviceReferenceManager.planResultCacheService.subscribe(planResultCacheService);
|
|
4228
5792
|
return new ServiceReferenceManager(ActivationsService.build(() => parent.#serviceReferenceManager.activationService), BindingService.build(() => parent.#serviceReferenceManager.bindingService, autobindOptions), DeactivationsService.build(() => parent.#serviceReferenceManager.deactivationService), planResultCacheService);
|