@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.cjs
CHANGED
@@ -2138,12 +2138,14 @@ var DatabaseImpl = class {
|
|
2138
2138
|
if (!id) throw this.logger.Error().Str("db", this.name).Msg(`Doc id is required`).AsError();
|
2139
2139
|
await this.ready();
|
2140
2140
|
this.logger.Debug().Str("id", id).Msg("get");
|
2141
|
-
|
2142
|
-
|
2143
|
-
|
2144
|
-
|
2145
|
-
|
2146
|
-
|
2141
|
+
try {
|
2142
|
+
const got = await this.ledger.crdt.get(id);
|
2143
|
+
if (!got) throw new NotFoundError(`Not found: ${id}`);
|
2144
|
+
const { doc } = got;
|
2145
|
+
return { ...doc, _id: id };
|
2146
|
+
} catch (e) {
|
2147
|
+
throw new NotFoundError(`Not found: ${id} - ${e instanceof Error ? e.message : String(e)}`);
|
2148
|
+
}
|
2147
2149
|
}
|
2148
2150
|
async put(doc) {
|
2149
2151
|
await this.ready();
|
@@ -7263,6 +7265,6 @@ function buildResDelWAL(msgCtx, req, ctx) {
|
|
7263
7265
|
|
7264
7266
|
// src/version.ts
|
7265
7267
|
var PACKAGE_VERSION = Object.keys({
|
7266
|
-
"0.20.
|
7268
|
+
"0.20.3-dev-preview-1": "xxxx"
|
7267
7269
|
})[0];
|
7268
7270
|
//# sourceMappingURL=index.cjs.map
|