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

feat: add support for ipns and recursive to ipfs resolve #2297

Merged
merged 8 commits into from
Sep 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
Copy link
Member

@alanshaw alanshaw Aug 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

callbackify is used here https://github.com/ipfs/js-ipfs/blob/813048ffb32a11cfefc51c2ec8634faaff2a924e/src/core/components/files-mfs.js so will need to be migrated to promise-nodeify. Would be rad if you also migrated libp2p-kad-dht 😉🙏:

ipfs@0.37.0-rc.0 /Users/alan/Code/pl/ipfs/js-ipfs
├── callbackify@1.1.0 
└─┬ libp2p-kad-dht@0.15.3
  └── callbackify@1.1.0  deduped

"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