MCPcopy
hub / github.com/google/gts / query

Function query

src/init.ts:52–75  ·  view source on GitHub ↗
(
  message: string,
  question: string,
  defaultVal: boolean,
  options: Options,
)

Source from the content-addressed store, hash-verified

50};
51
52async function query(
53 message: string,
54 question: string,
55 defaultVal: boolean,
56 options: Options,
57): Promise<boolean> {
58 if (options.yes) {
59 return true;
60 } else if (options.no) {
61 return false;
62 }
63
64 if (message) {
65 options.logger.log(message);
66 }
67
68 const answers: inquirer.Answers = await inquirer.prompt({
69 type: 'confirm',
70 name: 'query',
71 message: question,
72 default: defaultVal,
73 });
74 return answers.query;
75}
76
77export async function addScripts(
78 packageJson: PackageJSON,

Callers 4

addScriptsFunction · 0.85
addDependenciesFunction · 0.85
generateConfigFileFunction · 0.85
initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…