为大部分命令添加输出结构结构化数据

This commit is contained in:
fofolee
2025-01-26 22:55:47 +08:00
parent 73684865ae
commit deade3e1de
33 changed files with 1519 additions and 248 deletions

View File

@@ -58,13 +58,19 @@ const quickcommand = {
{
timeout: ms,
},
(err, stdout, stderr) => {
() => {
var end = new Date().getTime();
callback(end - start);
}
);
},
asyncSleep: async function (ms) {
return new Promise((resolve) => {
this.setTimeout(resolve, ms);
});
},
// 关闭进程
kill: function (pid, signal = "SIGTERM", cb) {
kill(pid, signal, cb);