fix: typer exit codes, JWT 7d expiry, shared test fixtures, AdminTab query, mantine 9.6.3

This commit is contained in:
Jonas Miederer 2026-09-30 22:27:58 +02:00
parent 03af41e837
commit 696db34c90
16 changed files with 210 additions and 251 deletions

View file

@ -11,7 +11,6 @@ from app (stdlib only), prints no secret values.
from __future__ import annotations
import sys
from pathlib import Path
import typer
@ -89,12 +88,12 @@ def check(values: dict[str, str]) -> tuple[list[str], list[str]]:
return failures, warnings
def main(env: str = typer.Option(str(REPO_ROOT / ".env"), "--env")) -> int:
def main(env: str = typer.Option(str(REPO_ROOT / ".env"), "--env")) -> None:
"""Validate a prod .env file (typer CLI; check/parse_env stay importable)."""
path = Path(env)
if not path.is_file():
print(f"no env file at {path}")
return 1
raise typer.Exit(1)
failures, warnings = check(parse_env(path))
for message in warnings:
print(f"WARN: {message}")
@ -102,10 +101,9 @@ def main(env: str = typer.Option(str(REPO_ROOT / ".env"), "--env")) -> int:
print(f"FAIL: {message}")
if failures:
print(f"{len(failures)} blocking issue(s) — fix before deploying")
return 1
raise typer.Exit(1)
print("prod env OK" + (f" ({len(warnings)} warning(s))" if warnings else ""))
return 0
if __name__ == "__main__":
sys.exit(typer.run(main))
typer.run(main)