From 5da0a83a365afc260cdecfdd6b0496fa628b4bcc Mon Sep 17 00:00:00 2001 From: Anton Nikolaev Date: Tue, 22 Feb 2022 04:35:13 -0800 Subject: [PATCH] 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 --- desktop/flipper-common/src/PluginDetails.tsx | 2 ++ desktop/flipper-ui-core/src/utils/testUtils.tsx | 1 + 2 files changed, 3 insertions(+) diff --git a/desktop/flipper-common/src/PluginDetails.tsx b/desktop/flipper-common/src/PluginDetails.tsx index 9f3a33f1b..3de98b19a 100644 --- a/desktop/flipper-common/src/PluginDetails.tsx +++ b/desktop/flipper-common/src/PluginDetails.tsx @@ -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 = diff --git a/desktop/flipper-ui-core/src/utils/testUtils.tsx b/desktop/flipper-ui-core/src/utils/testUtils.tsx index ede07f0aa..ae41b88ec 100644 --- a/desktop/flipper-ui-core/src/utils/testUtils.tsx +++ b/desktop/flipper-ui-core/src/utils/testUtils.tsx @@ -58,6 +58,7 @@ export function createMockDownloadablePluginDetails( lastUpdated: lastUpdated, isBundled: false, isActivatable: false, + isEnabledByDefault: false, }; return details; }