# Cloudflare Pages Functions bindings for project-r-score.
# Intentionally omits pages_build_output_dir so Git-integrated builds keep
# dashboard pins (BUN_VERSION=1.3.14, SKIP_DEPENDENCY_INSTALL, cmd=exit 0).
# Including pages_build_output_dir made asdf install packageManager bun@1.4.0 (404).
#
# @see https://developers.cloudflare.com/pages/functions/wrangler-configuration/
# @see docs/harness/tenants/cloudflare-pages.md

name = "project-r-score"
compatibility_date = "2026-02-08"

# CORS for /api/registry (optional; also set in Pages dashboard env)
[vars]
REGISTRY_CORS_ORIGINS = "https://factory-wager.com,https://project-r-score.pages.dev,https://score.factory-wager.com,https://wiki.factory-wager.com"

# R2 registry proxy for /api/registry/*
[[r2_buckets]]
binding = "REGISTRY_BUCKET"
bucket_name = "factory-wager-registry"
