fix typescript typings

This commit is contained in:
Sebastian Hildebrandt
2023-12-03 19:38:48 +01:00
parent 1625b9301f
commit 40e9cc1a26
11 changed files with 23 additions and 51 deletions
-1
View File
@@ -378,7 +378,6 @@ export namespace Systeminformation {
uefi: boolean | null;
hypervizor?: boolean;
remoteSession?: boolean;
hypervisor?: boolean;
}
interface UuidData {
+6 -1
View File
@@ -423,6 +423,11 @@ function powerShellRelease() {
function powerShell(cmd) {
const pattern = [
'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))'
].join('|');
if (_psPersistent) {
const id = Math.random().toString(36).substring(2, 12);
return new Promise((resolve) => {
@@ -467,7 +472,7 @@ function powerShell(cmd) {
}
if (child && child.pid) {
child.stdout.on('data', function (data) {
result = result + data.toString('utf8');
result = result + data.toString('utf8').replace(pattern, '');
});
child.stderr.on('data', function () {
child.kill();