Adds some settings to check flipper-server state

Summary:
There's one setting: to enable or disable flipper-server.

However, I've added some current running state to it. If there's a better way of doing this, please do let me know.

Reviewed By: aigoncharov

Differential Revision: D37276670

fbshipit-source-id: f6c941cf0cfe55c267b9bcb9f799934fba1e28ef
This commit is contained in:
Lorenzo Blasa
2022-06-22 05:26:11 -07:00
committed by Facebook GitHub Bot
parent 8c67b049ab
commit 335dec1a08
7 changed files with 83 additions and 3 deletions

View File

@@ -28,6 +28,8 @@ import {
// In the future, this file would deserve it's own package, as it doesn't really relate to plugins.
// Since flipper-plugin however is currently shared among server, client and defines a lot of base types, leaving it here for now.
export type FlipperServerType = 'embedded' | 'external';
export type FlipperServerState =
| 'pending'
| 'starting'
@@ -454,6 +456,7 @@ export type FlipperServerConfig = {
processConfig: ProcessConfig;
validWebSocketOrigins: string[];
environmentInfo: EnvironmentInfo;
type?: FlipperServerType;
};
export interface FlipperServer {

View File

@@ -58,6 +58,9 @@ export type Settings = {
host?: string;
port?: number;
};
server?: {
enabled: boolean;
};
};
export enum ReleaseChannel {