Add rich update check, version diffs, and changelog release history querying
Binaries / Build & Release Binaries (push) Has been cancelled

This commit is contained in:
gitea committed 2026-08-25 15:25:23 +08:00
1 parent e716f069ed
commit 63d579c273
6 files changed
+338 -71

No files matched your search

+20
View File
@@ -165,6 +165,26 @@ describe("CLI version & help handling", () => {
expect(parsed.info.title).toContain("seal-home");
expect(parsed.paths).toHaveProperty("/v1/corps");
});
test("update check subcommand outputs structured check payload", () => {
const result = runCli(["update", "check"]);
expect(result.status).toBe(0);
const parsed = JSON.parse(result.stdout.trim());
expect(parsed).toHaveProperty("currentVersion");
expect(parsed).toHaveProperty("latestVersion");
expect(parsed).toHaveProperty("updateAvailable");
expect(parsed).toHaveProperty("behindCount");
expect(parsed).toHaveProperty("pendingReleases");
expect(Array.isArray(parsed.pendingReleases)).toBe(true);
});
test("changelog command outputs release history list", () => {
const result = runCli(["changelog", "--limit", "5"]);
expect(result.status).toBe(0);
const parsed = JSON.parse(result.stdout.trim());
expect(parsed.currentVersion).toBe(VERSION);
expect(Array.isArray(parsed.releases)).toBe(true);
});
});
function makeConfigEnv(): Record<string, string> {