fix: close audited CAD delivery gate gaps

This commit is contained in:
2026-07-10 15:58:51 +08:00
parent a761175c09
commit 6c1336fa59
15 changed files with 713 additions and 124 deletions

View File

@@ -2,6 +2,7 @@ from __future__ import annotations
import json
import os
import shutil
import socket
import subprocess
import sys
@@ -50,7 +51,9 @@ def test_served_viewer_in_desktop_and_mobile(tmp_path: Path) -> None:
],
check=True,
)
subprocess.run(["npm", "install", "--prefix", str(web), "--ignore-scripts"], check=True)
npm = shutil.which("npm.cmd" if sys.platform == "win32" else "npm") or shutil.which("npm")
assert npm, "npm executable not found"
subprocess.run([npm, "install", "--prefix", str(web), "--ignore-scripts"], check=True)
with socket.socket() as sock:
sock.bind(("127.0.0.1", 0))
port = sock.getsockname()[1]