import {readFile} from 'node:fs/promises'; import assert from 'node:assert/strict'; import vm from 'node:vm'; const html=await readFile(new URL('../public/ZeyadsStuffV2.html',import.meta.url),'utf8'); assert(!/]+src=/.test(html),'Script dependency left in HTML'); assert(!/]+rel="stylesheet"/.test(html),'External stylesheet left in HTML'); for(const style of html.matchAll(/]*>([\s\S]*?)<\/style>/g))assert(!/@import/i.test(style[1]),'External font stylesheet left in HTML'); assert(!/(?:src|href)="\/assets\//.test(html),'Unembedded image'); assert(!/url\(['"]?\/assets\//.test(html),'Unembedded font'); assert(html.includes('data-single-file="true"')); assert(html.includes('Single file mode — read this first')); assert(!html.includes('PROXY_PASSWORD')); for(const match of html.matchAll(/]*>([\s\S]*?)<\/script>/g)) new vm.Script(match[1]); console.log('Single-file integrity and JavaScript syntax checks passed.');