Skip to content

Commit 23c2fae

Browse files
committed
fix: more artifacts stuff and updated changelog
1 parent aea4513 commit 23c2fae

2 files changed

Lines changed: 24 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2525

2626
---
2727

28+
## [0.1.1] - Unreleased
29+
30+
### Added
31+
- **Full version string for hosting panels** - Added `FullVersion` field to artifact entries
32+
- Format: `{version}-{hash}` (e.g., `24769-315823736cfbc085104ca0d32779311cd2f1a5a8`)
33+
- Compatible with Pterodactyl, Pelican, and similar hosting panel egg configurations
34+
35+
### Fixed
36+
- **Pagination total count** - Fixed incorrect total count in pagination metadata
37+
- Previously returned count of paginated results instead of total filtered results
38+
- Created `ArtifactsResult` struct to properly track total count after filtering but before pagination
39+
- `hasMore` now correctly indicates if more pages are available
40+
41+
### Changed
42+
- Updated all artifact handlers to use new `ArtifactsResult` return type
43+
- Refactored `generateFullVersion()` helper to accept hash parameter
44+
45+
---
46+
2847
## [0.1.0] - 2026-01-25
2948

3049
### Added

internal/services/artifacts.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ func (s *ArtifactsService) GetArtifacts(query ArtifactsQuery) (*ArtifactsResult,
392392
for version, artifact := range processedData.Windows {
393393
artifacts = append(artifacts, ArtifactEntry{
394394
Version: version,
395-
FullVersion: s.generateFullVersion(version),
395+
FullVersion: s.generateFullVersion(version, artifact.Hash),
396396
Hash: artifact.Hash,
397397
Platform: Windows,
398398
Date: artifact.Date,
@@ -404,7 +404,7 @@ func (s *ArtifactsService) GetArtifacts(query ArtifactsQuery) (*ArtifactsResult,
404404
for version, artifact := range processedData.Linux {
405405
artifacts = append(artifacts, ArtifactEntry{
406406
Version: version,
407-
FullVersion: s.generateFullVersion(version),
407+
FullVersion: s.generateFullVersion(version, artifact.Hash),
408408
Hash: artifact.Hash,
409409
Platform: Linux,
410410
Date: artifact.Date,
@@ -464,9 +464,9 @@ func (s *ArtifactsService) determineSupportStatus(version int) SupportStatus {
464464
}
465465

466466
// generateFullVersion creates the full version string for hosting panels like Pterodactyl
467-
// Format: v1.0.0.{build_number} (e.g., v1.0.0.12345)
468-
func (s *ArtifactsService) generateFullVersion(version string) string {
469-
return fmt.Sprintf("v1.0.0.%s", version)
467+
// Format: {version}-{hash} (e.g., 24769-315823736cfbc085104ca0d32779311cd2f1a5a8)
468+
func (s *ArtifactsService) generateFullVersion(version string, hash string) string {
469+
return fmt.Sprintf("%s-%s", version, hash)
470470
}
471471

472472
func (s *ArtifactsService) estimateSize(version string, platform string) int64 {

0 commit comments

Comments
 (0)