Commit f36f0e6
authored
Fix execution of before-prepare hooks in a long living process (#3140)
When LiveSync operation is started we set `usbLiveSyncService.isInitialized` to true. This variable is used in several `before-prepare` hooks.
For example `nativescript-dev-typescript` has the following logic:
- When before-prepare hook is executed it checks if the `usbLiveSyncService.isInitialized` property is set to true. In this case it does nothing. The idea is that when LiveSync watch process is started, the plugin has started `tsc --watch` process, so there's no need to do anything on `before-prepare`.
However, in a long living process, where the project may be changed, whenever we stop LiveSync process, we must set usbLiveSyncService to false. In case we do not do it, the property remains true and the before-prepare hook of the other project does nothing and the project is not transpiled.1 parent 63ef7ef commit f36f0e6
File tree
2 files changed
+42
-3
lines changed- lib/services/livesync
- test/services
2 files changed
+42
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
89 | 94 | | |
90 | 95 | | |
91 | 96 | | |
| |||
321 | 326 | | |
322 | 327 | | |
323 | 328 | | |
324 | | - | |
| 329 | + | |
325 | 330 | | |
326 | 331 | | |
327 | 332 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
| |||
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
| 52 | + | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
| |||
63 | 67 | | |
64 | 68 | | |
65 | 69 | | |
66 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
67 | 73 | | |
68 | 74 | | |
69 | 75 | | |
| |||
154 | 160 | | |
155 | 161 | | |
156 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
157 | 191 | | |
158 | 192 | | |
159 | 193 | | |
0 commit comments