(path: string)
| 36 | |
| 37 | /** Accept a plain file path or stdin while retaining the shared input limits. */ |
| 38 | export function readJSONFile(path: string): Promise<unknown> { |
| 39 | return readJSON(path === '-' ? '-' : `@${path}`); |
| 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.'); |