@tsed/di 8.33.0 → 8.35.0

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.
Files changed (44) hide show
  1. package/lib/esm/browser/fn/context.js +2 -2
  2. package/lib/esm/common/decorators/autoInjectable.js +2 -2
  3. package/lib/esm/common/decorators/configuration.js +3 -3
  4. package/lib/esm/common/decorators/constant.js +1 -1
  5. package/lib/esm/common/decorators/controller.js +1 -1
  6. package/lib/esm/common/decorators/inject.js +4 -4
  7. package/lib/esm/common/decorators/intercept.js +1 -1
  8. package/lib/esm/common/decorators/lazyInject.js +1 -1
  9. package/lib/esm/common/decorators/module.js +3 -3
  10. package/lib/esm/common/decorators/opts.js +2 -2
  11. package/lib/esm/common/decorators/overrideProvider.js +1 -1
  12. package/lib/esm/common/decorators/scope.js +1 -1
  13. package/lib/esm/common/decorators/useOpts.js +2 -2
  14. package/lib/esm/common/domain/ContextLogger.js +2 -2
  15. package/lib/esm/common/domain/DIContext.js +1 -1
  16. package/lib/esm/common/domain/Provider.js +4 -4
  17. package/lib/esm/common/errors/InjectionError.js +1 -1
  18. package/lib/esm/common/extends/intercept.js +1 -1
  19. package/lib/esm/common/fn/inject.js +1 -1
  20. package/lib/esm/common/fn/injectable.js +1 -1
  21. package/lib/esm/common/fn/lazyInject.js +1 -1
  22. package/lib/esm/common/fn/localsContainer.js +1 -1
  23. package/lib/esm/common/services/DIConfiguration.js +1 -1
  24. package/lib/esm/common/services/InjectorService.js +10 -10
  25. package/lib/esm/common/utils/setLoggerFormat.js +1 -1
  26. package/lib/esm/node/fn/context.js +2 -2
  27. package/lib/esm/node/services/DITest.js +4 -4
  28. package/lib/types/common/decorators/controller.d.ts +1 -1
  29. package/lib/types/common/decorators/inject.d.ts +1 -1
  30. package/lib/types/common/decorators/intercept.d.ts +1 -1
  31. package/lib/types/common/domain/Container.d.ts +2 -2
  32. package/lib/types/common/domain/ContextLogger.d.ts +2 -2
  33. package/lib/types/common/domain/DIContext.d.ts +1 -1
  34. package/lib/types/common/domain/Provider.d.ts +2 -2
  35. package/lib/types/common/domain/ProviderBuilder.d.ts +3 -3
  36. package/lib/types/common/fn/configuration.d.ts +1 -1
  37. package/lib/types/common/interfaces/DIConfigurationOptions.d.ts +1 -1
  38. package/lib/types/common/interfaces/ProviderOpts.d.ts +1 -1
  39. package/lib/types/common/interfaces/RegistrySettings.d.ts +1 -1
  40. package/lib/types/common/services/DIConfiguration.d.ts +1 -1
  41. package/lib/types/common/services/InjectorService.d.ts +2 -2
  42. package/lib/types/common/utils/createContainer.d.ts +1 -1
  43. package/lib/types/node/services/DITest.d.ts +1 -1
  44. package/package.json +7 -8
@@ -1,7 +1,7 @@
1
- import { v4 } from "uuid";
2
1
  import { DIContext } from "../../common/domain/DIContext.js";
3
- import { injector } from "../../common/index.js";
4
2
  import { getContext } from "../utils/asyncHookContext.js";
