Skip to content

Commit 21886a1

Browse files
committed
feat(brave): conditional and range requests
Switching to js-ipfs from ipfs/js-ipfs#1989 for next beta release
1 parent ff799ec commit 21886a1

File tree

3 files changed

+269
-44
lines changed

3 files changed

+269
-44
lines changed

add-on/src/lib/ipfs-client/embedded-chromesockets.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ exports.init = function init (opts) {
3333
if (!httpServer) {
3434
httpServer = startRawHttpServer(9091)
3535
}
36-
// TEST require('hapi') HTTP SERVER (same as in js-ipfs)
36+
// TEST require('@hapi/hapi') HTTP SERVER (same as in js-ipfs)
3737
if (!hapiServer) {
3838
hapiServer = startRawHapiServer(9092)
3939
}
@@ -172,7 +172,7 @@ function startRawHapiServer (port) {
172172
}
173173
const initHapi = async () => {
174174
// hapi v18 (js-ipfs >=v0.35.0-pre.0)
175-
const Hapi = require('hapi') // courtesy of js-ipfs
175+
const Hapi = require('@hapi/hapi') // courtesy of js-ipfs
176176
const hapiServer = new Hapi.Server(options)
177177
await hapiServer.route({
178178
method: 'GET',
@@ -183,7 +183,7 @@ function startRawHapiServer (port) {
183183
}
184184
})
185185
await hapiServer.start()
186-
console.log(`[ipfs-companion] require('hapi') HTTP server running at: ${hapiServer.info.uri}`)
186+
console.log(`[ipfs-companion] require('@hapi/hapi') HTTP server running at: ${hapiServer.info.uri}`)
187187
}
188188
initHapi()
189189
return hapiServer

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"private": true,
6767
"preferGlobal": false,
6868
"resolutions": {
69-
"hapi": "https://github.com/lidel/hapi/tarball/0961606e2c7dca8eceda765bd31ec2cb58358382/hapi.tar.gz",
69+
"@hapi/hapi": "https://github.com/lidel/hapi/tarball/0961606e2c7dca8eceda765bd31ec2cb58358382/hapi.tar.gz",
7070
"pino": "https://github.com/pinojs/pino/tarball/d4d291cd271af969716ac40afce2ddecc7f3d9fa/pino.tar.gz",
7171
"iso-stream-http": "0.1.2",
7272
"stream-http": "npm:[email protected]",
@@ -121,7 +121,7 @@
121121
"filesize": "4.1.2",
122122
"http-dns": "3.0.1",
123123
"http-node": "1.2.0",
124-
"ipfs": "https://github.com/lidel/js-ipfs/tarball/6197ced20dbcf5e4d699b67fbd6510d671a4dc52/js-ipfs.tar.gz",
124+
"ipfs": "https://github.com/lidel/js-ipfs/tarball/17712a4b86bacb748ed429bd2a3ca73976e54ae0/js-ipfs.tar.gz",
125125
"ipfs-css": "0.12.0",
126126
"ipfs-http-client": "30.1.2",
127127
"ipfs-http-response": "0.2.2",

0 commit comments

Comments
 (0)