@tsed/di 6.102.7 → 6.102.8-rc.1

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.
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -1,5 +1,5 @@
1
1
  import { decoratorTypeOf, DecoratorTypes, StoreSet } from "@tsed/core";
2
- import { Inject } from "../decorators/inject";
2
+ import { Inject } from "../decorators/inject.js";
3
3
  /**
4
4
  * Get or set Configuration on a class.
5
5
  *
@@ -1,6 +1,6 @@
1
1
  import { Store } from "@tsed/core";
2
- import { INJECTABLE_PROP } from "../constants";
3
- import { InjectablePropertyType } from "../domain/InjectablePropertyType";
2
+ import { INJECTABLE_PROP } from "../constants.js";
3
+ import { InjectablePropertyType } from "../domain/InjectablePropertyType.js";
4
4
  /**
5
5
  * Return value from Configuration.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  import { isArrayOrArrayClass, useDecorators } from "@tsed/core";
2
2
  import { Children, Path } from "@tsed/schema";
3
- import { registerController } from "../registries/ProviderRegistry";
3
+ import { registerController } from "../registries/ProviderRegistry.js";
4
4
  function mapOptions(options) {
5
5
  if (typeof options === "string" || options instanceof RegExp || isArrayOrArrayClass(options)) {
6
6
  return {
@@ -1,16 +1,16 @@
1
- export * from "./scope";
2
- export * from "./service";
3
- export * from "./overrideProvider";
4
- export * from "./inject";
5
- export * from "./lazyInject";
6
- export * from "./injectable";
7
- export * from "./constant";
8
- export * from "./value";
9
- export * from "./intercept";
10
- export * from "./interceptor";
11
- export * from "./configuration";
12
- export * from "./module";
13
- export * from "./opts";
14
- export * from "./useOpts";
15
- export * from "./controller";
1
+ export * from "./scope.js";
2
+ export * from "./service.js";
3
+ export * from "./overrideProvider.js";
4
+ export * from "./inject.js";
5
+ export * from "./lazyInject.js";
6
+ export * from "./injectable.js";
7
+ export * from "./constant.js";
8
+ export * from "./value.js";
9
+ export * from "./intercept.js";
10
+ export * from "./interceptor.js";
11
+ export * from "./configuration.js";
12
+ export * from "./module.js";
13
+ export * from "./opts.js";
14
+ export * from "./useOpts.js";
15
+ export * from "./controller.js";
16
16
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
1
  import { decoratorTypeOf, DecoratorTypes, isPromise, Metadata, Store, UnsupportedDecoratorType } from "@tsed/core";
2
- import { DI_PARAM_OPTIONS, INJECTABLE_PROP } from "../constants";
2
+ import { DI_PARAM_OPTIONS, INJECTABLE_PROP } from "../constants.js";
3
3
  export function injectProperty(target, propertyKey, options) {
4
4
  Store.from(target).merge(INJECTABLE_PROP, {
5
5
  [propertyKey]: {
@@ -1,4 +1,4 @@
1
- import { registerProvider } from "../registries/ProviderRegistry";
1
+ import { registerProvider } from "../registries/ProviderRegistry.js";
2
2
  /**
3
3
  * The decorators `@Injectable()` declare a new service can be injected in other service, controller, interceptor, etc.. on there `constructor`.
4
4
  * All classes annotated with `@Injectable()` are built one time, excepted if you change the default provider configuration.
@@ -1,6 +1,6 @@
1
1
  import { Store } from "@tsed/core";
2
- import { INJECTABLE_PROP } from "../constants";
3
- import { InjectablePropertyType } from "../domain";
2
+ import { INJECTABLE_PROP } from "../constants.js";
3
+ import { InjectablePropertyType } from "../domain.js";
4
4
  /**
5
5
  * Attaches interceptor to method call and executes the before and after methods
6
6
  *
@@ -1,5 +1,5 @@
1
- import { ProviderType } from "../domain/ProviderType";
2
- import { Injectable } from "./injectable";
1
+ import { ProviderType } from "../domain/ProviderType.js";
2
+ import { Injectable } from "./injectable.js";
3
3
  /**
4
4
  * The decorators `@Service()` declare a new service can be injected in other service or controller on there `constructor`.
5
5
  * All services annotated with `@Service()` are constructed one time.
@@ -1,5 +1,5 @@
1
1
  import { importPackage } from "@tsed/core";
2
- import { injectProperty } from "./inject";
2
+ import { injectProperty } from "./inject.js";
3
3
  /**
4
4
  * Lazy load a provider from his package and invoke only when the provider is used
5
5
  *
@@ -1,7 +1,7 @@
1
1
  import { useDecorators } from "@tsed/core";
2
- import { ProviderScope, ProviderType } from "../domain";
3
- import { Configuration } from "./configuration";
4
- import { Injectable } from "./injectable";
2
+ import { ProviderScope, ProviderType } from "../domain.js";
3
+ import { Configuration } from "./configuration.js";
4
+ import { Injectable } from "./injectable.js";
5
5
  /**
6
6
  * Declare a new Ts.ED module
7
7
  *
@@ -1,8 +1,8 @@
1
1
  import { classOf } from "@tsed/core";
2
- import { DI_PARAM_OPTIONS } from "../constants";
3
- import { ProviderScope } from "../domain/ProviderScope";
4
- import { Inject } from "./inject";
5
- import { Scope } from "./scope";
2
+ import { DI_PARAM_OPTIONS } from "../constants.js";
3
+ import { ProviderScope } from "../domain/ProviderScope.js";
4
+ import { Inject } from "./inject.js";
5
+ import { Scope } from "./scope.js";
6
6
  /**
7
7
  * Get instance options. This options depending on his invocation context.
8
8
  *
@@ -1,4 +1,4 @@
1
- import { GlobalProviders } from "../registries/GlobalProviders";
1
+ import { GlobalProviders } from "../registries/GlobalProviders.js";
2
2
  /**
3
3
  * Override a provider which is already registered in ProviderRegistry.
4
4
  * @returns {Function}
@@ -1,5 +1,5 @@
1
1
  import { StoreSet } from "@tsed/core";
2
- import { ProviderScope } from "../domain/ProviderScope";
2
+ import { ProviderScope } from "../domain/ProviderScope.js";
3
3
  /**
4
4
  *
5
5
  * @param {"request" | "singleton" | ProviderScope} scope
@@ -1,4 +1,4 @@
1
- import { Injectable } from "./injectable";
1
+ import { Injectable } from "./injectable.js";
2
2
  /**
3
3
  * The decorators `@Service()` declare a new service can be injected in other service or controller on there `constructor`.
4
4
  * All services annotated with `@Service()` are constructed one time.
@@ -1,5 +1,5 @@
1
1
  import { decoratorTypeOf, DecoratorTypes, Store, UnsupportedDecoratorType } from "@tsed/core";
2
- import { DI_PARAM_OPTIONS, INJECTABLE_PROP } from "../constants";
2
+ import { DI_PARAM_OPTIONS, INJECTABLE_PROP } from "../constants.js";
3
3
  /**
4
4
  * Add options to invoke the Service.
5
5
  *
@@ -1,6 +1,6 @@
1
1
  import { Store } from "@tsed/core";
2
- import { INJECTABLE_PROP } from "../constants";
3
- import { InjectablePropertyType } from "../domain/InjectablePropertyType";
2
+ import { INJECTABLE_PROP } from "../constants.js";
3
+ import { InjectablePropertyType } from "../domain/InjectablePropertyType.js";
4
4
  /**
5
5
  * Return value from Configuration.
6
6
  *
@@ -1,5 +1,5 @@
1
- import { GlobalProviders } from "../registries/GlobalProviders";
2
- import { Provider } from "./Provider";
1
+ import { GlobalProviders } from "../registries/GlobalProviders.js";
2
+ import { Provider } from "./Provider.js";
3
3
  export class Container extends Map {
4
4
  /**
5
5
  *
@@ -1,5 +1,5 @@
1
- import { ContextLogger } from "./ContextLogger";
2
- import { LocalsContainer } from "./LocalsContainer";
1
+ import { ContextLogger } from "./ContextLogger.js";
2
+ import { LocalsContainer } from "./LocalsContainer.js";
3
3
  export class DIContext extends Map {
4
4
  constructor({ id, injector, logger, ignoreLog, ...options }) {
5
5
  super();
@@ -1,6 +1,6 @@
1
1
  import { classOf, getClassOrSymbol, isClass, nameOf, Store } from "@tsed/core";
2
- import { ProviderScope } from "./ProviderScope";
3
- import { ProviderType } from "./ProviderType";
2
+ import { ProviderScope } from "./ProviderScope.js";
3
+ import { ProviderType } from "./ProviderType.js";
4
4
  export class Provider {
5
5
  constructor(token, options = {}) {
6
6
  this.type = ProviderType.PROVIDER;
@@ -1,9 +1,9 @@
1
- export * from "./Container";
2
- export * from "./InjectablePropertyType";
3
- export * from "./LocalsContainer";
4
- export * from "./Provider";
5
- export * from "./ProviderScope";
6
- export * from "./ProviderType";
7
- export * from "./ContextLogger";
8
- export * from "./DIContext";
1
+ export * from "./Container.js";
2
+ export * from "./InjectablePropertyType.js";
3
+ export * from "./LocalsContainer.js";
4
+ export * from "./Provider.js";
5
+ export * from "./ProviderScope.js";
6
+ export * from "./ProviderType.js";
7
+ export * from "./ContextLogger.js";
8
+ export * from "./DIContext.js";
9
9
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
1
  import { getConstructorArgNames, isClass, isString, nameOf } from "@tsed/core";
2
- import { colors } from "../utils/colors";
2
+ import { colors } from "../utils/colors.js";
3
3
  export class InjectionError extends Error {
4
4
  constructor(token, origin) {
5
5
  super(isString(origin) ? origin : "");
package/lib/esm/index.js CHANGED
@@ -1,18 +1,18 @@
1
- export * from "./constants/index";
2
- export * from "./domain";
3
- export * from "./interfaces";
4
- export * from "./decorators";
5
- export * from "./registries/ProviderRegistry";
6
- export * from "./registries/GlobalProviders";
7
- export * from "./services/InjectorService";
8
- export * from "./services/DILogger";
9
- export * from "./services/DIConfiguration";
10
- export * from "./services/DITest";
11
- export * from "./errors/InjectionError";
12
- export * from "./errors/UndefinedTokenError";
13
- export * from "./utils/createContainer";
14
- export * from "./utils/getConfiguration";
15
- export * from "./utils/getConfiguration";
16
- export * from "./utils/setLoggerLevel";
17
- export * from "./utils/colors";
1
+ export * from "./constants/index.js";
2
+ export * from "./domain.js";
3
+ export * from "./interfaces.js";
4
+ export * from "./decorators.js";
5
+ export * from "./registries/ProviderRegistry.js";
6
+ export * from "./registries/GlobalProviders.js";
7
+ export * from "./services/InjectorService.js";
8
+ export * from "./services/DILogger.js";
9
+ export * from "./services/DIConfiguration.js";
10
+ export * from "./services/DITest.js";
11
+ export * from "./errors/InjectionError.js";
12
+ export * from "./errors/UndefinedTokenError.js";
13
+ export * from "./utils/createContainer.js";
14
+ export * from "./utils/getConfiguration.js";
15
+ export * from "./utils/getConfiguration.js";
16
+ export * from "./utils/setLoggerLevel.js";
17
+ export * from "./utils/colors.js";
18
18
  //# sourceMappingURL=index.js.map
@@ -1,15 +1,15 @@
1
- export * from "./DILogger";
2
- export * from "./DIConfigurationOptions";
3
- export * from "./DIResolver";
4
- export * from "./InjectableProperties";
5
- export * from "./InterceptorMethods";
6
- export * from "./InterceptorContext";
7
- export * from "./InvokeOptions";
8
- export * from "./IProvider";
9
- export * from "./OnInit";
10
- export * from "./OnDestroy";
11
- export * from "./OnInit";
12
- export * from "./RegistrySettings";
13
- export * from "./TokenProvider";
14
- export * from "./ResolvedInvokeOptions";
1
+ export * from "./DILogger.js";
2
+ export * from "./DIConfigurationOptions.js";
3
+ export * from "./DIResolver.js";
4
+ export * from "./InjectableProperties.js";
5
+ export * from "./InterceptorMethods.js";
6
+ export * from "./InterceptorContext.js";
7
+ export * from "./InvokeOptions.js";
8
+ export * from "./IProvider.js";
9
+ export * from "./OnInit.js";
10
+ export * from "./OnDestroy.js";
11
+ export * from "./OnInit.js";
12
+ export * from "./RegistrySettings.js";
13
+ export * from "./TokenProvider.js";
14
+ export * from "./ResolvedInvokeOptions.js";
15
15
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -1,8 +1,8 @@
1
1
  var _GlobalProviderRegistry_settings;
2
2
  import { __classPrivateFieldGet } from "tslib";
3
3
  import { getClassOrSymbol } from "@tsed/core";
4
- import { Provider } from "../domain/Provider";
5
- import { ProviderType } from "../domain/ProviderType";
4
+ import { Provider } from "../domain/Provider.js";
5
+ import { ProviderType } from "../domain/ProviderType.js";
6
6
  export class GlobalProviderRegistry extends Map {
7
7
  constructor() {
8
8
  super(...arguments);
@@ -1,6 +1,6 @@
1
- import { Provider } from "../domain/Provider";
2
- import { ProviderScope, ProviderType } from "../domain";
3
- import { GlobalProviders } from "./GlobalProviders";
1
+ import { Provider } from "../domain/Provider.js";
2
+ import { ProviderScope, ProviderType } from "../domain.js";
3
+ import { GlobalProviders } from "./GlobalProviders.js";
4
4
  /**
5
5
  *
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import { Logger } from "@tsed/logger";
2
- import { registerProvider } from "../registries/ProviderRegistry";
3
- import { InjectorService } from "./InjectorService";
2
+ import { registerProvider } from "../registries/ProviderRegistry.js";
3
+ import { InjectorService } from "./InjectorService.js";
4
4
  registerProvider({
5
5
  provide: Logger,
6
6
  deps: [InjectorService],
@@ -1,9 +1,9 @@
1
1
  import { Env, getValue } from "@tsed/core";
2
2
  import { $log } from "@tsed/logger";
3
- import { createContainer } from "../utils/createContainer";
4
- import { LocalsContainer } from "../domain/LocalsContainer";
5
- import { setLoggerLevel } from "../utils/setLoggerLevel";
6
- import { InjectorService } from "./InjectorService";
3
+ import { createContainer } from "../utils/createContainer.js";
4
+ import { LocalsContainer } from "../domain/LocalsContainer.js";
5
+ import { setLoggerLevel } from "../utils/setLoggerLevel.js";
6
+ import { InjectorService } from "./InjectorService.js";
7
7
  /**
8
8
  * Tool to run test with lightweight DI sandbox.
9
9
  */
