Skip to content

Commit 75c9ea0

Browse files
authored
Merge pull request #5009 from NativeScript/fatme/merge-release-6.1.0
chore: merge release into master
2 parents 7505317 + 7c90cce commit 75c9ea0

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

docs/man_pages/lib-management/plugin.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ Command | Description
3535
[plugin remove](plugin-remove.html) | Uninstalls the specified plugin and its dependencies.
3636
[plugin update](plugin-update.html) | Updates the specified plugin(s) and its dependencies.
3737
[plugin build](plugin-build.html) | Builds the Android project of a NativeScript plugin, and updates the `include.gradle`.
38-
[plugin create](plugin-create.html) | Builds the Android project of a NativeScript plugin, and updates the `include.gradle`.
38+
[plugin create](plugin-create.html) | Creates a new project for NativeScript plugin development.
3939
<% } %>

lib/controllers/run-controller.ts

+1
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ export class RunController extends EventEmitter implements IRunController {
166166
const debugOptions = deviceDescriptor.debugOptions || {};
167167

168168
liveSyncResultInfo.waitForDebugger = !!debugOptions.debugBrk;
169+
liveSyncResultInfo.forceRefreshWithSocket = true;
169170

170171
const refreshInfo = await this.refreshApplicationWithoutDebug(projectData, liveSyncResultInfo, filesChangeEventData, deviceDescriptor, { shouldSkipEmitLiveSyncNotification: true, shouldCheckDeveloperDiscImage: true });
171172

lib/definitions/livesync.d.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@ declare global {
220220
isFullSync: boolean;
221221
waitForDebugger?: boolean;
222222
deviceAppData: Mobile.IDeviceAppData;
223-
didRecover?: boolean
223+
didRecover?: boolean;
224+
forceRefreshWithSocket?: boolean;
224225
}
225226

226227
interface IAndroidLiveSyncResultInfo extends ILiveSyncResultInfo, IAndroidLivesyncSyncOperationResult { }

lib/services/livesync/ios-device-livesync-service.ts

+9-5
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ export class IOSDeviceLiveSyncService extends DeviceLiveSyncServiceBase implemen
2323
super(platformsDataService, device);
2424
}
2525

26-
private canRefreshWithNotification(projectData: IProjectData): boolean {
26+
private canRefreshWithNotification(projectData: IProjectData, liveSyncInfo?: ILiveSyncResultInfo): boolean {
27+
if (liveSyncInfo && liveSyncInfo.forceRefreshWithSocket) {
28+
return false;
29+
}
30+
2731
if (this.device.isEmulator) {
2832
return false;
2933
}
@@ -72,7 +76,7 @@ export class IOSDeviceLiveSyncService extends DeviceLiveSyncServiceBase implemen
7276
shouldRestart = true;
7377
} else {
7478
const canExecuteFastSync = this.canExecuteFastSyncForPaths(liveSyncInfo, localToDevicePaths, projectData, deviceAppData.platform);
75-
const isRefreshConnectionSetup = this.canRefreshWithNotification(projectData) || (!this.device.isOnlyWiFiConnected && await this.setupSocketIfNeeded(projectData));
79+
const isRefreshConnectionSetup = this.canRefreshWithNotification(projectData, liveSyncInfo) || (!this.device.isOnlyWiFiConnected && await this.setupSocketIfNeeded(projectData));
7680
if (!canExecuteFastSync || !isRefreshConnectionSetup) {
7781
shouldRestart = true;
7882
}
@@ -93,7 +97,7 @@ export class IOSDeviceLiveSyncService extends DeviceLiveSyncServiceBase implemen
9397

9498
try {
9599
if (otherFiles.length) {
96-
didRefresh = await this.refreshApplicationCore(projectData);
100+
didRefresh = await this.refreshApplicationCore(projectData, liveSyncInfo);
97101
}
98102
} catch (e) {
99103
didRefresh = false;
@@ -102,9 +106,9 @@ export class IOSDeviceLiveSyncService extends DeviceLiveSyncServiceBase implemen
102106
return didRefresh;
103107
}
104108

105-
private async refreshApplicationCore(projectData: IProjectData) {
109+
private async refreshApplicationCore(projectData: IProjectData, liveSyncInfo: ILiveSyncResultInfo) {
106110
let didRefresh = true;
107-
if (this.canRefreshWithNotification(projectData)) {
111+
if (this.canRefreshWithNotification(projectData, liveSyncInfo)) {
108112
didRefresh = await this.refreshWithNotification(projectData);
109113
} else {
110114
if (await this.setupSocketIfNeeded(projectData)) {

0 commit comments

Comments
 (0)