Skip to content

Commit

Permalink
fix: fix electron (#375)
Browse files Browse the repository at this point in the history
Use ipfs-utils env to detect environments
  • Loading branch information
hugomrdias authored Sep 15, 2019
1 parent a8ff682 commit 6be5027
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,21 @@
"@hapi/hapi": "^18.3.2",
"@hapi/joi": "^15.1.1",
"debug": "^4.1.1",
"detect-node": "^2.0.4",
"dexie": "^2.0.4",
"execa": "^2.0.4",
"fs-extra": "^8.1.0",
"hat": "~0.0.3",
"ipfs-http-client": "^36.0.0",
"ipfs-utils": "^0.2.0",
"lodash.clone": "^4.5.0",
"lodash.defaults": "^4.2.0",
"lodash.defaultsdeep": "^4.6.1",
"multiaddr": "^7.0.0",
"multiaddr": "^7.1.0",
"safe-json-stringify": "^1.2.0",
"superagent": "^5.0.5"
},
"devDependencies": {
"aegir": "^20.0.0",
"aegir": "^20.1.0",
"chai": "^4.2.0",
"delay": "^4.3.0",
"detect-port": "^1.3.0",
Expand Down
1 change: 0 additions & 1 deletion src/factory-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ class FactoryClient {
const res = await request
.post(`${this.baseUrl}/spawn`)
.send({ options: options, type: this.options.type })

const apiAddr = res.body.api ? res.body.api.apiAddr : ''
const gatewayAddr = res.body.api ? res.body.api.gatewayAddr : ''

Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

const isNode = require('detect-node')
const defaults = require('lodash.defaultsdeep')
const { isNode } = require('ipfs-utils/src/env')

const FactoryDaemon = require('./factory-daemon')
const FactoryInProc = require('./factory-in-proc')
Expand Down
2 changes: 1 addition & 1 deletion test/api.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ chai.use(dirtyChai)
const multiaddr = require('multiaddr')
const path = require('path')
const DaemonFactory = require('../src')
const isNode = require('detect-node')
const { isNode } = require('ipfs-utils/src/env')

const tests = [
{ type: 'go' },
Expand Down
2 changes: 1 addition & 1 deletion test/spawn-options.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const expect = chai.expect
chai.use(dirtyChai)

const fs = require('fs-extra')
const isNode = require('detect-node')
const { isNode } = require('ipfs-utils/src/env')
const hat = require('hat')
const IPFSFactory = require('../src')
const JSIPFS = require('ipfs')
Expand Down
2 changes: 1 addition & 1 deletion test/utils.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const expect = chai.expect
chai.use(dirtyChai)

const fs = require('fs')
const isNode = require('detect-node')
const { isNode } = require('ipfs-utils/src/env')
const path = require('path')
const flatten = require('../src/utils/flatten')
const tempDir = require('../src/utils/tmp-dir')
Expand Down

0 comments on commit 6be5027

Please sign in to comment.