@fireproof/core 0.20.2-dev-preview-3 → 0.20.3-dev-preview-1
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.cjs +9 -7
- package/index.cjs.map +1 -1
- package/index.js +9 -7
- package/index.js.map +1 -1
- package/metafile-cjs.json +1 -1
- package/metafile-esm.json +1 -1
- package/package.json +1 -1
- package/react/index.cjs +13 -26
- package/react/index.cjs.map +1 -1
- package/react/index.js +13 -26
- package/react/index.js.map +1 -1
- package/react/metafile-cjs.json +1 -1
- package/react/metafile-esm.json +1 -1
- package/tests/react/use-all-docs.test.tsx +0 -62
- package/tests/react/use-fireproof.test.tsx +0 -89
package/index.js
CHANGED
@@ -2085,12 +2085,14 @@ var DatabaseImpl = class {
|
|
2085
2085
|
if (!id) throw this.logger.Error().Str("db", this.name).Msg(`Doc id is required`).AsError();
|
2086
2086
|
await this.ready();
|
2087
2087
|
this.logger.Debug().Str("id", id).Msg("get");
|
2088
|
-
|
2089
|
-
|
2090
|
-
|
2091
|
-
|
2092
|
-
|
2093
|
-
|
2088
|
+
try {
|
2089
|
+
const got = await this.ledger.crdt.get(id);
|
2090
|
+
if (!got) throw new NotFoundError(`Not found: ${id}`);
|
2091
|
+
const { doc } = got;
|
2092
|
+
return { ...doc, _id: id };
|
2093
|
+
} catch (e) {
|
2094
|
+
throw new NotFoundError(`Not found: ${id} - ${e instanceof Error ? e.message : String(e)}`);
|
2095
|
+
}
|
2094
2096
|
}
|
2095
2097
|
async put(doc) {
|
2096
2098
|
await this.ready();
|
@@ -7218,7 +7220,7 @@ function buildResDelWAL(msgCtx, req, ctx) {
|
|
7218
7220
|
|
7219
7221
|
// src/version.ts
|
7220
7222
|
var PACKAGE_VERSION = Object.keys({
|
7221
|
-
"0.20.
|
7223
|
+
"0.20.3-dev-preview-1": "xxxx"
|
7222
7224
|
})[0];
|
7223
7225
|
export {
|
7224
7226
|
CRDTImpl,
|