Add experiment to configure internal debugger branding (#44388)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44388 Towards the open source rollout of the `rn_fusebox.ts` entry point. NOTE: Requires https://github.com/facebookexperimental/rn-chrome-devtools-frontend/pull/59, but can (and should) be landed safely beforehand. Changelog: [Internal] Reviewed By: motiz88 Differential Revision: D56883040 fbshipit-source-id: acee5d53c0f93ef9dc2d498001291b1e35237824
This commit is contained in:
Родитель
817f610983
Коммит
185f63b0db
|
@ -20,6 +20,7 @@ describe('getDevToolsFrontendUrl', () => {
|
|||
enableNetworkInspector: false,
|
||||
enableNewDebugger: false,
|
||||
enableOpenDebuggerRedirect: false,
|
||||
useFuseboxInternalBranding: false,
|
||||
};
|
||||
|
||||
describe('relative: false, launchId: undefined (default)', () => {
|
||||
|
|
|
@ -129,5 +129,6 @@ function getExperiments(config: ExperimentsConfig): Experiments {
|
|||
enableNewDebugger: config.enableNewDebugger ?? false,
|
||||
enableOpenDebuggerRedirect: config.enableOpenDebuggerRedirect ?? false,
|
||||
enableNetworkInspector: config.enableNetworkInspector ?? false,
|
||||
useFuseboxInternalBranding: config.useFuseboxInternalBranding ?? false,
|
||||
};
|
||||
}
|
||||
|
|
|
@ -28,6 +28,12 @@ export type Experiments = $ReadOnly<{
|
|||
* Enables the Network panel when launching the custom debugger frontend.
|
||||
*/
|
||||
enableNetworkInspector: boolean,
|
||||
|
||||
/**
|
||||
* [Meta-internal] Controls visibility of the internal "Fusebox" codename
|
||||
* across the UI when using the modern `rn_fusebox` entry point.
|
||||
*/
|
||||
useFuseboxInternalBranding: boolean,
|
||||
}>;
|
||||
|
||||
export type ExperimentsConfig = Partial<Experiments>;
|
||||
|
|
|
@ -44,6 +44,12 @@ export default function getDevToolsFrontendUrl(
|
|||
if (experiments.enableNetworkInspector) {
|
||||
searchParams.append('unstable_enableNetworkPanel', 'true');
|
||||
}
|
||||
if (
|
||||
options?.useFuseboxEntryPoint === true &&
|
||||
experiments.useFuseboxInternalBranding
|
||||
) {
|
||||
searchParams.append('unstable_useInternalBranding', 'true');
|
||||
}
|
||||
if (options?.launchId != null && options.launchId !== '') {
|
||||
searchParams.append('launchId', options.launchId);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче