Expose env via flipperLib
Summary: This change exposes the env variables via the FlipperLib interface used by plugins. The variables are already white-listed and safe to be used by plugins according to documentation. Reviewed By: antonk52 Differential Revision: D40852147 fbshipit-source-id: bbb3b052d33bf5cf75c81166af2400fe6a359256
This commit is contained in:
committed by
Facebook GitHub Bot
parent
caaded026b
commit
51ca3a6cd7
@@ -45,6 +45,7 @@ export function baseFlipperLibImplementation(
|
|||||||
},
|
},
|
||||||
environmentInfo: {
|
environmentInfo: {
|
||||||
os: renderHost.serverConfig.environmentInfo.os,
|
os: renderHost.serverConfig.environmentInfo.os,
|
||||||
|
env: renderHost.serverConfig.env,
|
||||||
},
|
},
|
||||||
intern: {
|
intern: {
|
||||||
graphGet: (...args) =>
|
graphGet: (...args) =>
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import {
|
|||||||
EnvironmentInfo,
|
EnvironmentInfo,
|
||||||
FSStatsLike,
|
FSStatsLike,
|
||||||
FlipperServerCommands,
|
FlipperServerCommands,
|
||||||
|
ENVIRONMENT_VARIABLES,
|
||||||
} from 'flipper-common';
|
} from 'flipper-common';
|
||||||
import {CreatePasteArgs, CreatePasteResult} from './Paste';
|
import {CreatePasteArgs, CreatePasteResult} from './Paste';
|
||||||
|
|
||||||
@@ -199,6 +200,7 @@ export interface FlipperLib {
|
|||||||
};
|
};
|
||||||
environmentInfo: {
|
environmentInfo: {
|
||||||
os: EnvironmentInfo['os'];
|
os: EnvironmentInfo['os'];
|
||||||
|
env: Partial<Record<ENVIRONMENT_VARIABLES, string>>;
|
||||||
};
|
};
|
||||||
remoteServerContext: RemoteServerContext;
|
remoteServerContext: RemoteServerContext;
|
||||||
intern: InternAPI;
|
intern: InternAPI;
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ export function createMockFlipperLib(options?: StartPluginOptions): FlipperLib {
|
|||||||
unixname: 'test',
|
unixname: 'test',
|
||||||
platform: 'linux',
|
platform: 'linux',
|
||||||
},
|
},
|
||||||
|
env: {},
|
||||||
},
|
},
|
||||||
intern: {
|
intern: {
|
||||||
graphGet: createStubFunction(),
|
graphGet: createStubFunction(),
|
||||||
|
|||||||
Reference in New Issue
Block a user