Reorganize repository into pc web shared monorepo

Separate the local recognition, web publishing, and shared data paths while preserving direct script execution and existing site content.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
voson
2026-07-29 14:29:08 +08:00
co-authored by Cursor
parent 96a9312194
commit 9c5aa5b610
280 changed files with 1451 additions and 450 deletions
+53
View File
@@ -0,0 +1,53 @@
"""Probe a single Cloudflare Pages custom domain + its zone DNS record."""
from __future__ import annotations
import json
import os
import urllib.error
import urllib.request
DOMAIN = "dota2.refining.dev"
PROJECT = "climperor-relations"
def cf(method: str, path: str, email: str, key: str) -> dict:
url = "https://api.cloudflare.com/client/v4" + path
req = urllib.request.Request(url, method=method, headers={
"X-Auth-Email": email, "X-Auth-Key": key, "Content-Type": "application/json",
})
try:
with urllib.request.urlopen(req) as r:
return json.loads(r.read().decode())
except urllib.error.HTTPError as e:
return json.loads(e.read().decode())
def main() -> None:
email = os.environ.get("CLOUDFLARE_EMAIL") or os.environ.get("KEYZOO_ASSET_META_USERNAME")
key = os.environ.get("CLOUDFLARE_API_KEY") or os.environ.get("KEYZOO_ASSET_SECRET_GLOBAL_API_KEY")
d = cf("GET", "/accounts", email, key)
aid = (d.get("result") or [{}])[0].get("id")
d = cf("GET", f"/accounts/{aid}/pages/projects/{PROJECT}/domains/{DOMAIN}", email, key)
print("domain detail:")
for k, v in (d.get("result") or {}).items():
if k != "zone_id":
print(f" {k}: {v}")
zd = cf("GET", "/zones?name=refining.dev", email, key)
zr = zd.get("result") or []
if not zr:
print("zone refining.dev: NOT FOUND on this account")
return
zid = zr[0]["id"]
recs = cf("GET", f"/zones/{zid}/dns_records?name={DOMAIN}", email, key)
print(f"dns records for {DOMAIN}:")
for rec in (recs.get("result") or []):
print(f" {rec.get('type')} {rec.get('name')} -> {rec.get('content')} (proxied={rec.get('proxied')})")
if not (recs.get("result") or []):
print(" (none -- CNAME not added yet)")
if __name__ == "__main__":
main()