@noy-db/by-peer 0.7.0-pre.10 → 0.7.0-pre.12
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/README.md +4 -2
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ Classic cloud sync routes every envelope through a central store. `@noy-db/by-pe
|
|
|
20
20
|
|
|
21
21
|
```ts
|
|
22
22
|
import { createNoydb } from '@noy-db/hub'
|
|
23
|
-
import {
|
|
23
|
+
import { toBrowserIdb } from '@noy-db/to-browser-idb'
|
|
24
24
|
import { peerStore, createOffer, acceptOffer } from '@noy-db/by-peer'
|
|
25
25
|
|
|
26
26
|
// Peer A — initiator
|
|
@@ -30,7 +30,9 @@ await initiator.accept(await receiveAnswer())
|
|
|
30
30
|
const channel = await initiator.channel
|
|
31
31
|
|
|
32
32
|
const db = await createNoydb({
|
|
33
|
-
store:
|
|
33
|
+
store: toBrowserIdb(),
|
|
34
|
+
user: 'alice',
|
|
35
|
+
secret: userSecret,
|
|
34
36
|
syncStrategy: withSync(), // required — sync is opt-in
|
|
35
37
|
sync: { store: peerStore({ channel, token: inviteToken }), role: 'sync-peer' },
|
|
36
38
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noy-db/by-peer",
|
|
3
|
-
"version": "0.7.0-pre.
|
|
3
|
+
"version": "0.7.0-pre.12",
|
|
4
4
|
"description": "WebRTC peer-to-peer transport for noy-db — direct browser-to-browser channel with signaling-agnostic handshake",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "vLannaAi <vicio@lanna.ai>",
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"node": ">=22.0.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@noy-db/hub": "^0.7.0-pre.
|
|
35
|
+
"@noy-db/hub": "^0.7.0-pre.12"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@noy-db/hub": "0.7.0-pre.
|
|
39
|
-
"@noy-db/
|
|
40
|
-
"@noy-db/
|
|
38
|
+
"@noy-db/hub": "0.7.0-pre.12",
|
|
39
|
+
"@noy-db/test-mesh-conformance": "0.7.0-pre.12",
|
|
40
|
+
"@noy-db/to-memory": "0.7.0-pre.12"
|
|
41
41
|
},
|
|
42
42
|
"keywords": [
|
|
43
43
|
"noy-db",
|