Dashboard › cli › Distillation
06849441-24c1-4f23-af44-397ab3bce72a["lore_tm_v1_sID739XFBYWJGe1FKdVjaWKdzYASHay_cqPx4Ebd2QA","lore_tm_v1_mKk7_bqo_BmBVV2iKQowQY-3TCgq6MskdRp5iJ151F0","lore_tm_v1_OXdheQ-1DqCAR3TqcGIrTf9k9vo4OyD6TqcMb3J0AHE","lore_tm_v1_l9zAK3aErz8y5FHICGSczTWXoBTd72sj_pMjIg5ck80","lore_tm_v1_AY1uI9d9xMtCRVO1uN-PBaYF-IbJ930idIOKgp9PBNo","lore_tm_v1_jsLUYkWzuYJYFVdeFEQxXS6Yiu9Fin4IhIvWz1DpIK8","lore_tm_v1_eoKjdVIunlJQ29StaH406ULZtNGtqQPi9ae1A9x66UY","lore_tm_v1_Nvb8RudF2-0XaiOMTMb5crq_8SN1VNP6ZmVUsounPWs","lore_tm_v1_G_FQ57oJ0LCQJw_Psn-azvIGsGPIrLNC3EuboxahAMo","lore_tm_v1_96bS1mD24kV468y-yTJOnw-iTcQPHeeOqZIb8bHr0dY","lore_tm_v1_McaaD4m6vyIuKfTclR2KotPmDeWLezBxXO6kCL-BWWA","lore_tm_v1_MKHnNFhkkkOK5TcwlpbaQSjs7Zdw15EoU9LZ7K3lFQ8","lore_tm_v1_aNcgNP0_i5tvbzmJkSAuAnoRkpFUlJXoUc2QJIZXXu4","lore_tm_v1_cpORBHurae-B9S8IT5gOCJlNU_EvGmu1aCCBo0F9c6g","lore_tm_v1_7yd6xsFK8NBz_gD1wnzJooEVG7KiyDn14zlYxMS8pfM"]
paginate<T>() in packages/cli/src/lib/api/infrastructure.ts computes limit = options.limit ?? defaultLimit with defaultLimit = 10, caps perPage using Math.min(limit, API_MAX_PER_PAGE), and calls autoPaginate((cursor) => fetchPage(perPage, cursor), limit, options.cursor).autoPaginate behavior trims overshot results to allRows.slice(0, limit) and drops nextCursor because retaining it would skip items; when MAX_PAGINATION_PAGES is reached, it logs Pagination limit reached (${MAX_PAGINATION_PAGES} pages, ${allRows.length} items). Results may be incomplete. and returns the limited rows without nextCursor.apiRequestToRegion<T>() in packages/cli/src/lib/api/infrastructure.ts builds raw authenticated URLs as ${config.baseUrl}/api/0/${normalizedEndpoint}${queryString}, defaults to GET, sets Content-Type: application/json, and uses getSdkConfig(regionUrl).fetch.body with JSON.stringify; when bodyEncoding === "zstd" and zstdCompressAsync is available, it compresses Buffer.from(json) and sets Content-Encoding: zstd, otherwise it sends the JSON string.apiRequestToRegion<T>() delegates non-OK responses to throwRawApiError(response, endpoint).apiRequestToRegion<T>() treats successful HTTP 204 and 205 responses as errors for JSON-expecting callers, throwing ApiError with message API returned ${response.status} ${response.statusText} (no body) and detail The server returned no content β the request may have matched no records..Failed to parse JSON response body at debug level and throws ApiError with message Invalid JSON in API response from ${endpoint} and detail The server returned a non-JSON response body (possible proxy or CDN issue)..safeParse(schema, data); on failure it sets Sentry context schema_validation containing endpoint, HTTP status, and at most the first 10 issues stripped to path { key, type }, issue type, and message, excluding raw failing input.ApiError("Unexpected response format from ${endpoint}", response.status, result.issues.map((issue) => issue.message).join(", ")); successful validation returns result.output with raw response headers.throwRawApiError() extracts a string detail from JSON responses; for statuses other than 403 and 401, JSON lacking a string detail is retained via JSON.stringify(parsed), while 403/401 omit unusable detail to avoid a noisy {"detail":null} prefix. Non-JSON text is used directly, and failure to read the body falls back to response.statusText.throwRawApiError() attaches allowlisted Sentry context api_response_headers with content-type, content-length, server, cf-ray, x-sentry-error, and www-authenticate, enabling differentiation of Sentry-app JSON failures from CDN/WAF/edge empty or HTML responses such as CLI-1AZ.throwRawApiError() throws ApiError with message API request failed: ${response.status} ${response.statusText}, enriched detail from enrichDetail(response.status, detail, detail !== undefined), the endpoint, and is403 = response.status === 403.apiRequestToRegionNoContent() is for successful responses without JSON bodies, including DELETE returning 204 No Content and 202 Accepted with an empty body; it returns immediately for 204/205, consumes text for other successful statuses, and delegates failed responses to throwRawApiError().packages/cli/package.json identifies the package as sentry version 0.45.0-dev.0, requires Node >=20.0, specifies development runtime Node >=22.15, and uses pnpm@10.11.0.packages/cli/package.json pins @stricli/core to 1.2.8 and uses @stricli/auto-complete ^1.2.8; the installed pnpm store contains both patched @stricli/core@1.2.8_patch_hash=892258f886d48063b409e0ac6141260023c396d1ed4f915231701f6a34edffcc and @stricli/core@1.3.0.packages/cli/package.json include generate:skill: pnpm tsx script/generate-skill.ts; generate:docs runs generate:banner, generate:parser, generate:command-docs, generate:skill, and generate:docs-sections in that exact order.generateCommandHelpLines() supports docs.customUsage: each string produces ${prefix} ${usage}, while an object produces ${prefix} ${usage.input} followed by its italicized usage.brief; absent customUsage, Stricli renders formatUsageLineForParameters(parameters, args).fullDescription ?? brief, optional aliases, flags, then positional arguments.packages/cli/src/commands/help.ts defines sentry help/no arguments as branded overview help, sentry help <command> as detailed command help, sentry help --json as the full structured command tree, and sentry help --json <command> as structured metadata for a specific command or group.--json βnever triggers theβ sixel probe or terminal banner I/O: no-path help yields new CommandOutput(introspectAllCommands()), while the branded banner is rendered only by formatHelpHuman for human output.packages/cli/src/commands/help.ts βalways gets structured output.β It calls introspectCommand(commandPath), throws new OutputError(result) for an error result so output still renders through the output system with a non-zero exit, and otherwise yields new CommandOutput(result).helpCommand has auth: false, no flags of its own, and an array positional parameter with placeholder command and brief Command to get help for.COMMON_FLAGS in packages/cli/src/lib/help.ts are ordered: 1. --json β Output as JSON (with --fields to select); 2. -f, --fresh β Bypass cache and fetch fresh data; 3. -v, --verbose β Enable debug logging; 4. --help β Show help for a command; 5. --version β Show version.TAGLINE = "The command-line interface for Sentry", logged-out example sentry auth, logged-in example sentry issue list, and documentation URL https://cli.sentry.dev/getting-started/.generateCommands() derives help entries dynamically from visible Stricli routes: route maps show visible subcommands joined with |; direct commands prefer entry.target.__primaryUsage over getPositionalString(entry.target.parameters.positional); each usage begins with sentry.printCustomHelp() skips the banner for non-TTY stdout; for a TTY it uses process.stdout.columns ?? 80, prefers sixelBanner(cols), falls back to formatBanner(cols), and omits the banner if both yield no content.Learn more at https://cli.sentry.dev/getting-started/ footer.HelpJsonResult can be the full object { routes: RouteInfo[]; envVars: HelpEnvVarInfo[]; flags: HelpFlagInfo[] }, a CommandInfo, a RouteInfo, or { error: string; suggestions?: string[] }.HelpEnvVarInfo exposes name, one-line brief, full Markdown description, optional example, and optional defaultValue; buildTopLevelEnvVars() maps exactly the entries in TOP_LEVEL_ENV_VARS.introspectAllCommands() returns extractAllRoutes(routeMap), buildTopLevelEnvVars(), and buildCommonFlags() as routes, envVars, and flags.introspectCommand(commandPath) resolves through resolveCommandPath; a missing path returns { error: "Command not found: ${commandPath.join(" ")}" }, an unresolved path additionally includes non-empty fuzzy suggestions, and a successful resolution returns resolved.info.