Updating NPM dependencies
This commit is contained in:
10
node_modules/prompts/dist/elements/prompt.js
generated
vendored
10
node_modules/prompts/dist/elements/prompt.js
generated
vendored
@@ -28,7 +28,10 @@ class Prompt extends EventEmitter {
|
||||
|
||||
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);
|
||||
const isSelect = ['SelectPrompt', 'MultiselectPrompt'].indexOf(this.constructor.name) > -1;
|
||||
@@ -50,7 +53,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;
|
||||
};
|
||||
|
||||
@@ -60,7 +63,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