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

@artus/injection

Package Overview
Dependencies
Maintainers
7
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@artus/injection - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

10

lib/decorator/injectable.js

@@ -9,3 +9,11 @@ "use strict";

return (target) => {
(0, util_1.setMetadata)(constant_1.CLASS_CONSTRUCTOR, Object.assign({ id: target, scope: types_1.ScopeEnum.SINGLETON }, options), target);
const md = Object.assign({ id: target, scope: types_1.ScopeEnum.SINGLETON, lazy: false }, options);
(0, util_1.setMetadata)(constant_1.CLASS_CONSTRUCTOR, md, target);
// make all properties lazy
if (md.lazy) {
const props = (0, util_1.recursiveGetMetadata)(constant_1.CLASS_PROPERTY, target);
const handlerProps = (0, util_1.recursiveGetMetadata)(constant_1.INJECT_HANDLER_PROPS, target);
const properties = (props !== null && props !== void 0 ? props : []).concat(handlerProps !== null && handlerProps !== void 0 ? handlerProps : []);
properties.forEach(property => property.handler = constant_1.LAZY_HANDLER);
}
};

@@ -12,0 +20,0 @@ }

@@ -20,2 +20,3 @@ export declare type Constructable<T = unknown> = new (...args: any[]) => T;

scope?: ScopeEnum;
lazy?: boolean;
}

@@ -22,0 +23,0 @@ export interface InjectableDefinition<T = unknown> {

2

package.json
{
"name": "@artus/injection",
"version": "0.4.0",
"version": "0.4.1",
"description": "A IoC Implemention for Artus.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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