* Generate a stable lookup key for a dev server instance (same appPath => same key). * Port and pid are NOT included because: * - They become stale after restart (port may change, pid always changes) * - DevServerManager tracks current port/pid in its internal state * - serverKey is only used fo
(appPath: string)
| 13 | * Stable key ensures one manager per appPath and avoids concurrent start() / duplicate port logs. |
| 14 | */ |
| 15 | function makeServerKey(appPath: string): string { |
| 16 | const safeApp = appPath.split(path.sep).join('_'); |
| 17 | return `launch:${safeApp}`; |
| 18 | } |
| 19 | |
| 20 | @tools({ |
| 21 | startDevServer: { |