in generator/utils.ts [175:183]
export async function writeJsonFile(filePath: string, json: any) {
try {
const rawContents = JSON.stringify(json, null, 2);
await writeFile(filePath, rawContents, { encoding: 'utf8' });
} catch (err) {
throw new Error(`Failed to read JSON file '${filePath}': ${err}`);
}
}