Update build process, gitignore packagelock:

This commit is contained in:
pratik
2025-10-16 13:02:50 -05:00
parent 1016fee300
commit 2584e92af2
10 changed files with 64 additions and 184 deletions

View File

@@ -84,6 +84,32 @@ async def ui_root():
}
# Catch-all route for Angular SPA routing - must be last
@app.get("/{full_path:path}")
async def serve_spa(full_path: str):
"""Serve Angular SPA for all non-API routes"""
# If it's an API route, it should have been handled by routers above
# If it's a static file request, try to serve it
if full_path.startswith("static/"):
file_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), full_path)
if os.path.exists(file_path):
return FileResponse(file_path)
# For all other routes (Angular routes), serve index.html
index_path = os.path.join(static_dir, "index.html")
if os.path.exists(index_path):
return FileResponse(index_path)
else:
return {
"message": "Warehouse13 - Enterprise Test Artifact Storage",
"version": "1.0.0",
"docs": "/docs",
"ui": "UI not found. Serving API only.",
"deployment_mode": settings.deployment_mode,
"storage_backend": settings.storage_backend
}
@app.get("/health")
async def health_check():
"""Health check endpoint"""