( extensionsDir: string, manifest: PiInstallManifest | null, currentExtensions: string[], )
| 367 | } |
| 368 | |
| 369 | async function cleanupRemovedExtensions( |
| 370 | extensionsDir: string, |
| 371 | manifest: PiInstallManifest | null, |
| 372 | currentExtensions: string[], |
| 373 | ): Promise<void> { |
| 374 | if (!manifest) return |
| 375 | const current = new Set(currentExtensions) |
| 376 | for (const extensionFile of manifest.extensions) { |
| 377 | if (current.has(extensionFile)) continue |
| 378 | if (!isSafeManagedPath(extensionsDir, extensionFile)) continue |
| 379 | await fs.rm(path.join(extensionsDir, extensionFile), { force: true }) |
| 380 | } |
| 381 | } |
| 382 | |
| 383 | async function cleanupRemovedAgents( |
| 384 | agentsDir: string, |
no test coverage detected