@fireproof/core 0.7.0-alpha.5 → 0.7.0-alpha.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -39,7 +39,7 @@ export class Base {
39
39
  // currently we don't do that, because we only use
40
40
  // the config for first run, and then we use the headers
41
41
  // once they exist
42
- this.ready = this.getHeaders().then((blocksReady) => {
42
+ this.ready = this.getHeaders().then(blocksReady => {
43
43
  // console.log('blocksReady base', this.name, blocksReady)
44
44
  return blocksReady;
45
45
  });
@@ -243,8 +243,10 @@ export class Base {
243
243
  };
244
244
  const { blocks } = await blocksFromEncryptedCarBlock(roots[0], readerGetWithCodec, this.keyMaterial);
245
245
  const rootBlock = blocks[blocks.length - 1];
246
- const blocksIterable = function* () { for (const block of blocks)
247
- yield block; };
246
+ const blocksIterable = function* () {
247
+ for (const block of blocks)
248
+ yield block;
249
+ };
248
250
  const gat = async (dataCID) => {
249
251
  dataCID = dataCID.toString();
250
252
  return blocks.find(b => b.cid.toString() === dataCID);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fireproof/core",
3
- "version": "0.7.0-alpha.5",
3
+ "version": "0.7.0-alpha.6",
4
4
  "description": "Live data for React, accelerated by proofs, powered by IPFS",
5
5
  "main": "dist/src/fireproof.js",
6
6
  "module": "dist/src/fireproof.mjs",
@@ -49,7 +49,6 @@
49
49
  "cli-color": "^2.0.3",
50
50
  "crypto-browserify": "^3.12.0",
51
51
  "encrypted-block": "^0.0.3",
52
- "filer": "^1.4.1",
53
52
  "idb": "^7.1.1",
54
53
  "ipld-hashmap": "^2.1.18",
55
54
  "multiformats": "^11.0.1",
@@ -81,8 +80,7 @@
81
80
  "standard": "^17.0.0",
82
81
  "typescript": "^5.0.2",
83
82
  "webpack": "^5.78.0",
84
- "webpack-cli": "^5.0.1",
85
- "webpack-node-externals": "^3.0.0"
83
+ "webpack-cli": "^5.0.1"
86
84
  },
87
85
  "mocha": {
88
86
  "require": [
package/src/loader.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Browser } from './storage/browser.js'
2
- import { Rest } from './storage/rest.js'
2
+ // import { Rest } from './storage/rest.js'
3
3
 
4
4
  export const Loader = {
5
5
  appropriate: (name, config = {}) => {
@@ -7,9 +7,9 @@ export const Loader = {
7
7
  return new config.StorageClass(name, config)
8
8
  }
9
9
 
10
- if (config.type === 'rest') {
11
- return new Rest(name, config)
12
- }
10
+ // if (config.type === 'rest') {
11
+ // return new Rest(name, config)
12
+ // }
13
13
 
14
14
  return new Browser(name, config)
15
15
  }
@@ -45,7 +45,7 @@ export class Base {
45
45
  // currently we don't do that, because we only use
46
46
  // the config for first run, and then we use the headers
47
47
  // once they exist
48
- this.ready = this.getHeaders().then((blocksReady) => {
48
+ this.ready = this.getHeaders().then(blocksReady => {
49
49
  // console.log('blocksReady base', this.name, blocksReady)
50
50
  return blocksReady
51
51
  })
@@ -258,7 +258,9 @@ export class Base {
258
258
  }
259
259
  const { blocks } = await blocksFromEncryptedCarBlock(roots[0], readerGetWithCodec, this.keyMaterial)
260
260
  const rootBlock = blocks[blocks.length - 1]
261
- const blocksIterable = function * () { for (const block of blocks) yield block }
261
+ const blocksIterable = function * () {
262
+ for (const block of blocks) yield block
263
+ }
262
264
 
263
265
  const gat = async dataCID => {
264
266
  dataCID = dataCID.toString()
@@ -295,7 +297,7 @@ export class Base {
295
297
  }
296
298
  }
297
299
 
298
- writeCars (cars) { }
300
+ writeCars (cars) {}
299
301
 
300
302
  async updateCarCidMap (carCid, cids) {
301
303
  // this hydrates the map if it has not been hydrated