diff --git a/desktop/.eslintignore b/desktop/.eslintignore index 08105f881..996a2974f 100644 --- a/desktop/.eslintignore +++ b/desktop/.eslintignore @@ -13,5 +13,6 @@ react-native/ReactNativeFlipperExample scripts/generate-changelog.js static/index.js static/defaultPlugins/* +static/facebook/flipper-server-app-template generated flipper-server/static diff --git a/desktop/flipper-server-core/src/server/startServer.tsx b/desktop/flipper-server-core/src/server/startServer.tsx index 4531de67a..66bcf1f5f 100644 --- a/desktop/flipper-server-core/src/server/startServer.tsx +++ b/desktop/flipper-server-core/src/server/startServer.tsx @@ -22,6 +22,7 @@ import {validateAuthToken} from '../app-connectivity/certificate-exchange/certif import {tracker} from '../tracker'; import {EnvironmentInfo, isProduction} from 'flipper-common'; import {GRAPH_SECRET} from '../fb-stubs/constants'; +import {sessionId} from '../sessionId'; type Config = { port: number; @@ -151,7 +152,9 @@ async function startHTTPServer( const processedContent = content .toString() .replace('GRAPH_SECRET_REPLACE_ME', GRAPH_SECRET) - .replace('FLIPPER_APP_VERSION_REPLACE_ME', environmentInfo.appVersion); + .replace('FLIPPER_APP_VERSION_REPLACE_ME', environmentInfo.appVersion) + .replace('FLIPPER_UNIXNAME_REPLACE_ME', environmentInfo.os.unixname) + .replace('FLIPPER_SESSION_ID_REPLACE_ME', sessionId); res.end(processedContent); }); }); diff --git a/desktop/flipper-ui-browser/src/global.tsx b/desktop/flipper-ui-browser/src/global.tsx index 849b40a32..39705a833 100644 --- a/desktop/flipper-ui-browser/src/global.tsx +++ b/desktop/flipper-ui-browser/src/global.tsx @@ -18,6 +18,8 @@ declare global { }; GRAPH_SECRET: string; FLIPPER_APP_VERSION: string; + FLIPPER_SESSION_ID: string; + FLIPPER_UNIXNAME: string; flipperShowMessage?(message: string): void; flipperHideMessage?(): void; diff --git a/desktop/static/index.web.dev.html b/desktop/static/index.web.dev.html index 90aa871b8..d5eda16f5 100644 --- a/desktop/static/index.web.dev.html +++ b/desktop/static/index.web.dev.html @@ -139,6 +139,8 @@ window.GRAPH_SECRET = 'GRAPH_SECRET_REPLACE_ME'; window.FLIPPER_APP_VERSION = 'FLIPPER_APP_VERSION_REPLACE_ME'; + window.FLIPPER_SESSION_ID = 'FLIPPER_SESSION_ID_REPLACE_ME'; + window.FLIPPER_UNIXNAME = 'FLIPPER_UNIXNAME_REPLACE_ME'; const params = new URL(location.href).searchParams; let token = params.get('token'); diff --git a/desktop/static/index.web.html b/desktop/static/index.web.html index d21b6b231..c724d7041 100644 --- a/desktop/static/index.web.html +++ b/desktop/static/index.web.html @@ -88,6 +88,8 @@ window.GRAPH_SECRET = 'GRAPH_SECRET_REPLACE_ME'; window.FLIPPER_APP_VERSION = 'FLIPPER_APP_VERSION_REPLACE_ME'; + window.FLIPPER_SESSION_ID = 'FLIPPER_SESSION_ID_REPLACE_ME'; + window.FLIPPER_UNIXNAME = 'FLIPPER_UNIXNAME_REPLACE_ME'; // load correct theme (n.b. this doesn't handle system value specifically, will assume light in such cases) try {