( versionPath: string, )
| 54 | * Called when a plugin is uninstalled or updated to a new version. |
| 55 | */ |
| 56 | export async function markPluginVersionOrphaned( |
| 57 | versionPath: string, |
| 58 | ): Promise<void> { |
| 59 | try { |
| 60 | await writeFile(getOrphanedAtPath(versionPath), `${Date.now()}`, 'utf-8') |
| 61 | } catch (error) { |
| 62 | logForDebugging(`Failed to write .orphaned_at: ${versionPath}: ${error}`) |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | /** |
| 67 | * Clean up orphaned plugin versions that have been orphaned for more than 7 days. |
no test coverage detected