尽快推进:收紧浏览器后端边界

This commit is contained in:
cnc
2026-06-05 08:25:48 +08:00
parent c71d2964ee
commit 9da6ffcd6a
2 changed files with 8 additions and 0 deletions

View File

@@ -121,4 +121,10 @@ for entry in [
app = Path("web/src/app.js").read_text(encoding="utf-8")
if "parse(" in app.replace("parseProgram", ""):
raise SystemExit("browser app should route program execution through parseFileWithParameterFile, not direct parse")
if app.count("elements.backendSelect.value = linuxCncBackend;") != 2:
raise SystemExit("browser app backend selector must only be forced to the LinuxCNC backend")
if "backendSelect.value" in app.replace("elements.backendSelect.value = linuxCncBackend;", ""):
raise SystemExit("browser app must not read the backend selector as a dynamic backend source")
if 'backend: linuxCncBackend' not in app:
raise SystemExit("browser app parse options must force the LinuxCNC backend")
PY