Migrate the iOSDevice from js to tsx
Summary: As per the title. Reviewed By: jknoxville Differential Revision: D16668086 fbshipit-source-id: c246fcaf117802cf1d3c6b3959bf0d0c2761fdce
This commit is contained in:
committed by
Facebook Github Bot
parent
eb26a74327
commit
f408f3f949
@@ -8,7 +8,7 @@
|
|||||||
import {Button, ButtonGroup, Component} from 'flipper';
|
import {Button, ButtonGroup, Component} from 'flipper';
|
||||||
import {connect} from 'react-redux';
|
import {connect} from 'react-redux';
|
||||||
import AndroidDevice from '../devices/AndroidDevice.tsx';
|
import AndroidDevice from '../devices/AndroidDevice.tsx';
|
||||||
import IOSDevice from '../devices/IOSDevice';
|
import IOSDevice from '../devices/IOSDevice.tsx';
|
||||||
import expandTilde from 'expand-tilde';
|
import expandTilde from 'expand-tilde';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import os from 'os';
|
import os from 'os';
|
||||||
|
|||||||
@@ -5,41 +5,39 @@
|
|||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {DeviceType, LogLevel, DeviceLogEntry} from './BaseDevice.tsx';
|
import {DeviceType, LogLevel, DeviceLogEntry} from './BaseDevice';
|
||||||
import child_process from 'child_process';
|
import child_process from 'child_process';
|
||||||
import BaseDevice from './BaseDevice.tsx';
|
import BaseDevice from './BaseDevice';
|
||||||
import JSONStream from 'JSONStream';
|
import JSONStream from 'JSONStream';
|
||||||
import {Transform} from 'stream';
|
import {Transform} from 'stream';
|
||||||
|
|
||||||
type IOSLogLevel = 'Default' | 'Info' | 'Debug' | 'Error' | 'Fault';
|
type IOSLogLevel = 'Default' | 'Info' | 'Debug' | 'Error' | 'Fault';
|
||||||
|
|
||||||
type RawLogEntry = {|
|
type RawLogEntry = {
|
||||||
eventMessage: string,
|
eventMessage: string;
|
||||||
machTimestamp: number,
|
machTimestamp: number;
|
||||||
messageType: IOSLogLevel,
|
messageType: IOSLogLevel;
|
||||||
processID: number,
|
processID: number;
|
||||||
processImagePath: string,
|
processImagePath: string;
|
||||||
processImageUUID: string,
|
processImageUUID: string;
|
||||||
processUniqueID: number,
|
processUniqueID: number;
|
||||||
senderImagePath: string,
|
senderImagePath: string;
|
||||||
senderImageUUID: string,
|
senderImageUUID: string;
|
||||||
senderProgramCounter: number,
|
senderProgramCounter: number;
|
||||||
threadID: number,
|
threadID: number;
|
||||||
timestamp: string,
|
timestamp: string;
|
||||||
timezoneName: string,
|
timezoneName: string;
|
||||||
traceID: string,
|
traceID: string;
|
||||||
|};
|
};
|
||||||
|
|
||||||
export default class IOSDevice extends BaseDevice {
|
export default class IOSDevice extends BaseDevice {
|
||||||
icon = 'icons/ios.svg';
|
|
||||||
os = 'iOS';
|
|
||||||
|
|
||||||
log: any;
|
log: any;
|
||||||
buffer: string;
|
buffer: string;
|
||||||
|
|
||||||
constructor(serial: string, deviceType: DeviceType, title: string) {
|
constructor(serial: string, deviceType: DeviceType, title: string) {
|
||||||
super(serial, deviceType, title);
|
super(serial, deviceType, title);
|
||||||
|
this.icon = 'icons/ios.svg';
|
||||||
|
this.os = 'iOS';
|
||||||
this.buffer = '';
|
this.buffer = '';
|
||||||
this.log = this.startLogListener();
|
this.log = this.startLogListener();
|
||||||
}
|
}
|
||||||
@@ -13,8 +13,8 @@ import {promisify} from 'util';
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
import child_process from 'child_process';
|
import child_process from 'child_process';
|
||||||
const execFile = child_process.execFile;
|
const execFile = child_process.execFile;
|
||||||
import IOSDevice from '../devices/IOSDevice';
|
|
||||||
import iosUtil from '../fb-stubs/iOSContainerUtility.tsx';
|
import iosUtil from '../fb-stubs/iOSContainerUtility.tsx';
|
||||||
|
import IOSDevice from '../devices/IOSDevice.tsx';
|
||||||
import isProduction from '../utils/isProduction.js';
|
import isProduction from '../utils/isProduction.js';
|
||||||
import GK from '../fb-stubs/GK.tsx';
|
import GK from '../fb-stubs/GK.tsx';
|
||||||
import {registerDeviceCallbackOnPlugins} from '../utils/onRegisterDevice.js';
|
import {registerDeviceCallbackOnPlugins} from '../utils/onRegisterDevice.js';
|
||||||
|
|||||||
@@ -44,5 +44,5 @@ export {default as DetailSidebar} from './chrome/DetailSidebar.js';
|
|||||||
export {default as Device} from './devices/BaseDevice.tsx';
|
export {default as Device} from './devices/BaseDevice.tsx';
|
||||||
export {default as AndroidDevice} from './devices/AndroidDevice.tsx';
|
export {default as AndroidDevice} from './devices/AndroidDevice.tsx';
|
||||||
export {default as ArchivedDevice} from './devices/ArchivedDevice.tsx';
|
export {default as ArchivedDevice} from './devices/ArchivedDevice.tsx';
|
||||||
export {default as IOSDevice} from './devices/IOSDevice.js';
|
export {default as IOSDevice} from './devices/IOSDevice.tsx';
|
||||||
export type {OS} from './devices/BaseDevice.tsx';
|
export type {OS} from './devices/BaseDevice.tsx';
|
||||||
|
|||||||
Reference in New Issue
Block a user