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
This commit is contained in:
Pascal Hartig
2023-11-27 09:04:07 -08:00
committed by Facebook GitHub Bot
parent ce5527513e
commit a9c5dd746a
2 changed files with 12 additions and 1 deletions

View File

@@ -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

View File

@@ -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',