#!/usr/bin/env node // Renders every route of the repository's four apps under `devora dev` (Vite) and under the experimental dev server, and // compares status, headers and normalised HTML. It starts both servers itself (ports 11001-11004) on copies of the apps in // a temporary project. A failed request or a timeout counts as a failure, and so does a difference; the exit code says so. // node scripts/dev-server-compare/parity.mjs import { APP_PORTS, get, makeRepoAppsProject, startServer } from "./lib.mjs"; const KEEP = ["content-type", "content-security-policy", "x-frame-options", "x-content-type-options", "strict-transport-security", "cache-control", "referrer-policy", "permissions-policy"]; const header = (v) => (v ?? "").replace(/'nonce-[^']*'/g, "'nonce-N'"); const normalise = (body, type) => !/html/.test(type) ? body : body .replace(/]*><\/script>/g, "