@dxos/network-manager 0.1.10 → 0.1.11
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
|
@@ -59,7 +59,7 @@ class NetworkManager {
|
|
|
59
59
|
async close() {
|
|
60
60
|
for (const topic of this._swarms.keys()) {
|
|
61
61
|
await this.leaveSwarm(topic).catch((err) => {
|
|
62
|
-
(0, log_1.log)(err, {}, { file: "packages/core/mesh/network-manager/src/network-manager.ts", line: 126, 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)(err, {}, { file: "packages/core/mesh/network-manager/src/network-manager.ts", line: 126, 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
|
});
|
|
64
64
|
}
|
|
65
65
|
await this._signalManager.destroy();
|
|
@@ -75,19 +75,19 @@ class NetworkManager {
|
|
|
75
75
|
(0, node_assert_1.default)(topology);
|
|
76
76
|
(0, node_assert_1.default)(typeof protocol === 'function');
|
|
77
77
|
if (this._swarms.has(topic)) {
|
|
78
|
-
throw new Error(`Already connected to swarm: ${
|
|
78
|
+
throw new Error(`Already connected to swarm: ${keys_1.PublicKey.from(topic)}`);
|
|
79
79
|
}
|
|
80
|
-
(0, log_1.log)('joining', { topic, peerId, topology: topology.toString() }, { file: "packages/core/mesh/network-manager/src/network-manager.ts", line: 146, 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): Log peerId.
|
|
80
|
+
(0, log_1.log)('joining', { topic: keys_1.PublicKey.from(topic), peerId, topology: topology.toString() }, { file: "packages/core/mesh/network-manager/src/network-manager.ts", line: 146, 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): Log peerId.
|
|
81
81
|
const swarm = new swarm_1.Swarm(topic, peerId, topology, protocol, this._messenger, this._transportFactory, label);
|
|
82
82
|
swarm.errors.handle((error) => {
|
|
83
|
-
(0, log_1.log)(
|
|
83
|
+
(0, log_1.log)('swarm error', { error }, { file: "packages/core/mesh/network-manager/src/network-manager.ts", line: 149, 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) });
|
|
84
84
|
});
|
|
85
85
|
this._swarms.set(topic, swarm);
|
|
86
|
-
this._signalConnection.join({ topic, peerId }).catch((error) => log_1.log.catch(error, {}, { file: "packages/core/mesh/network-manager/src/network-manager.ts", line: 153, 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." }));
|
|
86
|
+
this._signalConnection.join({ topic, peerId }).catch((error) => log_1.log.catch(error, {}, { file: "packages/core/mesh/network-manager/src/network-manager.ts", line: 153, 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) }));
|
|
87
87
|
this._mappers.set(topic, new swarm_1.SwarmMapper(swarm, presence));
|
|
88
88
|
this.topicsUpdated.emit();
|
|
89
89
|
(_a = this._connectionLog) === null || _a === void 0 ? void 0 : _a.swarmJoined(swarm);
|
|
90
|
-
(0, log_1.log)('joined', { topic, count: this._swarms.size }, { file: "packages/core/mesh/network-manager/src/network-manager.ts", line: 158, 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." });
|
|
90
|
+
(0, log_1.log)('joined', { topic: keys_1.PublicKey.from(topic), count: this._swarms.size }, { file: "packages/core/mesh/network-manager/src/network-manager.ts", line: 158, 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) });
|
|
91
91
|
return {
|
|
92
92
|
close: () => this.leaveSwarm(topic)
|
|
93
93
|
};
|
|
@@ -98,10 +98,10 @@ class NetworkManager {
|
|
|
98
98
|
async leaveSwarm(topic) {
|
|
99
99
|
var _a;
|
|
100
100
|
if (!this._swarms.has(topic)) {
|
|
101
|
-
log_1.log.warn('swarm not open', { topic }, { file: "packages/core/mesh/network-manager/src/network-manager.ts", line: 170, 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." });
|
|
101
|
+
log_1.log.warn('swarm not open', { topic: keys_1.PublicKey.from(topic) }, { file: "packages/core/mesh/network-manager/src/network-manager.ts", line: 170, 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) });
|
|
102
102
|
return;
|
|
103
103
|
}
|
|
104
|
-
(0, log_1.log)('leaving', { topic }, { file: "packages/core/mesh/network-manager/src/network-manager.ts", line: 174, 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." });
|
|
104
|
+
(0, log_1.log)('leaving', { topic: keys_1.PublicKey.from(topic) }, { file: "packages/core/mesh/network-manager/src/network-manager.ts", line: 174, 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) });
|
|
105
105
|
const swarm = this._swarms.get(topic);
|
|
106
106
|
await this._signalConnection.leave({ topic, peerId: swarm.ownPeerId });
|
|
107
107
|
const map = this._mappers.get(topic);
|
|
@@ -111,7 +111,7 @@ class NetworkManager {
|
|
|
111
111
|
await swarm.destroy();
|
|
112
112
|
this._swarms.delete(topic);
|
|
113
113
|
await this.topicsUpdated.emit();
|
|
114
|
-
(0, log_1.log)('left', { topic, count: this._swarms.size }, { file: "packages/core/mesh/network-manager/src/network-manager.ts", line: 188, 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." });
|
|
114
|
+
(0, log_1.log)('left', { topic: keys_1.PublicKey.from(topic), count: this._swarms.size }, { file: "packages/core/mesh/network-manager/src/network-manager.ts", line: 188, 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) });
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
exports.NetworkManager = NetworkManager;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network-manager.js","sourceRoot":"","sources":["../../src/network-manager.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,8DAAiC;AAEjC,uCAAoC;AACpC,qCAAuC;AACvC,mCAAgC;AAEhC,+CAA2D;AAC3D,qCAAwC;AAExC,qDAAiD;AAEjD,mCAA6C;AAkD7C;;GAEG;AACH,yCAAyC;AACzC,MAAa,cAAc;IAYzB,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,GAAG,EAAyB;QAX1D,YAAO,GAAG,IAAI,iBAAU,CAAmB,gBAAS,CAAC,IAAI,CAAC,CAAC;QAC3D,aAAQ,GAAG,IAAI,iBAAU,CAAyB,gBAAS,CAAC,IAAI,CAAC,CAAC;QAQnE,kBAAa,GAAG,IAAI,aAAK,EAAQ,CAAC;QAGhD,IAAI,CAAC,iBAAiB,GAAG,gBAAgB,CAAC;QAE1C,oCAAoC;QACpC,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;QACpC,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,EAAE,WAAC,OAAA,MAAA,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,0CAAE,YAAY,CAAC,KAAK,CAAC,CAAA,EAAA,CAAC,CAAC;QAClH,IAAI,CAAC,UAAU,GAAG,IAAI,qBAAS,CAAC,EAAE,aAAa,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;QACxE,IA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CACF;AAxHD,wCAwHC"}
|
|
@@ -25,7 +25,7 @@ const protocolFactory = ({ session = {}, plugins = [], getTopics }) => {
|
|
|
25
25
|
(0, node_assert_1.default)(getTopics);
|
|
26
26
|
// eslint-disable-next-line no-unused-vars
|
|
27
27
|
return ({ channel, initiator }) => {
|
|
28
|
-
(0, log_1.log)('creating protocol', {}, { file: "packages/core/mesh/network-manager/src/protocol-factory.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." });
|
|
28
|
+
(0, log_1.log)('creating protocol', {}, { file: "packages/core/mesh/network-manager/src/protocol-factory.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) });
|
|
29
29
|
const protocol = new mesh_protocol_1.Protocol({
|
|
30
30
|
streamOptions: { live: true },
|
|
31
31
|
discoveryToPublicKey: (dk) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol-factory.js","sourceRoot":"","sources":["../../src/protocol-factory.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,8DAAiC;AAEjC,yCAA4C;AAC5C,qCAAuC;AACvC,mCAAgC;AAChC,uDAA0D;AAU1D;;;;;;;;GAQG;AACI,MAAM,eAAe,GAAG,CAAC,EAC9B,OAAO,GAAG,EAAE,EACZ,OAAO,GAAG,EAAE,EACZ,SAAS,EACc,EAAoB,EAAE;IAC7C,IAAA,qBAAM,EAAC,SAAS,CAAC,CAAC;IAElB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE;QAChC,IAAA,SAAG,EAAC,mBAAmB,
|
|
1
|
+
{"version":3,"file":"protocol-factory.js","sourceRoot":"","sources":["../../src/protocol-factory.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B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B1B;AAMK,MAAM,qBAAqB,GAAG,CAAC,KAAgB,EAAE,MAAiB,EAAE,OAAiB,EAAE,EAAE,CAC9F,IAAA,uBAAe,EAAC;IACd,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;IACnC,OAAO,EAAE,EAAE,MAAM,EAAE,gBAAS,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,EAAE;IAC3D,OAAO;CACR,CAAC,CAAC;AALQ,QAAA,qBAAqB,yBAK7B;AAEL;;;GAGG;AACI,MAAM,yBAAyB,GAAG,CACvC,aAAqB,EACrB,MAAc,EACd,cAAmB,EACD,EAAE;IACpB,OAAO,IAAA,uBAAe,EAAC;QACrB,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC,aAAa,CAAC;QAChC,OAAO,EAAE,EAAE,MAAM,EAAE,gBAAS,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE;QAChD,OAAO,EAAE,CAAC,cAAc,CAAC;KAC1B,CAAC,CAAC;AACL,CAAC,CAAC;AAVW,QAAA,yBAAyB,6BAUpC"}
|
|
@@ -34,7 +34,7 @@ class MessageRouter {
|
|
|
34
34
|
// Ignore messages from wrong topics.
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
|
-
(0, log_1.log)('received', { from: author, to: recipient, msg: message }, { file: "packages/core/mesh/network-manager/src/signal/message-router.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." });
|
|
37
|
+
(0, log_1.log)('received', { from: author, to: recipient, msg: message }, { file: "packages/core/mesh/network-manager/src/signal/message-router.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) });
|
|
38
38
|
if ((_a = message.data) === null || _a === void 0 ? void 0 : _a.offer) {
|
|
39
39
|
await this._handleOffer({ author, recipient, message });
|
|
40
40
|
}
|
|
@@ -75,7 +75,7 @@ class MessageRouter {
|
|
|
75
75
|
// Setting unique message_id if it not specified yet.
|
|
76
76
|
messageId: (_a = message.messageId) !== null && _a !== void 0 ? _a : keys_1.PublicKey.random()
|
|
77
77
|
};
|
|
78
|
-
(0, log_1.log)('sending', { from: author, to: recipient, msg: networkMessage }, { file: "packages/core/mesh/network-manager/src/signal/message-router.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." });
|
|
78
|
+
(0, log_1.log)('sending', { from: author, to: recipient, msg: networkMessage }, { file: "packages/core/mesh/network-manager/src/signal/message-router.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) });
|
|
79
79
|
await this._encodeAndSend({ author, recipient, message: networkMessage });
|
|
80
80
|
}
|
|
81
81
|
async _encodeAndSend({ author, recipient, message }) {
|
|
@@ -95,7 +95,7 @@ class MessageRouter {
|
|
|
95
95
|
if (offerRecord) {
|
|
96
96
|
this._offerRecords.delete(message.data.answer.offerMessageId);
|
|
97
97
|
(0, assert_1.default)((_c = message.data) === null || _c === void 0 ? void 0 : _c.answer, 'No answer');
|
|
98
|
-
(0, log_1.log)('resolving', { answer: message.data.answer }, { file: "packages/core/mesh/network-manager/src/signal/message-router.ts", line: 146, 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)('resolving', { answer: message.data.answer }, { file: "packages/core/mesh/network-manager/src/signal/message-router.ts", line: 146, 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
|
offerRecord.resolve(message.data.answer);
|
|
100
100
|
}
|
|
101
101
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-router.js","sourceRoot":"","sources":["../../../src/signal/message-router.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,oDAA4B;AAG5B,qCAAuC;AACvC,mCAAgC;AAChC,+CAAyC;AAEzC,qCAAsD;AAgBtD;;GAEG;AACH,MAAa,aAAa;IASxB,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAwB;QAF1D,kBAAa,GAAuC,IAAI,iBAAU,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC;QAGxG,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAChC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,EACnB,MAAM,EACN,SAAS,EACT,OAAO,EAKR;;QACC,IAAI,OAAO,CAAC,QAAQ,KAAK,8BAA8B,EAAE;YACvD,6BAA6B;YAC7B,OAAO;SACR;QACD,MAAM,OAAO,GAAiB,kBAAM,CAAC,eAAe,CAAC,8BAA8B,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAE3G,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACtC,qCAAqC;YACrC,OAAO;SACR;QAED,IAAA,SAAG,EAAC,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"message-router.js","sourceRoot":"","sources":["../../../src/signal/message-router.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;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O,CAAC,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;QACvC,MAAM,YAAY,GAAiB;YACjC,MAAM;YACN,SAAS;YACT,GAAG,OAAO;YACV,IAAI,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE;SACpC,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;QACjD,MAAM,CAAC,cAAc,GAAG,OAAO,CAAC,SAAS,CAAC;QAC1C,MAAM,IAAI,CAAC,oBAAoB,CAAC;YAC9B,MAAM,EAAE,SAAS;YACjB,SAAS,EAAE,MAAM;YACjB,OAAO,EAAE;gBACP,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,IAAI,EAAE,EAAE,MAAM,EAAE;aACjB;SACF,CAAC,CAAC;IACL,CAAC;IAEO,KAAK,CAAC,aAAa,CAAC,EAC1B,MAAM,EACN,SAAS,EACT,OAAO,EAKR;QACC,IAAA,gBAAM,EAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAC1B,IAAA,gBAAM,EAAC,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QACzC,MAAM,aAAa,GAAkB;YACnC,MAAM;YACN,SAAS;YACT,GAAG,OAAO;YACV,IAAI,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE;SACtC,CAAC;QAEF,MAAM,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;IACtC,CAAC;CACF;AAzKD,sCAyKC"}
|
|
@@ -91,9 +91,9 @@ class Connection {
|
|
|
91
91
|
data: { offer: {} }
|
|
92
92
|
})
|
|
93
93
|
.then((answer) => {
|
|
94
|
-
(0, log_1.log)('received', { answer, topic: this.topic, ownId: this.ownId, remoteId: this.remoteId }, { file: "packages/core/mesh/network-manager/src/swarm/connection.ts", line: 103, 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." });
|
|
94
|
+
(0, log_1.log)('received', { answer, topic: this.topic, ownId: this.ownId, remoteId: this.remoteId }, { file: "packages/core/mesh/network-manager/src/swarm/connection.ts", line: 103, 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) });
|
|
95
95
|
if (this.state !== ConnectionState.INITIAL) {
|
|
96
|
-
(0, log_1.log)('ignoring response', {}, { file: "packages/core/mesh/network-manager/src/swarm/connection.ts", line: 105, 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." });
|
|
96
|
+
(0, log_1.log)('ignoring response', {}, { file: "packages/core/mesh/network-manager/src/swarm/connection.ts", line: 105, 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) });
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
99
|
if (answer.accept) {
|
|
@@ -154,41 +154,41 @@ class Connection {
|
|
|
154
154
|
if (this._state === ConnectionState.CLOSED) {
|
|
155
155
|
return;
|
|
156
156
|
}
|
|
157
|
-
(0, log_1.log)('closing...', { peerId: this.ownId }, { file: "packages/core/mesh/network-manager/src/swarm/connection.ts", line: 175, 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." });
|
|
157
|
+
(0, log_1.log)('closing...', { peerId: this.ownId }, { file: "packages/core/mesh/network-manager/src/swarm/connection.ts", line: 175, 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) });
|
|
158
158
|
try {
|
|
159
159
|
// Gracefully close the stream flushing any unsent data packets.
|
|
160
160
|
await this._protocol.close();
|
|
161
161
|
}
|
|
162
162
|
catch (err) {
|
|
163
|
-
log_1.log.catch(err, {}, { file: "packages/core/mesh/network-manager/src/swarm/connection.ts", line: 181, 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." });
|
|
163
|
+
log_1.log.catch(err, {}, { file: "packages/core/mesh/network-manager/src/swarm/connection.ts", line: 181, 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) });
|
|
164
164
|
}
|
|
165
165
|
try {
|
|
166
166
|
// After the transport is closed streams are disconnected.
|
|
167
167
|
await ((_a = this._transport) === null || _a === void 0 ? void 0 : _a.destroy());
|
|
168
168
|
}
|
|
169
169
|
catch (err) {
|
|
170
|
-
log_1.log.catch(err, {}, { file: "packages/core/mesh/network-manager/src/swarm/connection.ts", line: 188, 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." });
|
|
170
|
+
log_1.log.catch(err, {}, { file: "packages/core/mesh/network-manager/src/swarm/connection.ts", line: 188, 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) });
|
|
171
171
|
}
|
|
172
|
-
(0, log_1.log)('closed', { peerId: this.ownId }, { file: "packages/core/mesh/network-manager/src/swarm/connection.ts", line: 191, 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." });
|
|
172
|
+
(0, log_1.log)('closed', { peerId: this.ownId }, { file: "packages/core/mesh/network-manager/src/swarm/connection.ts", line: 191, 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) });
|
|
173
173
|
this._changeState(ConnectionState.CLOSED);
|
|
174
174
|
}
|
|
175
175
|
async signal(msg) {
|
|
176
176
|
var _a, _b;
|
|
177
177
|
(0, node_assert_1.default)(msg.sessionId);
|
|
178
178
|
if (!msg.sessionId.equals(this.sessionId)) {
|
|
179
|
-
(0, log_1.log)('dropping signal for incorrect session id', {}, { file: "packages/core/mesh/network-manager/src/swarm/connection.ts", line: 198, 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." });
|
|
179
|
+
(0, log_1.log)('dropping signal for incorrect session id', {}, { file: "packages/core/mesh/network-manager/src/swarm/connection.ts", line: 198, 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) });
|
|
180
180
|
return;
|
|
181
181
|
}
|
|
182
182
|
(0, node_assert_1.default)(msg.data.signal);
|
|
183
183
|
(0, node_assert_1.default)((_a = msg.author) === null || _a === void 0 ? void 0 : _a.equals(this.remoteId));
|
|
184
184
|
(0, node_assert_1.default)((_b = msg.recipient) === null || _b === void 0 ? void 0 : _b.equals(this.ownId));
|
|
185
185
|
if (this._state === ConnectionState.INITIAL) {
|
|
186
|
-
(0, log_1.log)('buffered signal', { peerId: this.ownId, remoteId: this.remoteId, msg: msg.data }, { file: "packages/core/mesh/network-manager/src/swarm/connection.ts", line: 206, 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." });
|
|
186
|
+
(0, log_1.log)('buffered signal', { peerId: this.ownId, remoteId: this.remoteId, msg: msg.data }, { file: "packages/core/mesh/network-manager/src/swarm/connection.ts", line: 206, 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) });
|
|
187
187
|
this._bufferedSignals.push(msg.data.signal);
|
|
188
188
|
return;
|
|
189
189
|
}
|
|
190
190
|
(0, node_assert_1.default)(this._transport, 'Connection not ready to accept signals.');
|
|
191
|
-
(0, log_1.log)('received signal', { peerId: this.ownId, remoteId: this.remoteId, msg: msg.data }, { file: "packages/core/mesh/network-manager/src/swarm/connection.ts", line: 212, 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." });
|
|
191
|
+
(0, log_1.log)('received signal', { peerId: this.ownId, remoteId: this.remoteId, msg: msg.data }, { file: "packages/core/mesh/network-manager/src/swarm/connection.ts", line: 212, 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) });
|
|
192
192
|
await this._transport.signal(msg.data.signal);
|
|
193
193
|
}
|
|
194
194
|
_changeState(state) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.js","sourceRoot":"","sources":["../../../src/swarm/connection.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;AAEF,8DAAiC;AAEjC,uCAAkD;AAClD,uCAA0C;AAE1C,mCAAgC;AAOhC;;GAEG;AACH,IAAY,eAoCX;AApCD,WAAY,eAAe;IACzB;;;OAGG;IACH,sCAAmB,CAAA;IAEnB;;OAEG;IACH,kEAA+C,CAAA;IAE/C;;OAEG;IACH,4CAAyB,CAAA;IAEzB;;OAEG;IACH,wCAAqB,CAAA;IAErB;;OAEG;IACH,wCAAqB,CAAA;IAErB;;OAEG;IACH,0CAAuB,CAAA;IAEvB;;OAEG;IACH,oCAAiB,CAAA;AACnB,CAAC,EApCW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAoC1B;AAED;;GAEG;AACH,MAAa,UAAU;IAQrB,YACkB,KAAgB,EAChB,KAAgB,EAAE,wBAAwB;IAC1C,QAAmB,EACnB,SAAoB,EACpB,SAAkB,EACjB,gBAAiC,EACjC,SAAmB,EACnB,iBAAm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
|
|
43
43
|
sessionId
|
|
44
|
-
}, { file: "packages/core/mesh/network-manager/src/swarm/peer.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." });
|
|
44
|
+
}, { file: "packages/core/mesh/network-manager/src/swarm/peer.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) });
|
|
45
45
|
(0, assert_1.default)(!this.connection, 'Already connected.');
|
|
46
46
|
const connection = new connection_1.Connection(this.topic, this.localPeerId, this.id, sessionId, initiator, signalMessaging, protocol, transportFactory);
|
|
47
47
|
connection.stateChanged.on((state) => {
|
|
@@ -59,7 +59,7 @@ class Peer {
|
|
|
59
59
|
break;
|
|
60
60
|
}
|
|
61
61
|
case connection_1.ConnectionState.CLOSED: {
|
|
62
|
-
(0, log_1.log)('connection closed', { topic: this.topic, peerId: this.localPeerId, remoteId: this.id, initiator }, { file: "packages/core/mesh/network-manager/src/swarm/peer.ts", line: 101, 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)('connection closed', { topic: this.topic, peerId: this.localPeerId, remoteId: this.id, initiator }, { file: "packages/core/mesh/network-manager/src/swarm/peer.ts", line: 101, 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
|
(0, assert_1.default)(this.connection === connection, 'Connection mismatch (race condition).');
|
|
64
64
|
this.connection = undefined;
|
|
65
65
|
this._callbacks.onDisconnected();
|
|
@@ -68,10 +68,10 @@ class Peer {
|
|
|
68
68
|
}
|
|
69
69
|
});
|
|
70
70
|
connection.errors.handle((err) => {
|
|
71
|
-
log_1.log.warn('connection error', { topic: this.topic, peerId: this.localPeerId, remoteId: this.id, initiator, err }, { file: "packages/core/mesh/network-manager/src/swarm/peer.ts", line: 111, 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." });
|
|
71
|
+
log_1.log.warn('connection error', { topic: this.topic, peerId: this.localPeerId, remoteId: this.id, initiator, err }, { file: "packages/core/mesh/network-manager/src/swarm/peer.ts", line: 111, 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) });
|
|
72
72
|
// Calls `onStateChange` with CLOSED state.
|
|
73
73
|
void this.closeConnection().catch(() => {
|
|
74
|
-
log_1.log.catch(err, {}, { file: "packages/core/mesh/network-manager/src/swarm/peer.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." });
|
|
74
|
+
log_1.log.catch(err, {}, { file: "packages/core/mesh/network-manager/src/swarm/peer.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) });
|
|
75
75
|
});
|
|
76
76
|
});
|
|
77
77
|
this.connection = connection;
|
|
@@ -82,26 +82,26 @@ class Peer {
|
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
84
84
|
const connection = this.connection;
|
|
85
|
-
(0, log_1.log)('closing...', { peerId: this.id, sessionId: connection.sessionId }, { file: "packages/core/mesh/network-manager/src/swarm/peer.ts", line: 129, 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." });
|
|
85
|
+
(0, log_1.log)('closing...', { peerId: this.id, sessionId: connection.sessionId }, { file: "packages/core/mesh/network-manager/src/swarm/peer.ts", line: 129, 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) });
|
|
86
86
|
try {
|
|
87
87
|
// Triggers `onStateChange` callback which will clean up the connection.
|
|
88
88
|
await connection.close();
|
|
89
89
|
}
|
|
90
90
|
catch (err) {
|
|
91
|
-
log_1.log.catch(err, {}, { file: "packages/core/mesh/network-manager/src/swarm/peer.ts", line: 135, 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." });
|
|
91
|
+
log_1.log.catch(err, {}, { file: "packages/core/mesh/network-manager/src/swarm/peer.ts", line: 135, 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) });
|
|
92
92
|
}
|
|
93
|
-
(0, log_1.log)('closed', { peerId: this.id, sessionId: connection.sessionId }, { file: "packages/core/mesh/network-manager/src/swarm/peer.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." });
|
|
93
|
+
(0, log_1.log)('closed', { peerId: this.id, sessionId: connection.sessionId }, { file: "packages/core/mesh/network-manager/src/swarm/peer.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) });
|
|
94
94
|
}
|
|
95
95
|
async onSignal(message) {
|
|
96
96
|
if (!this.connection) {
|
|
97
|
-
(0, log_1.log)('dropping signal message for non-existent connection', { message }, { file: "packages/core/mesh/network-manager/src/swarm/peer.ts", line: 143, 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." });
|
|
97
|
+
(0, log_1.log)('dropping signal message for non-existent connection', { message }, { file: "packages/core/mesh/network-manager/src/swarm/peer.ts", line: 143, 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) });
|
|
98
98
|
return;
|
|
99
99
|
}
|
|
100
100
|
await this.connection.signal(message);
|
|
101
101
|
}
|
|
102
102
|
async destroy() {
|
|
103
103
|
var _a;
|
|
104
|
-
(0, log_1.log)('Destroying peer', { peerId: this.id, topic: this.topic }, { file: "packages/core/mesh/network-manager/src/swarm/peer.ts", line: 151, 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." });
|
|
104
|
+
(0, log_1.log)('Destroying peer', { peerId: this.id, topic: this.topic }, { file: "packages/core/mesh/network-manager/src/swarm/peer.ts", line: 151, 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) });
|
|
105
105
|
// Won't throw.
|
|
106
106
|
await ((_a = this === null || this === void 0 ? void 0 : this.connection) === null || _a === void 0 ? void 0 : _a.close());
|
|
107
107
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"peer.js","sourceRoot":"","sources":["../../../src/swarm/peer.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;AAEF,oDAA4B;AAE5B,uCAA2C;AAE3C,mCAAgC;AAKhC,6CAA2D;AAwB3D,MAAa,IAAI;IAQf,YACkB,EAAa,EACb,KAAgB,EAChB,WAAsB,EACrB,UAAyB;QAH1B,OAAE,GAAF,EAAE,CAAW;QACb,UAAK,GAAL,KAAK,CAAW;QAChB,gBAAW,GAAX,WAAW,CAAW;QACrB,eAAU,GAAV,UAAU,CAAe;QAT5C;;WAEG;QACI,gBAAW,GAAG,KAAK,CAAC;IAOxB,CAAC;IAEJ;;;OAGG;IACH,gBAAgB;IACd,2CAA2C;IAC3C,eAAgC,EAChC,SAAkB,EAClB,SAAoB,EACpB,QAAkB,EAClB,gBAAkC;QAElC,IAAA,SAAG,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
|
@@ -41,7 +41,7 @@ class SwarmMapper {
|
|
|
41
41
|
this._update();
|
|
42
42
|
}
|
|
43
43
|
_update() {
|
|
44
|
-
(0, log_1.log)('updating swarm', {}, { file: "packages/core/mesh/network-manager/src/swarm/swarm-mapper.ts", line: 77, 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." });
|
|
44
|
+
(0, log_1.log)('updating swarm', {}, { file: "packages/core/mesh/network-manager/src/swarm/swarm-mapper.ts", line: 77, 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) });
|
|
45
45
|
this._peers.clear();
|
|
46
46
|
this._peers.set(this._swarm.ownPeerId, {
|
|
47
47
|
id: this._swarm.ownPeerId,
|
|
@@ -79,7 +79,7 @@ class SwarmMapper {
|
|
|
79
79
|
(0, log_1.log)('graph changed', {
|
|
80
80
|
directConnections: this._swarm.connections.length,
|
|
81
81
|
totalPeersInSwarm: this._peers.size
|
|
82
|
-
}, { file: "packages/core/mesh/network-manager/src/swarm/swarm-mapper.ts", line: 118, 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." });
|
|
82
|
+
}, { file: "packages/core/mesh/network-manager/src/swarm/swarm-mapper.ts", line: 118, 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) });
|
|
83
83
|
this.mapUpdated.emit(Array.from(this._peers.values()));
|
|
84
84
|
}
|
|
85
85
|
// TODO(burdon): Async open/close.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swarm-mapper.js","sourceRoot":"","sources":["../../../src/swarm/swarm-mapper.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEF,uCAAwD;AACxD,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;IAED,kCAAkC;IAClC,OAAO;QACL,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,wBAAwB,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACzE,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;CACF;AArGD,kCAqGC"}
|
package/dist/src/swarm/swarm.js
CHANGED
|
@@ -57,7 +57,7 @@ class Swarm {
|
|
|
57
57
|
*/
|
|
58
58
|
this.connected = new async_1.Event();
|
|
59
59
|
this.errors = new debug_1.ErrorStream();
|
|
60
|
-
(0, log_1.log)('creating swarm', { id: this.id, topic: this._topic, peerId: _ownPeerId }, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 79, 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." });
|
|
60
|
+
(0, log_1.log)('creating swarm', { id: this.id, topic: this._topic, peerId: _ownPeerId }, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 79, 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) });
|
|
61
61
|
_topology.init(this._getSwarmController());
|
|
62
62
|
this._swarmMessenger = new signal_1.MessageRouter({
|
|
63
63
|
sendMessage: async (msg) => await this._messenger.sendMessage(msg),
|
|
@@ -71,7 +71,7 @@ class Swarm {
|
|
|
71
71
|
payloadType: 'dxos.mesh.swarm.SwarmMessage',
|
|
72
72
|
onMessage: async (message) => await this._swarmMessenger.receiveMessage(message)
|
|
73
73
|
})
|
|
74
|
-
.catch((error) => log_1.log.catch(error, {}, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 95, 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." }));
|
|
74
|
+
.catch((error) => log_1.log.catch(error, {}, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 95, 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) }));
|
|
75
75
|
}
|
|
76
76
|
get connections() {
|
|
77
77
|
return Array.from(this._peers.values())
|
|
@@ -92,7 +92,7 @@ class Swarm {
|
|
|
92
92
|
}
|
|
93
93
|
// TODO(burdon): async open?
|
|
94
94
|
async destroy() {
|
|
95
|
-
(0, log_1.log)('destroying', { id: this.id, topic: this._topic }, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 121, 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
|
+
(0, log_1.log)('destroying', { id: this.id, topic: this._topic }, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 121, 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
|
this._destroyed = true;
|
|
97
97
|
await this._topology.destroy();
|
|
98
98
|
await Promise.all(Array.from(this._peers.keys()).map((key) => this._closeConnection(key)));
|
|
@@ -106,7 +106,7 @@ class Swarm {
|
|
|
106
106
|
topic: this._topic,
|
|
107
107
|
previous: getClassName(this._topology),
|
|
108
108
|
topology: getClassName(topology)
|
|
109
|
-
}, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 131, 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." });
|
|
109
|
+
}, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 131, 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) });
|
|
110
110
|
await this._topology.destroy();
|
|
111
111
|
this._topology = topology;
|
|
112
112
|
this._topology.init(this._getSwarmController());
|
|
@@ -147,14 +147,14 @@ class Swarm {
|
|
|
147
147
|
this._peers.delete(peerId);
|
|
148
148
|
}
|
|
149
149
|
onSwarmEvent(swarmEvent) {
|
|
150
|
-
(0, log_1.log)('swarm event', { id: this.id, topic: this._topic, swarmEvent }, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 183, 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): Stringify.
|
|
150
|
+
(0, log_1.log)('swarm event', { id: this.id, topic: this._topic, swarmEvent }, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 183, 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): Stringify.
|
|
151
151
|
if (this._destroyed) {
|
|
152
|
-
log_1.log.warn('ignored for destroyed swarm', { peerId: this.id, topic: this._topic }, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 185, 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." });
|
|
152
|
+
log_1.log.warn('ignored for destroyed swarm', { peerId: this.id, topic: this._topic }, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 185, 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) });
|
|
153
153
|
return;
|
|
154
154
|
}
|
|
155
155
|
if (swarmEvent.peerAvailable) {
|
|
156
156
|
const peerId = keys_1.PublicKey.from(swarmEvent.peerAvailable.peer);
|
|
157
|
-
(0, log_1.log)('new peer', { id: this.id, topic: this._topic, peerId }, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 191, 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." });
|
|
157
|
+
(0, log_1.log)('new peer', { id: this.id, topic: this._topic, peerId }, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 191, 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) });
|
|
158
158
|
if (!peerId.equals(this._ownPeerId)) {
|
|
159
159
|
const peer = this._getOrCreatePeer(peerId);
|
|
160
160
|
peer.advertizing = true;
|
|
@@ -173,20 +173,20 @@ class Swarm {
|
|
|
173
173
|
}
|
|
174
174
|
async onOffer(message) {
|
|
175
175
|
var _a, _b;
|
|
176
|
-
(0, log_1.log)('offer', { id: this.id, topic: this._topic, message }, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 210, 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." });
|
|
176
|
+
(0, log_1.log)('offer', { id: this.id, topic: this._topic, message }, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 210, 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) });
|
|
177
177
|
if (this._destroyed) {
|
|
178
|
-
log_1.log.warn('ignored for destroyed swarm', { peerId: this.id, topic: this._topic }, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 212, 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." });
|
|
178
|
+
log_1.log.warn('ignored for destroyed swarm', { peerId: this.id, topic: this._topic }, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 212, 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) });
|
|
179
179
|
return { accept: false };
|
|
180
180
|
}
|
|
181
181
|
// Id of the peer offering us the connection.
|
|
182
182
|
(0, node_assert_1.default)(message.author);
|
|
183
183
|
const remoteId = message.author;
|
|
184
184
|
if (!((_a = message.recipient) === null || _a === void 0 ? void 0 : _a.equals(this._ownPeerId))) {
|
|
185
|
-
(0, log_1.log)('rejecting offer with incorrect peerId', { id: this.id, topic: this._topic, message }, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 220, 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." });
|
|
185
|
+
(0, log_1.log)('rejecting offer with incorrect peerId', { id: this.id, topic: this._topic, message }, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 220, 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) });
|
|
186
186
|
return { accept: false };
|
|
187
187
|
}
|
|
188
188
|
if (!((_b = message.topic) === null || _b === void 0 ? void 0 : _b.equals(this._topic))) {
|
|
189
|
-
(0, log_1.log)('rejecting offer with incorrect topic', { id: this.id, topic: this._topic, message }, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 224, 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." });
|
|
189
|
+
(0, log_1.log)('rejecting offer with incorrect topic', { id: this.id, topic: this._topic, message }, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 224, 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) });
|
|
190
190
|
return { accept: false };
|
|
191
191
|
}
|
|
192
192
|
const peer = this._getOrCreatePeer(remoteId);
|
|
@@ -198,7 +198,7 @@ class Swarm {
|
|
|
198
198
|
id: this.id,
|
|
199
199
|
topic: this._topic,
|
|
200
200
|
peerId: this._ownPeerId
|
|
201
|
-
}, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 234, 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." });
|
|
201
|
+
}, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 234, 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) });
|
|
202
202
|
// Close our connection and accept remote peer's connection.
|
|
203
203
|
await this._closeConnection(remoteId).catch((err) => {
|
|
204
204
|
this.errors.raise(err);
|
|
@@ -229,9 +229,9 @@ class Swarm {
|
|
|
229
229
|
}
|
|
230
230
|
async onSignal(message) {
|
|
231
231
|
var _a, _b;
|
|
232
|
-
(0, log_1.log)('signal', { id: this.id, topic: this._topic, message }, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 270, 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." });
|
|
232
|
+
(0, log_1.log)('signal', { id: this.id, topic: this._topic, message }, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 270, 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) });
|
|
233
233
|
if (this._destroyed) {
|
|
234
|
-
log_1.log.warn('ignored for destroyed swarm', { peerId: this.id, topic: this._topic }, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 272, 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." });
|
|
234
|
+
log_1.log.warn('ignored for destroyed swarm', { peerId: this.id, topic: this._topic }, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 272, 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) });
|
|
235
235
|
return;
|
|
236
236
|
}
|
|
237
237
|
(0, node_assert_1.default)((_a = message.recipient) === null || _a === void 0 ? void 0 : _a.equals(this._ownPeerId), `Invalid signal peer id expected=${this.ownPeerId}, actual=${message.recipient}`);
|
|
@@ -278,11 +278,11 @@ class Swarm {
|
|
|
278
278
|
return;
|
|
279
279
|
}
|
|
280
280
|
const sessionId = keys_1.PublicKey.random();
|
|
281
|
-
(0, log_1.log)('initiating...', { id: this.id, topic: this._topic, peerId: remoteId, sessionId }, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 326, 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." });
|
|
281
|
+
(0, log_1.log)('initiating...', { id: this.id, topic: this._topic, peerId: remoteId, sessionId }, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 326, 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) });
|
|
282
282
|
const connection = this._createConnection(true, remoteId, sessionId);
|
|
283
283
|
connection.initiate();
|
|
284
284
|
this._topology.update();
|
|
285
|
-
(0, log_1.log)('initiated', { id: this.id, topic: this._topic }, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 330, 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." });
|
|
285
|
+
(0, log_1.log)('initiated', { id: this.id, topic: this._topic }, { file: "packages/core/mesh/network-manager/src/swarm/swarm.ts", line: 330, 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) });
|
|
286
286
|
}
|
|
287
287
|
/**
|
|
288
288
|
* Synchronously create a connection, which must be initialized.
|
|
@@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M,EAAE,CAAC;QACxB,IAAA,SAAG,EAAC,WAAW,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,yTAAC,CAAC;IACxD,CAAC;IAED;;OAEG;IACK,iBAAiB,CAAC,SAAkB,EAAE,QAAmB,EAAE,SAAoB;QACrF,MAAM,IAAI,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QAE7C,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,CACtC,IAAI,CAAC,eAAe,EACpB,SAAS,EACT,SAAS,EACT,IAAI,CAAC,iBAAiB,CAAC,EAAE,OAAO,EAAE,IAAA,qBAAY,EAAC,IAAI,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,EACzE,IAAI,CAAC,iBAAiB,CACvB,CAAC;QAEF,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACtC,OAAO,UAAU,CAAC;IACpB,CAAC;IAEO,KAAK,CAAC,gBAAgB,CAAC,MAAiB;QAC9C,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACrC,IAAI,CAAC,IAAI,EAAE;YACT,OAAO;SACR;QAED,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;IAC/B,CAAC;CACF;AApUD,sBAoUC"}
|
|
@@ -66,9 +66,9 @@ describe('Swarm', function () {
|
|
|
66
66
|
since: new Date()
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
|
-
(0, log_1.log)('Candidates changed', {}, { file: "packages/core/mesh/network-manager/src/swarm/swarm.test.ts", line: 89, 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." });
|
|
69
|
+
(0, log_1.log)('Candidates changed', {}, { file: "packages/core/mesh/network-manager/src/swarm/swarm.test.ts", line: 89, 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) });
|
|
70
70
|
await promise;
|
|
71
|
-
(0, log_1.log)('Swarms connected', {}, { file: "packages/core/mesh/network-manager/src/swarm/swarm.test.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." });
|
|
71
|
+
(0, log_1.log)('Swarms connected', {}, { file: "packages/core/mesh/network-manager/src/swarm/swarm.test.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) });
|
|
72
72
|
await (0, wait_for_expect_1.default)(() => {
|
|
73
73
|
(0, earljs_1.expect)(receivedData).toEqual(data);
|
|
74
74
|
});
|