Dashboard › cli › Distillation
6d5a44a8-c645-4333-ad41-b760ffac402d["lore_tm_v1_zlrv1xjZNVYq9BFlgNcSF67xPA3VikGidtECjldoc6g","lore_tm_v1_MsZWOBvk88Hu9pgjmUs5dlUHf3j9ENvRkgQiYgCNK04","lore_tm_v1_w2UAIjHjkRNq0Dusl0R59DR-tYQ7bwsIVL7_M08UOiI","lore_tm_v1_BookPpj-T8LwhmpmvuWsTZTUW_QvEfu1VRXkMTTRXaU","lore_tm_v1_a4M9C6hiUupL0iNQ57cZuGjfLvCR5zBES_afTb7b4Rs"]
packages/cli/test/lib/binary.test.ts uses Vitest (afterEach, beforeEach, describe, expect, test) and exercises binary URL/platform formatting, determineInstallDir(), fetchWithUpgradeError(), binary installation/replacement, executable permissions, locking via acquireLock(), .download cleanup, replacement of existing content, and symlinked install paths.installPath, ${installPath}.lock, and join(installDir, \${getBinaryFilename()}.download`); one test explicitly verifies the temporary .downloadfile is removed after installation, and another verifies existing"old content"is replaced by"new content"`.packages/cli/test/lib/binary.test.ts tests fetchWithUpgradeError("https://example.com", {}, "GitHub"), including preservation of an AbortError and handling of intentionally thrown non-Error values..local/bin, bin, and .sentry/bin, plus a custom directory supplied through SENTRY_INSTALL_DIR.packages/cli/package.json defines package sentry at version 0.40.0-dev.0, repository git+https://github.com/getsentry/cli.git, license FSL-1.1-Apache-2.0, "type": "module", Node engine >=18.0, development runtime Node >=22.15, and package manager pnpm@10.11.0../dist/index.cjs for "main", ./dist/index.d.cts for "types", import exports ./dist/index.mjs plus ./dist/index.d.mts, require exports ./dist/index.cjs plus ./dist/index.d.cts, and executable "sentry": "./dist/bin.cjs".dist/bin.cjs; 2. dist/index.cjs; 3. dist/index.mjs; 4. dist/index.d.cts; 5. dist/index.d.mts; 6. dist/ink-app.js; 7. dist/node-sqlite3-wasm.wasm; 8. dist/vendor/symbolic_bg.wasm; 9. LICENSE.md; 10. README.md."build": "pnpm run generate:schema && pnpm run generate:docs && pnpm run generate:sdk && pnpm tsx script/build.ts --single", "build:all": "pnpm run generate:schema && pnpm run generate:docs && pnpm run generate:sdk && pnpm tsx script/build.ts", "bundle": "pnpm run generate:schema && pnpm run generate:docs && pnpm run generate:sdk && pnpm tsx script/bundle.ts", "typecheck": "pnpm run generate:docs && pnpm run generate:sdk && tsc --noEmit", "lint": "biome check --no-errors-on-unmatched --max-diagnostics=none ./", and "lint:fix": "biome check --write --no-errors-on-unmatched --max-diagnostics=none ./"."test": "pnpm run test:unit", "test:unit": "pnpm run generate:docs && pnpm run generate:sdk && vitest run test/lib test/commands test/types test/script --coverage", "test:changed": "pnpm run generate:docs && pnpm run generate:sdk && vitest run --changed", "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".generate:parser, generate:sdk, generate:skill, generate:banner, generate:docs, generate:docs-sections, generate:schema, and generate:command-docs; generate:docs runs banner, parser, command-docs, skill, and docs-sections generation in that order."check:fragments": "pnpm tsx script/check-fragments.ts", "check:deps": "pnpm tsx script/check-no-deps.ts", "check:errors": "pnpm tsx script/check-error-patterns.ts", "check:patches": "pnpm tsx script/check-patches.ts", "check:docs-sections": "pnpm tsx script/generate-docs-sections.ts --check", and "check:stale-refs": "pnpm tsx script/check-stale-references.ts".@biomejs/biome 2.3.8, @sentry/core 10.63.0, @sentry/node-core 10.63.0, @sentry/symbolic 13.7.0, @stricli/core 1.2.8, @types/node ^22.20.0, @vitest/coverage-v8 ^4.1.9, esbuild ^0.28.1, fast-check ^4.8.0, semver ^7.8.5, tsx ^4.22.4, typescript ^5.9.3, vitest ^4.1.9, and zod ^3.25.76.packages/cli/src/lib/binary.ts defines KNOWN_CURL_DIRS = [".local/bin", "bin", ".sentry/bin"].InstallationMethod in packages/cli/src/lib/binary.ts is the union "curl" | "brew" | "npm" | "pnpm" | "bun" | "yarn" | "unknown". parseInstallationMethod(value) lowercases input but accepts only curl, brew, npm, pnpm, bun, and yarn; invalid input throws Invalid method: ${value}. Must be one of: ${VALID_METHODS.join(", ")}.isMusl() implementation in packages/cli/src/lib/binary.ts returns false outside Linux and caches its first Linux result in cachedIsMusl. It checks /lib/ld-musl-x86_64.so.1 on x64 or /lib/ld-musl-aarch64.so.1 otherwise, then runs spawnSync("ldd", ["--version"], { stdio: ["ignore", "pipe", "pipe"] }) and searches combined stdout/stderr case-insensitively for "musl"; if ldd fails or is unavailable, it assumes glibc and caches false.getPlatformBinaryName() maps process.platform as darwin → darwin, win32 → windows, and every other value → linux; it maps process.arch === "arm64" to arm64 and every other architecture to x64. It appends -musl when isMusl() is true and .exe on win32, producing sentry-<os>-<arch>[-musl][.exe].isNightlyVersion(version) identifies a nightly solely with version.includes("-dev."); documented nightly form is X.Y.Z-dev.<unix-seconds>.compareVersions(a, b) is implemented as semverCompare(a, b) imported from semver and returns -1 | 0 | 1. Its adjacent documentation still says it uses Bun.semver.order, creating a documentation/implementation mismatch.packages/cli/test/e2e/delta-upgrade.test.ts; 2. packages/cli/test/lib/upgrade.test.ts; 3. packages/cli/test/lib/delta-upgrade.test.ts; 4. packages/cli/test/lib/delta-upgrade.mocked.test.ts; 5. packages/cli/test/commands/cli/upgrade.test.ts.