unnbound-events 1.0.19 → 1.0.21

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,14 +1,50 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.traceMiddleware = exports.traceAxios = exports.startSpan = exports.getTraceId = exports.withTrace = exports.logger = void 0;
4
- var logger_1 = require("./logger");
5
- Object.defineProperty(exports, "logger", { enumerable: true, get: function () { return logger_1.logger; } });
6
- var trace_1 = require("./trace");
7
- Object.defineProperty(exports, "withTrace", { enumerable: true, get: function () { return trace_1.withTrace; } });
8
- Object.defineProperty(exports, "getTraceId", { enumerable: true, get: function () { return trace_1.getTraceId; } });
9
- var span_1 = require("./span");
10
- Object.defineProperty(exports, "startSpan", { enumerable: true, get: function () { return span_1.startSpan; } });
11
- var axios_1 = require("./axios");
12
- Object.defineProperty(exports, "traceAxios", { enumerable: true, get: function () { return axios_1.traceAxios; } });
13
- var middleware_1 = require("./middleware");
14
- Object.defineProperty(exports, "traceMiddleware", { enumerable: true, get: function () { return middleware_1.traceMiddleware; } });
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
+ exports.traceMiddleware =
4
+ exports.traceAxios =
5
+ exports.startSpan =
6
+ exports.getTraceId =
7
+ exports.withTrace =
8
+ exports.logger =
9
+ void 0;
10
+ var logger_1 = require('./logger');
11
+ Object.defineProperty(exports, 'logger', {
12
+ enumerable: true,
13
+ get: function () {
14
+ return logger_1.logger;
15
+ },
16
+ });
17
+ var trace_1 = require('./trace');
18
+ Object.defineProperty(exports, 'withTrace', {
19
+ enumerable: true,
20
+ get: function () {
21
+ return trace_1.withTrace;
22
+ },
23
+ });
24
+ Object.defineProperty(exports, 'getTraceId', {
25
+ enumerable: true,
26
+ get: function () {
27
+ return trace_1.getTraceId;
28
+ },
29
+ });
30
+ var span_1 = require('./span');
31
+ Object.defineProperty(exports, 'startSpan', {
32
+ enumerable: true,
33
+ get: function () {
34
+ return span_1.startSpan;
35
+ },
36
+ });
37
+ var axios_1 = require('./axios');
38
+ Object.defineProperty(exports, 'traceAxios', {
39
+ enumerable: true,
40
+ get: function () {
41
+ return axios_1.traceAxios;
42
+ },
43
+ });
44
+ var middleware_1 = require('./middleware');
45
+ Object.defineProperty(exports, 'traceMiddleware', {
46
+ enumerable: true,
47
+ get: function () {
48
+ return middleware_1.traceMiddleware;
49
+ },
50
+ });
@@ -1,15 +1,21 @@
1
1
  import pino from 'pino';
2
- export interface UnnboundLogger extends Omit<pino.Logger, 'trace' | 'debug' | 'error' | 'info' | 'warn'> {
3
- trace(object: {}, message: string): void;
4
- trace(message: string): void;
5
- debug(object: {}, message: string): void;
6
- debug(message: string): void;
7
- info(object: {}, message: string): void;
8
- info(message: string): void;
9
- warn(object: {}, message: string): void;
10
- warn(message: string): void;
11
- error<O extends {
12
- err: unknown;
13
- }>(object: O, message: string): void;
2
+ export interface UnnboundLogger
3
+ extends Omit<pino.Logger, 'trace' | 'debug' | 'error' | 'info' | 'warn'> {
4
+ trace(object: {}, message: string): void;
5
+ trace(message: string): void;
6
+ debug(object: {}, message: string): void;
7
+ debug(message: string): void;
8
+ info(object: {}, message: string): void;
9
+ info(message: string): void;
10
+ warn(object: {}, message: string): void;
11
+ warn(message: string): void;
12
+ error<
13
+ O extends {
14
+ err: unknown;
15
+ },
16
+ >(
17
+ object: O,
18
+ message: string
19
+ ): void;
14
20
  }
15
21
  export declare const logger: UnnboundLogger;
@@ -1,44 +1,46 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ 'use strict';
2
+ var __importDefault =
3
+ (this && this.__importDefault) ||
4
+ function (mod) {
5
+ return mod && mod.__esModule ? mod : { default: mod };
6
+ };
7
+ Object.defineProperty(exports, '__esModule', { value: true });
6
8
  exports.logger = void 0;
7
- const pino_1 = __importDefault(require("pino"));
8
- const uuid_1 = require("uuid");
9
- const storage_1 = require("./storage");
9
+ const pino_1 = __importDefault(require('pino'));
10
+ const uuid_1 = require('uuid');
11
+ const storage_1 = require('./storage');
10
12
  exports.logger = (0, pino_1.default)({
11
- level: process.env.LOG_LEVEL ?? 'info',
12
- base: {
13
- environment: process.env.ENVIRONMENT,
14
- workflowId: process.env.UNNBOUND_WORKFLOW_ID,
15
- serviceId: process.env.UNNBOUND_SERVICE_ID,
16
- deploymentId: process.env.UNNBOUND_DEPLOYMENT_ID,
17
- },
18
- mixin: () => ({ ...storage_1.storage.getStore(), logId: (0, uuid_1.v4)() }),
19
- serializers: {
20
- req: pino_1.default.stdSerializers.req,
21
- res: pino_1.default.stdSerializers.res,
22
- err: pino_1.default.stdSerializers.err,
23
- },
24
- // Let CloudWatch handle timestamps
25
- timestamp: false,
26
- // Change message field from 'msg' to 'message'
27
- messageKey: 'message',
28
- formatters: {
29
- level: (level) => ({ level }),
30
- },
31
- redact: {
32
- paths: [
33
- 'http.request.headers.authorization',
34
- 'http.response.headers.authorization',
35
- 'http.request.headers.Authorization',
36
- 'http.response.headers.Authorization',
37
- 'err.config',
38
- ],
39
- remove: true,
40
- },
13
+ level: process.env.LOG_LEVEL ?? 'info',
14
+ base: {
15
+ environment: process.env.ENVIRONMENT,
16
+ workflowId: process.env.UNNBOUND_WORKFLOW_ID,
17
+ serviceId: process.env.UNNBOUND_SERVICE_ID,
18
+ deploymentId: process.env.UNNBOUND_DEPLOYMENT_ID,
19
+ },
20
+ mixin: () => ({ ...storage_1.storage.getStore(), logId: (0, uuid_1.v4)() }),
21
+ serializers: {
22
+ req: pino_1.default.stdSerializers.req,
23
+ res: pino_1.default.stdSerializers.res,
24
+ err: pino_1.default.stdSerializers.err,
25
+ },
26
+ // Let CloudWatch handle timestamps
27
+ timestamp: false,
28
+ // Change message field from 'msg' to 'message'
29
+ messageKey: 'message',
30
+ formatters: {
31
+ level: (level) => ({ level }),
32
+ },
33
+ redact: {
34
+ paths: [
35
+ 'http.request.headers.authorization',
36
+ 'http.response.headers.authorization',
37
+ 'http.request.headers.Authorization',
38
+ 'http.response.headers.Authorization',
39
+ 'err.config',
40
+ ],
41
+ remove: true,
42
+ },
41
43
  });
42
44
  process.on('uncaughtException', (err, origin) => {
43
- exports.logger.error({ err, origin }, `Uncaught exception.`);
45
+ exports.logger.error({ err, origin }, `Uncaught exception.`);
44
46
  });
@@ -1,10 +1,6 @@
1
- import { Request, RequestHandler } from 'express';
1
+ import { RequestHandler } from 'express';
2
2
  import { HttpOptions } from './types';
3
- interface Response {
4
- status: number;
5
- headers?: Record<string, string | undefined>;
6
- body?: unknown;
7
- }
8
- type GetPayload = (config: Request, res?: Response) => object;
9
- export declare const traceMiddleware: ({ ignoreTraceRoutes, traceHeaderKey, getPayload, }?: HttpOptions<GetPayload>) => RequestHandler;
10
- export {};
3
+ export declare const traceMiddleware: ({
4
+ ignoreTraceRoutes,
5
+ traceHeaderKey,
6
+ }?: HttpOptions) => RequestHandler;
@@ -1,76 +1,88 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
3
  exports.traceMiddleware = void 0;
4
- const span_1 = require("./span");
5
- const types_1 = require("./types");
6
- const utils_1 = require("./utils");
7
- const trace_1 = require("./trace");
4
+ const span_1 = require('./span');
5
+ const types_1 = require('./types');
6
+ const utils_1 = require('./utils');
7
+ const trace_1 = require('./trace');
8
8
  const getFullUrl = (req) => {
9
- const url = req.originalUrl || req.url;
10
- if (url?.startsWith('http://') || url?.startsWith('https://'))
11
- return url;
12
- // Check if we have a workflow URL configured (preferred method)
13
- if (process.env.UNNBOUND_WORKFLOW_URL) {
14
- // Use workflow URL as the base URL
15
- return `${process.env.UNNBOUND_WORKFLOW_URL.replace(/\/$/, '')}${url}`;
16
- }
17
- // Fallback to constructing from request info for incoming requests
18
- const protocol = req.protocol || (req.secure ? 'https' : 'http');
19
- const host = req.get('host') || req.get('x-forwarded-host') || 'localhost';
20
- return `${protocol}://${host}${url}`;
9
+ const url = req.originalUrl || req.url;
10
+ if (url?.startsWith('http://') || url?.startsWith('https://')) return url;
11
+ // Check if we have a workflow URL configured (preferred method)
12
+ if (process.env.UNNBOUND_WORKFLOW_URL) {
13
+ // Use workflow URL as the base URL
14
+ return `${process.env.UNNBOUND_WORKFLOW_URL.replace(/\/$/, '')}${url}`;
15
+ }
16
+ // Fallback to constructing from request info for incoming requests
17
+ const protocol = req.protocol || (req.secure ? 'https' : 'http');
18
+ const host = req.get('host') || req.get('x-forwarded-host') || 'localhost';
19
+ return `${protocol}://${host}${url}`;
21
20
  };
22
- const buildIncomingHttpPayload = (req, res) => ({
23
- type: 'http',
24
- http: {
25
- url: getFullUrl(req),
26
- method: req.method.toLowerCase(),
27
- ip: (0, utils_1.normalizeIp)(req.ip),
28
- incoming: true,
29
- request: {
30
- headers: req.headers,
31
- body: (0, utils_1.safeJsonParse)(req.body),
32
- },
33
- response: res
34
- ? {
35
- headers: res.headers,
36
- status: res.status,
37
- body: (0, utils_1.safeJsonParse)(res.body),
38
- }
39
- : undefined,
21
+ const buildIncomingHttpPayload = (req, res, body) => ({
22
+ type: 'http',
23
+ http: {
24
+ url: getFullUrl(req),
25
+ method: req.method.toLowerCase(),
26
+ ip: (0, utils_1.normalizeIp)(req.ip),
27
+ incoming: true,
28
+ request: {
29
+ headers: req.headers,
30
+ body: (0, utils_1.safeJsonParse)(req.body),
40
31
  },
32
+ response: res
33
+ ? {
34
+ headers: res?.headers,
35
+ status: res.statusCode,
36
+ body: (0, utils_1.safeJsonParse)(body),
37
+ }
38
+ : undefined,
39
+ },
41
40
  });
42
- const getNoopPayload = () => ({});
43
- const traceMiddleware = ({ ignoreTraceRoutes = types_1.defaultIgnoreTraceRoutes, traceHeaderKey = types_1.defaultTraceHeaderKey, getPayload = getNoopPayload, } = {
44
- ignoreTraceRoutes: types_1.defaultIgnoreTraceRoutes,
45
- traceHeaderKey: types_1.defaultTraceHeaderKey,
46
- getPayload: getNoopPayload,
47
- }) => async (req, res, next) => {
48
- if ((0, utils_1.shouldIgnorePath)(req.path, ignoreTraceRoutes))
49
- return next();
41
+ const traceMiddleware =
42
+ (
43
+ {
44
+ ignoreTraceRoutes = types_1.defaultIgnoreTraceRoutes,
45
+ traceHeaderKey = types_1.defaultTraceHeaderKey,
46
+ } = {
47
+ ignoreTraceRoutes: types_1.defaultIgnoreTraceRoutes,
48
+ traceHeaderKey: types_1.defaultTraceHeaderKey,
49
+ }
50
+ ) =>
51
+ async (req, res, next) => {
52
+ if ((0, utils_1.shouldIgnorePath)(req.path, ignoreTraceRoutes)) return next();
50
53
  const traceId = req.header(traceHeaderKey) || (0, trace_1.getTraceId)();
51
54
  res.setHeader(traceHeaderKey, traceId);
52
- return await (0, trace_1.withTrace)(async () => {
53
- return await (0, span_1.startSpan)('Incoming HTTP request', async () => {
55
+ return await (0, trace_1.withTrace)(
56
+ async () => {
57
+ return await (0, span_1.startSpan)(
58
+ 'Incoming HTTP request',
59
+ async () => {
54
60
  return new Promise((resolve) => {
55
- // Capture response body for logging
56
- const send = res.send.bind(res);
57
- res.send = (body) => {
58
- res.locals.body = body;
59
- return send(body);
60
- };
61
- res.on('finish', () => resolve());
62
- return next();
61
+ // Capture response body for logging
62
+ const send = res.send.bind(res);
63
+ res.send = (body) => {
64
+ res.locals.body = body;
65
+ return send(body);
66
+ };
67
+ res.on('finish', () => resolve());
68
+ return next();
63
69
  });
64
- }, (o) => {
65
- const response = o
70
+ },
71
+ (o) => {
72
+ return buildIncomingHttpPayload(
73
+ req,
74
+ o
66
75
  ? {
67
- status: res.statusCode,
76
+ statusCode: res.statusCode,
68
77
  headers: res.getHeaders(),
69
- body: res.locals.body,
70
- }
71
- : undefined;
72
- return { ...buildIncomingHttpPayload(req, response), ...getPayload(req, response) };
73
- });
74
- }, { traceId });
75
- };
78
+ }
79
+ : undefined,
80
+ res.locals.body
81
+ );
82
+ }
83
+ );
84
+ },
85
+ { traceId }
86
+ );
87
+ };
76
88
  exports.traceMiddleware = traceMiddleware;
@@ -1,10 +1,12 @@
1
- type LogPayloadGetterOptions<T> = {
2
- error: unknown;
3
- result?: never;
4
- } | {
5
- error?: never;
6
- result: T;
7
- };
1
+ type LogPayloadGetterOptions<T> =
2
+ | {
3
+ error: unknown;
4
+ result?: never;
5
+ }
6
+ | {
7
+ error?: never;
8
+ result: T;
9
+ };
8
10
  type LogPayloadGetter<T> = object | ((o?: LogPayloadGetterOptions<T>) => object);
9
11
  /**
10
12
  * Starts a span that tracks the duration of a callback
@@ -12,5 +14,9 @@ type LogPayloadGetter<T> = object | ((o?: LogPayloadGetterOptions<T>) => object)
12
14
  * @param callback - The async callback to execute
13
15
  * @returns The result of the callback
14
16
  */
15
- export declare const startSpan: <T>(spanName: string, callback: () => Promise<T>, getter?: LogPayloadGetter<T>) => Promise<T>;
17
+ export declare const startSpan: <T>(
18
+ spanName: string,
19
+ callback: () => Promise<T>,
20
+ getter?: LogPayloadGetter<T>
21
+ ) => Promise<T>;
16
22
  export {};
@@ -1,10 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
3
  exports.startSpan = void 0;
4
- const uuid_1 = require("uuid");
5
- const storage_1 = require("./storage");
6
- const trace_1 = require("./trace");
7
- const logger_1 = require("./logger");
4
+ const uuid_1 = require('uuid');
5
+ const storage_1 = require('./storage');
6
+ const trace_1 = require('./trace');
7
+ const logger_1 = require('./logger');
8
8
  /**
9
9
  * Starts a span that tracks the duration of a callback
10
10
  * @param spanName - The span name to use for logging
@@ -12,30 +12,37 @@ const logger_1 = require("./logger");
12
12
  * @returns The result of the callback
13
13
  */
14
14
  const startSpan = async (spanName, callback, getter) => {
15
- const spanId = (0, uuid_1.v4)();
16
- const start = performance.now();
17
- const previous = storage_1.storage.getStore();
18
- return storage_1.storage.run({
19
- ...previous,
20
- traceId: previous?.traceId ?? (0, trace_1.getTraceId)(),
21
- spanId: previous?.spanId ? `${spanId} ${previous?.spanId}` : spanId,
22
- }, async () => {
23
- logger_1.logger.info({ ...getLogPayload(getter) }, `${spanName} started.`);
24
- try {
25
- const result = await callback();
26
- logger_1.logger.info({ ...getLogPayload(getter, { result }), duration: getDuration(start) }, `${spanName} completed.`);
27
- return result;
28
- }
29
- catch (error) {
30
- logger_1.logger.error({ ...getLogPayload(getter, { error }), err: error, duration: getDuration(start) }, `${spanName} failed.`);
31
- throw error;
32
- }
33
- });
15
+ const spanId = (0, uuid_1.v4)();
16
+ const start = performance.now();
17
+ const previous = storage_1.storage.getStore();
18
+ return storage_1.storage.run(
19
+ {
20
+ ...previous,
21
+ traceId: previous?.traceId ?? (0, trace_1.getTraceId)(),
22
+ spanId: previous?.spanId ? `${spanId} ${previous?.spanId}` : spanId,
23
+ },
24
+ async () => {
25
+ logger_1.logger.info({ ...getLogPayload(getter) }, `${spanName} started.`);
26
+ try {
27
+ const result = await callback();
28
+ logger_1.logger.info(
29
+ { ...getLogPayload(getter, { result }), duration: getDuration(start) },
30
+ `${spanName} completed.`
31
+ );
32
+ return result;
33
+ } catch (error) {
34
+ logger_1.logger.error(
35
+ { ...getLogPayload(getter, { error }), err: error, duration: getDuration(start) },
36
+ `${spanName} failed.`
37
+ );
38
+ throw error;
39
+ }
40
+ }
41
+ );
34
42
  };
35
43
  exports.startSpan = startSpan;
36
44
  const getLogPayload = (getter, o) => {
37
- if (typeof getter !== 'function')
38
- return getter;
39
- return getter(o);
45
+ if (typeof getter !== 'function') return getter;
46
+ return getter(o);
40
47
  };
41
48
  const getDuration = (start) => Math.round(performance.now() - start);
@@ -1,6 +1,6 @@
1
1
  import { AsyncLocalStorage } from 'async_hooks';
2
2
  export interface Context {
3
- traceId?: string;
4
- spanId?: string;
3
+ traceId?: string;
4
+ spanId?: string;
5
5
  }
6
6
  export declare const storage: AsyncLocalStorage<Context>;
@@ -1,5 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
3
  exports.storage = void 0;
4
- const async_hooks_1 = require("async_hooks");
4
+ const async_hooks_1 = require('async_hooks');
5
5
  exports.storage = new async_hooks_1.AsyncLocalStorage();
@@ -9,6 +9,12 @@ export declare const getTraceId: () => string;
9
9
  * @param extra - Extra context to add to the trace
10
10
  * @returns The result of the callback
11
11
  */
12
- export declare const withTrace: <T, E extends {
12
+ export declare const withTrace: <
13
+ T,
14
+ E extends {
13
15
  traceId?: string;
14
- }>(callback: () => T, extra?: E) => T;
16
+ },
17
+ >(
18
+ callback: () => T,
19
+ extra?: E
20
+ ) => T;
@@ -1,8 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
3
  exports.withTrace = exports.getTraceId = void 0;
4
- const uuid_1 = require("uuid");
5
- const storage_1 = require("./storage");
4
+ const uuid_1 = require('uuid');
5
+ const storage_1 = require('./storage');
6
6
  /**
7
7
  * Generates a trace ID
8
8
  * @returns A trace ID
@@ -16,6 +16,13 @@ exports.getTraceId = getTraceId;
16
16
  * @returns The result of the callback
17
17
  */
18
18
  const withTrace = (callback, extra) => {
19
- return storage_1.storage.run({ ...storage_1.storage.getStore(), ...extra, traceId: extra?.traceId ?? (0, exports.getTraceId)() }, callback);
19
+ return storage_1.storage.run(
20
+ {
21
+ ...storage_1.storage.getStore(),
22
+ ...extra,
23
+ traceId: extra?.traceId ?? (0, exports.getTraceId)(),
24
+ },
25
+ callback
26
+ );
20
27
  };
21
28
  exports.withTrace = withTrace;
@@ -14,49 +14,67 @@ export type LogType = 'general' | 'http' | 'sftp';
14
14
  */
15
15
  export type HttpMethod = 'get' | 'post' | 'put' | 'delete' | 'patch' | 'options' | 'head';
16
16
  export interface Log<T extends LogType = 'general'> {
17
- logId: string;
18
- level: LogLevel;
19
- message: string;
20
- type: T;
21
- traceId?: string;
22
- spanId?: string;
23
- serviceId?: string;
24
- deploymentId?: string;
25
- workflowId?: string;
26
- http: T extends 'http' ? HttpPayload : never;
27
- sftp: T extends 'sftp' ? SftpPayload : never;
28
- duration?: number;
29
- err?: unknown;
17
+ logId: string;
18
+ level: LogLevel;
19
+ message: string;
20
+ type: T;
21
+ traceId?: string;
22
+ spanId?: string;
23
+ serviceId?: string;
24
+ deploymentId?: string;
25
+ workflowId?: string;
26
+ http: T extends 'http' ? HttpPayload : never;
27
+ sftp: T extends 'sftp' ? SftpPayload : never;
28
+ duration?: number;
29
+ err?: unknown;
30
30
  }
31
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;
43
- };
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;
43
+ };
44
44
  }