@@ -2,18 +2,18 @@ var _InjectorService_cache;
2
2
  var InjectorService_1;
3
3
  import { __classPrivateFieldGet, __decorate, __metadata } from "tslib";
4
4
  import { ancestorsOf, catchError, classOf, deepClone, deepMerge, isClass, isFunction, isInheritedFrom, Metadata, nameOf, prototypeOf, Store } from "@tsed/core";
5
- import { DI_PARAM_OPTIONS, INJECTABLE_PROP } from "../constants";
6
- import { Configuration } from "../decorators/configuration";
7
- import { Injectable } from "../decorators/injectable";
8
- import { InjectablePropertyType, ProviderScope } from "../domain";
9
- import { Container } from "../domain/Container";
10
- import { LocalsContainer } from "../domain/LocalsContainer";
11
- import { Provider } from "../domain/Provider";
12
- import { InjectionError } from "../errors/InjectionError";
13
- import { UndefinedTokenError } from "../errors/UndefinedTokenError";
14
- import { GlobalProviders } from "../registries/GlobalProviders";
15
- import { createContainer } from "../utils/createContainer";
16
- import { DIConfiguration } from "./DIConfiguration";
5
+ import { DI_PARAM_OPTIONS, INJECTABLE_PROP } from "../constants.js";
6
+ import { Configuration } from "../decorators/configuration.js";
7
+ import { Injectable } from "../decorators/injectable.js";
8
+ import { InjectablePropertyType, ProviderScope } from "../domain.js";
9
+ import { Container } from "../domain/Container.js";
10
+ import { LocalsContainer } from "../domain/LocalsContainer.js";
11
+ import { Provider } from "../domain/Provider.js";
12
+ import { InjectionError } from "../errors/InjectionError.js";
13
+ import { UndefinedTokenError } from "../errors/UndefinedTokenError.js";
14
+ import { GlobalProviders } from "../registries/GlobalProviders.js";
15
+ import { createContainer } from "../utils/createContainer.js";
16
+ import { DIConfiguration } from "./DIConfiguration.js";
17
17
  /**
18
18
  * This service contain all services collected by `@Service` or services declared manually with `InjectorService.factory()` or `InjectorService.service()`.
19
19
  *
@@ -1,5 +1,5 @@
1
- import { Container } from "../domain/Container";
2
- import { GlobalProviders } from "../registries/GlobalProviders";
1
+ import { Container } from "../domain/Container.js";
2
+ import { GlobalProviders } from "../registries/GlobalProviders.js";
3
3
  export function createContainer(rootModule) {
4
4
  const container = new Container(GlobalProviders.entries());
5
5
  if (rootModule) {
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@tsed/di",
3
- "version": "6.102.7",
3
+ "version": "6.102.8-rc.1",
4
4
  "description": "DI module for Ts.ED Framework",
5
5
  "private": false,
6
6
  "source": "./src/index.ts",
7
7
  "main": "./lib/cjs/index.js",
8
+ "module": "./lib/esm/index.js",
8
9
  "typings": "./lib/types/index.d.ts",
9
10
  "exports": {
10
11
  "types": "./lib/types/index.d.ts",
@@ -21,20 +22,20 @@
21
22
  "tslib": "2.2.0"
22
23
  },
23
24
  "devDependencies": {
24
- "@tsed/core": "6.102.7",
25
+ "@tsed/core": "6.102.8-rc.1",
25
26
  "@tsed/logger": ">=6.0.2",
26
- "@tsed/schema": "6.102.7"
27
+ "@tsed/schema": "6.102.8-rc.1"
27
28
  },
28
29
  "peerDependencies": {
29
- "@tsed/core": "^6.102.7",
30
+ "@tsed/core": "^6.102.8-rc.1",
30
31
  "@tsed/logger": ">=6.0.2",
31
- "@tsed/schema": "^6.102.7"
32
+ "@tsed/schema": "^6.102.8-rc.1"
32
33
  },
33
34
  "repository": "https://github.com/tsedio/tsed",
34
35
  "bugs": {
35
36
  "url": "https://github.com/tsedio/tsed/issues"
36
37
  },
37
- "homepage": "https://github.com/tsedio/tsed/tree/production/packages/di",
38
+ "homepage": "https://github.com/tsedio/tsed/tree/rc/packages/di",
38
39
  "author": "Romain Lenzotti",
39
40
  "license": "MIT"
40
41
  }