inquirerer 2.0.3 → 2.0.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.
- package/esm/prompt.js +12 -2
- package/package.json +2 -2
- package/prompt.js +12 -2
package/esm/prompt.js
CHANGED
|
@@ -416,13 +416,23 @@ export class Inquirerer {
|
|
|
416
416
|
if (typeof input === 'string') {
|
|
417
417
|
const found = options.filter(opt => opt.name === input || String(opt.value) === input);
|
|
418
418
|
if (found.length) {
|
|
419
|
-
obj[question.name] = found
|
|
419
|
+
obj[question.name] = found.map(f => {
|
|
420
|
+
return {
|
|
421
|
+
...f,
|
|
422
|
+
selected: true
|
|
423
|
+
};
|
|
424
|
+
});
|
|
420
425
|
}
|
|
421
426
|
}
|
|
422
427
|
else if (Array.isArray(input)) {
|
|
423
428
|
const found = options.filter(opt => input.includes(opt.name) || input.includes(String(opt.value)));
|
|
424
429
|
if (found.length) {
|
|
425
|
-
obj[question.name] = found
|
|
430
|
+
obj[question.name] = found.map(f => {
|
|
431
|
+
return {
|
|
432
|
+
...f,
|
|
433
|
+
selected: true
|
|
434
|
+
};
|
|
435
|
+
});
|
|
426
436
|
}
|
|
427
437
|
}
|
|
428
438
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "inquirerer",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"author": "Dan Lynch <pyramation@gmail.com>",
|
|
5
5
|
"description": "inquirerer",
|
|
6
6
|
"main": "index.js",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"minimist": "^1.2.8"
|
|
36
36
|
},
|
|
37
37
|
"keywords": [],
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "fe5ce05ae6ffa6e93c6f91fc28b0d2be6de791fe"
|
|
39
39
|
}
|
package/prompt.js
CHANGED
|
@@ -422,13 +422,23 @@ class Inquirerer {
|
|
|
422
422
|
if (typeof input === 'string') {
|
|
423
423
|
const found = options.filter(opt => opt.name === input || String(opt.value) === input);
|
|
424
424
|
if (found.length) {
|
|
425
|
-
obj[question.name] = found
|
|
425
|
+
obj[question.name] = found.map(f => {
|
|
426
|
+
return {
|
|
427
|
+
...f,
|
|
428
|
+
selected: true
|
|
429
|
+
};
|
|
430
|
+
});
|
|
426
431
|
}
|
|
427
432
|
}
|
|
428
433
|
else if (Array.isArray(input)) {
|
|
429
434
|
const found = options.filter(opt => input.includes(opt.name) || input.includes(String(opt.value)));
|
|
430
435
|
if (found.length) {
|
|
431
|
-
obj[question.name] = found
|
|
436
|
+
obj[question.name] = found.map(f => {
|
|
437
|
+
return {
|
|
438
|
+
...f,
|
|
439
|
+
selected: true
|
|
440
|
+
};
|
|
441
|
+
});
|
|
432
442
|
}
|
|
433
443
|
}
|
|
434
444
|
}
|