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:
committed by
Facebook GitHub Bot
parent
f9b72ac69e
commit
64747dc417
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user