add: track shared modules, vendor scripts, and update gitignore

- lib/common.py: shared run/load_json/save_json utilities
- webui/api/common.py: _ok/_error response helpers
- webui/static/htmx.min.js, json-enc.js: vendored frontend deps
- scripts/update-vendor.sh: frontend vendor updater
- vendor/acme.sh: bundled ACME client
- .gitignore: add .playwright-mcp/ and opencode.json.pwenv
This commit is contained in:
2026-05-25 01:13:34 +00:00
parent ecb5a9a44d
commit f81be96e59
7 changed files with 8536 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
#!/usr/bin/env bash
# Download and vendor frontend JS libraries into webui/static/
# and backend binaries into vendor/.
# Run from the project root after updating the VERSION variables below.
set -euo pipefail
# ---- Library versions ----
HTMX_VERSION="2.0.4"
HTMX_JSON_ENC_VERSION="2.0.0"
ACME_VERSION="3.1.3"
STATIC_DIR="webui/static"
download() {
local name="$1" url="$2" dest="$3"
if [[ -n "${SKIP_DOWNLOAD:-}" ]]; then
echo "[skip] $name (SKIP_DOWNLOAD is set)"
return
fi
echo "[download] $name$dest"
curl -sfL -o "$dest" "$url"
}
download "htmx@${HTMX_VERSION}" \
"https://unpkg.com/htmx.org@${HTMX_VERSION}/dist/htmx.min.js" \
"${STATIC_DIR}/htmx.min.js"
download "htmx-ext-json-enc@${HTMX_JSON_ENC_VERSION}" \
"https://unpkg.com/htmx-ext-json-enc@${HTMX_JSON_ENC_VERSION}/json-enc.js" \
"${STATIC_DIR}/json-enc.js"
download "acme.sh@${ACME_VERSION}" \
"https://raw.githubusercontent.com/acmesh-official/acme.sh/${ACME_VERSION}/acme.sh" \
"vendor/acme.sh"
chmod +x "vendor/acme.sh"
echo "[done] All libraries vendored."