(questions: PromptObject[])
| 90 | export const removeExtension = (filename: string) => filename.split('.')[0]; |
| 91 | |
| 92 | export 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 | |
| 100 | export const setMaxPromiseTimeout = <T>(promise: Promise<T>, timeoutMs: number): Promise<T> => |
| 101 | Promise.race([promise, new Promise<never>((_, reject) => setTimeout(() => reject('Timeout exceeded!'), timeoutMs))]); |
no outgoing calls
no test coverage detected