#!/usr/bin/env python3 """Validate registry.json, source deck JSON, and built package artifacts.""" from __future__ import annotations import argparse from pathlib import Path from deck_registry import ROOT, validate_registry def parse_args() -> argparse.Namespace: parser = argparse.ArgumentParser(description=__doc__) parser.add_argument( "--root", type=Path, default=ROOT, help="Repository root. Defaults to the parent of scripts/.", ) return parser.parse_args() def main() -> int: args = parse_args() errors = validate_registry(args.root.resolve()) if errors: for error in errors: print(f"ERROR: {error}") return 1 print("registry, sources, and packages are valid") return 0 if __name__ == "__main__": raise SystemExit(main())