mirror of
https://github.com/kennethnym/freya
synced 2026-06-23 01:44:55 +01:00
wip convo ui
This commit is contained in:
@@ -29,7 +29,7 @@ if (!Array.isArray(parsedTargets)) {
|
||||
}
|
||||
|
||||
const targets = parsedTargets.filter(isDebugTarget)
|
||||
const target = targets.find((t) => t.reactNative?.capabilities?.prefersFuseboxFrontend)
|
||||
const target = targets.find(prefersFuseboxFrontend) ?? targets[0]
|
||||
|
||||
if (!target) {
|
||||
console.error("No debug target found. Is the app connected?")
|
||||
@@ -68,6 +68,10 @@ function isDebugTarget(value: unknown): value is DebugTarget {
|
||||
return prefersFuseboxFrontend === undefined || typeof prefersFuseboxFrontend === "boolean"
|
||||
}
|
||||
|
||||
function prefersFuseboxFrontend(target: DebugTarget) {
|
||||
return target.reactNative?.capabilities?.prefersFuseboxFrontend === true
|
||||
}
|
||||
|
||||
function getProxyWebSocketPath(webSocketDebuggerUrl: string) {
|
||||
const url = new URL(webSocketDebuggerUrl)
|
||||
return `${tsIp}:${PROXY_PORT}${url.pathname}${url.search}`
|
||||
|
||||
Reference in New Issue
Block a user