Release ForgeFlow 0.8.8 Gitea asset route fix

This commit is contained in:
NuklearRabbit
2026-07-26 04:50:50 +02:00
parent 40d41f9a32
commit e888bd2c1c
11 changed files with 75 additions and 21 deletions
+5 -2
View File
@@ -331,11 +331,14 @@ class GiteaService {
throw new Error("The update download exceeded the redirect limit.");
}
async downloadReleaseAsset(owner, repo, assetId, options = {}) {
async downloadReleaseAsset(owner, repo, releaseId, assetId, options = {}) {
const numericReleaseId = Number(releaseId);
const numericId = Number(assetId);
if (!Number.isSafeInteger(numericReleaseId) || numericReleaseId <= 0)
throw new Error("Gitea returned an invalid release ID.");
if (!Number.isSafeInteger(numericId) || numericId <= 0)
throw new Error("Gitea returned an invalid release asset ID.");
const assetPath = `/api/v1/repos/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/releases/assets/${numericId}`;
const assetPath = `/api/v1/repos/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/releases/${numericReleaseId}/assets/${numericId}`;
return this.downloadAuthenticated(assetPath, options);
}
+7 -1
View File
@@ -300,10 +300,16 @@ class UpdateService {
}
const [binary, checksumBytes] = await Promise.all([
this.gitea.downloadReleaseAsset(update.owner, update.repo, asset.id),
this.gitea.downloadReleaseAsset(
update.owner,
update.repo,
release.id,
asset.id,
),
this.gitea.downloadReleaseAsset(
update.owner,
update.repo,
release.id,
checksumAsset.id,
),
]);
+1 -1
View File
@@ -564,7 +564,7 @@
await wait(80);
snapshot();
return {
appVersion: "0.8.7-demo",
appVersion: "0.8.8-demo",
platform: "win32",
state: clone(state),
git: { available: true, version: "git version 2.47.3" },