Artifact Metadata Fixes
Added
-
JSON Validator service - New validation engine with 3 modes
generic— JSON syntax validation with formatted outputtxadmin-embed— Discord embed JSON validation for txAdmin status embeds- Validates all Discord embed properties (title, description, fields, image, thumbnail, author)
- Enforces Discord character limits (title: 256, description: 4096, fields: 25, field name: 256, field value: 1024)
- Detects unknown/unsupported embed properties
- Warns when
colororfooterare set (overridden by txAdmin at runtime) - Validates URLs and txAdmin placeholder syntax
txadmin-embed-config— txAdmin embed config validation- Validates required fields (
onlineString,offlineString,onlineColor,offlineColor) - Hex color format validation (#RGB / #RRGGBB)
- Button array validation (max 5 buttons, required label/url)
- Emoji field validation
- Validates required fields (
- User-friendly JSON parse error messages with line/column numbers
- Severity levels: error, warning, info
-
Validator API endpoints (2 endpoints)
POST /api/validator/validate— Validate JSON with type-specific schema checksGET /api/validator/info— Get available validation types, txAdmin placeholders, and Discord limits
-
Artifact metadata enrichment — Real commit dates and file sizes
- Fetches actual commit dates from GitHub Git Data API per SHA
- Fetches real artifact file sizes via HEAD requests to the CDN
- Concurrent enrichment with semaphore (10 parallel requests)
- Results cached for 24 hours (commit dates and file sizes never change)
- Falls back to estimated values on failure
Fixed
-
GitHub API 401 handling — Automatic retry without authentication
- When
GITHUB_TOKENis invalid/expired, requests now retry unauthenticated - Prevents complete API failure due to bad credentials
- Public repos (citizenfx/fivem) work fine without authentication (60 req/hr rate limit)
- When
-
Artifact dates showing "less than a minute ago" — All artifacts previously used
time.Now()- Now fetches real commit dates from GitHub for each artifact
- Dates accurately reflect when each version was actually released
-
Artifact sizes all showing 850.0 MB — Hardcoded estimate for all Windows artifacts
- Now fetches real file sizes via HEAD requests to the artifact CDN
- Each artifact displays its actual download size
Changed
-
Thread-safe cache — Added
sync.RWMutexto cache operationsgetCache()andsetCache()are now safe for concurrent access- Cache entries now support per-key TTL via
ttlfield oncacheEntry - Required for concurrent artifact enrichment
-
Updated version to
0.2.1, build time to2026-02-13