@tsed/di 7.0.0-alpha.1 → 7.0.0-beta.3
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/cjs/constants/index.js +7 -0
- package/lib/cjs/constants/index.js.map +1 -0
- package/lib/cjs/decorators/configuration.js +24 -0
- package/lib/cjs/decorators/configuration.js.map +1 -0
- package/lib/cjs/decorators/constant.js +55 -0
- package/lib/cjs/decorators/constant.js.map +1 -0
- package/lib/cjs/decorators/controller.js +53 -0
- package/lib/cjs/decorators/controller.js.map +1 -0
- package/lib/cjs/decorators/index.js +19 -0
- package/lib/cjs/decorators/index.js.map +1 -0
- package/lib/cjs/decorators/inject.js +79 -0
- package/lib/cjs/decorators/inject.js.map +1 -0
- package/lib/cjs/decorators/injectable.js +34 -0
- package/lib/cjs/decorators/injectable.js.map +1 -0
- package/lib/cjs/decorators/intercept.js +28 -0
- package/lib/cjs/decorators/intercept.js.map +1 -0
- package/lib/cjs/decorators/interceptor.js +21 -0
- package/lib/cjs/decorators/interceptor.js.map +1 -0
- package/lib/cjs/decorators/lazyInject.js +71 -0
- package/lib/cjs/decorators/lazyInject.js.map +1 -0
- package/lib/cjs/decorators/module.js +31 -0
- package/lib/cjs/decorators/module.js.map +1 -0
- package/lib/cjs/decorators/opts.js +54 -0
- package/lib/cjs/decorators/opts.js.map +1 -0
- package/lib/cjs/decorators/overrideProvider.js +17 -0
- package/lib/cjs/decorators/overrideProvider.js.map +1 -0
- package/lib/cjs/decorators/scope.js +16 -0
- package/lib/cjs/decorators/scope.js.map +1 -0
- package/lib/cjs/decorators/service.js +18 -0
- package/lib/cjs/decorators/service.js.map +1 -0
- package/lib/cjs/decorators/useOpts.js +65 -0
- package/lib/cjs/decorators/useOpts.js.map +1 -0
- package/lib/cjs/decorators/value.js +55 -0
- package/lib/cjs/decorators/value.js.map +1 -0
- package/lib/cjs/domain/Container.js +72 -0
- package/lib/cjs/domain/Container.js.map +1 -0
- package/lib/cjs/domain/ContextLogger.js +85 -0
- package/lib/cjs/domain/ContextLogger.js.map +1 -0
- package/lib/cjs/domain/DIContext.js +45 -0
- package/lib/cjs/domain/DIContext.js.map +1 -0
- package/lib/cjs/domain/InjectablePropertyType.js +12 -0
- package/lib/cjs/domain/InjectablePropertyType.js.map +1 -0
- package/lib/cjs/domain/LocalsContainer.js +55 -0
- package/lib/cjs/domain/LocalsContainer.js.map +1 -0
- package/lib/cjs/domain/Provider.js +122 -0
- package/lib/cjs/domain/Provider.js.map +1 -0
- package/lib/cjs/domain/ProviderScope.js +10 -0
- package/lib/cjs/domain/ProviderScope.js.map +1 -0
- package/lib/cjs/domain/ProviderType.js +15 -0
- package/lib/cjs/domain/ProviderType.js.map +1 -0
- package/lib/cjs/domain/index.js +12 -0
- package/lib/cjs/domain/index.js.map +1 -0
- package/lib/cjs/errors/InjectionError.js +58 -0
- package/lib/cjs/errors/InjectionError.js.map +1 -0
- package/lib/cjs/errors/UndefinedTokenError.js +11 -0
- package/lib/cjs/errors/UndefinedTokenError.js.map +1 -0
- package/lib/cjs/index.js +21 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/interfaces/DIConfigurationOptions.js +3 -0
- package/lib/cjs/interfaces/DIConfigurationOptions.js.map +1 -0
- package/lib/cjs/interfaces/DILogger.js +3 -0
- package/lib/cjs/interfaces/DILogger.js.map +1 -0
- package/lib/cjs/interfaces/DIResolver.js +3 -0
- package/lib/cjs/interfaces/DIResolver.js.map +1 -0
- package/lib/cjs/interfaces/IProvider.js +3 -0
- package/lib/cjs/interfaces/IProvider.js.map +1 -0
- package/lib/cjs/interfaces/InjectableProperties.js +3 -0
- package/lib/cjs/interfaces/InjectableProperties.js.map +1 -0
- package/lib/cjs/interfaces/InterceptorContext.js +3 -0
- package/lib/cjs/interfaces/InterceptorContext.js.map +1 -0
- package/lib/cjs/interfaces/InterceptorMethods.js +3 -0
- package/lib/cjs/interfaces/InterceptorMethods.js.map +1 -0
- package/lib/cjs/interfaces/InvokeOptions.js +3 -0
- package/lib/cjs/interfaces/InvokeOptions.js.map +1 -0
- package/lib/cjs/interfaces/OnDestroy.js +3 -0
- package/lib/cjs/interfaces/OnDestroy.js.map +1 -0
- package/lib/cjs/interfaces/OnInit.js +3 -0
- package/lib/cjs/interfaces/OnInit.js.map +1 -0
- package/lib/cjs/interfaces/RegistrySettings.js +3 -0
- package/lib/cjs/interfaces/RegistrySettings.js.map +1 -0
- package/lib/cjs/interfaces/ResolvedInvokeOptions.js +3 -0
- package/lib/cjs/interfaces/ResolvedInvokeOptions.js.map +1 -0
- package/lib/cjs/interfaces/TokenProvider.js +3 -0
- package/lib/cjs/interfaces/TokenProvider.js.map +1 -0
- package/lib/cjs/interfaces/index.js +18 -0
- package/lib/cjs/interfaces/index.js.map +1 -0
- package/lib/cjs/registries/GlobalProviders.js +124 -0
- package/lib/cjs/registries/GlobalProviders.js.map +1 -0
- package/lib/cjs/registries/ProviderRegistry.js +85 -0
- package/lib/cjs/registries/ProviderRegistry.js.map +1 -0
- package/lib/cjs/services/DIConfiguration.js +129 -0
- package/lib/cjs/services/DIConfiguration.js.map +1 -0
- package/lib/cjs/services/DILogger.js +13 -0
- package/lib/cjs/services/DILogger.js.map +1 -0
- package/lib/cjs/services/DITest.js +108 -0
- package/lib/cjs/services/DITest.js.map +1 -0
- package/lib/cjs/services/InjectorService.js +566 -0
- package/lib/cjs/services/InjectorService.js.map +1 -0
- package/lib/cjs/utils/colors.js +10 -0
- package/lib/cjs/utils/colors.js.map +1 -0
- package/lib/cjs/utils/createContainer.js +14 -0
- package/lib/cjs/utils/createContainer.js.map +1 -0
- package/lib/cjs/utils/data/Test1.js +8 -0
- package/lib/cjs/utils/data/Test1.js.map +1 -0
- package/lib/cjs/utils/data/Test2.js +8 -0
- package/lib/cjs/utils/data/Test2.js.map +1 -0
- package/lib/cjs/utils/getConfiguration.js +20 -0
- package/lib/cjs/utils/getConfiguration.js.map +1 -0
- package/lib/cjs/utils/setLoggerLevel.js +16 -0
- package/lib/cjs/utils/setLoggerLevel.js.map +1 -0
- package/lib/esm/constants/index.js +4 -0
- package/lib/esm/constants/index.js.map +1 -0
- package/lib/esm/decorators/configuration.js +20 -0
- package/lib/esm/decorators/configuration.js.map +1 -0
- package/lib/esm/decorators/constant.js +51 -0
- package/lib/esm/decorators/constant.js.map +1 -0
- package/lib/esm/decorators/controller.js +49 -0
- package/lib/esm/decorators/controller.js.map +1 -0
- package/lib/esm/decorators/index.js +16 -0
- package/lib/esm/decorators/index.js.map +1 -0
- package/lib/esm/decorators/inject.js +74 -0
- package/lib/esm/decorators/inject.js.map +1 -0
- package/lib/esm/decorators/injectable.js +30 -0
- package/lib/esm/decorators/injectable.js.map +1 -0
- package/lib/esm/decorators/intercept.js +24 -0
- package/lib/esm/decorators/intercept.js.map +1 -0
- package/lib/esm/decorators/interceptor.js +17 -0
- package/lib/esm/decorators/interceptor.js.map +1 -0
- package/lib/esm/decorators/lazyInject.js +66 -0
- package/lib/esm/decorators/lazyInject.js.map +1 -0
- package/lib/esm/decorators/module.js +27 -0
- package/lib/esm/decorators/module.js.map +1 -0
- package/lib/esm/decorators/opts.js +50 -0
- package/lib/esm/decorators/opts.js.map +1 -0
- package/lib/esm/decorators/overrideProvider.js +13 -0
- package/lib/esm/decorators/overrideProvider.js.map +1 -0
- package/lib/esm/decorators/scope.js +12 -0
- package/lib/esm/decorators/scope.js.map +1 -0
- package/lib/esm/decorators/service.js +14 -0
- package/lib/esm/decorators/service.js.map +1 -0
- package/lib/esm/decorators/useOpts.js +61 -0
- package/lib/esm/decorators/useOpts.js.map +1 -0
- package/lib/esm/decorators/value.js +51 -0
- package/lib/esm/decorators/value.js.map +1 -0
- package/lib/esm/domain/Container.js +68 -0
- package/lib/esm/domain/Container.js.map +1 -0
- package/lib/esm/domain/ContextLogger.js +81 -0
- package/lib/esm/domain/ContextLogger.js.map +1 -0
- package/lib/esm/domain/DIContext.js +41 -0
- package/lib/esm/domain/DIContext.js.map +1 -0
- package/lib/esm/domain/InjectablePropertyType.js +9 -0
- package/lib/esm/domain/InjectablePropertyType.js.map +1 -0
- package/lib/esm/domain/LocalsContainer.js +51 -0
- package/lib/esm/domain/LocalsContainer.js.map +1 -0
- package/lib/esm/domain/Provider.js +118 -0
- package/lib/esm/domain/Provider.js.map +1 -0
- package/lib/esm/domain/ProviderScope.js +7 -0
- package/lib/esm/domain/ProviderScope.js.map +1 -0
- package/lib/esm/domain/ProviderType.js +12 -0
- package/lib/esm/domain/ProviderType.js.map +1 -0
- package/lib/esm/domain/index.js +9 -0
- package/lib/esm/domain/index.js.map +1 -0
- package/lib/esm/errors/InjectionError.js +54 -0
- package/lib/esm/errors/InjectionError.js.map +1 -0
- package/lib/esm/errors/UndefinedTokenError.js +7 -0
- package/lib/esm/errors/UndefinedTokenError.js.map +1 -0
- package/lib/esm/index.js +18 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/interfaces/DIConfigurationOptions.js +2 -0
- package/lib/esm/interfaces/DIConfigurationOptions.js.map +1 -0
- package/lib/esm/interfaces/DILogger.js +2 -0
- package/lib/esm/interfaces/DILogger.js.map +1 -0
- package/lib/esm/interfaces/DIResolver.js +2 -0
- package/lib/esm/interfaces/DIResolver.js.map +1 -0
- package/lib/esm/interfaces/IProvider.js +2 -0
- package/lib/esm/interfaces/IProvider.js.map +1 -0
- package/lib/esm/interfaces/InjectableProperties.js +2 -0
- package/lib/esm/interfaces/InjectableProperties.js.map +1 -0
- package/lib/esm/interfaces/InterceptorContext.js +2 -0
- package/lib/esm/interfaces/InterceptorContext.js.map +1 -0
- package/lib/esm/interfaces/InterceptorMethods.js +2 -0
- package/lib/esm/interfaces/InterceptorMethods.js.map +1 -0
- package/lib/esm/interfaces/InvokeOptions.js +2 -0
- package/lib/esm/interfaces/InvokeOptions.js.map +1 -0
- package/lib/esm/interfaces/OnDestroy.js +2 -0
- package/lib/esm/interfaces/OnDestroy.js.map +1 -0
- package/lib/esm/interfaces/OnInit.js +2 -0
- package/lib/esm/interfaces/OnInit.js.map +1 -0
- package/lib/esm/interfaces/RegistrySettings.js +2 -0
- package/lib/esm/interfaces/RegistrySettings.js.map +1 -0
- package/lib/esm/interfaces/ResolvedInvokeOptions.js +2 -0
- package/lib/esm/interfaces/ResolvedInvokeOptions.js.map +1 -0
- package/lib/esm/interfaces/TokenProvider.js +2 -0
- package/lib/esm/interfaces/TokenProvider.js.map +1 -0
- package/lib/esm/interfaces/index.js +15 -0
- package/lib/esm/interfaces/index.js.map +1 -0
- package/lib/esm/registries/GlobalProviders.js +120 -0
- package/lib/esm/registries/GlobalProviders.js.map +1 -0
- package/lib/esm/registries/ProviderRegistry.js +80 -0
- package/lib/esm/registries/ProviderRegistry.js.map +1 -0
- package/lib/esm/services/DIConfiguration.js +125 -0
- package/lib/esm/services/DIConfiguration.js.map +1 -0
- package/lib/esm/services/DILogger.js +11 -0
- package/lib/esm/services/DILogger.js.map +1 -0
- package/lib/esm/services/DITest.js +104 -0
- package/lib/esm/services/DITest.js.map +1 -0
- package/lib/esm/services/InjectorService.js +563 -0
- package/lib/esm/services/InjectorService.js.map +1 -0
- package/lib/esm/utils/colors.js +7 -0
- package/lib/esm/utils/colors.js.map +1 -0
- package/lib/esm/utils/createContainer.js +10 -0
- package/lib/esm/utils/createContainer.js.map +1 -0
- package/lib/esm/utils/data/Test1.js +4 -0
- package/lib/esm/utils/data/Test1.js.map +1 -0
- package/lib/esm/utils/data/Test2.js +4 -0
- package/lib/esm/utils/data/Test2.js.map +1 -0
- package/lib/esm/utils/getConfiguration.js +16 -0
- package/lib/esm/utils/getConfiguration.js.map +1 -0
- package/lib/esm/utils/setLoggerLevel.js +12 -0
- package/lib/esm/utils/setLoggerLevel.js.map +1 -0
- package/lib/{constants → types/constants}/index.d.ts +0 -0
- package/lib/{decorators → types/decorators}/configuration.d.ts +0 -0
- package/lib/{decorators → types/decorators}/constant.d.ts +0 -0
- package/lib/types/decorators/controller.d.ts +43 -0
- package/lib/{decorators → types/decorators}/index.d.ts +2 -0
- package/lib/{decorators → types/decorators}/inject.d.ts +2 -0
- package/lib/{decorators → types/decorators}/injectable.d.ts +2 -1
- package/lib/{decorators → types/decorators}/intercept.d.ts +0 -0
- package/lib/{decorators → types/decorators}/interceptor.d.ts +0 -0
- package/lib/types/decorators/lazyInject.d.ts +43 -0
- package/lib/{decorators → types/decorators}/module.d.ts +0 -0
- package/lib/{decorators → types/decorators}/opts.d.ts +0 -0
- package/lib/{decorators → types/decorators}/overrideProvider.d.ts +0 -0
- package/lib/{decorators → types/decorators}/scope.d.ts +0 -0
- package/lib/{decorators → types/decorators}/service.d.ts +0 -0
- package/lib/{decorators → types/decorators}/useOpts.d.ts +0 -0
- package/lib/{decorators → types/decorators}/value.d.ts +0 -0
- package/lib/{domain → types/domain}/Container.d.ts +2 -3
- package/lib/{domain → types/domain}/ContextLogger.d.ts +5 -1
- package/lib/{domain → types/domain}/DIContext.d.ts +6 -7
- package/lib/{domain → types/domain}/InjectablePropertyType.d.ts +0 -0
- package/lib/{domain → types/domain}/LocalsContainer.d.ts +0 -0
- package/lib/{domain → types/domain}/Provider.d.ts +17 -3
- package/lib/{domain → types/domain}/ProviderScope.d.ts +0 -0
- package/lib/{domain → types/domain}/ProviderType.d.ts +0 -0
- package/lib/{domain → types/domain}/index.d.ts +0 -0
- package/lib/{errors → types/errors}/InjectionError.d.ts +0 -0
- package/lib/{errors → types/errors}/UndefinedTokenError.d.ts +0 -0
- package/lib/{index.d.ts → types/index.d.ts} +1 -0
- package/lib/{interfaces → types/interfaces}/DIConfigurationOptions.d.ts +0 -0
- package/lib/{interfaces → types/interfaces}/DILogger.d.ts +0 -0
- package/lib/{interfaces → types/interfaces}/DIResolver.d.ts +0 -0
- package/lib/{interfaces → types/interfaces}/IProvider.d.ts +0 -0
- package/lib/{interfaces → types/interfaces}/InjectableProperties.d.ts +8 -4
- package/lib/{interfaces → types/interfaces}/InterceptorContext.d.ts +0 -0
- package/lib/{interfaces → types/interfaces}/InterceptorMethods.d.ts +0 -0
- package/lib/{interfaces → types/interfaces}/InvokeOptions.d.ts +0 -0
- package/lib/{interfaces → types/interfaces}/OnDestroy.d.ts +0 -0
- package/lib/{interfaces → types/interfaces}/OnInit.d.ts +0 -0
- package/lib/{interfaces → types/interfaces}/RegistrySettings.d.ts +6 -2
- package/lib/types/interfaces/ResolvedInvokeOptions.d.ts +12 -0
- package/lib/{interfaces → types/interfaces}/TokenProvider.d.ts +0 -0
- package/lib/{interfaces → types/interfaces}/index.d.ts +1 -0
- package/lib/{registries → types/registries}/GlobalProviders.d.ts +5 -1
- package/lib/{registries → types/registries}/ProviderRegistry.d.ts +0 -0
- package/lib/{services → types/services}/DIConfiguration.d.ts +0 -0
- package/lib/{services → types/services}/DILogger.d.ts +0 -0
- package/lib/{services → types/services}/DITest.d.ts +5 -1
- package/lib/{services → types/services}/InjectorService.d.ts +31 -14
- package/lib/types/utils/colors.d.ts +5 -0
- package/lib/{utils → types/utils}/createContainer.d.ts +0 -0
- package/lib/types/utils/data/Test1.d.ts +3 -0
- package/lib/types/utils/data/Test2.d.ts +3 -0
- package/lib/{utils → types/utils}/getConfiguration.d.ts +0 -0
- package/lib/{utils → types/utils}/setLoggerLevel.d.ts +0 -0
- package/package.json +15 -11
- package/readme.md +1 -1
- package/tsconfig.compile.esm.json +24 -0
- package/lib/index.js +0 -2271
- package/lib/index.js.map +0 -1
- package/lib/index.modern.js +0 -2235
- package/lib/index.modern.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InjectorService.js","sourceRoot":"","sources":["../../../src/services/InjectorService.ts"],"names":[],"mappings":";;;AAAA,OAAO,EACL,WAAW,EACX,UAAU,EACV,OAAO,EACP,SAAS,EACT,SAAS,EAET,OAAO,EACP,UAAU,EACV,eAAe,EACf,QAAQ,EACR,MAAM,EACN,WAAW,EACX,KAAK,EACN,MAAM,YAAY,CAAC;AACpB,OAAO,EAAC,gBAAgB,EAAE,eAAe,EAAC,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAC,aA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;YACL,KAAK,EAAE,KAAK,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,aAAa,CAAC,SAAS;YACzE,IAAI,EAAE,IAAK,IAAI,EAAE;YACjB,OAAO,EAAE,OAAO,IAAI,EAAE;YACtB,SAAS;YACT,QAAQ;SACT,CAAC;IACJ,CAAC;CACF,CAAA;;AAnnBY,eAAe;IAJ3B,UAAU,CAAC;QACV,KAAK,EAAE,aAAa,CAAC,SAAS;QAC9B,MAAM,EAAE,IAAI;KACb,CAAC;;GACW,eAAe,CAmnB3B;SAnnBY,eAAe","sourcesContent":["import {\n ancestorsOf,\n catchError,\n classOf,\n deepClone,\n deepMerge,\n getClassOrSymbol,\n isClass,\n isFunction,\n isInheritedFrom,\n Metadata,\n nameOf,\n prototypeOf,\n Store\n} from \"@tsed/core\";\nimport {DI_PARAM_OPTIONS, INJECTABLE_PROP} from \"../constants\";\nimport {Configuration} from \"../decorators/configuration\";\nimport {Injectable} from \"../decorators/injectable\";\nimport {DIContext, InjectablePropertyType, ProviderScope} from \"../domain\";\nimport {Container} from \"../domain/Container\";\nimport {LocalsContainer} from \"../domain/LocalsContainer\";\nimport {Provider} from \"../domain/Provider\";\nimport {InjectionError} from \"../errors/InjectionError\";\nimport {UndefinedTokenError} from \"../errors/UndefinedTokenError\";\nimport {\n DILogger,\n InjectableProperties,\n InjectablePropertyOptions,\n InjectablePropertyValue,\n InterceptorContext,\n InterceptorMethods,\n InvokeOptions,\n IProvider,\n TokenProvider\n} from \"../interfaces\";\nimport {GlobalProviders} from \"../registries/GlobalProviders\";\nimport {createContainer} from \"../utils/createContainer\";\nimport {DIConfiguration} from \"./DIConfiguration\";\nimport {ResolvedInvokeOptions} from \"../interfaces/ResolvedInvokeOptions\";\n\n/**\n * This service contain all services collected by `@Service` or services declared manually with `InjectorService.factory()` or `InjectorService.service()`.\n *\n * ### Example:\n *\n * ```typescript\n * import {InjectorService} from \"@tsed/di\";\n *\n * // Import the services (all services are decorated with @Service()\";\n * import MyService1 from \"./services/service1\";\n * import MyService2 from \"./services/service2\";\n * import MyService3 from \"./services/service3\";\n *\n * // When all services is imported you can load InjectorService.\n * const injector = new InjectorService()\n *\n * await injector.load();\n *\n * const myService1 = injector.get<MyService1>(MyServcice1);\n * ```\n */\n@Injectable({\n scope: ProviderScope.SINGLETON,\n global: true\n})\nexport class InjectorService extends Container {\n public settings: TsED.Configuration & DIConfiguration = new DIConfiguration() as any;\n public logger: DILogger = console;\n private resolvedConfiguration: boolean = false;\n #cache = new LocalsContainer();\n\n constructor() {\n super();\n this.#cache.set(InjectorService, this);\n }\n\n get resolvers() {\n return this.settings.resolvers!;\n }\n\n get scopes() {\n return this.settings.scopes || {};\n }\n\n /**\n * Retrieve default scope for a given provider.\n * @param provider\n */\n public scopeOf(provider: Provider) {\n return provider.scope || this.scopes[provider.type] || ProviderScope.SINGLETON;\n }\n\n /**\n * Return a list of instance build by the injector.\n */\n public toArray(): any[] {\n return this.#cache.toArray();\n }\n\n /**\n * Get a service or factory already constructed from his symbol or class.\n *\n * #### Example\n *\n * ```typescript\n * import {InjectorService} from \"@tsed/di\";\n * import MyService from \"./services\";\n *\n * class OtherService {\n * constructor(injectorService: InjectorService) {\n * const myService = injectorService.get<MyService>(MyService);\n * }\n * }\n * ```\n *\n * @param token The class or symbol registered in InjectorService.\n * @param options\n * @returns {boolean}\n */\n get<T = any>(token: TokenProvider, options: any = {}): T | undefined {\n const instance = this.getInstance(token);\n\n if (instance !== undefined) {\n return instance;\n }\n\n if (!this.hasProvider(token)) {\n for (const resolver of this.resolvers) {\n const result = resolver.get(token, options);\n\n if (result !== undefined) {\n return result;\n }\n }\n }\n }\n\n /**\n * The has() method returns a boolean indicating whether an element with the specified key exists or not.\n * @returns {boolean}\n * @param token\n */\n has(token: TokenProvider): boolean {\n return this.#cache.get(token) !== undefined;\n }\n\n /**\n * Invoke the class and inject all services that required by the class constructor.\n *\n * #### Example\n *\n * ```typescript\n * import {InjectorService} from \"@tsed/di\";\n * import MyService from \"./services\";\n *\n * class OtherService {\n * constructor(injectorService: InjectorService) {\n * const myService = injectorService.invoke<MyService>(MyService);\n * }\n * }\n * ```\n *\n * @param token The injectable class to invoke. Class parameters are injected according constructor signature.\n * @param locals Optional object. If preset then any argument Class are read from this object first, before the `InjectorService` is consulted.\n * @param options\n * @returns {T} The class constructed.\n */\n public invoke<T>(\n token: TokenProvider,\n locals: Map<TokenProvider, any> = new LocalsContainer(),\n options: Partial<InvokeOptions<T>> = {}\n ): T {\n const provider = this.ensureProvider(token);\n let instance: any;\n\n !locals.has(Configuration) && locals.set(Configuration, this.settings);\n\n if (locals.has(token)) {\n return locals.get(token);\n }\n\n if (token === DI_PARAM_OPTIONS) {\n return {} as T;\n }\n\n if (!provider || options.rebuild) {\n instance = this.resolve(token, locals, options);\n\n if (this.hasProvider(token)) {\n this.#cache.set(token, instance);\n }\n\n return instance;\n }\n\n switch (this.scopeOf(provider)) {\n case ProviderScope.SINGLETON:\n if (!this.has(token)) {\n this.#cache.set(token, this.resolve(token, locals, options));\n\n if (provider.isAsync()) {\n this.#cache.get(token).then((instance: any) => {\n this.#cache.set(token, instance);\n });\n }\n }\n\n instance = this.get<T>(token)!;\n break;\n\n case ProviderScope.REQUEST:\n instance = this.resolve(token, locals, options);\n locals.set(token, instance);\n break;\n\n case ProviderScope.INSTANCE:\n instance = this.resolve(provider.provide, locals, options);\n break;\n }\n\n return instance;\n }\n\n /**\n * Build only providers which are asynchronous.\n */\n async loadAsync(locals: LocalsContainer = new LocalsContainer()) {\n for (const [, provider] of this) {\n if (!locals.has(provider.token)) {\n if (provider.isAsync()) {\n await this.invoke(provider.token, locals);\n }\n\n const instance = this.#cache.get(provider.token);\n if (instance !== undefined) {\n locals.set(provider.token, instance);\n }\n }\n }\n\n return locals;\n }\n\n loadSync(locals: LocalsContainer = new LocalsContainer()) {\n for (const [, provider] of this) {\n if (!locals.has(provider.token) && this.scopeOf(provider) === ProviderScope.SINGLETON) {\n this.invoke(provider.token, locals);\n }\n\n const instance = this.#cache.get(provider.token);\n if (instance !== undefined) {\n locals.set(provider.token, instance);\n }\n }\n\n return locals;\n }\n\n /**\n * Boostrap injector from container and resolve configuration.\n *\n * @param container\n */\n bootstrap(container: Container = createContainer()) {\n // Clone all providers in the container\n this.addProviders(container);\n\n // Resolve all configuration\n this.resolveConfiguration();\n\n return this;\n }\n\n /**\n * Build all providers from given container (or GlobalProviders) and emit `$onInit` event.\n *\n * @param container\n * @param rootModule\n */\n async load(container: Container = createContainer(), rootModule?: TokenProvider): Promise<LocalsContainer<any>> {\n this.bootstrap(container);\n\n // build async and sync provider\n let locals = await this.loadAsync();\n\n if (rootModule) {\n await this.invoke(rootModule);\n }\n\n // load sync provider\n locals = this.loadSync(locals);\n\n await locals.emit(\"$beforeInit\");\n await locals.emit(\"$onInit\");\n\n return locals;\n }\n\n /**\n * Load all configurations registered on providers\n */\n resolveConfiguration() {\n if (this.resolvedConfiguration) {\n return;\n }\n const mergedConfiguration = new Map();\n\n super.forEach((provider) => {\n if (provider.configuration && provider.type !== \"server:module\") {\n Object.entries(provider.configuration).forEach(([key, value]) => {\n value = mergedConfiguration.has(key) ? deepMerge(mergedConfiguration.get(key), value) : deepClone(value);\n mergedConfiguration.set(key, value);\n });\n }\n if (provider.resolvers) {\n this.resolvers.push(...provider.resolvers);\n }\n });\n\n mergedConfiguration.forEach((value, key) => {\n this.settings[key] = deepMerge(value, this.settings[key]);\n });\n\n this.settings.build();\n\n this.resolvedConfiguration = true;\n }\n\n /**\n *\n * @param instance\n * @param locals\n * @param options\n */\n public bindInjectableProperties(instance: any, locals: Map<TokenProvider, any>, options: Partial<InvokeOptions>) {\n const properties: InjectableProperties = ancestorsOf(classOf(instance)).reduce((properties: any, target: any) => {\n const store = Store.from(target);\n\n return {\n ...properties,\n ...(store.get(INJECTABLE_PROP) || {})\n };\n }, {});\n\n Object.values(properties).forEach((definition) => {\n switch (definition.bindingType) {\n case InjectablePropertyType.METHOD:\n this.bindMethod(instance, definition);\n break;\n case InjectablePropertyType.PROPERTY:\n this.bindProperty(instance, definition, locals, options);\n break;\n case InjectablePropertyType.CONSTANT:\n this.bindConstant(instance, definition);\n break;\n case InjectablePropertyType.VALUE:\n this.bindValue(instance, definition);\n break;\n case InjectablePropertyType.INTERCEPTOR:\n this.bindInterceptor(instance, definition);\n break;\n }\n });\n }\n\n /**\n *\n * @param instance\n * @param {string} propertyKey\n */\n public bindMethod(instance: any, {propertyKey}: InjectablePropertyOptions) {\n const target = classOf(instance);\n const originalMethod = instance[propertyKey];\n const deps = Metadata.getParamTypes(prototypeOf(target), propertyKey);\n\n instance[propertyKey] = () => {\n const services = deps.map((dependency: any) => this.get(dependency));\n\n return originalMethod.call(instance, ...services);\n };\n }\n\n /**\n * Create an injectable property.\n *\n * @param instance\n * @param {string} propertyKey\n * @param {any} useType\n * @param resolver\n * @param options\n * @param locals\n * @param invokeOptions\n */\n public bindProperty(\n instance: any,\n {propertyKey, resolver, options = {}}: InjectablePropertyOptions,\n locals: Map<TokenProvider, any>,\n invokeOptions: Partial<InvokeOptions>\n ) {\n let get: () => any;\n\n get = resolver(this, locals, {...invokeOptions, options});\n\n catchError(() =>\n Object.defineProperty(instance, propertyKey, {\n get\n })\n );\n }\n\n /**\n *\n * @param instance\n * @param {string} propertyKey\n * @param {any} useType\n */\n public bindValue(instance: any, {propertyKey, expression, defaultValue}: InjectablePropertyValue) {\n const descriptor = {\n get: () => this.settings.get(expression) || defaultValue,\n set: (value: any) => this.settings.set(expression, value),\n enumerable: true,\n configurable: true\n };\n\n catchError(() => Object.defineProperty(instance, propertyKey, descriptor));\n }\n\n /**\n *\n * @param instance\n * @param {string} propertyKey\n * @param {any} useType\n */\n public bindConstant(instance: any, {propertyKey, expression, defaultValue}: InjectablePropertyValue) {\n let bean: any;\n\n const get = () => {\n if (bean !== undefined) {\n return bean;\n }\n\n const value = this.settings.get(expression, defaultValue);\n bean = Object.freeze(deepClone(value));\n\n return bean;\n };\n\n const descriptor = {\n get,\n enumerable: true,\n configurable: true\n };\n\n catchError(() => Object.defineProperty(instance, propertyKey, descriptor));\n }\n\n /**\n *\n * @param instance\n * @param propertyKey\n * @param useType\n * @param options\n */\n public bindInterceptor(instance: any, {propertyKey, useType, options}: InjectablePropertyOptions) {\n const target = classOf(instance);\n const originalMethod = instance[propertyKey];\n\n instance[propertyKey] = (...args: any[]) => {\n const next = (err?: Error) => {\n if (!err) {\n return originalMethod.apply(instance, args);\n }\n\n throw err;\n };\n\n const context: InterceptorContext<any> = {\n target,\n propertyKey,\n args,\n options,\n next\n };\n\n const interceptor = this.get<InterceptorMethods>(useType)!;\n\n return interceptor.intercept!(\n {\n ...context,\n options\n },\n next\n );\n };\n }\n\n /**\n * Allow handler hack for AsyncHookContext plugin.\n * @param ctx\n * @param cb\n * @protected\n */\n runInContext(ctx: DIContext, cb: any) {\n return cb();\n }\n\n async lazyInvoke<T = any>(token: TokenProvider) {\n let instance = this.getInstance(token);\n\n if (!instance) {\n instance = await this.invoke<T>(token);\n\n if (isFunction(instance?.$onInit)) {\n await instance.$onInit();\n }\n }\n\n return instance;\n }\n\n /**\n * Emit an event to all service. See service [lifecycle hooks](/docs/services.md#lifecycle-hooks).\n * @param eventName The event name to emit at all services.\n * @param args List of the parameters to give to each services.\n * @returns {Promise<any[]>} A list of promises.\n */\n public async emit(eventName: string, ...args: any[]) {\n return this.#cache.emit(eventName, ...args);\n }\n\n /**\n * @param eventName\n * @param value\n * @param args\n */\n public alter<T = any>(eventName: string, value: any, ...args: any[]): T {\n return this.#cache.alter(eventName, value, ...args);\n }\n\n /**\n * @param eventName\n * @param value\n * @param args\n */\n public async alterAsync<T = any>(eventName: string, value: any, ...args: any[]): Promise<T> {\n return this.#cache.alterAsync(eventName, value, ...args);\n }\n\n async destroy() {\n await this.#cache.destroy();\n }\n\n protected ensureProvider(token: TokenProvider): Provider | undefined {\n if (!this.hasProvider(token) && GlobalProviders.has(token)) {\n this.addProvider(token);\n }\n\n return this.getProvider(token)!;\n }\n\n protected getInstance(token: any) {\n return this.#cache.get(token);\n }\n\n /**\n * Invoke a class method and inject service.\n *\n * #### IInjectableMethod options\n *\n * * **target**: Optional. The class instance.\n * * **methodName**: `string` Optional. The method name.\n * * **designParamTypes**: `any[]` Optional. List of injectable types.\n * * **locals**: `Map<Function, any>` Optional. If preset then any argument Class are read from this object first, before the `InjectorService` is consulted.\n *\n * #### Example\n *\n * @param target\n * @param locals\n * @param options\n * @private\n */\n private resolve<T>(target: TokenProvider, locals: Map<TokenProvider, any>, options: Partial<InvokeOptions<T>> = {}): Promise<T> {\n const resolvedOpts = this.mapInvokeOptions(target, locals, options);\n const {token, deps, construct, imports, provider} = resolvedOpts;\n\n if (provider) {\n GlobalProviders.onInvoke(provider, locals, {...resolvedOpts, injector: this});\n }\n\n let instance: any;\n let currentDependency: any = false;\n\n try {\n const invokeDependency = (parent?: any) => (token: any, index: number): any => {\n currentDependency = {token, index, deps};\n\n if (token !== DI_PARAM_OPTIONS) {\n const options = provider?.store?.get(`${DI_PARAM_OPTIONS}:${index}`);\n\n locals.set(DI_PARAM_OPTIONS, options || {});\n }\n\n return isInheritedFrom(token, Provider, 1) ? provider : this.invoke(token, locals, {parent});\n };\n\n // Invoke manually imported providers\n imports.forEach(invokeDependency());\n\n // Inject dependencies\n const services = deps.map(invokeDependency(token));\n\n currentDependency = false;\n\n instance = construct(services);\n } catch (error) {\n InjectionError.throwInjectorError(token, currentDependency, error);\n }\n\n if (instance === undefined) {\n throw new InjectionError(\n token,\n `Unable to create new instance from undefined value. Check your provider declaration for ${nameOf(token)}`\n );\n }\n\n if (instance && isClass(classOf(instance))) {\n this.bindInjectableProperties(instance, locals, options);\n }\n\n return instance;\n }\n\n /**\n * Create options to invoke a provider or class.\n * @param token\n * @param locals\n * @param options\n */\n private mapInvokeOptions(token: TokenProvider, locals: Map<TokenProvider, any>, options: Partial<InvokeOptions>): ResolvedInvokeOptions {\n let imports: TokenProvider[] | undefined = options.imports;\n let deps: TokenProvider[] | undefined = options.deps;\n let scope = options.scope;\n let construct;\n\n if (!token) {\n throw new UndefinedTokenError();\n }\n\n let provider: Provider;\n\n if (!this.hasProvider(token)) {\n provider = new Provider(token);\n\n this.resolvers.forEach((resolver) => {\n const result = resolver.get(token, locals.get(DI_PARAM_OPTIONS));\n\n if (result !== undefined) {\n provider.useFactory = () => result;\n }\n });\n } else {\n provider = this.getProvider(token)!;\n }\n\n scope = scope || this.scopeOf(provider);\n deps = deps || provider.deps;\n imports = imports || provider.imports;\n\n if (provider.useValue !== undefined) {\n construct = () => (isFunction(provider.useValue) ? provider.useValue() : provider.useValue);\n } else if (provider.useFactory) {\n construct = (deps: TokenProvider[]) => provider.useFactory(...deps);\n } else if (provider.useAsyncFactory) {\n construct = async (deps: TokenProvider[]) => {\n deps = await Promise.all(deps);\n return provider.useAsyncFactory(...deps);\n };\n } else {\n // useClass\n deps = deps || Metadata.getParamTypes(provider.useClass);\n construct = (deps: TokenProvider[]) => new provider.useClass(...deps);\n }\n\n return {\n token,\n scope: scope || Store.from(token).get(\"scope\") || ProviderScope.SINGLETON,\n deps: deps! || [],\n imports: imports || [],\n construct,\n provider\n };\n }\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// istanbul ignore next
|
|
2
|
+
const colorIfAllowed = (colorFn) => (text) => !process.env.NO_COLOR && process.env.NODE_ENV !== "production" ? colorFn(text) : text;
|
|
3
|
+
const red = colorIfAllowed((text) => `\x1B[31m${text}\x1B[39m`);
|
|
4
|
+
const yellow = colorIfAllowed((text) => `\x1B[33m${text}\x1B[39m`);
|
|
5
|
+
const green = colorIfAllowed((text) => `\x1B[32m${text}\x1B[39m`);
|
|
6
|
+
export const colors = { red, yellow, green };
|
|
7
|
+
//# sourceMappingURL=colors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.js","sourceRoot":"","sources":["../../../src/utils/colors.ts"],"names":[],"mappings":"AAEA,uBAAuB;AACvB,MAAM,cAAc,GAAG,CAAC,OAAoB,EAAE,EAAE,CAAC,CAAC,IAAY,EAAE,EAAE,CAChE,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAExF,MAAM,GAAG,GAAG,cAAc,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,WAAW,IAAI,UAAU,CAAC,CAAC;AACxE,MAAM,MAAM,GAAG,cAAc,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,WAAW,IAAI,UAAU,CAAC,CAAC;AAC3E,MAAM,KAAK,GAAG,cAAc,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,WAAW,IAAI,UAAU,CAAC,CAAC;AAE1E,MAAM,CAAC,MAAM,MAAM,GAAG,EAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAC,CAAC","sourcesContent":["type ColorTextFn = (text: string) => string;\n\n// istanbul ignore next\nconst colorIfAllowed = (colorFn: ColorTextFn) => (text: string) =>\n !process.env.NO_COLOR && process.env.NODE_ENV !== \"production\" ? colorFn(text) : text;\n\nconst red = colorIfAllowed((text: string) => `\\x1B[31m${text}\\x1B[39m`);\nconst yellow = colorIfAllowed((text: string) => `\\x1B[33m${text}\\x1B[39m`);\nconst green = colorIfAllowed((text: string) => `\\x1B[32m${text}\\x1B[39m`);\n\nexport const colors = {red, yellow, green};\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Container } from "../domain/Container";
|
|
2
|
+
import { GlobalProviders } from "../registries/GlobalProviders";
|
|
3
|
+
export function createContainer(rootModule) {
|
|
4
|
+
const container = new Container(GlobalProviders.entries());
|
|
5
|
+
if (rootModule) {
|
|
6
|
+
container.delete(rootModule);
|
|
7
|
+
}
|
|
8
|
+
return container;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=createContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createContainer.js","sourceRoot":"","sources":["../../../src/utils/createContainer.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAC,eAAe,EAAC,MAAM,+BAA+B,CAAC;AAE9D,MAAM,UAAU,eAAe,CAAC,UAAsB;IACpD,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC,CAAC;IAE3D,IAAI,UAAU,EAAE;QACd,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;KAC9B;IAED,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport {Container} from \"../domain/Container\";\nimport {GlobalProviders} from \"../registries/GlobalProviders\";\n\nexport function createContainer(rootModule?: Type<any>) {\n const container = new Container(GlobalProviders.entries());\n\n if (rootModule) {\n container.delete(rootModule);\n }\n\n return container;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Test1.js","sourceRoot":"","sources":["../../../../src/utils/data/Test1.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC;AAE9B,MAAM,OAAO,KAAK;CAAG","sourcesContent":["export const value1 = \"value\";\n\nexport class Test1 {}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Test2.js","sourceRoot":"","sources":["../../../../src/utils/data/Test2.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC;AAE9B,MAAM,OAAO,KAAK;CAAG","sourcesContent":["export const value2 = \"value\";\n\nexport class Test2 {}\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { deepMerge, Store } from "@tsed/core";
|
|
2
|
+
export function getConfiguration(module, configuration = {}) {
|
|
3
|
+
const store = Store.from(module).get("configuration") || {};
|
|
4
|
+
const config = {
|
|
5
|
+
...store,
|
|
6
|
+
...configuration
|
|
7
|
+
};
|
|
8
|
+
if (store.mount && configuration.mount) {
|
|
9
|
+
config.mount = deepMerge(store.mount, configuration.mount);
|
|
10
|
+
}
|
|
11
|
+
if (store.componentsScan && configuration.componentsScan) {
|
|
12
|
+
config.componentsScan = [...store.componentsScan, ...configuration.componentsScan];
|
|
13
|
+
}
|
|
14
|
+
return config;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=getConfiguration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getConfiguration.js","sourceRoot":"","sources":["../../../src/utils/getConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,KAAK,EAAO,MAAM,YAAY,CAAC;AAElD,MAAM,UAAU,gBAAgB,CAAC,MAAiB,EAAE,gBAAqB,EAAE;IACzE,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;IAE5D,MAAM,MAAM,GAAG;QACb,GAAG,KAAK;QACR,GAAG,aAAa;KACjB,CAAC;IAEF,IAAI,KAAK,CAAC,KAAK,IAAI,aAAa,CAAC,KAAK,EAAE;QACtC,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC;KAC5D;IAED,IAAI,KAAK,CAAC,cAAc,IAAI,aAAa,CAAC,cAAc,EAAE;QACxD,MAAM,CAAC,cAAc,GAAG,CAAC,GAAG,KAAK,CAAC,cAAc,EAAE,GAAG,aAAa,CAAC,cAAc,CAAC,CAAC;KACpF;IAED,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import {deepMerge, Store, Type} from \"@tsed/core\";\n\nexport function getConfiguration(module: Type<any>, configuration: any = {}) {\n const store = Store.from(module).get(\"configuration\") || {};\n\n const config = {\n ...store,\n ...configuration\n };\n\n if (store.mount && configuration.mount) {\n config.mount = deepMerge(store.mount, configuration.mount);\n }\n\n if (store.componentsScan && configuration.componentsScan) {\n config.componentsScan = [...store.componentsScan, ...configuration.componentsScan];\n }\n\n return config;\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @ignore
|
|
3
|
+
* @param injector
|
|
4
|
+
*/
|
|
5
|
+
export function setLoggerLevel(injector) {
|
|
6
|
+
var _a;
|
|
7
|
+
const level = (_a = injector.settings.logger) === null || _a === void 0 ? void 0 : _a.level;
|
|
8
|
+
if (level) {
|
|
9
|
+
injector.logger.level = level;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=setLoggerLevel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setLoggerLevel.js","sourceRoot":"","sources":["../../../src/utils/setLoggerLevel.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,QAAyB;;IACtD,MAAM,KAAK,GAAG,MAAA,QAAQ,CAAC,QAAQ,CAAC,MAAM,0CAAE,KAAK,CAAC;IAE9C,IAAI,KAAK,EAAE;QACT,QAAQ,CAAC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;KAC/B;AACH,CAAC","sourcesContent":["import {InjectorService} from \"../services/InjectorService\";\n\n/**\n * @ignore\n * @param injector\n */\nexport function setLoggerLevel(injector: InjectorService) {\n const level = injector.settings.logger?.level;\n\n if (level) {\n injector.logger.level = level;\n }\n}\n"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Type } from "@tsed/core";
|
|
2
|
+
import { IProvider } from "../interfaces/IProvider";
|
|
3
|
+
export declare 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<IProvider<any>> {
|
|
10
|
+
path?: PathType;
|
|
11
|
+
children?: Type<any>[];
|
|
12
|
+
routerOptions?: any;
|
|
13
|
+
middlewares?: Partial<ControllerMiddlewares>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Declare a new controller with his Rest path. His methods annotated will be collected to build the routing list.
|
|
17
|
+
* This routing listing will be built with the `express.Router` object.
|
|
18
|
+
*
|
|
19
|
+
* ::: tip
|
|
20
|
+
* See [Controllers](/docs/controllers.md) section for more details
|
|
21
|
+
* :::
|
|
22
|
+
*
|
|
23
|
+
* ```typescript
|
|
24
|
+
* @Controller("/calendars")
|
|
25
|
+
* export provide CalendarCtrl {
|
|
26
|
+
*
|
|
27
|
+
* @Get("/:id")
|
|
28
|
+
* public get(
|
|
29
|
+
* @Req() request: Req,
|
|
30
|
+
* @Res() response: Res,
|
|
31
|
+
* @Next() next: Next
|
|
32
|
+
* ): void {
|
|
33
|
+
*
|
|
34
|
+
* }
|
|
35
|
+
* }
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @param options
|
|
39
|
+
* @controller
|
|
40
|
+
* @decorator
|
|
41
|
+
* @classDecorator
|
|
42
|
+
*/
|
|
43
|
+
export declare function Controller(options: PathType | ControllerOptions): ClassDecorator;
|
|
@@ -2,6 +2,7 @@ export * from "./scope";
|
|
|
2
2
|
export * from "./service";
|
|
3
3
|
export * from "./overrideProvider";
|
|
4
4
|
export * from "./inject";
|
|
5
|
+
export * from "./lazyInject";
|
|
5
6
|
export * from "./injectable";
|
|
6
7
|
export * from "./constant";
|
|
7
8
|
export * from "./value";
|
|
@@ -11,3 +12,4 @@ export * from "./configuration";
|
|
|
11
12
|
export * from "./module";
|
|
12
13
|
export * from "./opts";
|
|
13
14
|
export * from "./useOpts";
|
|
15
|
+
export * from "./controller";
|
|
@@ -12,7 +12,8 @@ import type { IProvider } from "../interfaces";
|
|
|
12
12
|
* ### Options
|
|
13
13
|
*
|
|
14
14
|
* - type (@@ProviderType@@ or `string`): Kind of provider. (Default: `ProviderType.PROVIDER`)
|
|
15
|
-
* - scope (@@ProviderScope
|
|
15
|
+
* - scope (@@ProviderScope@@): Kind of provider. (Default: `ProviderScope.SINGLETON`)
|
|
16
|
+
* - provide (@@TokenProvider@@): An injection token (Note: This option override default metadata generated by Typescript).
|
|
16
17
|
* - deps (`Type<any>`): List of class or provider which will be injected to the constructor (Note: This options override default metadata generated by Typescript).
|
|
17
18
|
*
|
|
18
19
|
* @returns {Function}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,43 @@
|
|
|
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;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { IProvider } from "../interfaces/IProvider";
|
|
2
2
|
import type { ProviderType } from "./ProviderType";
|
|
3
3
|
import type { TokenProvider } from "../interfaces/TokenProvider";
|
|
4
|
-
import { LocalsContainer } from "./LocalsContainer";
|
|
5
4
|
import { Provider } from "./Provider";
|
|
6
|
-
export declare class Container extends
|
|
5
|
+
export declare class Container extends Map<TokenProvider, Provider> {
|
|
7
6
|
/**
|
|
8
7
|
*
|
|
9
8
|
* @param token
|
|
@@ -32,7 +31,7 @@ export declare class Container extends LocalsContainer<Provider> {
|
|
|
32
31
|
* @returns {T} Returns the element associated with the specified key or undefined if the key can't be found in the Map object.
|
|
33
32
|
* @param token
|
|
34
33
|
*/
|
|
35
|
-
getProvider(token: TokenProvider):
|
|
34
|
+
getProvider<T extends Provider = Provider>(token: TokenProvider): T | undefined;
|
|
36
35
|
/**
|
|
37
36
|
* Get all providers registered in the injector container.
|
|
38
37
|
*
|
|
@@ -11,13 +11,17 @@ export interface ContextLoggerOptions extends Record<string, any> {
|
|
|
11
11
|
additionalProps?: Record<any, any>;
|
|
12
12
|
}
|
|
13
13
|
export declare class ContextLogger {
|
|
14
|
-
#private;
|
|
15
14
|
private logger;
|
|
16
15
|
id: string;
|
|
17
16
|
url: string;
|
|
18
17
|
minimalRequestPicker: Function;
|
|
19
18
|
completeRequestPicker: Function;
|
|
20
19
|
maxStackSize: number;
|
|
20
|
+
private readonly additionalProps;
|
|
21
|
+
private readonly dateStart;
|
|
22
|
+
private readonly ignoreLog;
|
|
23
|
+
private stack;
|
|
24
|
+
private level;
|
|
21
25
|
constructor(logger: any, { id, url, dateStart, ignoreUrlPatterns, minimalRequestPicker, completeRequestPicker, level, maxStackSize, ignoreLog, additionalProps }: ContextLoggerOptions);
|
|
22
26
|
info(obj: any): this;
|
|
23
27
|
debug(obj: any, withRequest?: boolean): this;
|
|
@@ -22,7 +22,6 @@ export interface DIContextOptions extends Omit<ContextLoggerOptions, "dateStart"
|
|
|
22
22
|
injector?: InjectorService;
|
|
23
23
|
}
|
|
24
24
|
export declare class DIContext extends Map<any, any> implements ContextMethods {
|
|
25
|
-
#private;
|
|
26
25
|
[x: string]: any;
|
|
27
26
|
/**
|
|
28
27
|
* Request id generated by @@contextMiddleware@@.
|
|
@@ -54,18 +53,18 @@ export declare class DIContext extends Map<any, any> implements ContextMethods {
|
|
|
54
53
|
*/
|
|
55
54
|
readonly dateStart: Date;
|
|
56
55
|
/**
|
|
57
|
-
*
|
|
56
|
+
* The request container used by the Ts.ED DI. It contain all services annotated with `@Scope(ProviderScope.REQUEST)`
|
|
58
57
|
*/
|
|
59
|
-
|
|
60
|
-
constructor({ id, injector, logger, ignoreLog, ...options }: DIContextOptions);
|
|
58
|
+
container: LocalsContainer<any>;
|
|
61
59
|
/**
|
|
62
|
-
*
|
|
60
|
+
* Logger attached to the context request.
|
|
63
61
|
*/
|
|
64
|
-
|
|
62
|
+
logger: ContextLogger;
|
|
65
63
|
/**
|
|
66
64
|
*
|
|
67
65
|
*/
|
|
68
|
-
|
|
66
|
+
injector: InjectorService;
|
|
67
|
+
constructor({ id, injector, logger, ignoreLog, ...options }: DIContextOptions);
|
|
69
68
|
get env(): any;
|
|
70
69
|
destroy(): Promise<void>;
|
|
71
70
|
emit(eventName: string, ...args: any[]): Promise<void>;
|
|
File without changes
|
|
File without changes
|
|
@@ -3,15 +3,16 @@ import { IProvider, TokenProvider } from "../interfaces";
|
|
|
3
3
|
import { ProviderScope } from "./ProviderScope";
|
|
4
4
|
import { ProviderType } from "./ProviderType";
|
|
5
5
|
export declare class Provider<T = any> implements IProvider<T> {
|
|
6
|
-
#private;
|
|
7
6
|
type: ProviderType | any;
|
|
8
|
-
instance: T;
|
|
9
7
|
deps: TokenProvider[];
|
|
10
8
|
imports: any[];
|
|
11
9
|
useFactory: Function;
|
|
12
10
|
useAsyncFactory: Function;
|
|
13
11
|
useValue: any;
|
|
14
|
-
_useClass
|
|
12
|
+
private _useClass;
|
|
13
|
+
private _provide;
|
|
14
|
+
private _store;
|
|
15
|
+
private _tokenStore;
|
|
15
16
|
[key: string]: any;
|
|
16
17
|
constructor(token: TokenProvider, options?: Partial<Provider>);
|
|
17
18
|
get token(): any;
|
|
@@ -26,6 +27,8 @@ export declare class Provider<T = any> implements IProvider<T> {
|
|
|
26
27
|
get className(): string;
|
|
27
28
|
get name(): string;
|
|
28
29
|
get store(): Store;
|
|
30
|
+
get path(): string;
|
|
31
|
+
set path(path: string);
|
|
29
32
|
/**
|
|
30
33
|
* Get the scope of the provider.
|
|
31
34
|
*
|
|
@@ -43,8 +46,19 @@ export declare class Provider<T = any> implements IProvider<T> {
|
|
|
43
46
|
set scope(scope: ProviderScope);
|
|
44
47
|
get configuration(): Partial<TsED.Configuration>;
|
|
45
48
|
set configuration(configuration: Partial<TsED.Configuration>);
|
|
49
|
+
get children(): TokenProvider[];
|
|
46
50
|
get(key: string): any;
|
|
47
51
|
isAsync(): boolean;
|
|
48
52
|
clone(): Provider;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @returns {boolean}
|
|
56
|
+
*/
|
|
57
|
+
hasChildren(): boolean;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @returns {boolean}
|
|
61
|
+
*/
|
|
62
|
+
hasParent(): boolean;
|
|
49
63
|
toString(): string;
|
|
50
64
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import type { InjectablePropertyType } from "../domain/InjectablePropertyType";
|
|
2
2
|
import type { TokenProvider } from "./TokenProvider";
|
|
3
|
+
import type { InjectorService } from "../services/InjectorService";
|
|
4
|
+
import type { InvokeOptions } from "./InvokeOptions";
|
|
3
5
|
export interface InjectableProperty {
|
|
4
6
|
propertyKey: string;
|
|
5
7
|
}
|
|
6
|
-
export interface
|
|
8
|
+
export interface InjectablePropertyOptions extends InjectableProperty {
|
|
7
9
|
bindingType: InjectablePropertyType.METHOD | InjectablePropertyType.PROPERTY | InjectablePropertyType.INTERCEPTOR;
|
|
8
10
|
propertyType: string;
|
|
9
|
-
useType
|
|
10
|
-
|
|
11
|
+
useType?: TokenProvider;
|
|
12
|
+
resolver: (injector: InjectorService, locals: Map<TokenProvider, any>, options: Partial<InvokeOptions> & {
|
|
13
|
+
options: any;
|
|
14
|
+
}) => () => any;
|
|
11
15
|
options?: any;
|
|
12
16
|
}
|
|
13
17
|
export interface InjectablePropertyValue extends InjectableProperty {
|
|
@@ -16,5 +20,5 @@ export interface InjectablePropertyValue extends InjectableProperty {
|
|
|
16
20
|
defaultValue?: any;
|
|
17
21
|
}
|
|
18
22
|
export interface InjectableProperties {
|
|
19
|
-
[key: string]:
|
|
23
|
+
[key: string]: InjectablePropertyOptions | InjectablePropertyValue;
|
|
20
24
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Type } from "@tsed/core";
|
|
2
2
|
import type { Provider } from "../domain";
|
|
3
|
+
import type { InjectorService } from "../services/InjectorService";
|
|
4
|
+
import type { ResolvedInvokeOptions } from "./ResolvedInvokeOptions";
|
|
3
5
|
/**
|
|
4
6
|
* @ignore
|
|
5
7
|
*/
|
|
@@ -10,7 +12,9 @@ export interface RegistrySettings {
|
|
|
10
12
|
*
|
|
11
13
|
* @param provider
|
|
12
14
|
* @param {Map<string | Function, any>} locals
|
|
13
|
-
* @param
|
|
15
|
+
* @param options
|
|
14
16
|
*/
|
|
15
|
-
onInvoke?(provider: Provider, locals: Map<string | Function, any>,
|
|
17
|
+
onInvoke?(provider: Provider, locals: Map<string | Function, any>, options: ResolvedInvokeOptions & {
|
|
18
|
+
injector: InjectorService;
|
|
19
|
+
}): void;
|
|
16
20
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Provider } from "../domain/Provider";
|
|
2
|
+
import type { ProviderScope } from "../domain/ProviderScope";
|
|
3
|
+
import type { TokenProvider } from "./TokenProvider";
|
|
4
|
+
export interface ResolvedInvokeOptions {
|
|
5
|
+
token: TokenProvider;
|
|
6
|
+
parent?: TokenProvider;
|
|
7
|
+
scope: ProviderScope;
|
|
8
|
+
deps: TokenProvider[];
|
|
9
|
+
imports: TokenProvider[];
|
|
10
|
+
provider: Provider;
|
|
11
|
+
construct(deps: TokenProvider[]): any;
|
|
12
|
+
}
|
|
File without changes
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Type } from "@tsed/core";
|
|
2
2
|
import { Provider } from "../domain/Provider";
|
|
3
3
|
import type { IProvider, RegistrySettings, TokenProvider } from "../interfaces";
|
|
4
|
+
import type { InjectorService } from "../services/InjectorService";
|
|
5
|
+
import { ResolvedInvokeOptions } from "../interfaces/ResolvedInvokeOptions";
|
|
4
6
|
export declare class GlobalProviderRegistry extends Map<TokenProvider, Provider> {
|
|
5
7
|
#private;
|
|
6
8
|
/**
|
|
@@ -34,7 +36,9 @@ export declare class GlobalProviderRegistry extends Map<TokenProvider, Provider>
|
|
|
34
36
|
*/
|
|
35
37
|
delete(key: TokenProvider): boolean;
|
|
36
38
|
createRegistry(type: string, model: Type<Provider>, options?: Partial<RegistrySettings>): this;
|
|
37
|
-
onInvoke(provider: Provider, locals: Map<TokenProvider, any>,
|
|
39
|
+
onInvoke(provider: Provider, locals: Map<TokenProvider, any>, options: ResolvedInvokeOptions & {
|
|
40
|
+
injector: InjectorService;
|
|
41
|
+
}): void;
|
|
38
42
|
getRegistrySettings(target: string | TokenProvider): RegistrySettings;
|
|
39
43
|
createRegisterFn(type: string): (provider: any | IProvider, instance?: any) => void;
|
|
40
44
|
/**
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -4,6 +4,9 @@ export interface DITestInvokeOptions {
|
|
|
4
4
|
token?: TokenProvider;
|
|
5
5
|
use: any;
|
|
6
6
|
}
|
|
7
|
+
export interface DITestOptions extends Partial<TsED.Configuration> {
|
|
8
|
+
imports?: DITestInvokeOptions[];
|
|
9
|
+
}
|
|
7
10
|
/**
|
|
8
11
|
* Tool to run test with lightweight DI sandbox.
|
|
9
12
|
*/
|
|
@@ -12,7 +15,8 @@ export declare class DITest {
|
|
|
12
15
|
static get injector(): InjectorService;
|
|
13
16
|
static set injector(injector: InjectorService);
|
|
14
17
|
static hasInjector(): boolean;
|
|
15
|
-
static create(settings?:
|
|
18
|
+
static create(settings?: DITestOptions): Promise<void>;
|
|
19
|
+
static createContainer(settings?: DITestOptions): Promise<void>;
|
|
16
20
|
/**
|
|
17
21
|
* Create a new injector with the right default services
|
|
18
22
|
*/
|