@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
|
@@ -549,7 +549,7 @@ var createTeleportProtocolFactory = (onConnection) => {
|
|
|
549
549
|
};
|
|
550
550
|
|
|
551
551
|
// packages/core/mesh/network-manager/src/testing/test-wire-protocol.ts
|
|
552
|
-
var __dxlog_file = "/
|
|
552
|
+
var __dxlog_file = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/testing/test-wire-protocol.ts";
|
|
553
553
|
var TestWireProtocol = class {
|
|
554
554
|
constructor(peerId, _extensionFactory = () => []) {
|
|
555
555
|
this.peerId = peerId;
|
|
@@ -666,7 +666,7 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
666
666
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
667
667
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
668
668
|
}
|
|
669
|
-
var __dxlog_file2 = "/
|
|
669
|
+
var __dxlog_file2 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/swarm/connection.ts";
|
|
670
670
|
var STARTING_SIGNALLING_DELAY = 10;
|
|
671
671
|
var TRANSPORT_CONNECTION_TIMEOUT = 1e4;
|
|
672
672
|
var MAX_SIGNALLING_DELAY = 300;
|
|
@@ -804,7 +804,7 @@ var Connection = class {
|
|
|
804
804
|
this.close(new import_protocols.ProtocolError("protocol stream closed")).catch((err) => this.errors.raise(err));
|
|
805
805
|
});
|
|
806
806
|
(0, import_async2.scheduleTask)(this.connectedTimeoutContext, async () => {
|
|
807
|
-
import_log2.log.
|
|
807
|
+
import_log2.log.info("timeout waiting for transport to connect, aborting", void 0, {
|
|
808
808
|
F: __dxlog_file2,
|
|
809
809
|
L: 180,
|
|
810
810
|
S: this,
|
|
@@ -854,7 +854,7 @@ var Connection = class {
|
|
|
854
854
|
this.closeReason = err?.message;
|
|
855
855
|
}
|
|
856
856
|
if (err instanceof import_protocols.ConnectionResetError) {
|
|
857
|
-
import_log2.log.
|
|
857
|
+
import_log2.log.info("aborting due to transport ConnectionResetError", void 0, {
|
|
858
858
|
F: __dxlog_file2,
|
|
859
859
|
L: 213,
|
|
860
860
|
S: this,
|
|
@@ -862,7 +862,7 @@ var Connection = class {
|
|
|
862
862
|
});
|
|
863
863
|
this.abort().catch((err2) => this.errors.raise(err2));
|
|
864
864
|
} else if (err instanceof import_protocols.ConnectivityError) {
|
|
865
|
-
import_log2.log.
|
|
865
|
+
import_log2.log.info("aborting due to transport ConnectivityError", void 0, {
|
|
866
866
|
F: __dxlog_file2,
|
|
867
867
|
L: 216,
|
|
868
868
|
S: this,
|
|
@@ -1045,7 +1045,7 @@ var Connection = class {
|
|
|
1045
1045
|
if (err instanceof import_protocols.CancelledError || err instanceof Error && err.message?.includes("CANCELLED")) {
|
|
1046
1046
|
return;
|
|
1047
1047
|
}
|
|
1048
|
-
import_log2.log.
|
|
1048
|
+
import_log2.log.info("signal message failed to deliver", {
|
|
1049
1049
|
err
|
|
1050
1050
|
}, {
|
|
1051
1051
|
F: __dxlog_file2,
|
|
@@ -1212,7 +1212,7 @@ function _ts_decorate2(decorators, target, key, desc) {
|
|
|
1212
1212
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1213
1213
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1214
1214
|
}
|
|
1215
|
-
var __dxlog_file3 = "/
|
|
1215
|
+
var __dxlog_file3 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/swarm/peer.ts";
|
|
1216
1216
|
var ConnectionDisplacedError = class extends import_protocols2.SystemError {
|
|
1217
1217
|
constructor() {
|
|
1218
1218
|
super("Connection displaced by remote initiator.");
|
|
@@ -1297,7 +1297,7 @@ var Peer = class {
|
|
|
1297
1297
|
await connection.openConnection();
|
|
1298
1298
|
} catch (err) {
|
|
1299
1299
|
if (!(err instanceof import_protocols2.CancelledError)) {
|
|
1300
|
-
import_log3.log.
|
|
1300
|
+
import_log3.log.info("connection error", {
|
|
1301
1301
|
topic: this.topic,
|
|
1302
1302
|
peerId: this.localPeerId,
|
|
1303
1303
|
remoteId: this.id,
|
|
@@ -1580,7 +1580,7 @@ var Peer = class {
|
|
|
1580
1580
|
void this._connectionCtx?.dispose();
|
|
1581
1581
|
this._connectionCtx = this._ctx.derive();
|
|
1582
1582
|
connection.errors.handle((err) => {
|
|
1583
|
-
import_log3.log.
|
|
1583
|
+
import_log3.log.info("connection error, closing", {
|
|
1584
1584
|
topic: this.topic,
|
|
1585
1585
|
peerId: this.localPeerId,
|
|
1586
1586
|
remoteId: this.id,
|
|
@@ -1686,7 +1686,7 @@ var import_keys4 = require("@dxos/keys");
|
|
|
1686
1686
|
var import_log4 = require("@dxos/log");
|
|
1687
1687
|
var import_protocols3 = require("@dxos/protocols");
|
|
1688
1688
|
var import_util2 = require("@dxos/util");
|
|
1689
|
-
var __dxlog_file4 = "/
|
|
1689
|
+
var __dxlog_file4 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/signal/swarm-messenger.ts";
|
|
1690
1690
|
var SwarmMessage = import_protocols3.schema.getCodecForType("dxos.mesh.swarm.SwarmMessage");
|
|
1691
1691
|
var SwarmMessenger = class {
|
|
1692
1692
|
constructor({ sendMessage, onSignal, onOffer, topic }) {
|
|
@@ -1869,20 +1869,31 @@ var SwarmMessenger = class {
|
|
|
1869
1869
|
}
|
|
1870
1870
|
});
|
|
1871
1871
|
} catch (err) {
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1872
|
+
if (err instanceof import_protocols3.TimeoutError) {
|
|
1873
|
+
import_log4.log.info("timeout sending answer to offer", {
|
|
1874
|
+
err
|
|
1875
|
+
}, {
|
|
1876
|
+
F: __dxlog_file4,
|
|
1877
|
+
L: 175,
|
|
1878
|
+
S: this,
|
|
1879
|
+
C: (f, a) => f(...a)
|
|
1880
|
+
});
|
|
1881
|
+
} else {
|
|
1882
|
+
import_log4.log.info("error sending answer to offer", {
|
|
1883
|
+
err
|
|
1884
|
+
}, {
|
|
1885
|
+
F: __dxlog_file4,
|
|
1886
|
+
L: 177,
|
|
1887
|
+
S: this,
|
|
1888
|
+
C: (f, a) => f(...a)
|
|
1889
|
+
});
|
|
1890
|
+
}
|
|
1880
1891
|
}
|
|
1881
1892
|
}
|
|
1882
1893
|
async _handleSignal({ author, recipient, message }) {
|
|
1883
1894
|
(0, import_invariant3.invariant)(message.messageId, void 0, {
|
|
1884
1895
|
F: __dxlog_file4,
|
|
1885
|
-
L:
|
|
1896
|
+
L: 191,
|
|
1886
1897
|
S: this,
|
|
1887
1898
|
A: [
|
|
1888
1899
|
"message.messageId",
|
|
@@ -1891,7 +1902,7 @@ var SwarmMessenger = class {
|
|
|
1891
1902
|
});
|
|
1892
1903
|
(0, import_invariant3.invariant)(message.data.signal || message.data.signalBatch, "Invalid message", {
|
|
1893
1904
|
F: __dxlog_file4,
|
|
1894
|
-
L:
|
|
1905
|
+
L: 192,
|
|
1895
1906
|
S: this,
|
|
1896
1907
|
A: [
|
|
1897
1908
|
"message.data.signal || message.data.signalBatch",
|
|
@@ -1922,7 +1933,7 @@ function _ts_decorate3(decorators, target, key, desc) {
|
|
|
1922
1933
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1923
1934
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1924
1935
|
}
|
|
1925
|
-
var __dxlog_file5 = "/
|
|
1936
|
+
var __dxlog_file5 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/swarm/swarm.ts";
|
|
1926
1937
|
var INITIATION_DELAY = 100;
|
|
1927
1938
|
var getClassName = (obj) => Object.getPrototypeOf(obj).constructor.name;
|
|
1928
1939
|
var Swarm = class {
|
|
@@ -2011,11 +2022,11 @@ var Swarm = class {
|
|
|
2011
2022
|
peerId: this._ownPeerId,
|
|
2012
2023
|
payloadType: "dxos.mesh.swarm.SwarmMessage",
|
|
2013
2024
|
onMessage: async (message) => {
|
|
2014
|
-
await this._swarmMessenger.receiveMessage(message).catch((err) => import_log5.log.
|
|
2025
|
+
await this._swarmMessenger.receiveMessage(message).catch((err) => import_log5.log.info("Error while receiving message", {
|
|
2015
2026
|
err
|
|
2016
2027
|
}, {
|
|
2017
2028
|
F: __dxlog_file5,
|
|
2018
|
-
L:
|
|
2029
|
+
L: 136,
|
|
2019
2030
|
S: this,
|
|
2020
2031
|
C: (f, a) => f(...a)
|
|
2021
2032
|
}));
|
|
@@ -2025,7 +2036,7 @@ var Swarm = class {
|
|
|
2025
2036
|
async destroy() {
|
|
2026
2037
|
(0, import_log5.log)("destroying...", void 0, {
|
|
2027
2038
|
F: __dxlog_file5,
|
|
2028
|
-
L:
|
|
2039
|
+
L: 142,
|
|
2029
2040
|
S: this,
|
|
2030
2041
|
C: (f, a) => f(...a)
|
|
2031
2042
|
});
|
|
@@ -2036,7 +2047,7 @@ var Swarm = class {
|
|
|
2036
2047
|
await Promise.all(Array.from(this._peers.keys()).map((key) => this._destroyPeer(key, "swarm destroyed")));
|
|
2037
2048
|
(0, import_log5.log)("destroyed", void 0, {
|
|
2038
2049
|
F: __dxlog_file5,
|
|
2039
|
-
L:
|
|
2050
|
+
L: 149,
|
|
2040
2051
|
S: this,
|
|
2041
2052
|
C: (f, a) => f(...a)
|
|
2042
2053
|
});
|
|
@@ -2044,7 +2055,7 @@ var Swarm = class {
|
|
|
2044
2055
|
async setTopology(topology) {
|
|
2045
2056
|
(0, import_invariant4.invariant)(!this._ctx.disposed, "Swarm is offline", {
|
|
2046
2057
|
F: __dxlog_file5,
|
|
2047
|
-
L:
|
|
2058
|
+
L: 153,
|
|
2048
2059
|
S: this,
|
|
2049
2060
|
A: [
|
|
2050
2061
|
"!this._ctx.disposed",
|
|
@@ -2059,7 +2070,7 @@ var Swarm = class {
|
|
|
2059
2070
|
topology: getClassName(topology)
|
|
2060
2071
|
}, {
|
|
2061
2072
|
F: __dxlog_file5,
|
|
2062
|
-
L:
|
|
2073
|
+
L: 157,
|
|
2063
2074
|
S: this,
|
|
2064
2075
|
C: (f, a) => f(...a)
|
|
2065
2076
|
});
|
|
@@ -2073,14 +2084,14 @@ var Swarm = class {
|
|
|
2073
2084
|
swarmEvent
|
|
2074
2085
|
}, {
|
|
2075
2086
|
F: __dxlog_file5,
|
|
2076
|
-
L:
|
|
2087
|
+
L: 170,
|
|
2077
2088
|
S: this,
|
|
2078
2089
|
C: (f, a) => f(...a)
|
|
2079
2090
|
});
|
|
2080
2091
|
if (this._ctx.disposed) {
|
|
2081
2092
|
(0, import_log5.log)("swarm event ignored for disposed swarm", void 0, {
|
|
2082
2093
|
F: __dxlog_file5,
|
|
2083
|
-
L:
|
|
2094
|
+
L: 173,
|
|
2084
2095
|
S: this,
|
|
2085
2096
|
C: (f, a) => f(...a)
|
|
2086
2097
|
});
|
|
@@ -2092,7 +2103,7 @@ var Swarm = class {
|
|
|
2092
2103
|
peerId
|
|
2093
2104
|
}, {
|
|
2094
2105
|
F: __dxlog_file5,
|
|
2095
|
-
L:
|
|
2106
|
+
L: 179,
|
|
2096
2107
|
S: this,
|
|
2097
2108
|
C: (f, a) => f(...a)
|
|
2098
2109
|
});
|
|
@@ -2107,7 +2118,7 @@ var Swarm = class {
|
|
|
2107
2118
|
if (peer.connection?.state !== ConnectionState.CONNECTED) {
|
|
2108
2119
|
void this._destroyPeer(peer.id, "peer left").catch((err) => import_log5.log.catch(err, void 0, {
|
|
2109
2120
|
F: __dxlog_file5,
|
|
2110
|
-
L:
|
|
2121
|
+
L: 190,
|
|
2111
2122
|
S: this,
|
|
2112
2123
|
C: (f, a) => f(...a)
|
|
2113
2124
|
}));
|
|
@@ -2117,7 +2128,7 @@ var Swarm = class {
|
|
|
2117
2128
|
peer: swarmEvent.peerLeft.peer
|
|
2118
2129
|
}, {
|
|
2119
2130
|
F: __dxlog_file5,
|
|
2120
|
-
L:
|
|
2131
|
+
L: 193,
|
|
2121
2132
|
S: this,
|
|
2122
2133
|
C: (f, a) => f(...a)
|
|
2123
2134
|
});
|
|
@@ -2130,14 +2141,14 @@ var Swarm = class {
|
|
|
2130
2141
|
message
|
|
2131
2142
|
}, {
|
|
2132
2143
|
F: __dxlog_file5,
|
|
2133
|
-
L:
|
|
2144
|
+
L: 202,
|
|
2134
2145
|
S: this,
|
|
2135
2146
|
C: (f, a) => f(...a)
|
|
2136
2147
|
});
|
|
2137
2148
|
if (this._ctx.disposed) {
|
|
2138
2149
|
(0, import_log5.log)("ignored for disposed swarm", void 0, {
|
|
2139
2150
|
F: __dxlog_file5,
|
|
2140
|
-
L:
|
|
2151
|
+
L: 204,
|
|
2141
2152
|
S: this,
|
|
2142
2153
|
C: (f, a) => f(...a)
|
|
2143
2154
|
});
|
|
@@ -2147,7 +2158,7 @@ var Swarm = class {
|
|
|
2147
2158
|
}
|
|
2148
2159
|
(0, import_invariant4.invariant)(message.author, void 0, {
|
|
2149
2160
|
F: __dxlog_file5,
|
|
2150
|
-
L:
|
|
2161
|
+
L: 209,
|
|
2151
2162
|
S: this,
|
|
2152
2163
|
A: [
|
|
2153
2164
|
"message.author",
|
|
@@ -2159,7 +2170,7 @@ var Swarm = class {
|
|
|
2159
2170
|
message
|
|
2160
2171
|
}, {
|
|
2161
2172
|
F: __dxlog_file5,
|
|
2162
|
-
L:
|
|
2173
|
+
L: 211,
|
|
2163
2174
|
S: this,
|
|
2164
2175
|
C: (f, a) => f(...a)
|
|
2165
2176
|
});
|
|
@@ -2172,7 +2183,7 @@ var Swarm = class {
|
|
|
2172
2183
|
message
|
|
2173
2184
|
}, {
|
|
2174
2185
|
F: __dxlog_file5,
|
|
2175
|
-
L:
|
|
2186
|
+
L: 215,
|
|
2176
2187
|
S: this,
|
|
2177
2188
|
C: (f, a) => f(...a)
|
|
2178
2189
|
});
|
|
@@ -2190,14 +2201,14 @@ var Swarm = class {
|
|
|
2190
2201
|
message
|
|
2191
2202
|
}, {
|
|
2192
2203
|
F: __dxlog_file5,
|
|
2193
|
-
L:
|
|
2204
|
+
L: 226,
|
|
2194
2205
|
S: this,
|
|
2195
2206
|
C: (f, a) => f(...a)
|
|
2196
2207
|
});
|
|
2197
2208
|
if (this._ctx.disposed) {
|
|
2198
2209
|
import_log5.log.info("ignored for offline swarm", void 0, {
|
|
2199
2210
|
F: __dxlog_file5,
|
|
2200
|
-
L:
|
|
2211
|
+
L: 228,
|
|
2201
2212
|
S: this,
|
|
2202
2213
|
C: (f, a) => f(...a)
|
|
2203
2214
|
});
|
|
@@ -2205,7 +2216,7 @@ var Swarm = class {
|
|
|
2205
2216
|
}
|
|
2206
2217
|
(0, import_invariant4.invariant)(message.recipient?.equals(this._ownPeerId), `Invalid signal peer id expected=${this.ownPeerId}, actual=${message.recipient}`, {
|
|
2207
2218
|
F: __dxlog_file5,
|
|
2208
|
-
L:
|
|
2219
|
+
L: 231,
|
|
2209
2220
|
S: this,
|
|
2210
2221
|
A: [
|
|
2211
2222
|
"message.recipient?.equals(this._ownPeerId)",
|
|
@@ -2214,7 +2225,7 @@ var Swarm = class {
|
|
|
2214
2225
|
});
|
|
2215
2226
|
(0, import_invariant4.invariant)(message.topic?.equals(this._topic), void 0, {
|
|
2216
2227
|
F: __dxlog_file5,
|
|
2217
|
-
L:
|
|
2228
|
+
L: 235,
|
|
2218
2229
|
S: this,
|
|
2219
2230
|
A: [
|
|
2220
2231
|
"message.topic?.equals(this._topic)",
|
|
@@ -2223,7 +2234,7 @@ var Swarm = class {
|
|
|
2223
2234
|
});
|
|
2224
2235
|
(0, import_invariant4.invariant)(message.author, void 0, {
|
|
2225
2236
|
F: __dxlog_file5,
|
|
2226
|
-
L:
|
|
2237
|
+
L: 236,
|
|
2227
2238
|
S: this,
|
|
2228
2239
|
A: [
|
|
2229
2240
|
"message.author",
|
|
@@ -2267,7 +2278,7 @@ var Swarm = class {
|
|
|
2267
2278
|
peerId
|
|
2268
2279
|
}, {
|
|
2269
2280
|
F: __dxlog_file5,
|
|
2270
|
-
L:
|
|
2281
|
+
L: 285,
|
|
2271
2282
|
S: this,
|
|
2272
2283
|
C: (f, a) => f(...a)
|
|
2273
2284
|
});
|
|
@@ -2291,7 +2302,7 @@ var Swarm = class {
|
|
|
2291
2302
|
async _destroyPeer(peerId, reason) {
|
|
2292
2303
|
(0, import_invariant4.invariant)(this._peers.has(peerId), void 0, {
|
|
2293
2304
|
F: __dxlog_file5,
|
|
2294
|
-
L:
|
|
2305
|
+
L: 307,
|
|
2295
2306
|
S: this,
|
|
2296
2307
|
A: [
|
|
2297
2308
|
"this._peers.has(peerId)",
|
|
@@ -2318,7 +2329,7 @@ var Swarm = class {
|
|
|
2318
2329
|
} catch (err) {
|
|
2319
2330
|
(0, import_log5.log)("initiation error", err, {
|
|
2320
2331
|
F: __dxlog_file5,
|
|
2321
|
-
L:
|
|
2332
|
+
L: 333,
|
|
2322
2333
|
S: this,
|
|
2323
2334
|
C: (f, a) => f(...a)
|
|
2324
2335
|
});
|
|
@@ -2346,7 +2357,7 @@ var Swarm = class {
|
|
|
2346
2357
|
remoteId
|
|
2347
2358
|
}, {
|
|
2348
2359
|
F: __dxlog_file5,
|
|
2349
|
-
L:
|
|
2360
|
+
L: 360,
|
|
2350
2361
|
S: this,
|
|
2351
2362
|
C: (f, a) => f(...a)
|
|
2352
2363
|
});
|
|
@@ -2363,7 +2374,7 @@ var Swarm = class {
|
|
|
2363
2374
|
remoteId
|
|
2364
2375
|
}, {
|
|
2365
2376
|
F: __dxlog_file5,
|
|
2366
|
-
L:
|
|
2377
|
+
L: 374,
|
|
2367
2378
|
S: this,
|
|
2368
2379
|
C: (f, a) => f(...a)
|
|
2369
2380
|
});
|
|
@@ -2373,7 +2384,7 @@ var Swarm = class {
|
|
|
2373
2384
|
remoteId
|
|
2374
2385
|
}, {
|
|
2375
2386
|
F: __dxlog_file5,
|
|
2376
|
-
L:
|
|
2387
|
+
L: 377,
|
|
2377
2388
|
S: this,
|
|
2378
2389
|
C: (f, a) => f(...a)
|
|
2379
2390
|
});
|
|
@@ -2413,7 +2424,7 @@ var import_async5 = require("@dxos/async");
|
|
|
2413
2424
|
var import_keys6 = require("@dxos/keys");
|
|
2414
2425
|
var import_log6 = require("@dxos/log");
|
|
2415
2426
|
var import_util4 = require("@dxos/util");
|
|
2416
|
-
var __dxlog_file6 = "/
|
|
2427
|
+
var __dxlog_file6 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/swarm/swarm-mapper.ts";
|
|
2417
2428
|
var SwarmMapper = class {
|
|
2418
2429
|
get peers() {
|
|
2419
2430
|
return Array.from(this._peers.values());
|
|
@@ -2485,7 +2496,7 @@ var import_keys7 = require("@dxos/keys");
|
|
|
2485
2496
|
var import_log7 = require("@dxos/log");
|
|
2486
2497
|
var import_protocols5 = require("@dxos/protocols");
|
|
2487
2498
|
var import_util5 = require("@dxos/util");
|
|
2488
|
-
var __dxlog_file7 = "/
|
|
2499
|
+
var __dxlog_file7 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/swarm/connection-limiter.ts";
|
|
2489
2500
|
var MAX_CONCURRENT_INITIATING_CONNECTIONS = 50;
|
|
2490
2501
|
var ConnectionLimiter = class {
|
|
2491
2502
|
constructor({ maxConcurrentInitConnections = MAX_CONCURRENT_INITIATING_CONNECTIONS } = {}) {
|
|
@@ -2628,7 +2639,7 @@ var ConnectionLog = class {
|
|
|
2628
2639
|
};
|
|
2629
2640
|
|
|
2630
2641
|
// packages/core/mesh/network-manager/src/network-manager.ts
|
|
2631
|
-
var __dxlog_file8 = "/
|
|
2642
|
+
var __dxlog_file8 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/network-manager.ts";
|
|
2632
2643
|
var NetworkManager = class {
|
|
2633
2644
|
constructor({ transportFactory, signalManager, log: log1 }) {
|
|
2634
2645
|
/**
|
|
@@ -2864,7 +2875,7 @@ var NetworkManager = class {
|
|
|
2864
2875
|
|
|
2865
2876
|
// packages/core/mesh/network-manager/src/topology/fully-connected-topology.ts
|
|
2866
2877
|
var import_invariant7 = require("@dxos/invariant");
|
|
2867
|
-
var __dxlog_file9 = "/
|
|
2878
|
+
var __dxlog_file9 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/topology/fully-connected-topology.ts";
|
|
2868
2879
|
var FullyConnectedTopology = class {
|
|
2869
2880
|
toString() {
|
|
2870
2881
|
return "FullyConnectedTopology";
|
|
@@ -2930,7 +2941,7 @@ function _ts_decorate4(decorators, target, key, desc) {
|
|
|
2930
2941
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2931
2942
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2932
2943
|
}
|
|
2933
|
-
var __dxlog_file10 = "/
|
|
2944
|
+
var __dxlog_file10 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/transport/memory-transport.ts";
|
|
2934
2945
|
var MEMORY_TRANSPORT_DELAY = 1;
|
|
2935
2946
|
var createStreamDelay = (delay) => {
|
|
2936
2947
|
return new import_node_stream.Transform({
|
|
@@ -3125,7 +3136,7 @@ try {
|
|
|
3125
3136
|
}
|
|
3126
3137
|
|
|
3127
3138
|
// packages/core/mesh/network-manager/src/transport/simplepeer-transport.ts
|
|
3128
|
-
var __dxlog_file11 = "/
|
|
3139
|
+
var __dxlog_file11 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/transport/simplepeer-transport.ts";
|
|
3129
3140
|
var SimplePeerTransport = class {
|
|
3130
3141
|
constructor(params) {
|
|
3131
3142
|
this.params = params;
|
|
@@ -3235,7 +3246,7 @@ var SimplePeerTransport = class {
|
|
|
3235
3246
|
try {
|
|
3236
3247
|
if (typeof this._peer?._pc?.getStats === "function") {
|
|
3237
3248
|
this._peer._pc.getStats().then((stats) => {
|
|
3238
|
-
import_log12.log.
|
|
3249
|
+
import_log12.log.info("report after webrtc error", {
|
|
3239
3250
|
config: this.params.webrtcConfig,
|
|
3240
3251
|
stats
|
|
3241
3252
|
}, {
|
|
@@ -3314,7 +3325,7 @@ var import_keys12 = require("@dxos/keys");
|
|
|
3314
3325
|
var import_log13 = require("@dxos/log");
|
|
3315
3326
|
var import_bridge = require("@dxos/protocols/proto/dxos/mesh/bridge");
|
|
3316
3327
|
var import_util9 = require("@dxos/util");
|
|
3317
|
-
var __dxlog_file12 = "/
|
|
3328
|
+
var __dxlog_file12 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/transport/simplepeer-transport-service.ts";
|
|
3318
3329
|
var SimplePeerTransportService = class {
|
|
3319
3330
|
constructor(_webrtcConfig) {
|
|
3320
3331
|
this._webrtcConfig = _webrtcConfig;
|
|
@@ -3457,7 +3468,7 @@ var import_log14 = require("@dxos/log");
|
|
|
3457
3468
|
var import_protocols8 = require("@dxos/protocols");
|
|
3458
3469
|
var import_bridge2 = require("@dxos/protocols/proto/dxos/mesh/bridge");
|
|
3459
3470
|
var import_util10 = require("@dxos/util");
|
|
3460
|
-
var __dxlog_file13 = "/
|
|
3471
|
+
var __dxlog_file13 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/transport/simplepeer-transport-proxy.ts";
|
|
3461
3472
|
var SimplePeerTransportProxy = class {
|
|
3462
3473
|
constructor(_params) {
|
|
3463
3474
|
this._params = _params;
|
|
@@ -3637,7 +3648,7 @@ function _ts_decorate5(decorators, target, key, desc) {
|
|
|
3637
3648
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3638
3649
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3639
3650
|
}
|
|
3640
|
-
var __dxlog_file14 = "/
|
|
3651
|
+
var __dxlog_file14 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/transport/libdatachannel-transport.ts";
|
|
3641
3652
|
var DATACHANNEL_LABEL = "dxos.mesh.transport";
|
|
3642
3653
|
var MAX_BUFFERED_AMOUNT = 64 * 1024;
|
|
3643
3654
|
var MAX_MESSAGE_SIZE = 64 * 1024;
|
|
@@ -3704,7 +3715,7 @@ var LibDataChannelTransport = class {
|
|
|
3704
3715
|
}
|
|
3705
3716
|
});
|
|
3706
3717
|
} catch (err) {
|
|
3707
|
-
import_log15.log.
|
|
3718
|
+
import_log15.log.info("signaling errror", {
|
|
3708
3719
|
err
|
|
3709
3720
|
}, {
|
|
3710
3721
|
F: __dxlog_file14,
|
|
@@ -3966,7 +3977,7 @@ var import_node_net = require("node:net");
|
|
|
3966
3977
|
var import_async13 = require("@dxos/async");
|
|
3967
3978
|
var import_debug8 = require("@dxos/debug");
|
|
3968
3979
|
var import_log16 = require("@dxos/log");
|
|
3969
|
-
var __dxlog_file15 = "/
|
|
3980
|
+
var __dxlog_file15 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/transport/tcp-transport.ts";
|
|
3970
3981
|
var TcpTransportFactory = {
|
|
3971
3982
|
createTransport: (params) => new TcpTransport(params)
|
|
3972
3983
|
};
|
|
@@ -4092,7 +4103,7 @@ var TcpTransport = class {
|
|
|
4092
4103
|
};
|
|
4093
4104
|
|
|
4094
4105
|
// packages/core/mesh/network-manager/src/testing/test-builder.ts
|
|
4095
|
-
var __dxlog_file16 = "/
|
|
4106
|
+
var __dxlog_file16 = "/mnt/ramdisk/work/packages/core/mesh/network-manager/src/testing/test-builder.ts";
|
|
4096
4107
|
var port = process.env.SIGNAL_PORT ?? 4e3;
|
|
4097
4108
|
var TEST_SIGNAL_HOSTS = [
|
|
4098
4109
|
{
|