@dxos/network-manager 0.1.10 → 0.1.12
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/src/network-manager.js +9 -9
- package/dist/src/network-manager.js.map +1 -1
- package/dist/src/protocol-factory.js +1 -1
- package/dist/src/protocol-factory.js.map +1 -1
- package/dist/src/signal/message-router.js +3 -3
- package/dist/src/signal/message-router.js.map +1 -1
- package/dist/src/swarm/connection.js +9 -9
- package/dist/src/swarm/connection.js.map +1 -1
- package/dist/src/swarm/peer.js +9 -9
- package/dist/src/swarm/peer.js.map +1 -1
- package/dist/src/swarm/swarm-mapper.js +2 -2
- package/dist/src/swarm/swarm-mapper.js.map +1 -1
- package/dist/src/swarm/swarm.js +16 -16
- package/dist/src/swarm/swarm.js.map +1 -1
- package/dist/src/swarm/swarm.test.js +2 -2
- package/dist/src/swarm/swarm.test.js.map +1 -1
- package/dist/src/testing/test-protocol.js +6 -6
- package/dist/src/testing/test-protocol.js.map +1 -1
- package/dist/src/tests/basic-test-suite.js +1 -1
- package/dist/src/tests/basic-test-suite.js.map +1 -1
- package/dist/src/topology/mmst-topology.js +4 -4
- package/dist/src/topology/mmst-topology.js.map +1 -1
- package/dist/src/topology/star-topology.js +4 -4
- package/dist/src/topology/star-topology.js.map +1 -1
- package/dist/src/transport/memory-transport.js +8 -8
- package/dist/src/transport/memory-transport.js.map +1 -1
- package/dist/src/transport/webrtc-transport-proxy.js +4 -4
- package/dist/src/transport/webrtc-transport-proxy.js.map +1 -1
- package/dist/src/transport/webrtc-transport-service.js +1 -1
- package/dist/src/transport/webrtc-transport-service.js.map +1 -1
- package/dist/src/transport/webrtc-transport.js +6 -6
- package/dist/src/transport/webrtc-transport.js.map +1 -1
- package/package.json +19 -21
- package/src/network-manager.ts +7 -7
- package/testing.d.ts +11 -0
- package/testing.js +5 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swarm.test.js","sourceRoot":"","sources":["../../../src/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,CAAC;QACH,MAAM,IAAA,aAAK,EAAC,EAAE,CAAC,CAAC;QAChB,MAAM,CAAC,YAAY,CAAC;YAClB,aAAa,EAAE;gBACb,IAAI,EAAE,OAAO,CAAC,YAAY,EAAE;gBAC5B,KAAK,EAAE,IAAI,IAAI,EAAE;aAClB;SACF,CAAC,CAAC;QAEH,MAAM,eAAe,CAAC;QAEtB,MAAM,IAAA,yBAAa,EAAC,GAAG,EAAE;YACvB,IAAA,eAAM,EAAC,YAAY,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC,OAAO,CAAC,KAAM,CAAC,CAAC;AACrB,CAAC,CAAC,CAAC"}
|
|
@@ -31,7 +31,7 @@ exports.getPeerId = getPeerId;
|
|
|
31
31
|
*/
|
|
32
32
|
// TODO(burdon): Reconcile with transportProtocolProvider.
|
|
33
33
|
const testProtocolProvider = (topic, peerId, protocolPlugin) => {
|
|
34
|
-
(0, log_1.log)('creating protocol-factory', { topic: keys_1.PublicKey.from(topic), peerId }, { file: "packages/core/mesh/network-manager/src/testing/test-protocol.ts", line: 34, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
34
|
+
(0, log_1.log)('creating protocol-factory', { topic: keys_1.PublicKey.from(topic), peerId }, { file: "packages/core/mesh/network-manager/src/testing/test-protocol.ts", line: 34, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
35
35
|
return (0, protocol_factory_1.protocolFactory)({
|
|
36
36
|
getTopics: () => [topic],
|
|
37
37
|
session: { peerId: peerId.toHex() },
|
|
@@ -76,7 +76,7 @@ class TestProtocolPlugin extends events_1.EventEmitter {
|
|
|
76
76
|
* @return {Extension}
|
|
77
77
|
*/
|
|
78
78
|
createExtension() {
|
|
79
|
-
(0, log_1.log)('creating extension', { peerId: keys_1.PublicKey.from(this.peerId) }, { file: "packages/core/mesh/network-manager/src/testing/test-protocol.ts", line: 92, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." }); // TODO(burdon): Just key.
|
|
79
|
+
(0, log_1.log)('creating extension', { peerId: keys_1.PublicKey.from(this.peerId) }, { file: "packages/core/mesh/network-manager/src/testing/test-protocol.ts", line: 92, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) }); // TODO(burdon): Just key.
|
|
80
80
|
return new mesh_protocol_1.Extension(EXTENSION_NAME, { binary: true })
|
|
81
81
|
.setInitHandler(this._init.bind(this))
|
|
82
82
|
.setMessageHandler(this._receive.bind(this))
|
|
@@ -103,7 +103,7 @@ class TestProtocolPlugin extends events_1.EventEmitter {
|
|
|
103
103
|
}
|
|
104
104
|
const extension = peer.getExtension(EXTENSION_NAME);
|
|
105
105
|
const encoded = Buffer.from(payload);
|
|
106
|
-
(0, log_1.log)('sending', { peerId: keys_1.PublicKey.from(peerId), payload }, { file: "packages/core/mesh/network-manager/src/testing/test-protocol.ts", line: 124, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
106
|
+
(0, log_1.log)('sending', { peerId: keys_1.PublicKey.from(peerId), payload }, { file: "packages/core/mesh/network-manager/src/testing/test-protocol.ts", line: 124, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
107
107
|
return await extension.send(encoded, { oneway: true });
|
|
108
108
|
}
|
|
109
109
|
async _receive(protocol, data) {
|
|
@@ -113,11 +113,11 @@ class TestProtocolPlugin extends events_1.EventEmitter {
|
|
|
113
113
|
if (this._uppercase) {
|
|
114
114
|
payload = payload.toUpperCase();
|
|
115
115
|
}
|
|
116
|
-
(0, log_1.log)('received', { peerId: keys_1.PublicKey.from(peerId), payload }, { file: "packages/core/mesh/network-manager/src/testing/test-protocol.ts", line: 136, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
116
|
+
(0, log_1.log)('received', { peerId: keys_1.PublicKey.from(peerId), payload }, { file: "packages/core/mesh/network-manager/src/testing/test-protocol.ts", line: 136, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
117
117
|
this.emit('receive', protocol, payload);
|
|
118
118
|
}
|
|
119
119
|
async _onPeerConnect(protocol) {
|
|
120
|
-
(0, log_1.log)('connecting', { id: keys_1.PublicKey.from(protocol.id) }, { file: "packages/core/mesh/network-manager/src/testing/test-protocol.ts", line: 141, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
120
|
+
(0, log_1.log)('connecting', { id: keys_1.PublicKey.from(protocol.id) }, { file: "packages/core/mesh/network-manager/src/testing/test-protocol.ts", line: 141, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
121
121
|
const peerId = (0, exports.getPeerId)(protocol);
|
|
122
122
|
if (peerId === undefined) {
|
|
123
123
|
return;
|
|
@@ -130,7 +130,7 @@ class TestProtocolPlugin extends events_1.EventEmitter {
|
|
|
130
130
|
this.emit('connect', protocol);
|
|
131
131
|
}
|
|
132
132
|
async _onPeerDisconnect(protocol) {
|
|
133
|
-
(0, log_1.log)('disconnecting', { id: keys_1.PublicKey.from(protocol.id) }, { file: "packages/core/mesh/network-manager/src/testing/test-protocol.ts", line: 157, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
133
|
+
(0, log_1.log)('disconnecting', { id: keys_1.PublicKey.from(protocol.id) }, { file: "packages/core/mesh/network-manager/src/testing/test-protocol.ts", line: 157, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
134
134
|
const peerId = (0, exports.getPeerId)(protocol);
|
|
135
135
|
if (peerId === undefined) {
|
|
136
136
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-protocol.js","sourceRoot":"","sources":["../../../src/testing/test-protocol.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,mEAAmE;AAEnE,mCAAsC;AACtC,8DAAiC;AAEjC,qCAAuC;AACvC,mCAAgC;AAChC,uDAA0D;AAE1D,0DAAsD;AAEtD,MAAM,cAAc,GAAG,MAAM,CAAC;AAE9B,2BAA2B;AAC3B,kFAAkF;AAC3E,MAAM,SAAS,GAAG,CAAC,QAAkB,EAAE,EAAE;;IAC9C,MAAM,EAAE,MAAM,EAAE,GAAG,MAAA,QAAQ,CAAC,UAAU,EAAE,mCAAI,EAAE,CAAC;IAC/C,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,SAAS,CAAC;KAClB;IAED,OAAO,gBAAS,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AACrC,CAAC,CAAC;AAPW,QAAA,SAAS,aAOpB;AAEF;;GAEG;AACH,0DAA0D;AACnD,MAAM,oBAAoB,GAAG,CAAC,KAAa,EAAE,MAAiB,EAAE,cAAmB,EAAE,EAAE;IAC5F,IAAA,SAAG,EAAC,2BAA2B,EAAE,EAAE,KAAK,EAAE,gBAAS,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"test-protocol.js","sourceRoot":"","sources":["../../../src/testing/test-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C,cAAc,CAAC,QAAkB;QACrC,IAAA,SAAG,EAAC,YAAY,EAAE,EAAE,EAAE,EAAE,gBAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,mUAAC,CAAC;QACvD,MAAM,MAAM,GAAG,IAAA,iBAAS,EAAC,QAAQ,CAAC,CAAC;QACnC,IAAI,MAAM,KAAK,SAAS,EAAE;YACxB,OAAO;SACR;QAED,MAAM,SAAS,GAAG,gBAAS,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAC9C,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;YAC9B,OAAO;SACR;QAED,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QACrC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IACjC,CAAC;IAED,KAAK,CAAC,iBAAiB,CAAC,QAAkB;QACxC,IAAA,SAAG,EAAC,eAAe,EAAE,EAAE,EAAE,EAAE,gBAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,mUAAC,CAAC;QAC1D,MAAM,MAAM,GAAG,IAAA,iBAAS,EAAC,QAAQ,CAAC,CAAC;QACnC,IAAI,MAAM,KAAK,SAAS,EAAE;YACxB,OAAO;SACR;QAED,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,gBAAS,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;QAChD,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IAClC,CAAC;CACF;AAtHD,gDAsHC"}
|
|
@@ -55,7 +55,7 @@ const basicTestSuite = (testBuilder, runTests = true) => {
|
|
|
55
55
|
}
|
|
56
56
|
// TODO(burdon): Add log marker like this to logging lib. Auto add between tests?
|
|
57
57
|
// TODO(burdon): Enable new Error to take second context obj: new Error('msg', {}).
|
|
58
|
-
(0, log_1.log)('————————————————————————————————————————', {}, { file: "packages/core/mesh/network-manager/src/tests/basic-test-suite.ts", line: 67, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
58
|
+
(0, log_1.log)('————————————————————————————————————————', {}, { file: "packages/core/mesh/network-manager/src/tests/basic-test-suite.ts", line: 67, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
59
59
|
const topic2 = keys_1.PublicKey.random();
|
|
60
60
|
{
|
|
61
61
|
const [swarm1, swarm2] = await (0, utils_1.joinSwarm)([peer1, peer2], topic2);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basic-test-suite.js","sourceRoot":"","sources":["../../../src/tests/basic-test-suite.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,+BAA8B;AAC9B,sEAA4C;AAE5C,uCAAoC;AACpC,qCAAuC;AACvC,mCAAgC;AAEhC,qCAAmC;AAGnC,0CAAmE;AACnE,mCAAyF;AAEzF,4FAA4F;AAE5F;;GAEG;AACI,MAAM,cAAc,GAAG,CAAC,WAAwB,EAAE,QAAQ,GAAG,IAAI,EAAE,EAAE;IAC1E,IAAI,QAAQ,EAAE;QACZ,OAAO;KACR;IAED,EAAE,CAAC,gDAAgD,EAAE,KAAK,IAAI,EAAE;QAC9D,MAAM,KAAK,GAAG,WAAW,CAAC,UAAU,EAAE,CAAC;QACvC,MAAM,KAAK,GAAG,WAAW,CAAC,UAAU,EAAE,CAAC;QACvC,MAAM,IAAA,6BAAqB,EAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;QAE5C,MAAM,KAAK,GAAG,gBAAS,CAAC,MAAM,EAAE,CAAC;QACjC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,IAAA,iBAAS,EAAC,CAAC,KAAK,E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,EAAE,mCAAI,EAAE,CAAC;oBAC/C,MAAM,QAAQ,GAAG,gBAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;oBACxC,MAAM,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,MAAM,CAAC,CAAC;gBACvD,CAAC,CAAC,CAAC;gBAEH,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,QAAkB,EAAE,IAAS,EAAE,EAAE;;oBACjE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAA,QAAQ,CAAC,UAAU,EAAE,mCAAI,EAAE,CAAC;oBAC/C,MAAM,QAAQ,GAAG,gBAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;oBAExC,IAAI,IAAI,KAAK,MAAM,EAAE;wBACnB,MAAM,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,MAAM,CAAC,CAAC;qBACtD;yBAAM,IAAI,IAAI,KAAK,MAAM,EAAE;wBAC1B,YAAY,EAAE,CAAC;qBAChB;yBAAM;wBACL,MAAM,IAAI,KAAK,CAAC,oBAAoB,IAAI,EAAE,CAAC,CAAC;qBAC7C;gBACH,CAAC,CAAC,CAAC;gBAEH,MAAM,IAAI,EAAE,CAAC;YACf,CAAC,CAAC,CACH,CAAC;QACJ,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAjJW,QAAA,cAAc,kBAiJzB"}
|
|
@@ -26,7 +26,7 @@ class MMSTTopology {
|
|
|
26
26
|
const { connected, candidates } = this._controller.getState();
|
|
27
27
|
// Run the algorithms if we have first candidates, ran it before, or have more connections than needed.
|
|
28
28
|
if (this._sampleCollected || connected.length > this._maxPeers || candidates.length > 0) {
|
|
29
|
-
(0, log_1.log)('Running the algorithm.', {}, { file: "packages/core/mesh/network-manager/src/topology/mmst-topology.ts", line: 55, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
29
|
+
(0, log_1.log)('Running the algorithm.', {}, { file: "packages/core/mesh/network-manager/src/topology/mmst-topology.ts", line: 55, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
30
30
|
this._sampleCollected = true;
|
|
31
31
|
this._runAlgorithm();
|
|
32
32
|
}
|
|
@@ -35,7 +35,7 @@ class MMSTTopology {
|
|
|
35
35
|
(0, node_assert_1.default)(this._controller, 'Not initialized');
|
|
36
36
|
const { connected } = this._controller.getState();
|
|
37
37
|
const accept = connected.length < this._maxPeers;
|
|
38
|
-
(0, log_1.log)(`Offer ${peer} accept=${accept}`, {}, { file: "packages/core/mesh/network-manager/src/topology/mmst-topology.ts", line: 65, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
38
|
+
(0, log_1.log)(`Offer ${peer} accept=${accept}`, {}, { file: "packages/core/mesh/network-manager/src/topology/mmst-topology.ts", line: 65, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
39
39
|
return accept;
|
|
40
40
|
}
|
|
41
41
|
async destroy() {
|
|
@@ -50,7 +50,7 @@ class MMSTTopology {
|
|
|
50
50
|
.reverse()
|
|
51
51
|
.slice(0, this._maxPeers - connected.length);
|
|
52
52
|
for (const peer of sorted) {
|
|
53
|
-
(0, log_1.log)(`Disconnect ${peer}.`, {}, { file: "packages/core/mesh/network-manager/src/topology/mmst-topology.ts", line: 83, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
53
|
+
(0, log_1.log)(`Disconnect ${peer}.`, {}, { file: "packages/core/mesh/network-manager/src/topology/mmst-topology.ts", line: 83, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
54
54
|
this._controller.disconnect(peer);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -59,7 +59,7 @@ class MMSTTopology {
|
|
|
59
59
|
const sample = candidates.sort(() => Math.random() - 0.5).slice(0, this._sampleSize);
|
|
60
60
|
const sorted = sortByXorDistance(sample, ownPeerId).slice(0, this._originateConnections - connected.length);
|
|
61
61
|
for (const peer of sorted) {
|
|
62
|
-
(0, log_1.log)(`Connect ${peer}.`, {}, { file: "packages/core/mesh/network-manager/src/topology/mmst-topology.ts", line: 91, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
62
|
+
(0, log_1.log)(`Connect ${peer}.`, {}, { file: "packages/core/mesh/network-manager/src/topology/mmst-topology.ts", line: 91, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
63
63
|
this._controller.connect(peer);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mmst-topology.js","sourceRoot":"","sources":["../../../src/topology/mmst-topology.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,8DAAiC;AACjC,gEAAoC;AAGpC,mCAAgC;AAqBhC,MAAa,YAAY;IASvB,YAAY,EAAE,oBAAoB,GAAG,CAAC,EAAE,QAAQ,GAAG,CAAC,EAAE,UAAU,GAAG,EAAE,KAA0B,EAAE;QAFzF,qBAAgB,GAAG,KAAK,CAAC;QAG/B,IAAI,CAAC,qBAAqB,GAAG,oBAAoB,CAAC;QAClD,IAAI,CAAC,SAAS,GAAG,QAAQ,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{
|
|
|
25
25
|
(0, node_assert_1.default)(this._controller, 'Not initialized.');
|
|
26
26
|
const { candidates, connected, ownPeerId } = this._controller.getState();
|
|
27
27
|
if (!ownPeerId.equals(this._centralPeer)) {
|
|
28
|
-
(0, log_1.log)('leaf peer dropping all connections apart from central peer.', {}, { file: "packages/core/mesh/network-manager/src/topology/star-topology.ts", line: 33, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
28
|
+
(0, log_1.log)('leaf peer dropping all connections apart from central peer.', {}, { file: "packages/core/mesh/network-manager/src/topology/star-topology.ts", line: 33, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
29
29
|
// Drop all connections other than central peer.
|
|
30
30
|
for (const peer of connected) {
|
|
31
31
|
if (!peer.equals(this._centralPeer)) {
|
|
32
|
-
(0, log_1.log)('dropping connection', { peer }, { file: "packages/core/mesh/network-manager/src/topology/star-topology.ts", line: 38, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
32
|
+
(0, log_1.log)('dropping connection', { peer }, { file: "packages/core/mesh/network-manager/src/topology/star-topology.ts", line: 38, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
33
33
|
this._controller.disconnect(peer);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -37,7 +37,7 @@ class StarTopology {
|
|
|
37
37
|
for (const peer of candidates) {
|
|
38
38
|
// Connect to central peer.
|
|
39
39
|
if (peer.equals(this._centralPeer) || ownPeerId.equals(this._centralPeer)) {
|
|
40
|
-
(0, log_1.log)('connecting to peer', { peer }, { file: "packages/core/mesh/network-manager/src/topology/star-topology.ts", line: 47, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
40
|
+
(0, log_1.log)('connecting to peer', { peer }, { file: "packages/core/mesh/network-manager/src/topology/star-topology.ts", line: 47, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
41
41
|
this._controller.connect(peer);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -49,7 +49,7 @@ class StarTopology {
|
|
|
49
49
|
peer,
|
|
50
50
|
isCentral: peer.equals(this._centralPeer),
|
|
51
51
|
isSelfCentral: ownPeerId.equals(this._centralPeer)
|
|
52
|
-
}, { file: "packages/core/mesh/network-manager/src/topology/star-topology.ts", line: 56, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
52
|
+
}, { file: "packages/core/mesh/network-manager/src/topology/star-topology.ts", line: 56, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
53
53
|
return ownPeerId.equals(this._centralPeer) || peer.equals(this._centralPeer);
|
|
54
54
|
}
|
|
55
55
|
async destroy() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"star-topology.js","sourceRoot":"","sources":["../../../src/topology/star-topology.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,8DAAiC;AAGjC,mCAAgC;AAIhC,MAAa,YAAY;IAGvB,kBAAkB;IAClB,YACmB,YAAuB;QAAvB,iBAAY,GAAZ,YAAY,CAAW;IACvC,CAAC;IAEJ,QAAQ;QACN,OAAO,gBAAgB,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,GAAG,CAAC;IACzD,CAAC;IAED,IAAI,CAAC,UAA2B;QAC9B,IAAA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
46
46
|
this._outgoingDelay = createStreamDelay(MEMORY_TRANSPORT_DELAY);
|
|
47
47
|
this._incomingDelay = createStreamDelay(MEMORY_TRANSPORT_DELAY);
|
|
48
48
|
this._destroyed = false;
|
|
49
|
-
(0, log_1.log)('creating', { id: this._id }, { file: "packages/core/mesh/network-manager/src/transport/memory-transport.ts", line: 59, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
49
|
+
(0, log_1.log)('creating', { id: this._id }, { file: "packages/core/mesh/network-manager/src/transport/memory-transport.ts", line: 59, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
50
50
|
(0, node_assert_1.default)(!MemoryTransport._connections.has(this._id), 'Duplicate memory connection');
|
|
51
51
|
MemoryTransport._connections.set(this._id, this);
|
|
52
52
|
// Initiator will send a signal, the receiver will receive the unique ID and connect the streams.
|
|
53
53
|
if (this.options.initiator) {
|
|
54
54
|
// prettier-ignore
|
|
55
55
|
setTimeout(async () => {
|
|
56
|
-
(0, log_1.log)('sending signal', { transportId: this._id }, { file: "packages/core/mesh/network-manager/src/transport/memory-transport.ts", line: 68, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
56
|
+
(0, log_1.log)('sending signal', { transportId: this._id }, { file: "packages/core/mesh/network-manager/src/transport/memory-transport.ts", line: 68, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
57
57
|
void this.options.sendSignal({
|
|
58
58
|
json: JSON.stringify({ transportId: this._id.toHex() })
|
|
59
59
|
});
|
|
@@ -77,7 +77,7 @@ class MemoryTransport {
|
|
|
77
77
|
(0, node_assert_1.default)(!this._remoteConnection._remoteConnection, new Error(`Remote already connected: ${this._remoteId}`));
|
|
78
78
|
this._remoteConnection._remoteConnection = this;
|
|
79
79
|
this._remoteConnection._remoteId = this._id;
|
|
80
|
-
(0, log_1.log)('connected', { id: this._id, remote: this._remoteId }, { file: "packages/core/mesh/network-manager/src/transport/memory-transport.ts", line: 94, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
80
|
+
(0, log_1.log)('connected', { id: this._id, remote: this._remoteId }, { file: "packages/core/mesh/network-manager/src/transport/memory-transport.ts", line: 94, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
81
81
|
this.options.stream
|
|
82
82
|
.pipe(this._outgoingDelay)
|
|
83
83
|
.pipe(this._remoteConnection.options.stream)
|
|
@@ -95,11 +95,11 @@ class MemoryTransport {
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
async destroy() {
|
|
98
|
-
(0, log_1.log)('closing', { id: this._id }, { file: "packages/core/mesh/network-manager/src/transport/memory-transport.ts", line: 115, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
98
|
+
(0, log_1.log)('closing', { id: this._id }, { file: "packages/core/mesh/network-manager/src/transport/memory-transport.ts", line: 115, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
99
99
|
this._destroyed = true;
|
|
100
100
|
MemoryTransport._connections.delete(this._id);
|
|
101
101
|
if (this._remoteConnection) {
|
|
102
|
-
(0, log_1.log)('closing', { id: this._remoteId }, { file: "packages/core/mesh/network-manager/src/transport/memory-transport.ts", line: 120, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
102
|
+
(0, log_1.log)('closing', { id: this._remoteId }, { file: "packages/core/mesh/network-manager/src/transport/memory-transport.ts", line: 120, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
103
103
|
this._remoteConnection._destroyed = true;
|
|
104
104
|
MemoryTransport._connections.delete(this._remoteId);
|
|
105
105
|
// TODO(dmaretskyi): Hypercore streams do not seem to have the unpipe method.
|
|
@@ -114,10 +114,10 @@ class MemoryTransport {
|
|
|
114
114
|
this._remoteConnection.closed.emit();
|
|
115
115
|
this._remoteConnection._remoteConnection = undefined;
|
|
116
116
|
this._remoteConnection = undefined;
|
|
117
|
-
(0, log_1.log)('closed', { id: this._remoteId }, { file: "packages/core/mesh/network-manager/src/transport/memory-transport.ts", line: 138, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
117
|
+
(0, log_1.log)('closed', { id: this._remoteId }, { file: "packages/core/mesh/network-manager/src/transport/memory-transport.ts", line: 138, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
118
118
|
}
|
|
119
119
|
this.closed.emit();
|
|
120
|
-
(0, log_1.log)('closed', { id: this._id }, { file: "packages/core/mesh/network-manager/src/transport/memory-transport.ts", line: 142, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
120
|
+
(0, log_1.log)('closed', { id: this._id }, { file: "packages/core/mesh/network-manager/src/transport/memory-transport.ts", line: 142, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
121
121
|
}
|
|
122
122
|
signal(signal) {
|
|
123
123
|
const { json } = signal;
|
|
@@ -126,7 +126,7 @@ class MemoryTransport {
|
|
|
126
126
|
const { transportId } = JSON.parse(json);
|
|
127
127
|
if (transportId) {
|
|
128
128
|
const remoteId = keys_1.PublicKey.fromHex(transportId);
|
|
129
|
-
(0, log_1.log)('received signal', { id: this._id, remoteId }, { file: "packages/core/mesh/network-manager/src/transport/memory-transport.ts", line: 152, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
129
|
+
(0, log_1.log)('received signal', { id: this._id, remoteId }, { file: "packages/core/mesh/network-manager/src/transport/memory-transport.ts", line: 152, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
130
130
|
this._remote.wake(remoteId);
|
|
131
131
|
}
|
|
132
132
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-transport.js","sourceRoot":"","sources":["../../../src/transport/memory-transport.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,8DAAiC;AACjC,mCAAmC;AAEnC,uCAA6C;AAC7C,uCAA0C;AAC1C,qCAAuC;AACvC,mCAAgC;AAEhC,qCAAwC;AAIxC,mCAAmC;AACnC,yGAAyG;AACzG,MAAM,sBAAsB,GAAG,CAAC,CAAC;AAEjC;;GAEG;AACH,MAAM,iBAAiB,GAAG,CAAC,KAAa,EAA0B,EAAE;IAClE,OAAO,IAAI,kBAAS,CAAC;QACnB,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE;YAC1B,UAAU,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,2BAA2B;QACvE,CAAC;KACF,CAAC,CAAC;AACL,CAAC,CAAC;AA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,iBAAiB,CAAC,iBAAiB,GAAG,SAAS,CAAC;YACrD,IAAI,CAAC,iBAAiB,GAAG,SAAS,CAAC;YACnC,IAAA,SAAG,EAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,SAAS,EAAE,wUAAC,CAAC;SACvC;QAED,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QACnB,IAAA,SAAG,EAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE,wUAAC,CAAC;IAClC,CAAC;IAED,MAAM,CAAC,MAAc;QACnB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;QACxB,IAAI,IAAI,EAAE;YACR,4BAA4B;YAC5B,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACzC,IAAI,WAAW,EAAE;gBACf,MAAM,QAAQ,GAAG,gBAAS,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;gBAChD,IAAA,SAAG,EAAC,iBAAiB,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE,QAAQ,EAAE,wUAAC,CAAC;gBACnD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC7B;SACF;IACH,CAAC;;AApHH,0CAqHC;AApHC,4EAA4E;AACpD,4BAAY,GAAG,IAAI,iBAAU,CAA6B,gBAAS,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -28,7 +28,7 @@ class WebRTCTransportProxy {
|
|
|
28
28
|
});
|
|
29
29
|
this._serviceStream.waitUntilReady().then(() => {
|
|
30
30
|
this._serviceStream.subscribe(async (event) => {
|
|
31
|
-
(0, log_1.log)('WebRTCTransportProxy: event', event, { file: "packages/core/mesh/network-manager/src/transport/webrtc-transport-proxy.ts", line: 46, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
31
|
+
(0, log_1.log)('WebRTCTransportProxy: event', event, { file: "packages/core/mesh/network-manager/src/transport/webrtc-transport-proxy.ts", line: 46, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
32
32
|
if (event.connection) {
|
|
33
33
|
await this._handleConnection(event.connection);
|
|
34
34
|
}
|
|
@@ -47,10 +47,10 @@ class WebRTCTransportProxy {
|
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
catch (err) {
|
|
50
|
-
log_1.log.catch(err, {}, { file: "packages/core/mesh/network-manager/src/transport/webrtc-transport-proxy.ts", line: 63, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
50
|
+
log_1.log.catch(err, {}, { file: "packages/core/mesh/network-manager/src/transport/webrtc-transport-proxy.ts", line: 63, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
|
-
}, (error) => log_1.log.catch(error, {}, { file: "packages/core/mesh/network-manager/src/transport/webrtc-transport-proxy.ts", line: 67, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." }));
|
|
53
|
+
}, (error) => log_1.log.catch(error, {}, { file: "packages/core/mesh/network-manager/src/transport/webrtc-transport-proxy.ts", line: 67, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) }));
|
|
54
54
|
}
|
|
55
55
|
async _handleConnection(connectionEvent) {
|
|
56
56
|
if (connectionEvent.error) {
|
|
@@ -92,7 +92,7 @@ class WebRTCTransportProxy {
|
|
|
92
92
|
await this._params.bridgeService.close({ proxyId: this._proxyId });
|
|
93
93
|
}
|
|
94
94
|
catch (err) {
|
|
95
|
-
log_1.log.catch(err, {}, { file: "packages/core/mesh/network-manager/src/transport/webrtc-transport-proxy.ts", line: 117, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
95
|
+
log_1.log.catch(err, {}, { file: "packages/core/mesh/network-manager/src/transport/webrtc-transport-proxy.ts", line: 117, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
96
96
|
}
|
|
97
97
|
this.closed.emit();
|
|
98
98
|
this._closed = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webrtc-transport-proxy.js","sourceRoot":"","sources":["../../../src/transport/webrtc-transport-proxy.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,oDAA4B;AAE5B,uCAAoC;AAEpC,uCAA0C;AAC1C,qCAAuC;AACvC,mCAAgC;AAChC,mEAAqG;AAYrG,MAAa,oBAAoB;IAU/B,kBAAkB;IAClB,YACmB,OAAmC;QAAnC,YAAO,GAAP,OAAO,CAA4B;QAX7C,WAAM,GAAG,IAAI,aAAK,EAAE,CAAC;QACtB,YAAO,GAAG,KAAK,CAAC;QACf,cAAS,GAAG,IAAI,aAAK,EAAE,CAAC;QAExB,WAAM,GAAG,IAAI,mBAAW,EAAE,CAAC;QAGnB,aAAQ,GAAG,gBAAS,CAAC,MAAM,EAAE,CAAC;QAM7C,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC;YACpD,OAAO,EAAE,IAAI,CAAC,QAAQ;YACtB,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS;SAClC,CAAC,CAAC;QAEH,IAAI,CAAC,cAAc,CAAC,cAAc,EAAE,CAAC,IAAI,C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,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;QACpC,KAAK,MAAM,UAAU,IAAI,IAAI,CAAC,YAAY,EAAE;YAC1C,UAAU,CAAC,UAAU,EAAE,CAAC;SACzB;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED,eAAe,CAAC,OAAyB;QACvC,IAAA,gBAAM,EAAC,IAAI,CAAC,cAAc,EAAE,8DAA8D,CAAC,CAAC;QAE5F,MAAM,SAAS,GAAG,IAAI,oBAAoB,CAAC;YACzC,GAAG,OAAO;YACV,aAAa,EAAE,IAAI,CAAC,cAAc;SACnC,CAAC,CAAC;QAEH,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACjC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;QAE/D,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AA9BD,kEA8BC"}
|
|
@@ -86,7 +86,7 @@ class WebRTCTransportService {
|
|
|
86
86
|
await ((_a = this.transports.get(proxyId)) === null || _a === void 0 ? void 0 : _a.transport.destroy());
|
|
87
87
|
await ((_b = this.transports.get(proxyId)) === null || _b === void 0 ? void 0 : _b.stream.end());
|
|
88
88
|
this.transports.delete(proxyId);
|
|
89
|
-
(0, log_1.log)('Closed.', {}, { file: "packages/core/mesh/network-manager/src/transport/webrtc-transport-service.ts", line: 108, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
89
|
+
(0, log_1.log)('Closed.', {}, { file: "packages/core/mesh/network-manager/src/transport/webrtc-transport-service.ts", line: 108, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
exports.WebRTCTransportService = WebRTCTransportService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webrtc-transport-service.js","sourceRoot":"","sources":["../../../src/transport/webrtc-transport-service.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,oDAA4B;AAC5B,mCAAgC;AAEhC,yDAA8C;AAC9C,qCAAuC;AACvC,mCAAgC;AAChC,mEAQgD;AAChD,qCAAwC;AAExC,yDAAqD;AAErD,MAAa,sBAAsB;IAKjC,kBAAkB;IAClB,YACmB,aAAmB;QAAnB,kBAAa,GAAb,aAAa,CAAM;QANrB,eAAU,GAAG,IAAI,iBAAU,CAC1C,gBAAS,CAAC,IAAI,CACf,CAAC;IAKC,CAAC;IAEJ,IAAI,CAAC,OAA0B;QAC7B,MAAM,SAAS,GAAwB,IAAI,uBAAM,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;YAC3E,MAAM,MAAM,GAAW,IAAI,eAAM,CAAC;gBAChC,IAAI,EAAE,GAAG,EAAE,GAAE,CAAC;gBACd,KAAK,EAAE,UAAU,KAAK,EAAE,CAAC,EAAE,QAAQ;oBACjC,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;oBACnC,QAAQ,EAAE,CAAC;gBACb,CAAC;aACF,CAAC,CAAC;YAEH,MAAM,SAAS,GAAG,IAAI,kCAAe,CAAC;gBACpC,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,MAAM,EAAE,MAAM;gBACd,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;oBAC3B,IAAI,CAAC;wBACH,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;qBAC5B,CAAC,CAAC;gBACL,CAAC;aACF,CAAC,CAAC;YAEH,IAAI,CAAC;gBACH,UAAU,EAAE;oBACV,KAAK,EAAE,wBAAe,CAAC,UAAU;iBAClC;aACF,CA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AAU,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;QACrC,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAE,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,EAAE,OAAO,EAAgB;;QACnC,MAAM,CAAA,MAAA,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,0CAAE,SAAS,CAAC,OAAO,EAAE,CAAA,CAAC;QACxD,MAAM,CAAA,MAAA,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,0CAAE,MAAM,CAAC,GAAG,EAAE,CAAA,CAAC;QACjD,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAChC,IAAA,SAAG,EAAC,SAAS
|
|
1
|
+
{"version":3,"file":"webrtc-transport-service.js","sourceRoot":"","sources":["../../../src/transport/webrtc-transport-service.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,oDAA4B;AAC5B,mCAAgC;AAEhC,yDAA8C;AAC9C,qCAAuC;AACvC,mCAAgC;AAChC,mEAQgD;AAChD,qCAAwC;AAExC,yDAAqD;AAErD,MAAa,sBAAsB;IAKjC,kBAAkB;IAClB,YACmB,aAAmB;QAAnB,kBAAa,GAAb,aAAa,CAAM;QANrB,eAAU,GAAG,IAAI,iBAAU,CAC1C,gBAAS,CAAC,IAAI,CACf,CAAC;IAKC,CAAC;IAEJ,IAAI,CAAC,OAA0B;QAC7B,MAAM,SAAS,GAAwB,IAAI,uBAAM,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;YAC3E,MAAM,MAAM,GAAW,IAAI,eAAM,CAAC;gBAChC,IAAI,EAAE,GAAG,EAAE,GAAE,CAAC;gBACd,KAAK,EAAE,UAAU,KAAK,EAAE,CAAC,EAAE,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AC,OAAO,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QACtE,CAAC,CAAC,CAAC;QAEH,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE,MAAM,EAAiB;QACjD,IAAA,gBAAM,EAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;QACrC,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAE,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC/D,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,OAAO,EAAe;QAC9C,IAAA,gBAAM,EAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;QACrC,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAE,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,EAAE,OAAO,EAAgB;;QACnC,MAAM,CAAA,MAAA,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,0CAAE,SAAS,CAAC,OAAO,EAAE,CAAA,CAAC;QACxD,MAAM,CAAA,MAAA,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,0CAAE,MAAM,CAAC,GAAG,EAAE,CAAA,CAAC;QACjD,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAChC,IAAA,SAAG,EAAC,SAAS,oVAAC,CAAC;IACjB,CAAC;CACF;AAtFD,wDAsFC"}
|
|
@@ -22,23 +22,23 @@ class WebRTCTransport {
|
|
|
22
22
|
this.closed = new async_1.Event();
|
|
23
23
|
this.connected = new async_1.Event();
|
|
24
24
|
this.errors = new debug_1.ErrorStream();
|
|
25
|
-
(0, log_1.log)('created connection', params, { file: "packages/core/mesh/network-manager/src/transport/webrtc-transport.ts", line: 34, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
25
|
+
(0, log_1.log)('created connection', params, { file: "packages/core/mesh/network-manager/src/transport/webrtc-transport.ts", line: 34, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
26
26
|
this._peer = new simple_peer_1.default({
|
|
27
27
|
initiator: this.params.initiator,
|
|
28
28
|
wrtc: simple_peer_1.default.WEBRTC_SUPPORT ? undefined : webrtc_1.wrtc !== null && webrtc_1.wrtc !== void 0 ? webrtc_1.wrtc : (0, debug_1.raise)(new Error('wrtc not available')),
|
|
29
29
|
config: this.params.webrtcConfig
|
|
30
30
|
});
|
|
31
31
|
this._peer.on('signal', async (data) => {
|
|
32
|
-
(0, log_1.log)('signal', data, { file: "packages/core/mesh/network-manager/src/transport/webrtc-transport.ts", line: 42, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
32
|
+
(0, log_1.log)('signal', data, { file: "packages/core/mesh/network-manager/src/transport/webrtc-transport.ts", line: 42, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
33
33
|
await this.params.sendSignal({ json: JSON.stringify(data) });
|
|
34
34
|
});
|
|
35
35
|
this._peer.on('connect', () => {
|
|
36
|
-
(0, log_1.log)('connected', {}, { file: "packages/core/mesh/network-manager/src/transport/webrtc-transport.ts", line: 47, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
36
|
+
(0, log_1.log)('connected', {}, { file: "packages/core/mesh/network-manager/src/transport/webrtc-transport.ts", line: 47, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
37
37
|
this.params.stream.pipe(this._peer).pipe(this.params.stream);
|
|
38
38
|
this.connected.emit();
|
|
39
39
|
});
|
|
40
40
|
this._peer.on('close', async () => {
|
|
41
|
-
(0, log_1.log)('closed', {}, { file: "packages/core/mesh/network-manager/src/transport/webrtc-transport.ts", line: 53, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
41
|
+
(0, log_1.log)('closed', {}, { file: "packages/core/mesh/network-manager/src/transport/webrtc-transport.ts", line: 53, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
42
42
|
await this._disconnectStreams();
|
|
43
43
|
this.closed.emit();
|
|
44
44
|
});
|
|
@@ -48,11 +48,11 @@ class WebRTCTransport {
|
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
async destroy() {
|
|
51
|
-
(0, log_1.log)('closing...', {}, { file: "packages/core/mesh/network-manager/src/transport/webrtc-transport.ts", line: 65, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
51
|
+
(0, log_1.log)('closing...', {}, { file: "packages/core/mesh/network-manager/src/transport/webrtc-transport.ts", line: 65, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
52
52
|
await this._disconnectStreams();
|
|
53
53
|
this._peer.destroy();
|
|
54
54
|
this.closed.emit();
|
|
55
|
-
(0, log_1.log)('closed', {}, { file: "packages/core/mesh/network-manager/src/transport/webrtc-transport.ts", line: 69, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
55
|
+
(0, log_1.log)('closed', {}, { file: "packages/core/mesh/network-manager/src/transport/webrtc-transport.ts", line: 69, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
56
56
|
}
|
|
57
57
|
signal(signal) {
|
|
58
58
|
(0, node_assert_1.default)(this._peer, 'Connection not ready to accept signals.');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webrtc-transport.js","sourceRoot":"","sources":["../../../src/transport/webrtc-transport.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,8DAAiC;AACjC,8DAA4E;AAE5E,uCAAoC;AACpC,uCAAiD;AACjD,mCAAgC;AAIhC,qCAAgC;AAShC;;GAEG;AACH,MAAa,eAAe;IAO1B,YAA6B,MAA6B;QAA7B,WAAM,GAAN,MAAM,CAAuB;QAJjD,WAAM,GAAG,IAAI,aAAK,EAAE,CAAC;QACrB,cAAS,GAAG,IAAI,aAAK,EAAE,CAAC;QACxB,WAAM,GAAG,IAAI,mBAAW,EAAE,CAAC;QAGlC,IAAA,SAAG,EAAC,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"webrtc-transport.js","sourceRoot":"","sources":["../../../src/transport/webrtc-transport.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,8DAAiC;AACjC,8DAA4E;AAE5E,uCAAoC;AACpC,uCAAiD;AACjD,mCAAgC;AAIhC,qCAAgC;AAShC;;GAEG;AACH,MAAa,eAAe;IAO1B,YAA6B,MAA6B;QAA7B,WAAM,GAAN,MAAM,CAAuB;QAJjD,WAAM,GAAG,IAAI,aAAK,EAAE,CAAC;QACrB,cAAS,GAAG,IAAI,aAAK,EAAE,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T,YAAY;KACb,CAAC;CACL,CAAC,CAAC;AANU,QAAA,4BAA4B,gCAMtC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/network-manager",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"description": "Network Manager",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -12,9 +12,10 @@
|
|
|
12
12
|
},
|
|
13
13
|
"types": "dist/src/index.d.ts",
|
|
14
14
|
"files": [
|
|
15
|
+
"testing.d.ts",
|
|
16
|
+
"testing.js",
|
|
15
17
|
"dist",
|
|
16
|
-
"src"
|
|
17
|
-
"README.md"
|
|
18
|
+
"src"
|
|
18
19
|
],
|
|
19
20
|
"dependencies": {
|
|
20
21
|
"@koush/wrtc": "^0.5.3",
|
|
@@ -24,19 +25,19 @@
|
|
|
24
25
|
"simple-peer": "9.11.0",
|
|
25
26
|
"ws": "^7.4.4",
|
|
26
27
|
"xor-distance": "^2.0.0",
|
|
27
|
-
"@dxos/async": "0.1.
|
|
28
|
-
"@dxos/codec-protobuf": "0.1.
|
|
29
|
-
"@dxos/credentials": "0.1.
|
|
30
|
-
"@dxos/crypto": "0.1.
|
|
31
|
-
"@dxos/debug": "0.1.
|
|
32
|
-
"@dxos/keys": "0.1.
|
|
33
|
-
"@dxos/log": "0.1.
|
|
34
|
-
"@dxos/mesh-protocol": "0.1.
|
|
35
|
-
"@dxos/messaging": "0.1.
|
|
36
|
-
"@dxos/protocol-plugin-presence": "0.1.
|
|
37
|
-
"@dxos/protocols": "0.1.
|
|
38
|
-
"@dxos/rpc": "0.1.
|
|
39
|
-
"@dxos/util": "0.1.
|
|
28
|
+
"@dxos/async": "0.1.12",
|
|
29
|
+
"@dxos/codec-protobuf": "0.1.12",
|
|
30
|
+
"@dxos/credentials": "0.1.12",
|
|
31
|
+
"@dxos/crypto": "0.1.12",
|
|
32
|
+
"@dxos/debug": "0.1.12",
|
|
33
|
+
"@dxos/keys": "0.1.12",
|
|
34
|
+
"@dxos/log": "0.1.12",
|
|
35
|
+
"@dxos/mesh-protocol": "0.1.12",
|
|
36
|
+
"@dxos/messaging": "0.1.12",
|
|
37
|
+
"@dxos/protocol-plugin-presence": "0.1.12",
|
|
38
|
+
"@dxos/protocols": "0.1.12",
|
|
39
|
+
"@dxos/rpc": "0.1.12",
|
|
40
|
+
"@dxos/util": "0.1.12"
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|
|
42
43
|
"@swc-node/register": "^1.5.4",
|
|
@@ -46,8 +47,8 @@
|
|
|
46
47
|
"earljs": "~0.1.10",
|
|
47
48
|
"fast-check": "~2.14.0",
|
|
48
49
|
"typescript": "^4.8.4",
|
|
49
|
-
"@dxos/signal": "0.1.
|
|
50
|
-
"@dxos/testutils": "0.1.
|
|
50
|
+
"@dxos/signal": "0.1.12",
|
|
51
|
+
"@dxos/testutils": "0.1.12"
|
|
51
52
|
},
|
|
52
53
|
"publishConfig": {
|
|
53
54
|
"access": "public"
|
|
@@ -58,8 +59,5 @@
|
|
|
58
59
|
"root": "src/network-manager.ts"
|
|
59
60
|
}
|
|
60
61
|
]
|
|
61
|
-
},
|
|
62
|
-
"scripts": {
|
|
63
|
-
"check": "true"
|
|
64
62
|
}
|
|
65
63
|
}
|