unnbound-logger-sdk 3.0.5 → 3.0.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/dist/index.d.ts +1 -1
- package/dist/types.d.ts +19 -24
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* A structured logging library built on Pino with TypeScript support.
|
|
5
5
|
* Provides consistent, well-typed logging across different operational contexts.
|
|
6
6
|
*/
|
|
7
|
-
export type { LogLevel, LogType, HttpMethod, Log,
|
|
7
|
+
export type { LogLevel, LogType, HttpMethod, Log, HttpPayload, SftpPayload } from './types';
|
|
8
8
|
export type { UnnboundLogger } from './logger';
|
|
9
9
|
export { logger } from './logger';
|
|
10
10
|
export { withTrace, getTraceId } from './trace';
|
package/dist/types.d.ts
CHANGED
|
@@ -17,31 +17,29 @@ export interface Log<T extends LogType = 'general'> {
|
|
|
17
17
|
logId: string;
|
|
18
18
|
level: LogLevel;
|
|
19
19
|
message: string;
|
|
20
|
+
type: T;
|
|
20
21
|
traceId?: string;
|
|
21
22
|
spanId?: string;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
export interface LogTransaction<T extends LogType> extends Log<T> {
|
|
23
|
+
serviceId?: string;
|
|
24
|
+
deploymentId?: string;
|
|
25
|
+
workflowId?: string;
|
|
26
|
+
http: T extends 'http' ? HttpPayload : never;
|
|
27
|
+
sftp: T extends 'sftp' ? SftpPayload : never;
|
|
29
28
|
duration?: number;
|
|
29
|
+
err?: unknown;
|
|
30
30
|
}
|
|
31
|
-
export interface
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
body?: unknown;
|
|
44
|
-
};
|
|
31
|
+
export interface HttpPayload {
|
|
32
|
+
url: string;
|
|
33
|
+
method: HttpMethod;
|
|
34
|
+
ip?: string;
|
|
35
|
+
request: {
|
|
36
|
+
headers: Record<string, string | string[]>;
|
|
37
|
+
body?: unknown;
|
|
38
|
+
};
|
|
39
|
+
response?: {
|
|
40
|
+
headers: Record<string, string | string[]>;
|
|
41
|
+
status: number;
|
|
42
|
+
body?: unknown;
|
|
45
43
|
};
|
|
46
44
|
}
|
|
47
45
|
export type SftpOperation = 'connect' | 'upload' | 'download' | 'list' | 'delete' | 'rename' | 'stat' | 'exists' | 'realPath' | 'get' | 'put' | 'cwd' | 'mkdir' | 'rmdir' | 'chmod' | 'append' | 'uploadDir' | 'downloadDir' | 'close';
|
|
@@ -55,9 +53,6 @@ export interface SftpPayload {
|
|
|
55
53
|
content?: string;
|
|
56
54
|
exists?: string | false;
|
|
57
55
|
}
|
|
58
|
-
export interface SftpLog extends LogTransaction<'sftp'> {
|
|
59
|
-
sftp: SftpPayload;
|
|
60
|
-
}
|
|
61
56
|
export interface HttpOptions {
|
|
62
57
|
ignoreTraceRoutes?: string[];
|
|
63
58
|
traceHeaderKey?: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unnbound-logger-sdk",
|
|
3
3
|
"description": "A structured logging library with TypeScript support using Pino. Provides consistent, well-typed logging with automatic logId, workflowId, traceId, and deploymentId tracking across operational contexts.",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.7",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"keywords": [
|