Make Client initialize server add-ons
Reviewed By: mweststrate Differential Revision: D34044353 fbshipit-source-id: 99bcb1559787b2a904bdd796233666a7a4783ea4
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a60865f0be
commit
9113006851
@@ -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),
|
||||
});
|
||||
Reference in New Issue
Block a user