@golemio/core 1.2.19-dev.651907198 → 1.2.20-dev.658730114
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/monitoring/opentelemetry/instrumentation/index.d.ts +2 -1
- package/dist/monitoring/opentelemetry/instrumentation/index.js +2 -0
- package/dist/monitoring/opentelemetry/instrumentation/index.js.map +1 -1
- package/dist/output-gateway/redis/CacheMiddleware.js +2 -3
- package/dist/output-gateway/redis/CacheMiddleware.js.map +1 -1
- package/dist/output-gateway/redis/RedisConnector.d.ts +10 -7
- package/dist/output-gateway/redis/RedisConnector.js +57 -30
- package/dist/output-gateway/redis/RedisConnector.js.map +1 -1
- package/package.json +127 -125
- package/dist/output-gateway/redis/interfaces/ConnectionType.d.ts +0 -4
- package/dist/output-gateway/redis/interfaces/ConnectionType.js +0 -9
- package/dist/output-gateway/redis/interfaces/ConnectionType.js.map +0 -1
- package/dist/output-gateway/redis/interfaces/IRedisConnector.d.ts +0 -6
- package/dist/output-gateway/redis/interfaces/IRedisConnector.js +0 -3
- package/dist/output-gateway/redis/interfaces/IRedisConnector.js.map +0 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { HttpInstrumentation } from "@opentelemetry/instrumentation-http";
|
|
2
2
|
import { IORedisInstrumentation } from "@opentelemetry/instrumentation-ioredis";
|
|
3
|
+
import { RedisInstrumentation } from "@opentelemetry/instrumentation-redis";
|
|
3
4
|
import { ExpressInstrumentation } from "@opentelemetry/instrumentation-express";
|
|
4
5
|
import { SequelizeInstrumentation } from "opentelemetry-instrumentation-sequelize";
|
|
5
6
|
import { MongooseInstrumentation } from "opentelemetry-instrumentation-mongoose";
|
|
6
7
|
import { AmqplibInstrumentation } from "@opentelemetry/instrumentation-amqplib";
|
|
7
8
|
import { AwsInstrumentation } from "@opentelemetry/instrumentation-aws-sdk";
|
|
8
|
-
export declare const getInstrumentation: () => (ExpressInstrumentation | HttpInstrumentation | SequelizeInstrumentation | MongooseInstrumentation | AmqplibInstrumentation | IORedisInstrumentation | AwsInstrumentation)[];
|
|
9
|
+
export declare const getInstrumentation: () => (ExpressInstrumentation | HttpInstrumentation | SequelizeInstrumentation | MongooseInstrumentation | AmqplibInstrumentation | IORedisInstrumentation | RedisInstrumentation | AwsInstrumentation)[];
|
|
@@ -4,6 +4,7 @@ exports.getInstrumentation = void 0;
|
|
|
4
4
|
// Instrumentation
|
|
5
5
|
const instrumentation_http_1 = require("@opentelemetry/instrumentation-http");
|
|
6
6
|
const instrumentation_ioredis_1 = require("@opentelemetry/instrumentation-ioredis");
|
|
7
|
+
const instrumentation_redis_1 = require("@opentelemetry/instrumentation-redis");
|
|
7
8
|
const instrumentation_express_1 = require("@opentelemetry/instrumentation-express");
|
|
8
9
|
const opentelemetry_instrumentation_sequelize_1 = require("opentelemetry-instrumentation-sequelize");
|
|
9
10
|
const opentelemetry_instrumentation_mongoose_1 = require("opentelemetry-instrumentation-mongoose");
|
|
@@ -19,6 +20,7 @@ const getInstrumentation = () => {
|
|
|
19
20
|
new opentelemetry_instrumentation_mongoose_1.MongooseInstrumentation(configs_1.mongooseConfig),
|
|
20
21
|
new instrumentation_amqplib_1.AmqplibInstrumentation(configs_1.amqplibConfig),
|
|
21
22
|
new instrumentation_ioredis_1.IORedisInstrumentation(),
|
|
23
|
+
new instrumentation_redis_1.RedisInstrumentation(),
|
|
22
24
|
new instrumentation_aws_sdk_1.AwsInstrumentation(configs_1.awsSdkConfig),
|
|
23
25
|
];
|
|
24
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/monitoring/opentelemetry/instrumentation/index.ts"],"names":[],"mappings":";;;AAAA,kBAAkB;AAClB,8EAA0E;AAC1E,oFAAgF;AAChF,oFAAgF;AAChF,qGAAmF;AACnF,mGAAiF;AACjF,oFAAgF;AAChF,oFAA4E;AAE5E,UAAU;AACV,uCAAqG;AAE9F,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACnC,OAAO;QACH,IAAI,gDAAsB,EAAE;QAC5B,IAAI,0CAAmB,CAAC,oBAAU,CAAC;QACnC,IAAI,kEAAwB,CAAC,yBAAe,CAAC;QAC7C,IAAI,gEAAuB,CAAC,wBAAc,CAAC;QAC3C,IAAI,gDAAsB,CAAC,uBAAa,CAAC;QACzC,IAAI,gDAAsB,EAAE;QAC5B,IAAI,4CAAkB,CAAC,sBAAY,CAAC;KACvC,CAAC;AACN,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/monitoring/opentelemetry/instrumentation/index.ts"],"names":[],"mappings":";;;AAAA,kBAAkB;AAClB,8EAA0E;AAC1E,oFAAgF;AAChF,gFAA4E;AAC5E,oFAAgF;AAChF,qGAAmF;AACnF,mGAAiF;AACjF,oFAAgF;AAChF,oFAA4E;AAE5E,UAAU;AACV,uCAAqG;AAE9F,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACnC,OAAO;QACH,IAAI,gDAAsB,EAAE;QAC5B,IAAI,0CAAmB,CAAC,oBAAU,CAAC;QACnC,IAAI,kEAAwB,CAAC,yBAAe,CAAC;QAC7C,IAAI,gEAAuB,CAAC,wBAAc,CAAC;QAC3C,IAAI,gDAAsB,CAAC,uBAAa,CAAC;QACzC,IAAI,gDAAsB,EAAE;QAC5B,IAAI,4CAAoB,EAAE;QAC1B,IAAI,4CAAkB,CAAC,sBAAY,CAAC;KACvC,CAAC;AACN,CAAC,CAAC;AAXW,QAAA,kBAAkB,sBAW7B"}
|
|
@@ -4,10 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.useCacheMiddleware = exports.CacheMiddleware = void 0;
|
|
7
|
+
const apicache_plus_1 = __importDefault(require("apicache-plus"));
|
|
7
8
|
const config_1 = require("../config");
|
|
8
9
|
const Logger_1 = require("../Logger");
|
|
9
|
-
const apicache_plus_1 = __importDefault(require("apicache-plus"));
|
|
10
|
-
const ConnectionType_1 = require("./interfaces/ConnectionType");
|
|
11
10
|
const RedisConnector_1 = require("./RedisConnector");
|
|
12
11
|
class MyCacheMiddleware {
|
|
13
12
|
constructor() {
|
|
@@ -34,7 +33,7 @@ class MyCacheMiddleware {
|
|
|
34
33
|
}
|
|
35
34
|
init() {
|
|
36
35
|
if (config_1.config.redis_enable) {
|
|
37
|
-
this.redisClient = RedisConnector_1.RedisConnector.getConnection(
|
|
36
|
+
this.redisClient = RedisConnector_1.RedisConnector.getConnection(RedisConnector_1.ConnectionType.APICACHE);
|
|
38
37
|
// sets redis to apicache
|
|
39
38
|
this.cacheWithRedisMiddleware = apicache_plus_1.default.options({
|
|
40
39
|
defaultDuration: this.defaultCacheTtl.toString(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CacheMiddleware.js","sourceRoot":"","sources":["../../../src/output-gateway/redis/CacheMiddleware.ts"],"names":[],"mappings":";;;;;;AAAA,sCAAoC;AACpC,sCAAiC;AACjC,
|
|
1
|
+
{"version":3,"file":"CacheMiddleware.js","sourceRoot":"","sources":["../../../src/output-gateway/redis/CacheMiddleware.ts"],"names":[],"mappings":";;;;;;AAAA,kEAAqC;AAGrC,sCAAoC;AACpC,sCAAiC;AACjC,qDAAkE;AAElE,MAAM,iBAAiB;IAAvB;QACY,oBAAe,GAAW,QAAQ,CAAC,eAAM,CAAC,SAAS,IAAI,OAAO,EAAE,EAAE,CAAC,CAAC;QAI5E,kCAAkC;QAC1B,6BAAwB,GAAG,uBAAQ,CAAC,OAAO,CAAC;YAChD,eAAe,EAAE,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE;SACnD,CAAC,CAAC,UAAU,CAAC;QAoBP,oBAAe,GAAG,CAAC,GAAY,EAAE,GAAa,EAAW,EAAE;YAC9D,MAAM,WAAW,GAAuB,GAAG,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;YACrE,OAAO,WAAW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 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { RedisClient } from "redis";
|
|
2
|
+
export declare enum ConnectionType {
|
|
3
|
+
DEFAULT = "DEFAULT",
|
|
4
|
+
APICACHE = "APICACHE"
|
|
5
|
+
}
|
|
6
|
+
declare class MyRedis {
|
|
5
7
|
private connections;
|
|
6
|
-
connect: () => Promise<
|
|
7
|
-
getConnection(connectionType?: ConnectionType):
|
|
8
|
+
connect: () => Promise<RedisClient>;
|
|
9
|
+
getConnection(connectionType?: ConnectionType): RedisClient;
|
|
8
10
|
isConnected(connectionType?: ConnectionType): boolean;
|
|
9
11
|
disconnect(): Promise<void>;
|
|
10
12
|
private createConnection;
|
|
13
|
+
private checkOnConnect;
|
|
11
14
|
}
|
|
12
|
-
declare const RedisConnector:
|
|
15
|
+
declare const RedisConnector: MyRedis;
|
|
13
16
|
export { RedisConnector };
|
|
@@ -12,64 +12,91 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.RedisConnector = void 0;
|
|
15
|
+
exports.RedisConnector = exports.ConnectionType = void 0;
|
|
16
|
+
const errors_1 = require("@golemio/errors");
|
|
17
|
+
const promises_1 = require("timers/promises");
|
|
18
|
+
const redis_1 = __importDefault(require("redis"));
|
|
16
19
|
const config_1 = require("../config");
|
|
17
20
|
const Logger_1 = require("../Logger");
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
var ConnectionType;
|
|
22
|
+
(function (ConnectionType) {
|
|
23
|
+
ConnectionType["DEFAULT"] = "DEFAULT";
|
|
24
|
+
ConnectionType["APICACHE"] = "APICACHE";
|
|
25
|
+
})(ConnectionType = exports.ConnectionType || (exports.ConnectionType = {}));
|
|
26
|
+
const connectionOptions = {
|
|
27
|
+
[ConnectionType.DEFAULT]: {},
|
|
28
|
+
[ConnectionType.APICACHE]: { detect_buffers: true },
|
|
29
|
+
};
|
|
30
|
+
class MyRedis {
|
|
22
31
|
constructor() {
|
|
23
32
|
this.connections = new Map();
|
|
24
33
|
this.connect = () => __awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
if (this.connections.has(
|
|
26
|
-
return this.connections.get(
|
|
34
|
+
if (this.connections.has(ConnectionType.DEFAULT)) {
|
|
35
|
+
return this.connections.get(ConnectionType.DEFAULT);
|
|
27
36
|
}
|
|
28
|
-
for (const connectionType of Object.values(
|
|
37
|
+
for (const connectionType of Object.values(ConnectionType)) {
|
|
29
38
|
yield this.createConnection(connectionType);
|
|
30
39
|
}
|
|
31
|
-
return this.connections.get(
|
|
40
|
+
return this.connections.get(ConnectionType.DEFAULT);
|
|
32
41
|
});
|
|
33
|
-
this.createConnection = (connectionType
|
|
34
|
-
|
|
35
|
-
|
|
42
|
+
this.createConnection = (connectionType) => __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
try {
|
|
44
|
+
if (!config_1.config.redis_connection) {
|
|
45
|
+
throw new errors_1.CustomError("The ENV variable REDIS_CONN cannot be undefined.", true, this.constructor.name);
|
|
46
|
+
}
|
|
47
|
+
const connection = redis_1.default
|
|
48
|
+
.createClient(config_1.config.redis_connection, connectionOptions[connectionType])
|
|
49
|
+
.on("message", (message) => Logger_1.log.info(message))
|
|
50
|
+
.on("error", (error) => Logger_1.log.warn(error))
|
|
51
|
+
.on("connect", () => Logger_1.log.info("Connected to Redis!"));
|
|
52
|
+
this.connections.set(connectionType, connection);
|
|
53
|
+
// waiting for the redis client to connect
|
|
54
|
+
const delay = 500; // millis
|
|
55
|
+
const attemps = 4;
|
|
56
|
+
yield this.checkOnConnect(connectionType, attemps, attemps, delay);
|
|
57
|
+
return connection;
|
|
36
58
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
throw new Error("Connection is undefined.");
|
|
59
|
+
catch (err) {
|
|
60
|
+
throw new errors_1.CustomError("Error while connecting to Redis.", false, this.constructor.name, 1001, err);
|
|
40
61
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
62
|
+
});
|
|
63
|
+
this.checkOnConnect = (connectionType, retry, attemps, delay) => __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
while (retry > 0) {
|
|
65
|
+
if (this.isConnected(connectionType)) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
yield (0, promises_1.setTimeout)(delay);
|
|
69
|
+
retry -= 1;
|
|
70
|
+
}
|
|
71
|
+
throw new Error(`Failed to connect to Redis after ${attemps * delay} millis.`);
|
|
49
72
|
});
|
|
50
73
|
}
|
|
51
|
-
getConnection(connectionType =
|
|
74
|
+
getConnection(connectionType = ConnectionType.DEFAULT) {
|
|
52
75
|
const connection = this.connections.get(connectionType);
|
|
53
76
|
if (!connection) {
|
|
54
77
|
throw new errors_1.CustomError("Redis connection does not exists. First call connect() method.", false, this.constructor.name, 1002);
|
|
55
78
|
}
|
|
56
79
|
return connection;
|
|
57
80
|
}
|
|
58
|
-
isConnected(connectionType =
|
|
81
|
+
isConnected(connectionType = ConnectionType.DEFAULT) {
|
|
59
82
|
const connection = this.connections.get(connectionType);
|
|
60
|
-
return !!connection && connection.
|
|
83
|
+
return !!connection && connection.connected;
|
|
61
84
|
}
|
|
62
85
|
disconnect() {
|
|
63
86
|
return __awaiter(this, void 0, void 0, function* () {
|
|
64
87
|
Logger_1.log.info("Redis disconnect called");
|
|
65
88
|
for (const connection of this.connections.values()) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
89
|
+
yield new Promise((resolve, reject) => {
|
|
90
|
+
connection.quit((err) => {
|
|
91
|
+
if (err)
|
|
92
|
+
reject(err);
|
|
93
|
+
resolve();
|
|
94
|
+
});
|
|
95
|
+
});
|
|
69
96
|
}
|
|
70
97
|
});
|
|
71
98
|
}
|
|
72
99
|
}
|
|
73
|
-
const RedisConnector = new
|
|
100
|
+
const RedisConnector = new MyRedis();
|
|
74
101
|
exports.RedisConnector = RedisConnector;
|
|
75
102
|
//# sourceMappingURL=RedisConnector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RedisConnector.js","sourceRoot":"","sources":["../../../src/output-gateway/redis/RedisConnector.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sCAAoC;AACpC,sCAAiC;
|
|
1
|
+
{"version":3,"file":"RedisConnector.js","sourceRoot":"","sources":["../../../src/output-gateway/redis/RedisConnector.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,4CAA8C;AAC9C,8CAAsD;AACtD,kDAAuD;AACvD,sCAAoC;AACpC,sCAAiC;AAEjC,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,qCAAmB,CAAA;IACnB,uCAAqB,CAAA;AACzB,CAAC,EAHW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAGzB;AAED,MAAM,iBAAiB,GAAuC;IAC1D,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,EAAE;IAC5B,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE;CACtD,CAAC;AAEF,MAAM,OAAO;IAAb;QACY,gBAAW,GAAqC,IAAI,GAAG,EAAE,CAAC;QAE3D,YAAO,GAAG,GAA+B,EAAE;YAC9C,IAAI,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE;gBAC9C,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,cAAc,CAAC,OAAO,CAAE,CAAC;aACxD;YAED,KAAK,MAAM,cAAc,IAAI,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE;gBACxD,MAAM,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;aAC/C;YAED,OAAO,IAAI,CAAC,WAAW,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,CAAC;KAAA;CAuCJ;AAED,MAAM,cAAc,GAAG,IAAI,OAAO,EAAE,CAAC;AAE5B,wCAAc"}
|
package/package.json
CHANGED
|
@@ -1,127 +1,129 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
2
|
+
"name": "@golemio/core",
|
|
3
|
+
"version": "1.2.20-dev.658730114",
|
|
4
|
+
"description": "Golemio Core Module",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"bin": {
|
|
8
|
+
"golemio-import-test-data": "bin/import-test-data.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "rimraf ./dist && ttsc -p ./tsconfig.build.json",
|
|
12
|
+
"build-minimal": "run-s 'build --sourceMap false --declaration false'",
|
|
13
|
+
"build-watch": "run-s 'build --watch --preserveWatchOutput'",
|
|
14
|
+
"test": "cross-env NODE_ENV=test TS_NODE_COMPILER='ttypescript' mocha --exit --check-leaks --timeout 120000 -r ts-node/register -r dotenv/config 'test/**/*.test.ts'",
|
|
15
|
+
"test-debug": "run-s 'test --inspect-brk=9230'",
|
|
16
|
+
"code-coverage": "nyc run-s 'test -r source-map-support/register'",
|
|
17
|
+
"generate-docs": "typedoc --out docs/typedoc src",
|
|
18
|
+
"lint": "eslint --cache \"{src,test}/**/*.ts\""
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"golemio"
|
|
22
|
+
],
|
|
23
|
+
"author": "Operator ICT, a.s.",
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "https://gitlab.com/operator-ict/golemio/code/modules/core"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@commitlint/cli": "^16.2.1",
|
|
31
|
+
"@commitlint/config-conventional": "^16.2.1",
|
|
32
|
+
"@golemio/eslint-config": "^1.1.0",
|
|
33
|
+
"@ovos-media/ts-transform-paths": "^1.7.18-1",
|
|
34
|
+
"@types/amqplib": "^0.5.17",
|
|
35
|
+
"@types/chai": "4.2.3",
|
|
36
|
+
"@types/chai-as-promised": "7.1.2",
|
|
37
|
+
"@types/content-type": "^1.1.3",
|
|
38
|
+
"@types/debug": "0.0.31",
|
|
39
|
+
"@types/decompress": "^4.2.3",
|
|
40
|
+
"@types/mocha": "^8.2.0",
|
|
41
|
+
"@types/morgan": "^1.9.2",
|
|
42
|
+
"@types/node": "^16.11.35",
|
|
43
|
+
"@types/sinon": "7.0.13",
|
|
44
|
+
"@types/ssh2-sftp-client": "^5.3.1",
|
|
45
|
+
"@types/supertest": "^2.0.11",
|
|
46
|
+
"chai": "4.2.0",
|
|
47
|
+
"chai-as-promised": "7.1.1",
|
|
48
|
+
"cross-env": "^7.0.3",
|
|
49
|
+
"eslint": "^8.1.1",
|
|
50
|
+
"husky": "^4.3.7",
|
|
51
|
+
"mocha": "^9.1.2",
|
|
52
|
+
"nock": "^13.0.5",
|
|
53
|
+
"npm-run-all": "^4.1.5",
|
|
54
|
+
"nyc": "^15.1.0",
|
|
55
|
+
"prettier": "^2.5.1",
|
|
56
|
+
"pretty-quick": "^3.1.0",
|
|
57
|
+
"rimraf": "^3.0.2",
|
|
58
|
+
"sinon": "7.1.1",
|
|
59
|
+
"source-map-support": "0.5.9",
|
|
60
|
+
"supertest": "^6.1.6",
|
|
61
|
+
"ts-node": "^10.7.0",
|
|
62
|
+
"ttypescript": "^1.5.13",
|
|
63
|
+
"typedoc": "^0.22.15",
|
|
64
|
+
"typescript": "4.6.4"
|
|
65
|
+
},
|
|
66
|
+
"dependencies": {
|
|
67
|
+
"@abraham/reflection": "^0.10.0",
|
|
68
|
+
"@azure/storage-blob": "^12.11.0",
|
|
69
|
+
"@golemio/errors": "^1.0.1",
|
|
70
|
+
"@golemio/utils": "^1.0.0",
|
|
71
|
+
"@golemio/validator": "0.2.4",
|
|
72
|
+
"@google-cloud/storage": "^5.18.0",
|
|
73
|
+
"@opentelemetry/api": "1.0.4",
|
|
74
|
+
"@opentelemetry/exporter-jaeger": "^1.2.0",
|
|
75
|
+
"@opentelemetry/instrumentation-amqplib": "^0.28.0",
|
|
76
|
+
"@opentelemetry/instrumentation-aws-sdk": "^0.6.0",
|
|
77
|
+
"@opentelemetry/instrumentation-express": "^0.28.0",
|
|
78
|
+
"@opentelemetry/instrumentation-http": "^0.27.0",
|
|
79
|
+
"@opentelemetry/instrumentation-ioredis": "^0.28.0",
|
|
80
|
+
"@opentelemetry/instrumentation-redis": "^0.29.0",
|
|
81
|
+
"@opentelemetry/resources": "^1.2.0",
|
|
82
|
+
"@opentelemetry/sdk-trace-base": "^1.2.0",
|
|
83
|
+
"@opentelemetry/sdk-trace-node": "^1.2.0",
|
|
84
|
+
"@sentry/node": "^6.19.7",
|
|
85
|
+
"@sentry/tracing": "^6.19.7",
|
|
86
|
+
"@types/express": "^4.16.0",
|
|
87
|
+
"@types/geojson": "^7946.0.10",
|
|
88
|
+
"@types/luxon": "^2.3.1",
|
|
89
|
+
"@types/request-promise": "^4.1.45",
|
|
90
|
+
"ajv": "^8.10.0",
|
|
91
|
+
"amqplib": "^0.7.1",
|
|
92
|
+
"apicache-plus": "^2.3.1",
|
|
93
|
+
"aws-sdk": "^2.823.0",
|
|
94
|
+
"axios": "^0.24.0",
|
|
95
|
+
"basic-ftp": "^4.6.6",
|
|
96
|
+
"class-transformer": "^0.5.1",
|
|
97
|
+
"class-validator": "^0.13.2",
|
|
98
|
+
"content-type": "^1.0.4",
|
|
99
|
+
"debug": "3.1.0",
|
|
100
|
+
"decompress": "^4.2.1",
|
|
101
|
+
"dotenv": "^8.2.0",
|
|
102
|
+
"express": "^4.16.4",
|
|
103
|
+
"express-validator": "^5.3.1",
|
|
104
|
+
"fast-csv": "^4.3.6",
|
|
105
|
+
"fast-glob": "^3.2.5",
|
|
106
|
+
"geojson": "^0.5.0",
|
|
107
|
+
"iconv-lite": "^0.6.2",
|
|
108
|
+
"ioredis": "^4.28.5",
|
|
109
|
+
"lightship": "^6.7.2",
|
|
110
|
+
"luxon": "^2.3.2",
|
|
111
|
+
"moment-timezone": "^0.5.26",
|
|
112
|
+
"mongodb-restore-dump": "1.0.1",
|
|
113
|
+
"mongoose": "^6.5.3",
|
|
114
|
+
"morgan": "^1.10.0",
|
|
115
|
+
"opentelemetry-instrumentation-mongoose": "^0.27.1",
|
|
116
|
+
"opentelemetry-instrumentation-sequelize": "^0.27.1",
|
|
117
|
+
"path-to-regexp": "^6.2.0",
|
|
118
|
+
"pg": "^8.6.0",
|
|
119
|
+
"prom-client": "^14.0.0",
|
|
120
|
+
"redis": "^3.1.1",
|
|
121
|
+
"request": "2.88.0",
|
|
122
|
+
"request-promise": "^4.2.5",
|
|
123
|
+
"sequelize": "^6.21.2",
|
|
124
|
+
"ssh2-sftp-client": "^7.1.0",
|
|
125
|
+
"winston": "^3.3.3",
|
|
126
|
+
"xml2js-es6-promise": "^1.1.1"
|
|
127
|
+
},
|
|
128
|
+
"resolutions": {}
|
|
127
129
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConnectionType = void 0;
|
|
4
|
-
var ConnectionType;
|
|
5
|
-
(function (ConnectionType) {
|
|
6
|
-
ConnectionType["DEFAULT"] = "DEFAULT";
|
|
7
|
-
ConnectionType["APICACHE"] = "APICACHE";
|
|
8
|
-
})(ConnectionType = exports.ConnectionType || (exports.ConnectionType = {}));
|
|
9
|
-
//# sourceMappingURL=ConnectionType.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectionType.js","sourceRoot":"","sources":["../../../../src/output-gateway/redis/interfaces/ConnectionType.ts"],"names":[],"mappings":";;;AAAA,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,qCAAmB,CAAA;IACnB,uCAAqB,CAAA;AACzB,CAAC,EAHW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAGzB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IRedisConnector.js","sourceRoot":"","sources":["../../../../src/output-gateway/redis/interfaces/IRedisConnector.ts"],"names":[],"mappings":""}
|