@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.
- package/dist/attachments-streaming/attachments-streaming-pool.d.ts.map +1 -1
- package/dist/attachments-streaming/attachments-streaming-pool.interfaces.d.ts +1 -1
- package/dist/attachments-streaming/attachments-streaming-pool.interfaces.d.ts.map +1 -1
- package/dist/attachments-streaming/attachments-streaming-pool.test.js +43 -42
- package/dist/common/helpers.d.ts +0 -1
- package/dist/common/helpers.d.ts.map +1 -1
- package/dist/common/helpers.js +3 -18
- package/dist/common/install-initial-domain-mapping.d.ts.map +1 -1
- package/dist/common/install-initial-domain-mapping.test.js +3 -1
- package/dist/deprecated/adapter/index.d.ts +1 -1
- package/dist/deprecated/adapter/index.d.ts.map +1 -1
- package/dist/deprecated/uploader/index.d.ts.map +1 -1
- package/dist/deprecated/uploader/index.js +1 -1
- package/dist/http/axios-client.d.ts.map +1 -1
- package/dist/http/index.d.ts +1 -1
- package/dist/http/index.d.ts.map +1 -1
- package/dist/http/index.js +1 -1
- package/dist/index.d.ts +4 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -7
- package/dist/logger/logger.d.ts +1 -1
- package/dist/logger/logger.d.ts.map +1 -1
- package/dist/logger/logger.js +3 -5
- package/dist/logger/logger.test.js +4 -3
- package/dist/mappers/mappers.d.ts +1 -1
- package/dist/mappers/mappers.d.ts.map +1 -1
- package/dist/mappers/mappers.test.js +2 -2
- package/dist/repo/repo.d.ts +2 -2
- package/dist/repo/repo.d.ts.map +1 -1
- package/dist/state/state.interfaces.d.ts +1 -1
- package/dist/state/state.interfaces.d.ts.map +1 -1
- package/dist/state/state.js +6 -6
- package/dist/state/state.test.js +4 -3
- package/dist/tests/backwards-compatibility/backwards-compatibility.test.d.ts.map +1 -1
- package/dist/tests/backwards-compatibility/backwards-compatibility.test.js +19 -12
- package/dist/tests/backwards-compatibility/helpers.d.ts.map +1 -1
- package/dist/tests/backwards-compatibility/helpers.js +1 -0
- package/dist/tests/mock-server.d.ts.map +1 -1
- package/dist/tests/mock-server.js +2 -0
- package/dist/tests/test-helpers.d.ts.map +1 -1
- package/dist/tests/test-helpers.interfaces.d.ts +1 -1
- package/dist/tests/test-helpers.interfaces.d.ts.map +1 -1
- package/dist/tests/timeout-handling/extraction.d.ts.map +1 -1
- package/dist/tests/timeout-handling/timeout-1.test.js +1 -1
- package/dist/tests/timeout-handling/timeout-2.js +3 -1
- package/dist/tests/timeout-handling/timeout-2.test.js +1 -1
- package/dist/tests/timeout-handling/timeout-3a.test.js +1 -1
- package/dist/tests/timeout-handling/timeout-3b.test.js +1 -1
- package/dist/types/extraction.d.ts +2 -2
- package/dist/types/extraction.d.ts.map +1 -1
- package/dist/types/extraction.test.js +6 -5
- package/dist/types/index.d.ts +6 -6
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -2
- package/dist/types/loading.d.ts +1 -1
- package/dist/types/loading.d.ts.map +1 -1
- package/dist/types/workers.d.ts +1 -1
- package/dist/types/workers.d.ts.map +1 -1
- package/dist/uploader/uploader.d.ts +2 -2
- package/dist/uploader/uploader.d.ts.map +1 -1
- package/dist/uploader/uploader.interfaces.d.ts +2 -2
- package/dist/uploader/uploader.interfaces.d.ts.map +1 -1
- package/dist/uploader/uploader.js +3 -3
- package/dist/uploader/uploader.test.js +1 -1
- package/dist/workers/create-worker.d.ts.map +1 -1
- package/dist/workers/create-worker.js +1 -1
- package/dist/workers/create-worker.test.js +4 -2
- package/dist/workers/default-workers/attachments-extraction.js +8 -6
- package/dist/workers/default-workers/load-attachments.js +1 -1
- package/dist/workers/default-workers/load-data.js +1 -1
- package/dist/workers/dummy-extractor/data-normalization.d.ts +1 -1
- package/dist/workers/dummy-extractor/data-normalization.d.ts.map +1 -1
- package/dist/workers/process-task.d.ts.map +1 -1
- package/dist/workers/process-task.js +5 -4
- package/dist/workers/spawn.d.ts.map +1 -1
- package/dist/workers/spawn.js +11 -11
- package/dist/workers/worker-adapter.artifacts.test.js +12 -20
- package/dist/workers/worker-adapter.d.ts +7 -8
- package/dist/workers/worker-adapter.d.ts.map +1 -1
- package/dist/workers/worker-adapter.js +11 -10
- package/dist/workers/worker-adapter.test.js +43 -14
- package/dist/workers/worker.js +0 -2
- package/package.json +15 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.interfaces.d.ts","sourceRoot":"","sources":["../../src/state/state.interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"state.interfaces.d.ts","sourceRoot":"","sources":["../../src/state/state.interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,WAAW,QAAQ;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,MAAM,YAAY,CAAC,cAAc,IAAI,cAAc,GAAG,QAAQ,CAAC;AAErE,MAAM,WAAW,QAAQ;IACvB,mBAAmB,EAAE;QACnB,WAAW,EAAE,MAAM,EAAE,CAAC;QACtB,aAAa,EAAE,MAAM,CAAC;QACtB,+BAA+B,CAAC,EAAE,MAAM,EAAE,CAAC;KAC5C,CAAC;CACH;AAED,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,cAAc,CAAC,cAAc;IAC5C,KAAK,EAAE,YAAY,CAAC;IACpB,YAAY,EAAE,cAAc,CAAC;IAC7B,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,OAAO,CAAC,EAAE,oBAAoB,CAAC;CAChC;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;CAW9B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;CAK3B,CAAC"}
|
package/dist/state/state.js
CHANGED
|
@@ -6,13 +6,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.State = void 0;
|
|
7
7
|
exports.createAdapterState = createAdapterState;
|
|
8
8
|
const axios_1 = __importDefault(require("axios"));
|
|
9
|
-
const axios_client_internal_1 = require("../http/axios-client-internal");
|
|
10
|
-
const extraction_1 = require("../types/extraction");
|
|
11
|
-
const common_1 = require("../types/common");
|
|
12
9
|
const constants_1 = require("../common/constants");
|
|
13
|
-
const logger_1 = require("../logger/logger");
|
|
14
|
-
const install_initial_domain_mapping_1 = require("../common/install-initial-domain-mapping");
|
|
15
10
|
const helpers_1 = require("../common/helpers");
|
|
11
|
+
const install_initial_domain_mapping_1 = require("../common/install-initial-domain-mapping");
|
|
12
|
+
const axios_client_internal_1 = require("../http/axios-client-internal");
|
|
13
|
+
const logger_1 = require("../logger/logger");
|
|
14
|
+
const common_1 = require("../types/common");
|
|
15
|
+
const extraction_1 = require("../types/extraction");
|
|
16
16
|
const state_interfaces_1 = require("./state.interfaces");
|
|
17
17
|
async function createAdapterState({ event, initialState, initialDomainMapping, options, }) {
|
|
18
18
|
// Deep clone the initial state to avoid mutating the original state
|
|
@@ -92,7 +92,7 @@ class State {
|
|
|
92
92
|
parsedState = JSON.parse(stringifiedState);
|
|
93
93
|
}
|
|
94
94
|
catch (error) {
|
|
95
|
-
throw new Error(
|
|
95
|
+
throw new Error(`Failed to parse state. ${error}`);
|
|
96
96
|
}
|
|
97
97
|
this.state = parsedState;
|
|
98
98
|
console.log('State fetched successfully. Current state', (0, logger_1.getPrintableState)(this.state));
|
package/dist/state/state.test.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const state_1 = require("./state");
|
|
4
|
-
const extraction_1 = require("../types/extraction");
|
|
5
|
-
const test_helpers_1 = require("../tests/test-helpers");
|
|
6
3
|
const constants_1 = require("../common/constants");
|
|
4
|
+
const test_helpers_1 = require("../tests/test-helpers");
|
|
5
|
+
const extraction_1 = require("../types/extraction");
|
|
6
|
+
const state_1 = require("./state");
|
|
7
7
|
const state_interfaces_1 = require("./state.interfaces");
|
|
8
|
+
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
8
9
|
describe(state_1.State.name, () => {
|
|
9
10
|
let initSpy;
|
|
10
11
|
let postStateSpy;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backwards-compatibility.test.d.ts","sourceRoot":"","sources":["../../../src/tests/backwards-compatibility/backwards-compatibility.test.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"backwards-compatibility.test.d.ts","sourceRoot":"","sources":["../../../src/tests/backwards-compatibility/backwards-compatibility.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EAGd,WAAW,EAGX,kBAAkB,EAKnB,MAAM,gCAAgC,CAAC;AAgBxC,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,WAAW,GAAG,cAAc,GAAG,kBAAkB,EAC9D,eAAe,EAAE,WAAW,GAAG,cAAc,GAAG,kBAAkB,QA0EnE"}
|
|
@@ -10,18 +10,23 @@ function checkFunctionCompatibility(newFunction, currentFunction) {
|
|
|
10
10
|
expect(newFunction.parameters.length).toBeGreaterThanOrEqual(currentFunction.parameters.length);
|
|
11
11
|
});
|
|
12
12
|
it(`Function ${newFunction.displayName} should have parameters in the same order as the current function`, () => {
|
|
13
|
-
const newFunctionParamNames = newFunction.parameters
|
|
13
|
+
const newFunctionParamNames = newFunction.parameters
|
|
14
|
+
.slice(0, lengthOfPreviousParameters)
|
|
15
|
+
.map((p) => p.name);
|
|
14
16
|
const currentFunctionParamNames = currentFunction.parameters.map((p) => p.name);
|
|
15
17
|
expect(newFunctionParamNames).toEqual(currentFunctionParamNames);
|
|
16
18
|
});
|
|
17
19
|
it(`Function ${newFunction.displayName} should have compatible parameter types with the current function`, () => {
|
|
18
|
-
const newFunctionParamTypes = newFunction.parameters
|
|
20
|
+
const newFunctionParamTypes = newFunction.parameters
|
|
21
|
+
.slice(0, lengthOfPreviousParameters)
|
|
22
|
+
.map((p) => p.parameterTypeExcerpt.text);
|
|
19
23
|
const currentFunctionParameterTypes = currentFunction.parameters.map((p) => p.parameterTypeExcerpt.text);
|
|
20
24
|
expect(newFunctionParamTypes).toEqual(currentFunctionParameterTypes);
|
|
21
25
|
});
|
|
22
26
|
// Check return type compatibility
|
|
23
27
|
// This check fails if it's a constructor, as those don't have a return type
|
|
24
|
-
if (currentFunction instanceof api_extractor_model_1.ApiFunction &&
|
|
28
|
+
if (currentFunction instanceof api_extractor_model_1.ApiFunction &&
|
|
29
|
+
newFunction instanceof api_extractor_model_1.ApiFunction) {
|
|
25
30
|
if (!((_a = currentFunction.returnTypeExcerpt) === null || _a === void 0 ? void 0 : _a.isEmpty)) {
|
|
26
31
|
if (newFunction.returnTypeExcerpt.text != currentFunction.returnTypeExcerpt.text) {
|
|
27
32
|
// This will pass, if the new implementation is an object and the current one is not specified or a hard-coded type.
|
|
@@ -74,7 +79,7 @@ describe('Backwards Compatibility', () => {
|
|
|
74
79
|
const { newApiMembers, currentApiMembers } = (0, helpers_1.loadApiData)();
|
|
75
80
|
const newFunctions = (0, helpers_1.getFunctions)(newApiMembers);
|
|
76
81
|
const currentFunctions = (0, helpers_1.getFunctions)(currentApiMembers);
|
|
77
|
-
const newFunctionNames = newFunctions.map(f => f.name);
|
|
82
|
+
const newFunctionNames = newFunctions.map((f) => f.name);
|
|
78
83
|
for (const currentFunction of currentFunctions) {
|
|
79
84
|
it(`should contain function: ${currentFunction.name}`, () => {
|
|
80
85
|
expect(newFunctionNames).toContain(currentFunction.name);
|
|
@@ -113,7 +118,7 @@ describe('Backwards Compatibility', () => {
|
|
|
113
118
|
const newClassProperties = (0, helpers_1.getProperties)(newClass.members);
|
|
114
119
|
const currentClassProperties = (0, helpers_1.getProperties)(currentClass.members);
|
|
115
120
|
describe(`Class ${newClass.name} should have at least all public properties from the current class`, () => {
|
|
116
|
-
const newPropertyNames = newClassProperties.map(p => p.name);
|
|
121
|
+
const newPropertyNames = newClassProperties.map((p) => p.name);
|
|
117
122
|
for (const currentProperty of currentClassProperties) {
|
|
118
123
|
it(`should contain property: ${currentProperty.name}`, () => {
|
|
119
124
|
expect(newPropertyNames).toContain(currentProperty.name);
|
|
@@ -123,7 +128,7 @@ describe('Backwards Compatibility', () => {
|
|
|
123
128
|
describe(`Class ${newClass.name} should not have any optional properties that became required`, () => {
|
|
124
129
|
for (const currentProperty of currentClassProperties) {
|
|
125
130
|
it(`should not have optional property that became required: ${currentProperty.name}`, () => {
|
|
126
|
-
const newProperty = newClassProperties.find(p => p.name === currentProperty.name);
|
|
131
|
+
const newProperty = newClassProperties.find((p) => p.name === currentProperty.name);
|
|
127
132
|
if (newProperty && currentProperty.isOptional) {
|
|
128
133
|
// If the current property was optional, the new property should also be optional
|
|
129
134
|
expect(newProperty.isOptional).toBe(true);
|
|
@@ -155,7 +160,7 @@ describe('Backwards Compatibility', () => {
|
|
|
155
160
|
const newClassMethods = (0, helpers_1.getFunctions)(newClass.members);
|
|
156
161
|
const currentClassMethods = (0, helpers_1.getFunctions)(currentClass.members);
|
|
157
162
|
describe(`Class ${newClass.name} should export all public methods from the current class`, () => {
|
|
158
|
-
const newMethodNames = newClassMethods.map(m => m.name);
|
|
163
|
+
const newMethodNames = newClassMethods.map((m) => m.name);
|
|
159
164
|
for (const currentMethod of currentClassMethods) {
|
|
160
165
|
it(`should contain method: ${currentMethod.name}`, () => {
|
|
161
166
|
expect(newMethodNames).toContain(currentMethod.name);
|
|
@@ -288,8 +293,8 @@ describe('Backwards Compatibility', () => {
|
|
|
288
293
|
return enumMembers.every((member) => {
|
|
289
294
|
var _a, _b, _c;
|
|
290
295
|
// Check if the member has an initializer and if it's a numeric value
|
|
291
|
-
const initializerText = (_c = (_b = (_a = member.excerptTokens) === null || _a === void 0 ? void 0 : _a.find(token => token.kind === 'Content' && /^\d+$/.test(token.text.trim()))) === null || _b === void 0 ? void 0 : _b.text) === null || _c === void 0 ? void 0 : _c.trim();
|
|
292
|
-
return initializerText !== undefined && /^\d+$/.test(initializerText);
|
|
296
|
+
const initializerText = (_c = (_b = (_a = member.excerptTokens) === null || _a === void 0 ? void 0 : _a.find((token) => token.kind === 'Content' && /^\d+$/.test(token.text.trim()))) === null || _b === void 0 ? void 0 : _b.text) === null || _c === void 0 ? void 0 : _c.trim();
|
|
297
|
+
return (initializerText !== undefined && /^\d+$/.test(initializerText));
|
|
293
298
|
});
|
|
294
299
|
};
|
|
295
300
|
const newEnumNumeric = isNumericEnum([...newEnum.members]);
|
|
@@ -332,7 +337,9 @@ describe('Backwards Compatibility', () => {
|
|
|
332
337
|
continue;
|
|
333
338
|
}
|
|
334
339
|
const currentEnumValues = currentEnum.members.map((a) => a.name);
|
|
335
|
-
const newEnumValues = newEnum.members
|
|
340
|
+
const newEnumValues = newEnum.members
|
|
341
|
+
.slice(0, currentEnumValues.length)
|
|
342
|
+
.map((a) => a.name);
|
|
336
343
|
// This might appear to not be working sometimes, but remember that the order of enum values is determined by the enum member key name
|
|
337
344
|
it(`Enum ${newEnum.name} should have added new options to the end of the array`, () => {
|
|
338
345
|
expect(newEnumValues).toStrictEqual(currentEnumValues);
|
|
@@ -345,7 +352,7 @@ describe('Backwards Compatibility', () => {
|
|
|
345
352
|
const newTypes = (0, helpers_1.getTypes)(newApiMembers);
|
|
346
353
|
const currentTypes = (0, helpers_1.getTypes)(currentApiMembers);
|
|
347
354
|
// Verify type aliases weren't removed
|
|
348
|
-
describe(
|
|
355
|
+
describe("should verify type aliases weren't removed", () => {
|
|
349
356
|
for (const newType of newTypes) {
|
|
350
357
|
const currentType = currentTypes.find((t) => t.name === newType.name);
|
|
351
358
|
if (!currentType) {
|
|
@@ -365,7 +372,7 @@ describe('Backwards Compatibility', () => {
|
|
|
365
372
|
}
|
|
366
373
|
it(`Type ${newType.name} should have the same type as the current type`, () => {
|
|
367
374
|
// Replace all whitespace with an empty string to ignore whitespace differences
|
|
368
|
-
expect(newType.typeExcerpt.text.replace(/\s/g,
|
|
375
|
+
expect(newType.typeExcerpt.text.replace(/\s/g, '')).toEqual(currentType.typeExcerpt.text.replace(/\s/g, ''));
|
|
369
376
|
});
|
|
370
377
|
}
|
|
371
378
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/tests/backwards-compatibility/helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/tests/backwards-compatibility/helpers.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,QAAQ,EACR,cAAc,EACd,OAAO,EACP,WAAW,EACX,YAAY,EACZ,OAAO,EACP,kBAAkB,EAElB,WAAW,EACX,oBAAoB,EACpB,YAAY,EACb,MAAM,gCAAgC,CAAC;AAMxC,eAAO,MAAM,YAAY,QAA8C,CAAC;AACxE,eAAO,MAAM,gBAAgB,QAAsC,CAAC;AACpE,eAAO,MAAM,cAAc,QAAoD,CAAC;AAChF,eAAO,MAAM,kBAAkB,QAAsC,CAAC;AAKtE,wBAAgB,iBAAiB,IAAI,IAAI,CAkDxC;AAGD,eAAO,MAAM,WAAW,QAAO;IAC7B,aAAa,EAAE,SAAS,OAAO,EAAE,CAAC;IAClC,iBAAiB,EAAE,SAAS,OAAO,EAAE,CAAC;CAqBvC,CAAC;AAGF,eAAO,MAAM,YAAY,GAAI,SAAS,SAAS,OAAO,EAAE,KAAG,WAAW,EAIrE,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,SAAS,SAAS,OAAO,EAAE,KAAG,cAM5D,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,SAAS,SAAS,OAAO,EAAE,KAAG,OAAO,EAI7D,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,SAAS,SAAS,OAAO,EAAE,KAAG,QAAQ,EAIhE,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,SAAS,SAAS,OAAO,EAAE,KAAG,WAAW,EAItE,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,SAAS,SAAS,OAAO,EAAE,KAAG,YAAY,EAIlE,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,SAAS,SAAS,OAAO,EAAE,KAAG,YAAY,EAIvE,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,SAAS,SAAS,OAAO,EAAE,KAC1B,kBAAkB,EAKpB,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAChC,SAAS,SAAS,OAAO,EAAE,KAC1B,oBAAoB,EAKtB,CAAC;AAEF,eAAO,MAAM,oBAAoB,YAYhC,CAAC"}
|
|
@@ -44,6 +44,7 @@ exports.newApiMdPath = path.join(__dirname, 'temp', 'ts-adaas.md');
|
|
|
44
44
|
exports.currentApiMdPath = path.join(__dirname, 'ts-adaas.md');
|
|
45
45
|
exports.newApiJsonPath = path.join(__dirname, 'temp', 'ts-adaas.api.json');
|
|
46
46
|
exports.currentApiJsonPath = path.join(__dirname, 'latest.json');
|
|
47
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
47
48
|
// Generate API report before all tests run
|
|
48
49
|
function generateApiReport() {
|
|
49
50
|
// Before running the api extractor, make sure that the code compiles using `tsc` command
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-server.d.ts","sourceRoot":"","sources":["../../src/tests/mock-server.ts"],"names":[],"mappings":"AAGA,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAA4B;IAC1C,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,WAAW,CAAgB;
|
|
1
|
+
{"version":3,"file":"mock-server.d.ts","sourceRoot":"","sources":["../../src/tests/mock-server.ts"],"names":[],"mappings":"AAGA,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAA4B;IAC1C,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,WAAW,CAAgB;IAEnC,OAAO,CAAC,QAAQ,CAA0D;gBAE9D,IAAI,CAAC,EAAE,MAAM;IAIzB,OAAO,CAAC,qBAAqB;IAe7B,OAAO,CAAC,aAAa;IA+Nf,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAiBtB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAc3B,UAAU,IAAI,MAAM;IAIpB,OAAO,IAAI,MAAM;IAIjB,cAAc,IAAI,MAAM,EAAE;IAI1B,WAAW;gBA/RuB,MAAM;aAAO,MAAM;eAAS,GAAG;;IAmSjE,aAAa;CAGd"}
|
|
@@ -40,6 +40,7 @@ class MockServer {
|
|
|
40
40
|
constructor(port) {
|
|
41
41
|
this.server = null;
|
|
42
42
|
this.consoleLogs = [];
|
|
43
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
43
44
|
this.requests = [];
|
|
44
45
|
this.port = port || 3001; // Default to standard test port
|
|
45
46
|
}
|
|
@@ -62,6 +63,7 @@ class MockServer {
|
|
|
62
63
|
const pathname = parsedUrl.pathname || '';
|
|
63
64
|
const method = req.method || 'GET';
|
|
64
65
|
// Track this request
|
|
66
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
65
67
|
const requestInfo = {
|
|
66
68
|
method,
|
|
67
69
|
url: req.url || '',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-helpers.d.ts","sourceRoot":"","sources":["../../src/tests/test-helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"test-helpers.d.ts","sourceRoot":"","sources":["../../src/tests/test-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,oBAAoB,EACpB,cAAc,EACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,iBAAsB,EACtB,QAAQ,EACR,KAAK,EACL,KAAK,EACL,gBAAqB,EACrB,gBAAqB,EACrB,qBAA0B,EAC1B,0BAA+B,GAChC,EAAE,oBAAoB,GAAG,YAAY,CA4ErC;AAED,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAO3C;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,CAEjD;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,cAAc,CASxD;AAED,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,oBAAoB,CAQjE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,oBAAoB,EAAE,CAEvE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ErrorRecord } from '../types/common';
|
|
2
|
-
import { AirdropEvent, EventType, ExternalSyncUnit
|
|
2
|
+
import { AirdropEvent, EventContext, EventType, ExternalSyncUnit } from '../types/extraction';
|
|
3
3
|
export interface CreateEventInterface {
|
|
4
4
|
eventType: EventType;
|
|
5
5
|
externalSyncUnits?: ExternalSyncUnit[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-helpers.interfaces.d.ts","sourceRoot":"","sources":["../../src/tests/test-helpers.interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EACL,YAAY,EACZ,SAAS,EACT,gBAAgB,
|
|
1
|
+
{"version":3,"file":"test-helpers.interfaces.d.ts","sourceRoot":"","sources":["../../src/tests/test-helpers.interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,gBAAgB,EACjB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,SAAS,CAAC;IACrB,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC;IACpD,gBAAgB,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC;IACpD,qBAAqB,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAC9C,0BAA0B,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAC,CAAC;CAC1E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extraction.d.ts","sourceRoot":"","sources":["../../../src/tests/timeout-handling/extraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAS,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"extraction.d.ts","sourceRoot":"","sources":["../../../src/tests/timeout-handling/extraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAS,MAAM,aAAa,CAAC;AAOlD,QAAA,MAAM,GAAG,GAAU,QAAQ,YAAY,EAAE,EAAE,YAAY,MAAM,kBAc5D,CAAC;AAEF,eAAe,GAAG,CAAC"}
|
|
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const extraction_1 = require("../../types/extraction");
|
|
7
|
+
const mock_server_1 = require("../mock-server");
|
|
7
8
|
const test_helpers_1 = require("../test-helpers");
|
|
8
9
|
const extraction_2 = __importDefault(require("./extraction"));
|
|
9
|
-
const mock_server_1 = require("../mock-server");
|
|
10
10
|
describe('timeout-1 extraction', () => {
|
|
11
11
|
let mockServer;
|
|
12
12
|
beforeAll(async () => {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const index_1 = require("../../index");
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
4
5
|
// Simulate a network request with variable delays
|
|
5
|
-
|
|
6
|
+
// eslint-disable @typescript-eslint/no-explicit-any
|
|
7
|
+
const simulateNetworkRequest = async (url, delay) => {
|
|
6
8
|
return new Promise((resolve) => {
|
|
7
9
|
console.log(`Starting network request to ${url}...`);
|
|
8
10
|
setTimeout(() => {
|
|
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const extraction_1 = require("../../types/extraction");
|
|
7
|
+
const mock_server_1 = require("../mock-server");
|
|
7
8
|
const test_helpers_1 = require("../test-helpers");
|
|
8
9
|
const extraction_2 = __importDefault(require("./extraction"));
|
|
9
|
-
const mock_server_1 = require("../mock-server");
|
|
10
10
|
jest.setTimeout(15000);
|
|
11
11
|
describe('timeout-2 extraction', () => {
|
|
12
12
|
let mockServer;
|
|
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const extraction_1 = require("../../types/extraction");
|
|
7
|
+
const mock_server_1 = require("../mock-server");
|
|
7
8
|
const test_helpers_1 = require("../test-helpers");
|
|
8
9
|
const extraction_2 = __importDefault(require("./extraction"));
|
|
9
|
-
const mock_server_1 = require("../mock-server");
|
|
10
10
|
jest.setTimeout(15000);
|
|
11
11
|
describe('timeout-3a extraction', () => {
|
|
12
12
|
let mockServer;
|
|
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const extraction_1 = require("../../types/extraction");
|
|
7
|
+
const mock_server_1 = require("../mock-server");
|
|
7
8
|
const test_helpers_1 = require("../test-helpers");
|
|
8
9
|
const extraction_2 = __importDefault(require("./extraction"));
|
|
9
|
-
const mock_server_1 = require("../mock-server");
|
|
10
10
|
jest.setTimeout(15000);
|
|
11
11
|
describe('timeout-3b extraction', () => {
|
|
12
12
|
let mockServer;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { InputData } from '@devrev/typescript-sdk/dist/snap-ins';
|
|
2
2
|
import { Artifact } from '../uploader/uploader.interfaces';
|
|
3
3
|
import { ErrorRecord } from './common';
|
|
4
|
-
import { DonV2, LoaderReport, RateLimited } from './loading';
|
|
5
|
-
import { NormalizedAttachment } from '../repo/repo.interfaces';
|
|
6
4
|
import { AxiosResponse } from 'axios';
|
|
5
|
+
import { NormalizedAttachment } from '../repo/repo.interfaces';
|
|
7
6
|
import { WorkerAdapter } from '../workers/worker-adapter';
|
|
7
|
+
import { DonV2, LoaderReport, RateLimited } from './loading';
|
|
8
8
|
/**
|
|
9
9
|
* EventType is an enum that defines the different types of events that can be sent to the external extractor from ADaaS.
|
|
10
10
|
* The external extractor can use these events to know what to do next in the extraction process.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extraction.d.ts","sourceRoot":"","sources":["../../src/types/extraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAEjE,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC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CAAC;IACf,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,GACD,SAAS,CAAC;AAEd,MAAM,MAAM,uCAAuC,CACjD,KAAK,EACL,QAAQ,EACR,cAAc,IACZ,CAAC,EACH,WAAW,EACX,OAAO,EACP,SAAS,GACV,EAAE;IACD,WAAW,EAAE,KAAK,CAAC;IACnB,OAAO,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,KAAK,QAAQ,CAAC;AAEf,MAAM,MAAM,iCAAiC,GAAG,CAAC,EAC/C,UAAU,EACV,MAAM,GACP,EAAE;IACD,UAAU,EAAE,oBAAoB,CAAC;IACjC,MAAM,EAAE,yCAAyC,CAAC;CACnD,KAAK,OAAO,CAAC,2BAA2B,CAAC,CAAC;AAE3C,MAAM,MAAM,wCAAwC,CAAC,QAAQ,EAAE,cAAc,IAC3E,CAAC,EACC,kBAAkB,EAClB,OAAO,EACP,MAAM,GACP,EAAE;IACD,kBAAkB,EAAE,QAAQ,CAAC;IAC7B,OAAO,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IACvC,MAAM,EAAE,yCAAyC,CAAC;CACnD,KAAK,OAAO,CAAC,2BAA2B,CAAC,CAAC;AAE7C,MAAM,WAAW,kCAAkC,CACjD,cAAc,EACd,KAAK,EACL,QAAQ;IAER,OAAO,EAAE,uCAAuC,CAC9C,KAAK,EACL,QAAQ,EACR,cAAc,CACf,CAAC;IACF,QAAQ,EAAE,wCAAwC,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;CAC9E"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const extraction_1 = require("./extraction");
|
|
4
3
|
const test_helpers_1 = require("../tests/test-helpers");
|
|
4
|
+
const extraction_1 = require("./extraction");
|
|
5
5
|
// Test the EventContext interface and related extraction types
|
|
6
6
|
describe('ExtractionTypes', () => {
|
|
7
7
|
const baseEvent = (0, test_helpers_1.createEvent)({ eventType: extraction_1.EventType.ExtractionDataStart });
|
|
@@ -32,6 +32,7 @@ describe('ExtractionTypes', () => {
|
|
|
32
32
|
});
|
|
33
33
|
it('[edge] should handle null event context gracefully', () => {
|
|
34
34
|
const event = Object.assign({}, baseEvent);
|
|
35
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
35
36
|
event.payload.event_context = null;
|
|
36
37
|
expect(event.payload.event_context).toBeNull();
|
|
37
38
|
});
|
|
@@ -52,14 +53,14 @@ describe('ExtractionTypes', () => {
|
|
|
52
53
|
const eventWithTrue = (0, test_helpers_1.createEvent)({
|
|
53
54
|
eventType: extraction_1.EventType.ExtractionDataStart,
|
|
54
55
|
eventContextOverrides: {
|
|
55
|
-
reset_extract_from: true
|
|
56
|
-
}
|
|
56
|
+
reset_extract_from: true,
|
|
57
|
+
},
|
|
57
58
|
});
|
|
58
59
|
const eventWithFalse = (0, test_helpers_1.createEvent)({
|
|
59
60
|
eventType: extraction_1.EventType.ExtractionDataStart,
|
|
60
61
|
eventContextOverrides: {
|
|
61
|
-
reset_extract_from: false
|
|
62
|
-
}
|
|
62
|
+
reset_extract_from: false,
|
|
63
|
+
},
|
|
63
64
|
});
|
|
64
65
|
expect(eventWithTrue.payload.event_context.reset_extract_from).toBe(true);
|
|
65
66
|
expect(eventWithFalse.payload.event_context.reset_extract_from).toBe(false);
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { ErrorLevel, ErrorRecord,
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
1
|
+
export { AdapterUpdateParams, ErrorLevel, ErrorRecord, InitialDomainMapping, LogRecord, SyncMode, } from './common';
|
|
2
|
+
export { AirdropEvent, AirdropMessage, ConnectionData, DomainObjectState, EventContextIn, EventContextOut, EventData, EventType, ExternalProcessAttachmentFunction, ExternalSyncUnit, ExternalSystemAttachmentIteratorFunction, ExternalSystemAttachmentReducerFunction, ExternalSystemAttachmentStreamingFunction, ExternalSystemAttachmentStreamingParams, ExternalSystemAttachmentStreamingResponse, ExtractionMode, ExtractorEvent, ExtractorEventType, ProcessAttachmentReturnType, } from './extraction';
|
|
3
|
+
export { ExternalSystemAttachment, ExternalSystemItem, ExternalSystemItemLoadingParams, ExternalSystemItemLoadingResponse, LoaderEventType, } from './loading';
|
|
4
|
+
export { NormalizedAttachment, NormalizedItem, RepoInterface, } from '../repo/repo.interfaces';
|
|
5
5
|
export { AdapterState } from '../state/state.interfaces';
|
|
6
|
-
export { Artifact, ArtifactsPrepareResponse,
|
|
7
|
-
export type {
|
|
6
|
+
export { Artifact, ArtifactsPrepareResponse, SsorAttachment, StreamAttachmentsResponse, StreamResponse, UploadResponse, } from '../uploader/uploader.interfaces';
|
|
7
|
+
export type { MappersCreateParams, MappersGetByExternalIdParams, MappersGetByTargetIdParams, MappersUpdateParams, } from '../mappers/mappers.interface';
|
|
8
8
|
export { SyncMapperRecordStatus, SyncMapperRecordTargetType, } from '../mappers/mappers.interface';
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,WAAW,EACX,SAAS,EACT,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,mBAAmB,EACnB,UAAU,EACV,WAAW,EACX,oBAAoB,EACpB,SAAS,EACT,QAAQ,GACT,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,SAAS,EACT,SAAS,EACT,iCAAiC,EACjC,gBAAgB,EAChB,wCAAwC,EACxC,uCAAuC,EACvC,yCAAyC,EACzC,uCAAuC,EACvC,yCAAyC,EACzC,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,2BAA2B,GAC5B,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,+BAA+B,EAC/B,iCAAiC,EACjC,eAAe,GAChB,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,aAAa,GACd,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzD,OAAO,EACL,QAAQ,EACR,wBAAwB,EACxB,cAAc,EACd,yBAAyB,EACzB,cAAc,EACd,cAAc,GACf,MAAM,iCAAiC,CAAC;AAGzC,YAAY,EACV,mBAAmB,EACnB,4BAA4B,EAC5B,0BAA0B,EAC1B,mBAAmB,GACpB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,8BAA8B,CAAC"}
|
package/dist/types/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SyncMapperRecordTargetType = exports.SyncMapperRecordStatus = exports.LoaderEventType = exports.
|
|
3
|
+
exports.SyncMapperRecordTargetType = exports.SyncMapperRecordStatus = exports.LoaderEventType = exports.ExtractorEventType = exports.ExtractionMode = exports.EventType = exports.SyncMode = exports.ErrorLevel = void 0;
|
|
4
4
|
// Common
|
|
5
5
|
var common_1 = require("./common");
|
|
6
6
|
Object.defineProperty(exports, "ErrorLevel", { enumerable: true, get: function () { return common_1.ErrorLevel; } });
|
|
@@ -8,8 +8,8 @@ Object.defineProperty(exports, "SyncMode", { enumerable: true, get: function ()
|
|
|
8
8
|
// Extraction
|
|
9
9
|
var extraction_1 = require("./extraction");
|
|
10
10
|
Object.defineProperty(exports, "EventType", { enumerable: true, get: function () { return extraction_1.EventType; } });
|
|
11
|
-
Object.defineProperty(exports, "ExtractorEventType", { enumerable: true, get: function () { return extraction_1.ExtractorEventType; } });
|
|
12
11
|
Object.defineProperty(exports, "ExtractionMode", { enumerable: true, get: function () { return extraction_1.ExtractionMode; } });
|
|
12
|
+
Object.defineProperty(exports, "ExtractorEventType", { enumerable: true, get: function () { return extraction_1.ExtractorEventType; } });
|
|
13
13
|
// Loading
|
|
14
14
|
var loading_1 = require("./loading");
|
|
15
15
|
Object.defineProperty(exports, "LoaderEventType", { enumerable: true, get: function () { return loading_1.LoaderEventType; } });
|
package/dist/types/loading.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loading.d.ts","sourceRoot":"","sources":["../../src/types/loading.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"loading.d.ts","sourceRoot":"","sources":["../../src/types/loading.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,wBAAwB;IACvC,YAAY,EAAE,KAAK,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,KAAK,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,S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Aa,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,oBAAY,eAAe;IACzB,mBAAmB,0BAA0B;IAC7C,gBAAgB,yBAAyB;IACzC,eAAe,sBAAsB;IACrC,gBAAgB,uBAAuB;IACvC,yBAAyB,gCAAgC;IACzD,wBAAwB,+BAA+B;IACvD,qBAAqB,4BAA4B;IACjD,sBAAsB,6BAA6B;IACnD,uBAAuB,+BAA+B;IACtD,wBAAwB,gCAAgC;IACxD,iCAAiC,0CAA0C;IAC3E,kCAAkC,2CAA2C;IAC7E,gBAAgB,uBAAuB;CACxC"}
|
package/dist/types/workers.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Worker } from 'worker_threads';
|
|
2
2
|
import { State } from '../state/state';
|
|
3
3
|
import { WorkerAdapter } from '../workers/worker-adapter';
|
|
4
|
-
import {
|
|
4
|
+
import { AirdropEvent, ExtractorEventType } from './extraction';
|
|
5
5
|
import { LoaderEventType } from './loading';
|
|
6
6
|
import { InitialDomainMapping } from './common';
|
|
7
7
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workers.d.ts","sourceRoot":"","sources":["../../src/types/workers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"workers.d.ts","sourceRoot":"","sources":["../../src/types/workers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE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C,cAAc,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtE,SAAS,EAAE,CAAC,MAAM,EAAE,oBAAoB,CAAC,cAAc,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5E;AAED;;GAEG;AACH,oBAAY,WAAW;IACrB,aAAa,YAAY;IACzB,YAAY,WAAW;IACvB,WAAW,UAAU;IACrB,UAAU,SAAS;CACpB;AAED;;GAEG;AACH,oBAAY,oBAAoB;IAC9B,oBAAoB,SAAS;IAC7B,iBAAiB,SAAS;IAC1B,gBAAgB,QAAQ;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,oBAAoB,CAAC,oBAAoB,CAAC;IACnD,OAAO,EAAE;QACP,SAAS,EAAE,kBAAkB,GAAG,eAAe,CAAC;KACjD,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,oBAAoB,CAAC,iBAAiB,CAAC;CACjD;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,oBAAoB,GAAG,iBAAiB,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,UAAU,CAAC,cAAc;IACxC,KAAK,EAAE,YAAY,CAAC;IACpB,YAAY,EAAE,cAAc,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,OAAO,CAAC,EAAE,oBAAoB,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,YAAY,CAAC;IACpB,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NormalizedAttachment } from '../repo/repo.interfaces';
|
|
2
|
-
import { UploadResponse, UploaderFactoryInterface, ArtifactToUpload } from './uploader.interfaces';
|
|
3
2
|
import { AxiosResponse } from 'axios';
|
|
3
|
+
import { ArtifactToUpload, UploadResponse, UploaderFactoryInterface } from './uploader.interfaces';
|
|
4
4
|
export declare class Uploader {
|
|
5
5
|
private event;
|
|
6
6
|
private isLocalDevelopment?;
|
|
@@ -21,7 +21,7 @@ export declare class Uploader {
|
|
|
21
21
|
upload(itemType: string, fetchedObjects: object[] | object): Promise<UploadResponse>;
|
|
22
22
|
getArtifactUploadUrl(filename: string, fileType: string): Promise<ArtifactToUpload | void>;
|
|
23
23
|
uploadArtifact(artifact: ArtifactToUpload, file: Buffer): Promise<AxiosResponse | void>;
|
|
24
|
-
streamArtifact(artifact: ArtifactToUpload, fileStream:
|
|
24
|
+
streamArtifact(artifact: ArtifactToUpload, fileStream: AxiosResponse): Promise<AxiosResponse | void>;
|
|
25
25
|
confirmArtifactUpload(artifactId: string): Promise<AxiosResponse | void>;
|
|
26
26
|
/**
|
|
27
27
|
* Destroys a stream to prevent resource leaks.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploader.d.ts","sourceRoot":"","sources":["../../src/uploader/uploader.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAG/D,OAAO,
|
|
1
|
+
{"version":3,"file":"uploader.d.ts","sourceRoot":"","sources":["../../src/uploader/uploader.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAG/D,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,EAEL,gBAAgB,EAChB,cAAc,EACd,wBAAwB,EACzB,MAAM,uBAAuB,CAAC;AAE/B,qBAAa,QAAQ;IACnB,OAAO,CAAC,KAAK,CAAe;IAC5B,OAAO,CAAC,kBAAkB,CAAC,CAAU;IACrC,OAAO,CAAC,iBAAiB,CAAS;IAClC,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,cAAc,CAAyB;gBAEnC,EAAE,KAAK,EAA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AdapterOptions } from '../types/workers';
|
|
3
1
|
import { ErrorRecord } from '../types/common';
|
|
2
|
+
import { AirdropEvent } from '../types/extraction';
|
|
4
3
|
import { ExternalSystemItem, StatsFileObject } from '../types/loading';
|
|
4
|
+
import { WorkerAdapterOptions } from '../types/workers';
|
|
5
5
|
export interface UploaderFactoryInterface {
|
|
6
6
|
event: AirdropEvent;
|
|
7
7
|
options?: WorkerAdapterOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploader.interfaces.d.ts","sourceRoot":"","sources":["../../src/uploader/uploader.interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"uploader.interfaces.d.ts","sourceRoot":"","sources":["../../src/uploader/uploader.interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,CAAC,EAAE,oBAAoB,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE;QACT,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;CACL;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE;QACT,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;CACL;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;IACnC,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE;QACF,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,SAAS,EAAE;QACT,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,QAAQ,CAAC,EAAE;QACT,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,SAAS,CAAC,EAAE,eAAe,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,uBAAuB;IACtC,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,eAAe,CAAC,EAAE,kBAAkB,EAAE,CAAC;CACxC"}
|
|
@@ -37,11 +37,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.Uploader = void 0;
|
|
40
|
+
const form_data_1 = __importDefault(require("form-data"));
|
|
40
41
|
const fs_1 = __importStar(require("fs"));
|
|
41
|
-
const axios_client_internal_1 = require("../http/axios-client-internal");
|
|
42
|
-
const zlib_1 = __importDefault(require("zlib"));
|
|
43
42
|
const js_jsonl_1 = require("js-jsonl");
|
|
44
|
-
const
|
|
43
|
+
const zlib_1 = __importDefault(require("zlib"));
|
|
44
|
+
const axios_client_internal_1 = require("../http/axios-client-internal");
|
|
45
45
|
const constants_1 = require("../common/constants");
|
|
46
46
|
const helpers_1 = require("../common/helpers");
|
|
47
47
|
const logger_1 = require("../logger/logger");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const axios_client_internal_1 = require("../http/axios-client-internal");
|
|
3
4
|
const test_helpers_1 = require("../tests/test-helpers");
|
|
4
5
|
const types_1 = require("../types");
|
|
5
6
|
const uploader_1 = require("./uploader");
|
|
6
|
-
const axios_client_internal_1 = require("../http/axios-client-internal");
|
|
7
7
|
jest.mock('../http/axios-client-internal', () => {
|
|
8
8
|
const originalModule = jest.requireActual('../http/axios-client-internal');
|
|
9
9
|
return Object.assign(Object.assign({}, originalModule), { axiosClient: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-worker.d.ts","sourceRoot":"","sources":["../../src/workers/create-worker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,MAAM,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"create-worker.d.ts","sourceRoot":"","sources":["../../src/workers/create-worker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG3D,OAAO,EAAE,UAAU,EAAe,MAAM,kBAAkB,CAAC;AAE3D,iBAAe,YAAY,CAAC,cAAc,EACxC,UAAU,EAAE,UAAU,CAAC,cAAc,CAAC,GACrC,OAAO,CAAC,MAAM,CAAC,CA6BjB;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createWorker = createWorker;
|
|
4
4
|
const node_worker_threads_1 = require("node:worker_threads");
|
|
5
|
-
const workers_1 = require("../types/workers");
|
|
6
5
|
const logger_1 = require("../logger/logger");
|
|
6
|
+
const workers_1 = require("../types/workers");
|
|
7
7
|
async function createWorker(workerData) {
|
|
8
8
|
return new Promise((resolve, reject) => {
|
|
9
9
|
if (node_worker_threads_1.isMainThread) {
|