From 3df03d8cd36151053e6db7aa043559a631a62a71 Mon Sep 17 00:00:00 2001 From: Anurag07-crypto Date: Mon, 16 Nov 2026 11:30:46 +0530 Subject: [PATCH 1/2] Fix bdweb frontend build directory path --- src/bdweb/backend/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bdweb/backend/server.py b/src/bdweb/backend/server.py index 74427b2a..459870b7 100644 --- a/src/bdweb/backend/server.py +++ b/src/bdweb/backend/server.py @@ -484,6 +484,6 @@ def run_diagram(req: RunRequest) -> dict[str, Any]: # Serve built SvelteKit app (production only — dev uses Vite) # --------------------------------------------------------------------------- -_frontend_build = Path(__file__).parent.parent.parent / "frontend" / "build" +_frontend_build = Path(__file__).parent.parent / "frontend" / "build" if _frontend_build.exists(): app.mount("/", StaticFiles(directory=str(_frontend_build), html=True), name="static") From aae2f5ee0fcd03feef9c2d0dfb7061ef2129c111 Mon Sep 17 00:00:00 2001 From: Anurag07-crypto Date: Tue, 17 Nov 2026 12:44:45 +0530 Subject: [PATCH 2/2] test: cover bdweb frontend build path --- tests/test_bdweb.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_bdweb.py b/tests/test_bdweb.py index f9e1b750..fe5213c6 100644 --- a/tests/test_bdweb.py +++ b/tests/test_bdweb.py @@ -17,6 +17,12 @@ from bdweb.backend import server +def test_frontend_build_path_is_correct() -> None: + frontend_dir = server._frontend_build.parent + + assert frontend_dir.name == "frontend" + assert (frontend_dir / "package.json").is_file() + @pytest.fixture def client(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> Iterator[TestClient]: