mirror of
https://github.com/actions/labeler
synced 2026-05-12 03:21:14 +02:00
build
This commit is contained in:
7
node_modules/prompts/dist/elements/prompt.js
generated
vendored
7
node_modules/prompts/dist/elements/prompt.js
generated
vendored
@@ -23,17 +23,18 @@ class Prompt extends EventEmitter {
|
||||
constructor(opts = {}) {
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user