import { assertEquals } from "jsr:@std/assert@1"; import { SessionsPage } from "./components/SessionsPage.tsx"; import { LoginPage } from "./components/LoginPage.tsx"; import { RegisterPage } from "./components/RegisterPage.tsx"; import { EventJoinPage } from "./components/EventJoinPage.tsx"; import { EventSplashPage } from "./components/EventSplashPage.tsx"; import { PasskeysPage } from "./components/PasskeysPage.tsx"; import { AdminAppsPage } from "./components/AdminAppsPage.tsx"; import { AdminInvitesPage } from "./components/AdminInvitesPage.tsx"; import { AdminRolesPage } from "./components/AdminRolesPage.tsx"; import { AdminUsersPage } from "./components/AdminUsersPage.tsx"; import { AdminUserDetailsPage } from "./components/AdminUserDetailsPage.tsx"; import { AuditLogPage } from "./components/AuditLogPage.tsx"; import { AAGUIDPage } from "./components/AAGUIDPage.tsx"; function validateJsSyntax(componentName: string, jsxResult: any) { const html = String(jsxResult); const scriptRegex = /]*)>([\s\S]*?)<\/script>/gi; let match; let scriptCount = 0; while ((match = scriptRegex.exec(html)) !== null) { const isModule = match[1].includes('type="module"') || match[1].includes("type='module'"); const scriptContent = match[2].trim(); if (!scriptContent) continue; scriptCount++; try { if (isModule) { // Strip import statements for syntax compilation check in new Function const cleanContent = scriptContent.replace( /import\s+[\s\S]*?from\s+['"][^'"]+['"];?/g, "// import stripped", ); new Function(cleanContent); } else { new Function(scriptContent); } } catch (err: any) { throw new Error( `Syntax error in