Pure classification pass that mirrors `applyMigration` but never writes. * Used by `--dry-run` and the default preview to surface the skipped count * without touching the file.
(entries: MigrationEntry[])
| 419 | * Used by `--dry-run` and the default preview to surface the skipped count |
| 420 | * without touching the file. */ |
| 421 | function applyMigrationDryRun(entries: MigrationEntry[]): { |
| 422 | added: string[] |
| 423 | skipped: { entry: MigrationEntry; reason: string }[] |
| 424 | } { |
| 425 | const settings = loadSettings() |
| 426 | const existing = settings.mcpServers ?? {} |
| 427 | const added: string[] = [] |
| 428 | const skipped: { entry: MigrationEntry; reason: string }[] = [] |
| 429 | for (const entry of entries) { |
| 430 | if (entry.name in existing) { |
| 431 | skipped.push({ entry, reason: "already exists in ~/.orbcode/settings.json" }) |
| 432 | } else { |
| 433 | added.push(entry.key) |
| 434 | } |
| 435 | } |
| 436 | return { added, skipped } |
| 437 | } |
no test coverage detected