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
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user