Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 5 additions & 18 deletions apps/web/src/hooks/use-cached-release-info.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { useQuery } from "@tanstack/react-query";

import { api } from "@/lib/api";
import type {
AssistedUpdateMetadata,
PendingMigration,
ReleaseChannel,
} from "@/hooks/use-release-stream";
// The snapshot shape is defined once on the server and imported type-only —
// esbuild erases these imports, so nothing from the server reaches the web
// bundle.
import type { ReleaseInfoSnapshot } from "../../../server/src/release-info";

/**
* Snapshot returned by GET /api/v1/release/cached-info — the in-memory
Expand All @@ -14,19 +13,7 @@ import type {
* /api/v1/release/info endpoint adds (unreleasedCount, commits, etc.) since
* the snapshot is shared across UI clients.
*/
export type ReleaseInfoSnapshot = {
currentTag: string | null;
channel: ReleaseChannel;
latestTag: string | null;
absoluteLatestTag: string | null;
updateAvailable: boolean;
latestRelease: { tag: string; publishedAt: string; url: string } | null;
assisted: AssistedUpdateMetadata | null;
assistedRequired: boolean;
pendingMigrations: PendingMigration[];
migrationsError: string | null;
computedAt: string;
};
export type { ReleaseInfoSnapshot };

export const CACHED_RELEASE_INFO_QUERY_KEY = [
"release",
Expand Down
Loading