Persist uninstalled plugins list
Summary: This diff changes uninstallation procedure for plugins. Instead of deleting plugin files immediately we are keeping them, but mark them as "uninstalled". This makes it possible to re-install plugins quickly in case when user clicked "delete" by mistake. Reviewed By: mweststrate Differential Revision: D25493479 fbshipit-source-id: 9ff29d717cdd5401c55388f24d479599579c8dd3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
df03ccbeab
commit
c3d61cc32d
@@ -134,6 +134,12 @@ export async function removePlugin(name: string): Promise<void> {
|
||||
await fs.remove(getPluginInstallationDir(name));
|
||||
}
|
||||
|
||||
export async function removePlugins(
|
||||
names: IterableIterator<string>,
|
||||
): Promise<void> {
|
||||
await pmap(names, (name) => removePlugin(name));
|
||||
}
|
||||
|
||||
export async function getInstalledPlugins(): Promise<PluginDetails[]> {
|
||||
const versionDirs = await getInstalledPluginVersionDirs();
|
||||
return pmap(
|
||||
|
||||
Reference in New Issue
Block a user