@conduitplatform/grpc-sdk 0.16.0-alpha.1 → 0.16.0-alpha.10

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.
Files changed (220) hide show
  1. package/README.mdx +1 -7
  2. package/dist/classes/ConduitModule.d.ts +9 -6
  3. package/dist/classes/ConduitModule.js +85 -48
  4. package/dist/classes/ConduitModule.js.map +1 -1
  5. package/dist/classes/ConduitSchema.js.map +1 -1
  6. package/dist/classes/HealthCheck.js +36 -9
  7. package/dist/classes/HealthCheck.js.map +1 -1
  8. package/dist/classes/index.d.ts +2 -6
  9. package/dist/classes/index.js +2 -6
  10. package/dist/classes/index.js.map +1 -1
  11. package/dist/index.d.ts +33 -31
  12. package/dist/index.js +155 -176
  13. package/dist/index.js.map +1 -1
  14. package/dist/interceptors/grpcSignedToken.d.ts +1 -1
  15. package/dist/interceptors/grpcSignedToken.js +2 -2
  16. package/dist/interceptors/moduleName.d.ts +1 -1
  17. package/dist/interceptors/moduleName.js +2 -2
  18. package/dist/interfaces/ConduitMiddleware.js.map +1 -0
  19. package/dist/{routing/interfaces → interfaces}/ConduitRoute.d.ts +2 -3
  20. package/dist/interfaces/ConduitRoute.js.map +1 -0
  21. package/dist/{routing → interfaces}/ConduitRouteReturn.d.ts +3 -3
  22. package/dist/interfaces/ConduitRouteReturn.js.map +1 -0
  23. package/dist/interfaces/ConduitSchemaExtension.d.ts +1 -1
  24. package/dist/interfaces/GrpcCallback.d.ts +1 -1
  25. package/dist/{utilities/Logger.d.ts → interfaces/IConduitLogger.d.ts} +4 -7
  26. package/dist/interfaces/{ConduitService.js → IConduitLogger.js} +1 -1
  27. package/dist/interfaces/IConduitLogger.js.map +1 -0
  28. package/dist/{metrics/index.d.ts → interfaces/IConduitMetrics.d.ts} +5 -11
  29. package/dist/interfaces/IConduitMetrics.js +3 -0
  30. package/dist/interfaces/IConduitMetrics.js.map +1 -0
  31. package/dist/interfaces/Indexable.d.ts +7 -8
  32. package/dist/interfaces/Model.d.ts +63 -13
  33. package/dist/interfaces/Model.js.map +1 -1
  34. package/dist/interfaces/Params.d.ts +3 -3
  35. package/dist/interfaces/ProxyRoute.js.map +1 -0
  36. package/dist/interfaces/RawQuery.d.ts +2 -2
  37. package/dist/interfaces/Route.d.ts +61 -0
  38. package/dist/interfaces/Route.js +12 -0
  39. package/dist/interfaces/Route.js.map +1 -0
  40. package/dist/{routing/interfaces → interfaces}/Socket.d.ts +4 -5
  41. package/dist/interfaces/Socket.js.map +1 -0
  42. package/dist/interfaces/UntypedArray.d.ts +1 -1
  43. package/dist/interfaces/index.d.ts +9 -2
  44. package/dist/interfaces/index.js +9 -2
  45. package/dist/interfaces/index.js.map +1 -1
  46. package/dist/{routing/interfaces → interfaces}/types.d.ts +11 -9
  47. package/dist/{routing/interfaces → interfaces}/types.js.map +1 -1
  48. package/dist/module.proto +14 -0
  49. package/dist/modules/admin/index.d.ts +5 -4
  50. package/dist/modules/admin/index.js +12 -5
  51. package/dist/modules/admin/index.js.map +1 -1
  52. package/dist/modules/authorization/index.d.ts +3 -2
  53. package/dist/modules/authorization/index.js +4 -4
  54. package/dist/modules/authorization/index.js.map +1 -1
  55. package/dist/modules/config/index.d.ts +5 -5
  56. package/dist/modules/config/index.js +38 -28
  57. package/dist/modules/config/index.js.map +1 -1
  58. package/dist/modules/database/index.d.ts +6 -5
  59. package/dist/modules/database/index.js +15 -15
  60. package/dist/modules/database/index.js.map +1 -1
  61. package/dist/modules/index.d.ts +0 -2
  62. package/dist/modules/index.js +0 -2
  63. package/dist/modules/index.js.map +1 -1
  64. package/dist/modules/router/index.d.ts +4 -3
  65. package/dist/modules/router/index.js +9 -2
  66. package/dist/modules/router/index.js.map +1 -1
  67. package/dist/modules/storage/index.d.ts +6 -2
  68. package/dist/modules/storage/index.js +22 -2
  69. package/dist/modules/storage/index.js.map +1 -1
  70. package/dist/protoUtils/authentication.d.ts +3 -48
  71. package/dist/protoUtils/authentication.js +1 -110
  72. package/dist/protoUtils/authentication.js.map +1 -1
  73. package/dist/protoUtils/authorization.d.ts +28 -82
  74. package/dist/protoUtils/authorization.js +10 -156
  75. package/dist/protoUtils/authorization.js.map +1 -1
  76. package/dist/protoUtils/chat.d.ts +7 -61
  77. package/dist/protoUtils/chat.js +3 -149
  78. package/dist/protoUtils/chat.js.map +1 -1
  79. package/dist/protoUtils/core.d.ts +115 -90
  80. package/dist/protoUtils/core.js +110 -48
  81. package/dist/protoUtils/core.js.map +1 -1
  82. package/dist/protoUtils/database.d.ts +7 -17
  83. package/dist/protoUtils/database.js +3 -41
  84. package/dist/protoUtils/database.js.map +1 -1
  85. package/dist/protoUtils/email.d.ts +3 -48
  86. package/dist/protoUtils/email.js +1 -110
  87. package/dist/protoUtils/email.js.map +1 -1
  88. package/dist/protoUtils/google/protobuf/empty.d.ts +25 -0
  89. package/dist/protoUtils/google/protobuf/empty.js +47 -0
  90. package/dist/protoUtils/google/protobuf/empty.js.map +1 -0
  91. package/dist/protoUtils/grpc_health_check.d.ts +3 -4
  92. package/dist/protoUtils/grpc_health_check.js +1 -2
  93. package/dist/protoUtils/grpc_health_check.js.map +1 -1
  94. package/dist/protoUtils/index.d.ts +12 -0
  95. package/dist/{routing/interfaces → protoUtils}/index.js +12 -6
  96. package/dist/protoUtils/index.js.map +1 -0
  97. package/dist/protoUtils/{forms.d.ts → module.d.ts} +6 -7
  98. package/dist/protoUtils/{forms.js → module.js} +5 -6
  99. package/dist/protoUtils/module.js.map +1 -0
  100. package/dist/protoUtils/push-notifications.d.ts +3 -48
  101. package/dist/protoUtils/push-notifications.js +1 -110
  102. package/dist/protoUtils/push-notifications.js.map +1 -1
  103. package/dist/protoUtils/router.d.ts +45 -64
  104. package/dist/protoUtils/router.js +110 -156
  105. package/dist/protoUtils/router.js.map +1 -1
  106. package/dist/protoUtils/sms.d.ts +3 -48
  107. package/dist/protoUtils/sms.js +1 -110
  108. package/dist/protoUtils/sms.js.map +1 -1
  109. package/dist/protoUtils/storage.d.ts +134 -62
  110. package/dist/protoUtils/storage.js +433 -170
  111. package/dist/protoUtils/storage.js.map +1 -1
  112. package/dist/types/db.d.ts +11 -11
  113. package/dist/types/index.d.ts +3 -10
  114. package/dist/types/index.js +15 -0
  115. package/dist/types/index.js.map +1 -1
  116. package/dist/utilities/RedisManager.js.map +1 -1
  117. package/dist/utilities/env.d.ts +1 -0
  118. package/dist/utilities/env.js +37 -0
  119. package/dist/utilities/env.js.map +1 -0
  120. package/dist/utilities/index.d.ts +4 -2
  121. package/dist/utilities/index.js +4 -2
  122. package/dist/utilities/index.js.map +1 -1
  123. package/package.json +24 -25
  124. package/dist/classes/ConduitActiveSchema.d.ts +0 -19
  125. package/dist/classes/ConduitActiveSchema.js +0 -57
  126. package/dist/classes/ConduitActiveSchema.js.map +0 -1
  127. package/dist/classes/ConduitServiceModule.d.ts +0 -26
  128. package/dist/classes/ConduitServiceModule.js +0 -166
  129. package/dist/classes/ConduitServiceModule.js.map +0 -1
  130. package/dist/classes/ConfigController.d.ts +0 -7
  131. package/dist/classes/ConfigController.js +0 -27
  132. package/dist/classes/ConfigController.js.map +0 -1
  133. package/dist/classes/GrpcServer.d.ts +0 -22
  134. package/dist/classes/GrpcServer.js +0 -207
  135. package/dist/classes/GrpcServer.js.map +0 -1
  136. package/dist/classes/ManagedModule.d.ts +0 -74
  137. package/dist/classes/ManagedModule.js +0 -333
  138. package/dist/classes/ManagedModule.js.map +0 -1
  139. package/dist/classes/ModuleManager.d.ts +0 -11
  140. package/dist/classes/ModuleManager.js +0 -205
  141. package/dist/classes/ModuleManager.js.map +0 -1
  142. package/dist/helpers/GrpcHelper.d.ts +0 -8
  143. package/dist/helpers/GrpcHelper.js +0 -43
  144. package/dist/helpers/GrpcHelper.js.map +0 -1
  145. package/dist/helpers/TypeHelpers.d.ts +0 -44
  146. package/dist/helpers/TypeHelpers.js +0 -144
  147. package/dist/helpers/TypeHelpers.js.map +0 -1
  148. package/dist/helpers/index.d.ts +0 -3
  149. package/dist/helpers/index.js +0 -20
  150. package/dist/helpers/index.js.map +0 -1
  151. package/dist/helpers/wrapGrpcFunctions.d.ts +0 -5
  152. package/dist/helpers/wrapGrpcFunctions.js +0 -56
  153. package/dist/helpers/wrapGrpcFunctions.js.map +0 -1
  154. package/dist/interfaces/ConduitService.d.ts +0 -8
  155. package/dist/interfaces/ConduitService.js.map +0 -1
  156. package/dist/metrics/MetricsServer.d.ts +0 -9
  157. package/dist/metrics/MetricsServer.js +0 -94
  158. package/dist/metrics/MetricsServer.js.map +0 -1
  159. package/dist/metrics/clientMiddleware.d.ts +0 -2
  160. package/dist/metrics/clientMiddleware.js +0 -265
  161. package/dist/metrics/clientMiddleware.js.map +0 -1
  162. package/dist/metrics/config/defaults.d.ts +0 -91
  163. package/dist/metrics/config/defaults.js +0 -93
  164. package/dist/metrics/config/defaults.js.map +0 -1
  165. package/dist/metrics/index.js +0 -152
  166. package/dist/metrics/index.js.map +0 -1
  167. package/dist/modules/forms/index.d.ts +0 -6
  168. package/dist/modules/forms/index.js +0 -32
  169. package/dist/modules/forms/index.js.map +0 -1
  170. package/dist/modules/functions/index.d.ts +0 -6
  171. package/dist/modules/functions/index.js +0 -32
  172. package/dist/modules/functions/index.js.map +0 -1
  173. package/dist/protoUtils/forms.js.map +0 -1
  174. package/dist/protoUtils/functions.d.ts +0 -58
  175. package/dist/protoUtils/functions.js +0 -127
  176. package/dist/protoUtils/functions.js.map +0 -1
  177. package/dist/routing/ConduitRouteReturn.js.map +0 -1
  178. package/dist/routing/ProxyRouteBuilder.d.ts +0 -21
  179. package/dist/routing/ProxyRouteBuilder.js +0 -81
  180. package/dist/routing/ProxyRouteBuilder.js.map +0 -1
  181. package/dist/routing/RouteBuilder.d.ts +0 -24
  182. package/dist/routing/RouteBuilder.js +0 -107
  183. package/dist/routing/RouteBuilder.js.map +0 -1
  184. package/dist/routing/RoutingManager.d.ts +0 -33
  185. package/dist/routing/RoutingManager.js +0 -201
  186. package/dist/routing/RoutingManager.js.map +0 -1
  187. package/dist/routing/RoutingUtilities.d.ts +0 -7
  188. package/dist/routing/RoutingUtilities.js +0 -13
  189. package/dist/routing/RoutingUtilities.js.map +0 -1
  190. package/dist/routing/index.d.ts +0 -7
  191. package/dist/routing/index.js +0 -24
  192. package/dist/routing/index.js.map +0 -1
  193. package/dist/routing/interfaces/ConduitMiddleware.js.map +0 -1
  194. package/dist/routing/interfaces/ConduitRoute.js.map +0 -1
  195. package/dist/routing/interfaces/ProxyRoute.js.map +0 -1
  196. package/dist/routing/interfaces/Route.d.ts +0 -52
  197. package/dist/routing/interfaces/Route.js +0 -21
  198. package/dist/routing/interfaces/Route.js.map +0 -1
  199. package/dist/routing/interfaces/Socket.js.map +0 -1
  200. package/dist/routing/interfaces/index.d.ts +0 -6
  201. package/dist/routing/interfaces/index.js.map +0 -1
  202. package/dist/routing/wrapRouterFunctions.d.ts +0 -8
  203. package/dist/routing/wrapRouterFunctions.js +0 -132
  204. package/dist/routing/wrapRouterFunctions.js.map +0 -1
  205. package/dist/utilities/Logger.js +0 -255
  206. package/dist/utilities/Logger.js.map +0 -1
  207. package/dist/utilities/linearBackoffTimeout.d.ts +0 -10
  208. package/dist/utilities/linearBackoffTimeout.js +0 -119
  209. package/dist/utilities/linearBackoffTimeout.js.map +0 -1
  210. package/dist/utilities/merge.d.ts +0 -1
  211. package/dist/utilities/merge.js +0 -15
  212. package/dist/utilities/merge.js.map +0 -1
  213. /package/dist/{routing/interfaces → interfaces}/ConduitMiddleware.d.ts +0 -0
  214. /package/dist/{routing/interfaces → interfaces}/ConduitMiddleware.js +0 -0
  215. /package/dist/{routing/interfaces → interfaces}/ConduitRoute.js +0 -0
  216. /package/dist/{routing → interfaces}/ConduitRouteReturn.js +0 -0
  217. /package/dist/{routing/interfaces → interfaces}/ProxyRoute.d.ts +0 -0
  218. /package/dist/{routing/interfaces → interfaces}/ProxyRoute.js +0 -0
  219. /package/dist/{routing/interfaces → interfaces}/Socket.js +0 -0
  220. /package/dist/{routing/interfaces → interfaces}/types.js +0 -0
