1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const color_1 = require("./color");
|
4 | function createOnFallback({ flags: { confirm }, log }) {
|
5 | return (question) => {
|
6 | if (question.type === 'confirm') {
|
7 | if (confirm) {
|
8 | log.msg(`${color_1.input('--confirm')}: ${color_1.weak(question.message)} ${color_1.ancillary('Yes')}`);
|
9 | return true;
|
10 | }
|
11 | else {
|
12 | log.msg(`${color_1.input('--no-confirm')}: ${color_1.weak(question.message)} ${color_1.ancillary('No')}`);
|
13 | return false;
|
14 | }
|
15 | }
|
16 | };
|
17 | }
|
18 | exports.createOnFallback = createOnFallback;
|