1- import * as util from "util" ;
2- import * as helpers from "../../helpers" ;
31import * as assert from "assert" ;
4- import * as _ from "lodash" ;
5- import * as constants from "../../constants" ;
6- import { exported } from "../../decorators" ;
7- import { settlePromises } from "../../helpers" ;
82import { EventEmitter } from "events" ;
3+ import * as _ from "lodash" ;
94import { EOL } from "os" ;
10- import { CONNECTED_STATUS } from "../../constants" ;
11- import { isInteractive } from "../../helpers" ;
5+ import * as util from "util" ;
126import { DebugCommandErrors } from "../../../constants" ;
13- import { performanceLog } from "../../decorators" ;
7+ import { IOptions } from "../../../declarations" ;
8+ import * as constants from "../../constants" ;
9+ import { CONNECTED_STATUS } from "../../constants" ;
1410import {
11+ IAppInstalledInfo ,
1512 IDictionary ,
1613 IErrors ,
1714 IHostInfo ,
18- IAppInstalledInfo ,
1915} from "../../declarations" ;
16+ import { exported , performanceLog } from "../../decorators" ;
2017import { IInjector } from "../../definitions/yok" ;
18+ import * as helpers from "../../helpers" ;
19+ import { isInteractive , settlePromises } from "../../helpers" ;
2120import { injector } from "../../yok" ;
22- import { IOptions } from "../../../declarations" ;
2321
2422export class DevicesService
2523 extends EventEmitter
26- implements Mobile . IDevicesService {
24+ implements Mobile . IDevicesService
25+ {
2726 private static DEVICE_LOOKING_INTERVAL = 200 ;
2827 private static EMULATOR_IMAGES_DETECTION_INTERVAL = 60 * 1000 ;
2928 private _devices : IDictionary < Mobile . IDevice > = { } ;
@@ -190,9 +189,10 @@ export class DevicesService
190189 const availableEmulatorsOutput = await this . getEmulatorImages ( {
191190 platform : options . platform ,
192191 } ) ;
193- const emulators = this . $emulatorHelper . getEmulatorsFromAvailableEmulatorsOutput (
194- availableEmulatorsOutput
195- ) ;
192+ const emulators =
193+ this . $emulatorHelper . getEmulatorsFromAvailableEmulatorsOutput (
194+ availableEmulatorsOutput
195+ ) ;
196196 const errors = this . $emulatorHelper . getErrorsFromAvailableEmulatorsOutput (
197197 availableEmulatorsOutput
198198 ) ;
@@ -893,7 +893,7 @@ export class DevicesService
893893 // TODO: Remove from here as it calls startLookingForDevices, so we double the calls to specific device detection services
894894 await this . startEmulatorIfNecessary ( deviceInitOpts ) ;
895895 }
896-
896+ deviceInitOpts ;
897897 const platform = deviceInitOpts . platform ;
898898 const deviceOption = deviceInitOpts . deviceId ;
899899 const deviceLookingOptions : Mobile . IDeviceLookingOptions = {
@@ -910,6 +910,7 @@ export class DevicesService
910910 ) ;
911911 await this . startLookingForDevices ( deviceLookingOptions ) ;
912912 this . _device = await this . getDevice ( deviceOption ) ;
913+
913914 if ( this . _device . deviceInfo . platform !== this . _platform ) {
914915 this . $errors . fail ( constants . ERROR_CANNOT_RESOLVE_DEVICE ) ;
915916 }
@@ -1023,9 +1024,8 @@ export class DevicesService
10231024 appIdentifier : string
10241025 ) : Promise < Mobile . IDebugWebViewInfo [ ] > {
10251026 const device = this . getDeviceByIdentifier ( deviceIdentifier ) ,
1026- debuggableViewsPerApp = await device . applicationManager . getDebuggableAppViews (
1027- [ appIdentifier ]
1028- ) ;
1027+ debuggableViewsPerApp =
1028+ await device . applicationManager . getDebuggableAppViews ( [ appIdentifier ] ) ;
10291029
10301030 return debuggableViewsPerApp && debuggableViewsPerApp [ appIdentifier ] ;
10311031 }
0 commit comments