()
| 245 | } |
| 246 | |
| 247 | function listWorkspaceRegistryEntries(): DaemonRegistryEntry[] { |
| 248 | const entries: DaemonRegistryEntry[] = []; |
| 249 | try { |
| 250 | const workspaceDirs = readdirSync(getWorkspacesDir(), { withFileTypes: true }); |
| 251 | for (const workspaceDir of workspaceDirs) { |
| 252 | if (!workspaceDir.isDirectory()) { |
| 253 | continue; |
| 254 | } |
| 255 | const registryPath = registryPathForWorkspaceKey(workspaceDir.name); |
| 256 | const result = readRegistryEntryAtPath(registryPath, workspaceDir.name); |
| 257 | if (result.status === 'valid') { |
| 258 | entries.push(result.entry); |
| 259 | } |
| 260 | } |
| 261 | } catch { |
| 262 | // ignore |
| 263 | } |
| 264 | return entries; |
| 265 | } |
| 266 | |
| 267 | /** |
| 268 | * Write a daemon registry entry. |
no test coverage detected