expose isHeadlessBuild to flipper plugins

Reviewed By: passy

Differential Revision: D46364476

fbshipit-source-id: bad584e3892cc0fb0fdaba0e8b3c79952596d34d
This commit is contained in:
Anton Kastritskiy
2023-06-02 06:49:49 -07:00
committed by Facebook GitHub Bot
parent 2f9e633fad
commit c01b6b9f16
3 changed files with 3 additions and 0 deletions

View File

@@ -50,6 +50,7 @@ export function baseFlipperLibImplementation(
environmentInfo: { environmentInfo: {
os: renderHost.serverConfig.environmentInfo.os, os: renderHost.serverConfig.environmentInfo.os,
env: renderHost.serverConfig.env, env: renderHost.serverConfig.env,
isHeadlessBuild: renderHost.serverConfig.environmentInfo.isHeadlessBuild,
}, },
intern: { intern: {
graphGet: (...args) => graphGet: (...args) =>

View File

@@ -202,6 +202,7 @@ export interface FlipperLib {
}; };
environmentInfo: { environmentInfo: {
os: EnvironmentInfo['os']; os: EnvironmentInfo['os'];
isHeadlessBuild: EnvironmentInfo['isHeadlessBuild'];
env: Partial<Record<ENVIRONMENT_VARIABLES, string>>; env: Partial<Record<ENVIRONMENT_VARIABLES, string>>;
}; };
remoteServerContext: RemoteServerContext; remoteServerContext: RemoteServerContext;

View File

@@ -76,6 +76,7 @@ export function createMockFlipperLib(options?: StartPluginOptions): FlipperLib {
platform: 'linux', platform: 'linux',
}, },
env: {}, env: {},
isHeadlessBuild: true,
}, },
intern: { intern: {
graphGet: createStubFunction(), graphGet: createStubFunction(),