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

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-beta3 to 3.0.0

45

lib/request.js
'use strict'
const debug = require('debug')('http')
const debugHeaders = require('debug')('http:headers')
/*

@@ -125,5 +128,5 @@ * Object capable of making API calls.

concat(res).then((data) => {
if (this.debug) {
console.error('<-- ' + data)
}
debug(`<-- ${this.options.method} ${this.options.path}\n${data}`)
debugHeaders('\n' + renderHeaders(res.headers))
if (this.debug) console.error('<-- ' + data)
if (res.statusCode.toString().match(/^2\d{2}$/)) {

@@ -134,3 +137,3 @@ this.handleSuccess(res, data)

}
})
}).catch(this.reject)
})

@@ -155,8 +158,7 @@ }

logRequest (req) {
if (this.debug) {
console.error('--> ' + req.method + ' ' + req.path)
}
if (this.debugHeaders) {
printHeaders(req._headers)
}
let headers = renderHeaders(req._headers)
debug(`--> ${req.method} ${this.options.path}`)
debugHeaders('\n' + headers)
if (this.debug) console.error('--> ' + req.method + ' ' + req.path)
if (this.debugHeaders) console.error(headers)
}

@@ -175,8 +177,5 @@

}
if (this.debug) {
console.error('<-- ' + res.statusCode + ' ' + res.statusMessage)
}
if (this.debugHeaders) {
printHeaders(res.headers)
}
let headers = renderHeaders(res.headers)
if (this.debug) console.error('<-- ' + res.statusCode + ' ' + res.statusMessage)
if (this.debugHeaders) console.error(headers)
}

@@ -328,11 +327,7 @@

function printHeaders (headers) {
var key
var value
for (key in headers) {
if (headers.hasOwnProperty(key)) {
value = key.toUpperCase() === 'AUTHORIZATION' ? 'REDACTED' : headers[key]
console.error(' ' + key + '=' + value)
}
}
function renderHeaders (headers) {
return Object.keys(headers).map(key => {
let value = key.toUpperCase() === 'AUTHORIZATION' ? 'REDACTED' : headers[key]
return ' ' + key + '=' + value
}).join('\n')
}

@@ -339,0 +334,0 @@

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

@@ -17,2 +17,3 @@ "bugs": {

"dependencies": {
"debug": "^2.2.0",
"is-retry-allowed": "^1.0.0",

@@ -22,7 +23,7 @@ "tunnel-agent": "^0.4.0"

"devDependencies": {
"ava": "0.14.0",
"codecov": "1.0.1",
"nock": "8.0.0",
"nyc": "6.4.4",
"standard": "7.1.0"
"ava": "^0.16.0",
"codecov": "^1.0.1",
"nock": "^8.0.0",
"nyc": "^7.0.0",
"standard": "^7.1.0"
},

@@ -29,0 +30,0 @@ "engines": {

@@ -10,3 +10,2 @@ # heroku-client

- [Install](#install)
- [Documentation](#documentation)
- [Usage](#usage)

@@ -13,0 +12,0 @@ - [Generators](#generators)

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