@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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ICommandSearchPromptResult.js","sourceRoot":"","sources":["../../../../../../../../packages/cli/src/prompt/additions/commandSearchPrompt/core/ICommandSearchPromptResult.ts"],"names":[],"mappings":""}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import colors from 'ansi-colors';
|
|
2
|
-
import { createSearchPromptObject } from '../../searchPrompt/core/createSearchPromptObject';
|
|
3
|
-
/**
|
|
4
|
-
* Create a command 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 commandSearchPrompt
|
|
7
|
-
*
|
|
8
|
-
* @param name - The name of the prompt
|
|
9
|
-
* @param data - The list of commands to search through
|
|
10
|
-
* @param options - The options
|
|
11
|
-
*/
|
|
12
|
-
export function createCommandSearchPromptObject(name, data, options) {
|
|
13
|
-
return createSearchPromptObject(name, data, {
|
|
14
|
-
separator: ' ',
|
|
15
|
-
preRender: (parsed) => {
|
|
16
|
-
if (!parsed.length)
|
|
17
|
-
return parsed;
|
|
18
|
-
return parsed.map((str, i) => {
|
|
19
|
-
if (i === parsed.length - 1)
|
|
20
|
-
return str;
|
|
21
|
-
return colors.dim(str);
|
|
22
|
-
});
|
|
23
|
-
},
|
|
24
|
-
...options,
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=createCommandSearchPromptObject.js.map
|
package/esm/prompt/additions/commandSearchPrompt/core/createCommandSearchPromptObject.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createCommandSearchPromptObject.js","sourceRoot":"","sources":["../../../../../../../../packages/cli/src/prompt/additions/commandSearchPrompt/core/createCommandSearchPromptObject.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,wBAAwB,EAAE,MAAM,kDAAkD,CAAA;AAI3F;;;;;;;;GAQG;AACH,MAAM,UAAU,+BAA+B,CAC7C,IAAY,EACZ,IAAc,EACd,OAAqE;IAErE,OAAO,wBAAwB,CAAC,IAAI,EAAE,IAAI,EAAE;QAC1C,SAAS,EAAE,GAAG;QACd,SAAS,EAAE,CAAC,MAAgB,EAAY,EAAE;YACxC,IAAI,CAAC,MAAM,CAAC,MAAM;gBAAE,OAAO,MAAM,CAAA;YACjC,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,GAAW,EAAE,CAAC,EAAE,EAAE;gBACnC,IAAI,CAAC,KAAK,MAAM,CAAC,MAAM,GAAG,CAAC;oBAAE,OAAO,GAAG,CAAA;gBACvC,OAAO,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;YACxB,CAAC,CAAC,CAAA;QACJ,CAAC;QACD,GAAG,OAAO;KACX,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ISearchPromptChoiceMetaData.js","sourceRoot":"","sources":["../../../../../../../../packages/cli/src/prompt/additions/searchPrompt/core/ISearchPromptChoiceMetaData.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ISearchPromptMetaData.js","sourceRoot":"","sources":["../../../../../../../../packages/cli/src/prompt/additions/searchPrompt/core/ISearchPromptMetaData.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ISearchPromptOptions.js","sourceRoot":"","sources":["../../../../../../../../packages/cli/src/prompt/additions/searchPrompt/core/ISearchPromptOptions.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ISearchPromptResult.js","sourceRoot":"","sources":["../../../../../../../../packages/cli/src/prompt/additions/searchPrompt/core/ISearchPromptResult.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PROMPT_META_DATA.js","sourceRoot":"","sources":["../../../../../../../../packages/cli/src/prompt/additions/searchPrompt/core/PROMPT_META_DATA.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,OAAO,EAAuC,CAAA"}
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
import { arrEvery, colors } from '@bemoje/util';
|
|
2
|
-
import { PROMPT_META_DATA } from './PROMPT_META_DATA';
|
|
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 function createSearchPromptObject(name, data, options) {
|
|
13
|
-
const searchStopSequence = options.searchStopSequence ?? ':';
|
|
14
|
-
const keywordDelimiter = options.separator ?? ' ';
|
|
15
|
-
const meta = new WeakMap();
|
|
16
|
-
const choices = data.map((value) => {
|
|
17
|
-
const choice = {
|
|
18
|
-
title: value,
|
|
19
|
-
value: value,
|
|
20
|
-
};
|
|
21
|
-
const parsed = strSplitBy(value, keywordDelimiter);
|
|
22
|
-
const preRendered = options.preRender ? options.preRender(parsed) : parsed.slice();
|
|
23
|
-
meta.set(choice, { parsed, preRendered });
|
|
24
|
-
return choice;
|
|
25
|
-
});
|
|
26
|
-
const filtering = options.filtering || { startsWith: true, includes: true };
|
|
27
|
-
const lastResult = {
|
|
28
|
-
originalInput: '',
|
|
29
|
-
input: '',
|
|
30
|
-
inputAfterStop: '',
|
|
31
|
-
keywords: [],
|
|
32
|
-
result: [],
|
|
33
|
-
};
|
|
34
|
-
const render = options.render || createRenderer(keywordDelimiter, filtering);
|
|
35
|
-
const prompt = {
|
|
36
|
-
type: 'autocomplete',
|
|
37
|
-
name: name,
|
|
38
|
-
message: '0',
|
|
39
|
-
limit: options.limit ?? 30,
|
|
40
|
-
initial: options.initial,
|
|
41
|
-
clearFirst: true,
|
|
42
|
-
choices,
|
|
43
|
-
suggest: async (input, choices) => {
|
|
44
|
-
return await search(input, lastResult, choices, meta, filtering, keywordDelimiter, searchStopSequence);
|
|
45
|
-
},
|
|
46
|
-
onRender: function () {
|
|
47
|
-
const choices = this.choices;
|
|
48
|
-
choices.forEach((choice) => {
|
|
49
|
-
const choiceMeta = meta.get(choice);
|
|
50
|
-
if (!choiceMeta)
|
|
51
|
-
return;
|
|
52
|
-
choice.title = render(choiceMeta.parsed, choiceMeta.preRendered, lastResult.keywords);
|
|
53
|
-
});
|
|
54
|
-
Reflect.set(this, 'msg', String(lastResult.result.length));
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
PROMPT_META_DATA.set(prompt, lastResult);
|
|
58
|
-
return prompt;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Split string by delimiter, remove empty strings
|
|
62
|
-
*/
|
|
63
|
-
function strSplitBy(string, delimiter = ' ') {
|
|
64
|
-
return string.split(delimiter).filter((i) => !!i);
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Create a render function
|
|
68
|
-
*/
|
|
69
|
-
function createRenderer(keywordDelimiter, filtering) {
|
|
70
|
-
const iterate = (parsed, preRendered, keywords, callback) => {
|
|
71
|
-
return preRendered
|
|
72
|
-
.map((word, i) => {
|
|
73
|
-
for (const kw of keywords) {
|
|
74
|
-
word = callback(parsed[i], word, kw);
|
|
75
|
-
}
|
|
76
|
-
return word;
|
|
77
|
-
})
|
|
78
|
-
.join(keywordDelimiter);
|
|
79
|
-
};
|
|
80
|
-
return (parsed, preRendered, keywords) => {
|
|
81
|
-
return iterate(parsed, preRendered, keywords, (parsed, word, kw) => {
|
|
82
|
-
if (filtering.startsWith && parsed.startsWith(kw))
|
|
83
|
-
return word.replace(kw, colors.magenta(kw));
|
|
84
|
-
if (filtering.includes && parsed.includes(kw))
|
|
85
|
-
return word.replace(kw, colors.blue(kw));
|
|
86
|
-
return word;
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Fitler/suggest/search based on user input
|
|
92
|
-
*/
|
|
93
|
-
async function search(input, latestData, choices, meta, filtering, keywordDelimiter, searchStopSequence) {
|
|
94
|
-
const indexOfStopSequence = input.indexOf(searchStopSequence);
|
|
95
|
-
latestData.originalInput = input;
|
|
96
|
-
latestData.input = indexOfStopSequence === -1 ? input : input.substring(0, indexOfStopSequence).trim();
|
|
97
|
-
latestData.inputAfterStop = indexOfStopSequence === -1 ? '' : input.substring(indexOfStopSequence + 1).trim();
|
|
98
|
-
latestData.keywords = strSplitBy(latestData.input, keywordDelimiter);
|
|
99
|
-
latestData.result = [];
|
|
100
|
-
let temp = [];
|
|
101
|
-
if (!filtering.startsWith && !filtering.includes) {
|
|
102
|
-
latestData.result = choices;
|
|
103
|
-
return Promise.resolve(latestData.result);
|
|
104
|
-
}
|
|
105
|
-
if (filtering.startsWith) {
|
|
106
|
-
// 100% match always from beginning of searched strings/words
|
|
107
|
-
choices.forEach((choice) => {
|
|
108
|
-
const metaChoice = meta.get(choice);
|
|
109
|
-
if (!metaChoice)
|
|
110
|
-
return;
|
|
111
|
-
const parsed = metaChoice.parsed;
|
|
112
|
-
let has = someWordStartsWithEveryKw(latestData.keywords, parsed);
|
|
113
|
-
if (!has && latestData.keywords.length === 1) {
|
|
114
|
-
has = someWordStartsWithEveryKw(latestData.keywords[0].split(''), parsed);
|
|
115
|
-
}
|
|
116
|
-
if (has) {
|
|
117
|
-
latestData.result.push(choice);
|
|
118
|
-
}
|
|
119
|
-
else {
|
|
120
|
-
temp.push(choice);
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
if (latestData.result.length === 1) {
|
|
124
|
-
return Promise.resolve(latestData.result);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
else {
|
|
128
|
-
temp = temp.concat(choices);
|
|
129
|
-
}
|
|
130
|
-
if (filtering.includes) {
|
|
131
|
-
// 100% match anywhere in the searched strings/words
|
|
132
|
-
temp.forEach((choice) => {
|
|
133
|
-
const metaChoice = meta.get(choice);
|
|
134
|
-
if (!metaChoice)
|
|
135
|
-
return;
|
|
136
|
-
const parsed = metaChoice.parsed;
|
|
137
|
-
if (everyKwInWord(latestData.keywords, parsed)) {
|
|
138
|
-
latestData.result.push(choice);
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
return Promise.resolve(latestData.result);
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Search 'startsWith'
|
|
146
|
-
*/
|
|
147
|
-
function someWordStartsWithEveryKw(keywords, parsed) {
|
|
148
|
-
let lastP = 0;
|
|
149
|
-
for (let k = 0; k < keywords.length; k++) {
|
|
150
|
-
const kw = keywords[k];
|
|
151
|
-
let match = false;
|
|
152
|
-
for (let p = lastP; p < parsed.length; p++) {
|
|
153
|
-
const cmd = parsed[p];
|
|
154
|
-
if (cmd.startsWith(kw)) {
|
|
155
|
-
lastP = p;
|
|
156
|
-
match = true;
|
|
157
|
-
break;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
if (!match)
|
|
161
|
-
return false;
|
|
162
|
-
}
|
|
163
|
-
return true;
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Search 'includes'
|
|
167
|
-
*/
|
|
168
|
-
function everyKwInWord(keywords, parsed) {
|
|
169
|
-
return arrEvery(keywords, (kw) => {
|
|
170
|
-
return parsed.some((c) => c.includes(kw));
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
//# sourceMappingURL=createSearchPromptObject.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createSearchPromptObject.js","sourceRoot":"","sources":["../../../../../../../../packages/cli/src/prompt/additions/searchPrompt/core/createSearchPromptObject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAK/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD;;;;;;;;GAQG;AACH,MAAM,UAAU,wBAAwB,CAAC,IAAY,EAAE,IAAc,EAAE,OAA6B;IAClG,MAAM,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,IAAI,GAAG,CAAA;IAC5D,MAAM,gBAAgB,GAAG,OAAO,CAAC,SAAS,IAAI,GAAG,CAAA;IAEjD,MAAM,IAAI,GAAG,IAAI,OAAO,EAAuC,CAAA;IAC/D,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACjC,MAAM,MAAM,GAAW;YACrB,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,KAAK;SACb,CAAA;QACD,MAAM,MAAM,GAAa,UAAU,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAA;QAC5D,MAAM,WAAW,GAAa,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QAC5F,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAA;QACzC,OAAO,MAAM,CAAA;IACf,CAAC,CAAC,CAAA;IAEF,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAA;IAE3E,MAAM,UAAU,GAA0B;QACxC,aAAa,EAAE,EAAE;QACjB,KAAK,EAAE,EAAE;QACT,cAAc,EAAE,EAAE;QA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EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACxC,MAAM,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;QACtB,IAAI,KAAK,GAAG,KAAK,CAAA;QACjB,KAAK,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC1C,MAAM,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,CAAA;YACrB,IAAI,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE;gBACtB,KAAK,GAAG,CAAC,CAAA;gBACT,KAAK,GAAG,IAAI,CAAA;gBACZ,MAAK;aACN;SACF;QACD,IAAI,CAAC,KAAK;YAAE,OAAO,KAAK,CAAA;KACzB;IACD,OAAO,IAAI,CAAA;AACb,CAAC;AAED;;GAEG;AACH,SAAS,aAAa,CAAC,QAAkB,EAAE,MAAgB;IACzD,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC,EAAU,EAAE,EAAE;QACvC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAA;IACnD,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PROMPT_META_DATA } from './PROMPT_META_DATA';
|
|
2
|
-
export function getSearchPromptMetaData(prompt) {
|
|
3
|
-
const result = PROMPT_META_DATA.get(prompt);
|
|
4
|
-
if (!result)
|
|
5
|
-
throw new Error('Prompt meta data not found.');
|
|
6
|
-
return result;
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=getSearchPromptMetaData.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getSearchPromptMetaData.js","sourceRoot":"","sources":["../../../../../../../../packages/cli/src/prompt/additions/searchPrompt/core/getSearchPromptMetaData.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAGrD,MAAM,UAAU,uBAAuB,CAAC,MAAoB;IAC1D,MAAM,MAAM,GAAG,gBAAgB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3C,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAA;IAC3D,OAAO,MAAM,CAAA;AACf,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import prompts from 'prompts';
|
|
2
|
-
import { createSearchPromptObject } from './core/createSearchPromptObject';
|
|
3
|
-
import { getSearchPromptMetaData } from './core/getSearchPromptMetaData';
|
|
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 async function searchPrompt(data, options, listeners) {
|
|
21
|
-
const _options = options;
|
|
22
|
-
const prompt = createSearchPromptObject('search', data, _options);
|
|
23
|
-
const oSelected = await prompts(prompt, listeners);
|
|
24
|
-
const metadata = getSearchPromptMetaData(prompt);
|
|
25
|
-
const selected = oSelected['search'];
|
|
26
|
-
const input = metadata.originalInput;
|
|
27
|
-
const matches = metadata.result.map((choice) => choice.value) || [];
|
|
28
|
-
return { input, matches, selected };
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=searchPrompt.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"searchPrompt.js","sourceRoot":"","sources":["../../../../../../../packages/cli/src/prompt/additions/searchPrompt/searchPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAA;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAA;AAKxE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,IAAc,EACd,OAA8B,EAC9B,SAAmB;IAEnB,MAAM,QAAQ,GAAG,OAA+B,CAAA;IAChD,MAAM,MAAM,GAAG,wBAAwB,CAAC,QAAQ,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAA;IACjE,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IAClD,MAAM,QAAQ,GAAG,uBAAuB,CAAC,MAAM,CAAC,CAAA;IAChD,MAAM,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAA;IACpC,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAA;IACpC,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,CAAA;IACnE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAA;AACrC,CAAC"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import prompts from 'prompts';
|
|
2
|
-
import { setNonEnumerable } from '@bemoje/util';
|
|
3
|
-
/**
|
|
4
|
-
* Interactive terminal user prompts.
|
|
5
|
-
*/
|
|
6
|
-
export class AbstractUserPrompt {
|
|
7
|
-
/**
|
|
8
|
-
* The data holding the selections from this builder class
|
|
9
|
-
*/
|
|
10
|
-
data;
|
|
11
|
-
/**
|
|
12
|
-
* @param type - The type of prompt
|
|
13
|
-
* @param message - The message to display to the user
|
|
14
|
-
*/
|
|
15
|
-
constructor(type, name, message) {
|
|
16
|
-
this.data = { type, name, message };
|
|
17
|
-
setNonEnumerable(this, 'data');
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* An identifier for the prompt which is only useful when chaining prompts.
|
|
21
|
-
* If provided, the response will be { [name]: value } instead of just the value.
|
|
22
|
-
*/
|
|
23
|
-
name(name) {
|
|
24
|
-
this.data['name'] = name;
|
|
25
|
-
return this;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* On state change callback. Function signature is an object with two properties: value and aborted
|
|
29
|
-
*/
|
|
30
|
-
onState(onState) {
|
|
31
|
-
this.data['onState'] = onState;
|
|
32
|
-
return this;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* By default, prompts uses process.stdin for receiving input and process.
|
|
36
|
-
* If you need to use different streams, for instance process.stderr,
|
|
37
|
-
* you can set these with the stdin and stdout properties.
|
|
38
|
-
*/
|
|
39
|
-
stdin(stdin) {
|
|
40
|
-
this.data['stdin'] = stdin;
|
|
41
|
-
return this;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* By default, prompts uses process.stdout for writing output.
|
|
45
|
-
* If you need to use different streams, for instance process.stderr,
|
|
46
|
-
* you can set these with the stdin and stdout properties.
|
|
47
|
-
*/
|
|
48
|
-
stdout(stdout) {
|
|
49
|
-
this.data['stdout'] = stdout;
|
|
50
|
-
return this;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Returns a copy of the data object.
|
|
54
|
-
*/
|
|
55
|
-
getData() {
|
|
56
|
-
return { ...this.data };
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Set the data object.
|
|
60
|
-
*/
|
|
61
|
-
setData(data) {
|
|
62
|
-
Object.assign(this.data, data);
|
|
63
|
-
return this;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Create a copy of the this object
|
|
67
|
-
*/
|
|
68
|
-
clone() {
|
|
69
|
-
const ctor = Object.getPrototypeOf(this).constructor;
|
|
70
|
-
const clone = new ctor(this.data['message']);
|
|
71
|
-
Object.assign(clone.data, this.data);
|
|
72
|
-
return clone;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Prompt user and receive user input. The returned value will be added to the response object
|
|
76
|
-
*/
|
|
77
|
-
async run(options) {
|
|
78
|
-
return await prompts(this.data, options);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
//# sourceMappingURL=AbstractUserPrompt.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractUserPrompt.js","sourceRoot":"","sources":["../../../../../../packages/cli/src/prompt/core/AbstractUserPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,OAAoB,MAAM,SAAS,CAAA;AAG1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAE/C;;GAEG;AACH,MAAM,OAAgB,kBAAkB;IACtC;;OAEG;IACO,IAAI,CAAM;IAEpB;;;OAGG;IACH,YAAY,IAAgB,EAAE,IAAY,EAAE,OAAe;QACzD,IAAI,CAAC,IAAI,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAU,CAAA;QAC3C,gBAAgB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;IAChC,CAAC;IAED;;;OAGG;IACH,IAAI,CAAC,IAAY;QACf,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAA;QACxB,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,OAAiB;QACvB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,OAAO,CAAA;QAC9B,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,KAAa;QACjB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,KAAK,CAAA;QAC1B,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,MAAe;QACpB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAA;QAC5B,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;OAEG;IACH,OAAO;QACL,OAAO,EAAE,GAAG,IAAI,CAAC,IAAI,EAAU,CAAA;IACjC,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,IAAmB;QACzB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;QAC9B,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;OAEG;IACH,KAAK;QACH,MAAM,IAAI,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,WAAW,CAAA;QACpD,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAA;QAC5C,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;QACpC,OAAO,KAAK,CAAA;IACd,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,GAAG,CAAC,OAAiB;QACzB,OAAO,MAAM,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IAC1C,CAAC;CACF"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { AbstractUserPrompt } from './AbstractUserPrompt';
|
|
2
|
-
/**
|
|
3
|
-
* Interactive multiselect user prompts in the terminal.
|
|
4
|
-
*/
|
|
5
|
-
export class AutoCompleteMultiSelectPrompt extends AbstractUserPrompt {
|
|
6
|
-
/**
|
|
7
|
-
* @param type - The type of prompt
|
|
8
|
-
* @param message - The message to display to the user
|
|
9
|
-
*/
|
|
10
|
-
constructor(name, message, callback) {
|
|
11
|
-
super('autocompleteMultiselect', name, message);
|
|
12
|
-
if (callback)
|
|
13
|
-
callback(this);
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* On render callback. Keyword this refers to the current prompt
|
|
17
|
-
*/
|
|
18
|
-
onRender(onRender) {
|
|
19
|
-
this.data['onRender'] = onRender;
|
|
20
|
-
return this;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Default value
|
|
24
|
-
*/
|
|
25
|
-
initial(initial) {
|
|
26
|
-
this.data['initial'] = initial;
|
|
27
|
-
return this;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Prompt instructions to display
|
|
31
|
-
*/
|
|
32
|
-
instructions(instructions) {
|
|
33
|
-
this.data['instructions'] = instructions;
|
|
34
|
-
return this;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Hint to display to the user
|
|
38
|
-
*/
|
|
39
|
-
hint(hint) {
|
|
40
|
-
this.data['hint'] = hint;
|
|
41
|
-
return this;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Message to display when selecting a disabled option
|
|
45
|
-
*/
|
|
46
|
-
warn(warn) {
|
|
47
|
-
this.data['warn'] = warn;
|
|
48
|
-
return this;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* An array of options/choices for the user to select.
|
|
52
|
-
*/
|
|
53
|
-
choices(choices) {
|
|
54
|
-
this.data['choices'] = choices;
|
|
55
|
-
return this;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Number of options displayed per page.
|
|
59
|
-
*/
|
|
60
|
-
optionsPerPage(optionsPerPage = 10) {
|
|
61
|
-
this.data['optionsPerPage'] = optionsPerPage;
|
|
62
|
-
return this;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Minimum number of choices to select - will display error.
|
|
66
|
-
*/
|
|
67
|
-
min(min) {
|
|
68
|
-
this.data['min'] = min;
|
|
69
|
-
return this;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Maximum number of choices to select
|
|
73
|
-
*/
|
|
74
|
-
max(max) {
|
|
75
|
-
this.data['max'] = max;
|
|
76
|
-
return this;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Receive user input. The returned value will be added to the response object
|
|
80
|
-
*/
|
|
81
|
-
format(format) {
|
|
82
|
-
this.data['format'] = format;
|
|
83
|
-
return this;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
//# sourceMappingURL=AutoCompleteMultiSelectPrompt.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AutoCompleteMultiSelectPrompt.js","sourceRoot":"","sources":["../../../../../../packages/cli/src/prompt/core/AutoCompleteMultiSelectPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAIzD;;GAEG;AACH,MAAM,OAAO,6BAA4E,SAAQ,kBAEhG;IACC;;;OAGG;IACH,YAAY,IAAY,EAAE,OAAe,EAAE,QAA2D;QACpG,KAAK,CAAC,yBAAyB,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;QAC/C,IAAI,QAAQ;YAAE,QAAQ,CAAC,IAAI,CAAC,CAAA;IAC9B,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,QAAmB;QAC1B,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAA;QAChC,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,OAAU;QAChB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,OAAO,CAAA;QAC9B,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;OAEG;IACH,YAAY,CAAC,YAAoB;QAC/B,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,YAAY,CAAA;QACxC,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,IAAY;QACf,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAA;QACxB,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,IAAY;QACf,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAA;QACxB,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,OAAiB;QACvB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,OAAO,CAAA;QAC9B,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;OAEG;IACH,cAAc,CAAC,cAAc,GAAG,EAAE;QAChC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,cAAc,CAAA;QAC5C,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,GAAW;QACb,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,CAAA;QACtB,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,GAAW;QACb,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,CAAA;QACtB,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,MAAkB;QACvB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAA;QAC5B,OAAO,IAAI,CAAA;IACb,CAAC;CACF"}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { AbstractUserPrompt } from './AbstractUserPrompt';
|
|
2
|
-
/**
|
|
3
|
-
* Interactive autocomplete user prompts in the terminal.
|
|
4
|
-
*/
|
|
5
|
-
export class AutocompletePrompt extends AbstractUserPrompt {
|
|
6
|
-
/**
|
|
7
|
-
* @param type - The type of prompt
|
|
8
|
-
* @param message - The message to display to the user
|
|
9
|
-
*/
|
|
10
|
-
constructor(name, message, callback) {
|
|
11
|
-
super('autocomplete', name, message);
|
|
12
|
-
if (callback)
|
|
13
|
-
callback(this);
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* On render callback. Keyword this refers to the current prompt
|
|
17
|
-
*/
|
|
18
|
-
onRender(onRender) {
|
|
19
|
-
this.data['onRender'] = onRender;
|
|
20
|
-
return this;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Default value
|
|
24
|
-
*/
|
|
25
|
-
initial(initial) {
|
|
26
|
-
this.data['initial'] = initial;
|
|
27
|
-
return this;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* The first ESCAPE keypress will clear the input
|
|
31
|
-
*/
|
|
32
|
-
clearFirst(clearFirst) {
|
|
33
|
-
this.data['clearFirst'] = clearFirst;
|
|
34
|
-
return this;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Max number of results to show. Defaults to 10
|
|
38
|
-
*/
|
|
39
|
-
limit(limit) {
|
|
40
|
-
this.data['limit'] = limit;
|
|
41
|
-
return this;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Fallback message when no match is found. Defaults to initial value if provided
|
|
45
|
-
*/
|
|
46
|
-
fallback(fallback) {
|
|
47
|
-
this.data['fallback'] = fallback;
|
|
48
|
-
return this;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Hint to display to the user
|
|
52
|
-
*/
|
|
53
|
-
hint(hint) {
|
|
54
|
-
this.data['hint'] = hint;
|
|
55
|
-
return this;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Message to display when selecting a disabled option
|
|
59
|
-
*/
|
|
60
|
-
warn(warn) {
|
|
61
|
-
this.data['warn'] = warn;
|
|
62
|
-
return this;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* An array of options/choices for the user to select.
|
|
66
|
-
*/
|
|
67
|
-
choices(choices) {
|
|
68
|
-
this.data['choices'] = choices;
|
|
69
|
-
return this;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Minimum number of choices to select - will display error.
|
|
73
|
-
*/
|
|
74
|
-
min(min) {
|
|
75
|
-
this.data['min'] = min;
|
|
76
|
-
return this;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Maximum number of choices to select
|
|
80
|
-
*/
|
|
81
|
-
max(max) {
|
|
82
|
-
this.data['max'] = max;
|
|
83
|
-
return this;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Filter function. Defaults to sort by title property. suggest should always return a promise. Filters using title by default
|
|
87
|
-
*/
|
|
88
|
-
suggest(suggest) {
|
|
89
|
-
this.data['suggest'] = suggest;
|
|
90
|
-
return this;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Receive user input. The returned value will be added to the response object
|
|
94
|
-
*/
|
|
95
|
-
format(format) {
|
|
96
|
-
this.data['format'] = format;
|
|
97
|
-
return this;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Render style
|
|
101
|
-
*/
|
|
102
|
-
style(style = 'default') {
|
|
103
|
-
this.data['style'] = style;
|
|
104
|
-
return this;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
//# sourceMappingURL=AutocompletePrompt.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompletePrompt.js","sourceRoot":"","sources":["../../../../../../packages/cli/src/prompt/core/AutocompletePrompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAIzD;;GAEG;AACH,MAAM,OAAO,kBAAiE,SAAQ,kBAErF;IACC;;;OAGG;IACH,YAAY,IAAY,EAAE,OAAe,EAAE,QAAgD;QACzF,KAAK,CAAC,cAAc,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;QACpC,IAAI,QAAQ;YAAE,QAAQ,CAAC,IAAI,CAAC,CAAA;IAC9B,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,QAAmB;QAC1B,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAA;QAChC,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,OAAU;QAChB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG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;OAEG;IACH,MAAM,CAAC,MAAkB;QACvB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAA;QAC5B,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,QAAgB,SAAS;QAC7B,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,KAAK,CAAA;QAC1B,OAAO,IAAI,CAAA;IACb,CAAC;CACF"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { AbstractUserPrompt } from './AbstractUserPrompt';
|
|
2
|
-
/**
|
|
3
|
-
* Interactive confirm user prompts in the terminal.
|
|
4
|
-
*/
|
|
5
|
-
export class ConfirmPrompt extends AbstractUserPrompt {
|
|
6
|
-
/**
|
|
7
|
-
* @param type - The type of prompt
|
|
8
|
-
* @param message - The message to display to the user
|
|
9
|
-
*/
|
|
10
|
-
constructor(name, message, callback) {
|
|
11
|
-
super('confirm', name, message);
|
|
12
|
-
if (callback)
|
|
13
|
-
callback(this);
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* On render callback. Keyword this refers to the current prompt
|
|
17
|
-
*/
|
|
18
|
-
onRender(onRender) {
|
|
19
|
-
this.data['onRender'] = onRender;
|
|
20
|
-
return this;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Default value
|
|
24
|
-
*/
|
|
25
|
-
initial(initial) {
|
|
26
|
-
this.data['initial'] = initial;
|
|
27
|
-
return this;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=ConfirmPrompt.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmPrompt.js","sourceRoot":"","sources":["../../../../../../packages/cli/src/prompt/core/ConfirmPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAGzD;;GAEG;AACH,MAAM,OAAO,aAA2C,SAAQ,kBAAqC;IACnG;;;OAGG;IACH,YAAY,IAAY,EAAE,OAAe,EAAE,QAA2C;QACpF,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;QAC/B,IAAI,QAAQ;YAAE,QAAQ,CAAC,IAAI,CAAC,CAAA;IAC9B,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,QAAmB;QAC1B,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAA;QAChC,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,OAAU;QAChB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,OAAO,CAAA;QAC9B,OAAO,IAAI,CAAA;IACb,CAAC;CACF"}
|