3
+ import { injector } from "../../common/index.js";
4
+ import { v4 } from "uuid";
5
5
  /**
6
6
  * Get the current DIContext instance using async hook node.js api.
7
7
  *
@@ -1,7 +1,7 @@
1
- import { isArray } from "@tsed/core/utils/isArray.js";
2
1
  import { LocalsContainer } from "../domain/LocalsContainer.js";
3
- import { injector } from "../fn/injector.js";
4
2
  import { getConstructorDependencies } from "../utils/getConstructorDependencies.js";
3
+ import { injector } from "../fn/injector.js";
4
+ import { isArray } from "@tsed/core/utils/isArray.js";
5
5
  function resolveAutoInjectableArgs(token, args) {
6
6
  const inj = injector();
7
7
  const locals = new LocalsContainer();
@@ -1,10 +1,10 @@
1
+ import { DIConfiguration } from "../services/DIConfiguration.js";
1
2
  import { DecoratorTypes } from "@tsed/core/types/DecoratorTypes.js";
2
- import { decoratorTypeOf } from "@tsed/core/utils/decoratorTypeOf.js";
3
+ import { Inject } from "./inject.js";
3
4
  import { configuration } from "../fn/configuration.js";
5
+ import { decoratorTypeOf } from "@tsed/core/utils/decoratorTypeOf.js";
4
6
  import { injectable } from "../fn/injectable.js";
5
7
  import { injector } from "../fn/injector.js";
6
- import { DIConfiguration } from "../services/DIConfiguration.js";
7
- import { Inject } from "./inject.js";
8
8
  export function Configuration(settings = {}) {
9
9
  return (...args) => {
10
10
  switch (decoratorTypeOf(args)) {
@@ -1,6 +1,6 @@
1
1
  import { catchError } from "@tsed/core/utils/catchError.js";
2
- import { deepClone } from "@tsed/core/utils/deepClone.js";
3
2
  import { constant } from "../fn/constant.js";
3
+ import { deepClone } from "@tsed/core/utils/deepClone.js";
4
4
  export function bindConstant(target, propertyKey, expression, defaultValue) {
5
5
  const symbol = Symbol();
6
6
  catchError(() => Reflect.deleteProperty(target, propertyKey));
@@ -1,8 +1,8 @@
1
1
  import { Store } from "@tsed/core/types/Store.js";
2
2
  import { classOf } from "@tsed/core/utils/classOf.js";
3
+ import { controller } from "../fn/injectable.js";
3
4
  import { isArrayOrArrayClass } from "@tsed/core/utils/isArray.js";
4
5
  import { useDecorators } from "@tsed/core/utils/useDecorators.js";
5
- import { controller } from "../fn/injectable.js";
6
6
  function mapOptions(options) {
7
7
  if (typeof options === "string" || options instanceof RegExp || isArrayOrArrayClass(options)) {
8
8
  return {
@@ -1,14 +1,14 @@
1
+ import { DI_INJECTABLE_PROPS, DI_INVOKE_OPTIONS, DI_USE_OPTIONS } from "../constants/constants.js";
2
+ import { getConstructorDependencies, setConstructorDependencies } from "../utils/getConstructorDependencies.js";
1
3
  import { DecoratorTypes } from "@tsed/core/types/DecoratorTypes.js";
4
+ import { InvalidPropertyTokenError } from "../errors/InvalidPropertyTokenError.js";
2
5
  import { Metadata } from "@tsed/core/types/Metadata.js";
3
6
  import { Store } from "@tsed/core/types/Store.js";
4
7
  import { catchError } from "@tsed/core/utils/catchError.js";
5
8
  import { decoratorTypeOf } from "@tsed/core/utils/decoratorTypeOf.js";
6
- import { isPromise } from "@tsed/core/utils/isPromise.js";
7
- import { DI_INJECTABLE_PROPS, DI_INVOKE_OPTIONS, DI_USE_OPTIONS } from "../constants/constants.js";
8
- import { InvalidPropertyTokenError } from "../errors/InvalidPropertyTokenError.js";
9
9
  import { inject } from "../fn/inject.js";
10
10
  import { injectMany } from "../fn/injectMany.js";
11
- import { getConstructorDependencies, setConstructorDependencies } from "../utils/getConstructorDependencies.js";
11
+ import { isPromise } from "@tsed/core/utils/isPromise.js";
12
12
  function setToken(token, { target, propertyKey, parameterIndex }) {
13
13
  const paramTypes = getConstructorDependencies(target, propertyKey);
14
14
  const type = paramTypes[parameterIndex];
@@ -1,9 +1,9 @@
1
+ import { DI_INTERCEPTOR_OPTIONS, DI_INVOKE_OPTIONS } from "../constants/constants.js";
1
2
  import { DecoratorTypes } from "@tsed/core/types/DecoratorTypes.js";
2
3
  import { Store } from "@tsed/core/types/Store.js";
3
4
  import { classOf } from "@tsed/core/utils/classOf.js";
4
5
  import { decorateMethodsOf } from "@tsed/core/utils/decorateMethodsOf.js";
5
6
  import { decoratorTypeOf } from "@tsed/core/utils/decoratorTypeOf.js";
6
- import { DI_INTERCEPTOR_OPTIONS, DI_INVOKE_OPTIONS } from "../constants/constants.js";
7
7
  import { inject } from "../fn/inject.js";
8
8
  export function getInterceptorOptions(target, propertyKey) {
9
9
  return Store.fromMethod(target, propertyKey).get(DI_INTERCEPTOR_OPTIONS);
@@ -1,6 +1,6 @@
1
+ import { lazyInject, optionalLazyInject } from "../fn/lazyInject.js";
1
2
  import { catchError } from "@tsed/core/utils/catchError.js";
2
3
  import { isFunction } from "@tsed/core/utils/isFunction.js";
3
- import { lazyInject, optionalLazyInject } from "../fn/lazyInject.js";
4
4
  function mapOptions(args, optional = false) {
5
5
  function wrap(key, resolver) {
6
6
  return async () => {
@@ -1,8 +1,8 @@
1
- import { useDecorators } from "@tsed/core/utils/useDecorators.js";
2
- import { ProviderScope } from "../domain/ProviderScope.js";
3
- import { ProviderType } from "../domain/ProviderType.js";
4
1
  import { Configuration } from "./configuration.js";
5
2
  import { Injectable } from "./injectable.js";
3
+ import { ProviderScope } from "../domain/ProviderScope.js";
4
+ import { ProviderType } from "../domain/ProviderType.js";
5
+ import { useDecorators } from "@tsed/core/utils/useDecorators.js";
6
6
  /**
7
7
  * Declare a Ts.ED module to organize related providers and configuration.
8
8
  *
@@ -1,8 +1,8 @@
1
- import { classOf } from "@tsed/core/utils/classOf.js";
2
1
  import { DI_USE_PARAM_OPTIONS } from "../constants/constants.js";
3
- import { ProviderScope } from "../domain/ProviderScope.js";
4
2
  import { Inject } from "./inject.js";
3
+ import { ProviderScope } from "../domain/ProviderScope.js";
5
4
  import { Scope } from "./scope.js";
5
+ import { classOf } from "@tsed/core/utils/classOf.js";
6
6
  /**
7
7
  * Inject custom options passed to a provider instance.
8
8
  *
@@ -1,5 +1,5 @@
1
- import { nameOf } from "@tsed/core";
2
1
  import { Provider } from "../domain/Provider.js";
2
+ import { nameOf } from "@tsed/core";
3
3
  /**
4
4
  * Override an existing provider registration with a new implementation.
5
5
  *
@@ -1,5 +1,5 @@
1
- import { StoreSet } from "@tsed/core/decorators/storeSet.js";
2
1
  import { ProviderScope } from "../domain/ProviderScope.js";
2
+ import { StoreSet } from "@tsed/core/decorators/storeSet.js";
3
3
  /**
4
4
  * Define the lifecycle scope of a provider.
5
5
  *
@@ -1,8 +1,8 @@
1
- import { UnsupportedDecoratorType } from "@tsed/core/errors/UnsupportedDecoratorType.js";
1
+ import { DI_USE_OPTIONS, DI_USE_PARAM_OPTIONS } from "../constants/constants.js";
2
2
  import { DecoratorTypes } from "@tsed/core/types/DecoratorTypes.js";
3
3
  import { Store } from "@tsed/core/types/Store.js";
4
+ import { UnsupportedDecoratorType } from "@tsed/core/errors/UnsupportedDecoratorType.js";
4
5
  import { decoratorTypeOf } from "@tsed/core/utils/decoratorTypeOf.js";
5
- import { DI_USE_OPTIONS, DI_USE_PARAM_OPTIONS } from "../constants/constants.js";
6
6
  /**
7
7
  * Pass custom options to an injected provider.
8
8
  *
@@ -1,6 +1,6 @@
1
- import { Hooks } from "@tsed/hooks";
2
- import { levels } from "@tsed/logger";
3
1
  import { logger as injectLogger } from "../../common/index.js";
2
+ import { levels } from "@tsed/logger";
3
+ import { Hooks } from "@tsed/hooks";
4
4
  const LEVELS = levels();
5
5
  /**
6
6
  * Context-aware logger for scoped logging within a request or execution context.
@@ -1,5 +1,5 @@
1
- import { injector, LocalsContainer } from "../index.js";
2
1
  import { ContextLogger } from "./ContextLogger.js";
2
+ import { LocalsContainer, injector } from "../index.js";
3
3
  /**
4
4
  * Execution context for dependency injection operations.
5
5
  *
@@ -1,12 +1,12 @@
1
+ import { DI_USE_PARAM_OPTIONS } from "../constants/constants.js";
2
+ import { ProviderScope } from "./ProviderScope.js";
3
+ import { ProviderType } from "./ProviderType.js";
1
4
  import { Store } from "@tsed/core/types/Store.js";
2
5
  import { classOf } from "@tsed/core/utils/classOf.js";
6
+ import { discoverHooks } from "../utils/discoverHooks.js";
3
7
  import { getClassOrSymbol } from "@tsed/core/utils/getClassOrSymbol.js";
4
8
  import { isClass } from "@tsed/core/utils/isClass.js";
5
9
  import { nameOf } from "@tsed/core/utils/nameOf.js";
6
- import { DI_USE_PARAM_OPTIONS } from "../constants/constants.js";
7
- import { discoverHooks } from "../utils/discoverHooks.js";
8
- import { ProviderScope } from "./ProviderScope.js";
9
- import { ProviderType } from "./ProviderType.js";
10
10
  /**
11
11
  * Provider metadata class managing dependency injection configuration.
12
12
  *
@@ -1,8 +1,8 @@
1
+ import { colors } from "../utils/colors.js";
1
2
  import { getConstructorArgNames } from "@tsed/core/utils/getConstructorArgNames.js";
2
3
  import { isClass } from "@tsed/core/utils/isClass.js";
3
4
  import { isString } from "@tsed/core/utils/isString.js";
4
5
  import { nameOf } from "@tsed/core/utils/nameOf.js";
5
- import { colors } from "../utils/colors.js";
6
6
  /**
7
7
  * Error thrown when dependency injection fails.
8
8
  *
@@ -1,6 +1,6 @@
1
1
  import { classOf } from "@tsed/core";
2
- import { bindIntercept } from "../decorators/intercept.js";
3
2
  import { ProviderBuilder } from "../domain/ProviderBuilder.js";
3
+ import { bindIntercept } from "../decorators/intercept.js";
4
4
  ProviderBuilder.add("intercept", function intercept(propertyKey, interceptorToken, options) {
5
5
  bindIntercept(classOf(this.inspect().useClass), propertyKey, interceptorToken, options);
6
6
  return this;
@@ -1,5 +1,5 @@
1
- import { injector } from "./injector.js";
2
1
  import { invokeOptions, localsContainer } from "./localsContainer.js";
2
+ import { injector } from "./injector.js";
3
3
  /**
4
4
  * Programmatically inject a provider instance.
5
5
  *
@@ -1,5 +1,5 @@
1
- import { providerBuilder } from "../domain/ProviderBuilder.js";
2
1
  import { ProviderType } from "../domain/ProviderType.js";
2
+ import { providerBuilder } from "../domain/ProviderBuilder.js";
3
3
  /**
4
4
  * Fluent builder for registering providers programmatically.
5
5
  *
@@ -1,6 +1,6 @@
1
- import { isFunction } from "@tsed/core/utils/isFunction.js";
2
1
  import { inject } from "./inject.js";
3
2
  import { injector } from "./injector.js";
3
+ import { isFunction } from "@tsed/core/utils/isFunction.js";
4
4
  /**
5
5
  * Lazily load and inject a provider from a dynamic import.
6
6
  *
@@ -1,5 +1,5 @@
1
- import { LocalsContainer } from "../domain/LocalsContainer.js";
2
1
  import { InjectorService } from "../services/InjectorService.js";
2
+ import { LocalsContainer } from "../domain/LocalsContainer.js";
3
3
  import { injector } from "./injector.js";
4
4
  let globalLocals;
5
5
  let globalInvOpts = {};
@@ -1,7 +1,7 @@
1
+ import { $alter } from "@tsed/hooks";
1
2
  import { getValue } from "@tsed/core/utils/getValue.js";
2
3
  import { isFunction } from "@tsed/core/utils/isFunction.js";
3
4
  import { setValue } from "@tsed/core/utils/setValue.js";
4
- import { $alter } from "@tsed/hooks";
5
5
  /**
6
6
  * Configuration management service for the DI system.
7
7
  *
@@ -1,6 +1,16 @@
1
+ import { $alter, $asyncAlter, $asyncEmit, $emit, $off, $on } from "@tsed/hooks";
2
+ import { DI_INVOKE_OPTIONS, DI_USE_PARAM_OPTIONS } from "../constants/constants.js";
3
+ import { Container } from "../domain/Container.js";
4
+ import { DIConfiguration } from "./DIConfiguration.js";
5
+ import { InjectionError } from "../errors/InjectionError.js";
6
+ import { LocalsContainer } from "../domain/LocalsContainer.js";
7
+ import { Provider } from "../domain/Provider.js";
8
+ import { ProviderScope } from "../domain/ProviderScope.js";
1
9
  import { classOf } from "@tsed/core/utils/classOf.js";
10
+ import { createContainer } from "../utils/createContainer.js";
2
11
  import { deepClone } from "@tsed/core/utils/deepClone.js";
3
12
  import { deepMerge } from "@tsed/core/utils/deepMerge.js";
13
+ import { getConstructorDependencies } from "../utils/getConstructorDependencies.js";
4
14
  import { isArray } from "@tsed/core/utils/isArray.js";
5
15
  import { isClass } from "@tsed/core/utils/isClass.js";
6
16
  import { isFunction } from "@tsed/core/utils/isFunction.js";
@@ -8,16 +18,6 @@ import { isInheritedFrom } from "@tsed/core/utils/isInheritedFrom.js";
8
18
  import { isObject } from "@tsed/core/utils/isObject.js";
9
19
  import { isPromise } from "@tsed/core/utils/isPromise.js";
10
20
  import { nameOf } from "@tsed/core/utils/nameOf.js";
11
- import { $alter, $asyncAlter, $asyncEmit, $emit, $off, $on } from "@tsed/hooks";
12
- import { DI_INVOKE_OPTIONS, DI_USE_PARAM_OPTIONS } from "../constants/constants.js";
13
- import { Container } from "../domain/Container.js";
14
- import { LocalsContainer } from "../domain/LocalsContainer.js";
15
- import { Provider } from "../domain/Provider.js";
16
- import { ProviderScope } from "../domain/ProviderScope.js";
17
- import { InjectionError } from "../errors/InjectionError.js";
18
- import { createContainer } from "../utils/createContainer.js";
19
- import { getConstructorDependencies } from "../utils/getConstructorDependencies.js";
20
- import { DIConfiguration } from "./DIConfiguration.js";
21
21
  const EXCLUDED_CONFIGURATION_KEYS = ["mount", "imports"];
22
22
  /**
23
23
  * Core dependency injection orchestrator managing provider lifecycle and resolution.
@@ -1,5 +1,5 @@
1
- import { logger } from "../fn/logger.js";
2
1
  import { injector } from "../index.js";
2
+ import { logger } from "../fn/logger.js";
3
3
  /**
4
4
  * @ignore
5
5
  */
