@sockethub/server 5.0.0-beta.0 → 5.0.0-beta.2
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/connection-scope.d.ts +1 -0
- package/dist/cors.d.ts +3 -3
- package/dist/index.d.ts +7 -0
- package/dist/index.js +1212 -932
- package/dist/message-handlers.d.ts +1 -3
- package/dist/middleware/normalize-activity-stream.d.ts +13 -0
- package/dist/payload-debug.d.ts +2 -0
- package/dist/platform-instance.d.ts +5 -1
- package/dist/platform.js +107 -26
- package/dist/process-manager.d.ts +13 -10
- package/dist/trust-proxy.d.ts +19 -0
- package/package.json +22 -16
- package/res/sockethub-client.js +17 -17
package/dist/index.js
CHANGED
|
@@ -58,6 +58,762 @@ var __esm = (fn, res, err) => () => {
|
|
|
58
58
|
};
|
|
59
59
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
60
60
|
|
|
61
|
+
// ../../node_modules/ms/index.js
|
|
62
|
+
var require_ms = __commonJS(function(exports, module) {
|
|
63
|
+
var s = 1000;
|
|
64
|
+
var m = s * 60;
|
|
65
|
+
var h = m * 60;
|
|
66
|
+
var d = h * 24;
|
|
67
|
+
var w = d * 7;
|
|
68
|
+
var y = d * 365.25;
|
|
69
|
+
module.exports = function(val, options) {
|
|
70
|
+
options = options || {};
|
|
71
|
+
var type = typeof val;
|
|
72
|
+
if (type === "string" && val.length > 0) {
|
|
73
|
+
return parse(val);
|
|
74
|
+
} else if (type === "number" && isFinite(val)) {
|
|
75
|
+
return options.long ? fmtLong(val) : fmtShort(val);
|
|
76
|
+
}
|
|
77
|
+
throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
|
|
78
|
+
};
|
|
79
|
+
function parse(str) {
|
|
80
|
+
str = String(str);
|
|
81
|
+
if (str.length > 100) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
|
|
85
|
+
if (!match) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
var n = parseFloat(match[1]);
|
|
89
|
+
var type = (match[2] || "ms").toLowerCase();
|
|
90
|
+
switch (type) {
|
|
91
|
+
case "years":
|
|
92
|
+
case "year":
|
|
93
|
+
case "yrs":
|
|
94
|
+
case "yr":
|
|
95
|
+
case "y":
|
|
96
|
+
return n * y;
|
|
97
|
+
case "weeks":
|
|
98
|
+
case "week":
|
|
99
|
+
case "w":
|
|
100
|
+
return n * w;
|
|
101
|
+
case "days":
|
|
102
|
+
case "day":
|
|
103
|
+
case "d":
|
|
104
|
+
return n * d;
|
|
105
|
+
case "hours":
|
|
106
|
+
case "hour":
|
|
107
|
+
case "hrs":
|
|
108
|
+
case "hr":
|
|
109
|
+
case "h":
|
|
110
|
+
return n * h;
|
|
111
|
+
case "minutes":
|
|
112
|
+
case "minute":
|
|
113
|
+
case "mins":
|
|
114
|
+
case "min":
|
|
115
|
+
case "m":
|
|
116
|
+
return n * m;
|
|
117
|
+
case "seconds":
|
|
118
|
+
case "second":
|
|
119
|
+
case "secs":
|
|
120
|
+
case "sec":
|
|
121
|
+
case "s":
|
|
122
|
+
return n * s;
|
|
123
|
+
case "milliseconds":
|
|
124
|
+
case "millisecond":
|
|
125
|
+
case "msecs":
|
|
126
|
+
case "msec":
|
|
127
|
+
case "ms":
|
|
128
|
+
return n;
|
|
129
|
+
default:
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
function fmtShort(ms) {
|
|
134
|
+
var msAbs = Math.abs(ms);
|
|
135
|
+
if (msAbs >= d) {
|
|
136
|
+
return Math.round(ms / d) + "d";
|
|
137
|
+
}
|
|
138
|
+
if (msAbs >= h) {
|
|
139
|
+
return Math.round(ms / h) + "h";
|
|
140
|
+
}
|
|
141
|
+
if (msAbs >= m) {
|
|
142
|
+
return Math.round(ms / m) + "m";
|
|
143
|
+
}
|
|
144
|
+
if (msAbs >= s) {
|
|
145
|
+
return Math.round(ms / s) + "s";
|
|
146
|
+
}
|
|
147
|
+
return ms + "ms";
|
|
148
|
+
}
|
|
149
|
+
function fmtLong(ms) {
|
|
150
|
+
var msAbs = Math.abs(ms);
|
|
151
|
+
if (msAbs >= d) {
|
|
152
|
+
return plural(ms, msAbs, d, "day");
|
|
153
|
+
}
|
|
154
|
+
if (msAbs >= h) {
|
|
155
|
+
return plural(ms, msAbs, h, "hour");
|
|
156
|
+
}
|
|
157
|
+
if (msAbs >= m) {
|
|
158
|
+
return plural(ms, msAbs, m, "minute");
|
|
159
|
+
}
|
|
160
|
+
if (msAbs >= s) {
|
|
161
|
+
return plural(ms, msAbs, s, "second");
|
|
162
|
+
}
|
|
163
|
+
return ms + " ms";
|
|
164
|
+
}
|
|
165
|
+
function plural(ms, msAbs, n, name) {
|
|
166
|
+
var isPlural = msAbs >= n * 1.5;
|
|
167
|
+
return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
// ../../node_modules/debug/src/common.js
|
|
172
|
+
var require_common = __commonJS(function(exports, module) {
|
|
173
|
+
function setup(env) {
|
|
174
|
+
createDebug.debug = createDebug;
|
|
175
|
+
createDebug.default = createDebug;
|
|
176
|
+
createDebug.coerce = coerce;
|
|
177
|
+
createDebug.disable = disable;
|
|
178
|
+
createDebug.enable = enable;
|
|
179
|
+
createDebug.enabled = enabled;
|
|
180
|
+
createDebug.humanize = require_ms();
|
|
181
|
+
createDebug.destroy = destroy;
|
|
182
|
+
Object.keys(env).forEach((key) => {
|
|
183
|
+
createDebug[key] = env[key];
|
|
184
|
+
});
|
|
185
|
+
createDebug.names = [];
|
|
186
|
+
createDebug.skips = [];
|
|
187
|
+
createDebug.formatters = {};
|
|
188
|
+
function selectColor(namespace) {
|
|
189
|
+
let hash = 0;
|
|
190
|
+
for (let i = 0;i < namespace.length; i++) {
|
|
191
|
+
hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
|
192
|
+
hash |= 0;
|
|
193
|
+
}
|
|
194
|
+
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
|
195
|
+
}
|
|
196
|
+
createDebug.selectColor = selectColor;
|
|
197
|
+
function createDebug(namespace) {
|
|
198
|
+
let prevTime;
|
|
199
|
+
let enableOverride = null;
|
|
200
|
+
let namespacesCache;
|
|
201
|
+
let enabledCache;
|
|
202
|
+
function debug(...args) {
|
|
203
|
+
if (!debug.enabled) {
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
const self2 = debug;
|
|
207
|
+
const curr = Number(new Date);
|
|
208
|
+
const ms = curr - (prevTime || curr);
|
|
209
|
+
self2.diff = ms;
|
|
210
|
+
self2.prev = prevTime;
|
|
211
|
+
self2.curr = curr;
|
|
212
|
+
prevTime = curr;
|
|
213
|
+
args[0] = createDebug.coerce(args[0]);
|
|
214
|
+
if (typeof args[0] !== "string") {
|
|
215
|
+
args.unshift("%O");
|
|
216
|
+
}
|
|
217
|
+
let index = 0;
|
|
218
|
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
|
|
219
|
+
if (match === "%%") {
|
|
220
|
+
return "%";
|
|
221
|
+
}
|
|
222
|
+
index++;
|
|
223
|
+
const formatter = createDebug.formatters[format];
|
|
224
|
+
if (typeof formatter === "function") {
|
|
225
|
+
const val = args[index];
|
|
226
|
+
match = formatter.call(self2, val);
|
|
227
|
+
args.splice(index, 1);
|
|
228
|
+
index--;
|
|
229
|
+
}
|
|
230
|
+
return match;
|
|
231
|
+
});
|
|
232
|
+
createDebug.formatArgs.call(self2, args);
|
|
233
|
+
const logFn = self2.log || createDebug.log;
|
|
234
|
+
logFn.apply(self2, args);
|
|
235
|
+
}
|
|
236
|
+
debug.namespace = namespace;
|
|
237
|
+
debug.useColors = createDebug.useColors();
|
|
238
|
+
debug.color = createDebug.selectColor(namespace);
|
|
239
|
+
debug.extend = extend;
|
|
240
|
+
debug.destroy = createDebug.destroy;
|
|
241
|
+
Object.defineProperty(debug, "enabled", {
|
|
242
|
+
enumerable: true,
|
|
243
|
+
configurable: false,
|
|
244
|
+
get: () => {
|
|
245
|
+
if (enableOverride !== null) {
|
|
246
|
+
return enableOverride;
|
|
247
|
+
}
|
|
248
|
+
if (namespacesCache !== createDebug.namespaces) {
|
|
249
|
+
namespacesCache = createDebug.namespaces;
|
|
250
|
+
enabledCache = createDebug.enabled(namespace);
|
|
251
|
+
}
|
|
252
|
+
return enabledCache;
|
|
253
|
+
},
|
|
254
|
+
set: (v) => {
|
|
255
|
+
enableOverride = v;
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
if (typeof createDebug.init === "function") {
|
|
259
|
+
createDebug.init(debug);
|
|
260
|
+
}
|
|
261
|
+
return debug;
|
|
262
|
+
}
|
|
263
|
+
function extend(namespace, delimiter) {
|
|
264
|
+
const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
|
|
265
|
+
newDebug.log = this.log;
|
|
266
|
+
return newDebug;
|
|
267
|
+
}
|
|
268
|
+
function enable(namespaces) {
|
|
269
|
+
createDebug.save(namespaces);
|
|
270
|
+
createDebug.namespaces = namespaces;
|
|
271
|
+
createDebug.names = [];
|
|
272
|
+
createDebug.skips = [];
|
|
273
|
+
const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
|
274
|
+
for (const ns of split) {
|
|
275
|
+
if (ns[0] === "-") {
|
|
276
|
+
createDebug.skips.push(ns.slice(1));
|
|
277
|
+
} else {
|
|
278
|
+
createDebug.names.push(ns);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
function matchesTemplate(search, template) {
|
|
283
|
+
let searchIndex = 0;
|
|
284
|
+
let templateIndex = 0;
|
|
285
|
+
let starIndex = -1;
|
|
286
|
+
let matchIndex = 0;
|
|
287
|
+
while (searchIndex < search.length) {
|
|
288
|
+
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
|
|
289
|
+
if (template[templateIndex] === "*") {
|
|
290
|
+
starIndex = templateIndex;
|
|
291
|
+
matchIndex = searchIndex;
|
|
292
|
+
templateIndex++;
|
|
293
|
+
} else {
|
|
294
|
+
searchIndex++;
|
|
295
|
+
templateIndex++;
|
|
296
|
+
}
|
|
297
|
+
} else if (starIndex !== -1) {
|
|
298
|
+
templateIndex = starIndex + 1;
|
|
299
|
+
matchIndex++;
|
|
300
|
+
searchIndex = matchIndex;
|
|
301
|
+
} else {
|
|
302
|
+
return false;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
while (templateIndex < template.length && template[templateIndex] === "*") {
|
|
306
|
+
templateIndex++;
|
|
307
|
+
}
|
|
308
|
+
return templateIndex === template.length;
|
|
309
|
+
}
|
|
310
|
+
function disable() {
|
|
311
|
+
const namespaces = [
|
|
312
|
+
...createDebug.names,
|
|
313
|
+
...createDebug.skips.map((namespace) => "-" + namespace)
|
|
314
|
+
].join(",");
|
|
315
|
+
createDebug.enable("");
|
|
316
|
+
return namespaces;
|
|
317
|
+
}
|
|
318
|
+
function enabled(name) {
|
|
319
|
+
for (const skip of createDebug.skips) {
|
|
320
|
+
if (matchesTemplate(name, skip)) {
|
|
321
|
+
return false;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
for (const ns of createDebug.names) {
|
|
325
|
+
if (matchesTemplate(name, ns)) {
|
|
326
|
+
return true;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
return false;
|
|
330
|
+
}
|
|
331
|
+
function coerce(val) {
|
|
332
|
+
if (val instanceof Error) {
|
|
333
|
+
return val.stack || val.message;
|
|
334
|
+
}
|
|
335
|
+
return val;
|
|
336
|
+
}
|
|
337
|
+
function destroy() {
|
|
338
|
+
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
339
|
+
}
|
|
340
|
+
createDebug.enable(createDebug.load());
|
|
341
|
+
return createDebug;
|
|
342
|
+
}
|
|
343
|
+
module.exports = setup;
|
|
344
|
+
});
|
|
345
|
+
|
|
346
|
+
// ../../node_modules/debug/src/browser.js
|
|
347
|
+
var require_browser = __commonJS(function(exports, module) {
|
|
348
|
+
exports.formatArgs = formatArgs;
|
|
349
|
+
exports.save = save;
|
|
350
|
+
exports.load = load;
|
|
351
|
+
exports.useColors = useColors;
|
|
352
|
+
exports.storage = localstorage();
|
|
353
|
+
exports.destroy = (() => {
|
|
354
|
+
let warned = false;
|
|
355
|
+
return () => {
|
|
356
|
+
if (!warned) {
|
|
357
|
+
warned = true;
|
|
358
|
+
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
359
|
+
}
|
|
360
|
+
};
|
|
361
|
+
})();
|
|
362
|
+
exports.colors = [
|
|
363
|
+
"#0000CC",
|
|
364
|
+
"#0000FF",
|
|
365
|
+
"#0033CC",
|
|
366
|
+
"#0033FF",
|
|
367
|
+
"#0066CC",
|
|
368
|
+
"#0066FF",
|
|
369
|
+
"#0099CC",
|
|
370
|
+
"#0099FF",
|
|
371
|
+
"#00CC00",
|
|
372
|
+
"#00CC33",
|
|
373
|
+
"#00CC66",
|
|
374
|
+
"#00CC99",
|
|
375
|
+
"#00CCCC",
|
|
376
|
+
"#00CCFF",
|
|
377
|
+
"#3300CC",
|
|
378
|
+
"#3300FF",
|
|
379
|
+
"#3333CC",
|
|
380
|
+
"#3333FF",
|
|
381
|
+
"#3366CC",
|
|
382
|
+
"#3366FF",
|
|
383
|
+
"#3399CC",
|
|
384
|
+
"#3399FF",
|
|
385
|
+
"#33CC00",
|
|
386
|
+
"#33CC33",
|
|
387
|
+
"#33CC66",
|
|
388
|
+
"#33CC99",
|
|
389
|
+
"#33CCCC",
|
|
390
|
+
"#33CCFF",
|
|
391
|
+
"#6600CC",
|
|
392
|
+
"#6600FF",
|
|
393
|
+
"#6633CC",
|
|
394
|
+
"#6633FF",
|
|
395
|
+
"#66CC00",
|
|
396
|
+
"#66CC33",
|
|
397
|
+
"#9900CC",
|
|
398
|
+
"#9900FF",
|
|
399
|
+
"#9933CC",
|
|
400
|
+
"#9933FF",
|
|
401
|
+
"#99CC00",
|
|
402
|
+
"#99CC33",
|
|
403
|
+
"#CC0000",
|
|
404
|
+
"#CC0033",
|
|
405
|
+
"#CC0066",
|
|
406
|
+
"#CC0099",
|
|
407
|
+
"#CC00CC",
|
|
408
|
+
"#CC00FF",
|
|
409
|
+
"#CC3300",
|
|
410
|
+
"#CC3333",
|
|
411
|
+
"#CC3366",
|
|
412
|
+
"#CC3399",
|
|
413
|
+
"#CC33CC",
|
|
414
|
+
"#CC33FF",
|
|
415
|
+
"#CC6600",
|
|
416
|
+
"#CC6633",
|
|
417
|
+
"#CC9900",
|
|
418
|
+
"#CC9933",
|
|
419
|
+
"#CCCC00",
|
|
420
|
+
"#CCCC33",
|
|
421
|
+
"#FF0000",
|
|
422
|
+
"#FF0033",
|
|
423
|
+
"#FF0066",
|
|
424
|
+
"#FF0099",
|
|
425
|
+
"#FF00CC",
|
|
426
|
+
"#FF00FF",
|
|
427
|
+
"#FF3300",
|
|
428
|
+
"#FF3333",
|
|
429
|
+
"#FF3366",
|
|
430
|
+
"#FF3399",
|
|
431
|
+
"#FF33CC",
|
|
432
|
+
"#FF33FF",
|
|
433
|
+
"#FF6600",
|
|
434
|
+
"#FF6633",
|
|
435
|
+
"#FF9900",
|
|
436
|
+
"#FF9933",
|
|
437
|
+
"#FFCC00",
|
|
438
|
+
"#FFCC33"
|
|
439
|
+
];
|
|
440
|
+
function useColors() {
|
|
441
|
+
if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
|
|
442
|
+
return true;
|
|
443
|
+
}
|
|
444
|
+
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
445
|
+
return false;
|
|
446
|
+
}
|
|
447
|
+
let m;
|
|
448
|
+
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
449
|
+
}
|
|
450
|
+
function formatArgs(args) {
|
|
451
|
+
args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
|
|
452
|
+
if (!this.useColors) {
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
const c = "color: " + this.color;
|
|
456
|
+
args.splice(1, 0, c, "color: inherit");
|
|
457
|
+
let index = 0;
|
|
458
|
+
let lastC = 0;
|
|
459
|
+
args[0].replace(/%[a-zA-Z%]/g, (match) => {
|
|
460
|
+
if (match === "%%") {
|
|
461
|
+
return;
|
|
462
|
+
}
|
|
463
|
+
index++;
|
|
464
|
+
if (match === "%c") {
|
|
465
|
+
lastC = index;
|
|
466
|
+
}
|
|
467
|
+
});
|
|
468
|
+
args.splice(lastC, 0, c);
|
|
469
|
+
}
|
|
470
|
+
exports.log = console.debug || console.log || (() => {});
|
|
471
|
+
function save(namespaces) {
|
|
472
|
+
try {
|
|
473
|
+
if (namespaces) {
|
|
474
|
+
exports.storage.setItem("debug", namespaces);
|
|
475
|
+
} else {
|
|
476
|
+
exports.storage.removeItem("debug");
|
|
477
|
+
}
|
|
478
|
+
} catch (error) {}
|
|
479
|
+
}
|
|
480
|
+
function load() {
|
|
481
|
+
let r;
|
|
482
|
+
try {
|
|
483
|
+
r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG");
|
|
484
|
+
} catch (error) {}
|
|
485
|
+
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
486
|
+
r = process.env.DEBUG;
|
|
487
|
+
}
|
|
488
|
+
return r;
|
|
489
|
+
}
|
|
490
|
+
function localstorage() {
|
|
491
|
+
try {
|
|
492
|
+
return localStorage;
|
|
493
|
+
} catch (error) {}
|
|
494
|
+
}
|
|
495
|
+
module.exports = require_common()(exports);
|
|
496
|
+
var { formatters } = module.exports;
|
|
497
|
+
formatters.j = function(v) {
|
|
498
|
+
try {
|
|
499
|
+
return JSON.stringify(v);
|
|
500
|
+
} catch (error) {
|
|
501
|
+
return "[UnexpectedJSONParseError]: " + error.message;
|
|
502
|
+
}
|
|
503
|
+
};
|
|
504
|
+
});
|
|
505
|
+
|
|
506
|
+
// ../../node_modules/has-flag/index.js
|
|
507
|
+
var require_has_flag = __commonJS(function(exports, module) {
|
|
508
|
+
module.exports = (flag, argv = process.argv) => {
|
|
509
|
+
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
510
|
+
const position = argv.indexOf(prefix + flag);
|
|
511
|
+
const terminatorPosition = argv.indexOf("--");
|
|
512
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
513
|
+
};
|
|
514
|
+
});
|
|
515
|
+
|
|
516
|
+
// ../../node_modules/supports-color/index.js
|
|
517
|
+
var require_supports_color = __commonJS(function(exports, module) {
|
|
518
|
+
var os = __require("os");
|
|
519
|
+
var tty = __require("tty");
|
|
520
|
+
var hasFlag = require_has_flag();
|
|
521
|
+
var { env } = process;
|
|
522
|
+
var flagForceColor;
|
|
523
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
524
|
+
flagForceColor = 0;
|
|
525
|
+
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
526
|
+
flagForceColor = 1;
|
|
527
|
+
}
|
|
528
|
+
function envForceColor() {
|
|
529
|
+
if ("FORCE_COLOR" in env) {
|
|
530
|
+
if (env.FORCE_COLOR === "true") {
|
|
531
|
+
return 1;
|
|
532
|
+
}
|
|
533
|
+
if (env.FORCE_COLOR === "false") {
|
|
534
|
+
return 0;
|
|
535
|
+
}
|
|
536
|
+
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
function translateLevel(level) {
|
|
540
|
+
if (level === 0) {
|
|
541
|
+
return false;
|
|
542
|
+
}
|
|
543
|
+
return {
|
|
544
|
+
level,
|
|
545
|
+
hasBasic: true,
|
|
546
|
+
has256: level >= 2,
|
|
547
|
+
has16m: level >= 3
|
|
548
|
+
};
|
|
549
|
+
}
|
|
550
|
+
function supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
551
|
+
const noFlagForceColor = envForceColor();
|
|
552
|
+
if (noFlagForceColor !== undefined) {
|
|
553
|
+
flagForceColor = noFlagForceColor;
|
|
554
|
+
}
|
|
555
|
+
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
556
|
+
if (forceColor === 0) {
|
|
557
|
+
return 0;
|
|
558
|
+
}
|
|
559
|
+
if (sniffFlags) {
|
|
560
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
561
|
+
return 3;
|
|
562
|
+
}
|
|
563
|
+
if (hasFlag("color=256")) {
|
|
564
|
+
return 2;
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
568
|
+
return 0;
|
|
569
|
+
}
|
|
570
|
+
const min = forceColor || 0;
|
|
571
|
+
if (env.TERM === "dumb") {
|
|
572
|
+
return min;
|
|
573
|
+
}
|
|
574
|
+
if (process.platform === "win32") {
|
|
575
|
+
const osRelease = os.release().split(".");
|
|
576
|
+
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
577
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
578
|
+
}
|
|
579
|
+
return 1;
|
|
580
|
+
}
|
|
581
|
+
if ("CI" in env) {
|
|
582
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => (sign in env)) || env.CI_NAME === "codeship") {
|
|
583
|
+
return 1;
|
|
584
|
+
}
|
|
585
|
+
return min;
|
|
586
|
+
}
|
|
587
|
+
if ("TEAMCITY_VERSION" in env) {
|
|
588
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
589
|
+
}
|
|
590
|
+
if (env.COLORTERM === "truecolor") {
|
|
591
|
+
return 3;
|
|
592
|
+
}
|
|
593
|
+
if ("TERM_PROGRAM" in env) {
|
|
594
|
+
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
595
|
+
switch (env.TERM_PROGRAM) {
|
|
596
|
+
case "iTerm.app":
|
|
597
|
+
return version >= 3 ? 3 : 2;
|
|
598
|
+
case "Apple_Terminal":
|
|
599
|
+
return 2;
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
|
603
|
+
return 2;
|
|
604
|
+
}
|
|
605
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
606
|
+
return 1;
|
|
607
|
+
}
|
|
608
|
+
if ("COLORTERM" in env) {
|
|
609
|
+
return 1;
|
|
610
|
+
}
|
|
611
|
+
return min;
|
|
612
|
+
}
|
|
613
|
+
function getSupportLevel(stream, options = {}) {
|
|
614
|
+
const level = supportsColor(stream, {
|
|
615
|
+
streamIsTTY: stream && stream.isTTY,
|
|
616
|
+
...options
|
|
617
|
+
});
|
|
618
|
+
return translateLevel(level);
|
|
619
|
+
}
|
|
620
|
+
module.exports = {
|
|
621
|
+
supportsColor: getSupportLevel,
|
|
622
|
+
stdout: getSupportLevel({ isTTY: tty.isatty(1) }),
|
|
623
|
+
stderr: getSupportLevel({ isTTY: tty.isatty(2) })
|
|
624
|
+
};
|
|
625
|
+
});
|
|
626
|
+
|
|
627
|
+
// ../../node_modules/debug/src/node.js
|
|
628
|
+
var require_node = __commonJS(function(exports, module) {
|
|
629
|
+
var tty = __require("tty");
|
|
630
|
+
var util = __require("util");
|
|
631
|
+
exports.init = init;
|
|
632
|
+
exports.log = log;
|
|
633
|
+
exports.formatArgs = formatArgs;
|
|
634
|
+
exports.save = save;
|
|
635
|
+
exports.load = load;
|
|
636
|
+
exports.useColors = useColors;
|
|
637
|
+
exports.destroy = util.deprecate(() => {}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
638
|
+
exports.colors = [6, 2, 3, 4, 5, 1];
|
|
639
|
+
try {
|
|
640
|
+
const supportsColor = require_supports_color();
|
|
641
|
+
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
|
642
|
+
exports.colors = [
|
|
643
|
+
20,
|
|
644
|
+
21,
|
|
645
|
+
26,
|
|
646
|
+
27,
|
|
647
|
+
32,
|
|
648
|
+
33,
|
|
649
|
+
38,
|
|
650
|
+
39,
|
|
651
|
+
40,
|
|
652
|
+
41,
|
|
653
|
+
42,
|
|
654
|
+
43,
|
|
655
|
+
44,
|
|
656
|
+
45,
|
|
657
|
+
56,
|
|
658
|
+
57,
|
|
659
|
+
62,
|
|
660
|
+
63,
|
|
661
|
+
68,
|
|
662
|
+
69,
|
|
663
|
+
74,
|
|
664
|
+
75,
|
|
665
|
+
76,
|
|
666
|
+
77,
|
|
667
|
+
78,
|
|
668
|
+
79,
|
|
669
|
+
80,
|
|
670
|
+
81,
|
|
671
|
+
92,
|
|
672
|
+
93,
|
|
673
|
+
98,
|
|
674
|
+
99,
|
|
675
|
+
112,
|
|
676
|
+
113,
|
|
677
|
+
128,
|
|
678
|
+
129,
|
|
679
|
+
134,
|
|
680
|
+
135,
|
|
681
|
+
148,
|
|
682
|
+
149,
|
|
683
|
+
160,
|
|
684
|
+
161,
|
|
685
|
+
162,
|
|
686
|
+
163,
|
|
687
|
+
164,
|
|
688
|
+
165,
|
|
689
|
+
166,
|
|
690
|
+
167,
|
|
691
|
+
168,
|
|
692
|
+
169,
|
|
693
|
+
170,
|
|
694
|
+
171,
|
|
695
|
+
172,
|
|
696
|
+
173,
|
|
697
|
+
178,
|
|
698
|
+
179,
|
|
699
|
+
184,
|
|
700
|
+
185,
|
|
701
|
+
196,
|
|
702
|
+
197,
|
|
703
|
+
198,
|
|
704
|
+
199,
|
|
705
|
+
200,
|
|
706
|
+
201,
|
|
707
|
+
202,
|
|
708
|
+
203,
|
|
709
|
+
204,
|
|
710
|
+
205,
|
|
711
|
+
206,
|
|
712
|
+
207,
|
|
713
|
+
208,
|
|
714
|
+
209,
|
|
715
|
+
214,
|
|
716
|
+
215,
|
|
717
|
+
220,
|
|
718
|
+
221
|
|
719
|
+
];
|
|
720
|
+
}
|
|
721
|
+
} catch (error) {}
|
|
722
|
+
exports.inspectOpts = Object.keys(process.env).filter((key) => {
|
|
723
|
+
return /^debug_/i.test(key);
|
|
724
|
+
}).reduce((obj, key) => {
|
|
725
|
+
const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
|
|
726
|
+
return k.toUpperCase();
|
|
727
|
+
});
|
|
728
|
+
let val = process.env[key];
|
|
729
|
+
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
|
730
|
+
val = true;
|
|
731
|
+
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
|
732
|
+
val = false;
|
|
733
|
+
} else if (val === "null") {
|
|
734
|
+
val = null;
|
|
735
|
+
} else {
|
|
736
|
+
val = Number(val);
|
|
737
|
+
}
|
|
738
|
+
obj[prop] = val;
|
|
739
|
+
return obj;
|
|
740
|
+
}, {});
|
|
741
|
+
function useColors() {
|
|
742
|
+
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
|
|
743
|
+
}
|
|
744
|
+
function formatArgs(args) {
|
|
745
|
+
const { namespace: name, useColors } = this;
|
|
746
|
+
if (useColors) {
|
|
747
|
+
const c = this.color;
|
|
748
|
+
const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
|
|
749
|
+
const prefix = ` ${colorCode};1m${name} \x1B[0m`;
|
|
750
|
+
args[0] = prefix + args[0].split(`
|
|
751
|
+
`).join(`
|
|
752
|
+
` + prefix);
|
|
753
|
+
args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m");
|
|
754
|
+
} else {
|
|
755
|
+
args[0] = getDate() + name + " " + args[0];
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
function getDate() {
|
|
759
|
+
if (exports.inspectOpts.hideDate) {
|
|
760
|
+
return "";
|
|
761
|
+
}
|
|
762
|
+
return new Date().toISOString() + " ";
|
|
763
|
+
}
|
|
764
|
+
function log(...args) {
|
|
765
|
+
return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + `
|
|
766
|
+
`);
|
|
767
|
+
}
|
|
768
|
+
function save(namespaces) {
|
|
769
|
+
if (namespaces) {
|
|
770
|
+
process.env.DEBUG = namespaces;
|
|
771
|
+
} else {
|
|
772
|
+
delete process.env.DEBUG;
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
function load() {
|
|
776
|
+
return process.env.DEBUG;
|
|
777
|
+
}
|
|
778
|
+
function init(debug) {
|
|
779
|
+
debug.inspectOpts = {};
|
|
780
|
+
const keys = Object.keys(exports.inspectOpts);
|
|
781
|
+
for (let i = 0;i < keys.length; i++) {
|
|
782
|
+
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
module.exports = require_common()(exports);
|
|
786
|
+
var { formatters } = module.exports;
|
|
787
|
+
formatters.o = function(v) {
|
|
788
|
+
this.inspectOpts.colors = this.useColors;
|
|
789
|
+
return util.inspect(v, this.inspectOpts).split(`
|
|
790
|
+
`).map((str) => str.trim()).join(" ");
|
|
791
|
+
};
|
|
792
|
+
formatters.O = function(v) {
|
|
793
|
+
this.inspectOpts.colors = this.useColors;
|
|
794
|
+
return util.inspect(v, this.inspectOpts);
|
|
795
|
+
};
|
|
796
|
+
});
|
|
797
|
+
|
|
798
|
+
// ../../node_modules/debug/src/index.js
|
|
799
|
+
var require_src = __commonJS(function(exports, module) {
|
|
800
|
+
if (typeof process === "undefined" || process.type === "renderer" || false || process.__nwjs) {
|
|
801
|
+
module.exports = require_browser();
|
|
802
|
+
} else {
|
|
803
|
+
module.exports = require_node();
|
|
804
|
+
}
|
|
805
|
+
});
|
|
806
|
+
|
|
807
|
+
// src/payload-debug.ts
|
|
808
|
+
function disablePayloadDebug() {
|
|
809
|
+
import_debug.default.enable(`${import_debug.default.disable()},-socket.io:socket,-socket.io-parser,-engine:ws,-engine:polling,-engine:socket,-engine`);
|
|
810
|
+
}
|
|
811
|
+
var import_debug;
|
|
812
|
+
var init_payload_debug = __esm(() => {
|
|
813
|
+
import_debug = __toESM(require_src(), 1);
|
|
814
|
+
disablePayloadDebug();
|
|
815
|
+
});
|
|
816
|
+
|
|
61
817
|
// ../../node_modules/logform/format.js
|
|
62
818
|
var require_format = __commonJS(function(exports, module) {
|
|
63
819
|
class InvalidFormatError extends Error {
|
|
@@ -150,7 +906,7 @@ var require_styles = __commonJS(function(exports, module) {
|
|
|
150
906
|
});
|
|
151
907
|
|
|
152
908
|
// ../../node_modules/@colors/colors/lib/system/has-flag.js
|
|
153
|
-
var
|
|
909
|
+
var require_has_flag2 = __commonJS(function(exports, module) {
|
|
154
910
|
module.exports = function(flag, argv) {
|
|
155
911
|
argv = argv || process.argv || [];
|
|
156
912
|
var terminatorPos = argv.indexOf("--");
|
|
@@ -163,7 +919,7 @@ var require_has_flag = __commonJS(function(exports, module) {
|
|
|
163
919
|
// ../../node_modules/@colors/colors/lib/system/supports-colors.js
|
|
164
920
|
var require_supports_colors = __commonJS(function(exports, module) {
|
|
165
921
|
var os = __require("os");
|
|
166
|
-
var hasFlag =
|
|
922
|
+
var hasFlag = require_has_flag2();
|
|
167
923
|
var env = process.env;
|
|
168
924
|
var forceColor = undefined;
|
|
169
925
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
|
|
@@ -1714,116 +2470,6 @@ var require_metadata = __commonJS(function(exports, module) {
|
|
|
1714
2470
|
});
|
|
1715
2471
|
});
|
|
1716
2472
|
|
|
1717
|
-
// ../../node_modules/ms/index.js
|
|
1718
|
-
var require_ms = __commonJS(function(exports, module) {
|
|
1719
|
-
var s = 1000;
|
|
1720
|
-
var m = s * 60;
|
|
1721
|
-
var h = m * 60;
|
|
1722
|
-
var d = h * 24;
|
|
1723
|
-
var w = d * 7;
|
|
1724
|
-
var y = d * 365.25;
|
|
1725
|
-
module.exports = function(val, options) {
|
|
1726
|
-
options = options || {};
|
|
1727
|
-
var type = typeof val;
|
|
1728
|
-
if (type === "string" && val.length > 0) {
|
|
1729
|
-
return parse(val);
|
|
1730
|
-
} else if (type === "number" && isFinite(val)) {
|
|
1731
|
-
return options.long ? fmtLong(val) : fmtShort(val);
|
|
1732
|
-
}
|
|
1733
|
-
throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
|
|
1734
|
-
};
|
|
1735
|
-
function parse(str) {
|
|
1736
|
-
str = String(str);
|
|
1737
|
-
if (str.length > 100) {
|
|
1738
|
-
return;
|
|
1739
|
-
}
|
|
1740
|
-
var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
|
|
1741
|
-
if (!match) {
|
|
1742
|
-
return;
|
|
1743
|
-
}
|
|
1744
|
-
var n = parseFloat(match[1]);
|
|
1745
|
-
var type = (match[2] || "ms").toLowerCase();
|
|
1746
|
-
switch (type) {
|
|
1747
|
-
case "years":
|
|
1748
|
-
case "year":
|
|
1749
|
-
case "yrs":
|
|
1750
|
-
case "yr":
|
|
1751
|
-
case "y":
|
|
1752
|
-
return n * y;
|
|
1753
|
-
case "weeks":
|
|
1754
|
-
case "week":
|
|
1755
|
-
case "w":
|
|
1756
|
-
return n * w;
|
|
1757
|
-
case "days":
|
|
1758
|
-
case "day":
|
|
1759
|
-
case "d":
|
|
1760
|
-
return n * d;
|
|
1761
|
-
case "hours":
|
|
1762
|
-
case "hour":
|
|
1763
|
-
case "hrs":
|
|
1764
|
-
case "hr":
|
|
1765
|
-
case "h":
|
|
1766
|
-
return n * h;
|
|
1767
|
-
case "minutes":
|
|
1768
|
-
case "minute":
|
|
1769
|
-
case "mins":
|
|
1770
|
-
case "min":
|
|
1771
|
-
case "m":
|
|
1772
|
-
return n * m;
|
|
1773
|
-
case "seconds":
|
|
1774
|
-
case "second":
|
|
1775
|
-
case "secs":
|
|
1776
|
-
case "sec":
|
|
1777
|
-
case "s":
|
|
1778
|
-
return n * s;
|
|
1779
|
-
case "milliseconds":
|
|
1780
|
-
case "millisecond":
|
|
1781
|
-
case "msecs":
|
|
1782
|
-
case "msec":
|
|
1783
|
-
case "ms":
|
|
1784
|
-
return n;
|
|
1785
|
-
default:
|
|
1786
|
-
return;
|
|
1787
|
-
}
|
|
1788
|
-
}
|
|
1789
|
-
function fmtShort(ms) {
|
|
1790
|
-
var msAbs = Math.abs(ms);
|
|
1791
|
-
if (msAbs >= d) {
|
|
1792
|
-
return Math.round(ms / d) + "d";
|
|
1793
|
-
}
|
|
1794
|
-
if (msAbs >= h) {
|
|
1795
|
-
return Math.round(ms / h) + "h";
|
|
1796
|
-
}
|
|
1797
|
-
if (msAbs >= m) {
|
|
1798
|
-
return Math.round(ms / m) + "m";
|
|
1799
|
-
}
|
|
1800
|
-
if (msAbs >= s) {
|
|
1801
|
-
return Math.round(ms / s) + "s";
|
|
1802
|
-
}
|
|
1803
|
-
return ms + "ms";
|
|
1804
|
-
}
|
|
1805
|
-
function fmtLong(ms) {
|
|
1806
|
-
var msAbs = Math.abs(ms);
|
|
1807
|
-
if (msAbs >= d) {
|
|
1808
|
-
return plural(ms, msAbs, d, "day");
|
|
1809
|
-
}
|
|
1810
|
-
if (msAbs >= h) {
|
|
1811
|
-
return plural(ms, msAbs, h, "hour");
|
|
1812
|
-
}
|
|
1813
|
-
if (msAbs >= m) {
|
|
1814
|
-
return plural(ms, msAbs, m, "minute");
|
|
1815
|
-
}
|
|
1816
|
-
if (msAbs >= s) {
|
|
1817
|
-
return plural(ms, msAbs, s, "second");
|
|
1818
|
-
}
|
|
1819
|
-
return ms + " ms";
|
|
1820
|
-
}
|
|
1821
|
-
function plural(ms, msAbs, n, name) {
|
|
1822
|
-
var isPlural = msAbs >= n * 1.5;
|
|
1823
|
-
return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
|
|
1824
|
-
}
|
|
1825
|
-
});
|
|
1826
|
-
|
|
1827
2473
|
// ../../node_modules/logform/ms.js
|
|
1828
2474
|
var require_ms2 = __commonJS(function(exports, module) {
|
|
1829
2475
|
var format = require_format();
|
|
@@ -2458,7 +3104,7 @@ var require_logform = __commonJS(function(exports) {
|
|
|
2458
3104
|
});
|
|
2459
3105
|
|
|
2460
3106
|
// ../../node_modules/winston/lib/winston/common.js
|
|
2461
|
-
var
|
|
3107
|
+
var require_common2 = __commonJS(function(exports) {
|
|
2462
3108
|
var { format } = __require("util");
|
|
2463
3109
|
exports.warn = {
|
|
2464
3110
|
deprecated(prop) {
|
|
@@ -2571,7 +3217,7 @@ var require_package = __commonJS(function(exports, module) {
|
|
|
2571
3217
|
});
|
|
2572
3218
|
|
|
2573
3219
|
// ../../node_modules/util-deprecate/node.js
|
|
2574
|
-
var
|
|
3220
|
+
var require_node2 = __commonJS(function(exports, module) {
|
|
2575
3221
|
module.exports = __require("util").deprecate;
|
|
2576
3222
|
});
|
|
2577
3223
|
|
|
@@ -4667,7 +5313,7 @@ var require__stream_writable = __commonJS(function(exports, module) {
|
|
|
4667
5313
|
var Duplex;
|
|
4668
5314
|
Writable.WritableState = WritableState;
|
|
4669
5315
|
var internalUtil = {
|
|
4670
|
-
deprecate:
|
|
5316
|
+
deprecate: require_node2()
|
|
4671
5317
|
};
|
|
4672
5318
|
var Stream = __require("stream");
|
|
4673
5319
|
var Buffer2 = __require("buffer").Buffer;
|
|
@@ -7917,7 +8563,7 @@ var require_development = __commonJS(function(exports, module) {
|
|
|
7917
8563
|
});
|
|
7918
8564
|
|
|
7919
8565
|
// ../../node_modules/@dabh/diagnostics/node/index.js
|
|
7920
|
-
var
|
|
8566
|
+
var require_node3 = __commonJS(function(exports, module) {
|
|
7921
8567
|
if (false) {} else {
|
|
7922
8568
|
module.exports = require_development();
|
|
7923
8569
|
}
|
|
@@ -8023,7 +8669,7 @@ var require_file = __commonJS(function(exports, module) {
|
|
|
8023
8669
|
var { MESSAGE } = require_triple_beam();
|
|
8024
8670
|
var { Stream, PassThrough } = require_readable();
|
|
8025
8671
|
var TransportStream = require_winston_transport();
|
|
8026
|
-
var debug =
|
|
8672
|
+
var debug = require_node3()("winston:file");
|
|
8027
8673
|
var os = __require("os");
|
|
8028
8674
|
var tailFile = require_tail_file();
|
|
8029
8675
|
module.exports = class File2 extends TransportStream {
|
|
@@ -9026,7 +9672,7 @@ var require_exception_stream = __commonJS(function(exports, module) {
|
|
|
9026
9672
|
var require_exception_handler = __commonJS(function(exports, module) {
|
|
9027
9673
|
var os = __require("os");
|
|
9028
9674
|
var asyncForEach = require_forEach();
|
|
9029
|
-
var debug =
|
|
9675
|
+
var debug = require_node3()("winston:exception");
|
|
9030
9676
|
var once = require_one_time();
|
|
9031
9677
|
var stackTrace = require_stack_trace();
|
|
9032
9678
|
var ExceptionStream = require_exception_stream();
|
|
@@ -9193,7 +9839,7 @@ var require_rejection_stream = __commonJS(function(exports, module) {
|
|
|
9193
9839
|
var require_rejection_handler = __commonJS(function(exports, module) {
|
|
9194
9840
|
var os = __require("os");
|
|
9195
9841
|
var asyncForEach = require_forEach();
|
|
9196
|
-
var debug =
|
|
9842
|
+
var debug = require_node3()("winston:rejection");
|
|
9197
9843
|
var once = require_one_time();
|
|
9198
9844
|
var stackTrace = require_stack_trace();
|
|
9199
9845
|
var RejectionStream = require_rejection_stream();
|
|
@@ -9370,7 +10016,7 @@ var require_logger = __commonJS(function(exports, module) {
|
|
|
9370
10016
|
var RejectionHandler = require_rejection_handler();
|
|
9371
10017
|
var LegacyTransportStream = require_legacy();
|
|
9372
10018
|
var Profiler = require_profiler();
|
|
9373
|
-
var { warn } =
|
|
10019
|
+
var { warn } = require_common2();
|
|
9374
10020
|
var config = require_config2();
|
|
9375
10021
|
var formatRegExp = /%[scdjifoO%]/g;
|
|
9376
10022
|
|
|
@@ -9741,7 +10387,7 @@ var require_create_logger = __commonJS(function(exports, module) {
|
|
|
9741
10387
|
var { LEVEL } = require_triple_beam();
|
|
9742
10388
|
var config = require_config2();
|
|
9743
10389
|
var Logger = require_logger();
|
|
9744
|
-
var debug =
|
|
10390
|
+
var debug = require_node3()("winston:create-logger");
|
|
9745
10391
|
function isLevelEnabledFunctionName(level) {
|
|
9746
10392
|
return "is" + level.charAt(0).toUpperCase() + level.slice(1) + "Enabled";
|
|
9747
10393
|
}
|
|
@@ -9836,7 +10482,7 @@ var require_container = __commonJS(function(exports, module) {
|
|
|
9836
10482
|
// ../../node_modules/winston/lib/winston.js
|
|
9837
10483
|
var require_winston = __commonJS(function(exports) {
|
|
9838
10484
|
var logform = require_logform();
|
|
9839
|
-
var { warn } =
|
|
10485
|
+
var { warn } = require_common2();
|
|
9840
10486
|
exports.version = require_package().version;
|
|
9841
10487
|
exports.transports = require_transports();
|
|
9842
10488
|
exports.config = require_config2();
|
|
@@ -10411,7 +11057,7 @@ var init_package = __esm(() => {
|
|
|
10411
11057
|
package_default = {
|
|
10412
11058
|
name: "@sockethub/schemas",
|
|
10413
11059
|
description: "JSON schema files for validating Sockethub Activity Streams",
|
|
10414
|
-
version: "3.0.0-beta.
|
|
11060
|
+
version: "3.0.0-beta.2",
|
|
10415
11061
|
type: "module",
|
|
10416
11062
|
private: false,
|
|
10417
11063
|
author: "Nick Jennings <nick@silverbucket.net>",
|
|
@@ -10481,7 +11127,7 @@ var init_package = __esm(() => {
|
|
|
10481
11127
|
"ajv-formats": "^2.1.1",
|
|
10482
11128
|
"ajv-formats-draft2019": "^1.6.1"
|
|
10483
11129
|
},
|
|
10484
|
-
gitHead: "
|
|
11130
|
+
gitHead: "1f74d4e07311496f0acc021855137bc197d79eab",
|
|
10485
11131
|
types: "./dist/index.d.ts"
|
|
10486
11132
|
};
|
|
10487
11133
|
});
|
|
@@ -10590,8 +11236,11 @@ var init_sockethub_config = __esm(() => {
|
|
|
10590
11236
|
"@sockethub/platform-caldav",
|
|
10591
11237
|
"@sockethub/platform-dummy",
|
|
10592
11238
|
"@sockethub/platform-feeds",
|
|
11239
|
+
"@sockethub/platform-email",
|
|
10593
11240
|
"@sockethub/platform-irc",
|
|
10594
11241
|
"@sockethub/platform-metadata",
|
|
11242
|
+
"@sockethub/platform-messenger",
|
|
11243
|
+
"@sockethub/platform-instagram",
|
|
10595
11244
|
"@sockethub/platform-xmpp"
|
|
10596
11245
|
]
|
|
10597
11246
|
},
|
|
@@ -10607,7 +11256,8 @@ var init_sockethub_config = __esm(() => {
|
|
|
10607
11256
|
connectTimeoutMs: { type: "integer", minimum: 1 },
|
|
10608
11257
|
allowPrivateAddresses: { type: "boolean" },
|
|
10609
11258
|
allowInsecureHttp: { type: "boolean" },
|
|
10610
|
-
concurrency: { type: "integer", minimum: 1 }
|
|
11259
|
+
concurrency: { type: "integer", minimum: 1 },
|
|
11260
|
+
discoveryCacheTtlMs: { type: "integer", minimum: 0 }
|
|
10611
11261
|
}
|
|
10612
11262
|
},
|
|
10613
11263
|
"@sockethub/platform-caldav": {
|
|
@@ -10617,7 +11267,20 @@ var init_sockethub_config = __esm(() => {
|
|
|
10617
11267
|
connectTimeoutMs: { type: "integer", minimum: 1 },
|
|
10618
11268
|
allowPrivateAddresses: { type: "boolean" },
|
|
10619
11269
|
allowInsecureHttp: { type: "boolean" },
|
|
10620
|
-
concurrency: { type: "integer", minimum: 1 }
|
|
11270
|
+
concurrency: { type: "integer", minimum: 1 },
|
|
11271
|
+
discoveryCacheTtlMs: { type: "integer", minimum: 0 }
|
|
11272
|
+
}
|
|
11273
|
+
},
|
|
11274
|
+
"@sockethub/platform-email": {
|
|
11275
|
+
type: "object",
|
|
11276
|
+
additionalProperties: false,
|
|
11277
|
+
properties: {
|
|
11278
|
+
connectTimeoutMs: {
|
|
11279
|
+
type: "integer",
|
|
11280
|
+
minimum: 5000,
|
|
11281
|
+
maximum: 120000
|
|
11282
|
+
},
|
|
11283
|
+
allowPrivateAddresses: { type: "boolean" }
|
|
10621
11284
|
}
|
|
10622
11285
|
},
|
|
10623
11286
|
"@sockethub/platform-dummy": {
|
|
@@ -10640,14 +11303,16 @@ var init_sockethub_config = __esm(() => {
|
|
|
10640
11303
|
type: "object",
|
|
10641
11304
|
additionalProperties: false,
|
|
10642
11305
|
properties: {
|
|
10643
|
-
connectTimeoutMs: { type: "number" }
|
|
11306
|
+
connectTimeoutMs: { type: "number" },
|
|
11307
|
+
allowPrivateAddresses: { type: "boolean" }
|
|
10644
11308
|
}
|
|
10645
11309
|
},
|
|
10646
11310
|
"@sockethub/platform-xmpp": {
|
|
10647
11311
|
type: "object",
|
|
10648
11312
|
additionalProperties: false,
|
|
10649
11313
|
properties: {
|
|
10650
|
-
connectTimeoutMs: { type: "number" }
|
|
11314
|
+
connectTimeoutMs: { type: "number" },
|
|
11315
|
+
allowPrivateAddresses: { type: "boolean" }
|
|
10651
11316
|
}
|
|
10652
11317
|
},
|
|
10653
11318
|
"@sockethub/platform-metadata": {
|
|
@@ -10737,11 +11402,29 @@ var init_sockethub_config = __esm(() => {
|
|
|
10737
11402
|
type: "object",
|
|
10738
11403
|
additionalProperties: false,
|
|
10739
11404
|
properties: {
|
|
11405
|
+
maxInstancesPerSession: {
|
|
11406
|
+
type: "integer",
|
|
11407
|
+
minimum: 0,
|
|
11408
|
+
default: 10,
|
|
11409
|
+
description: "Maximum persistent instances per socket session. 0 disables the cap."
|
|
11410
|
+
},
|
|
11411
|
+
maxInstancesPerIp: {
|
|
11412
|
+
type: "integer",
|
|
11413
|
+
minimum: 0,
|
|
11414
|
+
default: 20,
|
|
11415
|
+
description: "Maximum persistent instances per client IP, including HTTP actions. 0 disables the cap."
|
|
11416
|
+
},
|
|
11417
|
+
maxStartsPerIpPerMinute: {
|
|
11418
|
+
type: "integer",
|
|
11419
|
+
minimum: 0,
|
|
11420
|
+
default: 60,
|
|
11421
|
+
description: "Maximum new persistent instances a client IP may start per minute, " + "including HTTP actions. Bounds fork/teardown churn that the " + "concurrent caps allow. Reusing a running instance does not count. " + "0 disables the cap."
|
|
11422
|
+
},
|
|
10740
11423
|
maxPlatformInstances: {
|
|
10741
11424
|
type: "number",
|
|
10742
11425
|
minimum: 0,
|
|
10743
11426
|
default: 100,
|
|
10744
|
-
description: "Upper bound on concurrently running platform instances " + "(child processes). Each persistent-platform actor forks " + "its own process, so an unbounded count is a resource " + "exhaustion risk on public instances. 0 disables the cap."
|
|
11427
|
+
description: "Upper bound on concurrently running persistent platform instances " + "(child processes). Each persistent-platform actor forks " + "its own process, so an unbounded count is a resource " + "exhaustion risk on public instances. 0 disables the cap."
|
|
10745
11428
|
}
|
|
10746
11429
|
}
|
|
10747
11430
|
},
|
|
@@ -17110,15 +17793,33 @@ var require_ajv = __commonJS(function(exports, module) {
|
|
|
17110
17793
|
} });
|
|
17111
17794
|
});
|
|
17112
17795
|
|
|
17796
|
+
// ../schemas/src/helpers/codegen.ts
|
|
17797
|
+
function isCodegenAvailable() {
|
|
17798
|
+
if (available === undefined) {
|
|
17799
|
+
try {
|
|
17800
|
+
new Function("return true");
|
|
17801
|
+
available = true;
|
|
17802
|
+
} catch {
|
|
17803
|
+
available = false;
|
|
17804
|
+
}
|
|
17805
|
+
}
|
|
17806
|
+
return available;
|
|
17807
|
+
}
|
|
17808
|
+
function warnCodegenUnavailable() {
|
|
17809
|
+
if (warned) {
|
|
17810
|
+
return;
|
|
17811
|
+
}
|
|
17812
|
+
warned = true;
|
|
17813
|
+
console.warn("[@sockethub/schemas] Schema validation is disabled: this environment's Content Security Policy blocks `new Function`, which Ajv needs to compile schemas. The Sockethub server still validates every message.");
|
|
17814
|
+
}
|
|
17815
|
+
var available, warned = false;
|
|
17816
|
+
|
|
17113
17817
|
// ../schemas/src/schemas/service-descriptor.ts
|
|
17114
17818
|
var init_service_descriptor = () => {};
|
|
17115
17819
|
|
|
17116
17820
|
// ../schemas/src/service-descriptor.ts
|
|
17117
|
-
var import_ajv, ajv;
|
|
17118
17821
|
var init_service_descriptor2 = __esm(() => {
|
|
17119
17822
|
init_service_descriptor();
|
|
17120
|
-
import_ajv = __toESM(require_ajv(), 1);
|
|
17121
|
-
ajv = new import_ajv.default({ strictTypes: false, allErrors: true });
|
|
17122
17823
|
});
|
|
17123
17824
|
|
|
17124
17825
|
// ../../node_modules/ajv-formats/dist/formats.js
|
|
@@ -26670,8 +27371,11 @@ function parseMsg(error) {
|
|
|
26670
27371
|
}
|
|
26671
27372
|
return err;
|
|
26672
27373
|
}
|
|
26673
|
-
function getTypeList(msg) {
|
|
27374
|
+
function getTypeList(msg, depth = 0) {
|
|
26674
27375
|
const types = [];
|
|
27376
|
+
if (depth > MAX_TYPE_LIST_DEPTH) {
|
|
27377
|
+
return types;
|
|
27378
|
+
}
|
|
26675
27379
|
if (msg?.type) {
|
|
26676
27380
|
types.push(msg.type);
|
|
26677
27381
|
}
|
|
@@ -26679,7 +27383,7 @@ function getTypeList(msg) {
|
|
|
26679
27383
|
for (const prop in record) {
|
|
26680
27384
|
const value = record[prop];
|
|
26681
27385
|
if (value && typeof value === "object" && "type" in value) {
|
|
26682
|
-
types.push(...getTypeList(value));
|
|
27386
|
+
types.push(...getTypeList(value, depth + 1));
|
|
26683
27387
|
}
|
|
26684
27388
|
}
|
|
26685
27389
|
return types;
|
|
@@ -26759,20 +27463,41 @@ function composeFinalError(error, options) {
|
|
|
26759
27463
|
}
|
|
26760
27464
|
return msg;
|
|
26761
27465
|
}
|
|
27466
|
+
var MAX_TYPE_LIST_DEPTH = 64;
|
|
26762
27467
|
var init_error_parser = __esm(() => {
|
|
26763
27468
|
init_objects();
|
|
26764
27469
|
});
|
|
26765
27470
|
|
|
26766
27471
|
// ../schemas/src/validator.ts
|
|
27472
|
+
function getAjv() {
|
|
27473
|
+
if (!isCodegenAvailable()) {
|
|
27474
|
+
warnCodegenUnavailable();
|
|
27475
|
+
return;
|
|
27476
|
+
}
|
|
27477
|
+
if (!ajv) {
|
|
27478
|
+
const instance = new import_ajv.default({ strictTypes: false, allErrors: true });
|
|
27479
|
+
import_ajv_formats.default(instance);
|
|
27480
|
+
import_ajv_formats_draft2019.default(instance);
|
|
27481
|
+
for (const uri in schemas) {
|
|
27482
|
+
instance.addSchema(schemas[uri], uri);
|
|
27483
|
+
}
|
|
27484
|
+
ajv = instance;
|
|
27485
|
+
}
|
|
27486
|
+
return ajv;
|
|
27487
|
+
}
|
|
26767
27488
|
function registerSystemContext(platformId, contextUrl) {
|
|
26768
27489
|
registerPlatformContext(platformId, contextUrl, `${schemaURL}/context/${platformId}/messages`, `${schemaURL}/context/${platformId}/credentials`);
|
|
27490
|
+
const instance = getAjv();
|
|
27491
|
+
if (!instance) {
|
|
27492
|
+
return;
|
|
27493
|
+
}
|
|
26769
27494
|
const messageSchemaRef = `${schemaURL}/context/${platformId}/messages`;
|
|
26770
|
-
if (!
|
|
26771
|
-
|
|
27495
|
+
if (!instance.getSchema(messageSchemaRef)) {
|
|
27496
|
+
instance.addSchema({}, messageSchemaRef);
|
|
26772
27497
|
}
|
|
26773
27498
|
const credentialsSchemaRef = `${schemaURL}/context/${platformId}/credentials`;
|
|
26774
|
-
if (!
|
|
26775
|
-
|
|
27499
|
+
if (!instance.getSchema(credentialsSchemaRef)) {
|
|
27500
|
+
instance.addSchema({}, credentialsSchemaRef);
|
|
26776
27501
|
}
|
|
26777
27502
|
}
|
|
26778
27503
|
function registerSystemPlatformContexts() {
|
|
@@ -26784,7 +27509,11 @@ function registerSystemPlatformContexts() {
|
|
|
26784
27509
|
systemContextsRegistered = true;
|
|
26785
27510
|
}
|
|
26786
27511
|
function handleValidation(schemaRef, msg) {
|
|
26787
|
-
const
|
|
27512
|
+
const instance = getAjv();
|
|
27513
|
+
if (!instance) {
|
|
27514
|
+
return "";
|
|
27515
|
+
}
|
|
27516
|
+
const validator = instance.getSchema(schemaRef);
|
|
26788
27517
|
if (!validator) {
|
|
26789
27518
|
return `schema ${schemaRef} not found`;
|
|
26790
27519
|
}
|
|
@@ -26808,17 +27537,25 @@ function setValidationErrorOptions(options) {
|
|
|
26808
27537
|
validationErrorOptions = { ...validationErrorOptions, ...options };
|
|
26809
27538
|
}
|
|
26810
27539
|
function validateSockethubConfig(config) {
|
|
27540
|
+
const instance = getAjv();
|
|
27541
|
+
if (!instance) {
|
|
27542
|
+
return "";
|
|
27543
|
+
}
|
|
26811
27544
|
if (!sockethubConfigValidator) {
|
|
26812
|
-
sockethubConfigValidator =
|
|
27545
|
+
sockethubConfigValidator = instance.compile(SockethubConfigSchema);
|
|
26813
27546
|
}
|
|
26814
27547
|
if (sockethubConfigValidator(config)) {
|
|
26815
27548
|
return "";
|
|
26816
27549
|
}
|
|
26817
|
-
return
|
|
27550
|
+
return instance.errorsText(sockethubConfigValidator.errors, {
|
|
26818
27551
|
dataVar: "config"
|
|
26819
27552
|
});
|
|
26820
27553
|
}
|
|
26821
27554
|
function validateActivityStream(msg) {
|
|
27555
|
+
if (!isCodegenAvailable()) {
|
|
27556
|
+
warnCodegenUnavailable();
|
|
27557
|
+
return "";
|
|
27558
|
+
}
|
|
26822
27559
|
const streamValidationError = handleValidation(`${schemaURL}/activity-stream`, msg);
|
|
26823
27560
|
if (streamValidationError) {
|
|
26824
27561
|
return streamValidationError;
|
|
@@ -26834,6 +27571,10 @@ function validateActivityStream(msg) {
|
|
|
26834
27571
|
return handleValidation(schemaId, msg);
|
|
26835
27572
|
}
|
|
26836
27573
|
function validateActivityStreamResponse(msg) {
|
|
27574
|
+
if (!isCodegenAvailable()) {
|
|
27575
|
+
warnCodegenUnavailable();
|
|
27576
|
+
return "";
|
|
27577
|
+
}
|
|
26837
27578
|
const platformContextUrl = resolvePlatformContextUrl(msg);
|
|
26838
27579
|
if (!platformContextUrl) {
|
|
26839
27580
|
return "";
|
|
@@ -26843,12 +27584,17 @@ function validateActivityStreamResponse(msg) {
|
|
|
26843
27584
|
return "";
|
|
26844
27585
|
}
|
|
26845
27586
|
const responsesSchemaId = `${schemaURL}/context/${platformId}/responses`;
|
|
26846
|
-
|
|
27587
|
+
const instance = getAjv();
|
|
27588
|
+
if (!instance || !instance.getSchema(responsesSchemaId)) {
|
|
26847
27589
|
return "";
|
|
26848
27590
|
}
|
|
26849
27591
|
return handleValidation(responsesSchemaId, msg);
|
|
26850
27592
|
}
|
|
26851
27593
|
function validateCredentials(msg) {
|
|
27594
|
+
if (!isCodegenAvailable()) {
|
|
27595
|
+
warnCodegenUnavailable();
|
|
27596
|
+
return "";
|
|
27597
|
+
}
|
|
26852
27598
|
if (!Array.isArray(msg["@context"])) {
|
|
26853
27599
|
return "credential activity streams must have an @context set";
|
|
26854
27600
|
}
|
|
@@ -26870,15 +27616,18 @@ function validateCredentials(msg) {
|
|
|
26870
27616
|
return handleValidation(credentialsSchemaId, msg);
|
|
26871
27617
|
}
|
|
26872
27618
|
function validatePlatformSchema(schema) {
|
|
26873
|
-
const
|
|
26874
|
-
|
|
26875
|
-
|
|
26876
|
-
const
|
|
26877
|
-
|
|
26878
|
-
|
|
26879
|
-
message
|
|
27619
|
+
const instance = getAjv();
|
|
27620
|
+
if (instance) {
|
|
27621
|
+
const validate = instance.compile(PlatformSchema);
|
|
27622
|
+
const err = validate(schema);
|
|
27623
|
+
if (!err) {
|
|
27624
|
+
const validationError = validate.errors?.[0];
|
|
27625
|
+
let message = `${validationError?.instancePath ?? ""} ${validationError?.message ?? "is invalid"}`;
|
|
27626
|
+
if (validationError?.keyword === "additionalProperties") {
|
|
27627
|
+
message += `: ${validationError.params.additionalProperty}`;
|
|
27628
|
+
}
|
|
27629
|
+
return `platform schema failed to validate: ${message}`;
|
|
26880
27630
|
}
|
|
26881
|
-
return `platform schema failed to validate: ${message}`;
|
|
26882
27631
|
}
|
|
26883
27632
|
const platform = schema;
|
|
26884
27633
|
const messages = platform.messages;
|
|
@@ -26920,10 +27669,13 @@ function validatePlatformSchema(schema) {
|
|
|
26920
27669
|
return "";
|
|
26921
27670
|
}
|
|
26922
27671
|
function addPlatformSchema(schema, platform_type) {
|
|
26923
|
-
const
|
|
26924
|
-
if (!
|
|
26925
|
-
|
|
27672
|
+
const instance = getAjv();
|
|
27673
|
+
if (!instance) {
|
|
27674
|
+
return;
|
|
26926
27675
|
}
|
|
27676
|
+
const schemaRef = `${schemaURL}/context/${platform_type}`;
|
|
27677
|
+
instance.removeSchema(schemaRef);
|
|
27678
|
+
instance.addSchema(schema, schemaRef);
|
|
26927
27679
|
}
|
|
26928
27680
|
function addPlatformContext(platformId, platformContextUrl) {
|
|
26929
27681
|
registerPlatformContext(platformId, platformContextUrl, `${schemaURL}/context/${platformId}/messages`, `${schemaURL}/context/${platformId}/credentials`);
|
|
@@ -26935,7 +27687,7 @@ function resolvePlatformId(msg) {
|
|
|
26935
27687
|
}
|
|
26936
27688
|
return getPlatformIdByContextUrl(platformContextUrl) ?? null;
|
|
26937
27689
|
}
|
|
26938
|
-
var
|
|
27690
|
+
var import_ajv, import_ajv_formats, import_ajv_formats_draft2019, schemaURL = "https://sockethub.org/schemas/v0", schemas, validationErrorOptions, systemContextsRegistered = false, ajv, sockethubConfigValidator;
|
|
26939
27691
|
var init_validator = __esm(() => {
|
|
26940
27692
|
init_context();
|
|
26941
27693
|
init_error_parser();
|
|
@@ -26943,18 +27695,12 @@ var init_validator = __esm(() => {
|
|
|
26943
27695
|
init_activity_stream();
|
|
26944
27696
|
init_platform();
|
|
26945
27697
|
init_sockethub_config();
|
|
26946
|
-
|
|
27698
|
+
import_ajv = __toESM(require_ajv(), 1);
|
|
26947
27699
|
import_ajv_formats = __toESM(require_dist(), 1);
|
|
26948
27700
|
import_ajv_formats_draft2019 = __toESM(require_ajv_formats_draft2019(), 1);
|
|
26949
|
-
ajv2 = new import_ajv2.default({ strictTypes: false, allErrors: true });
|
|
26950
|
-
import_ajv_formats.default(ajv2);
|
|
26951
|
-
import_ajv_formats_draft2019.default(ajv2);
|
|
26952
27701
|
schemas = {};
|
|
26953
27702
|
validationErrorOptions = {};
|
|
26954
27703
|
schemas[`${schemaURL}/activity-stream`] = ActivityStreamSchema;
|
|
26955
|
-
for (const uri in schemas) {
|
|
26956
|
-
ajv2.addSchema(schemas[uri], uri);
|
|
26957
|
-
}
|
|
26958
27704
|
registerSystemPlatformContexts();
|
|
26959
27705
|
});
|
|
26960
27706
|
|
|
@@ -29275,6 +30021,9 @@ var init_config_schema = __esm(() => {
|
|
|
29275
30021
|
"rateLimiter.maxRequests": { format: "nat" },
|
|
29276
30022
|
"rateLimiter.blockDurationMs": { format: "nat" },
|
|
29277
30023
|
"rateLimiter.maxConnectionsPerIp": { format: "nat" },
|
|
30024
|
+
"limits.maxInstancesPerSession": { format: "nat" },
|
|
30025
|
+
"limits.maxInstancesPerIp": { format: "nat" },
|
|
30026
|
+
"limits.maxStartsPerIpPerMinute": { format: "nat" },
|
|
29278
30027
|
"limits.maxPlatformInstances": { format: "nat" },
|
|
29279
30028
|
"credentials.ttlMs": {
|
|
29280
30029
|
format: "nat",
|
|
@@ -29927,7 +30676,7 @@ var __create2, __getProtoOf2, __defProp2, __getOwnPropNames2, __hasOwnProp2, __t
|
|
|
29927
30676
|
if (canCache)
|
|
29928
30677
|
cache.set(mod, to);
|
|
29929
30678
|
return to;
|
|
29930
|
-
}, __commonJS22 = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports), __require22, require_ms3,
|
|
30679
|
+
}, __commonJS22 = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports), __require22, require_ms3, require_common3, require_browser2, require_node4, require_src2, require_commands, require_built, require_utils2, require_built2, require_old, require_modern2, require_redis_errors, require_lib2, require_defaults3, require_isArguments, require_lodash2, require_debug, require_TLSProfiles, require_utils22, require_argumentParsers, require_Command, require_ClusterAllFailedError, require_ScanStream, require_autoPipelining, require_Script, require_Commander, require_Pipeline, require_tracing, require_transaction, require_applyMixin, require_ClusterOptions, require_util3, require_ClusterSubscriber, require_ConnectionPool, require_denque, require_DelayQueue, require_ShardedSubscriber, require_ClusterSubscriberGroup, require_cluster, require_AbstractConnector, require_StandaloneConnector, require_SentinelIterator, require_FailoverDetector, require_SentinelConnector, require_connectors, require_MaxRetriesPerRequestError, require_errors5, require_parser, require_SubscriptionSet, require_DataHandler, require_event_handler, require_RedisOptions, require_Redis, require_built3, import_debug2, import_ioredis, log, ALGORITHM = "aes-256-cbc", IV_LENGTH = 16, crypto;
|
|
29931
30680
|
var init_crypto = __esm(() => {
|
|
29932
30681
|
__create2 = Object.create;
|
|
29933
30682
|
__getProtoOf2 = Object.getPrototypeOf;
|
|
@@ -30425,7 +31174,7 @@ var init_crypto = __esm(() => {
|
|
|
30425
31174
|
return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
|
|
30426
31175
|
}
|
|
30427
31176
|
});
|
|
30428
|
-
|
|
31177
|
+
require_common3 = __commonJS22((exports, module) => {
|
|
30429
31178
|
function setup(env) {
|
|
30430
31179
|
createDebug.debug = createDebug;
|
|
30431
31180
|
createDebug.default = createDebug;
|
|
@@ -30598,7 +31347,7 @@ var init_crypto = __esm(() => {
|
|
|
30598
31347
|
}
|
|
30599
31348
|
module.exports = setup;
|
|
30600
31349
|
});
|
|
30601
|
-
|
|
31350
|
+
require_browser2 = __commonJS22((exports, module) => {
|
|
30602
31351
|
exports.formatArgs = formatArgs;
|
|
30603
31352
|
exports.save = save;
|
|
30604
31353
|
exports.load = load;
|
|
@@ -30746,7 +31495,7 @@ var init_crypto = __esm(() => {
|
|
|
30746
31495
|
return localStorage;
|
|
30747
31496
|
} catch (error) {}
|
|
30748
31497
|
}
|
|
30749
|
-
module.exports =
|
|
31498
|
+
module.exports = require_common3()(exports);
|
|
30750
31499
|
var { formatters } = module.exports;
|
|
30751
31500
|
formatters.j = function(v) {
|
|
30752
31501
|
try {
|
|
@@ -30756,7 +31505,7 @@ var init_crypto = __esm(() => {
|
|
|
30756
31505
|
}
|
|
30757
31506
|
};
|
|
30758
31507
|
});
|
|
30759
|
-
|
|
31508
|
+
require_node4 = __commonJS22((exports, module) => {
|
|
30760
31509
|
var tty = __require22("tty");
|
|
30761
31510
|
var util = __require22("util");
|
|
30762
31511
|
exports.init = init;
|
|
@@ -30915,7 +31664,7 @@ var init_crypto = __esm(() => {
|
|
|
30915
31664
|
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
|
30916
31665
|
}
|
|
30917
31666
|
}
|
|
30918
|
-
module.exports =
|
|
31667
|
+
module.exports = require_common3()(exports);
|
|
30919
31668
|
var { formatters } = module.exports;
|
|
30920
31669
|
formatters.o = function(v) {
|
|
30921
31670
|
this.inspectOpts.colors = this.useColors;
|
|
@@ -30927,11 +31676,11 @@ var init_crypto = __esm(() => {
|
|
|
30927
31676
|
return util.inspect(v, this.inspectOpts);
|
|
30928
31677
|
};
|
|
30929
31678
|
});
|
|
30930
|
-
|
|
31679
|
+
require_src2 = __commonJS22((exports, module) => {
|
|
30931
31680
|
if (typeof process === "undefined" || process.type === "renderer" || false || process.__nwjs) {
|
|
30932
|
-
module.exports =
|
|
31681
|
+
module.exports = require_browser2();
|
|
30933
31682
|
} else {
|
|
30934
|
-
module.exports =
|
|
31683
|
+
module.exports = require_node4();
|
|
30935
31684
|
}
|
|
30936
31685
|
});
|
|
30937
31686
|
require_commands = __commonJS22((exports, module) => {
|
|
@@ -34678,7 +35427,7 @@ var init_crypto = __esm(() => {
|
|
|
34678
35427
|
require_debug = __commonJS22((exports) => {
|
|
34679
35428
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34680
35429
|
exports.genRedactedString = exports.getStringValue = exports.MAX_ARGUMENT_LENGTH = undefined;
|
|
34681
|
-
var debug_1 =
|
|
35430
|
+
var debug_1 = require_src2();
|
|
34682
35431
|
var MAX_ARGUMENT_LENGTH = 200;
|
|
34683
35432
|
exports.MAX_ARGUMENT_LENGTH = MAX_ARGUMENT_LENGTH;
|
|
34684
35433
|
var NAMESPACE_PREFIX = "ioredis";
|
|
@@ -40420,9 +41169,9 @@ $` + Buffer.byteLength(this.name) + `\r
|
|
|
40420
41169
|
}
|
|
40421
41170
|
exports.print = print;
|
|
40422
41171
|
});
|
|
40423
|
-
|
|
41172
|
+
import_debug2 = __toESM22(require_src2(), 1);
|
|
40424
41173
|
import_ioredis = __toESM22(require_built3(), 1);
|
|
40425
|
-
log =
|
|
41174
|
+
log = import_debug2.default("secure-store-redis");
|
|
40426
41175
|
crypto = new Crypto;
|
|
40427
41176
|
});
|
|
40428
41177
|
|
|
@@ -44189,647 +44938,11 @@ var require_lodash3 = __commonJS(function(exports) {
|
|
|
44189
44938
|
__exportStar(require_isArguments2(), exports);
|
|
44190
44939
|
});
|
|
44191
44940
|
|
|
44192
|
-
// ../../node_modules/debug/src/common.js
|
|
44193
|
-
var require_common3 = __commonJS(function(exports, module) {
|
|
44194
|
-
function setup(env) {
|
|
44195
|
-
createDebug.debug = createDebug;
|
|
44196
|
-
createDebug.default = createDebug;
|
|
44197
|
-
createDebug.coerce = coerce;
|
|
44198
|
-
createDebug.disable = disable;
|
|
44199
|
-
createDebug.enable = enable;
|
|
44200
|
-
createDebug.enabled = enabled;
|
|
44201
|
-
createDebug.humanize = require_ms();
|
|
44202
|
-
createDebug.destroy = destroy;
|
|
44203
|
-
Object.keys(env).forEach((key) => {
|
|
44204
|
-
createDebug[key] = env[key];
|
|
44205
|
-
});
|
|
44206
|
-
createDebug.names = [];
|
|
44207
|
-
createDebug.skips = [];
|
|
44208
|
-
createDebug.formatters = {};
|
|
44209
|
-
function selectColor(namespace) {
|
|
44210
|
-
let hash = 0;
|
|
44211
|
-
for (let i = 0;i < namespace.length; i++) {
|
|
44212
|
-
hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
|
44213
|
-
hash |= 0;
|
|
44214
|
-
}
|
|
44215
|
-
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
|
44216
|
-
}
|
|
44217
|
-
createDebug.selectColor = selectColor;
|
|
44218
|
-
function createDebug(namespace) {
|
|
44219
|
-
let prevTime;
|
|
44220
|
-
let enableOverride = null;
|
|
44221
|
-
let namespacesCache;
|
|
44222
|
-
let enabledCache;
|
|
44223
|
-
function debug(...args) {
|
|
44224
|
-
if (!debug.enabled) {
|
|
44225
|
-
return;
|
|
44226
|
-
}
|
|
44227
|
-
const self2 = debug;
|
|
44228
|
-
const curr = Number(new Date);
|
|
44229
|
-
const ms = curr - (prevTime || curr);
|
|
44230
|
-
self2.diff = ms;
|
|
44231
|
-
self2.prev = prevTime;
|
|
44232
|
-
self2.curr = curr;
|
|
44233
|
-
prevTime = curr;
|
|
44234
|
-
args[0] = createDebug.coerce(args[0]);
|
|
44235
|
-
if (typeof args[0] !== "string") {
|
|
44236
|
-
args.unshift("%O");
|
|
44237
|
-
}
|
|
44238
|
-
let index = 0;
|
|
44239
|
-
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
|
|
44240
|
-
if (match === "%%") {
|
|
44241
|
-
return "%";
|
|
44242
|
-
}
|
|
44243
|
-
index++;
|
|
44244
|
-
const formatter = createDebug.formatters[format];
|
|
44245
|
-
if (typeof formatter === "function") {
|
|
44246
|
-
const val = args[index];
|
|
44247
|
-
match = formatter.call(self2, val);
|
|
44248
|
-
args.splice(index, 1);
|
|
44249
|
-
index--;
|
|
44250
|
-
}
|
|
44251
|
-
return match;
|
|
44252
|
-
});
|
|
44253
|
-
createDebug.formatArgs.call(self2, args);
|
|
44254
|
-
const logFn = self2.log || createDebug.log;
|
|
44255
|
-
logFn.apply(self2, args);
|
|
44256
|
-
}
|
|
44257
|
-
debug.namespace = namespace;
|
|
44258
|
-
debug.useColors = createDebug.useColors();
|
|
44259
|
-
debug.color = createDebug.selectColor(namespace);
|
|
44260
|
-
debug.extend = extend;
|
|
44261
|
-
debug.destroy = createDebug.destroy;
|
|
44262
|
-
Object.defineProperty(debug, "enabled", {
|
|
44263
|
-
enumerable: true,
|
|
44264
|
-
configurable: false,
|
|
44265
|
-
get: () => {
|
|
44266
|
-
if (enableOverride !== null) {
|
|
44267
|
-
return enableOverride;
|
|
44268
|
-
}
|
|
44269
|
-
if (namespacesCache !== createDebug.namespaces) {
|
|
44270
|
-
namespacesCache = createDebug.namespaces;
|
|
44271
|
-
enabledCache = createDebug.enabled(namespace);
|
|
44272
|
-
}
|
|
44273
|
-
return enabledCache;
|
|
44274
|
-
},
|
|
44275
|
-
set: (v) => {
|
|
44276
|
-
enableOverride = v;
|
|
44277
|
-
}
|
|
44278
|
-
});
|
|
44279
|
-
if (typeof createDebug.init === "function") {
|
|
44280
|
-
createDebug.init(debug);
|
|
44281
|
-
}
|
|
44282
|
-
return debug;
|
|
44283
|
-
}
|
|
44284
|
-
function extend(namespace, delimiter) {
|
|
44285
|
-
const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
|
|
44286
|
-
newDebug.log = this.log;
|
|
44287
|
-
return newDebug;
|
|
44288
|
-
}
|
|
44289
|
-
function enable(namespaces) {
|
|
44290
|
-
createDebug.save(namespaces);
|
|
44291
|
-
createDebug.namespaces = namespaces;
|
|
44292
|
-
createDebug.names = [];
|
|
44293
|
-
createDebug.skips = [];
|
|
44294
|
-
const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
|
44295
|
-
for (const ns of split) {
|
|
44296
|
-
if (ns[0] === "-") {
|
|
44297
|
-
createDebug.skips.push(ns.slice(1));
|
|
44298
|
-
} else {
|
|
44299
|
-
createDebug.names.push(ns);
|
|
44300
|
-
}
|
|
44301
|
-
}
|
|
44302
|
-
}
|
|
44303
|
-
function matchesTemplate(search, template) {
|
|
44304
|
-
let searchIndex = 0;
|
|
44305
|
-
let templateIndex = 0;
|
|
44306
|
-
let starIndex = -1;
|
|
44307
|
-
let matchIndex = 0;
|
|
44308
|
-
while (searchIndex < search.length) {
|
|
44309
|
-
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
|
|
44310
|
-
if (template[templateIndex] === "*") {
|
|
44311
|
-
starIndex = templateIndex;
|
|
44312
|
-
matchIndex = searchIndex;
|
|
44313
|
-
templateIndex++;
|
|
44314
|
-
} else {
|
|
44315
|
-
searchIndex++;
|
|
44316
|
-
templateIndex++;
|
|
44317
|
-
}
|
|
44318
|
-
} else if (starIndex !== -1) {
|
|
44319
|
-
templateIndex = starIndex + 1;
|
|
44320
|
-
matchIndex++;
|
|
44321
|
-
searchIndex = matchIndex;
|
|
44322
|
-
} else {
|
|
44323
|
-
return false;
|
|
44324
|
-
}
|
|
44325
|
-
}
|
|
44326
|
-
while (templateIndex < template.length && template[templateIndex] === "*") {
|
|
44327
|
-
templateIndex++;
|
|
44328
|
-
}
|
|
44329
|
-
return templateIndex === template.length;
|
|
44330
|
-
}
|
|
44331
|
-
function disable() {
|
|
44332
|
-
const namespaces = [
|
|
44333
|
-
...createDebug.names,
|
|
44334
|
-
...createDebug.skips.map((namespace) => "-" + namespace)
|
|
44335
|
-
].join(",");
|
|
44336
|
-
createDebug.enable("");
|
|
44337
|
-
return namespaces;
|
|
44338
|
-
}
|
|
44339
|
-
function enabled(name) {
|
|
44340
|
-
for (const skip of createDebug.skips) {
|
|
44341
|
-
if (matchesTemplate(name, skip)) {
|
|
44342
|
-
return false;
|
|
44343
|
-
}
|
|
44344
|
-
}
|
|
44345
|
-
for (const ns of createDebug.names) {
|
|
44346
|
-
if (matchesTemplate(name, ns)) {
|
|
44347
|
-
return true;
|
|
44348
|
-
}
|
|
44349
|
-
}
|
|
44350
|
-
return false;
|
|
44351
|
-
}
|
|
44352
|
-
function coerce(val) {
|
|
44353
|
-
if (val instanceof Error) {
|
|
44354
|
-
return val.stack || val.message;
|
|
44355
|
-
}
|
|
44356
|
-
return val;
|
|
44357
|
-
}
|
|
44358
|
-
function destroy() {
|
|
44359
|
-
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
44360
|
-
}
|
|
44361
|
-
createDebug.enable(createDebug.load());
|
|
44362
|
-
return createDebug;
|
|
44363
|
-
}
|
|
44364
|
-
module.exports = setup;
|
|
44365
|
-
});
|
|
44366
|
-
|
|
44367
|
-
// ../../node_modules/debug/src/browser.js
|
|
44368
|
-
var require_browser2 = __commonJS(function(exports, module) {
|
|
44369
|
-
exports.formatArgs = formatArgs;
|
|
44370
|
-
exports.save = save;
|
|
44371
|
-
exports.load = load;
|
|
44372
|
-
exports.useColors = useColors;
|
|
44373
|
-
exports.storage = localstorage();
|
|
44374
|
-
exports.destroy = (() => {
|
|
44375
|
-
let warned = false;
|
|
44376
|
-
return () => {
|
|
44377
|
-
if (!warned) {
|
|
44378
|
-
warned = true;
|
|
44379
|
-
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
44380
|
-
}
|
|
44381
|
-
};
|
|
44382
|
-
})();
|
|
44383
|
-
exports.colors = [
|
|
44384
|
-
"#0000CC",
|
|
44385
|
-
"#0000FF",
|
|
44386
|
-
"#0033CC",
|
|
44387
|
-
"#0033FF",
|
|
44388
|
-
"#0066CC",
|
|
44389
|
-
"#0066FF",
|
|
44390
|
-
"#0099CC",
|
|
44391
|
-
"#0099FF",
|
|
44392
|
-
"#00CC00",
|
|
44393
|
-
"#00CC33",
|
|
44394
|
-
"#00CC66",
|
|
44395
|
-
"#00CC99",
|
|
44396
|
-
"#00CCCC",
|
|
44397
|
-
"#00CCFF",
|
|
44398
|
-
"#3300CC",
|
|
44399
|
-
"#3300FF",
|
|
44400
|
-
"#3333CC",
|
|
44401
|
-
"#3333FF",
|
|
44402
|
-
"#3366CC",
|
|
44403
|
-
"#3366FF",
|
|
44404
|
-
"#3399CC",
|
|
44405
|
-
"#3399FF",
|
|
44406
|
-
"#33CC00",
|
|
44407
|
-
"#33CC33",
|
|
44408
|
-
"#33CC66",
|
|
44409
|
-
"#33CC99",
|
|
44410
|
-
"#33CCCC",
|
|
44411
|
-
"#33CCFF",
|
|
44412
|
-
"#6600CC",
|
|
44413
|
-
"#6600FF",
|
|
44414
|
-
"#6633CC",
|
|
44415
|
-
"#6633FF",
|
|
44416
|
-
"#66CC00",
|
|
44417
|
-
"#66CC33",
|
|
44418
|
-
"#9900CC",
|
|
44419
|
-
"#9900FF",
|
|
44420
|
-
"#9933CC",
|
|
44421
|
-
"#9933FF",
|
|
44422
|
-
"#99CC00",
|
|
44423
|
-
"#99CC33",
|
|
44424
|
-
"#CC0000",
|
|
44425
|
-
"#CC0033",
|
|
44426
|
-
"#CC0066",
|
|
44427
|
-
"#CC0099",
|
|
44428
|
-
"#CC00CC",
|
|
44429
|
-
"#CC00FF",
|
|
44430
|
-
"#CC3300",
|
|
44431
|
-
"#CC3333",
|
|
44432
|
-
"#CC3366",
|
|
44433
|
-
"#CC3399",
|
|
44434
|
-
"#CC33CC",
|
|
44435
|
-
"#CC33FF",
|
|
44436
|
-
"#CC6600",
|
|
44437
|
-
"#CC6633",
|
|
44438
|
-
"#CC9900",
|
|
44439
|
-
"#CC9933",
|
|
44440
|
-
"#CCCC00",
|
|
44441
|
-
"#CCCC33",
|
|
44442
|
-
"#FF0000",
|
|
44443
|
-
"#FF0033",
|
|
44444
|
-
"#FF0066",
|
|
44445
|
-
"#FF0099",
|
|
44446
|
-
"#FF00CC",
|
|
44447
|
-
"#FF00FF",
|
|
44448
|
-
"#FF3300",
|
|
44449
|
-
"#FF3333",
|
|
44450
|
-
"#FF3366",
|
|
44451
|
-
"#FF3399",
|
|
44452
|
-
"#FF33CC",
|
|
44453
|
-
"#FF33FF",
|
|
44454
|
-
"#FF6600",
|
|
44455
|
-
"#FF6633",
|
|
44456
|
-
"#FF9900",
|
|
44457
|
-
"#FF9933",
|
|
44458
|
-
"#FFCC00",
|
|
44459
|
-
"#FFCC33"
|
|
44460
|
-
];
|
|
44461
|
-
function useColors() {
|
|
44462
|
-
if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
|
|
44463
|
-
return true;
|
|
44464
|
-
}
|
|
44465
|
-
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
44466
|
-
return false;
|
|
44467
|
-
}
|
|
44468
|
-
let m;
|
|
44469
|
-
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
44470
|
-
}
|
|
44471
|
-
function formatArgs(args) {
|
|
44472
|
-
args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
|
|
44473
|
-
if (!this.useColors) {
|
|
44474
|
-
return;
|
|
44475
|
-
}
|
|
44476
|
-
const c = "color: " + this.color;
|
|
44477
|
-
args.splice(1, 0, c, "color: inherit");
|
|
44478
|
-
let index = 0;
|
|
44479
|
-
let lastC = 0;
|
|
44480
|
-
args[0].replace(/%[a-zA-Z%]/g, (match) => {
|
|
44481
|
-
if (match === "%%") {
|
|
44482
|
-
return;
|
|
44483
|
-
}
|
|
44484
|
-
index++;
|
|
44485
|
-
if (match === "%c") {
|
|
44486
|
-
lastC = index;
|
|
44487
|
-
}
|
|
44488
|
-
});
|
|
44489
|
-
args.splice(lastC, 0, c);
|
|
44490
|
-
}
|
|
44491
|
-
exports.log = console.debug || console.log || (() => {});
|
|
44492
|
-
function save(namespaces) {
|
|
44493
|
-
try {
|
|
44494
|
-
if (namespaces) {
|
|
44495
|
-
exports.storage.setItem("debug", namespaces);
|
|
44496
|
-
} else {
|
|
44497
|
-
exports.storage.removeItem("debug");
|
|
44498
|
-
}
|
|
44499
|
-
} catch (error) {}
|
|
44500
|
-
}
|
|
44501
|
-
function load() {
|
|
44502
|
-
let r;
|
|
44503
|
-
try {
|
|
44504
|
-
r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG");
|
|
44505
|
-
} catch (error) {}
|
|
44506
|
-
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
44507
|
-
r = process.env.DEBUG;
|
|
44508
|
-
}
|
|
44509
|
-
return r;
|
|
44510
|
-
}
|
|
44511
|
-
function localstorage() {
|
|
44512
|
-
try {
|
|
44513
|
-
return localStorage;
|
|
44514
|
-
} catch (error) {}
|
|
44515
|
-
}
|
|
44516
|
-
module.exports = require_common3()(exports);
|
|
44517
|
-
var { formatters } = module.exports;
|
|
44518
|
-
formatters.j = function(v) {
|
|
44519
|
-
try {
|
|
44520
|
-
return JSON.stringify(v);
|
|
44521
|
-
} catch (error) {
|
|
44522
|
-
return "[UnexpectedJSONParseError]: " + error.message;
|
|
44523
|
-
}
|
|
44524
|
-
};
|
|
44525
|
-
});
|
|
44526
|
-
|
|
44527
|
-
// ../../node_modules/has-flag/index.js
|
|
44528
|
-
var require_has_flag2 = __commonJS(function(exports, module) {
|
|
44529
|
-
module.exports = (flag, argv = process.argv) => {
|
|
44530
|
-
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
44531
|
-
const position = argv.indexOf(prefix + flag);
|
|
44532
|
-
const terminatorPosition = argv.indexOf("--");
|
|
44533
|
-
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
44534
|
-
};
|
|
44535
|
-
});
|
|
44536
|
-
|
|
44537
|
-
// ../../node_modules/supports-color/index.js
|
|
44538
|
-
var require_supports_color = __commonJS(function(exports, module) {
|
|
44539
|
-
var os = __require("os");
|
|
44540
|
-
var tty = __require("tty");
|
|
44541
|
-
var hasFlag = require_has_flag2();
|
|
44542
|
-
var { env } = process;
|
|
44543
|
-
var flagForceColor;
|
|
44544
|
-
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
44545
|
-
flagForceColor = 0;
|
|
44546
|
-
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
44547
|
-
flagForceColor = 1;
|
|
44548
|
-
}
|
|
44549
|
-
function envForceColor() {
|
|
44550
|
-
if ("FORCE_COLOR" in env) {
|
|
44551
|
-
if (env.FORCE_COLOR === "true") {
|
|
44552
|
-
return 1;
|
|
44553
|
-
}
|
|
44554
|
-
if (env.FORCE_COLOR === "false") {
|
|
44555
|
-
return 0;
|
|
44556
|
-
}
|
|
44557
|
-
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
44558
|
-
}
|
|
44559
|
-
}
|
|
44560
|
-
function translateLevel(level) {
|
|
44561
|
-
if (level === 0) {
|
|
44562
|
-
return false;
|
|
44563
|
-
}
|
|
44564
|
-
return {
|
|
44565
|
-
level,
|
|
44566
|
-
hasBasic: true,
|
|
44567
|
-
has256: level >= 2,
|
|
44568
|
-
has16m: level >= 3
|
|
44569
|
-
};
|
|
44570
|
-
}
|
|
44571
|
-
function supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
44572
|
-
const noFlagForceColor = envForceColor();
|
|
44573
|
-
if (noFlagForceColor !== undefined) {
|
|
44574
|
-
flagForceColor = noFlagForceColor;
|
|
44575
|
-
}
|
|
44576
|
-
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
44577
|
-
if (forceColor === 0) {
|
|
44578
|
-
return 0;
|
|
44579
|
-
}
|
|
44580
|
-
if (sniffFlags) {
|
|
44581
|
-
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
44582
|
-
return 3;
|
|
44583
|
-
}
|
|
44584
|
-
if (hasFlag("color=256")) {
|
|
44585
|
-
return 2;
|
|
44586
|
-
}
|
|
44587
|
-
}
|
|
44588
|
-
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
44589
|
-
return 0;
|
|
44590
|
-
}
|
|
44591
|
-
const min = forceColor || 0;
|
|
44592
|
-
if (env.TERM === "dumb") {
|
|
44593
|
-
return min;
|
|
44594
|
-
}
|
|
44595
|
-
if (process.platform === "win32") {
|
|
44596
|
-
const osRelease = os.release().split(".");
|
|
44597
|
-
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
44598
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
44599
|
-
}
|
|
44600
|
-
return 1;
|
|
44601
|
-
}
|
|
44602
|
-
if ("CI" in env) {
|
|
44603
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => (sign in env)) || env.CI_NAME === "codeship") {
|
|
44604
|
-
return 1;
|
|
44605
|
-
}
|
|
44606
|
-
return min;
|
|
44607
|
-
}
|
|
44608
|
-
if ("TEAMCITY_VERSION" in env) {
|
|
44609
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
44610
|
-
}
|
|
44611
|
-
if (env.COLORTERM === "truecolor") {
|
|
44612
|
-
return 3;
|
|
44613
|
-
}
|
|
44614
|
-
if ("TERM_PROGRAM" in env) {
|
|
44615
|
-
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
44616
|
-
switch (env.TERM_PROGRAM) {
|
|
44617
|
-
case "iTerm.app":
|
|
44618
|
-
return version >= 3 ? 3 : 2;
|
|
44619
|
-
case "Apple_Terminal":
|
|
44620
|
-
return 2;
|
|
44621
|
-
}
|
|
44622
|
-
}
|
|
44623
|
-
if (/-256(color)?$/i.test(env.TERM)) {
|
|
44624
|
-
return 2;
|
|
44625
|
-
}
|
|
44626
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
44627
|
-
return 1;
|
|
44628
|
-
}
|
|
44629
|
-
if ("COLORTERM" in env) {
|
|
44630
|
-
return 1;
|
|
44631
|
-
}
|
|
44632
|
-
return min;
|
|
44633
|
-
}
|
|
44634
|
-
function getSupportLevel(stream, options = {}) {
|
|
44635
|
-
const level = supportsColor(stream, {
|
|
44636
|
-
streamIsTTY: stream && stream.isTTY,
|
|
44637
|
-
...options
|
|
44638
|
-
});
|
|
44639
|
-
return translateLevel(level);
|
|
44640
|
-
}
|
|
44641
|
-
module.exports = {
|
|
44642
|
-
supportsColor: getSupportLevel,
|
|
44643
|
-
stdout: getSupportLevel({ isTTY: tty.isatty(1) }),
|
|
44644
|
-
stderr: getSupportLevel({ isTTY: tty.isatty(2) })
|
|
44645
|
-
};
|
|
44646
|
-
});
|
|
44647
|
-
|
|
44648
|
-
// ../../node_modules/debug/src/node.js
|
|
44649
|
-
var require_node4 = __commonJS(function(exports, module) {
|
|
44650
|
-
var tty = __require("tty");
|
|
44651
|
-
var util = __require("util");
|
|
44652
|
-
exports.init = init;
|
|
44653
|
-
exports.log = log;
|
|
44654
|
-
exports.formatArgs = formatArgs;
|
|
44655
|
-
exports.save = save;
|
|
44656
|
-
exports.load = load;
|
|
44657
|
-
exports.useColors = useColors;
|
|
44658
|
-
exports.destroy = util.deprecate(() => {}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
44659
|
-
exports.colors = [6, 2, 3, 4, 5, 1];
|
|
44660
|
-
try {
|
|
44661
|
-
const supportsColor = require_supports_color();
|
|
44662
|
-
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
|
44663
|
-
exports.colors = [
|
|
44664
|
-
20,
|
|
44665
|
-
21,
|
|
44666
|
-
26,
|
|
44667
|
-
27,
|
|
44668
|
-
32,
|
|
44669
|
-
33,
|
|
44670
|
-
38,
|
|
44671
|
-
39,
|
|
44672
|
-
40,
|
|
44673
|
-
41,
|
|
44674
|
-
42,
|
|
44675
|
-
43,
|
|
44676
|
-
44,
|
|
44677
|
-
45,
|
|
44678
|
-
56,
|
|
44679
|
-
57,
|
|
44680
|
-
62,
|
|
44681
|
-
63,
|
|
44682
|
-
68,
|
|
44683
|
-
69,
|
|
44684
|
-
74,
|
|
44685
|
-
75,
|
|
44686
|
-
76,
|
|
44687
|
-
77,
|
|
44688
|
-
78,
|
|
44689
|
-
79,
|
|
44690
|
-
80,
|
|
44691
|
-
81,
|
|
44692
|
-
92,
|
|
44693
|
-
93,
|
|
44694
|
-
98,
|
|
44695
|
-
99,
|
|
44696
|
-
112,
|
|
44697
|
-
113,
|
|
44698
|
-
128,
|
|
44699
|
-
129,
|
|
44700
|
-
134,
|
|
44701
|
-
135,
|
|
44702
|
-
148,
|
|
44703
|
-
149,
|
|
44704
|
-
160,
|
|
44705
|
-
161,
|
|
44706
|
-
162,
|
|
44707
|
-
163,
|
|
44708
|
-
164,
|
|
44709
|
-
165,
|
|
44710
|
-
166,
|
|
44711
|
-
167,
|
|
44712
|
-
168,
|
|
44713
|
-
169,
|
|
44714
|
-
170,
|
|
44715
|
-
171,
|
|
44716
|
-
172,
|
|
44717
|
-
173,
|
|
44718
|
-
178,
|
|
44719
|
-
179,
|
|
44720
|
-
184,
|
|
44721
|
-
185,
|
|
44722
|
-
196,
|
|
44723
|
-
197,
|
|
44724
|
-
198,
|
|
44725
|
-
199,
|
|
44726
|
-
200,
|
|
44727
|
-
201,
|
|
44728
|
-
202,
|
|
44729
|
-
203,
|
|
44730
|
-
204,
|
|
44731
|
-
205,
|
|
44732
|
-
206,
|
|
44733
|
-
207,
|
|
44734
|
-
208,
|
|
44735
|
-
209,
|
|
44736
|
-
214,
|
|
44737
|
-
215,
|
|
44738
|
-
220,
|
|
44739
|
-
221
|
|
44740
|
-
];
|
|
44741
|
-
}
|
|
44742
|
-
} catch (error) {}
|
|
44743
|
-
exports.inspectOpts = Object.keys(process.env).filter((key) => {
|
|
44744
|
-
return /^debug_/i.test(key);
|
|
44745
|
-
}).reduce((obj, key) => {
|
|
44746
|
-
const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
|
|
44747
|
-
return k.toUpperCase();
|
|
44748
|
-
});
|
|
44749
|
-
let val = process.env[key];
|
|
44750
|
-
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
|
44751
|
-
val = true;
|
|
44752
|
-
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
|
44753
|
-
val = false;
|
|
44754
|
-
} else if (val === "null") {
|
|
44755
|
-
val = null;
|
|
44756
|
-
} else {
|
|
44757
|
-
val = Number(val);
|
|
44758
|
-
}
|
|
44759
|
-
obj[prop] = val;
|
|
44760
|
-
return obj;
|
|
44761
|
-
}, {});
|
|
44762
|
-
function useColors() {
|
|
44763
|
-
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
|
|
44764
|
-
}
|
|
44765
|
-
function formatArgs(args) {
|
|
44766
|
-
const { namespace: name, useColors } = this;
|
|
44767
|
-
if (useColors) {
|
|
44768
|
-
const c = this.color;
|
|
44769
|
-
const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
|
|
44770
|
-
const prefix = ` ${colorCode};1m${name} \x1B[0m`;
|
|
44771
|
-
args[0] = prefix + args[0].split(`
|
|
44772
|
-
`).join(`
|
|
44773
|
-
` + prefix);
|
|
44774
|
-
args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m");
|
|
44775
|
-
} else {
|
|
44776
|
-
args[0] = getDate() + name + " " + args[0];
|
|
44777
|
-
}
|
|
44778
|
-
}
|
|
44779
|
-
function getDate() {
|
|
44780
|
-
if (exports.inspectOpts.hideDate) {
|
|
44781
|
-
return "";
|
|
44782
|
-
}
|
|
44783
|
-
return new Date().toISOString() + " ";
|
|
44784
|
-
}
|
|
44785
|
-
function log(...args) {
|
|
44786
|
-
return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + `
|
|
44787
|
-
`);
|
|
44788
|
-
}
|
|
44789
|
-
function save(namespaces) {
|
|
44790
|
-
if (namespaces) {
|
|
44791
|
-
process.env.DEBUG = namespaces;
|
|
44792
|
-
} else {
|
|
44793
|
-
delete process.env.DEBUG;
|
|
44794
|
-
}
|
|
44795
|
-
}
|
|
44796
|
-
function load() {
|
|
44797
|
-
return process.env.DEBUG;
|
|
44798
|
-
}
|
|
44799
|
-
function init(debug) {
|
|
44800
|
-
debug.inspectOpts = {};
|
|
44801
|
-
const keys = Object.keys(exports.inspectOpts);
|
|
44802
|
-
for (let i = 0;i < keys.length; i++) {
|
|
44803
|
-
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
|
44804
|
-
}
|
|
44805
|
-
}
|
|
44806
|
-
module.exports = require_common3()(exports);
|
|
44807
|
-
var { formatters } = module.exports;
|
|
44808
|
-
formatters.o = function(v) {
|
|
44809
|
-
this.inspectOpts.colors = this.useColors;
|
|
44810
|
-
return util.inspect(v, this.inspectOpts).split(`
|
|
44811
|
-
`).map((str) => str.trim()).join(" ");
|
|
44812
|
-
};
|
|
44813
|
-
formatters.O = function(v) {
|
|
44814
|
-
this.inspectOpts.colors = this.useColors;
|
|
44815
|
-
return util.inspect(v, this.inspectOpts);
|
|
44816
|
-
};
|
|
44817
|
-
});
|
|
44818
|
-
|
|
44819
|
-
// ../../node_modules/debug/src/index.js
|
|
44820
|
-
var require_src2 = __commonJS(function(exports, module) {
|
|
44821
|
-
if (typeof process === "undefined" || process.type === "renderer" || false || process.__nwjs) {
|
|
44822
|
-
module.exports = require_browser2();
|
|
44823
|
-
} else {
|
|
44824
|
-
module.exports = require_node4();
|
|
44825
|
-
}
|
|
44826
|
-
});
|
|
44827
|
-
|
|
44828
44941
|
// ../../node_modules/ioredis/built/utils/debug.js
|
|
44829
44942
|
var require_debug2 = __commonJS(function(exports) {
|
|
44830
44943
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44831
44944
|
exports.genRedactedString = exports.getStringValue = exports.MAX_ARGUMENT_LENGTH = undefined;
|
|
44832
|
-
var debug_1 =
|
|
44945
|
+
var debug_1 = require_src();
|
|
44833
44946
|
var MAX_ARGUMENT_LENGTH = 200;
|
|
44834
44947
|
exports.MAX_ARGUMENT_LENGTH = MAX_ARGUMENT_LENGTH;
|
|
44835
44948
|
var NAMESPACE_PREFIX = "ioredis";
|
|
@@ -51010,7 +51123,7 @@ var __create3, __getProtoOf3, __defProp3, __getOwnPropNames3, __hasOwnProp3, __t
|
|
|
51010
51123
|
if (canCache)
|
|
51011
51124
|
cache.set(mod, to);
|
|
51012
51125
|
return to;
|
|
51013
|
-
}, __commonJS3 = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports), __require3, require_ms4, require_common4, require_browser3, require_node5, require_src3, require_commands3, require_built7, require_utils5, require_built22, require_old3, require_modern4, require_redis_errors3, require_lib4, require_defaults5, require_isArguments3, require_lodash4, require_debug3, require_TLSProfiles3, require_utils23, require_argumentParsers3, require_Command3, require_ClusterAllFailedError3, require_ScanStream3, require_autoPipelining3, require_Script3, require_Commander3, require_Pipeline3, require_tracing3, require_transaction3, require_applyMixin3, require_ClusterOptions3, require_util5, require_ClusterSubscriber3, require_ConnectionPool3, require_denque3, require_DelayQueue3, require_ShardedSubscriber3, require_ClusterSubscriberGroup3, require_cluster3, require_AbstractConnector3, require_StandaloneConnector3, require_SentinelIterator3, require_FailoverDetector3, require_SentinelConnector3, require_connectors3, require_MaxRetriesPerRequestError3, require_errors7, require_parser3, require_SubscriptionSet3, require_DataHandler3, require_event_handler3, require_RedisOptions3, require_Redis3, require_built32,
|
|
51126
|
+
}, __commonJS3 = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports), __require3, require_ms4, require_common4, require_browser3, require_node5, require_src3, require_commands3, require_built7, require_utils5, require_built22, require_old3, require_modern4, require_redis_errors3, require_lib4, require_defaults5, require_isArguments3, require_lodash4, require_debug3, require_TLSProfiles3, require_utils23, require_argumentParsers3, require_Command3, require_ClusterAllFailedError3, require_ScanStream3, require_autoPipelining3, require_Script3, require_Commander3, require_Pipeline3, require_tracing3, require_transaction3, require_applyMixin3, require_ClusterOptions3, require_util5, require_ClusterSubscriber3, require_ConnectionPool3, require_denque3, require_DelayQueue3, require_ShardedSubscriber3, require_ClusterSubscriberGroup3, require_cluster3, require_AbstractConnector3, require_StandaloneConnector3, require_SentinelIterator3, require_FailoverDetector3, require_SentinelConnector3, require_connectors3, require_MaxRetriesPerRequestError3, require_errors7, require_parser3, require_SubscriptionSet3, require_DataHandler3, require_event_handler3, require_RedisOptions3, require_Redis3, require_built32, import_debug3, import_ioredis2, ALGORITHM2 = "aes-256-gcm", IV_LENGTH2 = 16, AUTH_TAG_LENGTH = 16, log2, SecureStoreError, ConnectionError, EncryptionError, ValidationError;
|
|
51014
51127
|
var init_dist = __esm(() => {
|
|
51015
51128
|
__create3 = Object.create;
|
|
51016
51129
|
__getProtoOf3 = Object.getPrototypeOf;
|
|
@@ -61121,9 +61234,9 @@ $` + Buffer.byteLength(this.name) + `\r
|
|
|
61121
61234
|
}
|
|
61122
61235
|
exports.print = print;
|
|
61123
61236
|
});
|
|
61124
|
-
|
|
61237
|
+
import_debug3 = __toESM3(require_src3(), 1);
|
|
61125
61238
|
import_ioredis2 = __toESM3(require_built32(), 1);
|
|
61126
|
-
log2 =
|
|
61239
|
+
log2 = import_debug3.default("secure-store-redis");
|
|
61127
61240
|
SecureStoreError = class SecureStoreError extends Error {
|
|
61128
61241
|
code;
|
|
61129
61242
|
constructor(message, code) {
|
|
@@ -65769,7 +65882,7 @@ var require_lodash7 = __commonJS(function(exports) {
|
|
|
65769
65882
|
var require_debug4 = __commonJS(function(exports) {
|
|
65770
65883
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65771
65884
|
exports.genRedactedString = exports.getStringValue = exports.MAX_ARGUMENT_LENGTH = undefined;
|
|
65772
|
-
var debug_1 =
|
|
65885
|
+
var debug_1 = require_src();
|
|
65773
65886
|
var MAX_ARGUMENT_LENGTH = 200;
|
|
65774
65887
|
exports.MAX_ARGUMENT_LENGTH = MAX_ARGUMENT_LENGTH;
|
|
65775
65888
|
var NAMESPACE_PREFIX = "ioredis";
|
|
@@ -98626,6 +98739,10 @@ function createCorsMiddleware(getConfig) {
|
|
|
98626
98739
|
const allowedOrigins = parseCorsOrigins(getConfig("sockethub:cors:origin"));
|
|
98627
98740
|
return (req, res, next) => {
|
|
98628
98741
|
const allowOrigin = resolveAllowedOrigin(allowedOrigins, req.headers.origin);
|
|
98742
|
+
if (req.headers.origin !== undefined && allowOrigin === undefined) {
|
|
98743
|
+
res.status(403).json({ error: "origin not allowed" });
|
|
98744
|
+
return;
|
|
98745
|
+
}
|
|
98629
98746
|
if (allowOrigin) {
|
|
98630
98747
|
res.setHeader("Access-Control-Allow-Origin", allowOrigin);
|
|
98631
98748
|
if (allowOrigin !== "*") {
|
|
@@ -98975,7 +99092,7 @@ var require_package2 = __commonJS(function(exports, module) {
|
|
|
98975
99092
|
module.exports = {
|
|
98976
99093
|
name: "@sockethub/server",
|
|
98977
99094
|
description: "A polyglot messaging service, server libraries",
|
|
98978
|
-
version: "5.0.0-beta.
|
|
99095
|
+
version: "5.0.0-beta.2",
|
|
98979
99096
|
type: "module",
|
|
98980
99097
|
private: false,
|
|
98981
99098
|
author: "Nick Jennings <nick@silverbucket.net>",
|
|
@@ -99000,7 +99117,7 @@ var require_package2 = __commonJS(function(exports, module) {
|
|
|
99000
99117
|
bin: "bin/sockethub",
|
|
99001
99118
|
preferGlobal: true,
|
|
99002
99119
|
engines: {
|
|
99003
|
-
node: ">=20"
|
|
99120
|
+
node: ">=20.19"
|
|
99004
99121
|
},
|
|
99005
99122
|
keywords: [
|
|
99006
99123
|
"sockethub",
|
|
@@ -99027,17 +99144,19 @@ var require_package2 = __commonJS(function(exports, module) {
|
|
|
99027
99144
|
dependencies: {
|
|
99028
99145
|
"@sentry/node": "^10.36.0",
|
|
99029
99146
|
"@sentry/profiling-node": "10.36.0",
|
|
99030
|
-
"@sockethub/client": "^5.0.0-beta.
|
|
99031
|
-
"@sockethub/data-layer": "^1.0.0-beta.
|
|
99032
|
-
"@sockethub/logger": "^1.0.0-beta.
|
|
99033
|
-
"@sockethub/schemas": "^3.0.0-beta.
|
|
99034
|
-
"@sockethub/util": "^1.0.0-beta.
|
|
99147
|
+
"@sockethub/client": "^5.0.0-beta.2",
|
|
99148
|
+
"@sockethub/data-layer": "^1.0.0-beta.2",
|
|
99149
|
+
"@sockethub/logger": "^1.0.0-beta.2",
|
|
99150
|
+
"@sockethub/schemas": "^3.0.0-beta.2",
|
|
99151
|
+
"@sockethub/util": "^1.0.0-beta.2",
|
|
99035
99152
|
chalk: "^5.6.2",
|
|
99036
99153
|
convict: "^6.2.5",
|
|
99154
|
+
debug: "^4.4.3",
|
|
99037
99155
|
ejs: "^3.1.10",
|
|
99038
99156
|
express: "^5.1.0",
|
|
99039
99157
|
"express-rate-limit": "^8.2.1",
|
|
99040
99158
|
jquery: "^3.7.1",
|
|
99159
|
+
"proxy-addr": "^2.0.7",
|
|
99041
99160
|
"rate-limit-redis": "^4.2.0",
|
|
99042
99161
|
"socket.io": "^4.8.3"
|
|
99043
99162
|
},
|
|
@@ -99056,22 +99175,26 @@ var require_package2 = __commonJS(function(exports, module) {
|
|
|
99056
99175
|
"@types/debug": "^4.1.12",
|
|
99057
99176
|
"@types/express": "^5.0.0",
|
|
99058
99177
|
"@types/jquery": "^3.5.33",
|
|
99178
|
+
"@types/proxy-addr": "^2.0.3",
|
|
99059
99179
|
"@types/sinon": "^17.0.4",
|
|
99060
99180
|
jaribu: "^2.2.3",
|
|
99061
99181
|
sinon: "^17.0.2",
|
|
99062
99182
|
"web-streams-polyfill": "^3.3.3"
|
|
99063
99183
|
},
|
|
99064
99184
|
optionalDependencies: {
|
|
99065
|
-
"@sockethub/examples": "^1.0.0-beta.
|
|
99066
|
-
"@sockethub/platform-caldav": "^1.0.0-beta.
|
|
99067
|
-
"@sockethub/platform-carddav": "^1.0.0-beta.
|
|
99068
|
-
"@sockethub/platform-dummy": "^3.0.0-beta.
|
|
99069
|
-
"@sockethub/platform-
|
|
99070
|
-
"@sockethub/platform-
|
|
99071
|
-
"@sockethub/platform-
|
|
99072
|
-
"@sockethub/platform-
|
|
99073
|
-
|
|
99074
|
-
|
|
99185
|
+
"@sockethub/examples": "^1.0.0-beta.2",
|
|
99186
|
+
"@sockethub/platform-caldav": "^1.0.0-beta.2",
|
|
99187
|
+
"@sockethub/platform-carddav": "^1.0.0-beta.2",
|
|
99188
|
+
"@sockethub/platform-dummy": "^3.0.0-beta.2",
|
|
99189
|
+
"@sockethub/platform-email": "^1.0.0-beta.2",
|
|
99190
|
+
"@sockethub/platform-feeds": "^4.0.0-beta.2",
|
|
99191
|
+
"@sockethub/platform-instagram": "^1.0.0-beta.2",
|
|
99192
|
+
"@sockethub/platform-irc": "^4.0.0-beta.2",
|
|
99193
|
+
"@sockethub/platform-messenger": "^1.0.0-beta.2",
|
|
99194
|
+
"@sockethub/platform-metadata": "^1.0.1-beta.2",
|
|
99195
|
+
"@sockethub/platform-xmpp": "^5.0.0-beta.2"
|
|
99196
|
+
},
|
|
99197
|
+
gitHead: "1f74d4e07311496f0acc021855137bc197d79eab",
|
|
99075
99198
|
types: "./dist/index.d.ts"
|
|
99076
99199
|
};
|
|
99077
99200
|
});
|
|
@@ -100015,7 +100138,7 @@ var require_safer = __commonJS(function(exports, module) {
|
|
|
100015
100138
|
module.exports = safer;
|
|
100016
100139
|
});
|
|
100017
100140
|
|
|
100018
|
-
// ../../node_modules/iconv-lite/lib/bom-handling.js
|
|
100141
|
+
// ../../node_modules/express/node_modules/body-parser/node_modules/iconv-lite/lib/bom-handling.js
|
|
100019
100142
|
var require_bom_handling = __commonJS(function(exports) {
|
|
100020
100143
|
var BOMChar = "\uFEFF";
|
|
100021
100144
|
exports.PrependBOM = PrependBOMWrapper;
|
|
@@ -100058,7 +100181,7 @@ var require_bom_handling = __commonJS(function(exports) {
|
|
|
100058
100181
|
};
|
|
100059
100182
|
});
|
|
100060
100183
|
|
|
100061
|
-
// ../../node_modules/iconv-lite/lib/helpers/merge-exports.js
|
|
100184
|
+
// ../../node_modules/express/node_modules/body-parser/node_modules/iconv-lite/lib/helpers/merge-exports.js
|
|
100062
100185
|
var require_merge_exports = __commonJS(function(exports, module) {
|
|
100063
100186
|
var hasOwn = typeof Object.hasOwn === "undefined" ? Function.call.bind(Object.prototype.hasOwnProperty) : Object.hasOwn;
|
|
100064
100187
|
function mergeModules(target, module2) {
|
|
@@ -100071,7 +100194,7 @@ var require_merge_exports = __commonJS(function(exports, module) {
|
|
|
100071
100194
|
module.exports = mergeModules;
|
|
100072
100195
|
});
|
|
100073
100196
|
|
|
100074
|
-
// ../../node_modules/iconv-lite/encodings/internal.js
|
|
100197
|
+
// ../../node_modules/express/node_modules/body-parser/node_modules/iconv-lite/encodings/internal.js
|
|
100075
100198
|
var require_internal = __commonJS(function(exports, module) {
|
|
100076
100199
|
var Buffer2 = require_safer().Buffer;
|
|
100077
100200
|
module.exports = {
|
|
@@ -100244,7 +100367,7 @@ var require_internal = __commonJS(function(exports, module) {
|
|
|
100244
100367
|
};
|
|
100245
100368
|
});
|
|
100246
100369
|
|
|
100247
|
-
// ../../node_modules/iconv-lite/encodings/utf32.js
|
|
100370
|
+
// ../../node_modules/express/node_modules/body-parser/node_modules/iconv-lite/encodings/utf32.js
|
|
100248
100371
|
var require_utf32 = __commonJS(function(exports) {
|
|
100249
100372
|
var Buffer2 = require_safer().Buffer;
|
|
100250
100373
|
exports._utf32 = Utf32Codec;
|
|
@@ -100478,7 +100601,7 @@ var require_utf32 = __commonJS(function(exports) {
|
|
|
100478
100601
|
}
|
|
100479
100602
|
});
|
|
100480
100603
|
|
|
100481
|
-
// ../../node_modules/iconv-lite/encodings/utf16.js
|
|
100604
|
+
// ../../node_modules/express/node_modules/body-parser/node_modules/iconv-lite/encodings/utf16.js
|
|
100482
100605
|
var require_utf16 = __commonJS(function(exports) {
|
|
100483
100606
|
var Buffer2 = require_safer().Buffer;
|
|
100484
100607
|
exports.utf16be = Utf16BECodec;
|
|
@@ -100621,7 +100744,7 @@ var require_utf16 = __commonJS(function(exports) {
|
|
|
100621
100744
|
}
|
|
100622
100745
|
});
|
|
100623
100746
|
|
|
100624
|
-
// ../../node_modules/iconv-lite/encodings/utf7.js
|
|
100747
|
+
// ../../node_modules/express/node_modules/body-parser/node_modules/iconv-lite/encodings/utf7.js
|
|
100625
100748
|
var require_utf7 = __commonJS(function(exports) {
|
|
100626
100749
|
var Buffer2 = require_safer().Buffer;
|
|
100627
100750
|
exports.utf7 = Utf7Codec;
|
|
@@ -100835,7 +100958,7 @@ var require_utf7 = __commonJS(function(exports) {
|
|
|
100835
100958
|
};
|
|
100836
100959
|
});
|
|
100837
100960
|
|
|
100838
|
-
// ../../node_modules/iconv-lite/encodings/sbcs-codec.js
|
|
100961
|
+
// ../../node_modules/express/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-codec.js
|
|
100839
100962
|
var require_sbcs_codec = __commonJS(function(exports) {
|
|
100840
100963
|
var Buffer2 = require_safer().Buffer;
|
|
100841
100964
|
exports._sbcs = SBCSCodec;
|
|
@@ -100892,7 +101015,7 @@ var require_sbcs_codec = __commonJS(function(exports) {
|
|
|
100892
101015
|
SBCSDecoder.prototype.end = function() {};
|
|
100893
101016
|
});
|
|
100894
101017
|
|
|
100895
|
-
// ../../node_modules/iconv-lite/encodings/sbcs-data.js
|
|
101018
|
+
// ../../node_modules/express/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-data.js
|
|
100896
101019
|
var require_sbcs_data = __commonJS(function(exports, module) {
|
|
100897
101020
|
module.exports = {
|
|
100898
101021
|
10029: "maccenteuro",
|
|
@@ -101040,7 +101163,7 @@ var require_sbcs_data = __commonJS(function(exports, module) {
|
|
|
101040
101163
|
};
|
|
101041
101164
|
});
|
|
101042
101165
|
|
|
101043
|
-
// ../../node_modules/iconv-lite/encodings/sbcs-data-generated.js
|
|
101166
|
+
// ../../node_modules/express/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-data-generated.js
|
|
101044
101167
|
var require_sbcs_data_generated = __commonJS(function(exports, module) {
|
|
101045
101168
|
module.exports = {
|
|
101046
101169
|
"437": "cp437",
|
|
@@ -101497,7 +101620,7 @@ var require_sbcs_data_generated = __commonJS(function(exports, module) {
|
|
|
101497
101620
|
};
|
|
101498
101621
|
});
|
|
101499
101622
|
|
|
101500
|
-
// ../../node_modules/iconv-lite/encodings/dbcs-codec.js
|
|
101623
|
+
// ../../node_modules/express/node_modules/body-parser/node_modules/iconv-lite/encodings/dbcs-codec.js
|
|
101501
101624
|
var require_dbcs_codec = __commonJS(function(exports) {
|
|
101502
101625
|
var Buffer2 = require_safer().Buffer;
|
|
101503
101626
|
exports._dbcs = DBCSCodec;
|
|
@@ -101955,7 +102078,7 @@ var require_dbcs_codec = __commonJS(function(exports) {
|
|
|
101955
102078
|
}
|
|
101956
102079
|
});
|
|
101957
102080
|
|
|
101958
|
-
// ../../node_modules/iconv-lite/encodings/tables/shiftjis.json
|
|
102081
|
+
// ../../node_modules/express/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/shiftjis.json
|
|
101959
102082
|
var require_shiftjis = __commonJS(function(exports, module) {
|
|
101960
102083
|
module.exports = [
|
|
101961
102084
|
["0", "\x00", 128],
|
|
@@ -102084,7 +102207,7 @@ var require_shiftjis = __commonJS(function(exports, module) {
|
|
|
102084
102207
|
];
|
|
102085
102208
|
});
|
|
102086
102209
|
|
|
102087
|
-
// ../../node_modules/iconv-lite/encodings/tables/eucjp.json
|
|
102210
|
+
// ../../node_modules/express/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/eucjp.json
|
|
102088
102211
|
var require_eucjp = __commonJS(function(exports, module) {
|
|
102089
102212
|
module.exports = [
|
|
102090
102213
|
["0", "\x00", 127],
|
|
@@ -102270,7 +102393,7 @@ var require_eucjp = __commonJS(function(exports, module) {
|
|
|
102270
102393
|
];
|
|
102271
102394
|
});
|
|
102272
102395
|
|
|
102273
|
-
// ../../node_modules/iconv-lite/encodings/tables/cp936.json
|
|
102396
|
+
// ../../node_modules/express/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp936.json
|
|
102274
102397
|
var require_cp936 = __commonJS(function(exports, module) {
|
|
102275
102398
|
module.exports = [
|
|
102276
102399
|
["0", "\x00", 127, "€"],
|
|
@@ -102538,7 +102661,7 @@ var require_cp936 = __commonJS(function(exports, module) {
|
|
|
102538
102661
|
];
|
|
102539
102662
|
});
|
|
102540
102663
|
|
|
102541
|
-
// ../../node_modules/iconv-lite/encodings/tables/gbk-added.json
|
|
102664
|
+
// ../../node_modules/express/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/gbk-added.json
|
|
102542
102665
|
var require_gbk_added = __commonJS(function(exports, module) {
|
|
102543
102666
|
module.exports = [
|
|
102544
102667
|
["a140", "", 62],
|
|
@@ -102598,12 +102721,12 @@ var require_gbk_added = __commonJS(function(exports, module) {
|
|
|
102598
102721
|
];
|
|
102599
102722
|
});
|
|
102600
102723
|
|
|
102601
|
-
// ../../node_modules/iconv-lite/encodings/tables/gb18030-ranges.json
|
|
102724
|
+
// ../../node_modules/express/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json
|
|
102602
102725
|
var require_gb18030_ranges = __commonJS(function(exports, module) {
|
|
102603
102726
|
module.exports = { uChars: [128, 165, 169, 178, 184, 216, 226, 235, 238, 244, 248, 251, 253, 258, 276, 284, 300, 325, 329, 334, 364, 463, 465, 467, 469, 471, 473, 475, 477, 506, 594, 610, 712, 716, 730, 930, 938, 962, 970, 1026, 1104, 1106, 8209, 8215, 8218, 8222, 8231, 8241, 8244, 8246, 8252, 8365, 8452, 8454, 8458, 8471, 8482, 8556, 8570, 8596, 8602, 8713, 8720, 8722, 8726, 8731, 8737, 8740, 8742, 8748, 8751, 8760, 8766, 8777, 8781, 8787, 8802, 8808, 8816, 8854, 8858, 8870, 8896, 8979, 9322, 9372, 9548, 9588, 9616, 9622, 9634, 9652, 9662, 9672, 9676, 9680, 9702, 9735, 9738, 9793, 9795, 11906, 11909, 11913, 11917, 11928, 11944, 11947, 11951, 11956, 11960, 11964, 11979, 12284, 12292, 12312, 12319, 12330, 12351, 12436, 12447, 12535, 12543, 12586, 12842, 12850, 12964, 13200, 13215, 13218, 13253, 13263, 13267, 13270, 13384, 13428, 13727, 13839, 13851, 14617, 14703, 14801, 14816, 14964, 15183, 15471, 15585, 16471, 16736, 17208, 17325, 17330, 17374, 17623, 17997, 18018, 18212, 18218, 18301, 18318, 18760, 18811, 18814, 18820, 18823, 18844, 18848, 18872, 19576, 19620, 19738, 19887, 40870, 59244, 59336, 59367, 59413, 59417, 59423, 59431, 59437, 59443, 59452, 59460, 59478, 59493, 63789, 63866, 63894, 63976, 63986, 64016, 64018, 64021, 64025, 64034, 64037, 64042, 65074, 65093, 65107, 65112, 65127, 65132, 65375, 65510, 65536], gbChars: [0, 36, 38, 45, 50, 81, 89, 95, 96, 100, 103, 104, 105, 109, 126, 133, 148, 172, 175, 179, 208, 306, 307, 308, 309, 310, 311, 312, 313, 341, 428, 443, 544, 545, 558, 741, 742, 749, 750, 805, 819, 820, 7922, 7924, 7925, 7927, 7934, 7943, 7944, 7945, 7950, 8062, 8148, 8149, 8152, 8164, 8174, 8236, 8240, 8262, 8264, 8374, 8380, 8381, 8384, 8388, 8390, 8392, 8393, 8394, 8396, 8401, 8406, 8416, 8419, 8424, 8437, 8439, 8445, 8482, 8485, 8496, 8521, 8603, 8936, 8946, 9046, 9050, 9063, 9066, 9076, 9092, 9100, 9108, 9111, 9113, 9131, 9162, 9164, 9218, 9219, 11329, 11331, 11334, 11336, 11346, 11361, 11363, 11366, 11370, 11372, 11375, 11389, 11682, 11686, 11687, 11692, 11694, 11714, 11716, 11723, 11725, 11730, 11736, 11982, 11989, 12102, 12336, 12348, 12350, 12384, 12393, 12395, 12397, 12510, 12553, 12851, 12962, 12973, 13738, 13823, 13919, 13933, 14080, 14298, 14585, 14698, 15583, 15847, 16318, 16434, 16438, 16481, 16729, 17102, 17122, 17315, 17320, 17402, 17418, 17859, 17909, 17911, 17915, 17916, 17936, 17939, 17961, 18664, 18703, 18814, 18962, 19043, 33469, 33470, 33471, 33484, 33485, 33490, 33497, 33501, 33505, 33513, 33520, 33536, 33550, 37845, 37921, 37948, 38029, 38038, 38064, 38065, 38066, 38069, 38075, 38076, 38078, 39108, 39109, 39113, 39114, 39115, 39116, 39265, 39394, 189000] };
|
|
102604
102727
|
});
|
|
102605
102728
|
|
|
102606
|
-
// ../../node_modules/iconv-lite/encodings/tables/cp949.json
|
|
102729
|
+
// ../../node_modules/express/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp949.json
|
|
102607
102730
|
var require_cp949 = __commonJS(function(exports, module) {
|
|
102608
102731
|
module.exports = [
|
|
102609
102732
|
["0", "\x00", 127],
|
|
@@ -102880,7 +103003,7 @@ var require_cp949 = __commonJS(function(exports, module) {
|
|
|
102880
103003
|
];
|
|
102881
103004
|
});
|
|
102882
103005
|
|
|
102883
|
-
// ../../node_modules/iconv-lite/encodings/tables/cp950.json
|
|
103006
|
+
// ../../node_modules/express/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp950.json
|
|
102884
103007
|
var require_cp950 = __commonJS(function(exports, module) {
|
|
102885
103008
|
module.exports = [
|
|
102886
103009
|
["0", "\x00", 127],
|
|
@@ -103061,7 +103184,7 @@ var require_cp950 = __commonJS(function(exports, module) {
|
|
|
103061
103184
|
];
|
|
103062
103185
|
});
|
|
103063
103186
|
|
|
103064
|
-
// ../../node_modules/iconv-lite/encodings/tables/big5-added.json
|
|
103187
|
+
// ../../node_modules/express/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/big5-added.json
|
|
103065
103188
|
var require_big5_added = __commonJS(function(exports, module) {
|
|
103066
103189
|
module.exports = [
|
|
103067
103190
|
["8740", "䏰䰲䘃䖦䕸𧉧䵷䖳𧲱䳢𧳅㮕䜶䝄䱇䱀𤊿𣘗𧍒𦺋𧃒䱗𪍑䝏䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡晍囻"],
|
|
@@ -103187,7 +103310,7 @@ var require_big5_added = __commonJS(function(exports, module) {
|
|
|
103187
103310
|
];
|
|
103188
103311
|
});
|
|
103189
103312
|
|
|
103190
|
-
// ../../node_modules/iconv-lite/encodings/dbcs-data.js
|
|
103313
|
+
// ../../node_modules/express/node_modules/body-parser/node_modules/iconv-lite/encodings/dbcs-data.js
|
|
103191
103314
|
var require_dbcs_data = __commonJS(function(exports, module) {
|
|
103192
103315
|
module.exports = {
|
|
103193
103316
|
shiftjis: {
|
|
@@ -103358,7 +103481,7 @@ var require_dbcs_data = __commonJS(function(exports, module) {
|
|
|
103358
103481
|
};
|
|
103359
103482
|
});
|
|
103360
103483
|
|
|
103361
|
-
// ../../node_modules/iconv-lite/encodings/index.js
|
|
103484
|
+
// ../../node_modules/express/node_modules/body-parser/node_modules/iconv-lite/encodings/index.js
|
|
103362
103485
|
var require_encodings = __commonJS(function(exports, module) {
|
|
103363
103486
|
var mergeModules = require_merge_exports();
|
|
103364
103487
|
var modules = [
|
|
@@ -103380,7 +103503,7 @@ var require_encodings = __commonJS(function(exports, module) {
|
|
|
103380
103503
|
var i;
|
|
103381
103504
|
});
|
|
103382
103505
|
|
|
103383
|
-
// ../../node_modules/iconv-lite/lib/streams.js
|
|
103506
|
+
// ../../node_modules/express/node_modules/body-parser/node_modules/iconv-lite/lib/streams.js
|
|
103384
103507
|
var require_streams = __commonJS(function(exports, module) {
|
|
103385
103508
|
var Buffer2 = require_safer().Buffer;
|
|
103386
103509
|
module.exports = function(streamModule) {
|
|
@@ -103478,7 +103601,7 @@ var require_streams = __commonJS(function(exports, module) {
|
|
|
103478
103601
|
};
|
|
103479
103602
|
});
|
|
103480
103603
|
|
|
103481
|
-
// ../../node_modules/iconv-lite/lib/index.js
|
|
103604
|
+
// ../../node_modules/express/node_modules/body-parser/node_modules/iconv-lite/lib/index.js
|
|
103482
103605
|
var require_lib6 = __commonJS(function(exports, module) {
|
|
103483
103606
|
var Buffer2 = require_safer().Buffer;
|
|
103484
103607
|
var bomHandling = require_bom_handling();
|
|
@@ -114153,7 +114276,7 @@ var require_json2 = __commonJS(function(exports, module) {
|
|
|
114153
114276
|
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
114154
114277
|
* MIT Licensed
|
|
114155
114278
|
*/
|
|
114156
|
-
var debug =
|
|
114279
|
+
var debug = require_src()("body-parser:json");
|
|
114157
114280
|
var read = require_read();
|
|
114158
114281
|
var { normalizeOptions } = require_utils8();
|
|
114159
114282
|
module.exports = json;
|
|
@@ -114253,7 +114376,7 @@ var require_raw = __commonJS(function(exports, module) {
|
|
|
114253
114376
|
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
114254
114377
|
* MIT Licensed
|
|
114255
114378
|
*/
|
|
114256
|
-
var debug =
|
|
114379
|
+
var debug = require_src()("body-parser:raw");
|
|
114257
114380
|
var read = require_read();
|
|
114258
114381
|
var { normalizeOptions, passthrough } = require_utils8();
|
|
114259
114382
|
module.exports = raw;
|
|
@@ -114276,7 +114399,7 @@ var require_text = __commonJS(function(exports, module) {
|
|
|
114276
114399
|
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
114277
114400
|
* MIT Licensed
|
|
114278
114401
|
*/
|
|
114279
|
-
var debug =
|
|
114402
|
+
var debug = require_src()("body-parser:text");
|
|
114280
114403
|
var read = require_read();
|
|
114281
114404
|
var { normalizeOptions, passthrough } = require_utils8();
|
|
114282
114405
|
module.exports = text;
|
|
@@ -116642,7 +116765,7 @@ var require_urlencoded = __commonJS(function(exports, module) {
|
|
|
116642
116765
|
* MIT Licensed
|
|
116643
116766
|
*/
|
|
116644
116767
|
var createError = require_http_errors();
|
|
116645
|
-
var debug =
|
|
116768
|
+
var debug = require_src()("body-parser:urlencoded");
|
|
116646
116769
|
var read = require_read();
|
|
116647
116770
|
var qs = require_lib7();
|
|
116648
116771
|
var { normalizeOptions } = require_utils8();
|
|
@@ -116916,7 +117039,7 @@ var require_finalhandler = __commonJS(function(exports, module) {
|
|
|
116916
117039
|
* Copyright(c) 2014-2022 Douglas Christopher Wilson
|
|
116917
117040
|
* MIT Licensed
|
|
116918
117041
|
*/
|
|
116919
|
-
var debug =
|
|
117042
|
+
var debug = require_src()("finalhandler");
|
|
116920
117043
|
var encodeUrl = require_encodeurl();
|
|
116921
117044
|
var escapeHtml = require_escape_html();
|
|
116922
117045
|
var onFinished = require_on_finished();
|
|
@@ -117058,7 +117181,7 @@ var require_view = __commonJS(function(exports, module) {
|
|
|
117058
117181
|
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
117059
117182
|
* MIT Licensed
|
|
117060
117183
|
*/
|
|
117061
|
-
var debug =
|
|
117184
|
+
var debug = require_src()("express:view");
|
|
117062
117185
|
var path = __require("node:path");
|
|
117063
117186
|
var fs = __require("node:fs");
|
|
117064
117187
|
var dirname = path.dirname;
|
|
@@ -119618,7 +119741,7 @@ var require_layer = __commonJS(function(exports, module) {
|
|
|
119618
119741
|
*/
|
|
119619
119742
|
var isPromise = require_is_promise();
|
|
119620
119743
|
var pathRegexp = require_dist4();
|
|
119621
|
-
var debug =
|
|
119744
|
+
var debug = require_src()("router:layer");
|
|
119622
119745
|
var deprecate = require_depd()("router");
|
|
119623
119746
|
var TRAILING_SLASH_REGEXP = /\/+$/;
|
|
119624
119747
|
var MATCHING_GROUP_REGEXP = /\((?:\?<(.*?)>)?(?!\?)/g;
|
|
@@ -119769,7 +119892,7 @@ var require_route = __commonJS(function(exports, module) {
|
|
|
119769
119892
|
* Copyright(c) 2014-2022 Douglas Christopher Wilson
|
|
119770
119893
|
* MIT Licensed
|
|
119771
119894
|
*/
|
|
119772
|
-
var debug =
|
|
119895
|
+
var debug = require_src()("router:route");
|
|
119773
119896
|
var Layer = require_layer();
|
|
119774
119897
|
var { METHODS } = __require("node:http");
|
|
119775
119898
|
var slice = Array.prototype.slice;
|
|
@@ -119897,7 +120020,7 @@ var require_router = __commonJS(function(exports, module) {
|
|
|
119897
120020
|
var { METHODS } = __require("node:http");
|
|
119898
120021
|
var parseUrl = require_parseurl();
|
|
119899
120022
|
var Route = require_route();
|
|
119900
|
-
var debug =
|
|
120023
|
+
var debug = require_src()("router");
|
|
119901
120024
|
var deprecate = require_depd()("router");
|
|
119902
120025
|
var slice = Array.prototype.slice;
|
|
119903
120026
|
var flatten = Array.prototype.flat;
|
|
@@ -120295,7 +120418,7 @@ var require_application = __commonJS(function(exports, module) {
|
|
|
120295
120418
|
* MIT Licensed
|
|
120296
120419
|
*/
|
|
120297
120420
|
var finalhandler = require_finalhandler();
|
|
120298
|
-
var debug =
|
|
120421
|
+
var debug = require_src()("express:application");
|
|
120299
120422
|
var View = require_view();
|
|
120300
120423
|
var http = __require("node:http");
|
|
120301
120424
|
var methods = require_utils11().methods;
|
|
@@ -121875,7 +121998,7 @@ var require_send = __commonJS(function(exports, module) {
|
|
|
121875
121998
|
* MIT Licensed
|
|
121876
121999
|
*/
|
|
121877
122000
|
var createError = require_http_errors();
|
|
121878
|
-
var debug =
|
|
122001
|
+
var debug = require_src()("send");
|
|
121879
122002
|
var encodeUrl = require_encodeurl();
|
|
121880
122003
|
var escapeHtml = require_escape_html();
|
|
121881
122004
|
var etag = require_etag();
|
|
@@ -133084,7 +133207,7 @@ var require_transport = __commonJS(function(exports) {
|
|
|
133084
133207
|
var events_1 = __require("events");
|
|
133085
133208
|
var parser_v4 = require_cjs3();
|
|
133086
133209
|
var parser_v3 = require_parser_v3();
|
|
133087
|
-
var debug_1 =
|
|
133210
|
+
var debug_1 = require_src();
|
|
133088
133211
|
var debug = (0, debug_1.default)("engine:transport");
|
|
133089
133212
|
function noop() {}
|
|
133090
133213
|
|
|
@@ -142344,7 +142467,7 @@ var require_polling = __commonJS(function(exports) {
|
|
|
142344
142467
|
var transport_1 = require_transport();
|
|
142345
142468
|
var zlib_1 = __require("zlib");
|
|
142346
142469
|
var accepts = require_accepts3();
|
|
142347
|
-
var debug_1 =
|
|
142470
|
+
var debug_1 = require_src();
|
|
142348
142471
|
var debug = (0, debug_1.default)("engine:polling");
|
|
142349
142472
|
var compressionMethods = {
|
|
142350
142473
|
gzip: zlib_1.createGzip,
|
|
@@ -142627,7 +142750,7 @@ var require_websocket = __commonJS(function(exports) {
|
|
|
142627
142750
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
142628
142751
|
exports.WebSocket = undefined;
|
|
142629
142752
|
var transport_1 = require_transport();
|
|
142630
|
-
var debug_1 =
|
|
142753
|
+
var debug_1 = require_src();
|
|
142631
142754
|
var debug = (0, debug_1.default)("engine:ws");
|
|
142632
142755
|
|
|
142633
142756
|
class WebSocket extends transport_1.Transport {
|
|
@@ -142700,7 +142823,7 @@ var require_webtransport = __commonJS(function(exports) {
|
|
|
142700
142823
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
142701
142824
|
exports.WebTransport = undefined;
|
|
142702
142825
|
var transport_1 = require_transport();
|
|
142703
|
-
var debug_1 =
|
|
142826
|
+
var debug_1 = require_src();
|
|
142704
142827
|
var engine_io_parser_1 = require_cjs3();
|
|
142705
142828
|
var debug = (0, debug_1.default)("engine:webtransport");
|
|
142706
142829
|
|
|
@@ -142784,7 +142907,7 @@ var require_socket = __commonJS(function(exports) {
|
|
|
142784
142907
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
142785
142908
|
exports.Socket = undefined;
|
|
142786
142909
|
var events_1 = __require("events");
|
|
142787
|
-
var debug_1 =
|
|
142910
|
+
var debug_1 = require_src();
|
|
142788
142911
|
var timers_1 = __require("timers");
|
|
142789
142912
|
var debug = (0, debug_1.default)("engine:socket");
|
|
142790
142913
|
|
|
@@ -146709,7 +146832,7 @@ var require_server = __commonJS(function(exports) {
|
|
|
146709
146832
|
var transports_1 = require_transports2();
|
|
146710
146833
|
var events_1 = __require("events");
|
|
146711
146834
|
var socket_1 = require_socket();
|
|
146712
|
-
var debug_1 =
|
|
146835
|
+
var debug_1 = require_src();
|
|
146713
146836
|
var cookie_1 = require_cookie2();
|
|
146714
146837
|
var ws_1 = require_ws();
|
|
146715
146838
|
var webtransport_1 = require_webtransport();
|
|
@@ -147572,7 +147695,7 @@ var require_polling2 = __commonJS(function(exports) {
|
|
|
147572
147695
|
var transport_1 = require_transport();
|
|
147573
147696
|
var zlib_1 = __require("zlib");
|
|
147574
147697
|
var accepts = require_accepts3();
|
|
147575
|
-
var debug_1 =
|
|
147698
|
+
var debug_1 = require_src();
|
|
147576
147699
|
var debug = (0, debug_1.default)("engine:polling");
|
|
147577
147700
|
var compressionMethods = {
|
|
147578
147701
|
gzip: zlib_1.createGzip,
|
|
@@ -147843,7 +147966,7 @@ var require_websocket3 = __commonJS(function(exports) {
|
|
|
147843
147966
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
147844
147967
|
exports.WebSocket = undefined;
|
|
147845
147968
|
var transport_1 = require_transport();
|
|
147846
|
-
var debug_1 =
|
|
147969
|
+
var debug_1 = require_src();
|
|
147847
147970
|
var debug = (0, debug_1.default)("engine:ws");
|
|
147848
147971
|
|
|
147849
147972
|
class WebSocket extends transport_1.Transport {
|
|
@@ -147905,7 +148028,7 @@ var require_transports_uws = __commonJS(function(exports) {
|
|
|
147905
148028
|
var require_userver = __commonJS(function(exports) {
|
|
147906
148029
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
147907
148030
|
exports.uServer = undefined;
|
|
147908
|
-
var debug_1 =
|
|
148031
|
+
var debug_1 = require_src();
|
|
147909
148032
|
var server_1 = require_server();
|
|
147910
148033
|
var transports_uws_1 = require_transports_uws();
|
|
147911
148034
|
var debug = (0, debug_1.default)("engine:uws");
|
|
@@ -149230,7 +149353,7 @@ var require_client = __commonJS(function(exports) {
|
|
|
149230
149353
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
149231
149354
|
exports.Client = undefined;
|
|
149232
149355
|
var socket_io_parser_1 = require_cjs5();
|
|
149233
|
-
var debug_1 = __importDefault(
|
|
149356
|
+
var debug_1 = __importDefault(require_src());
|
|
149234
149357
|
var debug = (0, debug_1.default)("socket.io:client");
|
|
149235
149358
|
|
|
149236
149359
|
class Client {
|
|
@@ -149649,7 +149772,7 @@ var require_socket2 = __commonJS(function(exports) {
|
|
|
149649
149772
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
149650
149773
|
exports.Socket = undefined;
|
|
149651
149774
|
var socket_io_parser_1 = require_cjs5();
|
|
149652
|
-
var debug_1 = __importDefault(
|
|
149775
|
+
var debug_1 = __importDefault(require_src());
|
|
149653
149776
|
var typed_events_1 = require_typed_events();
|
|
149654
149777
|
var base64id_1 = __importDefault(require_base64id());
|
|
149655
149778
|
var broadcast_operator_1 = require_broadcast_operator();
|
|
@@ -150078,7 +150201,7 @@ var require_namespace = __commonJS(function(exports) {
|
|
|
150078
150201
|
exports.Namespace = exports.RESERVED_EVENTS = undefined;
|
|
150079
150202
|
var socket_1 = require_socket2();
|
|
150080
150203
|
var typed_events_1 = require_typed_events();
|
|
150081
|
-
var debug_1 = __importDefault(
|
|
150204
|
+
var debug_1 = __importDefault(require_src());
|
|
150082
150205
|
var broadcast_operator_1 = require_broadcast_operator();
|
|
150083
150206
|
var debug = (0, debug_1.default)("socket.io:namespace");
|
|
150084
150207
|
exports.RESERVED_EVENTS = new Set(["connect", "connection", "new_namespace"]);
|
|
@@ -154595,7 +154718,7 @@ var require_parent_namespace = __commonJS(function(exports) {
|
|
|
154595
154718
|
exports.ParentNamespace = undefined;
|
|
154596
154719
|
var namespace_1 = require_namespace();
|
|
154597
154720
|
var socket_io_adapter_1 = require_dist5();
|
|
154598
|
-
var debug_1 = __importDefault(
|
|
154721
|
+
var debug_1 = __importDefault(require_src());
|
|
154599
154722
|
var debug = (0, debug_1.default)("socket.io:parent-namespace");
|
|
154600
154723
|
|
|
154601
154724
|
class ParentNamespace extends namespace_1.Namespace {
|
|
@@ -154662,7 +154785,7 @@ var require_uws = __commonJS(function(exports) {
|
|
|
154662
154785
|
exports.serveFile = serveFile;
|
|
154663
154786
|
var socket_io_adapter_1 = require_dist5();
|
|
154664
154787
|
var fs_1 = __require("fs");
|
|
154665
|
-
var debug_1 = __importDefault(
|
|
154788
|
+
var debug_1 = __importDefault(require_src());
|
|
154666
154789
|
var debug = (0, debug_1.default)("socket.io:adapter-uws");
|
|
154667
154790
|
var SEPARATOR = "\x1F";
|
|
154668
154791
|
var { addAll, del, broadcast } = socket_io_adapter_1.Adapter.prototype;
|
|
@@ -154925,7 +155048,7 @@ var require_dist6 = __commonJS(function(exports, module) {
|
|
|
154925
155048
|
var parent_namespace_1 = require_parent_namespace();
|
|
154926
155049
|
var socket_io_adapter_1 = require_dist5();
|
|
154927
155050
|
var parser = __importStar(require_cjs5());
|
|
154928
|
-
var debug_1 = __importDefault(
|
|
155051
|
+
var debug_1 = __importDefault(require_src());
|
|
154929
155052
|
var socket_1 = require_socket2();
|
|
154930
155053
|
Object.defineProperty(exports, "Socket", { enumerable: true, get: function() {
|
|
154931
155054
|
return socket_1.Socket;
|
|
@@ -155368,6 +155491,30 @@ var init_routes = __esm(() => {
|
|
|
155368
155491
|
});
|
|
155369
155492
|
|
|
155370
155493
|
// src/trust-proxy.ts
|
|
155494
|
+
function configuredProxyHeader(proxyHeader) {
|
|
155495
|
+
return typeof proxyHeader === "string" && proxyHeader.trim() !== "" ? proxyHeader.trim().toLowerCase() : EXPRESS_FORWARDED_HEADER;
|
|
155496
|
+
}
|
|
155497
|
+
function getRequestClientIp(request, app) {
|
|
155498
|
+
return normalizeIp(import_proxy_addr.default(request, app.get("trust proxy fn")));
|
|
155499
|
+
}
|
|
155500
|
+
function resolveSocketClientIp(request, app, reconnectIpSource, proxyHeader, fallbackAddress) {
|
|
155501
|
+
const header = configuredProxyHeader(proxyHeader);
|
|
155502
|
+
if (reconnectIpSource === "proxy" && header !== EXPRESS_FORWARDED_HEADER) {
|
|
155503
|
+
const value = request.headers[header];
|
|
155504
|
+
const raw = Array.isArray(value) ? value[0] : value;
|
|
155505
|
+
if (typeof raw === "string") {
|
|
155506
|
+
const normalized = normalizeIp(raw);
|
|
155507
|
+
if (normalized) {
|
|
155508
|
+
return normalized;
|
|
155509
|
+
}
|
|
155510
|
+
}
|
|
155511
|
+
return normalizeIp(fallbackAddress);
|
|
155512
|
+
}
|
|
155513
|
+
if (app) {
|
|
155514
|
+
return getRequestClientIp(request, app);
|
|
155515
|
+
}
|
|
155516
|
+
return normalizeIp(fallbackAddress);
|
|
155517
|
+
}
|
|
155371
155518
|
function normalize(value) {
|
|
155372
155519
|
if (typeof value === "boolean" || typeof value === "number") {
|
|
155373
155520
|
return value;
|
|
@@ -155392,10 +155539,14 @@ function resolveTrustProxy(configured, reconnectIpSource, proxyHeader) {
|
|
|
155392
155539
|
if (normalized !== false || reconnectIpSource !== "proxy") {
|
|
155393
155540
|
return normalized;
|
|
155394
155541
|
}
|
|
155395
|
-
const header =
|
|
155542
|
+
const header = configuredProxyHeader(proxyHeader);
|
|
155396
155543
|
return header === EXPRESS_FORWARDED_HEADER ? 1 : false;
|
|
155397
155544
|
}
|
|
155398
|
-
var EXPRESS_FORWARDED_HEADER = "x-forwarded-for";
|
|
155545
|
+
var import_proxy_addr, EXPRESS_FORWARDED_HEADER = "x-forwarded-for";
|
|
155546
|
+
var init_trust_proxy = __esm(() => {
|
|
155547
|
+
init_connection_scope();
|
|
155548
|
+
import_proxy_addr = __toESM(require_proxy_addr(), 1);
|
|
155549
|
+
});
|
|
155399
155550
|
|
|
155400
155551
|
// src/listener.ts
|
|
155401
155552
|
import { existsSync as existsSync2 } from "node:fs";
|
|
@@ -155408,17 +155559,27 @@ class Listener {
|
|
|
155408
155559
|
io;
|
|
155409
155560
|
http;
|
|
155410
155561
|
start() {
|
|
155562
|
+
disablePayloadDebug();
|
|
155411
155563
|
const app = Listener.initExpress();
|
|
155412
155564
|
this.app = app;
|
|
155413
155565
|
this.http = new HTTP.Server(app);
|
|
155566
|
+
const allowedOrigins = Listener.corsOrigin();
|
|
155414
155567
|
this.io = new Server(this.http, {
|
|
155415
155568
|
path: config_default.get("sockethub:path"),
|
|
155416
155569
|
maxHttpBufferSize: config_default.get("sockethub:maxPayloadBytes"),
|
|
155417
155570
|
cors: {
|
|
155418
|
-
origin:
|
|
155571
|
+
origin: allowedOrigins,
|
|
155419
155572
|
methods: ["GET", "POST"]
|
|
155420
155573
|
}
|
|
155421
155574
|
});
|
|
155575
|
+
this.io.engine.use((req, _res, next) => {
|
|
155576
|
+
const origin = req.headers.origin;
|
|
155577
|
+
if (origin !== undefined && resolveAllowedOrigin(allowedOrigins, origin) === undefined) {
|
|
155578
|
+
next(new Error("origin not allowed"));
|
|
155579
|
+
return;
|
|
155580
|
+
}
|
|
155581
|
+
next();
|
|
155582
|
+
});
|
|
155422
155583
|
routes_default.setup(app);
|
|
155423
155584
|
if (config_default.get("examples")) {
|
|
155424
155585
|
this.addExamplesRoutes(app);
|
|
@@ -155499,7 +155660,6 @@ class Listener {
|
|
|
155499
155660
|
log6.info(`trusting proxy headers (trust proxy: ${trustProxy})`);
|
|
155500
155661
|
}
|
|
155501
155662
|
app.set("view engine", "ejs");
|
|
155502
|
-
app.use(import_express.default.urlencoded({ extended: true }));
|
|
155503
155663
|
return app;
|
|
155504
155664
|
}
|
|
155505
155665
|
getApp() {
|
|
@@ -155519,8 +155679,10 @@ var init_listener = __esm(() => {
|
|
|
155519
155679
|
init_wrapper();
|
|
155520
155680
|
init_config();
|
|
155521
155681
|
init_cors();
|
|
155682
|
+
init_payload_debug();
|
|
155522
155683
|
init_routes();
|
|
155523
155684
|
init_server_info();
|
|
155685
|
+
init_trust_proxy();
|
|
155524
155686
|
init_version();
|
|
155525
155687
|
import_express = __toESM(require_express(), 1);
|
|
155526
155688
|
require3 = createRequire5(import.meta.url);
|
|
@@ -155552,9 +155714,12 @@ function fingerprint(credentials) {
|
|
|
155552
155714
|
if (!object) {
|
|
155553
155715
|
return null;
|
|
155554
155716
|
}
|
|
155555
|
-
const
|
|
155556
|
-
|
|
155557
|
-
|
|
155717
|
+
const hasSecret = [object, object.imap, object.smtp].some((candidate) => {
|
|
155718
|
+
if (!candidate || typeof candidate !== "object")
|
|
155719
|
+
return false;
|
|
155720
|
+
const { password, token } = candidate;
|
|
155721
|
+
return typeof password === "string" && password.length > 0 || typeof token === "string" && token.length > 0;
|
|
155722
|
+
});
|
|
155558
155723
|
if (!hasSecret) {
|
|
155559
155724
|
return null;
|
|
155560
155725
|
}
|
|
@@ -155602,10 +155767,21 @@ async function resolveConnectionScope(platform, actorId, request = {}) {
|
|
|
155602
155767
|
if (pending) {
|
|
155603
155768
|
const resolved = await pending;
|
|
155604
155769
|
if (resolved) {
|
|
155605
|
-
return {
|
|
155770
|
+
return {
|
|
155771
|
+
scope: request.shareConnections === false ? crypto.objectHash({
|
|
155772
|
+
credentials: resolved,
|
|
155773
|
+
session: socketSessionId ?? credentialSessionId
|
|
155774
|
+
}) : resolved
|
|
155775
|
+
};
|
|
155606
155776
|
}
|
|
155607
155777
|
}
|
|
155608
155778
|
}
|
|
155779
|
+
if (request.shareConnections === false) {
|
|
155780
|
+
const session = socketSessionId ?? credentialSessionId;
|
|
155781
|
+
if (!session)
|
|
155782
|
+
throw new Error("session required for private connection");
|
|
155783
|
+
return { scope: crypto.objectHash({ session }) };
|
|
155784
|
+
}
|
|
155609
155785
|
return anonymousScope(platform, actorId, {
|
|
155610
155786
|
credentialSessionId,
|
|
155611
155787
|
socketSessionId,
|
|
@@ -155874,9 +156050,27 @@ var init_dist3 = __esm(() => {
|
|
|
155874
156050
|
function ensureObject(msg) {
|
|
155875
156051
|
return typeof msg === "object" && msg !== null && !Array.isArray(msg);
|
|
155876
156052
|
}
|
|
156053
|
+
function exceedsDepth(root, max = MAX_MESSAGE_DEPTH) {
|
|
156054
|
+
const stack = [[root, 0]];
|
|
156055
|
+
while (stack.length > 0) {
|
|
156056
|
+
const [value, depth] = stack.pop();
|
|
156057
|
+
if (value === null || typeof value !== "object") {
|
|
156058
|
+
continue;
|
|
156059
|
+
}
|
|
156060
|
+
if (depth > max) {
|
|
156061
|
+
return true;
|
|
156062
|
+
}
|
|
156063
|
+
for (const child of Object.values(value)) {
|
|
156064
|
+
stack.push([child, depth + 1]);
|
|
156065
|
+
}
|
|
156066
|
+
}
|
|
156067
|
+
return false;
|
|
156068
|
+
}
|
|
155877
156069
|
function normalizeActivityStreamMiddleware(msg, done) {
|
|
155878
156070
|
if (!ensureObject(msg)) {
|
|
155879
156071
|
done(new Error("message received is not an object."));
|
|
156072
|
+
} else if (exceedsDepth(msg)) {
|
|
156073
|
+
done(new Error("activity stream nesting too deep."));
|
|
155880
156074
|
} else if (!Array.isArray(msg["@context"]) || !msg["@context"].every((entry) => typeof entry === "string")) {
|
|
155881
156075
|
done(new Error("activity stream must contain an @context array."));
|
|
155882
156076
|
} else if (typeof msg.type !== "string") {
|
|
@@ -155890,6 +156084,7 @@ function normalizeActivityStreamMiddleware(msg, done) {
|
|
|
155890
156084
|
}
|
|
155891
156085
|
}
|
|
155892
156086
|
}
|
|
156087
|
+
var MAX_MESSAGE_DEPTH = 64;
|
|
155893
156088
|
var init_normalize_activity_stream = __esm(() => {
|
|
155894
156089
|
init_src2();
|
|
155895
156090
|
});
|
|
@@ -156046,15 +156241,16 @@ var init_middleware = __esm(() => {
|
|
|
156046
156241
|
|
|
156047
156242
|
// src/message-handlers.ts
|
|
156048
156243
|
function attachError(err, msg) {
|
|
156049
|
-
const message = errorMessage(err);
|
|
156244
|
+
const message = errorMessage(err).slice(0, 256);
|
|
156050
156245
|
if (!msg) {
|
|
156051
156246
|
return new Error(message);
|
|
156052
156247
|
}
|
|
156053
|
-
const
|
|
156054
|
-
|
|
156055
|
-
|
|
156056
|
-
|
|
156057
|
-
|
|
156248
|
+
const context = msg["@context"];
|
|
156249
|
+
return {
|
|
156250
|
+
...Array.isArray(context) && context.length <= 8 && context.every((entry) => typeof entry === "string" && entry.length <= 256) ? { "@context": context } : {},
|
|
156251
|
+
...typeof msg.type === "string" && msg.type.length <= 64 ? { type: msg.type } : {},
|
|
156252
|
+
error: message
|
|
156253
|
+
};
|
|
156058
156254
|
}
|
|
156059
156255
|
function createMessageHandlers(options) {
|
|
156060
156256
|
const {
|
|
@@ -156171,6 +156367,9 @@ function classifyPayload(payload) {
|
|
|
156171
156367
|
if (!isObject(payload)) {
|
|
156172
156368
|
return "unknown";
|
|
156173
156369
|
}
|
|
156370
|
+
if (exceedsDepth(payload)) {
|
|
156371
|
+
return "message";
|
|
156372
|
+
}
|
|
156174
156373
|
if ("type" in payload && "actor" in payload) {
|
|
156175
156374
|
const typeValue = String(payload.type);
|
|
156176
156375
|
if (typeValue === "credentials") {
|
|
@@ -156201,9 +156400,9 @@ function buildCredentialsAck(payload, result) {
|
|
|
156201
156400
|
}
|
|
156202
156401
|
const actor = isObject(payload) ? payload.actor : undefined;
|
|
156203
156402
|
const actorId = isObject(actor) && typeof actor.id === "string" ? actor.id : undefined;
|
|
156204
|
-
|
|
156205
|
-
|
|
156206
|
-
return new Error(
|
|
156403
|
+
const error = isObject(result) && typeof result.error === "string" ? result.error : undefined;
|
|
156404
|
+
if (!actorId || error !== undefined && actorId.length > MAX_ERROR_ACTOR_ID_LENGTH) {
|
|
156405
|
+
return new Error(error ?? "invalid credentials payload");
|
|
156207
156406
|
}
|
|
156208
156407
|
const ack = {
|
|
156209
156408
|
"@context": buildCanonicalContext(INTERNAL_PLATFORM_CONTEXT_URL),
|
|
@@ -156213,8 +156412,8 @@ function buildCredentialsAck(payload, result) {
|
|
|
156213
156412
|
type: "person"
|
|
156214
156413
|
}
|
|
156215
156414
|
};
|
|
156216
|
-
if (
|
|
156217
|
-
ack.error =
|
|
156415
|
+
if (error !== undefined) {
|
|
156416
|
+
ack.error = error;
|
|
156218
156417
|
}
|
|
156219
156418
|
return ack;
|
|
156220
156419
|
}
|
|
@@ -156450,7 +156649,15 @@ function registerHttpActionsRoutes(app, options, deps = {}) {
|
|
|
156450
156649
|
app.options(`${routePath}/:requestId`, cors);
|
|
156451
156650
|
app.get(routePath, cors, rateLimiter, handleGet);
|
|
156452
156651
|
app.get(`${routePath}/:requestId`, cors, rateLimiter, handleGet);
|
|
156453
|
-
app.post(routePath, cors, rateLimiter,
|
|
156652
|
+
app.post(routePath, cors, rateLimiter, (req, res, next) => {
|
|
156653
|
+
if (!req.is("application/json")) {
|
|
156654
|
+
res.status(415).json({
|
|
156655
|
+
error: "content-type must be application/json"
|
|
156656
|
+
});
|
|
156657
|
+
return;
|
|
156658
|
+
}
|
|
156659
|
+
next();
|
|
156660
|
+
}, parseJson, async (req, res) => {
|
|
156454
156661
|
const payloads = normalizePayloads(req.body);
|
|
156455
156662
|
if (payloads.length === 0) {
|
|
156456
156663
|
res.status(400).json({
|
|
@@ -156522,6 +156729,7 @@ function registerHttpActionsRoutes(app, options, deps = {}) {
|
|
|
156522
156729
|
sessionSecret,
|
|
156523
156730
|
credentialsStore,
|
|
156524
156731
|
transport: "http",
|
|
156732
|
+
clientIp: normalizeIp(req.ip ?? req.socket.remoteAddress),
|
|
156525
156733
|
onPlatformInstance: (platformInstance) => {
|
|
156526
156734
|
if (!platformInstance.config.persist) {
|
|
156527
156735
|
return;
|
|
@@ -156708,7 +156916,7 @@ function registerHttpActionsRoutes(app, options, deps = {}) {
|
|
|
156708
156916
|
});
|
|
156709
156917
|
log7.info(`http actions enabled at ${routePath}`);
|
|
156710
156918
|
}
|
|
156711
|
-
var import_express2, log7, REQUEST_ID_HEADER = "x-request-id", SOCKETHUB_REQUEST_ID_HEADER = "x-sockethub-request-id", DEFAULT_HTTP_ACTIONS_PATH = "/sockethub-http", IDEMPOTENCY_PREFIX = "sockethub:http-actions", IDEMPOTENCY_BATCH_SIZE = 100, MAX_REQUEST_ID_LENGTH = 128, REQUEST_ID_PATTERN;
|
|
156919
|
+
var import_express2, log7, REQUEST_ID_HEADER = "x-request-id", SOCKETHUB_REQUEST_ID_HEADER = "x-sockethub-request-id", DEFAULT_HTTP_ACTIONS_PATH = "/sockethub-http", IDEMPOTENCY_PREFIX = "sockethub:http-actions", IDEMPOTENCY_BATCH_SIZE = 100, MAX_REQUEST_ID_LENGTH = 128, MAX_ERROR_ACTOR_ID_LENGTH = 256, REQUEST_ID_PATTERN;
|
|
156712
156920
|
var init_actions = __esm(() => {
|
|
156713
156921
|
init_src3();
|
|
156714
156922
|
init_src();
|
|
@@ -156721,6 +156929,7 @@ var init_actions = __esm(() => {
|
|
|
156721
156929
|
init_connection_scope();
|
|
156722
156930
|
init_cors();
|
|
156723
156931
|
init_message_handlers();
|
|
156932
|
+
init_normalize_activity_stream();
|
|
156724
156933
|
init_session_registry();
|
|
156725
156934
|
import_express2 = __toESM(require_express(), 1);
|
|
156726
156935
|
log7 = createLogger("server:http:actions");
|
|
@@ -156839,6 +157048,7 @@ class PlatformInstance {
|
|
|
156839
157048
|
parentId;
|
|
156840
157049
|
parentSecret1;
|
|
156841
157050
|
sessions = new Set;
|
|
157051
|
+
ownerIps = new Set;
|
|
156842
157052
|
sessionIps = new Map;
|
|
156843
157053
|
sessionSecrets = new Map;
|
|
156844
157054
|
processMessageListener;
|
|
@@ -156847,7 +157057,11 @@ class PlatformInstance {
|
|
|
156847
157057
|
heartbeatFailureHandled = false;
|
|
156848
157058
|
replaced = false;
|
|
156849
157059
|
shutdownResult;
|
|
157060
|
+
retirementError;
|
|
156850
157061
|
actor;
|
|
157062
|
+
get actorId() {
|
|
157063
|
+
return this.actor;
|
|
157064
|
+
}
|
|
156851
157065
|
constructor(params) {
|
|
156852
157066
|
this.id = params.identifier;
|
|
156853
157067
|
this.queueId = params.queueId ?? crypto.randId(16);
|
|
@@ -156871,6 +157085,9 @@ class PlatformInstance {
|
|
|
156871
157085
|
if (process.env.LOG_LEVEL) {
|
|
156872
157086
|
env.LOG_LEVEL = process.env.LOG_LEVEL;
|
|
156873
157087
|
}
|
|
157088
|
+
if (process.env.NODE_EXTRA_CA_CERTS) {
|
|
157089
|
+
env.NODE_EXTRA_CA_CERTS = process.env.NODE_EXTRA_CA_CERTS;
|
|
157090
|
+
}
|
|
156874
157091
|
const credentialsTtl = config_default.get("credentials:ttlMs");
|
|
156875
157092
|
if (typeof credentialsTtl !== "undefined") {
|
|
156876
157093
|
env.SOCKETHUB_CREDENTIALS_TTL_MS = String(credentialsTtl);
|
|
@@ -156919,7 +157136,15 @@ class PlatformInstance {
|
|
|
156919
157136
|
this.replaced = true;
|
|
156920
157137
|
this.flaggedForTermination = true;
|
|
156921
157138
|
}
|
|
156922
|
-
shutdown() {
|
|
157139
|
+
shutdown(pendingJobError) {
|
|
157140
|
+
if (pendingJobError && !this.retirementError) {
|
|
157141
|
+
this.retirementError = pendingJobError;
|
|
157142
|
+
const pending = [...this.completedJobHandlers.values()];
|
|
157143
|
+
this.completedJobHandlers.clear();
|
|
157144
|
+
this.completedJobHandlerTimestamps.clear();
|
|
157145
|
+
for (const handler of pending)
|
|
157146
|
+
this.failRetiredJob(handler);
|
|
157147
|
+
}
|
|
156923
157148
|
if (!this.shutdownResult) {
|
|
156924
157149
|
this.shutdownResult = this.teardown();
|
|
156925
157150
|
}
|
|
@@ -156968,10 +157193,26 @@ class PlatformInstance {
|
|
|
156968
157193
|
});
|
|
156969
157194
|
}
|
|
156970
157195
|
registerCompletedJobHandler(title, handler) {
|
|
157196
|
+
if (this.retirementError) {
|
|
157197
|
+
this.failRetiredJob(handler);
|
|
157198
|
+
return;
|
|
157199
|
+
}
|
|
156971
157200
|
this.pruneExpiredJobHandlers();
|
|
156972
157201
|
this.completedJobHandlers.set(title, handler);
|
|
156973
157202
|
this.completedJobHandlerTimestamps.set(title, Date.now());
|
|
156974
157203
|
}
|
|
157204
|
+
failRetiredJob(handler) {
|
|
157205
|
+
try {
|
|
157206
|
+
handler({
|
|
157207
|
+
"@context": buildCanonicalContext(this.contextUrl ?? INTERNAL_PLATFORM_CONTEXT_URL),
|
|
157208
|
+
type: "error",
|
|
157209
|
+
actor: { id: this.actor ?? this.name, type: "service" },
|
|
157210
|
+
error: this.retirementError
|
|
157211
|
+
});
|
|
157212
|
+
} catch (error) {
|
|
157213
|
+
this.log.error(`failed to acknowledge retired job: ${errorMessage(error)}`);
|
|
157214
|
+
}
|
|
157215
|
+
}
|
|
156975
157216
|
takeCompletedJobHandler(title) {
|
|
156976
157217
|
const handler = this.completedJobHandlers.get(title);
|
|
156977
157218
|
if (handler) {
|
|
@@ -157046,6 +157287,8 @@ class PlatformInstance {
|
|
|
157046
157287
|
return payload;
|
|
157047
157288
|
}
|
|
157048
157289
|
async handleJobResult(state, job, result) {
|
|
157290
|
+
if (this.retirementError)
|
|
157291
|
+
return;
|
|
157049
157292
|
let payload = result;
|
|
157050
157293
|
if (state === "failed") {
|
|
157051
157294
|
payload = job.msg;
|
|
@@ -157391,6 +157634,8 @@ class ProcessManager {
|
|
|
157391
157634
|
parentSecret2;
|
|
157392
157635
|
init;
|
|
157393
157636
|
ensureChains = new Map;
|
|
157637
|
+
startsPerIp = new Map;
|
|
157638
|
+
startsWindowBegan = 0;
|
|
157394
157639
|
constructor(parentId, parentSecret1, parentSecret2, init) {
|
|
157395
157640
|
this.parentId = parentId;
|
|
157396
157641
|
this.parentSecret1 = parentSecret1;
|
|
@@ -157402,7 +157647,8 @@ class ProcessManager {
|
|
|
157402
157647
|
const connectionScope = platformDetails.config.persist ? await resolveConnectionScope(platform, actorId, {
|
|
157403
157648
|
credentialSessionId: credentialSessionId ?? sessionId,
|
|
157404
157649
|
socketSessionId: sessionId,
|
|
157405
|
-
sessionIp
|
|
157650
|
+
sessionIp,
|
|
157651
|
+
shareConnections: platformDetails.config.shareConnections
|
|
157406
157652
|
}) : undefined;
|
|
157407
157653
|
const pi = platformDetails.config.persist ? await this.ensureProcess(platform, sessionId, actorId, sessionIp, connectionScope) : await this.ensureProcess(platform);
|
|
157408
157654
|
pi.config = platformDetails.config;
|
|
@@ -157433,34 +157679,53 @@ class ProcessManager {
|
|
|
157433
157679
|
}
|
|
157434
157680
|
ensureProcess(platform, sessionId, actor, sessionIp, connectionScope) {
|
|
157435
157681
|
const identifier = getPlatformId(platform, actor, connectionScope?.scope);
|
|
157436
|
-
const
|
|
157682
|
+
const platformConfig = this.init.platforms.get(platform).config;
|
|
157683
|
+
const privateSession = platformConfig.persist && platformConfig.shareConnections === false && sessionId;
|
|
157684
|
+
const chainKey = privateSession ? JSON.stringify([platform, actor, sessionId]) : identifier;
|
|
157685
|
+
const prior = this.ensureChains.get(chainKey) ?? Promise.resolve();
|
|
157437
157686
|
const run = prior.then(() => this.ensureProcessNow(identifier, platform, sessionId, actor, sessionIp, connectionScope));
|
|
157438
157687
|
const settled = run.then(() => {
|
|
157439
157688
|
return;
|
|
157440
157689
|
}, () => {
|
|
157441
157690
|
return;
|
|
157442
157691
|
});
|
|
157443
|
-
this.ensureChains.set(
|
|
157692
|
+
this.ensureChains.set(chainKey, settled);
|
|
157444
157693
|
settled.then(() => {
|
|
157445
|
-
if (this.ensureChains.get(
|
|
157446
|
-
this.ensureChains.delete(
|
|
157694
|
+
if (this.ensureChains.get(chainKey) === settled) {
|
|
157695
|
+
this.ensureChains.delete(chainKey);
|
|
157447
157696
|
}
|
|
157448
157697
|
});
|
|
157449
157698
|
return run;
|
|
157450
157699
|
}
|
|
157451
157700
|
async ensureProcessNow(identifier, platform, sessionId, actor, sessionIp, connectionScope) {
|
|
157701
|
+
const platformConfig = this.init.platforms.get(platform).config;
|
|
157452
157702
|
const existing = platformInstances.get(identifier);
|
|
157453
|
-
|
|
157454
|
-
|
|
157455
|
-
|
|
157703
|
+
if (actor !== undefined && !(existing && this.isProcessAlive(existing)))
|
|
157704
|
+
this.assertStartRate(sessionIp, false);
|
|
157705
|
+
if (platformConfig.persist && platformConfig.shareConnections === false && sessionId) {
|
|
157706
|
+
for (const previous of platformInstances.values()) {
|
|
157707
|
+
if (previous.id === identifier || previous.name !== platform || previous.actorId !== actor || !previous.sessions.has(sessionId))
|
|
157708
|
+
continue;
|
|
157709
|
+
previous.deregisterSession(sessionId);
|
|
157710
|
+
if (!previous.sessions.size)
|
|
157711
|
+
await previous.shutdown("credentials replaced; pending operation interrupted; message submission may already have succeeded; do not automatically retry sends");
|
|
157712
|
+
}
|
|
157456
157713
|
}
|
|
157714
|
+
const reusable = existing && this.isProcessAlive(existing);
|
|
157715
|
+
this.assertInstanceCapacity(platform, identifier, actor === undefined, sessionId, sessionIp, !!reusable);
|
|
157457
157716
|
let inheritedQueueId;
|
|
157458
157717
|
if (existing && !reusable) {
|
|
157459
157718
|
inheritedQueueId = existing.queueId;
|
|
157460
157719
|
existing.markReplaced();
|
|
157461
157720
|
await existing.shutdown();
|
|
157721
|
+
this.assertInstanceCapacity(platform, identifier, actor === undefined, sessionId, sessionIp, !!reusable);
|
|
157462
157722
|
}
|
|
157723
|
+
if (!reusable && actor !== undefined)
|
|
157724
|
+
this.assertStartRate(sessionIp, true);
|
|
157463
157725
|
const platformInstance = reusable ? existing : this.createPlatformInstance(identifier, platform, actor, connectionScope?.scope, inheritedQueueId);
|
|
157726
|
+
if (sessionIp && !platformInstance.global) {
|
|
157727
|
+
platformInstance.ownerIps.add(sessionIp);
|
|
157728
|
+
}
|
|
157464
157729
|
if (sessionId) {
|
|
157465
157730
|
platformInstance.registerSession(sessionId, sessionIp);
|
|
157466
157731
|
}
|
|
@@ -157470,15 +157735,38 @@ class ProcessManager {
|
|
|
157470
157735
|
}
|
|
157471
157736
|
return platformInstance;
|
|
157472
157737
|
}
|
|
157473
|
-
assertInstanceCapacity(platform, identifier) {
|
|
157738
|
+
assertInstanceCapacity(platform, identifier, global2, sessionId, sessionIp, reusable = false) {
|
|
157739
|
+
if (global2)
|
|
157740
|
+
return;
|
|
157741
|
+
const others = [...platformInstances.values()].filter((pi) => pi.id !== identifier && !pi.global);
|
|
157474
157742
|
const max = Number(config_default.get("limits:maxPlatformInstances") ?? 0);
|
|
157475
|
-
if (!
|
|
157743
|
+
if (!reusable && max > 0 && others.length >= max) {
|
|
157744
|
+
throw new Error(`platform instance limit reached (${max}); cannot start new ${platform} instance`);
|
|
157745
|
+
}
|
|
157746
|
+
const perSession = Number(config_default.get("limits:maxInstancesPerSession") ?? 0);
|
|
157747
|
+
if (perSession > 0 && sessionId && others.filter((pi) => pi.sessions.has(sessionId)).length >= perSession) {
|
|
157748
|
+
throw new Error(`per-session platform instance limit reached (${perSession})`);
|
|
157749
|
+
}
|
|
157750
|
+
const perIp = Number(config_default.get("limits:maxInstancesPerIp") ?? 0);
|
|
157751
|
+
if (perIp > 0 && sessionIp && others.filter((pi) => pi.ownerIps.has(sessionIp)).length >= perIp) {
|
|
157752
|
+
throw new Error(`per-address platform instance limit reached (${perIp})`);
|
|
157753
|
+
}
|
|
157754
|
+
}
|
|
157755
|
+
assertStartRate(sessionIp, charge) {
|
|
157756
|
+
const max = Number(config_default.get("limits:maxStartsPerIpPerMinute") ?? 0);
|
|
157757
|
+
if (!(max > 0) || !sessionIp)
|
|
157476
157758
|
return;
|
|
157759
|
+
const now = Date.now();
|
|
157760
|
+
if (now - this.startsWindowBegan >= 60000) {
|
|
157761
|
+
this.startsPerIp.clear();
|
|
157762
|
+
this.startsWindowBegan = now;
|
|
157477
157763
|
}
|
|
157478
|
-
const
|
|
157479
|
-
if (
|
|
157480
|
-
throw new Error(`platform
|
|
157764
|
+
const starts = this.startsPerIp.get(sessionIp) ?? 0;
|
|
157765
|
+
if (starts >= max) {
|
|
157766
|
+
throw new Error(`per-address platform start rate limit reached (${max} per minute)`);
|
|
157481
157767
|
}
|
|
157768
|
+
if (charge)
|
|
157769
|
+
this.startsPerIp.set(sessionIp, starts + 1);
|
|
157482
157770
|
}
|
|
157483
157771
|
isProcessAlive(platformInstance) {
|
|
157484
157772
|
const pid = platformInstance.process?.pid;
|
|
@@ -157608,23 +157896,7 @@ function getProxyHeaderName() {
|
|
|
157608
157896
|
return config_default.get("credentialCheck:proxyHeader")?.toLowerCase() || "x-forwarded-for";
|
|
157609
157897
|
}
|
|
157610
157898
|
function getClientIp(socket) {
|
|
157611
|
-
|
|
157612
|
-
if (ipSource === "proxy") {
|
|
157613
|
-
const proxyHeader = getProxyHeaderName();
|
|
157614
|
-
const headerValue = socket.handshake.headers[proxyHeader];
|
|
157615
|
-
if (typeof headerValue === "string") {
|
|
157616
|
-
const normalized = normalizeIp(headerValue);
|
|
157617
|
-
if (normalized) {
|
|
157618
|
-
return normalized;
|
|
157619
|
-
}
|
|
157620
|
-
} else if (Array.isArray(headerValue) && headerValue.length > 0) {
|
|
157621
|
-
const normalized = normalizeIp(headerValue[0]);
|
|
157622
|
-
if (normalized) {
|
|
157623
|
-
return normalized;
|
|
157624
|
-
}
|
|
157625
|
-
}
|
|
157626
|
-
}
|
|
157627
|
-
return normalizeIp(socket.handshake.address);
|
|
157899
|
+
return resolveSocketClientIp(socket.request, listener_default.app, config_default.get("credentialCheck:reconnectIpSource"), config_default.get("credentialCheck:proxyHeader"), socket.handshake.address);
|
|
157628
157900
|
}
|
|
157629
157901
|
|
|
157630
157902
|
class Sockethub {
|
|
@@ -157675,7 +157947,7 @@ class Sockethub {
|
|
|
157675
157947
|
this.rateLimiter = createRateLimiter(config_default.get("rateLimiter"));
|
|
157676
157948
|
if (config_default.get("credentialCheck:reconnectIpSource") === "proxy") {
|
|
157677
157949
|
const proxyHeader = getProxyHeaderName();
|
|
157678
|
-
log9.warn(`credentialCheck.reconnectIpSource=proxy enabled; only use this behind a trusted reverse proxy that
|
|
157950
|
+
log9.warn(`credentialCheck.reconnectIpSource=proxy enabled; only use this behind a trusted reverse proxy that sets '${proxyHeader}' to the connecting client`);
|
|
157679
157951
|
}
|
|
157680
157952
|
log9.debug("active platforms: ", [...init.platforms.keys()]);
|
|
157681
157953
|
listener_default.start();
|
|
@@ -157811,11 +158083,13 @@ var init_sockethub = __esm(() => {
|
|
|
157811
158083
|
init_process_manager();
|
|
157812
158084
|
init_rate_limiter();
|
|
157813
158085
|
init_server_info();
|
|
158086
|
+
init_trust_proxy();
|
|
157814
158087
|
log9 = createLogger("server:core");
|
|
157815
158088
|
sockethub_default = Sockethub;
|
|
157816
158089
|
});
|
|
157817
158090
|
|
|
157818
158091
|
// src/index.ts
|
|
158092
|
+
init_payload_debug();
|
|
157819
158093
|
init_src();
|
|
157820
158094
|
init_error();
|
|
157821
158095
|
import path5 from "node:path";
|
|
@@ -157959,6 +158233,12 @@ async function server() {
|
|
|
157959
158233
|
}
|
|
157960
158234
|
return;
|
|
157961
158235
|
}
|
|
158236
|
+
await Promise.resolve().then(() => init_src2());
|
|
158237
|
+
if (!isCodegenAvailable()) {
|
|
158238
|
+
console.error("Sockethub requires schema validation, but this environment forbids code generation (new Function).");
|
|
158239
|
+
process.exitCode = 1;
|
|
158240
|
+
return;
|
|
158241
|
+
}
|
|
157962
158242
|
await Promise.resolve().then(() => init_config());
|
|
157963
158243
|
const loggingConfig = config_default.get("logging");
|
|
157964
158244
|
const logFile = loggingConfig.file ? path5.resolve(loggingConfig.file) : "";
|