@conduitplatform/grpc-sdk 0.15.6 → 0.15.7
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/index.d.ts +11 -4
- package/dist/index.js +71 -5
- package/dist/index.js.map +1 -1
- package/dist/interfaces/Model.d.ts +1 -0
- package/dist/interfaces/Model.js.map +1 -1
- package/dist/interfaces/RawQuery.d.ts +22 -0
- package/dist/interfaces/RawQuery.js +3 -0
- package/dist/interfaces/RawQuery.js.map +1 -0
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/index.js +1 -0
- package/dist/interfaces/index.js.map +1 -1
- package/dist/modules/database/index.d.ts +2 -1
- package/dist/modules/database/index.js +37 -0
- package/dist/modules/database/index.js.map +1 -1
- package/dist/protoUtils/core.d.ts +5 -2
- package/dist/protoUtils/core.js +41 -8
- package/dist/protoUtils/core.js.map +1 -1
- package/dist/protoUtils/database.d.ts +74 -0
- package/dist/protoUtils/database.js +340 -1
- package/dist/protoUtils/database.js.map +1 -1
- package/dist/routing/interfaces/Route.d.ts +9 -0
- package/dist/routing/interfaces/Route.js.map +1 -1
- package/dist/routing/interfaces/types.d.ts +3 -0
- package/dist/routing/wrapRouterFunctions.js +3 -0
- package/dist/routing/wrapRouterFunctions.js.map +1 -1
- package/dist/utilities/EventBus.js.map +1 -1
- package/dist/utilities/RedisManager.d.ts +22 -4
- package/dist/utilities/RedisManager.js +10 -7
- package/dist/utilities/RedisManager.js.map +1 -1
- package/package.json +3 -1
|
@@ -1,6 +1,24 @@
|
|
|
1
|
-
import { Redis, RedisOptions } from 'ioredis';
|
|
1
|
+
import { Cluster, ClusterOptions, Redis, RedisOptions } from 'ioredis';
|
|
2
2
|
export declare class RedisManager {
|
|
3
|
-
redisConnection: RedisOptions
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
redisConnection: RedisOptions | {
|
|
4
|
+
nodes: {
|
|
5
|
+
host: string;
|
|
6
|
+
port: number;
|
|
7
|
+
}[];
|
|
8
|
+
options: ClusterOptions;
|
|
9
|
+
};
|
|
10
|
+
constructor(redisDetails?: RedisOptions | {
|
|
11
|
+
nodes: {
|
|
12
|
+
host: string;
|
|
13
|
+
port: number;
|
|
14
|
+
}[];
|
|
15
|
+
options: ClusterOptions;
|
|
16
|
+
});
|
|
17
|
+
getClient(options?: RedisOptions | {
|
|
18
|
+
nodes: {
|
|
19
|
+
host: string;
|
|
20
|
+
port: number;
|
|
21
|
+
}[];
|
|
22
|
+
options: ClusterOptions;
|
|
23
|
+
}): Redis | Cluster;
|
|
6
24
|
}
|
|
@@ -17,14 +17,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
exports.RedisManager = void 0;
|
|
18
18
|
var ioredis_1 = __importDefault(require("ioredis"));
|
|
19
19
|
var RedisManager = /** @class */ (function () {
|
|
20
|
-
function RedisManager(
|
|
21
|
-
this.redisConnection = {
|
|
22
|
-
host: redisIp,
|
|
23
|
-
port: redisPort,
|
|
24
|
-
};
|
|
20
|
+
function RedisManager(redisDetails) {
|
|
21
|
+
this.redisConnection = __assign({}, redisDetails);
|
|
25
22
|
}
|
|
26
|
-
RedisManager.prototype.getClient = function (
|
|
27
|
-
|
|
23
|
+
RedisManager.prototype.getClient = function (options) {
|
|
24
|
+
if (this.redisConnection.hasOwnProperty('nodes')) {
|
|
25
|
+
var clusterOptions = this.redisConnection;
|
|
26
|
+
return new ioredis_1.default.Cluster(clusterOptions.nodes, clusterOptions.options);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
return new ioredis_1.default(__assign(__assign({}, this.redisConnection), options));
|
|
30
|
+
}
|
|
28
31
|
};
|
|
29
32
|
return RedisManager;
|
|
30
33
|
}());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RedisManager.js","sourceRoot":"","sources":["../../src/utilities/RedisManager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"RedisManager.js","sourceRoot":"","sources":["../../src/utilities/RedisManager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oDAAgF;AAEhF;IAKE,sBACE,YAEwE;QAExE,IAAI,CAAC,eAAe,gBACf,YAAY,CAChB,CAAC;IACJ,CAAC;IACD,gCAAS,GAAT,UACE,OAEwE;QAExE,IAAI,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE;YAChD,IAAM,cAAc,GAAG,IAAI,CAAC,eAG3B,CAAC;YACF,OAAO,IAAI,iBAAO,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;SAC1E;aAAM;YACL,OAAO,IAAI,iBAAO,uBAAO,IAAI,CAAC,eAAgC,GAAK,OAAO,EAAG,CAAC;SAC/E;IACH,CAAC;IACH,mBAAC;AAAD,CAAC,AA7BD,IA6BC;AA7BY,oCAAY"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@conduitplatform/grpc-sdk",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.7",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"engines": {
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"convict": "^6.2.3",
|
|
24
24
|
"express": "^4.18.1",
|
|
25
25
|
"fast-jwt": "^1.6.0",
|
|
26
|
+
"fs-extra": "^10.1.0",
|
|
26
27
|
"ioredis": "^5.1.0",
|
|
27
28
|
"lodash": "^4.17.21",
|
|
28
29
|
"nice-grpc": "^1.2.0",
|
|
@@ -47,6 +48,7 @@
|
|
|
47
48
|
"devDependencies": {
|
|
48
49
|
"@types/convict": "^6.1.1",
|
|
49
50
|
"@types/express": "^4.17.13",
|
|
51
|
+
"@types/fs-extra": "^9.0.13",
|
|
50
52
|
"@types/google-protobuf": "^3.15.6",
|
|
51
53
|
"@types/ioredis": "^4.28.10",
|
|
52
54
|
"@types/lodash": "^4.14.182",
|