@@ -1,7 +1,7 @@
1
- import { v4 } from "uuid";
2
1
  import { DIContext } from "../../common/domain/DIContext.js";
3
- import { injector } from "../../common/index.js";
4
2
  import { getContext } from "../utils/asyncHookContext.js";
3
+ import { injector } from "../../common/index.js";
4
+ import { v4 } from "uuid";
5
5
  /**
6
6
  * Get the current DIContext instance using async hook node.js api.
7
7
  *
@@ -1,12 +1,12 @@
1
+ import { DI_INJECTABLE_PROPS, createContainer, destroyInjector, inject, injector } from "../../common/index.js";
2
+ import { cleanAllLocalsContainer, detachLocalsContainer, localsContainer } from "../../common/fn/localsContainer.js";
3
+ import { $log } from "@tsed/logger";
4
+ import { DIContext } from "../../common/domain/DIContext.js";
1
5
  import { Env } from "@tsed/core/types/Env.js";
2
6
  import { getValue } from "@tsed/core/utils/getValue.js";
3
7
  import { isClass } from "@tsed/core/utils/isClass.js";
4
8
  import { isObject } from "@tsed/core/utils/isObject.js";
5
- import { $log } from "@tsed/logger";
6
- import { DIContext } from "../../common/domain/DIContext.js";
7
- import { cleanAllLocalsContainer, detachLocalsContainer, localsContainer } from "../../common/fn/localsContainer.js";
8
9
  import { logger } from "../../common/fn/logger.js";
9
- import { createContainer, destroyInjector, DI_INJECTABLE_PROPS, inject, injector } from "../../common/index.js";
10
10
  import { setLoggerConfiguration } from "../../common/utils/setLoggerConfiguration.js";
11
11
  /**
12
12
  * Tool to run test with lightweight DI sandbox.
@@ -1,6 +1,6 @@
1
- import type { Type } from "@tsed/core/types/Type.js";
2
1
  import type { ControllerMiddlewares } from "../domain/Provider.js";
3
2
  import { ProviderOpts } from "../interfaces/ProviderOpts.js";
3
+ import type { Type } from "@tsed/core/types/Type.js";
4
4
  export type PathType = string | RegExp | (string | RegExp)[];
5
5
  export interface ControllerOptions extends Partial<ProviderOpts<any>> {
6
6
  path?: PathType;
@@ -1,5 +1,5 @@
1
- import type { Type } from "@tsed/core/types/Type.js";
2
1
  import { TokenProvider } from "../interfaces/TokenProvider.js";
2
+ import type { Type } from "@tsed/core/types/Type.js";
3
3
  export type TransformInjectedProviderCB<T, Klass = any> = (instance: T, { target, propertyKey }: {
4
4
  self: Klass;
5
5
  target: Type<Klass>;
@@ -1,6 +1,6 @@
1
- import type { Type } from "@tsed/core/types/Type.js";
2
1
  import type { InterceptorMethods } from "../interfaces/InterceptorMethods.js";
3
2
  import type { TokenProvider } from "../interfaces/TokenProvider.js";
3
+ import type { Type } from "@tsed/core/types/Type.js";
4
4
  export declare function getInterceptorOptions<T>(target: Type<any>, propertyKey: string | symbol): T;
5
5
  export declare function bindIntercept(target: any, propertyKey: string | symbol, token: TokenProvider, options: Record<string, unknown>): TypedPropertyDescriptor<any> | undefined;
6
6
  /**
@@ -1,7 +1,7 @@
1
- import type { ProviderOpts } from "../interfaces/ProviderOpts.js";
2
- import type { TokenProvider } from "../interfaces/TokenProvider.js";
3
1
  import { Provider } from "./Provider.js";
2
+ import type { ProviderOpts } from "../interfaces/ProviderOpts.js";
4
3
  import type { ProviderType } from "./ProviderType.js";
4
+ import type { TokenProvider } from "../interfaces/TokenProvider.js";
5
5
  /**
6
6
  * Provider container managing registered providers and their metadata.
7
7
  *
@@ -1,6 +1,6 @@
1
- import { Hooks } from "@tsed/hooks";
2
- import { LogLevel } from "@tsed/logger";
3
1
  import { DILogger } from "../../common/index.js";
2
+ import { LogLevel } from "@tsed/logger";
3
+ import { Hooks } from "@tsed/hooks";
4
4
  /**
5
5
  * Options for creating a context logger instance.
6
6
  *
@@ -1,5 +1,5 @@
1
- import { InjectorService, LocalsContainer } from "../index.js";
2
1
  import { ContextLogger, ContextLoggerOptions } from "./ContextLogger.js";
2
+ import { InjectorService, LocalsContainer } from "../index.js";
3
3
  /**
4
4
  * Options for creating a DI context instance.
5
5
  *
@@ -1,9 +1,9 @@
1
- import { Store } from "@tsed/core/types/Store.js";
2
1
  import type { AbstractType, Type } from "@tsed/core/types/Type.js";
3
2
  import type { ProviderOpts } from "../interfaces/ProviderOpts.js";
4
- import type { TokenProvider } from "../interfaces/TokenProvider.js";
5
3
  import { ProviderScope } from "./ProviderScope.js";
6
4
  import { ProviderType } from "./ProviderType.js";
5
+ import { Store } from "@tsed/core/types/Store.js";
6
+ import type { TokenProvider } from "../interfaces/TokenProvider.js";
7
7
  /**
8
8
  * Middleware configuration for a controller.
9
9
  *
@@ -1,8 +1,8 @@
1
- import type { Store } from "@tsed/core";
2
- import type { Type } from "@tsed/core/types/Type.js";
1
+ import type { FactoryTokenProvider } from "../interfaces/TokenProvider.js";
3
2
  import { Provider } from "../domain/Provider.js";
4
3
  import type { ProviderOpts } from "../interfaces/ProviderOpts.js";
5
- import type { FactoryTokenProvider } from "../interfaces/TokenProvider.js";
4
+ import type { Store } from "@tsed/core";
5
+ import type { Type } from "@tsed/core/types/Type.js";
6
6
  declare global {
7
7
  namespace TsED {
8
8
  interface ProviderBuilder<Token> {
@@ -1,5 +1,5 @@
1
- import type { TokenProvider } from "../interfaces/TokenProvider.js";
2
1
  import { DIConfiguration } from "../services/DIConfiguration.js";
2
+ import type { TokenProvider } from "../interfaces/TokenProvider.js";
3
3
  /**
4
4
  * Get or set configuration for a provider or the global injector settings.
5
5
  *
@@ -1,5 +1,5 @@
1
- import type { ProviderScope } from "../domain/ProviderScope.js";
2
1
  import type { ImportTokenProviderOpts } from "./ImportTokenProviderOpts.js";
2
+ import type { ProviderScope } from "../domain/ProviderScope.js";
3
3
  import type { TokenProvider } from "./TokenProvider.js";
4
4
  declare global {
5
5
  namespace TsED {
@@ -1,7 +1,7 @@
1
- import type { Type } from "@tsed/core";
2
1
  import type { ProviderScope } from "../domain/ProviderScope.js";
3
2
  import type { ProviderType } from "../domain/ProviderType.js";
4
3
  import type { TokenProvider } from "./TokenProvider.js";
4
+ import type { Type } from "@tsed/core";
5
5
  /**
6
6
  * Configuration options for registering a provider in the DI container.
7
7
  *
@@ -1,5 +1,5 @@
1
- import type { Type } from "@tsed/core/types/Type.js";
2
1
  import type { Provider } from "../domain/Provider.js";
2
+ import type { Type } from "@tsed/core/types/Type.js";
3
3
  /**
4
4
  * @ignore
5
5
  */
