@conduitplatform/grpc-sdk 0.13.0-rc.1
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/README.md +20 -0
- package/dist/classes/ConduitActiveSchema.d.ts +19 -0
- package/dist/classes/ConduitActiveSchema.js +57 -0
- package/dist/classes/ConduitActiveSchema.js.map +1 -0
- package/dist/classes/ConduitMiddleware.d.ts +8 -0
- package/dist/classes/ConduitMiddleware.js +26 -0
- package/dist/classes/ConduitMiddleware.js.map +1 -0
- package/dist/classes/ConduitModule.d.ts +26 -0
- package/dist/classes/ConduitModule.js +170 -0
- package/dist/classes/ConduitModule.js.map +1 -0
- package/dist/classes/ConduitParser.d.ts +20 -0
- package/dist/classes/ConduitParser.js +84 -0
- package/dist/classes/ConduitParser.js.map +1 -0
- package/dist/classes/ConduitRoute.d.ts +12 -0
- package/dist/classes/ConduitRoute.js +44 -0
- package/dist/classes/ConduitRoute.js.map +1 -0
- package/dist/classes/ConduitRouteReturn.d.ts +48 -0
- package/dist/classes/ConduitRouteReturn.js +66 -0
- package/dist/classes/ConduitRouteReturn.js.map +1 -0
- package/dist/classes/ConduitSchema.d.ts +10 -0
- package/dist/classes/ConduitSchema.js +22 -0
- package/dist/classes/ConduitSchema.js.map +1 -0
- package/dist/classes/ConduitSchemaExtension.d.ts +7 -0
- package/dist/classes/ConduitSchemaExtension.js +19 -0
- package/dist/classes/ConduitSchemaExtension.js.map +1 -0
- package/dist/classes/ConduitServiceModule.d.ts +25 -0
- package/dist/classes/ConduitServiceModule.js +139 -0
- package/dist/classes/ConduitServiceModule.js.map +1 -0
- package/dist/classes/ConduitSocket.d.ts +9 -0
- package/dist/classes/ConduitSocket.js +27 -0
- package/dist/classes/ConduitSocket.js.map +1 -0
- package/dist/classes/ConfigController.d.ts +7 -0
- package/dist/classes/ConfigController.js +27 -0
- package/dist/classes/ConfigController.js.map +1 -0
- package/dist/classes/Error.d.ts +11 -0
- package/dist/classes/Error.js +51 -0
- package/dist/classes/Error.js.map +1 -0
- package/dist/classes/GrpcServer.d.ts +19 -0
- package/dist/classes/GrpcServer.js +185 -0
- package/dist/classes/GrpcServer.js.map +1 -0
- package/dist/classes/ManagedModule.d.ts +20 -0
- package/dist/classes/ManagedModule.js +212 -0
- package/dist/classes/ManagedModule.js.map +1 -0
- package/dist/classes/ModuleManager.d.ts +11 -0
- package/dist/classes/ModuleManager.js +191 -0
- package/dist/classes/ModuleManager.js.map +1 -0
- package/dist/classes/Routing/RouteBuilder.d.ts +28 -0
- package/dist/classes/Routing/RouteBuilder.js +107 -0
- package/dist/classes/Routing/RouteBuilder.js.map +1 -0
- package/dist/classes/Routing/RoutingManager.d.ts +25 -0
- package/dist/classes/Routing/RoutingManager.js +193 -0
- package/dist/classes/Routing/RoutingManager.js.map +1 -0
- package/dist/classes/index.d.ts +16 -0
- package/dist/classes/index.js +29 -0
- package/dist/classes/index.js.map +1 -0
- package/dist/constants/enums/PlatformTypesEnum.d.ts +9 -0
- package/dist/constants/enums/PlatformTypesEnum.js +14 -0
- package/dist/constants/enums/PlatformTypesEnum.js.map +1 -0
- package/dist/constants/enums/index.d.ts +1 -0
- package/dist/constants/enums/index.js +14 -0
- package/dist/constants/enums/index.js.map +1 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.js +14 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/helpers/GrpcHelper.d.ts +8 -0
- package/dist/helpers/GrpcHelper.js +44 -0
- package/dist/helpers/GrpcHelper.js.map +1 -0
- package/dist/helpers/RoutingJsonConstructor.d.ts +9 -0
- package/dist/helpers/RoutingJsonConstructor.js +89 -0
- package/dist/helpers/RoutingJsonConstructor.js.map +1 -0
- package/dist/helpers/RoutingUtilities.d.ts +13 -0
- package/dist/helpers/RoutingUtilities.js +69 -0
- package/dist/helpers/RoutingUtilities.js.map +1 -0
- package/dist/helpers/TypeHelpers.d.ts +44 -0
- package/dist/helpers/TypeHelpers.js +144 -0
- package/dist/helpers/TypeHelpers.js.map +1 -0
- package/dist/helpers/index.d.ts +5 -0
- package/dist/helpers/index.js +18 -0
- package/dist/helpers/index.js.map +1 -0
- package/dist/helpers/wrapGrpcFunctions.d.ts +5 -0
- package/dist/helpers/wrapGrpcFunctions.js +37 -0
- package/dist/helpers/wrapGrpcFunctions.js.map +1 -0
- package/dist/helpers/wrapRouterFunctions.d.ts +7 -0
- package/dist/helpers/wrapRouterFunctions.js +111 -0
- package/dist/helpers/wrapRouterFunctions.js.map +1 -0
- package/dist/index.d.ts +70 -0
- package/dist/index.js +481 -0
- package/dist/index.js.map +1 -0
- package/dist/interceptors/grpcSignedToken.d.ts +2 -0
- package/dist/interceptors/grpcSignedToken.js +88 -0
- package/dist/interceptors/grpcSignedToken.js.map +1 -0
- package/dist/interceptors/index.d.ts +2 -0
- package/dist/interceptors/index.js +15 -0
- package/dist/interceptors/index.js.map +1 -0
- package/dist/interceptors/moduleName.d.ts +2 -0
- package/dist/interceptors/moduleName.js +88 -0
- package/dist/interceptors/moduleName.js.map +1 -0
- package/dist/interfaces/ConduitService.d.ts +8 -0
- package/dist/interfaces/ConduitService.js +3 -0
- package/dist/interfaces/ConduitService.js.map +1 -0
- package/dist/interfaces/GrpcCallback.d.ts +4 -0
- package/dist/interfaces/GrpcCallback.js +3 -0
- package/dist/interfaces/GrpcCallback.js.map +1 -0
- package/dist/interfaces/Indexable.d.ts +9 -0
- package/dist/interfaces/Indexable.js +3 -0
- package/dist/interfaces/Indexable.js.map +1 -0
- package/dist/interfaces/Middleware.d.ts +7 -0
- package/dist/interfaces/Middleware.js +3 -0
- package/dist/interfaces/Middleware.js.map +1 -0
- package/dist/interfaces/Model.d.ts +37 -0
- package/dist/interfaces/Model.js +19 -0
- package/dist/interfaces/Model.js.map +1 -0
- package/dist/interfaces/Route.d.ts +54 -0
- package/dist/interfaces/Route.js +21 -0
- package/dist/interfaces/Route.js.map +1 -0
- package/dist/interfaces/Socket.d.ts +34 -0
- package/dist/interfaces/Socket.js +9 -0
- package/dist/interfaces/Socket.js.map +1 -0
- package/dist/interfaces/index.d.ts +7 -0
- package/dist/interfaces/index.js +20 -0
- package/dist/interfaces/index.js.map +1 -0
- package/dist/modules/admin/index.d.ts +13 -0
- package/dist/modules/admin/index.js +131 -0
- package/dist/modules/admin/index.js.map +1 -0
- package/dist/modules/authentication/index.d.ts +11 -0
- package/dist/modules/authentication/index.js +50 -0
- package/dist/modules/authentication/index.js.map +1 -0
- package/dist/modules/chat/index.d.ts +10 -0
- package/dist/modules/chat/index.js +46 -0
- package/dist/modules/chat/index.js.map +1 -0
- package/dist/modules/config/index.d.ts +25 -0
- package/dist/modules/config/index.js +234 -0
- package/dist/modules/config/index.js.map +1 -0
- package/dist/modules/core/index.d.ts +6 -0
- package/dist/modules/core/index.js +32 -0
- package/dist/modules/core/index.js.map +1 -0
- package/dist/modules/database/index.d.ts +30 -0
- package/dist/modules/database/index.js +201 -0
- package/dist/modules/database/index.js.map +1 -0
- package/dist/modules/email/index.d.ts +21 -0
- package/dist/modules/email/index.js +63 -0
- package/dist/modules/email/index.js.map +1 -0
- package/dist/modules/forms/index.d.ts +7 -0
- package/dist/modules/forms/index.js +37 -0
- package/dist/modules/forms/index.js.map +1 -0
- package/dist/modules/index.d.ts +11 -0
- package/dist/modules/index.js +24 -0
- package/dist/modules/index.js.map +1 -0
- package/dist/modules/pushNotifications/index.d.ts +10 -0
- package/dist/modules/pushNotifications/index.js +63 -0
- package/dist/modules/pushNotifications/index.js.map +1 -0
- package/dist/modules/router/index.d.ts +8 -0
- package/dist/modules/router/index.js +43 -0
- package/dist/modules/router/index.js.map +1 -0
- package/dist/modules/sms/index.d.ts +10 -0
- package/dist/modules/sms/index.js +46 -0
- package/dist/modules/sms/index.js.map +1 -0
- package/dist/modules/storage/index.d.ts +10 -0
- package/dist/modules/storage/index.js +47 -0
- package/dist/modules/storage/index.js.map +1 -0
- package/dist/protoUtils/authentication.d.ts +209 -0
- package/dist/protoUtils/authentication.js +533 -0
- package/dist/protoUtils/authentication.js.map +1 -0
- package/dist/protoUtils/chat.d.ts +178 -0
- package/dist/protoUtils/chat.js +534 -0
- package/dist/protoUtils/chat.js.map +1 -0
- package/dist/protoUtils/core.d.ts +607 -0
- package/dist/protoUtils/core.js +1883 -0
- package/dist/protoUtils/core.js.map +1 -0
- package/dist/protoUtils/database.d.ts +496 -0
- package/dist/protoUtils/database.js +1275 -0
- package/dist/protoUtils/database.js.map +1 -0
- package/dist/protoUtils/email.d.ts +153 -0
- package/dist/protoUtils/email.js +543 -0
- package/dist/protoUtils/email.js.map +1 -0
- package/dist/protoUtils/forms.d.ts +54 -0
- package/dist/protoUtils/forms.js +141 -0
- package/dist/protoUtils/forms.js.map +1 -0
- package/dist/protoUtils/grpc_health_check.d.ts +83 -0
- package/dist/protoUtils/grpc_health_check.js +197 -0
- package/dist/protoUtils/grpc_health_check.js.map +1 -0
- package/dist/protoUtils/push-notifications.d.ts +179 -0
- package/dist/protoUtils/push-notifications.js +512 -0
- package/dist/protoUtils/push-notifications.js.map +1 -0
- package/dist/protoUtils/sms.d.ts +176 -0
- package/dist/protoUtils/sms.js +459 -0
- package/dist/protoUtils/sms.js.map +1 -0
- package/dist/protoUtils/storage.d.ts +203 -0
- package/dist/protoUtils/storage.js +522 -0
- package/dist/protoUtils/storage.js.map +1 -0
- package/dist/types/index.d.ts +55 -0
- package/dist/types/index.js +37 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utilities/EventBus.d.ts +10 -0
- package/dist/utilities/EventBus.js +52 -0
- package/dist/utilities/EventBus.js.map +1 -0
- package/dist/utilities/RedisManager.d.ts +6 -0
- package/dist/utilities/RedisManager.js +32 -0
- package/dist/utilities/RedisManager.js.map +1 -0
- package/dist/utilities/StateManager.d.ts +10 -0
- package/dist/utilities/StateManager.js +31 -0
- package/dist/utilities/StateManager.js.map +1 -0
- package/dist/utilities/index.d.ts +1 -0
- package/dist/utilities/index.js +10 -0
- package/dist/utilities/index.js.map +1 -0
- package/package.json +56 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.EventBus = void 0;
|
|
7
|
+
var crypto_1 = __importDefault(require("crypto"));
|
|
8
|
+
var EventBus = /** @class */ (function () {
|
|
9
|
+
function EventBus(redisManager) {
|
|
10
|
+
this._subscribedChannels = {};
|
|
11
|
+
this._clientSubscriber = redisManager.getClient({ keyPrefix: '_bus' });
|
|
12
|
+
this._clientPublisher = redisManager.getClient({ keyPrefix: '_bus' });
|
|
13
|
+
this._signature = crypto_1.default.randomBytes(20).toString('hex');
|
|
14
|
+
this._clientSubscriber.on('ready', function () {
|
|
15
|
+
console.log('The Bus is in the station...hehe');
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
EventBus.prototype.subscribe = function (channelName, callback) {
|
|
19
|
+
if (this._subscribedChannels[channelName]) {
|
|
20
|
+
this._subscribedChannels[channelName].push(callback);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
this._subscribedChannels[channelName] = [callback];
|
|
24
|
+
this._clientSubscriber.subscribe(channelName, function () { });
|
|
25
|
+
var self = this;
|
|
26
|
+
this._clientSubscriber.on('message', function (channel, message) {
|
|
27
|
+
if (channel !== channelName)
|
|
28
|
+
return;
|
|
29
|
+
// if the message supports the signature
|
|
30
|
+
if (message.indexOf('CND_Signature') !== -1) {
|
|
31
|
+
// if the message does not contain this module's signature
|
|
32
|
+
if (message.indexOf(self._signature) === -1) {
|
|
33
|
+
self._subscribedChannels[channelName].forEach(function (fn) {
|
|
34
|
+
fn(message.split('CND_Signature:')[0]);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
self._subscribedChannels[channelName].forEach(function (fn) {
|
|
40
|
+
fn(message);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
EventBus.prototype.publish = function (channelName, message) {
|
|
46
|
+
message = message + ("CND_Signature:" + this._signature);
|
|
47
|
+
this._clientPublisher.publish(channelName, message);
|
|
48
|
+
};
|
|
49
|
+
return EventBus;
|
|
50
|
+
}());
|
|
51
|
+
exports.EventBus = EventBus;
|
|
52
|
+
//# sourceMappingURL=EventBus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventBus.js","sourceRoot":"","sources":["../../src/utilities/EventBus.ts"],"names":[],"mappings":";;;;;;AAEA,kDAA4B;AAE5B;IAKE,kBAAY,YAA0B;QACpC,IAAI,CAAC,mBAAmB,GAAG,EAAE,CAAC;QAC9B,IAAI,CAAC,iBAAiB,GAAG,YAAY,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC;QACvE,IAAI,CAAC,gBAAgB,GAAG,YAAY,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC;QACtE,IAAI,CAAC,UAAU,GAAG,gBAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACzD,IAAI,CAAC,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE;YACjC,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;IACL,CAAC;IAED,4BAAS,GAAT,UAAU,WAAmB,EAAE,QAAmC;QAChE,IAAI,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,EAAE;YACzC,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACrD,OAAO;SACR;QACD,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACnD,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,WAAW,EAAE,cAAO,CAAC,CAAC,CAAC;QACxD,IAAM,IAAI,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,UAAC,OAAe,EAAE,OAAe;YACpE,IAAI,OAAO,KAAK,WAAW;gBAAE,OAAO;YACpC,wCAAwC;YACxC,IAAI,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE;gBAC3C,0DAA0D;gBAC1D,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE;oBAC3C,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,UAAA,EAAE;wBAC9C,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;oBACzC,CAAC,CAAC,CAAC;iBACJ;aACF;iBAAM;gBACL,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,UAAA,EAAE;oBAC9C,EAAE,CAAC,OAAO,CAAC,CAAC;gBACd,CAAC,CAAC,CAAC;aACJ;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,0BAAO,GAAP,UAAQ,WAAmB,EAAE,OAAe;QAC1C,OAAO,GAAG,OAAO,IAAG,mBAAiB,IAAI,CAAC,UAAY,CAAA,CAAC;QACvD,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;IACH,eAAC;AAAD,CAAC,AA7CD,IA6CC;AA7CY,4BAAQ"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.RedisManager = void 0;
|
|
18
|
+
var ioredis_1 = __importDefault(require("ioredis"));
|
|
19
|
+
var RedisManager = /** @class */ (function () {
|
|
20
|
+
function RedisManager(redisIp, redisPort) {
|
|
21
|
+
this.redisConnection = {
|
|
22
|
+
host: redisIp,
|
|
23
|
+
port: redisPort,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
RedisManager.prototype.getClient = function (connectionOps) {
|
|
27
|
+
return new ioredis_1.default(__assign(__assign({}, this.redisConnection), connectionOps));
|
|
28
|
+
};
|
|
29
|
+
return RedisManager;
|
|
30
|
+
}());
|
|
31
|
+
exports.RedisManager = RedisManager;
|
|
32
|
+
//# sourceMappingURL=RedisManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RedisManager.js","sourceRoot":"","sources":["../../src/utilities/RedisManager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oDAA8B;AAE9B;IAGE,sBAAY,OAAe,EAAE,SAAc;QACzC,IAAI,CAAC,eAAe,GAAG;YACrB,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,SAAS;SAChB,CAAC;IACJ,CAAC;IAED,gCAAS,GAAT,UAAU,aAAmB;QAC3B,OAAO,IAAI,iBAAO,uBAAM,IAAI,CAAC,eAAe,GAAK,aAAa,EAAG,CAAC;IACpE,CAAC;IACH,mBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,oCAAY"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RedisManager } from './RedisManager';
|
|
2
|
+
export declare class StateManager {
|
|
3
|
+
private readonly redisClient;
|
|
4
|
+
constructor(redisManager: RedisManager, name: string);
|
|
5
|
+
setState(stateObj: any): Promise<"OK" | null>;
|
|
6
|
+
getState(): Promise<string | null>;
|
|
7
|
+
setKey(keyName: string, value: any, expiry?: number): Promise<"OK" | null>;
|
|
8
|
+
clearKey(keyName: string): Promise<number>;
|
|
9
|
+
getKey(keyName: string): Promise<string | null>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StateManager = void 0;
|
|
4
|
+
var StateManager = /** @class */ (function () {
|
|
5
|
+
function StateManager(redisManager, name) {
|
|
6
|
+
this.redisClient = redisManager.getClient({ keyPrefix: name });
|
|
7
|
+
}
|
|
8
|
+
StateManager.prototype.setState = function (stateObj) {
|
|
9
|
+
return this.setKey('state', stateObj);
|
|
10
|
+
};
|
|
11
|
+
StateManager.prototype.getState = function () {
|
|
12
|
+
return this.getKey('state');
|
|
13
|
+
};
|
|
14
|
+
StateManager.prototype.setKey = function (keyName, value, expiry) {
|
|
15
|
+
if (expiry) {
|
|
16
|
+
return this.redisClient.set(keyName, value, 'PX', expiry);
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
return this.redisClient.set(keyName, value);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
StateManager.prototype.clearKey = function (keyName) {
|
|
23
|
+
return this.redisClient.del(keyName);
|
|
24
|
+
};
|
|
25
|
+
StateManager.prototype.getKey = function (keyName) {
|
|
26
|
+
return this.redisClient.get(keyName);
|
|
27
|
+
};
|
|
28
|
+
return StateManager;
|
|
29
|
+
}());
|
|
30
|
+
exports.StateManager = StateManager;
|
|
31
|
+
//# sourceMappingURL=StateManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StateManager.js","sourceRoot":"","sources":["../../src/utilities/StateManager.ts"],"names":[],"mappings":";;;AAGA;IAGE,sBAAY,YAA0B,EAAE,IAAY;QAClD,IAAI,CAAC,WAAW,GAAG,YAAY,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACjE,CAAC;IAED,+BAAQ,GAAR,UAAS,QAAa;QACpB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IACxC,CAAC;IAED,+BAAQ,GAAR;QACE,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;IAED,6BAAM,GAAN,UAAO,OAAe,EAAE,KAAU,EAAE,MAAe;QACjD,IAAI,MAAM,EAAE;YACV,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;SAC3D;aAAM;YACL,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;SAC7C;IACH,CAAC;IAED,+BAAQ,GAAR,UAAS,OAAe;QACtB,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC;IAED,6BAAM,GAAN,UAAO,OAAe;QACpB,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC;IACH,mBAAC;AAAD,CAAC,AA9BD,IA8BC;AA9BY,oCAAY"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function sleep(ms: number): Promise<unknown>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sleep = void 0;
|
|
4
|
+
function sleep(ms) {
|
|
5
|
+
return new Promise(function (resolve) {
|
|
6
|
+
setTimeout(resolve, ms);
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
exports.sleep = sleep;
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utilities/index.ts"],"names":[],"mappings":";;;AAAA,SAAgB,KAAK,CAAC,EAAU;IAC9B,OAAO,IAAI,OAAO,CAAC,UAAA,OAAO;QACxB,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,sBAIC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@conduitplatform/grpc-sdk",
|
|
3
|
+
"version": "0.13.0-rc.1",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": ">=14"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"prepublish": "npm run build",
|
|
11
|
+
"prebuild": "npm run protoc",
|
|
12
|
+
"build": "rimraf dist && tsc",
|
|
13
|
+
"protoc": "sh build.sh"
|
|
14
|
+
},
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@grpc/grpc-js": "^1.5.3",
|
|
18
|
+
"@grpc/proto-loader": "^0.6.9",
|
|
19
|
+
"@types/google-protobuf": "^3.15.5",
|
|
20
|
+
"@types/ioredis": "^4.28.7",
|
|
21
|
+
"@types/lodash": "^4.14.178",
|
|
22
|
+
"convict": "^6.2.3",
|
|
23
|
+
"fast-jwt": "^1.5.4",
|
|
24
|
+
"ioredis": "^4.28.3",
|
|
25
|
+
"lodash": "^4.17.21",
|
|
26
|
+
"nice-grpc": "^1.0.6",
|
|
27
|
+
"protobufjs": "^6.11.2"
|
|
28
|
+
},
|
|
29
|
+
"directories": {
|
|
30
|
+
"lib": "dist",
|
|
31
|
+
"src": "src"
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"dist"
|
|
35
|
+
],
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "ssh://git@github.com/ConduitPlatform/conduit.git",
|
|
39
|
+
"directory": "libraries/grpc-sdk"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@types/convict": "^4.2.1",
|
|
43
|
+
"@types/google-protobuf": "^3.15.5",
|
|
44
|
+
"@types/ioredis": "^4.28.7",
|
|
45
|
+
"@types/lodash": "^4.14.178",
|
|
46
|
+
"@types/node": "14.14.31",
|
|
47
|
+
"copyfiles": "^2.2.0",
|
|
48
|
+
"rimraf": "^3.0.2",
|
|
49
|
+
"ts-proto": "^1.105.0",
|
|
50
|
+
"typescript": "~4.2.0"
|
|
51
|
+
},
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"@grpc/grpc-js": "^1.5.2",
|
|
54
|
+
"@grpc/proto-loader": "^0.6.9"
|
|
55
|
+
}
|
|
56
|
+
}
|