Fix Cloudflare Worker compatibility for version endpoint

- Add version parameter to AppConfig interface
- Pass version from environment config instead of using process.env
- Update worker.ts to pass VERSION environment variable
- Update wrangler.toml with VERSION variable
- Update deploy script to automatically set VERSION to git commit hash

This fixes the 'process is not defined' error in Cloudflare Workers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-08 11:45:41 +01:00
parent d4aefb93b0
commit 8cb56142cd
5 changed files with 7 additions and 2 deletions

View File

@@ -12,6 +12,7 @@ database_id = "b94e3f71-816d-455b-a89d-927fa49532d0"
[vars]
SESSION_TIMEOUT = "300000" # 5 minutes in milliseconds
CORS_ORIGINS = "*" # Comma-separated list of allowed origins
VERSION = "unknown" # Set to git commit hash before deploying
# Build configuration
[build]