MCPcopy Create free account
hub / github.com/api3dao/airnode / promptQuestions

Function promptQuestions

packages/airnode-examples/src/utils.ts:92–98  ·  view source on GitHub ↗
(questions: PromptObject[])

Source from the content-addressed store, hash-verified

90export const removeExtension = (filename: string) => filename.split('.')[0];
91
92export const promptQuestions = (questions: PromptObject[]) =>
93 prompts(questions, {
94 // https://github.com/terkelg/prompts/issues/27#issuecomment-527693302
95 onCancel: () => {
96 throw new Error('Aborted by the user');
97 },
98 });
99
100export const setMaxPromiseTimeout = <T>(promise: Promise<T>, timeoutMs: number): Promise<T> =>
101 Promise.race([promise, new Promise<never>((_, reject) => setTimeout(() => reject('Timeout exceeded!'), timeoutMs))]);

Callers 4

getCoinMarketCapApiKeyFunction · 0.90
getOpenWeatherApiKeyFunction · 0.90
mainFunction · 0.85
chooseIntegrationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected