MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / fetchLatestFromCdn

Function fetchLatestFromCdn

apps/kimi-code/src/cli/update/cdn.ts:88–97  ·  view source on GitHub ↗
(
  fetchImpl: typeof fetch = fetch,
)

Source from the content-addressed store, hash-verified

86 * **Throws** only when both sources fail; callers must catch (see above).
87 */
88export async function fetchLatestFromCdn(
89 fetchImpl: typeof fetch = fetch,
90): Promise<FetchLatestResult> {
91 const manifest = await fetchUpdateManifestFromCdn(fetchImpl).catch(() => null);
92 if (manifest !== null) {
93 return { latest: manifest.version, manifest };
94 }
95 const latest = await fetchLatestVersionFromCdn(fetchImpl);
96 return { latest, manifest: null };
97}

Callers 2

cdn.test.tsFile · 0.90
refreshUpdateCacheFunction · 0.90

Calls 2

Tested by

no test coverage detected