@dxos/network-manager 0.3.9-main.cab5453 → 0.3.9-main.cdfefb1
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-4HITD6WI.mjs → chunk-7JESB3AJ.mjs} +376 -108
- package/dist/lib/browser/chunk-7JESB3AJ.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1 -11
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +1 -2
- package/dist/lib/browser/testing/index.mjs.map +1 -1
- package/dist/lib/node/{chunk-6AD7QA4X.cjs → chunk-Y2B5BDRH.cjs} +383 -103
- package/dist/lib/node/chunk-Y2B5BDRH.cjs.map +7 -0
- package/dist/lib/node/index.cjs +27 -36
- package/dist/lib/node/index.cjs.map +2 -2
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/testing/index.cjs +18 -19
- package/dist/lib/node/testing/index.cjs.map +1 -1
- package/dist/types/src/connection-log.d.ts.map +1 -1
- package/dist/types/src/swarm/connection.d.ts +4 -1
- package/dist/types/src/swarm/connection.d.ts.map +1 -1
- package/dist/types/src/topology/mmst-topology.d.ts +1 -0
- package/dist/types/src/topology/mmst-topology.d.ts.map +1 -1
- package/dist/types/src/transport/index.d.ts +0 -1
- package/dist/types/src/transport/index.d.ts.map +1 -1
- package/dist/types/src/transport/libdatachannel-transport.d.ts +4 -1
- package/dist/types/src/transport/libdatachannel-transport.d.ts.map +1 -1
- package/dist/types/src/transport/memory-transport.d.ts +3 -1
- package/dist/types/src/transport/memory-transport.d.ts.map +1 -1
- package/dist/types/src/transport/simplepeer-transport-proxy.d.ts +3 -1
- package/dist/types/src/transport/simplepeer-transport-proxy.d.ts.map +1 -1
- package/dist/types/src/transport/simplepeer-transport-service.d.ts +3 -1
- package/dist/types/src/transport/simplepeer-transport-service.d.ts.map +1 -1
- package/dist/types/src/transport/simplepeer-transport.d.ts +7 -1
- package/dist/types/src/transport/simplepeer-transport.d.ts.map +1 -1
- package/dist/types/src/transport/tcp-transport.browser.d.ts +3 -1
- package/dist/types/src/transport/tcp-transport.browser.d.ts.map +1 -1
- package/dist/types/src/transport/tcp-transport.d.ts +3 -1
- package/dist/types/src/transport/tcp-transport.d.ts.map +1 -1
- package/dist/types/src/transport/transport.d.ts +17 -0
- package/dist/types/src/transport/transport.d.ts.map +1 -1
- package/dist/types/src/wire-protocol.d.ts +1 -1
- package/dist/types/src/wire-protocol.d.ts.map +1 -1
- package/package.json +18 -18
- package/src/connection-log.ts +14 -1
- package/src/swarm/connection.ts +23 -4
- package/src/topology/mmst-topology.ts +34 -6
- package/src/transport/index.ts +0 -1
- package/src/transport/libdatachannel-transport.test.ts +0 -4
- package/src/transport/libdatachannel-transport.ts +83 -5
- package/src/transport/memory-transport.ts +14 -1
- package/src/transport/simplepeer-transport-proxy.ts +9 -1
- package/src/transport/simplepeer-transport-service.ts +14 -0
- package/src/transport/simplepeer-transport.ts +66 -3
- package/src/transport/tcp-transport.browser.ts +9 -1
- package/src/transport/tcp-transport.ts +19 -1
- package/src/transport/transport.ts +19 -0
- package/src/wire-protocol.ts +3 -3
- package/dist/lib/browser/chunk-4HITD6WI.mjs.map +0 -7
- package/dist/lib/browser/chunk-YERMWDRB.mjs +0 -24
- package/dist/lib/browser/chunk-YERMWDRB.mjs.map +0 -7
- package/dist/lib/browser/index.browser-O53CPVK3.mjs +0 -14
- package/dist/lib/browser/index.browser-O53CPVK3.mjs.map +0 -7
- package/dist/lib/node/chunk-6AD7QA4X.cjs.map +0 -7
- package/dist/lib/node/chunk-XE5JOIGD.cjs +0 -462
- package/dist/lib/node/chunk-XE5JOIGD.cjs.map +0 -7
- package/dist/lib/node/datachannel-53JZPGFA.cjs +0 -35
- package/dist/lib/node/datachannel-53JZPGFA.cjs.map +0 -7
- package/dist/types/src/transport/datachannel/index.browser.d.ts +0 -15
- package/dist/types/src/transport/datachannel/index.browser.d.ts.map +0 -1
- package/dist/types/src/transport/datachannel/index.d.ts +0 -8
- package/dist/types/src/transport/datachannel/index.d.ts.map +0 -1
- package/dist/types/src/transport/datachannel/rtc-data-channel.d.ts +0 -29
- package/dist/types/src/transport/datachannel/rtc-data-channel.d.ts.map +0 -1
- package/dist/types/src/transport/datachannel/rtc-events.d.ts +0 -9
- package/dist/types/src/transport/datachannel/rtc-events.d.ts.map +0 -1
- package/dist/types/src/transport/datachannel/rtc-ice-candidate.d.ts +0 -22
- package/dist/types/src/transport/datachannel/rtc-ice-candidate.d.ts.map +0 -1
- package/dist/types/src/transport/datachannel/rtc-peer-connection.d.ts +0 -47
- package/dist/types/src/transport/datachannel/rtc-peer-connection.d.ts.map +0 -1
- package/dist/types/src/transport/datachannel/rtc-peer-connection.test.d.ts +0 -2
- package/dist/types/src/transport/datachannel/rtc-peer-connection.test.d.ts.map +0 -1
- package/dist/types/src/transport/datachannel/rtc-session-description.d.ts +0 -10
- package/dist/types/src/transport/datachannel/rtc-session-description.d.ts.map +0 -1
- package/src/transport/datachannel/README.md +0 -2
- package/src/transport/datachannel/index.browser.ts +0 -8
- package/src/transport/datachannel/index.ts +0 -17
- package/src/transport/datachannel/rtc-data-channel.ts +0 -148
- package/src/transport/datachannel/rtc-events.ts +0 -23
- package/src/transport/datachannel/rtc-ice-candidate.ts +0 -54
- package/src/transport/datachannel/rtc-peer-connection.test.ts +0 -112
- package/src/transport/datachannel/rtc-peer-connection.ts +0 -347
- package/src/transport/datachannel/rtc-session-description.ts +0 -23
|
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_Y2B5BDRH_exports = {};
|
|
30
|
+
__export(chunk_Y2B5BDRH_exports, {
|
|
31
31
|
Connection: () => Connection,
|
|
32
32
|
ConnectionLimiter: () => ConnectionLimiter,
|
|
33
33
|
ConnectionLog: () => ConnectionLog,
|
|
@@ -55,8 +55,7 @@ __export(chunk_6AD7QA4X_exports, {
|
|
|
55
55
|
createSimplePeerTransportFactory: () => createSimplePeerTransportFactory,
|
|
56
56
|
createTeleportProtocolFactory: () => createTeleportProtocolFactory
|
|
57
57
|
});
|
|
58
|
-
module.exports = __toCommonJS(
|
|
59
|
-
var import_chunk_XE5JOIGD = require("./chunk-XE5JOIGD.cjs");
|
|
58
|
+
module.exports = __toCommonJS(chunk_Y2B5BDRH_exports);
|
|
60
59
|
var import_async = require("@dxos/async");
|
|
61
60
|
var import_context = require("@dxos/context");
|
|
62
61
|
var import_debug = require("@dxos/debug");
|
|
@@ -153,6 +152,13 @@ var import_async12 = require("@dxos/async");
|
|
|
153
152
|
var import_debug8 = require("@dxos/debug");
|
|
154
153
|
var import_log15 = require("@dxos/log");
|
|
155
154
|
var import_teleport = require("@dxos/teleport");
|
|
155
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
156
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
157
|
+
}) : x)(function(x) {
|
|
158
|
+
if (typeof require !== "undefined")
|
|
159
|
+
return require.apply(this, arguments);
|
|
160
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
161
|
+
});
|
|
156
162
|
function _ts_decorate(decorators, target, key, desc) {
|
|
157
163
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
158
164
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
@@ -166,6 +172,7 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
166
172
|
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/core/mesh/network-manager/src/swarm/connection.ts";
|
|
167
173
|
var STARTING_SIGNALLING_DELAY = 10;
|
|
168
174
|
var TRANSPORT_CONNECTION_TIMEOUT = 1e4;
|
|
175
|
+
var TRANSPORT_STATS_INTERVAL = 5e3;
|
|
169
176
|
var MAX_SIGNALLING_DELAY = 300;
|
|
170
177
|
var ConnectionState;
|
|
171
178
|
(function(ConnectionState5) {
|
|
@@ -228,6 +235,7 @@ var Connection = class {
|
|
|
228
235
|
this.stateChanged = new import_async.Event();
|
|
229
236
|
this.errors = new import_debug.ErrorStream();
|
|
230
237
|
this._instanceId = import_keys.PublicKey.random().toHex();
|
|
238
|
+
this.transportStats = new import_async.Event();
|
|
231
239
|
this._signalSendTask = new import_async.DeferredTask(this._ctx, async () => {
|
|
232
240
|
await this._flushSignalBuffer();
|
|
233
241
|
});
|
|
@@ -240,11 +248,14 @@ var Connection = class {
|
|
|
240
248
|
initiator: this.initiator
|
|
241
249
|
}, {
|
|
242
250
|
F: __dxlog_file,
|
|
243
|
-
L:
|
|
251
|
+
L: 134,
|
|
244
252
|
S: this,
|
|
245
253
|
C: (f, a) => f(...a)
|
|
246
254
|
});
|
|
247
255
|
}
|
|
256
|
+
get sessionIdString() {
|
|
257
|
+
return this.sessionId.truncate();
|
|
258
|
+
}
|
|
248
259
|
get state() {
|
|
249
260
|
return this._state;
|
|
250
261
|
}
|
|
@@ -260,7 +271,7 @@ var Connection = class {
|
|
|
260
271
|
async openConnection() {
|
|
261
272
|
(0, import_invariant.invariant)(this._state === ConnectionState.INITIAL, "Invalid state.", {
|
|
262
273
|
F: __dxlog_file,
|
|
263
|
-
L:
|
|
274
|
+
L: 164,
|
|
264
275
|
S: this,
|
|
265
276
|
A: [
|
|
266
277
|
"this._state === ConnectionState.INITIAL",
|
|
@@ -271,7 +282,7 @@ var Connection = class {
|
|
|
271
282
|
id: this._instanceId
|
|
272
283
|
}), {
|
|
273
284
|
F: __dxlog_file,
|
|
274
|
-
L:
|
|
285
|
+
L: 165,
|
|
275
286
|
S: this,
|
|
276
287
|
C: (f, a) => f(...a)
|
|
277
288
|
});
|
|
@@ -283,18 +294,18 @@ var Connection = class {
|
|
|
283
294
|
initiator: this.initiator
|
|
284
295
|
}, {
|
|
285
296
|
F: __dxlog_file,
|
|
286
|
-
L:
|
|
297
|
+
L: 166,
|
|
287
298
|
S: this,
|
|
288
299
|
C: (f, a) => f(...a)
|
|
289
300
|
});
|
|
290
301
|
this._changeState(ConnectionState.CONNECTING);
|
|
291
|
-
this._protocol.open().catch((err) => {
|
|
302
|
+
this._protocol.open(this.sessionId).catch((err) => {
|
|
292
303
|
this.errors.raise(err);
|
|
293
304
|
});
|
|
294
305
|
this._protocol.stream.on("close", () => {
|
|
295
306
|
(0, import_log.log)("protocol stream closed", void 0, {
|
|
296
307
|
F: __dxlog_file,
|
|
297
|
-
L:
|
|
308
|
+
L: 183,
|
|
298
309
|
S: this,
|
|
299
310
|
C: (f, a) => f(...a)
|
|
300
311
|
});
|
|
@@ -303,7 +314,7 @@ var Connection = class {
|
|
|
303
314
|
(0, import_async.scheduleTask)(this.connectedTimeoutContext, async () => {
|
|
304
315
|
import_log.log.info(`timeout waiting ${TRANSPORT_CONNECTION_TIMEOUT / 1e3}s for transport to connect, aborting`, void 0, {
|
|
305
316
|
F: __dxlog_file,
|
|
306
|
-
L:
|
|
317
|
+
L: 190,
|
|
307
318
|
S: this,
|
|
308
319
|
C: (f, a) => f(...a)
|
|
309
320
|
});
|
|
@@ -311,7 +322,7 @@ var Connection = class {
|
|
|
311
322
|
}, TRANSPORT_CONNECTION_TIMEOUT);
|
|
312
323
|
(0, import_invariant.invariant)(!this._transport, void 0, {
|
|
313
324
|
F: __dxlog_file,
|
|
314
|
-
L:
|
|
325
|
+
L: 198,
|
|
315
326
|
S: this,
|
|
316
327
|
A: [
|
|
317
328
|
"!this._transport",
|
|
@@ -321,18 +332,20 @@ var Connection = class {
|
|
|
321
332
|
this._transport = this._transportFactory.createTransport({
|
|
322
333
|
initiator: this.initiator,
|
|
323
334
|
stream: this._protocol.stream,
|
|
324
|
-
sendSignal: async (signal) => this._sendSignal(signal)
|
|
335
|
+
sendSignal: async (signal) => this._sendSignal(signal),
|
|
336
|
+
sessionId: this.sessionId
|
|
325
337
|
});
|
|
326
338
|
this._transport.connected.once(async () => {
|
|
327
339
|
this._changeState(ConnectionState.CONNECTED);
|
|
328
340
|
await this.connectedTimeoutContext.dispose();
|
|
329
341
|
this._callbacks?.onConnected?.();
|
|
342
|
+
(0, import_async.scheduleTaskInterval)(this._ctx, async () => this._emitTransportStats(), TRANSPORT_STATS_INTERVAL);
|
|
330
343
|
});
|
|
331
344
|
this._transport.closed.once(() => {
|
|
332
345
|
this._transport = void 0;
|
|
333
346
|
(0, import_log.log)("abort triggered by transport close", void 0, {
|
|
334
347
|
F: __dxlog_file,
|
|
335
|
-
L:
|
|
348
|
+
L: 216,
|
|
336
349
|
S: this,
|
|
337
350
|
C: (f, a) => f(...a)
|
|
338
351
|
});
|
|
@@ -343,7 +356,7 @@ var Connection = class {
|
|
|
343
356
|
err
|
|
344
357
|
}, {
|
|
345
358
|
F: __dxlog_file,
|
|
346
|
-
L:
|
|
359
|
+
L: 221,
|
|
347
360
|
S: this,
|
|
348
361
|
C: (f, a) => f(...a)
|
|
349
362
|
});
|
|
@@ -353,7 +366,7 @@ var Connection = class {
|
|
|
353
366
|
if (err instanceof import_protocols.ConnectionResetError) {
|
|
354
367
|
import_log.log.info("aborting due to transport ConnectionResetError", void 0, {
|
|
355
368
|
F: __dxlog_file,
|
|
356
|
-
L:
|
|
369
|
+
L: 228,
|
|
357
370
|
S: this,
|
|
358
371
|
C: (f, a) => f(...a)
|
|
359
372
|
});
|
|
@@ -361,7 +374,7 @@ var Connection = class {
|
|
|
361
374
|
} else if (err instanceof import_protocols.ConnectivityError) {
|
|
362
375
|
import_log.log.info("aborting due to transport ConnectivityError", void 0, {
|
|
363
376
|
F: __dxlog_file,
|
|
364
|
-
L:
|
|
377
|
+
L: 231,
|
|
365
378
|
S: this,
|
|
366
379
|
C: (f, a) => f(...a)
|
|
367
380
|
});
|
|
@@ -371,7 +384,7 @@ var Connection = class {
|
|
|
371
384
|
err
|
|
372
385
|
}, {
|
|
373
386
|
F: __dxlog_file,
|
|
374
|
-
L:
|
|
387
|
+
L: 234,
|
|
375
388
|
S: this,
|
|
376
389
|
C: (f, a) => f(...a)
|
|
377
390
|
});
|
|
@@ -389,7 +402,7 @@ var Connection = class {
|
|
|
389
402
|
id: this._instanceId
|
|
390
403
|
}), {
|
|
391
404
|
F: __dxlog_file,
|
|
392
|
-
L:
|
|
405
|
+
L: 250,
|
|
393
406
|
S: this,
|
|
394
407
|
C: (f, a) => f(...a)
|
|
395
408
|
});
|
|
@@ -399,14 +412,14 @@ var Connection = class {
|
|
|
399
412
|
err
|
|
400
413
|
}, {
|
|
401
414
|
F: __dxlog_file,
|
|
402
|
-
L:
|
|
415
|
+
L: 257,
|
|
403
416
|
S: this,
|
|
404
417
|
C: (f, a) => f(...a)
|
|
405
418
|
});
|
|
406
419
|
if (this._state === ConnectionState.CLOSED || this._state === ConnectionState.ABORTED) {
|
|
407
420
|
(0, import_log.log)(`abort ignored: already ${this._state}`, this.closeReason, {
|
|
408
421
|
F: __dxlog_file,
|
|
409
|
-
L:
|
|
422
|
+
L: 259,
|
|
410
423
|
S: this,
|
|
411
424
|
C: (f, a) => f(...a)
|
|
412
425
|
});
|
|
@@ -421,7 +434,7 @@ var Connection = class {
|
|
|
421
434
|
try {
|
|
422
435
|
(0, import_log.log)("aborting protocol... ", void 0, {
|
|
423
436
|
F: __dxlog_file,
|
|
424
|
-
L:
|
|
437
|
+
L: 273,
|
|
425
438
|
S: this,
|
|
426
439
|
C: (f, a) => f(...a)
|
|
427
440
|
});
|
|
@@ -429,7 +442,7 @@ var Connection = class {
|
|
|
429
442
|
} catch (err2) {
|
|
430
443
|
import_log.log.catch(err2, void 0, {
|
|
431
444
|
F: __dxlog_file,
|
|
432
|
-
L:
|
|
445
|
+
L: 276,
|
|
433
446
|
S: this,
|
|
434
447
|
C: (f, a) => f(...a)
|
|
435
448
|
});
|
|
@@ -439,7 +452,7 @@ var Connection = class {
|
|
|
439
452
|
} catch (err2) {
|
|
440
453
|
import_log.log.catch(err2, void 0, {
|
|
441
454
|
F: __dxlog_file,
|
|
442
|
-
L:
|
|
455
|
+
L: 283,
|
|
443
456
|
S: this,
|
|
444
457
|
C: (f, a) => f(...a)
|
|
445
458
|
});
|
|
@@ -449,7 +462,7 @@ var Connection = class {
|
|
|
449
462
|
} catch (err2) {
|
|
450
463
|
import_log.log.catch(err2, void 0, {
|
|
451
464
|
F: __dxlog_file,
|
|
452
|
-
L:
|
|
465
|
+
L: 289,
|
|
453
466
|
S: this,
|
|
454
467
|
C: (f, a) => f(...a)
|
|
455
468
|
});
|
|
@@ -473,7 +486,7 @@ var Connection = class {
|
|
|
473
486
|
peerId: this.ownId
|
|
474
487
|
}, {
|
|
475
488
|
F: __dxlog_file,
|
|
476
|
-
L:
|
|
489
|
+
L: 314,
|
|
477
490
|
S: this,
|
|
478
491
|
C: (f, a) => f(...a)
|
|
479
492
|
});
|
|
@@ -483,7 +496,7 @@ var Connection = class {
|
|
|
483
496
|
} catch (err2) {
|
|
484
497
|
import_log.log.catch(err2, void 0, {
|
|
485
498
|
F: __dxlog_file,
|
|
486
|
-
L:
|
|
499
|
+
L: 321,
|
|
487
500
|
S: this,
|
|
488
501
|
C: (f, a) => f(...a)
|
|
489
502
|
});
|
|
@@ -493,7 +506,7 @@ var Connection = class {
|
|
|
493
506
|
} catch (err2) {
|
|
494
507
|
import_log.log.catch(err2, void 0, {
|
|
495
508
|
F: __dxlog_file,
|
|
496
|
-
L:
|
|
509
|
+
L: 328,
|
|
497
510
|
S: this,
|
|
498
511
|
C: (f, a) => f(...a)
|
|
499
512
|
});
|
|
@@ -501,7 +514,7 @@ var Connection = class {
|
|
|
501
514
|
} else {
|
|
502
515
|
import_log.log.info(`graceful close requested when we were in ${lastState} state? aborting`, void 0, {
|
|
503
516
|
F: __dxlog_file,
|
|
504
|
-
L:
|
|
517
|
+
L: 331,
|
|
505
518
|
S: this,
|
|
506
519
|
C: (f, a) => f(...a)
|
|
507
520
|
});
|
|
@@ -510,7 +523,7 @@ var Connection = class {
|
|
|
510
523
|
} catch (err2) {
|
|
511
524
|
import_log.log.catch(err2, void 0, {
|
|
512
525
|
F: __dxlog_file,
|
|
513
|
-
L:
|
|
526
|
+
L: 335,
|
|
514
527
|
S: this,
|
|
515
528
|
C: (f, a) => f(...a)
|
|
516
529
|
});
|
|
@@ -520,7 +533,7 @@ var Connection = class {
|
|
|
520
533
|
} catch (err2) {
|
|
521
534
|
import_log.log.catch(err2, void 0, {
|
|
522
535
|
F: __dxlog_file,
|
|
523
|
-
L:
|
|
536
|
+
L: 340,
|
|
524
537
|
S: this,
|
|
525
538
|
C: (f, a) => f(...a)
|
|
526
539
|
});
|
|
@@ -530,7 +543,7 @@ var Connection = class {
|
|
|
530
543
|
peerId: this.ownId
|
|
531
544
|
}, {
|
|
532
545
|
F: __dxlog_file,
|
|
533
|
-
L:
|
|
546
|
+
L: 344,
|
|
534
547
|
S: this,
|
|
535
548
|
C: (f, a) => f(...a)
|
|
536
549
|
});
|
|
@@ -573,7 +586,7 @@ var Connection = class {
|
|
|
573
586
|
err
|
|
574
587
|
}, {
|
|
575
588
|
F: __dxlog_file,
|
|
576
|
-
L:
|
|
589
|
+
L: 382,
|
|
577
590
|
S: this,
|
|
578
591
|
C: (f, a) => f(...a)
|
|
579
592
|
});
|
|
@@ -586,7 +599,7 @@ var Connection = class {
|
|
|
586
599
|
async signal(msg) {
|
|
587
600
|
(0, import_invariant.invariant)(msg.sessionId, void 0, {
|
|
588
601
|
F: __dxlog_file,
|
|
589
|
-
L:
|
|
602
|
+
L: 391,
|
|
590
603
|
S: this,
|
|
591
604
|
A: [
|
|
592
605
|
"msg.sessionId",
|
|
@@ -596,7 +609,7 @@ var Connection = class {
|
|
|
596
609
|
if (!msg.sessionId.equals(this.sessionId)) {
|
|
597
610
|
(0, import_log.log)("dropping signal for incorrect session id", void 0, {
|
|
598
611
|
F: __dxlog_file,
|
|
599
|
-
L:
|
|
612
|
+
L: 393,
|
|
600
613
|
S: this,
|
|
601
614
|
C: (f, a) => f(...a)
|
|
602
615
|
});
|
|
@@ -604,7 +617,7 @@ var Connection = class {
|
|
|
604
617
|
}
|
|
605
618
|
(0, import_invariant.invariant)(msg.data.signal || msg.data.signalBatch, void 0, {
|
|
606
619
|
F: __dxlog_file,
|
|
607
|
-
L:
|
|
620
|
+
L: 396,
|
|
608
621
|
S: this,
|
|
609
622
|
A: [
|
|
610
623
|
"msg.data.signal || msg.data.signalBatch",
|
|
@@ -613,7 +626,7 @@ var Connection = class {
|
|
|
613
626
|
});
|
|
614
627
|
(0, import_invariant.invariant)(msg.author?.equals(this.remoteId), void 0, {
|
|
615
628
|
F: __dxlog_file,
|
|
616
|
-
L:
|
|
629
|
+
L: 397,
|
|
617
630
|
S: this,
|
|
618
631
|
A: [
|
|
619
632
|
"msg.author?.equals(this.remoteId)",
|
|
@@ -622,7 +635,7 @@ var Connection = class {
|
|
|
622
635
|
});
|
|
623
636
|
(0, import_invariant.invariant)(msg.recipient?.equals(this.ownId), void 0, {
|
|
624
637
|
F: __dxlog_file,
|
|
625
|
-
L:
|
|
638
|
+
L: 398,
|
|
626
639
|
S: this,
|
|
627
640
|
A: [
|
|
628
641
|
"msg.recipient?.equals(this.ownId)",
|
|
@@ -646,7 +659,7 @@ var Connection = class {
|
|
|
646
659
|
msg: msg.data
|
|
647
660
|
}, {
|
|
648
661
|
F: __dxlog_file,
|
|
649
|
-
L:
|
|
662
|
+
L: 407,
|
|
650
663
|
S: this,
|
|
651
664
|
C: (f, a) => f(...a)
|
|
652
665
|
});
|
|
@@ -654,7 +667,7 @@ var Connection = class {
|
|
|
654
667
|
} else {
|
|
655
668
|
(0, import_invariant.invariant)(this._transport, "Connection not ready to accept signals.", {
|
|
656
669
|
F: __dxlog_file,
|
|
657
|
-
L:
|
|
670
|
+
L: 410,
|
|
658
671
|
S: this,
|
|
659
672
|
A: [
|
|
660
673
|
"this._transport",
|
|
@@ -667,7 +680,7 @@ var Connection = class {
|
|
|
667
680
|
msg: msg.data
|
|
668
681
|
}, {
|
|
669
682
|
F: __dxlog_file,
|
|
670
|
-
L:
|
|
683
|
+
L: 411,
|
|
671
684
|
S: this,
|
|
672
685
|
C: (f, a) => f(...a)
|
|
673
686
|
});
|
|
@@ -685,13 +698,13 @@ var Connection = class {
|
|
|
685
698
|
peerId: this.ownId
|
|
686
699
|
}, {
|
|
687
700
|
F: __dxlog_file,
|
|
688
|
-
L:
|
|
701
|
+
L: 422,
|
|
689
702
|
S: this,
|
|
690
703
|
C: (f, a) => f(...a)
|
|
691
704
|
});
|
|
692
705
|
(0, import_invariant.invariant)(state !== this._state, "Already in this state.", {
|
|
693
706
|
F: __dxlog_file,
|
|
694
|
-
L:
|
|
707
|
+
L: 423,
|
|
695
708
|
S: this,
|
|
696
709
|
A: [
|
|
697
710
|
"state !== this._state",
|
|
@@ -701,7 +714,16 @@ var Connection = class {
|
|
|
701
714
|
this._state = state;
|
|
702
715
|
this.stateChanged.emit(state);
|
|
703
716
|
}
|
|
717
|
+
async _emitTransportStats() {
|
|
718
|
+
const stats = await this.transport?.getStats();
|
|
719
|
+
if (stats) {
|
|
720
|
+
this.transportStats.emit(stats);
|
|
721
|
+
}
|
|
722
|
+
}
|
|
704
723
|
};
|
|
724
|
+
_ts_decorate([
|
|
725
|
+
import_log.logInfo
|
|
726
|
+
], Connection.prototype, "sessionIdString", null);
|
|
705
727
|
_ts_decorate([
|
|
706
728
|
import_async.synchronized
|
|
707
729
|
], Connection.prototype, "abort", null);
|
|
@@ -2090,7 +2112,7 @@ var ConnectionLog = class {
|
|
|
2090
2112
|
};
|
|
2091
2113
|
info.connections.push(connectionInfo);
|
|
2092
2114
|
this.update.emit();
|
|
2093
|
-
connection.stateChanged.on((state) => {
|
|
2115
|
+
connection.stateChanged.on(async (state) => {
|
|
2094
2116
|
connectionInfo.state = state;
|
|
2095
2117
|
connectionInfo.closeReason = connection.closeReason;
|
|
2096
2118
|
connectionInfo.lastUpdate = /* @__PURE__ */ new Date();
|
|
@@ -2098,6 +2120,10 @@ var ConnectionLog = class {
|
|
|
2098
2120
|
type: EventType.CONNECTION_STATE_CHANGED,
|
|
2099
2121
|
newState: state
|
|
2100
2122
|
});
|
|
2123
|
+
if (state === ConnectionState.CONNECTED) {
|
|
2124
|
+
const details = await connection.transport?.getDetails();
|
|
2125
|
+
connectionInfo.transportDetails = details;
|
|
2126
|
+
}
|
|
2101
2127
|
this.update.emit();
|
|
2102
2128
|
});
|
|
2103
2129
|
connection.protocol?.stats?.on((stats) => {
|
|
@@ -2107,6 +2133,12 @@ var ConnectionLog = class {
|
|
|
2107
2133
|
connectionInfo.lastUpdate = /* @__PURE__ */ new Date();
|
|
2108
2134
|
this.update.emit();
|
|
2109
2135
|
});
|
|
2136
|
+
connection.transportStats?.on((stats) => {
|
|
2137
|
+
connectionInfo.transportBytesSent = stats.bytesSent;
|
|
2138
|
+
connectionInfo.transportBytesReceived = stats.bytesReceived;
|
|
2139
|
+
connectionInfo.transportPacketsSent = stats.packetsSent;
|
|
2140
|
+
connectionInfo.transportPacketsReceived = stats.packetsReceived;
|
|
2141
|
+
});
|
|
2110
2142
|
gcSwarm(info);
|
|
2111
2143
|
});
|
|
2112
2144
|
}
|
|
@@ -2389,9 +2421,12 @@ var FullyConnectedTopology = class {
|
|
|
2389
2421
|
}
|
|
2390
2422
|
};
|
|
2391
2423
|
var __dxlog_file9 = "/home/runner/work/dxos/dxos/packages/core/mesh/network-manager/src/topology/mmst-topology.ts";
|
|
2424
|
+
var MIN_UPDATE_INTERVAL = 1e3 * 10;
|
|
2425
|
+
var MAX_CHANGES_PER_UPDATE = 1;
|
|
2392
2426
|
var MMSTTopology = class {
|
|
2393
2427
|
constructor({ originateConnections = 2, maxPeers = 4, sampleSize = 10 } = {}) {
|
|
2394
2428
|
this._sampleCollected = false;
|
|
2429
|
+
this._lastAction = /* @__PURE__ */ new Date(0);
|
|
2395
2430
|
this._originateConnections = originateConnections;
|
|
2396
2431
|
this._maxPeers = maxPeers;
|
|
2397
2432
|
this._sampleSize = sampleSize;
|
|
@@ -2399,7 +2434,7 @@ var MMSTTopology = class {
|
|
|
2399
2434
|
init(controller) {
|
|
2400
2435
|
(0, import_invariant8.invariant)(!this._controller, "Already initialized", {
|
|
2401
2436
|
F: __dxlog_file9,
|
|
2402
|
-
L:
|
|
2437
|
+
L: 51,
|
|
2403
2438
|
S: this,
|
|
2404
2439
|
A: [
|
|
2405
2440
|
"!this._controller",
|
|
@@ -2411,7 +2446,7 @@ var MMSTTopology = class {
|
|
|
2411
2446
|
update() {
|
|
2412
2447
|
(0, import_invariant8.invariant)(this._controller, "Not initialized", {
|
|
2413
2448
|
F: __dxlog_file9,
|
|
2414
|
-
L:
|
|
2449
|
+
L: 56,
|
|
2415
2450
|
S: this,
|
|
2416
2451
|
A: [
|
|
2417
2452
|
"this._controller",
|
|
@@ -2422,7 +2457,7 @@ var MMSTTopology = class {
|
|
|
2422
2457
|
if (this._sampleCollected || connected.length > this._maxPeers || candidates.length > 0) {
|
|
2423
2458
|
(0, import_log8.log)("Running the algorithm.", void 0, {
|
|
2424
2459
|
F: __dxlog_file9,
|
|
2425
|
-
L:
|
|
2460
|
+
L: 60,
|
|
2426
2461
|
S: this,
|
|
2427
2462
|
C: (f, a) => f(...a)
|
|
2428
2463
|
});
|
|
@@ -2433,7 +2468,7 @@ var MMSTTopology = class {
|
|
|
2433
2468
|
async onOffer(peer) {
|
|
2434
2469
|
(0, import_invariant8.invariant)(this._controller, "Not initialized", {
|
|
2435
2470
|
F: __dxlog_file9,
|
|
2436
|
-
L:
|
|
2471
|
+
L: 67,
|
|
2437
2472
|
S: this,
|
|
2438
2473
|
A: [
|
|
2439
2474
|
"this._controller",
|
|
@@ -2444,7 +2479,7 @@ var MMSTTopology = class {
|
|
|
2444
2479
|
const accept = connected.length < this._maxPeers;
|
|
2445
2480
|
(0, import_log8.log)(`Offer ${peer} accept=${accept}`, void 0, {
|
|
2446
2481
|
F: __dxlog_file9,
|
|
2447
|
-
L:
|
|
2482
|
+
L: 70,
|
|
2448
2483
|
S: this,
|
|
2449
2484
|
C: (f, a) => f(...a)
|
|
2450
2485
|
});
|
|
@@ -2455,7 +2490,7 @@ var MMSTTopology = class {
|
|
|
2455
2490
|
_runAlgorithm() {
|
|
2456
2491
|
(0, import_invariant8.invariant)(this._controller, "Not initialized", {
|
|
2457
2492
|
F: __dxlog_file9,
|
|
2458
|
-
L:
|
|
2493
|
+
L: 79,
|
|
2459
2494
|
S: this,
|
|
2460
2495
|
A: [
|
|
2461
2496
|
"this._controller",
|
|
@@ -2464,27 +2499,84 @@ var MMSTTopology = class {
|
|
|
2464
2499
|
});
|
|
2465
2500
|
const { connected, candidates, ownPeerId } = this._controller.getState();
|
|
2466
2501
|
if (connected.length > this._maxPeers) {
|
|
2502
|
+
(0, import_log8.log)(`disconnect ${connected.length - this._maxPeers} peers.`, void 0, {
|
|
2503
|
+
F: __dxlog_file9,
|
|
2504
|
+
L: 85,
|
|
2505
|
+
S: this,
|
|
2506
|
+
C: (f, a) => f(...a)
|
|
2507
|
+
});
|
|
2467
2508
|
const sorted = sortByXorDistance(connected, ownPeerId).reverse().slice(0, this._maxPeers - connected.length);
|
|
2468
|
-
|
|
2469
|
-
|
|
2509
|
+
(0, import_invariant8.invariant)(sorted.length === 0, void 0, {
|
|
2510
|
+
F: __dxlog_file9,
|
|
2511
|
+
L: 89,
|
|
2512
|
+
S: this,
|
|
2513
|
+
A: [
|
|
2514
|
+
"sorted.length === 0",
|
|
2515
|
+
""
|
|
2516
|
+
]
|
|
2517
|
+
});
|
|
2518
|
+
if (sorted.length > MAX_CHANGES_PER_UPDATE) {
|
|
2519
|
+
(0, import_log8.log)(`want to disconnect ${sorted.length} peers but limited to ${MAX_CHANGES_PER_UPDATE}`, void 0, {
|
|
2470
2520
|
F: __dxlog_file9,
|
|
2471
|
-
L:
|
|
2521
|
+
L: 92,
|
|
2522
|
+
S: this,
|
|
2523
|
+
C: (f, a) => f(...a)
|
|
2524
|
+
});
|
|
2525
|
+
}
|
|
2526
|
+
if (Date.now() - this._lastAction.getTime() > MIN_UPDATE_INTERVAL) {
|
|
2527
|
+
for (const peer of sorted.slice(0, MAX_CHANGES_PER_UPDATE)) {
|
|
2528
|
+
(0, import_log8.log)(`Disconnect ${peer}.`, void 0, {
|
|
2529
|
+
F: __dxlog_file9,
|
|
2530
|
+
L: 97,
|
|
2531
|
+
S: this,
|
|
2532
|
+
C: (f, a) => f(...a)
|
|
2533
|
+
});
|
|
2534
|
+
this._controller.disconnect(peer);
|
|
2535
|
+
}
|
|
2536
|
+
this._lastAction = /* @__PURE__ */ new Date();
|
|
2537
|
+
} else {
|
|
2538
|
+
(0, import_log8.log)("rate limited discconnect", void 0, {
|
|
2539
|
+
F: __dxlog_file9,
|
|
2540
|
+
L: 102,
|
|
2472
2541
|
S: this,
|
|
2473
2542
|
C: (f, a) => f(...a)
|
|
2474
2543
|
});
|
|
2475
|
-
this._controller.disconnect(peer);
|
|
2476
2544
|
}
|
|
2477
2545
|
} else if (connected.length < this._originateConnections) {
|
|
2546
|
+
(0, import_log8.log)(`connect ${this._originateConnections - connected.length} peers.`, void 0, {
|
|
2547
|
+
F: __dxlog_file9,
|
|
2548
|
+
L: 106,
|
|
2549
|
+
S: this,
|
|
2550
|
+
C: (f, a) => f(...a)
|
|
2551
|
+
});
|
|
2478
2552
|
const sample = candidates.sort(() => Math.random() - 0.5).slice(0, this._sampleSize);
|
|
2479
2553
|
const sorted = sortByXorDistance(sample, ownPeerId).slice(0, this._originateConnections - connected.length);
|
|
2480
|
-
|
|
2481
|
-
(0, import_log8.log)(`
|
|
2554
|
+
if (sorted.length > MAX_CHANGES_PER_UPDATE) {
|
|
2555
|
+
(0, import_log8.log)(`want to connect ${sorted.length} peers but limited to ${MAX_CHANGES_PER_UPDATE}`, void 0, {
|
|
2482
2556
|
F: __dxlog_file9,
|
|
2483
|
-
L:
|
|
2557
|
+
L: 111,
|
|
2558
|
+
S: this,
|
|
2559
|
+
C: (f, a) => f(...a)
|
|
2560
|
+
});
|
|
2561
|
+
}
|
|
2562
|
+
if (Date.now() - this._lastAction.getTime() > MIN_UPDATE_INTERVAL) {
|
|
2563
|
+
for (const peer of sorted.slice(0, MAX_CHANGES_PER_UPDATE)) {
|
|
2564
|
+
(0, import_log8.log)(`Connect ${peer}.`, void 0, {
|
|
2565
|
+
F: __dxlog_file9,
|
|
2566
|
+
L: 115,
|
|
2567
|
+
S: this,
|
|
2568
|
+
C: (f, a) => f(...a)
|
|
2569
|
+
});
|
|
2570
|
+
this._controller.connect(peer);
|
|
2571
|
+
}
|
|
2572
|
+
this._lastAction = /* @__PURE__ */ new Date();
|
|
2573
|
+
} else {
|
|
2574
|
+
(0, import_log8.log)("rate limited connect", void 0, {
|
|
2575
|
+
F: __dxlog_file9,
|
|
2576
|
+
L: 120,
|
|
2484
2577
|
S: this,
|
|
2485
2578
|
C: (f, a) => f(...a)
|
|
2486
2579
|
});
|
|
2487
|
-
this._controller.connect(peer);
|
|
2488
2580
|
}
|
|
2489
2581
|
}
|
|
2490
2582
|
}
|
|
@@ -2757,6 +2849,17 @@ var MemoryTransport = class _MemoryTransport {
|
|
|
2757
2849
|
this._remote.wake(remoteId);
|
|
2758
2850
|
}
|
|
2759
2851
|
}
|
|
2852
|
+
async getDetails() {
|
|
2853
|
+
return this._instanceId.toHex();
|
|
2854
|
+
}
|
|
2855
|
+
async getStats() {
|
|
2856
|
+
return {
|
|
2857
|
+
bytesSent: 0,
|
|
2858
|
+
bytesReceived: 0,
|
|
2859
|
+
packetsSent: 0,
|
|
2860
|
+
packetsReceived: 0
|
|
2861
|
+
};
|
|
2862
|
+
}
|
|
2760
2863
|
};
|
|
2761
2864
|
_ts_decorate4([
|
|
2762
2865
|
import_log10.logInfo
|
|
@@ -2774,11 +2877,14 @@ var TransportKind;
|
|
|
2774
2877
|
})(TransportKind || (TransportKind = {}));
|
|
2775
2878
|
var wrtc = null;
|
|
2776
2879
|
try {
|
|
2777
|
-
wrtc =
|
|
2880
|
+
wrtc = __require("@koush/wrtc");
|
|
2778
2881
|
} catch {
|
|
2779
2882
|
}
|
|
2780
2883
|
var __dxlog_file12 = "/home/runner/work/dxos/dxos/packages/core/mesh/network-manager/src/transport/simplepeer-transport.ts";
|
|
2781
2884
|
var SimplePeerTransport = class {
|
|
2885
|
+
/**
|
|
2886
|
+
* @params opts.config formatted as per https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/RTCPeerConnection
|
|
2887
|
+
*/
|
|
2782
2888
|
constructor(params) {
|
|
2783
2889
|
this.params = params;
|
|
2784
2890
|
this._closed = false;
|
|
@@ -2791,13 +2897,13 @@ var SimplePeerTransport = class {
|
|
|
2791
2897
|
id: this._instanceId
|
|
2792
2898
|
}), {
|
|
2793
2899
|
F: __dxlog_file12,
|
|
2794
|
-
L:
|
|
2900
|
+
L: 44,
|
|
2795
2901
|
S: this,
|
|
2796
2902
|
C: (f, a) => f(...a)
|
|
2797
2903
|
});
|
|
2798
2904
|
(0, import_log11.log)("created connection", params, {
|
|
2799
2905
|
F: __dxlog_file12,
|
|
2800
|
-
L:
|
|
2906
|
+
L: 45,
|
|
2801
2907
|
S: this,
|
|
2802
2908
|
C: (f, a) => f(...a)
|
|
2803
2909
|
});
|
|
@@ -2810,7 +2916,7 @@ var SimplePeerTransport = class {
|
|
|
2810
2916
|
this._peer.on("signal", async (data) => {
|
|
2811
2917
|
(0, import_log11.log)("signal", data, {
|
|
2812
2918
|
F: __dxlog_file12,
|
|
2813
|
-
L:
|
|
2919
|
+
L: 54,
|
|
2814
2920
|
S: this,
|
|
2815
2921
|
C: (f, a) => f(...a)
|
|
2816
2922
|
});
|
|
@@ -2823,7 +2929,7 @@ var SimplePeerTransport = class {
|
|
|
2823
2929
|
this._peer.on("connect", () => {
|
|
2824
2930
|
(0, import_log11.log)("connected", void 0, {
|
|
2825
2931
|
F: __dxlog_file12,
|
|
2826
|
-
L:
|
|
2932
|
+
L: 59,
|
|
2827
2933
|
S: this,
|
|
2828
2934
|
C: (f, a) => f(...a)
|
|
2829
2935
|
});
|
|
@@ -2834,7 +2940,7 @@ var SimplePeerTransport = class {
|
|
|
2834
2940
|
this._peer.on("close", async () => {
|
|
2835
2941
|
(0, import_log11.log)("closed", void 0, {
|
|
2836
2942
|
F: __dxlog_file12,
|
|
2837
|
-
L:
|
|
2943
|
+
L: 66,
|
|
2838
2944
|
S: this,
|
|
2839
2945
|
C: (f, a) => f(...a)
|
|
2840
2946
|
});
|
|
@@ -2849,7 +2955,7 @@ var SimplePeerTransport = class {
|
|
|
2849
2955
|
err
|
|
2850
2956
|
}, {
|
|
2851
2957
|
F: __dxlog_file12,
|
|
2852
|
-
L:
|
|
2958
|
+
L: 77,
|
|
2853
2959
|
S: this,
|
|
2854
2960
|
C: (f, a) => f(...a)
|
|
2855
2961
|
});
|
|
@@ -2858,7 +2964,7 @@ var SimplePeerTransport = class {
|
|
|
2858
2964
|
} else if ("code" in err) {
|
|
2859
2965
|
import_log11.log.info("simple-peer error", err, {
|
|
2860
2966
|
F: __dxlog_file12,
|
|
2861
|
-
L:
|
|
2967
|
+
L: 82,
|
|
2862
2968
|
S: this,
|
|
2863
2969
|
C: (f, a) => f(...a)
|
|
2864
2970
|
});
|
|
@@ -2888,7 +2994,7 @@ var SimplePeerTransport = class {
|
|
|
2888
2994
|
} else {
|
|
2889
2995
|
import_log11.log.info("unknown peer connection error", err, {
|
|
2890
2996
|
F: __dxlog_file12,
|
|
2891
|
-
L:
|
|
2997
|
+
L: 108,
|
|
2892
2998
|
S: this,
|
|
2893
2999
|
C: (f, a) => f(...a)
|
|
2894
3000
|
});
|
|
@@ -2899,10 +3005,10 @@ var SimplePeerTransport = class {
|
|
|
2899
3005
|
this._peer._pc.getStats().then((stats) => {
|
|
2900
3006
|
import_log11.log.info("report after webrtc error", {
|
|
2901
3007
|
config: this.params.webrtcConfig,
|
|
2902
|
-
stats
|
|
3008
|
+
stats: Object.fromEntries(stats.entries())
|
|
2903
3009
|
}, {
|
|
2904
3010
|
F: __dxlog_file12,
|
|
2905
|
-
L:
|
|
3011
|
+
L: 116,
|
|
2906
3012
|
S: this,
|
|
2907
3013
|
C: (f, a) => f(...a)
|
|
2908
3014
|
});
|
|
@@ -2911,7 +3017,7 @@ var SimplePeerTransport = class {
|
|
|
2911
3017
|
} catch (err2) {
|
|
2912
3018
|
import_log11.log.catch(err2, void 0, {
|
|
2913
3019
|
F: __dxlog_file12,
|
|
2914
|
-
L:
|
|
3020
|
+
L: 123,
|
|
2915
3021
|
S: this,
|
|
2916
3022
|
C: (f, a) => f(...a)
|
|
2917
3023
|
});
|
|
@@ -2922,28 +3028,81 @@ var SimplePeerTransport = class {
|
|
|
2922
3028
|
id: this._instanceId
|
|
2923
3029
|
}), {
|
|
2924
3030
|
F: __dxlog_file12,
|
|
2925
|
-
L:
|
|
3031
|
+
L: 129,
|
|
2926
3032
|
S: this,
|
|
2927
3033
|
C: (f, a) => f(...a)
|
|
2928
3034
|
});
|
|
2929
3035
|
}
|
|
3036
|
+
async getStats() {
|
|
3037
|
+
const stats = await this._getStats();
|
|
3038
|
+
if (!stats) {
|
|
3039
|
+
return {
|
|
3040
|
+
bytesSent: 0,
|
|
3041
|
+
bytesReceived: 0,
|
|
3042
|
+
packetsSent: 0,
|
|
3043
|
+
packetsReceived: 0,
|
|
3044
|
+
rawStats: {}
|
|
3045
|
+
};
|
|
3046
|
+
}
|
|
3047
|
+
return {
|
|
3048
|
+
bytesSent: stats.transport.bytesSent,
|
|
3049
|
+
bytesReceived: stats.transport.bytesReceived,
|
|
3050
|
+
packetsSent: stats.transport.packetsSent,
|
|
3051
|
+
packetsReceived: stats.transport.packetsReceived,
|
|
3052
|
+
rawStats: stats.raw
|
|
3053
|
+
};
|
|
3054
|
+
}
|
|
3055
|
+
async _getStats() {
|
|
3056
|
+
if (typeof this._peer?._pc?.getStats !== "function") {
|
|
3057
|
+
return null;
|
|
3058
|
+
}
|
|
3059
|
+
return await this._peer._pc.getStats().then((stats) => {
|
|
3060
|
+
const statsEntries = Array.from(stats.entries());
|
|
3061
|
+
const transport = statsEntries.filter((s) => s[1].type === "transport")[0][1];
|
|
3062
|
+
const candidatePair = statsEntries.filter((s) => s[0] === transport.selectedCandidatePairId);
|
|
3063
|
+
let selectedCandidatePair;
|
|
3064
|
+
let remoteCandidate;
|
|
3065
|
+
if (candidatePair.length > 0) {
|
|
3066
|
+
selectedCandidatePair = candidatePair[0][1];
|
|
3067
|
+
remoteCandidate = statsEntries.filter((s) => s[0] === selectedCandidatePair.remoteCandidateId)[0][1];
|
|
3068
|
+
}
|
|
3069
|
+
return {
|
|
3070
|
+
datachannel: statsEntries.filter((s) => s[1].type === "data-channel")[0][1],
|
|
3071
|
+
transport,
|
|
3072
|
+
selectedCandidatePair,
|
|
3073
|
+
remoteCandidate,
|
|
3074
|
+
raw: Object.fromEntries(stats.entries())
|
|
3075
|
+
};
|
|
3076
|
+
});
|
|
3077
|
+
}
|
|
3078
|
+
async getDetails() {
|
|
3079
|
+
const stats = await this._getStats();
|
|
3080
|
+
const rc = stats?.remoteCandidate;
|
|
3081
|
+
if (!rc) {
|
|
3082
|
+
return "unavailable";
|
|
3083
|
+
}
|
|
3084
|
+
if (rc.candidateType === "relay") {
|
|
3085
|
+
return `${rc.ip}:${rc.port}/${rc.protocol} relay for ${rc.relatedAddress}:${rc.relatedPort}`;
|
|
3086
|
+
}
|
|
3087
|
+
return `${rc.ip}:${rc.port}/${rc.protocol} ${rc.candidateType}`;
|
|
3088
|
+
}
|
|
2930
3089
|
async destroy() {
|
|
2931
3090
|
(0, import_log11.log)("closing...", void 0, {
|
|
2932
3091
|
F: __dxlog_file12,
|
|
2933
|
-
L:
|
|
3092
|
+
L: 192,
|
|
2934
3093
|
S: this,
|
|
2935
3094
|
C: (f, a) => f(...a)
|
|
2936
3095
|
});
|
|
2937
3096
|
if (this._closed) {
|
|
2938
3097
|
return;
|
|
2939
3098
|
}
|
|
2940
|
-
this._closed = true;
|
|
2941
3099
|
this._disconnectStreams();
|
|
2942
3100
|
this._peer.destroy();
|
|
3101
|
+
this._closed = true;
|
|
2943
3102
|
this.closed.emit();
|
|
2944
3103
|
(0, import_log11.log)("closed", void 0, {
|
|
2945
3104
|
F: __dxlog_file12,
|
|
2946
|
-
L:
|
|
3105
|
+
L: 200,
|
|
2947
3106
|
S: this,
|
|
2948
3107
|
C: (f, a) => f(...a)
|
|
2949
3108
|
});
|
|
@@ -3049,7 +3208,7 @@ var SimplePeerTransportService = class {
|
|
|
3049
3208
|
async sendSignal({ proxyId, signal }) {
|
|
3050
3209
|
(0, import_invariant11.invariant)(this.transports.has(proxyId), void 0, {
|
|
3051
3210
|
F: __dxlog_file13,
|
|
3052
|
-
L:
|
|
3211
|
+
L: 116,
|
|
3053
3212
|
S: this,
|
|
3054
3213
|
A: [
|
|
3055
3214
|
"this.transports.has(proxyId)",
|
|
@@ -3058,18 +3217,46 @@ var SimplePeerTransportService = class {
|
|
|
3058
3217
|
});
|
|
3059
3218
|
await this.transports.get(proxyId).transport.signal(signal);
|
|
3060
3219
|
}
|
|
3220
|
+
async getDetails({ proxyId }) {
|
|
3221
|
+
(0, import_invariant11.invariant)(this.transports.has(proxyId), void 0, {
|
|
3222
|
+
F: __dxlog_file13,
|
|
3223
|
+
L: 121,
|
|
3224
|
+
S: this,
|
|
3225
|
+
A: [
|
|
3226
|
+
"this.transports.has(proxyId)",
|
|
3227
|
+
""
|
|
3228
|
+
]
|
|
3229
|
+
});
|
|
3230
|
+
return {
|
|
3231
|
+
details: await this.transports.get(proxyId).transport.getDetails()
|
|
3232
|
+
};
|
|
3233
|
+
}
|
|
3234
|
+
async getStats({ proxyId }) {
|
|
3235
|
+
(0, import_invariant11.invariant)(this.transports.has(proxyId), void 0, {
|
|
3236
|
+
F: __dxlog_file13,
|
|
3237
|
+
L: 126,
|
|
3238
|
+
S: this,
|
|
3239
|
+
A: [
|
|
3240
|
+
"this.transports.has(proxyId)",
|
|
3241
|
+
""
|
|
3242
|
+
]
|
|
3243
|
+
});
|
|
3244
|
+
return {
|
|
3245
|
+
stats: await this.transports.get(proxyId).transport.getStats()
|
|
3246
|
+
};
|
|
3247
|
+
}
|
|
3061
3248
|
async sendData({ proxyId, payload }) {
|
|
3062
3249
|
if (this.transports.get(proxyId)?.state !== "OPEN") {
|
|
3063
3250
|
import_log12.log.debug("transport is closed", void 0, {
|
|
3064
3251
|
F: __dxlog_file13,
|
|
3065
|
-
L:
|
|
3252
|
+
L: 132,
|
|
3066
3253
|
S: this,
|
|
3067
3254
|
C: (f, a) => f(...a)
|
|
3068
3255
|
});
|
|
3069
3256
|
}
|
|
3070
3257
|
(0, import_invariant11.invariant)(this.transports.has(proxyId), void 0, {
|
|
3071
3258
|
F: __dxlog_file13,
|
|
3072
|
-
L:
|
|
3259
|
+
L: 134,
|
|
3073
3260
|
S: this,
|
|
3074
3261
|
A: [
|
|
3075
3262
|
"this.transports.has(proxyId)",
|
|
@@ -3092,7 +3279,7 @@ var SimplePeerTransportService = class {
|
|
|
3092
3279
|
}
|
|
3093
3280
|
(0, import_log12.log)("Closed.", void 0, {
|
|
3094
3281
|
F: __dxlog_file13,
|
|
3095
|
-
L:
|
|
3282
|
+
L: 150,
|
|
3096
3283
|
S: this,
|
|
3097
3284
|
C: (f, a) => f(...a)
|
|
3098
3285
|
});
|
|
@@ -3219,6 +3406,16 @@ var SimplePeerTransportProxy = class {
|
|
|
3219
3406
|
signal
|
|
3220
3407
|
}).catch((err) => this.errors.raise(decodeError(err)));
|
|
3221
3408
|
}
|
|
3409
|
+
async getDetails() {
|
|
3410
|
+
return (await this._params.bridgeService.getDetails({
|
|
3411
|
+
proxyId: this._proxyId
|
|
3412
|
+
})).details;
|
|
3413
|
+
}
|
|
3414
|
+
async getStats() {
|
|
3415
|
+
return (await this._params.bridgeService.getStats({
|
|
3416
|
+
proxyId: this._proxyId
|
|
3417
|
+
})).stats;
|
|
3418
|
+
}
|
|
3222
3419
|
// TODO(burdon): Move open from constructor.
|
|
3223
3420
|
async destroy() {
|
|
3224
3421
|
await this._ctx.dispose();
|
|
@@ -3233,7 +3430,7 @@ var SimplePeerTransportProxy = class {
|
|
|
3233
3430
|
} catch (err) {
|
|
3234
3431
|
import_log13.log.catch(err, void 0, {
|
|
3235
3432
|
F: __dxlog_file14,
|
|
3236
|
-
L:
|
|
3433
|
+
L: 168,
|
|
3237
3434
|
S: this,
|
|
3238
3435
|
C: (f, a) => f(...a)
|
|
3239
3436
|
});
|
|
@@ -3269,7 +3466,7 @@ var SimplePeerTransportProxyFactory = class {
|
|
|
3269
3466
|
createTransport(options) {
|
|
3270
3467
|
(0, import_invariant12.invariant)(this._bridgeService, "SimplePeerTransportProxyFactory is not ready to open connections", {
|
|
3271
3468
|
F: __dxlog_file14,
|
|
3272
|
-
L:
|
|
3469
|
+
L: 205,
|
|
3273
3470
|
S: this,
|
|
3274
3471
|
A: [
|
|
3275
3472
|
"this._bridgeService",
|
|
@@ -3326,17 +3523,24 @@ var LibDataChannelTransport = class {
|
|
|
3326
3523
|
this._readyForCandidates = new import_async11.Trigger();
|
|
3327
3524
|
this._writeCallback = null;
|
|
3328
3525
|
this._peer = (async () => {
|
|
3329
|
-
const { RTCPeerConnection
|
|
3526
|
+
const { RTCPeerConnection } = (await importESM("node-datachannel/polyfill")).default;
|
|
3330
3527
|
if (this._closed) {
|
|
3331
3528
|
this.errors.raise(new Error("connection already closed"));
|
|
3332
3529
|
}
|
|
3333
|
-
|
|
3530
|
+
if (params.webrtcConfig) {
|
|
3531
|
+
params.webrtcConfig.iceServers = params.webrtcConfig.iceServers ?? [];
|
|
3532
|
+
} else {
|
|
3533
|
+
params.webrtcConfig = {
|
|
3534
|
+
iceServers: []
|
|
3535
|
+
};
|
|
3536
|
+
}
|
|
3537
|
+
const peer = new RTCPeerConnection(params.webrtcConfig);
|
|
3334
3538
|
peer.onicecandidateerror = (event) => {
|
|
3335
3539
|
import_log14.log.error("peer.onicecandidateerror", {
|
|
3336
3540
|
event
|
|
3337
3541
|
}, {
|
|
3338
3542
|
F: __dxlog_file15,
|
|
3339
|
-
L:
|
|
3543
|
+
L: 61,
|
|
3340
3544
|
S: this,
|
|
3341
3545
|
C: (f, a) => f(...a)
|
|
3342
3546
|
});
|
|
@@ -3348,7 +3552,7 @@ var LibDataChannelTransport = class {
|
|
|
3348
3552
|
transportConnectionState: this._connected
|
|
3349
3553
|
}, {
|
|
3350
3554
|
F: __dxlog_file15,
|
|
3351
|
-
L:
|
|
3555
|
+
L: 65,
|
|
3352
3556
|
S: this,
|
|
3353
3557
|
C: (f, a) => f(...a)
|
|
3354
3558
|
});
|
|
@@ -3358,7 +3562,7 @@ var LibDataChannelTransport = class {
|
|
|
3358
3562
|
event
|
|
3359
3563
|
}, {
|
|
3360
3564
|
F: __dxlog_file15,
|
|
3361
|
-
L:
|
|
3565
|
+
L: 74,
|
|
3362
3566
|
S: this,
|
|
3363
3567
|
C: (f, a) => f(...a)
|
|
3364
3568
|
});
|
|
@@ -3382,7 +3586,7 @@ var LibDataChannelTransport = class {
|
|
|
3382
3586
|
err
|
|
3383
3587
|
}, {
|
|
3384
3588
|
F: __dxlog_file15,
|
|
3385
|
-
L:
|
|
3589
|
+
L: 91,
|
|
3386
3590
|
S: this,
|
|
3387
3591
|
C: (f, a) => f(...a)
|
|
3388
3592
|
});
|
|
@@ -3391,12 +3595,15 @@ var LibDataChannelTransport = class {
|
|
|
3391
3595
|
};
|
|
3392
3596
|
if (params.initiator) {
|
|
3393
3597
|
peer.createOffer().then(async (offer) => {
|
|
3598
|
+
if (this._closed) {
|
|
3599
|
+
return;
|
|
3600
|
+
}
|
|
3394
3601
|
if (peer.connectionState !== "connecting") {
|
|
3395
3602
|
import_log14.log.error("i am initiator but peer not in state connecting", {
|
|
3396
3603
|
peer
|
|
3397
3604
|
}, {
|
|
3398
3605
|
F: __dxlog_file15,
|
|
3399
|
-
L:
|
|
3606
|
+
L: 104,
|
|
3400
3607
|
S: this,
|
|
3401
3608
|
C: (f, a) => f(...a)
|
|
3402
3609
|
});
|
|
@@ -3406,7 +3613,7 @@ var LibDataChannelTransport = class {
|
|
|
3406
3613
|
offer
|
|
3407
3614
|
}, {
|
|
3408
3615
|
F: __dxlog_file15,
|
|
3409
|
-
L:
|
|
3616
|
+
L: 107,
|
|
3410
3617
|
S: this,
|
|
3411
3618
|
C: (f, a) => f(...a)
|
|
3412
3619
|
});
|
|
@@ -3426,7 +3633,7 @@ var LibDataChannelTransport = class {
|
|
|
3426
3633
|
this.handleChannel(peer.createDataChannel(DATACHANNEL_LABEL));
|
|
3427
3634
|
import_log14.log.debug("created data channel", void 0, {
|
|
3428
3635
|
F: __dxlog_file15,
|
|
3429
|
-
L:
|
|
3636
|
+
L: 116,
|
|
3430
3637
|
S: this,
|
|
3431
3638
|
C: (f, a) => f(...a)
|
|
3432
3639
|
});
|
|
@@ -3439,7 +3646,7 @@ var LibDataChannelTransport = class {
|
|
|
3439
3646
|
event
|
|
3440
3647
|
}, {
|
|
3441
3648
|
F: __dxlog_file15,
|
|
3442
|
-
L:
|
|
3649
|
+
L: 122,
|
|
3443
3650
|
S: this,
|
|
3444
3651
|
C: (f, a) => f(...a)
|
|
3445
3652
|
});
|
|
@@ -3457,7 +3664,7 @@ var LibDataChannelTransport = class {
|
|
|
3457
3664
|
this._channel.onopen = () => {
|
|
3458
3665
|
import_log14.log.debug("dataChannel.onopen", void 0, {
|
|
3459
3666
|
F: __dxlog_file15,
|
|
3460
|
-
L:
|
|
3667
|
+
L: 138,
|
|
3461
3668
|
S: this,
|
|
3462
3669
|
C: (f, a) => f(...a)
|
|
3463
3670
|
});
|
|
@@ -3478,7 +3685,7 @@ var LibDataChannelTransport = class {
|
|
|
3478
3685
|
if (this._writeCallback !== null) {
|
|
3479
3686
|
import_log14.log.error("consumer trying to write before we're ready for more data", void 0, {
|
|
3480
3687
|
F: __dxlog_file15,
|
|
3481
|
-
L:
|
|
3688
|
+
L: 155,
|
|
3482
3689
|
S: this,
|
|
3483
3690
|
C: (f, a) => f(...a)
|
|
3484
3691
|
});
|
|
@@ -3503,7 +3710,7 @@ var LibDataChannelTransport = class {
|
|
|
3503
3710
|
err
|
|
3504
3711
|
}, {
|
|
3505
3712
|
F: __dxlog_file15,
|
|
3506
|
-
L:
|
|
3713
|
+
L: 175,
|
|
3507
3714
|
S: this,
|
|
3508
3715
|
C: (f, a) => f(...a)
|
|
3509
3716
|
});
|
|
@@ -3527,6 +3734,12 @@ var LibDataChannelTransport = class {
|
|
|
3527
3734
|
return;
|
|
3528
3735
|
}
|
|
3529
3736
|
await this._disconnectStreams();
|
|
3737
|
+
const peer = await this._peer;
|
|
3738
|
+
try {
|
|
3739
|
+
peer.close();
|
|
3740
|
+
} catch (err) {
|
|
3741
|
+
this.errors.raise(err);
|
|
3742
|
+
}
|
|
3530
3743
|
this._closed = true;
|
|
3531
3744
|
this.closed.emit();
|
|
3532
3745
|
}
|
|
@@ -3540,7 +3753,7 @@ var LibDataChannelTransport = class {
|
|
|
3540
3753
|
peer
|
|
3541
3754
|
}, {
|
|
3542
3755
|
F: __dxlog_file15,
|
|
3543
|
-
L:
|
|
3756
|
+
L: 216,
|
|
3544
3757
|
S: this,
|
|
3545
3758
|
C: (f, a) => f(...a)
|
|
3546
3759
|
});
|
|
@@ -3568,7 +3781,7 @@ var LibDataChannelTransport = class {
|
|
|
3568
3781
|
err
|
|
3569
3782
|
}, {
|
|
3570
3783
|
F: __dxlog_file15,
|
|
3571
|
-
L:
|
|
3784
|
+
L: 227,
|
|
3572
3785
|
S: this,
|
|
3573
3786
|
C: (f, a) => f(...a)
|
|
3574
3787
|
});
|
|
@@ -3588,7 +3801,7 @@ var LibDataChannelTransport = class {
|
|
|
3588
3801
|
err
|
|
3589
3802
|
}, {
|
|
3590
3803
|
F: __dxlog_file15,
|
|
3591
|
-
L:
|
|
3804
|
+
L: 238,
|
|
3592
3805
|
S: this,
|
|
3593
3806
|
C: (f, a) => f(...a)
|
|
3594
3807
|
});
|
|
@@ -3607,7 +3820,7 @@ var LibDataChannelTransport = class {
|
|
|
3607
3820
|
signal
|
|
3608
3821
|
}, {
|
|
3609
3822
|
F: __dxlog_file15,
|
|
3610
|
-
L:
|
|
3823
|
+
L: 249,
|
|
3611
3824
|
S: this,
|
|
3612
3825
|
C: (f, a) => f(...a)
|
|
3613
3826
|
});
|
|
@@ -3616,12 +3829,62 @@ var LibDataChannelTransport = class {
|
|
|
3616
3829
|
}).catch((err) => {
|
|
3617
3830
|
import_log14.log.catch(err, void 0, {
|
|
3618
3831
|
F: __dxlog_file15,
|
|
3619
|
-
L:
|
|
3832
|
+
L: 254,
|
|
3620
3833
|
S: this,
|
|
3621
3834
|
C: (f, a) => f(...a)
|
|
3622
3835
|
});
|
|
3623
3836
|
});
|
|
3624
3837
|
}
|
|
3838
|
+
async getDetails() {
|
|
3839
|
+
const stats = await this._getStats();
|
|
3840
|
+
const rc = stats?.remoteCandidate;
|
|
3841
|
+
if (!rc) {
|
|
3842
|
+
return "unavailable";
|
|
3843
|
+
}
|
|
3844
|
+
if (rc.candidateType === "relay") {
|
|
3845
|
+
return `${rc.ip}:${rc.port} relay for ${rc.relatedAddress}:${rc.relatedPort}`;
|
|
3846
|
+
}
|
|
3847
|
+
return `${rc.ip}:${rc.port} ${rc.candidateType}`;
|
|
3848
|
+
}
|
|
3849
|
+
async _getStats() {
|
|
3850
|
+
return this._peer.then(async (peer) => {
|
|
3851
|
+
const stats = await peer.getStats();
|
|
3852
|
+
const statsEntries = Array.from(stats.entries());
|
|
3853
|
+
const transport = statsEntries.filter((s) => s[1].type === "transport")[0][1];
|
|
3854
|
+
const candidatePair = statsEntries.filter((s) => s[0] === transport.selectedCandidatePairId);
|
|
3855
|
+
let selectedCandidatePair;
|
|
3856
|
+
let remoteCandidate;
|
|
3857
|
+
if (candidatePair.length > 0) {
|
|
3858
|
+
selectedCandidatePair = candidatePair[0][1];
|
|
3859
|
+
remoteCandidate = statsEntries.filter((s) => s[0] === selectedCandidatePair.remoteCandidateId)[0][1];
|
|
3860
|
+
}
|
|
3861
|
+
return {
|
|
3862
|
+
transport,
|
|
3863
|
+
selectedCandidatePair,
|
|
3864
|
+
remoteCandidate,
|
|
3865
|
+
raw: Object.fromEntries(stats)
|
|
3866
|
+
};
|
|
3867
|
+
});
|
|
3868
|
+
}
|
|
3869
|
+
async getStats() {
|
|
3870
|
+
const stats = await this._getStats();
|
|
3871
|
+
if (!stats) {
|
|
3872
|
+
return {
|
|
3873
|
+
bytesSent: 0,
|
|
3874
|
+
bytesReceived: 0,
|
|
3875
|
+
packetsSent: 0,
|
|
3876
|
+
packetsReceived: 0,
|
|
3877
|
+
rawStats: {}
|
|
3878
|
+
};
|
|
3879
|
+
}
|
|
3880
|
+
return {
|
|
3881
|
+
bytesSent: stats.transport.bytesSent,
|
|
3882
|
+
bytesReceived: stats.transport.bytesReceived,
|
|
3883
|
+
packetsSent: 0,
|
|
3884
|
+
packetsReceived: 0,
|
|
3885
|
+
rawStats: stats.raw
|
|
3886
|
+
};
|
|
3887
|
+
}
|
|
3625
3888
|
// TODO(nf): add classmethod to call node-datachannel.cleanup() when all instances have been destroyed?
|
|
3626
3889
|
async destroy() {
|
|
3627
3890
|
await this._close();
|
|
@@ -3639,6 +3902,7 @@ var createLibDataChannelTransportFactory = (webrtcConfig) => ({
|
|
|
3639
3902
|
webrtcConfig
|
|
3640
3903
|
})
|
|
3641
3904
|
});
|
|
3905
|
+
var importESM = Function("path", "return import(path)");
|
|
3642
3906
|
var __dxlog_file16 = "/home/runner/work/dxos/dxos/packages/core/mesh/network-manager/src/transport/tcp-transport.ts";
|
|
3643
3907
|
var TcpTransportFactory = {
|
|
3644
3908
|
createTransport: (params) => new TcpTransport(params)
|
|
@@ -3731,13 +3995,29 @@ var TcpTransport = class {
|
|
|
3731
3995
|
host: "localhost"
|
|
3732
3996
|
});
|
|
3733
3997
|
}
|
|
3998
|
+
async getDetails() {
|
|
3999
|
+
if (this.options.initiator) {
|
|
4000
|
+
const { port: port2, address: address2 } = this._server?.address();
|
|
4001
|
+
return `LISTEN ${address2}:${port2}`;
|
|
4002
|
+
}
|
|
4003
|
+
const { port, address } = this._socket?.address();
|
|
4004
|
+
return `ACCEPT ${address}:${port}`;
|
|
4005
|
+
}
|
|
4006
|
+
async getStats() {
|
|
4007
|
+
return {
|
|
4008
|
+
bytesSent: 0,
|
|
4009
|
+
bytesReceived: 0,
|
|
4010
|
+
packetsSent: 0,
|
|
4011
|
+
packetsReceived: 0
|
|
4012
|
+
};
|
|
4013
|
+
}
|
|
3734
4014
|
_handleSocket(socket) {
|
|
3735
4015
|
(0, import_log15.log)("handling socket", {
|
|
3736
4016
|
remotePort: socket.remotePort,
|
|
3737
4017
|
localPort: socket.localPort
|
|
3738
4018
|
}, {
|
|
3739
4019
|
F: __dxlog_file16,
|
|
3740
|
-
L:
|
|
4020
|
+
L: 109,
|
|
3741
4021
|
S: this,
|
|
3742
4022
|
C: (f, a) => f(...a)
|
|
3743
4023
|
});
|
|
@@ -3749,7 +4029,7 @@ var TcpTransport = class {
|
|
|
3749
4029
|
port: this._socket?.remotePort
|
|
3750
4030
|
}, {
|
|
3751
4031
|
F: __dxlog_file16,
|
|
3752
|
-
L:
|
|
4032
|
+
L: 115,
|
|
3753
4033
|
S: this,
|
|
3754
4034
|
C: (f, a) => f(...a)
|
|
3755
4035
|
});
|
|
@@ -3768,8 +4048,8 @@ var createTeleportProtocolFactory = (onConnection) => {
|
|
|
3768
4048
|
const teleport = new import_teleport.Teleport(params);
|
|
3769
4049
|
return {
|
|
3770
4050
|
stream: teleport.stream,
|
|
3771
|
-
open: async () => {
|
|
3772
|
-
await teleport.open();
|
|
4051
|
+
open: async (sessionId) => {
|
|
4052
|
+
await teleport.open(sessionId);
|
|
3773
4053
|
await onConnection(teleport);
|
|
3774
4054
|
},
|
|
3775
4055
|
close: async () => {
|
|
@@ -3810,4 +4090,4 @@ var createTeleportProtocolFactory = (onConnection) => {
|
|
|
3810
4090
|
createSimplePeerTransportFactory,
|
|
3811
4091
|
createTeleportProtocolFactory
|
|
3812
4092
|
});
|
|
3813
|
-
//# sourceMappingURL=chunk-
|
|
4093
|
+
//# sourceMappingURL=chunk-Y2B5BDRH.cjs.map
|