Dashboard › cli › Distillation
ca901911-a3a1-4eaa-890f-7dff59cc8a1d["lore_tm_v1_SfFskg2Yk-5cNhbiqN15MQ8SBrOY5uzNDQ1n3_Soz-s","lore_tm_v1_xFeziJvtU6_1tu5XRSnQnlgPK0b9q4k3okXoMo5U4eI","lore_tm_v1_ES8-w8gHaZnS8AI2UyRUl_2g0ZlI3Yf5TWCItUAwz_8","lore_tm_v1_Uguhf54sXL__sGzjfsBBEGMG1jj0LC5nKA9rJee4xDQ","lore_tm_v1_rC8yAL2fT4tW7HRqQDtHZjQWPVbQ06Dxtoxx8bF7vKM","lore_tm_v1_zdz-txVPORd2u5FoSNsqVHrU2GVWuD1OHwnrghrtckc","lore_tm_v1_5wTm1auYPQ7KG0stzm9cCpYZwVQflsZHu_F-T3kaS6o","lore_tm_v1_0o55xdcUAWljRvvN4z0_tZztsphcwELKNBc_HwYYLhI","lore_tm_v1_T6XhWBdn0oNRUerc-a7AnjRaHI11VNwq_hMOFkwlE5o","lore_tm_v1_0w0rR-NXT_tFeCkfce_P3AcB7rnQ7w1cyhkjfakOecI","lore_tm_v1_oMLLt7Q8MtS9iFPbfS-unFfoAW5Q-R_jzxWDBfIih6c","lore_tm_v1_I3DpCxy0v-iMwCZGuVpxJpLDdwJFwuTM63DjGnFRPUA"]
π΄ (20:51) apps/cli-docs/public/CNAME contains the single hostname cli.sentry.dev.
π΄ (20:51) packages/cli/test/lib/upgrade.test.ts tests isNightlyVersion() as true for "0.0.0-dev.1740000000" and "0.0.0-dev.1", and false for "1.0.0", "0.13.0", "2.0.0-beta.1", and "0.0.0-dev".
π΄ (20:51) The fetchLatestNightlyVersion tests model 2 requestsβGHCR token exchange followed by /manifests/nightlyβand expect the OCI manifest annotation { version: "0.0.0-dev.1740000000" } to produce that exact version.
π΄ (20:51) fetchLatestNightlyVersion() is tested to throw UpgradeError with "GHCR token exchange failed: HTTP 401" when token exchange returns HTTP 401, and with "Nightly manifest has no version annotation" when the manifest annotations contain no version.
π΄ (20:51) fetchLatestNightlyVersion(controller.signal) is tested with an already-aborted AbortController; it must reject with an object whose name is "AbortError".
π΄ (20:51) The nightly curl-upgrade test in packages/cli/test/lib/upgrade.test.ts uses directory join(TEST_TMP_DIR, "upgrade-nightly-test"), install path join(nightlyBinDir, "sentry"), and install metadata { method: "curl", path: nightlyInstallPath, version: "0.0.0" }.
π΄ (20:51) The nightly curl-upgrade test mocks a 4-byte ELF payload new Uint8Array([0x7f, 0x45, 0x4c, 0x46]), gzip-compresses it, and supplies a platform-specific OCI layer titled sentry-${os}-${arch}${suffix}.gz, where OS maps to linux, darwin, or windows, architecture maps to arm64 or x64, and Windows uses suffix .exe.
π΄ (20:51) The mocked nightly OCI layer has digest "sha256:blobdigest", media type "application/octet-stream", size gzipped.byteLength, title annotation "org.opencontainers.image.title", and manifest version "0.0.0-dev.1740000000"; /blobs/ returns the gzip bytes directly with HTTP 200.
π΄ (20:51) executeUpgrade("curl", "0.0.0-dev.1740000000") is expected to return a non-null result with tempBinaryPath, whose decompressed bytes exactly equal the original 4-byte ELF payload.
π΄ (20:51) Nightly curl-upgrade test cleanup restores globalThis.fetch = originalFetch, attempts to unlink installPath, tempPath, oldPath, and lockPath while ignoring errors, and calls clearInstallInfo().
π΄ (20:51) The following test section, downloadBinaryToTemp offline errors, uses join(TEST_TMP_DIR, "upgrade-offline-test"), install path join(offlineBinDir, "sentry"), and curl install metadata with version "0.0.0".
π΄ (20:52) .github/workflows/docs-preview.yml references packages/cli/install at lines 11 and 55.
π΄ (20:52) In packages/cli/script/build.ts, a fossilize compilation exception logs " Fossilize compilation failed:" plus the error message and returns { successes: 0, failures: targets.length }.
π΄ (20:52) After fossilize compilation, packages/cli/script/build.ts calls postProcessTarget(target) for each target, independently counts successes and failures, logs Post-processing ${getPackageName(target)} failed: ${error} on failure, and returns both counts.
π΄ (20:52) postProcessTarget(target) expects fossilize output named dist-bin/sentry-{os}-{arch}[.exe], with fossilize using "win" for Windows; it renames this to the release convention using "windows" when the fossilize path differs from the expected output.
π΄ (20:52) postProcessTarget(target) uses .exe only for target.os === "win32", verifies the expected dist-bin/${packageName}${extension} exists, and throws Expected output not found: ${outfile} if absent.
π΄ (20:52) ICU hole-punching is no longer performed by postProcessTarget() because it now runs inside fossilize via --hole-punch before code signing.
π΄ (20:52) When process.env.RELEASE_BUILD is set, postProcessTarget() creates ${outfile}.gz using gzipAsync(Buffer.from(binary), { level: 6 }); it computes and logs an integer compression percentage with (1 - compressed.byteLength / binary.byteLength) * 100, formatted via .toFixed(0).
π΄ (20:52) parseTarget(targetStr) accepts examples such as "darwin-x64" and "linux-arm64", normalizes the "windows-" prefix to "win32-", splits OS and architecture on "-", and returns the matching item from ALL_TARGETS or null.
π΄ (20:52) The build CLI parses --single and --target; targetArg is the argument immediately following --target.
π΄ (20:53) packages/cli/script/build.ts sets NODE_VERSION = "lts" so fossilize resolves the latest Node LTS for SEA binaries.
π΄ (20:53) Lazy _require() alias processing in packages/cli/script/build.ts uses REQUIRE_ALIAS_FILTER = /(?:db[\\/](?:index|schema)|list-command|telemetry)\.ts$/ and REQUIRE_ALIAS_RE = /\b_require\(/g.
π΄ (20:53) The build-time constant SENTRY_CLIENT_ID is injected from process.env.SENTRY_CLIENT_ID ?? "".
π΄ (20:53) BuildTarget permits OS "darwin" | "linux" | "win32" and architecture "arm64" | "x64".
π΄ (20:53) ALL_TARGETS contains exactly 5 build targets in order: 1. { os: "darwin", arch: "arm64" }; 2. { os: "darwin", arch: "x64" }; 3. { os: "linux", arch: "arm64" }; 4. { os: "linux", arch: "x64" }; 5. { os: "win32", arch: "x64" }.
π΄ (20:53) getPackageName(target) maps win32 to "windows" and returns sentry-${platformName}-${target.arch}; getFossilizePlatform(target) maps win32 to "win" and returns ${os}-${target.arch}.
π΄ (20:53) The intermediate esbuild directory is dist-build; bundled JavaScript is dist-build/bin.js, and its source map is dist-build/bin.js.map.
π΄ (20:53) At inspection time, both repository-root dist-bin and packages/cli/dist-bin contained exactly one entry: sentry-linux-x64.
π΄ (20:54) CHANGELOG.md records (build) Add musl binaries for Alpine Linux support by @BYK in PR #762, and (ci) Install libstdc++/libgcc for Alpine smoke test and add musl to PR matrix by @BYK in PR #765.
π΄ (20:54) .github/workflows/ci.yml references the signing archive apple-codesign-0.29.0-x86_64-unknown-linux-musl.tar.gz.
π΄ (20:54) packages/cli/src/lib/telemetry.ts documents and sets Linux Sentry tag "cli.libc" to "musl" when isMusl() is true and "glibc" otherwise.
π΄ (20:54) packages/cli/src/lib/binary.ts documents musl detection for systems including Alpine Linux and the Void Linux musl variant.
π΄ (20:55) PLATFORM_ROWS in packages/cli/script/generate-docs-sections.ts contains exactly 3 rows in order: 1. ["macOS", "x64, arm64 (Apple Silicon)", ""]; 2. ["Linux", "x64, arm64", "glibc and musl (Alpine)"]; 3. ["Windows", "x64", "Via Git Bash, MSYS2, or WSL"].
π΄ (20:55) The comment above PLATFORM_ROWS says the rows are derived from ALL_TARGETS in script/build.ts and must be updated when build targets are added or removed.
π΄ (20:55) generatePlatformSupport() emits an HTML table with columns OS, Architectures, and Notes; each OS is wrapped in <strong>, and rows are generated in PLATFORM_ROWS order.
π΄ (20:55) Stable release downloads use the repository getsentry/cli: packages/cli/src/lib/binary.ts constructs https://github.com/getsentry/cli/releases/download/${version}/${getPlatformBinaryName()} and defines the releases API URL https://api.github.com/repos/getsentry/cli/releases.
π΄ (20:55) packages/cli/src/lib/release-notes.ts queries commits from https://api.github.com/repos/getsentry/cli/commits?sha=main&since=${sinceDate}&until=${untilDate}&per_page=100.
π΄ (20:55) packages/cli/src/lib/delta-upgrade.ts and packages/cli/src/lib/ghcr.ts identify the nightly OCI package as public ghcr.io/getsentry/cli.
π΄ (20:55) packages/cli/package.json uses repository URL git+https://github.com/getsentry/cli.git, while packages/cli/README.md instructs cloning with git clone https://github.com/getsentry/cli.git.
π΄ (20:55) Human release-note formatting in packages/cli/src/lib/formatters/human.ts links truncated or additional changes to https://github.com/getsentry/cli/releases.