Comparing version 2.0.7 to 2.0.8
@@ -11,3 +11,3 @@ "use strict"; | ||
const ansiStyles = require("ansi-styles"); | ||
const chalk = require("chalk"); | ||
const chalk_1 = require("chalk"); | ||
function color(s) { | ||
@@ -17,3 +17,3 @@ if (!supportsColor) | ||
let has256 = supportsColor.has256 || (process.env.TERM || '').indexOf('256') !== -1; | ||
return has256 ? '\u001b[38;5;104m' + s + ansiStyles.reset.open : chalk.magenta(s); | ||
return has256 ? '\u001b[38;5;104m' + s + ansiStyles.reset.open : chalk_1.default.magenta(s); | ||
} | ||
@@ -20,0 +20,0 @@ class SpinnerAction extends base_1.ActionBase { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const util = require("util"); | ||
const chalk = require("chalk"); | ||
const chalk_1 = require("chalk"); | ||
const base_1 = require("./base"); | ||
@@ -75,7 +75,7 @@ const exit_error_1 = require("./exit_error"); | ||
else { | ||
let bang = chalk.red(arrow); | ||
let bang = chalk_1.default.red(arrow); | ||
if (options.severity === 'fatal') | ||
bang = chalk.bgRed.bold.white(' FATAL '); | ||
bang = chalk_1.default.bgRed.bold.white(' FATAL '); | ||
if (options.severity === 'warn') | ||
bang = chalk.yellow(arrow); | ||
bang = chalk_1.default.yellow(arrow); | ||
this.stderr.log(bangify(wrap(prefix + getErrorMessage(err)), bang)); | ||
@@ -82,0 +82,0 @@ } |
@@ -8,3 +8,3 @@ "use strict"; | ||
const config_1 = require("./config"); | ||
const chalk = require("chalk"); | ||
const chalk_1 = require("chalk"); | ||
class CLI extends base_2.Base { | ||
@@ -14,3 +14,3 @@ constructor() { | ||
if (config_1.Config.mock) | ||
chalk.enabled = false; | ||
chalk_1.default.enabled = false; | ||
} | ||
@@ -37,3 +37,3 @@ get Prompt() { | ||
return this.Prompt.prompt(name, options); | ||
}, chalk.cyan('?')); | ||
}, chalk_1.default.cyan('?')); | ||
} | ||
@@ -48,3 +48,3 @@ log(data, ...args) { | ||
return this.Errors.warn(err, options); | ||
}, chalk.bold.yellow('!')); | ||
}, chalk_1.default.bold.yellow('!')); | ||
} | ||
@@ -54,3 +54,3 @@ error(err, options = {}) { | ||
return this.Errors.error(err, options); | ||
}, chalk.bold.red('!')); | ||
}, chalk_1.default.bold.red('!')); | ||
} | ||
@@ -66,3 +66,3 @@ exit(code = 1) { | ||
let json = JSON.stringify(obj, null, 2); | ||
if (chalk.enabled) { | ||
if (chalk_1.default.enabled) { | ||
let cardinal = require('cardinal'); | ||
@@ -77,3 +77,3 @@ let theme = require('cardinal/themes/jq'); | ||
styledHeader(header) { | ||
this.log(chalk.dim('=== ') + chalk.bold(header)); | ||
this.log(chalk_1.default.dim('=== ') + chalk_1.default.bold(header)); | ||
} | ||
@@ -98,3 +98,3 @@ styledObject(obj, keys) { | ||
let logKeyValue = (key, value) => { | ||
this.log(`${chalk.blue(key)}:` + ' '.repeat(maxKeyLength - key.length - 1) + pp(value)); | ||
this.log(`${chalk_1.default.blue(key)}:` + ' '.repeat(maxKeyLength - key.length - 1) + pp(value)); | ||
}; | ||
@@ -101,0 +101,0 @@ for (var key of keys || Object.keys(obj).sort()) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const base_1 = require("./base"); | ||
const chalk = require("chalk"); | ||
const chalk_1 = require("chalk"); | ||
const passwordPrompt = require('password-prompt'); | ||
class Prompt extends base_1.Base { | ||
prompt(name, inputOptions = {}) { | ||
const options = Object.assign({ isTTY: !!(process.env.TERM !== 'dumb' && process.stdin.isTTY), name, prompt: name ? chalk.dim(`${name}: `) : chalk.dim('> '), type: 'normal' }, inputOptions); | ||
const options = Object.assign({ isTTY: !!(process.env.TERM !== 'dumb' && process.stdin.isTTY), name, prompt: name ? chalk_1.default.dim(`${name}: `) : chalk_1.default.dim('> '), type: 'normal' }, inputOptions); | ||
switch (options.type) { | ||
@@ -10,0 +10,0 @@ case 'normal': |
{ | ||
"name": "cli-ux", | ||
"description": "set of CLI output utilities", | ||
"version": "2.0.7", | ||
"version": "2.0.8", | ||
"author": "Jeff Dickey", | ||
@@ -12,18 +12,17 @@ "bugs": "https://github.com/jdxcode/cli-ux/issues", | ||
"cardinal": "^1.0.0", | ||
"chalk": "^2.1.0", | ||
"fs-extra": "^4.0.2", | ||
"chalk": "^2.3.0", | ||
"fs-extra": "^5.0.0", | ||
"lodash": "^4.17.4", | ||
"moment": "^2.18.1", | ||
"moment": "^2.20.0", | ||
"password-prompt": "^1.0.3", | ||
"strip-ansi": "^4.0.0", | ||
"supports-color": "^4.4.0", | ||
"ts-lodash": "^4.0.5" | ||
"supports-color": "^5.1.0", | ||
"ts-lodash": "^4.0.6" | ||
}, | ||
"devDependencies": { | ||
"@types/ansi-styles": "^2.0.30", | ||
"@types/chalk": "^0.4.31", | ||
"@types/fs-extra": "^4.0.2", | ||
"@types/jest": "^20.0.8", | ||
"@types/lodash": "^4.14.74", | ||
"@types/node": "^8.0.28", | ||
"@types/fs-extra": "^5.0.0", | ||
"@types/jest": "^21.1.8", | ||
"@types/lodash": "^4.14.91", | ||
"@types/node": "^8.5.1", | ||
"@types/strip-ansi": "^3.0.0", | ||
@@ -34,11 +33,11 @@ "@types/supports-color": "^3.1.0", | ||
"husky": "^0.14.3", | ||
"jest": "^21.1.0", | ||
"lint-staged": "^4.2.1", | ||
"prettier": "^1.7.0", | ||
"jest": "^21.2.1", | ||
"lint-staged": "^6.0.0", | ||
"prettier": "^1.9.2", | ||
"remap-istanbul": "^0.9.5", | ||
"rimraf": "^2.6.2", | ||
"std-mocks": "^1.0.1", | ||
"ts-jest": "^21.0.1", | ||
"ts-node": "^3.3.0", | ||
"typescript": "^2.5.2" | ||
"ts-jest": "^21.2.4", | ||
"ts-node": "^4.0.2", | ||
"typescript": "^2.6.2" | ||
}, | ||
@@ -45,0 +44,0 @@ "files": [ |
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
46871
19
+ Addedfs-extra@5.0.0(transitive)
- Removedfs-extra@4.0.3(transitive)
- Removedhas-flag@2.0.0(transitive)
- Removedsupports-color@4.5.0(transitive)
Updatedchalk@^2.3.0
Updatedfs-extra@^5.0.0
Updatedmoment@^2.20.0
Updatedsupports-color@^5.1.0
Updatedts-lodash@^4.0.6