@ijuantm/simpl-addon 2.8.0 → 2.8.2
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/install.js +2 -3
- package/package.json +1 -1
package/install.js
CHANGED
|
@@ -110,8 +110,7 @@ const downloadFile = (url, dest) => new Promise((resolve, reject) => {
|
|
|
110
110
|
|
|
111
111
|
const promptUser = (question, defaultValue = '') => new Promise(resolve => {
|
|
112
112
|
const rl = readline.createInterface({input: process.stdin, output: process.stdout});
|
|
113
|
-
|
|
114
|
-
rl.question(prompt, answer => {
|
|
113
|
+
rl.question(`${question}: `, answer => {
|
|
115
114
|
rl.close();
|
|
116
115
|
resolve(answer.trim() || defaultValue);
|
|
117
116
|
});
|
|
@@ -156,7 +155,7 @@ const listAddons = (addons) => addons.forEach((name, i) => out(PAD + C.cyan + `$
|
|
|
156
155
|
const confirmSuggestion = async (suggestion) => {
|
|
157
156
|
line();
|
|
158
157
|
while (true) {
|
|
159
|
-
const a = (await promptUser(PAD + `${C.cyan}◌${C.reset} ${C.dim}Did you mean${C.reset} ${C.cyan}${suggestion}${C.reset}${C.dim}
|
|
158
|
+
const a = (await promptUser(PAD + `${C.cyan}◌${C.reset} ${C.dim}Did you mean${C.reset} ${C.cyan}${suggestion}${C.reset}${C.dim}? [y/${C.reset}N${C.dim}]${C.reset}`, 'no')).toLowerCase();
|
|
160
159
|
if (['y', 'yes'].includes(a)) return true;
|
|
161
160
|
if (['n', 'no'].includes(a)) return false;
|
|
162
161
|
warn('Please answer [Y] Yes or [N] No)');
|