|
59 | 59 | - [DONE] CLI `render`: catch `FileNotFoundError` / `PermissionError` from `spec.read_text()` and exit with code 1 |
60 | 60 | - [DONE] CLI `render`: catch `json.JSONDecodeError` from `Canvas.from_json()` and exit with code 1 |
61 | 61 | - [DONE] `_substitute_vars`: raise `ValidationError` on unresolved `$VAR` / `${VAR}` placeholders (currently passes them through silently) |
62 | | -- [TODO] Guard CLI entrypoint import: print a helpful message and exit if `typer` is not installed instead of crashing with `ImportError` |
| 62 | +- [REVIEW] Guard CLI entrypoint import: print a helpful message and exit if `typer` is not installed instead of crashing with `ImportError` |
63 | 63 | - [DONE] CLI `render`: validate `--var` entries contain `=`; raise a clear error when `--var keyonly` is passed (currently silently maps to empty string) |
64 | 64 | - [DONE] CLI `render`: replace bare `except Exception` with `except (RenderingError, OSError)` to avoid masking real bugs |
65 | 65 | - [DONE] CLI `render`: validate `--quality` is in `1–95` range (`typer.Option(..., min=1, max=95)`) |
66 | 66 | - [DONE] CLI `render`: validate `--format` is one of `PNG`, `JPEG`, `WEBP`; reject unknown values early |
67 | 67 |
|
68 | 68 | ### P2 — Font Cache Hardening (from code review) |
69 | 69 |
|
70 | | -- [TODO] Use `tempfile.gettempdir()` instead of hardcoded `"/tmp"` as the default font cache dir (fixes Windows compatibility) |
| 70 | +- [REVIEW] Use `tempfile.gettempdir()` instead of hardcoded `"/tmp"` as the default font cache dir (fixes Windows compatibility) |
71 | 71 | - [TODO] Validate downloaded font content before writing to cache (currently writes arbitrary data from any URL) |
72 | 72 | - [DONE] Call `os.makedirs(cache_dir, exist_ok=True)` before writing cached font; `QUICKTHUMB_FONT_CACHE_DIR` pointing to a non-existent dir currently crashes with `FileNotFoundError` |
73 | 73 |
|
74 | 74 | ### P2 — CLI Polish (from code review) |
75 | 75 |
|
76 | | -- [TODO] Rename `format` parameter to `fmt` or `output_format` internally — currently shadows Python's built-in `format()` |
77 | | -- [TODO] Widen typer version pin from `>=0.24.1,<0.25.0` to `>=0.24.1,<1.0` to avoid unnecessary resolver conflicts |
| 76 | +- [DONE] Rename `format` parameter to `fmt` or `output_format` internally — currently shadows Python's built-in `format()` |
| 77 | +- [REVIEW] Widen typer version pin from `>=0.24.1,<0.25.0` to `>=0.24.1,<1.0` to avoid unnecessary resolver conflicts |
78 | 78 |
|
79 | 79 | ### P3 — Lower Priority |
80 | 80 |
|
|
0 commit comments