Socket
Socket
Sign inDemoInstall

heroku-client

Package Overview
Dependencies
Maintainers
1
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 0.9.1 to 0.9.2

9

lib/heroku.js

@@ -1,3 +0,2 @@

var Request = require('./request'),
_ = require('lodash');
var Request = require('./request');

@@ -26,2 +25,4 @@ module.exports = Heroku;

Heroku.prototype.request = function request (options, callback) {
var key;
if (typeof options === 'function') {

@@ -31,3 +32,5 @@ callback = options;

} else {
options = _.defaults(options, this.options);
for (key in this.options) {
if (Object.keys(options).indexOf(key) == -1) options[key] = this.options[key];
}
}

@@ -34,0 +37,0 @@

@@ -6,3 +6,2 @@ var https = require('https'),

q = require('q'),
_ = require('lodash'),
cache;

@@ -24,4 +23,2 @@

this.nextRange = 'id ]..; max=1000';
_.bindAll(this);
}

@@ -49,3 +46,3 @@

Request.prototype.request = function request () {
this.getCache(this.performRequest);
this.getCache(this.performRequest.bind(this));
return this.deferred.promise;

@@ -60,2 +57,3 @@ };

var headers,
key,
requestOptions,

@@ -66,8 +64,13 @@ req;

headers = _.extend({
headers = {
'Accept': 'application/vnd.heroku+json; version=3',
'Content-type': 'application/json',
'Range': this.nextRange
}, this.options.headers || {});
};
this.options.headers || (this.options.headers = {});
for (key in this.options.headers) {
headers[key] = this.options.headers[key];
}
if (this.cachedResponse) {

@@ -87,3 +90,3 @@ headers['If-None-Match'] = this.cachedResponse.etag;

req = https.request(requestOptions, this.handleResponse);
req = https.request(requestOptions, this.handleResponse.bind(this));

@@ -93,3 +96,3 @@ this.writeBody(req);

req.on('error', this.handleError);
req.on('error', this.handleError.bind(this));

@@ -96,0 +99,0 @@ req.end();

var Heroku = require('./heroku'),
inflection = require('inflection'),
resources = require('./schema').definitions,
_ = require('lodash');
resources = require('./schema').definitions;
exports.build = function () {
_.each(resources, function (resource, resourceName) {
buildResource(resource);
});
for (var key in resources) {
buildResource(resources[key]);
}
};

@@ -15,3 +14,3 @@

function buildResource (resource) {
_.each(resource.links, buildAction);
resource.links.forEach(buildAction);
}

@@ -45,3 +44,3 @@

} else if (typeof arguments[0] === 'object') {
options = _.extend(options, { body: body });
options.body = body;
}

@@ -48,0 +47,0 @@

{
"name": "heroku-client",
"version": "0.9.1",
"version": "0.9.2",
"description": "A wrapper for the Heroku v3 API",

@@ -11,3 +11,3 @@ "main": "./lib/heroku.js",

"type": "git",
"url": "https://github.com/jclem/node-heroku-client"
"url": "https://github.com/heroku/node-heroku-client"
},

@@ -20,9 +20,6 @@ "keywords": [

"bugs": {
"url": "https://github.com/jclem/node-heroku-client/issues"
"url": "https://github.com/heroku/node-heroku-client/issues"
},
"devDependencies": {
"jasmine-node": "~1.11.0",
"grunt": "~0.4.1",
"grunt-contrib-watch": "~0.5.3",
"grunt-shell": "~0.4.0"
"jasmine-node": "~1.11.0"
},

@@ -32,6 +29,4 @@ "dependencies": {

"memjs": "~0.6.0",
"inflection": "~1.2.6",
"lodash": "~1.3.1",
"grunt": "~0.4.1"
"inflection": "~1.2.6"
}
}

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