Refactor recommended plugin API

Summary:
This is just refactoring in preparation to open-sourcing internal plugin distribution code to make it available for other orgs so they can distribute their internal plugins. See other diffs in the same stack.

This diff moves recommended plugins handling from `pluginMarketplace` which will be the same for fb-internal and OS versions into `pluginMarketplaceAPI` which will differ for fb-internal and OS versions. This will make it possible for other orgs to define their own "recommended" plugins which then will be automatically installed/enabled for new users.

Reviewed By: aigoncharov

Differential Revision: D34379981

fbshipit-source-id: 5c3a4efb6d0171256cf508f9005d914d7332e14f
This commit is contained in:
Anton Nikolaev
2022-02-22 04:35:13 -08:00
committed by Facebook GitHub Bot
parent 395708348d
commit 5da0a83a36
2 changed files with 3 additions and 0 deletions

View File

@@ -96,6 +96,8 @@ export interface DownloadablePluginDetails extends ConcretePluginDetails {
isBundled: false;
downloadUrl: string;
lastUpdated: Date;
// Indicates whether plugin should be enabled by default for new users
isEnabledByDefault: boolean;
}
export type UpdateResult =

View File

@@ -58,6 +58,7 @@ export function createMockDownloadablePluginDetails(
lastUpdated: lastUpdated,
isBundled: false,
isActivatable: false,
isEnabledByDefault: false,
};
return details;
}