Dashboard › cli › Distillation
07292a0e-7209-4387-97c8-0841014aab02["lore_tm_v1_369SzSOxjqqUzzQrrlZ16jZjQEOQQ44DkB_J-wUMl3U","lore_tm_v1_JJ2wDVIeO2sEdFIhZcQJu-_umHyHSXS7wAMPp43dlOY","lore_tm_v1_D4PNW_VwMT6Xz4DPEu-UJVp0JYLx5gsf-I8Y8R887Es"]
packages/cli/src/lib/release-notes.ts now imports valid as semverValid from semver and imports getGitHubReleasesUrl, PRIMARY_UPGRADE_SOURCE, and type UpgradeSource from ./binary.js, replacing direct use of GITHUB_RELEASES_URL.UpgradeSource; FetchChangelogOptions includes source?: UpgradeSource.fetchStableChangelog(options: FetchChangelogOptions & { source: UpgradeSource }) destructures fromVersion, toVersion, maxItems, prefetchedReleases, and source; prefetched releases are processed with normalizeChangelogReleases(prefetchedReleases, source, true), while otherwise releases are fetched with fetchReleasesForChangelog(source).buildChangelogSummaryForSource(releases, fromVersion, toVersion, { maxItems, source }).extractNightlyTimestamp(version) recognizes nightly versions in format X.Y.Z-dev.<unix-seconds> and returns the parsed Unix timestamp in seconds or null when the version does not match or the timestamp cannot be parsed.packages/cli/src/lib/delta-upgrade.ts now imports getGitHubReleasesUrl, PRIMARY_UPGRADE_SOURCE, and type UpgradeSource from ./binary.js, replacing GITHUB_RELEASES_URL and the direct GHCR_REPO import.packages/cli/src/lib/delta-upgrade.ts adds isGitHubRelease(value: unknown), which requires a non-null object with string tag_name and array assets; the guarded type also permits optional draft and prerelease booleans.nightlySource(source: UpgradeSource) configures ghcrSource() with registry: "https://ghcr.io", repo: source.ghcrRepo, the platform binary name, target tags formatted as nightly-${version}, compareVersions, user agent sentry-cli/${CLI_VERSION}, customFetch, and instrument.resolveNightlyChain() now accepts source?: UpgradeSource, defaults it via getPrimaryUpgradeSource(), and creates its OciClient with repo: source.ghcrRepo.resolveNightlyChain() returns null when no matching chain tags exist or when the chain exceeds MAX_NIGHTLY_CHAIN_DEPTH.resolveNightlyDelta(targetVersion, oldBinaryPath, destPath, offline?, setMessage?, source = getPrimaryUpgradeSource()) passes source into nightlySource(source) so nightly delta resolution follows the selected upgrade source.downloadStablePatch(url, signal?) requests the patch with User-Agent: sentry-cli/${CLI_VERSION} and returns its bytes only for an OK response; fetch failures are debug-logged and return null.validateChainStep(manifest, opts) first checks the patchβs source version and reports reason: "version-mismatch" with expected and actual versions; after binpatchValidateChainStep(), it distinguishes reason: "size-exceeded" with layerSize and budget from reason: "missing-layer" with layerName.packages/cli/src/lib/version-check.ts now uses fetchLatestFromGitHubWithSource and fetchLatestNightlyVersionWithSource from ./upgrade.js and imports type UpgradeSource from ./binary.js.maybePrefetchPatches(channel, latestVersion, signal, source) passes the discovered UpgradeSource to prefetchNightlyPatches(latestVersion, signal, source) or prefetchStablePatches(latestVersion, signal, source); it remains best-effort, catches errors, logs "Delta patch pre-fetch failed (best-effort)", and only prefetches when latestVersion is newer than CLI_VERSION.{ version: latestVersion, source } from fetchLatestNightlyVersionWithSource(signal) for nightly or fetchLatestFromGitHubWithSource(signal) for stable, persists latestVersion, and uses the same discovered source when prefetching delta patches.checkForUpdateInBackgroundImpl() never throws: errors are caught and reported to Sentry; a database-access failure during the initial eligibility check is passed to Sentry.captureException(error) and does not crash the CLI.getUpdateNotificationWithCopy() never throws: it returns null on errors and reports them to Sentry.getUpdateNotificationWithCopy() also returns null when stderr is not a TTY, no cached latest version exists, the CLI is up to date, or notification is rate-limited; when it returns a message, it persists last_notified = now through markUpdateNotified.setup and fix only when associated with the cli command group, including when global flags occur before cli or between cli and the subcommand.