Make Client initialize server add-ons

Reviewed By: mweststrate

Differential Revision: D34044353

fbshipit-source-id: 99bcb1559787b2a904bdd796233666a7a4783ea4
This commit is contained in:
Andrey Goncharov
2022-02-28 03:50:34 -08:00
committed by Facebook GitHub Bot
parent a60865f0be
commit 9113006851
12 changed files with 144 additions and 4 deletions

View File

@@ -0,0 +1,19 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
import {FlipperServer, ServerAddOnControls} from 'flipper-common';
export const createServerAddOnControls = (
flipperServer: Pick<FlipperServer, 'exec'>,
): ServerAddOnControls => ({
start: (pluginName) =>
flipperServer.exec('plugins-server-add-on-start', pluginName),
stop: (pluginName) =>
flipperServer.exec('plugins-server-add-on-stop', pluginName),
});