@@ -2,7 +2,7 @@ import { Device, FilesPayload } from "nativescript-preview-sdk";
2
2
import { TrackActionNames , PREPARE_READY_EVENT_NAME } from "../constants" ;
3
3
import { PrepareController } from "./prepare-controller" ;
4
4
import { performanceLog } from "../common/decorators" ;
5
- import { stringify } from "../common/helpers" ;
5
+ import { stringify , hook } from "../common/helpers" ;
6
6
import { HmrConstants } from "../common/constants" ;
7
7
import { EventEmitter } from "events" ;
8
8
import { PrepareDataService } from "../services/prepare-data-service" ;
@@ -17,6 +17,7 @@ export class PreviewAppController extends EventEmitter implements IPreviewAppCon
17
17
private $errors : IErrors ,
18
18
private $hmrStatusService : IHmrStatusService ,
19
19
private $logger : ILogger ,
20
+ public $hooksService : IHooksService ,
20
21
private $prepareController : PrepareController ,
21
22
private $previewAppFilesService : IPreviewAppFilesService ,
22
23
private $previewAppPluginsService : IPreviewAppPluginsService ,
@@ -26,6 +27,7 @@ export class PreviewAppController extends EventEmitter implements IPreviewAppCon
26
27
private $prepareDataService : PrepareDataService
27
28
) { super ( ) ; }
28
29
30
+ @hook ( "preview-sync" )
29
31
public async startPreview ( data : IPreviewAppLiveSyncData ) : Promise < IQrCodeImageData > {
30
32
await this . previewCore ( data ) ;
31
33
0 commit comments