Skip to content

Commit

Permalink
move launch ID gen out of dev-middleware
Browse files Browse the repository at this point in the history
Summary: Changelog: [General][Removed] `launchId` query param for `/debugger-frontend` is no longer generated automatically for each `/open-debugger` call. Caller of `/open-debugger` is now responsible for generating the `launchId`, which will be passed along to `/debugger-frontend`.

Reviewed By: robhogan

Differential Revision: D55164645
  • Loading branch information
EdmondChuiHW committed Apr 29, 2024
1 parent 84287d4 commit 727b13b
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import type {NextHandleFunction} from 'connect';
import type {IncomingMessage, ServerResponse} from 'http';

import getDevToolsFrontendUrl from '../utils/getDevToolsFrontendUrl';
import crypto from 'crypto';
import url from 'url';

const debuggerInstances = new Map<string, ?LaunchedBrowser>();
Expand Down Expand Up @@ -58,7 +57,11 @@ export default function openDebuggerMiddleware({
(experiments.enableOpenDebuggerRedirect && req.method === 'GET')
) {
const {query} = url.parse(req.url, true);
const {appId, device}: {appId?: string, device?: string, ...} = query;
const {
appId,
device,
launchId,
}: {appId?: string, device?: string, launchId?: string, ...} = query;

const targets = inspectorProxy.getPageDescriptions().filter(
// Only use targets with better reloading support
Expand Down Expand Up @@ -108,7 +111,6 @@ export default function openDebuggerMiddleware({
return;
}

const launchId = crypto.randomUUID();
const useFuseboxEntryPoint =
target.reactNative.capabilities?.prefersFuseboxFrontend;

Expand Down

0 comments on commit 727b13b

Please sign in to comment.