Dashboard › cli › Distillation
c5ec41ad-f139-4b01-9ee1-f0cfae7e11fd["lore_tm_v1_lDWixBLT6LselgA9GaA8zEwmFL3RW6C8bQTIDZGnqO4","lore_tm_v1_LTBG5KWwV8Hq2T8GkkYJnLwhkt7x4Pces1XeHrZgiW4","lore_tm_v1_OlSE6S8tfNKpZke_02hKEd25AWeJXYkqFAnQhthRQLo","lore_tm_v1_dSl9TUa0FX3qBSGhBqTjr7Ew-WkheAIgXbr202tN5Qw","lore_tm_v1_bLaxfB0wRxUArUcSAhJ7K583jm3wC4l2J8gZ8y70J0Y","lore_tm_v1_SOOfBdbELWha1wzJ7JmBoGH7TPdG15OPLMeZfUJiS-o","lore_tm_v1_jGLOkhkYtMQa1aqdkHxCAqePrOEjkn8unFpsJeYtpD4","lore_tm_v1_VRBqW2eCHoWIv_r3Hggsom0QKtI00DbLJ-xeZBKF7yk"]
awaited and their return values used: βAlways await promises in async functions - don't forget to use the return value.βpackages/cli/.cursor/rules/ultracite.mdc defines Ultracite/Biome standards for **/*.{ts,tsx,js,jsx,json,jsonc,html,vue,svelte,astro,css,yaml,yml,graphql,gql,md,mdx,grit}; commands are npx ultracite fix, npx ultracite check, and npx ultracite doctor, with npx ultracite fix required before committing.unknown over any; use as const for immutable values/literal types; prefer TypeScript narrowing over assertions; replace magic numbers with descriptively named constants.for...of over .forEach() and indexed loops; use optional chaining (?.) and nullish coalescing (??); prefer template literals and destructuring; default to const, use let only for reassignment, and never use var.async/await over promise chains, handle async errors appropriately with meaningful try-catch blocks, and never use async functions as Promise executors.console.log, debugger, and alert from production code; throw descriptive Error objects rather than strings or other values; do not catch errors merely to rethrow them; prefer early returns for error cases.rel="noopener" to links using target="_blank"; avoid dangerouslySetInnerHTML unless absolutely necessary; never use eval() or assign directly to document.cookie; validate and sanitize user input.<Image> rather than <img>.it() or test() blocks; async tests should use async/await instead of done callbacks; committed code must not contain .only or .skip; test suites should remain reasonably flat without excessive describe nesting.packages/cli: src/lib/version-check.ts, src/lib/upgrade.ts, src/commands/cli/upgrade.ts, src/lib/scan/binary.ts, src/lib/release-notes.ts, src/lib/patch-cache.ts, src/lib/ghcr.ts, src/lib/delta-upgrade.ts, src/lib/db/version-check.ts, and src/lib/binary.ts.packages/cli: test/e2e/delta-upgrade.test.ts, test/commands/cli/upgrade.test.ts, test/lib/version-check.test.ts, test/lib/upgrade.test.ts, test/lib/scan/binary.test.ts, test/lib/scan/binary.property.test.ts, test/lib/release-notes.test.ts, test/lib/release-notes.property.test.ts, test/lib/patch-cache.test.ts, test/lib/ghcr.test.ts, test/lib/delta-upgrade.test.ts, test/lib/delta-upgrade.mocked.test.ts, test/lib/binary.test.ts, and test/lib/binary.mocked.test.ts.src/lib/version-check.ts uses 24-hour check and notification intervals (24 * 60 * 60 * 1000), JITTER_FACTOR = 0.2, and background patch-prefetch functions prefetchNightlyPatches and prefetchStablePatches; update checks call fetchLatestNightlyVersion(signal) or fetchLatestFromGitHub(signal).src/lib/upgrade.ts defines PackageManager = "npm" | "pnpm" | "bun" | "yarn", OfflineMode = false | "explicit" | "network-fallback", NIGHTLY_TAG = "nightly", NPM_REGISTRY_URL = "https://registry.npmjs.org/sentry", VERSION_PREFIX_REGEX = /^v/, VERIFY_MAX_ATTEMPTS = 6, and VERIFY_BASE_DELAY_MS = 100.src/lib/upgrade.ts includes installation-method detection, GitHub/npm/nightly version lookup, stable and nightly downloads, delta-upgrade attempts, package-manager/Homebrew execution, binary visibility probing, and downloadBinaryToTemp; tryDeltaUpgrade() uses return await attemptDeltaUpgrade(...).src/lib/delta-upgrade.ts supports stable patch downloads and chain resolution plus nightly GHCR chain resolution; GHCR settings are registry https://ghcr.io and imported repo constant GHCR_REPO.src/lib/ghcr.ts defines GHCR_REPO = "getsentry/cli" and GHCR_REGISTRY = "https://ghcr.io"; blob downloads may return direct HTTP 200 or redirects 301/302/307/308, including GHCRβs 307 redirect to Azure Blob Storage, and redirect targets are fetched without forwarding authorization.src/lib/binary.ts defines GITHUB_RELEASES_URL = "https://api.github.com/repos/getsentry/cli/releases" and constructs binary URLs as https://github.com/getsentry/cli/releases/download/${version}/${getPlatformBinaryName()}.test/lib/upgrade.test.ts verifies global package-manager invocation arguments for npm, pnpm, and bun as ["install", "-g", "sentry@1.2.3"]; it also tests stored installation methods, Homebrew override behavior, .bun path detection, curl install paths, stale install-info paths, GHCR nightly lookup, and unknown-method errors.test/lib/binary.test.ts covers shared binary helpers, derived paths, replacement behavior, fresh installation, directory creation, lock cleanup, and .download cleanup; derived path conventions include tempPath = ${installPath}.download, oldPath = ${installPath}.old, and lockPath = ${installPath}.lock.