@fireproof/core 0.8.0-dev.3 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -37175,6 +37175,7 @@ const blockOpts$1 = { cache: nocache, chunker, codec: codec$1, hasher: sha256$3,
37175
37175
  const NO_ENCRYPT = typeof process !== 'undefined' && !!process.env?.NO_ENCRYPT;
37176
37176
 
37177
37177
  let Base$1 = class Base {
37178
+ static format = '0.8'
37178
37179
  lastCar = null
37179
37180
  carLog = []
37180
37181
  keyMaterial = null
@@ -37291,6 +37292,9 @@ let Base$1 = class Base {
37291
37292
  header.key && this.setKeyMaterial(header.key);
37292
37293
  // this.setCarCidMapCarCid(header.car) // instead we should just extract the list of cars from the car
37293
37294
  const carHeader = await this.readHeaderCar(header.car);
37295
+
37296
+ // console.log('carHeader', this.name, carHeader)
37297
+
37294
37298
  this.carLog = carHeader.cars || [];
37295
37299
  // console.log('stored carHeader', this.name, this.config.type, this.carLog)
37296
37300
 
@@ -37605,7 +37609,7 @@ let Base$1 = class Base {
37605
37609
  };
37606
37610
 
37607
37611
  const defaultConfig$1 = {
37608
- headerKeyPrefix: 'fp.'
37612
+ headerKeyPrefix: 'fp.' + Base$1.format
37609
37613
  };
37610
37614
 
37611
37615
  /* global localStorage */
@@ -37617,7 +37621,7 @@ class Browser extends Base$1 {
37617
37621
 
37618
37622
  withDB = async dbWorkFun => {
37619
37623
  if (!this.idb) {
37620
- this.idb = await openDB(`fp.${this.keyId}.${this.name}.valet`, 3, {
37624
+ this.idb = await openDB(`fp.${Base$1.format}.${this.keyId}.${this.name}.valet`, 3, {
37621
37625
  upgrade (db, oldVersion, newVersion, transaction) {
37622
37626
  if (oldVersion < 1) {
37623
37627
  db.createObjectStore('cars');
@@ -38235,7 +38239,7 @@ var browserPonyfill = {
38235
38239
  var fetch$2 = /*@__PURE__*/getDefaultExportFromCjs(browserPonyfillExports);
38236
38240
 
38237
38241
  const defaultConfig = {
38238
- url: 'http://localhost:4000'
38242
+ url: 'http://localhost:4000/v' + Base$1.format
38239
38243
  };
38240
38244
 
38241
38245
  class Rest extends Base$1 {