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

Commit

Permalink
feat(dag): Resolve API (#751)
Browse files Browse the repository at this point in the history
* feat: dag resolve API
  • Loading branch information
daviddias committed Feb 2, 2017
1 parent ffc120a commit 4986908
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
"form-data": "^2.1.2",
"fs-pull-blob-store": "^0.4.1",
"gulp": "^3.9.1",
"interface-ipfs-core": "^0.23.8",
"ipfsd-ctl": "^0.18.1",
"interface-ipfs-core": "^0.24.0",
"ipfsd-ctl": "^0.18.2",
"left-pad": "^1.1.3",
"lodash": "^4.17.4",
"mocha": "^3.2.0",
Expand All @@ -97,15 +97,15 @@
"hapi-set-header": "^1.0.2",
"hoek": "^4.1.0",
"idb-pull-blob-store": "^0.5.1",
"ipfs-api": "^12.1.4",
"ipfs-api": "^12.1.6",
"ipfs-bitswap": "^0.9.2",
"ipfs-block": "^0.5.4",
"ipfs-block-service": "^0.8.1",
"ipfs-multipart": "^0.1.0",
"ipfs-repo": "^0.11.2",
"ipfs-unixfs": "^0.1.9",
"ipfs-unixfs-engine": "^0.15.4",
"ipld-resolver": "^0.4.3",
"ipfs-unixfs-engine": "^0.16.0",
"ipld-resolver": "^0.6.0",
"isstream": "^0.1.2",
"joi": "^10.2.0",
"libp2p-floodsub": "0.7.2",
Expand Down
1 change: 1 addition & 0 deletions src/core/components/dag.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports = function dag (self) {
if (err) {
return callback(err)
}

self._ipldResolver.put({
node: dagNode,
cid: cid
Expand Down
20 changes: 20 additions & 0 deletions test/core/interface/dag-resolve.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/* eslint-env mocha */

'use strict'

const test = require('interface-ipfs-core')
const IPFSFactory = require('../../utils/ipfs-factory-instance')

let factory

const common = {
setup: function (cb) {
factory = new IPFSFactory()
cb(null, factory)
},
teardown: function (cb) {
factory.dismantle(cb)
}
}

test.dagResolve(common)
1 change: 1 addition & 0 deletions test/core/interface/interface.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ describe('interface-ipfs-core tests', () => {
require('./generic')
require('./object')
require('./dag')
require('./dag-resolve')
if (isNode) {
require('./swarm')
require('./pubsub')
Expand Down

0 comments on commit 4986908

Please sign in to comment.