(message: string)
| 79 | } |
| 80 | |
| 81 | async function askQuestion(message: string): Promise<string> { |
| 82 | const name = `Question-${serialId()}`; |
| 83 | |
| 84 | return prompt([ |
| 85 | { |
| 86 | type: "input", |
| 87 | message, |
| 88 | name, |
| 89 | prefix, |
| 90 | onCancel: cancelFlow, |
| 91 | } as StringPromptOptions, |
| 92 | ]) |
| 93 | .then((responses: any) => responses[name]) |
| 94 | .catch((err: unknown) => { |
| 95 | error(err); |
| 96 | }); |
| 97 | } |
| 98 | |
| 99 | function askQuestionWithEditor(message: string): string { |
| 100 | const response = edit(message, { postfix: ".md" }); |