@tsed/platform-log-request 8.0.0-rc.1 → 8.0.0-rc.3
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultAlterLog.js","sourceRoot":"","sources":["../../../src/utils/defaultAlterLog.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,eAAe,CAAC,KAAa,EAAE,GAA4B,EAAE,
|
|
1
|
+
{"version":3,"file":"defaultAlterLog.js","sourceRoot":"","sources":["../../../src/utils/defaultAlterLog.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,eAAe,CAAC,KAAa,EAAE,GAA4B,EAAE,GAAc;IACzF,MAAM,UAAU,GAAG;QACjB,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,MAAM;QAC1B,GAAG,EAAE,GAAG,CAAC,OAAO,CAAC,GAAG;QACpB,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,KAAK,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG;QAC3C,GAAG,GAAG;KACP,CAAC;IAEF,IAAI,KAAK,KAAK,MAAM,EAAE,CAAC;QACrB,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,OAAO;QACL,GAAG,UAAU;QACb,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,OAAO;QAC5B,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,IAAI;QACtB,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,KAAK;QACxB,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,MAAM;KAC3B,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export type AlterLogCallback = (level: "debug" | "info" | "warn" | "error" | "all", obj: Record<string, unknown>, ctx:
|
|
1
|
+
import type { DIContext } from "@tsed/di";
|
|
2
|
+
export type AlterLogCallback = (level: "debug" | "info" | "warn" | "error" | "all", obj: Record<string, unknown>, ctx: DIContext) => Record<string, unknown>;
|
|
3
3
|
export interface PlatformLogRequestSettings {
|
|
4
4
|
/**
|
|
5
5
|
* Log all incoming request. By default, is true and print the configured `logger.requestFields`.
|
|
@@ -12,7 +12,7 @@ export interface PlatformLogRequestSettings {
|
|
|
12
12
|
/**
|
|
13
13
|
* A function to log the server response.
|
|
14
14
|
*/
|
|
15
|
-
onLogResponse?: ($ctx:
|
|
15
|
+
onLogResponse?: ($ctx: DIContext) => void;
|
|
16
16
|
}
|
|
17
17
|
declare global {
|
|
18
18
|
namespace TsED {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Configuration } from "@tsed/di";
|
|
2
2
|
import { defaultAlterLog } from "../utils/defaultAlterLog.js";
|
|
3
3
|
declare function factory(configuration: Configuration): {
|
|
4
4
|
alterLog: import("../index.js").AlterLogCallback | typeof defaultAlterLog;
|
|
5
|
-
onLogResponse: ($ctx:
|
|
5
|
+
onLogResponse: ($ctx: import("@tsed/di").DIContext) => void;
|
|
6
6
|
} | null;
|
|
7
7
|
export declare const PlatformLogRequestFactory: unique symbol;
|
|
8
8
|
export type PlatformLogRequestFactory = ReturnType<typeof factory>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function defaultAlterLog(level: string, obj: Record<string, unknown>, ctx:
|
|
1
|
+
import type { DIContext } from "@tsed/di";
|
|
2
|
+
export declare function defaultAlterLog(level: string, obj: Record<string, unknown>, ctx: DIContext): {
|
|
3
3
|
method: any;
|
|
4
4
|
url: any;
|
|
5
5
|
route: any;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@tsed/platform-log-request",
|
|
3
3
|
"description": "Log request module for Ts.ED Framework (Express, Koa, Serverless)",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "8.0.0-rc.
|
|
5
|
+
"version": "8.0.0-rc.3",
|
|
6
6
|
"source": "./src/index.ts",
|
|
7
7
|
"main": "./lib/esm/index.js",
|
|
8
8
|
"module": "./lib/esm/index.js",
|
|
@@ -25,19 +25,19 @@
|
|
|
25
25
|
"tslib": "2.7.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@tsed/barrels": "8.0.0-rc.
|
|
29
|
-
"@tsed/di": "8.0.0-rc.
|
|
30
|
-
"@tsed/platform-middlewares": "8.0.0-rc.
|
|
31
|
-
"@tsed/platform-params": "8.0.0-rc.
|
|
32
|
-
"@tsed/typescript": "8.0.0-rc.
|
|
28
|
+
"@tsed/barrels": "8.0.0-rc.3",
|
|
29
|
+
"@tsed/di": "8.0.0-rc.3",
|
|
30
|
+
"@tsed/platform-middlewares": "8.0.0-rc.3",
|
|
31
|
+
"@tsed/platform-params": "8.0.0-rc.3",
|
|
32
|
+
"@tsed/typescript": "8.0.0-rc.3",
|
|
33
33
|
"eslint": "9.12.0",
|
|
34
34
|
"typescript": "5.4.5",
|
|
35
35
|
"vitest": "2.1.2"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@tsed/di": "8.0.0-rc.
|
|
39
|
-
"@tsed/platform-middlewares": "8.0.0-rc.
|
|
40
|
-
"@tsed/platform-params": "8.0.0-rc.
|
|
38
|
+
"@tsed/di": "8.0.0-rc.3",
|
|
39
|
+
"@tsed/platform-middlewares": "8.0.0-rc.3",
|
|
40
|
+
"@tsed/platform-params": "8.0.0-rc.3"
|
|
41
41
|
},
|
|
42
42
|
"peerDependenciesMeta": {
|
|
43
43
|
"@tsed/di": {
|