Skip to content

Commit

Permalink
feat(brave): conditional and range requests
Browse files Browse the repository at this point in the history
Switching to js-ipfs from ipfs/js-ipfs#1989
for next beta release
  • Loading branch information
lidel committed Apr 26, 2019
1 parent ff799ec commit 21886a1
Show file tree
Hide file tree
Showing 3 changed files with 269 additions and 44 deletions.
6 changes: 3 additions & 3 deletions add-on/src/lib/ipfs-client/embedded-chromesockets.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ exports.init = function init (opts) {
if (!httpServer) {
httpServer = startRawHttpServer(9091)
}
// TEST require('hapi') HTTP SERVER (same as in js-ipfs)
// TEST require('@hapi/hapi') HTTP SERVER (same as in js-ipfs)
if (!hapiServer) {
hapiServer = startRawHapiServer(9092)
}
Expand Down Expand Up @@ -172,7 +172,7 @@ function startRawHapiServer (port) {
}
const initHapi = async () => {
// hapi v18 (js-ipfs >=v0.35.0-pre.0)
const Hapi = require('hapi') // courtesy of js-ipfs
const Hapi = require('@hapi/hapi') // courtesy of js-ipfs
const hapiServer = new Hapi.Server(options)
await hapiServer.route({
method: 'GET',
Expand All @@ -183,7 +183,7 @@ function startRawHapiServer (port) {
}
})
await hapiServer.start()
console.log(`[ipfs-companion] require('hapi') HTTP server running at: ${hapiServer.info.uri}`)
console.log(`[ipfs-companion] require('@hapi/hapi') HTTP server running at: ${hapiServer.info.uri}`)
}
initHapi()
return hapiServer
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"private": true,
"preferGlobal": false,
"resolutions": {
"hapi": "https://github.com/lidel/hapi/tarball/0961606e2c7dca8eceda765bd31ec2cb58358382/hapi.tar.gz",
"@hapi/hapi": "https://github.com/lidel/hapi/tarball/0961606e2c7dca8eceda765bd31ec2cb58358382/hapi.tar.gz",
"pino": "https://github.com/pinojs/pino/tarball/d4d291cd271af969716ac40afce2ddecc7f3d9fa/pino.tar.gz",
"iso-stream-http": "0.1.2",
"stream-http": "npm:[email protected]",
Expand Down Expand Up @@ -121,7 +121,7 @@
"filesize": "4.1.2",
"http-dns": "3.0.1",
"http-node": "1.2.0",
"ipfs": "https://github.com/lidel/js-ipfs/tarball/6197ced20dbcf5e4d699b67fbd6510d671a4dc52/js-ipfs.tar.gz",
"ipfs": "https://github.com/lidel/js-ipfs/tarball/17712a4b86bacb748ed429bd2a3ca73976e54ae0/js-ipfs.tar.gz",
"ipfs-css": "0.12.0",
"ipfs-http-client": "30.1.2",
"ipfs-http-response": "0.2.2",
Expand Down
Loading

0 comments on commit 21886a1

Please sign in to comment.