File tree 3 files changed +269
-44
lines changed
add-on/src/lib/ipfs-client
3 files changed +269
-44
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ exports.init = function init (opts) {
33
33
if (!httpServer) {
34
34
httpServer = startRawHttpServer(9091)
35
35
}
36
- // TEST require('hapi') HTTP SERVER (same as in js-ipfs)
36
+ // TEST require('@hapi/ hapi') HTTP SERVER (same as in js-ipfs)
37
37
if (!hapiServer) {
38
38
hapiServer = startRawHapiServer(9092)
39
39
}
@@ -172,7 +172,7 @@ function startRawHapiServer (port) {
172
172
}
173
173
const initHapi = async () => {
174
174
// 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
176
176
const hapiServer = new Hapi.Server(options)
177
177
await hapiServer.route({
178
178
method: 'GET',
@@ -183,7 +183,7 @@ function startRawHapiServer (port) {
183
183
}
184
184
})
185
185
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}`)
187
187
}
188
188
initHapi()
189
189
return hapiServer
Original file line number Diff line number Diff line change 66
66
"private" : true ,
67
67
"preferGlobal" : false ,
68
68
"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" ,
70
70
"pino" : " https://github.com/pinojs/pino/tarball/d4d291cd271af969716ac40afce2ddecc7f3d9fa/pino.tar.gz" ,
71
71
"iso-stream-http" : " 0.1.2" ,
72
72
"stream-http" :
" npm:[email protected] " ,
121
121
"filesize" : " 4.1.2" ,
122
122
"http-dns" : " 3.0.1" ,
123
123
"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" ,
125
125
"ipfs-css" : " 0.12.0" ,
126
126
"ipfs-http-client" : " 30.1.2" ,
127
127
"ipfs-http-response" : " 0.2.2" ,
You can’t perform that action at this time.
0 commit comments