Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/src/content/docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ cli/
│ │ ├── alert/ # create, delete, edit, list, view
│ │ ├── auth/ # login, logout, refresh, status, token, whoami
│ │ ├── cli/ # defaults, feedback, fix, import, setup, uninstall, upgrade
│ │ ├── dart-symbol-map/# upload
│ │ ├── dashboard/ # add, create, delete, edit, list, restore, revisions, view
│ │ ├── event/ # list, send, view
│ │ ├── issue/ # archive, events, explain, list, merge, plan, resolve, unresolve, view
Expand Down
13 changes: 13 additions & 0 deletions docs/src/fragments/commands/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,16 @@ sentry cli setup --no-agent-skills
# Skip PATH and completion modifications
sentry cli setup --no-modify-path --no-completions
```

### Uninstall

```bash
# Show what would be removed (dry run)
sentry cli uninstall --dry-run

# Uninstall, keeping config directory
sentry cli uninstall --yes --keep-config

# Full uninstall with confirmation
sentry cli uninstall
```
22 changes: 22 additions & 0 deletions docs/src/fragments/commands/dart-symbol-map.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@


## Examples

```bash
# Upload a dart symbol map with a debug ID
sentry dart-symbol-map upload --debug-id 12345678-1234-1234-1234-123456789abc mapping.json

# Validate without uploading
sentry dart-symbol-map upload --debug-id 12345678-1234-1234-1234-123456789abc mapping.json --no-upload

# Output as JSON
sentry dart-symbol-map upload --debug-id 12345678-1234-1234-1234-123456789abc mapping.json --json
```

## Important Notes

- The `--debug-id` flag is **required** — it associates the map with a native
debug file (dSYM/ELF). The sentry-dart-plugin extracts this automatically.
- The mapping file must be a **JSON array of strings** with an even number of
entries (alternating obfuscated/original name pairs).
- Supported on Sentry SaaS and self-hosted >= 25.8.0.
8 changes: 8 additions & 0 deletions plugins/sentry-cli/skills/sentry-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,14 @@ CLI-related commands

→ Full flags and examples: `references/cli.md`

### Dart-symbol-map

Work with Dart/Flutter symbol maps

- `sentry dart-symbol-map upload <path>` — Upload a Dart/Flutter symbol map to Sentry

→ Full flags and examples: `references/dart-symbol-map.md`

### Dashboard

Manage Sentry dashboards
Expand Down
13 changes: 13 additions & 0 deletions plugins/sentry-cli/skills/sentry-cli/references/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,19 @@ Uninstall Sentry CLI
- `-f, --force - Force the operation without confirmation`
- `-n, --dry-run - Show what would happen without making changes`

**Examples:**

```bash
# Show what would be removed (dry run)
sentry cli uninstall --dry-run

# Uninstall, keeping config directory
sentry cli uninstall --yes --keep-config

# Full uninstall with confirmation
sentry cli uninstall
```

### `sentry cli upgrade <version>`

Update the Sentry CLI to the latest version
Expand Down
35 changes: 35 additions & 0 deletions plugins/sentry-cli/skills/sentry-cli/references/dart-symbol-map.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: sentry-cli-dart-symbol-map
version: 0.37.0-dev.0
description: Work with Dart/Flutter symbol maps
requires:
bins: ["sentry"]
auth: true
---

# Dart-symbol-map Commands

Work with Dart/Flutter symbol maps

### `sentry dart-symbol-map upload <path>`

Upload a Dart/Flutter symbol map to Sentry

**Flags:**
- `-d, --debug-id <value> - Debug ID (UUID) from the companion native debug file`
- `--no-upload - Validate the file without uploading (dry-run)`

**Examples:**

```bash
# Upload a dart symbol map with a debug ID
sentry dart-symbol-map upload --debug-id 12345678-1234-1234-1234-123456789abc mapping.json

# Validate without uploading
sentry dart-symbol-map upload --debug-id 12345678-1234-1234-1234-123456789abc mapping.json --no-upload

# Output as JSON
sentry dart-symbol-map upload --debug-id 12345678-1234-1234-1234-123456789abc mapping.json --json
```

All commands also support `--json`, `--fields`, `--help`, `--log-level`, and `--verbose` flags.
6 changes: 4 additions & 2 deletions script/generate-sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,8 @@ function renderNamespaceNode(node: NamespaceNode, indent: string): string {
// Render child namespaces
for (const [name, child] of node.children) {
const childBody = renderNamespaceNode(child, `${indent} `);
parts.push(`${indent}${name}: {\n${childBody}\n${indent}},`);
const key = needsQuoting(name) ? `"${name}"` : name;
parts.push(`${indent}${key}: {\n${childBody}\n${indent}},`);
}

return parts.join("\n");
Expand All @@ -508,7 +509,8 @@ function renderNamespaceTypeNode(node: NamespaceNode, indent: string): string {
// Render child namespaces as nested object types
for (const [name, child] of node.children) {
const childBody = renderNamespaceTypeNode(child, `${indent} `);
parts.push(`${indent}${name}: {\n${childBody}\n${indent}};`);
const key = needsQuoting(name) ? `"${name}"` : name;
parts.push(`${indent}${key}: {\n${childBody}\n${indent}};`);
}

return parts.join("\n");
Expand Down
2 changes: 2 additions & 0 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { authRoute } from "./commands/auth/index.js";
import { whoamiCommand } from "./commands/auth/whoami.js";
import { bashHookCommand } from "./commands/bash-hook.js";
import { cliRoute } from "./commands/cli/index.js";
import { dartSymbolMapRoute } from "./commands/dart-symbol-map/index.js";
import { dashboardRoute } from "./commands/dashboard/index.js";
import { listCommand as dashboardListCommand } from "./commands/dashboard/list.js";
import { eventRoute } from "./commands/event/index.js";
Expand Down Expand Up @@ -95,6 +96,7 @@ export const routes = buildRouteMap({
alert: alertRoute,
auth: authRoute,
cli: cliRoute,
"dart-symbol-map": dartSymbolMapRoute,
dashboard: dashboardRoute,
org: orgRoute,
project: projectRoute,
Expand Down
20 changes: 20 additions & 0 deletions src/commands/dart-symbol-map/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* sentry dart-symbol-map
*
* Route map for Dart/Flutter symbol map commands.
*/

import { buildRouteMap } from "../../lib/route-map.js";
import { uploadCommand } from "./upload.js";

export const dartSymbolMapRoute = buildRouteMap({
routes: {
upload: uploadCommand,
},
docs: {
brief: "Work with Dart/Flutter symbol maps",
fullDescription:
"Upload Dart/Flutter obfuscation maps for deobfuscating Dart " +
"exception types in Sentry.",
},
});
Loading
Loading