Migration of Basedevice from js to tsx
Summary: Converted BaseDevice from js to tsx Reviewed By: passy Differential Revision: D16648356 fbshipit-source-id: 12954532acf91930ab8c5f995bb94f6f9fe44015
This commit is contained in:
committed by
Facebook Github Bot
parent
fe5df63d41
commit
604e6d761f
@@ -23,7 +23,7 @@ import setup from '../static/setup.js';
|
|||||||
import type {Store} from '../src/reducers';
|
import type {Store} from '../src/reducers';
|
||||||
import {getPersistentPlugins} from '../src/utils/pluginUtils.js';
|
import {getPersistentPlugins} from '../src/utils/pluginUtils.js';
|
||||||
import {serialize} from '../src/utils/serialization';
|
import {serialize} from '../src/utils/serialization';
|
||||||
import type BaseDevice from '../src/devices/BaseDevice';
|
import type BaseDevice from '../src/devices/BaseDevice.tsx';
|
||||||
|
|
||||||
import {getStringFromErrorLike} from '../src/utils/index';
|
import {getStringFromErrorLike} from '../src/utils/index';
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ import {
|
|||||||
import type {ShareType} from './reducers/application.js';
|
import type {ShareType} from './reducers/application.js';
|
||||||
import type {Logger} from './fb-interfaces/Logger.js';
|
import type {Logger} from './fb-interfaces/Logger.js';
|
||||||
import type BugReporter from './fb-stubs/BugReporter.js';
|
import type BugReporter from './fb-stubs/BugReporter.js';
|
||||||
import type BaseDevice from './devices/BaseDevice.js';
|
import type BaseDevice from './devices/BaseDevice.tsx';
|
||||||
import type {ActiveSheet} from './reducers/application.js';
|
import type {ActiveSheet} from './reducers/application.js';
|
||||||
const version = remote.app.getVersion();
|
const version = remote.app.getVersion();
|
||||||
|
|
||||||
|
|||||||
@@ -6,11 +6,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import type {FlipperPlugin, FlipperBasePlugin} from './plugin.js';
|
import type {FlipperPlugin, FlipperBasePlugin} from './plugin.js';
|
||||||
import type BaseDevice from './devices/BaseDevice.js';
|
import type BaseDevice from './devices/BaseDevice.tsx';
|
||||||
import type {App} from './App.js';
|
import type {App} from './App.js';
|
||||||
import type {Logger} from './fb-interfaces/Logger.js';
|
import type {Logger} from './fb-interfaces/Logger.js';
|
||||||
import type {Store} from './reducers/index.js';
|
import type {Store} from './reducers/index.js';
|
||||||
import type {OS} from './devices/BaseDevice.js';
|
import type {OS} from './devices/BaseDevice.tsx';
|
||||||
import {FlipperDevicePlugin} from './plugin.js';
|
import {FlipperDevicePlugin} from './plugin.js';
|
||||||
import {setPluginState} from './reducers/pluginStates.js';
|
import {setPluginState} from './reducers/pluginStates.js';
|
||||||
import {ReactiveSocket, PartialResponder} from 'rsocket-core';
|
import {ReactiveSocket, PartialResponder} from 'rsocket-core';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
import type {FlipperPlugin, FlipperDevicePlugin} from './plugin.js';
|
import type {FlipperPlugin, FlipperDevicePlugin} from './plugin.js';
|
||||||
import type {Logger} from './fb-interfaces/Logger';
|
import type {Logger} from './fb-interfaces/Logger';
|
||||||
import BaseDevice from './devices/BaseDevice.js';
|
import BaseDevice from './devices/BaseDevice.tsx';
|
||||||
import type {Props as PluginProps} from './plugin';
|
import type {Props as PluginProps} from './plugin';
|
||||||
import {pluginKey as getPluginKey} from './reducers/pluginStates';
|
import {pluginKey as getPluginKey} from './reducers/pluginStates';
|
||||||
import Client from './Client.js';
|
import Client from './Client.js';
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import {default as which} from 'which';
|
|||||||
import {promisify} from 'util';
|
import {promisify} from 'util';
|
||||||
import {showOpenDialog} from '../utils/exportData';
|
import {showOpenDialog} from '../utils/exportData';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import type BaseDevice from '../devices/BaseDevice.js';
|
import type BaseDevice from '../devices/BaseDevice.tsx';
|
||||||
|
|
||||||
const whichPromise = promisify(which);
|
const whichPromise = promisify(which);
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
import {Button, Component, styled} from 'flipper';
|
import {Button, Component, styled} from 'flipper';
|
||||||
import {connect} from 'react-redux';
|
import {connect} from 'react-redux';
|
||||||
|
|
||||||
import type BaseDevice from '../devices/BaseDevice';
|
import type BaseDevice from '../devices/BaseDevice.tsx';
|
||||||
import AndroidDevice from '../devices/AndroidDevice';
|
import AndroidDevice from '../devices/AndroidDevice';
|
||||||
|
|
||||||
type OwnProps = {|
|
type OwnProps = {|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import {FlipperBasePlugin} from '../plugin.js';
|
import {FlipperBasePlugin} from '../plugin.js';
|
||||||
import config from '../fb-stubs/config';
|
import config from '../fb-stubs/config';
|
||||||
import type BaseDevice from '../devices/BaseDevice.js';
|
import type BaseDevice from '../devices/BaseDevice.tsx';
|
||||||
import type Client from '../Client.js';
|
import type Client from '../Client.js';
|
||||||
import type {UninitializedClient} from '../UninitializedClient.js';
|
import type {UninitializedClient} from '../UninitializedClient.js';
|
||||||
import type {PluginNotification} from '../reducers/notifications';
|
import type {PluginNotification} from '../reducers/notifications';
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import {remote} from 'electron';
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
import {reportPlatformFailures} from '../utils/metrics';
|
import {reportPlatformFailures} from '../utils/metrics';
|
||||||
import config from '../utils/processConfig';
|
import config from '../utils/processConfig';
|
||||||
import type BaseDevice from '../devices/BaseDevice';
|
import type BaseDevice from '../devices/BaseDevice.tsx';
|
||||||
|
|
||||||
const CAPTURE_LOCATION = expandTilde(
|
const CAPTURE_LOCATION = expandTilde(
|
||||||
config().screenCapturePath || remote.app.getPath('desktop'),
|
config().screenCapturePath || remote.app.getPath('desktop'),
|
||||||
|
|||||||
@@ -5,12 +5,12 @@
|
|||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {DeviceType, DeviceShell} from './BaseDevice.js';
|
import type {DeviceType, DeviceShell} from './BaseDevice.tsx';
|
||||||
|
|
||||||
import {Priority} from 'adbkit-logcat-fb';
|
import {Priority} from 'adbkit-logcat-fb';
|
||||||
import child_process from 'child_process';
|
import child_process from 'child_process';
|
||||||
import child_process_promise from 'child-process-es6-promise';
|
import child_process_promise from 'child-process-es6-promise';
|
||||||
import BaseDevice from './BaseDevice.js';
|
import BaseDevice from './BaseDevice.tsx';
|
||||||
import ArchivedDevice from './ArchivedDevice.js';
|
import ArchivedDevice from './ArchivedDevice.js';
|
||||||
|
|
||||||
type ADBClient = any;
|
type ADBClient = any;
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
import BaseDevice from './BaseDevice.js';
|
import BaseDevice from './BaseDevice.tsx';
|
||||||
import type {
|
import type {
|
||||||
DeviceType,
|
DeviceType,
|
||||||
OS,
|
OS,
|
||||||
DeviceShell,
|
DeviceShell,
|
||||||
DeviceLogEntry,
|
DeviceLogEntry,
|
||||||
} from './BaseDevice.js';
|
} from './BaseDevice.tsx';
|
||||||
|
|
||||||
export default class ArchivedDevice extends BaseDevice {
|
export default class ArchivedDevice extends BaseDevice {
|
||||||
constructor(
|
constructor(
|
||||||
|
|||||||
@@ -5,8 +5,7 @@
|
|||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type stream from 'stream';
|
import stream from 'stream';
|
||||||
import type ArchivedDevice from './ArchivedDevice';
|
|
||||||
|
|
||||||
export type LogLevel =
|
export type LogLevel =
|
||||||
| 'unknown'
|
| 'unknown'
|
||||||
@@ -17,7 +16,7 @@ export type LogLevel =
|
|||||||
| 'error'
|
| 'error'
|
||||||
| 'fatal';
|
| 'fatal';
|
||||||
|
|
||||||
export type DeviceLogEntry = {|
|
export type DeviceLogEntry = {
|
||||||
date: Date,
|
date: Date,
|
||||||
pid: number,
|
pid: number,
|
||||||
tid: number,
|
tid: number,
|
||||||
@@ -25,7 +24,7 @@ export type DeviceLogEntry = {|
|
|||||||
type: LogLevel,
|
type: LogLevel,
|
||||||
tag: string,
|
tag: string,
|
||||||
message: string,
|
message: string,
|
||||||
|};
|
};
|
||||||
|
|
||||||
export type DeviceShell = {
|
export type DeviceShell = {
|
||||||
stdout: stream.Readable,
|
stdout: stream.Readable,
|
||||||
@@ -41,13 +40,13 @@ export type DeviceType =
|
|||||||
| 'archivedEmulator'
|
| 'archivedEmulator'
|
||||||
| 'archivedPhysical';
|
| 'archivedPhysical';
|
||||||
|
|
||||||
export type DeviceExport = {|
|
export type DeviceExport = {
|
||||||
os: string,
|
os: string,
|
||||||
title: string,
|
title: string,
|
||||||
deviceType: DeviceType,
|
deviceType: DeviceType,
|
||||||
serial: string,
|
serial: string,
|
||||||
logs: Array<DeviceLogEntry>,
|
logs: Array<DeviceLogEntry>,
|
||||||
|};
|
};
|
||||||
|
|
||||||
export type OS = 'iOS' | 'Android' | 'Windows' | 'MacOS';
|
export type OS = 'iOS' | 'Android' | 'Windows' | 'MacOS';
|
||||||
|
|
||||||
@@ -71,7 +70,7 @@ export default class BaseDevice {
|
|||||||
serial: string;
|
serial: string;
|
||||||
|
|
||||||
// possible src of icon to display next to the device title
|
// possible src of icon to display next to the device title
|
||||||
icon: ?string;
|
icon: string | null | undefined;
|
||||||
|
|
||||||
logListeners: Map<Symbol, DeviceLogListener> = new Map();
|
logListeners: Map<Symbol, DeviceLogListener> = new Map();
|
||||||
logEntries: Array<DeviceLogEntry> = [];
|
logEntries: Array<DeviceLogEntry> = [];
|
||||||
@@ -135,7 +134,7 @@ export default class BaseDevice {
|
|||||||
this.logListeners.delete(id);
|
this.logListeners.delete(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
spawnShell(): ?DeviceShell {
|
spawnShell(): DeviceShell | null | undefined {
|
||||||
throw new Error('unimplemented');
|
throw new Error('unimplemented');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,7 +142,7 @@ export default class BaseDevice {
|
|||||||
throw new Error('unimplemented');
|
throw new Error('unimplemented');
|
||||||
}
|
}
|
||||||
|
|
||||||
archive(): ?ArchivedDevice {
|
archive(): any | null | undefined {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,9 +5,9 @@
|
|||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {DeviceType, LogLevel, DeviceLogEntry} from './BaseDevice.js';
|
import type {DeviceType, LogLevel, DeviceLogEntry} from './BaseDevice.tsx';
|
||||||
import child_process from 'child_process';
|
import child_process from 'child_process';
|
||||||
import BaseDevice from './BaseDevice.js';
|
import BaseDevice from './BaseDevice.tsx';
|
||||||
import JSONStream from 'JSONStream';
|
import JSONStream from 'JSONStream';
|
||||||
import {Transform} from 'stream';
|
import {Transform} from 'stream';
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import BaseDevice from './BaseDevice.js';
|
import BaseDevice from './BaseDevice.tsx';
|
||||||
|
|
||||||
export default class MacDevice extends BaseDevice {
|
export default class MacDevice extends BaseDevice {
|
||||||
os = 'MacOS';
|
os = 'MacOS';
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import BaseDevice from './BaseDevice.js';
|
import BaseDevice from './BaseDevice.tsx';
|
||||||
|
|
||||||
export default class WindowsDevice extends BaseDevice {
|
export default class WindowsDevice extends BaseDevice {
|
||||||
os = 'Windows';
|
os = 'Windows';
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
import AndroidDevice from '../devices/AndroidDevice';
|
import AndroidDevice from '../devices/AndroidDevice';
|
||||||
import child_process from 'child_process';
|
import child_process from 'child_process';
|
||||||
import type {Store} from '../reducers/index.js';
|
import type {Store} from '../reducers/index.js';
|
||||||
import type BaseDevice from '../devices/BaseDevice';
|
import type BaseDevice from '../devices/BaseDevice.tsx';
|
||||||
import type {Logger} from '../fb-interfaces/Logger.js';
|
import type {Logger} from '../fb-interfaces/Logger.js';
|
||||||
import {registerDeviceCallbackOnPlugins} from '../utils/onRegisterDevice.js';
|
import {registerDeviceCallbackOnPlugins} from '../utils/onRegisterDevice.js';
|
||||||
import {getAdbClient} from '../utils/adbClient';
|
import {getAdbClient} from '../utils/adbClient';
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
import type {ChildProcess} from 'child_process';
|
import type {ChildProcess} from 'child_process';
|
||||||
import type {Store} from '../reducers/index.js';
|
import type {Store} from '../reducers/index.js';
|
||||||
import type {Logger} from '../fb-interfaces/Logger.js';
|
import type {Logger} from '../fb-interfaces/Logger.js';
|
||||||
import type {DeviceType} from '../devices/BaseDevice';
|
import type {DeviceType} from '../devices/BaseDevice.tsx';
|
||||||
import {promisify} from 'util';
|
import {promisify} from 'util';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import child_process from 'child_process';
|
import child_process from 'child_process';
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
import {promisify} from 'util';
|
import {promisify} from 'util';
|
||||||
import type {DeviceType} from '../devices/BaseDevice';
|
import type {DeviceType} from '../devices/BaseDevice.tsx';
|
||||||
const exec = promisify(require('child_process').exec);
|
const exec = promisify(require('child_process').exec);
|
||||||
|
|
||||||
const errorMessage = 'Physical iOS devices not yet supported';
|
const errorMessage = 'Physical iOS devices not yet supported';
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export * from './fb-stubs/createPaste.js';
|
|||||||
export {connect} from 'react-redux';
|
export {connect} from 'react-redux';
|
||||||
export {selectPlugin} from './reducers/connections';
|
export {selectPlugin} from './reducers/connections';
|
||||||
export {getPluginKey, getPersistedState} from './utils/pluginUtils.js';
|
export {getPluginKey, getPersistedState} from './utils/pluginUtils.js';
|
||||||
export {default as BaseDevice} from './devices/BaseDevice.js';
|
export {default as BaseDevice} from './devices/BaseDevice.tsx';
|
||||||
export type {Store, MiddlewareAPI} from './reducers/index.js';
|
export type {Store, MiddlewareAPI} from './reducers/index.js';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
@@ -36,7 +36,7 @@ export {
|
|||||||
DeviceLogListener,
|
DeviceLogListener,
|
||||||
DeviceLogEntry,
|
DeviceLogEntry,
|
||||||
LogLevel,
|
LogLevel,
|
||||||
} from './devices/BaseDevice.js';
|
} from './devices/BaseDevice.tsx';
|
||||||
export {shouldParseAndroidLog} from './utils/crashReporterUtility.js';
|
export {shouldParseAndroidLog} from './utils/crashReporterUtility.js';
|
||||||
export {default as isProduction} from './utils/isProduction.js';
|
export {default as isProduction} from './utils/isProduction.js';
|
||||||
export {createTablePlugin} from './createTablePlugin.js';
|
export {createTablePlugin} from './createTablePlugin.js';
|
||||||
@@ -44,6 +44,6 @@ export {default as DetailSidebar} from './chrome/DetailSidebar.js';
|
|||||||
|
|
||||||
export {default as AndroidDevice} from './devices/AndroidDevice.js';
|
export {default as AndroidDevice} from './devices/AndroidDevice.js';
|
||||||
export {default as ArchivedDevice} from './devices/ArchivedDevice.js';
|
export {default as ArchivedDevice} from './devices/ArchivedDevice.js';
|
||||||
export {default as Device} from './devices/BaseDevice.js';
|
export {default as Device} from './devices/BaseDevice.tsx';
|
||||||
export {default as IOSDevice} from './devices/IOSDevice.js';
|
export {default as IOSDevice} from './devices/IOSDevice.js';
|
||||||
export type {OS} from './devices/BaseDevice.js';
|
export type {OS} from './devices/BaseDevice.tsx';
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import type {Store, MiddlewareAPI} from './reducers/index.js';
|
|||||||
import type {MetricType} from './utils/exportMetrics.js';
|
import type {MetricType} from './utils/exportMetrics.js';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import type {Node} from 'react';
|
import type {Node} from 'react';
|
||||||
import BaseDevice from './devices/BaseDevice.js';
|
import BaseDevice from './devices/BaseDevice.tsx';
|
||||||
import AndroidDevice from './devices/AndroidDevice';
|
import AndroidDevice from './devices/AndroidDevice';
|
||||||
import IOSDevice from './devices/IOSDevice';
|
import IOSDevice from './devices/IOSDevice';
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
import BaseDevice from '../../../devices/BaseDevice';
|
import BaseDevice from '../../../devices/BaseDevice.tsx';
|
||||||
import CrashReporterPlugin from '../../crash_reporter';
|
import CrashReporterPlugin from '../../crash_reporter';
|
||||||
import type {PersistedState, Crash} from '../../crash_reporter';
|
import type {PersistedState, Crash} from '../../crash_reporter';
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import type {
|
|||||||
TableColumns,
|
TableColumns,
|
||||||
} from 'flipper';
|
} from 'flipper';
|
||||||
import type {Counter} from './LogWatcher.js';
|
import type {Counter} from './LogWatcher.js';
|
||||||
import type {DeviceLogEntry} from '../../devices/BaseDevice.js';
|
import type {DeviceLogEntry} from '../../devices/BaseDevice.tsx';
|
||||||
import type {Props as PluginProps} from '../../plugin';
|
import type {Props as PluginProps} from '../../plugin';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import reducer from '../connections';
|
import reducer from '../connections';
|
||||||
import BaseDevice from '../../devices/BaseDevice';
|
import BaseDevice from '../../devices/BaseDevice.tsx';
|
||||||
import type {State} from '../connections';
|
import type {State} from '../connections';
|
||||||
|
|
||||||
test('REGISTER_DEVICE doesnt remove error', () => {
|
test('REGISTER_DEVICE doesnt remove error', () => {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type BaseDevice from '../devices/BaseDevice';
|
import type BaseDevice from '../devices/BaseDevice.tsx';
|
||||||
import MacDevice from '../devices/MacDevice';
|
import MacDevice from '../devices/MacDevice';
|
||||||
import type Client from '../Client';
|
import type Client from '../Client';
|
||||||
import type {UninitializedClient} from '../UninitializedClient';
|
import type {UninitializedClient} from '../UninitializedClient';
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {default as BaseDevice} from '../../devices/BaseDevice';
|
import {default as BaseDevice} from '../../devices/BaseDevice.tsx';
|
||||||
import {default as ArchivedDevice} from '../../devices/ArchivedDevice';
|
import {default as ArchivedDevice} from '../../devices/ArchivedDevice';
|
||||||
import {processStore} from '../exportData';
|
import {processStore} from '../exportData';
|
||||||
import {FlipperDevicePlugin} from '../../plugin.js';
|
import {FlipperDevicePlugin} from '../../plugin.js';
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
* @format
|
* @format
|
||||||
* @flow
|
* @flow
|
||||||
*/
|
*/
|
||||||
import type {DeviceLogEntry} from '../devices/BaseDevice.js';
|
import type {DeviceLogEntry} from '../devices/BaseDevice.tsx';
|
||||||
|
|
||||||
export function shouldParseAndroidLog(
|
export function shouldParseAndroidLog(
|
||||||
entry: DeviceLogEntry,
|
entry: DeviceLogEntry,
|
||||||
|
|||||||
@@ -6,14 +6,14 @@
|
|||||||
*/
|
*/
|
||||||
import {getInstance as getLogger} from '../fb-stubs/Logger';
|
import {getInstance as getLogger} from '../fb-stubs/Logger';
|
||||||
import type {Store, MiddlewareAPI} from '../reducers';
|
import type {Store, MiddlewareAPI} from '../reducers';
|
||||||
import type {DeviceExport} from '../devices/BaseDevice';
|
import type {DeviceExport} from '../devices/BaseDevice.tsx';
|
||||||
import type {State as PluginStates} from '../reducers/pluginStates';
|
import type {State as PluginStates} from '../reducers/pluginStates';
|
||||||
import type {PluginNotification} from '../reducers/notifications.js';
|
import type {PluginNotification} from '../reducers/notifications.js';
|
||||||
import type {ClientExport} from '../Client.js';
|
import type {ClientExport} from '../Client.js';
|
||||||
import type {State as PluginStatesState} from '../reducers/pluginStates';
|
import type {State as PluginStatesState} from '../reducers/pluginStates';
|
||||||
import {pluginKey} from '../reducers/pluginStates';
|
import {pluginKey} from '../reducers/pluginStates';
|
||||||
import {FlipperDevicePlugin, FlipperPlugin, callClient} from '../plugin.js';
|
import {FlipperDevicePlugin, FlipperPlugin, callClient} from '../plugin.js';
|
||||||
import {default as BaseDevice} from '../devices/BaseDevice';
|
import {default as BaseDevice} from '../devices/BaseDevice.tsx';
|
||||||
import {default as ArchivedDevice} from '../devices/ArchivedDevice';
|
import {default as ArchivedDevice} from '../devices/ArchivedDevice';
|
||||||
import {default as Client} from '../Client';
|
import {default as Client} from '../Client';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
import {getActiveAndroidDevices} from '../dispatcher/androidDevice';
|
import {getActiveAndroidDevices} from '../dispatcher/androidDevice';
|
||||||
import {getActiveDevicesAndSimulators} from '../dispatcher/iOSDevice';
|
import {getActiveDevicesAndSimulators} from '../dispatcher/iOSDevice';
|
||||||
import type BaseDevice from '../devices/BaseDevice';
|
import type BaseDevice from '../devices/BaseDevice.tsx';
|
||||||
|
|
||||||
export async function listDevices(): Promise<Array<BaseDevice>> {
|
export async function listDevices(): Promise<Array<BaseDevice>> {
|
||||||
const androidDevices = await getActiveAndroidDevices();
|
const androidDevices = await getActiveAndroidDevices();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
import type {Store} from '../reducers/index.js';
|
import type {Store} from '../reducers/index.js';
|
||||||
import {FlipperPlugin, FlipperDevicePlugin} from '../plugin.js';
|
import {FlipperPlugin, FlipperDevicePlugin} from '../plugin.js';
|
||||||
import type BaseDevice from '../devices/BaseDevice.js';
|
import type BaseDevice from '../devices/BaseDevice.tsx';
|
||||||
import {setPluginState} from '../reducers/pluginStates.js';
|
import {setPluginState} from '../reducers/pluginStates.js';
|
||||||
import {getPersistedState} from '../utils/pluginUtils.js';
|
import {getPersistedState} from '../utils/pluginUtils.js';
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
import type BaseDevice from '../devices/BaseDevice.js';
|
import type BaseDevice from '../devices/BaseDevice.tsx';
|
||||||
import {FlipperDevicePlugin, FlipperPlugin} from '../plugin.js';
|
import {FlipperDevicePlugin, FlipperPlugin} from '../plugin.js';
|
||||||
import type {State as PluginStatesState} from '../reducers/pluginStates.js';
|
import type {State as PluginStatesState} from '../reducers/pluginStates.js';
|
||||||
import {pluginsClassMap} from './exportData.js';
|
import {pluginsClassMap} from './exportData.js';
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
import type {State} from '../reducers/index';
|
import type {State} from '../reducers/index';
|
||||||
import type {DeviceExport} from '../devices/BaseDevice';
|
import type {DeviceExport} from '../devices/BaseDevice.tsx';
|
||||||
|
|
||||||
export const stateSanitizer = (state: State) => {
|
export const stateSanitizer = (state: State) => {
|
||||||
if (state.connections && state.connections.devices) {
|
if (state.connections && state.connections.devices) {
|
||||||
|
|||||||
Reference in New Issue
Block a user