@libp2p/pubsub 2.0.0 → 3.0.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAe,MAAM,2BAA2B,CAAA;AAGrE,OAAO,KAAK,MAAM,SAAS,CAAA;AAS3B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,SAAS,EAAE,qBAAqB,EAA0B,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAC3N,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAI9D,MAAM,WAAW,cAAc;IAAG,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE;AAEpF;;;GAGG;AACH,8BAAsB,kBAAkB,CAAC,MAAM,GAAG,YAAY,CAAE,SAAQ,YAAY,CAAC,MAAM,CAAE,YAAW,MAAM,CAAC,MAAM,CAAC,EAAE,aAAa;IAC5H,OAAO,EAAE,OAAO,CAAA;IACvB;;OAEG;IACI,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACnC;;OAEG;IACI,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACjC;;OAEG;IACI,KAAK,EAAE,OAAO,CAAC,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ED
@@ -92,9 +92,13 @@ export class PubSubBaseProtocol extends EventEmitter {
92
92
  * On an inbound stream opened
93
93
  */
94
94
  _onIncomingStream(data) {
95
- const { protocol, stream, connection } = data;
95
+ const { stream, connection } = data;
96
96
  const peerId = connection.remotePeer;
97
- const peer = this.addPeer(peerId, protocol);
97
+ if (stream.stat.protocol == null) {
98
+ stream.abort(new Error('Stream was not multiplexed'));
99
+ return;
100
+ }
101
+ const peer = this.addPeer(peerId, stream.stat.protocol);
98
102
  const inboundStream = peer.attachInboundStream(stream);
99
103
  this.processMessages(peerId, inboundStream, peer)
100
104
  .catch(err => log(err));
@@ -106,8 +110,12 @@ export class PubSubBaseProtocol extends EventEmitter {
106
110
  log('connected %p', peerId);
107
111
  void Promise.resolve().then(async () => {
108
112
  try {
109
- const { stream, protocol } = await conn.newStream(this.multicodecs);
110
- const peer = this.addPeer(peerId, protocol);
113
+ const stream = await conn.newStream(this.multicodecs);
114
+ if (stream.stat.protocol == null) {
115
+ stream.abort(new Error('Stream was not multiplexed'));
116
+ return;
117
+ }
118
+ const peer = this.addPeer(peerId, stream.stat.protocol);
111
119
  await peer.attachOutboundStream(stream);
112
120
  }
113
121
  catch (err) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AACrE,OAAO,OAAO,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,KAAK,MAAM,SAAS,CAAA;AAC3B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACnC,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,SA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2
2
  "name": "@libp2p/pubsub",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "description": "libp2p pubsub base class",
5
5
  "license": "Apache-2.0 OR MIT",
6
6
  "homepage": "https://github.com/libp2p/js-libp2p-pubsub#readme",
@@ -172,13 +172,13 @@
172
172
  "release": "aegir release"
173
173
  },
174
174
  "dependencies": {
175
- "@libp2p/components": "^1.0.0",
175
+ "@libp2p/components": "^2.0.0",
176
176
  "@libp2p/crypto": "^1.0.0",
177
177
  "@libp2p/interfaces": "^3.0.2",
178
- "@libp2p/logger": "^1.1.0",
178
+ "@libp2p/logger": "^2.0.0",
179
179
  "@libp2p/peer-collections": "^1.0.0",
180
180
  "@libp2p/peer-id": "^1.1.0",
181
- "@libp2p/topology": "^2.0.0",
181
+ "@libp2p/topology": "^3.0.0",
182
182
  "@multiformats/multiaddr": "^10.2.0",
183
183
  "abortable-iterator": "^4.0.2",
184
184
  "err-code": "^3.0.1",
@@ -191,10 +191,10 @@
191
191
  "uint8arrays": "^3.0.0"
192
192
  },
193
193
  "devDependencies": {
194
- "@libp2p/interface-connection": "^1.0.1",
194
+ "@libp2p/interface-connection": "^2.0.0",
195
195
  "@libp2p/interface-peer-id": "^1.0.2",
196
196
  "@libp2p/interface-pubsub": "^1.0.1",
197
- "@libp2p/interface-registrar": "^1.0.0",
197
+ "@libp2p/interface-registrar": "^2.0.0",
198
198
  "@libp2p/peer-id-factory": "^1.0.0",
199
199
  "aegir": "^37.2.0",
200
200
  "delay": "^5.0.0",
package/src/index.ts CHANGED
@@ -165,9 +165,15 @@ export abstract class PubSubBaseProtocol<Events = PubSubEvents> extends EventEmi
165
165
  * On an inbound stream opened
166
166
  */
167
167
  protected _onIncomingStream (data: IncomingStreamData) {
168
- const { protocol, stream, connection } = data
168
+ const { stream, connection } = data
169
169
  const peerId = connection.remotePeer
170
- const peer = this.addPeer(peerId, protocol)
170
+
171
+ if (stream.stat.protocol == null) {
172
+ stream.abort(new Error('Stream was not multiplexed'))
173
+ return
174
+ }
175
+
176
+ const peer = this.addPeer(peerId, stream.stat.protocol)
171
177
  const inboundStream = peer.attachInboundStream(stream)
172
178
 
173
179
  this.processMessages(peerId, inboundStream, peer)
@@ -182,8 +188,14 @@ export abstract class PubSubBaseProtocol<Events = PubSubEvents> extends EventEmi
182
188
 
183
189
  void Promise.resolve().then(async () => {
184
190
  try {
185
- const { stream, protocol } = await conn.newStream(this.multicodecs)
186
- const peer = this.addPeer(peerId, protocol)
191
+ const stream = await conn.newStream(this.multicodecs)
192
+
193
+ if (stream.stat.protocol == null) {
194
+ stream.abort(new Error('Stream was not multiplexed'))
195
+ return
196
+ }
197
+
198
+ const peer = this.addPeer(peerId, stream.stat.protocol)
187
199
  await peer.attachOutboundStream(stream)
188
200
  } catch (err: any) {
189
201
  log.error(err)