Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

heroku-client

Package Overview
Dependencies
Maintainers
3
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

heroku-client - npm Package Compare versions

Comparing version 2.3.2 to 2.4.0

65

lib/request.js

@@ -26,14 +26,15 @@ 'use strict';

}
var url = URL(options.host || 'https://api.heroku.com');
this.host = url.host;
this.port = url.port;
this.secure = url.secure;
this.partial = options.partial;
this.callback = callback;
this.deferred = q.defer();
this.userAgent = options.userAgent || 'node-heroku-client/' + pjson.version;
this.parseJSON = options.hasOwnProperty('parseJSON') ? options.parseJSON : true;
this.nextRange = 'id ]..; max=1000';
this.logger = options.logger;
this.cache = options.cache;
var url = URL(options.host || 'https://api.heroku.com');
this.host = url.host;
this.port = url.port;
this.secure = url.secure;
this.partial = options.partial;
this.callback = callback;
this.deferred = q.defer();
this.userAgent = options.userAgent || 'node-heroku-client/' + pjson.version;
this.parseJSON = options.hasOwnProperty('parseJSON') ? options.parseJSON : true;
this.nextRange = 'id ]..; max=1000';
this.logger = options.logger;
this.cache = options.cache;
this.middleware = options.middleware || function (_, cb) {cb();};
if (process.env.HEROKU_HTTP_PROXY_HOST) {

@@ -144,22 +145,24 @@ var tunnelFunc;

var self = this;
this.logResponse(res);
if (res.statusCode === 304 && this.cachedResponse) {
if (this.cachedResponse.nextRange) {
this.nextRequest(this.cachedResponse.nextRange, this.cachedResponse.body);
} else {
this.updateAggregate(this.cachedResponse.body);
this.deferred.resolve(this.aggregate);
this.callback(null, this.aggregate);
this.middleware(res, function () {
self.logResponse(res);
if (res.statusCode === 304 && self.cachedResponse) {
if (self.cachedResponse.nextRange) {
self.nextRequest(self.cachedResponse.nextRange, self.cachedResponse.body);
} else {
self.updateAggregate(self.cachedResponse.body);
self.deferred.resolve(self.aggregate);
self.callback(null, self.aggregate);
}
return;
}
return;
}
concat(res, function (data) {
if (self.debug) {
console.error('<-- ' + data);
}
if (res.statusCode.toString().match(/^2\d{2}$/)) {
self.handleSuccess(res, data);
} else {
self.handleFailure(res, data);
}
concat(res, function (data) {
if (self.debug) {
console.error('<-- ' + data);
}
if (res.statusCode.toString().match(/^2\d{2}$/)) {
self.handleSuccess(res, data);
} else {
self.handleFailure(res, data);
}
});
});

@@ -166,0 +169,0 @@ };

{
"name": "heroku-client",
"description": "A wrapper for the Heroku v3 API",
"version": "2.3.2",
"version": "2.4.0",
"author": "Jonathan Clem",

@@ -6,0 +6,0 @@ "bugs": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc