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 {connect} from 'react-redux';
|
||||
import AndroidDevice from '../devices/AndroidDevice.tsx';
|
||||
import IOSDevice from '../devices/IOSDevice';
|
||||
import IOSDevice from '../devices/IOSDevice.tsx';
|
||||
import expandTilde from 'expand-tilde';
|
||||
import fs from 'fs';
|
||||
import os from 'os';
|
||||
|
||||
@@ -5,41 +5,39 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import type {DeviceType, LogLevel, DeviceLogEntry} from './BaseDevice.tsx';
|
||||
import {DeviceType, LogLevel, DeviceLogEntry} from './BaseDevice';
|
||||
import child_process from 'child_process';
|
||||
import BaseDevice from './BaseDevice.tsx';
|
||||
import BaseDevice from './BaseDevice';
|
||||
import JSONStream from 'JSONStream';
|
||||
import {Transform} from 'stream';
|
||||
|
||||
type IOSLogLevel = 'Default' | 'Info' | 'Debug' | 'Error' | 'Fault';
|
||||
|
||||
type RawLogEntry = {|
|
||||
eventMessage: string,
|
||||
machTimestamp: number,
|
||||
messageType: IOSLogLevel,
|
||||
processID: number,
|
||||
processImagePath: string,
|
||||
processImageUUID: string,
|
||||
processUniqueID: number,
|
||||
senderImagePath: string,
|
||||
senderImageUUID: string,
|
||||
senderProgramCounter: number,
|
||||
threadID: number,
|
||||
timestamp: string,
|
||||
timezoneName: string,
|
||||
traceID: string,
|
||||
|};
|
||||
type RawLogEntry = {
|
||||
eventMessage: string;
|
||||
machTimestamp: number;
|
||||
messageType: IOSLogLevel;
|
||||
processID: number;
|
||||
processImagePath: string;
|
||||
processImageUUID: string;
|
||||
processUniqueID: number;
|
||||
senderImagePath: string;
|
||||
senderImageUUID: string;
|
||||
senderProgramCounter: number;
|
||||
threadID: number;
|
||||
timestamp: string;
|
||||
timezoneName: string;
|
||||
traceID: string;
|
||||
};
|
||||
|
||||
export default class IOSDevice extends BaseDevice {
|
||||
icon = 'icons/ios.svg';
|
||||
os = 'iOS';
|
||||
|
||||
log: any;
|
||||
buffer: string;
|
||||
|
||||
constructor(serial: string, deviceType: DeviceType, title: string) {
|
||||
super(serial, deviceType, title);
|
||||
|
||||
this.icon = 'icons/ios.svg';
|
||||
this.os = 'iOS';
|
||||
this.buffer = '';
|
||||
this.log = this.startLogListener();
|
||||
}
|
||||
@@ -13,8 +13,8 @@ import {promisify} from 'util';
|
||||
import path from 'path';
|
||||
import child_process from 'child_process';
|
||||
const execFile = child_process.execFile;
|
||||
import IOSDevice from '../devices/IOSDevice';
|
||||
import iosUtil from '../fb-stubs/iOSContainerUtility.tsx';
|
||||
import IOSDevice from '../devices/IOSDevice.tsx';
|
||||
import isProduction from '../utils/isProduction.js';
|
||||
import GK from '../fb-stubs/GK.tsx';
|
||||
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 AndroidDevice} from './devices/AndroidDevice.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';
|
||||
|
||||
Reference in New Issue
Block a user