@dxos/network-manager 0.3.3-main.7df753a → 0.3.3-main.8043a2f

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.
@@ -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.warn("timeout waiting for transport to connect, aborting", void 0, {
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.warn("aborting due to transport ConnectionResetError", void 0, {
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.warn("aborting due to transport ConnectivityError", void 0, {
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.warn("signal failed", {
1048
+ import_log2.log.info("signal message failed to deliver", {
1049
1049
  err
1050
1050
  }, {
1051
1051
  F: __dxlog_file2,
@@ -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.warn("connection error", {
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.warn("connection error, closing", {
1583
+ import_log3.log.info("connection error, closing", {
1584
1584
  topic: this.topic,
1585
1585
  peerId: this.localPeerId,
1586
1586
  remoteId: this.id,
@@ -1869,20 +1869,31 @@ var SwarmMessenger = class {
1869
1869
  }
1870
1870
  });
1871
1871
  } catch (err) {
1872
- import_log4.log.warn("error sending answer", {
1873
- err
1874
- }, {
1875
- F: __dxlog_file4,
1876
- L: 174,
1877
- S: this,
1878
- C: (f, a) => f(...a)
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: 187,
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: 188,
1905
+ L: 192,
1895
1906
  S: this,
1896
1907
  A: [
1897
1908
  "message.data.signal || message.data.signalBatch",
@@ -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.warn("Error while receiving message", {
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: 135,
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: 141,
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: 148,
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: 152,
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: 156,
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: 169,
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: 172,
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: 178,
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: 189,
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: 192,
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: 201,
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: 203,
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: 208,
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: 210,
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: 214,
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: 225,
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: 227,
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: 230,
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: 234,
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: 235,
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: 284,
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: 306,
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: 332,
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: 359,
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: 373,
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: 376,
2387
+ L: 377,
2377
2388
  S: this,
2378
2389
  C: (f, a) => f(...a)
2379
2390
  });
@@ -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.warn("report after webrtc error", {
3249
+ import_log12.log.info("report after webrtc error", {
3239
3250
  config: this.params.webrtcConfig,
3240
3251
  stats
3241
3252
  }, {
@@ -3704,7 +3715,7 @@ var LibDataChannelTransport = class {
3704
3715
  }
3705
3716
  });
3706
3717
  } catch (err) {
3707
- import_log15.log.warn("signaling errror", {
3718
+ import_log15.log.info("signaling errror", {
3708
3719
  err
3709
3720
  }, {
3710
3721
  F: __dxlog_file14,