@devrev/ts-adaas 1.11.1-beta.0 → 1.11.1-beta.2

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.
Files changed (83) hide show
  1. package/dist/attachments-streaming/attachments-streaming-pool.d.ts.map +1 -1
  2. package/dist/attachments-streaming/attachments-streaming-pool.interfaces.d.ts +1 -1
  3. package/dist/attachments-streaming/attachments-streaming-pool.interfaces.d.ts.map +1 -1
  4. package/dist/attachments-streaming/attachments-streaming-pool.test.js +43 -42
  5. package/dist/common/helpers.d.ts +0 -1
  6. package/dist/common/helpers.d.ts.map +1 -1
  7. package/dist/common/helpers.js +3 -18
  8. package/dist/common/install-initial-domain-mapping.d.ts.map +1 -1
  9. package/dist/common/install-initial-domain-mapping.test.js +3 -1
  10. package/dist/deprecated/adapter/index.d.ts +1 -1
  11. package/dist/deprecated/adapter/index.d.ts.map +1 -1
  12. package/dist/deprecated/uploader/index.d.ts.map +1 -1
  13. package/dist/deprecated/uploader/index.js +1 -1
  14. package/dist/http/axios-client.d.ts.map +1 -1
  15. package/dist/http/index.d.ts +1 -1
  16. package/dist/http/index.d.ts.map +1 -1
  17. package/dist/http/index.js +1 -1
  18. package/dist/index.d.ts +4 -5
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +6 -7
  21. package/dist/logger/logger.d.ts +1 -1
  22. package/dist/logger/logger.d.ts.map +1 -1
  23. package/dist/logger/logger.js +3 -5
  24. package/dist/logger/logger.test.js +4 -3
  25. package/dist/mappers/mappers.d.ts +1 -1
  26. package/dist/mappers/mappers.d.ts.map +1 -1
  27. package/dist/mappers/mappers.test.js +2 -2
  28. package/dist/repo/repo.d.ts +2 -2
  29. package/dist/repo/repo.d.ts.map +1 -1
  30. package/dist/state/state.interfaces.d.ts +1 -1
  31. package/dist/state/state.interfaces.d.ts.map +1 -1
  32. package/dist/state/state.js +6 -6
  33. package/dist/state/state.test.js +4 -3
  34. package/dist/tests/backwards-compatibility/backwards-compatibility.test.d.ts.map +1 -1
  35. package/dist/tests/backwards-compatibility/backwards-compatibility.test.js +19 -12
  36. package/dist/tests/backwards-compatibility/helpers.d.ts.map +1 -1
  37. package/dist/tests/backwards-compatibility/helpers.js +1 -0
  38. package/dist/tests/mock-server.d.ts.map +1 -1
  39. package/dist/tests/mock-server.js +2 -0
  40. package/dist/tests/test-helpers.d.ts.map +1 -1
  41. package/dist/tests/test-helpers.interfaces.d.ts +1 -1
  42. package/dist/tests/test-helpers.interfaces.d.ts.map +1 -1
  43. package/dist/tests/timeout-handling/extraction.d.ts.map +1 -1
  44. package/dist/tests/timeout-handling/timeout-1.test.js +1 -1
  45. package/dist/tests/timeout-handling/timeout-2.js +3 -1
  46. package/dist/tests/timeout-handling/timeout-2.test.js +1 -1
  47. package/dist/tests/timeout-handling/timeout-3a.test.js +1 -1
  48. package/dist/tests/timeout-handling/timeout-3b.test.js +1 -1
  49. package/dist/types/extraction.d.ts +2 -2
  50. package/dist/types/extraction.d.ts.map +1 -1
  51. package/dist/types/extraction.test.js +6 -5
  52. package/dist/types/index.d.ts +6 -6
  53. package/dist/types/index.d.ts.map +1 -1
  54. package/dist/types/index.js +2 -2
  55. package/dist/types/loading.d.ts +1 -1
  56. package/dist/types/loading.d.ts.map +1 -1
  57. package/dist/types/workers.d.ts +1 -1
  58. package/dist/types/workers.d.ts.map +1 -1
  59. package/dist/uploader/uploader.d.ts +2 -2
  60. package/dist/uploader/uploader.d.ts.map +1 -1
  61. package/dist/uploader/uploader.interfaces.d.ts +2 -2
  62. package/dist/uploader/uploader.interfaces.d.ts.map +1 -1
  63. package/dist/uploader/uploader.js +3 -3
  64. package/dist/uploader/uploader.test.js +1 -1
  65. package/dist/workers/create-worker.d.ts.map +1 -1
  66. package/dist/workers/create-worker.js +1 -1
  67. package/dist/workers/create-worker.test.js +4 -2
  68. package/dist/workers/default-workers/attachments-extraction.js +8 -6
  69. package/dist/workers/default-workers/load-attachments.js +1 -1
  70. package/dist/workers/default-workers/load-data.js +1 -1
  71. package/dist/workers/dummy-extractor/data-normalization.d.ts +1 -1
  72. package/dist/workers/dummy-extractor/data-normalization.d.ts.map +1 -1
  73. package/dist/workers/process-task.d.ts.map +1 -1
  74. package/dist/workers/process-task.js +5 -4
  75. package/dist/workers/spawn.d.ts.map +1 -1
  76. package/dist/workers/spawn.js +11 -11
  77. package/dist/workers/worker-adapter.artifacts.test.js +12 -20
  78. package/dist/workers/worker-adapter.d.ts +7 -8
  79. package/dist/workers/worker-adapter.d.ts.map +1 -1
  80. package/dist/workers/worker-adapter.js +11 -10
  81. package/dist/workers/worker-adapter.test.js +43 -14
  82. package/dist/workers/worker.js +0 -2
  83. package/package.json +15 -7
