@dxos/network-manager 0.1.58-main.c4d3e15 → 0.1.58-main.ca7a0bc
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-PSWNMALH.mjs → chunk-HKHUCTRB.mjs} +51 -47
- package/dist/lib/browser/chunk-HKHUCTRB.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 +109 -109
- package/dist/lib/browser/testing/index.mjs.map +4 -4
- package/dist/lib/node/index.cjs +354 -350
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/testing/index.cjs +883 -878
- package/dist/lib/node/testing/index.cjs.map +4 -4
- package/dist/types/src/swarm/connection-limiter.d.ts +1 -1
- package/dist/types/src/swarm/connection-limiter.d.ts.map +1 -1
- package/dist/types/src/swarm/connection.d.ts.map +1 -1
- package/dist/types/src/swarm/peer.d.ts +3 -3
- package/dist/types/src/swarm/peer.d.ts.map +1 -1
- package/dist/types/src/swarm/swarm-mapper.d.ts.map +1 -1
- package/dist/types/src/swarm/swarm.d.ts +2 -2
- package/dist/types/src/swarm/swarm.d.ts.map +1 -1
- package/dist/types/src/testing/test-builder.d.ts +1 -1
- package/dist/types/src/testing/test-builder.d.ts.map +1 -1
- package/dist/types/src/tests/basic-test-suite.d.ts.map +1 -1
- package/dist/types/src/topology/star-topology.d.ts.map +1 -1
- package/dist/types/src/transport/simplepeer-transport-proxy.d.ts.map +1 -1
- package/dist/types/src/transport/simplepeer-transport-service.d.ts.map +1 -1
- package/dist/types/src/transport/simplepeer-transport.d.ts.map +1 -1
- package/package.json +17 -18
- package/src/swarm/connection-limiter.ts +2 -2
- package/src/swarm/connection.test.ts +1 -1
- package/src/swarm/connection.ts +5 -5
- package/src/swarm/peer.ts +3 -3
- package/src/swarm/swarm-mapper.ts +4 -7
- package/src/swarm/swarm.test.ts +3 -3
- package/src/swarm/swarm.ts +3 -3
- package/src/testing/test-builder.ts +1 -1
- package/src/tests/basic-test-suite.ts +1 -1
- package/src/tests/memory-transport.test.ts +2 -2
- package/src/tests/tcp-transport.test.ts +2 -2
- package/src/tests/webrtc-transport.test.ts +1 -1
- package/src/topology/star-topology.ts +1 -4
- package/src/transport/simplepeer-transport-proxy.ts +29 -28
- package/src/transport/simplepeer-transport-service.ts +1 -4
- package/src/transport/simplepeer-transport.ts +4 -7
- package/dist/lib/browser/chunk-PSWNMALH.mjs.map +0 -7
|
@@ -7,11 +7,10 @@ import {
|
|
|
7
7
|
import { DeferredTask, Event, sleep, synchronized } from "@dxos/async";
|
|
8
8
|
import { Context, cancelWithContext } from "@dxos/context";
|
|
9
9
|
import { ErrorStream } from "@dxos/debug";
|
|
10
|
-
import { CancelledError, ProtocolError, ConnectionResetError, ConnectivityError, UnknownProtocolError } from "@dxos/errors";
|
|
11
10
|
import { invariant } from "@dxos/invariant";
|
|
12
11
|
import { PublicKey } from "@dxos/keys";
|
|
13
12
|
import { log } from "@dxos/log";
|
|
14
|
-
import { trace } from "@dxos/protocols";
|
|
13
|
+
import { CancelledError, ProtocolError, ConnectionResetError, ConnectivityError, UnknownProtocolError, trace } from "@dxos/protocols";
|
|
15
14
|
function _ts_decorate(decorators, target, key, desc) {
|
|
16
15
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
17
16
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
@@ -771,10 +770,10 @@ import { ComplexMap as ComplexMap2, isNotNullOrUndefined } from "@dxos/util";
|
|
|
771
770
|
// packages/core/mesh/network-manager/src/swarm/peer.ts
|
|
772
771
|
import { Event as Event2, scheduleTask, synchronized as synchronized2 } from "@dxos/async";
|
|
773
772
|
import { Context as Context3 } from "@dxos/context";
|
|
774
|
-
import { CancelledError as CancelledError2, SystemError, TimeoutError } from "@dxos/errors";
|
|
775
773
|
import { invariant as invariant3 } from "@dxos/invariant";
|
|
776
774
|
import { PublicKey as PublicKey3 } from "@dxos/keys";
|
|
777
775
|
import { log as log3 } from "@dxos/log";
|
|
776
|
+
import { CancelledError as CancelledError2, SystemError, TimeoutError } from "@dxos/protocols";
|
|
778
777
|
function _ts_decorate2(decorators, target, key, desc) {
|
|
779
778
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
780
779
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
@@ -1679,7 +1678,6 @@ var SwarmMapper = class {
|
|
|
1679
1678
|
get peers() {
|
|
1680
1679
|
return Array.from(this._peers.values());
|
|
1681
1680
|
}
|
|
1682
|
-
// prettier-ignore
|
|
1683
1681
|
constructor(_swarm) {
|
|
1684
1682
|
this._swarm = _swarm;
|
|
1685
1683
|
this._subscriptions = new EventSubscriptions();
|
|
@@ -1702,7 +1700,7 @@ var SwarmMapper = class {
|
|
|
1702
1700
|
_update() {
|
|
1703
1701
|
log5("updating swarm", void 0, {
|
|
1704
1702
|
F: __dxlog_file5,
|
|
1705
|
-
L:
|
|
1703
|
+
L: 72,
|
|
1706
1704
|
S: this,
|
|
1707
1705
|
C: (f, a) => f(...a)
|
|
1708
1706
|
});
|
|
@@ -1726,7 +1724,7 @@ var SwarmMapper = class {
|
|
|
1726
1724
|
totalPeersInSwarm: this._peers.size
|
|
1727
1725
|
}, {
|
|
1728
1726
|
F: __dxlog_file5,
|
|
1729
|
-
L:
|
|
1727
|
+
L: 113,
|
|
1730
1728
|
S: this,
|
|
1731
1729
|
C: (f, a) => f(...a)
|
|
1732
1730
|
});
|
|
@@ -1742,13 +1740,13 @@ var SwarmMapper = class {
|
|
|
1742
1740
|
// packages/core/mesh/network-manager/src/swarm/connection-limiter.ts
|
|
1743
1741
|
import { DeferredTask as DeferredTask2 } from "@dxos/async";
|
|
1744
1742
|
import { Context as Context5 } from "@dxos/context";
|
|
1745
|
-
import { CancelledError as CancelledError3 } from "@dxos/errors";
|
|
1746
1743
|
import { invariant as invariant5 } from "@dxos/invariant";
|
|
1747
1744
|
import { PublicKey as PublicKey6 } from "@dxos/keys";
|
|
1748
1745
|
import { log as log6 } from "@dxos/log";
|
|
1746
|
+
import { CancelledError as CancelledError3 } from "@dxos/protocols";
|
|
1749
1747
|
import { ComplexMap as ComplexMap4 } from "@dxos/util";
|
|
1750
1748
|
var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/core/mesh/network-manager/src/swarm/connection-limiter.ts";
|
|
1751
|
-
var MAX_CONCURRENT_INITIATING_CONNECTIONS =
|
|
1749
|
+
var MAX_CONCURRENT_INITIATING_CONNECTIONS = 50;
|
|
1752
1750
|
var ConnectionLimiter = class {
|
|
1753
1751
|
constructor({ maxConcurrentInitConnections = MAX_CONCURRENT_INITIATING_CONNECTIONS } = {}) {
|
|
1754
1752
|
this._ctx = new Context5();
|
|
@@ -2290,7 +2288,6 @@ import { invariant as invariant9 } from "@dxos/invariant";
|
|
|
2290
2288
|
import { log as log9 } from "@dxos/log";
|
|
2291
2289
|
var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/core/mesh/network-manager/src/topology/star-topology.ts";
|
|
2292
2290
|
var StarTopology = class {
|
|
2293
|
-
// prettier-ignore
|
|
2294
2291
|
constructor(_centralPeer) {
|
|
2295
2292
|
this._centralPeer = _centralPeer;
|
|
2296
2293
|
}
|
|
@@ -2300,7 +2297,7 @@ var StarTopology = class {
|
|
|
2300
2297
|
init(controller) {
|
|
2301
2298
|
invariant9(!this._controller, "Already initialized.", {
|
|
2302
2299
|
F: __dxlog_file10,
|
|
2303
|
-
L:
|
|
2300
|
+
L: 21,
|
|
2304
2301
|
S: this,
|
|
2305
2302
|
A: [
|
|
2306
2303
|
"!this._controller",
|
|
@@ -2312,7 +2309,7 @@ var StarTopology = class {
|
|
|
2312
2309
|
update() {
|
|
2313
2310
|
invariant9(this._controller, "Not initialized.", {
|
|
2314
2311
|
F: __dxlog_file10,
|
|
2315
|
-
L:
|
|
2312
|
+
L: 26,
|
|
2316
2313
|
S: this,
|
|
2317
2314
|
A: [
|
|
2318
2315
|
"this._controller",
|
|
@@ -2323,7 +2320,7 @@ var StarTopology = class {
|
|
|
2323
2320
|
if (!ownPeerId.equals(this._centralPeer)) {
|
|
2324
2321
|
log9("leaf peer dropping all connections apart from central peer.", void 0, {
|
|
2325
2322
|
F: __dxlog_file10,
|
|
2326
|
-
L:
|
|
2323
|
+
L: 29,
|
|
2327
2324
|
S: this,
|
|
2328
2325
|
C: (f, a) => f(...a)
|
|
2329
2326
|
});
|
|
@@ -2333,7 +2330,7 @@ var StarTopology = class {
|
|
|
2333
2330
|
peer
|
|
2334
2331
|
}, {
|
|
2335
2332
|
F: __dxlog_file10,
|
|
2336
|
-
L:
|
|
2333
|
+
L: 34,
|
|
2337
2334
|
S: this,
|
|
2338
2335
|
C: (f, a) => f(...a)
|
|
2339
2336
|
});
|
|
@@ -2347,7 +2344,7 @@ var StarTopology = class {
|
|
|
2347
2344
|
peer
|
|
2348
2345
|
}, {
|
|
2349
2346
|
F: __dxlog_file10,
|
|
2350
|
-
L:
|
|
2347
|
+
L: 43,
|
|
2351
2348
|
S: this,
|
|
2352
2349
|
C: (f, a) => f(...a)
|
|
2353
2350
|
});
|
|
@@ -2358,7 +2355,7 @@ var StarTopology = class {
|
|
|
2358
2355
|
async onOffer(peer) {
|
|
2359
2356
|
invariant9(this._controller, "Not initialized.", {
|
|
2360
2357
|
F: __dxlog_file10,
|
|
2361
|
-
L:
|
|
2358
|
+
L: 50,
|
|
2362
2359
|
S: this,
|
|
2363
2360
|
A: [
|
|
2364
2361
|
"this._controller",
|
|
@@ -2372,7 +2369,7 @@ var StarTopology = class {
|
|
|
2372
2369
|
isSelfCentral: ownPeerId.equals(this._centralPeer)
|
|
2373
2370
|
}, {
|
|
2374
2371
|
F: __dxlog_file10,
|
|
2375
|
-
L:
|
|
2372
|
+
L: 52,
|
|
2376
2373
|
S: this,
|
|
2377
2374
|
C: (f, a) => f(...a)
|
|
2378
2375
|
});
|
|
@@ -2583,10 +2580,9 @@ import SimplePeerConstructor from "simple-peer";
|
|
|
2583
2580
|
import invariant11 from "tiny-invariant";
|
|
2584
2581
|
import { Event as Event8 } from "@dxos/async";
|
|
2585
2582
|
import { ErrorStream as ErrorStream4, raise as raise2 } from "@dxos/debug";
|
|
2586
|
-
import { ConnectionResetError as ConnectionResetError2, ConnectivityError as ConnectivityError2, ProtocolError as ProtocolError2, UnknownProtocolError as UnknownProtocolError2 } from "@dxos/errors";
|
|
2587
2583
|
import { PublicKey as PublicKey10 } from "@dxos/keys";
|
|
2588
2584
|
import { log as log11 } from "@dxos/log";
|
|
2589
|
-
import { trace as trace4 } from "@dxos/protocols";
|
|
2585
|
+
import { ConnectionResetError as ConnectionResetError2, ConnectivityError as ConnectivityError2, ProtocolError as ProtocolError2, UnknownProtocolError as UnknownProtocolError2, trace as trace4 } from "@dxos/protocols";
|
|
2590
2586
|
|
|
2591
2587
|
// packages/core/mesh/network-manager/src/transport/webrtc.ts
|
|
2592
2588
|
var wrtc = null;
|
|
@@ -2609,13 +2605,13 @@ var SimplePeerTransport = class {
|
|
|
2609
2605
|
id: this._instanceId
|
|
2610
2606
|
}), {
|
|
2611
2607
|
F: __dxlog_file12,
|
|
2612
|
-
L:
|
|
2608
|
+
L: 40,
|
|
2613
2609
|
S: this,
|
|
2614
2610
|
C: (f, a) => f(...a)
|
|
2615
2611
|
});
|
|
2616
2612
|
log11("created connection", params, {
|
|
2617
2613
|
F: __dxlog_file12,
|
|
2618
|
-
L:
|
|
2614
|
+
L: 41,
|
|
2619
2615
|
S: this,
|
|
2620
2616
|
C: (f, a) => f(...a)
|
|
2621
2617
|
});
|
|
@@ -2628,7 +2624,7 @@ var SimplePeerTransport = class {
|
|
|
2628
2624
|
this._peer.on("signal", async (data) => {
|
|
2629
2625
|
log11("signal", data, {
|
|
2630
2626
|
F: __dxlog_file12,
|
|
2631
|
-
L:
|
|
2627
|
+
L: 50,
|
|
2632
2628
|
S: this,
|
|
2633
2629
|
C: (f, a) => f(...a)
|
|
2634
2630
|
});
|
|
@@ -2641,7 +2637,7 @@ var SimplePeerTransport = class {
|
|
|
2641
2637
|
this._peer.on("connect", () => {
|
|
2642
2638
|
log11("connected", void 0, {
|
|
2643
2639
|
F: __dxlog_file12,
|
|
2644
|
-
L:
|
|
2640
|
+
L: 55,
|
|
2645
2641
|
S: this,
|
|
2646
2642
|
C: (f, a) => f(...a)
|
|
2647
2643
|
});
|
|
@@ -2651,7 +2647,7 @@ var SimplePeerTransport = class {
|
|
|
2651
2647
|
this._peer.on("close", async () => {
|
|
2652
2648
|
log11("closed", void 0, {
|
|
2653
2649
|
F: __dxlog_file12,
|
|
2654
|
-
L:
|
|
2650
|
+
L: 61,
|
|
2655
2651
|
S: this,
|
|
2656
2652
|
C: (f, a) => f(...a)
|
|
2657
2653
|
});
|
|
@@ -2665,9 +2661,13 @@ var SimplePeerTransport = class {
|
|
|
2665
2661
|
} else {
|
|
2666
2662
|
this.errors.raise(new UnknownProtocolError2("unknown RTCError", err));
|
|
2667
2663
|
}
|
|
2668
|
-
} else if (err.name === "InvalidStateError") {
|
|
2669
|
-
this.errors.raise(new ConnectionResetError2("safari WebRTC error", err));
|
|
2670
2664
|
} else if ("code" in err) {
|
|
2665
|
+
log11.info("simple-peer error", err, {
|
|
2666
|
+
F: __dxlog_file12,
|
|
2667
|
+
L: 77,
|
|
2668
|
+
S: this,
|
|
2669
|
+
C: (f, a) => f(...a)
|
|
2670
|
+
});
|
|
2671
2671
|
switch (err.code) {
|
|
2672
2672
|
case "ERR_WEBRTC_SUPPORT":
|
|
2673
2673
|
this.errors.raise(new ProtocolError2("WebRTC not supported", err));
|
|
@@ -2686,17 +2686,23 @@ var SimplePeerTransport = class {
|
|
|
2686
2686
|
this.errors.raise(new Error("unknown simple-peer error"));
|
|
2687
2687
|
}
|
|
2688
2688
|
} else {
|
|
2689
|
+
log11.info("unknown peer connection error", err, {
|
|
2690
|
+
F: __dxlog_file12,
|
|
2691
|
+
L: 96,
|
|
2692
|
+
S: this,
|
|
2693
|
+
C: (f, a) => f(...a)
|
|
2694
|
+
});
|
|
2689
2695
|
this.errors.raise(err);
|
|
2690
2696
|
}
|
|
2691
2697
|
try {
|
|
2692
|
-
if (typeof this._peer?._pc
|
|
2698
|
+
if (typeof this._peer?._pc?.getStats === "function") {
|
|
2693
2699
|
this._peer._pc.getStats().then((stats) => {
|
|
2694
2700
|
log11.warn("report after webrtc error", {
|
|
2695
2701
|
config: this.params.webrtcConfig,
|
|
2696
2702
|
stats
|
|
2697
2703
|
}, {
|
|
2698
2704
|
F: __dxlog_file12,
|
|
2699
|
-
L:
|
|
2705
|
+
L: 104,
|
|
2700
2706
|
S: this,
|
|
2701
2707
|
C: (f, a) => f(...a)
|
|
2702
2708
|
});
|
|
@@ -2705,7 +2711,7 @@ var SimplePeerTransport = class {
|
|
|
2705
2711
|
} catch (err2) {
|
|
2706
2712
|
log11.catch(err2, void 0, {
|
|
2707
2713
|
F: __dxlog_file12,
|
|
2708
|
-
L:
|
|
2714
|
+
L: 111,
|
|
2709
2715
|
S: this,
|
|
2710
2716
|
C: (f, a) => f(...a)
|
|
2711
2717
|
});
|
|
@@ -2716,7 +2722,7 @@ var SimplePeerTransport = class {
|
|
|
2716
2722
|
id: this._instanceId
|
|
2717
2723
|
}), {
|
|
2718
2724
|
F: __dxlog_file12,
|
|
2719
|
-
L:
|
|
2725
|
+
L: 116,
|
|
2720
2726
|
S: this,
|
|
2721
2727
|
C: (f, a) => f(...a)
|
|
2722
2728
|
});
|
|
@@ -2724,7 +2730,7 @@ var SimplePeerTransport = class {
|
|
|
2724
2730
|
async destroy() {
|
|
2725
2731
|
log11("closing...", void 0, {
|
|
2726
2732
|
F: __dxlog_file12,
|
|
2727
|
-
L:
|
|
2733
|
+
L: 120,
|
|
2728
2734
|
S: this,
|
|
2729
2735
|
C: (f, a) => f(...a)
|
|
2730
2736
|
});
|
|
@@ -2734,7 +2740,7 @@ var SimplePeerTransport = class {
|
|
|
2734
2740
|
this.closed.emit();
|
|
2735
2741
|
log11("closed", void 0, {
|
|
2736
2742
|
F: __dxlog_file12,
|
|
2737
|
-
L:
|
|
2743
|
+
L: 125,
|
|
2738
2744
|
S: this,
|
|
2739
2745
|
C: (f, a) => f(...a)
|
|
2740
2746
|
});
|
|
@@ -2767,7 +2773,6 @@ import { ConnectionState as ConnectionState3 } from "@dxos/protocols/proto/dxos/
|
|
|
2767
2773
|
import { ComplexMap as ComplexMap8 } from "@dxos/util";
|
|
2768
2774
|
var __dxlog_file13 = "/home/runner/work/dxos/dxos/packages/core/mesh/network-manager/src/transport/simplepeer-transport-service.ts";
|
|
2769
2775
|
var SimplePeerTransportService = class {
|
|
2770
|
-
// prettier-ignore
|
|
2771
2776
|
constructor(_webrtcConfig) {
|
|
2772
2777
|
this._webrtcConfig = _webrtcConfig;
|
|
2773
2778
|
this.transports = new ComplexMap8(PublicKey11.hash);
|
|
@@ -2847,7 +2852,7 @@ var SimplePeerTransportService = class {
|
|
|
2847
2852
|
async sendSignal({ proxyId, signal }) {
|
|
2848
2853
|
invariant12(this.transports.has(proxyId), void 0, {
|
|
2849
2854
|
F: __dxlog_file13,
|
|
2850
|
-
L:
|
|
2855
|
+
L: 110,
|
|
2851
2856
|
S: this,
|
|
2852
2857
|
A: [
|
|
2853
2858
|
"this.transports.has(proxyId)",
|
|
@@ -2859,7 +2864,7 @@ var SimplePeerTransportService = class {
|
|
|
2859
2864
|
async sendData({ proxyId, payload }) {
|
|
2860
2865
|
invariant12(this.transports.has(proxyId), void 0, {
|
|
2861
2866
|
F: __dxlog_file13,
|
|
2862
|
-
L:
|
|
2867
|
+
L: 115,
|
|
2863
2868
|
S: this,
|
|
2864
2869
|
A: [
|
|
2865
2870
|
"this.transports.has(proxyId)",
|
|
@@ -2880,7 +2885,7 @@ var SimplePeerTransportService = class {
|
|
|
2880
2885
|
this.transports.delete(proxyId);
|
|
2881
2886
|
log12("Closed.", void 0, {
|
|
2882
2887
|
F: __dxlog_file13,
|
|
2883
|
-
L:
|
|
2888
|
+
L: 129,
|
|
2884
2889
|
S: this,
|
|
2885
2890
|
C: (f, a) => f(...a)
|
|
2886
2891
|
});
|
|
@@ -2892,15 +2897,14 @@ import { Writable } from "@dxos/node-std/stream";
|
|
|
2892
2897
|
import { Event as Event9 } from "@dxos/async";
|
|
2893
2898
|
import { Context as Context6 } from "@dxos/context";
|
|
2894
2899
|
import { ErrorStream as ErrorStream5 } from "@dxos/debug";
|
|
2895
|
-
import { ConnectionResetError as ConnectionResetError3, TimeoutError as TimeoutError2, ProtocolError as ProtocolError3, ConnectivityError as ConnectivityError3, UnknownProtocolError as UnknownProtocolError3 } from "@dxos/errors";
|
|
2896
2900
|
import { invariant as invariant13 } from "@dxos/invariant";
|
|
2897
2901
|
import { PublicKey as PublicKey12 } from "@dxos/keys";
|
|
2898
2902
|
import { log as log13 } from "@dxos/log";
|
|
2903
|
+
import { ConnectionResetError as ConnectionResetError3, TimeoutError as TimeoutError2, ProtocolError as ProtocolError3, ConnectivityError as ConnectivityError3, UnknownProtocolError as UnknownProtocolError3 } from "@dxos/protocols";
|
|
2899
2904
|
import { ConnectionState as ConnectionState4 } from "@dxos/protocols/proto/dxos/mesh/bridge";
|
|
2900
2905
|
import { arrayToBuffer } from "@dxos/util";
|
|
2901
2906
|
var __dxlog_file14 = "/home/runner/work/dxos/dxos/packages/core/mesh/network-manager/src/transport/simplepeer-transport-proxy.ts";
|
|
2902
2907
|
var SimplePeerTransportProxy = class {
|
|
2903
|
-
// prettier-ignore
|
|
2904
2908
|
constructor(_params) {
|
|
2905
2909
|
this._params = _params;
|
|
2906
2910
|
this._proxyId = PublicKey12.random();
|
|
@@ -2917,7 +2921,7 @@ var SimplePeerTransportProxy = class {
|
|
|
2917
2921
|
this._serviceStream.subscribe(async (event) => {
|
|
2918
2922
|
log13("SimplePeerTransportProxy: event", event, {
|
|
2919
2923
|
F: __dxlog_file14,
|
|
2920
|
-
L:
|
|
2924
|
+
L: 55,
|
|
2921
2925
|
S: this,
|
|
2922
2926
|
C: (f, a) => f(...a)
|
|
2923
2927
|
});
|
|
@@ -2946,7 +2950,7 @@ var SimplePeerTransportProxy = class {
|
|
|
2946
2950
|
}));
|
|
2947
2951
|
}, (error) => log13.catch(error, void 0, {
|
|
2948
2952
|
F: __dxlog_file14,
|
|
2949
|
-
L:
|
|
2953
|
+
L: 83,
|
|
2950
2954
|
S: this,
|
|
2951
2955
|
C: (f, a) => f(...a)
|
|
2952
2956
|
}));
|
|
@@ -2992,7 +2996,7 @@ var SimplePeerTransportProxy = class {
|
|
|
2992
2996
|
} catch (err) {
|
|
2993
2997
|
log13.catch(err, void 0, {
|
|
2994
2998
|
F: __dxlog_file14,
|
|
2995
|
-
L:
|
|
2999
|
+
L: 134,
|
|
2996
3000
|
S: this,
|
|
2997
3001
|
C: (f, a) => f(...a)
|
|
2998
3002
|
});
|
|
@@ -3028,7 +3032,7 @@ var SimplePeerTransportProxyFactory = class {
|
|
|
3028
3032
|
createTransport(options) {
|
|
3029
3033
|
invariant13(this._bridgeService, "SimplePeerTransportProxyFactory is not ready to open connections", {
|
|
3030
3034
|
F: __dxlog_file14,
|
|
3031
|
-
L:
|
|
3035
|
+
L: 171,
|
|
3032
3036
|
S: this,
|
|
3033
3037
|
A: [
|
|
3034
3038
|
"this._bridgeService",
|
|
@@ -3046,15 +3050,15 @@ var SimplePeerTransportProxyFactory = class {
|
|
|
3046
3050
|
};
|
|
3047
3051
|
var decodeError = (err) => {
|
|
3048
3052
|
const message = typeof err === "string" ? err : err.message;
|
|
3049
|
-
if (message.includes("
|
|
3053
|
+
if (message.includes("CONNECTION_RESET")) {
|
|
3050
3054
|
return new ConnectionResetError3(message);
|
|
3051
|
-
} else if (message.includes("
|
|
3055
|
+
} else if (message.includes("TIMEOUT")) {
|
|
3052
3056
|
return new TimeoutError2(message);
|
|
3053
|
-
} else if (message.includes("
|
|
3057
|
+
} else if (message.includes("PROTOCOL_ERROR")) {
|
|
3054
3058
|
return new ProtocolError3(message);
|
|
3055
|
-
} else if (message.includes("
|
|
3059
|
+
} else if (message.includes("CONNECTIVITY_ERROR")) {
|
|
3056
3060
|
return new ConnectivityError3(message);
|
|
3057
|
-
} else if (message.includes("
|
|
3061
|
+
} else if (message.includes("UNKNOWN_PROTOCOL_ERROR")) {
|
|
3058
3062
|
return new UnknownProtocolError3(message);
|
|
3059
3063
|
} else {
|
|
3060
3064
|
return typeof err === "string" ? new Error(err) : err;
|
|
@@ -3447,4 +3451,4 @@ export {
|
|
|
3447
3451
|
createLibDataChannelTransportFactory,
|
|
3448
3452
|
createTeleportProtocolFactory
|
|
3449
3453
|
};
|
|
3450
|
-
//# sourceMappingURL=chunk-
|
|
3454
|
+
//# sourceMappingURL=chunk-HKHUCTRB.mjs.map
|