MCPcopy Create free account
hub / github.com/sindresorhus/fkill-cli / init

Function init

interactive.js:271–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269};
270
271const 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
287export {init, handleFkillError};

Callers

nothing calls this directly

Calls 2

findPortsForProcessFunction · 0.85
listProcessesFunction · 0.85

Tested by

no test coverage detected