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

@deepkit/injector

Package Overview
Dependencies
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@deepkit/injector - npm Package Compare versions

Comparing version 1.0.1-alpha.63 to 1.0.1-alpha.65

14

dist/cjs/src/injector.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.InjectorContext = exports.__ΩResolver = exports.BuildContext = exports.Injector = exports.__ΩInjectorInterface = exports.resolveToken = exports.__ΩResolveToken = exports.SetupProviderRegistry = exports.__ΩSetupProviderCalls = exports.tokenLabel = exports.InjectorToken = exports.injectorReference = exports.InjectorReference = exports.DependenciesUnmetError = exports.ServiceNotFoundError = exports.CircularDependencyError = exports.InjectorError = void 0;
var { __ΩReceiveType } = require('@deepkit/type');
var { __ΩAbstractClassType } = require('@deepkit/core');
const { __ΩReceiveType } = require('@deepkit/type');
const { __ΩAbstractClassType } = require('@deepkit/core');
const provider_1 = require("./provider");

@@ -124,3 +124,3 @@ const core_1 = require("@deepkit/core");

throwCircularDependency.__type = ['throwCircularDependency', 'P"/!'];
var __ΩSetupProviderCalls = ["call", 'type', 'methodName', 'args', 'order', "property", 'property', 'value', "stop", 'PP.!4"P&+\'J4#"F4$\'4%MP.&4"P&+\'J4\'"4(\'4%MP.)4"\'4%MJ'];
const __ΩSetupProviderCalls = ["call", 'type', 'methodName', 'args', 'order', "property", 'property', 'value', "stop", 'PP.!4"P&+\'J4#"F4$\'4%MP.&4"P&+\'J4\'"4(\'4%MP.)4"\'4%MJ'];
exports.__ΩSetupProviderCalls = __ΩSetupProviderCalls;

