Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@injex/core

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@injex/core - npm Package Compare versions

Comparing version 2.0.9 to 2.0.10

31

lib/injex.js

@@ -128,3 +128,5 @@ "use strict";

case metadata.lazy:
module = this._createLazyModuleFactoryMethod(item, metadata);
var _a = this._createLazyModuleFactoryMethod(item, metadata), loaderFn = _a[0], loaderInstance = _a[1];
metadata.lazyLoader = loaderInstance;
module = loaderFn;
break;

@@ -155,5 +157,5 @@ case metadata.singleton:

var self = this;
var instance = this._createInstance(construct, constants_1.EMPTY_ARGS);
this._injectModuleDependencies(instance, metadata);
return function () {
var loaderInstance = this._createInstance(construct, constants_1.EMPTY_ARGS);
this._injectModuleDependencies(loaderInstance, metadata);
function loaderFn() {
var args = [];

@@ -167,3 +169,3 @@ for (var _i = 0; _i < arguments.length; _i++) {

switch (_a.label) {
case 0: return [4 /*yield*/, instance.import.apply(instance, args)];
case 0: return [4 /*yield*/, loaderInstance.import.apply(loaderInstance, args)];
case 1:

@@ -181,3 +183,4 @@ Ctor = _a.sent();

});
};
}
return [loaderFn, loaderInstance];
};

@@ -324,4 +327,16 @@ InjexContainer.prototype._createModuleFactoryMethod = function (construct, metadata) {

else {
var keyValue = aliasModule.metadata.singleton ? aliasModule.module[keyBy] : aliasModule.metadata.item[keyBy];
mapOrSet[keyValue] = aliasModule.module;
var keyValue = void 0;
switch (true) {
case aliasModule.metadata.lazy:
keyValue = aliasModule.metadata.lazyLoader[keyBy];
break;
case aliasModule.metadata.singleton:
keyValue = aliasModule.module[keyBy];
break;
default:
keyValue = aliasModule.metadata.item[keyBy];
}
if (keyValue) {
mapOrSet[keyValue] = aliasModule.module;
}
}

@@ -328,0 +343,0 @@ }

@@ -27,2 +27,3 @@ import { Hook, IConstructor, LogLevel } from "@injex/stdlib";

lazy?: boolean;
lazyLoader?: ILazyModule<any>;
}

@@ -29,0 +30,0 @@ export interface IBootstrap {

{
"name": "@injex/core",
"version": "2.0.9",
"version": "2.0.10",
"description": "Simple, Decorated, Pluggable dependency-injection framework for TypeScript apps",

@@ -46,3 +46,3 @@ "keywords": [

"dependencies": {
"@injex/stdlib": "^2.0.9",
"@injex/stdlib": "^2.0.10",
"tslib": "^2.0.1"

@@ -56,3 +56,3 @@ },

},
"gitHead": "d8117f37e6f40e47550e541a7aaac40e59ad1277"
"gitHead": "639e751e1b40318adb51967030e3672d5cc43493"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc