@devrev/ts-adaas 1.13.4-beta.3 → 1.14.0

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":"index.d.ts","sourceRoot":"","sources":["../../../src/deprecated/adapter/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,YAAY,EACZ,SAAS,EAET,kBAAkB,EACnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAE9D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAK5D,OAAO,EAAE,KAAK,EAAsB,MAAM,mBAAmB,CAAC;AAG9D;;;;;;;;;;;;;GAaG;AAEH;;;;;;;GAOG;AAEH,wBAAsB,aAAa,CAAC,cAAc,EAChD,KAAK,EAAE,YAAY,EACnB,YAAY,EAAE,cAAc,EAC5B,kBAAkB,GAAE,OAAe,oCAiBpC;AAED,qBAAa,OAAO,CAAC,cAAc;IACjC,OAAO,CAAC,YAAY,CAAwB;IAC5C,OAAO,CAAC,UAAU,CAAa;IAE/B,OAAO,CAAC,KAAK,CAAe;IAC5B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,WAAW,CAA4C;IAC/D,OAAO,CAAC,IAAI,CAAkB;IAC9B,OAAO,CAAC,aAAa,CAA0B;IAC/C,OAAO,CAAC,iBAAiB,CAAqB;gBAG5C,KAAK,EAAE,YAAY,EACnB,YAAY,EAAE,KAAK,CAAC,cAAc,CAAC,EACnC,kBAAkB,GAAE,OAAe;IAwBrC,IAAI,KAAK,IAAI,YAAY,CAAC,cAAc,CAAC,CAExC;IAED,IAAI,KAAK,CAAC,KAAK,EAAE,YAAY,CAAC,cAAc,CAAC,EAE5C;IAED,IAAI,SAAS,IAAI,QAAQ,EAAE,CAE1B;IAED,IAAI,SA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AC,EAE5C;IAED,IAAI,SAAS,IAAI,QAAQ,EAAE,CAE1B;IAED,IAAI,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,EAE9B;IAED;;;;;OAKG;IACG,IAAI,CAAC,YAAY,EAAE,kBAAkB,EAAE,IAAI,CAAC,EAAE,SAAS;IAoD7D;;;OAGG;IACH,OAAO,CAAC,WAAW;IAInB;;;OAGG;YACW,SAAS;CAiBxB"}
@@ -11,6 +11,7 @@ const helpers_1 = require("../common/helpers");
11
11
  // import { Logger } from '../../logger/logger';
12
12
  const state_1 = require("../../state/state");
13
13
  const event_type_translation_1 = require("../../common/event-type-translation");
14
+ const logger_context_1 = require("../../logger/logger.context");
14
15
  /**
15
16
  * Adapter class is used to interact with Airdrop platform. The class provides
16
17
  * utilities to
@@ -90,7 +91,7 @@ class Adapter {
90
91
  }
91
92
  // We want to save the state every time we emit an event, except for the start and delete events
92
93
  if (!constants_1.STATELESS_EVENT_TYPES.includes(this.event.payload.event_type)) {
93
- console.log(`Saving state before emitting event`);
94
+ (0, logger_context_1.runWithSdkLogContext)(() => console.log(`Saving state before emitting event`));
94
95
  await this.adapterState.postState(this.state);
95
96
  }
96
97
  const newEvent = {
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Executes a function within user log context, marking all logs as user-originated.
3
+ *
4
+ * Use this to wrap user-provided callback functions (e.g., task handlers, event callbacks).
5
+ * The context automatically propagates through any async operations within the function,
6
+ * ensuring that all console.log calls inside are correctly tagged as user logs.
7
+ *
8
+ * @template T - The return type of the function
9
+ * @param fn - The function to execute within user context (can be sync or async)
10
+ * @returns The result of the function execution
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * await runWithUserLogContext(async () => {
15
+ * console.log('This is a user log'); // is_sdk_log: false
16
+ * await someAsyncOperation();
17
+ * console.log('Still a user log'); // is_sdk_log: false (context preserved)
18
+ * });
19
+ * ```
20
+ */
21
+ export declare function runWithUserLogContext<T>(fn: () => T): T;
22
+ /**
23
+ * Executes a function within SDK log context, marking all logs as SDK-originated.
24
+ *
25
+ * Use this to wrap SDK internal operations (e.g., emit, postState, adapter methods).
26
+ * The context automatically propagates through any async operations within the function,
27
+ * ensuring that all console.log calls inside are correctly tagged as SDK logs.
28
+ *
29
+ * This allows proper nesting: SDK code can call user code via runWithUserLogContext,
30
+ * and when control returns to SDK code, logs are correctly attributed.
31
+ *
32
+ * @template T - The return type of the function
33
+ * @param fn - The function to execute within SDK context (can be sync or async)
34
+ * @returns The result of the function execution
35
+ *
36
+ * @example
37
+ * ```typescript
38
+ * await runWithSdkLogContext(async () => {
39
+ * console.log('SDK internal log'); // is_sdk_log: true
40
+ * runWithUserLogContext(() => {
41
+ * console.log('User handler log'); // is_sdk_log: false
42
+ * });
43
+ * console.log('Back to SDK log'); // is_sdk_log: true
44
+ * });
45
+ * ```
46
+ */
47
+ export declare function runWithSdkLogContext<T>(fn: () => T): T;
48
+ /**
49
+ * Retrieves the current SDK log context value.
50
+ *
51
+ * Returns whether the current execution context is within SDK code (true) or user code (false).
52
+ * If no context has been set (e.g., during testing or edge cases), returns the provided default.
53
+ *
54
+ * @param defaultValue - The value to return if no context is currently set
55
+ * @returns `true` if in SDK context, `false` if in user context, or defaultValue if unset
56
+ */
57
+ export declare function getSdkLogContextValue(defaultValue: boolean): boolean;
58
+ //# sourceMappingURL=logger.context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.context.d.ts","sourceRoot":"","sources":["../../src/logger/logger.context.ts"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAEvD;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAEtD;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,OAAO,GAAG,OAAO,CAMpE"}
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.runWithUserLogContext = runWithUserLogContext;
4
+ exports.runWithSdkLogContext = runWithSdkLogContext;
5
+ exports.getSdkLogContextValue = getSdkLogContextValue;
6
+ const node_async_hooks_1 = require("node:async_hooks");
7
+ /**
8
+ * Async-aware context storage for tracking whether code is executing within SDK or user context.
9
+ *
10
+ * AsyncLocalStorage is used instead of a simple global variable because it automatically
11
+ * propagates the context across async boundaries (await, Promise.then, setTimeout, etc.).
12
+ * This ensures that even after multiple await calls in user code, the logging context
13
+ * remains correct without requiring explicit context passing through function parameters.
14
+ *
15
+ * The stored boolean value indicates:
16
+ * - `true`: Code is executing within SDK internals (logs tagged as is_sdk_log: true)
17
+ * - `false`: Code is executing within user-provided handlers (logs tagged as is_sdk_log: false)
18
+ */
19
+ const sdkLogContext = new node_async_hooks_1.AsyncLocalStorage();
20
+ /**
21
+ * Executes a function within user log context, marking all logs as user-originated.
22
+ *
23
+ * Use this to wrap user-provided callback functions (e.g., task handlers, event callbacks).
24
+ * The context automatically propagates through any async operations within the function,
25
+ * ensuring that all console.log calls inside are correctly tagged as user logs.
26
+ *
27
+ * @template T - The return type of the function
28
+ * @param fn - The function to execute within user context (can be sync or async)
29
+ * @returns The result of the function execution
30
+ *
31
+ * @example
32
+ * ```typescript
33
+ * await runWithUserLogContext(async () => {
34
+ * console.log('This is a user log'); // is_sdk_log: false
35
+ * await someAsyncOperation();
36
+ * console.log('Still a user log'); // is_sdk_log: false (context preserved)
37
+ * });
38
+ * ```
39
+ */
40
+ function runWithUserLogContext(fn) {
41
+ return sdkLogContext.run(false, fn);
42
+ }
43
+ /**
44
+ * Executes a function within SDK log context, marking all logs as SDK-originated.
45
+ *
46
+ * Use this to wrap SDK internal operations (e.g., emit, postState, adapter methods).
47
+ * The context automatically propagates through any async operations within the function,
48
+ * ensuring that all console.log calls inside are correctly tagged as SDK logs.
49
+ *
50
+ * This allows proper nesting: SDK code can call user code via runWithUserLogContext,
51
+ * and when control returns to SDK code, logs are correctly attributed.
52
+ *
53
+ * @template T - The return type of the function
54
+ * @param fn - The function to execute within SDK context (can be sync or async)
55
+ * @returns The result of the function execution
56
+ *
57
+ * @example
58
+ * ```typescript
59
+ * await runWithSdkLogContext(async () => {
60
+ * console.log('SDK internal log'); // is_sdk_log: true
61
+ * runWithUserLogContext(() => {
62
+ * console.log('User handler log'); // is_sdk_log: false
63
+ * });
64
+ * console.log('Back to SDK log'); // is_sdk_log: true
65
+ * });
66
+ * ```
67
+ */
68
+ function runWithSdkLogContext(fn) {
69
+ return sdkLogContext.run(true, fn);
70
+ }
71
+ /**
72
+ * Retrieves the current SDK log context value.
73
+ *
74
+ * Returns whether the current execution context is within SDK code (true) or user code (false).
75
+ * If no context has been set (e.g., during testing or edge cases), returns the provided default.
76
+ *
77
+ * @param defaultValue - The value to return if no context is currently set
78
+ * @returns `true` if in SDK context, `false` if in user context, or defaultValue if unset
79
+ */
80
+ function getSdkLogContextValue(defaultValue) {
81
+ const storeValue = sdkLogContext.getStore();
82
+ if (typeof storeValue === 'boolean') {
83
+ return storeValue;
84
+ }
85
+ return defaultValue;
86
+ }
@@ -33,8 +33,9 @@ export declare class Logger extends Console {
33
33
  *
34
34
  * @param message - The pre-formatted message string to log
35
35
  * @param level - Log level (info, warn, error)
36
+ * @param isSdkLog - Flag indicating if the log originated from the SDK
36
37
  */
37
- logFn(message: string, level: LogLevel): void;
38
+ logFn(message: string, level: LogLevel, isSdkLog?: boolean): void;
38
39
  /**
39
40
  * Stringifies and logs arguments to the appropriate destination.
40
41
  * On main thread, converts arguments to strings and calls logFn.
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logger/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAyC,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAQvC,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RawAxiosResponseHeaders } from 'axios';
2
- import { AirdropEvent, EventContext } from '../types/extraction';
3
- import { WorkerAdapterOptions } from '../types/workers';
1
+ import type { RawAxiosResponseHeaders } from 'axios';
2
+ import type { AirdropEvent, EventContext } from '../types/extraction';
3
+ import type { WorkerAdapterOptions } from '../types/workers';
4
4
  export interface LoggerFactoryInterface {
5
5
  event: AirdropEvent;
6
6
  options?: WorkerAdapterOptions;
@@ -38,5 +38,6 @@ export interface AxiosErrorResponse {
38
38
  }
39
39
  export interface LoggerTags extends EventContext {
40
40
  sdk_version: string;
41
+ is_sdk_log: boolean;
41
42
  }
42
43
  //# sourceMappingURL=logger.interfaces.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.interfaces.d.ts","sourceRoot":"","sources":["../../src/logger/logger.interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,CAAC,EAAE,oBAAoB,CAAC;CAChC;AAED,oBAAY,QAAQ;IAClB,IAAI,SAAS;IACb,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IAEf,SAAS,CAAC,EAAE,GAAG,CAAC;IAEhB,QAAQ,CAAC,EAAE,GAAG,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAE7B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,GAAG,cAAc,GAAG,cAAc,CAAC;CACtD;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE;QACN,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;QAE3B,MAAM,EAAE,GA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AE3B,MAAM,EAAE,GAAG,CAAC;QACZ,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;KACzB,CAAC;IACF,YAAY,EAAE,OAAO,CAAC;IACtB,sBAAsB,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,EAAE;QACT,IAAI,EAAE,OAAO,CAAC;QACd,OAAO,EAAE,uBAAuB,CAAC;QACjC,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,UAAW,SAAQ,YAAY;IAC9C,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;CACrB"}
@@ -12,6 +12,7 @@ const node_worker_threads_1 = require("node:worker_threads");
12
12
  const constants_1 = require("../common/constants");
13
13
  const workers_1 = require("../types/workers");
14
14
  const logger_constants_1 = require("./logger.constants");
15
+ const logger_context_1 = require("./logger.context");
15
16
  const logger_interfaces_1 = require("./logger.interfaces");
16
17
  /**
17
18
  * Custom logger that extends Node.js Console with context-aware logging.
@@ -22,7 +23,7 @@ class Logger extends node_console_1.Console {
22
23
  super(process.stdout, process.stderr);
23
24
  this.originalConsole = console;
24
25
  this.options = options;
25
- this.tags = Object.assign(Object.assign({}, event.payload.event_context), { sdk_version: constants_1.LIBRARY_VERSION });
26
+ this.tags = Object.assign(Object.assign({}, event.payload.event_context), { sdk_version: constants_1.LIBRARY_VERSION, is_sdk_log: true });
26
27
  }
27
28
  /**
28
29
  * Converts any value to a string using `util.inspect()` for complex types.
@@ -57,14 +58,15 @@ class Logger extends node_console_1.Console {
57
58
  *
58
59
  * @param message - The pre-formatted message string to log
59
60
  * @param level - Log level (info, warn, error)
61
+ * @param isSdkLog - Flag indicating if the log originated from the SDK
60
62
  */
61
- logFn(message, level) {
63
+ logFn(message, level, isSdkLog = (0, logger_context_1.getSdkLogContextValue)(true)) {
62
64
  var _a;
63
65
  if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.isLocalDevelopment) {
64
66
  this.originalConsole[level](message);
65
67
  return;
66
68
  }
67
- const logObject = Object.assign({ message }, this.tags);
69
+ const logObject = Object.assign(Object.assign({ message }, this.tags), { is_sdk_log: isSdkLog });
68
70
  this.originalConsole[level](JSON.stringify(logObject));
69
71
  }
70
72
  /**
@@ -79,13 +81,14 @@ class Logger extends node_console_1.Console {
79
81
  stringifyAndLog(args, level) {
80
82
  let stringifiedArgs = args.map((arg) => this.valueToString(arg)).join(' ');
81
83
  stringifiedArgs = this.truncateMessage(stringifiedArgs);
84
+ const isSdkLog = (0, logger_context_1.getSdkLogContextValue)(true);
82
85
  if (node_worker_threads_1.isMainThread) {
83
- this.logFn(stringifiedArgs, level);
86
+ this.logFn(stringifiedArgs, level, isSdkLog);
84
87
  }
85
88
  else {
86
89
  node_worker_threads_1.parentPort === null || node_worker_threads_1.parentPort === void 0 ? void 0 : node_worker_threads_1.parentPort.postMessage({
87
90
  subject: workers_1.WorkerMessageSubject.WorkerMessageLog,
88
- payload: { stringifiedArgs, level },
91
+ payload: { stringifiedArgs, level, isSdkLog },
89
92
  });
90
93
  }
91
94
  }
@@ -10,18 +10,18 @@ const logger_constants_1 = require("./logger.constants");
10
10
  const mockConsoleInfo = jest.spyOn(console, 'info').mockImplementation();
11
11
  const mockConsoleWarn = jest.spyOn(console, 'warn').mockImplementation();
12
12
  const mockConsoleError = jest.spyOn(console, 'error').mockImplementation();
13
- // Mock worker_threads
14
- jest.mock('node:worker_threads', () => ({
15
- isMainThread: true,
16
- parentPort: null,
17
- }));
13
+ // Mock worker_threads for main-thread specific behavior but keep actual Worker implementation
14
+ jest.mock('node:worker_threads', () => {
15
+ const actual = jest.requireActual('node:worker_threads');
16
+ return Object.assign(Object.assign({}, actual), { isMainThread: true, parentPort: null });
17
+ });
18
18
  describe(logger_1.Logger.name, () => {
19
19
  let mockEvent;
20
20
  let mockOptions;
21
21
  beforeEach(() => {
22
22
  jest.clearAllMocks();
23
23
  mockEvent = (0, test_helpers_1.createEvent)({
24
- eventType: extraction_1.EventType.ExtractionDataStart,
24
+ eventType: extraction_1.EventType.StartExtractingData,
25
25
  eventContextOverrides: {
26
26
  dev_org: 'DEV-test',
27
27
  dev_org_id: 'DEV-test-id',
@@ -52,7 +52,7 @@ describe(logger_1.Logger.name, () => {
52
52
  // Assert
53
53
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
54
54
  const tags = logger.tags;
55
- expect(tags).toEqual(Object.assign(Object.assign({}, mockEvent.payload.event_context), { sdk_version: constants_1.LIBRARY_VERSION }));
55
+ expect(tags).toEqual(Object.assign(Object.assign({}, mockEvent.payload.event_context), { sdk_version: constants_1.LIBRARY_VERSION, is_sdk_log: true }));
56
56
  });
57
57
  it('should log string message as JSON with event context tags in production mode', () => {
58
58
  // Arrange
@@ -61,7 +61,7 @@ describe(logger_1.Logger.name, () => {
61
61
  // Act
62
62
  logger.info(message);
63
63
  // Assert
64
- expect(mockConsoleInfo).toHaveBeenCalledWith(JSON.stringify(Object.assign(Object.assign({ message }, mockEvent.payload.event_context), { sdk_version: constants_1.LIBRARY_VERSION })));
64
+ expect(mockConsoleInfo).toHaveBeenCalledWith(JSON.stringify(Object.assign(Object.assign({ message }, mockEvent.payload.event_context), { sdk_version: constants_1.LIBRARY_VERSION, is_sdk_log: true })));
65
65
  });
66
66
  it('should log object message using inspect with proper formatting in production mode', () => {
67
67
  // Arrange
@@ -71,7 +71,7 @@ describe(logger_1.Logger.name, () => {
71
71
  // Act
72
72
  logger.info(data);
73
73
  // Assert
74
- expect(mockConsoleInfo).toHaveBeenCalledWith(JSON.stringify(Object.assign(Object.assign({ message: expectedMessage }, mockEvent.payload.event_context), { sdk_version: constants_1.LIBRARY_VERSION })));
74
+ expect(mockConsoleInfo).toHaveBeenCalledWith(JSON.stringify(Object.assign(Object.assign({ message: expectedMessage }, mockEvent.payload.event_context), { sdk_version: constants_1.LIBRARY_VERSION, is_sdk_log: true })));
75
75
  });
76
76
  it('should join multiple arguments with space when logging in production mode', () => {
77
77
  // Arrange
@@ -82,7 +82,7 @@ describe(logger_1.Logger.name, () => {
82
82
  // Act
83
83
  logger.info(text, data);
84
84
  // Assert
85
- expect(mockConsoleInfo).toHaveBeenCalledWith(JSON.stringify(Object.assign(Object.assign({ message: `${text} ${expectedDataMessage}` }, mockEvent.payload.event_context), { sdk_version: constants_1.LIBRARY_VERSION })));
85
+ expect(mockConsoleInfo).toHaveBeenCalledWith(JSON.stringify(Object.assign(Object.assign({ message: `${text} ${expectedDataMessage}` }, mockEvent.payload.event_context), { sdk_version: constants_1.LIBRARY_VERSION, is_sdk_log: true })));
86
86
  });
87
87
  it('should log mixed string and object arguments joined with spaces in production mode', () => {
88
88
  // Arrange
@@ -94,7 +94,7 @@ describe(logger_1.Logger.name, () => {
94
94
  // Act
95
95
  logger.info(text1, data, text2);
96
96
  // Assert
97
- expect(mockConsoleInfo).toHaveBeenCalledWith(JSON.stringify(Object.assign(Object.assign({ message: `${text1} ${expectedDataMessage} ${text2}` }, mockEvent.payload.event_context), { sdk_version: constants_1.LIBRARY_VERSION })));
97
+ expect(mockConsoleInfo).toHaveBeenCalledWith(JSON.stringify(Object.assign(Object.assign({ message: `${text1} ${expectedDataMessage} ${text2}` }, mockEvent.payload.event_context), { sdk_version: constants_1.LIBRARY_VERSION, is_sdk_log: true })));
98
98
  });
99
99
  it('should log directly without JSON wrapping in local development mode', () => {
100
100
  // Arrange
@@ -243,6 +243,7 @@ describe(logger_1.Logger.name, () => {
243
243
  const logObject = JSON.parse(callArgs);
244
244
  expect(logObject.message).toBe('');
245
245
  expect(logObject.sdk_version).toBe(constants_1.LIBRARY_VERSION);
246
+ expect(logObject.is_sdk_log).toBe(true);
246
247
  });
247
248
  it('[edge] should handle null and undefined values in log arguments', () => {
248
249
  // Arrange
@@ -1 +1 @@
1
- {"version":3,"file":"process-task.d.ts","sourceRoot":"","sources":["../../src/multithreading/process-task.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,oBAAoB,EAGrB,MAAM,kBAAkB,CAAC;AAG1B,wBAAgB,WAAW,CAAC,cAAc,EAAE,EAC1C,IAAI,EACJ,SAAS,GACV,EAAE,oBAAoB,CAAC,cAAc,CAAC,QA6DtC"}
1
+ {"version":3,"file":"process-task.d.ts","sourceRoot":"","sources":["../../src/multithreading/process-task.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,oBAAoB,EAGrB,MAAM,kBAAkB,CAAC;AAG1B,wBAAgB,WAAW,CAAC,cAAc,EAAE,EAC1C,IAAI,EACJ,SAAS,GACV,EAAE,oBAAoB,CAAC,cAAc,CAAC,QAmEtC"}
@@ -4,50 +4,55 @@ exports.processTask = processTask;
4
4
  const node_worker_threads_1 = require("node:worker_threads");
5
5
  const event_type_translation_1 = require("../common/event-type-translation");
6
6
  const logger_1 = require("../logger/logger");
7
+ const logger_context_1 = require("../logger/logger.context");
7
8
  const state_1 = require("../state/state");
8
9
  const workers_1 = require("../types/workers");
9
10
  const worker_adapter_1 = require("./worker-adapter/worker-adapter");
10
11
  function processTask({ task, onTimeout, }) {
11
12
  if (!node_worker_threads_1.isMainThread) {
12
13
  void (async () => {
13
- try {
14
- const event = node_worker_threads_1.workerData.event;
15
- // TODO: Remove when the old types are completely phased out
16
- event.payload.event_type = (0, event_type_translation_1.translateIncomingEventType)(event.payload.event_type);
17
- const initialState = node_worker_threads_1.workerData.initialState;
18
- const initialDomainMapping = node_worker_threads_1.workerData.initialDomainMapping;
19
- const options = node_worker_threads_1.workerData.options;
20
- // eslint-disable-next-line no-global-assign
21
- console = new logger_1.Logger({ event, options });
22
- const adapterState = await (0, state_1.createAdapterState)({
23
- event,
24
- initialState,
25
- initialDomainMapping,
26
- options,
27
- });
28
- if (node_worker_threads_1.parentPort && node_worker_threads_1.workerData.event) {
29
- const adapter = new worker_adapter_1.WorkerAdapter({
14
+ await (0, logger_context_1.runWithSdkLogContext)(async () => {
15
+ try {
16
+ const event = node_worker_threads_1.workerData.event;
17
+ // TODO: Remove when the old types are completely phased out
18
+ event.payload.event_type = (0, event_type_translation_1.translateIncomingEventType)(event.payload.event_type);
19
+ const initialState = node_worker_threads_1.workerData.initialState;
20
+ const initialDomainMapping = node_worker_threads_1.workerData.initialDomainMapping;
21
+ const options = node_worker_threads_1.workerData.options;
22
+ // eslint-disable-next-line no-global-assign
23
+ console = new logger_1.Logger({ event, options });
24
+ const adapterState = await (0, state_1.createAdapterState)({
30
25
  event,
31
- adapterState,
26
+ initialState,
27
+ initialDomainMapping,
32
28
  options,
33
29
  });
34
- node_worker_threads_1.parentPort.on(workers_1.WorkerEvent.WorkerMessage, (message) => void (async () => {
35
- if (message.subject === workers_1.WorkerMessageSubject.WorkerMessageExit) {
36
- console.log('Worker received message to gracefully exit. Setting isTimeout flag and executing onTimeout function.');
37
- adapter.handleTimeout();
38
- await onTimeout({ adapter });
39
- console.log('Finished executing onTimeout function. Exiting worker.');
40
- process.exit(0);
41
- }
42
- })());
43
- await task({ adapter });
44
- process.exit(0);
30
+ if (node_worker_threads_1.parentPort && node_worker_threads_1.workerData.event) {
31
+ const adapter = new worker_adapter_1.WorkerAdapter({
32
+ event,
33
+ adapterState,
34
+ options,
35
+ });
36
+ node_worker_threads_1.parentPort.on(workers_1.WorkerEvent.WorkerMessage, (message) => void (async () => {
37
+ await (0, logger_context_1.runWithSdkLogContext)(async () => {
38
+ if (message.subject === workers_1.WorkerMessageSubject.WorkerMessageExit) {
39
+ console.log('Worker received message to gracefully exit. Setting isTimeout flag and executing onTimeout function.');
40
+ adapter.handleTimeout();
41
+ await (0, logger_context_1.runWithUserLogContext)(async () => onTimeout({ adapter }));
42
+ console.log('Finished executing onTimeout function. Exiting worker.');
43
+ process.exit(0);
44
+ }
45
+ });
46
+ })());
47
+ await (0, logger_context_1.runWithUserLogContext)(async () => task({ adapter }));
48
+ process.exit(0);
49
+ }
45
50
  }
46
- }
47
- catch (error) {
48
- console.error('Error while processing task.', (0, logger_1.serializeError)(error));
49
- process.exit(1);
50
- }
51
+ catch (error) {
52
+ console.error('Error while processing task.', (0, logger_1.serializeError)(error));
53
+ process.exit(1);
54
+ }
55
+ });
51
56
  })();
52
57
  }
53
58
  }
@@ -1 +1 @@
1
- {"version":3,"file":"spawn.d.ts","sourceRoot":"","sources":["../../../src/multithreading/spawn/spawn.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,qBAAqB,EACrB,cAAc,EAGf,MAAM,qBAAqB,CAAC;AA+C7B;;;;;;;;;;;GAWG;AACH,wBAAsB,KAAK,CAAC,cAAc,EAAE,EAC1C,KAAK,EACL,YAAY,EACZ,UAAU,EACV,oBAAoB,EACpB,OAAO,EACP,cAAc,GACf,EAAE,qBAAqB,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAwFvD;AAED,qBAAa,KAAK;IAChB,OAAO,CAAC,KAAK,CAAe;IAC5B,OAAO,CAAC,cAAc,CAAU;IAChC,OAAO,CAAC,oBAAoB,CAAkC;IAC9D,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,gBAAgB,CAA4C;IACpE,OAAO,CAAC,gBAAgB,CAA4C;IACpE,OAAO,CAAC,wBAAwB,CAA6C;IAC7E,OAAO,CAAC,OAAO,CAA4C;IAC3D,OAAO,CAAC,eAAe,CAAU;IACjC,OAAO,CAAC,MAAM,CAAS;gBACX,EACV,KAAK,EACL,MAAM,EACN,OAAO,EACP,OAAO,EACP,eAAe,GAChB,EAAE,cAAc;IAgGjB,OAAO,CAAC,aAAa;YAYP,kBAAkB;CAiCjC"}
1
+ {"version":3,"file":"spawn.d.ts","sourceRoot":"","sources":["../../../src/multithreading/spawn/spawn.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,qBAAqB,EACrB,cAAc,EAGf,MAAM,qBAAqB,CAAC;AA+C7B;;;;;;;;;;;GAWG;AACH,wBAAsB,KAAK,CAAC,cAAc,EAAE,EAC1C,KAAK,EACL,YAAY,EACZ,UAAU,EACV,oBAAoB,EACpB,OAAO,EACP,cAAc,GACf,EAAE,qBAAqB,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAwFvD;AAED,qBAAa,KAAK;IAChB,OAAO,CAAC,KAAK,CAAe;IAC5B,OAAO,CAAC,cAAc,CAAU;IAChC,OAAO,CAAC,oBAAoB,CAAkC;IAC9D,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,gBAAgB,CAA4C;IACpE,OAAO,CAAC,gBAAgB,CAA4C;IACpE,OAAO,CAAC,wBAAwB,CAA6C;IAC7E,OAAO,CAAC,OAAO,CAA4C;IAC3D,OAAO,CAAC,eAAe,CAAU;IACjC,OAAO,CAAC,MAAM,CAAS;gBACX,EACV,KAAK,EACL,MAAM,EACN,OAAO,EACP,OAAO,EACP,eAAe,GAChB,EAAE,cAAc;IAiGjB,OAAO,CAAC,aAAa;YAYP,kBAAkB;CAiCjC"}
@@ -174,14 +174,15 @@ class Spawn {
174
174
  await this.exitFromMainThread();
175
175
  })());
176
176
  worker.on(workers_1.WorkerEvent.WorkerMessage, (message) => {
177
- var _a, _b;
177
+ var _a, _b, _c, _d;
178
178
  // Since logs from the worker thread are handled differently in snap-in
179
179
  // platform, we need to catch the log messages from worker thread and log
180
180
  // them in main thread.
181
181
  if ((message === null || message === void 0 ? void 0 : message.subject) === workers_1.WorkerMessageSubject.WorkerMessageLog) {
182
182
  const stringifiedArgs = (_a = message.payload) === null || _a === void 0 ? void 0 : _a.stringifiedArgs;
183
183
  const level = (_b = message.payload) === null || _b === void 0 ? void 0 : _b.level;
184
- this.logger.logFn(stringifiedArgs, level);
184
+ const isSdkLog = (_d = (_c = message.payload) === null || _c === void 0 ? void 0 : _c.isSdkLog) !== null && _d !== void 0 ? _d : false;
185
+ this.logger.logFn(stringifiedArgs, level, isSdkLog);
185
186
  }
186
187
  // If worker sends a message that it has emitted an event, then set alreadyEmitted to true.
187
188
  if ((message === null || message === void 0 ? void 0 : message.subject) === workers_1.WorkerMessageSubject.WorkerMessageEmitted) {
@@ -1 +1 @@
1
- {"version":3,"file":"worker-adapter.d.ts","sourceRoot":"","sources":["../../../src/multithreading/worker-adapter/worker-adapter.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EACL,oBAAoB,EACpB,aAAa,EACd,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EACL,YAAY,EACZ,SAAS,EAET,kCAAkC,EAClC,yCAAyC,EACzC,kBAAkB,EAClB,2BAA2B,EAC3B,2BAA2B,EAC5B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAEL,wBAAwB,EACxB,kBAAkB,EAClB,6BAA6B,EAC7B,UAAU,EACV,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EAEtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EAGrB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,QAAQ,EAAkB,MAAM,oCAAoC,CAAC;AAG9E,wBAAgB,mBAAmB,CAAC,cAAc,EAAE,EAClD,KAAK,EACL,YAAY,EACZ,OAAO,GACR,EAAE,sBAAsB,CAAC,cAAc,CAAC,GAAG,aAAa,CAAC,cAAc,CAAC,CAMxE;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,aAAa,CAAC,cAAc;IACvC,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,oBAAoB,CAAC;IACxC,SAAS,EAAE,OAAO,CAAC;IAEnB,OAAO,CAAC,YAAY,CAAwB;IAC5C,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,gBAAgB,CAAU;IAClC,OAAO,CAAC,KAAK,CAAc;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,CAAC;QACzB,cAAc,EAAE,cAAc,CAAC;KAChC,GAAG,OAAO,CAAC,gBAAgB,CAAC;IA6LvB,iBAAiB,CACrB,UAAU,EAAE,oBAAoB,EAChC,MAAM,EAAE,yCAAyC,GAChD,OAAO,CAAC,2BAA2B,CAAC;IAkGvC;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAcnB,cAAc,CAAC,EACnB,IAAI,EACJ,MAAM,GACP,EAAE;QACD,IAAI,EAAE,wBAAwB,CAAC;QAC/B,MAAM,EAAE,6BAA6B,CAAC,wBAAwB,CAAC,CAAC;KACjE,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAmD7B;;;;;;OAMG;IACG,iBAAiB,CAAC,QAAQ,EAAE,EAChC,MAAM,EACN,UAAU,EACV,SAAa,GACd,EAAE;QACD,MAAM,EAAE,yCAAyC,CAAC;QAClD,UAAU,CAAC,EAAE,kCAAkC,CAC7C,cAAc,EACd,oBAAoB,EAAE,EACtB,QAAQ,CACT,CAAC;QACF,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GAAG,OAAO,CAAC,2BAA2B,CAAC;CAsHzC"}
1
+ {"version":3,"file":"worker-adapter.d.ts","sourceRoot":"","sources":["../../../src/multithreading/worker-adapter/worker-adapter.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EACL,oBAAoB,EACpB,aAAa,EACd,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EACL,YAAY,EACZ,SAAS,EAET,kCAAkC,EAClC,yCAAyC,EACzC,kBAAkB,EAClB,2BAA2B,EAC3B,2BAA2B,EAC5B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAEL,wBAAwB,EACxB,kBAAkB,EAClB,6BAA6B,EAC7B,UAAU,EACV,qBAAqB,EACr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