@lucaapp/service-utils 1.55.6 → 1.55.7

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/README.md CHANGED
@@ -21,9 +21,9 @@ After this preparations run `package-development` from `services/backend/package
21
21
  The following environment should be at least in place when running the target to make sure your local `backend` setup uses the proper endpoints:
22
22
 
23
23
  ```shell
24
- DB_HOSTNAME=localhost
25
- KAFKA_BROKER=localhost:9094
26
- REDIS_HOSTNAME=localhost
24
+ export DB_HOSTNAME=localhost
25
+ export KAFKA_BROKER=localhost:9094
26
+ export REDIS_HOSTNAME=localhost
27
27
  ```
28
28
 
29
29
  It will utilize the linked package and run `backend` locally.
@@ -1,5 +1,5 @@
1
- import { Logger } from 'pino';
2
1
  import type { IncomingMessage, ServerResponse } from 'http';
2
+ import { Logger } from 'pino';
3
3
  import { HttpLoggerCreationOptions } from './utils';
4
4
  export declare const ignore: (request: IncomingMessage) => boolean;
5
5
  export declare class LoggerFactory {
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.LoggerFactory = exports.ignore = void 0;
7
+ const pick_1 = __importDefault(require("lodash/pick"));
7
8
  const pino_1 = __importDefault(require("pino"));
8
9
  const pino_http_1 = __importDefault(require("pino-http"));
9
- const pick_1 = __importDefault(require("lodash/pick"));
10
10
  const requestTracer_1 = require("../requestTracer");
11
11
  const ignore = (request) => {
12
12
  const url = request.url || '';
@@ -72,15 +72,19 @@ class HttpLoggerHelpers {
72
72
  ]);
73
73
  return request;
74
74
  };
75
- this.responseSerializer = pino_1.default.stdSerializers.wrapResponseSerializer(response => {
75
+ this.responseSerializer = (response) => {
76
76
  if (this.debug)
77
77
  return response;
78
- response.headers = (0, pick_1.default)(response.headers, [
78
+ const headers = (0, pick_1.default)(response.headers, [
79
79
  'content-type',
80
80
  'content-length',
81
+ 'x-request-id',
81
82
  ]);
82
- return response;
83
- });
83
+ return {
84
+ statusCode: response.statusCode,
85
+ headers,
86
+ };
87
+ };
84
88
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
85
89
  this.errorSerializer = (error) => {
86
90
  if (error?.parameters)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucaapp/service-utils",
3
- "version": "1.55.6",
3
+ "version": "1.55.7",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [