UNPKG

@nxrocks/nx-ktor

Version:

Nx plugin to generate, run, package, build (and more) Ktor projects inside your Nx workspace

20 lines 974 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.promptKtorFeatures = promptKtorFeatures; const enquirer_1 = require("enquirer"); const ktor_utils_1 = require("../../../utils/ktor-utils"); const devkit_1 = require("@nx/devkit"); async function promptKtorFeatures(options) { if (options.features === undefined && process.env.NX_INTERACTIVE === 'true') { devkit_1.logger.info(`⏳ Fetching Ktor features list. Please wait...`); const features = (await (0, ktor_utils_1.fetchKtorFeatures)(options)).map((f) => f.name); options.projectFeatures = await (0, enquirer_1.prompt)({ name: 'features', message: 'What features would you like to use? (type something to filter, press [space] to multi-select)', type: 'autocomplete', choices: features, multiple: true, }).then((a) => a['features']); } } //# sourceMappingURL=prompt-ktor-features.js.map