Move server add-on interfaces to flipper-common
Reviewed By: antonk52 Differential Revision: D34169419 fbshipit-source-id: 69fcc8da7d98f59818fbb5b486a488f19830cd81
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b9294645d3
commit
04eab80c98
@@ -10,20 +10,15 @@
|
||||
import assert from 'assert';
|
||||
import {assertNotNull} from '../comms/Utilities';
|
||||
import {
|
||||
ServerAddOnDesktopToModuleConnection,
|
||||
FlipperServerForServerAddOn,
|
||||
} from './ServerAddOnDesktopToModuleConnection';
|
||||
import {
|
||||
ServerAddOnModuleToDesktopConnection,
|
||||
ServerAddOnPluginConnection,
|
||||
} from './ServerAddOnModuleToDesktopConnection';
|
||||
ServerAddOnCleanup,
|
||||
ServerAddOn as ServerAddOnFn,
|
||||
} from 'flipper-common';
|
||||
import {ServerAddOnDesktopToModuleConnection} from './ServerAddOnDesktopToModuleConnection';
|
||||
import {ServerAddOnModuleToDesktopConnection} from './ServerAddOnModuleToDesktopConnection';
|
||||
|
||||
type ServerAddOnCleanup = () => Promise<void>;
|
||||
interface ServerAddOnModule {
|
||||
serverAddOn?: (
|
||||
connection: ServerAddOnPluginConnection,
|
||||
{flipperServer}: {flipperServer: FlipperServerForServerAddOn},
|
||||
) => Promise<ServerAddOnCleanup>;
|
||||
serverAddOn?: ServerAddOnFn;
|
||||
}
|
||||
|
||||
const loadPlugin = (_pluginName: string): ServerAddOnModule => {
|
||||
|
||||
Reference in New Issue
Block a user