@golemio/core 1.2.6-dev.507011079 → 1.2.7-dev.513012959
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/HealthCheck.d.ts +0 -1
- package/dist/helpers/HealthCheck.js +0 -1
- package/dist/helpers/HealthCheck.js.map +1 -1
- package/dist/input-gateway/config/abstract.d.ts +0 -10
- package/dist/input-gateway/config/config.js +0 -12
- package/dist/input-gateway/config/config.js.map +1 -1
- package/dist/input-gateway/connectors/index.d.ts +0 -1
- package/dist/input-gateway/connectors/index.js +0 -1
- package/dist/input-gateway/connectors/index.js.map +1 -1
- package/dist/input-gateway/helpers/Logger.js +2 -48
- package/dist/input-gateway/helpers/Logger.js.map +1 -1
- package/dist/integration-engine/config/abstract.d.ts +0 -10
- package/dist/integration-engine/config/config.js +0 -12
- package/dist/integration-engine/config/config.js.map +1 -1
- package/dist/integration-engine/connectors/index.d.ts +0 -1
- package/dist/integration-engine/connectors/index.js +0 -1
- package/dist/integration-engine/connectors/index.js.map +1 -1
- package/dist/integration-engine/helpers/Logger.js +1 -23
- package/dist/integration-engine/helpers/Logger.js.map +1 -1
- package/dist/output-gateway/routes/AbstractHistoryRouter.d.ts +12 -0
- package/dist/output-gateway/routes/AbstractHistoryRouter.js +49 -0
- package/dist/output-gateway/routes/AbstractHistoryRouter.js.map +1 -0
- package/dist/output-gateway/routes/HistoryRouter.d.ts +3 -8
- package/dist/output-gateway/routes/HistoryRouter.js +4 -36
- package/dist/output-gateway/routes/HistoryRouter.js.map +1 -1
- package/dist/output-gateway/routes/interfaces/IHistoryFilterParameters.d.ts +7 -0
- package/dist/output-gateway/routes/interfaces/IHistoryFilterParameters.js +3 -0
- package/dist/output-gateway/routes/interfaces/IHistoryFilterParameters.js.map +1 -0
- package/package.json +2 -2
- package/dist/input-gateway/connectors/InfluxDBConnector.d.ts +0 -9
- package/dist/input-gateway/connectors/InfluxDBConnector.js +0 -60
- package/dist/input-gateway/connectors/InfluxDBConnector.js.map +0 -1
- package/dist/integration-engine/connectors/InfluxConnector.d.ts +0 -9
- package/dist/integration-engine/connectors/InfluxConnector.js +0 -62
- package/dist/integration-engine/connectors/InfluxConnector.js.map +0 -1
- package/dist/shared/influx.d.ts +0 -2
- package/dist/shared/influx.js +0 -23
- package/dist/shared/influx.js.map +0 -1
|
@@ -15,7 +15,6 @@ var Service;
|
|
|
15
15
|
Service["POSTGRES"] = "PostgreSQL";
|
|
16
16
|
Service["MONGO"] = "MongoDB";
|
|
17
17
|
Service["REDIS"] = "RedisDB";
|
|
18
|
-
Service["INFLUX"] = "InfluxDB";
|
|
19
18
|
Service["RABBITMQ"] = "RabbitMQ";
|
|
20
19
|
})(Service = exports.Service || (exports.Service = {}));
|
|
21
20
|
var Status;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HealthCheck.js","sourceRoot":"","sources":["../../src/helpers/HealthCheck.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"HealthCheck.js","sourceRoot":"","sources":["../../src/helpers/HealthCheck.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,IAAY,OAKX;AALD,WAAY,OAAO;IACf,kCAAuB,CAAA;IACvB,4BAAiB,CAAA;IACjB,4BAAiB,CAAA;IACjB,gCAAqB,CAAA;AACzB,CAAC,EALW,OAAO,GAAP,eAAO,KAAP,eAAO,QAKlB;AAED,IAAK,MAGJ;AAHD,WAAK,MAAM;IACP,mBAAS,CAAA;IACT,uBAAa,CAAA;AACjB,CAAC,EAHI,MAAM,KAAN,MAAM,QAGV;AAiBM,MAAM,gBAAgB,GAAG,CAAO,QAAyB,EAA0B,EAAE;IACxF,IAAI;QACA,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,GAAG,CAC9B,QAAQ,CAAC,GAAG,CAAC,CAAO,OAAO,EAAE,EAAE;YAC3B,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAC7F,CAAC,CAAA,CAAC,CACL,CAAC;QACF,MAAM,SAAS,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC;QACpE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;KACpD;IAAC,OAAO,GAAG,EAAE;QACV,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;KAC1C;AACL,CAAC,CAAA,CAAC;AAZW,QAAA,gBAAgB,oBAY3B"}
|
|
@@ -9,16 +9,6 @@ export interface IConfiguration {
|
|
|
9
9
|
app_version: string | undefined;
|
|
10
10
|
app_name: string;
|
|
11
11
|
colorful_logs: string | undefined;
|
|
12
|
-
influx_db: {
|
|
13
|
-
database: string | undefined;
|
|
14
|
-
enabled: boolean;
|
|
15
|
-
hosts: Array<{
|
|
16
|
-
host: string | undefined;
|
|
17
|
-
port: number;
|
|
18
|
-
}>;
|
|
19
|
-
password: string | undefined;
|
|
20
|
-
username: string | undefined;
|
|
21
|
-
};
|
|
22
12
|
log_level: string | undefined;
|
|
23
13
|
node_env: string;
|
|
24
14
|
payload_limit_csv: string | undefined;
|
|
@@ -9,18 +9,6 @@ exports.config = {
|
|
|
9
9
|
app_version: process.env.npm_package_version,
|
|
10
10
|
app_name: process.env.APP_NAME || "input-gateway",
|
|
11
11
|
colorful_logs: process.env.COLORFUL_LOGS,
|
|
12
|
-
influx_db: {
|
|
13
|
-
database: process.env.INFLUX_DB_DATABASE,
|
|
14
|
-
enabled: process.env.INFLUX_DB_ENABLED === "true",
|
|
15
|
-
hosts: [
|
|
16
|
-
{
|
|
17
|
-
host: process.env.INFLUX_DB_HOST,
|
|
18
|
-
port: parseInt(process.env.INFLUX_DB_PORT, 10),
|
|
19
|
-
},
|
|
20
|
-
],
|
|
21
|
-
password: process.env.INFLUX_DB_PASSWORD,
|
|
22
|
-
username: process.env.INFLUX_DB_USERNAME,
|
|
23
|
-
},
|
|
24
12
|
log_level: process.env.LOG_LEVEL,
|
|
25
13
|
node_env: process.env.NODE_ENV || "development",
|
|
26
14
|
payload_limit_csv: process.env.PAYLOAD_LIMIT_CSV,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/input-gateway/config/config.ts"],"names":[],"mappings":";;;;AAAA,mCAAiC;AACjC,4CAAwC;AAGxC,MAAM,oBAAoB,GAAG,IAAI,uBAAY,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC;AAEpE,QAAA,MAAM,GAAmB;IAClC,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB;IAC5C,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,eAAe;IACjD,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa;IACxC,SAAS,EAAE
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/input-gateway/config/config.ts"],"names":[],"mappings":";;;;AAAA,mCAAiC;AACjC,4CAAwC;AAGxC,MAAM,oBAAoB,GAAG,IAAI,uBAAY,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC;AAEpE,QAAA,MAAM,GAAmB;IAClC,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB;IAC5C,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,eAAe;IACjD,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa;IACxC,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,SAAS;IAChC,QAAQ,EAAE,OAAO,CAAC,G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AAC,GAAG,CAAC,kBAAkB;QAC3C,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY,KAAK,MAAM;QAC1C,gBAAgB,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;KAClG;IACD,OAAO,EAAE;QACL,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe,KAAK,MAAM;QAC/C,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,YAAsB,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI;QACxF,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,EAAE;KAC3C;IACD,SAAS,EAAE;QACP,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK,MAAM;QACpD,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB;QACzC,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS;QACnG,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI;KACvG;CACJ,CAAC"}
|
|
@@ -12,5 +12,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
/* ig/connectors/index.ts */
|
|
14
14
|
__exportStar(require("./AMQPConnector"), exports);
|
|
15
|
-
__exportStar(require("./InfluxDBConnector"), exports);
|
|
16
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/input-gateway/connectors/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4BAA4B;AAC5B,kDAAgC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/input-gateway/connectors/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4BAA4B;AAC5B,kDAAgC"}
|
|
@@ -14,7 +14,6 @@ const errors_1 = require("@golemio/errors");
|
|
|
14
14
|
const events_1 = require("events");
|
|
15
15
|
const Logger_1 = require("../../helpers/Logger");
|
|
16
16
|
const config_1 = require("../config");
|
|
17
|
-
const connectors_1 = require("../connectors");
|
|
18
17
|
var LoggerEventType;
|
|
19
18
|
(function (LoggerEventType) {
|
|
20
19
|
LoggerEventType["ResponseTimes"] = "response-time:middleware";
|
|
@@ -32,55 +31,10 @@ exports.requestLogger = requestLogger;
|
|
|
32
31
|
const loggerEvents = new events_1.EventEmitter();
|
|
33
32
|
exports.loggerEvents = loggerEvents;
|
|
34
33
|
loggerEvents.on(LoggerEventType.ResponseTimes, ({ req, name, elapsedMS }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
35
|
-
|
|
36
|
-
try {
|
|
37
|
-
const influxDB = connectors_1.InfluxConnector.getConnection();
|
|
38
|
-
yield influxDB.writePoints([
|
|
39
|
-
{
|
|
40
|
-
fields: {
|
|
41
|
-
response_time: elapsedMS,
|
|
42
|
-
},
|
|
43
|
-
measurement: "response_times",
|
|
44
|
-
tags: {
|
|
45
|
-
function: name,
|
|
46
|
-
method: req.method,
|
|
47
|
-
url: req.originalUrl,
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
]);
|
|
51
|
-
}
|
|
52
|
-
catch (err) {
|
|
53
|
-
loggerEvents.emit("error", new errors_1.CustomError(`Error while saving data to InfluxDB!`, true, LoggerEventType.ResponseTimes, undefined, new errors_1.CustomError(`${req.method} ${req.originalUrl} : ${name} ${elapsedMS}ms`, true, undefined, undefined, err)));
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
logger.verbose(`ResponseTimesLogger: ${req.method} ${req.originalUrl} : ${name} ${elapsedMS}ms`);
|
|
58
|
-
}
|
|
34
|
+
logger.verbose(`ResponseTimesLogger: ${req.method} ${req.originalUrl} : ${name} ${elapsedMS}ms`);
|
|
59
35
|
}));
|
|
60
36
|
loggerEvents.on(LoggerEventType.NumberOfRecords, ({ req, numberOfRecords }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
61
|
-
|
|
62
|
-
const influxDB = connectors_1.InfluxConnector.getConnection();
|
|
63
|
-
try {
|
|
64
|
-
yield influxDB.writePoints([
|
|
65
|
-
{
|
|
66
|
-
fields: {
|
|
67
|
-
number_of_records: numberOfRecords,
|
|
68
|
-
},
|
|
69
|
-
measurement: "number_of_records",
|
|
70
|
-
tags: {
|
|
71
|
-
method: req.method,
|
|
72
|
-
url: req.originalUrl,
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
]);
|
|
76
|
-
}
|
|
77
|
-
catch (err) {
|
|
78
|
-
loggerEvents.emit("error", new errors_1.CustomError(`Error while saving data to InfluxDB!`, true, LoggerEventType.NumberOfRecords, undefined, new errors_1.CustomError(`${req.method} ${req.originalUrl} : ${numberOfRecords}`, true, undefined, undefined, err)));
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
logger.verbose(`NumberOfRecordsLogger: ${req.method} ${req.originalUrl} : ${numberOfRecords}`);
|
|
83
|
-
}
|
|
37
|
+
logger.verbose(`NumberOfRecordsLogger: ${req.method} ${req.originalUrl} : ${numberOfRecords}`);
|
|
84
38
|
}));
|
|
85
39
|
loggerEvents.on("error", (error) => {
|
|
86
40
|
errors_1.ErrorHandler.handle(error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logger.js","sourceRoot":"","sources":["../../../src/input-gateway/helpers/Log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AEH,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAA0B,EAAE,EAAE;IACpD,qBAAY,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC,CAAC,CAAC"}
|
|
@@ -21,16 +21,6 @@ export interface IConfiguration {
|
|
|
21
21
|
app_version: string | undefined;
|
|
22
22
|
app_name: string;
|
|
23
23
|
datasources: Record<string, any>;
|
|
24
|
-
influx_db: {
|
|
25
|
-
database: string | undefined;
|
|
26
|
-
enabled: boolean;
|
|
27
|
-
hosts: Array<{
|
|
28
|
-
host: string | undefined;
|
|
29
|
-
port: number;
|
|
30
|
-
}>;
|
|
31
|
-
password: string | undefined;
|
|
32
|
-
username: string | undefined;
|
|
33
|
-
};
|
|
34
24
|
port: string | undefined;
|
|
35
25
|
queuesBlacklist: Record<string, string[]>;
|
|
36
26
|
s3: {
|
|
@@ -23,18 +23,6 @@ exports.config = {
|
|
|
23
23
|
app_version: process.env.npm_package_version,
|
|
24
24
|
app_name: process.env.APP_NAME || "integration-engine",
|
|
25
25
|
datasources: new _helpers_1.ConfigLoader("datasources").conf,
|
|
26
|
-
influx_db: {
|
|
27
|
-
database: process.env.INFLUX_DB_DATABASE,
|
|
28
|
-
enabled: process.env.INFLUX_DB_ENABLED === "true",
|
|
29
|
-
hosts: [
|
|
30
|
-
{
|
|
31
|
-
host: process.env.INFLUX_DB_HOST,
|
|
32
|
-
port: parseInt(process.env.INFLUX_DB_PORT, 10),
|
|
33
|
-
},
|
|
34
|
-
],
|
|
35
|
-
password: process.env.INFLUX_DB_PASSWORD,
|
|
36
|
-
username: process.env.INFLUX_DB_USERNAME,
|
|
37
|
-
},
|
|
38
26
|
port: process.env.PORT,
|
|
39
27
|
queuesBlacklist: new _helpers_1.ConfigLoader("queuesBlacklist", true).conf,
|
|
40
28
|
s3: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/integration-engine/config/config.ts"],"names":[],"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AC,4BAAsC,EAAE,EAAE,CAAC,IAAI,IAAI;KAClG;IACD,OAAO,EAAE;QACL,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe,KAAK,MAAM;QAC/C,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,YAAsB,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI;QACxF,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,EAAE;KAC3C;IACD,SAAS,EAAE;QACP,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK,MAAM;QACpD,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB;QACzC,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS;QACnG,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI;KACvG;IACD,gBAAgB,EAAE;QACd,iBAAiB,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,IAAI,GAAG;QACnF,qHAAqH;QACrH,uBAAuB,EAAE,OAAO,CAAC,GAAG,CAAC,yCAAyC;YAC1E,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,yCAAyC,CAAC;YAC/D,CAAC,CAAC,CAAC;KACV;CACJ,CAAC"}
|
|
@@ -12,7 +12,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
/* ie/connectors/index.ts */
|
|
14
14
|
__exportStar(require("./AMQPConnector"), exports);
|
|
15
|
-
__exportStar(require("./InfluxConnector"), exports);
|
|
16
15
|
__exportStar(require("./MongoConnector"), exports);
|
|
17
16
|
__exportStar(require("./PostgresConnector"), exports);
|
|
18
17
|
__exportStar(require("./RedisConnector"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/integration-engine/connectors/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4BAA4B;AAC5B,kDAAgC;AAChC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/integration-engine/connectors/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4BAA4B;AAC5B,kDAAgC;AAChC,mDAAiC;AACjC,sDAAoC;AACpC,mDAAiC"}
|
|
@@ -16,7 +16,6 @@ const events_1 = require("events");
|
|
|
16
16
|
const Logger_1 = require("../../helpers/Logger");
|
|
17
17
|
const ErrorLog_1 = require("../../schema-definitions/ErrorLog");
|
|
18
18
|
const config_1 = require("../config");
|
|
19
|
-
const connectors_1 = require("../connectors");
|
|
20
19
|
const models_1 = require("../models");
|
|
21
20
|
var LoggerEventType;
|
|
22
21
|
(function (LoggerEventType) {
|
|
@@ -35,28 +34,7 @@ exports.requestLogger = requestLogger;
|
|
|
35
34
|
const loggerEvents = new events_1.EventEmitter();
|
|
36
35
|
exports.loggerEvents = loggerEvents;
|
|
37
36
|
loggerEvents.on(LoggerEventType.NumberOfRecords, ({ name, numberOfRecords }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
38
|
-
|
|
39
|
-
const influxDB = connectors_1.InfluxConnector.getConnection();
|
|
40
|
-
try {
|
|
41
|
-
yield influxDB.writePoints([
|
|
42
|
-
{
|
|
43
|
-
fields: {
|
|
44
|
-
number_of_records: numberOfRecords,
|
|
45
|
-
},
|
|
46
|
-
measurement: "number_of_records",
|
|
47
|
-
tags: {
|
|
48
|
-
name,
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
]);
|
|
52
|
-
}
|
|
53
|
-
catch (err) {
|
|
54
|
-
loggerEvents.emit("error", new errors_1.CustomError("Error while saving data to InfluxDB.", true, LoggerEventType.NumberOfRecords, 1004, err));
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
logger.verbose(`NumberOfRecordsLogger: ${name} : ${numberOfRecords}`);
|
|
59
|
-
}
|
|
37
|
+
logger.verbose(`NumberOfRecordsLogger: ${name} : ${numberOfRecords}`);
|
|
60
38
|
}));
|
|
61
39
|
loggerEvents.on("error", (error) => {
|
|
62
40
|
errors_1.ErrorHandler.handle(error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logger.js","sourceRoot":"","sources":["../../../src/integration-engine/helpers/Logger.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAA4D;AAC5D,kDAA+C;AAC/C,mCAAsC;AACtC,iDAAoE;AACpE,gEAAyC;AACzC,sCAAoC;AACpC,
|
|
1
|
+
{"version":3,"file":"Logger.js","sourceRoot":"","sources":["../../../src/integration-engine/helpers/Logger.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAA4D;AAC5D,kDAA+C;AAC/C,mCAAsC;AACtC,iDAAoE;AACpE,gEAAyC;AACzC,sCAAoC;AACpC,sCAA2C;AAW3C,IAAK,eAGJ;AAHD,WAAK,eAAe;IAChB,wDAAqC,CAAA;IACrC,0DAAuC,CAAA;AAC3C,CAAC,EAHI,eAAe,KAAf,eAAe,QAGnB;AAoEqC,0CAAe;AA7DrD,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,qBAAY,EAAC;IAC5B,WAAW,EAAE,oBAAoB;IACjC,OAAO,EAAE,eAAM,CAAC,QAAQ;IACxB,QAAQ,EAAE,eAAM,CAAC,SAAS;CAC7B,CAAC,CAAC;AAyDgB,qBAAG;AAvDtB,MAAM,aAAa,GAAG,IAAA,4BAAmB,GAAE,CAAC;AAuDW,sCAAa;AAtDpE,MAAM,YAA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AW,CAAC,gBAAgB,IAAI,IAAI,CAAC;YAClE,eAAe,CAAC,IAAI,GAAG,WAAW,CAAC,UAAU,IAAI,IAAI,CAAC;YACtD,eAAe,CAAC,MAAM,GAAG,WAAW,CAAC,YAAY,IAAI,IAAI,CAAC;SAC7D;QAED,MAAM,eAAe,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;KAC/C;IAAC,OAAO,GAAG,EAAE;QACV,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KAC1B;AACL,CAAC,CAAA,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IBaseModel } from "../models/interfaces/IBaseModel";
|
|
2
|
+
import { BaseRouter } from "./BaseRouter";
|
|
3
|
+
import { NextFunction, Request, Response, Router } from "express";
|
|
4
|
+
import { ValidationChain } from "express-validator/check";
|
|
5
|
+
export declare abstract class AbstractHistoryRouter extends BaseRouter {
|
|
6
|
+
router: Router;
|
|
7
|
+
protected model: IBaseModel;
|
|
8
|
+
constructor(inModel: IBaseModel);
|
|
9
|
+
initRoutes: (expire?: string | number | undefined) => Promise<void>;
|
|
10
|
+
GetAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
11
|
+
protected abstract GetIdQueryParamWithCorrectType(): Promise<ValidationChain>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AbstractHistoryRouter = void 0;
|
|
13
|
+
const redis_1 = require("../redis");
|
|
14
|
+
const BaseRouter_1 = require("./BaseRouter");
|
|
15
|
+
const Validation_1 = require("../Validation");
|
|
16
|
+
const express_1 = require("express");
|
|
17
|
+
const check_1 = require("express-validator/check");
|
|
18
|
+
const lodash_1 = require("lodash");
|
|
19
|
+
class AbstractHistoryRouter extends BaseRouter_1.BaseRouter {
|
|
20
|
+
constructor(inModel) {
|
|
21
|
+
super();
|
|
22
|
+
// Assign router to the express.Router() instance
|
|
23
|
+
this.router = (0, express_1.Router)();
|
|
24
|
+
this.initRoutes = (expire) => __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
const sensorIdParam = yield this.GetIdQueryParamWithCorrectType();
|
|
26
|
+
this.router.get("/", (0, redis_1.useCacheMiddleware)(expire), [(0, check_1.query)("from").optional().isISO8601(), (0, check_1.query)("to").optional().isISO8601(), sensorIdParam], Validation_1.pagination, (0, Validation_1.paginationLimitMiddleware)("HistoryRouter"), Validation_1.checkErrors, this.GetAll);
|
|
27
|
+
});
|
|
28
|
+
this.GetAll = (req, res, next) => __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
const timestampFrom = new Date(req.query.from).getTime();
|
|
30
|
+
const timestampTo = new Date(req.query.to).getTime();
|
|
31
|
+
try {
|
|
32
|
+
const data = yield this.model.GetAll({
|
|
33
|
+
from: timestampFrom,
|
|
34
|
+
limit: (0, lodash_1.toNumber)(req.query.limit),
|
|
35
|
+
offset: (0, lodash_1.toNumber)(req.query.offset),
|
|
36
|
+
sensorId: req.query.sensorId,
|
|
37
|
+
to: timestampTo,
|
|
38
|
+
});
|
|
39
|
+
res.status(200).send(data);
|
|
40
|
+
}
|
|
41
|
+
catch (err) {
|
|
42
|
+
next(err);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
this.model = inModel;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.AbstractHistoryRouter = AbstractHistoryRouter;
|
|
49
|
+
//# sourceMappingURL=AbstractHistoryRouter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AbstractHistoryRouter.js","sourceRoot":"","sources":["../../../src/output-gateway/routes/AbstractHistoryRouter.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,oCAA+C;AAC/C,6CAAmD;AACnD,8CAAoF;AACpF,qCAAkE;AAClE,mDAAiE;AACjE,mCAAkC;AAElC,MAAsB,qBAAsB,SAAQ,uBAAU;IAM1D,YAAmB,OAAmB;QAClC,KAAK,EAAE,CAAC;QANZ,iDAAiD;QAC1C,WAAM,GAAW,IAAA,gBAAM,GAAE,CAAC;QAS1B,eAAU,GAAG,CAAO,MAAwB,EAAE,EAAE;YACnD,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,8BAA8B,EAAE,CAAC;YAClE,IAAI,CAAC,MAAM,CAAC,GAAG,CACX,GAAG,EACH,IAAA,0BAAkB,EAAC,MAAM,CAAC,EAC1B,CAAC,IAAA,aAAK,EAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,EAAE,IAAA,aAAK,EAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,EAAE,aAAa,CAAC,EACzF,uBAAU,EACV,IAAA,sCAAyB,EAAC,eAAe,CAAC,EAC1C,wBAAW,EACX,IAAI,CAAC,MAAM,CACd,CAAC;QACN,CAAC,CAAA,CAAC;QAEK,WAAM,GAAG,CAAO,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAE,EAAE;YACtE,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAc,CAAC,CAAC,OAAO,EAAE,CAAC;YACnE,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAY,CAAC,CAAC,OAAO,EAAE,CAAC;YAE/D,IAAI;gBACA,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;oBACjC,IAAI,EAAE,aAAa;oBACnB,KAAK,EAAE,IAAA,iBAAQ,EAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC;oBAChC,MAAM,EAAE,IAAA,iBAAQ,EAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC;oBAClC,QAAQ,EAAE,GAAG,CAAC,KAAK,CAAC,QAAkB;oBACtC,EAAE,EAAE,WAAW;iBAClB,CAAC,CAAC;gBAEH,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aAC9B;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,GAAG,CAAC,CAAC;aACb;QACL,CAAC,CAAA,CAAC;QAjCE,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;IACzB,CAAC;CAmCJ;AA5CD,sDA4CC"}
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import { NextFunction, Request, Response, Router } from "express";
|
|
2
|
-
import { ValidationChain } from "express-validator/check";
|
|
3
1
|
import { HistoryModel } from "../models";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
protected model: HistoryModel;
|
|
2
|
+
import { ValidationChain } from "express-validator/check";
|
|
3
|
+
import { AbstractHistoryRouter } from "./AbstractHistoryRouter";
|
|
4
|
+
export declare class HistoryRouter extends AbstractHistoryRouter {
|
|
8
5
|
constructor(inModel: HistoryModel);
|
|
9
|
-
initRoutes: (expire?: string | number | undefined) => Promise<void>;
|
|
10
|
-
GetAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
11
6
|
protected GetIdQueryParamWithCorrectType: () => Promise<ValidationChain>;
|
|
12
7
|
}
|
|
@@ -10,44 +10,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.HistoryRouter = void 0;
|
|
13
|
-
const
|
|
13
|
+
const Logger_1 = require("../Logger");
|
|
14
14
|
const check_1 = require("express-validator/check");
|
|
15
15
|
const mongoose_1 = require("mongoose");
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
const redis_1 = require("../redis");
|
|
19
|
-
const Validation_1 = require("../Validation");
|
|
20
|
-
const BaseRouter_1 = require("./BaseRouter");
|
|
21
|
-
class HistoryRouter extends BaseRouter_1.BaseRouter {
|
|
16
|
+
const AbstractHistoryRouter_1 = require("./AbstractHistoryRouter");
|
|
17
|
+
class HistoryRouter extends AbstractHistoryRouter_1.AbstractHistoryRouter {
|
|
22
18
|
constructor(inModel) {
|
|
23
|
-
super();
|
|
24
|
-
// Assign router to the express.Router() instance
|
|
25
|
-
this.router = (0, express_1.Router)();
|
|
26
|
-
this.initRoutes = (expire) => __awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
const sensorIdParam = yield this.GetIdQueryParamWithCorrectType();
|
|
28
|
-
this.router.get("/", (0, redis_1.useCacheMiddleware)(expire), [(0, check_1.query)("from").optional().isISO8601(), (0, check_1.query)("to").optional().isISO8601(), sensorIdParam], Validation_1.pagination, (0, Validation_1.paginationLimitMiddleware)("HistoryRouter"), Validation_1.checkErrors, this.GetAll);
|
|
29
|
-
});
|
|
30
|
-
this.GetAll = (req, res, next) => __awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
const timestampFrom = new Date(req.query.from).getTime();
|
|
32
|
-
const timestampTo = new Date(req.query.to).getTime();
|
|
33
|
-
let sensorIds = req.query.ids;
|
|
34
|
-
if (sensorIds) {
|
|
35
|
-
sensorIds = this.ConvertToArray(sensorIds);
|
|
36
|
-
}
|
|
37
|
-
try {
|
|
38
|
-
const data = yield this.model.GetAll({
|
|
39
|
-
from: timestampFrom,
|
|
40
|
-
limit: (0, lodash_1.toNumber)(req.query.limit),
|
|
41
|
-
offset: (0, lodash_1.toNumber)(req.query.offset),
|
|
42
|
-
sensorId: req.query.sensorId,
|
|
43
|
-
to: timestampTo,
|
|
44
|
-
});
|
|
45
|
-
res.status(200).send(data);
|
|
46
|
-
}
|
|
47
|
-
catch (err) {
|
|
48
|
-
next(err);
|
|
49
|
-
}
|
|
50
|
-
});
|
|
19
|
+
super(inModel);
|
|
51
20
|
this.GetIdQueryParamWithCorrectType = () => __awaiter(this, void 0, void 0, function* () {
|
|
52
21
|
let sensorIdParam;
|
|
53
22
|
// @ts-ignore
|
|
@@ -71,7 +40,6 @@ class HistoryRouter extends BaseRouter_1.BaseRouter {
|
|
|
71
40
|
return sensorIdParam;
|
|
72
41
|
});
|
|
73
42
|
});
|
|
74
|
-
this.model = inModel;
|
|
75
43
|
}
|
|
76
44
|
}
|
|
77
45
|
exports.HistoryRouter = HistoryRouter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HistoryRouter.js","sourceRoot":"","sources":["../../../src/output-gateway/routes/HistoryRouter.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"HistoryRouter.js","sourceRoot":"","sources":["../../../src/output-gateway/routes/HistoryRouter.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sCAAiC;AAEjC,mDAAiE;AACjE,uCAAkC;AAClC,mEAAgE;AAEhE,MAAa,aAAc,SAAQ,6CAAqB;IACpD,YAAmB,OAAqB;QACpC,KAAK,CAAC,OAAO,CAAC,CAAC;QAGT,mCAA8B,GAAG,GAAmC,EAAE;YAC5E,IAAI,aAA8B,CAAC;YACnC,aAAa;YACb,OAAO,MAAM,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;gBAChD,gEAAgE;gBAChE,MAAM,KAAK,GAAI,IAAI,CAAC,KAAsB,CAAC,+BAA+B,CAAC;gBAC3E,IAAI,OAAO,GAAW,wBAAwB,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,qBAAqB,GAAG,KAAK,GAAG,YAAY,CAAC;gBACrH,mDAAmD;gBACnD,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,iBAAM,CAAC,KAAK,CAAC,MAAM,EAAE;oBACnD,OAAO,IAAI,SAAS,CAAC;oBACrB,oGAAoG;oBACpG,aAAa,GAAG,IAAA,aAAK,EAAC,YAAY,CAAC,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,CAAC;oBAC3D,mDAAmD;iBACtD;qBAAM;oBACH,OAAO,IAAI,SAAS,CAAC;oBACrB,oGAAoG;oBACpG,aAAa,GAAG,IAAA,aAAK,EAAC,YAAY,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC;iBAC7D;gBACD,YAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;gBACnB,OAAO,aAAa,CAAC;YACzB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC;IAvBF,CAAC;CAwBJ;AA3BD,sCA2BC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IHistoryFilterParameters.js","sourceRoot":"","sources":["../../../../src/output-gateway/routes/interfaces/IHistoryFilterParameters.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golemio/core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.7-dev.513012959",
|
|
4
4
|
"description": "Golemio Core Module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -99,7 +99,6 @@
|
|
|
99
99
|
"fast-csv": "^4.3.6",
|
|
100
100
|
"fast-glob": "^3.2.5",
|
|
101
101
|
"iconv-lite": "^0.6.2",
|
|
102
|
-
"influx": "^5.6.3",
|
|
103
102
|
"ioredis": "^4.19.4",
|
|
104
103
|
"lightship": "^6.7.2",
|
|
105
104
|
"lodash": "^4.17.21",
|
|
@@ -126,6 +125,7 @@
|
|
|
126
125
|
"mpath": "^0.8.4",
|
|
127
126
|
"url-parse": "^1.5.6",
|
|
128
127
|
"minimist": "^1.2.6",
|
|
128
|
+
"moment": "^2.29.2",
|
|
129
129
|
"@google-cloud/storage/**/node-forge": "^1.3.0",
|
|
130
130
|
"**/axios/follow-redirects": "^1.14.7"
|
|
131
131
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
declare class MyInfluxDB {
|
|
2
|
-
private influxDB;
|
|
3
|
-
connect: (schemas: any[]) => Promise<any>;
|
|
4
|
-
getConnection: () => any;
|
|
5
|
-
isConnected: () => Promise<boolean>;
|
|
6
|
-
disconnect: () => Promise<void>;
|
|
7
|
-
}
|
|
8
|
-
declare const InfluxConnector: MyInfluxDB;
|
|
9
|
-
export { InfluxConnector };
|
|
@@ -1,60 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.InfluxConnector = void 0;
|
|
13
|
-
const errors_1 = require("@golemio/errors");
|
|
14
|
-
const influx_1 = require("influx");
|
|
15
|
-
const config_1 = require("../config");
|
|
16
|
-
const helpers_1 = require("../helpers");
|
|
17
|
-
class MyInfluxDB {
|
|
18
|
-
constructor() {
|
|
19
|
-
this.connect = (schemas) => __awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
try {
|
|
21
|
-
if (this.influxDB) {
|
|
22
|
-
return this.influxDB;
|
|
23
|
-
}
|
|
24
|
-
this.influxDB = new influx_1.InfluxDB({
|
|
25
|
-
database: config_1.config.influx_db.database,
|
|
26
|
-
hosts: config_1.config.influx_db.hosts,
|
|
27
|
-
password: config_1.config.influx_db.password,
|
|
28
|
-
schema: schemas,
|
|
29
|
-
username: config_1.config.influx_db.username,
|
|
30
|
-
});
|
|
31
|
-
const names = yield this.influxDB.getDatabaseNames();
|
|
32
|
-
if (!names.includes(config_1.config.influx_db.database)) {
|
|
33
|
-
yield this.influxDB.createDatabase(config_1.config.influx_db.database, { duration: "7d" });
|
|
34
|
-
}
|
|
35
|
-
return this.influxDB;
|
|
36
|
-
}
|
|
37
|
-
catch (err) {
|
|
38
|
-
errors_1.ErrorHandler.handle(new errors_1.CustomError("Error while connecting to InfluxDB.", false, undefined, err));
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
this.getConnection = () => {
|
|
42
|
-
if (!this.influxDB) {
|
|
43
|
-
throw new errors_1.CustomError("InfluxDB connection does not exist. First call connect() method.", false, undefined);
|
|
44
|
-
}
|
|
45
|
-
return this.influxDB;
|
|
46
|
-
};
|
|
47
|
-
this.isConnected = () => __awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
var _a;
|
|
49
|
-
const stats = (yield ((_a = this.influxDB) === null || _a === void 0 ? void 0 : _a.ping(5000))) || [];
|
|
50
|
-
return !!stats.length && stats[0].online;
|
|
51
|
-
});
|
|
52
|
-
this.disconnect = () => __awaiter(this, void 0, void 0, function* () {
|
|
53
|
-
helpers_1.log.info("InfluxDB disconnect called");
|
|
54
|
-
this.influxDB = null;
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
const InfluxConnector = new MyInfluxDB();
|
|
59
|
-
exports.InfluxConnector = InfluxConnector;
|
|
60
|
-
//# source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YAC7B,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;gBAChB,MAAM,IAAI,oBAAW,CAAC,kEAAkE,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;aAC/G;YACD,OAAO,IAAI,CAAC,QAAQ,CAAC;QACzB,CAAC,CAAC;QAEK,gBAAW,GAAG,GAA2B,EAAE;;YAC9C,MAAM,KAAK,GAAG,CAAC,MAAM,CAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,IAAI,CAAC,IAAI,CAAC,CAAA,CAAC,IAAI,EAAE,CAAC;YACtD,OAAO,CAAC,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QAC7C,CAAC,CAAA,CAAC;QAEK,eAAU,GAAG,GAAwB,EAAE;YAC1C,aAAG,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;YACvC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACzB,CAAC,CAAA,CAAC;IACN,CAAC;CAAA;AAED,MAAM,eAAe,GAAG,IAAI,UAAU,EAAE,CAAC;AAEhC,0CAAe"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
declare class MyInflux {
|
|
2
|
-
private influx;
|
|
3
|
-
connect: (schemas: any[]) => Promise<any>;
|
|
4
|
-
getConnection: () => any;
|
|
5
|
-
isConnected: () => Promise<boolean>;
|
|
6
|
-
disconnect: () => Promise<void>;
|
|
7
|
-
}
|
|
8
|
-
declare const InfluxConnector: MyInflux;
|
|
9
|
-
export { InfluxConnector };
|
|
@@ -1,62 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.InfluxConnector = void 0;
|
|
13
|
-
const errors_1 = require("@golemio/errors");
|
|
14
|
-
const influx_1 = require("influx");
|
|
15
|
-
const config_1 = require("../config");
|
|
16
|
-
const helpers_1 = require("../helpers");
|
|
17
|
-
class MyInflux {
|
|
18
|
-
constructor() {
|
|
19
|
-
this.influx = null;
|
|
20
|
-
this.connect = (schemas) => __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
try {
|
|
22
|
-
if (this.influx) {
|
|
23
|
-
return this.influx;
|
|
24
|
-
}
|
|
25
|
-
this.influx = new influx_1.InfluxDB({
|
|
26
|
-
database: config_1.config.influx_db.database,
|
|
27
|
-
hosts: config_1.config.influx_db.hosts,
|
|
28
|
-
password: config_1.config.influx_db.password,
|
|
29
|
-
schema: schemas,
|
|
30
|
-
username: config_1.config.influx_db.username,
|
|
31
|
-
});
|
|
32
|
-
const names = yield this.influx.getDatabaseNames();
|
|
33
|
-
if (!names.includes(config_1.config.influx_db.database)) {
|
|
34
|
-
yield this.influx.createDatabase(config_1.config.influx_db.database);
|
|
35
|
-
}
|
|
36
|
-
helpers_1.log.info("Connected to InfluxDB!");
|
|
37
|
-
return this.influx;
|
|
38
|
-
}
|
|
39
|
-
catch (err) {
|
|
40
|
-
throw new errors_1.CustomError("Error while connecting to InfluxDB.", false, this.constructor.name, 1001, err);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
this.getConnection = () => {
|
|
44
|
-
if (!this.influx) {
|
|
45
|
-
throw new errors_1.CustomError("InfluxDB connection does not exist. First call connect() method.", false, this.constructor.name, 1002);
|
|
46
|
-
}
|
|
47
|
-
return this.influx;
|
|
48
|
-
};
|
|
49
|
-
this.isConnected = () => __awaiter(this, void 0, void 0, function* () {
|
|
50
|
-
var _a;
|
|
51
|
-
const stats = (yield ((_a = this.influx) === null || _a === void 0 ? void 0 : _a.ping(5000))) || [];
|
|
52
|
-
return !!stats.length && stats[0].online;
|
|
53
|
-
});
|
|
54
|
-
this.disconnect = () => __awaiter(this, void 0, void 0, function* () {
|
|
55
|
-
helpers_1.log.info("InfluxDB disconnect called");
|
|
56
|
-
this.influx = null;
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
const InfluxConnector = new MyInflux();
|
|
61
|
-
exports.InfluxConnector = InfluxConnector;
|
|
62
|
-
//# sourceMappingURL=InfluxConnector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InfluxConnector.js","sourceRoot":"","sources":["../../../src/integration-engine/connectors/InfluxConnector.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAA8C;AAC9C,mCAAkC;AAClC,sCAAoC;AACpC,wCAAkC;AAElC,MAAM,QAAQ;IAAd;QACY,WAAM,GAAoB,IAAI,CAAC;QAEhC,YAAO,GAAG,CAAO,OAAc,EAAgB,EAAE;YACpD,IAAI;gBACA,IAAI,IAAI,CAAC,MAAM,EAAE;oBACb,OAAO,IAAI,CAAC,MAAM,CAAC;iBACtB;gBAED,IAAI,CAAC,MAAM,GAAG,IAAI,iBAAQ,CAAC;oBACvB,QAAQ,EAAE,eAAM,CAAC,SAAS,CAAC,QAAQ;oBACnC,KAAK,EAAE,eAAM,CAAC,SAAS,CAAC,KAAK;oBAC7B,QAAQ,EAAE,eAAM,CAAC,SAAS,CAAC,QAAQ;oBACnC,MAAM,EAAE,OAAO;oBACf,QAAQ,EAAE,eAAM,CAAC,SAAS,CAAC,QAAQ;iBACtC,CAAC,CAAC;gBAEH,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC;gBACnD,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dist/shared/influx.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
const influx = __importStar(require("influx"));
|
|
22
|
-
module.exports = influx;
|
|
23
|
-
//# sourceMappingURL=influx.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"influx.js","sourceRoot":"","sources":["../../src/shared/influx.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AACjC,iBAAS,MAAM,CAAC"}
|