Updating NPM dependencies
This commit is contained in:
7
node_modules/prompts/lib/elements/prompt.js
generated
vendored
7
node_modules/prompts/lib/elements/prompt.js
generated
vendored
@@ -19,7 +19,7 @@ class Prompt extends EventEmitter {
|
||||
this.in = opts.stdin || process.stdin;
|
||||
this.out = opts.stdout || process.stdout;
|
||||
this.onRender = (opts.onRender || (() => void 0)).bind(this);
|
||||
const rl = readline.createInterface(this.in);
|
||||
const rl = readline.createInterface({ input:this.in, escapeCodeTimeout:50 });
|
||||
readline.emitKeypressEvents(this.in, rl);
|
||||
|
||||
if (this.in.isTTY) this.in.setRawMode(true);
|
||||
@@ -40,7 +40,7 @@ class Prompt extends EventEmitter {
|
||||
this.in.removeListener('keypress', keypress);
|
||||
if (this.in.isTTY) this.in.setRawMode(false);
|
||||
rl.close();
|
||||
this.emit(this.aborted ? 'abort' : 'submit', this.value);
|
||||
this.emit(this.aborted ? 'abort' : this.exited ? 'exit' : 'submit', this.value);
|
||||
this.closed = true;
|
||||
};
|
||||
|
||||
@@ -50,7 +50,8 @@ class Prompt extends EventEmitter {
|
||||
fire() {
|
||||
this.emit('state', {
|
||||
value: this.value,
|
||||
aborted: !!this.aborted
|
||||
aborted: !!this.aborted,
|
||||
exited: !!this.exited
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user