Louis 7812bf64d5
chore: #371 - reference to plugin name and module path as variables (#372)
* chore: #371 - plugin developer can reference to plugin name and module path as variables

* chore: display origin plugin name

* Switch from plugin-core to core

* Remove un-used command in ci test

---------

Co-authored-by: Hien To <tominhhien97@gmail.com>
2023-10-17 15:41:35 +07:00

26 lines
519 B
TypeScript

const si = require("systeminformation");
const getResourcesInfo = async () =>
new Promise(async (resolve) => {
const cpu = await si.cpu();
const mem = await si.mem();
const gpu = await si.graphics();
const response = {
cpu,
mem,
gpu,
};
resolve(response);
});
const getCurrentLoad = async () =>
new Promise(async (resolve) => {
const currentLoad = await si.currentLoad();
resolve(currentLoad);
});
module.exports = {
getResourcesInfo,
getCurrentLoad,
};