Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function start() {
// process.stdin.removeAllListeners('keypress');
// process.stdin.removeAllListeners('end');
_interactiveDebug('readable count:', process.stdin.listenerCount('readable'));
_interactiveDebug('keypress count:', process.stdin.listenerCount('keypress'));
_interactiveDebug('keypress count:', process.stdin.listenerCount('keypress'));
inquirer.restoreDefaultPrompts();
inquirer.prompt(firstSetOfQuestions).then(function (respuestas) {
if (respuestas.action === choices.topLevelOpts.GenerateCommand) {
return secondSet(start);
}
else if (respuestas.action === choices.topLevelOpts.Learn) {
throw new Error('Learn the Suman API is not implemented yet.');
}
else if (respuestas.action === choices.topLevelOpts.Troubleshoot) {
throw new Error('Troubleshoot is not implemented yet.');
}
else {
throw new Error('Action not recognized.');
}
}).catch(rejectionHandler);