// Makes a prerendered page and the same page after the CMS host filled its // markers comparable. The deployment check (deploy/verify-deployment.sh) // compares what the server sends with the file in dist; since the host // writes the current packages, banners, prices and address into the page, // those parts are taken out of both sides first. Everything else must still be // byte for byte equal, so an old build or a wrong server config is still // caught. The rules mirror the host contract in // aidlc-docs/features/asf-cms-host-injection/plan.md. // // Usage: node config/normalizeInjected.ts [site-url ...] import { readFileSync, writeFileSync } from 'node:fs'; const REGION = /()[\s\S]*?()/g; const DATA_BLOCK = /(?:)?