Migrate iOSContainerUtility
Summary: TSC actually found a type error here in `safeExec` which is nice. Reviewed By: danielbuechele Differential Revision: D16666740 fbshipit-source-id: 28a1ad12190d2351a48323f23c3a69947503625d
This commit is contained in:
committed by
Facebook Github Bot
parent
5f3e84a96e
commit
3c2d9973e5
@@ -14,7 +14,7 @@ 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 IOSDevice from '../devices/IOSDevice';
|
||||||
import iosUtil from '../fb-stubs/iOSContainerUtility';
|
import iosUtil from '../fb-stubs/iOSContainerUtility.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';
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ import {ScribeLogger} from './ScribeLogger';
|
|||||||
export type ObjectError =
|
export type ObjectError =
|
||||||
| Error
|
| Error
|
||||||
| {
|
| {
|
||||||
message: string,
|
message: string;
|
||||||
stack?: string,
|
stack?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default class ErrorReporter {
|
export default class ErrorReporter {
|
||||||
|
|||||||
@@ -5,15 +5,15 @@
|
|||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
import {promisify} from 'util';
|
import {promisify} from 'util';
|
||||||
import type {DeviceType} from '../devices/BaseDevice';
|
import {DeviceType} from '../devices/BaseDevice';
|
||||||
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';
|
||||||
|
|
||||||
export type DeviceTarget = {
|
export type DeviceTarget = {
|
||||||
udid: string,
|
udid: string;
|
||||||
type: DeviceType,
|
type: DeviceType;
|
||||||
name: string,
|
name: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
function isAvailable(): boolean {
|
function isAvailable(): boolean {
|
||||||
@@ -17,7 +17,7 @@ import path from 'path';
|
|||||||
import tmp from 'tmp';
|
import tmp from 'tmp';
|
||||||
const tmpFile = promisify(tmp.file);
|
const tmpFile = promisify(tmp.file);
|
||||||
const tmpDir = promisify(tmp.dir);
|
const tmpDir = promisify(tmp.dir);
|
||||||
import iosUtil from '../fb-stubs/iOSContainerUtility';
|
import iosUtil from '../fb-stubs/iOSContainerUtility.tsx';
|
||||||
import {reportPlatformFailures} from './metrics';
|
import {reportPlatformFailures} from './metrics';
|
||||||
import {getAdbClient} from './adbClient';
|
import {getAdbClient} from './adbClient';
|
||||||
import * as androidUtil from './androidContainerUtility';
|
import * as androidUtil from './androidContainerUtility';
|
||||||
|
|||||||
Reference in New Issue
Block a user