Files
wehub-resource-sync 2114b14ee0
Sync main into demo / sync (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:35:26 +08:00

70 lines
3.7 KiB
Bash

# Environment template for local development.
# VITE_* values used by frontend code are visible in browser JavaScript.
# Protect browser-side keys with referrer or domain restrictions.
# Google Maps: live Google fallback in apps/Map.
# Create a key at: https://console.cloud.google.com/apis/credentials
# Enable Maps JavaScript API. Enable Places API for online search, autocomplete, and place details.
# Always restrict the key by referrer/domain.
# Recommended for the best Map rendering and live fallback, but optional for the
# canonical MobileGym-Bench split. Without it, Map uses bundled places/routes
# snapshots first and can load captured Maps JS/resources from the local Service
# Worker cache; benchmark tasks should remain usable, but some uncached places,
# details, tiles, or online fallbacks may be missing.
# Required for reliable live Google fallback beyond the bundled cache, fresh
# online map resources, or regenerating apps/Map data/SW snapshots.
VITE_GOOGLE_MAPS_API_KEY=
# Google Maps Vector Map ID: used by AdvancedMarkerElement. This is not a secret.
# Optional. Leave empty unless you have created your own Google Cloud Map ID
# for custom vector-map style or settings. If empty, the app uses DEMO_MAP_ID.
VITE_GOOGLE_MAP_ID=
# AMap Web Service: reverse geocoding (coordinates -> address).
# Create a key at: https://lbs.amap.com/dev/key
# Optional. Weather includes offline names for default cities and common coordinates.
# If empty: direct reverseGeocode() calls fail. Weather catches this error and
# uses an offline name if it has one. Otherwise the location name may be generic or empty.
VITE_AMAP_API_KEY=
# QWeather API: live weather and forecast data for apps/Weather and scripts/fetch_weather_snapshot.mjs.
# Create a key at: https://dev.qweather.com/
# Optional for normal app use because weatherBundles.json includes offline data for major cities.
# Required for coordinates not included in the offline data, and for regenerating weather snapshots.
# If API_KEY is empty: offline cities still work; live Weather requests fail.
VITE_QWEATHER_HOST=https://devapi.qweather.com
VITE_QWEATHER_API_KEY=
# AI inference (built-in OS LLM calls)
# Optional. If VITE_AI_BASE_URL is empty, the built-in AI service uses mock/random replies.
# Local development can point to DashScope or another OpenAI-compatible endpoint.
# VITE_AI_API_KEY is visible in browser JavaScript.
# For production, prefer a server-side proxy and keep the real key on the server.
VITE_AI_BASE_URL=
# VITE_AI_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
VITE_AI_MODEL=qwen-flash
VITE_AI_API_KEY=
# CDN
# CDN prefix for large static files such as wallpapers, ringtones, and app icons.
# Optional. If empty: generated URLs use /cdn.
# npm run dev and npm run preview map /cdn to the local mobilegym-data/ mirror.
# npm run build only writes /cdn URLs into dist; serving /cdn still depends on the server you use.
# If the local mirror is missing, the app still runs, but those media files may return 404.
VITE_CDN_BASE=
# Local development / benchmark helpers
# Host allowlist for /api/gw/fetch and /api/gw/proxy. Use comma-separated hosts.
# Optional. Leave empty for private local development.
# If set, gateway requests to other hosts return 403.
# Set this only when the dev/preview server is shared or exposed to others.
# Example: VITE_GW_ALLOW_HOSTS=devapi.qweather.com,restapi.amap.com
VITE_GW_ALLOW_HOSTS=
# Advanced storage isolation override: off | tab | load.
# Optional. Usually leave empty. The app has its own default, and URL parameters such as
# ?storageIsolation=off|tab|load can also override it for a single session.
# This is not the same as bench_env's --isolation pages|contexts|browsers option.
VITE_STORAGE_ISOLATION_MODE=