import re import sys from pathlib import Path root = Path(sys.argv[1]) forbidden = [ re.compile( r"api\.base44\.com", re.IGNORECASE, ), re.compile( r"@base44/(?:sdk|vite-plugin)", re.IGNORECASE, ), re.compile( r"base44_access_token", re.IGNORECASE, ), re.compile( r"VITE_BASE44_", re.IGNORECASE, ), re.compile( r"media\.base44\.com", re.IGNORECASE, ), re.compile( r"static\.wixstatic\.com", re.IGNORECASE, ), re.compile( r"base44\.(?:auth|entities|functions|integrations)", re.IGNORECASE, ), re.compile( r"createClientFromRequest", re.IGNORECASE, ), ] checked = [] for path in sorted(root.rglob("*")): if ( not path.is_file() or path.suffix.lower() not in {".html", ".js", ".css", ".json"} ): continue text = path.read_text( encoding="utf-8", errors="replace", ) checked.append(str(path.relative_to(root))) for pattern in forbidden: match = pattern.search(text) if match: start = max(0, match.start() - 100) end = min(len(text), match.end() + 100) context = text[start:end] raise SystemExit( "FORBIDDEN RUNTIME REFERENCE\n" f"File: {path}\n" f"Pattern: {pattern.pattern}\n" f"Context: {context}" ) print("Executable files checked:", len(checked)) for name in checked: print(" PASS:", name) print("Base44 API domain: ABSENT") print("Base44 SDK imports: ABSENT") print("Base44 authentication storage: ABSENT") print("Base44 entity/function calls: ABSENT") print("Wix/Base44 media hosts: ABSENT") print("BASE44 RUNTIME EXCLUSION: PASS")