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

Commit

Permalink
feat: add support for ipns and recursive to ipfs resolve (#2297)
Browse files Browse the repository at this point in the history
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`
  • Loading branch information
hugomrdias authored and alanshaw committed Sep 4, 2019
1 parent df8ef7f commit 039675e
Show file tree
Hide file tree
Showing 9 changed files with 398 additions and 235 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
"bs58": "^4.0.1",
"buffer-peek-stream": "^1.0.1",
"byteman": "^1.3.5",
"callbackify": "^1.1.0",
"cid-tool": "~0.3.0",
"cids": "~0.7.1",
"class-is": "^1.1.0",
Expand Down Expand Up @@ -155,6 +154,7 @@
"peer-id": "~0.12.3",
"peer-info": "~0.15.0",
"progress": "^2.0.1",
"promise-nodeify": "^3.0.1",
"promisify-es6": "^1.0.3",
"protons": "^1.0.1",
"pull-abortable": "^4.1.1",
Expand Down Expand Up @@ -194,8 +194,8 @@
"execa": "^2.0.4",
"form-data": "^2.5.1",
"hat": "0.0.3",
"interface-ipfs-core": "^0.111.0",
"ipfsd-ctl": "~0.45.0",
"interface-ipfs-core": "^0.111.1",
"libp2p-websocket-star": "~0.10.2",
"ncp": "^2.0.0",
"p-event": "^4.1.0",
Expand Down
4 changes: 2 additions & 2 deletions src/cli/commands/resolve.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ module.exports = {
}
},

handler ({ getIpfs, print, name, recursive, cidBase, resolve }) {
handler ({ getIpfs, name, recursive, cidBase, resolve }) {
resolve((async () => {
const ipfs = await getIpfs()
const res = await ipfs.resolve(name, { recursive, cidBase })
print(res)
return res
})())
}
}
Loading

0 comments on commit 039675e

Please sign in to comment.