fix: update sample server to use PackageType (v10.5.0-beta.6 compat)#131
Merged
Conversation
… IsCrossVersion/FromVersion - Replace VerificationResultDTO.IsCrossVersion/FromVersion with PackageType - Replace Server internal VersionEntry record fields with PackageType - Update all 4 PowerShell scripts (generate, finalize, create_versions, gen_packages) - Update versions.json sample data - Update Program.cs verification/download logic - Keep PatchGenerator backward-compat parsing for old fields
There was a problem hiding this comment.
Pull request overview
This PR updates the sample server and package-generation scripts to align with the v10.5.0-beta.6 API change that replaces IsCrossVersion/FromVersion with PackageType.
Changes:
- Replace
IsCrossVersion/FromVersionwithPackageTypein server DTO/model and verification/logging output. - Update PowerShell package generation scripts to emit
PackageType. - Update sample
versions.jsondata to includePackageType.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Server/Program.cs | Switch server-side filtering/log output and internal VersionEntry model to PackageType. |
| src/Server/DTOs/VerificationResultDTO.cs | Replace cross-version fields with PackageType in the verification response DTO. |
| src/Server/wwwroot/packages/versions.json | Update sample metadata to use PackageType instead of cross-version fields. |
| src/Server/generate_packages.ps1 | Emit PackageType in generated metadata and bridge PatchGenerator output. |
| src/Server/finalize_packages.ps1 | Emit PackageType when finalizing/aggregating packages into versions.json. |
| src/Server/create_versions_json.ps1 | Emit PackageType when rebuilding versions.json from existing zip files. |
| src/gen_packages.ps1 | Emit PackageType in the quick package generation script. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+14
to
16
| "Hash": "a1f180bfc0a58429a42be59d15421b810c993274af65b23a0b049880bb415d47", | ||
| "packageType": 2 | ||
| }, |
Comment on lines
+29
to
31
| "Hash": "0d7727be7ea8520fe60ce37ce30b1a956ee6e33b252489045b4d852134b4abc6", | ||
| "packageType": 2 | ||
| }, |
Comment on lines
+44
to
46
| "Hash": "47e693ac91230db216cf4ece7d6775e7bc73b79028eb76f847f74ad01d125ef6", | ||
| "packageType": 2 | ||
| }, |
Comment on lines
+59
to
61
| "Hash": "47e693ac91230db216cf4ece7d6775e7bc73b79028eb76f847f74ad01d125ef6", | ||
| "packageType": 2 | ||
| }, |
Comment on lines
+74
to
76
| "Hash": "d0e74a16a230eb53cfd6d3d955582f3b1c22f838822e61a3148afcd2336ef94c", | ||
| "packageType": 2 | ||
| }, |
Comment on lines
88
to
+89
| foreach (var r in results) | ||
| Console.WriteLine($" {r.Version} — {r.Name} ({(r.IsCrossVersion == true ? $"Cross {r.FromVersion} → {r.Version}" : "Full")})"); | ||
| Console.WriteLine($" {r.Version} — {r.Name} ({(r.PackageType == 1 ? "Chain" : "Full")})"); |
Comment on lines
163
to
+164
| foreach (var v in versionStore.OrderBy(v => new Version(v.Version!))) | ||
| Console.WriteLine($" {v.Version,-12} AppType={v.AppType} {(v.IsCrossVersion == true ? $"Cross {v.FromVersion} → {v.Version}" : "Full")} {v.PacketName}"); | ||
| Console.WriteLine($" {v.Version,-12} AppType={v.AppType} {(v.PackageType == 1 ? "Chain" : "Full")} {v.PacketName}"); |
Comment on lines
+234
to
+236
| /// <summary> | ||
| /// 包类型: 0=Unspecified, 1=Chain(差分), 2=Full(完整包), 3=Driver | ||
| /// </summary> |
Comment on lines
153
to
156
| Size = $pe.Size | ||
| IsFreeze = $pe.IsFreeze | ||
| IsCrossVersion = $(if ($pe.IsCrossVersion) { $true } else { $false }) | ||
| FromVersion = $pe.FromVersion | ||
| ToVersion = $pe.ToVersion | ||
| PackageType = $(if ($pe.PackageType) { $pe.PackageType } elseif ($pe.IsCrossVersion) { 1 } else { 2 }) | ||
| } |
Comment on lines
75
to
77
| /// <summary> | ||
| /// 是否为跨版本升级包 | ||
| /// 包类型: 0=Unspecified, 1=Chain(差分), 2=Full(完整包), 3=Driver | ||
| /// </summary> |
…rap example - New StandardUpdateSample (Index=1): clean, minimal GeneralUpdateBootstrap config with all essential listeners, no mock files - Shift all existing sample indices by +1 to accommodate - StandardUpdateSample is the go-to reference for first-time integrators
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
适配 v10.5.0-beta.6 API 变更
变更背景
v10.5.0-beta.6 的 VersionEntry 移除了 IsCrossVersion/FromVersion 属性,改用 PackageType(0=Unspecified, 1=Chain, 2=Full)
变更内容