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:
committed by
Facebook GitHub Bot
parent
8c67b049ab
commit
335dec1a08
@@ -8,7 +8,11 @@
|
||||
*/
|
||||
|
||||
import os from 'os';
|
||||
import {parseEnvironmentVariables, getLogger} from 'flipper-common';
|
||||
import {
|
||||
parseEnvironmentVariables,
|
||||
getLogger,
|
||||
FlipperServerType,
|
||||
} from 'flipper-common';
|
||||
import path from 'path';
|
||||
import fs from 'fs-extra';
|
||||
import {KeytarModule} from '../utils/keytar';
|
||||
@@ -34,6 +38,7 @@ export async function startFlipperServer(
|
||||
settingsString: string,
|
||||
enableLauncherSettings: boolean,
|
||||
keytarModule: KeytarModule,
|
||||
type: FlipperServerType,
|
||||
): Promise<FlipperServerImpl> {
|
||||
const execPath = process.execPath;
|
||||
const appPath = rootDir;
|
||||
@@ -68,6 +73,7 @@ export async function startFlipperServer(
|
||||
processConfig: loadProcessConfig(env),
|
||||
settings: await loadSettings(settingsString),
|
||||
validWebSocketOrigins: ['localhost:', 'http://localhost:'],
|
||||
type,
|
||||
},
|
||||
getLogger(),
|
||||
keytarModule,
|
||||
|
||||
@@ -69,6 +69,9 @@ function getDefaultSettings(): Settings {
|
||||
enablePluginMarketplace: false,
|
||||
marketplaceURL: '',
|
||||
enablePluginMarketplaceAutoUpdate: true,
|
||||
server: {
|
||||
enabled: false,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user