MCPcopy Index your code
hub / github.com/MiniMax-AI/cli / fetchLatestVersion

Function fetchLatestVersion

src/update/checker.ts:30–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28}
29
30async function fetchLatestVersion(): Promise<string | null> {
31 try {
32 const res = await fetch(
33 `https://api.github.com/repos/${REPO}/releases/latest`,
34 {
35 headers: { 'Accept': 'application/vnd.github+json', 'X-GitHub-Api-Version': '2022-11-28' },
36 signal: AbortSignal.timeout(FETCH_TIMEOUT_MS),
37 },
38 );
39 if (!res.ok) return null;
40 const data = await res.json() as { tag_name?: string };
41 return data.tag_name ?? null;
42 } catch {
43 return null;
44 }
45}
46
47let pendingNotification: string | null = null;
48

Callers 1

checkForUpdateFunction · 0.85

Calls 1

fetchFunction · 0.85

Tested by

no test coverage detected