v0.5.84: matches origin filter, mobile gate, refresh reliability.

Ship Web refresh cache/lock, mobile demand gate, matches 职业/国服 filter, and related site updates through 0.5.84.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
voson
2026-07-29 18:31:55 +08:00
co-authored by Cursor
parent 7681fdb069
commit b01552ee6e
50 changed files with 3406 additions and 487 deletions
+15 -7
View File
@@ -32,6 +32,7 @@ import json
import os
import shutil
from shared.http_utils import write_json_atomic
from shared.paths import (
ABILITY_ICONS,
ABILITY_VIDEOS,
@@ -50,7 +51,7 @@ from shared.paths import (
from serve_relations import WEB_DIR, build_payload
SITE_VERSION = "0.5.72"
SITE_VERSION = "0.5.84"
DEFAULT_OSS_BASE = "https://climperor.oss-cn-shanghai.aliyuncs.com"
@@ -187,11 +188,11 @@ def main() -> None:
shutil.rmtree(out)
out.mkdir(parents=True)
for name in ("index.html", "router.js", "app.js", "style.css", "_headers"):
for name in ("index.html", "router.js", "app.js", "style.css", "mobile-gate.js", "_headers"):
src = WEB_DIR / name
if src.is_file():
shutil.copy2(src, out / name)
# Cloudflare Pages Functions (functions/api/live-status.js -> /api/live-status).
# Cloudflare Pages Functions (functions/api/*.js -> /api/*).
functions_src = WEB_DIR / "functions"
n_functions = 0
if functions_src.is_dir():
@@ -205,9 +206,13 @@ def main() -> None:
)
payload = build_payload()
(out / "data.json").write_text(
json.dumps(payload, ensure_ascii=False, separators=(",", ":")),
encoding="utf-8",
refresh_run_id = os.environ.get("REFRESH_RUN_ID") or ""
payload.setdefault("meta", {})["refresh_run_id"] = refresh_run_id
write_json_atomic(
out / "data.json",
payload,
indent=None,
separators=(",", ":"),
)
if static_base:
@@ -246,7 +251,10 @@ def main() -> None:
f"ABILITY_VIDEO_BASE={video_base!r} STATIC_ASSET_BASE={static_base!r}"
)
print(f" total: {total / 1e6:.1f} MB")
print(f"local check: python -m http.server -d {out} 8080")
print(
f"local Pages Function check: npx wrangler pages dev . "
f"--port 8789 (run from {out})"
)
print("deploy: upload the directory to any static host (Pages / nginx / ...)")