MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / listLocalVaults

Function listLocalVaults

apps/desktop/src/main/index.ts:1346–1364  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1344}
1345
1346async function listLocalVaults(): Promise<LocalVaultEntry[]> {
1347 const cfg = await loadConfig()
1348 let entries = cfg.localVaults
1349 if (cfg.vaultRoot && !entries.some((entry) => path.resolve(entry.root) === path.resolve(cfg.vaultRoot!))) {
1350 try {
1351 entries = rememberLocalVault(entries, vaultInfo(cfg.vaultRoot), 0)
1352 } catch {
1353 entries = [
1354 {
1355 root: path.resolve(cfg.vaultRoot),
1356 name: path.basename(cfg.vaultRoot),
1357 lastOpenedAt: 0
1358 },
1359 ...entries
1360 ]
1361 }
1362 }
1363 return entries
1364}
1365
1366async function setRemoteWorkspace(
1367 baseUrl: string,

Callers 1

registerIpcFunction · 0.70

Calls 3

loadConfigFunction · 0.90
rememberLocalVaultFunction · 0.90
vaultInfoFunction · 0.90

Tested by

no test coverage detected