@boost/cli
Advanced tools
Comparing version 2.9.0 to 2.9.1
@@ -6,2 +6,14 @@ # Change Log | ||
### 2.9.1 - 2021-02-08 | ||
#### π Internals | ||
- Sort type hints and aliases. ([1c49e33](https://github.com/milesj/boost/commit/1c49e33)) | ||
**Note:** Version bump only for package @boost/cli | ||
## 2.9.0 - 2021-01-16 | ||
@@ -8,0 +20,0 @@ |
@@ -22,3 +22,3 @@ import React from 'react'; | ||
static path: string; | ||
static usage: string | string[]; | ||
static usage: string[] | string; | ||
help: boolean; | ||
@@ -82,3 +82,3 @@ locale: string; | ||
*/ | ||
abstract run(...params: P): RunResult | Promise<RunResult>; | ||
abstract run(...params: P): Promise<RunResult> | RunResult; | ||
/** | ||
@@ -85,0 +85,0 @@ * Return the program instance or fail. |
@@ -19,5 +19,5 @@ import React from 'react'; | ||
renderParams(params: ParamConfigList): JSX.Element; | ||
renderUsage(usage: string | string[]): JSX.Element; | ||
renderUsage(usage: string[] | string): JSX.Element; | ||
render(): JSX.Element; | ||
} | ||
//# sourceMappingURL=Help.d.ts.map |
@@ -5,7 +5,7 @@ import React from 'react'; | ||
export declare type SelectOptionLike<T> = { | ||
divider: boolean; | ||
label?: NonNullable<React.ReactNode>; | ||
} | { | ||
label: NonNullable<React.ReactNode>; | ||
value: T; | ||
} | { | ||
divider: boolean; | ||
label?: NonNullable<React.ReactNode>; | ||
}; | ||
@@ -20,3 +20,3 @@ export interface SelectOption<T> { | ||
defaultSelected?: T; | ||
options: (V | SelectOptionLike<V>)[]; | ||
options: (SelectOptionLike<V> | V)[]; | ||
} | ||
@@ -23,0 +23,0 @@ export declare function normalizeOptions<T>(options: SelectProps<unknown>['options']): SelectOption<T>[]; |
@@ -18,6 +18,6 @@ /// <reference types="node" /> | ||
export interface Categories { | ||
[name: string]: string | Category; | ||
[name: string]: Category | string; | ||
} | ||
export declare type ExitCode = number; | ||
export declare type ExitHandler = (error?: string | Error, code?: ExitCode) => void; | ||
export declare type ExitHandler = (error?: Error | string, code?: ExitCode) => void; | ||
export interface ProgramOptions { | ||
@@ -42,3 +42,3 @@ banner?: string; | ||
} | ||
export declare type RunResult = void | undefined | string | React.ReactElement; | ||
export declare type RunResult = React.ReactElement | string | undefined | void; | ||
export declare type CommandPath = string; | ||
@@ -69,3 +69,3 @@ export interface CommandConfig extends BaseCommandConfig { | ||
export interface Commandable<O extends object = any, P extends PrimitiveType[] = any[]> { | ||
createHelp: () => string | React.ReactElement; | ||
createHelp: () => React.ReactElement | string; | ||
getMetadata: () => CommandMetadata; | ||
@@ -75,3 +75,3 @@ getParserOptions: () => ParserOptions<O, P>; | ||
render: (element: React.ReactElement) => Promise<void>; | ||
run: (...params: P) => RunResult | Promise<RunResult>; | ||
run: (...params: P) => Promise<RunResult> | RunResult; | ||
} | ||
@@ -82,3 +82,3 @@ export interface ProxyCommandConfig<O extends object, P extends PrimitiveType[]> extends Omit<CommandConfig, 'options' | 'params' | 'path'> { | ||
} | ||
export declare type ProxyCommandRunner<O extends object, P extends PrimitiveType[]> = (options: O, params: P, rest: string[]) => RunResult | Promise<RunResult>; | ||
export declare type ProxyCommandRunner<O extends object, P extends PrimitiveType[]> = (options: O, params: P, rest: string[]) => Promise<RunResult> | RunResult; | ||
export declare type TaskContext<O extends GlobalOptions = GlobalOptions> = O & { | ||
@@ -85,0 +85,0 @@ exit: ExitHandler; |
@@ -0,1 +1,3 @@ | ||
// Generated with Packemon: https://packemon.dev | ||
// Platform: node, Support: stable, Format: lib | ||
'use strict'; | ||
@@ -16,3 +18,5 @@ | ||
var index_ts = require('./index.js'); | ||
/* eslint-disable unicorn/import-index, no-param-reassign, jest/prefer-spy-on */ | ||
class MockReadStream { | ||
@@ -82,3 +86,4 @@ constructor() { | ||
if (options) { | ||
Object.assign(command, options); | ||
Object.assign(command, options); // @ts-expect-error | ||
command[index_ts.INTERNAL_OPTIONS] = { | ||
@@ -138,4 +143,7 @@ help: false, | ||
program.streams.stdin = new MockReadStream(); | ||
} | ||
} // Ink async rendering never resolves while testing, | ||
// as it relies on system signals to "exit". | ||
// So we set this to flag the renderer to avoid awaiting. | ||
internal.env('CLI_TEST_ONLY', 'true'); | ||
@@ -142,0 +150,0 @@ const code = await program.run(argv); |
{ | ||
"name": "@boost/cli", | ||
"version": "2.9.0", | ||
"version": "2.9.1", | ||
"release": "1594765247526", | ||
@@ -34,9 +34,9 @@ "description": "An interactive command line program builder, powered by React and Ink.", | ||
"dependencies": { | ||
"@boost/args": "^2.3.0", | ||
"@boost/common": "^2.5.0", | ||
"@boost/event": "^2.3.0", | ||
"@boost/internal": "^2.2.0", | ||
"@boost/log": "^2.2.0", | ||
"@boost/args": "^2.3.1", | ||
"@boost/common": "^2.5.1", | ||
"@boost/event": "^2.3.1", | ||
"@boost/internal": "^2.2.1", | ||
"@boost/log": "^2.2.1", | ||
"@boost/terminal": "^2.2.0", | ||
"@boost/translate": "^2.2.0", | ||
"@boost/translate": "^2.2.1", | ||
"execa": "^5.0.0", | ||
@@ -63,3 +63,3 @@ "levenary": "^1.1.1", | ||
}, | ||
"gitHead": "e2c452ee0c15aa7db91d1945e23ac6951028e672" | ||
"gitHead": "3aa9bda270786e931a90e927375c33dddffed14d" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
182602
3507
Updated@boost/args@^2.3.1
Updated@boost/common@^2.5.1
Updated@boost/event@^2.3.1
Updated@boost/internal@^2.2.1
Updated@boost/log@^2.2.1
Updated@boost/translate@^2.2.1