@@ -170,4 +170,4 @@ function matchType(left, right) {

SetupProviderRegistry.__type = ['type', () => __ΩSetupProviderCalls, 'call', 'calls', function () { return []; }, () => __ΩSetupProviderCalls, 'add', () => SetupProviderRegistry, 'registry', 'mergeInto', 'token', () => __ΩSetupProviderCalls, 'get', 'P"4!n"4#MF3$>%P"2!n&2#"0\'PP7(2)$0*P"2+n,F0-5'];
var __ΩScope = ['name', 'instances', 'P&4!P&"LM4"M'];
var __ΩResolveToken = ['T', () => __ΩAbstractClassType, () => InjectorToken, 'lXe"!Re&!Re$!RPe#!Ph&!7#qk\'+QRPde%!p/RPde#!h!!o""qk#?QRb!Pde"!pG'];
const __ΩScope = ['name', 'instances', 'P&4!P&"LM4"M'];
const __ΩResolveToken = ['T', () => __ΩAbstractClassType, () => InjectorToken, 'lXe"!Re&!Re$!RPe#!Ph&!7#qk\'+QRPde%!p/RPde#!h!!o""qk#?QRb!Pde"!pG'];
exports.__ΩResolveToken = __ΩResolveToken;

@@ -183,3 +183,3 @@ function resolveToken(provider) {

resolveToken.__type = ['provider', 'resolveToken', 'P"2!"/"'];
var __ΩInjectorInterface = ['token', () => __ΩScope, 'scope', () => __ΩResolveToken, 'get', 'PP"2!n"2#8"o$"1%M'];
const __ΩInjectorInterface = ['token', () => __ΩScope, 'scope', () => __ΩResolveToken, 'get', 'PP"2!n"2#8"o$"1%M'];
exports.__ΩInjectorInterface = __ΩInjectorInterface;

@@ -745,3 +745,3 @@ /**

BuildContext.__type = ['ids', function () { return 0; }, 'id', function () { return BuildContext.ids++; }, () => provider_1.TagRegistry, 'tagRegistry', function () { return new provider_1.TagRegistry; }, () => BuildProviderIndex, 'providerIndex', function () { return new BuildProviderIndex; }, () => SetupProviderRegistry, 'globalSetupProviderRegistry', function () { return new SetupProviderRegistry; }, '\'3!>"\'3#>$P7%3&>\'P7(3)>*P7+3,>-5'];
var __ΩResolver = ['T', 'b!P!M'];
const __ΩResolver = ['T', 'b!P!M'];
exports.__ΩResolver = __ΩResolver;

@@ -748,0 +748,0 @@ /**

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.InjectorModule = exports.getScope = exports.isProvided = exports.__ΩExportType = exports.findModuleForConfig = exports.__ΩPreparedProvider = exports.setupProvider = exports.__ΩConfigureProvider = void 0;
var { __ΩClassType } = require('@deepkit/core');
const { __ΩClassType } = require('@deepkit/core');
const provider_1 = require("./provider");

@@ -9,3 +9,3 @@ const core_1 = require("@deepkit/core");

const type_1 = require("@deepkit/type");
var __ΩConfigureProvider = ['T', 'args', '', 0, 'lTPe#!@2"e&!o$"/#Re%!e$!fRPde$!e#!fPh"!@2""/#qk#3QRb!Pde"!gN;!'];
const __ΩConfigureProvider = ['T', 'args', '', 0, 'lTPe#!@2"e&!o$"/#Re%!e$!fRPde$!e#!fPh"!@2""/#qk#3QRb!Pde"!gN;!'];
exports.__ΩConfigureProvider = __ΩConfigureProvider;

@@ -34,3 +34,3 @@ /**

let moduleIds = 0;
var __ΩPreparedProvider = ['token', () => InjectorModule, 'modules', 'providers', () => InjectorModule, 'resolveFrom', 'P"4!P7"F4#"F4$P7%4&8M'];
const __ΩPreparedProvider = ['token', () => InjectorModule, 'modules', 'providers', () => InjectorModule, 'resolveFrom', 'P"4!P7"F4#"F4$P7%4&8M'];
exports.__ΩPreparedProvider = __ΩPreparedProvider;

@@ -102,3 +102,3 @@ function lookupPreparedProviders(preparedProviders, token) {

findModuleForConfig.__type = [() => __ΩClassType, 'config', () => InjectorModule, 'modules', () => InjectorModule, 'findModuleForConfig', 'Pn!2"P7#F2$PP7%-J/&'];
var __ΩExportType = [() => InjectorModule, 'P"P7!J'];
const __ΩExportType = [() => InjectorModule, 'P"P7!J'];
exports.__ΩExportType = __ΩExportType;

@@ -105,0 +105,0 @@ function isProvided(providers, token) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getProviders = exports.isTransient = exports.isInjectionProvider = exports.isFactoryProvider = exports.isExistingProvider = exports.isClassProvider = exports.isValueProvider = exports.isScopedProvider = exports.Tag = exports.TagProvider = exports.TagRegistry = exports.__ΩFactoryProvider = exports.__ΩExistingProvider = exports.__ΩClassProvider = exports.__ΩValueProvider = exports.provide = exports.__ΩProviderBase = void 0;
var { __ΩClassType } = require('@deepkit/core');
var { __ΩReceiveType } = require('@deepkit/type');
var __ΩPick = ['T', 'K', 'l+e#!e"!fRb!b"Pde""N#!'];
var __ΩExclude = ['T', 'U', 'l6!Re$!RPe#!e$"qk#%QRb!b"Pde"!p)'];
var __ΩOmit = ['T', 'K', () => __ΩPick, () => __ΩExclude, 'b!b"e!!e!!ge!"o$#o##'];
const { __ΩClassType } = require('@deepkit/core');
const { __ΩReceiveType } = require('@deepkit/type');
const __ΩPick = ['T', 'K', 'l+e#!e"!fRb!b"Pde""N#!'];
const __ΩExclude = ['T', 'U', 'l6!Re$!RPe#!e$"qk#%QRb!b"Pde"!p)'];
const __ΩOmit = ['T', 'K', () => __ΩPick, () => __ΩExclude, 'b!b"e!!e!!ge!"o$#o##'];
/*

@@ -20,3 +20,3 @@ * Deepkit Framework

const type_1 = require("@deepkit/type");
var __ΩProviderBase = [true, 'transient', 'P.!4"8M'];
const __ΩProviderBase = [true, 'transient', 'P.!4"8M'];
exports.__ΩProviderBase = __ΩProviderBase;

@@ -30,9 +30,9 @@ function provide(provider, type) {

provide.__type = [() => __ΩOmit, "provide", () => __ΩClassType, 'provider', () => __ΩReceiveType, 'type', 'provide', 'PP"."o!#n#J2$"o%"2&8"/\''];
var __ΩValueProvider = ['T', () => __ΩProviderBase, 'provide', 'useValue', 'b!Pn""4#e"!4$M'];
const __ΩValueProvider = ['T', () => __ΩProviderBase, 'provide', 'useValue', 'b!Pn""4#e"!4$M'];
exports.__ΩValueProvider = __ΩValueProvider;
var __ΩClassProvider = ['T', () => __ΩProviderBase, 'provide', () => __ΩClassType, 'useClass', 'b!Pn""4#e"!o$"4%8M'];
const __ΩClassProvider = ['T', () => __ΩProviderBase, 'provide', () => __ΩClassType, 'useClass', 'b!Pn""4#e"!o$"4%8M'];
exports.__ΩClassProvider = __ΩClassProvider;
var __ΩExistingProvider = ['T', () => __ΩProviderBase, 'provide', () => __ΩClassType, 'useExisting', 'b!Pn""4#e"!o$"4%M'];
const __ΩExistingProvider = ['T', () => __ΩProviderBase, 'provide', () => __ΩClassType, 'useExisting', 'b!Pn""4#e"!o$"4%M'];
exports.__ΩExistingProvider = __ΩExistingProvider;
var __ΩFactoryProvider = ['T', () => __ΩProviderBase, 'provide', 'args', '', 'useFactory', 'deps', 'b!Pn""4#P"@2$e#!/%4&"F4\'8M'];
const __ΩFactoryProvider = ['T', () => __ΩProviderBase, 'provide', 'args', '', 'useFactory', 'deps', 'b!Pn""4#P"@2$e#!/%4&"F4\'8M'];
exports.__ΩFactoryProvider = __ΩFactoryProvider;

@@ -39,0 +39,0 @@ /** @reflection never */

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.__ΩInject = exports.__ΩInjectMeta = void 0;
var __ΩInjectMeta = ['T', "inject", '__meta', '!c!PP!P."e$!GK4#8M'];
const __ΩInjectMeta = ['T', "inject", '__meta', '!c!PP!P."e$!GK4#8M'];
exports.__ΩInjectMeta = __ΩInjectMeta;
var __ΩInject = ['Type', 'Token', () => __ΩInjectMeta, 'b!!c"Pe"!e""o#"K'];
const __ΩInject = ['Type', 'Token', () => __ΩInjectMeta, 'b!!c"Pe"!e""o#"K'];
exports.__ΩInject = __ΩInject;
//# sourceMappingURL=types.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.a = void 0;
var { __ΩInject } = require('../src/types');
var __ΩPick = ['T', 'K', 'l+e#!e"!fRb!b"Pde""N#!'];
const { __ΩInject } = require('../src/types');
const __ΩPick = ['T', 'K', 'l+e#!e"!fRb!b"Pde""N#!'];
const globals_1 = require("@jest/globals");

@@ -104,3 +104,3 @@ const injector_1 = require("../src/injector");

(0, globals_1.test)('interface dependency direct match', () => {
var __ΩConnection = ['id', 'data', 'write', 'P\'4!PY2"$1#M'];
const __ΩConnection = ['id', 'data', 'write', 'P\'4!PY2"$1#M'];
class MyConnection {

@@ -127,3 +127,3 @@ constructor() {

(0, globals_1.test)('interface dependency over specified', () => {
var __ΩConnection = ['id', 'data', 'write', 'P\'4!PY2"$1#M'];
const __ΩConnection = ['id', 'data', 'write', 'P\'4!PY2"$1#M'];
class MyConnection {

@@ -152,3 +152,3 @@ constructor() {

(0, globals_1.test)('interface dependency multiple matches', () => {
var __ΩConnection = ['data', 'write', 'PPY2!$1"M'];
const __ΩConnection = ['data', 'write', 'PPY2!$1"M'];
class MyConnection1 {

@@ -186,3 +186,3 @@ write(data) {

(0, globals_1.test)('interface dependency under specified', () => {
var __ΩConnection = ['id', 'data', 'write', 'P\'4!PY2"$1#M'];
const __ΩConnection = ['id', 'data', 'write', 'P\'4!PY2"$1#M'];
class MyConnection {

@@ -316,3 +316,3 @@ constructor() {

(0, globals_1.test)('injector Inject<, T>', () => {
var __ΩConnectionInterface = ['PM'];
const __ΩConnectionInterface = ['PM'];
class Connection {

@@ -334,3 +334,3 @@ }

(0, globals_1.test)('injector via Inject string', () => {
var __ΩConnectionInterface = ['PM'];
const __ΩConnectionInterface = ['PM'];
class Connection {

@@ -352,3 +352,3 @@ }

(0, globals_1.test)('injector token', () => {
var __ΩConnectionInterface = ['doIt', 'PP&1!M'];
const __ΩConnectionInterface = ['doIt', 'PP&1!M'];
const Connection = new injector_1.InjectorToken('connection');

@@ -543,4 +543,4 @@ {

(0, globals_1.test)('loggerInterface', () => {
var __ΩLogData = ['P&"LM'];
var __ΩLoggerLevel = ['none', 'alert', 'error', 'warning', 'log', 'info', 'debug', 'PC!C"C#C$C%C&C\'B'];
const __ΩLogData = ['P&"LM'];
const __ΩLoggerLevel = ['none', 'alert', 'error', 'warning', 'log', 'info', 'debug', 'PC!C"C#C$C%C&C\'B'];
let LoggerLevel;

@@ -556,3 +556,3 @@ (function (LoggerLevel) {

})(LoggerLevel || (LoggerLevel = {}));
var __ΩLoggerInterface = [() => __ΩLoggerLevel, 'level', 'name', 0, 'scoped', () => __ΩLogData, 'data', 0, () => __ΩLoggerLevel, 'is', 'message', 'alert', 'error', 'warning', 'log', 'info', 'debug', 'Pn!4"P&2#n$1%Pn&2\'n(1\'Pn)2")1*P"@2+$1,P"@2+$1-P"@2+$1.P"@2+$1/P"@2+$10P"@2+$11M'];
const __ΩLoggerInterface = [() => __ΩLoggerLevel, 'level', 'name', 0, 'scoped', () => __ΩLogData, 'data', 0, () => __ΩLoggerLevel, 'is', 'message', 'alert', 'error', 'warning', 'log', 'info', 'debug', 'Pn!4"P&2#n$1%Pn&2\'n(1\'Pn)2")1*P"@2+$1,P"@2+$1-P"@2+$1.P"@2+$1/P"@2+$10P"@2+$11M'];
class MyServer {

@@ -559,0 +559,0 @@ constructor(logger) {

@@ -101,3 +101,3 @@ "use strict";

ServiceC.__type = ['collect', 'P"0!5'];
var __ΩCollector = ['collect', 'PP$1!M'];
const __ΩCollector = ['collect', 'PP$1!M'];
class CollectorTag extends provider_1.Tag {

@@ -538,3 +538,3 @@ }

Service.__type = ['list', function () { return []; }, 'item', 'add', '"F3!>"P"2#"0$5'];
var __ΩServiceInterface = ['item', 'add', 'PP"2!"1"M'];
const __ΩServiceInterface = ['item', 'add', 'PP"2!"1"M'];
const root = new module_1.InjectorModule([Service]);

@@ -557,3 +557,3 @@ root.setupProvider(undefined, [() => __ΩServiceInterface, 'n!']).add('a');

Service.__type = ['list', function () { return []; }, 'item', 'add', '"F3!>"P"2#"0$5'];
var __ΩServiceInterface = ['list', 'item', 'add', 'P"F4!P"2""1#M'];
const __ΩServiceInterface = ['list', 'item', 'add', 'P"F4!P"2""1#M'];
const root = new module_1.InjectorModule([(0, provider_1.provide)(Service, [() => __ΩServiceInterface, 'n!'])]);

@@ -720,3 +720,3 @@ root.setupProvider(undefined, [() => __ΩServiceInterface, 'n!']).add('a');

var _a;
var __ΩService = ['add', 'PP$1!M'];
const __ΩService = ['add', 'PP$1!M'];
const serviceToken = new injector_1.InjectorToken('service');

@@ -933,3 +933,3 @@ const root = new module_1.InjectorModule([{

(0, globals_1.test)('injector.get by type', () => {
var __ΩLoggerInterface = ['log', 'PP)1!M'];
const __ΩLoggerInterface = ['log', 'PP)1!M'];
class Logger {

@@ -955,3 +955,3 @@ log() {

(0, globals_1.test)('exported token from interface', () => {
var __ΩLoggerInterface = ['log', 'PP)1!M'];
const __ΩLoggerInterface = ['log', 'PP)1!M'];
class Logger {

@@ -958,0 +958,0 @@ log() {

@@ -113,3 +113,3 @@ import { __ΩReceiveType as __ΩReceiveType } from '@deepkit/type';

throwCircularDependency.__type = ['throwCircularDependency', 'P"/!'];
var __ΩSetupProviderCalls = ["call", 'type', 'methodName', 'args', 'order', "property", 'property', 'value', "stop", 'PP.!4"P&+\'J4#"F4$\'4%MP.&4"P&+\'J4\'"4(\'4%MP.)4"\'4%MJ'];
const __ΩSetupProviderCalls = ["call", 'type', 'methodName', 'args', 'order', "property", 'property', 'value', "stop", 'PP.!4"P&+\'J4#"F4$\'4%MP.&4"P&+\'J4\'"4(\'4%MP.)4"\'4%MJ'];
export { __ΩSetupProviderCalls as __ΩSetupProviderCalls };

@@ -158,4 +158,4 @@ function matchType(left, right) {

SetupProviderRegistry.__type = ['type', () => __ΩSetupProviderCalls, 'call', 'calls', function () { return []; }, () => __ΩSetupProviderCalls, 'add', () => SetupProviderRegistry, 'registry', 'mergeInto', 'token', () => __ΩSetupProviderCalls, 'get', 'P"4!n"4#MF3$>%P"2!n&2#"0\'PP7(2)$0*P"2+n,F0-5'];
var __ΩScope = ['name', 'instances', 'P&4!P&"LM4"M'];
var __ΩResolveToken = ['T', () => __ΩAbstractClassType, () => InjectorToken, 'lXe"!Re&!Re$!RPe#!Ph&!7#qk\'+QRPde%!p/RPde#!h!!o""qk#?QRb!Pde"!pG'];
const __ΩScope = ['name', 'instances', 'P&4!P&"LM4"M'];
const __ΩResolveToken = ['T', () => __ΩAbstractClassType, () => InjectorToken, 'lXe"!Re&!Re$!RPe#!Ph&!7#qk\'+QRPde%!p/RPde#!h!!o""qk#?QRb!Pde"!pG'];
export { __ΩResolveToken as __ΩResolveToken };

@@ -170,3 +170,3 @@ export function resolveToken(provider) {

resolveToken.__type = ['provider', 'resolveToken', 'P"2!"/"'];
var __ΩInjectorInterface = ['token', () => __ΩScope, 'scope', () => __ΩResolveToken, 'get', 'PP"2!n"2#8"o$"1%M'];
const __ΩInjectorInterface = ['token', () => __ΩScope, 'scope', () => __ΩResolveToken, 'get', 'PP"2!n"2#8"o$"1%M'];
export { __ΩInjectorInterface as __ΩInjectorInterface };

@@ -730,3 +730,3 @@ /**

BuildContext.__type = ['ids', function () { return 0; }, 'id', function () { return BuildContext.ids++; }, () => TagRegistry, 'tagRegistry', function () { return new TagRegistry; }, () => BuildProviderIndex, 'providerIndex', function () { return new BuildProviderIndex; }, () => SetupProviderRegistry, 'globalSetupProviderRegistry', function () { return new SetupProviderRegistry; }, '\'3!>"\'3#>$P7%3&>\'P7(3)>*P7+3,>-5'];
var __ΩResolver = ['T', 'b!P!M'];
const __ΩResolver = ['T', 'b!P!M'];
export { __ΩResolver as __ΩResolver };

@@ -733,0 +733,0 @@ /**

@@ -6,3 +6,3 @@ import { __ΩClassType as __ΩClassType } from '@deepkit/core';

import { hasTypeInformation, isExtendable, isType, reflect, resolveReceiveType } from '@deepkit/type';
var __ΩConfigureProvider = ['T', 'args', '', 0, 'lTPe#!@2"e&!o$"/#Re%!e$!fRPde$!e#!fPh"!@2""/#qk#3QRb!Pde"!gN;!'];
const __ΩConfigureProvider = ['T', 'args', '', 0, 'lTPe#!@2"e&!o$"/#Re%!e$!fRPde$!e#!fPh"!@2""/#qk#3QRb!Pde"!gN;!'];
export { __ΩConfigureProvider as __ΩConfigureProvider };

@@ -30,3 +30,3 @@ /**

let moduleIds = 0;
var __ΩPreparedProvider = ['token', () => InjectorModule, 'modules', 'providers', () => InjectorModule, 'resolveFrom', 'P"4!P7"F4#"F4$P7%4&8M'];
const __ΩPreparedProvider = ['token', () => InjectorModule, 'modules', 'providers', () => InjectorModule, 'resolveFrom', 'P"4!P7"F4#"F4$P7%4&8M'];
export { __ΩPreparedProvider as __ΩPreparedProvider };

@@ -97,3 +97,3 @@ function lookupPreparedProviders(preparedProviders, token) {

findModuleForConfig.__type = [() => __ΩClassType, 'config', () => InjectorModule, 'modules', () => InjectorModule, 'findModuleForConfig', 'Pn!2"P7#F2$PP7%-J/&'];
var __ΩExportType = [() => InjectorModule, 'P"P7!J'];
const __ΩExportType = [() => InjectorModule, 'P"P7!J'];
export { __ΩExportType as __ΩExportType };

@@ -100,0 +100,0 @@ export function isProvided(providers, token) {

import { __ΩClassType as __ΩClassType } from '@deepkit/core';
import { __ΩReceiveType as __ΩReceiveType } from '@deepkit/type';
var __ΩPick = ['T', 'K', 'l+e#!e"!fRb!b"Pde""N#!'];
var __ΩExclude = ['T', 'U', 'l6!Re$!RPe#!e$"qk#%QRb!b"Pde"!p)'];
var __ΩOmit = ['T', 'K', () => __ΩPick, () => __ΩExclude, 'b!b"e!!e!!ge!"o$#o##'];
const __ΩPick = ['T', 'K', 'l+e#!e"!fRb!b"Pde""N#!'];
const __ΩExclude = ['T', 'U', 'l6!Re$!RPe#!e$"qk#%QRb!b"Pde"!p)'];
const __ΩOmit = ['T', 'K', () => __ΩPick, () => __ΩExclude, 'b!b"e!!e!!ge!"o$#o##'];
/*

@@ -17,3 +17,3 @@ * Deepkit Framework

import { resolveReceiveType } from '@deepkit/type';
var __ΩProviderBase = [true, 'transient', 'P.!4"8M'];
const __ΩProviderBase = [true, 'transient', 'P.!4"8M'];
export { __ΩProviderBase as __ΩProviderBase };

@@ -26,9 +26,9 @@ export function provide(provider, type) {

provide.__type = [() => __ΩOmit, "provide", () => __ΩClassType, 'provider', () => __ΩReceiveType, 'type', 'provide', 'PP"."o!#n#J2$"o%"2&8"/\''];
var __ΩValueProvider = ['T', () => __ΩProviderBase, 'provide', 'useValue', 'b!Pn""4#e"!4$M'];
const __ΩValueProvider = ['T', () => __ΩProviderBase, 'provide', 'useValue', 'b!Pn""4#e"!4$M'];
export { __ΩValueProvider as __ΩValueProvider };
var __ΩClassProvider = ['T', () => __ΩProviderBase, 'provide', () => __ΩClassType, 'useClass', 'b!Pn""4#e"!o$"4%8M'];
const __ΩClassProvider = ['T', () => __ΩProviderBase, 'provide', () => __ΩClassType, 'useClass', 'b!Pn""4#e"!o$"4%8M'];
export { __ΩClassProvider as __ΩClassProvider };
var __ΩExistingProvider = ['T', () => __ΩProviderBase, 'provide', () => __ΩClassType, 'useExisting', 'b!Pn""4#e"!o$"4%M'];
const __ΩExistingProvider = ['T', () => __ΩProviderBase, 'provide', () => __ΩClassType, 'useExisting', 'b!Pn""4#e"!o$"4%M'];
export { __ΩExistingProvider as __ΩExistingProvider };
var __ΩFactoryProvider = ['T', () => __ΩProviderBase, 'provide', 'args', '', 'useFactory', 'deps', 'b!Pn""4#P"@2$e#!/%4&"F4\'8M'];
const __ΩFactoryProvider = ['T', () => __ΩProviderBase, 'provide', 'args', '', 'useFactory', 'deps', 'b!Pn""4#P"@2$e#!/%4&"F4\'8M'];
export { __ΩFactoryProvider as __ΩFactoryProvider };

@@ -35,0 +35,0 @@ /** @reflection never */

@@ -1,5 +0,5 @@

var __ΩInjectMeta = ['T', "inject", '__meta', '!c!PP!P."e$!GK4#8M'];
const __ΩInjectMeta = ['T', "inject", '__meta', '!c!PP!P."e$!GK4#8M'];
export { __ΩInjectMeta as __ΩInjectMeta };
var __ΩInject = ['Type', 'Token', () => __ΩInjectMeta, 'b!!c"Pe"!e""o#"K'];
const __ΩInject = ['Type', 'Token', () => __ΩInjectMeta, 'b!!c"Pe"!e""o#"K'];
export { __ΩInject as __ΩInject };
//# sourceMappingURL=types.js.map
import { __ΩInject as __ΩInject } from '../src/types';
var __ΩPick = ['T', 'K', 'l+e#!e"!fRb!b"Pde""N#!'];
const __ΩPick = ['T', 'K', 'l+e#!e"!fRb!b"Pde""N#!'];
import { expect, test } from '@jest/globals';

@@ -101,3 +101,3 @@ import { CircularDependencyError, Injector, InjectorToken } from '../src/injector';

test('interface dependency direct match', () => {
var __ΩConnection = ['id', 'data', 'write', 'P\'4!PY2"$1#M'];
const __ΩConnection = ['id', 'data', 'write', 'P\'4!PY2"$1#M'];
class MyConnection {

@@ -124,3 +124,3 @@ constructor() {

test('interface dependency over specified', () => {
var __ΩConnection = ['id', 'data', 'write', 'P\'4!PY2"$1#M'];
const __ΩConnection = ['id', 'data', 'write', 'P\'4!PY2"$1#M'];
class MyConnection {

@@ -149,3 +149,3 @@ constructor() {

test('interface dependency multiple matches', () => {
var __ΩConnection = ['data', 'write', 'PPY2!$1"M'];
const __ΩConnection = ['data', 'write', 'PPY2!$1"M'];
class MyConnection1 {

@@ -183,3 +183,3 @@ write(data) {

test('interface dependency under specified', () => {
var __ΩConnection = ['id', 'data', 'write', 'P\'4!PY2"$1#M'];
const __ΩConnection = ['id', 'data', 'write', 'P\'4!PY2"$1#M'];
class MyConnection {

@@ -313,3 +313,3 @@ constructor() {

test('injector Inject<, T>', () => {
var __ΩConnectionInterface = ['PM'];
const __ΩConnectionInterface = ['PM'];
class Connection {

@@ -331,3 +331,3 @@ }

test('injector via Inject string', () => {
var __ΩConnectionInterface = ['PM'];
const __ΩConnectionInterface = ['PM'];
class Connection {

@@ -349,3 +349,3 @@ }

test('injector token', () => {
var __ΩConnectionInterface = ['doIt', 'PP&1!M'];
const __ΩConnectionInterface = ['doIt', 'PP&1!M'];
const Connection = new InjectorToken('connection');

@@ -540,4 +540,4 @@ {

test('loggerInterface', () => {
var __ΩLogData = ['P&"LM'];
var __ΩLoggerLevel = ['none', 'alert', 'error', 'warning', 'log', 'info', 'debug', 'PC!C"C#C$C%C&C\'B'];
const __ΩLogData = ['P&"LM'];
const __ΩLoggerLevel = ['none', 'alert', 'error', 'warning', 'log', 'info', 'debug', 'PC!C"C#C$C%C&C\'B'];
let LoggerLevel;

@@ -553,3 +553,3 @@ (function (LoggerLevel) {

})(LoggerLevel || (LoggerLevel = {}));
var __ΩLoggerInterface = [() => __ΩLoggerLevel, 'level', 'name', 0, 'scoped', () => __ΩLogData, 'data', 0, () => __ΩLoggerLevel, 'is', 'message', 'alert', 'error', 'warning', 'log', 'info', 'debug', 'Pn!4"P&2#n$1%Pn&2\'n(1\'Pn)2")1*P"@2+$1,P"@2+$1-P"@2+$1.P"@2+$1/P"@2+$10P"@2+$11M'];
const __ΩLoggerInterface = [() => __ΩLoggerLevel, 'level', 'name', 0, 'scoped', () => __ΩLogData, 'data', 0, () => __ΩLoggerLevel, 'is', 'message', 'alert', 'error', 'warning', 'log', 'info', 'debug', 'Pn!4"P&2#n$1%Pn&2\'n(1\'Pn)2")1*P"@2+$1,P"@2+$1-P"@2+$1.P"@2+$1/P"@2+$10P"@2+$11M'];
class MyServer {

@@ -556,0 +556,0 @@ constructor(logger) {

@@ -99,3 +99,3 @@ import { expect, test } from '@jest/globals';

ServiceC.__type = ['collect', 'P"0!5'];
var __ΩCollector = ['collect', 'PP$1!M'];
const __ΩCollector = ['collect', 'PP$1!M'];
class CollectorTag extends Tag {

@@ -536,3 +536,3 @@ }

Service.__type = ['list', function () { return []; }, 'item', 'add', '"F3!>"P"2#"0$5'];
var __ΩServiceInterface = ['item', 'add', 'PP"2!"1"M'];
const __ΩServiceInterface = ['item', 'add', 'PP"2!"1"M'];
const root = new InjectorModule([Service]);

@@ -555,3 +555,3 @@ root.setupProvider(undefined, [() => __ΩServiceInterface, 'n!']).add('a');

Service.__type = ['list', function () { return []; }, 'item', 'add', '"F3!>"P"2#"0$5'];
var __ΩServiceInterface = ['list', 'item', 'add', 'P"F4!P"2""1#M'];
const __ΩServiceInterface = ['list', 'item', 'add', 'P"F4!P"2""1#M'];
const root = new InjectorModule([provide(Service, [() => __ΩServiceInterface, 'n!'])]);

@@ -718,3 +718,3 @@ root.setupProvider(undefined, [() => __ΩServiceInterface, 'n!']).add('a');

var _a;
var __ΩService = ['add', 'PP$1!M'];
const __ΩService = ['add', 'PP$1!M'];
const serviceToken = new InjectorToken('service');

@@ -931,3 +931,3 @@ const root = new InjectorModule([{

test('injector.get by type', () => {
var __ΩLoggerInterface = ['log', 'PP)1!M'];
const __ΩLoggerInterface = ['log', 'PP)1!M'];
class Logger {

@@ -953,3 +953,3 @@ log() {

test('exported token from interface', () => {
var __ΩLoggerInterface = ['log', 'PP)1!M'];
const __ΩLoggerInterface = ['log', 'PP)1!M'];
class Logger {

@@ -956,0 +956,0 @@ log() {

{
"name": "@deepkit/injector",
"version": "1.0.1-alpha.63",
"version": "1.0.1-alpha.65",
"description": "Deepkit Dependency Injection",

@@ -29,4 +29,4 @@ "type": "commonjs",

"devDependencies": {
"@deepkit/core": "^1.0.1-alpha.63",
"@deepkit/type": "^1.0.1-alpha.63",
"@deepkit/core": "^1.0.1-alpha.65",
"@deepkit/type": "^1.0.1-alpha.65",
"benchmark": "^2.1.4"

@@ -43,3 +43,3 @@ },

},
"gitHead": "c39860f0ef10fe98cc509dd2c795cc8e1cb30e3a"
"gitHead": "dde15533a9c43e6d46d84469f1b753a9d13212b2"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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