Skip to content

feat: support LiveSync to Wi-Fi devices #4967

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Aug 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions lib/common/commands/device/list-devices.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { createTable, formatListOfNames } from "../../helpers";
import { DeviceConnectionType } from "../../../constants";

export class ListDevicesCommand implements ICommand {
constructor(private $devicesService: Mobile.IDevicesService,
Expand All @@ -25,9 +26,9 @@ export class ListDevicesCommand implements ICommand {

this.$logger.info("\nConnected devices & emulators");
let index = 1;
await this.$devicesService.initialize({ platform: args[0], deviceId: null, skipInferPlatform: true, skipDeviceDetectionInterval: true, skipEmulatorStart: true });
await this.$devicesService.initialize({ platform: args[0], deviceId: null, skipInferPlatform: true, skipDeviceDetectionInterval: true, skipEmulatorStart: true, fullDiscovery: true });

const table: any = createTable(["#", "Device Name", "Platform", "Device Identifier", "Type", "Status"], []);
const table: any = createTable(["#", "Device Name", "Platform", "Device Identifier", "Type", "Status", "Connection Type"], []);
let action: (_device: Mobile.IDevice) => Promise<void>;
if (this.$options.json) {
action = async (device) => {
Expand All @@ -37,7 +38,8 @@ export class ListDevicesCommand implements ICommand {
action = async (device) => {
table.push([(index++).toString(), device.deviceInfo.displayName || '',
device.deviceInfo.platform || '', device.deviceInfo.identifier || '',
device.deviceInfo.type || '', device.deviceInfo.status || '']);
device.deviceInfo.type || '', device.deviceInfo.status || '',
device.deviceInfo.connectionTypes.map(type => DeviceConnectionType[type]).join(", ")]);
};
}

Expand Down
2 changes: 2 additions & 0 deletions lib/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export class HmrConstants {

export class DeviceDiscoveryEventNames {
static DEVICE_FOUND = "deviceFound";
static DEVICE_UPDATED = "deviceUpdated";
static DEVICE_LOST = "deviceLost";
}

Expand All @@ -55,6 +56,7 @@ export class EmulatorDiscoveryNames {
export const DEVICE_LOG_EVENT_NAME = "deviceLogData";
export const IOS_LOG_PREDICATE = 'senderImagePath contains "NativeScript" || eventMessage contains[c] "NativeScript"';
export const IOS_APP_CRASH_LOG_REG_EXP = /Fatal JavaScript exception \- application has been terminated/;
export const FAIL_LIVESYNC_LOG_REGEX = /Failed to refresh the application with RefreshRequest./;

export const TARGET_FRAMEWORK_IDENTIFIERS = {
Cordova: "Cordova",
Expand Down
Loading