Compare commits

..
2 Commits
Author SHA1 Message Date
LeoVasanko b8bf46132a Reload arguments passed differently to avoid uvicorn warning in prod mode. 2026-02-06 22:43:00 +00:00
LeoVasanko ca85c2fcfb Ruff 2026-02-06 22:37:03 +00:00
2 changed files with 8 additions and 3 deletions
+6 -2
View File
@@ -842,7 +842,9 @@ def patch_frontend_health_check(frontend_dir: Path, dry_run: bool = False) -> bo
# SHA-256 of old vite-plugin-fastapi.js (before auto-upgrade marker was added)
# with module name replaced by MODULE_NAME in the outDir path
_OLD_VITE_PLUGIN_SHA256 = "93713e879c15a25c750a70ce1de684adeaf11b0c723c38da56e5e7ba207f6632"
_OLD_VITE_PLUGIN_SHA256 = (
"93713e879c15a25c750a70ce1de684adeaf11b0c723c38da56e5e7ba207f6632"
)
def _upgrade_old_vite_plugin(
@@ -861,7 +863,9 @@ def _upgrade_old_vite_plugin(
return # Already new format, write_file handles it
import hashlib
normalized = content.replace(f"../{module_name}/frontend-build", "../MODULE_NAME/frontend-build")
normalized = content.replace(
f"../{module_name}/frontend-build", "../MODULE_NAME/frontend-build"
)
digest = hashlib.sha256(normalized.encode()).hexdigest()
if digest != _OLD_VITE_PLUGIN_SHA256:
return # Modified by user, don't touch
+2 -1
View File
@@ -17,11 +17,12 @@ def main():
help=(f"Endpoint (default: localhost:{DEFAULT_PORT})."),
)
args = parser.parse_args()
dev = {"reload": True, "reload_dirs": ["MODULE_NAME"]}
server.run(
"MODULE_NAME.APP_MODULE:APP_VAR",
listen=args.listen,
default_port=DEFAULT_PORT,
reload=DEVMODE,
**(dev if DEVMODE else {}),
)