( promptsDir: string, manifest: PiInstallManifest | null, currentPrompts: string[], )
| 353 | } |
| 354 | |
| 355 | async function cleanupRemovedPrompts( |
| 356 | promptsDir: string, |
| 357 | manifest: PiInstallManifest | null, |
| 358 | currentPrompts: string[], |
| 359 | ): Promise<void> { |
| 360 | if (!manifest) return |
| 361 | const current = new Set(currentPrompts) |
| 362 | for (const promptFile of manifest.prompts) { |
| 363 | if (current.has(promptFile)) continue |
| 364 | if (!isSafeManagedPath(promptsDir, promptFile)) continue |
| 365 | await fs.rm(path.join(promptsDir, promptFile), { force: true }) |
| 366 | } |
| 367 | } |
| 368 | |
| 369 | async function cleanupRemovedExtensions( |
| 370 | extensionsDir: string, |
no test coverage detected