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

plume-ts-di

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

plume-ts-di - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

8

build/cjs/lib/Injector.d.ts

@@ -41,2 +41,10 @@ import { Implementation } from '@wessberg/di/dist/esm/implementation/implementation';

/**
* Verify if an instance of a type that has been registered
* (cf {@link registerSingleton} and {@link registerSingletonProvider})
* @param type The type for which the registration test is wanted
*/
hasInstance<T>(type: Function & {
prototype: T;
}): boolean;
/**
* Initialize all singleton instances: i.e. all constructors of mapped types implementation will be called.

@@ -43,0 +51,0 @@ * This should be called after all types have been declared.

16

build/cjs/lib/Injector.js

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

registerSingleton(implementationType, mappedType) {
// @ts-ignore
this.container.registerSingleton(undefined, {
// @ts-ignore
identifier: mappedType ? Injector.getTypeName(mappedType) : Injector.getTypeName(implementationType),

@@ -49,4 +47,3 @@ implementation: this.singletonInstances.singletonProxy(implementationType),

};
// I cannot figure out how to make the TS compiler accept the proxy
// @ts-ignore
// `as any` is required to force TS compiler to accept the function as type of Implementation<any>
this.registerSingleton(providerProxy, mappedType);

@@ -63,2 +60,10 @@ }

/**
* Verify if an instance of a type that has been registered
* (cf {@link registerSingleton} and {@link registerSingletonProvider})
* @param type The type for which the registration test is wanted
*/
hasInstance(type) {
return this.container.has({ identifier: Injector.getTypeName(type) });
}
/**
* Initialize all singleton instances: i.e. all constructors of mapped types implementation will be called.

@@ -79,3 +84,2 @@ * This should be called after all types have been declared.

static getTypeName(type) {
// @ts-ignore
const typeName = type[Injector.CONSTRUCTOR_NAME_SYMBOL];

@@ -94,2 +98,2 @@ if (typeName) {

Injector.CONSTRUCTOR_NAME_SYMBOL = Symbol.for(Injector.CONSTRUCTOR_NAME_SYMBOL_IDENTIFIER);
//# sourceMappingURL=data:application/json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09BU0c7SUFDSCw0QkFBNEI7UUFDMUIsS0FBSyxNQUFNLGNBQWMsSUFBSSxJQUFJLENBQUMsZUFBZSxFQUFFO1lBQ2pELElBQUksQ0FBQyxXQUFXLENBQUMsY0FBYyxDQUFDLENBQUM7U0FDbEM7SUFDSCxDQUFDO0lBRU8sTUFBTSxDQUFDLFdBQVcsQ0FBSSxJQUFxRDtRQUNqRixNQUFNLFFBQVEsR0FBSSxJQUFZLENBQUMsUUFBUSxDQUFDLHVCQUF1QixDQUFDLENBQUM7UUFDakUsSUFBSSxRQUFRLEVBQUU7WUFDWixPQUFPLFFBQVEsQ0FBQztTQUNqQjtRQUNELHNDQUFzQztRQUN0QyxPQUFPLENBQUMsSUFBSSxDQUFDO2lGQUNnRSxJQUFJLENBQUMsSUFBSSxHQUFHLEVBQUUsSUFBSSxDQUFDLENBQUM7UUFDakcsT0FBTyxJQUFJLENBQUMsSUFBSSxDQUFDO0lBQ25CLENBQUM7O0FBN0ZILDRCQThGQztBQXZGaUIsMkNBQWtDLEdBQUcsaUJBQWlCLENBQUM7QUFFdkQsZ0NBQXVCLEdBQWtCLE1BQU0sQ0FBQyxHQUFHLENBQUMsUUFBUSxDQUFDLGtDQUFrQyxDQUFDLENBQUMifQ==

@@ -12,2 +12,9 @@ import { Injector } from './Injector';

/**
* Get the instance of the global injector.
*
* This should be used only to dynamically modify the current global instance.
* Instances should be fetched using {@link getGlobalInstance}
*/
export declare function exportGlobalInjector(): Injector | undefined;
/**
* Get instances configure in the global injector instance. See {@link Injector.getInstance}

@@ -14,0 +21,0 @@ * @param type The type for which an instance of is required

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getGlobalInstance = exports.configureGlobalInjector = void 0;
exports.getGlobalInstance = exports.exportGlobalInjector = exports.configureGlobalInjector = void 0;
let globalInjector;

@@ -18,2 +18,12 @@ /**

/**
* Get the instance of the global injector.
*
* This should be used only to dynamically modify the current global instance.
* Instances should be fetched using {@link getGlobalInstance}
*/
function exportGlobalInjector() {
return globalInjector;
}
exports.exportGlobalInjector = exportGlobalInjector;
/**
* Get instances configure in the global injector instance. See {@link Injector.getInstance}

@@ -30,2 +40,2 @@ * @param type The type for which an instance of is required

exports.getGlobalInstance = getGlobalInstance;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSW5qZWN0b3JJbnN0YW5jZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIvSW5qZWN0b3JJbnN0YW5jZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSxJQUFJLGNBQW9DLENBQUM7QUFFekM7Ozs7Ozs7R0FPRztBQUNILFNBQWdCLHVCQUF1QixDQUFDLFFBQWtCO0lBQ3hELGNBQWMsR0FBRyxRQUFRLENBQUM7QUFDNUIsQ0FBQztBQUZELDBEQUVDO0FBRUQ7OztHQUdHO0FBQ0gsU0FBZ0IsaUJBQWlCLENBQUksSUFBaUM7SUFDcEUsSUFBSSxDQUFDLGNBQWMsRUFBRTtRQUNuQixNQUFNLElBQUksS0FBSyxDQUFDLGtDQUFrQztjQUM5Qyw0RUFBNEUsQ0FBQyxDQUFDO0tBQ25GO0lBQ0QsT0FBTyxjQUFjLENBQUMsV0FBVyxDQUFDLElBQUksQ0FBQyxDQUFDO0FBQzFDLENBQUM7QUFORCw4Q0FNQyJ9
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSW5qZWN0b3JJbnN0YW5jZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIvSW5qZWN0b3JJbnN0YW5jZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSxJQUFJLGNBQW9DLENBQUM7QUFFekM7Ozs7Ozs7R0FPRztBQUNILFNBQWdCLHVCQUF1QixDQUFDLFFBQWtCO0lBQ3hELGNBQWMsR0FBRyxRQUFRLENBQUM7QUFDNUIsQ0FBQztBQUZELDBEQUVDO0FBRUQ7Ozs7O0dBS0c7QUFDSCxTQUFnQixvQkFBb0I7SUFDbEMsT0FBTyxjQUFjLENBQUM7QUFDeEIsQ0FBQztBQUZELG9EQUVDO0FBRUQ7OztHQUdHO0FBQ0gsU0FBZ0IsaUJBQWlCLENBQUksSUFBaUM7SUFDcEUsSUFBSSxDQUFDLGNBQWMsRUFBRTtRQUNuQixNQUFNLElBQUksS0FBSyxDQUFDLGtDQUFrQztjQUM5Qyw0RUFBNEUsQ0FBQyxDQUFDO0tBQ25GO0lBQ0QsT0FBTyxjQUFjLENBQUMsV0FBVyxDQUFDLElBQUksQ0FBQyxDQUFDO0FBQzFDLENBQUM7QUFORCw4Q0FNQyJ9

@@ -31,2 +31,3 @@ "use strict";

}
// `as any` is required to force TS compiler to accept the function as type of Implementation<any>
};

@@ -37,4 +38,2 @@ // DI Compiler magic add the property CONSTRUCTOR_ARGUMENTS_SYMBOL to class objects,

Object.defineProperty(singletonProxy, di_1.CONSTRUCTOR_ARGUMENTS_SYMBOL, { value: singletonType[di_1.CONSTRUCTOR_ARGUMENTS_SYMBOL] });
// I cannot figure out how to make the TS compiler accept the proxy
// @ts-ignore
return singletonProxy;

@@ -44,2 +43,2 @@ }

exports.default = SingletonInstances;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2luZ2xldG9uSW5zdGFuY2VzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2xpYi9TaW5nbGV0b25JbnN0YW5jZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFDQSxpRUFBK0M7QUFDL0MscUNBQTREO0FBRTVELE1BQU0sTUFBTSxHQUFHLElBQUksOEJBQU0sQ0FBQyxvQkFBb0IsQ0FBQyxDQUFDO0FBRWhELE1BQXFCLGtCQUFrQjtJQUF2QztRQUN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sSUFBSSxhQUFhLENBQUMsR0FBRyxJQUFJLENBQUMsQ0FBQztnQkFDL0MsZ0JBQWdCLENBQUMsR0FBRyxDQUFDLGFBQWEsRUFBRSxXQUFXLENBQUMsQ0FBQztnQkFDakQsT0FBTyxXQUFXLENBQUM7YUFDcEI7WUFBQyxPQUFPLENBQUMsRUFBRTtnQkFDVixNQUFNLENBQUMsS0FBSyxDQUFDLDhCQUE4QixhQUFhLENBQUMsSUFBSSxHQUFHLEVBQUUsQ0FBQyxDQUFDLENBQUM7Z0JBQ3JFLE1BQU0sQ0FBQyxLQUFLLENBQUMsc0JBQXNCLGFBQWEsQ0FBQyxJQUFJLEdBQUcsRUFBRSxJQUFJLENBQUMsQ0FBQztnQkFDaEUsTUFBTSxDQUFDLEtBQUssQ0FBQyxnQ0FBZ0MsYUFBYSxDQUFDLElBQUksTUFBTSxhQUFhLEVBQUUsQ0FBQyxDQUFDO2dCQUN0RixPQUFPLElBQUksQ0FBQzthQUNiO1lBQ0Qsa0dBQWtHO1FBQ3BHLENBQVEsQ0FBQztRQUNULG9GQUFvRjtRQUNwRixnRkFBZ0Y7UUFDaEYsbUVBQW1FO1FBQ25FLE1BQU0sQ0FBQyxjQUFjLENBQ25CLGNBQWMsRUFDZCxpQ0FBNEIsRUFDNUIsRUFBRSxLQUFLLEVBQUUsYUFBYSxDQUFDLGlDQUE0QixDQUFDLEVBQUUsQ0FDdkQsQ0FBQztRQUNGLE9BQU8sY0FBYyxDQUFDO0lBQ3hCLENBQUM7Q0FDRjtBQW5DRCxxQ0FtQ0MifQ==

@@ -41,2 +41,10 @@ import { Implementation } from '@wessberg/di/dist/esm/implementation/implementation';

/**
* Verify if an instance of a type that has been registered
* (cf {@link registerSingleton} and {@link registerSingletonProvider})
* @param type The type for which the registration test is wanted
*/
hasInstance<T>(type: Function & {
prototype: T;
}): boolean;
/**
* Initialize all singleton instances: i.e. all constructors of mapped types implementation will be called.

@@ -43,0 +51,0 @@ * This should be called after all types have been declared.

@@ -20,5 +20,3 @@ import { DIContainer } from '@wessberg/di';

registerSingleton(implementationType, mappedType) {
// @ts-ignore
this.container.registerSingleton(undefined, {
// @ts-ignore
identifier: mappedType ? Injector.getTypeName(mappedType) : Injector.getTypeName(implementationType),

@@ -43,4 +41,3 @@ implementation: this.singletonInstances.singletonProxy(implementationType),

};
// I cannot figure out how to make the TS compiler accept the proxy
// @ts-ignore
// `as any` is required to force TS compiler to accept the function as type of Implementation<any>
this.registerSingleton(providerProxy, mappedType);

@@ -57,2 +54,10 @@ }

/**
* Verify if an instance of a type that has been registered
* (cf {@link registerSingleton} and {@link registerSingletonProvider})
* @param type The type for which the registration test is wanted
*/
hasInstance(type) {
return this.container.has({ identifier: Injector.getTypeName(type) });
}
/**
* Initialize all singleton instances: i.e. all constructors of mapped types implementation will be called.

@@ -73,3 +78,2 @@ * This should be called after all types have been declared.

static getTypeName(type) {
// @ts-ignore
const typeName = type[Injector.CONSTRUCTOR_NAME_SYMBOL];

@@ -87,2 +91,2 @@ if (typeName) {

Injector.CONSTRUCTOR_NAME_SYMBOL = Symbol.for(Injector.CONSTRUCTOR_NAME_SYMBOL_IDENTIFIER);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSW5qZWN0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvbGliL0luamVjdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxjQUFjLENBQUM7QUFJM0MsT0FBTyxrQkFBa0IsTUFBTSxzQkFBc0IsQ0FBQztBQUV0RDs7R0FFRztBQUNILE1BQU0sT0FBTyxRQUFRO0lBQXJCO1FBQ21CLGNBQVMsR0FBRyxJQUFJLFdBQVcsRUFBRSxDQUFDO1FBRTlCLHVCQUFrQixHQUFHLElBQUksa0JBQWtCLEVBQUUsQ0FBQztRQUU5QyxvQkFBZSxHQUFH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PLFFBQVEsQ0FBQztTQUNqQjtRQUNELHNDQUFzQztRQUN0QyxPQUFPLENBQUMsSUFBSSxDQUFDO2lGQUNnRSxJQUFJLENBQUMsSUFBSSxHQUFHLEVBQUUsSUFBSSxDQUFDLENBQUM7UUFDakcsT0FBTyxJQUFJLENBQUMsSUFBSSxDQUFDO0lBQ25CLENBQUM7O0FBdEZlLDJDQUFrQyxHQUFHLGlCQUFpQixDQUFDO0FBRXZELGdDQUF1QixHQUFrQixNQUFNLENBQUMsR0FBRyxDQUFDLFFBQVEsQ0FBQyxrQ0FBa0MsQ0FBQyxDQUFDIn0=

@@ -12,2 +12,9 @@ import { Injector } from './Injector';

/**
* Get the instance of the global injector.
*
* This should be used only to dynamically modify the current global instance.
* Instances should be fetched using {@link getGlobalInstance}
*/
export declare function exportGlobalInjector(): Injector | undefined;
/**
* Get instances configure in the global injector instance. See {@link Injector.getInstance}

@@ -14,0 +21,0 @@ * @param type The type for which an instance of is required

@@ -14,2 +14,11 @@ let globalInjector;

/**
* Get the instance of the global injector.
*
* This should be used only to dynamically modify the current global instance.
* Instances should be fetched using {@link getGlobalInstance}
*/
export function exportGlobalInjector() {
return globalInjector;
}
/**
* Get instances configure in the global injector instance. See {@link Injector.getInstance}

@@ -25,2 +34,2 @@ * @param type The type for which an instance of is required

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSW5qZWN0b3JJbnN0YW5jZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIvSW5qZWN0b3JJbnN0YW5jZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQSxJQUFJLGNBQW9DLENBQUM7QUFFekM7Ozs7Ozs7R0FPRztBQUNILE1BQU0sVUFBVSx1QkFBdUIsQ0FBQyxRQUFrQjtJQUN4RCxjQUFjLEdBQUcsUUFBUSxDQUFDO0FBQzVCLENBQUM7QUFFRDs7O0dBR0c7QUFDSCxNQUFNLFVBQVUsaUJBQWlCLENBQUksSUFBaUM7SUFDcEUsSUFBSSxDQUFDLGNBQWMsRUFBRTtRQUNuQixNQUFNLElBQUksS0FBSyxDQUFDLGtDQUFrQztjQUM5Qyw0RUFBNEUsQ0FBQyxDQUFDO0tBQ25GO0lBQ0QsT0FBTyxjQUFjLENBQUMsV0FBVyxDQUFDLElBQUksQ0FBQyxDQUFDO0FBQzFDLENBQUMifQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSW5qZWN0b3JJbnN0YW5jZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIvSW5qZWN0b3JJbnN0YW5jZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQSxJQUFJLGNBQW9DLENBQUM7QUFFekM7Ozs7Ozs7R0FPRztBQUNILE1BQU0sVUFBVSx1QkFBdUIsQ0FBQyxRQUFrQjtJQUN4RCxjQUFjLEdBQUcsUUFBUSxDQUFDO0FBQzVCLENBQUM7QUFFRDs7Ozs7R0FLRztBQUNILE1BQU0sVUFBVSxvQkFBb0I7SUFDbEMsT0FBTyxjQUFjLENBQUM7QUFDeEIsQ0FBQztBQUVEOzs7R0FHRztBQUNILE1BQU0sVUFBVSxpQkFBaUIsQ0FBSSxJQUFpQztJQUNwRSxJQUFJLENBQUMsY0FBYyxFQUFFO1FBQ25CLE1BQU0sSUFBSSxLQUFLLENBQUMsa0NBQWtDO2NBQzlDLDRFQUE0RSxDQUFDLENBQUM7S0FDbkY7SUFDRCxPQUFPLGNBQWMsQ0FBQyxXQUFXLENBQUMsSUFBSSxDQUFDLENBQUM7QUFDMUMsQ0FBQyJ9

@@ -29,2 +29,3 @@ import { Logger } from 'simple-logging-system';

}
// `as any` is required to force TS compiler to accept the function as type of Implementation<any>
};

@@ -35,7 +36,5 @@ // DI Compiler magic add the property CONSTRUCTOR_ARGUMENTS_SYMBOL to class objects,

Object.defineProperty(singletonProxy, CONSTRUCTOR_ARGUMENTS_SYMBOL, { value: singletonType[CONSTRUCTOR_ARGUMENTS_SYMBOL] });
// I cannot figure out how to make the TS compiler accept the proxy
// @ts-ignore
return singletonProxy;
}
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2luZ2xldG9uSW5zdGFuY2VzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2xpYi9TaW5nbGV0b25JbnN0YW5jZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBQy9DLE9BQU8sRUFBRSw0QkFBNEIsRUFBRSxNQUFNLGNBQWMsQ0FBQztBQUU1RCxNQUFNLE1BQU0sR0FBRyxJQUFJLE1BQU0sQ0FBQyxvQkFBb0IsQ0FBQyxDQUFDO0FBRWhELE1BQU0sQ0FBQyxPQUFPLE9BQU8sa0JBQWtCO0lBQXZDO1FBQ21CLHFCQUFnQixHQUFHLElBQUksR0FBRyxFQUErQixDQUFDO0lBbUM3RSxDQUFDO0lBakNDLGNBQWMsQ0FBQyxhQUFrQztRQUMvQyxNQUFNLEVBQUUsZ0JBQWdCLEVBQUUsR0FBRyxJQUFJLENBQUM7UUFDbEMsOEZBQThGO1FBQzlGLHNDQUFzQztRQUN0QyxNQUFNLGNBQWMsR0FBRyxVQUFVLEdBQUcsSUFBVztZQUM3QyxNQUFNLGdCQUFnQixHQUFHLGdCQUFnQixDQUFDLEdBQUcsQ0FBQyxhQUFhLENBQUMsQ0FBQztZQUM3RCxJQUFJLGdCQUFnQixFQUFFO2dCQUNwQixPQUFPLGdCQUFnQixDQUFDO2FBQ3pCO1lBQ0QsSUFBSTtnQkFDRixtQ0FBbUM7Z0JBQ25DLE1BQU0sV0FBVyxHQUFHLElBQUksYUFBYSxDQUFDL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LENBQUMsS0FBSyxDQUFDLGdDQUFnQyxhQUFhLENBQUMsSUFBSSxNQUFNLGFBQWEsRUFBRSxDQUFDLENBQUM7Z0JBQ3RGLE9BQU8sSUFBSSxDQUFDO2FBQ2I7WUFDRCxrR0FBa0c7UUFDcEcsQ0FBUSxDQUFDO1FBQ1Qsb0ZBQW9GO1FBQ3BGLGdGQUFnRjtRQUNoRixtRUFBbUU7UUFDbkUsTUFBTSxDQUFDLGNBQWMsQ0FDbkIsY0FBYyxFQUNkLDRCQUE0QixFQUM1QixFQUFFLEtBQUssRUFBRSxhQUFhLENBQUMsNEJBQTRCLENBQUMsRUFBRSxDQUN2RCxDQUFDO1FBQ0YsT0FBTyxjQUFjLENBQUM7SUFDeEIsQ0FBQztDQUNGIn0=
{
"name": "plume-ts-di",
"version": "1.0.2",
"version": "1.1.0",
"description": "Lightweight & simple dependency injection system for TypeScript based on code generation instead of annotation",

@@ -5,0 +5,0 @@ "author": "Aurélien Manteaux <amanteaux@coreoz.com> (https://coreoz.com)",

@@ -35,3 +35,3 @@ Plume TS DI

-----
1. Write your classes as usual without any annotation :)
1. Write your classes as usual without any annotation :). Make sure **all classes have a unique name**: the class name is used as a key in the dependency injection system.
2. Declare a module (you should have one module per module of your application), for example:

@@ -38,0 +38,0 @@ ```typescript

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