import{logger as t}from"../../server/tools/notifiers/logger.js";import{reporter as s}from"../../server/tools/notifiers/reporter.js";function o(){t.isInteractive()&&(process.stdin.setRawMode(!0),process.stdin.resume(),process.stdin.setEncoding("utf8"),process.stdin.on("data",r=>{if(r===""&&process.exit(),r==="\x7F"){process.stdout.write("\b \b");return}if(r==="\r"){process.stdout.write(`
`);return}if(r==="e"){s.printErrors();return}r==="q"&&process.exit(0)}))}export{o as listenStdin};
