1
- import * as util from "util" ;
2
- import * as helpers from "../../helpers" ;
3
1
import * 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" ;
8
2
import { EventEmitter } from "events" ;
3
+ import * as _ from "lodash" ;
9
4
import { EOL } from "os" ;
10
- import { CONNECTED_STATUS } from "../../constants" ;
11
- import { isInteractive } from "../../helpers" ;
5
+ import * as util from "util" ;
12
6
import { 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" ;
14
10
import {
11
+ IAppInstalledInfo ,
15
12
IDictionary ,
16
13
IErrors ,
17
14
IHostInfo ,
18
- IAppInstalledInfo ,
19
15
} from "../../declarations" ;
16
+ import { exported , performanceLog } from "../../decorators" ;
20
17
import { IInjector } from "../../definitions/yok" ;
18
+ import * as helpers from "../../helpers" ;
19
+ import { isInteractive , settlePromises } from "../../helpers" ;
21
20
import { injector } from "../../yok" ;
22
- import { IOptions } from "../../../declarations" ;
23
21
24
22
export class DevicesService
25
23
extends EventEmitter
26
- implements Mobile . IDevicesService {
24
+ implements Mobile . IDevicesService
25
+ {
27
26
private static DEVICE_LOOKING_INTERVAL = 200 ;
28
27
private static EMULATOR_IMAGES_DETECTION_INTERVAL = 60 * 1000 ;
29
28
private _devices : IDictionary < Mobile . IDevice > = { } ;
@@ -190,9 +189,10 @@ export class DevicesService
190
189
const availableEmulatorsOutput = await this . getEmulatorImages ( {
191
190
platform : options . platform ,
192
191
} ) ;
193
- const emulators = this . $emulatorHelper . getEmulatorsFromAvailableEmulatorsOutput (
194
- availableEmulatorsOutput
195
- ) ;
192
+ const emulators =
193
+ this . $emulatorHelper . getEmulatorsFromAvailableEmulatorsOutput (
194
+ availableEmulatorsOutput
195
+ ) ;
196
196
const errors = this . $emulatorHelper . getErrorsFromAvailableEmulatorsOutput (
197
197
availableEmulatorsOutput
198
198
) ;
@@ -893,7 +893,7 @@ export class DevicesService
893
893
// TODO: Remove from here as it calls startLookingForDevices, so we double the calls to specific device detection services
894
894
await this . startEmulatorIfNecessary ( deviceInitOpts ) ;
895
895
}
896
-
896
+ deviceInitOpts ;
897
897
const platform = deviceInitOpts . platform ;
898
898
const deviceOption = deviceInitOpts . deviceId ;
899
899
const deviceLookingOptions : Mobile . IDeviceLookingOptions = {
@@ -910,6 +910,7 @@ export class DevicesService
910
910
) ;
911
911
await this . startLookingForDevices ( deviceLookingOptions ) ;
912
912
this . _device = await this . getDevice ( deviceOption ) ;
913
+
913
914
if ( this . _device . deviceInfo . platform !== this . _platform ) {
914
915
this . $errors . fail ( constants . ERROR_CANNOT_RESOLVE_DEVICE ) ;
915
916
}
@@ -1023,9 +1024,8 @@ export class DevicesService
1023
1024
appIdentifier : string
1024
1025
) : Promise < Mobile . IDebugWebViewInfo [ ] > {
1025
1026
const device = this . getDeviceByIdentifier ( deviceIdentifier ) ,
1026
- debuggableViewsPerApp = await device . applicationManager . getDebuggableAppViews (
1027
- [ appIdentifier ]
1028
- ) ;
1027
+ debuggableViewsPerApp =
1028
+ await device . applicationManager . getDebuggableAppViews ( [ appIdentifier ] ) ;
1029
1029
1030
1030
return debuggableViewsPerApp && debuggableViewsPerApp [ appIdentifier ] ;
1031
1031
}
0 commit comments