@bemoje/cli 0.0.10 → 0.0.12
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 +15 -0
- package/cjs/arg/ArgumentBuilder.js.map +1 -1
- package/cjs/cmd/CommandBuilder.js +191 -70
- package/cjs/cmd/CommandBuilder.js.map +1 -1
- package/cjs/cmd/CommandBuilderMetaData.js +1 -0
- package/cjs/cmd/CommandBuilderMetaData.js.map +1 -1
- package/cjs/cmd/DefaultHelpConfig.js +1 -0
- package/cjs/cmd/DefaultHelpConfig.js.map +1 -1
- package/cjs/db/JsonFile.js +1 -1
- package/cjs/index.js +28 -0
- package/cjs/index.js.map +1 -1
- package/cjs/opt/OptionBuilder.js +6 -0
- package/cjs/opt/OptionBuilder.js.map +1 -1
- package/cjs/prompt/additions/commandSearchPrompt/commandSearchPrompt.js +39 -0
- package/cjs/prompt/additions/commandSearchPrompt/commandSearchPrompt.js.map +1 -0
- package/cjs/prompt/additions/commandSearchPrompt/core/ICommandSearchPromptResult.js +3 -0
- package/cjs/prompt/additions/commandSearchPrompt/core/ICommandSearchPromptResult.js.map +1 -0
- package/cjs/prompt/additions/commandSearchPrompt/core/createCommandSearchPromptObject.js +34 -0
- package/cjs/prompt/additions/commandSearchPrompt/core/createCommandSearchPromptObject.js.map +1 -0
- package/cjs/prompt/additions/searchPrompt/core/ISearchPromptChoiceMetaData.js +3 -0
- package/cjs/prompt/additions/searchPrompt/core/ISearchPromptChoiceMetaData.js.map +1 -0
- package/cjs/prompt/additions/searchPrompt/core/ISearchPromptMetaData.js +3 -0
- package/cjs/prompt/additions/searchPrompt/core/ISearchPromptMetaData.js.map +1 -0
- package/cjs/prompt/additions/searchPrompt/core/ISearchPromptOptions.js +3 -0
- package/cjs/prompt/additions/searchPrompt/core/ISearchPromptOptions.js.map +1 -0
- package/cjs/prompt/additions/searchPrompt/core/ISearchPromptResult.js +3 -0
- package/cjs/prompt/additions/searchPrompt/core/ISearchPromptResult.js.map +1 -0
- package/cjs/prompt/additions/searchPrompt/core/PROMPT_META_DATA.js +5 -0
- package/cjs/prompt/additions/searchPrompt/core/PROMPT_META_DATA.js.map +1 -0
- package/cjs/prompt/additions/searchPrompt/core/createSearchPromptObject.js +177 -0
- package/cjs/prompt/additions/searchPrompt/core/createSearchPromptObject.js.map +1 -0
- package/cjs/prompt/additions/searchPrompt/core/getSearchPromptMetaData.js +12 -0
- package/cjs/prompt/additions/searchPrompt/core/getSearchPromptMetaData.js.map +1 -0
- package/cjs/prompt/additions/searchPrompt/searchPrompt.js +37 -0
- package/cjs/prompt/additions/searchPrompt/searchPrompt.js.map +1 -0
- package/cjs/prompt/core/AbstractUserPrompt.js +88 -0
- package/cjs/prompt/core/AbstractUserPrompt.js.map +1 -0
- package/cjs/prompt/core/AutoCompleteMultiSelectPrompt.js +90 -0
- package/cjs/prompt/core/AutoCompleteMultiSelectPrompt.js.map +1 -0
- package/cjs/prompt/core/AutocompletePrompt.js +111 -0
- package/cjs/prompt/core/AutocompletePrompt.js.map +1 -0
- package/cjs/prompt/core/ConfirmPrompt.js +34 -0
- package/cjs/prompt/core/ConfirmPrompt.js.map +1 -0
- package/cjs/prompt/core/DatePrompt.js +58 -0
- package/cjs/prompt/core/DatePrompt.js.map +1 -0
- package/cjs/prompt/core/InvisiblePrompt.js +49 -0
- package/cjs/prompt/core/InvisiblePrompt.js.map +1 -0
- package/cjs/prompt/core/ListPrompt.js +56 -0
- package/cjs/prompt/core/ListPrompt.js.map +1 -0
- package/cjs/prompt/core/MultiSelectPrompt.js +90 -0
- package/cjs/prompt/core/MultiSelectPrompt.js.map +1 -0
- package/cjs/prompt/core/NumberPrompt.js +70 -0
- package/cjs/prompt/core/NumberPrompt.js.map +1 -0
- package/cjs/prompt/core/PasswordPrompt.js +49 -0
- package/cjs/prompt/core/PasswordPrompt.js.map +1 -0
- package/cjs/prompt/core/SearchPrompt.js +112 -0
- package/cjs/prompt/core/SearchPrompt.js.map +1 -0
- package/cjs/prompt/core/SelectPrompt.js +62 -0
- package/cjs/prompt/core/SelectPrompt.js.map +1 -0
- package/cjs/prompt/core/TextPrompt.js +49 -0
- package/cjs/prompt/core/TextPrompt.js.map +1 -0
- package/cjs/prompt/core/TogglePrompt.js +48 -0
- package/cjs/prompt/core/TogglePrompt.js.map +1 -0
- package/cjs/prompt/core/types.js +3 -0
- package/cjs/prompt/core/types.js.map +1 -0
- package/cjs/prompt/example.js +117 -0
- package/cjs/prompt/example.js.map +1 -0
- package/cjs/prompt/prompt.js +62 -0
- package/cjs/prompt/prompt.js.map +1 -0
- package/esm/arg/ArgumentBuilder.js +15 -0
- package/esm/arg/ArgumentBuilder.js.map +1 -1
- package/esm/cmd/CommandBuilder.js +191 -70
- package/esm/cmd/CommandBuilder.js.map +1 -1
- package/esm/cmd/CommandBuilderMetaData.js +1 -0
- package/esm/cmd/CommandBuilderMetaData.js.map +1 -1
- package/esm/cmd/DefaultHelpConfig.js +1 -0
- package/esm/cmd/DefaultHelpConfig.js.map +1 -1
- package/esm/db/JsonFile.js +1 -1
- package/esm/index.js +28 -0
- package/esm/index.js.map +1 -1
- package/esm/opt/OptionBuilder.js +6 -0
- package/esm/opt/OptionBuilder.js.map +1 -1
- package/esm/prompt/additions/commandSearchPrompt/commandSearchPrompt.js +32 -0
- package/esm/prompt/additions/commandSearchPrompt/commandSearchPrompt.js.map +1 -0
- package/esm/prompt/additions/commandSearchPrompt/core/ICommandSearchPromptResult.js +2 -0
- package/esm/prompt/additions/commandSearchPrompt/core/ICommandSearchPromptResult.js.map +1 -0
- package/esm/prompt/additions/commandSearchPrompt/core/createCommandSearchPromptObject.js +27 -0
- package/esm/prompt/additions/commandSearchPrompt/core/createCommandSearchPromptObject.js.map +1 -0
- package/esm/prompt/additions/searchPrompt/core/ISearchPromptChoiceMetaData.js +2 -0
- package/esm/prompt/additions/searchPrompt/core/ISearchPromptChoiceMetaData.js.map +1 -0
- package/esm/prompt/additions/searchPrompt/core/ISearchPromptMetaData.js +2 -0
- package/esm/prompt/additions/searchPrompt/core/ISearchPromptMetaData.js.map +1 -0
- package/esm/prompt/additions/searchPrompt/core/ISearchPromptOptions.js +2 -0
- package/esm/prompt/additions/searchPrompt/core/ISearchPromptOptions.js.map +1 -0
- package/esm/prompt/additions/searchPrompt/core/ISearchPromptResult.js +2 -0
- package/esm/prompt/additions/searchPrompt/core/ISearchPromptResult.js.map +1 -0
- package/esm/prompt/additions/searchPrompt/core/PROMPT_META_DATA.js +2 -0
- package/esm/prompt/additions/searchPrompt/core/PROMPT_META_DATA.js.map +1 -0
- package/esm/prompt/additions/searchPrompt/core/createSearchPromptObject.js +173 -0
- package/esm/prompt/additions/searchPrompt/core/createSearchPromptObject.js.map +1 -0
- package/esm/prompt/additions/searchPrompt/core/getSearchPromptMetaData.js +8 -0
- package/esm/prompt/additions/searchPrompt/core/getSearchPromptMetaData.js.map +1 -0
- package/esm/prompt/additions/searchPrompt/searchPrompt.js +30 -0
- package/esm/prompt/additions/searchPrompt/searchPrompt.js.map +1 -0
- package/esm/prompt/core/AbstractUserPrompt.js +81 -0
- package/esm/prompt/core/AbstractUserPrompt.js.map +1 -0
- package/esm/prompt/core/AutoCompleteMultiSelectPrompt.js +86 -0
- package/esm/prompt/core/AutoCompleteMultiSelectPrompt.js.map +1 -0
- package/esm/prompt/core/AutocompletePrompt.js +107 -0
- package/esm/prompt/core/AutocompletePrompt.js.map +1 -0
- package/esm/prompt/core/ConfirmPrompt.js +30 -0
- package/esm/prompt/core/ConfirmPrompt.js.map +1 -0
- package/esm/prompt/core/DatePrompt.js +54 -0
- package/esm/prompt/core/DatePrompt.js.map +1 -0
- package/esm/prompt/core/InvisiblePrompt.js +45 -0
- package/esm/prompt/core/InvisiblePrompt.js.map +1 -0
- package/esm/prompt/core/ListPrompt.js +52 -0
- package/esm/prompt/core/ListPrompt.js.map +1 -0
- package/esm/prompt/core/MultiSelectPrompt.js +86 -0
- package/esm/prompt/core/MultiSelectPrompt.js.map +1 -0
- package/esm/prompt/core/NumberPrompt.js +66 -0
- package/esm/prompt/core/NumberPrompt.js.map +1 -0
- package/esm/prompt/core/PasswordPrompt.js +45 -0
- package/esm/prompt/core/PasswordPrompt.js.map +1 -0
- package/esm/prompt/core/SearchPrompt.js +108 -0
- package/esm/prompt/core/SearchPrompt.js.map +1 -0
- package/esm/prompt/core/SelectPrompt.js +58 -0
- package/esm/prompt/core/SelectPrompt.js.map +1 -0
- package/esm/prompt/core/TextPrompt.js +45 -0
- package/esm/prompt/core/TextPrompt.js.map +1 -0
- package/esm/prompt/core/TogglePrompt.js +44 -0
- package/esm/prompt/core/TogglePrompt.js.map +1 -0
- package/esm/prompt/core/types.js +2 -0
- package/esm/prompt/core/types.js.map +1 -0
- package/esm/prompt/example.js +112 -0
- package/esm/prompt/example.js.map +1 -0
- package/esm/prompt/prompt.js +59 -0
- package/esm/prompt/prompt.js.map +1 -0
- package/package.json +2 -1
- package/types/arg/ArgumentBuilder.d.ts +14 -0
- package/types/arg/ArgumentBuilder.d.ts.map +1 -0
- package/types/arg/ArgumentParserSelector.d.ts +1 -0
- package/types/arg/ArgumentParserSelector.d.ts.map +1 -0
- package/types/arg/ArgumentReader.d.ts +1 -0
- package/types/arg/ArgumentReader.d.ts.map +1 -0
- package/types/arg/ArgumentValidatorSelector.d.ts +1 -0
- package/types/arg/ArgumentValidatorSelector.d.ts.map +1 -0
- package/types/cmd/CommandBuilder.d.ts +152 -46
- package/types/cmd/CommandBuilder.d.ts.map +1 -0
- package/types/cmd/CommandBuilderMetaData.d.ts +3 -0
- package/types/cmd/CommandBuilderMetaData.d.ts.map +1 -0
- package/types/cmd/CommandFeatureSelector.d.ts +1 -0
- package/types/cmd/CommandFeatureSelector.d.ts.map +1 -0
- package/types/cmd/DefaultHelpConfig.d.ts +1 -0
- package/types/cmd/DefaultHelpConfig.d.ts.map +1 -0
- package/types/core/OutputManager.d.ts +1 -0
- package/types/core/OutputManager.d.ts.map +1 -0
- package/types/core/ParserSelector.d.ts +1 -0
- package/types/core/ParserSelector.d.ts.map +1 -0
- package/types/core/ValidatorSelector.d.ts +1 -0
- package/types/core/ValidatorSelector.d.ts.map +1 -0
- package/types/core/splitCombinedArgvShorts.d.ts +1 -0
- package/types/core/splitCombinedArgvShorts.d.ts.map +1 -0
- package/types/db/AbstractJsonFileSection.d.ts +1 -0
- package/types/db/AbstractJsonFileSection.d.ts.map +1 -0
- package/types/db/AppDataSection.d.ts +1 -0
- package/types/db/AppDataSection.d.ts.map +1 -0
- package/types/db/ConfigSection.d.ts +1 -0
- package/types/db/ConfigSection.d.ts.map +1 -0
- package/types/db/JsonFile.d.ts +1 -0
- package/types/db/JsonFile.d.ts.map +1 -0
- package/types/db/PresetsSection.d.ts +1 -0
- package/types/db/PresetsSection.d.ts.map +1 -0
- package/types/index.d.ts +29 -0
- package/types/index.d.ts.map +1 -0
- package/types/opt/OptionArgumentParserSelector.d.ts +1 -0
- package/types/opt/OptionArgumentParserSelector.d.ts.map +1 -0
- package/types/opt/OptionArgumentValidatorSelector.d.ts +1 -0
- package/types/opt/OptionArgumentValidatorSelector.d.ts.map +1 -0
- package/types/opt/OptionBuilder.d.ts +3 -0
- package/types/opt/OptionBuilder.d.ts.map +1 -0
- package/types/opt/OptionHelpers.d.ts +1 -0
- package/types/opt/OptionHelpers.d.ts.map +1 -0
- package/types/opt/OptionReader.d.ts +1 -0
- package/types/opt/OptionReader.d.ts.map +1 -0
- package/types/prompt/additions/commandSearchPrompt/commandSearchPrompt.d.ts +21 -0
- package/types/prompt/additions/commandSearchPrompt/commandSearchPrompt.d.ts.map +1 -0
- package/types/prompt/additions/commandSearchPrompt/core/ICommandSearchPromptResult.d.ts +5 -0
- package/types/prompt/additions/commandSearchPrompt/core/ICommandSearchPromptResult.d.ts.map +1 -0
- package/types/prompt/additions/commandSearchPrompt/core/createCommandSearchPromptObject.d.ts +13 -0
- package/types/prompt/additions/commandSearchPrompt/core/createCommandSearchPromptObject.d.ts.map +1 -0
- package/types/prompt/additions/searchPrompt/core/ISearchPromptChoiceMetaData.d.ts +5 -0
- package/types/prompt/additions/searchPrompt/core/ISearchPromptChoiceMetaData.d.ts.map +1 -0
- package/types/prompt/additions/searchPrompt/core/ISearchPromptMetaData.d.ts +9 -0
- package/types/prompt/additions/searchPrompt/core/ISearchPromptMetaData.d.ts.map +1 -0
- package/types/prompt/additions/searchPrompt/core/ISearchPromptOptions.d.ts +44 -0
- package/types/prompt/additions/searchPrompt/core/ISearchPromptOptions.d.ts.map +1 -0
- package/types/prompt/additions/searchPrompt/core/ISearchPromptResult.d.ts +6 -0
- package/types/prompt/additions/searchPrompt/core/ISearchPromptResult.d.ts.map +1 -0
- package/types/prompt/additions/searchPrompt/core/PROMPT_META_DATA.d.ts +4 -0
- package/types/prompt/additions/searchPrompt/core/PROMPT_META_DATA.d.ts.map +1 -0
- package/types/prompt/additions/searchPrompt/core/createSearchPromptObject.d.ts +13 -0
- package/types/prompt/additions/searchPrompt/core/createSearchPromptObject.d.ts.map +1 -0
- package/types/prompt/additions/searchPrompt/core/getSearchPromptMetaData.d.ts +4 -0
- package/types/prompt/additions/searchPrompt/core/getSearchPromptMetaData.d.ts.map +1 -0
- package/types/prompt/additions/searchPrompt/searchPrompt.d.ts +21 -0
- package/types/prompt/additions/searchPrompt/searchPrompt.d.ts.map +1 -0
- package/types/prompt/core/AbstractUserPrompt.d.ts +55 -0
- package/types/prompt/core/AbstractUserPrompt.d.ts.map +1 -0
- package/types/prompt/core/AutoCompleteMultiSelectPrompt.d.ts +54 -0
- package/types/prompt/core/AutoCompleteMultiSelectPrompt.d.ts.map +1 -0
- package/types/prompt/core/AutocompletePrompt.d.ts +66 -0
- package/types/prompt/core/AutocompletePrompt.d.ts.map +1 -0
- package/types/prompt/core/ConfirmPrompt.d.ts +21 -0
- package/types/prompt/core/ConfirmPrompt.d.ts.map +1 -0
- package/types/prompt/core/DatePrompt.d.ts +37 -0
- package/types/prompt/core/DatePrompt.d.ts.map +1 -0
- package/types/prompt/core/InvisiblePrompt.d.ts +30 -0
- package/types/prompt/core/InvisiblePrompt.d.ts.map +1 -0
- package/types/prompt/core/ListPrompt.d.ts +34 -0
- package/types/prompt/core/ListPrompt.d.ts.map +1 -0
- package/types/prompt/core/MultiSelectPrompt.d.ts +54 -0
- package/types/prompt/core/MultiSelectPrompt.d.ts.map +1 -0
- package/types/prompt/core/NumberPrompt.d.ts +42 -0
- package/types/prompt/core/NumberPrompt.d.ts.map +1 -0
- package/types/prompt/core/PasswordPrompt.d.ts +30 -0
- package/types/prompt/core/PasswordPrompt.d.ts.map +1 -0
- package/types/prompt/core/SearchPrompt.d.ts +71 -0
- package/types/prompt/core/SearchPrompt.d.ts.map +1 -0
- package/types/prompt/core/SelectPrompt.d.ts +38 -0
- package/types/prompt/core/SelectPrompt.d.ts.map +1 -0
- package/types/prompt/core/TextPrompt.d.ts +30 -0
- package/types/prompt/core/TextPrompt.d.ts.map +1 -0
- package/types/prompt/core/TogglePrompt.d.ts +29 -0
- package/types/prompt/core/TogglePrompt.d.ts.map +1 -0
- package/types/prompt/core/types.d.ts +215 -0
- package/types/prompt/core/types.d.ts.map +1 -0
- package/types/prompt/example.d.ts +2 -0
- package/types/prompt/example.d.ts.map +1 -0
- package/types/prompt/prompt.d.ts +33 -0
- package/types/prompt/prompt.d.ts.map +1 -0
- package/types/types/IConfig.d.ts +1 -0
- package/types/types/IConfig.d.ts.map +1 -0
- package/types/types/IPreset.d.ts +1 -0
- package/types/types/IPreset.d.ts.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ISearchPromptMetaData.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/cli/src/prompt/additions/searchPrompt/core/ISearchPromptMetaData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAEhC,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,cAAc,EAAE,MAAM,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export interface ISearchPromptOptions {
|
|
2
|
+
/**
|
|
3
|
+
* The maximum number of search results to show simultanously on the command line.
|
|
4
|
+
* Defaults to 15.
|
|
5
|
+
*/
|
|
6
|
+
limit?: number;
|
|
7
|
+
/**
|
|
8
|
+
* The delimiter to use to split the user input into keywords.
|
|
9
|
+
* Defaults to ' ' (space).
|
|
10
|
+
*/
|
|
11
|
+
separator?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Return this default value if the user enters nothing.
|
|
14
|
+
*/
|
|
15
|
+
initial?: string;
|
|
16
|
+
/**
|
|
17
|
+
* When this string is encountered, the input coming after will not be considered for searching. Defaults to ':'
|
|
18
|
+
*/
|
|
19
|
+
searchStopSequence?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Filtering options.
|
|
22
|
+
* @property includes - If true, then the search results will include keyword-matches that match anywhere in the string. Defaults to 'true'
|
|
23
|
+
* @property startsWith - If true, then the search results will include beginning-of-word-matches. Defaults to 'true'
|
|
24
|
+
*/
|
|
25
|
+
filtering?: {
|
|
26
|
+
includes?: boolean;
|
|
27
|
+
startsWith?: boolean;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* A function to pre-render each string in the search data before searching has begun.
|
|
31
|
+
* This is useful if the same string formatting will be applied to all returned search results.
|
|
32
|
+
*
|
|
33
|
+
* @param original - The original (or pre-rendered) string.
|
|
34
|
+
*/
|
|
35
|
+
preRender?: (original: string[]) => string[];
|
|
36
|
+
/**
|
|
37
|
+
* A function to render the search results.
|
|
38
|
+
*
|
|
39
|
+
* @param original - The original (or pre-rendered) string.
|
|
40
|
+
* @param keywords - The keywords that matched the original string.
|
|
41
|
+
*/
|
|
42
|
+
render?: (original: string[], keywords: string[]) => string;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=ISearchPromptOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ISearchPromptOptions.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/cli/src/prompt/additions/searchPrompt/core/ISearchPromptOptions.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAE3B;;;;OAIG;IACH,SAAS,CAAC,EAAE;QACV,QAAQ,CAAC,EAAE,OAAO,CAAA;QAClB,UAAU,CAAC,EAAE,OAAO,CAAA;KACrB,CAAA;IAED;;;;;OAKG;IACH,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,MAAM,EAAE,CAAA;IAE5C;;;;;OAKG;IACH,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,MAAM,CAAA;CAC5D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ISearchPromptResult.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/cli/src/prompt/additions/searchPrompt/core/ISearchPromptResult.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PROMPT_META_DATA.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/cli/src/prompt/additions/searchPrompt/core/PROMPT_META_DATA.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAE/D,eAAO,MAAM,gBAAgB,sDAAqD,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PromptObject } from 'prompts';
|
|
2
|
+
import { ISearchPromptOptions } from './ISearchPromptOptions';
|
|
3
|
+
/**
|
|
4
|
+
* Create a search prompt object that can be run with `prompts()` from npm package: `prompts`.
|
|
5
|
+
* The point of this would be to run them in series.
|
|
6
|
+
* To run run a prompt directly, use @see searchPrompt
|
|
7
|
+
*
|
|
8
|
+
* @param name - The name of the prompt
|
|
9
|
+
* @param data - The list to search.
|
|
10
|
+
* @param options - The options
|
|
11
|
+
*/
|
|
12
|
+
export declare function createSearchPromptObject(name: string, data: string[], options: ISearchPromptOptions): PromptObject;
|
|
13
|
+
//# sourceMappingURL=createSearchPromptObject.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createSearchPromptObject.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/cli/src/prompt/additions/searchPrompt/core/createSearchPromptObject.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,YAAY,EAAE,MAAM,SAAS,CAAA;AAG9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAG7D;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,oBAAoB,GAAG,YAAY,CAwDlH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSearchPromptMetaData.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/cli/src/prompt/additions/searchPrompt/core/getSearchPromptMetaData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAE/D,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAEtC,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,YAAY,GAAG,qBAAqB,CAInF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ISearchPromptOptions } from './core/ISearchPromptOptions';
|
|
2
|
+
import { ISearchPromptResult } from './core/ISearchPromptResult';
|
|
3
|
+
import { Options } from 'prompts';
|
|
4
|
+
/**
|
|
5
|
+
* Start a command-line prompt in which the user can search a provided list.
|
|
6
|
+
*
|
|
7
|
+
* @param data - The list to search
|
|
8
|
+
* @param options - options
|
|
9
|
+
*
|
|
10
|
+
* @returns the user input, its resulting matches, the match selected by the user
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* Returns
|
|
14
|
+
* 1 100% matches always from beginning of searched strings/words
|
|
15
|
+
* 2 100% matches anywhere in the searched strings/words
|
|
16
|
+
*
|
|
17
|
+
* If the first category can be narrowed down to exactly one result,
|
|
18
|
+
* then it is immediately returned and the other category discarded.
|
|
19
|
+
*/
|
|
20
|
+
export declare function searchPrompt(data: string[], options?: ISearchPromptOptions, listeners?: Options): Promise<ISearchPromptResult>;
|
|
21
|
+
//# sourceMappingURL=searchPrompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"searchPrompt.d.ts","sourceRoot":"","sources":["../../../../../../../packages/cli/src/prompt/additions/searchPrompt/searchPrompt.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEjC;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,CAAC,EAAE,oBAAoB,EAC9B,SAAS,CAAC,EAAE,OAAO,GAClB,OAAO,CAAC,mBAAmB,CAAC,CAS9B"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import prompts, { Options } from 'prompts';
|
|
2
|
+
import { ICommonPromptFields, TOnState, TStdin, TStdout } from './types';
|
|
3
|
+
import { PromptType } from 'prompts';
|
|
4
|
+
/**
|
|
5
|
+
* Interactive terminal user prompts.
|
|
6
|
+
*/
|
|
7
|
+
export declare abstract class AbstractUserPrompt<Data extends ICommonPromptFields = ICommonPromptFields> {
|
|
8
|
+
/**
|
|
9
|
+
* The data holding the selections from this builder class
|
|
10
|
+
*/
|
|
11
|
+
protected data: Data;
|
|
12
|
+
/**
|
|
13
|
+
* @param type - The type of prompt
|
|
14
|
+
* @param message - The message to display to the user
|
|
15
|
+
*/
|
|
16
|
+
constructor(type: PromptType, name: string, message: string);
|
|
17
|
+
/**
|
|
18
|
+
* An identifier for the prompt which is only useful when chaining prompts.
|
|
19
|
+
* If provided, the response will be { [name]: value } instead of just the value.
|
|
20
|
+
*/
|
|
21
|
+
name(name: string): this;
|
|
22
|
+
/**
|
|
23
|
+
* On state change callback. Function signature is an object with two properties: value and aborted
|
|
24
|
+
*/
|
|
25
|
+
onState(onState: TOnState): this;
|
|
26
|
+
/**
|
|
27
|
+
* By default, prompts uses process.stdin for receiving input and process.
|
|
28
|
+
* If you need to use different streams, for instance process.stderr,
|
|
29
|
+
* you can set these with the stdin and stdout properties.
|
|
30
|
+
*/
|
|
31
|
+
stdin(stdin: TStdin): this;
|
|
32
|
+
/**
|
|
33
|
+
* By default, prompts uses process.stdout for writing output.
|
|
34
|
+
* If you need to use different streams, for instance process.stderr,
|
|
35
|
+
* you can set these with the stdin and stdout properties.
|
|
36
|
+
*/
|
|
37
|
+
stdout(stdout: TStdout): this;
|
|
38
|
+
/**
|
|
39
|
+
* Returns a copy of the data object.
|
|
40
|
+
*/
|
|
41
|
+
getData(): Data;
|
|
42
|
+
/**
|
|
43
|
+
* Set the data object.
|
|
44
|
+
*/
|
|
45
|
+
setData(data: Partial<Data>): this;
|
|
46
|
+
/**
|
|
47
|
+
* Create a copy of the this object
|
|
48
|
+
*/
|
|
49
|
+
clone(): any;
|
|
50
|
+
/**
|
|
51
|
+
* Prompt user and receive user input. The returned value will be added to the response object
|
|
52
|
+
*/
|
|
53
|
+
run(options?: Options): Promise<prompts.Answers<string>>;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=AbstractUserPrompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AbstractUserPrompt.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/prompt/core/AbstractUserPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,EAAE,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAGpC;;GAEG;AACH,8BAAsB,kBAAkB,CAAC,IAAI,SAAS,mBAAmB,GAAG,mBAAmB;IAC7F;;OAEG;IACH,SAAS,CAAC,IAAI,EAAE,IAAI,CAAA;IAEpB;;;OAGG;gBACS,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAK3D;;;OAGG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM;IAKjB;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,QAAQ;IAKzB;;;;OAIG;IACH,KAAK,CAAC,KAAK,EAAE,MAAM;IAKnB;;;;OAIG;IACH,MAAM,CAAC,MAAM,EAAE,OAAO;IAKtB;;OAEG;IACH,OAAO;IAIP;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC;IAK3B;;OAEG;IACH,KAAK;IAOL;;OAEG;IACG,GAAG,CAAC,OAAO,CAAC,EAAE,OAAO;CAG5B"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { AbstractUserPrompt } from './AbstractUserPrompt';
|
|
2
|
+
import { Choice } from 'prompts';
|
|
3
|
+
import { IAutocompleteMultiSelectPrompt, TFormat, TOnRender } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Interactive multiselect user prompts in the terminal.
|
|
6
|
+
*/
|
|
7
|
+
export declare class AutoCompleteMultiSelectPrompt<T extends string | number | boolean = number> extends AbstractUserPrompt<IAutocompleteMultiSelectPrompt<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: AutoCompleteMultiSelectPrompt<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=AutoCompleteMultiSelectPrompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoCompleteMultiSelectPrompt.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/prompt/core/AutoCompleteMultiSelectPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAChC,OAAO,EAAE,8BAA8B,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAE5E;;GAEG;AACH,qBAAa,6BAA6B,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAE,SAAQ,kBAAkB,CACjH,8BAA8B,CAAC,CAAC,CAAC,CAClC;IACC;;;OAGG;gBACS,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,6BAA6B,CAAC,CAAC,CAAC,KAAK,IAAI;IAKtG;;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"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { AbstractUserPrompt } from './AbstractUserPrompt';
|
|
2
|
+
import { Choice } from 'prompts';
|
|
3
|
+
import { IAutocompletePrompt, TFormat, TOnRender, TStyle, TSuggest } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Interactive autocomplete user prompts in the terminal.
|
|
6
|
+
*/
|
|
7
|
+
export declare class AutocompletePrompt<T extends string | number | boolean = 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, message: string, callback?: (self: AutocompletePrompt<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
|
+
* The first ESCAPE keypress will clear the input
|
|
23
|
+
*/
|
|
24
|
+
clearFirst(clearFirst: boolean): this;
|
|
25
|
+
/**
|
|
26
|
+
* Max number of results to show. Defaults to 10
|
|
27
|
+
*/
|
|
28
|
+
limit(limit: number): this;
|
|
29
|
+
/**
|
|
30
|
+
* Fallback message when no match is found. Defaults to initial value if provided
|
|
31
|
+
*/
|
|
32
|
+
fallback(fallback: string): this;
|
|
33
|
+
/**
|
|
34
|
+
* Hint to display to the user
|
|
35
|
+
*/
|
|
36
|
+
hint(hint: string): this;
|
|
37
|
+
/**
|
|
38
|
+
* Message to display when selecting a disabled option
|
|
39
|
+
*/
|
|
40
|
+
warn(warn: string): this;
|
|
41
|
+
/**
|
|
42
|
+
* An array of options/choices for the user to select.
|
|
43
|
+
*/
|
|
44
|
+
choices(choices: Choice[]): this;
|
|
45
|
+
/**
|
|
46
|
+
* Minimum number of choices to select - will display error.
|
|
47
|
+
*/
|
|
48
|
+
min(min: number): this;
|
|
49
|
+
/**
|
|
50
|
+
* Maximum number of choices to select
|
|
51
|
+
*/
|
|
52
|
+
max(max: number): this;
|
|
53
|
+
/**
|
|
54
|
+
* Filter function. Defaults to sort by title property. suggest should always return a promise. Filters using title by default
|
|
55
|
+
*/
|
|
56
|
+
suggest(suggest: TSuggest<T>): this;
|
|
57
|
+
/**
|
|
58
|
+
* Receive user input. The returned value will be added to the response object
|
|
59
|
+
*/
|
|
60
|
+
format(format: TFormat<T>): this;
|
|
61
|
+
/**
|
|
62
|
+
* Render style
|
|
63
|
+
*/
|
|
64
|
+
style(style?: TStyle): this;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=AutocompletePrompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutocompletePrompt.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/prompt/core/AutocompletePrompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAChC,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEnF;;GAEG;AACH,qBAAa,kBAAkB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAE,SAAQ,kBAAkB,CACtG,mBAAmB,CAAC,CAAC,CAAC,CACvB;IACC;;;OAGG;gBACS,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC,CAAC,KAAK,IAAI;IAK3F;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS;IAK5B;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,CAAC;IAKlB;;OAEG;IACH,UAAU,CAAC,UAAU,EAAE,OAAO;IAK9B;;OAEG;IACH,KAAK,CAAC,KAAK,EAAE,MAAM;IAKnB;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM;IAKzB;;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,GAAG,CAAC,GAAG,EAAE,MAAM;IAKf;;OAEG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM;IAKf;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;IAK5B;;OAEG;IACH,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAKzB;;OAEG;IACH,KAAK,CAAC,KAAK,GAAE,MAAkB;CAIhC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AbstractUserPrompt } from './AbstractUserPrompt';
|
|
2
|
+
import { IConfirmPrompt, TOnRender } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Interactive confirm user prompts in the terminal.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ConfirmPrompt<T extends boolean = boolean> extends AbstractUserPrompt<IConfirmPrompt<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: ConfirmPrompt<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
|
+
//# sourceMappingURL=ConfirmPrompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmPrompt.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/prompt/core/ConfirmPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnD;;GAEG;AACH,qBAAa,aAAa,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO,CAAE,SAAQ,kBAAkB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;IACnG;;;OAGG;gBACS,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,IAAI;IAKtF;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS;IAK5B;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,CAAC;CAInB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|