@injex/core
Advanced tools
Comparing version 3.3.6 to 3.3.7
@@ -261,6 +261,11 @@ "use strict"; | ||
return tslib_1.__generator(this, function (_b) { | ||
if (metadata && metadata.singleton) { | ||
return [2 /*return*/, this._invokeModuleInitMethod(metadata.lazyLoader || module, metadata)]; | ||
switch (_b.label) { | ||
case 0: | ||
if (!(metadata && metadata.singleton)) return [3 /*break*/, 2]; | ||
return [4 /*yield*/, stdlib_1.yieldToMain()]; | ||
case 1: | ||
_b.sent(); | ||
return [2 /*return*/, this._invokeModuleInitMethod(metadata.lazyLoader || module, metadata)]; | ||
case 2: return [2 /*return*/]; | ||
} | ||
return [2 /*return*/]; | ||
}); | ||
@@ -324,4 +329,7 @@ }); | ||
InjexContainer.prototype._onInitModuleError = function (metadata, err) { | ||
var _a; | ||
this._logger.error(err); | ||
throw new errors_1.InitializeMuduleError(metadata.name); | ||
var error = new errors_1.InitializeMuduleError(metadata.name); | ||
error.stack = (_a = err === null || err === void 0 ? void 0 : err.stack) !== null && _a !== void 0 ? _a : error.stack; | ||
throw error; | ||
}; | ||
@@ -328,0 +336,0 @@ InjexContainer.prototype._createInstance = function (construct, args) { |
{ | ||
"name": "@injex/core", | ||
"version": "3.3.6", | ||
"version": "3.3.7", | ||
"description": "Simple, Decorated, Pluggable dependency-injection framework for TypeScript apps", | ||
@@ -47,3 +47,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@injex/stdlib": "^3.3.6" | ||
"@injex/stdlib": "^3.3.7" | ||
}, | ||
@@ -57,3 +57,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "5fe7c8f5af915094d93add33f010d92c98fb780b" | ||
"gitHead": "0d28f7d676b794aa9509f56702164031051346e8" | ||
} |
@@ -278,2 +278,3 @@ import { Hook, IConstructor, isFunction, isPromise, Logger, yieldToMain } from "@injex/stdlib"; | ||
if (metadata && metadata.singleton) { | ||
await yieldToMain(); | ||
return this._invokeModuleInitMethod( | ||
@@ -342,3 +343,5 @@ metadata.lazyLoader || module, metadata | ||
this._logger.error(err); | ||
throw new InitializeMuduleError(metadata.name); | ||
const error = new InitializeMuduleError(metadata.name); | ||
error.stack = err?.stack ?? error.stack; | ||
throw error; | ||
} | ||
@@ -345,0 +348,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
95472
1614
Updated@injex/stdlib@^3.3.7