import { readFile, writeFile, readdir } from 'node:fs/promises'; import { createHash } from 'node:crypto'; let html = await readFile('dist/index.html', 'utf8'); const { build } = JSON.parse(await readFile('package.json', 'utf8')); const brand = JSON.parse(await readFile('desktop/brand.json', 'utf8')); if (build.productName !== brand.name || build.appId !== brand.appId) throw new Error('Desktop brand and package configuration must match.'); html = html.replace(/]*href="https:\/\/fonts\.[^>]*>/g, ''); html = html.replace(/