heroku-client
Advanced tools
Comparing version 0.9.2 to 0.10.0
var https = require('https'), | ||
agent = new https.Agent({ maxSockets: Number(process.env.HEROKU_CLIENT_MAX_SOCKETS) || 5000 }), | ||
concat = require('concat-stream'), | ||
encryptor = require('./encryptor'), | ||
@@ -103,3 +104,3 @@ memjs = require('memjs'), | ||
var _this = this, | ||
buffer; | ||
resReader = concat(directResponse); | ||
@@ -115,15 +116,11 @@ if (res.statusCode === 304 && this.cachedResponse) { | ||
} else { | ||
buffer = ''; | ||
res.pipe(resReader); | ||
} | ||
res.on('data', function (data) { | ||
buffer += data; | ||
}); | ||
res.on('end', function () { | ||
if (res.statusCode.toString().match(/^2\d{2}$/)) { | ||
_this.handleSuccess(res, buffer); | ||
} else { | ||
_this.handleFailure(res, buffer); | ||
} | ||
}); | ||
function directResponse (data) { | ||
if (res.statusCode.toString().match(/^2\d{2}$/)) { | ||
_this.handleSuccess(res, data); | ||
} else { | ||
_this.handleFailure(res, data); | ||
} | ||
} | ||
@@ -130,0 +127,0 @@ }; |
{ | ||
"name": "heroku-client", | ||
"version": "0.9.2", | ||
"version": "0.10.0", | ||
"description": "A wrapper for the Heroku v3 API", | ||
@@ -27,4 +27,5 @@ "main": "./lib/heroku.js", | ||
"memjs": "~0.6.0", | ||
"inflection": "~1.2.6" | ||
"inflection": "~1.2.6", | ||
"concat-stream": "~1.1.0" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
var EventEmitter = require("events").EventEmitter; | ||
var Stream = require('stream').Stream; | ||
@@ -14,4 +14,4 @@ module.exports = MockResponse; | ||
for (var key in EventEmitter.prototype) { | ||
MockResponse.prototype[key] = EventEmitter.prototype[key]; | ||
for (var key in Stream.prototype) { | ||
MockResponse.prototype[key] = Stream.prototype[key]; | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
159471
4
4256
+ Addedconcat-stream@~1.1.0
+ Addedbase64-js@0.0.2(transitive)
+ Addedbops@0.0.6(transitive)
+ Addedconcat-stream@1.1.0(transitive)
+ Addedto-utf8@0.0.1(transitive)