/release.json adds the sum of every release asset's downloads; the update manifests are the apps' checks, not downloads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
12 lines
491 B
TypeScript
12 lines
491 B
TypeScript
// Gitea redirects this to the newest release.
|
|
export const RELEASES = "https://git.zacharyzhang.com/ZacharyZhang-NY/ElyOffice/releases/latest";
|
|
|
|
export type Release = { version: string; downloads: number };
|
|
|
|
/** The newest release and all downloads, from the worker. */
|
|
export async function latest(): Promise<Release> {
|
|
const res = await fetch("/release.json");
|
|
if (!res.ok) throw new Error(`release.json: ${res.status} ${await res.text()}`);
|
|
return (await res.json()) as Release;
|
|
}
|