@@ -1,5 +1,5 @@
1
- import { Env } from "@tsed/core/types/Env.js";
2
1
  import type { DILoggerOptions } from "../interfaces/DILoggerOptions.js";
2
+ import { Env } from "@tsed/core/types/Env.js";
3
3
  import type { ImportTokenProviderOpts } from "../interfaces/ImportTokenProviderOpts.js";
4
4
  import type { TokenProvider } from "../interfaces/TokenProvider.js";
5
5
  import type { TokenRoute } from "../interfaces/TokenRoute.js";
@@ -1,9 +1,9 @@
1
1
  import { Container } from "../domain/Container.js";
2
- import { Provider } from "../domain/Provider.js";
2
+ import { DIConfiguration } from "./DIConfiguration.js";
3
3
  import type { DILogger } from "../interfaces/DILogger.js";
4
4
  import type { InvokeOptions } from "../interfaces/InvokeOptions.js";
5
+ import { Provider } from "../domain/Provider.js";
5
6
  import type { TokenProvider } from "../interfaces/TokenProvider.js";
6
- import { DIConfiguration } from "./DIConfiguration.js";
7
7
  /**
8
8
  * Core dependency injection orchestrator managing provider lifecycle and resolution.
9
9
  *
@@ -1,3 +1,3 @@
1
- import type { Type } from "@tsed/core/types/Type.js";
2
1
  import { Container } from "../domain/Container.js";
2
+ import type { Type } from "@tsed/core/types/Type.js";
3
3
  export declare function createContainer(rootModule?: Type<any>): Container;
@@ -1,5 +1,5 @@
1
- import { DIContext } from "../../common/domain/DIContext.js";
2
1
  import { InjectorService, TokenProvider, type UseImportTokenProviderOpts } from "../../common/index.js";
2
+ import { DIContext } from "../../common/domain/DIContext.js";
3
3
  /**
4
4
  * Tool to run test with lightweight DI sandbox.
5
5
  */
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@tsed/di",
3
+ "version": "8.35.0",
3
4
  "description": "DI module for Ts.ED Framework",
