Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Commit 1fc5438

Browse files
Merge pull request #706 from telerik/vladimirov/merge-rel-master
Merge release-appbuilder in master
2 parents dd05194 + a63785f commit 1fc5438

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

services/livesync-service-base.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import * as path from "path";
88
import * as temp from "temp";
99
import * as minimatch from "minimatch";
1010
import * as constants from "../mobile/constants";
11+
import * as util from "util";
12+
1113
let gaze = require("gaze");
1214

1315
class LiveSyncServiceBase implements ILiveSyncServiceBase {
@@ -246,7 +248,8 @@ class LiveSyncServiceBase implements ILiveSyncServiceBase {
246248

247249
private transferFiles(deviceAppData: Mobile.IDeviceAppData, localToDevicePaths: Mobile.ILocalToDevicePathData[], projectFilesPath: string, isFullSync: boolean): IFuture<void> {
248250
return (() => {
249-
this.$logger.info("Transferring project files...");
251+
this.logFilesSyncInformation(localToDevicePaths, "Transferring %s.");
252+
250253
let canTransferDirectory = isFullSync && (this.$devicesService.isAndroidDevice(deviceAppData.device) || this.$devicesService.isiOSSimulator(deviceAppData.device));
251254
if (canTransferDirectory) {
252255
let tempDir = temp.mkdirSync("tempDir");
@@ -256,10 +259,17 @@ class LiveSyncServiceBase implements ILiveSyncServiceBase {
256259
} else {
257260
deviceAppData.device.fileSystem.transferFiles(deviceAppData, localToDevicePaths).wait();
258261
}
259-
this.$logger.info("Successfully transferred all project files.");
262+
263+
this.logFilesSyncInformation(localToDevicePaths, "Successfully transferred %s.");
260264
}).future<void>()();
261265
}
262266

267+
private logFilesSyncInformation(localToDevicePaths: Mobile.ILocalToDevicePathData[], message: string): void {
268+
_.each(localToDevicePaths, (file: Mobile.ILocalToDevicePathData) => {
269+
this.$logger.info(util.format(message, path.basename(file.getLocalPath()).yellow));
270+
});
271+
}
272+
263273
private resolvePlatformLiveSyncService(platform: string, device: Mobile.IDevice): IPlatformLiveSyncService {
264274
return this.$injector.resolve(this.$liveSyncProvider.platformSpecificLiveSyncServices[platform.toLowerCase()], { _device: device });
265275
}

0 commit comments

Comments
 (0)