Skip to content

Commit eb46532

Browse files
authored
Develop (#9)
* fix: more artifacts stuff and updated changelog * fix: even more stuff yes * fix: artifact support logic and updated changelog * fix: artifact sizes and release dates and add josn validator * update versions * add support for more hashes etc * V0.2.2 release (#8) * Develop (#5) * fix: artifact sizes and release dates and add josn validator * update versions * updated changelog * V0.2.2 release (#6) * fix: artifact sizes and release dates and add josn validator * update versions * add support for more hashes etc * updated changelog * feat(add): fixed game references and more * feat(add) updated changelog and stuff
1 parent aea4513 commit eb46532

16 files changed

Lines changed: 6114 additions & 103 deletions

CHANGELOG.md

Lines changed: 152 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,158 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
- **Minor versions** (0.x.0): New features, non-breaking changes
1111
- **Major versions** (x.0.0): Breaking API changes
1212

13-
## [Unreleased]
14-
15-
### Planned
16-
- [ ] Chat API endpoint with message persistence
17-
- [ ] Contributors API with GitHub integration
18-
- [ ] Global search service (cross-service search)
19-
- [ ] Redis caching layer for improved performance
20-
- [ ] Rate limiting middleware
21-
- [ ] Authentication/Authorization system
22-
- [ ] Comprehensive test suite
23-
- [ ] Docker containerization
24-
- [ ] Monitoring and metrics collection
13+
## [0.2.3] - 2026-03-10
14+
15+
### Added
16+
- **Vehicle References** — 3 new game reference types under `/api/game-references`
17+
- `vehicle-models` — All GTA V / FiveM vehicle model names, model hashes, display names, and category groupings, suitable for use with `REQUEST_MODEL` and `GET_HASH_KEY`
18+
- `vehicle-colours` — All vehicle paint colour indices with names and types (metallic, matte, metals, unnamed) for use with `SET_VEHICLE_COLOURS` and related natives
19+
- `vehicle-flags` — All vehicle flag definitions with flag number, name, description, and the build version they were introduced in
20+
- **Vehicle Reference API endpoints** (3 endpoints added to `/api/game-references`)
21+
- `GET /api/game-references/vehicle-models` — Vehicle models; supports `?search=` and `?category=`
22+
- `GET /api/game-references/vehicle-colours` — Vehicle paint colours; supports `?search=` and `?type=`
23+
- `GET /api/game-references/vehicle-flags` — Vehicle flags; supports `?search=`
24+
- All endpoints support `?limit=` and `?offset=` for pagination
25+
26+
- **Swagger documentation** — Added `@Summary`, `@Tags`, `@Param`, `@Success`, and `@Failure` annotations to all handlers that previously lacked them
27+
- All 15 game reference handlers now fully documented
28+
- Both contributor handlers (`GetContributors`, `GetContributor`) now documented
29+
- Validator handlers (`ValidateJSON`, `GetValidatorInfo`) now documented
30+
31+
### Fixed
32+
- **`NativesMetadata` missing JSON tags** — All struct fields were PascalCase without `json:""` tags, causing every metadata field to deserialize as `undefined` on the frontend; all fields now use correct camelCase JSON tags
33+
- **`IncludeCfx` default override bug** — A conditional block unconditionally forced `IncludeCfx = true` whenever an environment filter was active, making it impossible to exclude CFX natives; the block has been removed
34+
- **`environmentStats` built from wrong set** — Stats were computed after game-filter but before environment-filter, producing inflated counts; stats now reflect the fully-filtered native set
35+
- **Swagger `ValidateRequest` anonymous struct**`ValidateJSON` used an anonymous struct for its request body, which `swag` cannot document; extracted to a named `ValidateRequest` type so `make swagger` succeeds without errors
36+
37+
---
38+
39+
## [0.2.2] - 2026-03-04
40+
41+
### Added
42+
- **Game References service** — New service fetching and parsing 12 GTA V / FiveM reference types from the official `citizenfx/fivem-docs` GitHub repository (raw markdown, no scraping)
43+
- `blips` — All minimap blip icons with IDs, names, and image URLs; optional blip color table
44+
- `checkpoints` — All checkpoint types split by section (standard 0–49 and type 44–46 variant)
45+
- `data-files` — All `data_file` manifest keys with file type, root element, mounter, and example
46+
- `game-events` — Client-side game events with names and descriptions
47+
- `gamer-tags` — Head display (gamer tag) component IDs and names
48+
- `hud-colors` — All ~234 HUD color indices with RGBA values and hex codes
49+
- `markers` — All 44 `DRAW_MARKER` types with IDs, names, and image URLs
50+
- `net-game-events` — Ordered `GTA_EVENT_IDS` enum entries with sequential IDs
51+
- `ped-models` — All pedestrian models organised by category with prop/component counts and images
52+
- `pickup-hashes` — All `ePickupHashes` enum entries with numeric hash values
53+
- `weapon-models` — All weapons grouped by type with hash keys, model hash keys, DLC, description, components, and tints
54+
- `zones` — All 1300+ map zones with zone name ID, zone name, and description
55+
56+
- **Game References API endpoints** (12 endpoints under `/api/game-references`)
57+
- `GET /api/game-references/blips` — Blip icons + optional color table; supports `?search=`
58+
- `GET /api/game-references/checkpoints` — Checkpoint types; supports `?section=standard|type-44-46`
59+
- `GET /api/game-references/data-files` — Data file types; supports `?search=`
60+
- `GET /api/game-references/game-events` — Game events; supports `?search=`
61+
- `GET /api/game-references/gamer-tags` — Gamer tag components; supports `?search=`
62+
- `GET /api/game-references/hud-colors` — HUD colors; supports `?search=`
63+
- `GET /api/game-references/markers` — World markers; supports `?search=`
64+
- `GET /api/game-references/net-game-events` — Net game events; supports `?search=`
65+
- `GET /api/game-references/ped-models` — Ped models; supports `?search=` and `?category=`
66+
- `GET /api/game-references/pickup-hashes` — Pickup hashes; supports `?search=`
67+
- `GET /api/game-references/weapon-models` — Weapon models; supports `?search=` and `?group=`
68+
- `GET /api/game-references/zones` — Map zones; supports `?search=`
69+
- All endpoints support `?limit=` and `?offset=` for pagination
70+
- All responses follow the standard `{ success, count, data, metadata }` envelope
71+
72+
- **Data source caching** — All game reference data cached in-memory for 1 hour (matching native/artifact TTL)
73+
- **Markdown and HTML parsers** — Custom parsers for each data format (HTML divs, C enums, markdown tables, inline HTML tables) without external dependencies
74+
75+
---
76+
77+
## [0.2.1] - 2026-02-13
78+
79+
### Added
80+
- **JSON Validator service** - New validation engine with 3 modes
81+
- `generic` — JSON syntax validation with formatted output
82+
- `txadmin-embed` — Discord embed JSON validation for txAdmin status embeds
83+
- Validates all Discord embed properties (title, description, fields, image, thumbnail, author)
84+
- Enforces Discord character limits (title: 256, description: 4096, fields: 25, field name: 256, field value: 1024)
85+
- Detects unknown/unsupported embed properties
86+
- Warns when `color` or `footer` are set (overridden by txAdmin at runtime)
87+
- Validates URLs and txAdmin placeholder syntax
88+
- `txadmin-embed-config` — txAdmin embed config validation
89+
- Validates required fields (`onlineString`, `offlineString`, `onlineColor`, `offlineColor`)
90+
- Hex color format validation (#RGB / #RRGGBB)
91+
- Button array validation (max 5 buttons, required label/url)
92+
- Emoji field validation
93+
- User-friendly JSON parse error messages with line/column numbers
94+
- Severity levels: error, warning, info
95+
96+
- **Validator API endpoints** (2 endpoints)
97+
- `POST /api/validator/validate` — Validate JSON with type-specific schema checks
98+
- `GET /api/validator/info` — Get available validation types, txAdmin placeholders, and Discord limits
99+
100+
- **Artifact metadata enrichment** — Real commit dates and file sizes
101+
- Fetches actual commit dates from GitHub Git Data API per SHA
102+
- Fetches real artifact file sizes via HEAD requests to the CDN
103+
- Concurrent enrichment with semaphore (10 parallel requests)
104+
- Results cached for 24 hours (commit dates and file sizes never change)
105+
- Falls back to estimated values on failure
106+
107+
### Fixed
108+
- **GitHub API 401 handling** — Automatic retry without authentication
109+
- When `GITHUB_TOKEN` is invalid/expired, requests now retry unauthenticated
110+
- Prevents complete API failure due to bad credentials
111+
- Public repos (citizenfx/fivem) work fine without authentication (60 req/hr rate limit)
112+
113+
- **Artifact dates showing "less than a minute ago"** — All artifacts previously used `time.Now()`
114+
- Now fetches real commit dates from GitHub for each artifact
115+
- Dates accurately reflect when each version was actually released
116+
117+
- **Artifact sizes all showing 850.0 MB** — Hardcoded estimate for all Windows artifacts
118+
- Now fetches real file sizes via HEAD requests to the artifact CDN
119+
- Each artifact displays its actual download size
120+
121+
### Changed
122+
- **Thread-safe cache** — Added `sync.RWMutex` to cache operations
123+
- `getCache()` and `setCache()` are now safe for concurrent access
124+
- Cache entries now support per-key TTL via `ttl` field on `cacheEntry`
125+
- Required for concurrent artifact enrichment
126+
127+
- Updated version to `0.2.1`, build time to `2026-02-13`
128+
129+
---
130+
131+
## [0.2.0] - 2026-01-25
132+
133+
### Added
134+
- **Full version string for hosting panels** - Added `FullVersion` field to artifact entries
135+
- Format: `{version}-{hash}` (e.g., `24769-315823736cfbc085104ca0d32779311cd2f1a5a8`)
136+
- Compatible with Pterodactyl, Pelican, and similar hosting panel egg configurations
137+
138+
- **Artifact statistics in API response** - Added `stats` object to metadata
139+
- Includes counts for: `total`, `recommended`, `latest`, `active`, `deprecated`, `eol`
140+
- Calculated from filtered results before pagination
141+
- Enables frontend to show accurate totals regardless of current page
142+
143+
### Fixed
144+
- **Pagination total count** - Fixed incorrect total count in pagination metadata
145+
- Previously returned count of paginated results instead of total filtered results
146+
- Created `ArtifactsResult` struct to properly track total count after filtering but before pagination
147+
- `hasMore` now correctly indicates if more pages are available
148+
149+
- **Latest vs Recommended logic** - Fixed support status assignment per CFX EOL policy
150+
- **Latest** = Single newest version (for testing/bleeding edge)
151+
- **Recommended** = Next 3 versions after Latest (stable for production)
152+
- Support status now dynamically assigned based on version position, not hardcoded thresholds
153+
- See https://aka.cfx.re/eol for CFX official policy
154+
155+
- **EOL filter default** - Changed `includeEol` default from `true` to `false`
156+
- EOL artifacts are now excluded by default for safety
157+
- Users must explicitly opt-in to see end-of-life versions
158+
159+
### Changed
160+
- Updated all artifact handlers to use new `ArtifactsResult` return type
161+
- Refactored `generateFullVersion()` helper to accept hash parameter
162+
- Added `ArtifactStats` struct and `calculateStats()` helper function
163+
- Refactored `ProcessGitHubTags` to dynamically assign Latest/Recommended based on sorted position
164+
- Simplified `determineSupportStatus()` to only handle Active/Deprecated/EOL thresholds
25165

26166
---
27167

0 commit comments

Comments
 (0)