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