MCPcopy
hub / github.com/streamich/git-cz / runInteractiveQuestions

Function runInteractiveQuestions

lib/runInteractiveQuestions.js:16–31  ·  view source on GitHub ↗
(state, cliAnswers = {})

Source from the content-addressed store, hash-verified

14// }
15
16const runInteractiveQuestions = async (state, cliAnswers = {}) => {
17 Object.keys(cliAnswers).forEach((key) => {
18 state.answers[key] = cliAnswers[key];
19 });
20
21 const questions = createQuestions(state, cliAnswers);
22 const answers = await inquirer.prompt(questions);
23
24 Object.keys(state.answers).forEach((key) => {
25 if (answers[key]) {
26 state.answers[key] = answers[key];
27 }
28 });
29
30 return answers;
31};
32
33module.exports = runInteractiveQuestions;

Callers 2

mainFunction · 0.85
runFunction · 0.85

Calls 1

createQuestionsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…