@ijuantm/simpl-addon 2.8.2 → 2.8.4

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.
Files changed (2) hide show
  1. package/install.js +3 -2
  2. package/package.json +1 -1
package/install.js CHANGED
@@ -110,7 +110,8 @@ 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
- rl.question(`${question}: `, answer => {
113
+ const prompt = defaultValue ? `${question} ${C.dim}(${defaultValue})${C.reset}: ` : `${question}: `;
114
+ rl.question(prompt, answer => {
114
115
  rl.close();
115
116
  resolve(answer.trim() || defaultValue);
116
117
  });
@@ -155,7 +156,7 @@ const listAddons = (addons) => addons.forEach((name, i) => out(PAD + C.cyan + `$
155
156
  const confirmSuggestion = async (suggestion) => {
156
157
  line();
157
158
  while (true) {
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();
159
+ const a = (await promptUser(PAD + `${C.cyan}◌${C.reset} ${C.dim}Did you mean${C.reset} ${C.cyan}${suggestion}${C.reset}${C.dim}?${C.reset}`, 'n')).toLowerCase();
159
160
  if (['y', 'yes'].includes(a)) return true;
160
161
  if (['n', 'no'].includes(a)) return false;
161
162
  warn('Please answer [Y] Yes or [N] No)');
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ijuantm/simpl-addon",
3
3
  "description": "CLI tool to install Simpl framework add-ons.",
4
- "version": "2.8.2",
4
+ "version": "2.8.4",
5
5
  "scripts": {
6
6
  "link": "npm link",
7
7
  "unlink": "npm unlink -g @ijuantm/simpl-addon"