@bemoje/cli 0.0.13 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/arg/ArgumentBuilder.js +0 -8
- package/cjs/arg/ArgumentBuilder.js.map +1 -1
- package/cjs/cmd/CommandBuilder.js +8 -24
- package/cjs/cmd/CommandBuilder.js.map +1 -1
- package/cjs/index.js +0 -28
- package/cjs/index.js.map +1 -1
- package/esm/arg/ArgumentBuilder.js +0 -8
- package/esm/arg/ArgumentBuilder.js.map +1 -1
- package/esm/cmd/CommandBuilder.js +8 -24
- package/esm/cmd/CommandBuilder.js.map +1 -1
- package/esm/index.js +0 -28
- package/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/types/arg/ArgumentBuilder.d.ts +0 -11
- package/types/arg/ArgumentBuilder.d.ts.map +1 -1
- package/types/cmd/CommandBuilder.d.ts +0 -1
- package/types/cmd/CommandBuilder.d.ts.map +1 -1
- package/types/index.d.ts +0 -28
- package/types/index.d.ts.map +1 -1
- package/cjs/prompt/additions/commandSearchPrompt/commandSearchPrompt.js +0 -39
- package/cjs/prompt/additions/commandSearchPrompt/commandSearchPrompt.js.map +0 -1
- package/cjs/prompt/additions/commandSearchPrompt/core/ICommandSearchPromptResult.js +0 -3
- package/cjs/prompt/additions/commandSearchPrompt/core/ICommandSearchPromptResult.js.map +0 -1
- package/cjs/prompt/additions/commandSearchPrompt/core/createCommandSearchPromptObject.js +0 -34
- package/cjs/prompt/additions/commandSearchPrompt/core/createCommandSearchPromptObject.js.map +0 -1
- package/cjs/prompt/additions/searchPrompt/core/ISearchPromptChoiceMetaData.js +0 -3
- package/cjs/prompt/additions/searchPrompt/core/ISearchPromptChoiceMetaData.js.map +0 -1
- package/cjs/prompt/additions/searchPrompt/core/ISearchPromptMetaData.js +0 -3
- package/cjs/prompt/additions/searchPrompt/core/ISearchPromptMetaData.js.map +0 -1
- package/cjs/prompt/additions/searchPrompt/core/ISearchPromptOptions.js +0 -3
- package/cjs/prompt/additions/searchPrompt/core/ISearchPromptOptions.js.map +0 -1
- package/cjs/prompt/additions/searchPrompt/core/ISearchPromptResult.js +0 -3
- package/cjs/prompt/additions/searchPrompt/core/ISearchPromptResult.js.map +0 -1
- package/cjs/prompt/additions/searchPrompt/core/PROMPT_META_DATA.js +0 -5
- package/cjs/prompt/additions/searchPrompt/core/PROMPT_META_DATA.js.map +0 -1
- package/cjs/prompt/additions/searchPrompt/core/createSearchPromptObject.js +0 -177
- package/cjs/prompt/additions/searchPrompt/core/createSearchPromptObject.js.map +0 -1
- package/cjs/prompt/additions/searchPrompt/core/getSearchPromptMetaData.js +0 -12
- package/cjs/prompt/additions/searchPrompt/core/getSearchPromptMetaData.js.map +0 -1
- package/cjs/prompt/additions/searchPrompt/searchPrompt.js +0 -37
- package/cjs/prompt/additions/searchPrompt/searchPrompt.js.map +0 -1
- package/cjs/prompt/core/AbstractUserPrompt.js +0 -88
- package/cjs/prompt/core/AbstractUserPrompt.js.map +0 -1
- package/cjs/prompt/core/AutoCompleteMultiSelectPrompt.js +0 -90
- package/cjs/prompt/core/AutoCompleteMultiSelectPrompt.js.map +0 -1
- package/cjs/prompt/core/AutocompletePrompt.js +0 -111
- package/cjs/prompt/core/AutocompletePrompt.js.map +0 -1
- package/cjs/prompt/core/ConfirmPrompt.js +0 -34
- package/cjs/prompt/core/ConfirmPrompt.js.map +0 -1
- package/cjs/prompt/core/DatePrompt.js +0 -58
- package/cjs/prompt/core/DatePrompt.js.map +0 -1
- package/cjs/prompt/core/InvisiblePrompt.js +0 -49
- package/cjs/prompt/core/InvisiblePrompt.js.map +0 -1
- package/cjs/prompt/core/ListPrompt.js +0 -56
- package/cjs/prompt/core/ListPrompt.js.map +0 -1
- package/cjs/prompt/core/MultiSelectPrompt.js +0 -90
- package/cjs/prompt/core/MultiSelectPrompt.js.map +0 -1
- package/cjs/prompt/core/NumberPrompt.js +0 -70
- package/cjs/prompt/core/NumberPrompt.js.map +0 -1
- package/cjs/prompt/core/PasswordPrompt.js +0 -49
- package/cjs/prompt/core/PasswordPrompt.js.map +0 -1
- package/cjs/prompt/core/SearchPrompt.js +0 -112
- package/cjs/prompt/core/SearchPrompt.js.map +0 -1
- package/cjs/prompt/core/SelectPrompt.js +0 -62
- package/cjs/prompt/core/SelectPrompt.js.map +0 -1
- package/cjs/prompt/core/TextPrompt.js +0 -49
- package/cjs/prompt/core/TextPrompt.js.map +0 -1
- package/cjs/prompt/core/TogglePrompt.js +0 -48
- package/cjs/prompt/core/TogglePrompt.js.map +0 -1
- package/cjs/prompt/core/types.js +0 -3
- package/cjs/prompt/core/types.js.map +0 -1
- package/cjs/prompt/example.js +0 -117
- package/cjs/prompt/example.js.map +0 -1
- package/cjs/prompt/prompt.js +0 -62
- package/cjs/prompt/prompt.js.map +0 -1
- package/esm/prompt/additions/commandSearchPrompt/commandSearchPrompt.js +0 -32
- package/esm/prompt/additions/commandSearchPrompt/commandSearchPrompt.js.map +0 -1
- package/esm/prompt/additions/commandSearchPrompt/core/ICommandSearchPromptResult.js +0 -2
- package/esm/prompt/additions/commandSearchPrompt/core/ICommandSearchPromptResult.js.map +0 -1
- package/esm/prompt/additions/commandSearchPrompt/core/createCommandSearchPromptObject.js +0 -27
- package/esm/prompt/additions/commandSearchPrompt/core/createCommandSearchPromptObject.js.map +0 -1
- package/esm/prompt/additions/searchPrompt/core/ISearchPromptChoiceMetaData.js +0 -2
- package/esm/prompt/additions/searchPrompt/core/ISearchPromptChoiceMetaData.js.map +0 -1
- package/esm/prompt/additions/searchPrompt/core/ISearchPromptMetaData.js +0 -2
- package/esm/prompt/additions/searchPrompt/core/ISearchPromptMetaData.js.map +0 -1
- package/esm/prompt/additions/searchPrompt/core/ISearchPromptOptions.js +0 -2
- package/esm/prompt/additions/searchPrompt/core/ISearchPromptOptions.js.map +0 -1
- package/esm/prompt/additions/searchPrompt/core/ISearchPromptResult.js +0 -2
- package/esm/prompt/additions/searchPrompt/core/ISearchPromptResult.js.map +0 -1
- package/esm/prompt/additions/searchPrompt/core/PROMPT_META_DATA.js +0 -2
- package/esm/prompt/additions/searchPrompt/core/PROMPT_META_DATA.js.map +0 -1
- package/esm/prompt/additions/searchPrompt/core/createSearchPromptObject.js +0 -173
- package/esm/prompt/additions/searchPrompt/core/createSearchPromptObject.js.map +0 -1
- package/esm/prompt/additions/searchPrompt/core/getSearchPromptMetaData.js +0 -8
- package/esm/prompt/additions/searchPrompt/core/getSearchPromptMetaData.js.map +0 -1
- package/esm/prompt/additions/searchPrompt/searchPrompt.js +0 -30
- package/esm/prompt/additions/searchPrompt/searchPrompt.js.map +0 -1
- package/esm/prompt/core/AbstractUserPrompt.js +0 -81
- package/esm/prompt/core/AbstractUserPrompt.js.map +0 -1
- package/esm/prompt/core/AutoCompleteMultiSelectPrompt.js +0 -86
- package/esm/prompt/core/AutoCompleteMultiSelectPrompt.js.map +0 -1
- package/esm/prompt/core/AutocompletePrompt.js +0 -107
- package/esm/prompt/core/AutocompletePrompt.js.map +0 -1
- package/esm/prompt/core/ConfirmPrompt.js +0 -30
- package/esm/prompt/core/ConfirmPrompt.js.map +0 -1
- package/esm/prompt/core/DatePrompt.js +0 -54
- package/esm/prompt/core/DatePrompt.js.map +0 -1
- package/esm/prompt/core/InvisiblePrompt.js +0 -45
- package/esm/prompt/core/InvisiblePrompt.js.map +0 -1
- package/esm/prompt/core/ListPrompt.js +0 -52
- package/esm/prompt/core/ListPrompt.js.map +0 -1
- package/esm/prompt/core/MultiSelectPrompt.js +0 -86
- package/esm/prompt/core/MultiSelectPrompt.js.map +0 -1
- package/esm/prompt/core/NumberPrompt.js +0 -66
- package/esm/prompt/core/NumberPrompt.js.map +0 -1
- package/esm/prompt/core/PasswordPrompt.js +0 -45
- package/esm/prompt/core/PasswordPrompt.js.map +0 -1
- package/esm/prompt/core/SearchPrompt.js +0 -108
- package/esm/prompt/core/SearchPrompt.js.map +0 -1
- package/esm/prompt/core/SelectPrompt.js +0 -58
- package/esm/prompt/core/SelectPrompt.js.map +0 -1
- package/esm/prompt/core/TextPrompt.js +0 -45
- package/esm/prompt/core/TextPrompt.js.map +0 -1
- package/esm/prompt/core/TogglePrompt.js +0 -44
- package/esm/prompt/core/TogglePrompt.js.map +0 -1
- package/esm/prompt/core/types.js +0 -2
- package/esm/prompt/core/types.js.map +0 -1
- package/esm/prompt/example.js +0 -112
- package/esm/prompt/example.js.map +0 -1
- package/esm/prompt/prompt.js +0 -59
- package/esm/prompt/prompt.js.map +0 -1
- package/types/prompt/additions/commandSearchPrompt/commandSearchPrompt.d.ts +0 -21
- package/types/prompt/additions/commandSearchPrompt/commandSearchPrompt.d.ts.map +0 -1
- package/types/prompt/additions/commandSearchPrompt/core/ICommandSearchPromptResult.d.ts +0 -5
- package/types/prompt/additions/commandSearchPrompt/core/ICommandSearchPromptResult.d.ts.map +0 -1
- package/types/prompt/additions/commandSearchPrompt/core/createCommandSearchPromptObject.d.ts +0 -13
- package/types/prompt/additions/commandSearchPrompt/core/createCommandSearchPromptObject.d.ts.map +0 -1
- package/types/prompt/additions/searchPrompt/core/ISearchPromptChoiceMetaData.d.ts +0 -5
- package/types/prompt/additions/searchPrompt/core/ISearchPromptChoiceMetaData.d.ts.map +0 -1
- package/types/prompt/additions/searchPrompt/core/ISearchPromptMetaData.d.ts +0 -9
- package/types/prompt/additions/searchPrompt/core/ISearchPromptMetaData.d.ts.map +0 -1
- package/types/prompt/additions/searchPrompt/core/ISearchPromptOptions.d.ts +0 -44
- package/types/prompt/additions/searchPrompt/core/ISearchPromptOptions.d.ts.map +0 -1
- package/types/prompt/additions/searchPrompt/core/ISearchPromptResult.d.ts +0 -6
- package/types/prompt/additions/searchPrompt/core/ISearchPromptResult.d.ts.map +0 -1
- package/types/prompt/additions/searchPrompt/core/PROMPT_META_DATA.d.ts +0 -4
- package/types/prompt/additions/searchPrompt/core/PROMPT_META_DATA.d.ts.map +0 -1
- package/types/prompt/additions/searchPrompt/core/createSearchPromptObject.d.ts +0 -13
- package/types/prompt/additions/searchPrompt/core/createSearchPromptObject.d.ts.map +0 -1
- package/types/prompt/additions/searchPrompt/core/getSearchPromptMetaData.d.ts +0 -4
- package/types/prompt/additions/searchPrompt/core/getSearchPromptMetaData.d.ts.map +0 -1
- package/types/prompt/additions/searchPrompt/searchPrompt.d.ts +0 -21
- package/types/prompt/additions/searchPrompt/searchPrompt.d.ts.map +0 -1
- package/types/prompt/core/AbstractUserPrompt.d.ts +0 -55
- package/types/prompt/core/AbstractUserPrompt.d.ts.map +0 -1
- package/types/prompt/core/AutoCompleteMultiSelectPrompt.d.ts +0 -54
- package/types/prompt/core/AutoCompleteMultiSelectPrompt.d.ts.map +0 -1
- package/types/prompt/core/AutocompletePrompt.d.ts +0 -66
- package/types/prompt/core/AutocompletePrompt.d.ts.map +0 -1
- package/types/prompt/core/ConfirmPrompt.d.ts +0 -21
- package/types/prompt/core/ConfirmPrompt.d.ts.map +0 -1
- package/types/prompt/core/DatePrompt.d.ts +0 -37
- package/types/prompt/core/DatePrompt.d.ts.map +0 -1
- package/types/prompt/core/InvisiblePrompt.d.ts +0 -30
- package/types/prompt/core/InvisiblePrompt.d.ts.map +0 -1
- package/types/prompt/core/ListPrompt.d.ts +0 -34
- package/types/prompt/core/ListPrompt.d.ts.map +0 -1
- package/types/prompt/core/MultiSelectPrompt.d.ts +0 -54
- package/types/prompt/core/MultiSelectPrompt.d.ts.map +0 -1
- package/types/prompt/core/NumberPrompt.d.ts +0 -42
- package/types/prompt/core/NumberPrompt.d.ts.map +0 -1
- package/types/prompt/core/PasswordPrompt.d.ts +0 -30
- package/types/prompt/core/PasswordPrompt.d.ts.map +0 -1
- package/types/prompt/core/SearchPrompt.d.ts +0 -71
- package/types/prompt/core/SearchPrompt.d.ts.map +0 -1
- package/types/prompt/core/SelectPrompt.d.ts +0 -38
- package/types/prompt/core/SelectPrompt.d.ts.map +0 -1
- package/types/prompt/core/TextPrompt.d.ts +0 -30
- package/types/prompt/core/TextPrompt.d.ts.map +0 -1
- package/types/prompt/core/TogglePrompt.d.ts +0 -29
- package/types/prompt/core/TogglePrompt.d.ts.map +0 -1
- package/types/prompt/core/types.d.ts +0 -215
- package/types/prompt/core/types.d.ts.map +0 -1
- package/types/prompt/example.d.ts +0 -2
- package/types/prompt/example.d.ts.map +0 -1
- package/types/prompt/prompt.d.ts +0 -33
- package/types/prompt/prompt.d.ts.map +0 -1
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { AbstractUserPrompt } from './AbstractUserPrompt';
|
|
2
|
-
import { IDatePrompt, TOnRender, TValidate } from './types';
|
|
3
|
-
import { LocalesMonths, LocalesWeeks } from '@bemoje/util';
|
|
4
|
-
/**
|
|
5
|
-
* Interactive date user prompts in the terminal.
|
|
6
|
-
*/
|
|
7
|
-
export declare class DatePrompt<T extends Date = Date> extends AbstractUserPrompt<IDatePrompt<T>> {
|
|
8
|
-
/**
|
|
9
|
-
* @param type - The type of prompt
|
|
10
|
-
* @param message - The message to display to the user
|
|
11
|
-
*/
|
|
12
|
-
constructor(name: string, message: string, callback?: (self: DatePrompt<T>) => void);
|
|
13
|
-
/**
|
|
14
|
-
* On render callback. Keyword this refers to the current prompt
|
|
15
|
-
*/
|
|
16
|
-
onRender(onRender: TOnRender): this;
|
|
17
|
-
/**
|
|
18
|
-
* Default value
|
|
19
|
-
*/
|
|
20
|
-
initial(initial: T): this;
|
|
21
|
-
/**
|
|
22
|
-
* Receive user input. Should return true if the value is valid, and an error message String otherwise.
|
|
23
|
-
* If false is returned, a default error message is shown
|
|
24
|
-
*/
|
|
25
|
-
validate(validate: TValidate<T>): this;
|
|
26
|
-
/**
|
|
27
|
-
* Use to define custom locales. See below for an example.
|
|
28
|
-
* More info: https://github.com/terkelg/prompts/wiki/Date-Time-Formatting
|
|
29
|
-
*/
|
|
30
|
-
locales(locales: LocalesMonths & LocalesWeeks): this;
|
|
31
|
-
/**
|
|
32
|
-
* The format mask of the date. See below for more information.
|
|
33
|
-
* More info: https://github.com/terkelg/prompts/wiki/Date-Time-Formatting
|
|
34
|
-
*/
|
|
35
|
-
mask(mask?: string): this;
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=DatePrompt.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DatePrompt.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/prompt/core/DatePrompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAEzD,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAE1D;;GAEG;AACH,qBAAa,UAAU,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI,CAAE,SAAQ,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IACvF;;;OAGG;gBACS,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI;IAKnF;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS;IAK5B;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,CAAC;IAKlB;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;IAK/B;;;OAGG;IACH,OAAO,CAAC,OAAO,EAAE,aAAa,GAAG,YAAY;IAK7C;;;OAGG;IACH,IAAI,CAAC,IAAI,SAAwB;CAIlC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { AbstractUserPrompt } from './AbstractUserPrompt';
|
|
2
|
-
import { IInvisiblePrompt, TFormat, TOnRender, TValidate } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Interactive invisible user prompts in the terminal.
|
|
5
|
-
*/
|
|
6
|
-
export declare class InvisiblePrompt<T extends string = string> extends AbstractUserPrompt<IInvisiblePrompt<T>> {
|
|
7
|
-
/**
|
|
8
|
-
* @param type - The type of prompt
|
|
9
|
-
* @param message - The message to display to the user
|
|
10
|
-
*/
|
|
11
|
-
constructor(name: string, message: string, callback?: (self: InvisiblePrompt<T>) => void);
|
|
12
|
-
/**
|
|
13
|
-
* On render callback. Keyword this refers to the current prompt
|
|
14
|
-
*/
|
|
15
|
-
onRender(onRender: TOnRender): this;
|
|
16
|
-
/**
|
|
17
|
-
* Default value
|
|
18
|
-
*/
|
|
19
|
-
initial(initial: T): this;
|
|
20
|
-
/**
|
|
21
|
-
* Receive user input. The returned value will be added to the response object
|
|
22
|
-
*/
|
|
23
|
-
format(format: TFormat<T>): this;
|
|
24
|
-
/**
|
|
25
|
-
* Receive user input. Should return true if the value is valid, and an error message String otherwise.
|
|
26
|
-
* If false is returned, a default error message is shown
|
|
27
|
-
*/
|
|
28
|
-
validate(validate: TValidate<T>): this;
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=InvisiblePrompt.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InvisiblePrompt.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/prompt/core/InvisiblePrompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACzE;;GAEG;AACH,qBAAa,eAAe,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,kBAAkB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;IACrG;;;OAGG;gBACS,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,IAAI;IAKxF;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS;IAK5B;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,CAAC;IAKlB;;OAEG;IACH,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAKzB;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;CAIhC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { AbstractUserPrompt } from './AbstractUserPrompt';
|
|
2
|
-
import { IListPrompt, TOnRender, TStyle, TValidate } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Interactive list user prompts in the terminal.
|
|
5
|
-
*/
|
|
6
|
-
export declare class ListPrompt<T extends string = string> extends AbstractUserPrompt<IListPrompt<T>> {
|
|
7
|
-
/**
|
|
8
|
-
* @param type - The type of prompt
|
|
9
|
-
* @param message - The message to display to the user
|
|
10
|
-
*/
|
|
11
|
-
constructor(name: string, message: string, callback?: (self: ListPrompt<T>) => void);
|
|
12
|
-
/**
|
|
13
|
-
* On render callback. Keyword this refers to the current prompt
|
|
14
|
-
*/
|
|
15
|
-
onRender(onRender: TOnRender): this;
|
|
16
|
-
/**
|
|
17
|
-
* Default value
|
|
18
|
-
*/
|
|
19
|
-
initial(initial: T): this;
|
|
20
|
-
/**
|
|
21
|
-
* String separator. Will trim all white-spaces from start and end of string. Defaults to ','
|
|
22
|
-
*/
|
|
23
|
-
separator(separator: string): this;
|
|
24
|
-
/**
|
|
25
|
-
* Receive user input. Should return true if the value is valid, and an error message String otherwise.
|
|
26
|
-
* If false is returned, a default error message is shown
|
|
27
|
-
*/
|
|
28
|
-
validate(validate: TValidate<T>): this;
|
|
29
|
-
/**
|
|
30
|
-
* Render style
|
|
31
|
-
*/
|
|
32
|
-
style(style?: TStyle): this;
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=ListPrompt.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ListPrompt.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/prompt/core/ListPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnE;;GAEG;AACH,qBAAa,UAAU,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAC3F;;;OAGG;gBACS,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI;IAKnF;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS;IAK5B;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,CAAC;IAKlB;;OAEG;IACH,SAAS,CAAC,SAAS,EAAE,MAAM;IAK3B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;IAK/B;;OAEG;IACH,KAAK,CAAC,KAAK,GAAE,MAAkB;CAIhC"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { AbstractUserPrompt } from './AbstractUserPrompt';
|
|
2
|
-
import { Choice } from 'prompts';
|
|
3
|
-
import { IMultiSelectPrompt, TFormat, TOnRender } from './types';
|
|
4
|
-
/**
|
|
5
|
-
* Interactive multiselect user prompts in the terminal.
|
|
6
|
-
*/
|
|
7
|
-
export declare class MultiSelectPrompt<T extends string | number | boolean = number> extends AbstractUserPrompt<IMultiSelectPrompt<T>> {
|
|
8
|
-
/**
|
|
9
|
-
* @param type - The type of prompt
|
|
10
|
-
* @param message - The message to display to the user
|
|
11
|
-
*/
|
|
12
|
-
constructor(name: string, message: string, callback?: (self: MultiSelectPrompt<T>) => void);
|
|
13
|
-
/**
|
|
14
|
-
* On render callback. Keyword this refers to the current prompt
|
|
15
|
-
*/
|
|
16
|
-
onRender(onRender: TOnRender): this;
|
|
17
|
-
/**
|
|
18
|
-
* Default value
|
|
19
|
-
*/
|
|
20
|
-
initial(initial: T): this;
|
|
21
|
-
/**
|
|
22
|
-
* Prompt instructions to display
|
|
23
|
-
*/
|
|
24
|
-
instructions(instructions: string): this;
|
|
25
|
-
/**
|
|
26
|
-
* Hint to display to the user
|
|
27
|
-
*/
|
|
28
|
-
hint(hint: string): this;
|
|
29
|
-
/**
|
|
30
|
-
* Message to display when selecting a disabled option
|
|
31
|
-
*/
|
|
32
|
-
warn(warn: string): this;
|
|
33
|
-
/**
|
|
34
|
-
* An array of options/choices for the user to select.
|
|
35
|
-
*/
|
|
36
|
-
choices(choices: Choice[]): this;
|
|
37
|
-
/**
|
|
38
|
-
* Number of options displayed per page.
|
|
39
|
-
*/
|
|
40
|
-
optionsPerPage(optionsPerPage?: number): this;
|
|
41
|
-
/**
|
|
42
|
-
* Minimum number of choices to select - will display error.
|
|
43
|
-
*/
|
|
44
|
-
min(min: number): this;
|
|
45
|
-
/**
|
|
46
|
-
* Maximum number of choices to select
|
|
47
|
-
*/
|
|
48
|
-
max(max: number): this;
|
|
49
|
-
/**
|
|
50
|
-
* Receive user input. The returned value will be added to the response object
|
|
51
|
-
*/
|
|
52
|
-
format(format: TFormat<T>): this;
|
|
53
|
-
}
|
|
54
|
-
//# sourceMappingURL=MultiSelectPrompt.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MultiSelectPrompt.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/prompt/core/MultiSelectPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAChC,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEhE;;GAEG;AACH,qBAAa,iBAAiB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAE,SAAQ,kBAAkB,CACrG,kBAAkB,CAAC,CAAC,CAAC,CACtB;IACC;;;OAGG;gBACS,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,KAAK,IAAI;IAK1F;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS;IAK5B;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,CAAC;IAKlB;;OAEG;IACH,YAAY,CAAC,YAAY,EAAE,MAAM;IAKjC;;OAEG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM;IAKjB;;OAEG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM;IAKjB;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE;IAKzB;;OAEG;IACH,cAAc,CAAC,cAAc,SAAK;IAKlC;;OAEG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM;IAKf;;OAEG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM;IAKf;;OAEG;IACH,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAI1B"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { AbstractUserPrompt } from './AbstractUserPrompt';
|
|
2
|
-
import { INumberPrompt, TOnRender, TStyle, TValidate } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Interactive numner user prompts in the terminal.
|
|
5
|
-
*/
|
|
6
|
-
export declare class NumberPrompt<T extends number = number> extends AbstractUserPrompt<INumberPrompt<T>> {
|
|
7
|
-
/**
|
|
8
|
-
* @param type - The type of prompt
|
|
9
|
-
* @param message - The message to display to the user
|
|
10
|
-
*/
|
|
11
|
-
constructor(name: string, message: string, callback?: (self: NumberPrompt<T>) => void);
|
|
12
|
-
/**
|
|
13
|
-
* On render callback. Keyword this refers to the current prompt
|
|
14
|
-
*/
|
|
15
|
-
onRender(onRender: TOnRender): this;
|
|
16
|
-
/**
|
|
17
|
-
* Default value
|
|
18
|
-
*/
|
|
19
|
-
initial(initial: T): this;
|
|
20
|
-
/**
|
|
21
|
-
* Receive user input. Should return true if the value is valid, and an error message String otherwise.
|
|
22
|
-
* If false is returned, a default error message is shown
|
|
23
|
-
*/
|
|
24
|
-
validate(validate: TValidate<T>): this;
|
|
25
|
-
/**
|
|
26
|
-
* Render style
|
|
27
|
-
*/
|
|
28
|
-
style(style?: TStyle): this;
|
|
29
|
-
/**
|
|
30
|
-
* Allow floating point inputs.
|
|
31
|
-
*/
|
|
32
|
-
float(float?: boolean): this;
|
|
33
|
-
/**
|
|
34
|
-
* Round float values to x decimals.
|
|
35
|
-
*/
|
|
36
|
-
round(round?: number): this;
|
|
37
|
-
/**
|
|
38
|
-
* Increment step when using arrow keys.
|
|
39
|
-
*/
|
|
40
|
-
increment(increment?: number): this;
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=NumberPrompt.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NumberPrompt.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/prompt/core/NumberPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAErE;;GAEG;AACH,qBAAa,YAAY,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,kBAAkB,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAC/F;;;OAGG;gBACS,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,IAAI;IAKrF;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS;IAK5B;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,CAAC;IAKlB;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;IAK/B;;OAEG;IACH,KAAK,CAAC,KAAK,GAAE,MAAkB;IAK/B;;OAEG;IACH,KAAK,CAAC,KAAK,UAAQ;IAKnB;;OAEG;IACH,KAAK,CAAC,KAAK,SAAI;IAKf;;OAEG;IACH,SAAS,CAAC,SAAS,SAAI;CAIxB"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { AbstractUserPrompt } from './AbstractUserPrompt';
|
|
2
|
-
import { IPasswordPrompt, TFormat, TOnRender, TValidate } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Interactive password user prompts in the terminal.
|
|
5
|
-
*/
|
|
6
|
-
export declare class PasswordPrompt<T extends string = string> extends AbstractUserPrompt<IPasswordPrompt<T>> {
|
|
7
|
-
/**
|
|
8
|
-
* @param type - The type of prompt
|
|
9
|
-
* @param message - The message to display to the user
|
|
10
|
-
*/
|
|
11
|
-
constructor(name: string, message: string, callback?: (self: PasswordPrompt<T>) => void);
|
|
12
|
-
/**
|
|
13
|
-
* On render callback. Keyword this refers to the current prompt
|
|
14
|
-
*/
|
|
15
|
-
onRender(onRender: TOnRender): this;
|
|
16
|
-
/**
|
|
17
|
-
* Default value
|
|
18
|
-
*/
|
|
19
|
-
initial(initial: T): this;
|
|
20
|
-
/**
|
|
21
|
-
* Receive user input. The returned value will be added to the response object
|
|
22
|
-
*/
|
|
23
|
-
format(format: TFormat<T>): this;
|
|
24
|
-
/**
|
|
25
|
-
* Receive user input. Should return true if the value is valid, and an error message String otherwise.
|
|
26
|
-
* If false is returned, a default error message is shown
|
|
27
|
-
*/
|
|
28
|
-
validate(validate: TValidate<T>): this;
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=PasswordPrompt.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordPrompt.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/prompt/core/PasswordPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACxE;;GAEG;AACH,qBAAa,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,kBAAkB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IACnG;;;OAGG;gBACS,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,IAAI;IAKvF;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS;IAK5B;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,CAAC;IAKlB;;OAEG;IACH,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAKzB;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;CAIhC"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { AbstractUserPrompt } from './AbstractUserPrompt';
|
|
2
|
-
import { IAutocompletePrompt, TFormat, TStyle } from './types';
|
|
3
|
-
import { Options } from 'prompts';
|
|
4
|
-
/**
|
|
5
|
-
* Interactive autocomplete user prompts in the terminal.
|
|
6
|
-
*/
|
|
7
|
-
export declare class SearchPrompt<T extends string = string> extends AbstractUserPrompt<IAutocompletePrompt<T>> {
|
|
8
|
-
/**
|
|
9
|
-
* @param type - The type of prompt
|
|
10
|
-
* @param message - The message to display to the user
|
|
11
|
-
*/
|
|
12
|
-
constructor(name: string, callback?: (self: SearchPrompt<T>) => void);
|
|
13
|
-
/**
|
|
14
|
-
* An array of options/choices for the user to select.
|
|
15
|
-
*/
|
|
16
|
-
choices(data: string[]): this;
|
|
17
|
-
/**
|
|
18
|
-
* Default value
|
|
19
|
-
*/
|
|
20
|
-
initial(initial: T): this;
|
|
21
|
-
/**
|
|
22
|
-
* The first ESCAPE keypress will clear the input
|
|
23
|
-
*/
|
|
24
|
-
clearFirst(clearFirst?: boolean): this;
|
|
25
|
-
/**
|
|
26
|
-
* Max number of results to show. Defaults to 25
|
|
27
|
-
*/
|
|
28
|
-
limit(limit?: number): this;
|
|
29
|
-
/**
|
|
30
|
-
* The delimiter to use to split the user input into keywords.
|
|
31
|
-
* Defaults to ' ' (space).
|
|
32
|
-
*/
|
|
33
|
-
separator(delim?: string): this;
|
|
34
|
-
/**
|
|
35
|
-
* When this string is encountered, the input coming after will not be considered for searching. Defaults to ':'
|
|
36
|
-
*/
|
|
37
|
-
searchStopSequence(stop: string): this;
|
|
38
|
-
/**
|
|
39
|
-
* Filtering options.
|
|
40
|
-
* @property includes - If true, then the search results will include keyword-matches that match anywhere in the string. Defaults to 'true'
|
|
41
|
-
* @property startsWith - If true, then the search results will include beginning-of-word-matches. Defaults to 'true'
|
|
42
|
-
*/
|
|
43
|
-
filtering(filtering: {
|
|
44
|
-
includes?: boolean;
|
|
45
|
-
startsWith?: boolean;
|
|
46
|
-
}): this;
|
|
47
|
-
/**
|
|
48
|
-
* A function to pre-render each string in the search data before searching has begun.
|
|
49
|
-
* This is useful if the same string formatting will be applied to all returned search results.
|
|
50
|
-
*
|
|
51
|
-
* @param original - The original (or pre-rendered) string.
|
|
52
|
-
*/
|
|
53
|
-
preRender(preRender: (original: string[]) => string[]): this;
|
|
54
|
-
/**
|
|
55
|
-
* A function to render the search results.
|
|
56
|
-
*
|
|
57
|
-
* @param original - The original (or pre-rendered) string.
|
|
58
|
-
* @param keywords - The keywords that matched the original string.
|
|
59
|
-
*/
|
|
60
|
-
render(render: (original: string[], keywords: string[]) => string): this;
|
|
61
|
-
/**
|
|
62
|
-
* Receive user input. The returned value will be added to the response object
|
|
63
|
-
*/
|
|
64
|
-
format(format: TFormat<T>): this;
|
|
65
|
-
/**
|
|
66
|
-
* Render style
|
|
67
|
-
*/
|
|
68
|
-
style(style?: TStyle): this;
|
|
69
|
-
run(options?: Options): Promise<import("../..").ISearchPromptResult>;
|
|
70
|
-
}
|
|
71
|
-
//# sourceMappingURL=SearchPrompt.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SearchPrompt.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/prompt/core/SearchPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAE9D,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAGjC;;GAEG;AACH,qBAAa,YAAY,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,kBAAkB,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;IACrG;;;OAGG;gBACS,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,IAAI;IAKpE;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE;IAOtB;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,CAAC;IAKlB;;OAEG;IACH,UAAU,CAAC,UAAU,UAAO;IAK5B;;OAEG;IACH,KAAK,CAAC,KAAK,SAAK;IAKhB;;;OAGG;IACH,SAAS,CAAC,KAAK,SAAM;IAKrB;;OAEG;IACH,kBAAkB,CAAC,IAAI,EAAE,MAAM;IAK/B;;;;OAIG;IACH,SAAS,CAAC,SAAS,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAA;KAAE;IAKjE;;;;;OAKG;IACH,SAAS,CAAC,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,MAAM,EAAE;IAKrD;;;;;OAKG;IACH,MAAM,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,MAAM;IAKjE;;OAEG;IACH,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAKzB;;OAEG;IACH,KAAK,CAAC,KAAK,GAAE,MAAkB;IAKhB,GAAG,CAAC,OAAO,CAAC,EAAE,OAAO;CAGrC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { AbstractUserPrompt } from './AbstractUserPrompt';
|
|
2
|
-
import { Choice } from 'prompts';
|
|
3
|
-
import { ISelectPrompt, TFormat, TOnRender } from './types';
|
|
4
|
-
/**
|
|
5
|
-
* Interactive select user prompts in the terminal.
|
|
6
|
-
*/
|
|
7
|
-
export declare class SelectPrompt<T extends number = number> extends AbstractUserPrompt<ISelectPrompt<T>> {
|
|
8
|
-
/**
|
|
9
|
-
* @param type - The type of prompt
|
|
10
|
-
* @param message - The message to display to the user
|
|
11
|
-
*/
|
|
12
|
-
constructor(name: string, message: string, callback?: (self: SelectPrompt<T>) => void);
|
|
13
|
-
/**
|
|
14
|
-
* On render callback. Keyword this refers to the current prompt
|
|
15
|
-
*/
|
|
16
|
-
onRender(onRender: TOnRender): this;
|
|
17
|
-
/**
|
|
18
|
-
* Default value
|
|
19
|
-
*/
|
|
20
|
-
initial(initial: T): this;
|
|
21
|
-
/**
|
|
22
|
-
* Hint to display to the user
|
|
23
|
-
*/
|
|
24
|
-
hint(hint: string): this;
|
|
25
|
-
/**
|
|
26
|
-
* Message to display when selecting a disabled option
|
|
27
|
-
*/
|
|
28
|
-
warn(warn: string): this;
|
|
29
|
-
/**
|
|
30
|
-
* An array of options/choices for the user to select.
|
|
31
|
-
*/
|
|
32
|
-
choices(choices: Choice[]): this;
|
|
33
|
-
/**
|
|
34
|
-
* Receive user input. The returned value will be added to the response object
|
|
35
|
-
*/
|
|
36
|
-
format(format: TFormat<T>): this;
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=SelectPrompt.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelectPrompt.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/prompt/core/SelectPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAChC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAE3D;;GAEG;AACH,qBAAa,YAAY,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,kBAAkB,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAC/F;;;OAGG;gBACS,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,IAAI;IAKrF;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS;IAK5B;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,CAAC;IAKlB;;OAEG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM;IAKjB;;OAEG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM;IAKjB;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE;IAKzB;;OAEG;IACH,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAI1B"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { AbstractUserPrompt } from './AbstractUserPrompt';
|
|
2
|
-
import { ITextPrompt, TOnRender, TStyle, TValidate } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Interactive text user prompts in the terminal.
|
|
5
|
-
*/
|
|
6
|
-
export declare class TextPrompt<T extends string = string> extends AbstractUserPrompt<ITextPrompt<T>> {
|
|
7
|
-
/**
|
|
8
|
-
* @param type - The type of prompt
|
|
9
|
-
* @param message - The message to display to the user
|
|
10
|
-
*/
|
|
11
|
-
constructor(name: string, message: string, callback?: (self: TextPrompt<T>) => void);
|
|
12
|
-
/**
|
|
13
|
-
* On render callback. Keyword this refers to the current prompt
|
|
14
|
-
*/
|
|
15
|
-
onRender(onRender: TOnRender): this;
|
|
16
|
-
/**
|
|
17
|
-
* Default value
|
|
18
|
-
*/
|
|
19
|
-
initial(initial: T): this;
|
|
20
|
-
/**
|
|
21
|
-
* Receive user input. Should return true if the value is valid, and an error message String otherwise.
|
|
22
|
-
* If false is returned, a default error message is shown
|
|
23
|
-
*/
|
|
24
|
-
validate(validate: TValidate<T>): this;
|
|
25
|
-
/**
|
|
26
|
-
* Render style
|
|
27
|
-
*/
|
|
28
|
-
style(style?: TStyle): this;
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=TextPrompt.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextPrompt.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/prompt/core/TextPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACnE;;GAEG;AACH,qBAAa,UAAU,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAC3F;;;OAGG;gBACS,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI;IAKnF;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS;IAK5B;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,CAAC;IAKlB;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;IAK/B;;OAEG;IACH,KAAK,CAAC,KAAK,GAAE,MAAkB;CAIhC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { AbstractUserPrompt } from './AbstractUserPrompt';
|
|
2
|
-
import { ITogglePrompt, TActive, TInactive, TOnRender } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Interactive toggle user prompts in the terminal.
|
|
5
|
-
*/
|
|
6
|
-
export declare class TogglePrompt<T extends boolean = boolean> extends AbstractUserPrompt<ITogglePrompt<T>> {
|
|
7
|
-
/**
|
|
8
|
-
* @param type - The type of prompt
|
|
9
|
-
* @param message - The message to display to the user
|
|
10
|
-
*/
|
|
11
|
-
constructor(name: string, message: string, callback?: (self: TogglePrompt<T>) => void);
|
|
12
|
-
/**
|
|
13
|
-
* On render callback. Keyword this refers to the current prompt
|
|
14
|
-
*/
|
|
15
|
-
onRender(onRender: TOnRender): this;
|
|
16
|
-
/**
|
|
17
|
-
* Default value
|
|
18
|
-
*/
|
|
19
|
-
initial(initial: T): this;
|
|
20
|
-
/**
|
|
21
|
-
* Text for active state. Defaults to 'on'
|
|
22
|
-
*/
|
|
23
|
-
active(active?: TActive): this;
|
|
24
|
-
/**
|
|
25
|
-
* Text for inactive state. Defaults to 'off'
|
|
26
|
-
*/
|
|
27
|
-
inactive(inactive?: TInactive): this;
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=TogglePrompt.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TogglePrompt.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/prompt/core/TogglePrompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEtE;;GAEG;AACH,qBAAa,YAAY,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO,CAAE,SAAQ,kBAAkB,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IACjG;;;OAGG;gBACS,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,IAAI;IAKrF;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS;IAK5B;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,CAAC;IAKlB;;OAEG;IACH,MAAM,CAAC,MAAM,GAAE,OAAc;IAK7B;;OAEG;IACH,QAAQ,CAAC,QAAQ,GAAE,SAAiB;CAIrC"}
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { Choice, PromptObject, PromptType } from 'prompts';
|
|
3
|
-
import { LocalesMonths, LocalesWeeks } from '@bemoje/util';
|
|
4
|
-
import { Readable, Writable } from 'stream';
|
|
5
|
-
export { LocaleMonthNames, LocaleWeekDayNames, LocalesMonths, LocaleMonthFullNames, LocaleMonthShortNames, LocalesWeeks, LocaleWeekDayFullNames, LocaleWeekDayShortNames, } from '@bemoje/util';
|
|
6
|
-
/**
|
|
7
|
-
* Use to define custom locales. More info:
|
|
8
|
-
* https://github.com/terkelg/prompts/wiki/Date-Time-Formatting
|
|
9
|
-
*/
|
|
10
|
-
export type TLocales = LocalesMonths & LocalesWeeks;
|
|
11
|
-
/**
|
|
12
|
-
* Receive the user input and return the formatted value to be used inside the program. The value returned will be added to the response object.
|
|
13
|
-
* The function signature is (val, values), where val is the value from the current prompt and values is the current response object in case you need to format based on previous responses.
|
|
14
|
-
*/
|
|
15
|
-
export type TFormat<T> = (this: PromptObject, val: string, values: Record<string, T>) => T;
|
|
16
|
-
/**
|
|
17
|
-
* Receive user input. Should return true if the value is valid, and an error message String otherwise. If false is returned, a default error message is shown
|
|
18
|
-
*/
|
|
19
|
-
export type TValidate<T> = (this: PromptObject, value: T) => boolean | string;
|
|
20
|
-
/**
|
|
21
|
-
* state is an object with a snapshot of the current state. The state object has two properties value and aborted. E.g { value: 'This is ', aborted: false }
|
|
22
|
-
*/
|
|
23
|
-
export type TStateObject = {
|
|
24
|
-
value: string;
|
|
25
|
-
aborted: boolean;
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* Callback for when the state of the current prompt changes. The function signature is (state)
|
|
29
|
-
* @see TStateObject
|
|
30
|
-
*/
|
|
31
|
-
export type TOnState = (this: PromptObject, state: TStateObject) => void;
|
|
32
|
-
/**
|
|
33
|
-
* Callback for when the prompt is rendered. The function receives kleur as its first argument and this refers to the current prompt.
|
|
34
|
-
*/
|
|
35
|
-
export type TOnRender = (this: PromptObject, kleur: unknown) => void;
|
|
36
|
-
/**
|
|
37
|
-
* Text for active state. Defaults to 'on'
|
|
38
|
-
*/
|
|
39
|
-
export type TActive = 'on' | 'off' | 'yes' | 'no';
|
|
40
|
-
/**
|
|
41
|
-
* Text for inactive state. Defaults to 'off'
|
|
42
|
-
*/
|
|
43
|
-
export type TInactive = 'on' | 'off' | 'yes' | 'no';
|
|
44
|
-
/**
|
|
45
|
-
* Render style.
|
|
46
|
-
*/
|
|
47
|
-
export type TStyle = 'default' | 'password' | 'invisible' | 'emoji';
|
|
48
|
-
/**
|
|
49
|
-
* Filter function. Defaults to sort by title property. suggest should always return a promise. Filters using title by default
|
|
50
|
-
*/
|
|
51
|
-
export type TSuggest<T> = (this: PromptObject, input: T, choices: Choice[]) => Promise<Choice[]>;
|
|
52
|
-
/**
|
|
53
|
-
* By default, prompts uses process.stdin for receiving input and process.stdout for writing output.
|
|
54
|
-
* If you need to use different streams, for instance process.stderr, you can set these with the stdin and stdout properties.
|
|
55
|
-
*/
|
|
56
|
-
export type TStdout = Writable | undefined;
|
|
57
|
-
/**
|
|
58
|
-
* By default, prompts uses process.stdin for receiving input and process.stdout for writing output.
|
|
59
|
-
* If you need to use different streams, for instance process.stderr, you can set these with the stdin and stdout properties.
|
|
60
|
-
*/
|
|
61
|
-
export type TStdin = Readable | undefined;
|
|
62
|
-
/**
|
|
63
|
-
* PromptObject with the fields they all have in common.
|
|
64
|
-
*/
|
|
65
|
-
export interface ICommonPromptFields extends PromptObject {
|
|
66
|
-
type: PromptType;
|
|
67
|
-
name: string;
|
|
68
|
-
message: string;
|
|
69
|
-
onRender?: TOnRender;
|
|
70
|
-
onState?: TOnState;
|
|
71
|
-
stdin?: TStdin;
|
|
72
|
-
stdout?: TStdout;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Text prompt
|
|
76
|
-
*/
|
|
77
|
-
export interface ITextPrompt<T extends string = string> extends ICommonPromptFields {
|
|
78
|
-
type: 'text';
|
|
79
|
-
validate?: TValidate<T>;
|
|
80
|
-
initial?: T;
|
|
81
|
-
style?: TStyle;
|
|
82
|
-
format?: TFormat<T>;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Password prompt with masked input
|
|
86
|
-
*/
|
|
87
|
-
export interface IPasswordPrompt<T extends string = string> extends ICommonPromptFields {
|
|
88
|
-
type: 'password';
|
|
89
|
-
validate?: TValidate<T>;
|
|
90
|
-
initial?: T;
|
|
91
|
-
format?: TFormat<T>;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Prompt where input is invisible, like sudo
|
|
95
|
-
*/
|
|
96
|
-
export interface IInvisiblePrompt<T extends string = string> extends ICommonPromptFields {
|
|
97
|
-
type: 'invisible';
|
|
98
|
-
validate?: TValidate<T>;
|
|
99
|
-
initial?: T;
|
|
100
|
-
format?: TFormat<T>;
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Number prompt
|
|
104
|
-
*/
|
|
105
|
-
export interface INumberPrompt<T extends number = number> extends ICommonPromptFields {
|
|
106
|
-
type: 'number';
|
|
107
|
-
validate?: TValidate<T>;
|
|
108
|
-
initial?: T;
|
|
109
|
-
format?: TFormat<T>;
|
|
110
|
-
min?: number;
|
|
111
|
-
max?: number;
|
|
112
|
-
float?: boolean;
|
|
113
|
-
round?: number;
|
|
114
|
-
increment?: number;
|
|
115
|
-
style?: TStyle;
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Classic yes/no prompt
|
|
119
|
-
*/
|
|
120
|
-
export interface IConfirmPrompt<T extends boolean = boolean> extends ICommonPromptFields {
|
|
121
|
-
type: 'confirm';
|
|
122
|
-
name: string;
|
|
123
|
-
initial?: T;
|
|
124
|
-
format?: TFormat<T>;
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* List prompt, split intput string by `seperator`
|
|
128
|
-
*/
|
|
129
|
-
export interface IListPrompt<T extends string = string> extends ICommonPromptFields {
|
|
130
|
-
type: 'list';
|
|
131
|
-
validate?: TValidate<T>;
|
|
132
|
-
style?: TStyle;
|
|
133
|
-
format?: TFormat<T>;
|
|
134
|
-
initial?: T;
|
|
135
|
-
separator?: string;
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Toggle/switch prompt
|
|
139
|
-
*/
|
|
140
|
-
export interface ITogglePrompt<T extends boolean = boolean> extends ICommonPromptFields {
|
|
141
|
-
type: 'toggle';
|
|
142
|
-
validate?: TValidate<T>;
|
|
143
|
-
initial?: T;
|
|
144
|
-
format?: TFormat<T>;
|
|
145
|
-
active?: TActive;
|
|
146
|
-
inactive?: TInactive;
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Interactive select prompt
|
|
150
|
-
*/
|
|
151
|
-
export interface ISelectPrompt<T extends number = number> extends ICommonPromptFields {
|
|
152
|
-
type: 'select';
|
|
153
|
-
validate?: TValidate<T>;
|
|
154
|
-
initial?: T;
|
|
155
|
-
format?: TFormat<T>;
|
|
156
|
-
hint?: string;
|
|
157
|
-
warn?: string;
|
|
158
|
-
choices?: Choice[];
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Interactive multi-select / autocompleteMultiselect prompt
|
|
162
|
-
*/
|
|
163
|
-
export interface IMultiSelectPrompt<T extends string | number | boolean = number> extends ICommonPromptFields {
|
|
164
|
-
type: 'multiselect';
|
|
165
|
-
validate?: TValidate<T>;
|
|
166
|
-
format?: TFormat<T>;
|
|
167
|
-
instructions?: string;
|
|
168
|
-
choices?: Choice[];
|
|
169
|
-
optionsPerPage?: number;
|
|
170
|
-
min?: number;
|
|
171
|
-
max?: number;
|
|
172
|
-
hint?: string;
|
|
173
|
-
warn?: string;
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* Interactive multi-select / autocompleteMultiselect prompt
|
|
177
|
-
*/
|
|
178
|
-
export interface IAutocompleteMultiSelectPrompt<T extends string | number | boolean = number> extends ICommonPromptFields {
|
|
179
|
-
type: 'autocompleteMultiselect';
|
|
180
|
-
validate?: TValidate<T>;
|
|
181
|
-
format?: TFormat<T>;
|
|
182
|
-
instructions?: string;
|
|
183
|
-
choices?: Choice[];
|
|
184
|
-
optionsPerPage?: number;
|
|
185
|
-
min?: number;
|
|
186
|
-
max?: number;
|
|
187
|
-
hint?: string;
|
|
188
|
-
warn?: string;
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* Autocompletion prompt
|
|
192
|
-
*/
|
|
193
|
-
export interface IAutocompletePrompt<T extends string | number | boolean = string> extends ICommonPromptFields {
|
|
194
|
-
type: 'autocomplete';
|
|
195
|
-
validate?: TValidate<T>;
|
|
196
|
-
format?: TFormat<T>;
|
|
197
|
-
choices?: Choice[];
|
|
198
|
-
suggest?: TSuggest<T>;
|
|
199
|
-
limit?: number;
|
|
200
|
-
style?: TStyle;
|
|
201
|
-
initial?: T;
|
|
202
|
-
clearFirst?: boolean;
|
|
203
|
-
fallback?: string;
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* Date prompt
|
|
207
|
-
*/
|
|
208
|
-
export interface IDatePrompt<T extends Date = Date> extends ICommonPromptFields {
|
|
209
|
-
type: 'date';
|
|
210
|
-
validate?: TValidate<T>;
|
|
211
|
-
initial?: T;
|
|
212
|
-
locales?: TLocales;
|
|
213
|
-
mask?: string;
|
|
214
|
-
}
|
|
215
|
-
//# sourceMappingURL=types.d.ts.map
|