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

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.6",
3
+ "version": "0.7.0-alpha.8",
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",
@@ -41,27 +41,21 @@
41
41
  "@ipld/car": "^5.1.0",
42
42
  "@ipld/dag-cbor": "^9.0.0",
43
43
  "@jsonlines/core": "^1.0.2",
44
- "@rollup/plugin-commonjs": "^24.0.1",
45
- "archy": "^1.0.0",
46
44
  "async": "^3.2.4",
47
- "car-transaction": "^1.0.1",
48
45
  "charwise": "^3.0.1",
49
- "cli-color": "^2.0.3",
46
+ "cross-fetch": "^3.1.6",
50
47
  "crypto-browserify": "^3.12.0",
51
- "encrypted-block": "^0.0.3",
48
+ "encrypted-block": "jchris/encrypted-block#102c55ac9354b3499c7c04ceecde10e055ecf89d",
52
49
  "idb": "^7.1.1",
53
50
  "ipld-hashmap": "^2.1.18",
54
51
  "multiformats": "^11.0.1",
55
- "node-fetch": "^3.3.1",
56
- "node-polyfill-webpack-plugin": "^2.0.1",
57
52
  "prolly-trees": "1.0.4",
58
53
  "randombytes": "^2.1.0",
59
- "rollup-plugin-commonjs": "^10.1.0",
60
- "sade": "^1.8.1",
61
54
  "simple-peer": "^9.11.1"
62
55
  },
63
56
  "devDependencies": {
64
57
  "@rollup/plugin-alias": "^5.0.0",
58
+ "@rollup/plugin-commonjs": "^24.0.1",
65
59
  "@rollup/plugin-json": "^6.0.0",
66
60
  "@rollup/plugin-node-resolve": "^15.0.2",
67
61
  "c8": "^7.12.0",
@@ -70,11 +64,11 @@
70
64
  "flexsearch": "^0.7.31",
71
65
  "mocha": "^10.2.0",
72
66
  "nanoid": "^4.0.0",
67
+ "node-polyfill-webpack-plugin": "^2.0.1",
73
68
  "rollup": "^3.20.2",
74
69
  "rollup-plugin-auto-external": "^2.0.0",
75
70
  "rollup-plugin-dts": "^5.3.0",
76
71
  "rollup-plugin-esbuild": "^5.0.0",
77
- "rollup-plugin-node-builtins": "^2.1.2",
78
72
  "rollup-plugin-polyfill-node": "^0.12.0",
79
73
  "rollup-plugin-visualizer": "^5.9.0",
80
74
  "standard": "^17.0.0",
@@ -117,7 +111,6 @@
117
111
  "files": [
118
112
  "src",
119
113
  "dist",
120
- "hooks",
121
114
  "README.md"
122
115
  ]
123
116
  }
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
  }
@@ -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 = {