Skip to content

Commit cf627a7

Browse files
committed
dependency update: update existing packages to latest versions
ipfs: fix init in brave, update to latest ipfs-http-client api
1 parent b3c84ad commit cf627a7

File tree

8 files changed

+909
-1045
lines changed

8 files changed

+909
-1045
lines changed

package.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,14 @@
1212
"browsertrix-behaviors": "^0.2.3",
1313
"btoa": "^1.2.1",
1414
"bulma": "^0.9.3",
15-
"flexsearch": "^0.6.32",
16-
"hash-wasm": "^4.4.1",
17-
"http-status-codes": "^1.4.0",
18-
"ipfs-core": "^0.10.5",
19-
"ipfs-http-client": "^49.0.2",
15+
"hash-wasm": "^4.9.0",
16+
"http-status-codes": "^2.1.4",
17+
"ipfs-core": "^0.10.6",
18+
"ipfs-http-client": "^52.0.3",
2019
"jszip": "^3.7.0",
2120
"keyword-mark-element": "^0.1.2",
22-
"lodash": "^4.17.20",
23-
"node-fetch": "^2.6.1",
24-
"pretty-bytes": "^5.3.0",
21+
"node-fetch": "^3.0.0",
22+
"pretty-bytes": "^5.6.0",
2523
"replaywebpage": "^1.5.1",
2624
"uuid": "^8.3.2",
2725
"warcio": "^1.4.7"

src/ext/ipfs.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ class ExtIPFSClient extends IPFSClient
3737
async _initHttpClient() {
3838
if (!this.localApiUrl) {
3939
if (navigator.brave && await navigator.brave.isBrave()) {
40-
// wait up to 30 seconds for ipfs node to boot
41-
this.localApiUrl = await detectLocalIPFS([45001, 45002, 45003, 45004, 45005], 30);
40+
if (chrome.ipfs && await new Promise(resolve => chrome.ipfs.getIPFSEnabled(result => resolve(result)))) {
41+
// wait up to 30 seconds for ipfs node to boot
42+
this.localApiUrl = await detectLocalIPFS([45001, 45002, 45003, 45004, 45005], 30);
43+
}
4244
}
4345
}
4446

@@ -70,7 +72,7 @@ class ExtIPFSClient extends IPFSClient
7072

7173
localStorage.setItem("ipfsLocalURL", this.localApiUrl ? this.localApiUrl : "");
7274

73-
const ipfs = ipfsHttpClient(this.localApiUrl);
75+
const ipfs = ipfsHttpClient.create(this.localApiUrl);
7476
this.customPreload = false;
7577
this.sharedNode = true;
7678
return ipfs;

wr-ext/bg.js

Lines changed: 12 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wr-ext/ipfs-core.min.js

Lines changed: 33 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wr-ext/popup.js

Lines changed: 28 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wr-ext/replay/sw.js

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wr-ext/replay/ui.js

Lines changed: 40 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

yarn.lock

Lines changed: 770 additions & 895 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)