(root: string)
| 210 | } |
| 211 | |
| 212 | function collectWatchDirectories(root: string): readonly string[] { |
| 213 | const out: string[] = []; |
| 214 | const stack: string[] = [root]; |
| 215 | |
| 216 | while (stack.length > 0) { |
| 217 | const current = stack.pop(); |
| 218 | if (!current) continue; |
| 219 | out.push(current); |
| 220 | const entries = safeReadDir(current); |
| 221 | for (const entry of entries) { |
| 222 | if (!entry.isDirectory()) continue; |
| 223 | if (IGNORED_DIR_NAMES.has(entry.name)) continue; |
| 224 | stack.push(join(current, entry.name)); |
| 225 | } |
| 226 | } |
| 227 | |
| 228 | return Object.freeze(out); |
| 229 | } |
| 230 | |
| 231 | function makeLogSink( |
| 232 | log: ((event: HotStateReloadLogEvent) => void) | undefined, |
no test coverage detected