This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: progress bar for IPFS add (#1036)
* Progress bar for cli * requires async/waterfall in place of async * adds a test for createProgressBar * feat: add missing progress bar support for http api * feat: add error propagation * feat: handle errors as trailer headers * feat: acumulate progress bytes sent for consistency with go * chore: upgrade to latest interface-ipfs-core * chore: upgrade ipfs-api to latest * fix: send file size along Name and Hash * fix semver
- Loading branch information
Showing
7 changed files
with
156 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,7 +74,7 @@ | |
"expose-loader": "^0.7.3", | ||
"form-data": "^2.3.1", | ||
"gulp": "^3.9.1", | ||
"interface-ipfs-core": "~0.31.19", | ||
"interface-ipfs-core": "~0.32.1", | ||
"ipfsd-ctl": "~0.23.0", | ||
"left-pad": "^1.1.3", | ||
"lodash": "^4.17.4", | ||
|
@@ -93,16 +93,18 @@ | |
"async": "^2.5.0", | ||
"bl": "^1.2.1", | ||
"boom": "^5.2.0", | ||
"debug": "^3.0.1", | ||
"byteman": "^1.3.5", | ||
"cids": "^0.5.1", | ||
"debug": "^3.0.1", | ||
"file-type": "^6.1.0", | ||
"filesize": "^3.5.10", | ||
"fsm-event": "^2.1.0", | ||
"get-folder-size": "^1.0.0", | ||
"glob": "^7.1.2", | ||
"hapi": "^16.5.2", | ||
"hapi-set-header": "^1.0.2", | ||
"hoek": "^4.2.0", | ||
"ipfs-api": "^14.3.5", | ||
"ipfs-api": "^14.3.7", | ||
"ipfs-bitswap": "~0.17.2", | ||
"ipfs-block": "~0.6.0", | ||
"ipfs-block-service": "~0.12.0", | ||
|
@@ -138,8 +140,11 @@ | |
"peer-book": "~0.5.1", | ||
"peer-id": "~0.10.1", | ||
"peer-info": "~0.11.0", | ||
"progress": "^2.0.0", | ||
"promisify-es6": "^1.0.3", | ||
"pull-abortable": "^4.1.1", | ||
"pull-file": "^1.0.0", | ||
"pull-ndjson": "^0.1.1", | ||
"pull-paramap": "^1.2.2", | ||
"pull-pushable": "^2.1.1", | ||
"pull-sort": "^1.0.1", | ||
|
@@ -216,4 +221,4 @@ | |
"Łukasz Magiera <[email protected]>", | ||
"ᴠɪᴄᴛᴏʀ ʙᴊᴇʟᴋʜᴏʟᴍ <[email protected]>" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* eslint-env mocha */ | ||
'use strict' | ||
|
||
const expect = require('chai').expect | ||
const createProgressBar = require('../../src/cli/utils').createProgressBar | ||
|
||
describe('progress bar', () => { | ||
it('created with the correct properties', () => { | ||
const total = 1000 | ||
|
||
const bar = createProgressBar(total) | ||
expect(bar.total).to.eql(total) | ||
expect(typeof bar.tick).to.eql('function') | ||
}) | ||
}) |