@golemio/core 3.1.1 → 3.2.0-dev.2585439595
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/helpers/data-access/azure/AzureBearerTokenProvider.d.ts +9 -0
- package/dist/helpers/data-access/azure/AzureBearerTokenProvider.js +27 -0
- package/dist/helpers/data-access/azure/AzureBearerTokenProvider.js.map +1 -0
- package/dist/helpers/data-access/azure/buildBearerTokenProvider.d.ts +12 -0
- package/dist/helpers/data-access/azure/buildBearerTokenProvider.js +30 -0
- package/dist/helpers/data-access/azure/buildBearerTokenProvider.js.map +1 -0
- package/dist/helpers/data-access/azure/index.d.ts +5 -0
- package/dist/helpers/data-access/azure/index.js +10 -0
- package/dist/helpers/data-access/azure/index.js.map +1 -0
- package/dist/helpers/data-access/opensearch/IOpenSearchConnector.d.ts +8 -0
- package/dist/helpers/data-access/opensearch/IOpenSearchConnector.js +3 -0
- package/dist/helpers/data-access/opensearch/IOpenSearchConnector.js.map +1 -0
- package/dist/helpers/data-access/opensearch/IOpenSearchInfo.d.ts +6 -0
- package/dist/helpers/data-access/opensearch/IOpenSearchInfo.js +3 -0
- package/dist/helpers/data-access/opensearch/IOpenSearchInfo.js.map +1 -0
- package/dist/helpers/data-access/opensearch/ISyncableIndex.d.ts +9 -0
- package/dist/helpers/data-access/opensearch/ISyncableIndex.js +3 -0
- package/dist/helpers/data-access/opensearch/ISyncableIndex.js.map +1 -0
- package/dist/helpers/data-access/opensearch/OpenSearchConnector.d.ts +21 -0
- package/dist/helpers/data-access/opensearch/OpenSearchConnector.js +113 -0
- package/dist/helpers/data-access/opensearch/OpenSearchConnector.js.map +1 -0
- package/dist/helpers/data-access/opensearch/OpenSearchService.d.ts +24 -0
- package/dist/helpers/data-access/opensearch/OpenSearchService.js +162 -0
- package/dist/helpers/data-access/opensearch/OpenSearchService.js.map +1 -0
- package/dist/helpers/data-access/opensearch/OpenSearchSyncOrchestrator.d.ts +14 -0
- package/dist/helpers/data-access/opensearch/OpenSearchSyncOrchestrator.js +78 -0
- package/dist/helpers/data-access/opensearch/OpenSearchSyncOrchestrator.js.map +1 -0
- package/dist/helpers/data-access/opensearch/czechAnalyzer.d.ts +6 -0
- package/dist/helpers/data-access/opensearch/czechAnalyzer.js +30 -0
- package/dist/helpers/data-access/opensearch/czechAnalyzer.js.map +1 -0
- package/dist/helpers/data-access/opensearch/index.d.ts +8 -0
- package/dist/helpers/data-access/opensearch/index.js +14 -0
- package/dist/helpers/data-access/opensearch/index.js.map +1 -0
- package/dist/helpers/data-access/postgres/DatabaseConnector.js +10 -3
- package/dist/helpers/data-access/postgres/DatabaseConnector.js.map +1 -1
- package/dist/helpers/data-access/postgres/IDatabaseInfo.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/input-gateway/connectors/AMQPConnector.d.ts +1 -1
- package/dist/input-gateway/helpers/SaveRawDataMiddleware.d.ts +1 -1
- package/dist/integration-engine/connectors/AMQPConnector.d.ts +1 -1
- package/dist/integration-engine/data-access/RawDataStorage.d.ts +1 -1
- package/dist/integration-engine/datasources/BatchWritable.d.ts +16 -0
- package/dist/integration-engine/datasources/BatchWritable.js +42 -0
- package/dist/integration-engine/datasources/BatchWritable.js.map +1 -0
- package/dist/integration-engine/datasources/DataSourceStreamedPipeline.d.ts +25 -0
- package/dist/integration-engine/datasources/DataSourceStreamedPipeline.js +72 -0
- package/dist/integration-engine/datasources/DataSourceStreamedPipeline.js.map +1 -0
- package/dist/integration-engine/datasources/datatype-strategy/JSONStreamTransformer.d.ts +5 -0
- package/dist/integration-engine/datasources/datatype-strategy/JSONStreamTransformer.js +12 -0
- package/dist/integration-engine/datasources/datatype-strategy/JSONStreamTransformer.js.map +1 -0
- package/dist/integration-engine/datasources/index.d.ts +5 -0
- package/dist/integration-engine/datasources/index.js +5 -0
- package/dist/integration-engine/datasources/index.js.map +1 -1
- package/dist/integration-engine/datasources/protocol-strategy/HTTPRequestProtocolStrategyStreamed.d.ts +5 -1
- package/dist/integration-engine/datasources/protocol-strategy/HTTPRequestProtocolStrategyStreamed.js +30 -1
- package/dist/integration-engine/datasources/protocol-strategy/HTTPRequestProtocolStrategyStreamed.js.map +1 -1
- package/dist/integration-engine/datasources/protocol-strategy/IStreamingProtocolStrategy.d.ts +5 -0
- package/dist/integration-engine/datasources/protocol-strategy/IStreamingProtocolStrategy.js +3 -0
- package/dist/integration-engine/datasources/protocol-strategy/IStreamingProtocolStrategy.js.map +1 -0
- package/dist/integration-engine/datasources/protocol-strategy/ProtocolStrategy.d.ts +3 -0
- package/dist/integration-engine/datasources/protocol-strategy/ProtocolStrategy.js +42 -3
- package/dist/integration-engine/datasources/protocol-strategy/ProtocolStrategy.js.map +1 -1
- package/dist/integration-engine/helpers/GeocodeApi.d.ts +1 -1
- package/dist/integration-engine/ioc/Di.js +1 -0
- package/dist/integration-engine/ioc/Di.js.map +1 -1
- package/dist/output-gateway/ioc/Di.js +1 -0
- package/dist/output-gateway/ioc/Di.js.map +1 -1
- package/dist/output-gateway/models/interfaces/IGeoJsonModel.d.ts +1 -1
- package/dist/shared/opensearch.d.ts +1 -0
- package/dist/shared/opensearch.js +18 -0
- package/dist/shared/opensearch.js.map +1 -0
- package/package.json +16 -6
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.czechText = exports.defaultIndexSettings = exports.czechAnalysis = void 0;
|
|
4
|
+
exports.czechAnalysis = {
|
|
5
|
+
analysis: {
|
|
6
|
+
filter: {
|
|
7
|
+
czech_stop: { type: "stop", stopwords: "_czech_" },
|
|
8
|
+
czech_stem: { type: "stemmer", language: "czech" },
|
|
9
|
+
czech_ascii: { type: "asciifolding", preserve_original: true },
|
|
10
|
+
},
|
|
11
|
+
analyzer: {
|
|
12
|
+
czech_analyzer: {
|
|
13
|
+
type: "custom",
|
|
14
|
+
tokenizer: "standard",
|
|
15
|
+
// pořadí záleží: stemming musí být před asciifolding
|
|
16
|
+
filter: ["lowercase", "czech_stop", "czech_stem", "czech_ascii"],
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
exports.defaultIndexSettings = {
|
|
22
|
+
number_of_shards: 1,
|
|
23
|
+
...exports.czechAnalysis,
|
|
24
|
+
};
|
|
25
|
+
const czechText = () => ({
|
|
26
|
+
type: "text",
|
|
27
|
+
analyzer: "czech_analyzer",
|
|
28
|
+
});
|
|
29
|
+
exports.czechText = czechText;
|
|
30
|
+
//# sourceMappingURL=czechAnalyzer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"czechAnalyzer.js","sourceRoot":"","sources":["../../../../src/helpers/data-access/opensearch/czechAnalyzer.ts"],"names":[],"mappings":";;;AAEa,QAAA,aAAa,GAA6D;IACnF,QAAQ,EAAE;QACN,MAAM,EAAE;YACJ,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE;YAClD,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE;YAClD,WAAW,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,iBAAiB,EAAE,IAAI,EAAE;SACjE;QACD,QAAQ,EAAE;YACN,cAAc,EAAE;gBACZ,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,UAAU;gBACrB,qDAAqD;gBACrD,MAAM,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,CAAC;aACnE;SACJ;KACJ;CACJ,CAAC;AAEW,QAAA,oBAAoB,GAAuC;IACpE,gBAAgB,EAAE,CAAC;IACnB,GAAG,qBAAa;CACnB,CAAC;AAEK,MAAM,SAAS,GAAG,GAAsC,EAAE,CAAC,CAAC;IAC/D,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,gBAAgB;CAC7B,CAAC,CAAC;AAHU,QAAA,SAAS,aAGnB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { czechAnalysis, defaultIndexSettings, czechText } from "./czechAnalyzer";
|
|
2
|
+
export { OpenSearchConnector } from "./OpenSearchConnector";
|
|
3
|
+
export type { IOpenSearchConnector } from "./IOpenSearchConnector";
|
|
4
|
+
export { OpenSearchService } from "./OpenSearchService";
|
|
5
|
+
export type { IOpenSearchServiceConfig, IndexCount, HealthStatus } from "./OpenSearchService";
|
|
6
|
+
export type { IOpenSearchInfo } from "./IOpenSearchInfo";
|
|
7
|
+
export { OpenSearchSyncOrchestrator } from "./OpenSearchSyncOrchestrator";
|
|
8
|
+
export type { ISyncableIndex, ISyncableDoc } from "./ISyncableIndex";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OpenSearchSyncOrchestrator = exports.OpenSearchService = exports.OpenSearchConnector = exports.czechText = exports.defaultIndexSettings = exports.czechAnalysis = void 0;
|
|
4
|
+
var czechAnalyzer_1 = require("./czechAnalyzer");
|
|
5
|
+
Object.defineProperty(exports, "czechAnalysis", { enumerable: true, get: function () { return czechAnalyzer_1.czechAnalysis; } });
|
|
6
|
+
Object.defineProperty(exports, "defaultIndexSettings", { enumerable: true, get: function () { return czechAnalyzer_1.defaultIndexSettings; } });
|
|
7
|
+
Object.defineProperty(exports, "czechText", { enumerable: true, get: function () { return czechAnalyzer_1.czechText; } });
|
|
8
|
+
var OpenSearchConnector_1 = require("./OpenSearchConnector");
|
|
9
|
+
Object.defineProperty(exports, "OpenSearchConnector", { enumerable: true, get: function () { return OpenSearchConnector_1.OpenSearchConnector; } });
|
|
10
|
+
var OpenSearchService_1 = require("./OpenSearchService");
|
|
11
|
+
Object.defineProperty(exports, "OpenSearchService", { enumerable: true, get: function () { return OpenSearchService_1.OpenSearchService; } });
|
|
12
|
+
var OpenSearchSyncOrchestrator_1 = require("./OpenSearchSyncOrchestrator");
|
|
13
|
+
Object.defineProperty(exports, "OpenSearchSyncOrchestrator", { enumerable: true, get: function () { return OpenSearchSyncOrchestrator_1.OpenSearchSyncOrchestrator; } });
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/helpers/data-access/opensearch/index.ts"],"names":[],"mappings":";;;AAAA,iDAAiF;AAAxE,8GAAA,aAAa,OAAA;AAAE,qHAAA,oBAAoB,OAAA;AAAE,0GAAA,SAAS,OAAA;AACvD,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAE5B,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAG1B,2EAA0E;AAAjE,wIAAA,0BAA0B,OAAA"}
|
|
@@ -59,10 +59,17 @@ class DatabaseConnector {
|
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
61
|
getOptions(additionalOptions) {
|
|
62
|
+
const dialectOptions = {
|
|
63
|
+
application_name: `${this.databaseInfo.applicationName} (${os_1.default.hostname()})`,
|
|
64
|
+
};
|
|
65
|
+
if (this.databaseInfo.sslCaBase64) {
|
|
66
|
+
dialectOptions.ssl = {
|
|
67
|
+
ca: Buffer.from(this.databaseInfo.sslCaBase64, "base64").toString("utf-8"),
|
|
68
|
+
rejectUnauthorized: true,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
62
71
|
return {
|
|
63
|
-
dialectOptions
|
|
64
|
-
application_name: `${this.databaseInfo.applicationName} (${os_1.default.hostname()})`,
|
|
65
|
-
},
|
|
72
|
+
dialectOptions,
|
|
66
73
|
logging: this.log.silly,
|
|
67
74
|
pool: {
|
|
68
75
|
acquire: 60000,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatabaseConnector.js","sourceRoot":"","sources":["../../../../src/helpers/data-access/postgres/DatabaseConnector.ts"],"names":[],"mappings":";;;;;;AACA,4CAA6C;AAC7C,4CAAoB;AACpB,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AC;QAC3B,CAAC,CAAC;QAEK,gBAAW,GAAG,KAAK,IAAsB,EAAE;YAC9C,IAAI;gBACA,MAAM,IAAI,CAAC,UAAW,CAAC,YAAY,EAAE,CAAC;gBAEtC,OAAO,IAAI,CAAC;aACf;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,oDAAoD,GAAG,CAAC,OAAO,IAAI,CAAC,CAAC;gBACnF,OAAO,KAAK,CAAC;aAChB;QACL,CAAC,CAAC;QAEK,eAAU,GAAG,KAAK,IAAmB,EAAE;YAC1C,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC;YAE9C,IAAI,IAAI,CAAC,UAAU,EAAE;gBACjB,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;aACjC;QACL,CAAC,CAAC;QAEK,YAAO,GAAG,KAAK,IAAmB,EAAE;YACvC,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;QAC5B,CAAC,CAAC;IAvDC,CAAC;IAyDI,UAAU,CAAC,iBAA2B;QAC1C,
|
|
1
|
+
{"version":3,"file":"DatabaseConnector.js","sourceRoot":"","sources":["../../../../src/helpers/data-access/postgres/DatabaseConnector.ts"],"names":[],"mappings":";;;;;;AACA,4CAA6C;AAC7C,4CAAoB;AACpB,yCAA+C;AAK/C,MAAa,iBAAiB;IAG1B,YACqB,YAA2B,EAC3B,GAAY,EACZ,gBAA0B;QAF1B,iBAAY,GAAZ,YAAY,CAAe;QAC3B,QAAG,GAAH,GAAG,CAAS;QACZ,qBAAgB,GAAhB,gBAAgB,CAAU;QAGxC,YAAO,GAAG,KAAK,EAAE,iBAA2B,EAAsB,EAAE;YACvE,IAAI;gBACA,IAAI,IAAI,CAAC,UAAU,EAAE;oBACjB,OAAO,IAAI,CAAC,UAAU,CAAC;iBAC1B;gBAED,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,gBAAgB,EAAE;oBACrC,MAAM,IAAI,mB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;CACJ;AArGD,8CAqGC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,3 +2,5 @@ export * as InputGateway from "./input-gateway/index";
|
|
|
2
2
|
export * as IntegrationEngine from "./integration-engine/index";
|
|
3
3
|
export * as OutputGateway from "./output-gateway/index";
|
|
4
4
|
export * as SchemaDefinitions from "./schema-definitions/index";
|
|
5
|
+
export * as AzureHelpers from "./helpers/data-access/azure/index";
|
|
6
|
+
export * as OpenSearchHelpers from "./helpers/data-access/opensearch/index";
|
package/dist/index.js
CHANGED
|
@@ -23,10 +23,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.SchemaDefinitions = exports.OutputGateway = exports.IntegrationEngine = exports.InputGateway = void 0;
|
|
26
|
+
exports.OpenSearchHelpers = exports.AzureHelpers = exports.SchemaDefinitions = exports.OutputGateway = exports.IntegrationEngine = exports.InputGateway = void 0;
|
|
27
27
|
// Library exports
|
|
28
28
|
exports.InputGateway = __importStar(require("./input-gateway/index"));
|
|
29
29
|
exports.IntegrationEngine = __importStar(require("./integration-engine/index"));
|
|
30
30
|
exports.OutputGateway = __importStar(require("./output-gateway/index"));
|
|
31
31
|
exports.SchemaDefinitions = __importStar(require("./schema-definitions/index"));
|
|
32
|
+
exports.AzureHelpers = __importStar(require("./helpers/data-access/azure/index"));
|
|
33
|
+
exports.OpenSearchHelpers = __importStar(require("./helpers/data-access/opensearch/index"));
|
|
32
34
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBAAkB;AAClB,sEAA0C;AAC1C,gFAA+C;AAC/C,wEAA2C;AAC3C,gFAAgD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBAAkB;AAClB,sEAA0C;AAC1C,gFAA+C;AAC/C,wEAA2C;AAC3C,gFAAgD;AAChD,kFAAiE;AACjE,4FAA2E"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ILogger } from "../../helpers";
|
|
2
|
-
import { IConfiguration } from "../config";
|
|
2
|
+
import type { IConfiguration } from "../config";
|
|
3
3
|
import amqplib from "amqplib";
|
|
4
4
|
import { Disposable } from "tsyringe";
|
|
5
5
|
import IQueueConnector from "../../helpers/connector/interfaces/IQueueConnector";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ILogger } from "../../helpers";
|
|
2
2
|
import { ISimpleConfig } from "../../helpers/configuration/ISimpleConfig";
|
|
3
3
|
import { AbstractStorageService } from "../../helpers/data-access/storage";
|
|
4
|
-
import { IConfiguration } from "../config";
|
|
4
|
+
import type { IConfiguration } from "../config";
|
|
5
5
|
import { NextFunction, Request, Response } from "express";
|
|
6
6
|
export declare class SaveRawDataMiddleware {
|
|
7
7
|
private readonly log;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ILogger } from "../../helpers";
|
|
2
2
|
import IQueueConnector from "../../helpers/connector/interfaces/IQueueConnector";
|
|
3
|
-
import { IConfiguration } from "../config";
|
|
3
|
+
import type { IConfiguration } from "../config";
|
|
4
4
|
import amqplib from "amqplib";
|
|
5
5
|
import { Disposable } from "tsyringe";
|
|
6
6
|
export declare class AMQPConnector implements IQueueConnector, Disposable {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ILogger } from "../../helpers/logger/LoggerProvider";
|
|
2
2
|
import { ISimpleConfig } from "../../helpers/configuration/ISimpleConfig";
|
|
3
3
|
import { AbstractStorageService } from "../../helpers/data-access/storage";
|
|
4
|
-
import { IConfiguration } from "../config/abstract";
|
|
4
|
+
import type { IConfiguration } from "../config/abstract";
|
|
5
5
|
export default class RawDataStorage {
|
|
6
6
|
private storageService;
|
|
7
7
|
private readonly log;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import { Writable } from "node:stream";
|
|
4
|
+
export interface BatchWritableOptions<T> {
|
|
5
|
+
batchSize: number;
|
|
6
|
+
onFlush: (batch: T[]) => Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
export declare class BatchWritable<T> extends Writable {
|
|
9
|
+
private batch;
|
|
10
|
+
private readonly batchSize;
|
|
11
|
+
private readonly onFlush;
|
|
12
|
+
constructor(options: BatchWritableOptions<T>);
|
|
13
|
+
_write(item: T, _encoding: BufferEncoding, callback: (err?: Error | null) => void): void;
|
|
14
|
+
_final(callback: (err?: Error | null) => void): void;
|
|
15
|
+
private flush;
|
|
16
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BatchWritable = void 0;
|
|
4
|
+
const node_stream_1 = require("node:stream");
|
|
5
|
+
class BatchWritable extends node_stream_1.Writable {
|
|
6
|
+
constructor(options) {
|
|
7
|
+
super({
|
|
8
|
+
objectMode: true,
|
|
9
|
+
});
|
|
10
|
+
this.batch = [];
|
|
11
|
+
this.batchSize = options.batchSize;
|
|
12
|
+
this.onFlush = options.onFlush;
|
|
13
|
+
}
|
|
14
|
+
_write(item, _encoding, callback) {
|
|
15
|
+
this.batch.push(item);
|
|
16
|
+
if (this.batch.length < this.batchSize) {
|
|
17
|
+
callback();
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
this.flush(callback);
|
|
21
|
+
}
|
|
22
|
+
_final(callback) {
|
|
23
|
+
if (this.batch.length === 0) {
|
|
24
|
+
callback();
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
this.flush(callback);
|
|
28
|
+
}
|
|
29
|
+
async flush(callback) {
|
|
30
|
+
const fullBatch = this.batch;
|
|
31
|
+
this.batch = [];
|
|
32
|
+
try {
|
|
33
|
+
await this.onFlush(fullBatch);
|
|
34
|
+
callback();
|
|
35
|
+
}
|
|
36
|
+
catch (err) {
|
|
37
|
+
callback(err instanceof Error ? err : new Error(String(err)));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.BatchWritable = BatchWritable;
|
|
42
|
+
//# sourceMappingURL=BatchWritable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BatchWritable.js","sourceRoot":"","sources":["../../../src/integration-engine/datasources/BatchWritable.ts"],"names":[],"mappings":";;;AAAA,6CAAuC;AAOvC,MAAa,aAAiB,SAAQ,sBAAQ;IAK1C,YAAY,OAAgC;QACxC,KAAK,CAAC;YACF,UAAU,EAAE,IAAI;SACnB,CAAC,CAAC;QAPC,UAAK,GAAQ,EAAE,CAAC;QAQpB,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IACnC,CAAC;IAEe,MAAM,CAAC,IAAO,EAAE,SAAyB,EAAE,QAAsC;QAC7F,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtB,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE;YACpC,QAAQ,EAAE,CAAC;YACX,OAAO;SACV;QACD,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACzB,CAAC;IAEe,MAAM,CAAC,QAAsC;QACzD,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;YACzB,QAAQ,EAAE,CAAC;YACX,OAAO;SACV;QACD,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACzB,CAAC;IAEO,KAAK,CAAC,KAAK,CAAC,QAAsC;QACtD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI;YACA,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YAC9B,QAAQ,EAAE,CAAC;SACd;QAAC,OAAO,GAAG,EAAE;YACV,QAAQ,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;SACjE;IACL,CAAC;CACJ;AAxCD,sCAwCC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { IDataSource } from "./IDataSource";
|
|
3
|
+
import { IValidator } from "@golemio/validator";
|
|
4
|
+
import { Transform } from "node:stream";
|
|
5
|
+
import { DataSource } from "./DataSource";
|
|
6
|
+
import { IStreamingProtocolStrategy } from "./protocol-strategy/IStreamingProtocolStrategy";
|
|
7
|
+
export interface DataSourceStreamedPipelineOptions {
|
|
8
|
+
validator?: IValidator | null;
|
|
9
|
+
batchSize?: number;
|
|
10
|
+
timeoutMs?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare class DataSourceStreamedPipeline<T extends object = any> extends DataSource implements IDataSource {
|
|
13
|
+
static readonly DEFAULT_BATCH_SIZE: number;
|
|
14
|
+
static readonly DEFAULT_PIPELINE_TIMEOUT_MS: number;
|
|
15
|
+
private readonly streamTransformer;
|
|
16
|
+
private readonly batchSize;
|
|
17
|
+
private readonly timeoutMs;
|
|
18
|
+
private dataProcessor;
|
|
19
|
+
constructor(name: string, streamingStrategy: IStreamingProtocolStrategy, streamTransformer: Transform, options?: DataSourceStreamedPipelineOptions);
|
|
20
|
+
private get streamingStrategy();
|
|
21
|
+
setDataProcessor(fn: (batch: T[]) => Promise<void>): this;
|
|
22
|
+
proceed(): Promise<void>;
|
|
23
|
+
private createBatchWriter;
|
|
24
|
+
private validateAndProcess;
|
|
25
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataSourceStreamedPipeline = void 0;
|
|
4
|
+
const logger_1 = require("../../helpers/logger");
|
|
5
|
+
const errors_1 = require("@golemio/errors");
|
|
6
|
+
const promises_1 = require("node:stream/promises");
|
|
7
|
+
const BatchWritable_1 = require("./BatchWritable");
|
|
8
|
+
const DataSource_1 = require("./DataSource");
|
|
9
|
+
class DataSourceStreamedPipeline extends DataSource_1.DataSource {
|
|
10
|
+
constructor(name, streamingStrategy, streamTransformer, options = {}) {
|
|
11
|
+
super(name, streamingStrategy, null, options.validator ?? null);
|
|
12
|
+
this.dataProcessor = null;
|
|
13
|
+
this.streamTransformer = streamTransformer;
|
|
14
|
+
this.batchSize = options.batchSize ?? DataSourceStreamedPipeline.DEFAULT_BATCH_SIZE;
|
|
15
|
+
this.timeoutMs = options.timeoutMs ?? DataSourceStreamedPipeline.DEFAULT_PIPELINE_TIMEOUT_MS;
|
|
16
|
+
}
|
|
17
|
+
get streamingStrategy() {
|
|
18
|
+
return this.protocolStrategy;
|
|
19
|
+
}
|
|
20
|
+
setDataProcessor(fn) {
|
|
21
|
+
this.dataProcessor = fn;
|
|
22
|
+
return this;
|
|
23
|
+
}
|
|
24
|
+
async proceed() {
|
|
25
|
+
if (!this.dataProcessor) {
|
|
26
|
+
throw new errors_1.GeneralError("No data processor registered. Call setDataProcessor() before proceed().", this.name);
|
|
27
|
+
}
|
|
28
|
+
const bodyStream = await this.streamingStrategy.getBodyStream();
|
|
29
|
+
let totalRecords = 0;
|
|
30
|
+
const batchWriter = this.createBatchWriter((processedCount) => {
|
|
31
|
+
totalRecords += processedCount;
|
|
32
|
+
});
|
|
33
|
+
try {
|
|
34
|
+
await (0, promises_1.pipeline)(bodyStream, this.streamTransformer, batchWriter, {
|
|
35
|
+
signal: AbortSignal.timeout(this.timeoutMs),
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
catch (err) {
|
|
39
|
+
bodyStream.destroy();
|
|
40
|
+
if (err instanceof errors_1.GeneralError)
|
|
41
|
+
throw err;
|
|
42
|
+
throw new errors_1.GeneralError("DataSourceStreamedPipeline pipeline failed.", this.name, err);
|
|
43
|
+
}
|
|
44
|
+
this.loggerEmitter.emit(logger_1.LoggerEventType.NumberOfRecords, { name: this.name, numberOfRecords: totalRecords });
|
|
45
|
+
}
|
|
46
|
+
createBatchWriter(onBatchProcessed) {
|
|
47
|
+
const batchSize = this.batchSize;
|
|
48
|
+
return new BatchWritable_1.BatchWritable({
|
|
49
|
+
batchSize,
|
|
50
|
+
onFlush: async (batch) => {
|
|
51
|
+
const processedCount = batch.length;
|
|
52
|
+
await this.validateAndProcess(batch);
|
|
53
|
+
onBatchProcessed(processedCount);
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
async validateAndProcess(batch) {
|
|
58
|
+
if (this.validator) {
|
|
59
|
+
try {
|
|
60
|
+
await this.validator.Validate(batch);
|
|
61
|
+
}
|
|
62
|
+
catch (err) {
|
|
63
|
+
throw new errors_1.GeneralError("Error while validating source data.", this.name, err);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
await this.dataProcessor(batch);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.DataSourceStreamedPipeline = DataSourceStreamedPipeline;
|
|
70
|
+
DataSourceStreamedPipeline.DEFAULT_BATCH_SIZE = process.env.DATA_BATCH_SIZE ? Number(process.env.DATA_BATCH_SIZE) : 1000;
|
|
71
|
+
DataSourceStreamedPipeline.DEFAULT_PIPELINE_TIMEOUT_MS = 30 * 60 * 1000;
|
|
72
|
+
//# sourceMappingURL=DataSourceStreamedPipeline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataSourceStreamedPipeline.js","sourceRoot":"","sources":["../../../src/integration-engine/datasources/DataSourceStreamedPipeline.ts"],"names":[],"mappings":";;;AA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,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,IAAI,AAA3E,CAA4E;AAC9F,sDAA2B,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,AAAjB,CAAkB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.JSONStreamTransformer = void 0;
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
5
|
+
const JSONStream = require("JSONStream");
|
|
6
|
+
class JSONStreamTransformer {
|
|
7
|
+
static parse(path) {
|
|
8
|
+
return JSONStream.parse(path);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.JSONStreamTransformer = JSONStreamTransformer;
|
|
12
|
+
//# sourceMappingURL=JSONStreamTransformer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JSONStreamTransformer.js","sourceRoot":"","sources":["../../../../src/integration-engine/datasources/datatype-strategy/JSONStreamTransformer.ts"],"names":[],"mappings":";;;AAGA,8DAA8D;AAC9D,MAAM,UAAU,GAAG,OAAO,CAAC,YAAY,CAA4B,CAAC;AACpE,MAAa,qBAAqB;IAC9B,MAAM,CAAC,KAAK,CAAC,IAAY;QACrB,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,CAAyB,CAAC;IAC1D,CAAC;CACJ;AAJD,sDAIC"}
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
+
export * from "./BatchWritable";
|
|
1
2
|
export * from "./DataSource";
|
|
2
3
|
export * from "./DataSourceStream";
|
|
3
4
|
export * from "./DataSourceStreamManager";
|
|
4
5
|
export * from "./DataSourceStreamed";
|
|
6
|
+
export * from "./DataSourceStreamedPipeline";
|
|
5
7
|
export * from "./IDataSource";
|
|
6
8
|
export * from "./datatype-strategy/CSVDataTypeStrategy";
|
|
7
9
|
export * from "./datatype-strategy/IDataTypeStrategy";
|
|
8
10
|
export * from "./datatype-strategy/JSONDataTypeStrategy";
|
|
11
|
+
export * from "./datatype-strategy/JSONStreamTransformer";
|
|
9
12
|
export * from "./datatype-strategy/XMLDataTypeStrategy";
|
|
10
13
|
export * from "./protocol-strategy/FTPProtocolStrategy";
|
|
14
|
+
export * from "./protocol-strategy/HTTPRequestProtocolStrategyStreamed";
|
|
11
15
|
export * from "./protocol-strategy/GoogleCloudStorageProtocolStrategy";
|
|
12
16
|
export * from "./protocol-strategy/PaginatedHTTPProtocolStrategy";
|
|
13
17
|
export * from "./protocol-strategy/IProtocolStrategy";
|
|
18
|
+
export * from "./protocol-strategy/IStreamingProtocolStrategy";
|
|
14
19
|
export * from "./protocol-strategy/PostgresProtocolStrategy";
|
|
15
20
|
export * from "./protocol-strategy/PostgresProtocolStrategyStreamed";
|
|
16
21
|
export * from "./protocol-strategy/ProtocolStrategy";
|
|
@@ -15,19 +15,24 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
/* ie/datasources/index.ts */
|
|
18
|
+
__exportStar(require("./BatchWritable"), exports);
|
|
18
19
|
__exportStar(require("./DataSource"), exports);
|
|
19
20
|
__exportStar(require("./DataSourceStream"), exports);
|
|
20
21
|
__exportStar(require("./DataSourceStreamManager"), exports);
|
|
21
22
|
__exportStar(require("./DataSourceStreamed"), exports);
|
|
23
|
+
__exportStar(require("./DataSourceStreamedPipeline"), exports);
|
|
22
24
|
__exportStar(require("./IDataSource"), exports);
|
|
23
25
|
__exportStar(require("./datatype-strategy/CSVDataTypeStrategy"), exports);
|
|
24
26
|
__exportStar(require("./datatype-strategy/IDataTypeStrategy"), exports);
|
|
25
27
|
__exportStar(require("./datatype-strategy/JSONDataTypeStrategy"), exports);
|
|
28
|
+
__exportStar(require("./datatype-strategy/JSONStreamTransformer"), exports);
|
|
26
29
|
__exportStar(require("./datatype-strategy/XMLDataTypeStrategy"), exports);
|
|
27
30
|
__exportStar(require("./protocol-strategy/FTPProtocolStrategy"), exports);
|
|
31
|
+
__exportStar(require("./protocol-strategy/HTTPRequestProtocolStrategyStreamed"), exports);
|
|
28
32
|
__exportStar(require("./protocol-strategy/GoogleCloudStorageProtocolStrategy"), exports);
|
|
29
33
|
__exportStar(require("./protocol-strategy/PaginatedHTTPProtocolStrategy"), exports);
|
|
30
34
|
__exportStar(require("./protocol-strategy/IProtocolStrategy"), exports);
|
|
35
|
+
__exportStar(require("./protocol-strategy/IStreamingProtocolStrategy"), exports);
|
|
31
36
|
__exportStar(require("./protocol-strategy/PostgresProtocolStrategy"), exports);
|
|
32
37
|
__exportStar(require("./protocol-strategy/PostgresProtocolStrategyStreamed"), exports);
|
|
33
38
|
__exportStar(require("./protocol-strategy/ProtocolStrategy"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/integration-engine/datasources/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6BAA6B;AAC7B,+CAA6B;AAC7B,qDAAmC;AACnC,4DAA0C;AAC1C,uDAAqC;AACrC,gDAA8B;AAC9B,0EAAwD;AACxD,wEAAsD;AACtD,2EAAyD;AACzD,0EAAwD;AACxD,0EAAwD;AACxD,yFAAuE;AACvE,oFAAkE;AAClE,wEAAsD;AACtD,+EAA6D;AAC7D,uFAAqE;AACrE,uEAAqD;AACrD,2EAAyD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/integration-engine/datasources/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6BAA6B;AAC7B,kDAAgC;AAChC,+CAA6B;AAC7B,qDAAmC;AACnC,4DAA0C;AAC1C,uDAAqC;AACrC,+DAA6C;AAC7C,gDAA8B;AAC9B,0EAAwD;AACxD,wEAAsD;AACtD,2EAAyD;AACzD,4EAA0D;AAC1D,0EAAwD;AACxD,0EAAwD;AACxD,0FAAwE;AACxE,yFAAuE;AACvE,oFAAkE;AAClE,wEAAsD;AACtD,iFAA+D;AAC/D,+EAA6D;AAC7D,uFAAqE;AACrE,uEAAqD;AACrD,2EAAyD"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import { IProtocolStrategy } from "./IProtocolStrategy";
|
|
3
|
+
import { Readable } from "node:stream";
|
|
2
4
|
import { DataSourceStream } from "../DataSourceStream";
|
|
3
5
|
import { HTTPRequestProtocolStrategy } from "./HTTPRequestProtocolStrategy";
|
|
4
|
-
|
|
6
|
+
import { IStreamingProtocolStrategy } from "./IStreamingProtocolStrategy";
|
|
7
|
+
export declare class HTTPRequestProtocolStrategyStreamed extends HTTPRequestProtocolStrategy implements IProtocolStrategy, IStreamingProtocolStrategy {
|
|
5
8
|
private streamTransform;
|
|
6
9
|
/**
|
|
7
10
|
* @param streamTransform data will be piped to this stream if provided
|
|
8
11
|
*/
|
|
9
12
|
setStreamTransformer: (streamTransform: any) => HTTPRequestProtocolStrategyStreamed;
|
|
10
13
|
getData(): Promise<DataSourceStream>;
|
|
14
|
+
getBodyStream(): Promise<Readable>;
|
|
11
15
|
getRawData: () => Promise<any>;
|
|
12
16
|
}
|
package/dist/integration-engine/datasources/protocol-strategy/HTTPRequestProtocolStrategyStreamed.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.HTTPRequestProtocolStrategyStreamed = void 0;
|
|
4
4
|
const errors_1 = require("@golemio/errors");
|
|
5
|
+
const node_zlib_1 = require("node:zlib");
|
|
5
6
|
const DataSourceStream_1 = require("../DataSourceStream");
|
|
6
7
|
const HTTPRequestProtocolStrategy_1 = require("./HTTPRequestProtocolStrategy");
|
|
7
8
|
class HTTPRequestProtocolStrategyStreamed extends HTTPRequestProtocolStrategy_1.HTTPRequestProtocolStrategy {
|
|
@@ -16,7 +17,8 @@ class HTTPRequestProtocolStrategyStreamed extends HTTPRequestProtocolStrategy_1.
|
|
|
16
17
|
};
|
|
17
18
|
this.getRawData = async () => {
|
|
18
19
|
if (this.connectionSettings.compression) {
|
|
19
|
-
throw new errors_1.GeneralError("
|
|
20
|
+
throw new errors_1.GeneralError("Compressed resources are not supported in the legacy DataSourceStream path;" +
|
|
21
|
+
"use DataSourceStreamedPipeline instead", this.constructor.name);
|
|
20
22
|
}
|
|
21
23
|
try {
|
|
22
24
|
const result = await this.getResponseInternal();
|
|
@@ -97,6 +99,33 @@ class HTTPRequestProtocolStrategyStreamed extends HTTPRequestProtocolStrategy_1.
|
|
|
97
99
|
}
|
|
98
100
|
return outStream;
|
|
99
101
|
}
|
|
102
|
+
async getBodyStream() {
|
|
103
|
+
try {
|
|
104
|
+
const result = await this.getResponseInternal();
|
|
105
|
+
if (result.statusCode < 200 || result.statusCode >= 300) {
|
|
106
|
+
result.body?.resume?.(); // drain to avoid connection leak (some statuses have no body)
|
|
107
|
+
throw new errors_1.GeneralError(`Unexpected HTTP status ${result.statusCode}`, this.constructor.name);
|
|
108
|
+
}
|
|
109
|
+
let body = result.body;
|
|
110
|
+
if (this.connectionSettings.compression === "gzip") {
|
|
111
|
+
const encoding = String(result.headers?.["content-encoding"] ?? "").toLowerCase();
|
|
112
|
+
if (encoding !== "gzip") {
|
|
113
|
+
body?.resume?.();
|
|
114
|
+
throw new errors_1.GeneralError(`Expected gzip-encoded response but server returned Content-Encoding: "${encoding || "<none>"}"`, this.constructor.name);
|
|
115
|
+
}
|
|
116
|
+
body = body.pipe((0, node_zlib_1.createGunzip)());
|
|
117
|
+
}
|
|
118
|
+
return this.teeRawDataToStorage(body, {
|
|
119
|
+
statusCode: result.statusCode,
|
|
120
|
+
headers: result.headers,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
catch (err) {
|
|
124
|
+
if (err instanceof errors_1.GeneralError)
|
|
125
|
+
throw err;
|
|
126
|
+
throw new errors_1.GeneralError("Error while getting body stream from server.", this.constructor.name, err);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
100
129
|
}
|
|
101
130
|
exports.HTTPRequestProtocolStrategyStreamed = HTTPRequestProtocolStrategyStreamed;
|
|
102
131
|
//# sourceMappingURL=HTTPRequestProtocolStrategyStreamed.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HTTPRequestProtocolStrategyStreamed.js","sourceRoot":"","sources":["../../../../src/integration-engine/datasources/protocol-strategy/HTTPRequestProtocolStrategyStreamed.ts"],"names":[],"mappings":";;;AACA,4CAAqE;
|
|
1
|
+
{"version":3,"file":"HTTPRequestProtocolStrategyStreamed.js","sourceRoot":"","sources":["../../../../src/integration-engine/datasources/protocol-strategy/HTTPRequestProtocolStrategyStreamed.ts"],"names":[],"mappings":";;;AACA,4CAAqE;AAErE,yCAAyC;AACzC,0DAAuD;AACvD,+EAA4E;AAG5E,MAAa,mCACT,SAAQ,yDAA2B;IADvC;;QAMI;;WAEG;QACI,yBAAoB,GAAG,CAAC,eAAoB,EAAuC,EAAE;YACxF,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;YACvC,OAAO,IAAI,CAAC;QAChB,CAAC,CAAC;QAuGK,eAAU,GAAG,KAAK,IAAkB,EAAE;YACzC,IAAI,IAAI,CAAC,kBAAkB,CAAC,WAAW,EAAE;gBACrC,MAAM,IAAI,qBAAY,CAClB,6EAA6E;oBACzE,wCAAwC,EAC5C,IAAI,CAAC,WAAW,CAAC,IAAI,CACxB,CAAC;aACL;YAED,IAAI;gBACA,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,mBAAmB,EAAE,CAAC;gBAEhD,OAAO;oBACH,IAAI,EAAE,MAAM,CAAC,IAAI;iBACpB,CAAC;aACL;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,qBAAY,CAAC,uCAAuC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;aAC/F;QACL,CAAC,CAAC;IACN,CAAC;IAxHU,KAAK,CAAC,OAAO;QAChB,MAAM,U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AC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;SACtG;IACL,CAAC;CAqBJ;AAtID,kFAsIC"}
|
package/dist/integration-engine/datasources/protocol-strategy/IStreamingProtocolStrategy.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IStreamingProtocolStrategy.js","sourceRoot":"","sources":["../../../../src/integration-engine/datasources/protocol-strategy/IStreamingProtocolStrategy.ts"],"names":[],"mappings":""}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Readable } from "node:stream";
|
|
1
3
|
import { DataSourceStream } from "../DataSourceStream";
|
|
2
4
|
import { IProtocolStrategy, ProtocolStrategySettings } from "./IProtocolStrategy";
|
|
3
5
|
export declare class ProtocolStrategy implements IProtocolStrategy {
|
|
@@ -18,6 +20,7 @@ export declare class ProtocolStrategy implements IProtocolStrategy {
|
|
|
18
20
|
}>;
|
|
19
21
|
getLastModified: () => Promise<string | null>;
|
|
20
22
|
protected getRawData(...args: any): Promise<any | DataSourceStream>;
|
|
23
|
+
protected teeRawDataToStorage(bodyStream: Readable, meta?: unknown): Readable;
|
|
21
24
|
private prepareRawData;
|
|
22
25
|
private pushRawDataToS3Stream;
|
|
23
26
|
}
|
|
@@ -9,7 +9,8 @@ const RawDataStorage_1 = __importDefault(require("../../data-access/RawDataStora
|
|
|
9
9
|
const ioc_1 = require("../../ioc");
|
|
10
10
|
const Di_1 = require("../../ioc/Di");
|
|
11
11
|
const errors_1 = require("@golemio/errors");
|
|
12
|
-
const
|
|
12
|
+
const node_stream_1 = require("node:stream");
|
|
13
|
+
const promises_1 = require("node:stream/promises");
|
|
13
14
|
const DataSourceStream_1 = require("../DataSourceStream");
|
|
14
15
|
class ProtocolStrategy {
|
|
15
16
|
constructor(settings) {
|
|
@@ -93,9 +94,9 @@ class ProtocolStrategy {
|
|
|
93
94
|
let dataSaveCalled = false;
|
|
94
95
|
let protocolDataStream;
|
|
95
96
|
// bit paranoid but ...
|
|
96
|
-
if (rawData && (rawData instanceof
|
|
97
|
+
if (rawData && (rawData instanceof node_stream_1.Readable || rawData.constructor.name === "Request") && rawData.on) {
|
|
97
98
|
protocolDataStream = rawData;
|
|
98
|
-
const S3Stream = new
|
|
99
|
+
const S3Stream = new node_stream_1.Readable({
|
|
99
100
|
objectMode: false,
|
|
100
101
|
read: () => {
|
|
101
102
|
return;
|
|
@@ -149,6 +150,44 @@ class ProtocolStrategy {
|
|
|
149
150
|
async getRawData(...args) {
|
|
150
151
|
throw new Error("getRawData: Method not implemented.");
|
|
151
152
|
}
|
|
153
|
+
teeRawDataToStorage(bodyStream, meta = {}) {
|
|
154
|
+
if (!this.storageEnabled || !this.saveRawDataWhitelist[this.caller]) {
|
|
155
|
+
return bodyStream;
|
|
156
|
+
}
|
|
157
|
+
const S3Stream = new node_stream_1.Readable({
|
|
158
|
+
objectMode: false,
|
|
159
|
+
read: () => {
|
|
160
|
+
return;
|
|
161
|
+
},
|
|
162
|
+
});
|
|
163
|
+
const consumer = new node_stream_1.PassThrough();
|
|
164
|
+
let consumerErrorFired = false;
|
|
165
|
+
(0, promises_1.pipeline)(bodyStream, consumer).catch((err) => {
|
|
166
|
+
if (!consumerErrorFired) {
|
|
167
|
+
this.logger.error(`Body stream source failed for ${this.caller}`, err);
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
let saveCalled = false;
|
|
171
|
+
consumer.on("data", async (chunk) => {
|
|
172
|
+
await this.pushRawDataToS3Stream(chunk, S3Stream);
|
|
173
|
+
if (!saveCalled) {
|
|
174
|
+
this.rawDataStorage.save(S3Stream, meta, this.caller);
|
|
175
|
+
saveCalled = true;
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
consumer.on("end", () => {
|
|
179
|
+
S3Stream.push(null);
|
|
180
|
+
});
|
|
181
|
+
consumer.on("error", (err) => {
|
|
182
|
+
consumerErrorFired = true;
|
|
183
|
+
this.logger.warn(`Raw data save to storage interrupted for ${this.caller}`, err);
|
|
184
|
+
S3Stream.push(null);
|
|
185
|
+
});
|
|
186
|
+
S3Stream.on("error", (err) => {
|
|
187
|
+
this.logger.error(`Error on saving raw data for ${this.caller}`, err);
|
|
188
|
+
});
|
|
189
|
+
return consumer;
|
|
190
|
+
}
|
|
152
191
|
}
|
|
153
192
|
exports.ProtocolStrategy = ProtocolStrategy;
|
|
154
193
|
//# sourceMappingURL=ProtocolStrategy.js.map
|