iOS get devices/targets/simulators cleanup

Summary: ^

Reviewed By: passy

Differential Revision: D48781211

fbshipit-source-id: 71133c07d15ca6a380d85e582d55cbdb192b5a19
This commit is contained in:
Lorenzo Blasa
2023-08-30 04:24:05 -07:00
committed by Facebook GitHub Bot
parent 0045f15e2a
commit 3e8f94ceda
9 changed files with 170 additions and 180 deletions

View File

@@ -7,6 +7,8 @@
* @format
*/
import {DeviceType, OS} from './server-types';
export interface PluginDetails {
name: string;
specVersion: number;
@@ -57,17 +59,6 @@ export interface SupportedApp {
readonly type?: DeviceType;
}
export type OS =
| 'iOS'
| 'Android'
| 'Metro'
| 'Windows'
| 'MacOS'
| 'Browser'
| 'Linux';
export type DeviceType = 'emulator' | 'physical' | 'dummy';
export type PluginType = 'client' | 'device';
export type DeviceSpec = 'KaiOS';

View File

@@ -10,11 +10,9 @@
import {FlipperDoctor} from './doctor';
import {
DeviceSpec,
DeviceType,
DownloadablePluginDetails,
InstalledPluginDetails,
MarketplacePluginDetails,
OS as PluginOS,
UpdatablePluginDetails,
} from './PluginDetails';
import {ServerAddOnStartDetails} from './ServerAddOn';
@@ -39,7 +37,7 @@ export type FlipperServerState =
| 'error'
| 'closed';
export type DeviceOS = PluginOS;
export type DeviceOS = OS;
export type DeviceDescription = {
readonly os: DeviceOS;
@@ -172,12 +170,22 @@ export type FlipperServerEvents = {
'server-log': LoggerInfo;
};
export type IOSDeviceParams = {
export type OS =
| 'iOS'
| 'Android'
| 'Metro'
| 'Windows'
| 'MacOS'
| 'Browser'
| 'Linux';
export type DeviceType = 'physical' | 'emulator' | 'dummy';
export type DeviceTarget = {
udid: string;
type: DeviceType;
name: string;
osVersion?: string;
deviceTypeIdentifier?: string;
state?: string;
};
@@ -298,7 +306,7 @@ export type FlipperServerCommands = {
'android-get-emulators': () => Promise<string[]>;
'android-launch-emulator': (name: string, coldboot: boolean) => Promise<void>;
'android-adb-kill': () => Promise<void>;
'ios-get-simulators': (bootedOnly: boolean) => Promise<IOSDeviceParams[]>;
'ios-get-simulators': (bootedOnly: boolean) => Promise<DeviceTarget[]>;
'ios-launch-simulator': (udid: string) => Promise<void>;
'ios-idb-kill': () => Promise<void>;
'persist-settings': (settings: Settings) => Promise<void>;