| 269 | }; |
| 270 | |
| 271 | const init = async flags => { |
| 272 | escExit(); |
| 273 | |
| 274 | const [portToPidMap, processes] = await Promise.all([ |
| 275 | allPortsWithPid(), |
| 276 | psList({all: false}), |
| 277 | ]); |
| 278 | |
| 279 | const processesWithPorts = processes.map(process_ => ({ |
| 280 | ...process_, |
| 281 | ports: findPortsForProcess(process_.pid, portToPidMap), |
| 282 | })); |
| 283 | |
| 284 | listProcesses(processesWithPorts, flags); |
| 285 | }; |
| 286 | |
| 287 | export {init, handleFkillError}; |
nothing calls this directly
no test coverage detected