@vercube/di 0.0.23 → 0.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +15 -20
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -355,8 +355,7 @@ var Container = class Container {
|
|
|
355
355
|
const values = [...this.fNewQueue.values()];
|
|
356
356
|
for (const def of values) {
|
|
357
357
|
if (def.type !== IOC.ServiceFactoryType.CLASS_SINGLETON) continue;
|
|
358
|
-
|
|
359
|
-
initializeDecorators(instance, this);
|
|
358
|
+
initializeDecorators(this.internalResolve(def), this);
|
|
360
359
|
}
|
|
361
360
|
this.fNewQueue.clear();
|
|
362
361
|
}
|
|
@@ -476,25 +475,22 @@ var Container = class Container {
|
|
|
476
475
|
//#region src/Types/IOCTypes.ts
|
|
477
476
|
let IOC;
|
|
478
477
|
(function(_IOC) {
|
|
479
|
-
|
|
480
|
-
ServiceFactoryType
|
|
481
|
-
ServiceFactoryType
|
|
482
|
-
ServiceFactoryType
|
|
483
|
-
return ServiceFactoryType
|
|
478
|
+
_IOC.ServiceFactoryType = /* @__PURE__ */ function(ServiceFactoryType) {
|
|
479
|
+
ServiceFactoryType["CLASS"] = "CLASS";
|
|
480
|
+
ServiceFactoryType["CLASS_SINGLETON"] = "CLASS_SINGLETON";
|
|
481
|
+
ServiceFactoryType["INSTANCE"] = "INSTANCE";
|
|
482
|
+
return ServiceFactoryType;
|
|
484
483
|
}({});
|
|
485
|
-
_IOC.
|
|
486
|
-
|
|
487
|
-
InjectMethod
|
|
488
|
-
InjectMethod
|
|
489
|
-
return InjectMethod$1;
|
|
484
|
+
_IOC.InjectMethod = /* @__PURE__ */ function(InjectMethod) {
|
|
485
|
+
InjectMethod["LAZY"] = "LAZY";
|
|
486
|
+
InjectMethod["STATIC"] = "STATIC";
|
|
487
|
+
return InjectMethod;
|
|
490
488
|
}({});
|
|
491
|
-
_IOC.
|
|
492
|
-
|
|
493
|
-
DependencyType
|
|
494
|
-
DependencyType
|
|
495
|
-
return DependencyType$1;
|
|
489
|
+
_IOC.DependencyType = /* @__PURE__ */ function(DependencyType) {
|
|
490
|
+
DependencyType[DependencyType["STANDARD"] = 0] = "STANDARD";
|
|
491
|
+
DependencyType[DependencyType["OPTIONAL"] = 1] = "OPTIONAL";
|
|
492
|
+
return DependencyType;
|
|
496
493
|
}({});
|
|
497
|
-
_IOC.DependencyType = DependencyType;
|
|
498
494
|
})(IOC || (IOC = {}));
|
|
499
495
|
|
|
500
496
|
//#endregion
|
|
@@ -516,8 +512,7 @@ const ROOT_PROTO = Object.getPrototypeOf({});
|
|
|
516
512
|
function registerInject(prototype, propertyName, dependency, type) {
|
|
517
513
|
let entry = classMap.get(prototype);
|
|
518
514
|
if (!entry) {
|
|
519
|
-
|
|
520
|
-
entry = newEntry;
|
|
515
|
+
entry = { deps: [] };
|
|
521
516
|
classMap.set(prototype, entry);
|
|
522
517
|
}
|
|
523
518
|
const newDep = {
|