From a9c5dd746a8d904ea0c645617aac45d852c8f672 Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Mon, 27 Nov 2023 09:04:07 -0800 Subject: [PATCH] Store plugin ID Summary: We need the build ID from GraphQL to fetch the download VPN off-VPN. Changelog: Plugin Marketplace now stores a unique ID per build Reviewed By: LukeDefeo Differential Revision: D51525419 fbshipit-source-id: d6740b3c4724d15cc996155b6e7581b0f16a9da6 --- desktop/flipper-common/src/PluginDetails.tsx | 1 + desktop/flipper-ui-core/src/utils/testUtils.tsx | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/desktop/flipper-common/src/PluginDetails.tsx b/desktop/flipper-common/src/PluginDetails.tsx index c7a400e9c..ed8d88624 100644 --- a/desktop/flipper-common/src/PluginDetails.tsx +++ b/desktop/flipper-common/src/PluginDetails.tsx @@ -82,6 +82,7 @@ export type ActivatablePluginDetails = InstalledPluginDetails; // Describes plugin available for downloading. Until downloaded to the disk it is not available for activation in Flipper. export interface DownloadablePluginDetails extends ConcretePluginDetails { isActivatable: false; + buildId: string; downloadUrl: string; lastUpdated: Date; // Indicates whether plugin should be enabled by default for new users diff --git a/desktop/flipper-ui-core/src/utils/testUtils.tsx b/desktop/flipper-ui-core/src/utils/testUtils.tsx index 6dfc57add..4b89fb69a 100644 --- a/desktop/flipper-ui-core/src/utils/testUtils.tsx +++ b/desktop/flipper-ui-core/src/utils/testUtils.tsx @@ -24,8 +24,17 @@ export function createMockDownloadablePluginDetails( lastUpdated?: Date; } = {}, ): DownloadablePluginDetails { - const {id, version, title, flipperEngineVersion, gatekeeper, lastUpdated} = { + const { + id, + buildId, + version, + title, + flipperEngineVersion, + gatekeeper, + lastUpdated, + } = { id: 'test', + buildId: '1337', version: '3.0.1', flipperEngineVersion: '0.46.0', lastUpdated: new Date(1591226525 * 1000), @@ -36,6 +45,7 @@ export function createMockDownloadablePluginDetails( const details: DownloadablePluginDetails = { name: name || `flipper-plugin-${lowercasedID}`, id: id, + buildId, bugs: { email: 'bugs@localhost', url: 'bugs.localhost',