Use AbstractClient from flipper-frontend-core in fliper-ui-core

Summary: This stack attempts to start using flipper-frontend-core from flipper-ui-core. Currently, flipper-frontend-core contains lots of copy-pasted code from flipper-ui-core.

Reviewed By: lblasa

Differential Revision: D37139198

fbshipit-source-id: 042db7492c550e10ea72c32fd15001c141bf53f9
This commit is contained in:
Andrey Goncharov
2022-06-20 12:18:40 -07:00
committed by Facebook GitHub Bot
parent c2e3c4eb50
commit ef5fa275a3
19 changed files with 251 additions and 596 deletions

View File

@@ -122,6 +122,8 @@ export async function handleOpenPluginDeeplink(
const client: Client | undefined = isDevicePlugin
? undefined
: (deviceOrClient as Client);
// TODO: Remove at the end of migration
// @ts-expect-error
const device: BaseDevice = isDevicePlugin
? (deviceOrClient as BaseDevice)
: (deviceOrClient as Client).device;
@@ -507,6 +509,8 @@ async function selectDevicesAndClient(
: c.plugins.has(params.pluginId),
)
.filter((c) => c.connected.get())
// TODO: Remove at the end of migration
// @ts-expect-error
.filter((c) => availableDevices.includes(c.device));
if (validClients.length === 1) {