mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-01 11:36:42 +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
|
# v2.7.1
|
||||||
|
|
||||||
* Use multiArgs to promisify gosuper requests [Pablo]
|
* Use multiArgs to promisify gosuper requests [Pablo]
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
"pinejs-client": "^2.4.0",
|
"pinejs-client": "^2.4.0",
|
||||||
"pubnub": "^3.7.13",
|
"pubnub": "^3.7.13",
|
||||||
"request": "^2.51.0",
|
"request": "^2.51.0",
|
||||||
"request-progress": "^0.3.1",
|
"request-progress": "^2.0.1",
|
||||||
"resin-register-device": "^2.0.0",
|
"resin-register-device": "^2.0.0",
|
||||||
"rimraf": "^2.5.4",
|
"rimraf": "^2.5.4",
|
||||||
"rwlock": "^5.0.0",
|
"rwlock": "^5.0.0",
|
||||||
|
@ -74,7 +74,8 @@ do ->
|
|||||||
new Promise (resolve, reject) ->
|
new Promise (resolve, reject) ->
|
||||||
progress request.get("#{config.deltaHost}/api/v2/delta?src=#{imgSrc}&dest=#{imgDest}", timeout: DELTA_REQUEST_TIMEOUT)
|
progress request.get("#{config.deltaHost}/api/v2/delta?src=#{imgSrc}&dest=#{imgDest}", timeout: DELTA_REQUEST_TIMEOUT)
|
||||||
.on 'progress', (progress) ->
|
.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', ->
|
.on 'end', ->
|
||||||
onProgress(percentage: 100)
|
onProgress(percentage: 100)
|
||||||
.on 'response', (res) ->
|
.on 'response', (res) ->
|
||||||
|
Loading…
Reference in New Issue
Block a user