@noego/ioc 0.0.7 → 0.0.9
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/framework/decorators/Component.cjs +41 -0
- package/dist/framework/decorators/Component.cjs.map +1 -0
- package/dist/framework/decorators/Component.d.cts +12 -0
- package/dist/framework/decorators/Component.d.ts +12 -0
- package/dist/framework/decorators/Component.js +17 -0
- package/dist/framework/decorators/Component.js.map +1 -0
- package/dist/framework/decorators/Inject.cjs +37 -0
- package/dist/framework/decorators/Inject.cjs.map +1 -0
- package/dist/{cjs/framework/decorators/Inject.d.ts → framework/decorators/Inject.d.cts} +3 -2
- package/dist/{esm/framework → framework}/decorators/Inject.d.ts +3 -2
- package/dist/framework/decorators/Inject.js +13 -0
- package/dist/framework/decorators/Inject.js.map +1 -0
- package/dist/framework/decorators/index.cjs +35 -0
- package/dist/framework/decorators/index.cjs.map +1 -0
- package/dist/framework/decorators/index.d.cts +4 -0
- package/dist/framework/decorators/index.d.ts +4 -0
- package/dist/framework/decorators/index.js +8 -0
- package/dist/framework/decorators/index.js.map +1 -0
- package/dist/framework/decorators/metadataKeys.cjs +35 -0
- package/dist/framework/decorators/metadataKeys.cjs.map +1 -0
- package/dist/framework/decorators/metadataKeys.d.cts +5 -0
- package/dist/framework/decorators/metadataKeys.d.ts +5 -0
- package/dist/framework/decorators/metadataKeys.js +9 -0
- package/dist/framework/decorators/metadataKeys.js.map +1 -0
- package/dist/framework/errors/ContainerErrors.cjs +61 -0
- package/dist/framework/errors/ContainerErrors.cjs.map +1 -0
- package/dist/{cjs/framework/errors/ContainerErrors.d.ts → framework/errors/ContainerErrors.d.cts} +7 -5
- package/dist/{esm/framework → framework}/errors/ContainerErrors.d.ts +7 -5
- package/dist/framework/errors/ContainerErrors.js +33 -0
- package/dist/framework/errors/ContainerErrors.js.map +1 -0
- package/dist/framework/implementation/Container.cjs +342 -0
- package/dist/framework/implementation/Container.cjs.map +1 -0
- package/dist/{cjs/framework/implementation/Container.d.ts → framework/implementation/Container.d.cts} +9 -6
- package/dist/{esm/framework → framework}/implementation/Container.d.ts +9 -6
- package/dist/framework/implementation/Container.js +320 -0
- package/dist/framework/implementation/Container.js.map +1 -0
- package/dist/framework/implementation/DecoratorSupport.cjs +92 -0
- package/dist/framework/implementation/DecoratorSupport.cjs.map +1 -0
- package/dist/framework/implementation/DecoratorSupport.d.cts +33 -0
- package/dist/framework/implementation/DecoratorSupport.d.ts +33 -0
- package/dist/framework/implementation/DecoratorSupport.js +63 -0
- package/dist/framework/implementation/DecoratorSupport.js.map +1 -0
- package/dist/framework/implementation/LoadAs.cjs +34 -0
- package/dist/framework/implementation/LoadAs.cjs.map +1 -0
- package/dist/{esm/framework/implementation/LoadAs.d.ts → framework/implementation/LoadAs.d.cts} +3 -1
- package/dist/{cjs/framework → framework}/implementation/LoadAs.d.ts +3 -1
- package/dist/framework/implementation/LoadAs.js +10 -0
- package/dist/framework/implementation/LoadAs.js.map +1 -0
- package/dist/framework/implementation/Parameter.cjs +82 -0
- package/dist/framework/implementation/Parameter.cjs.map +1 -0
- package/dist/{esm/framework/implementation/Parameter.d.ts → framework/implementation/Parameter.d.cts} +4 -2
- package/dist/{cjs/framework → framework}/implementation/Parameter.d.ts +4 -2
- package/dist/framework/implementation/Parameter.js +47 -0
- package/dist/framework/implementation/Parameter.js.map +1 -0
- package/dist/framework/interface/Container.cjs +17 -0
- package/dist/framework/interface/Container.cjs.map +1 -0
- package/dist/{esm/framework/interface/Container.d.ts → framework/interface/Container.d.cts} +10 -7
- package/dist/{cjs/framework → framework}/interface/Container.d.ts +10 -7
- package/dist/framework/interface/Container.js +1 -0
- package/dist/framework/interface/Container.js.map +1 -0
- package/dist/index.cjs +58 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -0
- package/package.json +18 -14
- package/dist/cjs/framework/decorators/Component.d.ts +0 -10
- package/dist/cjs/framework/decorators/Component.js +0 -25
- package/dist/cjs/framework/decorators/Component.js.map +0 -1
- package/dist/cjs/framework/decorators/Inject.js +0 -22
- package/dist/cjs/framework/decorators/Inject.js.map +0 -1
- package/dist/cjs/framework/decorators/index.d.ts +0 -3
- package/dist/cjs/framework/decorators/index.js +0 -24
- package/dist/cjs/framework/decorators/index.js.map +0 -1
- package/dist/cjs/framework/decorators/metadataKeys.d.ts +0 -3
- package/dist/cjs/framework/decorators/metadataKeys.js +0 -8
- package/dist/cjs/framework/decorators/metadataKeys.js.map +0 -1
- package/dist/cjs/framework/errors/ContainerErrors.js +0 -52
- package/dist/cjs/framework/errors/ContainerErrors.js.map +0 -1
- package/dist/cjs/framework/implementation/Container.js +0 -448
- package/dist/cjs/framework/implementation/Container.js.map +0 -1
- package/dist/cjs/framework/implementation/Container.test.d.ts +0 -1
- package/dist/cjs/framework/implementation/Container.test.js +0 -184
- package/dist/cjs/framework/implementation/Container.test.js.map +0 -1
- package/dist/cjs/framework/implementation/ContainerAsync.test.d.ts +0 -1
- package/dist/cjs/framework/implementation/ContainerAsync.test.js +0 -178
- package/dist/cjs/framework/implementation/ContainerAsync.test.js.map +0 -1
- package/dist/cjs/framework/implementation/ContainerBasic.test.d.ts +0 -1
- package/dist/cjs/framework/implementation/ContainerBasic.test.js +0 -101
- package/dist/cjs/framework/implementation/ContainerBasic.test.js.map +0 -1
- package/dist/cjs/framework/implementation/ContainerDecorators.test.d.ts +0 -1
- package/dist/cjs/framework/implementation/ContainerDecorators.test.js +0 -517
- package/dist/cjs/framework/implementation/ContainerDecorators.test.js.map +0 -1
- package/dist/cjs/framework/implementation/ContainerExtension.test.d.ts +0 -1
- package/dist/cjs/framework/implementation/ContainerExtension.test.js +0 -169
- package/dist/cjs/framework/implementation/ContainerExtension.test.js.map +0 -1
- package/dist/cjs/framework/implementation/ContainerLifetimes.test.d.ts +0 -1
- package/dist/cjs/framework/implementation/ContainerLifetimes.test.js +0 -154
- package/dist/cjs/framework/implementation/ContainerLifetimes.test.js.map +0 -1
- package/dist/cjs/framework/implementation/DecoratorSupport.d.ts +0 -31
- package/dist/cjs/framework/implementation/DecoratorSupport.js +0 -96
- package/dist/cjs/framework/implementation/DecoratorSupport.js.map +0 -1
- package/dist/cjs/framework/implementation/LoadAs.js +0 -10
- package/dist/cjs/framework/implementation/LoadAs.js.map +0 -1
- package/dist/cjs/framework/implementation/Parameter.js +0 -87
- package/dist/cjs/framework/implementation/Parameter.js.map +0 -1
- package/dist/cjs/framework/implementation/Parameter.test.d.ts +0 -1
- package/dist/cjs/framework/implementation/Parameter.test.js +0 -19
- package/dist/cjs/framework/implementation/Parameter.test.js.map +0 -1
- package/dist/cjs/framework/implementation/SimpleDecoratorTest.test.d.ts +0 -1
- package/dist/cjs/framework/implementation/SimpleDecoratorTest.test.js +0 -78
- package/dist/cjs/framework/implementation/SimpleDecoratorTest.test.js.map +0 -1
- package/dist/cjs/framework/implementation/SingletonTest.test.d.ts +0 -1
- package/dist/cjs/framework/implementation/SingletonTest.test.js +0 -85
- package/dist/cjs/framework/implementation/SingletonTest.test.js.map +0 -1
- package/dist/cjs/framework/interface/Container.js +0 -3
- package/dist/cjs/framework/interface/Container.js.map +0 -1
- package/dist/cjs/index.d.ts +0 -18
- package/dist/cjs/index.js +0 -24
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/jest.config.d.ts +0 -3
- package/dist/cjs/jest.config.js +0 -9
- package/dist/cjs/jest.config.js.map +0 -1
- package/dist/esm/framework/decorators/Component.d.ts +0 -10
- package/dist/esm/framework/decorators/Component.js +0 -21
- package/dist/esm/framework/decorators/Component.js.map +0 -1
- package/dist/esm/framework/decorators/Inject.js +0 -19
- package/dist/esm/framework/decorators/Inject.js.map +0 -1
- package/dist/esm/framework/decorators/index.d.ts +0 -3
- package/dist/esm/framework/decorators/index.js +0 -5
- package/dist/esm/framework/decorators/index.js.map +0 -1
- package/dist/esm/framework/decorators/metadataKeys.d.ts +0 -3
- package/dist/esm/framework/decorators/metadataKeys.js +0 -5
- package/dist/esm/framework/decorators/metadataKeys.js.map +0 -1
- package/dist/esm/framework/errors/ContainerErrors.js +0 -44
- package/dist/esm/framework/errors/ContainerErrors.js.map +0 -1
- package/dist/esm/framework/implementation/Container.js +0 -432
- package/dist/esm/framework/implementation/Container.js.map +0 -1
- package/dist/esm/framework/implementation/Container.test.d.ts +0 -1
- package/dist/esm/framework/implementation/Container.test.js +0 -173
- package/dist/esm/framework/implementation/Container.test.js.map +0 -1
- package/dist/esm/framework/implementation/ContainerAsync.test.d.ts +0 -1
- package/dist/esm/framework/implementation/ContainerAsync.test.js +0 -151
- package/dist/esm/framework/implementation/ContainerAsync.test.js.map +0 -1
- package/dist/esm/framework/implementation/ContainerBasic.test.d.ts +0 -1
- package/dist/esm/framework/implementation/ContainerBasic.test.js +0 -90
- package/dist/esm/framework/implementation/ContainerBasic.test.js.map +0 -1
- package/dist/esm/framework/implementation/ContainerDecorators.test.d.ts +0 -1
- package/dist/esm/framework/implementation/ContainerDecorators.test.js +0 -498
- package/dist/esm/framework/implementation/ContainerDecorators.test.js.map +0 -1
- package/dist/esm/framework/implementation/ContainerExtension.test.d.ts +0 -1
- package/dist/esm/framework/implementation/ContainerExtension.test.js +0 -158
- package/dist/esm/framework/implementation/ContainerExtension.test.js.map +0 -1
- package/dist/esm/framework/implementation/ContainerLifetimes.test.d.ts +0 -1
- package/dist/esm/framework/implementation/ContainerLifetimes.test.js +0 -143
- package/dist/esm/framework/implementation/ContainerLifetimes.test.js.map +0 -1
- package/dist/esm/framework/implementation/DecoratorSupport.d.ts +0 -31
- package/dist/esm/framework/implementation/DecoratorSupport.js +0 -87
- package/dist/esm/framework/implementation/DecoratorSupport.js.map +0 -1
- package/dist/esm/framework/implementation/LoadAs.js +0 -7
- package/dist/esm/framework/implementation/LoadAs.js.map +0 -1
- package/dist/esm/framework/implementation/Parameter.js +0 -49
- package/dist/esm/framework/implementation/Parameter.js.map +0 -1
- package/dist/esm/framework/implementation/Parameter.test.d.ts +0 -1
- package/dist/esm/framework/implementation/Parameter.test.js +0 -17
- package/dist/esm/framework/implementation/Parameter.test.js.map +0 -1
- package/dist/esm/framework/implementation/SimpleDecoratorTest.test.d.ts +0 -1
- package/dist/esm/framework/implementation/SimpleDecoratorTest.test.js +0 -67
- package/dist/esm/framework/implementation/SimpleDecoratorTest.test.js.map +0 -1
- package/dist/esm/framework/implementation/SingletonTest.test.d.ts +0 -1
- package/dist/esm/framework/implementation/SingletonTest.test.js +0 -74
- package/dist/esm/framework/implementation/SingletonTest.test.js.map +0 -1
- package/dist/esm/framework/interface/Container.js +0 -2
- package/dist/esm/framework/interface/Container.js.map +0 -1
- package/dist/esm/index.d.ts +0 -18
- package/dist/esm/index.js +0 -15
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/jest.config.d.ts +0 -3
- package/dist/esm/jest.config.js +0 -7
- package/dist/esm/jest.config.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../framework/decorators/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oBAAoB;AACpB,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,iDAA+B"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.INJECT_TOKEN_METADATA_KEY = exports.PARAM_TYPES_METADATA_KEY = exports.COMPONENT_OPTIONS_METADATA_KEY = void 0;
|
|
4
|
-
// framework/decorators/metadataKeys.ts
|
|
5
|
-
exports.COMPONENT_OPTIONS_METADATA_KEY = Symbol.for("ioc:component:options");
|
|
6
|
-
exports.PARAM_TYPES_METADATA_KEY = "design:paramtypes"; // Standard key
|
|
7
|
-
exports.INJECT_TOKEN_METADATA_KEY = Symbol.for("ioc:inject:tokens");
|
|
8
|
-
//# sourceMappingURL=metadataKeys.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"metadataKeys.js","sourceRoot":"","sources":["../../../../framework/decorators/metadataKeys.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AAC1B,QAAA,8BAA8B,GAAG,MAAM,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;AACrE,QAAA,wBAAwB,GAAG,mBAAmB,CAAC,CAAC,eAAe;AAC/D,QAAA,yBAAyB,GAAG,MAAM,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Error types for the IOC container
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.CircularDependencyError = exports.InstanceNotCreatedError = exports.DependencyNotFoundError = exports.ParameterNotFoundError = exports.NotAClassDefinitionError = void 0;
|
|
7
|
-
/**
|
|
8
|
-
* Thrown when a class definition is expected but not provided
|
|
9
|
-
*/
|
|
10
|
-
class NotAClassDefinitionError extends Error {
|
|
11
|
-
constructor(message = "Not a class definition") {
|
|
12
|
-
super(message);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
exports.NotAClassDefinitionError = NotAClassDefinitionError;
|
|
16
|
-
/**
|
|
17
|
-
* Thrown when a parameter value is required but not provided
|
|
18
|
-
*/
|
|
19
|
-
class ParameterNotFoundError extends Error {
|
|
20
|
-
constructor(paramName = "parameter") {
|
|
21
|
-
super(`No value found for ${paramName}`);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.ParameterNotFoundError = ParameterNotFoundError;
|
|
25
|
-
/**
|
|
26
|
-
* Thrown when trying to resolve a dependency that is not registered
|
|
27
|
-
*/
|
|
28
|
-
class DependencyNotFoundError extends Error {
|
|
29
|
-
constructor(label) {
|
|
30
|
-
super(`Dependency not found: ${label}`);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.DependencyNotFoundError = DependencyNotFoundError;
|
|
34
|
-
/**
|
|
35
|
-
* Thrown when an instance has not been created but is being retrieved
|
|
36
|
-
*/
|
|
37
|
-
class InstanceNotCreatedError extends Error {
|
|
38
|
-
constructor() {
|
|
39
|
-
super("Instance has not been created and therefore cannot be retrieved");
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.InstanceNotCreatedError = InstanceNotCreatedError;
|
|
43
|
-
/**
|
|
44
|
-
* Thrown when circular dependencies are detected
|
|
45
|
-
*/
|
|
46
|
-
class CircularDependencyError extends Error {
|
|
47
|
-
constructor(dependencyChain) {
|
|
48
|
-
super(`Circular dependency detected: ${dependencyChain.join(' -> ')}`);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
exports.CircularDependencyError = CircularDependencyError;
|
|
52
|
-
//# sourceMappingURL=ContainerErrors.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContainerErrors.js","sourceRoot":"","sources":["../../../../framework/errors/ContainerErrors.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH;;GAEG;AACH,MAAa,wBAAyB,SAAQ,KAAK;IAC/C,YAAY,OAAO,GAAG,wBAAwB;QAC1C,KAAK,CAAC,OAAO,CAAC,CAAC;IACnB,CAAC;CACJ;AAJD,4DAIC;AAED;;GAEG;AACH,MAAa,sBAAuB,SAAQ,KAAK;IAC7C,YAAY,SAAS,GAAG,WAAW;QAC/B,KAAK,CAAC,sBAAsB,SAAS,EAAE,CAAC,CAAC;IAC7C,CAAC;CACJ;AAJD,wDAIC;AAED;;GAEG;AACH,MAAa,uBAAwB,SAAQ,KAAK;IAC9C,YAAY,KAAU;QAClB,KAAK,CAAC,yBAAyB,KAAK,EAAE,CAAC,CAAC;IAC5C,CAAC;CACJ;AAJD,0DAIC;AAED;;GAEG;AACH,MAAa,uBAAwB,SAAQ,KAAK;IAC9C;QACI,KAAK,CAAC,iEAAiE,CAAC,CAAC;IAC7E,CAAC;CACJ;AAJD,0DAIC;AAED;;GAEG;AACH,MAAa,uBAAwB,SAAQ,KAAK;IAC9C,YAAY,eAAyB;QACjC,KAAK,CAAC,iCAAiC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC3E,CAAC;CACJ;AAJD,0DAIC"}
|
|
@@ -1,448 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.Container = void 0;
|
|
13
|
-
exports.isPromise = isPromise;
|
|
14
|
-
exports.createContainer = createContainer;
|
|
15
|
-
require("reflect-metadata"); // Ensure polyfill is loaded conceptually
|
|
16
|
-
const LoadAs_1 = require("./LoadAs");
|
|
17
|
-
const Parameter_1 = require("./Parameter");
|
|
18
|
-
const ContainerErrors_1 = require("../errors/ContainerErrors");
|
|
19
|
-
const DecoratorSupport_1 = require("./DecoratorSupport"); // Assume helpers exist or create them
|
|
20
|
-
var ContainerRouting;
|
|
21
|
-
(function (ContainerRouting) {
|
|
22
|
-
ContainerRouting["FUNCTIONAL"] = "FUNCTIONAL";
|
|
23
|
-
ContainerRouting["CLASS"] = "CLASS";
|
|
24
|
-
// No need for COMPONENT route, just check metadata if CLASS/FUNCTIONAL fails
|
|
25
|
-
})(ContainerRouting || (ContainerRouting = {}));
|
|
26
|
-
class Container {
|
|
27
|
-
constructor() {
|
|
28
|
-
// Routing and definition maps
|
|
29
|
-
this._routing = new Map();
|
|
30
|
-
this._functionDefinition = new Map();
|
|
31
|
-
this._classDefinition = new Map();
|
|
32
|
-
// Storage maps
|
|
33
|
-
this._functionStorageSingleton = new Map();
|
|
34
|
-
this._functionStorageScoped = new Map();
|
|
35
|
-
this._classStorageSingleton = new Map();
|
|
36
|
-
this._classStorageScoped = new Map();
|
|
37
|
-
}
|
|
38
|
-
// Registration methods
|
|
39
|
-
registerClass(classDefinition, options) {
|
|
40
|
-
// Basic validation
|
|
41
|
-
if (typeof classDefinition !== 'function' || !classDefinition.prototype) {
|
|
42
|
-
console.warn(`[IOC] Attempted to register non-class: ${String(classDefinition)}`);
|
|
43
|
-
// Optional: throw error instead?
|
|
44
|
-
// throw new NotAClassDefinitionError(`Attempted to register non-class: ${String(classDefinition)}`);
|
|
45
|
-
return; // Don't proceed if not a class constructor
|
|
46
|
-
}
|
|
47
|
-
// Always clear previous definitions for this exact class constructor
|
|
48
|
-
this.clearDefinitions(classDefinition);
|
|
49
|
-
// Always set the routing type so 'isClassDefinition' works
|
|
50
|
-
this._routing.set(classDefinition, ContainerRouting.CLASS);
|
|
51
|
-
// Store manual options *only if they are actually provided and have content*
|
|
52
|
-
if (options && Object.keys(options).length > 0) {
|
|
53
|
-
this._classDefinition.set(classDefinition, options);
|
|
54
|
-
// console.log(`[IOC RegClass] Manually registered ${classDefinition.name} with options:`, options);
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
// console.log(`[IOC RegClass] Manually registered ${classDefinition.name} with no specific options (will use decorators if present).`);
|
|
58
|
-
// If no options are provided, we don't store anything in _classDefinition,
|
|
59
|
-
// effectively clearing any previous manual config and letting decorators take over if present.
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
registerFunction(label, func, options = {}) {
|
|
63
|
-
this.clearDefinitions(label);
|
|
64
|
-
this._routing.set(label, ContainerRouting.FUNCTIONAL);
|
|
65
|
-
this._functionDefinition.set(label, { function: func, options });
|
|
66
|
-
// console.log(`[IOC RegFunc] Registered function with label ${String(label)} and options:`, options);
|
|
67
|
-
}
|
|
68
|
-
// Instance resolution methods - Simplify to just call loadInstance
|
|
69
|
-
instance(classDefinition, params = []) {
|
|
70
|
-
// Basic check upfront
|
|
71
|
-
if (typeof classDefinition !== 'function' || !classDefinition.prototype) {
|
|
72
|
-
throw new ContainerErrors_1.NotAClassDefinitionError(`Cannot resolve instance for non-class: ${String(classDefinition)}`);
|
|
73
|
-
}
|
|
74
|
-
return this.loadInstance(classDefinition, params);
|
|
75
|
-
}
|
|
76
|
-
get(label, param = []) {
|
|
77
|
-
// Just delegate to loadInstance, which handles routing and auto-registration
|
|
78
|
-
return this.loadInstance(label, param);
|
|
79
|
-
}
|
|
80
|
-
extend() {
|
|
81
|
-
const childContainer = createContainer();
|
|
82
|
-
// Copy routing and definition maps (share the registration knowledge)
|
|
83
|
-
childContainer._routing = new Map(this._routing);
|
|
84
|
-
childContainer._functionDefinition = new Map(this._functionDefinition);
|
|
85
|
-
childContainer._classDefinition = new Map(this._classDefinition);
|
|
86
|
-
// Share singleton storage (singletons are shared across all containers)
|
|
87
|
-
childContainer._functionStorageSingleton = this._functionStorageSingleton;
|
|
88
|
-
childContainer._classStorageSingleton = this._classStorageSingleton;
|
|
89
|
-
// Do NOT share scoped storage (new container = new scope)
|
|
90
|
-
// Child gets its own empty scoped storage
|
|
91
|
-
// console.log('[IOC Extend] Created child container.');
|
|
92
|
-
return childContainer;
|
|
93
|
-
}
|
|
94
|
-
// Private helper methods
|
|
95
|
-
clearDefinitions(label) {
|
|
96
|
-
this._routing.delete(label);
|
|
97
|
-
this._functionDefinition.delete(label);
|
|
98
|
-
// Only delete from classDefinition if the label is actually a function constructor
|
|
99
|
-
if (typeof label === 'function') {
|
|
100
|
-
this._classDefinition.delete(label);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
// Checks if the label is *currently* registered as a class
|
|
104
|
-
isRegisteredAsClass(label) {
|
|
105
|
-
return this._routing.get(label) === ContainerRouting.CLASS;
|
|
106
|
-
}
|
|
107
|
-
// Checks if the label is *currently* registered as a function
|
|
108
|
-
isRegisteredAsFunction(label) {
|
|
109
|
-
return this._routing.get(label) === ContainerRouting.FUNCTIONAL;
|
|
110
|
-
}
|
|
111
|
-
hasInstance(label) {
|
|
112
|
-
const storageType = this.getStorageType(label); // This checks decorators if needed
|
|
113
|
-
if (!storageType) {
|
|
114
|
-
// Transient instances are never stored
|
|
115
|
-
return false;
|
|
116
|
-
}
|
|
117
|
-
// Determine if it's treated as a class (registered or decorated) *after* getting type
|
|
118
|
-
const isClass = this.isClassType(label); // Use a helper that checks routing OR decorator
|
|
119
|
-
if (isClass) {
|
|
120
|
-
return storageType === 'singleton'
|
|
121
|
-
? this._classStorageSingleton.has(label)
|
|
122
|
-
: this._classStorageScoped.has(label);
|
|
123
|
-
}
|
|
124
|
-
else { // Must be a function if not a class
|
|
125
|
-
return storageType === 'singleton'
|
|
126
|
-
? this._functionStorageSingleton.has(label)
|
|
127
|
-
: this._functionStorageScoped.has(label);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
// Helper to determine if something should be treated as a class (registered or decorated)
|
|
131
|
-
isClassType(label) {
|
|
132
|
-
if (this.isRegisteredAsClass(label)) {
|
|
133
|
-
return true;
|
|
134
|
-
}
|
|
135
|
-
// If not explicitly registered as a class, check if it's a function with @Component
|
|
136
|
-
if (typeof label === 'function' && label.prototype && !this.isRegisteredAsFunction(label)) {
|
|
137
|
-
return (0, DecoratorSupport_1.getComponentOptions)(label) !== null;
|
|
138
|
-
}
|
|
139
|
-
return false;
|
|
140
|
-
}
|
|
141
|
-
getInstance(label) {
|
|
142
|
-
const storageType = this.getStorageType(label); // Checks decorators if needed
|
|
143
|
-
if (!storageType) {
|
|
144
|
-
// This should ideally not be reached if called after hasInstance check
|
|
145
|
-
console.error(`[IOC GetInstance] Attempted to get instance for non-stored type: ${String(label)}`);
|
|
146
|
-
throw new ContainerErrors_1.InstanceNotCreatedError();
|
|
147
|
-
}
|
|
148
|
-
const isClass = this.isClassType(label); // Check routing OR decorator
|
|
149
|
-
if (isClass) {
|
|
150
|
-
return storageType === 'singleton'
|
|
151
|
-
? this._classStorageSingleton.get(label)
|
|
152
|
-
: this._classStorageScoped.get(label);
|
|
153
|
-
}
|
|
154
|
-
else { // Must be a function
|
|
155
|
-
return storageType === 'singleton'
|
|
156
|
-
? this._functionStorageSingleton.get(label)
|
|
157
|
-
: this._functionStorageScoped.get(label);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
setInstance(label, instance, storageType) {
|
|
161
|
-
const isClass = this.isClassType(label); // Determine type based on routing OR decorator
|
|
162
|
-
if (isClass) {
|
|
163
|
-
if (storageType === 'singleton') {
|
|
164
|
-
this._classStorageSingleton.set(label, instance);
|
|
165
|
-
}
|
|
166
|
-
else if (storageType == 'scoped') { // storageType === 'scoped'
|
|
167
|
-
this._classStorageScoped.set(label, instance);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
else { // Must be a function
|
|
171
|
-
if (storageType === 'singleton') {
|
|
172
|
-
this._functionStorageSingleton.set(label, instance);
|
|
173
|
-
}
|
|
174
|
-
else if (storageType === "scoped") { // storageType === 'scoped'
|
|
175
|
-
this._functionStorageScoped.set(label, instance);
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
getStorageType(label) {
|
|
180
|
-
var _a, _b, _c, _d;
|
|
181
|
-
let manualLoadAs;
|
|
182
|
-
let decoratorScope;
|
|
183
|
-
const isPotentialClass = typeof label === 'function' && label.prototype;
|
|
184
|
-
// Get manual registration options if available
|
|
185
|
-
if (this.isRegisteredAsClass(label)) { // Use helper
|
|
186
|
-
manualLoadAs = (_a = this._classDefinition.get(label)) === null || _a === void 0 ? void 0 : _a.loadAs;
|
|
187
|
-
}
|
|
188
|
-
else if (this.isRegisteredAsFunction(label)) { // Use helper
|
|
189
|
-
manualLoadAs = (_c = (_b = this._functionDefinition.get(label)) === null || _b === void 0 ? void 0 : _b.options) === null || _c === void 0 ? void 0 : _c.loadAs;
|
|
190
|
-
}
|
|
191
|
-
// Get decorator scope only if it's potentially a class *and not explicitly registered as a function*
|
|
192
|
-
if (isPotentialClass && !this.isRegisteredAsFunction(label)) {
|
|
193
|
-
decoratorScope = (0, DecoratorSupport_1.getScope)(label); // Uses getComponentOptions internally
|
|
194
|
-
}
|
|
195
|
-
// Determine final scope: Manual > Decorator > Default (Transient)
|
|
196
|
-
const finalScope = (_d = manualLoadAs !== null && manualLoadAs !== void 0 ? manualLoadAs : decoratorScope) !== null && _d !== void 0 ? _d : LoadAs_1.LoadAs.Transient;
|
|
197
|
-
if (finalScope === LoadAs_1.LoadAs.Singleton) {
|
|
198
|
-
return 'singleton';
|
|
199
|
-
}
|
|
200
|
-
else if (finalScope === LoadAs_1.LoadAs.Scoped) {
|
|
201
|
-
return 'scoped';
|
|
202
|
-
}
|
|
203
|
-
else {
|
|
204
|
-
return 'transient'; // Transient
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
// Central resolution logic
|
|
208
|
-
loadInstance(label_1) {
|
|
209
|
-
return __awaiter(this, arguments, void 0, function* (label, params = [], resolutionChain = [] // Track resolution path
|
|
210
|
-
) {
|
|
211
|
-
// --- Circular Dependency Check ---
|
|
212
|
-
const currentLabelStr = (typeof label === 'function' && label.name) ? label.name : String(label);
|
|
213
|
-
if (resolutionChain.includes(currentLabelStr)) {
|
|
214
|
-
console.error(`[IOC LoadInstance] Circular dependency detected: ${[...resolutionChain, currentLabelStr].join(' -> ')}`);
|
|
215
|
-
throw new ContainerErrors_1.CircularDependencyError([...resolutionChain, currentLabelStr]);
|
|
216
|
-
}
|
|
217
|
-
const nextResolutionChain = [...resolutionChain, currentLabelStr];
|
|
218
|
-
// --- End Circular Dependency Check ---
|
|
219
|
-
// --- Handle Parameters ---
|
|
220
|
-
if (label instanceof Parameter_1.Parameter) {
|
|
221
|
-
try {
|
|
222
|
-
// Pass a *copy* of params to avoid side effects in resolveParameterValue
|
|
223
|
-
return Promise.resolve(this.resolveParameterValue(label, [...params]));
|
|
224
|
-
}
|
|
225
|
-
catch (e) {
|
|
226
|
-
// console.error(`[IOC LoadInstance] Error resolving parameter ${param.toString()}:`, e);
|
|
227
|
-
return Promise.reject(e);
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
// --- End Handle Parameters ---
|
|
231
|
-
// --- Check Explicit Registrations ---
|
|
232
|
-
if (this.isRegisteredAsClass(label)) {
|
|
233
|
-
// console.log(`[IOC LoadInstance] Resolving explicitly registered class: ${currentLabelStr}`);
|
|
234
|
-
return this.loadClassInstance(label, params, nextResolutionChain);
|
|
235
|
-
}
|
|
236
|
-
if (this.isRegisteredAsFunction(label)) {
|
|
237
|
-
// console.log(`[IOC LoadInstance] Resolving explicitly registered function: ${currentLabelStr}`);
|
|
238
|
-
return this.loadFunctionInstance(label, params, nextResolutionChain);
|
|
239
|
-
}
|
|
240
|
-
// --- End Check Explicit Registrations ---
|
|
241
|
-
// --- Attempt Auto-Registration/Resolution for Decorated Classes ---
|
|
242
|
-
if (typeof label === 'function' && label.prototype) {
|
|
243
|
-
const componentOptions = (0, DecoratorSupport_1.getComponentOptions)(label); // Check for @Component
|
|
244
|
-
if (componentOptions !== null) {
|
|
245
|
-
// console.log(`[IOC LoadInstance] Auto-resolving @Component class: ${currentLabelStr}`);
|
|
246
|
-
// Set routing *now* so subsequent internal checks work correctly
|
|
247
|
-
if (!this._routing.has(label)) { // Only set if not already set
|
|
248
|
-
this._routing.set(label, ContainerRouting.CLASS);
|
|
249
|
-
// console.log(`[IOC LoadInstance] Set routing for auto-resolved class: ${currentLabelStr}`);
|
|
250
|
-
}
|
|
251
|
-
// Proceed to load it as a class
|
|
252
|
-
return this.loadClassInstance(label, params, nextResolutionChain);
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
// --- End Auto-Registration ---
|
|
256
|
-
// --- Dependency Not Found ---
|
|
257
|
-
console.error(`[IOC LoadInstance] Dependency not found and cannot be resolved: ${currentLabelStr}`);
|
|
258
|
-
throw new ContainerErrors_1.DependencyNotFoundError(currentLabelStr);
|
|
259
|
-
});
|
|
260
|
-
}
|
|
261
|
-
resolveParameterValue(param, params) {
|
|
262
|
-
// Find the *last* provided value for the parameter
|
|
263
|
-
const valueContainer = [...params].reverse().find((p) => p.belongsTo(param));
|
|
264
|
-
if (!valueContainer) {
|
|
265
|
-
// console.error(`[IOC ResolveParam] Parameter not found: ${param.toString()}`);
|
|
266
|
-
throw new ContainerErrors_1.ParameterNotFoundError(param.toString());
|
|
267
|
-
}
|
|
268
|
-
// console.log(`[IOC ResolveParam] Resolved parameter ${param.toString()}`);
|
|
269
|
-
return valueContainer.value;
|
|
270
|
-
}
|
|
271
|
-
loadClassInstance(classDefinition, // Should be a class constructor here
|
|
272
|
-
params, resolutionChain) {
|
|
273
|
-
const storageType = this.getStorageType(classDefinition);
|
|
274
|
-
const className = classDefinition.name || '[Anonymous Class]';
|
|
275
|
-
// Check storage first (handle stored promises)
|
|
276
|
-
if (storageType && this.hasInstance(classDefinition)) {
|
|
277
|
-
const instance = this.getInstance(classDefinition);
|
|
278
|
-
// console.log(`[IOC LoadClass] Found existing ${storageType} instance for ${className}. IsPromise: ${isPromise(instance)}`);
|
|
279
|
-
return instance;
|
|
280
|
-
}
|
|
281
|
-
// console.log(`[IOC LoadClass] Creating new ${storageType || 'transient'} instance for ${className}`);
|
|
282
|
-
// --- Determine Dependencies ---
|
|
283
|
-
const manualOptions = this._classDefinition.get(classDefinition);
|
|
284
|
-
let dependenciesToResolve;
|
|
285
|
-
if ((manualOptions === null || manualOptions === void 0 ? void 0 : manualOptions.param) && Array.isArray(manualOptions.param)) {
|
|
286
|
-
dependenciesToResolve = manualOptions.param;
|
|
287
|
-
// console.log(`[IOC LoadClass] Using manual dependencies for ${className}`);
|
|
288
|
-
}
|
|
289
|
-
else {
|
|
290
|
-
// Use decorator-derived dependencies
|
|
291
|
-
dependenciesToResolve = (0, DecoratorSupport_1.getResolvedDependencies)(classDefinition);
|
|
292
|
-
// console.log(`[IOC LoadClass] Using decorator/reflected dependencies for ${className}:`, dependenciesToResolve.map(d => typeof d === 'function' ? d.name : String(d)));
|
|
293
|
-
}
|
|
294
|
-
// --- End Determine Dependencies ---
|
|
295
|
-
// --- Resolve Dependencies ---
|
|
296
|
-
// Create a *copy* of params to pass down for dependency resolution
|
|
297
|
-
const paramsCopy = [...params];
|
|
298
|
-
const resolutionPromises = dependenciesToResolve.map(dependencyIdentifier => this.loadInstance(dependencyIdentifier, paramsCopy, resolutionChain) // Recursive call handles auto-registration
|
|
299
|
-
);
|
|
300
|
-
let finalInstance = Promise.all(resolutionPromises)
|
|
301
|
-
.catch((error) => {
|
|
302
|
-
console.error(`[IOC LoadClass] Failed to resolve one or more dependencies for ${className}:`, error);
|
|
303
|
-
// Clean up potential partially stored promise if this was going to be singleton/scoped
|
|
304
|
-
if (storageType && this.isRegisteredAsClass(classDefinition)) { // Check if it was actually *being* stored
|
|
305
|
-
if (storageType === 'singleton')
|
|
306
|
-
this._classStorageSingleton.delete(classDefinition);
|
|
307
|
-
if (storageType === 'scoped')
|
|
308
|
-
this._classStorageScoped.delete(classDefinition);
|
|
309
|
-
}
|
|
310
|
-
throw error; // Re-throw dependency resolution error
|
|
311
|
-
}).then((resolvedDependencies) => __awaiter(this, void 0, void 0, function* () {
|
|
312
|
-
// --- Instantiate Class ---
|
|
313
|
-
// Store the promise *before* starting instantiation for concurrent requests
|
|
314
|
-
let instancePromise;
|
|
315
|
-
if (storageType && !this.hasInstance(classDefinition)) { // Check again in case of race condition?
|
|
316
|
-
// Create the promise wrapper immediately
|
|
317
|
-
instancePromise = (() => __awaiter(this, void 0, void 0, function* () {
|
|
318
|
-
try {
|
|
319
|
-
// console.log(`[IOC LoadClass] Instantiating ${className} with ${resolvedDependencies.length} args.`);
|
|
320
|
-
const instance = new classDefinition(...resolvedDependencies);
|
|
321
|
-
// Overwrite the stored promise with the actual instance *after* it's created
|
|
322
|
-
this.setInstance(classDefinition, instance, storageType); // Use the correct storageType
|
|
323
|
-
// console.log(`[IOC LoadClass] Stored actual ${storageType} instance for ${className}`);
|
|
324
|
-
return instance;
|
|
325
|
-
}
|
|
326
|
-
catch (err) {
|
|
327
|
-
console.error(`[IOC LoadClass] Error during instantiation of ${className}: ${err.message}`, err.stack);
|
|
328
|
-
// Clean up the stored promise on failure
|
|
329
|
-
if (storageType === 'singleton')
|
|
330
|
-
this._classStorageSingleton.delete(classDefinition);
|
|
331
|
-
if (storageType === 'scoped')
|
|
332
|
-
this._classStorageScoped.delete(classDefinition);
|
|
333
|
-
throw err; // Re-throw instantiation error
|
|
334
|
-
}
|
|
335
|
-
}))();
|
|
336
|
-
// console.log(`[IOC LoadClass] Storing promise for concurrent requests (${storageType}) for ${className}`);
|
|
337
|
-
this.setInstance(classDefinition, instancePromise, storageType);
|
|
338
|
-
}
|
|
339
|
-
else {
|
|
340
|
-
// If already has instance (from storage check) or is transient, just instantiate directly
|
|
341
|
-
instancePromise = (() => __awaiter(this, void 0, void 0, function* () {
|
|
342
|
-
try {
|
|
343
|
-
// console.log(`[IOC LoadClass] Instantiating transient ${className} with ${resolvedDependencies.length} args.`);
|
|
344
|
-
const instance = new classDefinition(...resolvedDependencies);
|
|
345
|
-
// No storing for transient
|
|
346
|
-
return instance;
|
|
347
|
-
}
|
|
348
|
-
catch (err) {
|
|
349
|
-
console.error(`[IOC LoadClass] Error during instantiation of transient ${className}: ${err.message}`, err.stack);
|
|
350
|
-
throw err; // Re-throw instantiation error
|
|
351
|
-
}
|
|
352
|
-
}))();
|
|
353
|
-
}
|
|
354
|
-
// --- End Instantiate Class ---
|
|
355
|
-
// Await and return the final instance (either newly created or from the stored promise)
|
|
356
|
-
return yield instancePromise;
|
|
357
|
-
}));
|
|
358
|
-
if (storageType && storageType !== 'transient') {
|
|
359
|
-
this.setInstance(classDefinition, finalInstance, storageType); // Store the promise
|
|
360
|
-
}
|
|
361
|
-
return finalInstance;
|
|
362
|
-
}
|
|
363
|
-
loadFunctionInstance(funcLabel, params, resolutionChain) {
|
|
364
|
-
const functionConfig = this._functionDefinition.get(funcLabel); // Assumed to exist by caller
|
|
365
|
-
const storageType = this.getStorageType(funcLabel); // Only uses manual options for functions
|
|
366
|
-
const labelStr = String(funcLabel);
|
|
367
|
-
// Check storage first
|
|
368
|
-
if (storageType && this.hasInstance(funcLabel)) {
|
|
369
|
-
const instance = this.getInstance(funcLabel);
|
|
370
|
-
// console.log(`[IOC LoadFunc] Found existing ${storageType} instance for ${labelStr}. IsPromise: ${isPromise(instance)}`);
|
|
371
|
-
return instance;
|
|
372
|
-
}
|
|
373
|
-
// console.log(`[IOC LoadFunc] Creating new ${storageType || 'transient'} instance for ${labelStr}`);
|
|
374
|
-
const ioc_func = functionConfig.function;
|
|
375
|
-
const options = functionConfig.options;
|
|
376
|
-
const dependenciesToResolve = (options === null || options === void 0 ? void 0 : options.param) || [];
|
|
377
|
-
// --- Resolve Dependencies ---
|
|
378
|
-
const paramsCopy = [...params]; // Create a copy
|
|
379
|
-
const resolutionPromises = dependenciesToResolve.map(dependencyIdentifier => this.loadInstance(dependencyIdentifier, paramsCopy, resolutionChain));
|
|
380
|
-
let finalInstance = Promise.all(resolutionPromises).catch((error) => {
|
|
381
|
-
console.error(`[IOC LoadFunc] Failed to resolve dependencies for function ${labelStr}:`, error);
|
|
382
|
-
// Clean up potential partial storage
|
|
383
|
-
if (storageType && this.isRegisteredAsFunction(funcLabel)) {
|
|
384
|
-
if (storageType === 'singleton')
|
|
385
|
-
this._functionStorageSingleton.delete(funcLabel);
|
|
386
|
-
if (storageType === 'scoped')
|
|
387
|
-
this._functionStorageScoped.delete(funcLabel);
|
|
388
|
-
}
|
|
389
|
-
throw error;
|
|
390
|
-
}).then((resolvedArgs) => __awaiter(this, void 0, void 0, function* () {
|
|
391
|
-
let instancePromise;
|
|
392
|
-
if (storageType && !this.hasInstance(funcLabel)) {
|
|
393
|
-
instancePromise = (() => __awaiter(this, void 0, void 0, function* () {
|
|
394
|
-
try {
|
|
395
|
-
// console.log(`[IOC LoadFunc] Invoking ${labelStr} with ${resolvedArgs.length} args.`);
|
|
396
|
-
const result = yield ioc_func.apply(null, resolvedArgs); // Await in case function is async
|
|
397
|
-
// Overwrite stored promise with actual result
|
|
398
|
-
this.setInstance(funcLabel, result, storageType);
|
|
399
|
-
// console.log(`[IOC LoadFunc] Stored actual ${storageType} instance for ${labelStr}`);
|
|
400
|
-
return result;
|
|
401
|
-
}
|
|
402
|
-
catch (err) {
|
|
403
|
-
console.error(`[IOC LoadFunc] Error executing function ${labelStr}: ${err.message}`, err.stack);
|
|
404
|
-
// Clean up stored promise on failure
|
|
405
|
-
if (storageType === 'singleton')
|
|
406
|
-
this._functionStorageSingleton.delete(funcLabel);
|
|
407
|
-
if (storageType === 'scoped')
|
|
408
|
-
this._functionStorageScoped.delete(funcLabel);
|
|
409
|
-
throw err;
|
|
410
|
-
}
|
|
411
|
-
}))();
|
|
412
|
-
// console.log(`[IOC LoadFunc] Storing promise for concurrent requests (${storageType}) for ${labelStr}`);
|
|
413
|
-
this.setInstance(funcLabel, instancePromise, storageType);
|
|
414
|
-
}
|
|
415
|
-
else {
|
|
416
|
-
// Transient or already resolved from storage check
|
|
417
|
-
instancePromise = (() => __awaiter(this, void 0, void 0, function* () {
|
|
418
|
-
try {
|
|
419
|
-
// console.log(`[IOC LoadFunc] Invoking transient ${labelStr} with ${resolvedArgs.length} args.`);
|
|
420
|
-
const result = yield ioc_func.apply(null, resolvedArgs); // Await in case function is async
|
|
421
|
-
// No storing for transient
|
|
422
|
-
return result;
|
|
423
|
-
}
|
|
424
|
-
catch (err) {
|
|
425
|
-
console.error(`[IOC LoadFunc] Error executing transient function ${labelStr}: ${err.message}`, err.stack);
|
|
426
|
-
throw err;
|
|
427
|
-
}
|
|
428
|
-
}))();
|
|
429
|
-
}
|
|
430
|
-
// --- End Invoke Function ---
|
|
431
|
-
return yield instancePromise; // Return the final (awaited) result
|
|
432
|
-
}));
|
|
433
|
-
if (storageType && storageType !== 'transient') {
|
|
434
|
-
this.setInstance(funcLabel, finalInstance, storageType); // Store the promise
|
|
435
|
-
}
|
|
436
|
-
return finalInstance;
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
exports.Container = Container;
|
|
440
|
-
// Helper functions
|
|
441
|
-
function isPromise(obj) {
|
|
442
|
-
// Simplified check - more robust check might be needed depending on environment
|
|
443
|
-
return !!obj && typeof obj.then === 'function';
|
|
444
|
-
}
|
|
445
|
-
function createContainer() {
|
|
446
|
-
return new Container();
|
|
447
|
-
}
|
|
448
|
-
//# sourceMappingURL=Container.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Container.js","sourceRoot":"","sources":["../../../../framework/implementation/Container.ts"],"names":[],"mappings":";;;;;;;;;;;;AA6dA,8BAGC;AAED,0CAEC;AApeD,4BAA0B,CAAC,yCAAyC;AAEpE,qCAAkC;AAClC,2CAAwD;AACxD,+DAAwK;AACxK,yDAI4B,CAAC,sCAAsC;AAEnE,IAAK,gBAIJ;AAJD,WAAK,gBAAgB;IACjB,6CAAyB,CAAA;IACzB,mCAAe,CAAA;IACf,6EAA6E;AACjF,CAAC,EAJI,gBAAgB,KAAhB,gBAAgB,QAIpB;AAID,MAAa,SAAS;IAAtB;QACI,8BAA8B;QACtB,aAAQ,GAA+B,IAAI,GAAG,EAAE,CAAC;QACjD,wBAAmB,GAA2C,IAAI,GAAG,EAAE,CAAC;QACxE,qBAAgB,GAA6C,IAAI,GAAG,EAAE,CAAC;QAE/E,eAAe;QACP,8BAAyB,GAAkB,IAAI,GAAG,EAAE,CAAC;QACrD,2BAAsB,GAAkB,IAAI,GAAG,EAAE,CAAC;QAClD,2BAAsB,GAAuB,IAAI,GAAG,EAAE,CAAC;QACvD,wBAAmB,GAAuB,IAAI,GAAG,EAAE,CAAC;IA6bhE,CAAC;IA3bG,uBAA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