@fireproof/core 0.5.20 → 0.5.22
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/dist/src/fireproof.js +1 -1
- package/dist/src/fireproof.js.map +1 -1
- package/dist/src/fireproof.mjs +1 -1
- package/dist/src/fireproof.mjs.map +1 -1
- package/dist/src/valet.js +1 -1
- package/package.json +2 -2
- package/src/valet.js +1 -1
package/dist/src/valet.js
CHANGED
@@ -151,7 +151,7 @@ export class Valet {
|
|
151
151
|
async getCarCIDForCID(cid) {
|
152
152
|
// make a car reader for this.valetRootCarCid
|
153
153
|
if (!this.valetRootCarCid)
|
154
|
-
return;
|
154
|
+
return { result: null };
|
155
155
|
let indexNode;
|
156
156
|
if (this.valetRoot) {
|
157
157
|
indexNode = this.valetRoot;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fireproof/core",
|
3
|
-
"version": "0.5.
|
3
|
+
"version": "0.5.22",
|
4
4
|
"description": "Live data for your React app, powered by IPFS",
|
5
5
|
"main": "dist/src/fireproof.js",
|
6
6
|
"module": "dist/src/fireproof.mjs",
|
@@ -36,7 +36,7 @@
|
|
36
36
|
"Mikeal Rogers"
|
37
37
|
],
|
38
38
|
"license": "Apache-2.0 OR MIT",
|
39
|
-
"gptdoc": "Fireproof/API/Usage: import { Fireproof,
|
39
|
+
"gptdoc": "Fireproof/API/Usage: import { Fireproof, Index } from '@fireproof/core'; const db = fireproof.storage('app-db-name'); const ok = await db.put({ any: 'json' }); const doc = await db.get(ok.id); await db.del(doc._id); const all = await db.allDocuments(); all.rows.map(({key, value}) => value); useEffect(()=> db.subscribe(updateReactStateFn), []); const index = new Index(db, (doc, map) => map(doc.any, {custom: Object.keys(doc)})); const result = await index.query({range : ['a', 'z']}); result.rows.map(({ key }) => key);",
|
40
40
|
"dependencies": {
|
41
41
|
"@ipld/car": "^5.1.0",
|
42
42
|
"@ipld/dag-cbor": "^9.0.0",
|
package/src/valet.js
CHANGED
@@ -164,7 +164,7 @@ export class Valet {
|
|
164
164
|
// todo memoize this
|
165
165
|
async getCarCIDForCID (cid) {
|
166
166
|
// make a car reader for this.valetRootCarCid
|
167
|
-
if (!this.valetRootCarCid) return
|
167
|
+
if (!this.valetRootCarCid) return { result: null }
|
168
168
|
|
169
169
|
let indexNode
|
170
170
|
if (this.valetRoot) {
|