mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-20 06:07:57 +00:00
Merge pull request #327 from resin-io/request-progress-2.0.1
Update request-progress to v2.0.1
This commit is contained in:
commit
88e512a69b
@ -1,3 +1,5 @@
|
||||
* Update request-progress to v2.0.1 [Pablo]
|
||||
|
||||
# v2.7.1
|
||||
|
||||
* Use multiArgs to promisify gosuper requests [Pablo]
|
||||
|
@ -34,7 +34,7 @@
|
||||
"pinejs-client": "^2.4.0",
|
||||
"pubnub": "^3.7.13",
|
||||
"request": "^2.51.0",
|
||||
"request-progress": "^0.3.1",
|
||||
"request-progress": "^2.0.1",
|
||||
"resin-register-device": "^2.0.0",
|
||||
"rimraf": "^2.5.4",
|
||||
"rwlock": "^5.0.0",
|
||||
|
@ -74,7 +74,8 @@ do ->
|
||||
new Promise (resolve, reject) ->
|
||||
progress request.get("#{config.deltaHost}/api/v2/delta?src=#{imgSrc}&dest=#{imgDest}", timeout: DELTA_REQUEST_TIMEOUT)
|
||||
.on 'progress', (progress) ->
|
||||
onProgress(percentage: progress.percent)
|
||||
# In request-progress ^2.0.1, "percentage" is a ratio from 0 to 1
|
||||
onProgress(percentage: progress.percentage * 100)
|
||||
.on 'end', ->
|
||||
onProgress(percentage: 100)
|
||||
.on 'response', (res) ->
|
||||
|
Loading…
Reference in New Issue
Block a user