@@ -257,149 +257,6 @@ interface IOpener {
257257 open ( target : string , appname : string ) : void ;
258258}
259259
260- interface IFSWatcher extends NodeJS . EventEmitter {
261- // from fs.FSWatcher
262- close ( ) : void ;
263-
264- /**
265- * events.EventEmitter
266- * 1. change
267- * 2. error
268- */
269- addListener ( event : string , listener : Function ) : this;
270- addListener ( event : "change" , listener : ( eventType : string , filename : string | Buffer ) => void ) : this;
271- addListener ( event : "error" , listener : ( code : number , signal : string ) => void ) : this;
272-
273- on ( event : string , listener : Function ) : this;
274- on ( event : "change" , listener : ( eventType : string , filename : string | Buffer ) => void ) : this;
275- on ( event : "error" , listener : ( code : number , signal : string ) => void ) : this;
276-
277- once ( event : string , listener : Function ) : this;
278- once ( event : "change" , listener : ( eventType : string , filename : string | Buffer ) => void ) : this;
279- once ( event : "error" , listener : ( code : number , signal : string ) => void ) : this;
280-
281- prependListener ( event : string , listener : Function ) : this;
282- prependListener ( event : "change" , listener : ( eventType : string , filename : string | Buffer ) => void ) : this;
283- prependListener ( event : "error" , listener : ( code : number , signal : string ) => void ) : this;
284-
285- prependOnceListener ( event : string , listener : Function ) : this;
286- prependOnceListener ( event : "change" , listener : ( eventType : string , filename : string | Buffer ) => void ) : this;
287- prependOnceListener ( event : "error" , listener : ( code : number , signal : string ) => void ) : this;
288-
289- // From chokidar FSWatcher
290-
291- /**
292- * Add files, directories, or glob patterns for tracking. Takes an array of strings or just one
293- * string.
294- */
295- add ( paths : string | string [ ] ) : void ;
296-
297- /**
298- * Stop watching files, directories, or glob patterns. Takes an array of strings or just one
299- * string.
300- */
301- unwatch ( paths : string | string [ ] ) : void ;
302-
303- /**
304- * Returns an object representing all the paths on the file system being watched by this
305- * `FSWatcher` instance. The object's keys are all the directories (using absolute paths unless
306- * the `cwd` option was used), and the values are arrays of the names of the items contained in
307- * each directory.
308- */
309- getWatched ( ) : IDictionary < string [ ] > ;
310-
311- /**
312- * Removes all listeners from watched files.
313- */
314- close ( ) : void ;
315- }
316-
317- interface ILiveSyncProcessInfo {
318- timer : NodeJS . Timer ;
319- watcher : IFSWatcher ;
320- actionsChain : Promise < any > ;
321- isStopped : boolean ;
322- }
323-
324- interface ILiveSyncDeviceInfo {
325- identifier : string ;
326- buildAction : ( ) => Promise < string > ;
327- outputPath ?: string ;
328- }
329-
330- interface ILiveSyncInfo {
331- projectDir : string ;
332- shouldStartWatcher : boolean ;
333- syncAllFiles ?: boolean ;
334- }
335-
336- interface ILiveSyncBuildInfo {
337- platform : string ;
338- isEmulator : boolean ;
339- pathToBuildItem : string ;
340- }
341-
342- // interface ILiveSyncDebugInfo {
343- // outputFilePath?: string;
344- // debugData: IDebugData;
345- // debugOptions: IDebugOptions;
346- // }
347-
348- interface ILiveSyncService {
349- liveSync ( deviceDescriptors : ILiveSyncDeviceInfo [ ] , liveSyncData : ILiveSyncInfo ) : Promise < void > ;
350- stopLiveSync ( projectDir : string ) : Promise < void > ;
351- }
352-
353- interface ILiveSyncWatchInfo {
354- projectData : IProjectData ;
355- filesToRemove : string [ ] ;
356- filesToSync : string [ ] ;
357- isRebuilt : boolean ;
358- syncAllFiles : boolean ;
359- }
360-
361- interface ILiveSyncResultInfo {
362- modifiedFilesData : Mobile . ILocalToDevicePathData [ ] ;
363- isFullSync : boolean ;
364- deviceAppData : Mobile . IDeviceAppData ;
365- }
366-
367- interface IFullSyncInfo {
368- projectData : IProjectData ;
369- device : Mobile . IDevice ;
370- syncAllFiles : boolean ;
371- }
372-
373- interface IPlatformLiveSyncService {
374- fullSync ( syncInfo : IFullSyncInfo ) : Promise < ILiveSyncResultInfo > ;
375- liveSyncWatchAction ( device : Mobile . IDevice , liveSyncInfo : ILiveSyncWatchInfo ) : Promise < ILiveSyncResultInfo > ;
376- refreshApplication ( projectData : IProjectData , liveSyncInfo : ILiveSyncResultInfo ) : Promise < void > ;
377- }
378-
379- interface INativeScriptDeviceLiveSyncService extends IDeviceLiveSyncServiceBase {
380- /**
381- * Refreshes the application's content on a device
382- * @param {Mobile.IDeviceAppData } deviceAppData Information about the application and the device.
383- * @param {Mobile.ILocalToDevicePathData[] } localToDevicePaths Object containing a mapping of file paths from the system to the device.
384- * @param {boolean } forceExecuteFullSync If this is passed a full LiveSync is performed instead of an incremental one.
385- * @param {IProjectData } projectData Project data.
386- * @return {Promise<void> }
387- */
388- refreshApplication ( deviceAppData : Mobile . IDeviceAppData ,
389- localToDevicePaths : Mobile . ILocalToDevicePathData [ ] ,
390- forceExecuteFullSync : boolean ,
391- projectData : IProjectData ) : Promise < void > ;
392-
393- /**
394- * Removes specified files from a connected device
395- * @param {string } appIdentifier Application identifier.
396- * @param {Mobile.ILocalToDevicePathData[] } localToDevicePaths Object containing a mapping of file paths from the system to the device.
397- * @param {string } projectId Project identifier - for example org.nativescript.livesync.
398- * @return {Promise<void> }
399- */
400- removeFiles ( appIdentifier : string , localToDevicePaths : Mobile . ILocalToDevicePathData [ ] , projectId : string ) : Promise < void > ;
401- }
402-
403260interface IBundle {
404261 bundle : boolean ;
405262}
0 commit comments