cli-ux
- Version 6.0.9
- Published
- 101 kB
- 25 dependencies
- MIT license
Install
npm i cli-ux
yarn add cli-ux
pnpm add cli-ux
Overview
cli IO utilities
Index
Variables
Classes
Interfaces
Namespaces
Variables
variable cli
const cli: { config: Config; warn: any; error: any; exit: any; readonly prompt: typeof import('./prompt').prompt; readonly anykey: typeof import('./prompt').anykey; readonly confirm: typeof import('./prompt').confirm; readonly action: ActionBase; readonly prideAction: ActionBase; styledObject(obj: any, keys?: string[] | undefined): void; readonly styledHeader: typeof import('./styled/header').default; readonly styledJSON: typeof import('./styled/json').default; readonly table: typeof Table.table; readonly tree: typeof import('./styled/tree').default; readonly open: typeof import('./open').default; readonly wait: (ms?: number) => Promise<unknown>; readonly progress: typeof import('./styled/progress').default; done(): Promise<void>; trace(format: string, ...args: string[]): void; debug(format: string, ...args: string[]): void; info(format: string, ...args: string[]): void; log(format?: string | undefined, ...args: string[]): void; url(text: string, uri: string, params?: {}): void; annotation(text: string, annotation: string): void; flush(): Promise<void>;};
variable config
const config: Config;
variable ux
const ux: { config: Config; warn: any; error: any; exit: any; readonly prompt: typeof import('./prompt').prompt; readonly anykey: typeof import('./prompt').anykey; readonly confirm: typeof import('./prompt').confirm; readonly action: ActionBase; readonly prideAction: ActionBase; styledObject(obj: any, keys?: string[] | undefined): void; readonly styledHeader: typeof import('./styled/header').default; readonly styledJSON: typeof import('./styled/json').default; readonly table: typeof Table.table; readonly tree: typeof import('./styled/tree').default; readonly open: typeof import('./open').default; readonly wait: (ms?: number) => Promise<unknown>; readonly progress: typeof import('./styled/progress').default; done(): Promise<void>; trace(format: string, ...args: string[]): void; debug(format: string, ...args: string[]): void; info(format: string, ...args: string[]): void; log(format?: string | undefined, ...args: string[]): void; url(text: string, uri: string, params?: {}): void; annotation(text: string, annotation: string): void; flush(): Promise<void>;};
Classes
class ActionBase
class ActionBase {}
property output
output: string;
property running
readonly running: boolean;
property status
status: string;
property std
std: 'stdout' | 'stderr';
property stdmocks
protected stdmocks?: ['stdout' | 'stderr', string[]][];
property task
task: ITask;
property type
type: ActionType;
method pause
pause: (fn: () => any, icon?: string) => any;
method pauseAsync
pauseAsync: (fn: () => Promise<any>, icon?: string) => Promise<any>;
method start
start: (action: string, status?: string, opts?: Options) => void;
method stop
stop: (msg?: string) => void;
class Config
class Config {}
property action
action: ActionBase;
property context
context: any;
property debug
debug: boolean;
property errorsHandled
errorsHandled: boolean;
property outputLevel
outputLevel: Levels;
property prideAction
prideAction: ActionBase;
property showStackTrace
showStackTrace: boolean;
class ExitError
class ExitError extends Error {}
constructor
constructor(status: number, error?: Error);
property 'cli-ux'
'cli-ux': { exit: number };
property code
code: string;
property error
error?: Error;
Interfaces
Namespaces
namespace Table.table
namespace Table.table {}
variable Flags
const Flags: { columns: Interfaces.OptionFlag<string>; sort: Interfaces.OptionFlag<string>; filter: Interfaces.OptionFlag<string>; csv: Interfaces.Flag<boolean>; output: Interfaces.OptionFlag<string>; extended: Interfaces.Flag<boolean>; 'no-truncate': Interfaces.Flag<boolean>; 'no-header': Interfaces.Flag<boolean>;};
function flags
flags: { (): IFlags; < Z extends | 'columns' | 'sort' | 'filter' | 'csv' | 'output' | 'extended' | 'no-truncate' | 'no-header' = | 'columns' | 'sort' | 'filter' | 'csv' | 'output' | 'extended' | 'no-truncate' | 'no-header' >(opts: { except: Z | Z[]; }): ExcludeFlags< { columns: Interfaces.OptionFlag<string>; sort: Interfaces.OptionFlag<string>; filter: Interfaces.OptionFlag<string>; csv: Interfaces.Flag<boolean>; output: Interfaces.OptionFlag<string>; extended: Interfaces.Flag<boolean>; 'no-truncate': Interfaces.Flag<boolean>; 'no-header': Interfaces.Flag<boolean>; }, Z >; < K extends | 'columns' | 'sort' | 'filter' | 'csv' | 'output' | 'extended' | 'no-truncate' | 'no-header' = | 'columns' | 'sort' | 'filter' | 'csv' | 'output' | 'extended' | 'no-truncate' | 'no-header' >(opts: { only: K | K[]; }): IncludeFlags< { columns: Interfaces.OptionFlag<string>; sort: Interfaces.OptionFlag<string>; filter: Interfaces.OptionFlag<string>; csv: Interfaces.Flag<boolean>; output: Interfaces.OptionFlag<string>; extended: Interfaces.Flag<boolean>; 'no-truncate': Interfaces.Flag<boolean>; 'no-header': Interfaces.Flag<boolean>; }, K >;};
interface Column
interface Column<T extends Record<string, unknown>> {}
interface Options
interface Options {}
property 'no-header'
'no-header'?: boolean;
property 'no-truncate'
'no-truncate'?: boolean;
property columns
columns?: string;
property extended
extended?: boolean;
property filter
filter?: string;
property output
output?: string;
property sort
sort?: string;
method printLine
printLine: (s: any) => any;
index signature
[key: string]: any;
type Columns
type Columns<T extends Record<string, unknown>> = { [key: string]: Partial<Column<T>>;};
Package Files (6)
Dependencies (25)
Dev Dependencies (23)
- @types/ansi-styles
- @types/chai
- @types/chai-as-promised
- @types/clean-stack
- @types/extract-stack
- @types/fs-extra
- @types/js-yaml
- @types/lodash
- @types/mocha
- @types/node
- @types/semver
- @types/strip-ansi
- @types/supports-color
- axios
- chai
- chai-as-promised
- eslint
- eslint-config-oclif
- eslint-config-oclif-typescript
- fancy-test
- mocha
- ts-node
- typescript
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/cli-ux
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/cli-ux)
- HTML<a href="https://www.jsdocs.io/package/cli-ux"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 1498 ms. - Missing or incorrect documentation? Open an issue for this package.