@dxos/network-manager 0.5.3-main.3b535c7 → 0.5.3-main.3c6700b

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.
@@ -2079,7 +2079,7 @@ var gcSwarm = (swarm) => {
2079
2079
  };
2080
2080
 
2081
2081
  // packages/core/mesh/network-manager/src/network-manager.ts
2082
- import { Event as Event6 } from "@dxos/async";
2082
+ import { Event as Event6, synchronized as synchronized4 } from "@dxos/async";
2083
2083
  import { invariant as invariant6 } from "@dxos/invariant";
2084
2084
  import { PublicKey as PublicKey8 } from "@dxos/keys";
2085
2085
  import { log as log7 } from "@dxos/log";
@@ -2087,6 +2087,16 @@ import { Messenger } from "@dxos/messaging";
2087
2087
  import { trace as trace3 } from "@dxos/protocols";
2088
2088
  import { ConnectionState as ConnectionState2 } from "@dxos/protocols/proto/dxos/client/services";
2089
2089
  import { ComplexMap as ComplexMap6 } from "@dxos/util";
2090
+ function _ts_decorate4(decorators, target, key, desc) {
2091
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2092
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
2093
+ r = Reflect.decorate(decorators, target, key, desc);
2094
+ else
2095
+ for (var i = decorators.length - 1; i >= 0; i--)
2096
+ if (d = decorators[i])
2097
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2098
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
2099
+ }
2090
2100
  var __dxlog_file7 = "/home/runner/work/dxos/dxos/packages/core/mesh/network-manager/src/network-manager.ts";
2091
2101
  var NetworkManager = class {
2092
2102
  constructor({ transportFactory, signalManager, log: log15 }) {
@@ -2171,7 +2181,7 @@ var NetworkManager = class {
2171
2181
  async joinSwarm({ topic, peerId, topology, protocolProvider: protocol, label }) {
2172
2182
  invariant6(PublicKey8.isPublicKey(topic), void 0, {
2173
2183
  F: __dxlog_file7,
2174
- L: 157,
2184
+ L: 158,
2175
2185
  S: this,
2176
2186
  A: [
2177
2187
  "PublicKey.isPublicKey(topic)",
@@ -2180,7 +2190,7 @@ var NetworkManager = class {
2180
2190
  });
2181
2191
  invariant6(PublicKey8.isPublicKey(peerId), void 0, {
2182
2192
  F: __dxlog_file7,
2183
- L: 158,
2193
+ L: 159,
2184
2194
  S: this,
2185
2195
  A: [
2186
2196
  "PublicKey.isPublicKey(peerId)",
@@ -2189,7 +2199,7 @@ var NetworkManager = class {
2189
2199
  });
2190
2200
  invariant6(topology, void 0, {
2191
2201
  F: __dxlog_file7,
2192
- L: 159,
2202
+ L: 160,
2193
2203
  S: this,
2194
2204
  A: [
2195
2205
  "topology",
@@ -2198,7 +2208,7 @@ var NetworkManager = class {
2198
2208
  });
2199
2209
  invariant6(typeof protocol === "function", void 0, {
2200
2210
  F: __dxlog_file7,
2201
- L: 160,
2211
+ L: 161,
2202
2212
  S: this,
2203
2213
  A: [
2204
2214
  "typeof protocol === 'function'",
@@ -2214,7 +2224,7 @@ var NetworkManager = class {
2214
2224
  topology: topology.toString()
2215
2225
  }, {
2216
2226
  F: __dxlog_file7,
2217
- L: 165,
2227
+ L: 166,
2218
2228
  S: this,
2219
2229
  C: (f, a) => f(...a)
2220
2230
  });
@@ -2224,7 +2234,7 @@ var NetworkManager = class {
2224
2234
  error
2225
2235
  }, {
2226
2236
  F: __dxlog_file7,
2227
- L: 178,
2237
+ L: 179,
2228
2238
  S: this,
2229
2239
  C: (f, a) => f(...a)
2230
2240
  });
@@ -2237,7 +2247,7 @@ var NetworkManager = class {
2237
2247
  peerId
2238
2248
  }).catch((error) => log7.catch(error, void 0, {
2239
2249
  F: __dxlog_file7,
2240
- L: 187,
2250
+ L: 188,
2241
2251
  S: this,
2242
2252
  C: (f, a) => f(...a)
2243
2253
  }));
@@ -2248,7 +2258,7 @@ var NetworkManager = class {
2248
2258
  count: this._swarms.size
2249
2259
  }, {
2250
2260
  F: __dxlog_file7,
2251
- L: 191,
2261
+ L: 192,
2252
2262
  S: this,
2253
2263
  C: (f, a) => f(...a)
2254
2264
  });
@@ -2267,7 +2277,7 @@ var NetworkManager = class {
2267
2277
  topic: PublicKey8.from(topic)
2268
2278
  }, {
2269
2279
  F: __dxlog_file7,
2270
- L: 207,
2280
+ L: 209,
2271
2281
  S: this,
2272
2282
  C: (f, a) => f(...a)
2273
2283
  });
@@ -2288,7 +2298,7 @@ var NetworkManager = class {
2288
2298
  count: this._swarms.size
2289
2299
  }, {
2290
2300
  F: __dxlog_file7,
2291
- L: 221,
2301
+ L: 223,
2292
2302
  S: this,
2293
2303
  C: (f, a) => f(...a)
2294
2304
  });
@@ -2320,6 +2330,12 @@ var NetworkManager = class {
2320
2330
  this.connectionStateChanged.emit(this._connectionState);
2321
2331
  }
2322
2332
  };
2333
+ _ts_decorate4([
2334
+ synchronized4
2335
+ ], NetworkManager.prototype, "joinSwarm", null);
2336
+ _ts_decorate4([
2337
+ synchronized4
2338
+ ], NetworkManager.prototype, "leaveSwarm", null);
2323
2339
 
2324
2340
  // packages/core/mesh/network-manager/src/topology/fully-connected-topology.ts
2325
2341
  import { invariant as invariant7 } from "@dxos/invariant";
@@ -2640,7 +2656,7 @@ import { invariant as invariant10 } from "@dxos/invariant";
2640
2656
  import { PublicKey as PublicKey9 } from "@dxos/keys";
2641
2657
  import { log as log10, logInfo as logInfo3 } from "@dxos/log";
2642
2658
  import { ComplexMap as ComplexMap7 } from "@dxos/util";
2643
- function _ts_decorate4(decorators, target, key, desc) {
2659
+ function _ts_decorate5(decorators, target, key, desc) {
2644
2660
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2645
2661
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
2646
2662
  r = Reflect.decorate(decorators, target, key, desc);
@@ -2818,10 +2834,10 @@ var MemoryTransport = class _MemoryTransport {
2818
2834
  };
2819
2835
  }
2820
2836
  };
2821
- _ts_decorate4([
2837
+ _ts_decorate5([
2822
2838
  logInfo3
2823
2839
  ], MemoryTransport.prototype, "_instanceId", void 0);
2824
- _ts_decorate4([
2840
+ _ts_decorate5([
2825
2841
  logInfo3
2826
2842
  ], MemoryTransport.prototype, "_remoteInstanceId", void 0);
2827
2843
  var toError = (err) => err instanceof Error ? err : new Error(String(err));
@@ -3518,11 +3534,11 @@ var decodeError = (err) => {
3518
3534
 
3519
3535
  // packages/core/mesh/network-manager/src/transport/libdatachannel-transport.ts
3520
3536
  import { Duplex as Duplex2 } from "stream";
3521
- import { Event as Event10, Trigger as Trigger3, synchronized as synchronized4 } from "@dxos/async";
3537
+ import { Event as Event10, Trigger as Trigger3, synchronized as synchronized5 } from "@dxos/async";
3522
3538
  import { ErrorStream as ErrorStream6 } from "@dxos/debug";
3523
3539
  import { invariant as invariant14 } from "@dxos/invariant";
3524
3540
  import { log as log14 } from "@dxos/log";
3525
- function _ts_decorate5(decorators, target, key, desc) {
3541
+ function _ts_decorate6(decorators, target, key, desc) {
3526
3542
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3527
3543
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
3528
3544
  r = Reflect.decorate(decorators, target, key, desc);
@@ -3959,8 +3975,8 @@ var LibDataChannelTransport = class _LibDataChannelTransport {
3959
3975
  this._options.stream.unpipe?.(this._stream)?.unpipe?.(this._options.stream);
3960
3976
  }
3961
3977
  };
3962
- _ts_decorate5([
3963
- synchronized4
3978
+ _ts_decorate6([
3979
+ synchronized5
3964
3980
  ], LibDataChannelTransport.prototype, "_close", null);
3965
3981
  var importESM = Function("path", "return import(path)");
3966
3982
 
@@ -4047,4 +4063,4 @@ export {
4047
4063
  TcpTransport,
4048
4064
  createTeleportProtocolFactory
4049
4065
  };
4050
- //# sourceMappingURL=chunk-GXBG7YVC.mjs.map
4066
+ //# sourceMappingURL=chunk-4L3ORJC4.mjs.map