@cero-base/cero 1.18.0 → 1.18.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.
- package/package.json +2 -2
- package/src/index.js +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cero-base/cero",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.2",
|
|
4
4
|
"description": "The ideal p2p API — everything is a handle, handles contain refs, refs contain rows.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"test:node": "ls test/*.test.js | xargs -P1 -n1 brittle-node"
|
|
96
96
|
},
|
|
97
97
|
"dependencies": {
|
|
98
|
-
"@cero-base/core": "^1.18.
|
|
98
|
+
"@cero-base/core": "^1.18.2",
|
|
99
99
|
"b4a": "^1.8.1",
|
|
100
100
|
"bare-abort-controller": "^1.1.2",
|
|
101
101
|
"bare-crypto": "^1.15.3",
|
package/src/index.js
CHANGED
|
@@ -185,7 +185,10 @@ export async function cero(dir, spec, opts = {}) {
|
|
|
185
185
|
await genesis.close()
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
|
-
|
|
188
|
+
// decided by the stored writer and the caller's intent, never by the local
|
|
189
|
+
// core's length: a same-identity device opens on the genesis core, which
|
|
190
|
+
// fills with the first device's blocks as soon as a peer connects
|
|
191
|
+
if (!writer && (!opts.key || opts.recovery)) {
|
|
189
192
|
const result = await me.bootstrap({
|
|
190
193
|
name: opts.name || null,
|
|
191
194
|
isMobile: opts.isMobile === true,
|