@fireproof/core 0.8.0-dev.3 → 0.8.0-dev.4
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 +7 -3
- package/dist/src/fireproof.js.map +1 -1
- package/dist/src/fireproof.mjs +7 -3
- package/dist/src/fireproof.mjs.map +1 -1
- package/dist/storage/base.js +4 -1
- package/dist/storage/browser.js +2 -2
- package/dist/storage/filesystem.js +1 -1
- package/dist/storage/rest.js +1 -1
- package/package.json +1 -1
- package/src/storage/base.js +4 -0
- package/src/storage/browser.js +2 -2
- package/src/storage/filesystem.js +1 -1
- package/src/storage/rest.js +1 -1
package/dist/src/fireproof.js
CHANGED
@@ -37177,6 +37177,7 @@ const blockOpts$1 = { cache: nocache, chunker, codec: codec$1, hasher: sha256$3,
|
|
37177
37177
|
const NO_ENCRYPT = typeof process !== 'undefined' && !!process.env?.NO_ENCRYPT;
|
37178
37178
|
|
37179
37179
|
let Base$1 = class Base {
|
37180
|
+
static format = '0.8'
|
37180
37181
|
lastCar = null
|
37181
37182
|
carLog = []
|
37182
37183
|
keyMaterial = null
|
@@ -37293,6 +37294,9 @@ let Base$1 = class Base {
|
|
37293
37294
|
header.key && this.setKeyMaterial(header.key);
|
37294
37295
|
// this.setCarCidMapCarCid(header.car) // instead we should just extract the list of cars from the car
|
37295
37296
|
const carHeader = await this.readHeaderCar(header.car);
|
37297
|
+
|
37298
|
+
// console.log('carHeader', this.name, carHeader)
|
37299
|
+
|
37296
37300
|
this.carLog = carHeader.cars || [];
|
37297
37301
|
// console.log('stored carHeader', this.name, this.config.type, this.carLog)
|
37298
37302
|
|
@@ -37607,7 +37611,7 @@ let Base$1 = class Base {
|
|
37607
37611
|
};
|
37608
37612
|
|
37609
37613
|
const defaultConfig$1 = {
|
37610
|
-
headerKeyPrefix: 'fp.'
|
37614
|
+
headerKeyPrefix: 'fp.' + Base$1.format
|
37611
37615
|
};
|
37612
37616
|
|
37613
37617
|
/* global localStorage */
|
@@ -37619,7 +37623,7 @@ class Browser extends Base$1 {
|
|
37619
37623
|
|
37620
37624
|
withDB = async dbWorkFun => {
|
37621
37625
|
if (!this.idb) {
|
37622
|
-
this.idb = await openDB(`fp.${this.keyId}.${this.name}.valet`, 3, {
|
37626
|
+
this.idb = await openDB(`fp.${Base$1.format}.${this.keyId}.${this.name}.valet`, 3, {
|
37623
37627
|
upgrade (db, oldVersion, newVersion, transaction) {
|
37624
37628
|
if (oldVersion < 1) {
|
37625
37629
|
db.createObjectStore('cars');
|
@@ -38237,7 +38241,7 @@ var browserPonyfill = {
|
|
38237
38241
|
var fetch$2 = /*@__PURE__*/getDefaultExportFromCjs(browserPonyfillExports);
|
38238
38242
|
|
38239
38243
|
const defaultConfig = {
|
38240
|
-
url: 'http://localhost:4000'
|
38244
|
+
url: 'http://localhost:4000/v' + Base$1.format
|
38241
38245
|
};
|
38242
38246
|
|
38243
38247
|
class Rest extends Base$1 {
|