1
1
import { createTable , formatListOfNames } from "../../helpers" ;
2
+ import { DeviceConnectionType } from "../../../constants" ;
2
3
3
4
export class ListDevicesCommand implements ICommand {
4
5
constructor ( private $devicesService : Mobile . IDevicesService ,
@@ -25,9 +26,9 @@ export class ListDevicesCommand implements ICommand {
25
26
26
27
this . $logger . info ( "\nConnected devices & emulators" ) ;
27
28
let index = 1 ;
28
- await this . $devicesService . initialize ( { platform : args [ 0 ] , deviceId : null , skipInferPlatform : true , skipDeviceDetectionInterval : true , skipEmulatorStart : true } ) ;
29
+ await this . $devicesService . initialize ( { platform : args [ 0 ] , deviceId : null , skipInferPlatform : true , skipDeviceDetectionInterval : true , skipEmulatorStart : true , fullDiscovery : true } ) ;
29
30
30
- const table : any = createTable ( [ "#" , "Device Name" , "Platform" , "Device Identifier" , "Type" , "Status" ] , [ ] ) ;
31
+ const table : any = createTable ( [ "#" , "Device Name" , "Platform" , "Device Identifier" , "Type" , "Status" , "Connection Type" ] , [ ] ) ;
31
32
let action : ( _device : Mobile . IDevice ) => Promise < void > ;
32
33
if ( this . $options . json ) {
33
34
action = async ( device ) => {
@@ -37,7 +38,8 @@ export class ListDevicesCommand implements ICommand {
37
38
action = async ( device ) => {
38
39
table . push ( [ ( index ++ ) . toString ( ) , device . deviceInfo . displayName || '' ,
39
40
device . deviceInfo . platform || '' , device . deviceInfo . identifier || '' ,
40
- device . deviceInfo . type || '' , device . deviceInfo . status || '' ] ) ;
41
+ device . deviceInfo . type || '' , device . deviceInfo . status || '' ,
42
+ device . deviceInfo . connectionTypes . map ( type => DeviceConnectionType [ type ] ) . join ( ", " ) ] ) ;
41
43
} ;
42
44
}
43
45
0 commit comments