@tsed/di 7.83.3 → 8.0.0-alpha.10
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/browser/di.umd.min.js +1 -1
- package/lib/browser/di.umd.min.js.map +1 -1
- package/lib/esm/common/constants/constants.js +5 -3
- package/lib/esm/common/constants/constants.js.map +1 -1
- package/lib/esm/common/decorators/autoInjectable.js +23 -3
- package/lib/esm/common/decorators/autoInjectable.js.map +1 -1
- package/lib/esm/common/decorators/configuration.js.map +1 -1
- package/lib/esm/common/decorators/constant.js +28 -11
- package/lib/esm/common/decorators/constant.js.map +1 -1
- package/lib/esm/common/decorators/controller.js.map +1 -1
- package/lib/esm/common/decorators/inject.js +63 -73
- package/lib/esm/common/decorators/inject.js.map +1 -1
- package/lib/esm/common/decorators/intercept.js +40 -13
- package/lib/esm/common/decorators/intercept.js.map +1 -1
- package/lib/esm/common/decorators/lazyInject.js +15 -15
- package/lib/esm/common/decorators/lazyInject.js.map +1 -1
- package/lib/esm/common/decorators/module.js +1 -1
- package/lib/esm/common/decorators/module.js.map +1 -1
- package/lib/esm/common/decorators/opts.js +2 -2
- package/lib/esm/common/decorators/opts.js.map +1 -1
- package/lib/esm/common/decorators/overrideProvider.js.map +1 -1
- package/lib/esm/common/decorators/scope.js.map +1 -1
- package/lib/esm/common/decorators/useOpts.js +3 -7
- package/lib/esm/common/decorators/useOpts.js.map +1 -1
- package/lib/esm/common/decorators/value.js +17 -11
- package/lib/esm/common/decorators/value.js.map +1 -1
- package/lib/esm/common/domain/Container.js +3 -3
- package/lib/esm/common/domain/Container.js.map +1 -1
- package/lib/esm/common/domain/LocalsContainer.js.map +1 -1
- package/lib/esm/common/domain/Provider.js +1 -1
- package/lib/esm/common/domain/Provider.js.map +1 -1
- package/lib/esm/common/errors/InjectionError.js.map +1 -1
- package/lib/esm/common/index.js +0 -2
- package/lib/esm/common/index.js.map +1 -1
- package/lib/esm/common/registries/GlobalProviders.js +7 -7
- package/lib/esm/common/registries/GlobalProviders.js.map +1 -1
- package/lib/esm/common/registries/ProviderRegistry.js.map +1 -1
- package/lib/esm/common/services/DIConfiguration.js.map +1 -1
- package/lib/esm/common/services/InjectorService.js +50 -167
- package/lib/esm/common/services/InjectorService.js.map +1 -1
- package/lib/esm/common/utils/createContainer.js.map +1 -1
- package/lib/esm/common/utils/resolveControllers.js +1 -1
- package/lib/esm/common/utils/resolveControllers.js.map +1 -1
- package/lib/esm/node/decorators/injectContext.js +14 -5
- package/lib/esm/node/decorators/injectContext.js.map +1 -1
- package/lib/esm/node/domain/ContextLogger.js +2 -2
- package/lib/esm/node/domain/ContextLogger.js.map +1 -1
- package/lib/esm/node/domain/DIContext.js.map +1 -1
- package/lib/esm/node/services/DILogger.js.map +1 -1
- package/lib/esm/node/services/DITest.js +10 -5
- package/lib/esm/node/services/DITest.js.map +1 -1
- package/lib/esm/node/utils/asyncHookContext.js +3 -2
- package/lib/esm/node/utils/asyncHookContext.js.map +1 -1
- package/lib/esm/node/utils/setLoggerFormat.js.map +1 -1
- package/lib/esm/node/utils/setLoggerLevel.js.map +1 -1
- package/lib/types/common/constants/constants.d.ts +5 -3
- package/lib/types/common/decorators/constant.d.ts +4 -1
- package/lib/types/common/decorators/inject.d.ts +17 -4
- package/lib/types/common/decorators/intercept.d.ts +3 -0
- package/lib/types/common/decorators/module.d.ts +1 -1
- package/lib/types/common/decorators/value.d.ts +2 -1
- package/lib/types/common/domain/Container.d.ts +4 -4
- package/lib/types/common/domain/Provider.d.ts +6 -6
- package/lib/types/common/index.d.ts +0 -2
- package/lib/types/common/interfaces/ImportTokenProviderOpts.d.ts +2 -2
- package/lib/types/common/interfaces/InterceptorContext.d.ts +1 -1
- package/lib/types/common/interfaces/InvokeOptions.d.ts +8 -2
- package/lib/types/common/interfaces/ProviderOpts.d.ts +2 -2
- package/lib/types/common/interfaces/RegistrySettings.d.ts +2 -1
- package/lib/types/common/interfaces/ResolvedInvokeOptions.d.ts +1 -1
- package/lib/types/common/interfaces/TokenProvider.d.ts +2 -6
- package/lib/types/common/registries/GlobalProviders.d.ts +2 -2
- package/lib/types/common/services/InjectorService.d.ts +30 -54
- package/lib/types/node/decorators/injectContext.d.ts +2 -1
- package/lib/types/node/domain/ContextLogger.d.ts +3 -3
- package/lib/types/node/domain/DIContext.d.ts +1 -1
- package/lib/types/node/services/DITest.d.ts +1 -1
- package/lib/types/node/utils/asyncHookContext.d.ts +4 -3
- package/package.json +21 -18
- package/lib/cjs/common/constants/constants.js +0 -7
- package/lib/cjs/common/constants/constants.js.map +0 -1
- package/lib/cjs/common/decorators/autoInjectable.js +0 -18
- 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 -55
- 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 -93
- 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 -36
- 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 -65
- package/lib/cjs/common/decorators/useOpts.js.map +0 -1
- package/lib/cjs/common/decorators/value.js +0 -55
- 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/errors/UndefinedTokenError.js +0 -11
- package/lib/cjs/common/errors/UndefinedTokenError.js.map +0 -1
- package/lib/cjs/common/index.js +0 -60
- 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/InjectableProperties.js +0 -3
- package/lib/cjs/common/interfaces/InjectableProperties.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 -117
- 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 -653
- 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 -30
- 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 -121
- package/lib/cjs/node/services/DITest.js.map +0 -1
- package/lib/cjs/node/utils/asyncHookContext.js +0 -42
- 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/common/errors/UndefinedTokenError.js +0 -7
- package/lib/esm/common/errors/UndefinedTokenError.js.map +0 -1
- package/lib/esm/common/interfaces/InjectableProperties.js +0 -2
- package/lib/esm/common/interfaces/InjectableProperties.js.map +0 -1
- package/lib/esm/package.json +0 -3
- package/lib/types/common/errors/UndefinedTokenError.d.ts +0 -4
- package/lib/types/common/interfaces/InjectableProperties.d.ts +0 -25
- package/lib/types-esm/common/constants/constants.d.ts +0 -3
- 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 -36
- package/lib/types-esm/common/decorators/controller.d.ts +0 -42
- package/lib/types-esm/common/decorators/inject.d.ts +0 -22
- package/lib/types-esm/common/decorators/injectable.d.ts +0 -20
- package/lib/types-esm/common/decorators/intercept.d.ts +0 -10
- 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 -36
- 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/errors/UndefinedTokenError.d.ts +0 -4
- package/lib/types-esm/common/index.d.ts +0 -56
- 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/InjectableProperties.d.ts +0 -25
- 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 -24
- 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 -20
- package/lib/types-esm/common/interfaces/ResolvedInvokeOptions.d.ts +0 -12
- package/lib/types-esm/common/interfaces/TokenProvider.d.ts +0 -6
- 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 -227
- 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 -15
- 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 -14
- 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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setLoggerConfiguration.js","sourceRoot":"","sources":["../../../../src/node/utils/setLoggerConfiguration.ts"],"names":[],"mappings":";;;AACA,6DAAqD;AACrD,2DAAmD;AAEnD,SAAgB,sBAAsB,CAAC,QAAyB;IAC9D,IAAA,kCAAc,EAAC,QAAQ,CAAC,CAAC;IACzB,IAAA,oCAAe,EAAC,QAAQ,CAAC,CAAC;AAC5B,CAAC;AAHD,wDAGC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setLoggerFormat = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @ignore
|
|
6
|
-
* @param injector
|
|
7
|
-
*/
|
|
8
|
-
function setLoggerFormat(injector) {
|
|
9
|
-
const { level, format } = injector.settings.logger;
|
|
10
|
-
if (level) {
|
|
11
|
-
injector.logger.level = level;
|
|
12
|
-
}
|
|
13
|
-
if (format && injector.logger.appenders) {
|
|
14
|
-
injector.logger.appenders.set("stdout", {
|
|
15
|
-
type: "stdout",
|
|
16
|
-
levels: ["info", "debug"],
|
|
17
|
-
layout: {
|
|
18
|
-
type: "pattern",
|
|
19
|
-
pattern: format
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
injector.logger.appenders.set("stderr", {
|
|
23
|
-
levels: ["trace", "fatal", "error", "warn"],
|
|
24
|
-
type: "stderr",
|
|
25
|
-
layout: {
|
|
26
|
-
type: "pattern",
|
|
27
|
-
pattern: format
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.setLoggerFormat = setLoggerFormat;
|
|
33
|
-
//# sourceMappingURL=setLoggerFormat.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setLoggerFormat.js","sourceRoot":"","sources":["../../../../src/node/utils/setLoggerFormat.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACH,SAAgB,eAAe,CAAC,QAAyB;IACvD,MAAM,EAAC,KAAK,EAAE,MAAM,EAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC;IAEjD,IAAI,KAAK,EAAE;QACT,QAAQ,CAAC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;KAC/B;IAED,IAAI,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE;QACvC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,EAAE;YACtC,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;YACzB,MAAM,EAAE;gBACN,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,MAAM;aAChB;SACF,CAAC,CAAC;QAEH,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,EAAE;YACtC,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC;YAC3C,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE;gBACN,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,MAAM;aAChB;SACF,CAAC,CAAC;KACJ;AACH,CAAC;AA1BD,0CA0BC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setLoggerLevel = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @ignore
|
|
6
|
-
* @param injector
|
|
7
|
-
*/
|
|
8
|
-
function setLoggerLevel(injector) {
|
|
9
|
-
const { level } = injector.settings.logger;
|
|
10
|
-
if (level) {
|
|
11
|
-
injector.logger.level = level;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.setLoggerLevel = setLoggerLevel;
|
|
15
|
-
//# sourceMappingURL=setLoggerLevel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setLoggerLevel.js","sourceRoot":"","sources":["../../../../src/node/utils/setLoggerLevel.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACH,SAAgB,cAAc,CAAC,QAAyB;IACtD,MAAM,EAAC,KAAK,EAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC;IAEzC,IAAI,KAAK,EAAE;QACT,QAAQ,CAAC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;KAC/B;AACH,CAAC;AAND,wCAMC"}
|
package/lib/cjs/package.json
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export class UndefinedTokenError extends Error {
|
|
2
|
-
constructor() {
|
|
3
|
-
super("Given token is undefined. Have you enabled emitDecoratorMetadata in your tsconfig.json or decorated your class with @Injectable, @Service, ... decorator ?");
|
|
4
|
-
this.name = "UNDEFINED_TOKEN_ERROR";
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=UndefinedTokenError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UndefinedTokenError.js","sourceRoot":"","sources":["../../../../src/common/errors/UndefinedTokenError.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAG5C;QACE,KAAK,CACH,4JAA4J,CAC7J,CAAC;QALJ,SAAI,GAAG,uBAAuB,CAAC;IAM/B,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InjectableProperties.js","sourceRoot":"","sources":["../../../../src/common/interfaces/InjectableProperties.ts"],"names":[],"mappings":""}
|
package/lib/esm/package.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { InjectablePropertyType } from "../domain/InjectablePropertyType.js";
|
|
2
|
-
import type { LocalsContainer } from "../domain/LocalsContainer.js";
|
|
3
|
-
import type { TokenProvider } from "./TokenProvider.js";
|
|
4
|
-
import type { InjectorService } from "../services/InjectorService.js";
|
|
5
|
-
import type { InvokeOptions } from "./InvokeOptions.js";
|
|
6
|
-
export interface InjectableProperty {
|
|
7
|
-
propertyKey: string;
|
|
8
|
-
}
|
|
9
|
-
export interface InjectablePropertyOptions extends InjectableProperty {
|
|
10
|
-
bindingType: InjectablePropertyType.METHOD | InjectablePropertyType.PROPERTY | InjectablePropertyType.INTERCEPTOR;
|
|
11
|
-
propertyType: string;
|
|
12
|
-
useType?: TokenProvider;
|
|
13
|
-
resolver: (injector: InjectorService, locals: LocalsContainer, options: Partial<InvokeOptions> & {
|
|
14
|
-
options: any;
|
|
15
|
-
}) => () => any;
|
|
16
|
-
options?: any;
|
|
17
|
-
}
|
|
18
|
-
export interface InjectablePropertyValue extends InjectableProperty {
|
|
19
|
-
bindingType: InjectablePropertyType.CONSTANT | InjectablePropertyType.VALUE;
|
|
20
|
-
expression: string;
|
|
21
|
-
defaultValue?: any;
|
|
22
|
-
}
|
|
23
|
-
export interface InjectableProperties {
|
|
24
|
-
[key: string]: InjectablePropertyOptions | InjectablePropertyValue;
|
|
25
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function AutoInjectable(): <T extends new (...args: any[]) => NonNullable<unknown>>(constr: T) => T;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DIConfiguration } from "../services/DIConfiguration.js";
|
|
2
|
-
/**
|
|
3
|
-
* Get or set Configuration on a class.
|
|
4
|
-
*
|
|
5
|
-
* @decorator
|
|
6
|
-
*/
|
|
7
|
-
export declare function Configuration(configuration?: Partial<TsED.Configuration>): Function;
|
|
8
|
-
export type Configuration = TsED.Configuration & DIConfiguration;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Return value from Configuration.
|
|
3
|
-
*
|
|
4
|
-
* ## Example
|
|
5
|
-
*
|
|
6
|
-
* ```typescript
|
|
7
|
-
* import {Env} from "@tsed/core";
|
|
8
|
-
* import {Constant, Value} from "@tsed/di";
|
|
9
|
-
*
|
|
10
|
-
* export class MyClass {
|
|
11
|
-
*
|
|
12
|
-
* @Constant("env")
|
|
13
|
-
* env: Env;
|
|
14
|
-
*
|
|
15
|
-
* @Value("swagger.path")
|
|
16
|
-
* swaggerPath: string;
|
|
17
|
-
*
|
|
18
|
-
* @Value("swagger.path", "defaultValue")
|
|
19
|
-
* swaggerPath: string;
|
|
20
|
-
*
|
|
21
|
-
* constructor() {
|
|
22
|
-
* console.log(this.swaggerPath) // undefined. Not available on constructor
|
|
23
|
-
* }
|
|
24
|
-
*
|
|
25
|
-
* $onInit() {
|
|
26
|
-
* console.log(this.swaggerPath) // something
|
|
27
|
-
* }
|
|
28
|
-
* }
|
|
29
|
-
* ```
|
|
30
|
-
*
|
|
31
|
-
* @param {string} expression
|
|
32
|
-
* @param defaultValue
|
|
33
|
-
* @returns {(targetClass: any, attributeName: string) => any}
|
|
34
|
-
* @decorator
|
|
35
|
-
*/
|
|
36
|
-
export declare function Constant(expression: string, defaultValue?: any): any;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Type } from "@tsed/core";
|
|
2
|
-
import { ProviderOpts } from "../interfaces/ProviderOpts.js";
|
|
3
|
-
export type PathType = string | RegExp | (string | RegExp)[];
|
|
4
|
-
export interface ControllerMiddlewares {
|
|
5
|
-
useBefore: any[];
|
|
6
|
-
use: any[];
|
|
7
|
-
useAfter: any[];
|
|
8
|
-
}
|
|
9
|
-
export interface ControllerOptions extends Partial<ProviderOpts<any>> {
|
|
10
|
-
path?: PathType;
|
|
11
|
-
children?: Type<any>[];
|
|
12
|
-
middlewares?: Partial<ControllerMiddlewares>;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Declare a new controller with his Rest path. His methods annotated will be collected to build the routing list.
|
|
16
|
-
* This routing listing will be built with the `express.Router` object.
|
|
17
|
-
*
|
|
18
|
-
* ::: tip
|
|
19
|
-
* See [Controllers](/docs/controllers.md) section for more details
|
|
20
|
-
* :::
|
|
21
|
-
*
|
|
22
|
-
* ```typescript
|
|
23
|
-
* @Controller("/calendars")
|
|
24
|
-
* export provide CalendarCtrl {
|
|
25
|
-
*
|
|
26
|
-
* @Get("/:id")
|
|
27
|
-
* public get(
|
|
28
|
-
* @Req() request: Req,
|
|
29
|
-
* @Res() response: Res,
|
|
30
|
-
* @Next() next: Next
|
|
31
|
-
* ): void {
|
|
32
|
-
*
|
|
33
|
-
* }
|
|
34
|
-
* }
|
|
35
|
-
* ```
|
|
36
|
-
*
|
|
37
|
-
* @param options
|
|
38
|
-
* @controller
|
|
39
|
-
* @decorator
|
|
40
|
-
* @classDecorator
|
|
41
|
-
*/
|
|
42
|
-
export declare function Controller(options: PathType | ControllerOptions): ClassDecorator;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { InjectablePropertyOptions } from "../interfaces/InjectableProperties.js";
|
|
2
|
-
import { TokenProvider } from "../interfaces/TokenProvider.js";
|
|
3
|
-
export declare function injectProperty(target: any, propertyKey: string, options: Partial<InjectablePropertyOptions>): void;
|
|
4
|
-
/**
|
|
5
|
-
* Inject a provider to another provider.
|
|
6
|
-
*
|
|
7
|
-
* Use this decorator to inject a custom provider on constructor parameter or property.
|
|
8
|
-
*
|
|
9
|
-
* ```typescript
|
|
10
|
-
* @Injectable()
|
|
11
|
-
* export class MyService {
|
|
12
|
-
* @Inject(CONNECTION)
|
|
13
|
-
* connection: CONNECTION;
|
|
14
|
-
* }
|
|
15
|
-
* ```
|
|
16
|
-
*
|
|
17
|
-
* @param token A token provider or token provider group
|
|
18
|
-
* @param onGet Use the given name method to inject
|
|
19
|
-
* @returns {Function}
|
|
20
|
-
* @decorator
|
|
21
|
-
*/
|
|
22
|
-
export declare function Inject(token?: TokenProvider | (() => TokenProvider), onGet?: (bean: any) => any): Function;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ProviderOpts } from "../interfaces/ProviderOpts.js";
|
|
2
|
-
/**
|
|
3
|
-
* The decorators `@Injectable()` declare a new service can be injected in other service, controller, interceptor, etc.. on there `constructor`.
|
|
4
|
-
* All classes annotated with `@Injectable()` are built one time, excepted if you change the default provider configuration.
|
|
5
|
-
*
|
|
6
|
-
* ::: tip
|
|
7
|
-
* `@Injectable()` use the `reflect-metadata` to collect and inject the built provided to other services.
|
|
8
|
-
* :::
|
|
9
|
-
*
|
|
10
|
-
* ### Options
|
|
11
|
-
*
|
|
12
|
-
* - type (@@ProviderType@@ or `string`): Kind of provider. (Default: `ProviderType.PROVIDER`)
|
|
13
|
-
* - scope (@@ProviderScope@@): Kind of provider. (Default: `ProviderScope.SINGLETON`)
|
|
14
|
-
* - provide (@@TokenProvider@@): An injection token (Note: This option override default metadata generated by Typescript).
|
|
15
|
-
* - deps (`Type<any>`): List of class or provider which will be injected to the constructor (Note: This options override default metadata generated by Typescript).
|
|
16
|
-
*
|
|
17
|
-
* @returns {Function}
|
|
18
|
-
* @decorator
|
|
19
|
-
*/
|
|
20
|
-
export declare function Injectable(options?: Partial<ProviderOpts>): ClassDecorator;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Type } from "@tsed/core";
|
|
2
|
-
import type { InterceptorMethods } from "../interfaces/InterceptorMethods.js";
|
|
3
|
-
/**
|
|
4
|
-
* Attaches interceptor to method call and executes the before and after methods
|
|
5
|
-
*
|
|
6
|
-
* @param interceptor
|
|
7
|
-
* @param options
|
|
8
|
-
* @decorator
|
|
9
|
-
*/
|
|
10
|
-
export declare function Intercept<T extends InterceptorMethods>(interceptor: Type<T>, options?: any): any;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The decorators `@Service()` declare a new service can be injected in other service or controller on there `constructor`.
|
|
3
|
-
* All services annotated with `@Service()` are constructed one time.
|
|
4
|
-
*
|
|
5
|
-
* > `@Service()` use the `reflect-metadata` to collect and inject service on controllers or other services.
|
|
6
|
-
*
|
|
7
|
-
* @returns {Function}
|
|
8
|
-
* @decorator
|
|
9
|
-
*/
|
|
10
|
-
export declare function Interceptor(): Function;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Lazy load a provider from his package and invoke only when the provider is used
|
|
3
|
-
*
|
|
4
|
-
* ```typescript
|
|
5
|
-
* import type {PlatformException} from "@tsed/platform-exceptions";
|
|
6
|
-
*
|
|
7
|
-
* @Injectable()
|
|
8
|
-
* export class MyService {
|
|
9
|
-
* @LazyInject("PlatformException", () => import("@tsed/platform-exceptions"))
|
|
10
|
-
* exceptions: Promise<PlatformException>;
|
|
11
|
-
* }
|
|
12
|
-
* ```
|
|
13
|
-
*
|
|
14
|
-
* @param key
|
|
15
|
-
* @param packageName
|
|
16
|
-
* @param resolver
|
|
17
|
-
* @param optional
|
|
18
|
-
* @returns {Function}
|
|
19
|
-
* @decorator
|
|
20
|
-
*/
|
|
21
|
-
export declare function LazyInject(key: string, resolver: () => any, { optional, packageName }?: {
|
|
22
|
-
optional?: boolean;
|
|
23
|
-
packageName?: string;
|
|
24
|
-
}): PropertyDecorator;
|
|
25
|
-
/**
|
|
26
|
-
* Optionally Lazy load a provider from his package and invoke only when the provider is used
|
|
27
|
-
*
|
|
28
|
-
* ```typescript
|
|
29
|
-
* import type {PlatformException} from "@tsed/platform-exceptions";
|
|
30
|
-
*
|
|
31
|
-
* @Injectable()
|
|
32
|
-
* export class MyService {
|
|
33
|
-
* @OptionalLazyInject("@tsed/platform-exceptions")
|
|
34
|
-
* exceptions: Promise<PlatformException>;
|
|
35
|
-
* }
|
|
36
|
-
* ```
|
|
37
|
-
*
|
|
38
|
-
* @param key
|
|
39
|
-
* @param resolver
|
|
40
|
-
* @returns {Function}
|
|
41
|
-
* @decorator
|
|
42
|
-
*/
|
|
43
|
-
export declare function OptionalLazyInject(key: string, resolver: () => any): PropertyDecorator;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { ProviderScope } from "../domain/ProviderScope.js";
|
|
2
|
-
import { TokenProvider } from "../interfaces/TokenProvider.js";
|
|
3
|
-
import { DIResolver } from "../interfaces/DIResolver.js";
|
|
4
|
-
export interface ModuleOptions extends Omit<TsED.Configuration, "scopes"> {
|
|
5
|
-
/**
|
|
6
|
-
* Provider scope
|
|
7
|
-
*/
|
|
8
|
-
scope?: ProviderScope;
|
|
9
|
-
/**
|
|
10
|
-
* Providers must be initialized before building this module
|
|
11
|
-
*/
|
|
12
|
-
imports?: TokenProvider[];
|
|
13
|
-
/**
|
|
14
|
-
* Explicit token must be injected in the constructor
|
|
15
|
-
*/
|
|
16
|
-
deps?: TokenProvider[];
|
|
17
|
-
/**
|
|
18
|
-
* A list of resolvers to inject provider from external DI.
|
|
19
|
-
*/
|
|
20
|
-
resolvers?: DIResolver[];
|
|
21
|
-
/**
|
|
22
|
-
* Additional properties are stored as provider configuration.
|
|
23
|
-
*/
|
|
24
|
-
[key: string]: any;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Declare a new Ts.ED module
|
|
28
|
-
*
|
|
29
|
-
* ## Options
|
|
30
|
-
* - imports: List of Provider which must be built by injector before invoking the module
|
|
31
|
-
* - resolvers: List of external DI must be used to resolve unknown provider
|
|
32
|
-
* - deps: List of provider must be injected to the module constructor (explicit declaration)
|
|
33
|
-
*
|
|
34
|
-
* @param options
|
|
35
|
-
* @decorator
|
|
36
|
-
*/
|
|
37
|
-
export declare function Module(options?: Partial<ModuleOptions>): any;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get instance options. This options depending on his invocation context.
|
|
3
|
-
*
|
|
4
|
-
* ```typescript
|
|
5
|
-
* import {Injectable, Opts, UseOpts} from "@tsed/di";
|
|
6
|
-
*
|
|
7
|
-
* @Injectable()
|
|
8
|
-
* class MyConfigurableService {
|
|
9
|
-
* source: string;
|
|
10
|
-
* constructor(@Opts options: any = {}) {
|
|
11
|
-
* console.log("Hello ", options.source); // log: Hello Service1 then Hello Service2
|
|
12
|
-
*
|
|
13
|
-
* this.source = options.source;
|
|
14
|
-
* }
|
|
15
|
-
* }
|
|
16
|
-
*
|
|
17
|
-
* @Injectable()
|
|
18
|
-
* class MyService1 {
|
|
19
|
-
* constructor(@UseOpts({source: 'Service1'}) service: MyConfigurableService) {
|
|
20
|
-
* console.log(service.source) // log: Service1
|
|
21
|
-
* }
|
|
22
|
-
* }
|
|
23
|
-
*
|
|
24
|
-
* @Injectable()
|
|
25
|
-
* class MyService2 {
|
|
26
|
-
* constructor(@UseOpts({source: 'Service2'}) service: MyConfigurableService) {
|
|
27
|
-
* console.log(service.source) // log: Service2
|
|
28
|
-
* }
|
|
29
|
-
* }
|
|
30
|
-
* ```
|
|
31
|
-
*
|
|
32
|
-
* ::: warning
|
|
33
|
-
* Using @@Opts@@ decorator on a constructor parameter change the Scope of the provider to `ProviderScope.INSTANCE`.
|
|
34
|
-
* :::
|
|
35
|
-
*
|
|
36
|
-
* @param target
|
|
37
|
-
* @param propertyKey
|
|
38
|
-
* @param index
|
|
39
|
-
* @decorator
|
|
40
|
-
*/
|
|
41
|
-
export declare function Opts(target: any, propertyKey: string | symbol | undefined, index: number): void;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Type } from "@tsed/core";
|
|
2
|
-
/**
|
|
3
|
-
* Override a provider which is already registered in ProviderRegistry.
|
|
4
|
-
* @returns {Function}
|
|
5
|
-
* @decorators
|
|
6
|
-
* @param originalProvider
|
|
7
|
-
*/
|
|
8
|
-
export declare function OverrideProvider(originalProvider: Type<any>): Function;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ProviderScope } from "../domain/ProviderScope.js";
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* @param {"request" | "singleton" | ProviderScope} scope
|
|
5
|
-
* @returns {Function}
|
|
6
|
-
* @constructor
|
|
7
|
-
*/
|
|
8
|
-
export declare function Scope(scope?: "request" | "singleton" | ProviderScope): Function;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The decorators `@Service()` declare a new service can be injected in other service or controller on there `constructor`.
|
|
3
|
-
* All services annotated with `@Service()` are constructed one time.
|
|
4
|
-
*
|
|
5
|
-
* > `@Service()` use the `reflect-metadata` to collect and inject service on controllers or other services.
|
|
6
|
-
*
|
|
7
|
-
* @returns {Function}
|
|
8
|
-
* @decorator
|
|
9
|
-
*/
|
|
10
|
-
export declare function Service(): Function;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Add options to invoke the Service.
|
|
3
|
-
*
|
|
4
|
-
* ```typescript
|
|
5
|
-
* import {Injectable, Opts, UseOpts} from "@tsed/di";
|
|
6
|
-
*
|
|
7
|
-
* @Injectable()
|
|
8
|
-
* class MyConfigurableService {
|
|
9
|
-
* source: string;
|
|
10
|
-
* constructor(@Opts options: any = {}) {
|
|
11
|
-
* console.log("Hello ", options.source); // log: Hello Service1 then Hello Service2
|
|
12
|
-
*
|
|
13
|
-
* this.source = options.source;
|
|
14
|
-
* }
|
|
15
|
-
* }
|
|
16
|
-
*
|
|
17
|
-
* @Injectable()
|
|
18
|
-
* class MyService1 {
|
|
19
|
-
* constructor(@UseOpts({source: 'Service1'}) service: MyConfigurableService) {
|
|
20
|
-
* console.log(service.source) // log: Service1
|
|
21
|
-
* }
|
|
22
|
-
* }
|
|
23
|
-
*
|
|
24
|
-
* @Injectable()
|
|
25
|
-
* class MyService2 {
|
|
26
|
-
* constructor(@UseOpts({source: 'Service2'}) service: MyConfigurableService) {
|
|
27
|
-
* console.log(service.source) // log: Service2
|
|
28
|
-
* }
|
|
29
|
-
* }
|
|
30
|
-
* ```
|
|
31
|
-
*
|
|
32
|
-
* ::: warning
|
|
33
|
-
* Using @@Opts@@ decorator on a constructor parameter change the Scope of the provider to `ProviderScope.INSTANCE`.
|
|
34
|
-
* :::
|
|
35
|
-
*
|
|
36
|
-
* @returns {Function}
|
|
37
|
-
* @decorator
|
|
38
|
-
* @param options
|
|
39
|
-
*/
|
|
40
|
-
export declare function UseOpts(options: {
|
|
41
|
-
[key: string]: any;
|
|
42
|
-
}): Function;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Return value from Configuration.
|
|
3
|
-
*
|
|
4
|
-
* ## Example
|
|
5
|
-
*
|
|
6
|
-
* ```typescript
|
|
7
|
-
* import {Env} from "@tsed/core";
|
|
8
|
-
* import {Constant, Value} from "@tsed/di";
|
|
9
|
-
*
|
|
10
|
-
* export class MyClass {
|
|
11
|
-
*
|
|
12
|
-
* @Constant("env")
|
|
13
|
-
* env: Env;
|
|
14
|
-
*
|
|
15
|
-
* @Value("swagger.path")
|
|
16
|
-
* swaggerPath: string;
|
|
17
|
-
*
|
|
18
|
-
* @Value("swagger.path", "defaultValue")
|
|
19
|
-
* swaggerPath: string;
|
|
20
|
-
*
|
|
21
|
-
* constructor() {
|
|
22
|
-
* console.log(this.swaggerPath) // undefined. Not available on constructor
|
|
23
|
-
* }
|
|
24
|
-
*
|
|
25
|
-
* $onInit() {
|
|
26
|
-
* console.log(this.swaggerPath) // something
|
|
27
|
-
* }
|
|
28
|
-
* }
|
|
29
|
-
* ```
|
|
30
|
-
*
|
|
31
|
-
* @param expression
|
|
32
|
-
* @param defaultValue
|
|
33
|
-
* @returns {(targetClass: any, attributeName: string) => any}
|
|
34
|
-
* @decorator
|
|
35
|
-
*/
|
|
36
|
-
export declare function Value(expression: any, defaultValue?: any): (target: any, propertyKey: string) => void;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { ProviderOpts } from "../interfaces/ProviderOpts.js";
|
|
2
|
-
import type { ProviderType } from "./ProviderType.js";
|
|
3
|
-
import type { TokenProvider } from "../interfaces/TokenProvider.js";
|
|
4
|
-
import { Provider } from "./Provider.js";
|
|
5
|
-
export declare class Container extends Map<TokenProvider, Provider> {
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
* @param token
|
|
9
|
-
* @param settings
|
|
10
|
-
*/
|
|
11
|
-
add(token: TokenProvider, settings?: Partial<ProviderOpts>): this;
|
|
12
|
-
/**
|
|
13
|
-
* Add a provider to the
|
|
14
|
-
* @param token
|
|
15
|
-
* @param settings
|
|
16
|
-
*/
|
|
17
|
-
addProvider(token: TokenProvider, settings?: Partial<ProviderOpts>): this;
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
* @param token
|
|
21
|
-
*/
|
|
22
|
-
hasProvider(token: TokenProvider): boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Add a provider to the
|
|
25
|
-
* @param token
|
|
26
|
-
* @param provider
|
|
27
|
-
*/
|
|
28
|
-
setProvider(token: TokenProvider, provider: Provider): this;
|
|
29
|
-
/**
|
|
30
|
-
* The getProvider() method returns a specified element from a Map object.
|
|
31
|
-
* @returns {T} Returns the element associated with the specified key or undefined if the key can't be found in the Map object.
|
|
32
|
-
* @param token
|
|
33
|
-
*/
|
|
34
|
-
getProvider<T extends Provider = Provider>(token: TokenProvider): T | undefined;
|
|
35
|
-
/**
|
|
36
|
-
* Get all providers registered in the injector container.
|
|
37
|
-
*
|
|
38
|
-
* @param {ProviderType} type Filter the list by the given ProviderType.
|
|
39
|
-
* @returns {[TokenProvider , Provider<any>][]}
|
|
40
|
-
*/
|
|
41
|
-
getProviders(type?: ProviderType | string | string[]): Provider[];
|
|
42
|
-
addProviders(container: Map<TokenProvider, Provider>): void;
|
|
43
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ControllerMiddlewares } from "../decorators/controller.js";
|
|
2
|
-
import { TokenProvider } from "../interfaces/TokenProvider.js";
|
|
3
|
-
import { Provider } from "./Provider.js";
|
|
4
|
-
export declare class ControllerProvider<T = any> extends Provider<T> {
|
|
5
|
-
tokenRouter: string;
|
|
6
|
-
constructor(provide: TokenProvider, options?: Partial<Provider>);
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* @returns {any[]}
|
|
10
|
-
*/
|
|
11
|
-
get middlewares(): ControllerMiddlewares;
|
|
12
|
-
/**
|
|
13
|
-
*
|
|
14
|
-
* @param middlewares
|
|
15
|
-
*/
|
|
16
|
-
set middlewares(middlewares: ControllerMiddlewares);
|
|
17
|
-
}
|