Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 039675e

Browse files
hugomrdiasAlan Shaw
authored and
Alan Shaw
committed
feat: add support for ipns and recursive to ipfs resolve (#2297)
This PR adds IPNS support to resolve, makes the recursive option true by default and reworks the tests. Jsdocs were add to the resolve methods. Depends on: * [x] ipfs-inactive/interface-js-ipfs-core#504 BREAKING CHANGE: `recursive` is now `true` by default in `ipfs resolve`
1 parent df8ef7f commit 039675e

File tree

9 files changed

+398
-235
lines changed

9 files changed

+398
-235
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@
7575
"bs58": "^4.0.1",
7676
"buffer-peek-stream": "^1.0.1",
7777
"byteman": "^1.3.5",
78-
"callbackify": "^1.1.0",
7978
"cid-tool": "~0.3.0",
8079
"cids": "~0.7.1",
8180
"class-is": "^1.1.0",
@@ -155,6 +154,7 @@
155154
"peer-id": "~0.12.3",
156155
"peer-info": "~0.15.0",
157156
"progress": "^2.0.1",
157+
"promise-nodeify": "^3.0.1",
158158
"promisify-es6": "^1.0.3",
159159
"protons": "^1.0.1",
160160
"pull-abortable": "^4.1.1",
@@ -194,8 +194,8 @@
194194
"execa": "^2.0.4",
195195
"form-data": "^2.5.1",
196196
"hat": "0.0.3",
197-
"interface-ipfs-core": "^0.111.0",
198197
"ipfsd-ctl": "~0.45.0",
198+
"interface-ipfs-core": "^0.111.1",
199199
"libp2p-websocket-star": "~0.10.2",
200200
"ncp": "^2.0.0",
201201
"p-event": "^4.1.0",

src/cli/commands/resolve.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ module.exports = {
2020
}
2121
},
2222

23-
handler ({ getIpfs, print, name, recursive, cidBase, resolve }) {
23+
handler ({ getIpfs, name, recursive, cidBase, resolve }) {
2424
resolve((async () => {
2525
const ipfs = await getIpfs()
2626
const res = await ipfs.resolve(name, { recursive, cidBase })
27-
print(res)
27+
return res
2828
})())
2929
}
3030
}

0 commit comments

Comments
 (0)