@injex/core
Advanced tools
Comparing version 3.4.0 to 3.5.0
@@ -205,3 +205,3 @@ "use strict"; | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var Ctor, lazyMetadata, lazyInstance; | ||
var Ctor, lazyMetadata, lazyInstance, moduleWithMetadata, alias, i, len; | ||
return tslib_1.__generator(this, function (_a) { | ||
@@ -223,2 +223,16 @@ switch (_a.label) { | ||
self._lazyInvokeModuleReadyMethod(lazyInstance, lazyMetadata); | ||
moduleWithMetadata = { | ||
module: lazyInstance, metadata: lazyMetadata | ||
}; | ||
self._modules.set(lazyMetadata.name, moduleWithMetadata); | ||
if (lazyMetadata.aliases) { | ||
alias = void 0; | ||
for (i = 0, len = lazyMetadata.aliases.length; i < len; i++) { | ||
alias = lazyMetadata.aliases[i]; | ||
if (!self._aliases.has(alias)) { | ||
self._aliases.set(alias, []); | ||
} | ||
self._aliases.get(alias).push(moduleWithMetadata); | ||
} | ||
} | ||
_a.label = 4; | ||
@@ -225,0 +239,0 @@ case 4: return [2 /*return*/, lazyInstance]; |
{ | ||
"name": "@injex/core", | ||
"version": "3.4.0", | ||
"version": "3.5.0", | ||
"description": "Simple, Decorated, Pluggable dependency-injection framework for TypeScript apps", | ||
@@ -47,3 +47,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@injex/stdlib": "^3.4.0" | ||
"@injex/stdlib": "^3.5.0" | ||
}, | ||
@@ -57,3 +57,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "352e6456d1e82b015e39cfed9a42c5f65f5a4f61" | ||
"gitHead": "020487269017c1b44c02305c40c4267cf30646cd" | ||
} |
@@ -240,2 +240,20 @@ import { Hook, IConstructor, isFunction, isPromise, Logger, yieldToMain } from "@injex/stdlib"; | ||
self._lazyInvokeModuleReadyMethod(lazyInstance, lazyMetadata); | ||
const moduleWithMetadata: IModule = { | ||
module: lazyInstance, metadata: lazyMetadata | ||
}; | ||
self._modules.set(lazyMetadata.name, moduleWithMetadata); | ||
if (lazyMetadata.aliases) { | ||
let alias: string; | ||
for (let i = 0, len = lazyMetadata.aliases.length; i < len; i++) { | ||
alias = lazyMetadata.aliases[i]; | ||
if (!self._aliases.has(alias)) { | ||
self._aliases.set(alias, []); | ||
} | ||
self._aliases.get(alias).push(moduleWithMetadata); | ||
} | ||
} | ||
} | ||
@@ -242,0 +260,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
98919
1666
Updated@injex/stdlib@^3.5.0