UNPKG

geenee-spell

Version:

regenerates project code based upon settings and a template

17 lines (16 loc) 764 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.askQuestion = void 0; const askForValue_1 = require("../editSpecs/askForValue"); const replaceGlobalValuesInObject_1 = require("./replaceGlobalValuesInObject"); const inquirer = require('inquirer'); async function askQuestion(subTypeInfo, subType, answers, session = {}) { const questionKeys = replaceGlobalValuesInObject_1.replaceGlobalValuesInObject(subTypeInfo, session, answers); const questions = [ askForValue_1.askForValue(null, questionKeys, subType, subType), ]; const theseAnswers = await inquirer.prompt(questions); answers = Object.assign(Object.assign({}, answers), theseAnswers); return answers; } exports.askQuestion = askQuestion;