Skip to content

Commit 0a62b82

Browse files
committed
Rename android livesync-library and extract as public class
1 parent fb8af69 commit 0a62b82

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

lib/bootstrap.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ $injector.require("deployCommandHelper", "./helpers/deploy-command-helper");
122122

123123
$injector.requirePublicClass("localBuildService", "./services/local-build-service");
124124
$injector.requirePublicClass("liveSyncService", "./services/livesync/livesync-service");
125+
$injector.requirePublicClass("androidLivesyncLibrary", "./services/livesync/android-livesync-library");
125126
$injector.require("androidLiveSyncService", "./services/livesync/android-livesync-service");
126127
$injector.require("iOSLiveSyncService", "./services/livesync/ios-livesync-service");
127128
$injector.require("usbLiveSyncService", "./services/livesync/livesync-service"); // The name is used in https://github.com/NativeScript/nativescript-dev-typescript

lib/definitions/livesync.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ interface IAndroidNativeScriptDeviceLiveSyncService {
377377
getDeviceHashService(appIdentifier: string): Mobile.IAndroidDeviceHashService;
378378
}
379379

380-
interface ILivesyncTool {
380+
interface IAndroidLivesyncTool {
381381
/**
382382
* Creates new socket connection.
383383
* @param configuration - The configuration to the socket connection.

lib/services/livesync/android-device-livesync-sockets-service.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import { DeviceAndroidDebugBridge } from "../../common/mobile/android/device-and
22
import { AndroidDeviceHashService } from "../../common/mobile/android/android-device-hash-service";
33
import { DeviceLiveSyncServiceBase } from "./device-livesync-service-base";
44
import { APP_FOLDER_NAME } from "../../constants";
5-
import { LivesyncTool } from "./livesync-library";
5+
import { AndroidLivesyncTool } from "./android-livesync-library";
66
import * as path from "path";
77

88
export class AndroidDeviceSocketsLiveSyncService extends DeviceLiveSyncServiceBase implements IAndroidNativeScriptDeviceLiveSyncService, INativeScriptDeviceLiveSyncService {
9-
private livesyncTool: ILivesyncTool;
9+
private livesyncTool: IAndroidLivesyncTool;
1010

1111
constructor(
1212
private data: IProjectData,
@@ -17,7 +17,7 @@ export class AndroidDeviceSocketsLiveSyncService extends DeviceLiveSyncServiceBa
1717
protected device: Mobile.IAndroidDevice,
1818
private $options: ICommonOptions) {
1919
super($platformsData, device);
20-
this.livesyncTool = this.$injector.resolve(LivesyncTool);
20+
this.livesyncTool = this.$injector.resolve(AndroidLivesyncTool);
2121
}
2222

2323
public async beforeLiveSyncAction(deviceAppData: Mobile.IDeviceAppData): Promise<void> {

lib/services/livesync/livesync-library.ts renamed to lib/services/livesync/android-livesync-library.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const OPERATION_END_REPORT = 2;
1313
const REPORT_LENGTH = 1;
1414
const DEFAULT_LOCAL_HOST_ADDRESS = "127.0.0.1";
1515

16-
export class LivesyncTool implements ILivesyncTool {
16+
export class AndroidLivesyncTool implements IAndroidLivesyncTool {
1717
private operationPromises: IDictionary<any>;
1818
private socketError: string | Error;
1919
private socketConnection: IDuplexSocket;
@@ -394,4 +394,4 @@ export class LivesyncTool implements ILivesyncTool {
394394
return relativeFilePath.split(path.sep).join(path.posix.sep);
395395
}
396396
}
397-
$injector.register("livesyncTool", LivesyncTool);
397+
$injector.register("androidLivesyncLibrary", AndroidLivesyncTool);

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@
8080
"xmldom": "0.1.21",
8181
"xmlhttprequest": "https://github.com/telerik/node-XMLHttpRequest/tarball/master",
8282
"yargs": "6.0.0",
83-
"zipstream": "https://github.com/Icenium/node-zipstream/tarball/master",
84-
"nativescript-android-livesync-lib": "file:../nativescript-android-livesync-lib"
83+
"zipstream": "https://github.com/Icenium/node-zipstream/tarball/master"
8584
},
8685
"analyze": true,
8786
"devDependencies": {

0 commit comments

Comments
 (0)