4
- "type": "module",
5
- "version": "8.33.0",
6
5
  "source": "./src/index.ts",
6
+ "type": "module",
7
7
  "main": "./lib/esm/index.js",
8
8
  "module": "./lib/esm/index.js",
9
- "typings": "./lib/types/index.d.ts",
10
9
  "browser": "./lib/esm/browser/index.js",
10
+ "typings": "./lib/types/index.d.ts",
11
11
  "exports": {
12
12
  ".": {
13
13
  "tsed-source": "./src/index.ts",
@@ -29,13 +29,12 @@
29
29
  "uuid": "^14.0.0"
30
30
  },
31
31
  "devDependencies": {
32
- "@tsed/barrels": "8.33.0",
33
- "@tsed/core": "8.33.0",
34
- "@tsed/hooks": "8.33.0",
32
+ "@tsed/barrels": "8.35.0",
33
+ "@tsed/core": "8.35.0",
34
+ "@tsed/hooks": "8.35.0",
35
35
  "@tsed/logger": "^8.0.0",
36
- "@tsed/typescript": "8.33.0",
36
+ "@tsed/typescript": "8.35.0",
37
37
  "cross-env": "7.0.3",
38
- "eslint": "9.12.0",
39
38
  "typescript": "6.0.2",
40
39
  "vite": "7.3.2",
41
40
  "vitest": "4.1.4"