@@ -1,255 +0,0 @@
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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- var desc = Object.getOwnPropertyDescriptor(m, k);
16
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
- desc = { enumerable: true, get: function() { return m[k]; } };
18
- }
19
- Object.defineProperty(o, k2, desc);
20
- }) : (function(o, m, k, k2) {
21
- if (k2 === undefined) k2 = k;
22
- o[k2] = m[k];
23
- }));
24
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
- Object.defineProperty(o, "default", { enumerable: true, value: v });
26
- }) : function(o, v) {
27
- o["default"] = v;
28
- });
29
- var __importStar = (this && this.__importStar) || function (mod) {
30
- if (mod && mod.__esModule) return mod;
31
- var result = {};
32
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
- __setModuleDefault(result, mod);
34
- return result;
35
- };
36
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
- return new (P || (P = Promise))(function (resolve, reject) {
39
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
- step((generator = generator.apply(thisArg, _arguments || [])).next());
43
- });
44
- };
45
- var __generator = (this && this.__generator) || function (thisArg, body) {
46
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
47
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
48
- function verb(n) { return function (v) { return step([n, v]); }; }
49
- function step(op) {
50
- if (f) throw new TypeError("Generator is already executing.");
51
- while (_) try {
52
- 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;
53
- if (y = 0, t) op = [op[0] & 2, t.value];
54
- switch (op[0]) {
55
- case 0: case 1: t = op; break;
56
- case 4: _.label++; return { value: op[1], done: false };
57
- case 5: _.label++; y = op[1]; op = [0]; continue;
58
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
59
- default:
60
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
61
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
62
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
63
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
64
- if (t[2]) _.ops.pop();
65
- _.trys.pop(); continue;
66
- }
67
- op = body.call(thisArg, _);
68
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
69
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
70
- }
71
- };
72
- var __read = (this && this.__read) || function (o, n) {
73
- var m = typeof Symbol === "function" && o[Symbol.iterator];
74
- if (!m) return o;
75
- var i = m.call(o), r, ar = [], e;
76
- try {
77
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
78
- }
79
- catch (error) { e = { error: error }; }
80
- finally {
81
- try {
82
- if (r && !r.done && (m = i["return"])) m.call(i);
83
- }
84
- finally { if (e) throw e.error; }
85
- }
86
- return ar;
87
- };
88
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
89
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
90
- if (ar || !(i in from)) {
91
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
92
- ar[i] = from[i];
93
- }
94
- }
95
- return to.concat(ar || Array.prototype.slice.call(from));
96
- };
97
- var __importDefault = (this && this.__importDefault) || function (mod) {
98
- return (mod && mod.__esModule) ? mod : { "default": mod };
99
- };
100
- Object.defineProperty(exports, "__esModule", { value: true });
101
- exports.setupLoki = exports.ConduitLogger = void 0;
102
- var index_1 = __importDefault(require("../index"));
103
- var utilities_1 = require("../utilities");
104
- var winston_1 = __importStar(require("winston"));
105
- var lodash_1 = require("lodash");
106
- var http_1 = require("http");
107
- var winston_loki_1 = __importDefault(require("winston-loki"));
108
- var processMeta = function (meta) {
109
- if (Array.isArray(meta)) {
110
- return meta.reduce(function (message, meta) {
111
- return "".concat(message, " \n ").concat(JSON.stringify(meta, null, 2));
112
- }, '');
113
- }
114
- else {
115
- return JSON.stringify(meta, null, 2);
116
- }
117
- };
118
- var createFormat = function (logMeta) {
119
- if (logMeta === void 0) { logMeta = true; }
120
- return winston_1.format.combine(winston_1.format.printf(function (info) {
121
- // This will customize the Error Message
122
- if (info.stack) {
123
- return "[".concat(info.timestamp, "] [").concat(info.level.toUpperCase(), "]: ").concat(info.message, " ").concat(info.stack);
124
- }
125
- if (logMeta) {
126
- return "[".concat(info.timestamp, "] [").concat(info.level.toUpperCase(), "]: ").concat(info.message, " ").concat(!(0, lodash_1.isEmpty)(info.meta) ? processMeta(info.meta) : '');
127
- }
128
- else {
129
- return "[".concat(info.timestamp, "] [").concat(info.level.toUpperCase(), "]: ").concat(info.message);
130
- }
131
- }));
132
- };
133
- var defaultTransport = new winston_1.default.transports.Console({
134
- level: 'debug',
135
- format: winston_1.format.combine(winston_1.format.prettyPrint(), winston_1.format.errors({ stack: true }), winston_1.format.timestamp({
136
- format: 'YYYY-MM-DD HH:mm:ss',
137
- }), createFormat(false), winston_1.format.colorize({
138
- all: true,
139
- })),
140
- });
141
- var ConduitLogger = /** @class */ (function () {
142
- function ConduitLogger(transports) {
143
- this._winston = winston_1.default.createLogger({
144
- format: winston_1.format.combine(winston_1.format.prettyPrint(), winston_1.format.errors({ stack: true }), winston_1.format.timestamp({
145
- format: 'YYYY-MM-DD HH:mm:ss',
146
- }), createFormat()),
147
- transports: transports ? __spreadArray(__spreadArray([], __read(transports), false), [defaultTransport], false) : [defaultTransport],
148
- });
149
- }
150
- ConduitLogger.prototype.addTransport = function (transport) {
151
- this._winston.add(transport);
152
- };
153
- ConduitLogger.prototype.log = function (message, level, cb) {
154
- if (level === void 0) { level = 'info'; }
155
- return this._winston.log(level, message, cb);
156
- };
157
- ConduitLogger.prototype.logObject = function (object, message, level, cb) {
158
- if (message === void 0) { message = ''; }
159
- if (level === void 0) { level = 'info'; }
160
- return this._winston.log(level, message, object, cb);
161
- };
162
- ConduitLogger.prototype.info = function (message, cb) {
163
- return this._winston.info(message, cb);
164
- };
165
- ConduitLogger.prototype.warn = function (message, cb) {
166
- return this._winston.warn(message, cb);
167
- };
168
- ConduitLogger.prototype.error = function (message, cb) {
169
- if (typeof message === 'object') {
170
- return this._winston.error(message);
171
- }
172
- return this._winston.error(message, cb);
173
- };
174
- ConduitLogger.prototype.http = function (message, cb) {
175
- return this._winston.http(message, cb);
176
- };
177
- ConduitLogger.prototype.verbose = function (message, cb) {
178
- return this._winston.verbose(message, cb);
179
- };
180
- Object.defineProperty(ConduitLogger.prototype, "winston", {
181
- get: function () {
182
- return this._winston;
183
- },
184
- enumerable: false,
185
- configurable: true
186
- });
187
- return ConduitLogger;
188
- }());
189
- exports.ConduitLogger = ConduitLogger;
190
- function lokiReadyCheck(lokiUrl) {
191
- return __awaiter(this, void 0, void 0, function () {
192
- return __generator(this, function (_a) {
193
- return [2 /*return*/, new Promise(function (resolve, reject) {
194
- var data = [];
195
- (0, http_1.get)("".concat(lokiUrl, "/ready"), function (r) {
196
- r.on('data', function (chunk) { return data.push(chunk); });
197
- r.on('end', function () {
198
- if (Buffer.concat(data).toString() === 'ready\n')
199
- resolve();
200
- else
201
- reject(false);
202
- });
203
- }).on('error', function (err) {
204
- reject(err.message);
205
- });
206
- })];
207
- });
208
- });
209
- }
210
- function setupLoki(module, instance) {
211
- return __awaiter(this, void 0, void 0, function () {
212
- var lokiUrl, onTry, onFailure;
213
- var _this = this;
214
- return __generator(this, function (_a) {
215
- switch (_a.label) {
216
- case 0:
217
- lokiUrl = process.env.LOKI_URL;
218
- if (!(lokiUrl && lokiUrl !== '')) return [3 /*break*/, 2];
219
- if (lokiUrl.endsWith('/'))
220
- lokiUrl = lokiUrl.slice(0, -1);
221
- onTry = function () { return __awaiter(_this, void 0, void 0, function () {
222
- return __generator(this, function (_a) {
223
- switch (_a.label) {
224
- case 0: return [4 /*yield*/, lokiReadyCheck(lokiUrl)
225
- .then(function () {
226
- index_1.default.Logger.addTransport(new winston_loki_1.default({
227
- level: 'debug',
228
- host: lokiUrl,
229
- batching: false,
230
- replaceTimestamp: true,
231
- labels: __assign({ module: module, instance: instance }, (process.env.CONDUIT_NAMESPACE && {
232
- namespace: process.env.CONDUIT_NAMESPACE,
233
- })),
234
- }));
235
- return false;
236
- })
237
- .catch(function () { return true; })];
238
- case 1: return [2 /*return*/, _a.sent()]; // retry
239
- }
240
- });
241
- }); };
242
- onFailure = function () {
243
- index_1.default.Logger.error("Failed to connect to Loki on '".concat(lokiUrl, "'"));
244
- };
245
- return [4 /*yield*/, (0, utilities_1.linearBackoffTimeoutAsync)(onTry, 250, 15, onFailure, true)];
246
- case 1:
247
- _a.sent();
248
- _a.label = 2;
249
- case 2: return [2 /*return*/];
250
- }
251
- });
252
- });
253
- }
254
- exports.setupLoki = setupLoki;
255
- //# sourceMappingURL=Logger.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Logger.js","sourceRoot":"","sources":["../../src/utilities/Logger.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;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E,KAAK;4CACf,gBAAgB,EAAE,IAAI;4CACtB,MAAM,aACJ,MAAM,QAAA,EACN,QAAQ,UAAA,IACL,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI;gDACnC,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB;6CACzC,CAAC,CACH;yCACF,CAAC,CACH,CAAC;wCACF,OAAO,KAAK,CAAC;oCACf,CAAC,CAAC;yCACD,KAAK,CAAC,cAAM,OAAA,IAAI,EAAJ,CAAI,CAAC,EAAA;wCAnBpB,sBAAO,SAmBa,EAAC,CAAC,QAAQ;;;yBAC/B,CAAC;oBACI,SAAS,GAAG;wBAChB,eAAc,CAAC,MAAM,CAAC,KAAK,CAAC,wCAAiC,OAAO,MAAG,CAAC,CAAC;oBAC3E,CAAC,CAAC;oBACF,qBAAM,IAAA,qCAAyB,EAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,EAAA;;oBAAhE,SAAgE,CAAC;;;;;;CAEpE;AA/BD,8BA+BC"}
@@ -1,10 +0,0 @@
1
- /// <reference types="node" />
2
- export declare function linearBackoffTimeout(onTry: (timeout: NodeJS.Timeout) => void, delay: number, reps?: number, onFailure?: () => void): {
3
- clear: () => void;
4
- };
5
- /**
6
- * Registers a timeout with linear backoff.
7
- * onFailure() only runs on rep exhaustion.
8
- * @param {() => Promise<boolean>} onTry - Async handler, returns 'continue' boolean flag
9
- */
10
- export declare function linearBackoffTimeoutAsync(onTry: () => Promise<boolean>, delay: number, reps?: number, onFailure?: () => void | Promise<void>, startNow?: boolean): Promise<void>;
@@ -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;
@@ -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"}