Socket
Socket
Sign inDemoInstall

heroku-client

Package Overview
Dependencies
Maintainers
4
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 3.0.0-alpha2 to 3.0.0-alpha3

3

index.js
'use strict'
var Request = require('./lib/request')
class Heroku {

@@ -11,2 +9,3 @@ constructor (options) {

request (options) {
var Request = require('./lib/request')
options = options || {}

@@ -13,0 +12,0 @@ options.headers = Object.assign(Object.assign({}, this.options.headers), options.headers)

'use strict'
var http = require('http')
var https = require('https')
var tunnel = require('tunnel-agent')
var extend = require('util')._extend
var URL = require('./url')
var pjson = require('../package.json')
var fs = require('fs')
var path = require('path')
/*

@@ -17,2 +8,4 @@ * Object capable of making API calls.

constructor (options) {
var URL = require('./url')
this.options = options || {}

@@ -26,3 +19,7 @@ this.debug = options.debug

this.partial = options.partial
this.userAgent = options.userAgent || 'node-heroku-client/' + pjson.version
this.userAgent = options.userAgent
if (!this.userAgent) {
var pjson = require('../package.json')
this.userAgent = 'node-heroku-client/' + pjson.version
}
this.parseJSON = options.hasOwnProperty('parseJSON') ? options.parseJSON : true

@@ -34,2 +31,3 @@ this.nextRange = 'id ..; max=1000'

if (process.env.HEROKU_HTTP_PROXY_HOST) {
var tunnel = require('tunnel-agent')
var tunnelFunc

@@ -54,4 +52,6 @@ if (this.secure) {

if (this.secure) {
var https = require('https')
this.agent = new https.Agent({ maxSockets: Number(process.env.HEROKU_CLIENT_MAX_SOCKETS) || 5000 })
} else {
var http = require('http')
this.agent = new http.Agent({ maxSockets: Number(process.env.HEROKU_CLIENT_MAX_SOCKETS) || 5000 })

@@ -69,3 +69,3 @@ }

this.reject = reject
var headers = extend({
var headers = Object.assign({
'Accept': 'application/vnd.heroku+json; version=3',

@@ -99,4 +99,6 @@ 'Content-type': 'application/json',

if (this.secure) {
var https = require('https')
req = https.request(requestOptions, this.handleResponse.bind(this))
} else {
var http = require('http')
req = http.request(requestOptions, this.handleResponse.bind(this))

@@ -283,2 +285,4 @@ }

if (certDir) {
var path = require('path')
var fs = require('fs')
return fs.readdirSync(certDir).map((f) => path.join(certDir, f))

@@ -298,2 +302,3 @@ } else {

return filenames.map(function (filename) {
var fs = require('fs')
if (debug) {

@@ -300,0 +305,0 @@ console.error(' ' + filename)

{
"name": "heroku-client",
"description": "A wrapper for the Heroku v3 API",
"version": "3.0.0-alpha2",
"version": "3.0.0-alpha3",
"author": "Jeff Dickey",

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

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