#!/usr/bin/env node // Release-independent, real-source startup ordering and recovery contract. import assert from 'node:assert/strict'; import { readFileSync } from 'node:fs'; import { runInNewContext } from 'node:vm'; import { resolve, dirname } from 'node:path'; import { fileURLToPath } from 'node:url'; const root = resolve(dirname(fileURLToPath(import.meta.url)), '../..'); const read = path => readFileSync(resolve(root, path), 'utf8'); const html = read('src/admin/web/index.html'); const runtime = read('src/admin/web/app/runtime.js'); const core = read('src/admin/web/app/core.js'); const router = read('src/admin/router.rs'); const bundle = read('tools/checks/web_assets.py'); const version = read('Cargo.toml').match(/^version\s*=\s*"([\d.]+)"/m)?.[1]; assert(version); assert.equal((html.match(/