tempest.games 0.2.100 → 0.2.102
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/CHANGELOG.md +18 -0
- package/app/assets/{index-BLzwxFXa.js → index-DgtNKk2k.js} +27 -27
- package/app/index.html +1 -1
- package/bin/backend.bun.js +683 -131
- package/bin/backend.worker.game.bun.js +13 -9
- package/bin/backend.worker.tribunal.bun.js +17 -13
- package/bin/frontend.bun.js +13 -9
- package/package.json +7 -7
package/bin/backend.bun.js
CHANGED
|
@@ -19517,14 +19517,531 @@ var require_cjs3 = __commonJS((exports) => {
|
|
|
19517
19517
|
}
|
|
19518
19518
|
});
|
|
19519
19519
|
|
|
19520
|
-
// ../../node_modules/.pnpm/
|
|
19520
|
+
// ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js
|
|
19521
|
+
var require_common2 = __commonJS((exports, module) => {
|
|
19522
|
+
function setup(env) {
|
|
19523
|
+
createDebug.debug = createDebug;
|
|
19524
|
+
createDebug.default = createDebug;
|
|
19525
|
+
createDebug.coerce = coerce;
|
|
19526
|
+
createDebug.disable = disable;
|
|
19527
|
+
createDebug.enable = enable;
|
|
19528
|
+
createDebug.enabled = enabled;
|
|
19529
|
+
createDebug.humanize = require_ms();
|
|
19530
|
+
createDebug.destroy = destroy;
|
|
19531
|
+
Object.keys(env).forEach((key) => {
|
|
19532
|
+
createDebug[key] = env[key];
|
|
19533
|
+
});
|
|
19534
|
+
createDebug.names = [];
|
|
19535
|
+
createDebug.skips = [];
|
|
19536
|
+
createDebug.formatters = {};
|
|
19537
|
+
function selectColor(namespace) {
|
|
19538
|
+
let hash = 0;
|
|
19539
|
+
for (let i2 = 0;i2 < namespace.length; i2++) {
|
|
19540
|
+
hash = (hash << 5) - hash + namespace.charCodeAt(i2);
|
|
19541
|
+
hash |= 0;
|
|
19542
|
+
}
|
|
19543
|
+
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
|
19544
|
+
}
|
|
19545
|
+
createDebug.selectColor = selectColor;
|
|
19546
|
+
function createDebug(namespace) {
|
|
19547
|
+
let prevTime;
|
|
19548
|
+
let enableOverride = null;
|
|
19549
|
+
let namespacesCache;
|
|
19550
|
+
let enabledCache;
|
|
19551
|
+
function debug(...args) {
|
|
19552
|
+
if (!debug.enabled) {
|
|
19553
|
+
return;
|
|
19554
|
+
}
|
|
19555
|
+
const self2 = debug;
|
|
19556
|
+
const curr = Number(new Date);
|
|
19557
|
+
const ms = curr - (prevTime || curr);
|
|
19558
|
+
self2.diff = ms;
|
|
19559
|
+
self2.prev = prevTime;
|
|
19560
|
+
self2.curr = curr;
|
|
19561
|
+
prevTime = curr;
|
|
19562
|
+
args[0] = createDebug.coerce(args[0]);
|
|
19563
|
+
if (typeof args[0] !== "string") {
|
|
19564
|
+
args.unshift("%O");
|
|
19565
|
+
}
|
|
19566
|
+
let index = 0;
|
|
19567
|
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
|
|
19568
|
+
if (match === "%%") {
|
|
19569
|
+
return "%";
|
|
19570
|
+
}
|
|
19571
|
+
index++;
|
|
19572
|
+
const formatter = createDebug.formatters[format];
|
|
19573
|
+
if (typeof formatter === "function") {
|
|
19574
|
+
const val = args[index];
|
|
19575
|
+
match = formatter.call(self2, val);
|
|
19576
|
+
args.splice(index, 1);
|
|
19577
|
+
index--;
|
|
19578
|
+
}
|
|
19579
|
+
return match;
|
|
19580
|
+
});
|
|
19581
|
+
createDebug.formatArgs.call(self2, args);
|
|
19582
|
+
const logFn = self2.log || createDebug.log;
|
|
19583
|
+
logFn.apply(self2, args);
|
|
19584
|
+
}
|
|
19585
|
+
debug.namespace = namespace;
|
|
19586
|
+
debug.useColors = createDebug.useColors();
|
|
19587
|
+
debug.color = createDebug.selectColor(namespace);
|
|
19588
|
+
debug.extend = extend;
|
|
19589
|
+
debug.destroy = createDebug.destroy;
|
|
19590
|
+
Object.defineProperty(debug, "enabled", {
|
|
19591
|
+
enumerable: true,
|
|
19592
|
+
configurable: false,
|
|
19593
|
+
get: () => {
|
|
19594
|
+
if (enableOverride !== null) {
|
|
19595
|
+
return enableOverride;
|
|
19596
|
+
}
|
|
19597
|
+
if (namespacesCache !== createDebug.namespaces) {
|
|
19598
|
+
namespacesCache = createDebug.namespaces;
|
|
19599
|
+
enabledCache = createDebug.enabled(namespace);
|
|
19600
|
+
}
|
|
19601
|
+
return enabledCache;
|
|
19602
|
+
},
|
|
19603
|
+
set: (v2) => {
|
|
19604
|
+
enableOverride = v2;
|
|
19605
|
+
}
|
|
19606
|
+
});
|
|
19607
|
+
if (typeof createDebug.init === "function") {
|
|
19608
|
+
createDebug.init(debug);
|
|
19609
|
+
}
|
|
19610
|
+
return debug;
|
|
19611
|
+
}
|
|
19612
|
+
function extend(namespace, delimiter) {
|
|
19613
|
+
const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
|
|
19614
|
+
newDebug.log = this.log;
|
|
19615
|
+
return newDebug;
|
|
19616
|
+
}
|
|
19617
|
+
function enable(namespaces) {
|
|
19618
|
+
createDebug.save(namespaces);
|
|
19619
|
+
createDebug.namespaces = namespaces;
|
|
19620
|
+
createDebug.names = [];
|
|
19621
|
+
createDebug.skips = [];
|
|
19622
|
+
const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
|
19623
|
+
for (const ns of split) {
|
|
19624
|
+
if (ns[0] === "-") {
|
|
19625
|
+
createDebug.skips.push(ns.slice(1));
|
|
19626
|
+
} else {
|
|
19627
|
+
createDebug.names.push(ns);
|
|
19628
|
+
}
|
|
19629
|
+
}
|
|
19630
|
+
}
|
|
19631
|
+
function matchesTemplate(search, template) {
|
|
19632
|
+
let searchIndex = 0;
|
|
19633
|
+
let templateIndex = 0;
|
|
19634
|
+
let starIndex = -1;
|
|
19635
|
+
let matchIndex = 0;
|
|
19636
|
+
while (searchIndex < search.length) {
|
|
19637
|
+
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
|
|
19638
|
+
if (template[templateIndex] === "*") {
|
|
19639
|
+
starIndex = templateIndex;
|
|
19640
|
+
matchIndex = searchIndex;
|
|
19641
|
+
templateIndex++;
|
|
19642
|
+
} else {
|
|
19643
|
+
searchIndex++;
|
|
19644
|
+
templateIndex++;
|
|
19645
|
+
}
|
|
19646
|
+
} else if (starIndex !== -1) {
|
|
19647
|
+
templateIndex = starIndex + 1;
|
|
19648
|
+
matchIndex++;
|
|
19649
|
+
searchIndex = matchIndex;
|
|
19650
|
+
} else {
|
|
19651
|
+
return false;
|
|
19652
|
+
}
|
|
19653
|
+
}
|
|
19654
|
+
while (templateIndex < template.length && template[templateIndex] === "*") {
|
|
19655
|
+
templateIndex++;
|
|
19656
|
+
}
|
|
19657
|
+
return templateIndex === template.length;
|
|
19658
|
+
}
|
|
19659
|
+
function disable() {
|
|
19660
|
+
const namespaces = [
|
|
19661
|
+
...createDebug.names,
|
|
19662
|
+
...createDebug.skips.map((namespace) => "-" + namespace)
|
|
19663
|
+
].join(",");
|
|
19664
|
+
createDebug.enable("");
|
|
19665
|
+
return namespaces;
|
|
19666
|
+
}
|
|
19667
|
+
function enabled(name) {
|
|
19668
|
+
for (const skip of createDebug.skips) {
|
|
19669
|
+
if (matchesTemplate(name, skip)) {
|
|
19670
|
+
return false;
|
|
19671
|
+
}
|
|
19672
|
+
}
|
|
19673
|
+
for (const ns of createDebug.names) {
|
|
19674
|
+
if (matchesTemplate(name, ns)) {
|
|
19675
|
+
return true;
|
|
19676
|
+
}
|
|
19677
|
+
}
|
|
19678
|
+
return false;
|
|
19679
|
+
}
|
|
19680
|
+
function coerce(val) {
|
|
19681
|
+
if (val instanceof Error) {
|
|
19682
|
+
return val.stack || val.message;
|
|
19683
|
+
}
|
|
19684
|
+
return val;
|
|
19685
|
+
}
|
|
19686
|
+
function destroy() {
|
|
19687
|
+
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
19688
|
+
}
|
|
19689
|
+
createDebug.enable(createDebug.load());
|
|
19690
|
+
return createDebug;
|
|
19691
|
+
}
|
|
19692
|
+
module.exports = setup;
|
|
19693
|
+
});
|
|
19694
|
+
|
|
19695
|
+
// ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js
|
|
19696
|
+
var require_browser2 = __commonJS((exports, module) => {
|
|
19697
|
+
exports.formatArgs = formatArgs;
|
|
19698
|
+
exports.save = save;
|
|
19699
|
+
exports.load = load;
|
|
19700
|
+
exports.useColors = useColors;
|
|
19701
|
+
exports.storage = localstorage();
|
|
19702
|
+
exports.destroy = (() => {
|
|
19703
|
+
let warned = false;
|
|
19704
|
+
return () => {
|
|
19705
|
+
if (!warned) {
|
|
19706
|
+
warned = true;
|
|
19707
|
+
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
19708
|
+
}
|
|
19709
|
+
};
|
|
19710
|
+
})();
|
|
19711
|
+
exports.colors = [
|
|
19712
|
+
"#0000CC",
|
|
19713
|
+
"#0000FF",
|
|
19714
|
+
"#0033CC",
|
|
19715
|
+
"#0033FF",
|
|
19716
|
+
"#0066CC",
|
|
19717
|
+
"#0066FF",
|
|
19718
|
+
"#0099CC",
|
|
19719
|
+
"#0099FF",
|
|
19720
|
+
"#00CC00",
|
|
19721
|
+
"#00CC33",
|
|
19722
|
+
"#00CC66",
|
|
19723
|
+
"#00CC99",
|
|
19724
|
+
"#00CCCC",
|
|
19725
|
+
"#00CCFF",
|
|
19726
|
+
"#3300CC",
|
|
19727
|
+
"#3300FF",
|
|
19728
|
+
"#3333CC",
|
|
19729
|
+
"#3333FF",
|
|
19730
|
+
"#3366CC",
|
|
19731
|
+
"#3366FF",
|
|
19732
|
+
"#3399CC",
|
|
19733
|
+
"#3399FF",
|
|
19734
|
+
"#33CC00",
|
|
19735
|
+
"#33CC33",
|
|
19736
|
+
"#33CC66",
|
|
19737
|
+
"#33CC99",
|
|
19738
|
+
"#33CCCC",
|
|
19739
|
+
"#33CCFF",
|
|
19740
|
+
"#6600CC",
|
|
19741
|
+
"#6600FF",
|
|
19742
|
+
"#6633CC",
|
|
19743
|
+
"#6633FF",
|
|
19744
|
+
"#66CC00",
|
|
19745
|
+
"#66CC33",
|
|
19746
|
+
"#9900CC",
|
|
19747
|
+
"#9900FF",
|
|
19748
|
+
"#9933CC",
|
|
19749
|
+
"#9933FF",
|
|
19750
|
+
"#99CC00",
|
|
19751
|
+
"#99CC33",
|
|
19752
|
+
"#CC0000",
|
|
19753
|
+
"#CC0033",
|
|
19754
|
+
"#CC0066",
|
|
19755
|
+
"#CC0099",
|
|
19756
|
+
"#CC00CC",
|
|
19757
|
+
"#CC00FF",
|
|
19758
|
+
"#CC3300",
|
|
19759
|
+
"#CC3333",
|
|
19760
|
+
"#CC3366",
|
|
19761
|
+
"#CC3399",
|
|
19762
|
+
"#CC33CC",
|
|
19763
|
+
"#CC33FF",
|
|
19764
|
+
"#CC6600",
|
|
19765
|
+
"#CC6633",
|
|
19766
|
+
"#CC9900",
|
|
19767
|
+
"#CC9933",
|
|
19768
|
+
"#CCCC00",
|
|
19769
|
+
"#CCCC33",
|
|
19770
|
+
"#FF0000",
|
|
19771
|
+
"#FF0033",
|
|
19772
|
+
"#FF0066",
|
|
19773
|
+
"#FF0099",
|
|
19774
|
+
"#FF00CC",
|
|
19775
|
+
"#FF00FF",
|
|
19776
|
+
"#FF3300",
|
|
19777
|
+
"#FF3333",
|
|
19778
|
+
"#FF3366",
|
|
19779
|
+
"#FF3399",
|
|
19780
|
+
"#FF33CC",
|
|
19781
|
+
"#FF33FF",
|
|
19782
|
+
"#FF6600",
|
|
19783
|
+
"#FF6633",
|
|
19784
|
+
"#FF9900",
|
|
19785
|
+
"#FF9933",
|
|
19786
|
+
"#FFCC00",
|
|
19787
|
+
"#FFCC33"
|
|
19788
|
+
];
|
|
19789
|
+
function useColors() {
|
|
19790
|
+
if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
|
|
19791
|
+
return true;
|
|
19792
|
+
}
|
|
19793
|
+
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
19794
|
+
return false;
|
|
19795
|
+
}
|
|
19796
|
+
let m2;
|
|
19797
|
+
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 && (m2 = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m2[1], 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
19798
|
+
}
|
|
19799
|
+
function formatArgs(args) {
|
|
19800
|
+
args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
|
|
19801
|
+
if (!this.useColors) {
|
|
19802
|
+
return;
|
|
19803
|
+
}
|
|
19804
|
+
const c2 = "color: " + this.color;
|
|
19805
|
+
args.splice(1, 0, c2, "color: inherit");
|
|
19806
|
+
let index = 0;
|
|
19807
|
+
let lastC = 0;
|
|
19808
|
+
args[0].replace(/%[a-zA-Z%]/g, (match) => {
|
|
19809
|
+
if (match === "%%") {
|
|
19810
|
+
return;
|
|
19811
|
+
}
|
|
19812
|
+
index++;
|
|
19813
|
+
if (match === "%c") {
|
|
19814
|
+
lastC = index;
|
|
19815
|
+
}
|
|
19816
|
+
});
|
|
19817
|
+
args.splice(lastC, 0, c2);
|
|
19818
|
+
}
|
|
19819
|
+
exports.log = console.debug || console.log || (() => {});
|
|
19820
|
+
function save(namespaces) {
|
|
19821
|
+
try {
|
|
19822
|
+
if (namespaces) {
|
|
19823
|
+
exports.storage.setItem("debug", namespaces);
|
|
19824
|
+
} else {
|
|
19825
|
+
exports.storage.removeItem("debug");
|
|
19826
|
+
}
|
|
19827
|
+
} catch (error) {}
|
|
19828
|
+
}
|
|
19829
|
+
function load() {
|
|
19830
|
+
let r2;
|
|
19831
|
+
try {
|
|
19832
|
+
r2 = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG");
|
|
19833
|
+
} catch (error) {}
|
|
19834
|
+
if (!r2 && typeof process !== "undefined" && "env" in process) {
|
|
19835
|
+
r2 = process.env.DEBUG;
|
|
19836
|
+
}
|
|
19837
|
+
return r2;
|
|
19838
|
+
}
|
|
19839
|
+
function localstorage() {
|
|
19840
|
+
try {
|
|
19841
|
+
return localStorage;
|
|
19842
|
+
} catch (error) {}
|
|
19843
|
+
}
|
|
19844
|
+
module.exports = require_common2()(exports);
|
|
19845
|
+
var { formatters } = module.exports;
|
|
19846
|
+
formatters.j = function(v2) {
|
|
19847
|
+
try {
|
|
19848
|
+
return JSON.stringify(v2);
|
|
19849
|
+
} catch (error) {
|
|
19850
|
+
return "[UnexpectedJSONParseError]: " + error.message;
|
|
19851
|
+
}
|
|
19852
|
+
};
|
|
19853
|
+
});
|
|
19854
|
+
|
|
19855
|
+
// ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js
|
|
19856
|
+
var require_node2 = __commonJS((exports, module) => {
|
|
19857
|
+
var tty = __require("tty");
|
|
19858
|
+
var util = __require("util");
|
|
19859
|
+
exports.init = init;
|
|
19860
|
+
exports.log = log;
|
|
19861
|
+
exports.formatArgs = formatArgs;
|
|
19862
|
+
exports.save = save;
|
|
19863
|
+
exports.load = load;
|
|
19864
|
+
exports.useColors = useColors;
|
|
19865
|
+
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`.");
|
|
19866
|
+
exports.colors = [6, 2, 3, 4, 5, 1];
|
|
19867
|
+
try {
|
|
19868
|
+
const supportsColor = require_supports_color();
|
|
19869
|
+
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
|
19870
|
+
exports.colors = [
|
|
19871
|
+
20,
|
|
19872
|
+
21,
|
|
19873
|
+
26,
|
|
19874
|
+
27,
|
|
19875
|
+
32,
|
|
19876
|
+
33,
|
|
19877
|
+
38,
|
|
19878
|
+
39,
|
|
19879
|
+
40,
|
|
19880
|
+
41,
|
|
19881
|
+
42,
|
|
19882
|
+
43,
|
|
19883
|
+
44,
|
|
19884
|
+
45,
|
|
19885
|
+
56,
|
|
19886
|
+
57,
|
|
19887
|
+
62,
|
|
19888
|
+
63,
|
|
19889
|
+
68,
|
|
19890
|
+
69,
|
|
19891
|
+
74,
|
|
19892
|
+
75,
|
|
19893
|
+
76,
|
|
19894
|
+
77,
|
|
19895
|
+
78,
|
|
19896
|
+
79,
|
|
19897
|
+
80,
|
|
19898
|
+
81,
|
|
19899
|
+
92,
|
|
19900
|
+
93,
|
|
19901
|
+
98,
|
|
19902
|
+
99,
|
|
19903
|
+
112,
|
|
19904
|
+
113,
|
|
19905
|
+
128,
|
|
19906
|
+
129,
|
|
19907
|
+
134,
|
|
19908
|
+
135,
|
|
19909
|
+
148,
|
|
19910
|
+
149,
|
|
19911
|
+
160,
|
|
19912
|
+
161,
|
|
19913
|
+
162,
|
|
19914
|
+
163,
|
|
19915
|
+
164,
|
|
19916
|
+
165,
|
|
19917
|
+
166,
|
|
19918
|
+
167,
|
|
19919
|
+
168,
|
|
19920
|
+
169,
|
|
19921
|
+
170,
|
|
19922
|
+
171,
|
|
19923
|
+
172,
|
|
19924
|
+
173,
|
|
19925
|
+
178,
|
|
19926
|
+
179,
|
|
19927
|
+
184,
|
|
19928
|
+
185,
|
|
19929
|
+
196,
|
|
19930
|
+
197,
|
|
19931
|
+
198,
|
|
19932
|
+
199,
|
|
19933
|
+
200,
|
|
19934
|
+
201,
|
|
19935
|
+
202,
|
|
19936
|
+
203,
|
|
19937
|
+
204,
|
|
19938
|
+
205,
|
|
19939
|
+
206,
|
|
19940
|
+
207,
|
|
19941
|
+
208,
|
|
19942
|
+
209,
|
|
19943
|
+
214,
|
|
19944
|
+
215,
|
|
19945
|
+
220,
|
|
19946
|
+
221
|
|
19947
|
+
];
|
|
19948
|
+
}
|
|
19949
|
+
} catch (error) {}
|
|
19950
|
+
exports.inspectOpts = Object.keys(process.env).filter((key) => {
|
|
19951
|
+
return /^debug_/i.test(key);
|
|
19952
|
+
}).reduce((obj, key) => {
|
|
19953
|
+
const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_2, k2) => {
|
|
19954
|
+
return k2.toUpperCase();
|
|
19955
|
+
});
|
|
19956
|
+
let val = process.env[key];
|
|
19957
|
+
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
|
19958
|
+
val = true;
|
|
19959
|
+
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
|
19960
|
+
val = false;
|
|
19961
|
+
} else if (val === "null") {
|
|
19962
|
+
val = null;
|
|
19963
|
+
} else {
|
|
19964
|
+
val = Number(val);
|
|
19965
|
+
}
|
|
19966
|
+
obj[prop] = val;
|
|
19967
|
+
return obj;
|
|
19968
|
+
}, {});
|
|
19969
|
+
function useColors() {
|
|
19970
|
+
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
|
|
19971
|
+
}
|
|
19972
|
+
function formatArgs(args) {
|
|
19973
|
+
const { namespace: name, useColors: useColors2 } = this;
|
|
19974
|
+
if (useColors2) {
|
|
19975
|
+
const c2 = this.color;
|
|
19976
|
+
const colorCode = "\x1B[3" + (c2 < 8 ? c2 : "8;5;" + c2);
|
|
19977
|
+
const prefix = ` ${colorCode};1m${name} \x1B[0m`;
|
|
19978
|
+
args[0] = prefix + args[0].split(`
|
|
19979
|
+
`).join(`
|
|
19980
|
+
` + prefix);
|
|
19981
|
+
args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m");
|
|
19982
|
+
} else {
|
|
19983
|
+
args[0] = getDate() + name + " " + args[0];
|
|
19984
|
+
}
|
|
19985
|
+
}
|
|
19986
|
+
function getDate() {
|
|
19987
|
+
if (exports.inspectOpts.hideDate) {
|
|
19988
|
+
return "";
|
|
19989
|
+
}
|
|
19990
|
+
return new Date().toISOString() + " ";
|
|
19991
|
+
}
|
|
19992
|
+
function log(...args) {
|
|
19993
|
+
return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + `
|
|
19994
|
+
`);
|
|
19995
|
+
}
|
|
19996
|
+
function save(namespaces) {
|
|
19997
|
+
if (namespaces) {
|
|
19998
|
+
process.env.DEBUG = namespaces;
|
|
19999
|
+
} else {
|
|
20000
|
+
delete process.env.DEBUG;
|
|
20001
|
+
}
|
|
20002
|
+
}
|
|
20003
|
+
function load() {
|
|
20004
|
+
return process.env.DEBUG;
|
|
20005
|
+
}
|
|
20006
|
+
function init(debug) {
|
|
20007
|
+
debug.inspectOpts = {};
|
|
20008
|
+
const keys = Object.keys(exports.inspectOpts);
|
|
20009
|
+
for (let i2 = 0;i2 < keys.length; i2++) {
|
|
20010
|
+
debug.inspectOpts[keys[i2]] = exports.inspectOpts[keys[i2]];
|
|
20011
|
+
}
|
|
20012
|
+
}
|
|
20013
|
+
module.exports = require_common2()(exports);
|
|
20014
|
+
var { formatters } = module.exports;
|
|
20015
|
+
formatters.o = function(v2) {
|
|
20016
|
+
this.inspectOpts.colors = this.useColors;
|
|
20017
|
+
return util.inspect(v2, this.inspectOpts).split(`
|
|
20018
|
+
`).map((str) => str.trim()).join(" ");
|
|
20019
|
+
};
|
|
20020
|
+
formatters.O = function(v2) {
|
|
20021
|
+
this.inspectOpts.colors = this.useColors;
|
|
20022
|
+
return util.inspect(v2, this.inspectOpts);
|
|
20023
|
+
};
|
|
20024
|
+
});
|
|
20025
|
+
|
|
20026
|
+
// ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js
|
|
20027
|
+
var require_src2 = __commonJS((exports, module) => {
|
|
20028
|
+
if (typeof process === "undefined" || process.type === "renderer" || false || process.__nwjs) {
|
|
20029
|
+
module.exports = require_browser2();
|
|
20030
|
+
} else {
|
|
20031
|
+
module.exports = require_node2();
|
|
20032
|
+
}
|
|
20033
|
+
});
|
|
20034
|
+
|
|
20035
|
+
// ../../node_modules/.pnpm/socket.io@4.8.3/node_modules/socket.io/dist/client.js
|
|
19521
20036
|
var require_client = __commonJS((exports) => {
|
|
20037
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
20038
|
+
return mod && mod.__esModule ? mod : { default: mod };
|
|
20039
|
+
};
|
|
19522
20040
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19523
20041
|
exports.Client = undefined;
|
|
19524
20042
|
var socket_io_parser_1 = require_cjs3();
|
|
19525
|
-
var
|
|
19526
|
-
var
|
|
19527
|
-
var debug = debugModule("socket.io:client");
|
|
20043
|
+
var debug_1 = __importDefault(require_src2());
|
|
20044
|
+
var debug = (0, debug_1.default)("socket.io:client");
|
|
19528
20045
|
|
|
19529
20046
|
class Client {
|
|
19530
20047
|
constructor(server, conn) {
|
|
@@ -19639,16 +20156,7 @@ var require_client = __commonJS((exports) => {
|
|
|
19639
20156
|
}
|
|
19640
20157
|
}
|
|
19641
20158
|
ondecoded(packet) {
|
|
19642
|
-
|
|
19643
|
-
let authPayload;
|
|
19644
|
-
if (this.conn.protocol === 3) {
|
|
19645
|
-
const parsed = url.parse(packet.nsp, true);
|
|
19646
|
-
namespace = parsed.pathname;
|
|
19647
|
-
authPayload = parsed.query;
|
|
19648
|
-
} else {
|
|
19649
|
-
namespace = packet.nsp;
|
|
19650
|
-
authPayload = packet.data;
|
|
19651
|
-
}
|
|
20159
|
+
const { namespace, authPayload } = this._parseNamespace(packet);
|
|
19652
20160
|
const socket = this.nsps.get(namespace);
|
|
19653
20161
|
if (!socket && packet.type === socket_io_parser_1.PacketType.CONNECT) {
|
|
19654
20162
|
this.connect(namespace, authPayload);
|
|
@@ -19661,6 +20169,19 @@ var require_client = __commonJS((exports) => {
|
|
|
19661
20169
|
this.close();
|
|
19662
20170
|
}
|
|
19663
20171
|
}
|
|
20172
|
+
_parseNamespace(packet) {
|
|
20173
|
+
if (this.conn.protocol !== 3) {
|
|
20174
|
+
return {
|
|
20175
|
+
namespace: packet.nsp,
|
|
20176
|
+
authPayload: packet.data
|
|
20177
|
+
};
|
|
20178
|
+
}
|
|
20179
|
+
const url = new URL(packet.nsp, "https://socket.io");
|
|
20180
|
+
return {
|
|
20181
|
+
namespace: url.pathname,
|
|
20182
|
+
authPayload: Object.fromEntries(url.searchParams.entries())
|
|
20183
|
+
};
|
|
20184
|
+
}
|
|
19664
20185
|
onerror(err) {
|
|
19665
20186
|
for (const socket of this.sockets.values()) {
|
|
19666
20187
|
socket._onerror(err);
|
|
@@ -19690,7 +20211,7 @@ var require_client = __commonJS((exports) => {
|
|
|
19690
20211
|
exports.Client = Client;
|
|
19691
20212
|
});
|
|
19692
20213
|
|
|
19693
|
-
// ../../node_modules/.pnpm/socket.io@4.8.
|
|
20214
|
+
// ../../node_modules/.pnpm/socket.io@4.8.3/node_modules/socket.io/dist/typed-events.js
|
|
19694
20215
|
var require_typed_events = __commonJS((exports) => {
|
|
19695
20216
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19696
20217
|
exports.StrictEventEmitter = undefined;
|
|
@@ -19719,7 +20240,7 @@ var require_typed_events = __commonJS((exports) => {
|
|
|
19719
20240
|
exports.StrictEventEmitter = StrictEventEmitter;
|
|
19720
20241
|
});
|
|
19721
20242
|
|
|
19722
|
-
// ../../node_modules/.pnpm/socket.io@4.8.
|
|
20243
|
+
// ../../node_modules/.pnpm/socket.io@4.8.3/node_modules/socket.io/dist/socket-types.js
|
|
19723
20244
|
var require_socket_types = __commonJS((exports) => {
|
|
19724
20245
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19725
20246
|
exports.RESERVED_EVENTS = undefined;
|
|
@@ -19733,7 +20254,7 @@ var require_socket_types = __commonJS((exports) => {
|
|
|
19733
20254
|
]);
|
|
19734
20255
|
});
|
|
19735
20256
|
|
|
19736
|
-
// ../../node_modules/.pnpm/socket.io@4.8.
|
|
20257
|
+
// ../../node_modules/.pnpm/socket.io@4.8.3/node_modules/socket.io/dist/broadcast-operator.js
|
|
19737
20258
|
var require_broadcast_operator = __commonJS((exports) => {
|
|
19738
20259
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19739
20260
|
exports.RemoteSocket = exports.BroadcastOperator = undefined;
|
|
@@ -19930,7 +20451,7 @@ var require_broadcast_operator = __commonJS((exports) => {
|
|
|
19930
20451
|
exports.RemoteSocket = RemoteSocket;
|
|
19931
20452
|
});
|
|
19932
20453
|
|
|
19933
|
-
// ../../node_modules/.pnpm/socket.io@4.8.
|
|
20454
|
+
// ../../node_modules/.pnpm/socket.io@4.8.3/node_modules/socket.io/dist/socket.js
|
|
19934
20455
|
var require_socket2 = __commonJS((exports) => {
|
|
19935
20456
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
19936
20457
|
return mod && mod.__esModule ? mod : { default: mod };
|
|
@@ -19938,7 +20459,7 @@ var require_socket2 = __commonJS((exports) => {
|
|
|
19938
20459
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19939
20460
|
exports.Socket = undefined;
|
|
19940
20461
|
var socket_io_parser_1 = require_cjs3();
|
|
19941
|
-
var debug_1 = __importDefault(
|
|
20462
|
+
var debug_1 = __importDefault(require_src2());
|
|
19942
20463
|
var typed_events_1 = require_typed_events();
|
|
19943
20464
|
var base64id_1 = __importDefault(require_base64id());
|
|
19944
20465
|
var broadcast_operator_1 = require_broadcast_operator();
|
|
@@ -19966,7 +20487,7 @@ var require_socket2 = __commonJS((exports) => {
|
|
|
19966
20487
|
this.fns = [];
|
|
19967
20488
|
this.flags = {};
|
|
19968
20489
|
this.server = nsp.server;
|
|
19969
|
-
this.adapter =
|
|
20490
|
+
this.adapter = nsp.adapter;
|
|
19970
20491
|
if (previousSession) {
|
|
19971
20492
|
this.id = previousSession.sid;
|
|
19972
20493
|
this.pid = previousSession.pid;
|
|
@@ -20358,7 +20879,7 @@ var require_socket2 = __commonJS((exports) => {
|
|
|
20358
20879
|
exports.Socket = Socket;
|
|
20359
20880
|
});
|
|
20360
20881
|
|
|
20361
|
-
// ../../node_modules/.pnpm/socket.io@4.8.
|
|
20882
|
+
// ../../node_modules/.pnpm/socket.io@4.8.3/node_modules/socket.io/dist/namespace.js
|
|
20362
20883
|
var require_namespace = __commonJS((exports) => {
|
|
20363
20884
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
20364
20885
|
return mod && mod.__esModule ? mod : { default: mod };
|
|
@@ -20367,7 +20888,7 @@ var require_namespace = __commonJS((exports) => {
|
|
|
20367
20888
|
exports.Namespace = exports.RESERVED_EVENTS = undefined;
|
|
20368
20889
|
var socket_1 = require_socket2();
|
|
20369
20890
|
var typed_events_1 = require_typed_events();
|
|
20370
|
-
var debug_1 = __importDefault(
|
|
20891
|
+
var debug_1 = __importDefault(require_src2());
|
|
20371
20892
|
var broadcast_operator_1 = require_broadcast_operator();
|
|
20372
20893
|
var debug = (0, debug_1.default)("socket.io:namespace");
|
|
20373
20894
|
exports.RESERVED_EVENTS = new Set(["connect", "connection", "new_namespace"]);
|
|
@@ -20385,6 +20906,9 @@ var require_namespace = __commonJS((exports) => {
|
|
|
20385
20906
|
}
|
|
20386
20907
|
_initAdapter() {
|
|
20387
20908
|
this.adapter = new (this.server.adapter())(this);
|
|
20909
|
+
Promise.resolve(this.adapter.init()).catch((err) => {
|
|
20910
|
+
debug("error while initializing adapter: %s", err);
|
|
20911
|
+
});
|
|
20388
20912
|
}
|
|
20389
20913
|
use(fn2) {
|
|
20390
20914
|
this._fns.push(fn2);
|
|
@@ -21504,7 +22028,7 @@ var require_dist2 = __commonJS((exports) => {
|
|
|
21504
22028
|
} });
|
|
21505
22029
|
});
|
|
21506
22030
|
|
|
21507
|
-
// ../../node_modules/.pnpm/socket.io@4.8.
|
|
22031
|
+
// ../../node_modules/.pnpm/socket.io@4.8.3/node_modules/socket.io/dist/parent-namespace.js
|
|
21508
22032
|
var require_parent_namespace = __commonJS((exports) => {
|
|
21509
22033
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
21510
22034
|
return mod && mod.__esModule ? mod : { default: mod };
|
|
@@ -21513,7 +22037,7 @@ var require_parent_namespace = __commonJS((exports) => {
|
|
|
21513
22037
|
exports.ParentNamespace = undefined;
|
|
21514
22038
|
var namespace_1 = require_namespace();
|
|
21515
22039
|
var socket_io_adapter_1 = require_dist2();
|
|
21516
|
-
var debug_1 = __importDefault(
|
|
22040
|
+
var debug_1 = __importDefault(require_src2());
|
|
21517
22041
|
var debug = (0, debug_1.default)("socket.io:parent-namespace");
|
|
21518
22042
|
|
|
21519
22043
|
class ParentNamespace extends namespace_1.Namespace {
|
|
@@ -21569,7 +22093,7 @@ var require_parent_namespace = __commonJS((exports) => {
|
|
|
21569
22093
|
}
|
|
21570
22094
|
});
|
|
21571
22095
|
|
|
21572
|
-
// ../../node_modules/.pnpm/socket.io@4.8.
|
|
22096
|
+
// ../../node_modules/.pnpm/socket.io@4.8.3/node_modules/socket.io/dist/uws.js
|
|
21573
22097
|
var require_uws = __commonJS((exports) => {
|
|
21574
22098
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
21575
22099
|
return mod && mod.__esModule ? mod : { default: mod };
|
|
@@ -21580,7 +22104,7 @@ var require_uws = __commonJS((exports) => {
|
|
|
21580
22104
|
exports.serveFile = serveFile;
|
|
21581
22105
|
var socket_io_adapter_1 = require_dist2();
|
|
21582
22106
|
var fs_1 = __require("fs");
|
|
21583
|
-
var debug_1 = __importDefault(
|
|
22107
|
+
var debug_1 = __importDefault(require_src2());
|
|
21584
22108
|
var debug = (0, debug_1.default)("socket.io:adapter-uws");
|
|
21585
22109
|
var SEPARATOR = "\x1F";
|
|
21586
22110
|
var { addAll, del, broadcast } = socket_io_adapter_1.Adapter.prototype;
|
|
@@ -21695,11 +22219,11 @@ var require_uws = __commonJS((exports) => {
|
|
|
21695
22219
|
}
|
|
21696
22220
|
});
|
|
21697
22221
|
|
|
21698
|
-
// ../../node_modules/.pnpm/socket.io@4.8.
|
|
22222
|
+
// ../../node_modules/.pnpm/socket.io@4.8.3/node_modules/socket.io/package.json
|
|
21699
22223
|
var require_package = __commonJS((exports, module) => {
|
|
21700
22224
|
module.exports = {
|
|
21701
22225
|
name: "socket.io",
|
|
21702
|
-
version: "4.8.
|
|
22226
|
+
version: "4.8.3",
|
|
21703
22227
|
description: "node.js realtime framework server",
|
|
21704
22228
|
keywords: [
|
|
21705
22229
|
"realtime",
|
|
@@ -21725,9 +22249,12 @@ var require_package = __commonJS((exports, module) => {
|
|
|
21725
22249
|
type: "commonjs",
|
|
21726
22250
|
main: "./dist/index.js",
|
|
21727
22251
|
exports: {
|
|
21728
|
-
|
|
21729
|
-
|
|
21730
|
-
|
|
22252
|
+
".": {
|
|
22253
|
+
types: "./dist/index.d.ts",
|
|
22254
|
+
import: "./wrapper.mjs",
|
|
22255
|
+
require: "./dist/index.js"
|
|
22256
|
+
},
|
|
22257
|
+
"./package.json": "./package.json"
|
|
21731
22258
|
},
|
|
21732
22259
|
types: "./dist/index.d.ts",
|
|
21733
22260
|
license: "MIT",
|
|
@@ -21743,7 +22270,7 @@ var require_package = __commonJS((exports, module) => {
|
|
|
21743
22270
|
compile: "rimraf ./dist && tsc",
|
|
21744
22271
|
test: "npm run format:check && npm run compile && npm run test:types && npm run test:unit",
|
|
21745
22272
|
"test:types": "tsd",
|
|
21746
|
-
"test:unit": "nyc mocha --
|
|
22273
|
+
"test:unit": "nyc mocha --import=tsx --reporter spec --slow 200 --bail --timeout 10000 test/index.ts",
|
|
21747
22274
|
"format:check": 'prettier --check "lib/**/*.ts" "test/**/*.ts"',
|
|
21748
22275
|
"format:fix": 'prettier --write "lib/**/*.ts" "test/**/*.ts"',
|
|
21749
22276
|
prepack: "npm run compile"
|
|
@@ -21752,7 +22279,7 @@ var require_package = __commonJS((exports, module) => {
|
|
|
21752
22279
|
accepts: "~1.3.4",
|
|
21753
22280
|
base64id: "~2.0.0",
|
|
21754
22281
|
cors: "~2.8.5",
|
|
21755
|
-
debug: "~4.
|
|
22282
|
+
debug: "~4.4.1",
|
|
21756
22283
|
"engine.io": "~6.6.0",
|
|
21757
22284
|
"socket.io-adapter": "~2.5.2",
|
|
21758
22285
|
"socket.io-parser": "~4.2.4"
|
|
@@ -21784,9 +22311,9 @@ var require_package = __commonJS((exports, module) => {
|
|
|
21784
22311
|
};
|
|
21785
22312
|
});
|
|
21786
22313
|
|
|
21787
|
-
// ../../node_modules/.pnpm/socket.io@4.8.
|
|
22314
|
+
// ../../node_modules/.pnpm/socket.io@4.8.3/node_modules/socket.io/dist/index.js
|
|
21788
22315
|
var require_dist3 = __commonJS((exports, module) => {
|
|
21789
|
-
var __dirname = "/home/runner/work/wayforge/wayforge/node_modules/.pnpm/socket.io@4.8.
|
|
22316
|
+
var __dirname = "/home/runner/work/wayforge/wayforge/node_modules/.pnpm/socket.io@4.8.3/node_modules/socket.io/dist";
|
|
21790
22317
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o2, m2, k2, k22) {
|
|
21791
22318
|
if (k22 === undefined)
|
|
21792
22319
|
k22 = k2;
|
|
@@ -21824,7 +22351,7 @@ var require_dist3 = __commonJS((exports, module) => {
|
|
|
21824
22351
|
};
|
|
21825
22352
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21826
22353
|
exports.Namespace = exports.Socket = exports.Server = undefined;
|
|
21827
|
-
var
|
|
22354
|
+
var http_1 = __importDefault(__require("http"));
|
|
21828
22355
|
var fs_1 = __require("fs");
|
|
21829
22356
|
var zlib_1 = __require("zlib");
|
|
21830
22357
|
var accepts = require_accepts();
|
|
@@ -21840,7 +22367,7 @@ var require_dist3 = __commonJS((exports, module) => {
|
|
|
21840
22367
|
var parent_namespace_1 = require_parent_namespace();
|
|
21841
22368
|
var socket_io_adapter_1 = require_dist2();
|
|
21842
22369
|
var parser = __importStar(require_cjs3());
|
|
21843
|
-
var debug_1 = __importDefault(
|
|
22370
|
+
var debug_1 = __importDefault(require_src2());
|
|
21844
22371
|
var socket_1 = require_socket2();
|
|
21845
22372
|
Object.defineProperty(exports, "Socket", { enumerable: true, get: function() {
|
|
21846
22373
|
return socket_1.Socket;
|
|
@@ -21955,7 +22482,7 @@ var require_dist3 = __commonJS((exports, module) => {
|
|
|
21955
22482
|
if (typeof srv == "number") {
|
|
21956
22483
|
debug("creating http server and binding to %d", srv);
|
|
21957
22484
|
const port = srv;
|
|
21958
|
-
srv =
|
|
22485
|
+
srv = http_1.default.createServer((req, res) => {
|
|
21959
22486
|
res.writeHead(404);
|
|
21960
22487
|
res.end();
|
|
21961
22488
|
});
|
|
@@ -22137,7 +22664,15 @@ var require_dist3 = __commonJS((exports, module) => {
|
|
|
22137
22664
|
this.engine.close();
|
|
22138
22665
|
(0, uws_1.restoreAdapter)();
|
|
22139
22666
|
if (this.httpServer) {
|
|
22140
|
-
|
|
22667
|
+
return new Promise((resolve) => {
|
|
22668
|
+
this.httpServer.close((err) => {
|
|
22669
|
+
fn2 && fn2(err);
|
|
22670
|
+
if (err) {
|
|
22671
|
+
debug("server was not running");
|
|
22672
|
+
}
|
|
22673
|
+
resolve();
|
|
22674
|
+
});
|
|
22675
|
+
});
|
|
22141
22676
|
} else {
|
|
22142
22677
|
fn2 && fn2();
|
|
22143
22678
|
}
|
|
@@ -45817,7 +46352,52 @@ for (const e of _i) {
|
|
|
45817
46352
|
(t2.configurable || t2.enumerable || t2.writable) && (t2.configurable = false, t2.enumerable = false, t2.writable = false, Object.defineProperty(e, "prototype", t2));
|
|
45818
46353
|
}
|
|
45819
46354
|
|
|
45820
|
-
// ../../node_modules/.pnpm/@trpc+server@11.8.
|
|
46355
|
+
// ../../node_modules/.pnpm/@trpc+server@11.8.1_typescript@5.9.3/node_modules/@trpc/server/dist/codes-DagpWZLc.mjs
|
|
46356
|
+
function mergeWithoutOverrides(obj1, ...objs) {
|
|
46357
|
+
const newObj = Object.assign(emptyObject(), obj1);
|
|
46358
|
+
for (const overrides of objs)
|
|
46359
|
+
for (const key in overrides) {
|
|
46360
|
+
if (key in newObj && newObj[key] !== overrides[key])
|
|
46361
|
+
throw new Error(`Duplicate key ${key}`);
|
|
46362
|
+
newObj[key] = overrides[key];
|
|
46363
|
+
}
|
|
46364
|
+
return newObj;
|
|
46365
|
+
}
|
|
46366
|
+
function isObject(value) {
|
|
46367
|
+
return !!value && !Array.isArray(value) && typeof value === "object";
|
|
46368
|
+
}
|
|
46369
|
+
function isFunction(fn2) {
|
|
46370
|
+
return typeof fn2 === "function";
|
|
46371
|
+
}
|
|
46372
|
+
function emptyObject() {
|
|
46373
|
+
return Object.create(null);
|
|
46374
|
+
}
|
|
46375
|
+
var asyncIteratorsSupported = typeof Symbol === "function" && !!Symbol.asyncIterator;
|
|
46376
|
+
function isAsyncIterable(value) {
|
|
46377
|
+
return asyncIteratorsSupported && isObject(value) && Symbol.asyncIterator in value;
|
|
46378
|
+
}
|
|
46379
|
+
var run = (fn2) => fn2();
|
|
46380
|
+
function identity(it2) {
|
|
46381
|
+
return it2;
|
|
46382
|
+
}
|
|
46383
|
+
function abortSignalsAnyPonyfill(signals) {
|
|
46384
|
+
if (typeof AbortSignal.any === "function")
|
|
46385
|
+
return AbortSignal.any(signals);
|
|
46386
|
+
const ac = new AbortController;
|
|
46387
|
+
for (const signal of signals) {
|
|
46388
|
+
if (signal.aborted) {
|
|
46389
|
+
trigger();
|
|
46390
|
+
break;
|
|
46391
|
+
}
|
|
46392
|
+
signal.addEventListener("abort", trigger, { once: true });
|
|
46393
|
+
}
|
|
46394
|
+
return ac.signal;
|
|
46395
|
+
function trigger() {
|
|
46396
|
+
ac.abort();
|
|
46397
|
+
for (const signal of signals)
|
|
46398
|
+
signal.removeEventListener("abort", trigger);
|
|
46399
|
+
}
|
|
46400
|
+
}
|
|
45821
46401
|
var TRPC_ERROR_CODES_BY_KEY = {
|
|
45822
46402
|
PARSE_ERROR: -32700,
|
|
45823
46403
|
BAD_REQUEST: -32600,
|
|
@@ -45866,35 +46446,8 @@ var retryableRpcCodes = [
|
|
|
45866
46446
|
TRPC_ERROR_CODES_BY_KEY.GATEWAY_TIMEOUT,
|
|
45867
46447
|
TRPC_ERROR_CODES_BY_KEY.INTERNAL_SERVER_ERROR
|
|
45868
46448
|
];
|
|
45869
|
-
function mergeWithoutOverrides(obj1, ...objs) {
|
|
45870
|
-
const newObj = Object.assign(Object.create(null), obj1);
|
|
45871
|
-
for (const overrides of objs)
|
|
45872
|
-
for (const key in overrides) {
|
|
45873
|
-
if (key in newObj && newObj[key] !== overrides[key])
|
|
45874
|
-
throw new Error(`Duplicate key ${key}`);
|
|
45875
|
-
newObj[key] = overrides[key];
|
|
45876
|
-
}
|
|
45877
|
-
return newObj;
|
|
45878
|
-
}
|
|
45879
|
-
function isObject(value) {
|
|
45880
|
-
return !!value && !Array.isArray(value) && typeof value === "object";
|
|
45881
|
-
}
|
|
45882
|
-
function isFunction(fn2) {
|
|
45883
|
-
return typeof fn2 === "function";
|
|
45884
|
-
}
|
|
45885
|
-
function omitPrototype(obj) {
|
|
45886
|
-
return Object.assign(Object.create(null), obj);
|
|
45887
|
-
}
|
|
45888
|
-
var asyncIteratorsSupported = typeof Symbol === "function" && !!Symbol.asyncIterator;
|
|
45889
|
-
function isAsyncIterable(value) {
|
|
45890
|
-
return asyncIteratorsSupported && isObject(value) && Symbol.asyncIterator in value;
|
|
45891
|
-
}
|
|
45892
|
-
var run = (fn2) => fn2();
|
|
45893
|
-
function identity(it2) {
|
|
45894
|
-
return it2;
|
|
45895
|
-
}
|
|
45896
46449
|
|
|
45897
|
-
// ../../node_modules/.pnpm/@trpc+server@11.8.
|
|
46450
|
+
// ../../node_modules/.pnpm/@trpc+server@11.8.1_typescript@5.9.3/node_modules/@trpc/server/dist/getErrorShape-vC8mUXJD.mjs
|
|
45898
46451
|
var __create2 = Object.create;
|
|
45899
46452
|
var __defProp2 = Object.defineProperty;
|
|
45900
46453
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -45957,7 +46510,7 @@ function createInnerProxy(callback, path, memo) {
|
|
|
45957
46510
|
}));
|
|
45958
46511
|
return memo[cacheKey];
|
|
45959
46512
|
}
|
|
45960
|
-
var createRecursiveProxy = (callback) => createInnerProxy(callback, [],
|
|
46513
|
+
var createRecursiveProxy = (callback) => createInnerProxy(callback, [], emptyObject());
|
|
45961
46514
|
var JSONRPC2_TO_HTTP_CODE = {
|
|
45962
46515
|
PARSE_ERROR: 400,
|
|
45963
46516
|
BAD_REQUEST: 400,
|
|
@@ -46097,7 +46650,7 @@ function getErrorShape(opts) {
|
|
|
46097
46650
|
return config.errorFormatter((0, import_objectSpread2.default)((0, import_objectSpread2.default)({}, opts), {}, { shape }));
|
|
46098
46651
|
}
|
|
46099
46652
|
|
|
46100
|
-
// ../../node_modules/.pnpm/@trpc+server@11.8.
|
|
46653
|
+
// ../../node_modules/.pnpm/@trpc+server@11.8.1_typescript@5.9.3/node_modules/@trpc/server/dist/tracked-D4V22yc5.mjs
|
|
46101
46654
|
var defaultFormatter = ({ shape }) => {
|
|
46102
46655
|
return shape;
|
|
46103
46656
|
};
|
|
@@ -46208,8 +46761,8 @@ function createRouterFactory(config) {
|
|
|
46208
46761
|
const reservedWordsUsed = new Set(Object.keys(input).filter((v2) => reservedWords.includes(v2)));
|
|
46209
46762
|
if (reservedWordsUsed.size > 0)
|
|
46210
46763
|
throw new Error("Reserved words used in `router({})` call: " + Array.from(reservedWordsUsed).join(", "));
|
|
46211
|
-
const procedures =
|
|
46212
|
-
const lazy$1 =
|
|
46764
|
+
const procedures = emptyObject();
|
|
46765
|
+
const lazy$1 = emptyObject();
|
|
46213
46766
|
function createLazyLoader(opts) {
|
|
46214
46767
|
return {
|
|
46215
46768
|
ref: opts.ref,
|
|
@@ -46232,7 +46785,7 @@ function createRouterFactory(config) {
|
|
|
46232
46785
|
};
|
|
46233
46786
|
}
|
|
46234
46787
|
function step(from, path = []) {
|
|
46235
|
-
const aggregate =
|
|
46788
|
+
const aggregate = emptyObject();
|
|
46236
46789
|
for (const [key, item] of Object.entries(from !== null && from !== undefined ? from : {})) {
|
|
46237
46790
|
if (isLazy(item)) {
|
|
46238
46791
|
lazy$1[[...path, key].join(".")] = createLazyLoader({
|
|
@@ -46365,7 +46918,7 @@ function isTrackedEnvelope(value) {
|
|
|
46365
46918
|
return Array.isArray(value) && value[2] === trackedSymbol;
|
|
46366
46919
|
}
|
|
46367
46920
|
|
|
46368
|
-
// ../../node_modules/.pnpm/@trpc+server@11.8.
|
|
46921
|
+
// ../../node_modules/.pnpm/@trpc+server@11.8.1_typescript@5.9.3/node_modules/@trpc/server/dist/observable-UMO3vUa_.mjs
|
|
46369
46922
|
function isObservable(x2) {
|
|
46370
46923
|
return typeof x2 === "object" && x2 !== null && "subscribe" in x2;
|
|
46371
46924
|
}
|
|
@@ -46438,7 +46991,7 @@ function observableToAsyncIterable(observable$1, signal) {
|
|
|
46438
46991
|
} };
|
|
46439
46992
|
}
|
|
46440
46993
|
|
|
46441
|
-
// ../../node_modules/.pnpm/@trpc+server@11.8.
|
|
46994
|
+
// ../../node_modules/.pnpm/@trpc+server@11.8.1_typescript@5.9.3/node_modules/@trpc/server/dist/resolveResponse-C7AcnFLN.mjs
|
|
46442
46995
|
function parseConnectionParamsFromUnknown(parsed) {
|
|
46443
46996
|
try {
|
|
46444
46997
|
if (parsed === null)
|
|
@@ -46517,15 +47070,18 @@ var jsonContentTypeHandler = {
|
|
|
46517
47070
|
} else
|
|
46518
47071
|
inputs = await req.json();
|
|
46519
47072
|
if (inputs === undefined)
|
|
46520
|
-
return
|
|
46521
|
-
if (!isBatchCall)
|
|
46522
|
-
|
|
47073
|
+
return emptyObject();
|
|
47074
|
+
if (!isBatchCall) {
|
|
47075
|
+
const result = emptyObject();
|
|
47076
|
+
result[0] = opts.router._def._config.transformer.input.deserialize(inputs);
|
|
47077
|
+
return result;
|
|
47078
|
+
}
|
|
46523
47079
|
if (!isObject(inputs))
|
|
46524
47080
|
throw new TRPCError({
|
|
46525
47081
|
code: "BAD_REQUEST",
|
|
46526
47082
|
message: '"input" needs to be an object when doing a batch call'
|
|
46527
47083
|
});
|
|
46528
|
-
const acc =
|
|
47084
|
+
const acc = emptyObject();
|
|
46529
47085
|
for (const index of paths.keys()) {
|
|
46530
47086
|
const input = inputs[index];
|
|
46531
47087
|
if (input !== undefined)
|
|
@@ -47053,44 +47609,16 @@ function iteratorResource(iterable) {
|
|
|
47053
47609
|
await ((_iterator$return = iterator.return) === null || _iterator$return === undefined ? undefined : _iterator$return.call(iterator));
|
|
47054
47610
|
});
|
|
47055
47611
|
}
|
|
47056
|
-
function
|
|
47057
|
-
return _withMaxDuration.apply(this, arguments);
|
|
47058
|
-
}
|
|
47059
|
-
function _withMaxDuration() {
|
|
47060
|
-
_withMaxDuration = (0, import_wrapAsyncGenerator$5.default)(function* (iterable, opts) {
|
|
47061
|
-
try {
|
|
47062
|
-
var _usingCtx$1 = (0, import_usingCtx$4.default)();
|
|
47063
|
-
const iterator = _usingCtx$1.a(iteratorResource(iterable));
|
|
47064
|
-
const timer = _usingCtx$1.u(timerResource(opts.maxDurationMs));
|
|
47065
|
-
const timerPromise = timer.start();
|
|
47066
|
-
let result;
|
|
47067
|
-
while (true) {
|
|
47068
|
-
result = yield (0, import_awaitAsyncGenerator$4.default)(Unpromise.race([iterator.next(), timerPromise]));
|
|
47069
|
-
if (result === disposablePromiseTimerResult)
|
|
47070
|
-
throwAbortError();
|
|
47071
|
-
if (result.done)
|
|
47072
|
-
return result;
|
|
47073
|
-
yield result.value;
|
|
47074
|
-
result = null;
|
|
47075
|
-
}
|
|
47076
|
-
} catch (_2) {
|
|
47077
|
-
_usingCtx$1.e = _2;
|
|
47078
|
-
} finally {
|
|
47079
|
-
yield (0, import_awaitAsyncGenerator$4.default)(_usingCtx$1.d());
|
|
47080
|
-
}
|
|
47081
|
-
});
|
|
47082
|
-
return _withMaxDuration.apply(this, arguments);
|
|
47083
|
-
}
|
|
47084
|
-
function takeWithGrace(_x3, _x4) {
|
|
47612
|
+
function takeWithGrace(_x, _x2) {
|
|
47085
47613
|
return _takeWithGrace.apply(this, arguments);
|
|
47086
47614
|
}
|
|
47087
47615
|
function _takeWithGrace() {
|
|
47088
47616
|
_takeWithGrace = (0, import_wrapAsyncGenerator$5.default)(function* (iterable, opts) {
|
|
47089
47617
|
try {
|
|
47090
|
-
var
|
|
47091
|
-
const iterator =
|
|
47618
|
+
var _usingCtx$1 = (0, import_usingCtx$4.default)();
|
|
47619
|
+
const iterator = _usingCtx$1.a(iteratorResource(iterable));
|
|
47092
47620
|
let result;
|
|
47093
|
-
const timer =
|
|
47621
|
+
const timer = _usingCtx$1.u(timerResource(opts.gracePeriodMs));
|
|
47094
47622
|
let count = opts.count;
|
|
47095
47623
|
let timerPromise = new Promise(() => {});
|
|
47096
47624
|
while (true) {
|
|
@@ -47105,9 +47633,9 @@ function _takeWithGrace() {
|
|
|
47105
47633
|
result = null;
|
|
47106
47634
|
}
|
|
47107
47635
|
} catch (_2) {
|
|
47108
|
-
|
|
47636
|
+
_usingCtx$1.e = _2;
|
|
47109
47637
|
} finally {
|
|
47110
|
-
yield (0, import_awaitAsyncGenerator$4.default)(
|
|
47638
|
+
yield (0, import_awaitAsyncGenerator$4.default)(_usingCtx$1.d());
|
|
47111
47639
|
}
|
|
47112
47640
|
});
|
|
47113
47641
|
return _takeWithGrace.apply(this, arguments);
|
|
@@ -47520,7 +48048,7 @@ function _createBatchStreamProducer() {
|
|
|
47520
48048
|
return [[placeholder], [null, ...reg]];
|
|
47521
48049
|
if (!isPlainObject(value))
|
|
47522
48050
|
return [[value]];
|
|
47523
|
-
const newObj =
|
|
48051
|
+
const newObj = emptyObject();
|
|
47524
48052
|
const asyncValues = [];
|
|
47525
48053
|
for (const [key, item] of Object.entries(value)) {
|
|
47526
48054
|
const transformed = encodeAsync(item, [...path, key]);
|
|
@@ -47533,7 +48061,7 @@ function _createBatchStreamProducer() {
|
|
|
47533
48061
|
}
|
|
47534
48062
|
return [[newObj], ...asyncValues];
|
|
47535
48063
|
}
|
|
47536
|
-
const newHead =
|
|
48064
|
+
const newHead = emptyObject();
|
|
47537
48065
|
for (const [key, item] of Object.entries(data))
|
|
47538
48066
|
newHead[key] = encode(item, [key]);
|
|
47539
48067
|
yield newHead;
|
|
@@ -47641,8 +48169,6 @@ function sseStreamProducer(opts) {
|
|
|
47641
48169
|
count: 1,
|
|
47642
48170
|
gracePeriodMs: 1
|
|
47643
48171
|
});
|
|
47644
|
-
if (opts.maxDurationMs && opts.maxDurationMs > 0 && opts.maxDurationMs !== Infinity)
|
|
47645
|
-
iterable = withMaxDuration(iterable, { maxDurationMs: opts.maxDurationMs });
|
|
47646
48172
|
if (ping.enabled && ping.intervalMs !== Infinity && ping.intervalMs > 0)
|
|
47647
48173
|
iterable = withPing(iterable, ping.intervalMs);
|
|
47648
48174
|
let value;
|
|
@@ -47743,6 +48269,14 @@ function errorToAsyncIterable(err) {
|
|
|
47743
48269
|
throw err;
|
|
47744
48270
|
}));
|
|
47745
48271
|
}
|
|
48272
|
+
function combinedAbortController(signal) {
|
|
48273
|
+
const controller = new AbortController;
|
|
48274
|
+
const combinedSignal = abortSignalsAnyPonyfill([signal, controller.signal]);
|
|
48275
|
+
return {
|
|
48276
|
+
signal: combinedSignal,
|
|
48277
|
+
controller
|
|
48278
|
+
};
|
|
48279
|
+
}
|
|
47746
48280
|
var TYPE_ACCEPTED_METHOD_MAP = {
|
|
47747
48281
|
mutation: ["POST"],
|
|
47748
48282
|
query: ["GET"],
|
|
@@ -47891,6 +48425,7 @@ async function resolveResponse(opts) {
|
|
|
47891
48425
|
await ctxManager.create(info);
|
|
47892
48426
|
const rpcCalls = info.calls.map(async (call) => {
|
|
47893
48427
|
const proc = call.procedure;
|
|
48428
|
+
const combinedAbort = combinedAbortController(opts.req.signal);
|
|
47894
48429
|
try {
|
|
47895
48430
|
if (opts.error)
|
|
47896
48431
|
throw opts.error;
|
|
@@ -47905,18 +48440,28 @@ async function resolveResponse(opts) {
|
|
|
47905
48440
|
message: `Unsupported ${req.method}-request to ${proc._def.type} procedure at path "${call.path}"`
|
|
47906
48441
|
});
|
|
47907
48442
|
if (proc._def.type === "subscription") {
|
|
48443
|
+
var _config$sse2;
|
|
47908
48444
|
if (info.isBatchCall)
|
|
47909
48445
|
throw new TRPCError({
|
|
47910
48446
|
code: "BAD_REQUEST",
|
|
47911
48447
|
message: `Cannot batch subscription calls`
|
|
47912
48448
|
});
|
|
48449
|
+
if ((_config$sse2 = config.sse) === null || _config$sse2 === undefined ? undefined : _config$sse2.maxDurationMs) {
|
|
48450
|
+
let cleanup = function() {
|
|
48451
|
+
clearTimeout(timer);
|
|
48452
|
+
combinedAbort.signal.removeEventListener("abort", cleanup);
|
|
48453
|
+
combinedAbort.controller.abort();
|
|
48454
|
+
};
|
|
48455
|
+
const timer = setTimeout(cleanup, config.sse.maxDurationMs);
|
|
48456
|
+
combinedAbort.signal.addEventListener("abort", cleanup);
|
|
48457
|
+
}
|
|
47913
48458
|
}
|
|
47914
48459
|
const data = await proc({
|
|
47915
48460
|
path: call.path,
|
|
47916
48461
|
getRawInput: call.getRawInput,
|
|
47917
48462
|
ctx: ctxManager.value(),
|
|
47918
48463
|
type: proc._def.type,
|
|
47919
|
-
signal:
|
|
48464
|
+
signal: combinedAbort.signal
|
|
47920
48465
|
});
|
|
47921
48466
|
return [undefined, { data }];
|
|
47922
48467
|
} catch (cause) {
|
|
@@ -48159,7 +48704,7 @@ async function resolveResponse(opts) {
|
|
|
48159
48704
|
}
|
|
48160
48705
|
}
|
|
48161
48706
|
|
|
48162
|
-
// ../../node_modules/.pnpm/@trpc+server@11.8.
|
|
48707
|
+
// ../../node_modules/.pnpm/@trpc+server@11.8.1_typescript@5.9.3/node_modules/@trpc/server/dist/initTRPC-T5bbc89W.mjs
|
|
48163
48708
|
var import_objectSpread2$2 = __toESM2(require_objectSpread2(), 1);
|
|
48164
48709
|
var middlewareMarker = "middlewareMarker";
|
|
48165
48710
|
function createMiddlewareFactory() {
|
|
@@ -48469,13 +49014,16 @@ var TRPCBuilder = class TRPCBuilder2 {
|
|
|
48469
49014
|
};
|
|
48470
49015
|
var initTRPC = new TRPCBuilder;
|
|
48471
49016
|
|
|
48472
|
-
// ../../node_modules/.pnpm/@trpc+server@11.8.
|
|
49017
|
+
// ../../node_modules/.pnpm/@trpc+server@11.8.1_typescript@5.9.3/node_modules/@trpc/server/dist/node-http-pD5xpNfK.mjs
|
|
49018
|
+
import { IncomingMessage } from "http";
|
|
48473
49019
|
function createBody(req, opts) {
|
|
48474
49020
|
if ("body" in req) {
|
|
48475
49021
|
if (req.body === undefined)
|
|
48476
49022
|
return;
|
|
48477
49023
|
if (typeof req.body === "string")
|
|
48478
49024
|
return req.body;
|
|
49025
|
+
if (req.body instanceof IncomingMessage)
|
|
49026
|
+
return req.body;
|
|
48479
49027
|
return JSON.stringify(req.body);
|
|
48480
49028
|
}
|
|
48481
49029
|
let size = 0;
|
|
@@ -48675,7 +49223,7 @@ async function nodeHTTPRequestHandler(opts) {
|
|
|
48675
49223
|
});
|
|
48676
49224
|
}
|
|
48677
49225
|
|
|
48678
|
-
// ../../node_modules/.pnpm/@trpc+server@11.8.
|
|
49226
|
+
// ../../node_modules/.pnpm/@trpc+server@11.8.1_typescript@5.9.3/node_modules/@trpc/server/dist/adapters/standalone.mjs
|
|
48679
49227
|
var import_objectSpread26 = __toESM2(require_objectSpread2(), 1);
|
|
48680
49228
|
function createHandler(opts) {
|
|
48681
49229
|
var _opts$basePath;
|
|
@@ -51550,7 +52098,7 @@ function selectorFamily(options) {
|
|
|
51550
52098
|
var import_cors = __toESM(require_lib(), 1);
|
|
51551
52099
|
var import_cron2 = __toESM(require_dist(), 1);
|
|
51552
52100
|
|
|
51553
|
-
// ../../node_modules/.pnpm/socket.io@4.8.
|
|
52101
|
+
// ../../node_modules/.pnpm/socket.io@4.8.3/node_modules/socket.io/wrapper.mjs
|
|
51554
52102
|
var import_dist = __toESM(require_dist3(), 1);
|
|
51555
52103
|
var { Server, Namespace, Socket } = import_dist.default;
|
|
51556
52104
|
|
|
@@ -60189,32 +60737,34 @@ var ParentSocket = class extends CustomSocket {
|
|
|
60189
60737
|
this.id = this.proc.pid?.toString();
|
|
60190
60738
|
this.on(`user-joins`, (userKey) => {
|
|
60191
60739
|
this.logger.info(`\uD83D\uDC64`, userKey, `joined`);
|
|
60740
|
+
if (this.relays.get(userKey))
|
|
60741
|
+
return;
|
|
60192
60742
|
const relay = new SubjectSocket(userKey);
|
|
60193
60743
|
this.relays.set(userKey, relay);
|
|
60194
|
-
this.logger.info(`\uD83D\uDD17`, `attaching services for
|
|
60744
|
+
this.logger.info(`\uD83D\uDD17`, `attaching relay services for`, userKey);
|
|
60195
60745
|
const cleanupRelay = this.initRelay(relay, userKey);
|
|
60196
60746
|
if (cleanupRelay)
|
|
60197
60747
|
relay.disposalFunctions.push(cleanupRelay);
|
|
60198
60748
|
this.on(userKey, (...data) => {
|
|
60199
60749
|
relay.in.next(data);
|
|
60200
60750
|
});
|
|
60201
|
-
relay.out.subscribe(`socket`, (data) => {
|
|
60202
|
-
this.emit(...data);
|
|
60203
|
-
});
|
|
60751
|
+
relay.disposalFunctions.push(relay.out.subscribe(`socket`, (data) => {
|
|
60752
|
+
this.emit(userKey, ...data);
|
|
60753
|
+
}));
|
|
60204
60754
|
});
|
|
60205
|
-
this.on(`user-leaves`, (
|
|
60206
|
-
const relay = this.relays.get(
|
|
60207
|
-
this.off(
|
|
60755
|
+
this.on(`user-leaves`, (userKey) => {
|
|
60756
|
+
const relay = this.relays.get(userKey);
|
|
60757
|
+
this.off(userKey);
|
|
60208
60758
|
if (relay) {
|
|
60209
60759
|
relay.dispose();
|
|
60210
|
-
this.relays.delete(
|
|
60760
|
+
this.relays.delete(userKey);
|
|
60211
60761
|
}
|
|
60212
60762
|
});
|
|
60213
60763
|
this.proc.stdout.write(PROOF_OF_LIFE_SIGNAL);
|
|
60214
60764
|
}
|
|
60215
60765
|
receiveRelay(attachServices) {
|
|
60216
|
-
this.logger.info(`\uD83D\uDD17`, `running relay method`);
|
|
60217
60766
|
this.initRelay = attachServices;
|
|
60767
|
+
this.logger.info(`\uD83D\uDD17`, `ready to relay`);
|
|
60218
60768
|
}
|
|
60219
60769
|
};
|
|
60220
60770
|
var ChildSocket = class extends CustomSocket {
|
|
@@ -60278,6 +60828,7 @@ var ChildSocket = class extends CustomSocket {
|
|
|
60278
60828
|
continue;
|
|
60279
60829
|
try {
|
|
60280
60830
|
const jsonPiece = parseJson(piece);
|
|
60831
|
+
this.logger.info(`\uD83D\uDCB8`, `emitted`, jsonPiece);
|
|
60281
60832
|
this.handleEvent(...jsonPiece);
|
|
60282
60833
|
this.incompleteData = ``;
|
|
60283
60834
|
} catch (thrown0) {
|
|
@@ -60296,6 +60847,7 @@ var ChildSocket = class extends CustomSocket {
|
|
|
60296
60847
|
if (idx === 0) {
|
|
60297
60848
|
this.incompleteData = piece;
|
|
60298
60849
|
const maybeActualJsonPiece = parseJson(initialMaybeWellFormed);
|
|
60850
|
+
this.logger.info(`\uD83D\uDCB8`, `emitted`, maybeActualJsonPiece);
|
|
60299
60851
|
this.handleEvent(...maybeActualJsonPiece);
|
|
60300
60852
|
this.incompleteData = ``;
|
|
60301
60853
|
} else
|