cli-engine-command
Advanced tools
Comparing version
@@ -73,8 +73,15 @@ 'use strict'; | ||
this.out.stderr.log(`--> ${http.method} ${http.url}`); | ||
if (this.out.config.debug > 1) { | ||
if (this._debugHeaders) { | ||
this.out.stderr.log(renderHeaders(http.headers)); | ||
// if (body) this.error(`--- BODY\n${util.inspect(body)}\n---`) | ||
} | ||
// TODO: conditionally add displaying of POST body | ||
// if (body) this.error(`--- BODY\n${util.inspect(body)}\n---`) | ||
} | ||
get _debugHeaders() { | ||
if (this.out.config.debug > 1) return true; | ||
const HEROKU_DEBUG_HEADERS = process.env.HEROKU_DEBUG_HEADERS; | ||
return HEROKU_DEBUG_HEADERS === 'true' || HEROKU_DEBUG_HEADERS === '1'; | ||
} | ||
_logResponse(http) { | ||
@@ -81,0 +88,0 @@ if (!this.out.config.debug) return; |
@@ -36,6 +36,2 @@ 'use strict'; | ||
var _prettyFormat = require('pretty-format'); | ||
var _prettyFormat2 = _interopRequireDefault(_prettyFormat); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -209,5 +205,5 @@ | ||
*/ | ||
inspect(obj) { | ||
inspect(obj, opts = {}) { | ||
this.action.pause(() => { | ||
this.stderr.log((0, _prettyFormat2.default)(obj)); | ||
console.dir(obj, Object.assign({ colors: true }, opts)); | ||
}); | ||
@@ -214,0 +210,0 @@ } |
@@ -12,6 +12,5 @@ 'use strict'; | ||
} | ||
}; | ||
// lineBreak Schemes | ||
var brPat = /<\s*br(?:[\s/]*|\s[^>]*)>/gi; | ||
// lineBreak Schemes | ||
};var brPat = /<\s*br(?:[\s/]*|\s[^>]*)>/gi; | ||
var lineBreakSchemeMap = { | ||
@@ -23,6 +22,5 @@ 'unix': [/\n/g, '\n'], | ||
'xhtml': [brPat, '<br/>'] | ||
}; | ||
// skip Schemes | ||
var skipSchemeMap = { | ||
// skip Schemes | ||
};var skipSchemeMap = { | ||
'ansi-color': /\x1B\[[^m]*m/g, | ||
@@ -174,6 +172,6 @@ 'html': /<[^>]*>/g, | ||
} | ||
tabRepl = new Array(tabWidth + 1).join(' '); | ||
tabRepl = new Array(tabWidth + 1).join(' ' | ||
// Available options: 'all', 'multi', 'm\d+', 's\d+', 'none' | ||
if (params.respectLineBreaks) { | ||
);if (params.respectLineBreaks) { | ||
if (rlbMap[params.respectLineBreaks] || rlbSMPat.test(params.respectLineBreaks)) { | ||
@@ -180,0 +178,0 @@ respectLineBreaks = params.respectLineBreaks; |
{ | ||
"name": "cli-engine-command", | ||
"description": "base CLI command for cli-engine", | ||
"version": "4.0.4", | ||
"version": "4.0.5", | ||
"author": "Jeff Dickey @dickeyxxx", | ||
@@ -11,3 +11,3 @@ "bugs": "https://github.com/heroku/cli-engine-command/issues", | ||
"chalk": "^1.1.3", | ||
"cli-engine-config": "1.3.0", | ||
"cli-engine-config": "1.3.1", | ||
"fs-extra": "3.0.1", | ||
@@ -18,3 +18,2 @@ "http-call": "1.1.2", | ||
"netrc-parser": "2.0.2", | ||
"pretty-format": "20.0.3", | ||
"string": "3.3.3", | ||
@@ -21,0 +20,0 @@ "supports-color": "^3.2.3" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
136731
0.31%11
-8.33%1990
0.1%12
9.09%+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated