Dashboard › cli › Distillation
8260b8fe-45f8-4903-8bf0-da67c3bd3610["lore_tm_v1_tZYtZ4gVQIdGzhMqms47khdxTganRrFEyKUhU9ACkTE","lore_tm_v1_SG58k4FvrSb4NwbBgrwy8vAGnP4u5Zn1dk3BCtxofOI","lore_tm_v1_l8V-wp1E1bOBnsSR4bt933DzC_3Qnk9RZSQ63q1q4p4","lore_tm_v1_qsiDMY0qleBfXUH1d-giNknOEEyEaBfr4pyEBm5Hngk","lore_tm_v1_IepoZrM3Cy0GiwhlkSBQkOsqa6uvvaXEv557cWvSSYw","lore_tm_v1_1n-XXJNOth6EevBmMHi66Kho8taalxNRJbbiGLxNQbA","lore_tm_v1_DXLHY71xcD1kALWw2djvvJiSGf7lN0RUK5cTkYTCtow"]
Date: September 9, 2026
resolveUpgradeSource() to return the successful probe Response so the caller never repeats the request.UPGRADE_SOURCES tries getsentry/toolkit first and getsentry/cli second, advancing only on HTTP 404.packages/cli/src/lib/binary.ts defines UpgradeSource with exact fields githubRepo, ghcrRepo, and tagPrefix; UPGRADE_SOURCES contains: 1. { githubRepo: "getsentry/toolkit", ghcrRepo: "getsentry/toolkit", tagPrefix: "cli@" }, 2. { githubRepo: "getsentry/cli", ghcrRepo: "getsentry/cli", tagPrefix: "" }; PRIMARY_UPGRADE_SOURCE = UPGRADE_SOURCES[0].packages/cli/src/lib/binary.ts source-aware helpers are getBinaryDownloadUrl(), getGitHubReleasesUrl(), getGitHubReleaseByTagUrl(), getGitHubLatestReleaseUrl(), and getGitHubRepositoryUrl(); each defaults its source argument to PRIMARY_UPGRADE_SOURCE.getGitHubLatestReleaseUrl() uses ${getGitHubReleasesUrl(source)}?per_page=100 for a source with tagPrefix, otherwise ${getGitHubReleasesUrl(source)}/latest.ResolvedUpgradeSource contains the selected source: UpgradeSource and successful probe response: Response; ResolveUpgradeSourceOptions contains getProbeUrl, optional CA-aware fetch, and optional shared AbortSignal.packages/cli/src/lib/ghcr.ts has source-aware GHCR operations defaulting to PRIMARY_UPGRADE_SOURCE; URLs use source.ghcrRepo for token scope, manifests, blobs, and paginated tag listing, while GHCR_REPO = PRIMARY_UPGRADE_SOURCE.ghcrRepo.packages/cli/src/lib/binary.ts, packages/cli/src/lib/ghcr.ts, packages/cli/test/lib/binary.test.ts, packages/cli/test/lib/ghcr.test.ts, and packages/cli/test/lib/install-script.test.ts.packages/cli/test/lib/delta-upgrade.test.ts high-level cases include: resolveStableDelta() returning null for test-mode CLI_VERSION = "0.0.0-dev"; resolveNightlyDelta() returning null on GHCR token HTTP 401, when no matching patch tags exist, and when the target manifest lacks a .gz layer; attemptDeltaUpgrade() returning null when canAttemptDelta is false; and prefetchNightlyPatches()/prefetchStablePatches() making no fetch when CLI_VERSION is dev.packages/cli/test/lib/delta-upgrade.test.ts model GHCR token exchange, /tags/list, target and patch manifest fetching, blob HTTP 307 redirects, redirected blob downloads, and HTTP 404 for missing resources.packages/cli/package.json identifies package sentry version 0.45.0-dev.0, repository getsentry/cli, Node engine >=20.0, development runtime >=22.15, package manager pnpm@10.11.0, TypeScript ^5.9.3, Vitest ^4.1.9, and binpatch ^0.4.2.packages/cli/src/lib/upgrade.ts, tryDeltaUpgrade(version, destPath, offline?, setMessage?) calls attemptDeltaUpgrade(version, process.execPath, destPath, offline, setMessage); downloadFullBinary() dispatches nightly versions to downloadNightlyToPath() and stable versions to downloadStableToPath(downloadTag ?? version, ...).packages/cli/src/lib/upgrade.ts verifies the downloaded binary with waitForBinaryVisible(tempPath) before spawning it, addressing a Windows + Bun 1.3.9 filesystem-visibility race tracked as CLI-1D3; it then best-effort calls clearPatchCache() and applies mode 0o755 on non-Windows platforms.