Dashboard › cli › Distillation
d0308114-5a09-4e0e-ae45-0ad995ff3799["lore_tm_v1_l56tn6G9QeWxW1soG8mGbgZ9qbvBRApetd4XXKdkM8s","lore_tm_v1_BYNuOvtIyMVo6n3ichuHmGBs16uZizGpmZsFwpPu-dE","lore_tm_v1_JvSw8TlOuxHBTiHfcny0PwB5AcNdxmHGcD4ILDCFck8","lore_tm_v1_9UL5IaOBdIWY_4mCaR_bQIjyDVSFk_tveWF9VrIwCbU","lore_tm_v1_M0y-Yfbph2oweY5X-n8xSxTLFWfOaTVjA-2A7CWkDbk","lore_tm_v1_Qu7184-jwDsIinqek5YmIakSCrKTgX8kWQB8GMBTguw"]
packages/cli/package.json defines package sentry version 0.45.0-dev.0, repository git+https://github.com/getsentry/cli.git, Node engine >=20.0, development runtime Node >=22.15, and package manager pnpm@10.11.0.packages/cli/package.json exposes the sentry binary through ./dist/bin.cjs; package exports use ./dist/index.mjs with ./dist/index.d.mts for imports and ./dist/index.cjs with ./dist/index.d.cts for require.packages/cli/package.json scripts include check:patches: pnpm tsx script/check-patches.ts, test:unit: pnpm run generate:docs && pnpm run generate:sdk && vitest run test/lib test/commands test/types test/script --coverage, test:e2e: pnpm run generate:docs && pnpm run generate:sdk && vitest run test/e2e, and test:init-eval: vitest run test/init-eval --testTimeout 600000.packages/cli/package.json pins upgrade-relevant dev dependencies @sentry/core: 10.63.0, @sentry/node: 10.65.0, @sentry/node-core: 10.63.0, @sentry/symbolic: 13.7.0, and @stricli/core: 1.2.8.UPGRADE_SOURCES in packages/cli/src/lib/binary.ts: the primary source uses githubRepo: "getsentry/toolkit", ghcrRepo: "getsentry/toolkit", and tagPrefix: "cli@"; tests also retain fallback references to https://api.github.com/repos/getsentry/cli/releases/latest.getCurlInstallPaths() in packages/cli/src/lib/upgrade.ts prioritizes: 1. stored DB path when stored.method === "curl" and its directory still exists; 2. process.execPath when under a known curl directory; 3. the XDG-aware default from determineInstallDir(homedir(), process.env) plus getBinaryFilename().SENTRY_INSTALL_DIR installs whose directories were later purged; blindly trusting such rows caused ENOENT ... open '.../sentry.lock'. existsSync failures, including EACCES or transient unmounts, deliberately fall through to process.execPath or the default install path.buildKnownCurlPaths(homeDir, env) builds directory-boundary-safe paths from KNOWN_CURL_DIRS, appends an absolute XDG_BIN_HOME when present, and uses trailing separators to prevent paths such as ~/.local/bin/ from matching ~/.local/binaries/; getKnownCurlPaths() lazily memoizes the result to avoid circular-import TDZ issues.detectInstallationMethod() in packages/cli/src/lib/upgrade.ts uses this exact priority: 1. Homebrew via isHomebrewInstall(); 2. stored DB install info; 3. legacy detection through known curl paths, package-manager subprocesses, then the node_modules path; 4. best-effort persistence using setInstallInfo({ method: legacyMethod, path: process.execPath, version: CLI_VERSION }).isHomebrewInstall() resolves process.execPath with realpathSync() and checks for /Cellar/; if realpath resolution fails because the binary was deleted or moved, it checks the unresolved path.npm, pnpm, bun, then yarn; isInstalledWith() runs yarn global list --depth=0 for Yarn and <pm> list -g sentry for the others, requiring exit code 0 and stdout containing sentry@.runCommand() uses spawn(command, args) with shell: process.platform === "win32" so Windows .cmd package-manager executables work, captures trimmed stdout, drains and discards stderr, and maps a null close code to exit code 1.detectPackageManagerFromPath() examines process.argv[1]: no node_modules segment returns null; a .pnpm segment returns pnpm; a .bun segment returns bun; other node_modules layouts, including npm and Yarn Classic, return npm.fetchLatestVersion(method, channel) uses GitHub /releases/latest for curl and brew, npm registry https://registry.npmjs.org/sentry/latest for package-manager installs, and GHCR manifest metadata for the nightly channel.fetchLatestNightlyVersion() performs 2 HTTP requests—an anonymous GHCR token exchange and a fetch of the :nightly OCI manifest—then extracts the version annotation without downloading a blob.versionExists() checks nightly versions in GHCR under tags like nightly-0.14.0-dev.1772661724; HTTP 404 or 403 means the tag does not exist, while other network errors propagate as UpgradeError. Stable curl/brew versions use a GitHub release-tag HEAD, and stable package-manager versions use an npm-registry HEAD.const lookupMethod = channel === "nightly" ? "curl" : method.packages/cli/install.packages/cli/src/lib/binary.ts: line 273 passes headers: getGitHubHeaders(), line 408 exports getGitHubHeaders(), and line 426 exports fetchWithUpgradeError().