Dashboard › cli › Distillation
4b2f8158-7ad2-485e-a7ae-0f40a278eebf["lore_tm_v1_83kMlIKmHCvxNv6aPWn7qiO8rDotZSQiyNd3mdSTciE","lore_tm_v1_8lA_6OBm_HS4NisQ-Bi9IQGkqiEEEbRfiboYrFGn-SA","lore_tm_v1_VdINWHu0TqoXJJrb92vPVJKnOprbqNBILasM6Loa1t0","lore_tm_v1_kXMu_XUx24DsjKMNkG2B6i_4PVoXn11NhGboQ7tJenU","lore_tm_v1_j7e-IUb7LwoGLAWWMBL7oSHe6Fn8-Z6fRKdIPDX5Bz0","lore_tm_v1___leG26XVe0tInvUPO2yig8eg8aQB3vf_gLyrWsurHI","lore_tm_v1_Ym-nFDXaISXGBHGAKNHhkvANTd9wKPsIq2fpPYWHBGI","lore_tm_v1_9QsERSYJPMgA7qVtj0lFoT1q67NXL_cw_fq2XHCmWWY","lore_tm_v1_tyy6sUDHFjjILZA3vARx2JeNg9xpNa76SWc3AOMk5yw"]
packages/cli/src/commands/replay/view.ts defines USAGE_HINT = "sentry replay view [<org>/<project>/]<replay-id> | <replay-url>", MAX_ACTIVITY_EVENTS = 6, MAX_RELATED_ERRORS = 3, and MAX_RELATED_TRACES = 2.parseSingleArg() accepts a bare replay ID, <org>/<replay-id>, <org>/<project>/<replay-id>, or Sentry replay URL. It handles the one-slash org/id form before parseSlashSeparatedArg() because a 32-character hex replay ID would otherwise cause the organization segment to be misinterpreted; the replay segment is normalized with tryNormalizeHexId() and returned with targetArg: \${org}/``.parsePositionalArgs() requires 1 or 2 arguments and throws ValidationError for more than 2. A URL is parsed with parseSentryUrl() and applies applySentryUrlContext(urlParsed.baseUrl); a valid replay URL requires both replayId and org. For 2 arguments it supports detectSwappedViewArgs(first, second), normalizing the first argument with tryNormalizeHexId(first) ?? first when swapped; otherwise the first argument is the target and the second is the replay ID.validateReplayProjectScope() permits no explicit project, and also permits an archived replay with no project_id. A non-archived replay lacking project association raises ResolutionError with an org-scoped alternative; a supplied project is checked against expectedProjectId or (await getProject(org, project)).id.data.replay with org, activity, relatedIssues, and relatedTraces, then optionally applies filterFields(). Its flags are web (w) and fresh via FRESH_FLAG/FRESH_ALIASES.validateHexId(parsedArgs.replayId, "replay ID"), resolves context through resolveOrgOptionalProjectFromArg(), and makes --web open buildReplayUrl(resolved.org, replayId) without fetching replay data. A getReplay() HTTP 404 becomes ResolutionError with suggestions to check the organization and retention window; normal mode validates project scope, calls enrichReplayView(), yields CommandOutput, and returns replayHint(data).packages/cli/src/commands/local/run.ts buildChildEnv() preserves process.env, sets every ${prefix}SENTRY_SPOTLIGHT from CLIENT_SPOTLIGHT_PREFIXES, sets SENTRY_SPOTLIGHT, defaults SENTRY_TRACES_SAMPLE_RATE to "1" and SENTRY_RELEASE to "sentry-cli-local", and calls augmentPathForNode() when isPackageJsonSource(commandSource).resolveArgs() uses explicitly supplied arguments unchanged; with no arguments it calls detectDevCommand(cwd), throws ValidationError(AUTO_DETECT_ERROR_MESSAGE, "command") if detection fails, and logs the detected source and command.sentry local run flags are port (p, default DEFAULT_PORT), host (default "localhost"), repeatable filter (f: error, transaction, log, ai), verify (V), timeout (t, default "0"; verify mode defaults to 30 seconds), format (F, "human" or JSON NDJSON), attributes (a), and open; the command has auth: false.--open with --verify, validates the open host, strips an initial positional "--", and delegates verify mode to runWithVerify(). Normal mode opens an event tail, optionally opens the local UI, uses ${url}/stream as spotlightUrl, injects a Wrangler SENTRY_SPOTLIGHT binding when applicable, spawns the child with childStdio(useJson), forwards output, and forwards process SIGINT/SIGTERM to the child. Spawn failure cleans up the tail and throws CliError(..., EXIT.GENERAL).packages/cli/src/commands/react-native/xcode.ts explains that $NODE_BINARY <args> would run plain Node and never re-enter the wrapper.preparePair() creates a sentry-rn-xcode- temporary directory. With fetchUrl, it returns a pair in "fetch" mode from fetchFromPackager(); otherwise it runs runWrappedBuild(). A nonzero wrapped-build status returns terminal mode with uploads: 0, the same exit code, and hint "React Native build failed; skipped upload."; no produced pair returns terminal mode with hint "No sourcemaps were produced by the build.".sentry react-native xcode supports flags force (f), allow-fetch, fetch-from (default DEFAULT_PACKAGER_URL), build-script, repeatable dist, wait, wait-for in seconds, no-auto-release, and allow-xcode-infoplist-preprocessing. Simulator fetch mode requires both flags["allow-fetch"] and PLATFORM_NAME ending in "simulator".this.process.exitCode, yields { mode: "debug", uploads: 0 }, and returns the hint "Ran the React Native build script (debug mode).". Terminal preparation results likewise propagate prep.exitCode, yield prep.result, and return prep.hint.packages/cli/src/commands/proguard/upload.ts uploads ProGuard/R8 mappings through the DIF chunk-upload protocol; each mapping uses proguard/<uuid>.txt, with its UUID derived from file content unless forced. UUID_RE requires the case-insensitive 8-4-4-4-12 hexadecimal format, and malformed values raise ValidationError on field "uuid".readMappingFile() maps ENOENT, EISDIR, generic read errors, and zero-byte files to descriptive ValidationErrors on "path". deduplicateMappings() identifies identical content by UUID, keeps the first path, and warns for each skipped duplicate with both paths and the UUID.sentry proguard upload accepts one or more paths plus optional --uuid, --no-upload, and --require-one. No paths normally raises ContextError, while --require-one changes this to ValidationError("No mapping files provided (--require-one is set)", "path"); --uuid is rejected with multiple files.--no-upload) is authentication-free, returns unique mapping { path, uuid } entries with filesUploaded: 0, and hints either UUID: <uuid> for one mapping or Computed UUIDs for <N> mapping files. Upload mode resolves through resolveOrgAndProject(), errors if organization/project cannot be resolved, and calls uploadProguardMappings({ org, project, mappings: uniqueMappings }).packages/cli/src/commands/build/upload.ts supports Android APK/AAB and iOS IPA/XCArchive uploads for Sentry SaaS, normalizing each build into a deterministic wrapper ZIP and using the chunk-upload plus preprod-artifacts assemble protocol. Assets.car catalogs are not parsed into individual asset images.parsePrNumber() accepts only non-negative integers. Result entries contain exact path, nullable artifactUrl, and nullable error; aggregate output contains builds and uploadedCount, with human headings distinguishing all-success from partial-success counts.uploadOne() stats the input and raises ValidationError("Path does not exist: ...", "path") on failure. It derives plugin metadata with parsePluginFromPipeline(ctx.env.SENTRY_PIPELINE), creates sentry-build-*/normalized.zip, validates and normalizes XCArchive directories, uses normalizeIpa() for IPA, and normalizeBuildFile() for APK/AAB. Other formats raise a "path" validation error; the temporary work directory is always removed recursively with force: true.sentry build upload ./ cannot sweep up source, .git/, or secrets.build-configuration, release-notes, repeatable install-group, head-sha, base-sha, vcs-provider, head-repo-name, base-repo-name, head-ref, base-ref, pr-number, force-git-metadata, and no-git-metadata. force-git-metadata conflicts with --no-git-metadata; zero paths raises ValidationError("At least one build path is required", "path").packages/cli/src/commands/debug-files/upload.ts supports authentication-free --no-upload, repeatable --id, and --require-all, whose documented behavior is to fail when any explicitly requested debug ID was not found among scanned files. --require-all takes precedence in missing-requested-ID exit-code handling, while dry-run output reports how many debug files would be uploaded and tells the user to remove --no-upload to upload.