(storageDir: string, directory: string, port: number)
| 35 | } |
| 36 | |
| 37 | function writePortFile(storageDir: string, directory: string, port: number): void { |
| 38 | const portFile = rpcPortFilePath(storageDir, directory); |
| 39 | mkdirSync(dirname(portFile), { recursive: true }); |
| 40 | writeFileSync( |
| 41 | portFile, |
| 42 | JSON.stringify({ port, pid: process.pid, started_at: Date.now() }), |
| 43 | "utf-8", |
| 44 | ); |
| 45 | } |
| 46 | |
| 47 | function writePortFileForPid( |
| 48 | storageDir: string, |
no test coverage detected