Skip to content

Commit 29d7ad9

Browse files
committed
fix: remove livesyncService
1 parent ed8410a commit 29d7ad9

File tree

5 files changed

+11
-1188
lines changed

5 files changed

+11
-1188
lines changed

lib/bootstrap.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ $injector.require("deployCommandHelper", "./helpers/deploy-command-helper");
152152
$injector.require("optionsTracker", "./helpers/options-track-helper");
153153

154154
$injector.requirePublicClass("localBuildService", "./services/local-build-service");
155-
$injector.requirePublicClass("liveSyncService", "./services/livesync/livesync-service");
156155
$injector.require("LiveSyncSocket", "./services/livesync/livesync-socket");
157156
$injector.requirePublicClass("androidLivesyncTool", "./services/livesync/android-livesync-tool");
158157
$injector.require("androidLiveSyncService", "./services/livesync/android-livesync-service");

lib/commands/debug.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { cache } from "../common/decorators";
22
import { ValidatePlatformCommandBase } from "./command-base";
33
import { LiveSyncCommandHelper } from "../helpers/livesync-command-helper";
4+
import { DeviceDebugAppService } from "../services/device/device-debug-app-service";
45

56
export class DebugPlatformCommand extends ValidatePlatformCommandBase implements ICommand {
67
public allowedParameters: ICommandParameter[] = [];
@@ -16,7 +17,7 @@ export class DebugPlatformCommand extends ValidatePlatformCommandBase implements
1617
protected $logger: ILogger,
1718
protected $errors: IErrors,
1819
private $debugDataService: IDebugDataService,
19-
private $liveSyncService: IDebugLiveSyncService,
20+
private $deviceDebugAppService: DeviceDebugAppService,
2021
private $liveSyncCommandHelper: ILiveSyncCommandHelper,
2122
private $androidBundleValidatorHelper: IAndroidBundleValidatorHelper) {
2223
super($options, $platformsData, $platformValidationService, $projectData);
@@ -41,7 +42,7 @@ export class DebugPlatformCommand extends ValidatePlatformCommandBase implements
4142
const debugData = this.$debugDataService.createDebugData(this.$projectData, { device: selectedDeviceForDebug.deviceInfo.identifier });
4243

4344
if (this.$options.start) {
44-
await this.$liveSyncService.printDebugInformation(await this.$debugService.debug(debugData, debugOptions));
45+
await this.$deviceDebugAppService.printDebugInformation(await this.$debugService.debug(debugData, debugOptions));
4546
return;
4647
}
4748

lib/definitions/livesync.d.ts

Lines changed: 1 addition & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ declare global {
6666
/**
6767
* Whether debugging has been enabled for this device or not
6868
*/
69-
debugggingEnabled?: boolean;
69+
debuggingEnabled?: boolean;
7070
}
7171

7272
/**
@@ -171,56 +171,6 @@ declare global {
171171
getLiveSyncDeviceDescriptors(projectDir: string): ILiveSyncDeviceInfo[];
172172
}
173173

174-
// TODO: Rename this interface and change method's definition
175-
interface ILiveSyncService2 {
176-
syncInitialDataOnDevice(device: Mobile.IDevice, deviceBuildInfoDescriptor: ILiveSyncDeviceInfo, projectData: IProjectData, liveSyncInfo: ILiveSyncInfo): Promise<ILiveSyncResultInfo>;
177-
syncChangedDataOnDevice(device: Mobile.IDevice, filesToSync: string[], liveSyncDeviceInfo: ILiveSyncDeviceInfo, projectData: IProjectData, liveSyncInfo: ILiveSyncInfo): Promise<ILiveSyncResultInfo>;
178-
}
179-
180-
/**
181-
* Describes LiveSync operations while debuggging.
182-
*/
183-
interface IDebugLiveSyncService extends ILiveSyncService {
184-
/**
185-
* Method used to retrieve the glob patterns which CLI will watch for file changes. Defaults to the whole app directory.
186-
* @param {ILiveSyncInfo} liveSyncData Information needed for livesync - for example if bundle is passed or if a release build should be performed.
187-
* @param {IProjectData} projectData Project data.
188-
* @param {string[]} platforms Platforms to start the watcher for.
189-
* @returns {Promise<string[]>} The glob patterns.
190-
*/
191-
getWatcherPatterns(liveSyncData: ILiveSyncInfo, projectData: IProjectData, platforms: string[]): Promise<string[]>;
192-
193-
/**
194-
* Prints debug information.
195-
* @param {IDebugInformation} debugInformation Information to be printed.
196-
* @returns {IDebugInformation} Full url and port where the frontend client can be connected.
197-
*/
198-
printDebugInformation(debugInformation: IDebugInformation): IDebugInformation;
199-
200-
/**
201-
* Enables debugging for the specified devices
202-
* @param {IEnableDebuggingDeviceOptions[]} deviceOpts Settings used for enabling debugging for each device.
203-
* @param {IDebuggingAdditionalOptions} enableDebuggingOptions Settings used for enabling debugging.
204-
* @returns {Promise<IDebugInformation>[]} Array of promises for each device.
205-
*/
206-
enableDebugging(deviceOpts: IEnableDebuggingDeviceOptions[], enableDebuggingOptions: IDebuggingAdditionalOptions): Promise<IDebugInformation>[];
207-
208-
/**
209-
* Disables debugging for the specified devices
210-
* @param {IDisableDebuggingDeviceOptions[]} deviceOptions Settings used for disabling debugging for each device.
211-
* @param {IDebuggingAdditionalOptions} debuggingAdditionalOptions Settings used for disabling debugging.
212-
* @returns {Promise<void>[]} Array of promises for each device.
213-
*/
214-
disableDebugging(deviceOptions: IDisableDebuggingDeviceOptions[], debuggingAdditionalOptions: IDebuggingAdditionalOptions): Promise<void>[];
215-
216-
/**
217-
* Attaches a debugger to the specified device.
218-
* @param {IAttachDebuggerOptions} settings Settings used for controling the attaching process.
219-
* @returns {Promise<IDebugInformation>} Full url and port where the frontend client can be connected.
220-
*/
221-
attachDebugger(settings: IAttachDebuggerOptions): Promise<IDebugInformation>;
222-
}
223-
224174
/**
225175
* Describes additional debugging settings.
226176
*/

0 commit comments

Comments
 (0)