Skip to content

Commit

Permalink
fix: updates deps and http for name resolve dns (#332)
Browse files Browse the repository at this point in the history
* fix: updates deps and http for name resolve dns

* fix: getConfig from the browser

* fix: update deps

* chore: prepare for release with http-client
  • Loading branch information
hugomrdias authored Jun 20, 2019
1 parent 4d94939 commit 58a9fea
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,27 +70,27 @@
"execa": "^1.0.0",
"hapi": "^16.6.2",
"hat": "~0.0.3",
"ipfs-http-client": "^32.0.1",
"ipfs-http-client": "ipfs/js-ipfs-http-client#master",
"joi": "^14.3.1",
"libp2p-crypto": "~0.16.1",
"lodash.clone": "^4.5.0",
"lodash.defaults": "^4.2.0",
"lodash.defaultsdeep": "^4.6.0",
"multiaddr": "^6.0.6",
"multiaddr": "^6.1.0",
"once": "^1.4.0",
"protons": "^1.0.1",
"rimraf": "^2.6.3",
"safe-json-parse": "^4.0.0",
"safe-json-stringify": "^1.2.0",
"superagent": "^4.0.0-beta.5"
"superagent": "^5.0.5"
},
"devDependencies": {
"aegir": "^18.2.0",
"aegir": "^19.0.3",
"chai": "^4.2.0",
"detect-port": "^1.3.0",
"dirty-chai": "^2.0.1",
"go-ipfs-dep": "~0.4.21",
"husky": "^1.3.1",
"husky": "^2.4.1",
"ipfs": "~0.36.3",
"is-running": "^2.1.0",
"lint-staged": "^8.1.7",
Expand Down
5 changes: 4 additions & 1 deletion src/ipfsd-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,10 @@ class Client {
}

const qr = { id: this._id }
qr.key = key

if (key) {
qr.key = key
}
request
.get(`${this.baseUrl}/config`)
.query(qr)
Expand Down
5 changes: 1 addition & 4 deletions src/ipfsd-daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,14 +389,11 @@ class Daemon {
* @param {function(Error, (Object|string)): void} callback
* @returns {void}
*/
getConfig (key, callback) {
getConfig (key = 'show', callback) {
if (typeof key === 'function') {
callback = key
key = 'show'
}
if (!key) {
key = 'show'
}
let config = ''

series([
Expand Down
2 changes: 1 addition & 1 deletion test/api.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ describe('ipfsd.api for Daemons', () => {
const fixuresDir = res.find(file => file.path === 'fixtures')
expect(fixuresDir).to.have.property(
'hash',
'QmR9731QMXHCjK2EvoQZNhMHVE77tGMbgPFXMWPHztMV4a'
'QmNiv9nS9xipNafXqApzGqwajU8EaXrS2vUPJftg5ZEDUb'
)

const testFile = res.find(file => file.path === 'fixtures/test.txt')
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/talky.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-console */
'use strict'

console.info('hello')
Expand Down

0 comments on commit 58a9fea

Please sign in to comment.