(path: string | undefined, html: string)
| 40 | } |
| 41 | |
| 42 | export async function writeHTML(path: string | undefined, html: string): Promise<{ output: string }> { |
| 43 | if (!path?.trim()) throw new Error('--output is required.'); |
| 44 | |
| 45 | const output = resolve(path); |
| 46 | await writeFile(output, html, { flag: 'wx', mode: 0o600 }); |
| 47 | |
| 48 | return { output }; |
| 49 | } |