hydra/src/main/helpers/ps.ts
2024-04-18 08:46:06 +01:00

12 lines
283 B
TypeScript

import psList from "ps-list";
import { tasklist } from "tasklist";
export const getProcesses = async () => {
if (process.platform === "win32") {
return tasklist().then((tasks) =>
tasks.map((task) => ({ ...task, name: task.imageName }))
);
}
return psList();
};