nestjs-pino 3.2.0 → 3.3.0-alpha.0025d8

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.
@@ -1,5 +1,5 @@
1
1
  import { Provider } from '@nestjs/common';
2
2
  import { PinoLogger } from './PinoLogger';
3
- export declare function InjectPinoLogger(context?: string): (target: object, key: string | symbol | undefined, index?: number | undefined) => void;
3
+ export declare function InjectPinoLogger(context?: string): PropertyDecorator & ParameterDecorator;
4
4
  export declare function createProvidersForDecorated(): Array<Provider<PinoLogger>>;
5
5
  export declare function getLoggerToken(context: string): string;
package/Logger.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { LoggerService } from '@nestjs/common';
2
- import { PinoLogger } from './PinoLogger';
3
2
  import { Params } from './params';
3
+ import { PinoLogger } from './PinoLogger';
4
4
  export declare class Logger implements LoggerService {
5
5
  protected readonly logger: PinoLogger;
6
6
  private readonly contextName;
@@ -10,6 +10,7 @@ export declare class Logger implements LoggerService {
10
10
  log(message: any, ...optionalParams: any[]): void;
11
11
  warn(message: any, ...optionalParams: any[]): void;
12
12
  error(message: any, ...optionalParams: any[]): void;
13
+ fatal(message: any, ...optionalParams: any[]): void;
13
14
  private call;
14
15
  /**
15
16
  * Unfortunately built-in (not only) `^.*Exception(s?)Handler$` classes call `.error`
package/Logger.js CHANGED
@@ -13,10 +13,11 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.Logger = void 0;
16
+ /* eslint-disable @typescript-eslint/no-explicit-any */
16
17
  const common_1 = require("@nestjs/common");
17
- const PinoLogger_1 = require("./PinoLogger");
18
18
  const params_1 = require("./params");
19
- let Logger = class Logger {
19
+ const PinoLogger_1 = require("./PinoLogger");
20
+ let Logger = exports.Logger = class Logger {
20
21
  constructor(logger, { renameContext }) {
21
22
  this.logger = logger;
22
23
  this.contextName = renameContext || 'context';
@@ -36,6 +37,9 @@ let Logger = class Logger {
36
37
  error(message, ...optionalParams) {
37
38
  this.call('error', message, ...optionalParams);
38
39
  }
40
+ fatal(message, ...optionalParams) {
41
+ this.call('fatal', message, ...optionalParams);
42
+ }
39
43
  call(level, message, ...optionalParams) {
40
44
  const objArg = {};
41
45
  // optionalParams contains extra params passed to logger
@@ -89,10 +93,9 @@ let Logger = class Logger {
89
93
  /\n\s*at /.test(params[0]));
90
94
  }
91
95
  };
92
- Logger = __decorate([
96
+ exports.Logger = Logger = __decorate([
93
97
  (0, common_1.Injectable)(),
94
98
  __param(1, (0, common_1.Inject)(params_1.PARAMS_PROVIDER_TOKEN)),
95
99
  __metadata("design:paramtypes", [PinoLogger_1.PinoLogger, Object])
96
100
  ], Logger);
97
- exports.Logger = Logger;
98
101
  //# sourceMappingURL=Logger.js.map
@@ -7,9 +7,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  };
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.LoggerErrorInterceptor = void 0;
10
+ /* eslint-disable @typescript-eslint/no-explicit-any */
10
11
  const common_1 = require("@nestjs/common");
11
12
  const rxjs_1 = require("rxjs");
12
- let LoggerErrorInterceptor = class LoggerErrorInterceptor {
13
+ let LoggerErrorInterceptor = exports.LoggerErrorInterceptor = class LoggerErrorInterceptor {
13
14
  intercept(context, next) {
14
15
  return next.handle().pipe((0, rxjs_1.catchError)((error) => {
15
16
  return (0, rxjs_1.throwError)(() => {
@@ -26,8 +27,7 @@ let LoggerErrorInterceptor = class LoggerErrorInterceptor {
26
27
  }));
27
28
  }
28
29
  };
29
- LoggerErrorInterceptor = __decorate([
30
+ exports.LoggerErrorInterceptor = LoggerErrorInterceptor = __decorate([
30
31
  (0, common_1.Injectable)()
31
32
  ], LoggerErrorInterceptor);
32
- exports.LoggerErrorInterceptor = LoggerErrorInterceptor;
33
33
  //# sourceMappingURL=LoggerErrorInterceptor.js.map
package/LoggerModule.js CHANGED
@@ -14,15 +14,16 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
14
14
  var LoggerModule_1;
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.LoggerModule = void 0;
17
+ /* eslint-disable @typescript-eslint/no-explicit-any */
17
18
  const common_1 = require("@nestjs/common");
18
19
  const pino_http_1 = require("pino-http");
20
+ const InjectPinoLogger_1 = require("./InjectPinoLogger");
19
21
  const Logger_1 = require("./Logger");
20
22
  const params_1 = require("./params");
21
23
  const PinoLogger_1 = require("./PinoLogger");
22
- const InjectPinoLogger_1 = require("./InjectPinoLogger");
23
24
  const storage_1 = require("./storage");
24
25
  const DEFAULT_ROUTES = [{ path: '*', method: common_1.RequestMethod.ALL }];
25
- let LoggerModule = LoggerModule_1 = class LoggerModule {
26
+ let LoggerModule = exports.LoggerModule = LoggerModule_1 = class LoggerModule {
26
27
  static forRoot(params) {
27
28
  const paramsProvider = {
28
29
  provide: params_1.PARAMS_PROVIDER_TOKEN,
@@ -73,13 +74,12 @@ let LoggerModule = LoggerModule_1 = class LoggerModule {
73
74
  }
74
75
  }
75
76
  };
76
- LoggerModule = LoggerModule_1 = __decorate([
77
+ exports.LoggerModule = LoggerModule = LoggerModule_1 = __decorate([
77
78
  (0, common_1.Global)(),
78
79
  (0, common_1.Module)({ providers: [Logger_1.Logger], exports: [Logger_1.Logger] }),
79
80
  __param(0, (0, common_1.Inject)(params_1.PARAMS_PROVIDER_TOKEN)),
80
81
  __metadata("design:paramtypes", [Object])
81
82
  ], LoggerModule);
82
- exports.LoggerModule = LoggerModule;
83
83
  function createLoggerMiddlewares(params, useExisting = false) {
84
84
  if (useExisting) {
85
85
  return [bindLoggerMiddlewareFactory(useExisting)];
@@ -98,6 +98,7 @@ function bindLoggerMiddlewareFactory(useExisting) {
98
98
  if (!useExisting && req.allLogs) {
99
99
  log = req.allLogs[req.allLogs.length - 1];
100
100
  }
101
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
101
102
  // @ts-ignore: run requires arguments for next but should not because it can
102
103
  // be called without arguments
103
104
  storage_1.storage.run(new storage_1.Store(log), next);
package/PinoLogger.d.ts CHANGED
@@ -26,6 +26,7 @@ export declare class PinoLogger implements PinoMethods {
26
26
  protected context: string;
27
27
  protected readonly contextName: string;
28
28
  constructor({ pinoHttp, renameContext }: Params);
29
+ get logger(): pino.Logger;
29
30
  trace(msg: string, ...args: any[]): void;
30
31
  trace(obj: unknown, msg?: string, ...args: any[]): void;
31
32
  debug(msg: string, ...args: any[]): void;
@@ -39,8 +40,7 @@ export declare class PinoLogger implements PinoMethods {
39
40
  fatal(msg: string, ...args: any[]): void;
40
41
  fatal(obj: unknown, msg?: string, ...args: any[]): void;
41
42
  setContext(value: string): void;
42
- protected call(method: pino.Level, ...args: Parameters<LoggerFn>): void;
43
- get logger(): pino.Logger;
44
43
  assign(fields: pino.Bindings): void;
44
+ protected call(method: pino.Level, ...args: Parameters<LoggerFn>): void;
45
45
  }
46
46
  export {};
package/PinoLogger.js CHANGED
@@ -14,6 +14,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
14
14
  var PinoLogger_1;
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.PinoLogger = exports.__resetOutOfContextForTests = void 0;
17
+ /* eslint-disable @typescript-eslint/no-explicit-any */
17
18
  /* eslint-disable @typescript-eslint/ban-types */
18
19
  const common_1 = require("@nestjs/common");
19
20
  const pino_1 = require("pino");
@@ -22,11 +23,12 @@ const storage_1 = require("./storage");
22
23
  let outOfContext;
23
24
  function __resetOutOfContextForTests() {
24
25
  outOfContext = undefined;
26
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
25
27
  // @ts-ignore reset root for tests only
26
28
  PinoLogger.root = undefined;
27
29
  }
28
30
  exports.__resetOutOfContextForTests = __resetOutOfContextForTests;
29
- let PinoLogger = PinoLogger_1 = class PinoLogger {
31
+ let PinoLogger = exports.PinoLogger = PinoLogger_1 = class PinoLogger {
30
32
  constructor({ pinoHttp, renameContext }) {
31
33
  this.context = '';
32
34
  if (!outOfContext) {
@@ -47,6 +49,12 @@ let PinoLogger = PinoLogger_1 = class PinoLogger {
47
49
  }
48
50
  this.contextName = renameContext || 'context';
49
51
  }
52
+ get logger() {
53
+ var _a;
54
+ // outOfContext is always set in runtime before starts using
55
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
56
+ return ((_a = storage_1.storage.getStore()) === null || _a === void 0 ? void 0 : _a.logger) || outOfContext;
57
+ }
50
58
  trace(...args) {
51
59
  this.call('trace', ...args);
52
60
  }
@@ -68,6 +76,13 @@ let PinoLogger = PinoLogger_1 = class PinoLogger {
68
76
  setContext(value) {
69
77
  this.context = value;
70
78
  }
79
+ assign(fields) {
80
+ const store = storage_1.storage.getStore();
81
+ if (!store) {
82
+ throw new Error(`${PinoLogger_1.name}: unable to assign extra fields out of request scope`);
83
+ }
84
+ store.logger = store.logger.child(fields);
85
+ }
71
86
  call(method, ...args) {
72
87
  if (this.context) {
73
88
  if (isFirstArgObject(args)) {
@@ -89,29 +104,16 @@ let PinoLogger = PinoLogger_1 = class PinoLogger {
89
104
  args = [{ [this.contextName]: this.context }, ...args];
90
105
  }
91
106
  }
107
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
92
108
  // @ts-ignore args are union of tuple types
93
109
  this.logger[method](...args);
94
110
  }
95
- get logger() {
96
- var _a;
97
- // outOfContext is always set in runtime before starts using
98
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
99
- return ((_a = storage_1.storage.getStore()) === null || _a === void 0 ? void 0 : _a.logger) || outOfContext;
100
- }
101
- assign(fields) {
102
- const store = storage_1.storage.getStore();
103
- if (!store) {
104
- throw new Error(`${PinoLogger_1.name}: unable to assign extra fields out of request scope`);
105
- }
106
- store.logger = store.logger.child(fields);
107
- }
108
111
  };
109
- PinoLogger = PinoLogger_1 = __decorate([
112
+ exports.PinoLogger = PinoLogger = PinoLogger_1 = __decorate([
110
113
  (0, common_1.Injectable)({ scope: common_1.Scope.TRANSIENT }),
111
114
  __param(0, (0, common_1.Inject)(params_1.PARAMS_PROVIDER_TOKEN)),
112
115
  __metadata("design:paramtypes", [Object])
113
116
  ], PinoLogger);
114
- exports.PinoLogger = PinoLogger;
115
117
  function isFirstArgObject(args) {
116
118
  return typeof args[0] === 'object';
117
119
  }
package/README.md CHANGED
@@ -16,15 +16,22 @@
16
16
  <a href="https://www.npmjs.com/package/nestjs-pino">
17
17
  <img alt="npm" src="https://img.shields.io/npm/v/nestjs-pino" />
18
18
  </a>
19
- <img alt="GitHub branch checks state" src="https://badgen.net/github/checks/iamolegga/nestjs-pino">
19
+ <a href="https://www.npmjs.com/package/nestjs-pino">
20
+ <img alt="npm" src="https://img.shields.io/npm/dm/nestjs-pino" />
21
+ </a>
22
+ <a href="https://github.com/iamolegga/nestjs-pino/actions">
23
+ <img alt="GitHub branch checks state" src="https://badgen.net/github/checks/iamolegga/nestjs-pino">
24
+ </a>
20
25
  <a href="https://codeclimate.com/github/iamolegga/nestjs-pino/test_coverage">
21
26
  <img src="https://api.codeclimate.com/v1/badges/2821150bb93506cb66fc/test_coverage" />
22
27
  </a>
23
28
  <a href="https://snyk.io/test/github/iamolegga/nestjs-pino">
24
- <img alt="Snyk Vulnerabilities for npm package" src="https://img.shields.io/snyk/vulnerabilities/npm/nestjs-pino" />
29
+ <img alt="Known Vulnerabilities" src="https://snyk.io/test/github/iamolegga/nestjs-pino/badge.svg" />
25
30
  </a>
26
- <img alt="Libraries.io" src="https://img.shields.io/librariesio/release/npm/nestjs-pino">
27
- <img alt="Dependabot" src="https://badgen.net/dependabot/iamolegga/nestjs-pino/?icon=dependabot">
31
+ <a href="https://libraries.io/npm/nestjs-pino">
32
+ <img alt="Libraries.io" src="https://img.shields.io/librariesio/release/npm/nestjs-pino">
33
+ </a>
34
+ <img alt="Dependabot" src="https://badgen.net/github/dependabot/iamolegga/nestjs-pino">
28
35
  <img alt="Supported platforms: Express & Fastify" src="https://img.shields.io/badge/platforms-Express%20%26%20Fastify-green" />
29
36
  </p>
30
37
 
@@ -562,13 +569,13 @@ In NestJS <= 7 and `nestjs-pino@1` when you call `this.logger.log('foo', 'bar');
562
569
  **A**: Pino built-in methods names are not fully compatible with NestJS built-in `LoggerService` methods names, and there is an option which logger you use. Here is methods mapping:
563
570
 
564
571
  | `pino` method | `PinoLogger` method | NestJS built-in `Logger` method |
565
- | ------------- | ------------------- | --------------- |
566
- | **trace** | **trace** | **verbose** |
567
- | debug | debug | debug |
568
- | **info** | **info** | **log** |
569
- | warn | warn | warn |
570
- | error | error | error |
571
- | **fatal** | **fatal** | - |
572
+ | ------------- | ------------------- | --------------------------------|
573
+ | **trace** | **trace** | **verbose** |
574
+ | debug | debug | debug |
575
+ | **info** | **info** | **log** |
576
+ | warn | warn | warn |
577
+ | error | error | error |
578
+ | fatal | fatal | fatal (since nestjs@10.2) |
572
579
 
573
580
  ---
574
581
 
@@ -595,74 +602,4 @@ All the other cases are lead to either code duplication or unexpected behavior.
595
602
 
596
603
  <h2 align="center">Do you use this library?<br/>Don't be shy to give it a star! ★</h2>
597
604
 
598
- Also if you are into NestJS ecosystem you may be interested in one of my other libs:
599
-
600
- [nestjs-pino](https://github.com/iamolegga/nestjs-pino)
601
-
602
- [![GitHub stars](https://img.shields.io/github/stars/iamolegga/nestjs-pino?style=flat-square)](https://github.com/iamolegga/nestjs-pino)
603
- [![npm](https://img.shields.io/npm/dm/nestjs-pino?style=flat-square)](https://www.npmjs.com/package/nestjs-pino)
604
-
605
- Platform agnostic logger for NestJS based on [pino](http://getpino.io/) with request context in every log
606
-
607
- ---
608
-
609
- [nestjs-session](https://github.com/iamolegga/nestjs-session)
610
-
611
- [![GitHub stars](https://img.shields.io/github/stars/iamolegga/nestjs-session?style=flat-square)](https://github.com/iamolegga/nestjs-session)
612
- [![npm](https://img.shields.io/npm/dm/nestjs-session?style=flat-square)](https://www.npmjs.com/package/nestjs-session)
613
-
614
- Idiomatic session module for NestJS. Built on top of [express-session](https://www.npmjs.com/package/express-session)
615
-
616
- ---
617
-
618
- [nestjs-cookie-session](https://github.com/iamolegga/nestjs-cookie-session)
619
-
620
- [![GitHub stars](https://img.shields.io/github/stars/iamolegga/nestjs-cookie-session?style=flat-square)](https://github.com/iamolegga/nestjs-cookie-session)
621
- [![npm](https://img.shields.io/npm/dm/nestjs-cookie-session?style=flat-square)](https://www.npmjs.com/package/nestjs-cookie-session)
622
-
623
- Idiomatic cookie session module for NestJS. Built on top of [cookie-session](https://www.npmjs.com/package/cookie-session)
624
-
625
- ---
626
-
627
- [nestjs-roles](https://github.com/iamolegga/nestjs-roles)
628
-
629
- [![GitHub stars](https://img.shields.io/github/stars/iamolegga/nestjs-roles?style=flat-square)](https://github.com/iamolegga/nestjs-roles)
630
- [![npm](https://img.shields.io/npm/dm/nestjs-roles?style=flat-square)](https://www.npmjs.com/package/nestjs-roles)
631
-
632
- Type safe roles guard and decorator made easy
633
-
634
- ---
635
-
636
- [nestjs-injectable](https://github.com/segmentstream/nestjs-injectable)
637
-
638
- [![GitHub stars](https://img.shields.io/github/stars/segmentstream/nestjs-injectable?style=flat-square)](https://github.com/segmentstream/nestjs-injectable)
639
- [![npm](https://img.shields.io/npm/dm/nestjs-injectable?style=flat-square)](https://www.npmjs.com/package/nestjs-injectable)
640
-
641
- `@Injectable()` on steroids that simplifies work with inversion of control in your hexagonal architecture
642
-
643
- ---
644
-
645
- [nest-ratelimiter](https://github.com/iamolegga/nestjs-ratelimiter)
646
-
647
- [![GitHub stars](https://img.shields.io/github/stars/iamolegga/nestjs-ratelimiter?style=flat-square)](https://github.com/iamolegga/nestjs-ratelimiter)
648
- [![npm](https://img.shields.io/npm/dm/nest-ratelimiter?style=flat-square)](https://www.npmjs.com/package/nest-ratelimiter)
649
-
650
- Distributed consistent flexible NestJS rate limiter based on Redis
651
-
652
- ---
653
-
654
- [create-nestjs-middleware-module](https://github.com/iamolegga/create-nestjs-middleware-module)
655
-
656
- [![GitHub stars](https://img.shields.io/github/stars/iamolegga/create-nestjs-middleware-module?style=flat-square)](https://github.com/iamolegga/create-nestjs-middleware-module)
657
- [![npm](https://img.shields.io/npm/dm/create-nestjs-middleware-module?style=flat-square)](https://www.npmjs.com/package/create-nestjs-middleware-module)
658
-
659
- Create simple idiomatic NestJS module based on Express/Fastify middleware in just a few lines of code with routing out of the box
660
-
661
- ---
662
-
663
- [nestjs-configure-after](https://github.com/iamolegga/nestjs-configure-after)
664
-
665
- [![GitHub stars](https://img.shields.io/github/stars/iamolegga/nestjs-configure-after?style=flat-square)](https://github.com/iamolegga/nestjs-configure-after)
666
- [![npm](https://img.shields.io/npm/dm/nestjs-configure-after?style=flat-square)](https://www.npmjs.com/package/nestjs-configure-after)
667
-
668
- Declarative configuration of NestJS middleware order
605
+ <h3 align="center">Also if you are into NestJS you might be interested in one of my <a href="https://github.com/iamolegga#nestjs">other NestJS libs</a>.</h3>
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "nestjs-pino",
3
- "version": "3.2.0",
3
+ "version": "3.3.0-alpha.0025d8",
4
4
  "description": "Pino logger for NestJS",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
7
7
  "scripts": {
8
- "test": "jest --verbose -i --detectOpenHandles",
9
- "lint": "eslint \"{src,__tests__}/**/*.ts\" --fix",
8
+ "test": "jest --verbose -i --detectOpenHandles --forceExit",
9
+ "lint": "tsc --noemit && eslint \"{src,__tests__}/**/*.ts\" --fix",
10
10
  "prebuild": "rimraf dist",
11
11
  "build": "tsc -p tsconfig.build.json",
12
12
  "example": "rimraf dist && tsc && LOG_LEVEL=debug node dist/example/main",
@@ -15,7 +15,9 @@
15
15
  "postinstall": "node postinstall.js"
16
16
  },
17
17
  "files": [
18
- "*.{js,d.ts}"
18
+ "*.{js,d.ts}",
19
+ "!jest.config.js",
20
+ "!.eslintrc.js"
19
21
  ],
20
22
  "engineStrict": true,
21
23
  "engines": {
@@ -32,62 +34,45 @@
32
34
  "nest",
33
35
  "logger"
34
36
  ],
35
- "author": "Oleg Repin <iamolegga@gmail.com> (http://github.com/iamolegga)",
37
+ "author": "iamolegga <iamolegga@gmail.com> (http://github.com/iamolegga)",
36
38
  "license": "MIT",
37
39
  "bugs": {
38
40
  "url": "https://github.com/iamolegga/nestjs-pino/issues"
39
41
  },
40
42
  "homepage": "https://github.com/iamolegga/nestjs-pino#readme",
41
43
  "devDependencies": {
42
- "@nestjs/common": "^9.4.0",
43
- "@nestjs/core": "^9.4.0",
44
- "@nestjs/platform-express": "^9.4.0",
45
- "@nestjs/platform-fastify": "^9.4.0",
46
- "@nestjs/testing": "^9.4.0",
44
+ "@nestjs/common": "^10.2.0",
45
+ "@nestjs/core": "^10.2.0",
46
+ "@nestjs/platform-express": "^10.2.0",
47
+ "@nestjs/platform-fastify": "^10.2.0",
48
+ "@nestjs/testing": "^10.2.0",
47
49
  "@types/express": "^4.17.17",
48
- "@types/jest": "^29.5.0",
50
+ "@types/jest": "^29.5.3",
49
51
  "@types/memorystream": "^0.3.1",
50
- "@types/node": "^18.15.11",
52
+ "@types/node": "^20.5.1",
51
53
  "@types/supertest": "^2.0.12",
52
- "@typescript-eslint/eslint-plugin": "^5.59.0",
53
- "@typescript-eslint/parser": "^5.59.0",
54
- "eslint": "^8.38.0",
55
- "eslint-config-prettier": "^8.8.0",
56
- "eslint-plugin-import": "^2.27.5",
57
- "eslint-plugin-prettier": "^4.2.1",
58
- "jest": "29.5.0",
54
+ "@typescript-eslint/eslint-plugin": "^6.4.0",
55
+ "@typescript-eslint/parser": "^6.4.0",
56
+ "eslint": "^8.47.0",
57
+ "eslint-config-prettier": "^9.0.0",
58
+ "eslint-plugin-import": "^2.28.1",
59
+ "eslint-plugin-prettier": "^5.0.0",
60
+ "jest": "29.6.2",
59
61
  "memorystream": "^0.3.1",
60
- "pino": "^8.11.0",
61
- "pino-http": "^8.3.3",
62
- "prettier": "^2.8.7",
62
+ "pino": "^8.15.0",
63
+ "pino-http": "^8.4.0",
64
+ "prettier": "^3.0.2",
63
65
  "reflect-metadata": "^0.1.13",
64
- "rimraf": "^5.0.0",
65
- "rxjs": "^7.8.0",
66
+ "rimraf": "^5.0.1",
67
+ "rxjs": "^7.8.1",
66
68
  "supertest": "^6.3.3",
67
- "ts-jest": "^29.1.0",
68
- "ts-loader": "^9.4.2",
69
+ "ts-jest": "^29.1.1",
70
+ "ts-loader": "^9.4.4",
69
71
  "ts-node": "^10.9.1",
70
- "tslint": "^6.0.0",
71
- "typescript": "^5.0.4"
72
- },
73
- "jest": {
74
- "moduleFileExtensions": [
75
- "js",
76
- "ts"
77
- ],
78
- "testRegex": ".spec.ts$",
79
- "transform": {
80
- "^.+\\.(t|j)s$": "ts-jest"
81
- },
82
- "collectCoverage": true,
83
- "coverageDirectory": "./coverage",
84
- "collectCoverageFrom": [
85
- "src/**/*.ts"
86
- ],
87
- "testEnvironment": "node"
72
+ "typescript": "^5.1.6"
88
73
  },
89
74
  "peerDependencies": {
90
- "@nestjs/common": "^8.0.0 || ^9.0.0",
75
+ "@nestjs/common": "^8.0.0 || ^9.0.0 || ^10.0.0",
91
76
  "pino-http": "^6.4.0 || ^7.0.0 || ^8.0.0"
92
77
  }
93
78
  }
package/params.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { Options } from 'pino-http';
2
- import { Logger, DestinationStream } from 'pino';
3
1
  import { MiddlewareConfigProxy, ModuleMetadata } from '@nestjs/common/interfaces';
2
+ import { Logger, DestinationStream } from 'pino';
3
+ import { Options } from 'pino-http';
4
4
  export type PassedLogger = {
5
5
  logger: Logger;
6
6
  };