mirror of
https://github.com/actions/labeler
synced 2026-05-11 21:31:08 +02:00
build
This commit is contained in:
9
node_modules/prompts/lib/elements/prompt.js
generated
vendored
9
node_modules/prompts/lib/elements/prompt.js
generated
vendored
@@ -16,17 +16,16 @@ class Prompt extends EventEmitter {
|
||||
super();
|
||||
|
||||
this.firstRender = true;
|
||||
this.in = opts.in || process.stdin;
|
||||
this.out = opts.out || process.stdout;
|
||||
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);
|
||||
readline.emitKeypressEvents(this.in, rl);
|
||||
|
||||
if (this.in.isTTY) this.in.setRawMode(true);
|
||||
|
||||
const isSelect = [ 'SelectPrompt', 'MultiselectPrompt' ].indexOf(this.constructor.name) > -1;
|
||||
const keypress = (str, key) => {
|
||||
let a = action(key);
|
||||
let a = action(key, isSelect);
|
||||
if (a === false) {
|
||||
this._ && this._(str, key);
|
||||
} else if (typeof this[a] === 'function') {
|
||||
|
||||
Reference in New Issue
Block a user