Files
flipper/desktop/flipper-server-companion/src/initializeFlipperLibImplementation.tsx
Andrey Goncharov c1dc1788a5 Initialize flipper lib and render host in headless mode
Reviewed By: mweststrate

Differential Revision: D36130158

fbshipit-source-id: cfdd22456bd4674e027dbcf83e67bf52cd757cf7
2022-05-10 05:13:24 -07:00

31 lines
833 B
TypeScript

/**
* 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 {Logger, _setFlipperLibImplementation} from 'flipper-plugin';
import {baseFlipperLibImplementation, RenderHost} from 'flipper-frontend-core';
export function initializeFlipperLibImplementation(
renderHost: RenderHost,
logger: Logger,
) {
_setFlipperLibImplementation({
...baseFlipperLibImplementation(renderHost, logger),
enableMenuEntries() {},
createPaste() {
// TODO: Implement me
throw new Error('Not implemented');
},
selectPlugin() {},
showNotification() {
// TODO: Write to stdout/stderr?
throw new Error('Not supported in headless context');
},
});
}