@golemio/core 1.18.0 → 1.18.1-dev.1622172793
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/DateTime.js +4 -5
- package/dist/helpers/DateTime.js.map +1 -1
- package/dist/helpers/HealthCheck.js +5 -14
- package/dist/helpers/HealthCheck.js.map +1 -1
- package/dist/helpers/configuration/SimpleConfig.js +4 -1
- package/dist/helpers/configuration/SimpleConfig.js.map +1 -1
- package/dist/helpers/data-access/amqp/AlternateExchangeCreator.js +4 -13
- package/dist/helpers/data-access/amqp/AlternateExchangeCreator.js.map +1 -1
- package/dist/helpers/data-access/amqp/AmqpConnector.js +28 -40
- package/dist/helpers/data-access/amqp/AmqpConnector.js.map +1 -1
- package/dist/helpers/data-access/feature-flags/helpers/AbstractFeatureFlagServiceWrapper.js +2 -13
- package/dist/helpers/data-access/feature-flags/helpers/AbstractFeatureFlagServiceWrapper.js.map +1 -1
- package/dist/helpers/data-access/feature-flags/providers/NoopFeatureFlagService.js +9 -24
- package/dist/helpers/data-access/feature-flags/providers/NoopFeatureFlagService.js.map +1 -1
- package/dist/helpers/data-access/postgres/DatabaseConnector.js +23 -25
- package/dist/helpers/data-access/postgres/DatabaseConnector.js.map +1 -1
- package/dist/helpers/data-access/postgres/repositories/AbstractCachedRepository.js +3 -12
- package/dist/helpers/data-access/postgres/repositories/AbstractCachedRepository.js.map +1 -1
- package/dist/helpers/data-access/pubsub/subscribers/RedisSubscriber.js +15 -30
- package/dist/helpers/data-access/pubsub/subscribers/RedisSubscriber.js.map +1 -1
- package/dist/helpers/data-access/redis/IoRedisConnector.js +8 -17
- package/dist/helpers/data-access/redis/IoRedisConnector.js.map +1 -1
- package/dist/helpers/data-access/storage/AzureBlobStorageService.js +64 -81
- package/dist/helpers/data-access/storage/AzureBlobStorageService.js.map +1 -1
- package/dist/helpers/data-access/storage/NoopStorageService.js +9 -26
- package/dist/helpers/data-access/storage/NoopStorageService.js.map +1 -1
- package/dist/helpers/data-access/table-storage/TableStorageServiceFactory.js +1 -2
- package/dist/helpers/data-access/table-storage/TableStorageServiceFactory.js.map +1 -1
- package/dist/helpers/data-access/table-storage/providers/AzureTableStorageService.js +39 -68
- package/dist/helpers/data-access/table-storage/providers/AzureTableStorageService.js.map +1 -1
- package/dist/helpers/data-access/table-storage/providers/NoopTableStorageService.js +4 -17
- package/dist/helpers/data-access/table-storage/providers/NoopTableStorageService.js.map +1 -1
- package/dist/helpers/logger/LoggerProvider.js +33 -14
- package/dist/helpers/logger/LoggerProvider.js.map +1 -1
- package/dist/helpers/logger/RequestLoggerProvider.js +1 -2
- package/dist/helpers/logger/RequestLoggerProvider.js.map +1 -1
- package/dist/helpers/routing/AbstractGeoJsonRouter.js +16 -34
- package/dist/helpers/routing/AbstractGeoJsonRouter.js.map +1 -1
- package/dist/input-gateway/config/InputGatewayConfiguration.js +1 -2
- package/dist/input-gateway/config/InputGatewayConfiguration.js.map +1 -1
- package/dist/input-gateway/connectors/AMQPConnector.js +52 -68
- package/dist/input-gateway/connectors/AMQPConnector.js.map +1 -1
- package/dist/input-gateway/controllers/BaseController.js +4 -13
- package/dist/input-gateway/controllers/BaseController.js.map +1 -1
- package/dist/integration-engine/connectors/AMQPConnector.js +28 -40
- package/dist/integration-engine/connectors/AMQPConnector.js.map +1 -1
- package/dist/integration-engine/data-access/RawDataStorage.js +7 -16
- package/dist/integration-engine/data-access/RawDataStorage.js.map +1 -1
- package/dist/integration-engine/data-access/pubsub/RedisPubSubChannel.js +3 -14
- package/dist/integration-engine/data-access/pubsub/RedisPubSubChannel.js.map +1 -1
- package/dist/integration-engine/data-access/pubsub/subscribers/RedisSubscriber.js +12 -25
- package/dist/integration-engine/data-access/pubsub/subscribers/RedisSubscriber.js.map +1 -1
- package/dist/integration-engine/datasources/DataSource.js +41 -60
- package/dist/integration-engine/datasources/DataSource.js.map +1 -1
- package/dist/integration-engine/datasources/DataSourceStream.js +12 -21
- package/dist/integration-engine/datasources/DataSourceStream.js.map +1 -1
- package/dist/integration-engine/datasources/DataSourceStreamManager.js +4 -13
- package/dist/integration-engine/datasources/DataSourceStreamManager.js.map +1 -1
- package/dist/integration-engine/datasources/DataSourceStreamed.js +37 -51
- package/dist/integration-engine/datasources/DataSourceStreamed.js.map +1 -1
- package/dist/integration-engine/datasources/RetryDataSource.js +25 -40
- package/dist/integration-engine/datasources/RetryDataSource.js.map +1 -1
- package/dist/integration-engine/datasources/datatype-strategy/CSVDataTypeStrategy.js +22 -33
- package/dist/integration-engine/datasources/datatype-strategy/CSVDataTypeStrategy.js.map +1 -1
- package/dist/integration-engine/datasources/datatype-strategy/JSONDataTypeStrategy.js +14 -25
- package/dist/integration-engine/datasources/datatype-strategy/JSONDataTypeStrategy.js.map +1 -1
- package/dist/integration-engine/datasources/datatype-strategy/XMLDataTypeStrategy.js +11 -22
- package/dist/integration-engine/datasources/datatype-strategy/XMLDataTypeStrategy.js.map +1 -1
- package/dist/integration-engine/datasources/datatype-strategy/ZipFileDataTypeStrategy.js +33 -45
- package/dist/integration-engine/datasources/datatype-strategy/ZipFileDataTypeStrategy.js.map +1 -1
- package/dist/integration-engine/datasources/protocol-strategy/FTPProtocolStrategy.js +17 -26
- package/dist/integration-engine/datasources/protocol-strategy/FTPProtocolStrategy.js.map +1 -1
- package/dist/integration-engine/datasources/protocol-strategy/GoogleCloudStorageProtocolStrategy.js +10 -19
- package/dist/integration-engine/datasources/protocol-strategy/GoogleCloudStorageProtocolStrategy.js.map +1 -1
- package/dist/integration-engine/datasources/protocol-strategy/HTTPFetchProtocolStrategy.js +42 -51
- package/dist/integration-engine/datasources/protocol-strategy/HTTPFetchProtocolStrategy.js.map +1 -1
- package/dist/integration-engine/datasources/protocol-strategy/HTTPRequestProtocolStrategy.js +49 -62
- package/dist/integration-engine/datasources/protocol-strategy/HTTPRequestProtocolStrategy.js.map +1 -1
- package/dist/integration-engine/datasources/protocol-strategy/HTTPRequestProtocolStrategyStreamed.js +67 -81
- package/dist/integration-engine/datasources/protocol-strategy/HTTPRequestProtocolStrategyStreamed.js.map +1 -1
- package/dist/integration-engine/datasources/protocol-strategy/PaginatedHTTPProtocolStrategy.js +29 -38
- package/dist/integration-engine/datasources/protocol-strategy/PaginatedHTTPProtocolStrategy.js.map +1 -1
- package/dist/integration-engine/datasources/protocol-strategy/PostgresProtocolStrategy.js +37 -42
- package/dist/integration-engine/datasources/protocol-strategy/PostgresProtocolStrategy.js.map +1 -1
- package/dist/integration-engine/datasources/protocol-strategy/PostgresProtocolStrategyStreamed.js +29 -32
- package/dist/integration-engine/datasources/protocol-strategy/PostgresProtocolStrategyStreamed.js.map +1 -1
- package/dist/integration-engine/datasources/protocol-strategy/ProtocolStrategy.js +73 -88
- package/dist/integration-engine/datasources/protocol-strategy/ProtocolStrategy.js.map +1 -1
- package/dist/integration-engine/datasources/protocol-strategy/SFTPProtocolStrategy.js +17 -26
- package/dist/integration-engine/datasources/protocol-strategy/SFTPProtocolStrategy.js.map +1 -1
- package/dist/integration-engine/datasources/protocol-strategy/helpers/FTPFileProcessor.js +37 -49
- package/dist/integration-engine/datasources/protocol-strategy/helpers/FTPFileProcessor.js.map +1 -1
- package/dist/integration-engine/helpers/FileCompressor.js +59 -76
- package/dist/integration-engine/helpers/FileCompressor.js.map +1 -1
- package/dist/integration-engine/helpers/GeocodeApi.js +20 -30
- package/dist/integration-engine/helpers/GeocodeApi.js.map +1 -1
- package/dist/integration-engine/helpers/IntegrationErrorHandler.js +3 -3
- package/dist/integration-engine/helpers/IntegrationErrorHandler.js.map +1 -1
- package/dist/integration-engine/helpers/PaginationHelper.js +1 -2
- package/dist/integration-engine/helpers/PaginationHelper.js.map +1 -1
- package/dist/integration-engine/models/PostgresModel.js +70 -75
- package/dist/integration-engine/models/PostgresModel.js.map +1 -1
- package/dist/integration-engine/models/RedisModel.js +28 -39
- package/dist/integration-engine/models/RedisModel.js.map +1 -1
- package/dist/integration-engine/queueprocessors/QueueProcessor.js +23 -28
- package/dist/integration-engine/queueprocessors/QueueProcessor.js.map +1 -1
- package/dist/integration-engine/transformations/BaseTransformation.js +8 -17
- package/dist/integration-engine/transformations/BaseTransformation.js.map +1 -1
- package/dist/integration-engine/workers/AbstractTask.js +7 -18
- package/dist/integration-engine/workers/AbstractTask.js.map +1 -1
- package/dist/integration-engine/workers/AbstractTaskJsonSchema.js +25 -38
- package/dist/integration-engine/workers/AbstractTaskJsonSchema.js.map +1 -1
- package/dist/integration-engine/workers/AbstractTaskWithoutValidation.js +2 -13
- package/dist/integration-engine/workers/AbstractTaskWithoutValidation.js.map +1 -1
- package/dist/integration-engine/workers/BaseWorker.js +4 -13
- package/dist/integration-engine/workers/BaseWorker.js.map +1 -1
- package/dist/integration-engine/workers/helpers/MessageDataParser.js +1 -2
- package/dist/integration-engine/workers/helpers/MessageDataParser.js.map +1 -1
- package/dist/integration-engine/workers/helpers/MessageDataValidator.js +18 -29
- package/dist/integration-engine/workers/helpers/MessageDataValidator.js.map +1 -1
- package/dist/integration-engine/workers/helpers/WebhookDecorators.js +1 -10
- package/dist/integration-engine/workers/helpers/WebhookDecorators.js.map +1 -1
- package/dist/integration-engine/workers/webhooks/CloudflareCachePurgeWebhook.js +13 -24
- package/dist/integration-engine/workers/webhooks/CloudflareCachePurgeWebhook.js.map +1 -1
- package/dist/monitoring/metrics/metrics-builder.js +21 -17
- package/dist/monitoring/metrics/metrics-builder.js.map +1 -1
- package/dist/monitoring/metrics/metrics-service.js +4 -14
- package/dist/monitoring/metrics/metrics-service.js.map +1 -1
- package/dist/monitoring/opentelemetry/instrumentation/configs/amqplib.js +1 -2
- package/dist/monitoring/opentelemetry/instrumentation/configs/amqplib.js.map +1 -1
- package/dist/monitoring/opentelemetry/instrumentation/configs/aws-sdk.js +1 -1
- package/dist/monitoring/opentelemetry/instrumentation/configs/aws-sdk.js.map +1 -1
- package/dist/monitoring/opentelemetry/trace-provider.js +8 -2
- package/dist/monitoring/opentelemetry/trace-provider.js.map +1 -1
- package/dist/monitoring/sentry/sentry-provider.js +1 -1
- package/dist/monitoring/sentry/sentry-provider.js.map +1 -1
- package/dist/monitoring/sentry/sentry-transactions.js +9 -19
- package/dist/monitoring/sentry/sentry-transactions.js.map +1 -1
- package/dist/output-gateway/Geo.js +3 -24
- package/dist/output-gateway/Geo.js.map +1 -1
- package/dist/output-gateway/config/OutputGatewayConfiguration.js +1 -2
- package/dist/output-gateway/config/OutputGatewayConfiguration.js.map +1 -1
- package/dist/output-gateway/database/index.js +3 -12
- package/dist/output-gateway/database/index.js.map +1 -1
- package/dist/output-gateway/ioc/Di.js +1 -10
- package/dist/output-gateway/ioc/Di.js.map +1 -1
- package/dist/output-gateway/models/SequelizeModel.js +4 -2
- package/dist/output-gateway/models/SequelizeModel.js.map +1 -1
- package/dist/output-gateway/routes/GeoJsonRouter.js +14 -32
- package/dist/output-gateway/routes/GeoJsonRouter.js.map +1 -1
- package/package.json +6 -5
- package/tsconfig.base.json +2 -2
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
@@ -24,58 +15,58 @@ class SFTPProtocolStrategy extends ProtocolStrategy_1.ProtocolStrategy {
|
|
|
24
15
|
this.setConnectionSettings = (settings) => {
|
|
25
16
|
this.connectionSettings = settings;
|
|
26
17
|
};
|
|
27
|
-
this.getRawData = () =>
|
|
18
|
+
this.getRawData = async () => {
|
|
28
19
|
try {
|
|
29
20
|
// for testing
|
|
30
21
|
// return iconv.decode(
|
|
31
22
|
// fs.readFileSync("/home/towdie/NadSv_2020-11-10.CSV"), this.connectionSettings.encoding,
|
|
32
23
|
// //await this.sftpClient.get(`/${lastMod.name}`) as Buffer, this.connectionSettings.encoding,
|
|
33
24
|
// );
|
|
34
|
-
|
|
25
|
+
await this.connect();
|
|
35
26
|
let lastModTime = 0;
|
|
36
27
|
let lastMod;
|
|
37
|
-
(
|
|
28
|
+
(await this.sftpClient.list(this.connectionSettings.path || "/")).forEach((file) => {
|
|
38
29
|
if (file.modifyTime > lastModTime) {
|
|
39
30
|
lastModTime = file.modifyTime;
|
|
40
31
|
lastMod = file;
|
|
41
32
|
}
|
|
42
33
|
});
|
|
43
34
|
const rawData = {
|
|
44
|
-
data: iconv_lite_1.default.decode((
|
|
35
|
+
data: iconv_lite_1.default.decode((await this.sftpClient.get(`/${this.connectionSettings.filename}`)), this.connectionSettings.encoding),
|
|
45
36
|
};
|
|
46
|
-
|
|
37
|
+
await this.disconnect();
|
|
47
38
|
return rawData;
|
|
48
39
|
}
|
|
49
40
|
catch (err) {
|
|
50
41
|
throw new errors_1.GeneralError("Error while getting data from server.", this.constructor.name, err);
|
|
51
42
|
}
|
|
52
|
-
}
|
|
53
|
-
this.getLastModified = () =>
|
|
43
|
+
};
|
|
44
|
+
this.getLastModified = async () => {
|
|
54
45
|
try {
|
|
55
46
|
// for testing
|
|
56
47
|
// return iconv.decode(
|
|
57
48
|
// fs.readFileSync("/home/towdie/NadSv_2020-11-10.CSV"), this.connectionSettings.encoding,
|
|
58
49
|
// //await this.sftpClient.get(`/${lastMod.name}`) as Buffer, this.connectionSettings.encoding,
|
|
59
50
|
// );
|
|
60
|
-
|
|
51
|
+
await this.connect();
|
|
61
52
|
let lastModTime = 0;
|
|
62
53
|
let lastMod;
|
|
63
|
-
(
|
|
54
|
+
(await this.sftpClient.list(this.connectionSettings.path || "/")).forEach((file) => {
|
|
64
55
|
if (file.modifyTime > lastModTime) {
|
|
65
56
|
lastModTime = file.modifyTime;
|
|
66
57
|
lastMod = file;
|
|
67
58
|
}
|
|
68
59
|
});
|
|
69
|
-
|
|
60
|
+
await this.disconnect();
|
|
70
61
|
return lastMod.name;
|
|
71
62
|
}
|
|
72
63
|
catch (err) {
|
|
73
64
|
throw new errors_1.GeneralError("Error while getting data from server.", this.constructor.name, err);
|
|
74
65
|
}
|
|
75
|
-
}
|
|
76
|
-
this.connect = () =>
|
|
66
|
+
};
|
|
67
|
+
this.connect = async () => {
|
|
77
68
|
if (!this.connected) {
|
|
78
|
-
|
|
69
|
+
await this.sftpClient.connect({
|
|
79
70
|
algorithms: this.connectionSettings.algorithms,
|
|
80
71
|
host: this.connectionSettings.host,
|
|
81
72
|
password: this.connectionSettings.password,
|
|
@@ -84,13 +75,13 @@ class SFTPProtocolStrategy extends ProtocolStrategy_1.ProtocolStrategy {
|
|
|
84
75
|
});
|
|
85
76
|
this.connected = true;
|
|
86
77
|
}
|
|
87
|
-
}
|
|
88
|
-
this.disconnect = () =>
|
|
78
|
+
};
|
|
79
|
+
this.disconnect = async () => {
|
|
89
80
|
if (this.connected) {
|
|
90
|
-
|
|
81
|
+
await this.sftpClient.end();
|
|
91
82
|
this.connected = false;
|
|
92
83
|
}
|
|
93
|
-
}
|
|
84
|
+
};
|
|
94
85
|
this.sftpClient = new ssh2_sftp_client_1.default();
|
|
95
86
|
}
|
|
96
87
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SFTPProtocolStrategy.js","sourceRoot":"","sources":["../../../../src/integration-engine/datasources/protocol-strategy/SFTPProtocolStrategy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SFTPProtocolStrategy.js","sourceRoot":"","sources":["../../../../src/integration-engine/datasources/protocol-strategy/SFTPProtocolStrategy.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CAAC,kBAAkB,CAAC,QAAQ;iBAC7C,CAAC,CAAC;gBACH,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;aACzB;QACL,CAAC,CAAC;QAEM,eAAU,GAAG,KAAK,IAAmB,EAAE;YAC3C,IAAI,IAAI,CAAC,SAAS,EAAE;gBAChB,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC;gBAC5B,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;aAC1B;QACL,CAAC,CAAC;QAtFE,IAAI,CAAC,UAAU,GAAG,IAAI,0BAAI,EAAE,CAAC;IACjC,CAAC;CAsFJ;AA9FD,oDA8FC"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
@@ -27,49 +18,46 @@ class FTPFileProcessor {
|
|
|
27
18
|
processTargetFile() {
|
|
28
19
|
return this.prepareFileData(path_1.default.join(this.downloadPath, this.connectionSettings.filename), this.connectionSettings.filename);
|
|
29
20
|
}
|
|
30
|
-
processTargetFolder(prefix) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return result;
|
|
39
|
-
});
|
|
21
|
+
async processTargetFolder(prefix) {
|
|
22
|
+
const whitelistPredicate = this.createWhitelistPredicate();
|
|
23
|
+
const files = (await promises_1.default.readdir(path_1.default.join(this.downloadPath, this.connectionSettings.filename))).filter(whitelistPredicate);
|
|
24
|
+
const result = [];
|
|
25
|
+
for (const file of files) {
|
|
26
|
+
result.push(await this.prepareFileData(path_1.default.join(this.downloadPath, prefix, file), path_1.default.join(prefix, file)));
|
|
27
|
+
}
|
|
28
|
+
return result;
|
|
40
29
|
}
|
|
41
|
-
processTargetCompressed(prefix) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
30
|
+
async processTargetCompressed(prefix) {
|
|
31
|
+
const whitelistPredicate = this.createWhitelistPredicate();
|
|
32
|
+
const { files } = await this.fileCompressor.inflateFile(path_1.default.join(this.downloadPath, this.connectionSettings.filename), whitelistPredicate);
|
|
33
|
+
const result = [];
|
|
34
|
+
for (const file of files) {
|
|
35
|
+
const fileResult = await this.prepareFileData(file.path, path_1.default.join(prefix, file.name));
|
|
36
|
+
result.push({
|
|
37
|
+
...fileResult,
|
|
38
|
+
mtime: file.mtime.toISOString(),
|
|
39
|
+
type: file.type,
|
|
40
|
+
});
|
|
41
|
+
if (fileResult.data instanceof fs_1.ReadStream) {
|
|
42
|
+
fileResult.data.once("end", async () => {
|
|
43
|
+
await promises_1.default.rm(file.path, { force: true });
|
|
44
|
+
});
|
|
57
45
|
}
|
|
58
|
-
|
|
59
|
-
|
|
46
|
+
else {
|
|
47
|
+
await promises_1.default.rm(file.path, { force: true });
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return result;
|
|
60
51
|
}
|
|
61
|
-
prepareFileData(absoluteFilePath, relativeFilePath) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
name: path_1.default.parse(relativeFilePath).name,
|
|
71
|
-
};
|
|
72
|
-
});
|
|
52
|
+
async prepareFileData(absoluteFilePath, relativeFilePath) {
|
|
53
|
+
const data = this.connectionSettings.returnType === IProtocolStrategy_1.FTPReturnType.Stream
|
|
54
|
+
? (0, fs_1.createReadStream)(absoluteFilePath, this.connectionSettings.encoding ?? undefined)
|
|
55
|
+
: this.encode(await promises_1.default.readFile(absoluteFilePath));
|
|
56
|
+
return {
|
|
57
|
+
data,
|
|
58
|
+
filepath: relativeFilePath,
|
|
59
|
+
name: path_1.default.parse(relativeFilePath).name,
|
|
60
|
+
};
|
|
73
61
|
}
|
|
74
62
|
encode(data) {
|
|
75
63
|
return this.connectionSettings.encoding ? data.toString(this.connectionSettings.encoding) : data;
|
package/dist/integration-engine/datasources/protocol-strategy/helpers/FTPFileProcessor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FTPFileProcessor.js","sourceRoot":"","sources":["../../../../../src/integration-engine/datasources/protocol-strategy/helpers/FTPFileProcessor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FTPFileProcessor.js","sourceRoot":"","sources":["../../../../../src/integration-engine/datasources/protocol-strategy/helpers/FTPFileProcessor.ts"],"names":[],"mappings":";;;;;;AAAA,4DAAyG;AACzG,oEAA4D;AAE5D,2BAAkD;AAClD,2DAA6B;AAC7B,gDAAwB;AAExB,MAAa,gBAAgB;IAGzB,YAA6B,kBAAgC,EAAmB,YAAoB;QAAvE,uBAAkB,GAAlB,kBAAkB,CAAc;QAAmB,iBAAY,GAAZ,YAAY,CAAQ;QAChG,IAAI,CAAC,cAAc,GAAG,IAAI,+BAAc,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAChE,CAAC;IAEM,iBAAiB;QACpB,OAAO,IA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,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACrG,CAAC;IAEO,wBAAwB;QAC5B,OAAO,CAAC,QAAQ,EAAE,EAAE;YAChB,IAAI,IAAI,CAAC,kBAAkB,CAAC,gBAAgB,EAAE;gBAC1C,OAAO,IAAI,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;aAC1E;YAED,OAAO,CAAC,CAAC,QAAQ,CAAC;QACtB,CAAC,CAAC;IACN,CAAC;CACJ;AAnFD,4CAmFC"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
@@ -23,85 +14,77 @@ class FileCompressor {
|
|
|
23
14
|
constructor(basePath) {
|
|
24
15
|
this.basePath = basePath;
|
|
25
16
|
}
|
|
26
|
-
inflateBuffer(buffer, extractFilePredicate) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
zipFile.close();
|
|
42
|
-
}));
|
|
17
|
+
async inflateBuffer(buffer, extractFilePredicate) {
|
|
18
|
+
const archiveName = crypto_1.default.randomBytes(5).toString("hex");
|
|
19
|
+
return new Promise((resolve, reject) => {
|
|
20
|
+
yauzl_1.default.fromBuffer(buffer, FileCompressor.LIB_OPTIONS, async (err, zipFile) => {
|
|
21
|
+
if (err) {
|
|
22
|
+
return reject(err);
|
|
23
|
+
}
|
|
24
|
+
try {
|
|
25
|
+
const result = await this.processZipFile(archiveName, zipFile, extractFilePredicate);
|
|
26
|
+
resolve(result);
|
|
27
|
+
}
|
|
28
|
+
catch (err) {
|
|
29
|
+
reject(err);
|
|
30
|
+
}
|
|
31
|
+
zipFile.close();
|
|
43
32
|
});
|
|
44
33
|
});
|
|
45
34
|
}
|
|
46
|
-
inflateFile(archivePath, extractFilePredicate) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
zipFile.close();
|
|
62
|
-
}));
|
|
35
|
+
async inflateFile(archivePath, extractFilePredicate) {
|
|
36
|
+
const archiveName = path_1.default.basename(archivePath);
|
|
37
|
+
return new Promise((resolve, reject) => {
|
|
38
|
+
yauzl_1.default.open(archivePath, FileCompressor.LIB_OPTIONS, async (err, zipFile) => {
|
|
39
|
+
if (err) {
|
|
40
|
+
return reject(err);
|
|
41
|
+
}
|
|
42
|
+
try {
|
|
43
|
+
const result = await this.processZipFile(archiveName, zipFile, extractFilePredicate);
|
|
44
|
+
resolve(result);
|
|
45
|
+
}
|
|
46
|
+
catch (err) {
|
|
47
|
+
reject(err);
|
|
48
|
+
}
|
|
49
|
+
zipFile.close();
|
|
63
50
|
});
|
|
64
51
|
});
|
|
65
52
|
}
|
|
66
|
-
processZipFile(archiveName, zipFile, extractFilePredicate) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
53
|
+
async processZipFile(archiveName, zipFile, extractFilePredicate) {
|
|
54
|
+
const extractionPath = await promises_1.default.mkdtemp(path_1.default.join(this.basePath, `${archiveName}-`));
|
|
55
|
+
let files = [];
|
|
56
|
+
return new Promise((resolve, reject) => {
|
|
57
|
+
zipFile.readEntry();
|
|
58
|
+
zipFile.on("entry", (entry) => {
|
|
59
|
+
if (!extractFilePredicate(entry.fileName)) {
|
|
60
|
+
return zipFile.readEntry();
|
|
61
|
+
}
|
|
62
|
+
zipFile.openReadStream(entry, (err, readStream) => {
|
|
63
|
+
if (err) {
|
|
64
|
+
return reject(err);
|
|
75
65
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
const fileStream = (0, fs_1.createWriteStream)(filePath).on("finish", () => __awaiter(this, void 0, void 0, function* () {
|
|
82
|
-
Logger_1.log.info(`Extracted ${archiveName}:${entry.fileName}`);
|
|
83
|
-
files.push(yield this.getFileMetadata(filePath, entry.fileName));
|
|
84
|
-
zipFile.readEntry();
|
|
85
|
-
}));
|
|
86
|
-
readStream.pipe(fileStream);
|
|
66
|
+
const filePath = path_1.default.resolve(extractionPath, entry.fileName);
|
|
67
|
+
const fileStream = (0, fs_1.createWriteStream)(filePath).on("finish", async () => {
|
|
68
|
+
Logger_1.log.info(`Extracted ${archiveName}:${entry.fileName}`);
|
|
69
|
+
files.push(await this.getFileMetadata(filePath, entry.fileName));
|
|
70
|
+
zipFile.readEntry();
|
|
87
71
|
});
|
|
88
|
-
|
|
89
|
-
zipFile.once("end", () => {
|
|
90
|
-
resolve({ extractionPath, files });
|
|
72
|
+
readStream.pipe(fileStream);
|
|
91
73
|
});
|
|
92
74
|
});
|
|
75
|
+
zipFile.once("end", () => {
|
|
76
|
+
resolve({ extractionPath, files });
|
|
77
|
+
});
|
|
93
78
|
});
|
|
94
79
|
}
|
|
95
|
-
getFileMetadata(filePath, fileName) {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
};
|
|
104
|
-
});
|
|
80
|
+
async getFileMetadata(filePath, fileName) {
|
|
81
|
+
const { mtime } = await promises_1.default.stat(filePath);
|
|
82
|
+
return {
|
|
83
|
+
path: filePath,
|
|
84
|
+
name: fileName,
|
|
85
|
+
mtime,
|
|
86
|
+
type: "file", // backwards compatibility with the "decompress" output
|
|
87
|
+
};
|
|
105
88
|
}
|
|
106
89
|
}
|
|
107
90
|
exports.FileCompressor = FileCompressor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileCompressor.js","sourceRoot":"","sources":["../../../src/integration-engine/helpers/FileCompressor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FileCompressor.js","sourceRoot":"","sources":["../../../src/integration-engine/helpers/FileCompressor.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAC5B,2BAAuC;AACvC,2DAA6B;AAC7B,gDAAwB;AACxB,kDAAuD;AAGvD,qCAA+B;AAO/B,MAAa,cAAc;IAKvB,YAA6B,QAAgB;QAAhB,aAAQ,GAAR,QAAQ,CAAQ;IAAG,CAAC;IAE1C,KAAK,CAAC,aAAa,CAAC,MAAc,EAAE,oBAAyC;QAChF,MAAM,WAAW,GAAG,gBAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC1D,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACnC,eAAK,CAAC,UAAU,CAAC,MAAM,EAAE,cAAc,CAAC,WAAW,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE;gBACxE,IA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AAC,CAAC;IACP,CAAC;IAEO,KAAK,CAAC,eAAe,CAAC,QAAgB,EAAE,QAAgB;QAC5D,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,kBAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC1C,OAAO;YACH,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,QAAQ;YACd,KAAK;YACL,IAAI,EAAE,MAAM,EAAE,uDAAuD;SACxE,CAAC;IACN,CAAC;;AA7FL,wCA8FC;AA7FkB,0BAAW,GAAY;IAClC,WAAW,EAAE,IAAI;CACpB,CAAC"}
|
|
@@ -11,15 +11,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
13
|
};
|
|
14
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
15
|
exports.GeocodeApi = void 0;
|
|
25
16
|
const ioc_1 = require("../ioc");
|
|
@@ -37,7 +28,7 @@ let GeocodeApi = exports.GeocodeApi = class GeocodeApi {
|
|
|
37
28
|
* @param {number} lat Latitude
|
|
38
29
|
* @param {number} lng Longitude
|
|
39
30
|
*/
|
|
40
|
-
this.getAddressByLatLng = (lat, lng) =>
|
|
31
|
+
this.getAddressByLatLng = async (lat, lng) => {
|
|
41
32
|
const options = {
|
|
42
33
|
headers: {
|
|
43
34
|
"Cache-Control": "no-cache",
|
|
@@ -46,10 +37,10 @@ let GeocodeApi = exports.GeocodeApi = class GeocodeApi {
|
|
|
46
37
|
url: this.openStreetApiUrlReverse + "&lat=" + lat + "&lon=" + lng,
|
|
47
38
|
};
|
|
48
39
|
try {
|
|
49
|
-
const resp =
|
|
40
|
+
const resp = await fetch(options.url, {
|
|
50
41
|
headers: options.headers,
|
|
51
42
|
});
|
|
52
|
-
const resultAddr = (
|
|
43
|
+
const resultAddr = (await resp.json()).address;
|
|
53
44
|
let address = {
|
|
54
45
|
address_country: "",
|
|
55
46
|
address_formatted: "",
|
|
@@ -60,18 +51,18 @@ let GeocodeApi = exports.GeocodeApi = class GeocodeApi {
|
|
|
60
51
|
streetAddress += " " + resultAddr.house_number;
|
|
61
52
|
}
|
|
62
53
|
address.address_formatted += streetAddress + ", ";
|
|
63
|
-
address =
|
|
54
|
+
address = { ...address, ...{ street_address: streetAddress } };
|
|
64
55
|
}
|
|
65
56
|
if (resultAddr.city) {
|
|
66
57
|
if (resultAddr.postcode) {
|
|
67
58
|
address.address_formatted += resultAddr.postcode + " ";
|
|
68
|
-
address =
|
|
59
|
+
address = { ...address, ...{ postal_code: resultAddr.postcode } };
|
|
69
60
|
}
|
|
70
61
|
address.address_formatted += resultAddr.city;
|
|
71
|
-
address =
|
|
62
|
+
address = { ...address, ...{ address_locality: resultAddr.city } };
|
|
72
63
|
if (resultAddr.suburb) {
|
|
73
64
|
address.address_formatted += "-" + resultAddr.suburb;
|
|
74
|
-
address =
|
|
65
|
+
address = { ...address, ...{ address_region: resultAddr.suburb } };
|
|
75
66
|
}
|
|
76
67
|
address.address_formatted += ", ";
|
|
77
68
|
}
|
|
@@ -82,14 +73,14 @@ let GeocodeApi = exports.GeocodeApi = class GeocodeApi {
|
|
|
82
73
|
catch (err) {
|
|
83
74
|
throw new errors_1.RecoverableError("Retrieving of the open street map nominatim data failed.", this.constructor.name, err);
|
|
84
75
|
}
|
|
85
|
-
}
|
|
76
|
+
};
|
|
86
77
|
/**
|
|
87
78
|
* Gets Geo by Address by OpenStreetMap API.
|
|
88
79
|
*
|
|
89
80
|
* @param {string} street
|
|
90
81
|
* @param {string} city
|
|
91
82
|
*/
|
|
92
|
-
this.getGeoByAddress = (street, city) =>
|
|
83
|
+
this.getGeoByAddress = async (street, city) => {
|
|
93
84
|
const options = {
|
|
94
85
|
headers: {
|
|
95
86
|
"Cache-Control": "no-cache",
|
|
@@ -98,8 +89,8 @@ let GeocodeApi = exports.GeocodeApi = class GeocodeApi {
|
|
|
98
89
|
url: this.openStreetApiUrlSearch + "&street=" + encodeURI(street) + "&city=" + encodeURI(city),
|
|
99
90
|
};
|
|
100
91
|
try {
|
|
101
|
-
const resp =
|
|
102
|
-
const result =
|
|
92
|
+
const resp = await fetch(options.url, { headers: options.headers });
|
|
93
|
+
const result = await resp.json();
|
|
103
94
|
if (result.length === 0) {
|
|
104
95
|
throw new errors_1.RecoverableError("Geo coordinates were not found for address: '" + street + ", " + city + "'", this.constructor.name);
|
|
105
96
|
}
|
|
@@ -109,14 +100,14 @@ let GeocodeApi = exports.GeocodeApi = class GeocodeApi {
|
|
|
109
100
|
this.log.error(err);
|
|
110
101
|
throw new errors_1.RecoverableError("Retrieving of the open street map nominatim data failed.", this.constructor.name, err);
|
|
111
102
|
}
|
|
112
|
-
}
|
|
103
|
+
};
|
|
113
104
|
/**
|
|
114
105
|
* Gets Address by Coordinates from Photon API.
|
|
115
106
|
*
|
|
116
107
|
* @param {number} lat Latitude
|
|
117
108
|
* @param {number} lng Longitude
|
|
118
109
|
*/
|
|
119
|
-
this.getAddressByLatLngFromPhoton = (lat, lng) =>
|
|
110
|
+
this.getAddressByLatLngFromPhoton = async (lat, lng) => {
|
|
120
111
|
const urlWithParams = new URL(this.photonApiUrlReverse);
|
|
121
112
|
urlWithParams.searchParams.append("lon", lng.toString());
|
|
122
113
|
urlWithParams.searchParams.append("lat", lat.toString());
|
|
@@ -129,7 +120,7 @@ let GeocodeApi = exports.GeocodeApi = class GeocodeApi {
|
|
|
129
120
|
};
|
|
130
121
|
}
|
|
131
122
|
try {
|
|
132
|
-
const data =
|
|
123
|
+
const data = await fetch(urlWithParams.toString(), {
|
|
133
124
|
headers,
|
|
134
125
|
}).then((response) => response.json());
|
|
135
126
|
const addressPropsFromPhoton = data.features[0].properties;
|
|
@@ -146,15 +137,14 @@ let GeocodeApi = exports.GeocodeApi = class GeocodeApi {
|
|
|
146
137
|
catch (err) {
|
|
147
138
|
throw new errors_1.RecoverableError("Retrieving address from Photon failed.", this.constructor.name, err);
|
|
148
139
|
}
|
|
149
|
-
}
|
|
140
|
+
};
|
|
150
141
|
/**
|
|
151
142
|
* Gets Address by Coordinates from Photon API extended version.
|
|
152
143
|
*
|
|
153
144
|
* @param {number} lat Latitude
|
|
154
145
|
* @param {number} lng Longitude
|
|
155
146
|
*/
|
|
156
|
-
this.getExtendedAddressFromPhoton = (lat, lng) =>
|
|
157
|
-
var _a, _b, _c, _d;
|
|
147
|
+
this.getExtendedAddressFromPhoton = async (lat, lng) => {
|
|
158
148
|
const urlWithParams = new URL(this.photonApiUrlReverse);
|
|
159
149
|
urlWithParams.searchParams.append("lon", lng.toString());
|
|
160
150
|
urlWithParams.searchParams.append("lat", lat.toString());
|
|
@@ -169,12 +159,12 @@ let GeocodeApi = exports.GeocodeApi = class GeocodeApi {
|
|
|
169
159
|
};
|
|
170
160
|
}
|
|
171
161
|
try {
|
|
172
|
-
data =
|
|
162
|
+
data = await fetch(urlWithParams.toString(), {
|
|
173
163
|
headers,
|
|
174
164
|
}).then((response) => response.json());
|
|
175
|
-
if (!
|
|
165
|
+
if (!data?.features[0]?.properties?.city && !data?.features[0]?.properties?.housenumber) {
|
|
176
166
|
urlWithParams.searchParams.set("query_string_filter", "osm_key:highway");
|
|
177
|
-
data =
|
|
167
|
+
data = await fetch(urlWithParams.toString(), {
|
|
178
168
|
headers,
|
|
179
169
|
}).then((response) => response.json());
|
|
180
170
|
}
|
|
@@ -193,7 +183,7 @@ let GeocodeApi = exports.GeocodeApi = class GeocodeApi {
|
|
|
193
183
|
catch (err) {
|
|
194
184
|
throw new errors_1.RecoverableError("Retrieving address from Photon failed.", this.constructor.name, err);
|
|
195
185
|
}
|
|
196
|
-
}
|
|
186
|
+
};
|
|
197
187
|
this.openStreetApiUrlReverse = config.OPEN_STREET_MAP_API_URL_REVERSE;
|
|
198
188
|
this.openStreetApiUrlSearch = config.OPEN_STREET_MAP_API_URL_SEARCH;
|
|
199
189
|
this.photonApiUrlReverse = config.PHOTON_MAP_API_URL_REVERSE;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeocodeApi.js","sourceRoot":"","sources":["../../../src/integration-engine/helpers/GeocodeApi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GeocodeApi.js","sourceRoot":"","sources":["../../../src/integration-engine/helpers/GeocodeApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEA,gCAAyC;AACzC,4CAAmD;AACnD,uCAA8C;AAY9C;;GAEG;AAEI,IAAM,UAAU,wBAAhB,MAAM,UAAU;IAMnB,YACmC,MAAsB,EACtB,GAA6B;QAAZ,QAAG,GAAH,GAAG,CAAS;QAQhE;;;;;WAKG;QACI,uBAAkB,GAAG,KAAK,EAAE,GAAW,EAAE,GAAW,EAA2B,EAAE;YACpF,MAAM,OAAO,GAAG;gBACZ,OAAO,EAAE;oBACL,eAAe,EAAE,UAAU;oBAC3B,OAAO,EAAE,wBAAwB;iBACpC;gBACD,GAAG,EAAE,IAAI,CAAC,uBAAuB,GAAG,OAAO,GAAG,GAAG,GAAG,OAAO,GAAG,GAAG;aACpE,CAAC;YAEF,IAAI;gBACA,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;oBAClC,OAAO,EAAE,OAAO,CAAC,OAAO;iBAC3B,CAAC,CAAC;gBACH,MAAM,UAA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