@conduitplatform/grpc-sdk 0.16.0-alpha.3 → 0.16.0-alpha.5
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/classes/ConduitModule.d.ts +5 -5
- package/dist/classes/ConduitModule.js +45 -24
- package/dist/classes/ConduitModule.js.map +1 -1
- package/dist/classes/ConduitSchema.js.map +1 -1
- package/dist/classes/HealthCheck.js +35 -8
- package/dist/classes/HealthCheck.js.map +1 -1
- package/dist/classes/index.d.ts +2 -6
- package/dist/classes/index.js +2 -6
- package/dist/classes/index.js.map +1 -1
- package/dist/index.d.ts +27 -26
- package/dist/index.js +119 -119
- package/dist/index.js.map +1 -1
- package/dist/interfaces/ConduitMiddleware.js.map +1 -0
- package/dist/{routing/interfaces → interfaces}/ConduitRoute.d.ts +2 -3
- package/dist/interfaces/ConduitRoute.js.map +1 -0
- package/dist/{routing → interfaces}/ConduitRouteReturn.d.ts +1 -1
- package/dist/interfaces/ConduitRouteReturn.js.map +1 -0
- package/dist/interfaces/ConduitSchemaExtension.d.ts +1 -1
- package/dist/{utilities/Logger.d.ts → interfaces/IConduitLogger.d.ts} +4 -7
- package/dist/interfaces/{ConduitService.js → IConduitLogger.js} +1 -1
- package/dist/interfaces/IConduitLogger.js.map +1 -0
- package/dist/{metrics/index.d.ts → interfaces/IConduitMetrics.d.ts} +5 -11
- package/dist/interfaces/IConduitMetrics.js +3 -0
- package/dist/interfaces/IConduitMetrics.js.map +1 -0
- package/dist/interfaces/Indexable.d.ts +0 -1
- package/dist/interfaces/ProxyRoute.js.map +1 -0
- package/dist/{routing/interfaces → interfaces}/Route.d.ts +2 -1
- package/dist/interfaces/Route.js.map +1 -0
- package/dist/{routing/interfaces → interfaces}/Socket.d.ts +3 -4
- package/dist/interfaces/Socket.js.map +1 -0
- package/dist/interfaces/index.d.ts +9 -2
- package/dist/interfaces/index.js +9 -2
- package/dist/interfaces/index.js.map +1 -1
- package/dist/{routing/interfaces → interfaces}/types.d.ts +5 -3
- package/dist/{routing/interfaces → interfaces}/types.js.map +1 -1
- package/dist/modules/admin/index.d.ts +2 -2
- package/dist/modules/admin/index.js +2 -2
- package/dist/modules/admin/index.js.map +1 -1
- package/dist/modules/config/index.d.ts +3 -3
- package/dist/modules/config/index.js +6 -3
- package/dist/modules/config/index.js.map +1 -1
- package/dist/modules/database/index.d.ts +5 -4
- package/dist/modules/database/index.js +15 -15
- package/dist/modules/database/index.js.map +1 -1
- package/dist/modules/router/index.d.ts +2 -2
- package/dist/modules/router/index.js +2 -2
- package/dist/modules/router/index.js.map +1 -1
- package/dist/modules/storage/index.d.ts +6 -2
- package/dist/modules/storage/index.js +22 -2
- package/dist/modules/storage/index.js.map +1 -1
- package/dist/protoUtils/storage.d.ts +131 -6
- package/dist/protoUtils/storage.js +486 -50
- package/dist/protoUtils/storage.js.map +1 -1
- package/dist/types/index.d.ts +1 -2
- package/dist/types/index.js +15 -0
- package/dist/types/index.js.map +1 -1
- package/dist/utilities/RedisManager.js.map +1 -1
- package/dist/utilities/index.d.ts +3 -2
- package/dist/utilities/index.js +3 -2
- package/dist/utilities/index.js.map +1 -1
- package/package.json +5 -15
- package/dist/classes/ConduitActiveSchema.d.ts +0 -19
- package/dist/classes/ConduitActiveSchema.js +0 -57
- package/dist/classes/ConduitActiveSchema.js.map +0 -1
- package/dist/classes/ConduitServiceModule.d.ts +0 -26
- package/dist/classes/ConduitServiceModule.js +0 -166
- package/dist/classes/ConduitServiceModule.js.map +0 -1
- package/dist/classes/ConfigController.d.ts +0 -7
- package/dist/classes/ConfigController.js +0 -27
- package/dist/classes/ConfigController.js.map +0 -1
- package/dist/classes/GrpcServer.d.ts +0 -22
- package/dist/classes/GrpcServer.js +0 -207
- package/dist/classes/GrpcServer.js.map +0 -1
- package/dist/classes/ManagedModule.d.ts +0 -74
- package/dist/classes/ManagedModule.js +0 -333
- package/dist/classes/ManagedModule.js.map +0 -1
- package/dist/classes/ModuleManager.d.ts +0 -11
- package/dist/classes/ModuleManager.js +0 -204
- package/dist/classes/ModuleManager.js.map +0 -1
- package/dist/helpers/GrpcHelper.d.ts +0 -8
- package/dist/helpers/GrpcHelper.js +0 -43
- package/dist/helpers/GrpcHelper.js.map +0 -1
- package/dist/helpers/TypeHelpers.d.ts +0 -44
- package/dist/helpers/TypeHelpers.js +0 -144
- package/dist/helpers/TypeHelpers.js.map +0 -1
- package/dist/helpers/index.d.ts +0 -3
- package/dist/helpers/index.js +0 -20
- package/dist/helpers/index.js.map +0 -1
- package/dist/helpers/wrapGrpcFunctions.d.ts +0 -5
- package/dist/helpers/wrapGrpcFunctions.js +0 -56
- package/dist/helpers/wrapGrpcFunctions.js.map +0 -1
- package/dist/interfaces/ConduitService.d.ts +0 -8
- package/dist/interfaces/ConduitService.js.map +0 -1
- package/dist/metrics/MetricsServer.d.ts +0 -9
- package/dist/metrics/MetricsServer.js +0 -94
- package/dist/metrics/MetricsServer.js.map +0 -1
- package/dist/metrics/clientMiddleware.d.ts +0 -2
- package/dist/metrics/clientMiddleware.js +0 -265
- package/dist/metrics/clientMiddleware.js.map +0 -1
- package/dist/metrics/config/defaults.d.ts +0 -91
- package/dist/metrics/config/defaults.js +0 -93
- package/dist/metrics/config/defaults.js.map +0 -1
- package/dist/metrics/index.js +0 -152
- package/dist/metrics/index.js.map +0 -1
- package/dist/routing/ConduitRouteReturn.js.map +0 -1
- package/dist/routing/ProxyRouteBuilder.d.ts +0 -21
- package/dist/routing/ProxyRouteBuilder.js +0 -81
- package/dist/routing/ProxyRouteBuilder.js.map +0 -1
- package/dist/routing/RouteBuilder.d.ts +0 -24
- package/dist/routing/RouteBuilder.js +0 -107
- package/dist/routing/RouteBuilder.js.map +0 -1
- package/dist/routing/RoutingManager.d.ts +0 -33
- package/dist/routing/RoutingManager.js +0 -201
- package/dist/routing/RoutingManager.js.map +0 -1
- package/dist/routing/RoutingUtilities.d.ts +0 -7
- package/dist/routing/RoutingUtilities.js +0 -13
- package/dist/routing/RoutingUtilities.js.map +0 -1
- package/dist/routing/index.d.ts +0 -7
- package/dist/routing/index.js +0 -24
- package/dist/routing/index.js.map +0 -1
- package/dist/routing/interfaces/ConduitMiddleware.js.map +0 -1
- package/dist/routing/interfaces/ConduitRoute.js.map +0 -1
- package/dist/routing/interfaces/ProxyRoute.js.map +0 -1
- package/dist/routing/interfaces/Route.js.map +0 -1
- package/dist/routing/interfaces/Socket.js.map +0 -1
- package/dist/routing/interfaces/index.d.ts +0 -6
- package/dist/routing/interfaces/index.js +0 -23
- package/dist/routing/interfaces/index.js.map +0 -1
- package/dist/routing/wrapRouterFunctions.d.ts +0 -8
- package/dist/routing/wrapRouterFunctions.js +0 -132
- package/dist/routing/wrapRouterFunctions.js.map +0 -1
- package/dist/utilities/Logger.js +0 -255
- package/dist/utilities/Logger.js.map +0 -1
- package/dist/utilities/linearBackoffTimeout.d.ts +0 -10
- package/dist/utilities/linearBackoffTimeout.js +0 -119
- package/dist/utilities/linearBackoffTimeout.js.map +0 -1
- package/dist/utilities/merge.d.ts +0 -1
- package/dist/utilities/merge.js +0 -15
- package/dist/utilities/merge.js.map +0 -1
- /package/dist/{routing/interfaces → interfaces}/ConduitMiddleware.d.ts +0 -0
- /package/dist/{routing/interfaces → interfaces}/ConduitMiddleware.js +0 -0
- /package/dist/{routing/interfaces → interfaces}/ConduitRoute.js +0 -0
- /package/dist/{routing → interfaces}/ConduitRouteReturn.js +0 -0
- /package/dist/{routing/interfaces → interfaces}/ProxyRoute.d.ts +0 -0
- /package/dist/{routing/interfaces → interfaces}/ProxyRoute.js +0 -0
- /package/dist/{routing/interfaces → interfaces}/Route.js +0 -0
- /package/dist/{routing/interfaces → interfaces}/Socket.js +0 -0
- /package/dist/{routing/interfaces → interfaces}/types.js +0 -0
|
@@ -1,119 +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
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.linearBackoffTimeoutAsync = exports.linearBackoffTimeout = void 0;
|
|
40
|
-
/**
|
|
41
|
-
* Registers a timeout with linear backoff.
|
|
42
|
-
* onFailure() only runs on rep exhaustion.
|
|
43
|
-
* Timeout can be cleared through returned clear() or inside onTry().
|
|
44
|
-
*/
|
|
45
|
-
var timers_1 = require("timers");
|
|
46
|
-
function linearBackoffTimeout(onTry, delay, reps, onFailure) {
|
|
47
|
-
var _this = this;
|
|
48
|
-
var nextRep = function () { return reps === undefined || --reps > 0; };
|
|
49
|
-
var timeout;
|
|
50
|
-
var invoker = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
51
|
-
return __generator(this, function (_a) {
|
|
52
|
-
delay = Math.floor(delay * 2);
|
|
53
|
-
if (delay > 0 && nextRep()) {
|
|
54
|
-
timeout = setTimeout(invoker, delay);
|
|
55
|
-
onTry(timeout);
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
timeout = null;
|
|
59
|
-
onFailure && onFailure();
|
|
60
|
-
}
|
|
61
|
-
return [2 /*return*/];
|
|
62
|
-
});
|
|
63
|
-
}); };
|
|
64
|
-
timeout = setTimeout(invoker, delay);
|
|
65
|
-
return {
|
|
66
|
-
clear: function () {
|
|
67
|
-
if (timeout) {
|
|
68
|
-
(0, timers_1.clearTimeout)(timeout);
|
|
69
|
-
timeout = null;
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
exports.linearBackoffTimeout = linearBackoffTimeout;
|
|
75
|
-
/**
|
|
76
|
-
* Registers a timeout with linear backoff.
|
|
77
|
-
* onFailure() only runs on rep exhaustion.
|
|
78
|
-
* @param {() => Promise<boolean>} onTry - Async handler, returns 'continue' boolean flag
|
|
79
|
-
*/
|
|
80
|
-
function linearBackoffTimeoutAsync(onTry, delay, reps, onFailure, startNow) {
|
|
81
|
-
if (startNow === void 0) { startNow = false; }
|
|
82
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
-
var nextRep, invoker;
|
|
84
|
-
var _this = this;
|
|
85
|
-
return __generator(this, function (_a) {
|
|
86
|
-
nextRep = function () { return reps === undefined || --reps > 0; };
|
|
87
|
-
invoker = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
88
|
-
var _a;
|
|
89
|
-
return __generator(this, function (_b) {
|
|
90
|
-
switch (_b.label) {
|
|
91
|
-
case 0:
|
|
92
|
-
delay = Math.floor(delay * 2);
|
|
93
|
-
if (!(delay > 0 && nextRep())) return [3 /*break*/, 2];
|
|
94
|
-
return [4 /*yield*/, onTry()];
|
|
95
|
-
case 1:
|
|
96
|
-
if (_b.sent())
|
|
97
|
-
setTimeout(invoker, delay);
|
|
98
|
-
return [3 /*break*/, 5];
|
|
99
|
-
case 2:
|
|
100
|
-
_a = onFailure;
|
|
101
|
-
if (!_a) return [3 /*break*/, 4];
|
|
102
|
-
return [4 /*yield*/, onFailure()];
|
|
103
|
-
case 3:
|
|
104
|
-
_a = (_b.sent());
|
|
105
|
-
_b.label = 4;
|
|
106
|
-
case 4:
|
|
107
|
-
_a;
|
|
108
|
-
_b.label = 5;
|
|
109
|
-
case 5: return [2 /*return*/];
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
}); };
|
|
113
|
-
setTimeout(invoker, startNow ? 0 : delay);
|
|
114
|
-
return [2 /*return*/];
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
exports.linearBackoffTimeoutAsync = linearBackoffTimeoutAsync;
|
|
119
|
-
//# sourceMappingURL=linearBackoffTimeout.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"linearBackoffTimeout.js","sourceRoot":"","sources":["../../src/utilities/linearBackoffTimeout.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,iCAAsC;AAEtC,SAAgB,oBAAoB,CAClC,KAAwC,EACxC,KAAa,EACb,IAAa,EACb,SAAsB;IAJxB,iBA2BC;IArBC,IAAM,OAAO,GAAG,cAAM,OAAA,IAAI,KAAK,SAAS,IAAI,EAAE,IAAI,GAAG,CAAC,EAAhC,CAAgC,CAAC;IACvD,IAAI,OAA8B,CAAC;IACnC,IAAM,OAAO,GAAG;;YACd,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YAC9B,IAAI,KAAK,GAAG,CAAC,IAAI,OAAO,EAAE,EAAE;gBAC1B,OAAO,GAAG,UAAU,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;gBACrC,KAAK,CAAC,OAAO,CAAC,CAAC;aAChB;iBAAM;gBACL,OAAO,GAAG,IAAI,CAAC;gBACf,SAAS,IAAI,SAAS,EAAE,CAAC;aAC1B;;;SACF,CAAC;IACF,OAAO,GAAG,UAAU,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACrC,OAAO;QACL,KAAK,EAAE;YACL,IAAI,OAAO,EAAE;gBACX,IAAA,qBAAY,EAAC,OAAO,CAAC,CAAC;gBACtB,OAAO,GAAG,IAAI,CAAC;aAChB;QACH,CAAC;KACF,CAAC;AACJ,CAAC;AA3BD,oDA2BC;AAED;;;;GAIG;AACH,SAAsB,yBAAyB,CAC7C,KAA6B,EAC7B,KAAa,EACb,IAAa,EACb,SAAsC,EACtC,QAAgB;IAAhB,yBAAA,EAAA,gBAAgB;;;;;YAEV,OAAO,GAAG,cAAM,OAAA,IAAI,KAAK,SAAS,IAAI,EAAE,IAAI,GAAG,CAAC,EAAhC,CAAgC,CAAC;YACjD,OAAO,GAAG;;;;;4BACd,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;iCAC1B,CAAA,KAAK,GAAG,CAAC,IAAI,OAAO,EAAE,CAAA,EAAtB,wBAAsB;4BACpB,qBAAM,KAAK,EAAE,EAAA;;4BAAjB,IAAI,SAAa;gCAAE,UAAU,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;;;4BAE9C,KAAA,SAAS,CAAA;qCAAT,wBAAS;4BAAK,qBAAM,SAAS,EAAE,EAAA;;4BAAlB,KAAA,CAAC,SAAiB,CAAC,CAAA;;;4BAAhC,GAAiC;;;;;iBAEpC,CAAC;YACF,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;;;;CAC3C;AAjBD,8DAiBC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function merge<T extends object>(objA: T, objB: T): {} & T;
|
package/dist/utilities/merge.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.merge = void 0;
|
|
4
|
-
var lodash_1 = require("lodash");
|
|
5
|
-
function merge(objA, objB) {
|
|
6
|
-
var customizer = function (objValue, srcValue) {
|
|
7
|
-
if (Array.isArray(objValue)) {
|
|
8
|
-
// don't merge arrays
|
|
9
|
-
return srcValue;
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
return (0, lodash_1.mergeWith)({}, objA, objB, customizer);
|
|
13
|
-
}
|
|
14
|
-
exports.merge = merge;
|
|
15
|
-
//# sourceMappingURL=merge.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../src/utilities/merge.ts"],"names":[],"mappings":";;;AAAA,iCAAiD;AAEjD,SAAgB,KAAK,CAAmB,IAAO,EAAE,IAAO;IACtD,IAAM,UAAU,GAAG,UAAC,QAAiB,EAAE,QAAiB;QACtD,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YAC3B,qBAAqB;YACrB,OAAO,QAAQ,CAAC;SACjB;IACH,CAAC,CAAC;IACF,OAAO,IAAA,kBAAU,EAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;AAChD,CAAC;AARD,sBAQC"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|