Extract environment config initialisation to server-core
Summary: This diff makes most stuff that is read from the `os` package, and version info etc available from the `serverConfig` object, so that flipper-ui-core no longer needs the `os` package. Reviewed By: passy Differential Revision: D32694848 fbshipit-source-id: 93af1e95d898da9aaf351a6970b5a7652ee835c8
This commit is contained in:
committed by
Facebook GitHub Bot
parent
de59bbedd2
commit
2a4fe77404
@@ -8,15 +8,13 @@
|
||||
*/
|
||||
|
||||
import {FlipperServer, FlipperServerConfig} from 'flipper-common';
|
||||
import {getRenderHostInstance} from 'flipper-ui-core';
|
||||
import {getRenderHostInstance, RenderHost} from 'flipper-ui-core';
|
||||
|
||||
export function initializeRenderHost(
|
||||
flipperServer: FlipperServer,
|
||||
flipperServerConfig: FlipperServerConfig,
|
||||
) {
|
||||
window.FlipperRenderHostInstance = {
|
||||
processId: 0,
|
||||
isProduction: window.flipperConfig.debug !== true,
|
||||
readTextFromClipboard() {
|
||||
// TODO:
|
||||
return undefined;
|
||||
@@ -72,7 +70,7 @@ export function initializeRenderHost(
|
||||
// eslint-disable-next-line no-eval
|
||||
return eval(source);
|
||||
},
|
||||
};
|
||||
} as RenderHost;
|
||||
}
|
||||
|
||||
function getDefaultPluginsIndex() {
|
||||
|
||||
Reference in New Issue
Block a user