feat: switch extension updates to COS

This commit is contained in:
2026-05-25 10:32:39 +08:00
parent 8fa9fc4469
commit 57e4dc72aa
10 changed files with 205 additions and 21 deletions
+11
View File
@@ -0,0 +1,11 @@
import { describe, expect, test } from "vitest";
import { UPDATE_MANIFEST_URL } from "../src/shared/update-config";
describe("update-config", () => {
test("points popup update checks at the COS latest manifest", () => {
expect(UPDATE_MANIFEST_URL).toBe(
"https://wksgx-1343191620.cos.ap-nanjing.myqcloud.com/star-chart-search-enhancer/latest.json"
);
});
});
+29
View File
@@ -0,0 +1,29 @@
import { describe, expect, test } from "vitest";
import { createLatestManifest } from "../scripts/write-latest-manifest-data.mjs";
describe("write-latest-manifest-data", () => {
test("builds COS asset URLs from the release base", () => {
expect(
createLatestManifest({
latestVersion: "0.2.0421.2",
minSupportedVersion: "0.2.0421.2",
publicBaseUrl:
"https://wksgx-1343191620.cos.ap-nanjing.myqcloud.com/star-chart-search-enhancer/releases/0.2.0421.2",
publishedAt: "2026-05-25"
})
).toEqual({
guideUrl:
"https://wksgx-1343191620.cos.ap-nanjing.myqcloud.com/star-chart-search-enhancer/releases/0.2.0421.2/星图增强插件-超简单安装使用指南.pdf",
latestVersion: "0.2.0421.2",
minSupportedVersion: "0.2.0421.2",
publishedAt: "2026-05-25",
releaseNotes: [
"支持在插件弹窗中检查新版本",
"支持一键下载最新版插件压缩包和使用说明"
],
zipUrl:
"https://wksgx-1343191620.cos.ap-nanjing.myqcloud.com/star-chart-search-enhancer/releases/0.2.0421.2/star-chart-search-enhancer-internal.zip"
});
});
});