@leofcoin/peernet 1.2.28 → 1.2.29
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/exports/browser/{browser-CWeoyGUw.js → browser-D-r0O9Qn.js} +1 -1
- package/exports/browser/browser-_hiyXwPp.js +147 -0
- package/exports/browser/{client-B-jyclOB.js → client-BVhUamQG.js} +4 -4
- package/exports/browser/client-DDC8C510.js +2224 -0
- package/exports/browser/identity-ChyyZSve.js +8397 -0
- package/exports/browser/index-BD0Anx7_.js +37 -0
- package/exports/browser/{messages-FMRAS8QX.js → messages-DH0tgNM9.js} +1 -1
- package/exports/browser/messages-UKnuelZ7.js +207 -0
- package/exports/browser/{peernet-CRbrmeU3.js → peernet-Ca1iM2tN.js} +2 -2
- package/exports/browser/peernet-r_9IyzTe.js +9336 -0
- package/exports/browser/peernet.js +1 -1
- package/exports/store.js +3 -0
- package/package.json +3 -2
- package/rollup.config.js +2 -2
- package/test-output.log +84 -0
package/exports/store.js
CHANGED
|
@@ -102,6 +102,9 @@ class Store {
|
|
|
102
102
|
this.root = await init(root, homedir);
|
|
103
103
|
this.version = version;
|
|
104
104
|
this.db = new ClassicLevel(join(this.root, this.name), { valueEncoding: 'view' });
|
|
105
|
+
if (typeof this.db.open === 'function') {
|
|
106
|
+
await this.db.open();
|
|
107
|
+
}
|
|
105
108
|
}
|
|
106
109
|
toKeyPath(key) {
|
|
107
110
|
if (!key.isKeyPath())
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leofcoin/peernet",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.29",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"@leofcoin/multi-wallet": "^3.1.8",
|
|
113
113
|
"@leofcoin/storage": "^3.5.38",
|
|
114
114
|
"@mapbox/node-pre-gyp": "^2.0.3",
|
|
115
|
-
"@netpeer/swarm": "^0.9.
|
|
115
|
+
"@netpeer/swarm": "^0.9.12",
|
|
116
116
|
"@vandeurenglenn/base58": "^1.1.9",
|
|
117
117
|
"@vandeurenglenn/debug": "^1.4.0",
|
|
118
118
|
"@vandeurenglenn/little-pubsub": "^1.5.2",
|
|
@@ -129,6 +129,7 @@
|
|
|
129
129
|
"@rollup/plugin-wasm": "^6.2.2",
|
|
130
130
|
"@types/node": "^25.9.1",
|
|
131
131
|
"@types/qrcode": "^1.5.6",
|
|
132
|
+
"rimraf": "^5.0.10",
|
|
132
133
|
"rollup": "^4.60.4",
|
|
133
134
|
"tslib": "^2.8.1",
|
|
134
135
|
"typescript": "^6.0.2"
|
package/rollup.config.js
CHANGED
|
@@ -4,7 +4,7 @@ import json from '@rollup/plugin-json'
|
|
|
4
4
|
import wasm from '@rollup/plugin-wasm'
|
|
5
5
|
import { readdir, readFile, writeFile } from 'node:fs/promises'
|
|
6
6
|
import { extname, relative, sep } from 'node:path'
|
|
7
|
-
import
|
|
7
|
+
import { rimrafSync } from 'rimraf'
|
|
8
8
|
import typescript from '@rollup/plugin-typescript'
|
|
9
9
|
|
|
10
10
|
const toPosix = (value) => value.split(sep).join('/')
|
|
@@ -82,7 +82,7 @@ const runtimeFirstExports = ({ exportsDir = 'exports', declarationsDir = 'export
|
|
|
82
82
|
}
|
|
83
83
|
})
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
rimrafSync('./exports/**')
|
|
86
86
|
|
|
87
87
|
export default [
|
|
88
88
|
{
|
package/test-output.log
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
✔ initializes with provided options (0.407125ms)
|
|
2
|
+
✔ exposes identity instance (0.051667ms)
|
|
3
|
+
✔ has a DHT instance (0.04425ms)
|
|
4
|
+
✔ returns peers and connections safely (0.267542ms)
|
|
5
|
+
✔ provides callable helpers (0.048958ms)
|
|
6
|
+
✔ pubsub subscribe registers callback (10.395584ms)
|
|
7
|
+
✔ addProto registers protocol (0.160417ms)
|
|
8
|
+
✔ addProto does not overwrite existing protocol (0.057709ms)
|
|
9
|
+
✔ addCodec is callable (0.063084ms)
|
|
10
|
+
✔ selectAccount delegates to identity (0.068584ms)
|
|
11
|
+
✔ identity has loaded account data (0.241875ms)
|
|
12
|
+
✔ peerId matches identity id (0.031375ms)
|
|
13
|
+
✔ data store operations (0.030125ms)
|
|
14
|
+
✔ get attempts to retrieve from store (0.035667ms)
|
|
15
|
+
✔ message object provides get/put/has (0.053917ms)
|
|
16
|
+
✔ data object provides get/put/has (0.045833ms)
|
|
17
|
+
✔ block object provides get/put/has (0.067375ms)
|
|
18
|
+
✔ transaction object provides get/put/has (0.042333ms)
|
|
19
|
+
✔ folder object provides get/put/has (0.034167ms)
|
|
20
|
+
✔ Buffer property is available (0.024417ms)
|
|
21
|
+
✔ handleData is callable (0.017709ms)
|
|
22
|
+
✔ handleDHT is callable (0.016167ms)
|
|
23
|
+
✔ handleRequest is callable (0.016417ms)
|
|
24
|
+
✔ walk is callable (0.015459ms)
|
|
25
|
+
✔ providersFor is callable (0.015583ms)
|
|
26
|
+
✔ addRequestHandler is callable (0.015375ms)
|
|
27
|
+
✔ sendMessage is callable (0.01625ms)
|
|
28
|
+
✔ start method exists (0.02675ms)
|
|
29
|
+
✔ default stores are initialized (0.0275ms)
|
|
30
|
+
✔ identity has all expected methods (0.020084ms)
|
|
31
|
+
✔ identity wallet is loaded (0.019333ms)
|
|
32
|
+
✔ selected account is set (0.016208ms)
|
|
33
|
+
✔ error handling methods exist (0.017083ms)
|
|
34
|
+
DEBUG_HANDLE_DATA: entering in-memory branch { hash: 'BA43QACTNQLBH6SW7NO7ZQ63I3USRUBTD5DOWLEUFJGMY6JN2BSUAES54X' }
|
|
35
|
+
DEBUG_HANDLE_DATA: got from _inMemoryBroadcasts {
|
|
36
|
+
type: 'object',
|
|
37
|
+
isUint8Array: true,
|
|
38
|
+
length: 34,
|
|
39
|
+
slice: [
|
|
40
|
+
230, 224, 1, 5, 47,
|
|
41
|
+
116, 101, 115, 116, 21,
|
|
42
|
+
104, 101, 108, 108, 111,
|
|
43
|
+
32
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
✔ in-memory broadcast and handleData returns correct data (4.52275ms)
|
|
47
|
+
DEBUG_HANDLE_DATA: entering in-memory branch { hash: 'BA43QACYLVOY2HRRGV4NOUDQ3GWPQ7YZVBBM5DOKGZIY4UOYMS3K3JSCVV' }
|
|
48
|
+
DEBUG_HANDLE_DATA: got from _inMemoryBroadcasts {
|
|
49
|
+
type: 'object',
|
|
50
|
+
isUint8Array: true,
|
|
51
|
+
length: 1048599,
|
|
52
|
+
slice: [
|
|
53
|
+
230, 224, 1, 13, 47, 108,
|
|
54
|
+
97, 114, 103, 101, 45, 98,
|
|
55
|
+
105, 110, 97, 114
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
DEBUG_TEST receivedBuffer {
|
|
59
|
+
type: 'object',
|
|
60
|
+
isUint8Array: true,
|
|
61
|
+
length: 1048576,
|
|
62
|
+
slice: [
|
|
63
|
+
0, 1, 2, 3, 4, 5,
|
|
64
|
+
6, 7, 8, 9, 10, 11,
|
|
65
|
+
12, 13, 14, 15
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
DEBUG_TEST originalBuffer {
|
|
69
|
+
length: 1048576,
|
|
70
|
+
slice: [
|
|
71
|
+
0, 1, 2, 3, 4, 5,
|
|
72
|
+
6, 7, 8, 9, 10, 11,
|
|
73
|
+
12, 13, 14, 15
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
✔ in-memory broadcast and handleData supports large binary data (163.195292ms)
|
|
77
|
+
ℹ tests 35
|
|
78
|
+
ℹ suites 0
|
|
79
|
+
ℹ pass 35
|
|
80
|
+
ℹ fail 0
|
|
81
|
+
ℹ cancelled 0
|
|
82
|
+
ℹ skipped 0
|
|
83
|
+
ℹ todo 0
|
|
84
|
+
ℹ duration_ms 366.132458
|