UNPKG

ryuu

Version:

Domo App Dev Studio CLI, The main tool used to create, edit, and publish app designs to Domo

26 lines 1.05 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Abstraction around multichoice questions that works in Windows, despite https://github.com/nodejs/node/issues/5384 * Uses arrow keys for non-windows and number selection for windows * Further clarification as of 3/2020: There is an issue with gitbash that doesn't allow * stdin with readline. We will continue to use this as a workaround while this remains an issue * (which appears to be for the unforseeable future) */ var isWindows = /^win/.test(process.platform); exports.default = (function (questions, previousLogins, NEW_INSTANCE) { if (!isWindows) { return questions; } else { questions.type = 'rawlist'; questions.pageSize = 20; if (previousLogins) { questions.choices = function () { return previousLogins.map(function (login) { return login.instance; }).concat(NEW_INSTANCE); }; } return questions; } }); //# sourceMappingURL=multichoice.js.map