heroku-cli-util
Advanced tools
Comparing version 3.4.0 to 3.5.0
'use strict'; | ||
const defaultHost = 'heroku.com'; | ||
let config = require('rc')('heroku', { | ||
color: true, | ||
host: 'heroku.com', | ||
git_host: 'heroku.com', | ||
http_git_host: 'git.heroku.com', | ||
}); | ||
function host () { | ||
return process.env.HEROKU_HOST || defaultHost; | ||
} | ||
function gitHost () { | ||
return process.env.HEROKU_GIT_HOST || host(); | ||
} | ||
function httpGitHost () { | ||
return process.env.HEROKU_HTTP_GIT_HOST || `git.${host()}`; | ||
} | ||
exports.defaultHost = defaultHost; | ||
exports.host = host; | ||
exports.gitHost = gitHost; | ||
exports.httpGitHost = httpGitHost; | ||
module.exports = config; |
@@ -0,4 +1,4 @@ | ||
'use strict'; | ||
var console = require('./console'); | ||
var errors = require('./errors'); | ||
var config = require('./config'); | ||
var prompt = require('./prompt'); | ||
@@ -19,6 +19,4 @@ var output = require('./output'); | ||
exports.command = require('./command'); | ||
exports.defaultHost = config.defaultHost; | ||
exports.httpGitHost = config.httpGitHost; | ||
exports.gitHost = config.gitHost; | ||
exports.host = config.host; | ||
exports.config = require('./config'); | ||
exports.color = require('./color'); | ||
exports.action = output.action; |
'use strict'; | ||
let chalk = require('chalk'); | ||
let h = require('./'); | ||
function action (message, promise, options) { | ||
@@ -14,3 +15,3 @@ return new Promise(function (fulfill, reject) { | ||
}).catch(function (err) { | ||
console.error(chalk.red.bold('!!!')); | ||
console.error(h.color.red.bold('!!!')); | ||
reject(err); | ||
@@ -17,0 +18,0 @@ }); |
{ | ||
"name": "heroku-cli-util", | ||
"version": "3.4.0", | ||
"version": "3.5.0", | ||
"description": "Set of helpful CLI utilities", | ||
@@ -30,4 +30,5 @@ "main": "index.js", | ||
"heroku-client": "^1.10.0", | ||
"linewrap": "^0.2.1" | ||
"linewrap": "^0.2.1", | ||
"rc": "^1.0.1" | ||
} | ||
} |
'use strict'; | ||
let chalk = require('chalk'); | ||
let h = require('./'); | ||
let errors = require('./errors'); | ||
@@ -85,9 +85,9 @@ let util = require('./util'); | ||
} | ||
return reject(`Confirmation ${chalk.bold.red(confirm)} did not match ${chalk.bold.red(app)}. Aborted.`); | ||
return reject(`Confirmation ${h.color.bold.red(confirm)} did not match ${h.color.bold.red(app)}. Aborted.`); | ||
} | ||
if (!message) { | ||
message = `WARNING: Destructive Action\nThis command will affect the app ${chalk.bold.red(app)}`; | ||
message = `WARNING: Destructive Action\nThis command will affect the app ${h.color.bold.red(app)}`; | ||
} | ||
errors.warn(message); | ||
errors.warn(`To proceed, type ${chalk.bold.red(app)} or re-run this command with ${chalk.bold.red('--confirm', app)}`); | ||
errors.warn(`To proceed, type ${h.color.bold.red(app)} or re-run this command with ${h.color.bold.red('--confirm', app)}`); | ||
console.error(); | ||
@@ -98,3 +98,3 @@ prompt().then(function (confirm) { | ||
} | ||
return reject(`Confirmation did not match ${chalk.bold.red(app)}. Aborted.`); | ||
return reject(`Confirmation did not match ${h.color.bold.red(app)}. Aborted.`); | ||
}); | ||
@@ -101,0 +101,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25
20168
6
498
+ Addedrc@^1.0.1
+ Addeddeep-extend@0.6.0(transitive)
+ Addedini@1.3.8(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedrc@1.2.8(transitive)
+ Addedstrip-json-comments@2.0.1(transitive)