Socket
Socket
Sign inDemoInstall

heroku-cli-util

Package Overview
Dependencies
Maintainers
2
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

heroku-cli-util - npm Package Compare versions

Comparing version 3.2.0 to 3.4.0

5

command.js

@@ -28,6 +28,3 @@ 'use strict';

process.chdir(context.cwd);
let handleErr = h.errorHandler({
logPath: context.herokuDir + '/error.log',
stackTrace: true,
});
let handleErr = h.errorHandler({logPath: context.herokuDir+'/error.log'});
let run = function () {

@@ -34,0 +31,0 @@ co.wrap(fn)(context, heroku(context))

45

errors.js

@@ -22,10 +22,2 @@ 'use strict';

function error (msg) {
console.error(bangify(wrap(msg)));
}
function warn (msg) {
console.error(bangify(wrap(msg)));
}
function getErrorMessage (err) {

@@ -49,2 +41,10 @@ if (err.body) {

function error (err) {
console.error(bangify(wrap(getErrorMessage(err))));
}
function warn (msg) {
console.error(bangify(wrap(msg)));
}
function logtimestamp() {

@@ -57,6 +57,5 @@ return new Date().toISOString()

function logErr(err, logPath) {
function log(msg, logPath) {
let fs = require('fs');
fs.appendFileSync(logPath, logtimestamp() + ' ' + err.stack + '\n');
error(`See ${logPath}` + logPath + ' for more info.');
fs.appendFileSync(logPath, logtimestamp() + ' ' + msg + '\n');
}

@@ -67,16 +66,20 @@

options = options || {};
error(getErrorMessage(err));
if (!err.body && options.stackTrace && err.stack) {
if (options.logPath) {
logErr(err, options.logPath);
} else {
console.error(err.stack);
error(err);
if (options.logPath) {
if (err.stack) {
log(err.stack, options.logPath);
}
if (err.body) {
log(JSON.stringify(err.body), options.logPath);
}
//error(`See ${options.logPath} for more info.`);
}
process.exit(1);
if (options.exit !== false) {
process.exit(1);
}
};
}
module.exports.error = error;
module.exports.warn = warn;
module.exports.errorHandler = errorHandler;
module.exports.error = error;
module.exports.warn = warn;
module.exports.errorHandler = errorHandler;

@@ -7,18 +7,18 @@ var console = require('./console');

exports.run = require('./run');
exports.log = console.log.bind(console);
exports.formatDate = require('./date').formatDate;
exports.error = errors.error;
exports.warn = errors.warn;
exports.errorHandler = errors.errorHandler;
exports.columnify = require('./columnify');
exports.console = console;
exports.prompt = prompt.prompt;
exports.confirmApp = prompt.confirmApp;
exports.preauth = require('./preauth');
exports.command = require('./command');
exports.defaultHost = config.defaultHost;
exports.httpGitHost = config.httpGitHost;
exports.gitHost = config.gitHost;
exports.host = config.host;
exports.action = output.action;
exports.run = require('./run');
exports.log = console.log.bind(console);
exports.formatDate = require('./date').formatDate;
exports.error = errors.error;
exports.warn = errors.warn;
exports.errorHandler = errors.errorHandler;
exports.columnify = require('./columnify');
exports.console = console;
exports.prompt = prompt.prompt;
exports.confirmApp = prompt.confirmApp;
exports.preauth = require('./preauth');
exports.command = require('./command');
exports.defaultHost = config.defaultHost;
exports.httpGitHost = config.httpGitHost;
exports.gitHost = config.gitHost;
exports.host = config.host;
exports.action = output.action;
{
"name": "heroku-cli-util",
"version": "3.2.0",
"version": "3.4.0",
"description": "Set of helpful CLI utilities",

@@ -5,0 +5,0 @@ "main": "index.js",

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