@leofcoin/peernet 0.11.9 → 0.11.10

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.
@@ -84820,7 +84820,7 @@ class Peernet {
84820
84820
  this.bw.up += node.encoded.length
84821
84821
  }
84822
84822
  } else if (proto.name === 'peernet-ps' && peer.peerId !== this.id) {
84823
- globalSub.publish(proto.decoded.topic.toString(), proto.decoded.data.toString())
84823
+ globalSub.publish(new TextDecoder().decode(proto.decoded.topic), proto.decoded.data)
84824
84824
  }
84825
84825
  // }
84826
84826
  }
@@ -10,7 +10,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
10
10
  var PubSub__default = /*#__PURE__*/_interopDefaultLegacy(PubSub);
11
11
  var Koa__default = /*#__PURE__*/_interopDefaultLegacy(Koa);
12
12
 
13
- var version = "0.11.8";
13
+ var version = "0.11.9";
14
14
 
15
15
  var api$1 = {
16
16
  version: ({send}) => send({client: '@peernet/api/http', version}),
@@ -1638,7 +1638,7 @@ class Peernet {
1638
1638
  protocol: 'peernet-v0.1.0', host: '127.0.0.1', port: options.port
1639
1639
  });
1640
1640
  } else {
1641
- const http = await Promise.resolve().then(function () { return require('./http-63196be9.js'); });
1641
+ const http = await Promise.resolve().then(function () { return require('./http-e330b910.js'); });
1642
1642
  if (environment !== 'browser') http.default(options);
1643
1643
  }
1644
1644
 
@@ -1772,7 +1772,7 @@ class Peernet {
1772
1772
  this.bw.up += node.encoded.length;
1773
1773
  }
1774
1774
  } else if (proto.name === 'peernet-ps' && peer.peerId !== this.id) {
1775
- globalSub.publish(proto.decoded.topic.toString(), proto.decoded.data.toString());
1775
+ globalSub.publish(new TextDecoder().decode(proto.decoded.topic), proto.decoded.data);
1776
1776
  }
1777
1777
  // }
1778
1778
  }
@@ -2361,7 +2361,7 @@ class Peernet {
2361
2361
  this.bw.up += node.encoded.length;
2362
2362
  }
2363
2363
  } else if (proto.name === 'peernet-ps' && peer.peerId !== this.id) {
2364
- globalSub.publish(proto.decoded.topic.toString(), proto.decoded.data.toString());
2364
+ globalSub.publish(new TextDecoder().decode(proto.decoded.topic), proto.decoded.data);
2365
2365
  }
2366
2366
  // }
2367
2367
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/peernet",
3
- "version": "0.11.9",
3
+ "version": "0.11.10",
4
4
  "description": "",
5
5
  "main": "dist/commonjs/peernet.js",
6
6
  "module": "dist/module/peernet.js",
package/src/peernet.js CHANGED
@@ -310,7 +310,7 @@ export default class Peernet {
310
310
  this.bw.up += node.encoded.length
311
311
  }
312
312
  } else if (proto.name === 'peernet-ps' && peer.peerId !== this.id) {
313
- globalSub.publish(proto.decoded.topic.toString(), proto.decoded.data.toString())
313
+ globalSub.publish(new TextDecoder().decode(proto.decoded.topic), proto.decoded.data)
314
314
  }
315
315
  // }
316
316
  }