(results)
| 194 | } |
| 195 | |
| 196 | didChange(results) { |
| 197 | let previousTree = this.tree; |
| 198 | let files; |
| 199 | |
| 200 | if (results.stack) { |
| 201 | this._hasCompileError = true; |
| 202 | files = ['LiveReload due to compile error']; |
| 203 | } else if (this._hasCompileError) { |
| 204 | this._hasCompileError = false; |
| 205 | files = ['LiveReload due to resolved compile error']; |
| 206 | } else if (results.directory) { |
| 207 | this.tree = FSTree.fromEntries(this.getDirectoryEntries(results.directory), { sortAndExpand: true }); |
| 208 | files = previousTree |
| 209 | .calculatePatch(this.tree) |
| 210 | .filter(isNotRemoved) |
| 211 | .filter(isNotDirectory) |
| 212 | .map(relativePath) |
| 213 | .filter(isNotSourceMapFile); |
| 214 | } else { |
| 215 | files = ['LiveReload files']; |
| 216 | } |
| 217 | |
| 218 | logger.info('files %o', files); |
| 219 | |
| 220 | if (this.shouldTriggerReload(results)) { |
| 221 | this.liveReloadServer.changed({ |
| 222 | body: { |
| 223 | files, |
| 224 | }, |
| 225 | }); |
| 226 | } |
| 227 | } |
| 228 | |
| 229 | didRestart() { |
| 230 | this.liveReloadServer.changed({ |
nothing calls this directly
no test coverage detected