11import { createTable, formatListOfNames } from "../../helpers";
2+ import { DeviceConnectionType } from "../../../constants";
23
34export class ListDevicesCommand implements ICommand {
45 constructor(private $devicesService: Mobile.IDevicesService,
@@ -25,9 +26,9 @@ export class ListDevicesCommand implements ICommand {
2526
2627 this.$logger.info("\nConnected devices & emulators");
2728 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 });
2930
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" ], []);
3132 let action: (_device: Mobile.IDevice) => Promise<void>;
3233 if (this.$options.json) {
3334 action = async (device) => {
@@ -37,7 +38,8 @@ export class ListDevicesCommand implements ICommand {
3738 action = async (device) => {
3839 table.push([(index++).toString(), device.deviceInfo.displayName || '',
3940 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(", ")]);
4143 };
4244 }
4345
0 commit comments