@tsed/di 6.118.0-rc.1 → 6.119.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.
@@ -12,11 +12,21 @@ export interface ContextMethods extends Map<any, any> {
12
12
  }
13
13
  export interface DIContextOptions extends Omit<ContextLoggerOptions, "dateStart"> {
14
14
  id: string;
15
+ injector: InjectorService;
15
16
  logger: any;
16
- injector?: InjectorService;
17
17
  }
18
18
  export declare class DIContext extends Map<any, any> implements ContextMethods {
19
+ readonly options: DIContextOptions;
19
20
  [x: string]: any;
21
+ /**
22
+ * The request container used by the Ts.ED DI. It contain all services annotated with `@Scope(ProviderScope.REQUEST)`
23
+ */
24
+ container: LocalsContainer<any>;
25
+ /**
26
+ * Logger attached to the context request.
27
+ */
28
+ readonly logger: ContextLogger;
29
+ constructor(options: DIContextOptions);
20
30
  /**
21
31
  * Request id generated by @@contextMiddleware@@.
22
32
  *
@@ -41,24 +51,9 @@ export declare class DIContext extends Map<any, any> implements ContextMethods {
41
51
  * :::
42
52
  *
43
53
  */
44
- readonly id: string;
45
- /**
46
- * Date when request have been handled by the server. @@RequestLogger@@ use this date to log request duration.
47
- */
48
- readonly dateStart: Date;
49
- /**
50
- * The request container used by the Ts.ED DI. It contain all services annotated with `@Scope(ProviderScope.REQUEST)`
51
- */
52
- container: LocalsContainer<any>;
53
- /**
54
- * Logger attached to the context request.
55
- */
56
- readonly logger: ContextLogger;
57
- /**
58
- *
59
- */
60
- readonly injector: InjectorService;
61
- constructor({ id, injector, logger, ignoreLog, ...options }: DIContextOptions);
54
+ get id(): any;
55
+ get dateStart(): Date;
56
+ get injector(): InjectorService;
62
57
  get env(): any;
63
58
  destroy(): Promise<void>;
64
59
  emit(eventName: string, ...args: any[]): Promise<void>;
@@ -14,7 +14,7 @@ export interface DILoggerOptions {
14
14
  /**
15
15
  * List of regexp to ignore log.
16
16
  */
17
- ignoreUrlPatterns?: string[];
17
+ ignoreUrlPatterns?: (string | RegExp)[];
18
18
  /**
19
19
  * The number of space characters to use as white space in JSON output. Default is 2 (0 in production).
20
20
  */
@@ -4,3 +4,4 @@ import { DIContext } from "../domain/DIContext";
4
4
  export declare function getAsyncStore(): AsyncLocalStorage<DIContext>;
5
5
  export declare function getContext<Context = DIContext>(): Context | undefined;
6
6
  export declare function runInContext(ctx: DIContext, cb: any): unknown;
7
+ export declare function bindContext(cb: any): any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsed/di",
3
- "version": "6.118.0-rc.1",
3
+ "version": "6.119.1",
4
4
  "description": "DI module for Ts.ED Framework",
5
5
  "private": false,
6
6
  "source": "./src/index.ts",
@@ -24,14 +24,14 @@
24
24
  "tslib": "2.4.0"
25
25
  },
26
26
  "devDependencies": {
27
- "@tsed/core": "6.118.0-rc.1",
27
+ "@tsed/core": "6.119.1",
28
28
  "@tsed/logger": ">=6.2.0",
29
- "@tsed/schema": "6.118.0-rc.1"
29
+ "@tsed/schema": "6.119.1"
30
30
  },
31
31
  "peerDependencies": {
32
- "@tsed/core": "^6.118.0-rc.1",
32
+ "@tsed/core": "^6.119.1",
33
33
  "@tsed/logger": ">=6.2.0",
34
- "@tsed/schema": "^6.118.0-rc.1"
34
+ "@tsed/schema": "^6.119.1"
35
35
  },
36
36
  "peerDependenciesMeta": {
37
37
  "@tsed/core": {
@@ -50,8 +50,5 @@
50
50
  },
51
51
  "homepage": "https://github.com/tsedio/tsed/tree/production/packages/di",
52
52
  "author": "Romain Lenzotti",
53
- "license": "MIT",
54
- "publishConfig": {
55
- "tag": "rc"
56
- }
53
+ "license": "MIT"
57
54
  }