move plugin management from ui-core to server-core

Summary:
Follow up of D32665064, this diff moves all plugin management logic from flipper-ui to flipper-server. Things like downloading, installing, querying new plugins.

Loading plugins is handled separately in the next diff.

Reviewed By: nikoant

Differential Revision: D32666537

fbshipit-source-id: 9786b82987f00180bb26200e38735b334dc4d5c3
This commit is contained in:
Michel Weststrate
2021-12-08 04:25:28 -08:00
committed by Facebook GitHub Bot
parent f9b72ac69e
commit 64747dc417
25 changed files with 441 additions and 276 deletions

View File

@@ -17,8 +17,8 @@ import {
} from '../../ui';
import styled from '@emotion/styled';
import React, {useState} from 'react';
import {installPluginFromFile} from 'flipper-plugin-lib';
import {Toolbar, FileSelector} from 'flipper-plugin';
import {getRenderHostInstance} from '../../RenderHost';
const CenteredGlyph = styled(Glyph)({
margin: 'auto',
@@ -51,7 +51,10 @@ export default function PluginPackageInstaller({
setError(undefined);
setInProgress(true);
try {
await installPluginFromFile(path);
await getRenderHostInstance().flipperServer!.exec(
'plugins-install-from-file',
path,
);
await onInstall();
} catch (e) {
setError(e);