diff --git a/CHANGELOG.md b/CHANGELOG.md index 87fe574a..0ba3de5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +* Updated to bluebird 3 [Page] * Better parameter handling in PUT /v1/devices/:uuid [Pablo] * An update hook response of 200 will cause the proxyvisor to stop pinging the hook [Pablo] * Allow deleting dependent apps and devices [Pablo] diff --git a/package.json b/package.json index ea684239..7f4c21f0 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "dependencies": { "JSONStream": "^1.1.2", "blinking": "~0.0.2", - "bluebird": "^2.9.24", + "bluebird": "^3.0.0", "body-parser": "^1.12.0", "buffer-equal-constant-time": "^1.0.1", "docker-delta": "0.0.12", diff --git a/src/proxyvisor.coffee b/src/proxyvisor.coffee index 840a90b7..7475bcb4 100644 --- a/src/proxyvisor.coffee +++ b/src/proxyvisor.coffee @@ -3,7 +3,7 @@ dockerUtils = require './docker-utils' { docker } = dockerUtils express = require 'express' fs = Promise.promisifyAll require 'fs' -{ resinApi } = require './request' +{ resinApi, request } = require './request' knex = require './db' _ = require 'lodash' deviceRegister = require 'resin-register-device' @@ -11,7 +11,6 @@ randomHexString = require './lib/random-hex-string' utils = require './utils' device = require './device' bodyParser = require 'body-parser' -request = Promise.promisifyAll require 'request' appConfig = require './config' PUBNUB = require 'pubnub' execAsync = Promise.promisify(require('child_process').exec) diff --git a/src/request.coffee b/src/request.coffee index 95b906fc..316ebfd5 100644 --- a/src/request.coffee +++ b/src/request.coffee @@ -17,4 +17,4 @@ exports.cachedResinApi = resinApi.clone({}, cache: {}) request = request.defaults(requestOpts) -exports.request = Promise.promisifyAll(request) +exports.request = Promise.promisifyAll(request, multiArgs: true) diff --git a/src/utils.coffee b/src/utils.coffee index c670af51..bcbf4c86 100644 --- a/src/utils.coffee +++ b/src/utils.coffee @@ -8,7 +8,7 @@ networkCheck = require 'network-checker' blink = require('blinking')(config.ledFile) url = require 'url' randomHexString = require './lib/random-hex-string' -request = Promise.promisifyAll require 'request' +{ request } = require './request' logger = require './lib/logger' TypedError = require 'typed-error' execAsync = Promise.promisify(require('child_process').exec)