Rename constants

Summary: After the move, let's rename the constants to make them match our code standards.

Reviewed By: aigoncharov

Differential Revision: D51307087

fbshipit-source-id: 4e44e956fd88abd3e8359fe94fa4e31d17f61a55
This commit is contained in:
Lorenzo Blasa
2023-11-14 10:53:09 -08:00
committed by Facebook GitHub Bot
parent 49abb4dd41
commit 9166939214
4 changed files with 17 additions and 17 deletions

View File

@@ -17,11 +17,11 @@ declare global {
theme: 'light' | 'dark' | 'system'; theme: 'light' | 'dark' | 'system';
entryPoint: string; entryPoint: string;
debug: boolean; debug: boolean;
GRAPH_SECRET: string; graphSecret: string;
FLIPPER_APP_VERSION: string; appVersion: string;
FLIPPER_SESSION_ID: string; sessionId: string;
FLIPPER_UNIXNAME: string; unixname: string;
FLIPPER_AUTH_TOKEN: string; authToken: string;
}; };
flipperShowMessage?(message: {title?: string; detail?: string}): void; flipperShowMessage?(message: {title?: string; detail?: string}): void;

View File

@@ -56,7 +56,7 @@ async function start() {
let token = providerParams.get('token'); let token = providerParams.get('token');
if (!token) { if (!token) {
console.info('[flipper-client][ui-browser] Get token from HTML instead'); console.info('[flipper-client][ui-browser] Get token from HTML instead');
token = window.flipperConfig.FLIPPER_AUTH_TOKEN; token = window.flipperConfig.authToken;
if (!token || token === 'FLIPPER_AUTH_TOKEN_REPLACE_ME') { if (!token || token === 'FLIPPER_AUTH_TOKEN_REPLACE_ME') {
console.warn( console.warn(
'[flipper-client][ui-browser] Failed to get token from HTML', '[flipper-client][ui-browser] Failed to get token from HTML',

View File

@@ -18,11 +18,11 @@
theme: 'light', theme: 'light',
entryPoint: 'flipper-ui-browser/src/index-fast-refresh.bundle?platform=web&dev=true&minify=false', entryPoint: 'flipper-ui-browser/src/index-fast-refresh.bundle?platform=web&dev=true&minify=false',
debug: true, debug: true,
GRAPH_SECRET: 'GRAPH_SECRET_REPLACE_ME', graphSecret: 'GRAPH_SECRET_REPLACE_ME',
FLIPPER_APP_VERSION: 'FLIPPER_APP_VERSION_REPLACE_ME', appVersion: 'FLIPPER_APP_VERSION_REPLACE_ME',
FLIPPER_SESSION_ID: 'FLIPPER_SESSION_ID_REPLACE_ME', sessionId: 'FLIPPER_SESSION_ID_REPLACE_ME',
FLIPPER_UNIXNAME: 'FLIPPER_UNIXNAME_REPLACE_ME', unixname: 'FLIPPER_UNIXNAME_REPLACE_ME',
FLIPPER_AUTH_TOKEN: 'FLIPPER_AUTH_TOKEN_REPLACE_ME', authToken: 'FLIPPER_AUTH_TOKEN_REPLACE_ME',
} }
</script> </script>
<style> <style>
@@ -163,7 +163,7 @@
const params = new URL(location.href).searchParams; const params = new URL(location.href).searchParams;
let token = params.get('token'); let token = params.get('token');
if (!token) { if (!token) {
token = window.flipperConfig.FLIPPER_AUTH_TOKEN token = window.flipperConfig.authToken
} }
const socket = new WebSocket(`ws://${location.host}?token=${token}`); const socket = new WebSocket(`ws://${location.host}?token=${token}`);

View File

@@ -18,11 +18,11 @@
theme: 'light', theme: 'light',
entryPoint: 'bundle.js', entryPoint: 'bundle.js',
debug: false, debug: false,
GRAPH_SECRET: 'GRAPH_SECRET_REPLACE_ME', graphSecret: 'GRAPH_SECRET_REPLACE_ME',
FLIPPER_APP_VERSION: 'FLIPPER_APP_VERSION_REPLACE_ME', appVersion: 'FLIPPER_APP_VERSION_REPLACE_ME',
FLIPPER_SESSION_ID: 'FLIPPER_SESSION_ID_REPLACE_ME', sessionId: 'FLIPPER_SESSION_ID_REPLACE_ME',
FLIPPER_UNIXNAME: 'FLIPPER_UNIXNAME_REPLACE_ME', unixname: 'FLIPPER_UNIXNAME_REPLACE_ME',
FLIPPER_AUTH_TOKEN: 'FLIPPER_AUTH_TOKEN_REPLACE_ME', authToken: 'FLIPPER_AUTH_TOKEN_REPLACE_ME',
} }
</script> </script>
<style> <style>