Updating NPM dependencies
This commit is contained in:
10
node_modules/prompts/lib/elements/text.js
generated
vendored
10
node_modules/prompts/lib/elements/text.js
generated
vendored
@@ -25,7 +25,7 @@ class TextPrompt extends Prompt {
|
||||
this.value = ``;
|
||||
this.errorMsg = opts.error || `Please Enter A Valid Value`;
|
||||
this.cursor = Number(!!this.initial);
|
||||
this.clear = clear(``);
|
||||
this.clear = clear(``, this.out.columns);
|
||||
this.render();
|
||||
}
|
||||
|
||||
@@ -52,6 +52,10 @@ class TextPrompt extends Prompt {
|
||||
this.render();
|
||||
}
|
||||
|
||||
exit() {
|
||||
this.abort();
|
||||
}
|
||||
|
||||
abort() {
|
||||
this.value = this.value || this.initial;
|
||||
this.done = this.aborted = true;
|
||||
@@ -156,8 +160,8 @@ class TextPrompt extends Prompt {
|
||||
if (this.closed) return;
|
||||
if (!this.firstRender) {
|
||||
if (this.outputError)
|
||||
this.out.write(cursor.down(lines(this.outputError) - 1) + clear(this.outputError));
|
||||
this.out.write(clear(this.outputText));
|
||||
this.out.write(cursor.down(lines(this.outputError, this.out.columns) - 1) + clear(this.outputError, this.out.columns));
|
||||
this.out.write(clear(this.outputText, this.out.columns));
|
||||
}
|
||||
super.render();
|
||||
this.outputError = '';
|
||||
|
||||
Reference in New Issue
Block a user