(port: number)
| 265 | } |
| 266 | }, |
| 267 | updatePort(port: number): void { |
| 268 | if (!existsSync(lockPath)) return; |
| 269 | const contents = readLockContents(lockPath); |
| 270 | // Only rewrite our own lock, and only when the port actually changed. |
| 271 | if (!contents || contents.pid !== ownerPid || contents.port === port) return; |
| 272 | try { |
| 273 | writeFileSync(lockPath, JSON.stringify({ ...contents, port })); |
| 274 | } catch { |
| 275 | // Best-effort: a concurrent release/takeover may have removed the file. |
| 276 | } |
| 277 | }, |
| 278 | }; |
| 279 | } |
nothing calls this directly
no test coverage detected