unnbound-logger-sdk 3.0.7 → 3.0.9

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/axios.js CHANGED
@@ -10,7 +10,7 @@ const buildOutgoingHttpPayload = (config, res) => ({
10
10
  type: 'http',
11
11
  http: {
12
12
  url: [config.baseURL, config.url].filter(Boolean).join(''),
13
- method: config.method?.toUpperCase() || 'GET',
13
+ method: config.method?.toLowerCase() ?? 'get',
14
14
  incoming: false,
15
15
  request: {
16
16
  headers: config.headers,
@@ -63,11 +63,11 @@ const traceAxios = (client, { ignoreTraceRoutes = types_1.defaultIgnoreTraceRout
63
63
  client.request = tracedRequest;
64
64
  ['post', 'put', 'patch'].forEach((method) => {
65
65
  const func = createSpanWrappedRequest(request, method);
66
- client[method] = (url, data, config) => func({ ...config, url, data });
66
+ client[method] = (url, data, config) => func({ ...config, method, url, data });
67
67
  });
68
68
  ['delete', 'get', 'head', 'options'].forEach((method) => {
69
69
  const func = createSpanWrappedRequest(request, method);
70
- client[method] = (url, config) => func({ ...config, url });
70
+ client[method] = (url, config) => func({ ...config, method, url });
71
71
  });
72
72
  return client;
73
73
  };
@@ -23,7 +23,7 @@ const buildIncomingHttpPayload = (req, res, body) => ({
23
23
  type: 'http',
24
24
  http: {
25
25
  url: getFullUrl(req),
26
- method: req.method,
26
+ method: req.method.toLowerCase(),
27
27
  ip: (0, utils_1.normalizeIp)(req.ip),
28
28
  incoming: true,
29
29
  request: {
package/dist/types.d.ts CHANGED
@@ -12,7 +12,7 @@ export type LogType = 'general' | 'http' | 'sftp';
12
12
  /**
13
13
  * HTTP methods supported for HTTP logging
14
14
  */
15
- export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'OPTIONS' | 'HEAD';
15
+ export type HttpMethod = 'get' | 'post' | 'put' | 'delete' | 'patch' | 'options' | 'head';
16
16
  export interface Log<T extends LogType = 'general'> {
17
17
  logId: string;
18
18
  level: LogLevel;
@@ -49,7 +49,7 @@ export interface SftpPayload {
49
49
  path?: string;
50
50
  bytes?: number;
51
51
  destinationPath?: string;
52
- files?: number;
52
+ files?: string[];
53
53
  content?: string;
54
54
  exists?: string | false;
55
55
  }
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.7",
4
+ "version": "3.0.9",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "keywords": [
@@ -34,7 +34,7 @@
34
34
  "devDependencies": {
35
35
  "@types/express": "^4.17.21",
36
36
  "@types/jest": "^29.5.12",
37
- "@types/node": "^20.11.24",
37
+ "@types/node": "^22",
38
38
  "@types/uuid": "^9.0.8"
39
39
  },
40
40
  "peerDependencies": {
@@ -55,7 +55,7 @@
55
55
  "LICENSE"
56
56
  ],
57
57
  "engines": {
58
- "node": ">=22.0.0"
58
+ "node": ">=22"
59
59
  },
60
60
  "sideEffects": false,
61
61
  "scripts": {
@@ -68,8 +68,7 @@
68
68
  "lint:fix": "pnpm lint --fix",
69
69
  "format": "prettier --write .",
70
70
  "format:check": "prettier --check .",
71
- "start:example:node-app": "npx tsx --watch examples/node-app.ts",
72
- "start:example:basic-usage": "npx tsx --watch examples/basic-usage.ts",
71
+ "start:example": "npx --yes tsx --watch examples/node-express.ts",
73
72
  "version:bump": "npm version patch"
74
73
  }
75
74
  }