Skip to content

Commit 4971447

Browse files
author
Fatme
authored
Merge pull request #4479 from NativeScript/release-patch
chore: merge release-patch in release
2 parents 5dc2d9f + b720651 commit 4971447

16 files changed

+758
-666
lines changed

lib/commands/preview.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ export class PreviewCommand implements ICommand {
2929
env: this.$options.env
3030
});
3131

32-
await this.$previewQrCodeService.printLiveSyncQrCode({ useHotModuleReload: this.$options.hmr, link: this.$options.link });
32+
await this.$previewQrCodeService.printLiveSyncQrCode({
33+
projectDir: this.$projectData.projectDir,
34+
useHotModuleReload: this.$options.hmr,
35+
link: this.$options.link
36+
});
3337
}
3438

3539
public async canExecute(args: string[]): Promise<boolean> {

lib/common/declarations.d.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,8 @@ declare const enum ErrorCodes {
596596
KARMA_FAIL = 130,
597597
UNHANDLED_REJECTION_FAILURE = 131,
598598
DELETED_KILL_FILE = 132,
599-
TESTS_INIT_REQUIRED = 133
599+
TESTS_INIT_REQUIRED = 133,
600+
ALL_DEVICES_DISCONNECTED = 134
600601
}
601602

602603
interface IFutureDispatcher {

lib/common/mobile/android/android-device.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,16 @@ export class AndroidDevice implements Mobile.IAndroidDevice {
7171
const adbStatusInfo = AndroidDevice.ADB_DEVICE_STATUS_INFO[this.status];
7272
const type = await this.getType();
7373

74+
let version = details.release;
75+
if (version && version.toLowerCase() === 'q') {
76+
version = '10.0.0';
77+
}
78+
7479
this.deviceInfo = {
7580
identifier: this.identifier,
7681
displayName: details.name,
7782
model: details.model,
78-
version: details.release,
83+
version,
7984
vendor: details.brand,
8085
platform: this.$devicePlatformsConstants.Android,
8186
status: adbStatusInfo ? adbStatusInfo.deviceStatus : this.status,

lib/constants.ts

+11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
require("colors");
2+
import { PreviewAppLiveSyncEvents } from "./services/livesync/playground/preview-app-constants";
23

34
export const APP_FOLDER_NAME = "app";
45
export const APP_RESOURCES_FOLDER_NAME = "App_Resources";
@@ -269,3 +270,13 @@ export class AndroidAppBundleMessages {
269270
public static ANDROID_APP_BUNDLE_DOCS_MESSAGE = "What is Android App Bundle: https://docs.nativescript.org/tooling/publishing/android-app-bundle";
270271
public static ANDROID_APP_BUNDLE_PUBLISH_DOCS_MESSAGE = "How to use Android App Bundle for publishing: https://docs.nativescript.org/tooling/publishing/publishing-android-apps#android-app-bundle";
271272
}
273+
274+
export const LiveSyncEvents = {
275+
liveSyncStopped: "liveSyncStopped",
276+
// In case we name it error, EventEmitter expects instance of Error to be raised and will also raise uncaught exception in case there's no handler
277+
liveSyncError: "liveSyncError",
278+
previewAppLiveSyncError: PreviewAppLiveSyncEvents.PREVIEW_APP_LIVE_SYNC_ERROR,
279+
liveSyncExecuted: "liveSyncExecuted",
280+
liveSyncStarted: "liveSyncStarted",
281+
liveSyncNotification: "notify"
282+
};

0 commit comments

Comments
 (0)