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

Commit 27d5a57

Browse files
committed
feat: get Ping to work properly
1 parent 2029e05 commit 27d5a57

File tree

32 files changed

+102
-106
lines changed

32 files changed

+102
-106
lines changed

examples/browser-webpack/src/components/app.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,18 @@ class App extends React.Component {
4949
if (err) { throw err }
5050

5151
const hash = filesAdded[0].hash
52-
self.setState({added_file_hash: hash})
52+
self.setState({ added_file_hash: hash })
5353

5454
node.files.cat(hash, (err, data) => {
5555
if (err) { throw err }
56-
self.setState({added_file_contents: data.toString()})
56+
self.setState({ added_file_contents: data.toString() })
5757
})
5858
})
5959
}
6060
}
6161
render () {
6262
return (
63-
<div style={{textAlign: 'center'}}>
63+
<div style={{ textAlign: 'center' }}>
6464
<h1>Everything is working!</h1>
6565
<p>Your ID is <strong>{this.state.id}</strong></p>
6666
<p>Your IPFS version is <strong>{this.state.version}</strong></p>

examples/run-in-electron/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const url = require('url')
1111
let mainWindow
1212

1313
function createWindow () {
14-
mainWindow = new BrowserWindow({width: 800, height: 600})
14+
mainWindow = new BrowserWindow({ width: 800, height: 600 })
1515

1616
// and load the index.html of the app.
1717
mainWindow.loadURL(url.format({

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"execa": "^1.0.0",
6969
"form-data": "^2.3.3",
7070
"hat": "0.0.3",
71-
"interface-ipfs-core": "~0.83.0",
71+
"interface-ipfs-core": "~0.84.2",
7272
"ipfsd-ctl": "~0.39.5",
7373
"ncp": "^2.0.0",
7474
"qs": "^6.5.2",
@@ -98,7 +98,7 @@
9898
"hoek": "^5.0.4",
9999
"human-to-milliseconds": "^1.0.0",
100100
"interface-datastore": "~0.6.0",
101-
"ipfs-api": "^26.0.3",
101+
"ipfs-api": "^26.1.0",
102102
"ipfs-bitswap": "~0.21.0",
103103
"ipfs-block": "~0.8.0",
104104
"ipfs-block-service": "~0.15.1",
@@ -150,6 +150,7 @@
150150
"progress": "^2.0.1",
151151
"promisify-es6": "^1.0.3",
152152
"pull-abortable": "^4.1.1",
153+
"pull-catch": "^1.0.0",
153154
"pull-defer": "~0.2.3",
154155
"pull-file": "^1.1.0",
155156
"pull-ndjson": "~0.1.1",

src/cli/bin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const print = utils.print
1111
const mfs = require('ipfs-mfs/cli')
1212
const debug = require('debug')('ipfs:cli')
1313

14-
const pkg = readPkgUp.sync({cwd: __dirname}).pkg
14+
const pkg = readPkgUp.sync({ cwd: __dirname }).pkg
1515
updateNotifier({
1616
pkg,
1717
updateCheckInterval: 1000 * 60 * 60 * 24 * 7 // 1 week

src/cli/commands/file/ls.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module.exports = {
2020

2121
// Single file? Then print its hash
2222
if (links.length === 0) {
23-
links = [{hash: path}]
23+
links = [{ hash: path }]
2424
}
2525

2626
links.forEach((file) => print(file.hash))

src/cli/commands/files/add.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ module.exports = {
227227
if (argv.progress) {
228228
const bar = createProgressBar(totalBytes)
229229
options.progress = function (byteLength) {
230-
bar.update(byteLength / totalBytes, {progress: byteman(byteLength, 2, 'MB')})
230+
bar.update(byteLength / totalBytes, { progress: byteman(byteLength, 2, 'MB') })
231231
}
232232
}
233233

src/cli/commands/ls.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ module.exports = {
3939
}
4040

4141
if (argv.headers) {
42-
links = [{hash: 'Hash', size: 'Size', name: 'Name'}].concat(links)
42+
links = [{ hash: 'Hash', size: 'Size', name: 'Name' }].concat(links)
4343
}
4444

4545
const multihashWidth = Math.max.apply(null, links.map((file) => file.hash.length))

src/cli/commands/object/get.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module.exports = {
1515
},
1616

1717
handler (argv) {
18-
argv.ipfs.object.get(argv.key, {enc: 'base58'}, (err, node) => {
18+
argv.ipfs.object.get(argv.key, { enc: 'base58' }, (err, node) => {
1919
if (err) {
2020
throw err
2121
}

src/cli/commands/object/put.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const fs = require('fs')
55
const print = require('../../utils').print
66

77
function putNode (buf, enc, ipfs) {
8-
ipfs.object.put(buf, {enc: enc}, (err, node) => {
8+
ipfs.object.put(buf, { enc: enc }, (err, node) => {
99
if (err) {
1010
throw err
1111
}

src/cli/commands/repo/stat.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module.exports = {
1515
},
1616

1717
handler (argv) {
18-
argv.ipfs.repo.stat({human: argv.human}, (err, stats) => {
18+
argv.ipfs.repo.stat({ human: argv.human }, (err, stats) => {
1919
if (err) {
2020
throw err
2121
}

0 commit comments

Comments
 (0)