braid-blob 0.0.81 → 0.0.83
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/index.js +6 -2
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -443,9 +443,13 @@ function create_braid_blob() {
|
|
|
443
443
|
})
|
|
444
444
|
}
|
|
445
445
|
|
|
446
|
-
|
|
446
|
+
// list() accepts an optional callback to process keys atomically,
|
|
447
|
+
// avoiding races where the set of keys changes between await and processing
|
|
448
|
+
braid_blob.list = async (cb) => {
|
|
447
449
|
await braid_blob.init()
|
|
448
|
-
|
|
450
|
+
var keys = braid_blob.meta_db.prepare(`SELECT key FROM meta`).all().map(row => row.key)
|
|
451
|
+
if (cb) cb(keys)
|
|
452
|
+
return keys
|
|
449
453
|
}
|
|
450
454
|
|
|
451
455
|
braid_blob.init = async () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "braid-blob",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.83",
|
|
4
4
|
"description": "Library for collaborative blobs over http using braid.",
|
|
5
5
|
"author": "Braid Working Group",
|
|
6
6
|
"repository": "braid-org/braid-blob",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"test:browser": "node test/test.js --browser"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"
|
|
19
|
-
"
|
|
18
|
+
"better-sqlite3": "^11.7.0",
|
|
19
|
+
"braid-http": "~1.3.89"
|
|
20
20
|
}
|
|
21
21
|
}
|