Comparing version 5.4.5 to 5.4.6
@@ -17,7 +17,10 @@ export interface ITask { | ||
stop(msg?: string): void; | ||
private readonly globals; | ||
task: ITask | undefined; | ||
protected output: string | undefined; | ||
readonly running: boolean; | ||
status: string | undefined; | ||
private get globals(); | ||
get task(): ITask | undefined; | ||
set task(task: ITask | undefined); | ||
protected get output(): string | undefined; | ||
protected set output(output: string | undefined); | ||
get running(): boolean; | ||
get status(): string | undefined; | ||
set status(status: string | undefined); | ||
pauseAsync(fn: () => Promise<any>, icon?: string): Promise<any>; | ||
@@ -24,0 +27,0 @@ pause(fn: () => any, icon?: string): any; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ActionBase = void 0; | ||
const tslib_1 = require("tslib"); | ||
@@ -4,0 +5,0 @@ const _ = tslib_1.__importStar(require("lodash")); |
@@ -14,6 +14,8 @@ import { ActionBase } from './action/base'; | ||
showStackTrace: boolean; | ||
debug: boolean; | ||
context: any; | ||
get debug(): boolean; | ||
set debug(v: boolean); | ||
get context(): any; | ||
set context(v: any); | ||
} | ||
export declare const config: Config; | ||
export default config; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.config = exports.Config = void 0; | ||
const tslib_1 = require("tslib"); | ||
@@ -4,0 +5,0 @@ const semver = tslib_1.__importStar(require("semver")); |
export declare const deps: { | ||
readonly stripAnsi: (string: string) => string; | ||
readonly ansiStyles: typeof import("ansi-styles"); | ||
readonly ansiStyles: { | ||
readonly modifier: import("ansi-styles").Modifier; | ||
readonly color: import("ansi-styles").ForegroundColor & import("ansi-styles").ColorBase; | ||
readonly bgColor: import("ansi-styles").BackgroundColor & import("ansi-styles").ColorBase; | ||
readonly codes: ReadonlyMap<number, number>; | ||
} & import("ansi-styles").BackgroundColor & import("ansi-styles").ForegroundColor & import("ansi-styles").Modifier; | ||
readonly ansiEscapes: any; | ||
@@ -5,0 +10,0 @@ readonly passwordPrompt: any; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.deps = void 0; | ||
const cache = {}; | ||
@@ -4,0 +5,0 @@ function fetch(s) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ExitError = void 0; | ||
class ExitError extends Error { | ||
@@ -4,0 +5,0 @@ constructor(status, error) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Table = exports.ExitError = exports.Config = exports.ActionBase = exports.config = exports.cli = exports.ux = void 0; | ||
const tslib_1 = require("tslib"); | ||
@@ -7,9 +8,9 @@ const Errors = tslib_1.__importStar(require("@oclif/errors")); | ||
const base_1 = require("./action/base"); | ||
exports.ActionBase = base_1.ActionBase; | ||
Object.defineProperty(exports, "ActionBase", { enumerable: true, get: function () { return base_1.ActionBase; } }); | ||
const config_1 = require("./config"); | ||
exports.config = config_1.config; | ||
exports.Config = config_1.Config; | ||
Object.defineProperty(exports, "config", { enumerable: true, get: function () { return config_1.config; } }); | ||
Object.defineProperty(exports, "Config", { enumerable: true, get: function () { return config_1.Config; } }); | ||
const deps_1 = tslib_1.__importDefault(require("./deps")); | ||
const exit_1 = require("./exit"); | ||
exports.ExitError = exit_1.ExitError; | ||
Object.defineProperty(exports, "ExitError", { enumerable: true, get: function () { return exit_1.ExitError; } }); | ||
const Table = tslib_1.__importStar(require("./styled/table")); | ||
@@ -16,0 +17,0 @@ exports.Table = Table; |
"use strict"; | ||
// tslint:disable | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.renderList = void 0; | ||
const tslib_1 = require("tslib"); | ||
@@ -5,0 +6,0 @@ const _ = tslib_1.__importStar(require("lodash")); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.anykey = exports.confirm = exports.prompt = void 0; | ||
const tslib_1 = require("tslib"); | ||
@@ -49,6 +50,8 @@ const errors_1 = require("@oclif/errors"); | ||
async function single(options) { | ||
var _a; | ||
const raw = process.stdin.isRaw; | ||
if (process.stdin.setRawMode) | ||
process.stdin.setRawMode(true); | ||
const response = await normal(Object.assign({ required: false }, options)); | ||
options.required = (_a = options.required) !== null && _a !== void 0 ? _a : false; | ||
const response = await normal(options); | ||
if (process.stdin.setRawMode) | ||
@@ -55,0 +58,0 @@ process.stdin.setRawMode(Boolean(raw)); |
@@ -11,6 +11,5 @@ "use strict"; | ||
// set noTTYOutput for options | ||
const isTTY = Boolean(process.env.TERM !== 'dumb' && process.stdin.isTTY); | ||
options.noTTYOutput = !isTTY; | ||
options.noTTYOutput = Boolean(process.env.TERM === 'dumb' || !process.stdin.isTTY); | ||
return new cliProgress.SingleBar(options); | ||
} | ||
exports.default = progress; |
import { flags as F } from '@oclif/command'; | ||
export declare function table<T extends object>(data: T[], columns: table.Columns<T>, options?: table.Options): void; | ||
export declare namespace table { | ||
const Flags: { | ||
export const Flags: { | ||
columns: F.IOptionFlag<string | undefined>; | ||
sort: F.IOptionFlag<string | undefined>; | ||
filter: F.IOptionFlag<string | undefined>; | ||
csv: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>; | ||
csv: F.IFlag<boolean>; | ||
output: F.IOptionFlag<string | undefined>; | ||
extended: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>; | ||
'no-truncate': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>; | ||
'no-header': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>; | ||
extended: F.IFlag<boolean>; | ||
'no-truncate': F.IFlag<boolean>; | ||
'no-header': F.IFlag<boolean>; | ||
}; | ||
@@ -17,13 +17,13 @@ type IFlags = typeof Flags; | ||
type IncludeFlags<T, K extends keyof T> = Pick<T, K>; | ||
function flags(): IFlags; | ||
function flags<Z extends keyof IFlags = keyof IFlags>(opts: { | ||
export function flags(): IFlags; | ||
export function flags<Z extends keyof IFlags = keyof IFlags>(opts: { | ||
except: Z | Z[]; | ||
}): ExcludeFlags<IFlags, Z>; | ||
function flags<K extends keyof IFlags = keyof IFlags>(opts: { | ||
export function flags<K extends keyof IFlags = keyof IFlags>(opts: { | ||
only: K | K[]; | ||
}): IncludeFlags<IFlags, K>; | ||
type Columns<T extends object> = { | ||
export type Columns<T extends object> = { | ||
[key: string]: Partial<Column<T>>; | ||
}; | ||
interface Column<T extends object> { | ||
export interface Column<T extends object> { | ||
header: string; | ||
@@ -34,3 +34,3 @@ extended: boolean; | ||
} | ||
interface Options { | ||
export interface Options { | ||
[key: string]: any; | ||
@@ -46,2 +46,3 @@ sort?: string; | ||
} | ||
export {}; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.table = void 0; | ||
const tslib_1 = require("tslib"); | ||
@@ -135,3 +136,3 @@ const command_1 = require("@oclif/command"); | ||
return columns.reduce((obj, col) => { | ||
return Object.assign({}, obj, { [col.key]: d[col.key] || '' }); | ||
return Object.assign(Object.assign({}, obj), { [col.key]: d[col.key] || '' }); | ||
}, {}); | ||
@@ -138,0 +139,0 @@ }); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const treeify = require('treeify'); | ||
exports.Tree = void 0; | ||
const treeify = require('object-treeify'); | ||
class Tree { | ||
@@ -32,3 +33,3 @@ constructor() { | ||
const tree = addNodes(this.nodes); | ||
logger(treeify.asTree(tree)); | ||
logger(treeify(tree)); | ||
} | ||
@@ -35,0 +36,0 @@ } |
{ | ||
"name": "cli-ux", | ||
"description": "cli IO utilities", | ||
"version": "5.4.5", | ||
"version": "5.4.6", | ||
"author": "Jeff Dickey @jdxcode", | ||
"bugs": "https://github.com/oclif/cli-ux/issues", | ||
"dependencies": { | ||
"@oclif/command": "^1.5.1", | ||
"@oclif/command": "^1.6.0", | ||
"@oclif/errors": "^1.2.1", | ||
"@oclif/linewrap": "^1.0.0", | ||
"@oclif/screen": "^1.0.3", | ||
"ansi-escapes": "^3.1.0", | ||
"ansi-styles": "^3.2.1", | ||
"ansi-escapes": "^4.3.0", | ||
"ansi-styles": "^4.2.0", | ||
"cardinal": "^2.1.1", | ||
@@ -26,2 +26,3 @@ "chalk": "^2.4.1", | ||
"natural-orderby": "^2.0.1", | ||
"object-treeify": "^1.1.4", | ||
"password-prompt": "^1.1.2", | ||
@@ -33,3 +34,2 @@ "semver": "^5.6.0", | ||
"supports-hyperlinks": "^1.0.1", | ||
"treeify": "^1.1.0", | ||
"tslib": "^1.9.3" | ||
@@ -62,3 +62,3 @@ }, | ||
"ts-node": "^8.0.3", | ||
"typescript": "^3.1.4" | ||
"typescript": "^3.8.3" | ||
}, | ||
@@ -65,0 +65,0 @@ "engines": { |
@@ -98,4 +98,3 @@ cli-ux | ||
```typescript | ||
// start the spinner | ||
cli.annotation('sometest', 'annotated with this text') | ||
cli.annotation('sometext', 'annotated with this text') | ||
``` | ||
@@ -327,2 +326,1 @@ | ||
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
94420
1918
325
+ Addedobject-treeify@^1.1.4
+ Addedobject-treeify@1.1.33(transitive)
- Removedtreeify@^1.1.0
- Removedansi-escapes@3.2.0(transitive)
- Removedtreeify@1.1.0(transitive)
Updated@oclif/command@^1.6.0
Updatedansi-escapes@^4.3.0
Updatedansi-styles@^4.2.0