@@ -1 +1 @@
1
- {"version":3,"file":"attachments-streaming-pool.d.ts","sourceRoot":"","sources":["../../src/attachments-streaming/attachments-streaming-pool.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,2BAA2B,EAC5B,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC;AAIzF,qBAAa,wBAAwB,CAAC,cAAc;IAClD,OAAO,CAAC,OAAO,CAAgC;IAC/C,OAAO,CAAC,WAAW,CAAyB;IAC5C,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,KAAK,CAAqB;IAClC,OAAO,CAAC,MAAM,CAA4C;IAE1D,OAAO,CAAC,mBAAmB,CAAa;IACxC,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAM;gBAEnC,EACV,OAAO,EACP,WAAW,EACX,SAAc,EACd,MAAM,GACP,EAAE,8BAA8B,CAAC,cAAc,CAAC;YAQnC,cAAc;IAQtB,SAAS,IAAI,OAAO,CAAC,2BAA2B,CAAC;IAuCjD,kBAAkB;CA0EzB"}
1
+ {"version":3,"file":"attachments-streaming-pool.d.ts","sourceRoot":"","sources":["../../src/attachments-streaming/attachments-streaming-pool.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,2BAA2B,EAC5B,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC;AAEzF,qBAAa,wBAAwB,CAAC,cAAc;IAClD,OAAO,CAAC,OAAO,CAAgC;IAC/C,OAAO,CAAC,WAAW,CAAyB;IAC5C,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,KAAK,CAAqB;IAClC,OAAO,CAAC,MAAM,CAA4C;IAE1D,OAAO,CAAC,mBAAmB,CAAa;IACxC,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAM;gBAEnC,EACV,OAAO,EACP,WAAW,EACX,SAAc,EACd,MAAM,GACP,EAAE,8BAA8B,CAAC,cAAc,CAAC;YAQnC,cAAc;IAQtB,SAAS,IAAI,OAAO,CAAC,2BAA2B,CAAC;IAuCjD,kBAAkB;CA0EzB"}
@@ -1,4 +1,4 @@
1
- import { NormalizedAttachment, ExternalSystemAttachmentStreamingFunction } from '../types';
1
+ import { ExternalSystemAttachmentStreamingFunction, NormalizedAttachment } from '../types';
2
2
  import { WorkerAdapter } from '../workers/worker-adapter';
3
3
  export interface AttachmentsStreamingPoolParams<ConnectorState> {
4
4
  adapter: WorkerAdapter<ConnectorState>;
@@ -1 +1 @@
1
- {"version":3,"file":"attachments-streaming-pool.interfaces.d.ts","sourceRoot":"","sources":["../../src/attachments-streaming/attachments-streaming-pool.interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,yCAAyC,EAC1C,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,MAAM,WAAW,8BAA8B,CAAC,cAAc;IAC5D,OAAO,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IACvC,WAAW,EAAE,oBAAoB,EAAE,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,yCAAyC,CAAC;CACnD"}
1
+ {"version":3,"file":"attachments-streaming-pool.interfaces.d.ts","sourceRoot":"","sources":["../../src/attachments-streaming/attachments-streaming-pool.interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yCAAyC,EACzC,oBAAoB,EACrB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,MAAM,WAAW,8BAA8B,CAAC,cAAc;IAC5D,OAAO,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IACvC,WAAW,EAAE,oBAAoB,EAAE,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,yCAAyC,CAAC;CACnD"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const attachments_streaming_pool_1 = require("./attachments-streaming-pool");
4
+ /* eslint-disable @typescript-eslint/no-explicit-any */
4
5
  describe(attachments_streaming_pool_1.AttachmentsStreamingPool.name, () => {
5
6
  let mockAdapter;
6
7
  let mockStream;
@@ -12,11 +13,13 @@ describe(attachments_streaming_pool_1.AttachmentsStreamingPool.name, () => {
12
13
  attachments: { completed: false },
13
14
  toDevRev: {
14
15
  attachmentsMetadata: {
15
- lastProcessedAttachmentsIdsList: []
16
- }
17
- }
16
+ lastProcessedAttachmentsIdsList: [],
17
+ },
18
+ },
18
19
  },
19
- processAttachment: jest.fn().mockResolvedValue({})
20
+ processAttachment: jest
21
+ .fn()
22
+ .mockResolvedValue({}),
20
23
  };
21
24
  // Create mock stream function
22
25
  mockStream = jest.fn().mockResolvedValue({ success: true });
@@ -26,20 +29,20 @@ describe(attachments_streaming_pool_1.AttachmentsStreamingPool.name, () => {
26
29
  id: 'attachment-1',
27
30
  url: 'https://example.com/file1.pdf',
28
31
  file_name: 'file1.pdf',
29
- parent_id: 'parent-1'
32
+ parent_id: 'parent-1',
30
33
  },
31
34
  {
32
35
  id: 'attachment-2',
33
36
  url: 'https://example.com/file2.jpg',
34
37
  file_name: 'file2.jpg',
35
- parent_id: 'parent-2'
38
+ parent_id: 'parent-2',
36
39
  },
37
40
  {
38
41
  id: 'attachment-3',
39
42
  url: 'https://example.com/file3.doc',
40
43
  file_name: 'file3.doc',
41
- parent_id: 'parent-3'
42
- }
44
+ parent_id: 'parent-3',
45
+ },
43
46
  ];
44
47
  // Mock console methods
45
48
  jest.spyOn(console, 'log').mockImplementation();
@@ -55,7 +58,7 @@ describe(attachments_streaming_pool_1.AttachmentsStreamingPool.name, () => {
55
58
  const pool = new attachments_streaming_pool_1.AttachmentsStreamingPool({
56
59
  adapter: mockAdapter,
57
60
  attachments: mockAttachments,
58
- stream: mockStream
61
+ stream: mockStream,
59
62
  });
60
63
  expect(pool).toBeDefined();
61
64
  expect(pool['adapter']).toBe(mockAdapter);
@@ -68,7 +71,7 @@ describe(attachments_streaming_pool_1.AttachmentsStreamingPool.name, () => {
68
71
  adapter: mockAdapter,
69
72
  attachments: mockAttachments,
70
73
  batchSize: 5,
71
- stream: mockStream
74
+ stream: mockStream,
72
75
  });
73
76
  expect(pool['batchSize']).toBe(5);
74
77
  });
@@ -76,7 +79,7 @@ describe(attachments_streaming_pool_1.AttachmentsStreamingPool.name, () => {
76
79
  const pool = new attachments_streaming_pool_1.AttachmentsStreamingPool({
77
80
  adapter: mockAdapter,
78
81
  attachments: mockAttachments,
79
- stream: mockStream
82
+ stream: mockStream,
80
83
  });
81
84
  expect(pool['attachments']).toEqual(mockAttachments);
82
85
  expect(pool['attachments']).not.toBe(mockAttachments); // Different reference
@@ -84,24 +87,28 @@ describe(attachments_streaming_pool_1.AttachmentsStreamingPool.name, () => {
84
87
  });
85
88
  describe(attachments_streaming_pool_1.AttachmentsStreamingPool.prototype.streamAll.name, () => {
86
89
  it('should initialize lastProcessedAttachmentsIdsList if it does not exist', async () => {
87
- mockAdapter.state.toDevRev.attachmentsMetadata.lastProcessedAttachmentsIdsList = undefined;
90
+ mockAdapter.state.toDevRev.attachmentsMetadata.lastProcessedAttachmentsIdsList =
91
+ undefined;
88
92
  mockAdapter.processAttachment.mockResolvedValue({});
89
93
  const pool = new attachments_streaming_pool_1.AttachmentsStreamingPool({
90
94
  adapter: mockAdapter,
91
95
  attachments: mockAttachments,
92
- stream: mockStream
96
+ stream: mockStream,
93
97
  });
94
98
  // Mock startPoolStreaming to avoid actual processing
95
- jest.spyOn(pool, 'startPoolStreaming').mockResolvedValue(undefined);
99
+ jest
100
+ .spyOn(pool, 'startPoolStreaming')
101
+ .mockResolvedValue(undefined);
96
102
  await pool.streamAll();
97
- expect(mockAdapter.state.toDevRev.attachmentsMetadata.lastProcessedAttachmentsIdsList).toEqual([]);
103
+ expect(mockAdapter.state.toDevRev.attachmentsMetadata
104
+ .lastProcessedAttachmentsIdsList).toEqual([]);
98
105
  });
99
106
  it('should process all attachments successfully', async () => {
100
107
  mockAdapter.processAttachment.mockResolvedValue({});
101
108
  const pool = new attachments_streaming_pool_1.AttachmentsStreamingPool({
102
109
  adapter: mockAdapter,
103
110
  attachments: mockAttachments,
104
- stream: mockStream
111
+ stream: mockStream,
105
112
  });
106
113
  const result = await pool.streamAll();
107
114
  expect(result).toEqual({});
@@ -111,7 +118,7 @@ describe(attachments_streaming_pool_1.AttachmentsStreamingPool.name, () => {
111
118
  const pool = new attachments_streaming_pool_1.AttachmentsStreamingPool({
112
119
  adapter: mockAdapter,
113
120
  attachments: [],
114
- stream: mockStream
121
+ stream: mockStream,
115
122
  });
116
123
  const result = await pool.streamAll();
117
124
  expect(result).toEqual({});
@@ -123,7 +130,7 @@ describe(attachments_streaming_pool_1.AttachmentsStreamingPool.name, () => {
123
130
  const pool = new attachments_streaming_pool_1.AttachmentsStreamingPool({
124
131
  adapter: mockAdapter,
125
132
  attachments: mockAttachments,
126
- stream: mockStream
133
+ stream: mockStream,
127
134
  });
128
135
  const result = await pool.streamAll();
129
136
  expect(result).toEqual({ delay: 5000 });
@@ -131,12 +138,13 @@ describe(attachments_streaming_pool_1.AttachmentsStreamingPool.name, () => {
131
138
  });
132
139
  describe(attachments_streaming_pool_1.AttachmentsStreamingPool.prototype.startPoolStreaming.name, () => {
133
140
  it('should skip already processed attachments', async () => {
134
- mockAdapter.state.toDevRev.attachmentsMetadata.lastProcessedAttachmentsIdsList = ['attachment-1'];
141
+ mockAdapter.state.toDevRev.attachmentsMetadata.lastProcessedAttachmentsIdsList =
142
+ ['attachment-1'];
135
143
  mockAdapter.processAttachment.mockResolvedValue({});
136
144
  const pool = new attachments_streaming_pool_1.AttachmentsStreamingPool({
137
145
  adapter: mockAdapter,
138
146
  attachments: mockAttachments,
139
- stream: mockStream
147
+ stream: mockStream,
140
148
  });
141
149
  await pool.streamAll();
142
150
  expect(mockAdapter.processAttachment).toHaveBeenCalledTimes(2); // Only 2 out of 3
@@ -146,14 +154,11 @@ describe(attachments_streaming_pool_1.AttachmentsStreamingPool.name, () => {
146
154
  const pool = new attachments_streaming_pool_1.AttachmentsStreamingPool({
147
155
  adapter: mockAdapter,
148
156
  attachments: mockAttachments,
149
- stream: mockStream
157
+ stream: mockStream,
150
158
  });
151
159
  await pool.streamAll();
152
- expect(mockAdapter.state.toDevRev.attachmentsMetadata.lastProcessedAttachmentsIdsList).toEqual([
153
- 'attachment-1',
154
- 'attachment-2',
155
- 'attachment-3'
156
- ]);
160
+ expect(mockAdapter.state.toDevRev.attachmentsMetadata
161
+ .lastProcessedAttachmentsIdsList).toEqual(['attachment-1', 'attachment-2', 'attachment-3']);
157
162
  });
158
163
  it('should handle processing errors gracefully', async () => {
159
164
  const error = new Error('Processing failed');
@@ -164,14 +169,12 @@ describe(attachments_streaming_pool_1.AttachmentsStreamingPool.name, () => {
164
169
  const pool = new attachments_streaming_pool_1.AttachmentsStreamingPool({
165
170
  adapter: mockAdapter,
166
171
  attachments: mockAttachments,
167
- stream: mockStream
172
+ stream: mockStream,
168
173
  });
169
174
  await pool.streamAll();
170
175
  expect(console.warn).toHaveBeenCalledWith('Skipping attachment with ID attachment-2 due to error in processAttachment function', error);
171
- expect(mockAdapter.state.toDevRev.attachmentsMetadata.lastProcessedAttachmentsIdsList).toEqual([
172
- 'attachment-1',
173
- 'attachment-3'
174
- ]);
176
+ expect(mockAdapter.state.toDevRev.attachmentsMetadata
177
+ .lastProcessedAttachmentsIdsList).toEqual(['attachment-1', 'attachment-3']);
175
178
  });
176
179
  it('should stop processing when rate limit delay is encountered', async () => {
177
180
  mockAdapter.processAttachment
@@ -181,21 +184,19 @@ describe(attachments_streaming_pool_1.AttachmentsStreamingPool.name, () => {
181
184
  const pool = new attachments_streaming_pool_1.AttachmentsStreamingPool({
182
185
  adapter: mockAdapter,
183
186
  attachments: mockAttachments,
184
- stream: mockStream
187
+ stream: mockStream,
185
188
  });
186
189
  await pool.streamAll();
187
190
  expect(mockAdapter.processAttachment).toHaveBeenCalledTimes(3);
188
- expect(mockAdapter.state.toDevRev.attachmentsMetadata.lastProcessedAttachmentsIdsList).toEqual([
189
- 'attachment-1',
190
- 'attachment-3'
191
- ]);
191
+ expect(mockAdapter.state.toDevRev.attachmentsMetadata
192
+ .lastProcessedAttachmentsIdsList).toEqual(['attachment-1', 'attachment-3']);
192
193
  });
193
194
  it('should pass correct parameters to processAttachment', async () => {
194
195
  mockAdapter.processAttachment.mockResolvedValue({});
195
196
  const pool = new attachments_streaming_pool_1.AttachmentsStreamingPool({
196
197
  adapter: mockAdapter,
197
198
  attachments: [mockAttachments[0]],
198
- stream: mockStream
199
+ stream: mockStream,
199
200
  });
200
201
  await pool.streamAll();
201
202
  expect(mockAdapter.processAttachment).toHaveBeenCalledWith(mockAttachments[0], mockStream);
@@ -206,7 +207,7 @@ describe(attachments_streaming_pool_1.AttachmentsStreamingPool.name, () => {
206
207
  const pool = new attachments_streaming_pool_1.AttachmentsStreamingPool({
207
208
  adapter: mockAdapter,
208
209
  attachments: [mockAttachments[0]],
209
- stream: mockStream
210
+ stream: mockStream,
210
211
  });
211
212
  const result = await pool.streamAll();
212
213
  expect(result).toEqual({});
@@ -218,7 +219,7 @@ describe(attachments_streaming_pool_1.AttachmentsStreamingPool.name, () => {
218
219
  adapter: mockAdapter,
219
220
  attachments: mockAttachments,
220
221
  batchSize: 100,
221
- stream: mockStream
222
+ stream: mockStream,
222
223
  });
223
224
  await pool.streamAll();
224
225
  expect(mockAdapter.processAttachment).toHaveBeenCalledTimes(3);
@@ -229,7 +230,7 @@ describe(attachments_streaming_pool_1.AttachmentsStreamingPool.name, () => {
229
230
  adapter: mockAdapter,
230
231
  attachments: mockAttachments,
231
232
  batchSize: 1,
232
- stream: mockStream
233
+ stream: mockStream,
233
234
  });
234
235
  await pool.streamAll();
235
236
  expect(mockAdapter.processAttachment).toHaveBeenCalledTimes(3);
@@ -238,7 +239,7 @@ describe(attachments_streaming_pool_1.AttachmentsStreamingPool.name, () => {
238
239
  it('should process attachments concurrently within batch size', async () => {
239
240
  let processCallCount = 0;
240
241
  const processPromises = [];
241
- mockAdapter.processAttachment.mockImplementation(() => {
242
+ mockAdapter.processAttachment.mockImplementation(async () => {
242
243
  const promise = new Promise((resolve) => {
243
244
  setTimeout(() => {
244
245
  processCallCount++;
@@ -252,7 +253,7 @@ describe(attachments_streaming_pool_1.AttachmentsStreamingPool.name, () => {
252
253
  adapter: mockAdapter,
253
254
  attachments: mockAttachments,
254
255
  batchSize: 2,
255
- stream: mockStream
256
+ stream: mockStream,
256
257
  });
257
258
  const startTime = Date.now();
258
259
  await pool.streamAll();
@@ -14,7 +14,6 @@ export declare function addReportToLoaderReport({ loaderReports, report, }: {
14
14
  loaderReports: LoaderReport[];
15
15
  report: LoaderReport;
16
16
  }): LoaderReport[];
17
- export declare function getCircularReplacer(): (key: any, value: any) => any;
18
17
  export declare function getLibraryVersion(): any;
19
18
  export declare function sleep(ms: number): Promise<unknown>;
20
19
  export declare function truncateFilename(filename: string): string;
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/common/helpers.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,YAAY,EACZ,SAAS,EACT,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,UA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AAO,EAEL,UAAU,EACV,eAAe,EACf,YAAY,EACZ,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAM1B,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,SAAS,GAAG;IAC9D,SAAS,EAAE,kBAAkB,GAAG,eAAe,CAAC;CACjD,CAiEA;AAED,wBAAgB,gBAAgB,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,YAAY,CAAA;CAAE,UAElE;AAED,wBAAgB,cAAc,CAAC,EAC7B,kBAAkB,EAClB,SAAS,GACV,EAAE;IACD,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,SAAS,EAAE,eAAe,EAAE,CAAC;CAC9B,GAAG,UAAU,EAAE,CA8Bf;AAED,wBAAgB,uBAAuB,CAAC,EACtC,aAAa,EACb,MAAM,GACP,EAAE;IACD,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,MAAM,EAAE,YAAY,CAAC;CACtB,GAAG,YAAY,EAAE,CA4BjB;AAGD,wBAAgB,iBAAiB,QAiBhC;AAED,wBAAsB,KAAK,CAAC,EAAE,EAAE,MAAM,oBAGrC;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAmBzD;AAED,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,cAAc,IAAI,UAAU,CAmD3C"}
@@ -37,13 +37,12 @@ exports.getTimeoutErrorEventType = getTimeoutErrorEventType;
37
37
  exports.getSyncDirection = getSyncDirection;
38
38
  exports.getFilesToLoad = getFilesToLoad;
39
39
  exports.addReportToLoaderReport = addReportToLoaderReport;
40
- exports.getCircularReplacer = getCircularReplacer;
41
40
  exports.getLibraryVersion = getLibraryVersion;
42
41
  exports.sleep = sleep;
43
42
  exports.truncateFilename = truncateFilename;
44
43
  exports.getMemoryUsage = getMemoryUsage;
45
- const path = __importStar(require("path"));
46
44
  const fs_1 = require("fs");
45
+ const path = __importStar(require("path"));
47
46
  const v8 = __importStar(require("v8"));
48
47
  const extraction_1 = require("../types/extraction");
49
48
  const loading_1 = require("../types/loading");
@@ -152,20 +151,6 @@ function addReportToLoaderReport({ loaderReports, report, }) {
152
151
  }
153
152
  return loaderReports;
154
153
  }
155
- // https://stackoverflow.com/a/53731154
156
- function getCircularReplacer() {
157
- const seen = new WeakSet();
158
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
159
- return (key, value) => {
160
- if (typeof value === 'object' && value !== null) {
161
- if (seen.has(value)) {
162
- return;
163
- }
164
- seen.add(value);
165
- }
166
- return value;
167
- };
168
- }
169
154
  // read adaas library version from package.json
170
155
  function getLibraryVersion() {
171
156
  var _a;
@@ -181,7 +166,7 @@ function getLibraryVersion() {
181
166
  return '';
182
167
  }
183
168
  }
184
- function sleep(ms) {
169
+ async function sleep(ms) {
185
170
  console.log(`Sleeping for ${ms / 1000}s.`);
186
171
  return new Promise((resolve) => setTimeout(resolve, ms));
187
172
  }
@@ -191,7 +176,7 @@ function truncateFilename(filename) {
191
176
  return filename;
192
177
  }
193
178
  console.warn(`Filename length exceeds the maximum limit of ${constants_1.MAX_DEVREV_FILENAME_LENGTH} characters. Truncating filename.`);
194
- let extension = filename.slice(-constants_1.MAX_DEVREV_FILENAME_EXTENSION_LENGTH);
179
+ const extension = filename.slice(-constants_1.MAX_DEVREV_FILENAME_EXTENSION_LENGTH);
195
180
  // Calculate how many characters are available for the name part after accounting for the extension and "..."
196
181
  const availableNameLength = constants_1.MAX_DEVREV_FILENAME_LENGTH - constants_1.MAX_DEVREV_FILENAME_EXTENSION_LENGTH - 3; // -3 for "..."
197
182
  // Truncate the name part and add an ellipsis
@@ -1 +1 @@
1
- {"version":3,"file":"install-initial-domain-mapping.d.ts","sourceRoot":"","sources":["../../src/common/install-initial-domain-mapping.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAGvD,wBAAsB,2BAA2B,CAC/C,KAAK,EAAE,YAAY,EACnB,wBAAwB,EAAE,oBAAoB,GAC7C,OAAO,CAAC,IAAI,CAAC,CAyFf"}
1
+ {"version":3,"file":"install-initial-domain-mapping.d.ts","sourceRoot":"","sources":["../../src/common/install-initial-domain-mapping.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD,wBAAsB,2BAA2B,CAC/C,KAAK,EAAE,YAAY,EACnB,wBAAwB,EAAE,oBAAoB,GAC7C,OAAO,CAAC,IAAI,CAAC,CA2Ff"}
@@ -4,10 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const axios_1 = __importDefault(require("axios"));
7
- const install_initial_domain_mapping_1 = require("./install-initial-domain-mapping");
8
7
  const axios_client_internal_1 = require("../http/axios-client-internal");
9
8
  const test_helpers_1 = require("../tests/test-helpers");
10
9
  const extraction_1 = require("../types/extraction");
10
+ const install_initial_domain_mapping_1 = require("./install-initial-domain-mapping");
11
11
  // Mock dependencies
12
12
  jest.mock('axios', () => (Object.assign(Object.assign({}, jest.requireActual('axios')), { isAxiosError: jest.fn() })));
13
13
  jest.mock('../http/axios-client-internal', () => {
@@ -140,11 +140,13 @@ describe(install_initial_domain_mapping_1.installInitialDomainMapping.name, () =
140
140
  expect(mockAxiosClient.post).toHaveBeenCalledTimes(1);
141
141
  });
142
142
  it('[edge] should return early with warning when initial domain mapping is null', async () => {
143
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
143
144
  await (0, install_initial_domain_mapping_1.installInitialDomainMapping)(mockEvent, null);
144
145
  expect(mockAxiosClient.get).not.toHaveBeenCalled();
145
146
  expect(mockAxiosClient.post).not.toHaveBeenCalled();
146
147
  });
147
148
  it('[edge] should return early with warning when initial domain mapping is undefined', async () => {
149
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
148
150
  await (0, install_initial_domain_mapping_1.installInitialDomainMapping)(mockEvent, undefined);
149
151
  expect(mockAxiosClient.get).not.toHaveBeenCalled();
150
152
  expect(mockAxiosClient.post).not.toHaveBeenCalled();
@@ -1,5 +1,5 @@
1
+ import { AirdropEvent, EventData, ExtractorEventType } from '../../types/extraction';
1
2
  import { Artifact } from '../../uploader/uploader.interfaces';
2
- import { AirdropEvent, ExtractorEventType, EventData } from '../../types/extraction';
3
3
  import { AdapterState } from '../../state/state.interfaces';
4
4
  import { State } from '../../state/state';
5
5
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/deprecated/adapter/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAC9D,OAAO,EACL,YAAY,EACZ,kBAAkB,EAElB,SAAS,EACV,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAK5D,OAAO,EAAE,KAAK,EAAsB,MAAM,mBAAmB,CAAC;AAE9D;;;;;;;;;;;;;GAaG;AAEH;;;;;;;GAOG;AAEH,wBAAsB,aAAa,CAAC,cAAc,EAChD,KAAK,EAAE,YAAY,EACnB,YAAY,EAAE,cAAc,EAC5B,kBAAkB,GAAE,OAAe,oCAepC;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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CAgC9B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/deprecated/uploader/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAY,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAG9E;;;;;;;;;;;;GAYG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,KAAK,CAAU;gBACX,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,UAAQ;IAQ1D;;;;;;;;;;OAUG;IACG,MAAM,CACV,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,MAAM,EAAE,GAAG,MAAM,EACjC,QAAQ,GAAE,MAAiC,GAC1C,OAAO,CAAC,cAAc,CAAC;YAuCZ,eAAe;YAiBf,gBAAgB;YAqBhB,eAAe;CAgC9B"}
@@ -34,9 +34,9 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.Uploader = void 0;
37
- const axios_client_internal_1 = require("../../http/axios-client-internal");
38
37
  const typescript_sdk_1 = require("@devrev/typescript-sdk");
39
38
  const fs_1 = __importStar(require("fs"));
39
+ const axios_client_internal_1 = require("../../http/axios-client-internal");
40
40
  const helpers_1 = require("../common/helpers");
41
41
  /**
42
42
  * Uploader class is used to upload files to the DevRev platform.
@@ -1 +1 @@
1
- {"version":3,"file":"axios-client.d.ts","sourceRoot":"","sources":["../../src/http/axios-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,QAAA,MAAM,WAAW,+BAAiB,CAAC;AA6BnC,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"axios-client.d.ts","sourceRoot":"","sources":["../../src/http/axios-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,QAAA,MAAM,WAAW,+BAAiB,CAAC;AAiCnC,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC"}
@@ -1,3 +1,3 @@
1
- export * from './types';
2
1
  export * from './axios-client';
2
+ export * from './types';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/http/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/http/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC"}
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./types"), exports);
18
17
  __exportStar(require("./axios-client"), exports);
18
+ __exportStar(require("./types"), exports);
package/dist/index.d.ts CHANGED
@@ -1,14 +1,13 @@
1
1
  export * from './deprecated/adapter';
2
2
  export * from './deprecated/demo-extractor';
3
- export * from './deprecated/uploader';
4
3
  export * from './deprecated/http/client';
5
- export * from './types';
4
+ export * from './deprecated/uploader';
6
5
  export * from './http';
6
+ export * from './types';
7
7
  export * from './common/install-initial-domain-mapping';
8
- export { WorkerAdapter } from './workers/worker-adapter';
9
8
  export { processTask } from './workers/process-task';
10
9
  export { spawn } from './workers/spawn';
10
+ export { WorkerAdapter } from './workers/worker-adapter';
11
11
  export * from './types/workers';
12
- export { formatAxiosError } from './logger/logger';
13
- export { serializeAxiosError } from './logger/logger';
12
+ export { formatAxiosError, serializeAxiosError } from './logger/logger';
14
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AAEzC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AAEvB,cAAc,yCAAyC,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AAExB,cAAc,yCAAyC,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC"}
package/dist/index.js CHANGED
@@ -14,22 +14,21 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.serializeAxiosError = exports.formatAxiosError = exports.spawn = exports.processTask = exports.WorkerAdapter = void 0;
17
+ exports.serializeAxiosError = exports.formatAxiosError = exports.WorkerAdapter = exports.spawn = exports.processTask = void 0;
18
18
  __exportStar(require("./deprecated/adapter"), exports);
19
19
  __exportStar(require("./deprecated/demo-extractor"), exports);
20
- __exportStar(require("./deprecated/uploader"), exports);
21
20
  __exportStar(require("./deprecated/http/client"), exports);
22
- __exportStar(require("./types"), exports);
21
+ __exportStar(require("./deprecated/uploader"), exports);
23
22
  __exportStar(require("./http"), exports);
23
+ __exportStar(require("./types"), exports);
24
24
  __exportStar(require("./common/install-initial-domain-mapping"), exports);
25
- var worker_adapter_1 = require("./workers/worker-adapter");
26
- Object.defineProperty(exports, "WorkerAdapter", { enumerable: true, get: function () { return worker_adapter_1.WorkerAdapter; } });
27
25
  var process_task_1 = require("./workers/process-task");
28
26
  Object.defineProperty(exports, "processTask", { enumerable: true, get: function () { return process_task_1.processTask; } });
29
27
  var spawn_1 = require("./workers/spawn");
30
28
  Object.defineProperty(exports, "spawn", { enumerable: true, get: function () { return spawn_1.spawn; } });
29
+ var worker_adapter_1 = require("./workers/worker-adapter");
30
+ Object.defineProperty(exports, "WorkerAdapter", { enumerable: true, get: function () { return worker_adapter_1.WorkerAdapter; } });
31
31
  __exportStar(require("./types/workers"), exports);
32
32
  var logger_1 = require("./logger/logger");
33
33
  Object.defineProperty(exports, "formatAxiosError", { enumerable: true, get: function () { return logger_1.formatAxiosError; } });
34
- var logger_2 = require("./logger/logger");
35
- Object.defineProperty(exports, "serializeAxiosError", { enumerable: true, get: function () { return logger_2.serializeAxiosError; } });
34
+ Object.defineProperty(exports, "serializeAxiosError", { enumerable: true, get: function () { return logger_1.serializeAxiosError; } });
@@ -1,6 +1,6 @@
1
1
  import { Console } from 'node:console';
2
- import { LoggerFactoryInterface, LogLevel, PrintableState } from './logger.interfaces';
3
2
  import { AxiosError, RawAxiosResponseHeaders } from 'axios';
3
+ import { LoggerFactoryInterface, LogLevel, PrintableState } from './logger.interfaces';
4
4
  export declare class Logger extends Console {
5
5
  private options?;
6
6
  private tags;
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logger/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGvC,OAAO,EACL,sBAAsB,EACtB,QAAQ,EAER,cAAc,EACf,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAgB,MAAM,OAAO,CAAC;AAI1E,qBAAa,MAAO,SAAQ,OAAO;IACjC,OAAO,CAAC,OAAO,CAAC,CAAuB;IACvC,OAAO,CAAC,IAAI,CAAqC;gBAErC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,sBAAsB;IAStD,OAAO,CAAC,aAAa;IAYrB,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,QAAQ,GAAG,IAAI;IAmCpC,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAI7B,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAI9B,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAI9B,KAAK,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;CAGzC;AAID,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,cAAc,CA2B5E;AACD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAE1D;AAED,eAAO,MAAM,cAAc,GAAI,OAAO,OAAO,YAK5C,CAAC;AAEF,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE;QACN,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;QAC3B,MAAM,EAAE,GAAG,CAAC;QACZ,GAAG,EAAE,MAAM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,GAAG,CAAC,GAAG,cAAc,CAyB5E;AACD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAE1D;AAED,eAAO,MAAM,cAAc,GAAI,OAAO,OAAO,YAK5C,CAAC;AAEF,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE;QACN,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;QAC3B,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,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,UAAU,GAAG,kBAAkB,CAwBzE"}
@@ -6,10 +6,10 @@ exports.formatAxiosError = formatAxiosError;
6
6
  exports.serializeAxiosError = serializeAxiosError;
7
7
  const node_console_1 = require("node:console");
8
8
  const node_util_1 = require("node:util");
9
- const logger_interfaces_1 = require("./logger.interfaces");
9
+ const axios_1 = require("axios");
10
10
  const node_worker_threads_1 = require("node:worker_threads");
11
11
  const workers_1 = require("../types/workers");
12
- const axios_1 = require("axios");
12
+ const logger_interfaces_1 = require("./logger.interfaces");
13
13
  class Logger extends node_console_1.Console {
14
14
  constructor({ event, options }) {
15
15
  super(process.stdout, process.stderr);
@@ -92,9 +92,7 @@ function getPrintableState(state) {
92
92
  // If the value is an object, recursively process its properties
93
93
  const processedObject = {};
94
94
  for (const key in value) {
95
- if (value.hasOwnProperty(key)) {
96
- processedObject[key] = processValue(value[key]);
97
- }
95
+ processedObject[key] = processValue(value[key]);
98
96
  }
99
97
  return processedObject;
100
98
  }
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const node_util_1 = require("node:util");
4
- const logger_1 = require("./logger");
5
- const extraction_1 = require("../types/extraction");
6
4
  const test_helpers_1 = require("../tests/test-helpers");
5
+ const extraction_1 = require("../types/extraction");
6
+ const logger_1 = require("./logger");
7
7
  // Mock console methods
8
8
  const mockConsoleInfo = jest.spyOn(console, 'info').mockImplementation();
9
9
  const mockConsoleWarn = jest.spyOn(console, 'warn').mockImplementation();
10
10
  const mockConsoleError = jest.spyOn(console, 'error').mockImplementation();
11
- const mockConsoleLog = jest.spyOn(console, 'log').mockImplementation();
11
+ /* eslint-disable @typescript-eslint/no-require-imports */
12
12
  // Mock worker_threads
13
13
  jest.mock('node:worker_threads', () => ({
14
14
  isMainThread: true,
@@ -49,6 +49,7 @@ describe(logger_1.Logger.name, () => {
49
49
  it('should initialize logger with event context and dev_oid', () => {
50
50
  const logger = new logger_1.Logger({ event: mockEvent, options: mockOptions });
51
51
  // Access private property for testing
52
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
52
53
  const tags = logger.tags;
53
54
  expect(tags).toEqual(Object.assign(Object.assign({}, mockEvent.payload.event_context), { dev_oid: mockEvent.payload.event_context.dev_oid }));
54
55
  });
@@ -1,5 +1,5 @@
1
1
  import { AxiosResponse } from 'axios';
2
- import { MappersFactoryInterface, MappersCreateParams, MappersCreateResponse, MappersGetByTargetIdParams, MappersGetByTargetIdResponse, MappersUpdateParams, MappersUpdateResponse, MappersGetByExternalIdParams, MappersGetByExternalIdResponse } from './mappers.interface';
2
+ import { MappersCreateParams, MappersCreateResponse, MappersFactoryInterface, MappersGetByExternalIdParams, MappersGetByExternalIdResponse, MappersGetByTargetIdParams, MappersGetByTargetIdResponse, MappersUpdateParams, MappersUpdateResponse } from './mappers.interface';
3
3
  /**
4
4
  * Manages sync mapper records that link external system items to DevRev items.
5
5
  *
@@ -1 +1 @@
1
- {"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../../src/mappers/mappers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAItC,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,EACrB,0BAA0B,EAC1B,4BAA4B,EAC5B,mBAAmB,EACnB,qBAAqB,EACrB,4BAA4B,EAC5B,8BAA8B,EAC/B,MAAM,qBAAqB,CAAC;AAE7B;;;;GAIG;AACH,qBAAa,OAAO;IAClB,OAAO,CAAC,iBAAiB,CAAS;IAClC,OAAO,CAAC,cAAc,CAAS;gBAEnB,EAAE,KAAK,EAAE,EAAE,uBAAuB;IAK9C;;;;;;;OAOG;IACG,aAAa,CACjB,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAAC,aAAa,CAAC,4BAA4B,CAAC,CAAC;IAavD;;;;;;;OAOG;IACG,eAAe,CACnB,MAAM,EAAE,4BAA4B,GACnC,OAAO,CAAC,aAAa,CAAC,8BAA8B,CAAC,CAAC;IAazD;;;;;;;;;OASG;IACG,MAAM,CACV,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;IAYhD;;;;;;;;OAQG;IACG,MAAM,CACV,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;CAWjD"}
1
+ {"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../../src/mappers/mappers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAItC,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,4BAA4B,EAC5B,8BAA8B,EAC9B,0BAA0B,EAC1B,4BAA4B,EAC5B,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,qBAAqB,CAAC;AAE7B;;;;GAIG;AACH,qBAAa,OAAO;IAClB,OAAO,CAAC,iBAAiB,CAAS;IAClC,OAAO,CAAC,cAAc,CAAS;gBAEnB,EAAE,KAAK,EAAE,EAAE,uBAAuB;IAK9C;;;;;;;OAOG;IACG,aAAa,CACjB,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAAC,aAAa,CAAC,4BAA4B,CAAC,CAAC;IAavD;;;;;;;OAOG;IACG,eAAe,CACnB,MAAM,EAAE,4BAA4B,GACnC,OAAO,CAAC,aAAa,CAAC,8BAA8B,CAAC,CAAC;IAazD;;;;;;;;;OASG;IACG,MAAM,CACV,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;IAYhD;;;;;;;;OAQG;IACG,MAAM,CACV,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;CAWjD"}
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const axios_client_internal_1 = require("../http/axios-client-internal");
4
- const mappers_1 = require("./mappers");
5
- const mappers_interface_1 = require("./mappers.interface");
6
4
  const test_helpers_1 = require("../tests/test-helpers");
7
5
  const extraction_1 = require("../types/extraction");
6
+ const mappers_1 = require("./mappers");
7
+ const mappers_interface_1 = require("./mappers.interface");
8
8
  // Mock the axios client
9
9
  jest.mock('../http/axios-client-internal');
10
10
  const mockAxiosClient = axios_client_internal_1.axiosClient;
@@ -1,7 +1,7 @@
1
- import { ErrorRecord } from '../types/common';
2
1
  import { Item } from '../repo/repo.interfaces';
2
+ import { ErrorRecord } from '../types/common';
3
3
  import { Artifact } from '../uploader/uploader.interfaces';
4
- import { RepoFactoryInterface, NormalizedItem, NormalizedAttachment } from './repo.interfaces';
4
+ import { NormalizedAttachment, NormalizedItem, RepoFactoryInterface } from './repo.interfaces';
5
5
  export declare class Repo {
6
6
  readonly itemType: string;
7
7
  private items;
@@ -1 +1 @@
1
- {"version":3,"file":"repo.d.ts","sourceRoot":"","s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,IAAI;IACf,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,KAAK,CAAmD;IAChE,OAAO,CAAC,SAAS,CAAC,CAAwD;IAC1E,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,QAAQ,CAA+B;IAC/C,OAAO,CAAC,OAAO,CAAC,CAAuB;IAChC,iBAAiB,EAAE,QAAQ,EAAE,CAAC;gBAEzB,EACV,KAAK,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,OAAO,GACR,EAAE,oBAAoB;IAUvB,QAAQ,IAAI,CAAC,cAAc,GAAG,oBAAoB,GAAG,IAAI,CAAC,EAAE;IAItD,MAAM,CACV,KAAK,CAAC,EAAE,CAAC,cAAc,GAAG,oBAAoB,GAAG,IAAI,CAAC,EAAE,GACvD,OAAO,CAAC,IAAI,GAAG,WAAW,CAAC;IAqCxB,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;CAuC5C"}
@@ -1,7 +1,7 @@
1
+ import { InitialDomainMapping } from '../types/common';
1
2
  import { AirdropEvent } from '../types/extraction';
2
3
  import { FileToLoad } from '../types/loading';
3
4
  import { WorkerAdapterOptions } from '../types/workers';
4
- import { InitialDomainMapping } from '../types/common';
5
5
  export interface SdkState {
6
6
  lastSyncStarted?: string;
7
7
  lastSuccessfulSyncStarted?: string;