(cfg: PersistedConfig)
| 537 | } |
| 538 | |
| 539 | function sanitizeForPersist(cfg: PersistedConfig): PersistedConfig { |
| 540 | const normalized = normalizePersistedConfig(cfg) |
| 541 | return { |
| 542 | ...normalized, |
| 543 | remoteWorkspace: normalized.remoteWorkspace |
| 544 | ? { |
| 545 | baseUrl: normalized.remoteWorkspace.baseUrl |
| 546 | } |
| 547 | : null, |
| 548 | remoteWorkspaceProfiles: normalized.remoteWorkspaceProfiles.map((profile) => ({ |
| 549 | id: profile.id, |
| 550 | name: profile.name, |
| 551 | baseUrl: profile.baseUrl, |
| 552 | vaultPath: profile.vaultPath, |
| 553 | lastConnectedAt: profile.lastConnectedAt |
| 554 | })) |
| 555 | } |
| 556 | } |
| 557 | |
| 558 | const CONFIG_TMP_SUFFIX_RE = /\.\d+\.\d+\.tmp$/ |
| 559 |
no test coverage detected