45
- export type SftpOperation = 'connect' | 'upload' | 'download' | 'list' | 'delete' | 'rename' | 'stat' | 'exists' | 'realPath' | 'get' | 'put' | 'cwd' | 'mkdir' | 'rmdir' | 'chmod' | 'append' | 'uploadDir' | 'downloadDir' | 'close';
45
+ export type SftpOperation =
46
+ | 'connect'
47
+ | 'upload'
48
+ | 'download'
49
+ | 'list'
50
+ | 'delete'
51
+ | 'rename'
52
+ | 'stat'
53
+ | 'exists'
54
+ | 'realPath'
55
+ | 'get'
56
+ | 'put'
57
+ | 'cwd'
58
+ | 'mkdir'
59
+ | 'rmdir'
60
+ | 'chmod'
61
+ | 'append'
62
+ | 'uploadDir'
63
+ | 'downloadDir'
64
+ | 'close';
46
65
  export interface SftpPayload {
47
- host: string;
48
- operation: SftpOperation;
49
- path?: string;
50
- bytes?: number;
51
- destinationPath?: string;
52
- files?: string[];
53
- content?: string;
54
- exists?: string | false;
66
+ host: string;
67
+ operation: SftpOperation;
68
+ path?: string;
69
+ bytes?: number;
70
+ destinationPath?: string;
71
+ files?: string[];
72
+ content?: string;
73
+ exists?: string | false;
55
74
  }
56
- export interface HttpOptions<G extends Function> {
57
- ignoreTraceRoutes?: string[];
58
- traceHeaderKey?: string;
59
- getPayload?: G;
75
+ export interface HttpOptions {
76
+ ignoreTraceRoutes?: string[];
77
+ traceHeaderKey?: string;
60
78
  }
61
79
  export declare const defaultIgnoreTraceRoutes: string[];
62
- export declare const defaultTraceHeaderKey = "x-unnbound-trace-id";
80
+ export declare const defaultTraceHeaderKey = 'x-unnbound-trace-id';
@@ -1,8 +1,8 @@
1
- "use strict";
1
+ 'use strict';
2
2
  /**
3
3
  * Type definitions for structured logging library
4
4
  */
5
- Object.defineProperty(exports, "__esModule", { value: true });
5
+ Object.defineProperty(exports, '__esModule', { value: true });
6
6
  exports.defaultTraceHeaderKey = exports.defaultIgnoreTraceRoutes = void 0;
7
7
  exports.defaultIgnoreTraceRoutes = ['/health', '/healthcheck'];
8
8
  exports.defaultTraceHeaderKey = 'x-unnbound-trace-id';