Comparing version 3.0.0-alpha.2 to 3.0.0-alpha.3
@@ -24,2 +24,4 @@ import { ActionBase } from './action/base'; | ||
table(...args: any[]): void; | ||
styledJSON(obj: any): void; | ||
styledHeader(header: string): void; | ||
prompt(name: string, options?: IPromptOptions): Promise<any>; | ||
@@ -26,0 +28,0 @@ confirm(message: string): Promise<boolean>; |
"use strict"; | ||
// tslint:disable no-console | ||
// tslint:disable restrict-plus-operands | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -44,2 +45,15 @@ const Rx = require("rxjs/Rx"); | ||
table(...args) { (require('./styled/table'))(...args); } | ||
styledJSON(obj) { | ||
let json = JSON.stringify(obj, null, 2); | ||
if (!deps_1.default.chalk.enabled) { | ||
this.log(json); | ||
return; | ||
} | ||
let cardinal = require('cardinal'); | ||
let theme = require('cardinal/themes/jq'); | ||
this.log(cardinal.highlight(json, { json: true, theme })); | ||
} | ||
styledHeader(header) { | ||
this.log(deps_1.default.chalk.dim('=== ') + deps_1.default.chalk.bold(header)); | ||
} | ||
prompt(name, options = {}) { | ||
@@ -46,0 +60,0 @@ return this.action.pauseAsync(() => { |
{ | ||
"name": "cli-ux", | ||
"description": "cli IO utilities", | ||
"version": "3.0.0-alpha.2", | ||
"version": "3.0.0-alpha.3", | ||
"author": "Jeff Dickey @jdxcode", | ||
@@ -11,2 +11,3 @@ "bugs": "https://github.com/dxcli/cli-ux/issues", | ||
"ansi-styles": "^3.2.0", | ||
"cardinal": "^1.0.0", | ||
"chalk": "^2.3.0", | ||
@@ -13,0 +14,0 @@ "fs-extra": "^5.0.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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
49591
1472
8
12
+ Addedcardinal@^1.0.0
+ Addedansicolors@0.2.1(transitive)
+ Addedcardinal@1.0.0(transitive)
+ Addedesprima@3.0.0(transitive)
+ Addedredeyed@1.0.1(transitive)