#!/usr/bin/env python3
"""Compatibility entrypoint for the Cloudflare Workers Builds command.

@ai-handoff
The canonical build pipeline is ``npm run build`` implemented by
``scripts/build.mjs``. This repository previously contained a stale Python
builder that generated an obsolete catalog and reintroduced ``soon`` entries;
that implementation must not be used for production. Cloudflare currently
invokes ``python3 build.py``, so this wrapper preserves that configured command
while delegating to the only supported source-of-truth build.

This file builds assets only. It never deploys, reads user input, calls an
external API, or changes Cloudflare configuration. The child process exit code
is passed through so Workers Builds fails fast when the canonical build fails.

@human-handoff
Prefer changing the Cloudflare Workers Builds dashboard command to
``npm ci && npm run build``. Keep this wrapper as a safe compatibility bridge
until that dashboard setting is verified and changed by the account owner.
"""

from __future__ import annotations

import subprocess
import sys


if __name__ == "__main__":
    raise SystemExit(subprocess.run(["npm", "run", "build"], check=False).returncode)
