26def find(registry: Path, prefix: str) -> list[dict]:
27 prefix = prefix.lower().strip()
29 for path
in sorted(registry.rglob(
"*.json")):
31 rec = json.loads(path.read_text())
32 except (json.JSONDecodeError, OSError):
34 if str(rec.get(
"image_digest",
"")).lower().startswith(prefix):
35 rec[
"_path"] = str(path)