INNER CODE UNIT · TypeScript
unifiedQuestions
basti-app/basti · packages/basti/src/common/cli.ts:171
const unifiedQuestions = toArray(questions).map(question => {
const { message, prefix } = question;
return {
...question,
message:
typeof message === 'function'
? async (answers: T) => fmt.reset(await message(answers))
: typeof message === 'string'
? fmt.reset(message)
: message,
prefix: this.indentText(prefix ?? fmt.green('?')),
};
});
this.changeContext('none');
return inquirer.prompt(unifiedQuestions, initialAnswers);
}