@tsed/di 8.0.0-alpha.5 → 8.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/types/node/utils/asyncHookContext.d.ts +1 -1
- package/package.json +10 -11
- package/lib/cjs/common/constants/constants.js +0 -9
- package/lib/cjs/common/constants/constants.js.map +0 -1
- package/lib/cjs/common/decorators/autoInjectable.js +0 -38
- package/lib/cjs/common/decorators/autoInjectable.js.map +0 -1
- package/lib/cjs/common/decorators/configuration.js +0 -24
- package/lib/cjs/common/decorators/configuration.js.map +0 -1
- package/lib/cjs/common/decorators/constant.js +0 -74
- package/lib/cjs/common/decorators/constant.js.map +0 -1
- package/lib/cjs/common/decorators/controller.js +0 -53
- package/lib/cjs/common/decorators/controller.js.map +0 -1
- package/lib/cjs/common/decorators/inject.js +0 -84
- package/lib/cjs/common/decorators/inject.js.map +0 -1
- package/lib/cjs/common/decorators/injectable.js +0 -32
- package/lib/cjs/common/decorators/injectable.js.map +0 -1
- package/lib/cjs/common/decorators/intercept.js +0 -65
- package/lib/cjs/common/decorators/intercept.js.map +0 -1
- package/lib/cjs/common/decorators/interceptor.js +0 -21
- package/lib/cjs/common/decorators/interceptor.js.map +0 -1
- package/lib/cjs/common/decorators/lazyInject.js +0 -71
- package/lib/cjs/common/decorators/lazyInject.js.map +0 -1
- package/lib/cjs/common/decorators/module.js +0 -32
- package/lib/cjs/common/decorators/module.js.map +0 -1
- package/lib/cjs/common/decorators/opts.js +0 -54
- package/lib/cjs/common/decorators/opts.js.map +0 -1
- package/lib/cjs/common/decorators/overrideProvider.js +0 -17
- package/lib/cjs/common/decorators/overrideProvider.js.map +0 -1
- package/lib/cjs/common/decorators/scope.js +0 -16
- package/lib/cjs/common/decorators/scope.js.map +0 -1
- package/lib/cjs/common/decorators/service.js +0 -18
- package/lib/cjs/common/decorators/service.js.map +0 -1
- package/lib/cjs/common/decorators/useOpts.js +0 -61
- package/lib/cjs/common/decorators/useOpts.js.map +0 -1
- package/lib/cjs/common/decorators/value.js +0 -62
- package/lib/cjs/common/decorators/value.js.map +0 -1
- package/lib/cjs/common/domain/Container.js +0 -72
- package/lib/cjs/common/domain/Container.js.map +0 -1
- package/lib/cjs/common/domain/ControllerProvider.js +0 -36
- package/lib/cjs/common/domain/ControllerProvider.js.map +0 -1
- package/lib/cjs/common/domain/InjectablePropertyType.js +0 -12
- package/lib/cjs/common/domain/InjectablePropertyType.js.map +0 -1
- package/lib/cjs/common/domain/LocalsContainer.js +0 -15
- package/lib/cjs/common/domain/LocalsContainer.js.map +0 -1
- package/lib/cjs/common/domain/Provider.js +0 -134
- package/lib/cjs/common/domain/Provider.js.map +0 -1
- package/lib/cjs/common/domain/ProviderScope.js +0 -10
- package/lib/cjs/common/domain/ProviderScope.js.map +0 -1
- package/lib/cjs/common/domain/ProviderType.js +0 -15
- package/lib/cjs/common/domain/ProviderType.js.map +0 -1
- package/lib/cjs/common/errors/InjectionError.js +0 -58
- package/lib/cjs/common/errors/InjectionError.js.map +0 -1
- package/lib/cjs/common/errors/InvalidPropertyTokenError.js +0 -12
- package/lib/cjs/common/errors/InvalidPropertyTokenError.js.map +0 -1
- package/lib/cjs/common/index.js +0 -58
- package/lib/cjs/common/index.js.map +0 -1
- package/lib/cjs/common/interfaces/DIConfigurationOptions.js +0 -3
- package/lib/cjs/common/interfaces/DIConfigurationOptions.js.map +0 -1
- package/lib/cjs/common/interfaces/DILogger.js +0 -3
- package/lib/cjs/common/interfaces/DILogger.js.map +0 -1
- package/lib/cjs/common/interfaces/DILoggerOptions.js +0 -3
- package/lib/cjs/common/interfaces/DILoggerOptions.js.map +0 -1
- package/lib/cjs/common/interfaces/DIResolver.js +0 -3
- package/lib/cjs/common/interfaces/DIResolver.js.map +0 -1
- package/lib/cjs/common/interfaces/ImportTokenProviderOpts.js +0 -3
- package/lib/cjs/common/interfaces/ImportTokenProviderOpts.js.map +0 -1
- package/lib/cjs/common/interfaces/InterceptorContext.js +0 -3
- package/lib/cjs/common/interfaces/InterceptorContext.js.map +0 -1
- package/lib/cjs/common/interfaces/InterceptorMethods.js +0 -3
- package/lib/cjs/common/interfaces/InterceptorMethods.js.map +0 -1
- package/lib/cjs/common/interfaces/InvokeOptions.js +0 -3
- package/lib/cjs/common/interfaces/InvokeOptions.js.map +0 -1
- package/lib/cjs/common/interfaces/OnDestroy.js +0 -3
- package/lib/cjs/common/interfaces/OnDestroy.js.map +0 -1
- package/lib/cjs/common/interfaces/OnInit.js +0 -3
- package/lib/cjs/common/interfaces/OnInit.js.map +0 -1
- package/lib/cjs/common/interfaces/ProviderOpts.js +0 -3
- package/lib/cjs/common/interfaces/ProviderOpts.js.map +0 -1
- package/lib/cjs/common/interfaces/RegistrySettings.js +0 -3
- package/lib/cjs/common/interfaces/RegistrySettings.js.map +0 -1
- package/lib/cjs/common/interfaces/ResolvedInvokeOptions.js +0 -3
- package/lib/cjs/common/interfaces/ResolvedInvokeOptions.js.map +0 -1
- package/lib/cjs/common/interfaces/TokenProvider.js +0 -3
- package/lib/cjs/common/interfaces/TokenProvider.js.map +0 -1
- package/lib/cjs/common/interfaces/TokenRoute.js +0 -3
- package/lib/cjs/common/interfaces/TokenRoute.js.map +0 -1
- package/lib/cjs/common/registries/GlobalProviders.js +0 -121
- package/lib/cjs/common/registries/GlobalProviders.js.map +0 -1
- package/lib/cjs/common/registries/ProviderRegistry.js +0 -86
- package/lib/cjs/common/registries/ProviderRegistry.js.map +0 -1
- package/lib/cjs/common/services/DIConfiguration.js +0 -142
- package/lib/cjs/common/services/DIConfiguration.js.map +0 -1
- package/lib/cjs/common/services/DILogger.js +0 -14
- package/lib/cjs/common/services/DILogger.js.map +0 -1
- package/lib/cjs/common/services/InjectorService.js +0 -536
- package/lib/cjs/common/services/InjectorService.js.map +0 -1
- package/lib/cjs/common/utils/colors.js +0 -10
- package/lib/cjs/common/utils/colors.js.map +0 -1
- package/lib/cjs/common/utils/createContainer.js +0 -14
- package/lib/cjs/common/utils/createContainer.js.map +0 -1
- package/lib/cjs/common/utils/getConfiguration.js +0 -23
- package/lib/cjs/common/utils/getConfiguration.js.map +0 -1
- package/lib/cjs/common/utils/getConstructorDependencies.js +0 -13
- package/lib/cjs/common/utils/getConstructorDependencies.js.map +0 -1
- package/lib/cjs/common/utils/resolveControllers.js +0 -47
- package/lib/cjs/common/utils/resolveControllers.js.map +0 -1
- package/lib/cjs/index.js +0 -6
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/node/decorators/injectContext.js +0 -39
- package/lib/cjs/node/decorators/injectContext.js.map +0 -1
- package/lib/cjs/node/domain/ContextLogger.js +0 -99
- package/lib/cjs/node/domain/ContextLogger.js.map +0 -1
- package/lib/cjs/node/domain/DIContext.js +0 -102
- package/lib/cjs/node/domain/DIContext.js.map +0 -1
- package/lib/cjs/node/index.js +0 -18
- package/lib/cjs/node/index.js.map +0 -1
- package/lib/cjs/node/interfaces/AlterRunInContext.js +0 -3
- package/lib/cjs/node/interfaces/AlterRunInContext.js.map +0 -1
- package/lib/cjs/node/services/DILogger.js +0 -12
- package/lib/cjs/node/services/DILogger.js.map +0 -1
- package/lib/cjs/node/services/DITest.js +0 -126
- package/lib/cjs/node/services/DITest.js.map +0 -1
- package/lib/cjs/node/utils/asyncHookContext.js +0 -43
- package/lib/cjs/node/utils/asyncHookContext.js.map +0 -1
- package/lib/cjs/node/utils/attachLogger.js +0 -10
- package/lib/cjs/node/utils/attachLogger.js.map +0 -1
- package/lib/cjs/node/utils/setLoggerConfiguration.js +0 -11
- package/lib/cjs/node/utils/setLoggerConfiguration.js.map +0 -1
- package/lib/cjs/node/utils/setLoggerFormat.js +0 -33
- package/lib/cjs/node/utils/setLoggerFormat.js.map +0 -1
- package/lib/cjs/node/utils/setLoggerLevel.js +0 -15
- package/lib/cjs/node/utils/setLoggerLevel.js.map +0 -1
- package/lib/cjs/package.json +0 -3
- package/lib/esm/package.json +0 -3
- package/lib/types-esm/common/constants/constants.d.ts +0 -5
- package/lib/types-esm/common/decorators/autoInjectable.d.ts +0 -1
- package/lib/types-esm/common/decorators/configuration.d.ts +0 -8
- package/lib/types-esm/common/decorators/constant.d.ts +0 -39
- package/lib/types-esm/common/decorators/controller.d.ts +0 -42
- package/lib/types-esm/common/decorators/inject.d.ts +0 -35
- package/lib/types-esm/common/decorators/injectable.d.ts +0 -20
- package/lib/types-esm/common/decorators/intercept.d.ts +0 -13
- package/lib/types-esm/common/decorators/interceptor.d.ts +0 -10
- package/lib/types-esm/common/decorators/lazyInject.d.ts +0 -43
- package/lib/types-esm/common/decorators/module.d.ts +0 -37
- package/lib/types-esm/common/decorators/opts.d.ts +0 -41
- package/lib/types-esm/common/decorators/overrideProvider.d.ts +0 -8
- package/lib/types-esm/common/decorators/scope.d.ts +0 -8
- package/lib/types-esm/common/decorators/service.d.ts +0 -10
- package/lib/types-esm/common/decorators/useOpts.d.ts +0 -42
- package/lib/types-esm/common/decorators/value.d.ts +0 -37
- package/lib/types-esm/common/domain/Container.d.ts +0 -43
- package/lib/types-esm/common/domain/ControllerProvider.d.ts +0 -17
- package/lib/types-esm/common/domain/InjectablePropertyType.d.ts +0 -7
- package/lib/types-esm/common/domain/LocalsContainer.d.ts +0 -6
- package/lib/types-esm/common/domain/Provider.d.ts +0 -71
- package/lib/types-esm/common/domain/ProviderScope.d.ts +0 -5
- package/lib/types-esm/common/domain/ProviderType.d.ts +0 -10
- package/lib/types-esm/common/errors/InjectionError.d.ts +0 -8
- package/lib/types-esm/common/errors/InvalidPropertyTokenError.d.ts +0 -4
- package/lib/types-esm/common/index.d.ts +0 -54
- package/lib/types-esm/common/interfaces/DIConfigurationOptions.d.ts +0 -29
- package/lib/types-esm/common/interfaces/DILogger.d.ts +0 -8
- package/lib/types-esm/common/interfaces/DILoggerOptions.d.ts +0 -53
- package/lib/types-esm/common/interfaces/DIResolver.d.ts +0 -5
- package/lib/types-esm/common/interfaces/ImportTokenProviderOpts.d.ts +0 -19
- package/lib/types-esm/common/interfaces/InterceptorContext.d.ts +0 -11
- package/lib/types-esm/common/interfaces/InterceptorMethods.d.ts +0 -4
- package/lib/types-esm/common/interfaces/InvokeOptions.d.ts +0 -30
- package/lib/types-esm/common/interfaces/OnDestroy.d.ts +0 -3
- package/lib/types-esm/common/interfaces/OnInit.d.ts +0 -3
- package/lib/types-esm/common/interfaces/ProviderOpts.d.ts +0 -59
- package/lib/types-esm/common/interfaces/RegistrySettings.d.ts +0 -21
- package/lib/types-esm/common/interfaces/ResolvedInvokeOptions.d.ts +0 -12
- package/lib/types-esm/common/interfaces/TokenProvider.d.ts +0 -2
- package/lib/types-esm/common/interfaces/TokenRoute.d.ts +0 -5
- package/lib/types-esm/common/registries/GlobalProviders.d.ts +0 -58
- package/lib/types-esm/common/registries/ProviderRegistry.d.ts +0 -58
- package/lib/types-esm/common/services/DIConfiguration.d.ts +0 -57
- package/lib/types-esm/common/services/DILogger.d.ts +0 -3
- package/lib/types-esm/common/services/InjectorService.d.ts +0 -203
- package/lib/types-esm/common/utils/colors.d.ts +0 -5
- package/lib/types-esm/common/utils/createContainer.d.ts +0 -3
- package/lib/types-esm/common/utils/getConfiguration.d.ts +0 -3
- package/lib/types-esm/common/utils/getConstructorDependencies.d.ts +0 -2
- package/lib/types-esm/common/utils/resolveControllers.d.ts +0 -12
- package/lib/types-esm/index.d.ts +0 -2
- package/lib/types-esm/node/decorators/injectContext.d.ts +0 -16
- package/lib/types-esm/node/domain/ContextLogger.d.ts +0 -37
- package/lib/types-esm/node/domain/DIContext.d.ts +0 -61
- package/lib/types-esm/node/index.d.ts +0 -14
- package/lib/types-esm/node/interfaces/AlterRunInContext.d.ts +0 -3
- package/lib/types-esm/node/services/DILogger.d.ts +0 -1
- package/lib/types-esm/node/services/DITest.d.ts +0 -37
- package/lib/types-esm/node/utils/asyncHookContext.d.ts +0 -15
- package/lib/types-esm/node/utils/attachLogger.d.ts +0 -2
- package/lib/types-esm/node/utils/setLoggerConfiguration.d.ts +0 -2
- package/lib/types-esm/node/utils/setLoggerFormat.d.ts +0 -6
- package/lib/types-esm/node/utils/setLoggerLevel.d.ts +0 -6
- /package/{webpack.config.js → webpack.config.cjs} +0 -0
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Opts = void 0;
|
|
4
|
-
const core_1 = require("@tsed/core");
|
|
5
|
-
const constants_js_1 = require("../constants/constants.js");
|
|
6
|
-
const ProviderScope_js_1 = require("../domain/ProviderScope.js");
|
|
7
|
-
const inject_js_1 = require("./inject.js");
|
|
8
|
-
const scope_js_1 = require("./scope.js");
|
|
9
|
-
/**
|
|
10
|
-
* Get instance options. This options depending on his invocation context.
|
|
11
|
-
*
|
|
12
|
-
* ```typescript
|
|
13
|
-
* import {Injectable, Opts, UseOpts} from "@tsed/di";
|
|
14
|
-
*
|
|
15
|
-
* @Injectable()
|
|
16
|
-
* class MyConfigurableService {
|
|
17
|
-
* source: string;
|
|
18
|
-
* constructor(@Opts options: any = {}) {
|
|
19
|
-
* console.log("Hello ", options.source); // log: Hello Service1 then Hello Service2
|
|
20
|
-
*
|
|
21
|
-
* this.source = options.source;
|
|
22
|
-
* }
|
|
23
|
-
* }
|
|
24
|
-
*
|
|
25
|
-
* @Injectable()
|
|
26
|
-
* class MyService1 {
|
|
27
|
-
* constructor(@UseOpts({source: 'Service1'}) service: MyConfigurableService) {
|
|
28
|
-
* console.log(service.source) // log: Service1
|
|
29
|
-
* }
|
|
30
|
-
* }
|
|
31
|
-
*
|
|
32
|
-
* @Injectable()
|
|
33
|
-
* class MyService2 {
|
|
34
|
-
* constructor(@UseOpts({source: 'Service2'}) service: MyConfigurableService) {
|
|
35
|
-
* console.log(service.source) // log: Service2
|
|
36
|
-
* }
|
|
37
|
-
* }
|
|
38
|
-
* ```
|
|
39
|
-
*
|
|
40
|
-
* ::: warning
|
|
41
|
-
* Using @@Opts@@ decorator on a constructor parameter change the Scope of the provider to `ProviderScope.INSTANCE`.
|
|
42
|
-
* :::
|
|
43
|
-
*
|
|
44
|
-
* @param target
|
|
45
|
-
* @param propertyKey
|
|
46
|
-
* @param index
|
|
47
|
-
* @decorator
|
|
48
|
-
*/
|
|
49
|
-
function Opts(target, propertyKey, index) {
|
|
50
|
-
(0, scope_js_1.Scope)(ProviderScope_js_1.ProviderScope.INSTANCE)((0, core_1.classOf)(target));
|
|
51
|
-
(0, inject_js_1.Inject)(constants_js_1.DI_USE_PARAM_OPTIONS)(target, propertyKey, index);
|
|
52
|
-
}
|
|
53
|
-
exports.Opts = Opts;
|
|
54
|
-
//# sourceMappingURL=opts.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"opts.js","sourceRoot":"","sources":["../../../../src/common/decorators/opts.ts"],"names":[],"mappings":";;;AAAA,qCAAmC;AACnC,4DAA+D;AAC/D,iEAAyD;AACzD,2CAAmC;AACnC,yCAAiC;AAEjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,SAAgB,IAAI,CAAC,MAAW,EAAE,WAAwC,EAAE,KAAa;IACvF,IAAA,gBAAK,EAAC,gCAAa,CAAC,QAAQ,CAAC,CAAC,IAAA,cAAO,EAAC,MAAM,CAAC,CAAC,CAAC;IAC/C,IAAA,kBAAM,EAAC,mCAAoB,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;AAC3D,CAAC;AAHD,oBAGC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OverrideProvider = void 0;
|
|
4
|
-
const GlobalProviders_js_1 = require("../registries/GlobalProviders.js");
|
|
5
|
-
/**
|
|
6
|
-
* Override a provider which is already registered in ProviderRegistry.
|
|
7
|
-
* @returns {Function}
|
|
8
|
-
* @decorators
|
|
9
|
-
* @param originalProvider
|
|
10
|
-
*/
|
|
11
|
-
function OverrideProvider(originalProvider) {
|
|
12
|
-
return (target) => {
|
|
13
|
-
GlobalProviders_js_1.GlobalProviders.get(originalProvider).useClass = target;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
exports.OverrideProvider = OverrideProvider;
|
|
17
|
-
//# sourceMappingURL=overrideProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"overrideProvider.js","sourceRoot":"","sources":["../../../../src/common/decorators/overrideProvider.ts"],"names":[],"mappings":";;;AACA,yEAAiE;AAEjE;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,gBAA2B;IAC1D,OAAO,CAAC,MAAiB,EAAQ,EAAE;QACjC,oCAAe,CAAC,GAAG,CAAC,gBAAgB,CAAE,CAAC,QAAQ,GAAG,MAAM,CAAC;IAC3D,CAAC,CAAC;AACJ,CAAC;AAJD,4CAIC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Scope = void 0;
|
|
4
|
-
const core_1 = require("@tsed/core");
|
|
5
|
-
const ProviderScope_js_1 = require("../domain/ProviderScope.js");
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
* @param {"request" | "singleton" | ProviderScope} scope
|
|
9
|
-
* @returns {Function}
|
|
10
|
-
* @constructor
|
|
11
|
-
*/
|
|
12
|
-
function Scope(scope = ProviderScope_js_1.ProviderScope.REQUEST) {
|
|
13
|
-
return (0, core_1.StoreSet)("scope", scope);
|
|
14
|
-
}
|
|
15
|
-
exports.Scope = Scope;
|
|
16
|
-
//# sourceMappingURL=scope.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scope.js","sourceRoot":"","sources":["../../../../src/common/decorators/scope.ts"],"names":[],"mappings":";;;AAAA,qCAAoC;AACpC,iEAAyD;AAEzD;;;;;GAKG;AACH,SAAgB,KAAK,CAAC,QAAiD,gCAAa,CAAC,OAAO;IAC1F,OAAO,IAAA,eAAQ,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAClC,CAAC;AAFD,sBAEC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Service = void 0;
|
|
4
|
-
const injectable_js_1 = require("./injectable.js");
|
|
5
|
-
/**
|
|
6
|
-
* The decorators `@Service()` declare a new service can be injected in other service or controller on there `constructor`.
|
|
7
|
-
* All services annotated with `@Service()` are constructed one time.
|
|
8
|
-
*
|
|
9
|
-
* > `@Service()` use the `reflect-metadata` to collect and inject service on controllers or other services.
|
|
10
|
-
*
|
|
11
|
-
* @returns {Function}
|
|
12
|
-
* @decorator
|
|
13
|
-
*/
|
|
14
|
-
function Service() {
|
|
15
|
-
return (0, injectable_js_1.Injectable)();
|
|
16
|
-
}
|
|
17
|
-
exports.Service = Service;
|
|
18
|
-
//# sourceMappingURL=service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../src/common/decorators/service.ts"],"names":[],"mappings":";;;AAAA,mDAA2C;AAE3C;;;;;;;;GAQG;AACH,SAAgB,OAAO;IACrB,OAAO,IAAA,0BAAU,GAAE,CAAC;AACtB,CAAC;AAFD,0BAEC"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UseOpts = void 0;
|
|
4
|
-
const core_1 = require("@tsed/core");
|
|
5
|
-
const constants_js_1 = require("../constants/constants.js");
|
|
6
|
-
/**
|
|
7
|
-
* Add options to invoke the Service.
|
|
8
|
-
*
|
|
9
|
-
* ```typescript
|
|
10
|
-
* import {Injectable, Opts, UseOpts} from "@tsed/di";
|
|
11
|
-
*
|
|
12
|
-
* @Injectable()
|
|
13
|
-
* class MyConfigurableService {
|
|
14
|
-
* source: string;
|
|
15
|
-
* constructor(@Opts options: any = {}) {
|
|
16
|
-
* console.log("Hello ", options.source); // log: Hello Service1 then Hello Service2
|
|
17
|
-
*
|
|
18
|
-
* this.source = options.source;
|
|
19
|
-
* }
|
|
20
|
-
* }
|
|
21
|
-
*
|
|
22
|
-
* @Injectable()
|
|
23
|
-
* class MyService1 {
|
|
24
|
-
* constructor(@UseOpts({source: 'Service1'}) service: MyConfigurableService) {
|
|
25
|
-
* console.log(service.source) // log: Service1
|
|
26
|
-
* }
|
|
27
|
-
* }
|
|
28
|
-
*
|
|
29
|
-
* @Injectable()
|
|
30
|
-
* class MyService2 {
|
|
31
|
-
* constructor(@UseOpts({source: 'Service2'}) service: MyConfigurableService) {
|
|
32
|
-
* console.log(service.source) // log: Service2
|
|
33
|
-
* }
|
|
34
|
-
* }
|
|
35
|
-
* ```
|
|
36
|
-
*
|
|
37
|
-
* ::: warning
|
|
38
|
-
* Using @@Opts@@ decorator on a constructor parameter change the Scope of the provider to `ProviderScope.INSTANCE`.
|
|
39
|
-
* :::
|
|
40
|
-
*
|
|
41
|
-
* @returns {Function}
|
|
42
|
-
* @decorator
|
|
43
|
-
* @param options
|
|
44
|
-
*/
|
|
45
|
-
function UseOpts(options) {
|
|
46
|
-
return (target, propertyKey, index) => {
|
|
47
|
-
const bindingType = (0, core_1.decoratorTypeOf)([target, propertyKey, index]);
|
|
48
|
-
switch (bindingType) {
|
|
49
|
-
case core_1.DecoratorTypes.PARAM_CTOR:
|
|
50
|
-
core_1.Store.from(target).merge(`${constants_js_1.DI_USE_PARAM_OPTIONS}:${index}`, options);
|
|
51
|
-
break;
|
|
52
|
-
case core_1.DecoratorTypes.PROP:
|
|
53
|
-
core_1.Store.from(target, propertyKey).set(constants_js_1.DI_USE_OPTIONS, options);
|
|
54
|
-
break;
|
|
55
|
-
default:
|
|
56
|
-
throw new core_1.UnsupportedDecoratorType(UseOpts, [target, propertyKey, index]);
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
exports.UseOpts = UseOpts;
|
|
61
|
-
//# sourceMappingURL=useOpts.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useOpts.js","sourceRoot":"","sources":["../../../../src/common/decorators/useOpts.ts"],"names":[],"mappings":";;;AAAA,qCAA4F;AAC5F,4DAA+E;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,SAAgB,OAAO,CAAC,OAA6B;IACnD,OAAO,CAAC,MAAc,EAAE,WAA4B,EAAE,KAAc,EAAO,EAAE;QAC3E,MAAM,WAAW,GAAG,IAAA,sBAAe,EAAC,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC;QAElE,QAAQ,WAAW,EAAE;YACnB,KAAK,qBAAc,CAAC,UAAU;gBAC5B,YAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,mCAAoB,IAAI,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;gBACtE,MAAM;YAER,KAAK,qBAAc,CAAC,IAAI;gBACtB,YAAK,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,GAAG,CAAC,6BAAc,EAAE,OAAO,CAAC,CAAC;gBAC7D,MAAM;YAER;gBACE,MAAM,IAAI,+BAAwB,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC;SAC7E;IACH,CAAC,CAAC;AACJ,CAAC;AAjBD,0BAiBC"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Value = exports.bindValue = void 0;
|
|
4
|
-
const core_1 = require("@tsed/core");
|
|
5
|
-
const InjectorService_js_1 = require("../services/InjectorService.js");
|
|
6
|
-
function bindValue(target, propertyKey, expression, defaultValue) {
|
|
7
|
-
const descriptor = {
|
|
8
|
-
get() {
|
|
9
|
-
return InjectorService_js_1.InjectorService.getInstance().settings.get(expression, defaultValue);
|
|
10
|
-
},
|
|
11
|
-
set(value) {
|
|
12
|
-
InjectorService_js_1.InjectorService.getInstance().settings.set(expression, value);
|
|
13
|
-
},
|
|
14
|
-
enumerable: true,
|
|
15
|
-
configurable: true
|
|
16
|
-
};
|
|
17
|
-
(0, core_1.catchError)(() => Reflect.deleteProperty(target, propertyKey));
|
|
18
|
-
(0, core_1.catchError)(() => Reflect.defineProperty(target, propertyKey, descriptor));
|
|
19
|
-
}
|
|
20
|
-
exports.bindValue = bindValue;
|
|
21
|
-
/**
|
|
22
|
-
* Return value from Configuration.
|
|
23
|
-
*
|
|
24
|
-
* ## Example
|
|
25
|
-
*
|
|
26
|
-
* ```typescript
|
|
27
|
-
* import {Env} from "@tsed/core";
|
|
28
|
-
* import {Constant, Value} from "@tsed/di";
|
|
29
|
-
*
|
|
30
|
-
* export class MyClass {
|
|
31
|
-
*
|
|
32
|
-
* @Constant("env")
|
|
33
|
-
* env: Env;
|
|
34
|
-
*
|
|
35
|
-
* @Value("swagger.path")
|
|
36
|
-
* swaggerPath: string;
|
|
37
|
-
*
|
|
38
|
-
* @Value("swagger.path", "defaultValue")
|
|
39
|
-
* swaggerPath: string;
|
|
40
|
-
*
|
|
41
|
-
* constructor() {
|
|
42
|
-
* console.log(this.swaggerPath) // undefined. Not available on constructor
|
|
43
|
-
* }
|
|
44
|
-
*
|
|
45
|
-
* $onInit() {
|
|
46
|
-
* console.log(this.swaggerPath) // something
|
|
47
|
-
* }
|
|
48
|
-
* }
|
|
49
|
-
* ```
|
|
50
|
-
*
|
|
51
|
-
* @param expression
|
|
52
|
-
* @param defaultValue
|
|
53
|
-
* @returns {(targetClass: any, attributeName: string) => any}
|
|
54
|
-
* @decorator
|
|
55
|
-
*/
|
|
56
|
-
function Value(expression, defaultValue) {
|
|
57
|
-
return (target, propertyKey) => {
|
|
58
|
-
return bindValue(target, propertyKey, expression, defaultValue);
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
exports.Value = Value;
|
|
62
|
-
//# sourceMappingURL=value.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"value.js","sourceRoot":"","sources":["../../../../src/common/decorators/value.ts"],"names":[],"mappings":";;;AAAA,qCAAsC;AACtC,uEAA+D;AAE/D,SAAgB,SAAS,CAAC,MAAW,EAAE,WAA4B,EAAE,UAAkB,EAAE,YAAkB;IACzG,MAAM,UAAU,GAAG;QACjB,GAAG;YACD,OAAO,oCAAe,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;QAC9E,CAAC;QACD,GAAG,CAAC,KAAc;YAChB,oCAAe,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;QAChE,CAAC;QACD,UAAU,EAAE,IAAI;QAChB,YAAY,EAAE,IAAI;KACnB,CAAC;IAEF,IAAA,iBAAU,EAAC,GAAG,EAAE,CAAC,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;IAC9D,IAAA,iBAAU,EAAC,GAAG,EAAE,CAAC,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC;AAC5E,CAAC;AAdD,8BAcC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,SAAgB,KAAK,CAAC,UAAkB,EAAE,YAAsB;IAC9D,OAAO,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE;QAC7B,OAAO,SAAS,CAAC,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;IAClE,CAAC,CAAC;AACJ,CAAC;AAJD,sBAIC"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Container = void 0;
|
|
4
|
-
const GlobalProviders_js_1 = require("../registries/GlobalProviders.js");
|
|
5
|
-
const Provider_js_1 = require("./Provider.js");
|
|
6
|
-
class Container extends Map {
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* @param token
|
|
10
|
-
* @param settings
|
|
11
|
-
*/
|
|
12
|
-
add(token, settings = {}) {
|
|
13
|
-
const provider = GlobalProviders_js_1.GlobalProviders.get(token)?.clone() || new Provider_js_1.Provider(token);
|
|
14
|
-
Object.assign(provider, settings);
|
|
15
|
-
return super.set(token, provider);
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Add a provider to the
|
|
19
|
-
* @param token
|
|
20
|
-
* @param settings
|
|
21
|
-
*/
|
|
22
|
-
addProvider(token, settings = {}) {
|
|
23
|
-
return this.add(token, settings);
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
* @param token
|
|
28
|
-
*/
|
|
29
|
-
hasProvider(token) {
|
|
30
|
-
return super.has(token);
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Add a provider to the
|
|
34
|
-
* @param token
|
|
35
|
-
* @param provider
|
|
36
|
-
*/
|
|
37
|
-
setProvider(token, provider) {
|
|
38
|
-
return super.set(token, provider);
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* The getProvider() method returns a specified element from a Map object.
|
|
42
|
-
* @returns {T} Returns the element associated with the specified key or undefined if the key can't be found in the Map object.
|
|
43
|
-
* @param token
|
|
44
|
-
*/
|
|
45
|
-
getProvider(token) {
|
|
46
|
-
return super.get(token);
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Get all providers registered in the injector container.
|
|
50
|
-
*
|
|
51
|
-
* @param type Filter the list by the given ProviderType.
|
|
52
|
-
* @returns {[TokenProvider , Provider<any>][]}
|
|
53
|
-
*/
|
|
54
|
-
getProviders(type) {
|
|
55
|
-
const types = [].concat(type).map(String);
|
|
56
|
-
return [...this].reduce((providers, [_, provider]) => {
|
|
57
|
-
if (types.includes(String(provider.type)) || !type) {
|
|
58
|
-
return [...providers, provider];
|
|
59
|
-
}
|
|
60
|
-
return providers;
|
|
61
|
-
}, []);
|
|
62
|
-
}
|
|
63
|
-
addProviders(container) {
|
|
64
|
-
container.forEach((provider) => {
|
|
65
|
-
if (!this.hasProvider(provider.provide)) {
|
|
66
|
-
this.setProvider(provider.provide, provider.clone());
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
exports.Container = Container;
|
|
72
|
-
//# sourceMappingURL=Container.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Container.js","sourceRoot":"","sources":["../../../../src/common/domain/Container.ts"],"names":[],"mappings":";;;AAGA,yEAAiE;AACjE,+CAAuC;AAEvC,MAAa,SAAU,SAAQ,GAA4B;IACzD;;;;OAIG;IACI,GAAG,CAAC,KAAoB,EAAE,WAAkC,EAAE;QACnE,MAAM,QAAQ,GAAG,oCAAe,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,IAAI,IAAI,sBAAQ,CAAC,KAAK,CAAC,CAAC;QAE5E,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAElC,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IACpC,CAAC;IAED;;;;OAIG;IACI,WAAW,CAAC,KAAoB,EAAE,WAAkC,EAAE;QAC3E,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IACnC,CAAC;IAED;;;OAGG;IACI,WAAW,CAAC,KAAoB;QACrC,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC;IAED;;;;OAIG;IACI,WAAW,CAAC,KAAoB,EAAE,QAAkB;QACzD,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IACpC,CAAC;IAED;;;;OAIG;IACI,WAAW,CAAgC,KAAgC;QAChF,OAAO,KAAK,CAAC,GAAG,CAAC,KAAM,CAAM,CAAC;IAChC,CAAC;IAED;;;;;OAKG;IACI,YAAY,CAAC,IAAuD;QACzE,MAAM,KAAK,GAAI,EAAgC,CAAC,MAAM,CAAC,IAAa,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAElF,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,EAAE;YACnD,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE;gBAClD,OAAO,CAAC,GAAG,SAAS,EAAE,QAAQ,CAAC,CAAC;aACjC;YACD,OAAO,SAAS,CAAC;QACnB,CAAC,EAAE,EAAE,CAAC,CAAC;IACT,CAAC;IAEM,YAAY,CAAC,SAAuC;QACzD,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;YAC7B,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;gBACvC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;aACtD;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAzED,8BAyEC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ControllerProvider = void 0;
|
|
4
|
-
const Provider_js_1 = require("./Provider.js");
|
|
5
|
-
const ProviderType_js_1 = require("./ProviderType.js");
|
|
6
|
-
class ControllerProvider extends Provider_js_1.Provider {
|
|
7
|
-
constructor(provide, options = {}) {
|
|
8
|
-
super(provide, options);
|
|
9
|
-
this.type = ProviderType_js_1.ProviderType.CONTROLLER;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
* @returns {any[]}
|
|
14
|
-
*/
|
|
15
|
-
get middlewares() {
|
|
16
|
-
return Object.assign({
|
|
17
|
-
use: [],
|
|
18
|
-
useAfter: [],
|
|
19
|
-
useBefore: []
|
|
20
|
-
}, this.store.get("middlewares", {}));
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* @param middlewares
|
|
25
|
-
*/
|
|
26
|
-
set middlewares(middlewares) {
|
|
27
|
-
const mdlwrs = this.middlewares;
|
|
28
|
-
const concat = (key, a, b) => (a[key] = a[key].concat(b[key]));
|
|
29
|
-
Object.keys(middlewares).forEach((key) => {
|
|
30
|
-
concat(key, mdlwrs, middlewares);
|
|
31
|
-
});
|
|
32
|
-
this.store.set("middlewares", mdlwrs);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
exports.ControllerProvider = ControllerProvider;
|
|
36
|
-
//# sourceMappingURL=ControllerProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ControllerProvider.js","sourceRoot":"","sources":["../../../../src/common/domain/ControllerProvider.ts"],"names":[],"mappings":";;;AAEA,+CAAuC;AACvC,uDAA+C;AAE/C,MAAa,kBAA4B,SAAQ,sBAAW;IAG1D,YAAY,OAAsB,EAAE,UAA6B,EAAE;QACjE,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,8BAAY,CAAC,UAAU,CAAC;IACtC,CAAC;IAED;;;OAGG;IACH,IAAI,WAAW;QACb,OAAO,MAAM,CAAC,MAAM,CAClB;YACE,GAAG,EAAE,EAAE;YACP,QAAQ,EAAE,EAAE;YACZ,SAAS,EAAE,EAAE;SACd,EACD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,EAAE,EAAE,CAAC,CAClC,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,IAAI,WAAW,CAAC,WAAkC;QAChD,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC;QAChC,MAAM,MAAM,GAAG,CAAC,GAAW,EAAE,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAEjF,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,GAAW,EAAE,EAAE;YAC/C,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IACxC,CAAC;CACF;AArCD,gDAqCC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InjectablePropertyType = void 0;
|
|
4
|
-
var InjectablePropertyType;
|
|
5
|
-
(function (InjectablePropertyType) {
|
|
6
|
-
InjectablePropertyType["METHOD"] = "method";
|
|
7
|
-
InjectablePropertyType["PROPERTY"] = "property";
|
|
8
|
-
InjectablePropertyType["CONSTANT"] = "constant";
|
|
9
|
-
InjectablePropertyType["VALUE"] = "value";
|
|
10
|
-
InjectablePropertyType["INTERCEPTOR"] = "interceptor";
|
|
11
|
-
})(InjectablePropertyType = exports.InjectablePropertyType || (exports.InjectablePropertyType = {}));
|
|
12
|
-
//# sourceMappingURL=InjectablePropertyType.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InjectablePropertyType.js","sourceRoot":"","sources":["../../../../src/common/domain/InjectablePropertyType.ts"],"names":[],"mappings":";;;AAAA,IAAY,sBAMX;AAND,WAAY,sBAAsB;IAChC,2CAAiB,CAAA;IACjB,+CAAqB,CAAA;IACrB,+CAAqB,CAAA;IACrB,yCAAe,CAAA;IACf,qDAA2B,CAAA;AAC7B,CAAC,EANW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAMjC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LocalsContainer = void 0;
|
|
4
|
-
const core_1 = require("@tsed/core");
|
|
5
|
-
class LocalsContainer extends Map {
|
|
6
|
-
constructor() {
|
|
7
|
-
super(...arguments);
|
|
8
|
-
this.hooks = new core_1.Hooks();
|
|
9
|
-
}
|
|
10
|
-
async destroy() {
|
|
11
|
-
await this.hooks.asyncEmit("$onDestroy");
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.LocalsContainer = LocalsContainer;
|
|
15
|
-
//# sourceMappingURL=LocalsContainer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LocalsContainer.js","sourceRoot":"","sources":["../../../../src/common/domain/LocalsContainer.ts"],"names":[],"mappings":";;;AAAA,qCAAiC;AAGjC,MAAa,eAAgB,SAAQ,GAAuB;IAA5D;;QACW,UAAK,GAAG,IAAI,YAAK,EAAE,CAAC;IAK/B,CAAC;IAHC,KAAK,CAAC,OAAO;QACX,MAAM,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;IAC3C,CAAC;CACF;AAND,0CAMC"}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Provider = void 0;
|
|
4
|
-
const core_1 = require("@tsed/core");
|
|
5
|
-
const ProviderScope_js_1 = require("./ProviderScope.js");
|
|
6
|
-
const ProviderType_js_1 = require("./ProviderType.js");
|
|
7
|
-
class Provider {
|
|
8
|
-
constructor(token, options = {}) {
|
|
9
|
-
/**
|
|
10
|
-
* Token group provider to retrieve all provider from the same type
|
|
11
|
-
*/
|
|
12
|
-
this.type = ProviderType_js_1.ProviderType.PROVIDER;
|
|
13
|
-
this.provide = token;
|
|
14
|
-
this.useClass = token;
|
|
15
|
-
Object.assign(this, options);
|
|
16
|
-
}
|
|
17
|
-
get token() {
|
|
18
|
-
return this._provide;
|
|
19
|
-
}
|
|
20
|
-
get provide() {
|
|
21
|
-
return this._provide;
|
|
22
|
-
}
|
|
23
|
-
set provide(value) {
|
|
24
|
-
if (value) {
|
|
25
|
-
this._provide = (0, core_1.getClassOrSymbol)(value);
|
|
26
|
-
this._tokenStore = this._store = core_1.Store.from(value);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
get useClass() {
|
|
30
|
-
return this._useClass;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Create a new store if the given value is a class. Otherwise, the value is ignored.
|
|
34
|
-
* @param value
|
|
35
|
-
*/
|
|
36
|
-
set useClass(value) {
|
|
37
|
-
if ((0, core_1.isClass)(value)) {
|
|
38
|
-
this._useClass = (0, core_1.classOf)(value);
|
|
39
|
-
this._store = core_1.Store.from(value);
|
|
40
|
-
this.hooks = (0, core_1.methodsOf)(this._useClass).reduce((hooks, { propertyKey }) => {
|
|
41
|
-
if (String(propertyKey).startsWith("$")) {
|
|
42
|
-
return {
|
|
43
|
-
...hooks,
|
|
44
|
-
[propertyKey]: (instance, ...args) => instance[propertyKey](...args)
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
return hooks;
|
|
48
|
-
}, {});
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
get className() {
|
|
52
|
-
return this.name;
|
|
53
|
-
}
|
|
54
|
-
get name() {
|
|
55
|
-
return (0, core_1.nameOf)(this.provide);
|
|
56
|
-
}
|
|
57
|
-
get store() {
|
|
58
|
-
return this._store;
|
|
59
|
-
}
|
|
60
|
-
get path() {
|
|
61
|
-
return this.store.get("path", "/");
|
|
62
|
-
}
|
|
63
|
-
set path(path) {
|
|
64
|
-
this.store.set("path", path);
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Get the scope of the provider.
|
|
68
|
-
*
|
|
69
|
-
* ::: tip Note
|
|
70
|
-
* Async provider is always a SINGLETON
|
|
71
|
-
* :::
|
|
72
|
-
*
|
|
73
|
-
* @returns {boolean}
|
|
74
|
-
*/
|
|
75
|
-
get scope() {
|
|
76
|
-
if (this.isAsync()) {
|
|
77
|
-
return ProviderScope_js_1.ProviderScope.SINGLETON;
|
|
78
|
-
}
|
|
79
|
-
return this.get("scope");
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Change the scope value of the provider.
|
|
83
|
-
* @param scope
|
|
84
|
-
*/
|
|
85
|
-
set scope(scope) {
|
|
86
|
-
this.store.set("scope", scope);
|
|
87
|
-
}
|
|
88
|
-
get configuration() {
|
|
89
|
-
return this.get("configuration");
|
|
90
|
-
}
|
|
91
|
-
set configuration(configuration) {
|
|
92
|
-
this.store.set("configuration", configuration);
|
|
93
|
-
}
|
|
94
|
-
get children() {
|
|
95
|
-
return this.store.get("childrenControllers", []);
|
|
96
|
-
}
|
|
97
|
-
get(key) {
|
|
98
|
-
return this.store.get(key) || this._tokenStore.get(key);
|
|
99
|
-
}
|
|
100
|
-
isAsync() {
|
|
101
|
-
return !!this.useAsyncFactory;
|
|
102
|
-
}
|
|
103
|
-
clone() {
|
|
104
|
-
return new ((0, core_1.classOf)(this))(this._provide, this);
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
*
|
|
108
|
-
* @returns {boolean}
|
|
109
|
-
*/
|
|
110
|
-
hasChildren() {
|
|
111
|
-
return !!this.children.length;
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
*
|
|
115
|
-
* @returns {boolean}
|
|
116
|
-
*/
|
|
117
|
-
hasParent() {
|
|
118
|
-
return !!this.store.get("parentController");
|
|
119
|
-
}
|
|
120
|
-
toString() {
|
|
121
|
-
return [
|
|
122
|
-
"Token",
|
|
123
|
-
this.name,
|
|
124
|
-
this.useClass && (0, core_1.nameOf)(this.useClass),
|
|
125
|
-
this.useFactory && "Factory",
|
|
126
|
-
this.useValue && "Value",
|
|
127
|
-
this.useAsyncFactory && "AsyncFactory"
|
|
128
|
-
]
|
|
129
|
-
.filter(Boolean)
|
|
130
|
-
.join(":");
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
exports.Provider = Provider;
|
|
134
|
-
//# sourceMappingURL=Provider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.js","sourceRoot":"","sources":["../../../../src/common/domain/Provider.ts"],"names":[],"mappings":";;;AAAA,qCAAiH;AAGjH,yDAAiD;AACjD,uDAA+C;AAI/C,MAAa,QAAQ;IAmBnB,YAAY,KAAuB,EAAE,UAA6B,EAAE;QAlBpE;;WAEG;QACI,SAAI,GAAiC,8BAAY,CAAC,QAAQ,CAAC;QAgBhE,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,KAAgB,CAAC;QAEjC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,IAAI,OAAO,CAAC,KAAoB;QAC9B,IAAI,KAAK,EAAE;YACT,IAAI,CAAC,QAAQ,GAAG,IAAA,uBAAgB,EAAC,KAAK,CAAC,CAAC;YACxC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,MAAM,GAAG,YAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACpD;IACH,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;;OAGG;IACH,IAAI,QAAQ,CAAC,KAAgC;QAC3C,IAAI,IAAA,cAAO,EAAC,KAAK,CA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C,eAAe,IAAI,cAAc;SACvC;aACE,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,CAAC;IACf,CAAC;CACF;AAnKD,4BAmKC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProviderScope = void 0;
|
|
4
|
-
var ProviderScope;
|
|
5
|
-
(function (ProviderScope) {
|
|
6
|
-
ProviderScope["SINGLETON"] = "singleton";
|
|
7
|
-
ProviderScope["REQUEST"] = "request";
|
|
8
|
-
ProviderScope["INSTANCE"] = "instance";
|
|
9
|
-
})(ProviderScope = exports.ProviderScope || (exports.ProviderScope = {}));
|
|
10
|
-
//# sourceMappingURL=ProviderScope.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProviderScope.js","sourceRoot":"","sources":["../../../../src/common/domain/ProviderScope.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,wCAAuB,CAAA;IACvB,oCAAmB,CAAA;IACnB,sCAAqB,CAAA;AACvB,CAAC,EAJW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAIxB"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProviderType = void 0;
|
|
4
|
-
var ProviderType;
|
|
5
|
-
(function (ProviderType) {
|
|
6
|
-
ProviderType["VALUE"] = "value";
|
|
7
|
-
ProviderType["FACTORY"] = "factory";
|
|
8
|
-
ProviderType["SERVICE"] = "service";
|
|
9
|
-
ProviderType["PROVIDER"] = "provider";
|
|
10
|
-
ProviderType["MODULE"] = "module";
|
|
11
|
-
ProviderType["CONTROLLER"] = "controller";
|
|
12
|
-
ProviderType["INTERCEPTOR"] = "interceptor";
|
|
13
|
-
ProviderType["MIDDLEWARE"] = "middleware";
|
|
14
|
-
})(ProviderType = exports.ProviderType || (exports.ProviderType = {}));
|
|
15
|
-
//# sourceMappingURL=ProviderType.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProviderType.js","sourceRoot":"","sources":["../../../../src/common/domain/ProviderType.ts"],"names":[],"mappings":";;;AAAA,IAAY,YASX;AATD,WAAY,YAAY;IACtB,+BAAe,CAAA;IACf,mCAAmB,CAAA;IACnB,mCAAmB,CAAA;IACnB,qCAAqB,CAAA;IACrB,iCAAiB,CAAA;IACjB,yCAAyB,CAAA;IACzB,2CAA2B,CAAA;IAC3B,yCAAyB,CAAA;AAC3B,CAAC,EATW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QASvB"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InjectionError = void 0;
|
|
4
|
-
const core_1 = require("@tsed/core");
|
|
5
|
-
const colors_js_1 = require("../utils/colors.js");
|
|
6
|
-
class InjectionError extends Error {
|
|
7
|
-
constructor(token, origin) {
|
|
8
|
-
super((0, core_1.isString)(origin) ? origin : "");
|
|
9
|
-
this.name = "INJECTION_ERROR";
|
|
10
|
-
this.tokens = [];
|
|
11
|
-
this.tokens = [token];
|
|
12
|
-
if (origin) {
|
|
13
|
-
if ((0, core_1.isString)(origin)) {
|
|
14
|
-
this.origin = {
|
|
15
|
-
message: origin,
|
|
16
|
-
stack: this.stack
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
if (origin.tokens) {
|
|
21
|
-
this.tokens = this.tokens.concat(origin.tokens);
|
|
22
|
-
this.origin = origin.origin;
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
this.origin = origin;
|
|
26
|
-
this.stack = origin.stack;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
const originMessage = this.origin ? "\nOrigin: " + this.origin.message : "";
|
|
31
|
-
const tokensMessage = this.tokens.map((token) => (0, core_1.nameOf)(token)).join(" > ");
|
|
32
|
-
this.message = `Injection failed on ${tokensMessage}${originMessage}`;
|
|
33
|
-
}
|
|
34
|
-
static throwInjectorError(token, currentDependency, error) {
|
|
35
|
-
if (currentDependency && (0, core_1.isClass)(token)) {
|
|
36
|
-
error.message = printDependencyInjectionError(token, { ...currentDependency, message: error.message });
|
|
37
|
-
}
|
|
38
|
-
throw new InjectionError(token, error);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
exports.InjectionError = InjectionError;
|
|
42
|
-
function printDependencyInjectionError(token, options) {
|
|
43
|
-
let erroredArg = "";
|
|
44
|
-
const args = (0, core_1.getConstructorArgNames)(token)
|
|
45
|
-
.map((arg, index) => {
|
|
46
|
-
if (options.index === index) {
|
|
47
|
-
erroredArg = arg;
|
|
48
|
-
arg = colors_js_1.colors.red(arg);
|
|
49
|
-
}
|
|
50
|
-
return `${arg}: ${(0, core_1.nameOf)(options.deps[index])}`;
|
|
51
|
-
})
|
|
52
|
-
.join(", ");
|
|
53
|
-
const signature = (0, core_1.nameOf)(token) + "->constructor(" + args + ")";
|
|
54
|
-
const indexOf = signature.indexOf(erroredArg) - 5;
|
|
55
|
-
const drawline = (indexOf) => " ".repeat(indexOf) + colors_js_1.colors.red("^" + "‾".repeat(erroredArg.length - 1));
|
|
56
|
-
return "Unable to inject dependency. " + options.message + "\n\n" + signature + "\n" + (indexOf > -1 ? drawline(indexOf) : "");
|
|
57
|
-
}
|
|
58
|
-
//# sourceMappingURL=InjectionError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InjectionError.js","sourceRoot":"","sources":["../../../../src/common/errors/InjectionError.ts"],"names":[],"mappings":";;;AAAA,qCAA6E;AAE7E,kDAA0C;AAE1C,MAAa,cAAe,SAAQ,KAAK;IAMvC,YAAY,KAAoB,EAAE,MAAY;QAC5C,KAAK,CAAC,IAAA,eAAQ,EAAC,MAAM,CAAC,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