Skip to content

Commit bb3a696

Browse files
authored
feat: add watchAction hooks (#5661)
1 parent cf4d667 commit bb3a696

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

lib/controllers/run-controller.ts

+16
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,15 @@ export class RunController extends EventEmitter implements IRunController {
759759
// IMPORTANT: keep the same instance as we rely on side effects
760760
_.assign(liveSyncResultInfo, fullLiveSyncResultInfo);
761761
};
762+
await this.$hooksService.executeBeforeHooks("watchAction", {
763+
hookArgs: {
764+
liveSyncResultInfo,
765+
filesToSync,
766+
allAppFiles,
767+
isInHMRMode,
768+
filesChangedEvent: data,
769+
},
770+
});
762771

763772
await this.refreshApplication(
764773
projectData,
@@ -786,6 +795,13 @@ export class RunController extends EventEmitter implements IRunController {
786795
);
787796
}
788797
}
798+
await this.$hooksService.executeAfterHooks("watchAction", {
799+
liveSyncResultInfo,
800+
filesToSync,
801+
allAppFiles,
802+
filesChangedEvent: data,
803+
isInHMRMode,
804+
});
789805

790806
this.$logger.info(
791807
util.format(

0 commit comments

Comments
 (0)