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

Commit 034d0e7

Browse files
feat: make core/object satisfy interface-ipfs-core
1 parent c539741 commit 034d0e7

File tree

28 files changed

+388
-616
lines changed

28 files changed

+388
-616
lines changed

out.txt

30.8 KB
Binary file not shown.

package.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,14 @@
3737
},
3838
"homepage": "https://github.com/ipfs/js-ipfs#readme",
3939
"devDependencies": {
40-
"aegir": "^3.0.1",
40+
"aegir": "^3.0.2",
4141
"buffer-loader": "0.0.1",
4242
"chai": "^3.5.0",
4343
"expose-loader": "^0.7.1",
4444
"form-data": "^1.0.0-rc3",
4545
"gulp": "^3.9.1",
4646
"idb-plus-blob-store": "^1.1.2",
47+
"interface-ipfs-core": "^0.1.5",
4748
"libp2p-ipfs-browser": "^0.2.0",
4849
"lodash": "^4.11.2",
4950
"mocha": "^2.4.5",
@@ -63,24 +64,25 @@
6364
"fs-blob-store": "^5.2.1",
6465
"glob": "^7.0.3",
6566
"hapi": "^13.3.0",
66-
"ipfs-api": "^3.0.2",
67+
"ipfs-api": "^4.0.2",
6768
"ipfs-bitswap": "^0.2.0",
6869
"ipfs-block": "^0.3.0",
6970
"ipfs-block-service": "^0.4.0",
70-
"ipfs-merkle-dag": "^0.5.1",
71+
"ipfs-merkle-dag": "^0.6.0",
7172
"ipfs-multipart": "^0.1.0",
7273
"ipfs-repo": "^0.8.0",
7374
"ipfs-unixfs-engine": "^0.6.1",
7475
"joi": "^8.0.5",
75-
"libp2p-ipfs": "^0.3.3",
76+
"libp2p-ipfs": "^0.3.8",
7677
"libp2p-swarm": "^0.12.11",
77-
"lodash.get": "^4.2.1",
78-
"lodash.set": "^4.1.0",
78+
"lodash.get": "^4.3.0",
79+
"lodash.set": "^4.2.0",
7980
"multiaddr": "^1.4.1",
8081
"path-exists": "^3.0.0",
8182
"peer-book": "^0.1.1",
8283
"peer-id": "^0.6.6",
8384
"peer-info": "^0.6.2",
85+
"promisify-es6": "^1.0.1",
8486
"readable-stream": "1.1.13",
8587
"ronin": "^0.3.11",
8688
"run-parallel": "^1.1.6",

src/cli/commands/block/get.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ module.exports = Command.extend({
2828

2929
ipfs.block.get(mh, (err, block) => {
3030
if (err) {
31-
log.error(err)
3231
throw err
3332
}
3433

src/cli/commands/block/put.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ function addBlock (buf) {
1919
if (utils.isDaemonOn()) {
2020
return ipfs.block.put(buf, (err, block) => {
2121
if (err) {
22-
log.error(err)
2322
throw err
2423
}
2524

@@ -31,7 +30,6 @@ function addBlock (buf) {
3130

3231
ipfs.block.put(block, (err, obj) => {
3332
if (err) {
34-
log.error(err)
3533
throw err
3634
}
3735

@@ -52,7 +50,6 @@ module.exports = Command.extend({
5250

5351
process.stdin.pipe(bl((err, input) => {
5452
if (err) {
55-
log.error(err)
5653
throw err
5754
}
5855

src/cli/commands/block/rm.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ module.exports = Command.extend({
3131

3232
ipfs.block.del(mh, (err) => {
3333
if (err) {
34-
log.error(err)
3534
throw err
3635
}
3736

src/cli/commands/block/stat.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ module.exports = Command.extend({
2828

2929
ipfs.block.stat(mh, (err, block) => {
3030
if (err) {
31-
log.error(err)
3231
throw err
3332
}
3433

src/cli/commands/bootstrap/add.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module.exports = Command.extend({
1818
}
1919
ipfs.bootstrap.add(multiaddr, (err, list) => {
2020
if (err) {
21-
return log.error(err)
21+
throw err
2222
}
2323
})
2424
})

src/cli/commands/bootstrap/rm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module.exports = Command.extend({
1818
}
1919
ipfs.bootstrap.rm(multiaddr, (err, list) => {
2020
if (err) {
21-
return log.error(err)
21+
throw err
2222
}
2323
})
2424
})

src/cli/commands/config/edit.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ module.exports = Command.extend({
6161

6262
child.on('exit', (err, code) => {
6363
if (err) {
64-
log.error(err)
6564
throw new Error('error on the editor')
6665
}
6766

src/cli/commands/daemon.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports = Command.extend({
1616
httpAPI = new HttpAPI()
1717
httpAPI.start((err) => {
1818
if (err) {
19-
return log.error(err)
19+
throw err
2020
}
2121
console.log('Daemon is ready')
2222
})
@@ -25,7 +25,7 @@ module.exports = Command.extend({
2525
console.log('Received interrupt signal, shutting down..')
2626
httpAPI.stop((err) => {
2727
if (err) {
28-
return log.error(err)
28+
throw err
2929
}
3030
process.exit(0)
3131
})

0 commit comments

Comments
 (0)