@dxos/network-manager 0.3.3-main.ff5734a → 0.3.3
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/lib/browser/{chunk-DBVOJAYS.mjs → chunk-DMOCNTZB.mjs} +75 -64
- package/dist/lib/browser/chunk-DMOCNTZB.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +3 -3
- package/dist/lib/node/index.cjs +72 -61
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/testing/index.cjs +72 -61
- package/dist/lib/node/testing/index.cjs.map +3 -3
- package/dist/types/src/signal/swarm-messenger.d.ts.map +1 -1
- package/dist/types/src/swarm/swarm.d.ts.map +1 -1
- package/package.json +17 -17
- package/src/signal/swarm-messenger.ts +6 -2
- package/src/swarm/connection.ts +4 -4
- package/src/swarm/peer.ts +2 -2
- package/src/swarm/swarm.ts +2 -1
- package/src/transport/libdatachannel-transport.ts +1 -1
- package/src/transport/simplepeer-transport.ts +1 -1
- package/dist/lib/browser/chunk-DBVOJAYS.mjs.map +0 -7
package/dist/lib/node/index.cjs
CHANGED
|
@@ -561,7 +561,7 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
561
561
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
562
562
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
563
563
|
}
|
|
564
|
-
var __dxlog_file = "/
|
|
564
|
+
var __dxlog_file = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/swarm/connection.ts";
|
|
565
565
|
var STARTING_SIGNALLING_DELAY = 10;
|
|
566
566
|
var TRANSPORT_CONNECTION_TIMEOUT = 1e4;
|
|
567
567
|
var MAX_SIGNALLING_DELAY = 300;
|
|
@@ -699,7 +699,7 @@ var Connection = class {
|
|
|
699
699
|
this.close(new import_protocols.ProtocolError("protocol stream closed")).catch((err) => this.errors.raise(err));
|
|
700
700
|
});
|
|
701
701
|
(0, import_async.scheduleTask)(this.connectedTimeoutContext, async () => {
|
|
702
|
-
import_log.log.
|
|
702
|
+
import_log.log.info("timeout waiting for transport to connect, aborting", void 0, {
|
|
703
703
|
F: __dxlog_file,
|
|
704
704
|
L: 180,
|
|
705
705
|
S: this,
|
|
@@ -749,7 +749,7 @@ var Connection = class {
|
|
|
749
749
|
this.closeReason = err?.message;
|
|
750
750
|
}
|
|
751
751
|
if (err instanceof import_protocols.ConnectionResetError) {
|
|
752
|
-
import_log.log.
|
|
752
|
+
import_log.log.info("aborting due to transport ConnectionResetError", void 0, {
|
|
753
753
|
F: __dxlog_file,
|
|
754
754
|
L: 213,
|
|
755
755
|
S: this,
|
|
@@ -757,7 +757,7 @@ var Connection = class {
|
|
|
757
757
|
});
|
|
758
758
|
this.abort().catch((err2) => this.errors.raise(err2));
|
|
759
759
|
} else if (err instanceof import_protocols.ConnectivityError) {
|
|
760
|
-
import_log.log.
|
|
760
|
+
import_log.log.info("aborting due to transport ConnectivityError", void 0, {
|
|
761
761
|
F: __dxlog_file,
|
|
762
762
|
L: 216,
|
|
763
763
|
S: this,
|
|
@@ -940,7 +940,7 @@ var Connection = class {
|
|
|
940
940
|
if (err instanceof import_protocols.CancelledError || err instanceof Error && err.message?.includes("CANCELLED")) {
|
|
941
941
|
return;
|
|
942
942
|
}
|
|
943
|
-
import_log.log.
|
|
943
|
+
import_log.log.info("signal message failed to deliver", {
|
|
944
944
|
err
|
|
945
945
|
}, {
|
|
946
946
|
F: __dxlog_file,
|
|
@@ -1107,7 +1107,7 @@ function _ts_decorate2(decorators, target, key, desc) {
|
|
|
1107
1107
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1108
1108
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1109
1109
|
}
|
|
1110
|
-
var __dxlog_file2 = "/
|
|
1110
|
+
var __dxlog_file2 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/swarm/peer.ts";
|
|
1111
1111
|
var ConnectionDisplacedError = class extends import_protocols2.SystemError {
|
|
1112
1112
|
constructor() {
|
|
1113
1113
|
super("Connection displaced by remote initiator.");
|
|
@@ -1192,7 +1192,7 @@ var Peer = class {
|
|
|
1192
1192
|
await connection.openConnection();
|
|
1193
1193
|
} catch (err) {
|
|
1194
1194
|
if (!(err instanceof import_protocols2.CancelledError)) {
|
|
1195
|
-
import_log2.log.
|
|
1195
|
+
import_log2.log.info("connection error", {
|
|
1196
1196
|
topic: this.topic,
|
|
1197
1197
|
peerId: this.localPeerId,
|
|
1198
1198
|
remoteId: this.id,
|
|
@@ -1475,7 +1475,7 @@ var Peer = class {
|
|
|
1475
1475
|
void this._connectionCtx?.dispose();
|
|
1476
1476
|
this._connectionCtx = this._ctx.derive();
|
|
1477
1477
|
connection.errors.handle((err) => {
|
|
1478
|
-
import_log2.log.
|
|
1478
|
+
import_log2.log.info("connection error, closing", {
|
|
1479
1479
|
topic: this.topic,
|
|
1480
1480
|
peerId: this.localPeerId,
|
|
1481
1481
|
remoteId: this.id,
|
|
@@ -1581,7 +1581,7 @@ var import_keys3 = require("@dxos/keys");
|
|
|
1581
1581
|
var import_log3 = require("@dxos/log");
|
|
1582
1582
|
var import_protocols3 = require("@dxos/protocols");
|
|
1583
1583
|
var import_util = require("@dxos/util");
|
|
1584
|
-
var __dxlog_file3 = "/
|
|
1584
|
+
var __dxlog_file3 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/signal/swarm-messenger.ts";
|
|
1585
1585
|
var SwarmMessage = import_protocols3.schema.getCodecForType("dxos.mesh.swarm.SwarmMessage");
|
|
1586
1586
|
var SwarmMessenger = class {
|
|
1587
1587
|
constructor({ sendMessage, onSignal, onOffer, topic }) {
|
|
@@ -1764,20 +1764,31 @@ var SwarmMessenger = class {
|
|
|
1764
1764
|
}
|
|
1765
1765
|
});
|
|
1766
1766
|
} catch (err) {
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1767
|
+
if (err instanceof import_protocols3.TimeoutError) {
|
|
1768
|
+
import_log3.log.info("timeout sending answer to offer", {
|
|
1769
|
+
err
|
|
1770
|
+
}, {
|
|
1771
|
+
F: __dxlog_file3,
|
|
1772
|
+
L: 175,
|
|
1773
|
+
S: this,
|
|
1774
|
+
C: (f, a) => f(...a)
|
|
1775
|
+
});
|
|
1776
|
+
} else {
|
|
1777
|
+
import_log3.log.info("error sending answer to offer", {
|
|
1778
|
+
err
|
|
1779
|
+
}, {
|
|
1780
|
+
F: __dxlog_file3,
|
|
1781
|
+
L: 177,
|
|
1782
|
+
S: this,
|
|
1783
|
+
C: (f, a) => f(...a)
|
|
1784
|
+
});
|
|
1785
|
+
}
|
|
1775
1786
|
}
|
|
1776
1787
|
}
|
|
1777
1788
|
async _handleSignal({ author, recipient, message }) {
|
|
1778
1789
|
(0, import_invariant3.invariant)(message.messageId, void 0, {
|
|
1779
1790
|
F: __dxlog_file3,
|
|
1780
|
-
L:
|
|
1791
|
+
L: 191,
|
|
1781
1792
|
S: this,
|
|
1782
1793
|
A: [
|
|
1783
1794
|
"message.messageId",
|
|
@@ -1786,7 +1797,7 @@ var SwarmMessenger = class {
|
|
|
1786
1797
|
});
|
|
1787
1798
|
(0, import_invariant3.invariant)(message.data.signal || message.data.signalBatch, "Invalid message", {
|
|
1788
1799
|
F: __dxlog_file3,
|
|
1789
|
-
L:
|
|
1800
|
+
L: 192,
|
|
1790
1801
|
S: this,
|
|
1791
1802
|
A: [
|
|
1792
1803
|
"message.data.signal || message.data.signalBatch",
|
|
@@ -1817,7 +1828,7 @@ function _ts_decorate3(decorators, target, key, desc) {
|
|
|
1817
1828
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1818
1829
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1819
1830
|
}
|
|
1820
|
-
var __dxlog_file4 = "/
|
|
1831
|
+
var __dxlog_file4 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/swarm/swarm.ts";
|
|
1821
1832
|
var INITIATION_DELAY = 100;
|
|
1822
1833
|
var getClassName = (obj) => Object.getPrototypeOf(obj).constructor.name;
|
|
1823
1834
|
var Swarm = class {
|
|
@@ -1906,11 +1917,11 @@ var Swarm = class {
|
|
|
1906
1917
|
peerId: this._ownPeerId,
|
|
1907
1918
|
payloadType: "dxos.mesh.swarm.SwarmMessage",
|
|
1908
1919
|
onMessage: async (message) => {
|
|
1909
|
-
await this._swarmMessenger.receiveMessage(message).catch((err) => import_log4.log.
|
|
1920
|
+
await this._swarmMessenger.receiveMessage(message).catch((err) => import_log4.log.info("Error while receiving message", {
|
|
1910
1921
|
err
|
|
1911
1922
|
}, {
|
|
1912
1923
|
F: __dxlog_file4,
|
|
1913
|
-
L:
|
|
1924
|
+
L: 136,
|
|
1914
1925
|
S: this,
|
|
1915
1926
|
C: (f, a) => f(...a)
|
|
1916
1927
|
}));
|
|
@@ -1920,7 +1931,7 @@ var Swarm = class {
|
|
|
1920
1931
|
async destroy() {
|
|
1921
1932
|
(0, import_log4.log)("destroying...", void 0, {
|
|
1922
1933
|
F: __dxlog_file4,
|
|
1923
|
-
L:
|
|
1934
|
+
L: 142,
|
|
1924
1935
|
S: this,
|
|
1925
1936
|
C: (f, a) => f(...a)
|
|
1926
1937
|
});
|
|
@@ -1931,7 +1942,7 @@ var Swarm = class {
|
|
|
1931
1942
|
await Promise.all(Array.from(this._peers.keys()).map((key) => this._destroyPeer(key, "swarm destroyed")));
|
|
1932
1943
|
(0, import_log4.log)("destroyed", void 0, {
|
|
1933
1944
|
F: __dxlog_file4,
|
|
1934
|
-
L:
|
|
1945
|
+
L: 149,
|
|
1935
1946
|
S: this,
|
|
1936
1947
|
C: (f, a) => f(...a)
|
|
1937
1948
|
});
|
|
@@ -1939,7 +1950,7 @@ var Swarm = class {
|
|
|
1939
1950
|
async setTopology(topology) {
|
|
1940
1951
|
(0, import_invariant4.invariant)(!this._ctx.disposed, "Swarm is offline", {
|
|
1941
1952
|
F: __dxlog_file4,
|
|
1942
|
-
L:
|
|
1953
|
+
L: 153,
|
|
1943
1954
|
S: this,
|
|
1944
1955
|
A: [
|
|
1945
1956
|
"!this._ctx.disposed",
|
|
@@ -1954,7 +1965,7 @@ var Swarm = class {
|
|
|
1954
1965
|
topology: getClassName(topology)
|
|
1955
1966
|
}, {
|
|
1956
1967
|
F: __dxlog_file4,
|
|
1957
|
-
L:
|
|
1968
|
+
L: 157,
|
|
1958
1969
|
S: this,
|
|
1959
1970
|
C: (f, a) => f(...a)
|
|
1960
1971
|
});
|
|
@@ -1968,14 +1979,14 @@ var Swarm = class {
|
|
|
1968
1979
|
swarmEvent
|
|
1969
1980
|
}, {
|
|
1970
1981
|
F: __dxlog_file4,
|
|
1971
|
-
L:
|
|
1982
|
+
L: 170,
|
|
1972
1983
|
S: this,
|
|
1973
1984
|
C: (f, a) => f(...a)
|
|
1974
1985
|
});
|
|
1975
1986
|
if (this._ctx.disposed) {
|
|
1976
1987
|
(0, import_log4.log)("swarm event ignored for disposed swarm", void 0, {
|
|
1977
1988
|
F: __dxlog_file4,
|
|
1978
|
-
L:
|
|
1989
|
+
L: 173,
|
|
1979
1990
|
S: this,
|
|
1980
1991
|
C: (f, a) => f(...a)
|
|
1981
1992
|
});
|
|
@@ -1987,7 +1998,7 @@ var Swarm = class {
|
|
|
1987
1998
|
peerId
|
|
1988
1999
|
}, {
|
|
1989
2000
|
F: __dxlog_file4,
|
|
1990
|
-
L:
|
|
2001
|
+
L: 179,
|
|
1991
2002
|
S: this,
|
|
1992
2003
|
C: (f, a) => f(...a)
|
|
1993
2004
|
});
|
|
@@ -2002,7 +2013,7 @@ var Swarm = class {
|
|
|
2002
2013
|
if (peer.connection?.state !== ConnectionState.CONNECTED) {
|
|
2003
2014
|
void this._destroyPeer(peer.id, "peer left").catch((err) => import_log4.log.catch(err, void 0, {
|
|
2004
2015
|
F: __dxlog_file4,
|
|
2005
|
-
L:
|
|
2016
|
+
L: 190,
|
|
2006
2017
|
S: this,
|
|
2007
2018
|
C: (f, a) => f(...a)
|
|
2008
2019
|
}));
|
|
@@ -2012,7 +2023,7 @@ var Swarm = class {
|
|
|
2012
2023
|
peer: swarmEvent.peerLeft.peer
|
|
2013
2024
|
}, {
|
|
2014
2025
|
F: __dxlog_file4,
|
|
2015
|
-
L:
|
|
2026
|
+
L: 193,
|
|
2016
2027
|
S: this,
|
|
2017
2028
|
C: (f, a) => f(...a)
|
|
2018
2029
|
});
|
|
@@ -2025,14 +2036,14 @@ var Swarm = class {
|
|
|
2025
2036
|
message
|
|
2026
2037
|
}, {
|
|
2027
2038
|
F: __dxlog_file4,
|
|
2028
|
-
L:
|
|
2039
|
+
L: 202,
|
|
2029
2040
|
S: this,
|
|
2030
2041
|
C: (f, a) => f(...a)
|
|
2031
2042
|
});
|
|
2032
2043
|
if (this._ctx.disposed) {
|
|
2033
2044
|
(0, import_log4.log)("ignored for disposed swarm", void 0, {
|
|
2034
2045
|
F: __dxlog_file4,
|
|
2035
|
-
L:
|
|
2046
|
+
L: 204,
|
|
2036
2047
|
S: this,
|
|
2037
2048
|
C: (f, a) => f(...a)
|
|
2038
2049
|
});
|
|
@@ -2042,7 +2053,7 @@ var Swarm = class {
|
|
|
2042
2053
|
}
|
|
2043
2054
|
(0, import_invariant4.invariant)(message.author, void 0, {
|
|
2044
2055
|
F: __dxlog_file4,
|
|
2045
|
-
L:
|
|
2056
|
+
L: 209,
|
|
2046
2057
|
S: this,
|
|
2047
2058
|
A: [
|
|
2048
2059
|
"message.author",
|
|
@@ -2054,7 +2065,7 @@ var Swarm = class {
|
|
|
2054
2065
|
message
|
|
2055
2066
|
}, {
|
|
2056
2067
|
F: __dxlog_file4,
|
|
2057
|
-
L:
|
|
2068
|
+
L: 211,
|
|
2058
2069
|
S: this,
|
|
2059
2070
|
C: (f, a) => f(...a)
|
|
2060
2071
|
});
|
|
@@ -2067,7 +2078,7 @@ var Swarm = class {
|
|
|
2067
2078
|
message
|
|
2068
2079
|
}, {
|
|
2069
2080
|
F: __dxlog_file4,
|
|
2070
|
-
L:
|
|
2081
|
+
L: 215,
|
|
2071
2082
|
S: this,
|
|
2072
2083
|
C: (f, a) => f(...a)
|
|
2073
2084
|
});
|
|
@@ -2085,14 +2096,14 @@ var Swarm = class {
|
|
|
2085
2096
|
message
|
|
2086
2097
|
}, {
|
|
2087
2098
|
F: __dxlog_file4,
|
|
2088
|
-
L:
|
|
2099
|
+
L: 226,
|
|
2089
2100
|
S: this,
|
|
2090
2101
|
C: (f, a) => f(...a)
|
|
2091
2102
|
});
|
|
2092
2103
|
if (this._ctx.disposed) {
|
|
2093
2104
|
import_log4.log.info("ignored for offline swarm", void 0, {
|
|
2094
2105
|
F: __dxlog_file4,
|
|
2095
|
-
L:
|
|
2106
|
+
L: 228,
|
|
2096
2107
|
S: this,
|
|
2097
2108
|
C: (f, a) => f(...a)
|
|
2098
2109
|
});
|
|
@@ -2100,7 +2111,7 @@ var Swarm = class {
|
|
|
2100
2111
|
}
|
|
2101
2112
|
(0, import_invariant4.invariant)(message.recipient?.equals(this._ownPeerId), `Invalid signal peer id expected=${this.ownPeerId}, actual=${message.recipient}`, {
|
|
2102
2113
|
F: __dxlog_file4,
|
|
2103
|
-
L:
|
|
2114
|
+
L: 231,
|
|
2104
2115
|
S: this,
|
|
2105
2116
|
A: [
|
|
2106
2117
|
"message.recipient?.equals(this._ownPeerId)",
|
|
@@ -2109,7 +2120,7 @@ var Swarm = class {
|
|
|
2109
2120
|
});
|
|
2110
2121
|
(0, import_invariant4.invariant)(message.topic?.equals(this._topic), void 0, {
|
|
2111
2122
|
F: __dxlog_file4,
|
|
2112
|
-
L:
|
|
2123
|
+
L: 235,
|
|
2113
2124
|
S: this,
|
|
2114
2125
|
A: [
|
|
2115
2126
|
"message.topic?.equals(this._topic)",
|
|
@@ -2118,7 +2129,7 @@ var Swarm = class {
|
|
|
2118
2129
|
});
|
|
2119
2130
|
(0, import_invariant4.invariant)(message.author, void 0, {
|
|
2120
2131
|
F: __dxlog_file4,
|
|
2121
|
-
L:
|
|
2132
|
+
L: 236,
|
|
2122
2133
|
S: this,
|
|
2123
2134
|
A: [
|
|
2124
2135
|
"message.author",
|
|
@@ -2162,7 +2173,7 @@ var Swarm = class {
|
|
|
2162
2173
|
peerId
|
|
2163
2174
|
}, {
|
|
2164
2175
|
F: __dxlog_file4,
|
|
2165
|
-
L:
|
|
2176
|
+
L: 285,
|
|
2166
2177
|
S: this,
|
|
2167
2178
|
C: (f, a) => f(...a)
|
|
2168
2179
|
});
|
|
@@ -2186,7 +2197,7 @@ var Swarm = class {
|
|
|
2186
2197
|
async _destroyPeer(peerId, reason) {
|
|
2187
2198
|
(0, import_invariant4.invariant)(this._peers.has(peerId), void 0, {
|
|
2188
2199
|
F: __dxlog_file4,
|
|
2189
|
-
L:
|
|
2200
|
+
L: 307,
|
|
2190
2201
|
S: this,
|
|
2191
2202
|
A: [
|
|
2192
2203
|
"this._peers.has(peerId)",
|
|
@@ -2213,7 +2224,7 @@ var Swarm = class {
|
|
|
2213
2224
|
} catch (err) {
|
|
2214
2225
|
(0, import_log4.log)("initiation error", err, {
|
|
2215
2226
|
F: __dxlog_file4,
|
|
2216
|
-
L:
|
|
2227
|
+
L: 333,
|
|
2217
2228
|
S: this,
|
|
2218
2229
|
C: (f, a) => f(...a)
|
|
2219
2230
|
});
|
|
@@ -2241,7 +2252,7 @@ var Swarm = class {
|
|
|
2241
2252
|
remoteId
|
|
2242
2253
|
}, {
|
|
2243
2254
|
F: __dxlog_file4,
|
|
2244
|
-
L:
|
|
2255
|
+
L: 360,
|
|
2245
2256
|
S: this,
|
|
2246
2257
|
C: (f, a) => f(...a)
|
|
2247
2258
|
});
|
|
@@ -2258,7 +2269,7 @@ var Swarm = class {
|
|
|
2258
2269
|
remoteId
|
|
2259
2270
|
}, {
|
|
2260
2271
|
F: __dxlog_file4,
|
|
2261
|
-
L:
|
|
2272
|
+
L: 374,
|
|
2262
2273
|
S: this,
|
|
2263
2274
|
C: (f, a) => f(...a)
|
|
2264
2275
|
});
|
|
@@ -2268,7 +2279,7 @@ var Swarm = class {
|
|
|
2268
2279
|
remoteId
|
|
2269
2280
|
}, {
|
|
2270
2281
|
F: __dxlog_file4,
|
|
2271
|
-
L:
|
|
2282
|
+
L: 377,
|
|
2272
2283
|
S: this,
|
|
2273
2284
|
C: (f, a) => f(...a)
|
|
2274
2285
|
});
|
|
@@ -2308,7 +2319,7 @@ var import_async4 = require("@dxos/async");
|
|
|
2308
2319
|
var import_keys5 = require("@dxos/keys");
|
|
2309
2320
|
var import_log5 = require("@dxos/log");
|
|
2310
2321
|
var import_util3 = require("@dxos/util");
|
|
2311
|
-
var __dxlog_file5 = "/
|
|
2322
|
+
var __dxlog_file5 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/swarm/swarm-mapper.ts";
|
|
2312
2323
|
var SwarmMapper = class {
|
|
2313
2324
|
get peers() {
|
|
2314
2325
|
return Array.from(this._peers.values());
|
|
@@ -2380,7 +2391,7 @@ var import_keys6 = require("@dxos/keys");
|
|
|
2380
2391
|
var import_log6 = require("@dxos/log");
|
|
2381
2392
|
var import_protocols5 = require("@dxos/protocols");
|
|
2382
2393
|
var import_util4 = require("@dxos/util");
|
|
2383
|
-
var __dxlog_file6 = "/
|
|
2394
|
+
var __dxlog_file6 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/swarm/connection-limiter.ts";
|
|
2384
2395
|
var MAX_CONCURRENT_INITIATING_CONNECTIONS = 50;
|
|
2385
2396
|
var ConnectionLimiter = class {
|
|
2386
2397
|
constructor({ maxConcurrentInitConnections = MAX_CONCURRENT_INITIATING_CONNECTIONS } = {}) {
|
|
@@ -2531,7 +2542,7 @@ var import_messaging = require("@dxos/messaging");
|
|
|
2531
2542
|
var import_protocols6 = require("@dxos/protocols");
|
|
2532
2543
|
var import_services = require("@dxos/protocols/proto/dxos/client/services");
|
|
2533
2544
|
var import_util6 = require("@dxos/util");
|
|
2534
|
-
var __dxlog_file7 = "/
|
|
2545
|
+
var __dxlog_file7 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/network-manager.ts";
|
|
2535
2546
|
var NetworkManager = class {
|
|
2536
2547
|
constructor({ transportFactory, signalManager, log: log1 }) {
|
|
2537
2548
|
/**
|
|
@@ -2767,7 +2778,7 @@ var NetworkManager = class {
|
|
|
2767
2778
|
|
|
2768
2779
|
// packages/core/mesh/network-manager/src/topology/fully-connected-topology.ts
|
|
2769
2780
|
var import_invariant7 = require("@dxos/invariant");
|
|
2770
|
-
var __dxlog_file8 = "/
|
|
2781
|
+
var __dxlog_file8 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/topology/fully-connected-topology.ts";
|
|
2771
2782
|
var FullyConnectedTopology = class {
|
|
2772
2783
|
toString() {
|
|
2773
2784
|
return "FullyConnectedTopology";
|
|
@@ -2810,7 +2821,7 @@ var FullyConnectedTopology = class {
|
|
|
2810
2821
|
var import_xor_distance = __toESM(require("xor-distance"));
|
|
2811
2822
|
var import_invariant8 = require("@dxos/invariant");
|
|
2812
2823
|
var import_log8 = require("@dxos/log");
|
|
2813
|
-
var __dxlog_file9 = "/
|
|
2824
|
+
var __dxlog_file9 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/topology/mmst-topology.ts";
|
|
2814
2825
|
var MMSTTopology = class {
|
|
2815
2826
|
constructor({ originateConnections = 2, maxPeers = 4, sampleSize = 10 } = {}) {
|
|
2816
2827
|
this._sampleCollected = false;
|
|
@@ -2919,7 +2930,7 @@ var sortByXorDistance = (keys, reference) => keys.sort((a, b) => import_xor_dist
|
|
|
2919
2930
|
// packages/core/mesh/network-manager/src/topology/star-topology.ts
|
|
2920
2931
|
var import_invariant9 = require("@dxos/invariant");
|
|
2921
2932
|
var import_log9 = require("@dxos/log");
|
|
2922
|
-
var __dxlog_file10 = "/
|
|
2933
|
+
var __dxlog_file10 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/topology/star-topology.ts";
|
|
2923
2934
|
var StarTopology = class {
|
|
2924
2935
|
constructor(_centralPeer) {
|
|
2925
2936
|
this._centralPeer = _centralPeer;
|
|
@@ -3030,7 +3041,7 @@ function _ts_decorate4(decorators, target, key, desc) {
|
|
|
3030
3041
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3031
3042
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3032
3043
|
}
|
|
3033
|
-
var __dxlog_file11 = "/
|
|
3044
|
+
var __dxlog_file11 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/transport/memory-transport.ts";
|
|
3034
3045
|
var MEMORY_TRANSPORT_DELAY = 1;
|
|
3035
3046
|
var createStreamDelay = (delay) => {
|
|
3036
3047
|
return new import_node_stream.Transform({
|
|
@@ -3225,7 +3236,7 @@ try {
|
|
|
3225
3236
|
}
|
|
3226
3237
|
|
|
3227
3238
|
// packages/core/mesh/network-manager/src/transport/simplepeer-transport.ts
|
|
3228
|
-
var __dxlog_file12 = "/
|
|
3239
|
+
var __dxlog_file12 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/transport/simplepeer-transport.ts";
|
|
3229
3240
|
var SimplePeerTransport = class {
|
|
3230
3241
|
constructor(params) {
|
|
3231
3242
|
this.params = params;
|
|
@@ -3335,7 +3346,7 @@ var SimplePeerTransport = class {
|
|
|
3335
3346
|
try {
|
|
3336
3347
|
if (typeof this._peer?._pc?.getStats === "function") {
|
|
3337
3348
|
this._peer._pc.getStats().then((stats) => {
|
|
3338
|
-
import_log11.log.
|
|
3349
|
+
import_log11.log.info("report after webrtc error", {
|
|
3339
3350
|
config: this.params.webrtcConfig,
|
|
3340
3351
|
stats
|
|
3341
3352
|
}, {
|
|
@@ -3414,7 +3425,7 @@ var import_keys11 = require("@dxos/keys");
|
|
|
3414
3425
|
var import_log12 = require("@dxos/log");
|
|
3415
3426
|
var import_bridge = require("@dxos/protocols/proto/dxos/mesh/bridge");
|
|
3416
3427
|
var import_util8 = require("@dxos/util");
|
|
3417
|
-
var __dxlog_file13 = "/
|
|
3428
|
+
var __dxlog_file13 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/transport/simplepeer-transport-service.ts";
|
|
3418
3429
|
var SimplePeerTransportService = class {
|
|
3419
3430
|
constructor(_webrtcConfig) {
|
|
3420
3431
|
this._webrtcConfig = _webrtcConfig;
|
|
@@ -3557,7 +3568,7 @@ var import_log13 = require("@dxos/log");
|
|
|
3557
3568
|
var import_protocols8 = require("@dxos/protocols");
|
|
3558
3569
|
var import_bridge2 = require("@dxos/protocols/proto/dxos/mesh/bridge");
|
|
3559
3570
|
var import_util9 = require("@dxos/util");
|
|
3560
|
-
var __dxlog_file14 = "/
|
|
3571
|
+
var __dxlog_file14 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/transport/simplepeer-transport-proxy.ts";
|
|
3561
3572
|
var SimplePeerTransportProxy = class {
|
|
3562
3573
|
constructor(_params) {
|
|
3563
3574
|
this._params = _params;
|
|
@@ -3737,7 +3748,7 @@ function _ts_decorate5(decorators, target, key, desc) {
|
|
|
3737
3748
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3738
3749
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3739
3750
|
}
|
|
3740
|
-
var __dxlog_file15 = "/
|
|
3751
|
+
var __dxlog_file15 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/transport/libdatachannel-transport.ts";
|
|
3741
3752
|
var DATACHANNEL_LABEL = "dxos.mesh.transport";
|
|
3742
3753
|
var MAX_BUFFERED_AMOUNT = 64 * 1024;
|
|
3743
3754
|
var MAX_MESSAGE_SIZE = 64 * 1024;
|
|
@@ -3804,7 +3815,7 @@ var LibDataChannelTransport = class {
|
|
|
3804
3815
|
}
|
|
3805
3816
|
});
|
|
3806
3817
|
} catch (err) {
|
|
3807
|
-
import_log14.log.
|
|
3818
|
+
import_log14.log.info("signaling errror", {
|
|
3808
3819
|
err
|
|
3809
3820
|
}, {
|
|
3810
3821
|
F: __dxlog_file15,
|
|
@@ -4066,7 +4077,7 @@ var import_node_net = require("node:net");
|
|
|
4066
4077
|
var import_async12 = require("@dxos/async");
|
|
4067
4078
|
var import_debug8 = require("@dxos/debug");
|
|
4068
4079
|
var import_log15 = require("@dxos/log");
|
|
4069
|
-
var __dxlog_file16 = "/
|
|
4080
|
+
var __dxlog_file16 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/transport/tcp-transport.ts";
|
|
4070
4081
|
var TcpTransportFactory = {
|
|
4071
4082
|
createTransport: (params) => new TcpTransport(params)
|
|
4072
4083
|
};
|