MCPcopy Create free account
hub / github.com/freecodexyz/free-code / getLatestVersionFromGcs

Function getLatestVersionFromGcs

src/utils/autoUpdater.ts:384–397  ·  view source on GitHub ↗
(
  channel: ReleaseChannel,
)

Source from the content-addressed store, hash-verified

382 * This is used by installations that don't have npm (e.g. package manager installs).
383 */
384export async function getLatestVersionFromGcs(
385 channel: ReleaseChannel,
386): Promise<string | null> {
387 try {
388 const response = await axios.get(`${GCS_BUCKET_URL}/${channel}`, {
389 timeout: 5000,
390 responseType: 'text',
391 })
392 return response.data.trim()
393 } catch (error) {
394 logForDebugging(`Failed to fetch ${channel} from GCS: ${error}`)
395 return null
396 }
397}
398
399/**
400 * Get available versions from GCS bucket (for native installations).

Callers 2

getGcsDistTagsFunction · 0.85

Calls 2

logForDebuggingFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected