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

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.
@@ -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);
@@ -1,4 +1,4 @@
1
- import fetch from 'node-fetch';
1
+ import fetch from 'cross-fetch';
2
2
  import { Base } from './base.js';
3
3
  const defaultConfig = {
4
4
  url: 'http://localhost:4000'
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.7",
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",
@@ -47,13 +47,12 @@
47
47
  "car-transaction": "^1.0.1",
48
48
  "charwise": "^3.0.1",
49
49
  "cli-color": "^2.0.3",
50
+ "cross-fetch": "^3.1.6",
50
51
  "crypto-browserify": "^3.12.0",
51
52
  "encrypted-block": "^0.0.3",
52
- "filer": "^1.4.1",
53
53
  "idb": "^7.1.1",
54
54
  "ipld-hashmap": "^2.1.18",
55
55
  "multiformats": "^11.0.1",
56
- "node-fetch": "^3.3.1",
57
56
  "node-polyfill-webpack-plugin": "^2.0.1",
58
57
  "prolly-trees": "1.0.4",
59
58
  "randombytes": "^2.1.0",
@@ -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": [
@@ -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
@@ -1,4 +1,4 @@
1
- import fetch from 'node-fetch'
1
+ import fetch from 'cross-fetch'
2
2
  import { Base } from './base.js'
3
3
 
4
4
  const defaultConfig = {