Updating NPM dependencies

This commit is contained in:
Drew Heavner
2020-11-11 13:30:52 +00:00
committed by GitHub
parent 7a6fb66c63
commit bd487ef324
9068 changed files with 1400893 additions and 587661 deletions

View File

@@ -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
});
}