@leofcoin/peernet 0.13.1 → 0.13.2

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.
@@ -355,7 +355,7 @@ message PeernetFileLink {
355
355
 
356
356
  message PeernetFile {
357
357
  required string path = 1;
358
- optional string content = 2;
358
+ optional bytes content = 2;
359
359
  repeated PeernetFileLink links = 3;
360
360
  }
361
361
  `);
@@ -597,7 +597,7 @@ class Client {
597
597
  this.starsConfig = stars
598
598
  // reconnectJob()
599
599
 
600
- if (!globalThis.RTCPeerConnection) globalThis.wrtc = await __webpack_require__.e(/* import() | wrtc */ 228).then(__webpack_require__.t.bind(__webpack_require__, 9326, 19))
600
+ if (!globalThis.RTCPeerConnection) globalThis.wrtc = await __webpack_require__.e(/* import() | wrtc */ 228).then(__webpack_require__.t.bind(__webpack_require__, 9347, 19))
601
601
  else globalThis.wrtc = {
602
602
  RTCPeerConnection,
603
603
  RTCSessionDescription,
@@ -1,6 +1,6 @@
1
1
  (self["webpackChunk_leofcoin_peernet"] = self["webpackChunk_leofcoin_peernet"] || []).push([[228],{
2
2
 
3
- /***/ 9326:
3
+ /***/ 9347:
4
4
  /***/ (function(__unused_webpack_module, exports) {
5
5
 
6
6
 
@@ -156,7 +156,7 @@ message PeernetFileLink {
156
156
 
157
157
  message PeernetFile {
158
158
  required string path = 1;
159
- optional string content = 2;
159
+ optional bytes content = 2;
160
160
  repeated PeernetFileLink links = 3;
161
161
  }
162
162
  `;
@@ -505,7 +505,7 @@ class Peernet {
505
505
  ChatMessage,
506
506
  PeernetFile
507
507
  // FolderMessageResponse
508
- } = await Promise.resolve().then(function () { return require(/* webpackChunkName: "messages" */ './messages-f46a3ca1.js'); });
508
+ } = await Promise.resolve().then(function () { return require(/* webpackChunkName: "messages" */ './messages-7c05afbc.js'); });
509
509
 
510
510
  /**
511
511
  * proto Object containing protos
@@ -275,7 +275,7 @@ message PeernetFileLink {
275
275
 
276
276
  message PeernetFile {
277
277
  required string path = 1;
278
- optional string content = 2;
278
+ optional bytes content = 2;
279
279
  repeated PeernetFileLink links = 3;
280
280
  }
281
281
  `;
@@ -478,7 +478,7 @@ class Peernet {
478
478
  ChatMessage,
479
479
  PeernetFile
480
480
  // FolderMessageResponse
481
- } = await import(/* webpackChunkName: "messages" */ './messages-bce1b91d.js');
481
+ } = await import(/* webpackChunkName: "messages" */ './messages-d7278178.js');
482
482
 
483
483
  /**
484
484
  * proto Object containing protos
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/peernet",
3
- "version": "0.13.1",
3
+ "version": "0.13.2",
4
4
  "description": "",
5
5
  "main": "dist/commonjs/peernet.js",
6
6
  "module": "src/module/peernet.js",
@@ -8,7 +8,7 @@ message PeernetFileLink {
8
8
 
9
9
  message PeernetFile {
10
10
  required string path = 1;
11
- optional string content = 2;
11
+ optional bytes content = 2;
12
12
  repeated PeernetFileLink links = 3;
13
13
  }
14
14
  `
package/test.js CHANGED
@@ -6,10 +6,10 @@ const Client = require('./dist/commonjs/peernet.js');
6
6
 
7
7
  peernet.addFolder([{
8
8
  path: 'assets/asset.png',
9
- content: 'png'
9
+ content: Buffer.from('png')
10
10
  }, {
11
11
  path: 'index.html',
12
- content: 'html'
12
+ content: Buffer.from('html')
13
13
  }]).then(hash => peernet.ls(hash).then(paths => peernet.cat(paths[0].hash).then(content => console.log(content))))
14
14
 
15
15
  pubsub.subscribe('peer:connected', async peer => {