mirror of
https://github.com/actions/labeler
synced 2026-05-11 18:31:08 +02:00
build
This commit is contained in:
26
node_modules/prompts/lib/elements/confirm.js
generated
vendored
26
node_modules/prompts/lib/elements/confirm.js
generated
vendored
@@ -1,6 +1,6 @@
|
||||
const color = require('kleur');
|
||||
const Prompt = require('./prompt');
|
||||
const { style } = require('../util');
|
||||
const { style, clear } = require('../util');
|
||||
const { erase, cursor } = require('sisteransi');
|
||||
|
||||
/**
|
||||
@@ -67,20 +67,18 @@ class ConfirmPrompt extends Prompt {
|
||||
render() {
|
||||
if (this.closed) return;
|
||||
if (this.firstRender) this.out.write(cursor.hide);
|
||||
else this.out.write(clear(this.outputText));
|
||||
super.render();
|
||||
|
||||
this.out.write(
|
||||
erase.line +
|
||||
cursor.to(0) +
|
||||
[
|
||||
style.symbol(this.done, this.aborted),
|
||||
color.bold(this.msg),
|
||||
style.delimiter(this.done),
|
||||
this.done
|
||||
? this.value ? this.yesMsg : this.noMsg
|
||||
: color.gray(this.initialValue ? this.yesOption : this.noOption)
|
||||
].join(' ')
|
||||
);
|
||||
|
||||
this.outputText = [
|
||||
style.symbol(this.done, this.aborted),
|
||||
color.bold(this.msg),
|
||||
style.delimiter(this.done),
|
||||
this.done ? (this.value ? this.yesMsg : this.noMsg)
|
||||
: color.gray(this.initialValue ? this.yesOption : this.noOption)
|
||||
].join(' ');
|
||||
|
||||
this.out.write(erase.line + cursor.to(0) + this.outputText);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user