systeminformation 6.0.0-beta.2 → 6.0.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +67 -18
- package/dist/bsd/mem.js +8 -3
- package/dist/bsd/network-stats.d.ts +1 -1
- package/dist/bsd/network-stats.js +14 -7
- package/dist/bsd/os-info.d.ts +1 -0
- package/dist/common/darwin.d.ts +2 -0
- package/dist/common/darwin.js +17 -1
- package/dist/common/defaults.d.ts +2 -1
- package/dist/common/defaults.js +36 -6
- package/dist/common/exec.js +29 -13
- package/dist/common/files.d.ts +9 -0
- package/dist/common/files.js +67 -3
- package/dist/common/filesys.d.ts +30 -0
- package/dist/common/filesys.js +228 -11
- package/dist/common/host.js +55 -3
- package/dist/common/internet.js +31 -20
- package/dist/common/mappings.d.ts +0 -3
- package/dist/common/mappings.js +35 -14
- package/dist/common/network.d.ts +15 -2
- package/dist/common/network.js +18 -22
- package/dist/common/nvidia.d.ts +1 -1
- package/dist/common/nvidia.js +4 -5
- package/dist/common/parse.d.ts +4 -6
- package/dist/common/parse.js +24 -69
- package/dist/common/security.d.ts +2 -0
- package/dist/common/security.js +18 -3
- package/dist/common/types.d.ts +53 -5
- package/dist/common/windows.d.ts +4 -0
- package/dist/common/windows.js +57 -1
- package/dist/cpu-current-load.d.ts +1 -0
- package/dist/cpu-current-load.js +54 -8
- package/dist/cpu-current-speed.js +5 -3
- package/dist/darwin/battery.d.ts +1 -1
- package/dist/darwin/battery.js +15 -5
- package/dist/darwin/camera.js +3 -3
- package/dist/darwin/disk-layout.js +16 -12
- package/dist/darwin/disks-io.js +3 -3
- package/dist/darwin/displays.d.ts +1 -0
- package/dist/darwin/displays.js +64 -2
- package/dist/darwin/fans.d.ts +2 -0
- package/dist/darwin/fans.js +28 -0
- package/dist/darwin/gpu.js +1 -1
- package/dist/darwin/index.d.ts +3 -0
- package/dist/darwin/index.js +8 -2
- package/dist/darwin/keyboard.js +4 -4
- package/dist/darwin/mouse.js +4 -4
- package/dist/darwin/network-interfaces.d.ts +3 -0
- package/dist/darwin/network-interfaces.js +81 -14
- package/dist/darwin/network-stats.d.ts +1 -1
- package/dist/darwin/network-stats.js +14 -7
- package/dist/darwin/os-info.d.ts +2 -0
- package/dist/darwin/os-info.js +24 -2
- package/dist/darwin/process-focused.d.ts +3 -0
- package/dist/darwin/process-focused.js +26 -0
- package/dist/darwin/serial-ports.d.ts +2 -0
- package/dist/darwin/serial-ports.js +94 -0
- package/dist/darwin/users.js +1 -1
- package/dist/docker.js +4 -5
- package/dist/fans.d.ts +1 -0
- package/dist/fans.js +17 -0
- package/dist/get-data.d.ts +4 -0
- package/dist/get-data.js +6 -2
- package/dist/get.js +6 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +8 -2
- package/dist/inet-public-ip.js +2 -1
- package/dist/linux/audio.js +59 -0
- package/dist/linux/baseboard.js +9 -20
- package/dist/linux/bios.js +6 -15
- package/dist/linux/block-devices.js +3 -1
- package/dist/linux/camera.js +2 -1
- package/dist/linux/chassis.js +4 -10
- package/dist/linux/cpu-temperature.js +34 -19
- package/dist/linux/cpu.js +3 -1
- package/dist/linux/disk-layout.js +9 -12
- package/dist/linux/disks-io.js +9 -9
- package/dist/linux/displays.d.ts +8 -0
- package/dist/linux/displays.js +151 -4
- package/dist/linux/fans.d.ts +2 -0
- package/dist/linux/fans.js +92 -0
- package/dist/linux/fs-size.d.ts +1 -1
- package/dist/linux/fs-size.js +164 -37
- package/dist/linux/fs-stats.js +6 -9
- package/dist/linux/gpu.d.ts +2 -0
- package/dist/linux/gpu.js +97 -22
- package/dist/linux/index.d.ts +3 -0
- package/dist/linux/index.js +8 -2
- package/dist/linux/mem-layout.js +3 -7
- package/dist/linux/mem.d.ts +1 -0
- package/dist/linux/mem.js +21 -1
- package/dist/linux/network-interfaces.d.ts +1 -0
- package/dist/linux/network-interfaces.js +154 -113
- package/dist/linux/network-stats.d.ts +1 -1
- package/dist/linux/network-stats.js +14 -40
- package/dist/linux/npu.js +2 -1
- package/dist/linux/os-info.js +56 -5
- package/dist/linux/printer.js +4 -4
- package/dist/linux/process-focused.d.ts +4 -0
- package/dist/linux/process-focused.js +32 -0
- package/dist/linux/process-load.js +11 -13
- package/dist/linux/processes.js +89 -80
- package/dist/linux/serial-ports.d.ts +2 -0
- package/dist/linux/serial-ports.js +102 -0
- package/dist/linux/services.js +182 -49
- package/dist/linux/system.js +1 -7
- package/dist/linux/users.js +1 -1
- package/dist/linux/uuid.js +4 -10
- package/dist/linux/wifi-networks.js +2 -2
- package/dist/network-interfaces.js +1 -1
- package/dist/observe.d.ts +1 -1
- package/dist/observe.js +5 -1
- package/dist/process-focused.d.ts +1 -0
- package/dist/process-focused.js +17 -0
- package/dist/serial-ports.d.ts +1 -0
- package/dist/serial-ports.js +17 -0
- package/dist/versions.js +34 -80
- package/dist/windows/audio.d.ts +29 -0
- package/dist/windows/audio.js +151 -11
- package/dist/windows/disk-layout.js +3 -0
- package/dist/windows/disks-io.js +3 -3
- package/dist/windows/displays.d.ts +5 -0
- package/dist/windows/displays.js +101 -16
- package/dist/windows/fans.d.ts +2 -0
- package/dist/windows/fans.js +71 -0
- package/dist/windows/fs-size.js +1 -4
- package/dist/windows/gpu.js +3 -2
- package/dist/windows/index.d.ts +3 -0
- package/dist/windows/index.js +8 -2
- package/dist/windows/network-interfaces.js +36 -41
- package/dist/windows/network-stats.js +20 -6
- package/dist/windows/process-focused.d.ts +3 -0
- package/dist/windows/process-focused.js +36 -0
- package/dist/windows/process-load.js +7 -5
- package/dist/windows/processes.d.ts +1 -0
- package/dist/windows/processes.js +54 -26
- package/dist/windows/serial-ports.d.ts +3 -0
- package/dist/windows/serial-ports.js +73 -0
- package/dist/windows/services.js +4 -1
- package/package.json +1 -1
package/dist/windows/audio.js
CHANGED
|
@@ -1,23 +1,163 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.audio = void 0;
|
|
3
|
+
exports.audio = exports.audioDefaultFlag = exports.audioChannelWin = exports.audioFlowFlags = exports.matchesAudioDevice = exports.pickDefaultAudioNames = exports.audioFlowNames = void 0;
|
|
4
4
|
const common_1 = require("../common");
|
|
5
5
|
const defaults_1 = require("../common/defaults");
|
|
6
6
|
const mappings_1 = require("../common/mappings");
|
|
7
7
|
const windows_1 = require("../common/windows");
|
|
8
|
+
const MMDEVICES = 'HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\MMDevices\\Audio';
|
|
9
|
+
const NAME_KEYS = ['{b3f8fa53-0004-438e-9003-51a46e139bfc},6', '{a45c254e-df1c-4efd-8020-67d146a850e0},2', '{b3f8fa53-0004-438e-9003-51a46e139bfc},2'];
|
|
10
|
+
const WIN_AUDIO_ENDPOINTS = `@('Render','Capture') | ForEach-Object { $f=$_; Get-ChildItem "${MMDEVICES}\\$f" -ErrorAction SilentlyContinue | ForEach-Object { ` +
|
|
11
|
+
'$k=Get-ItemProperty $_.PSPath -ErrorAction SilentlyContinue; $p=Get-ItemProperty "$($_.PSPath)\\Properties" -ErrorAction SilentlyContinue; ' +
|
|
12
|
+
`[PSCustomObject]@{f=$f;s=$k.DeviceState;r=$k.'Role:0';l=$k.'Level:0';n=(@(${NAME_KEYS.map((key) => `$p.'${key}'`).join(',')}) -join ' ')} } } | ConvertTo-Json -Depth 4 -compress`;
|
|
13
|
+
const toRank = (value) => {
|
|
14
|
+
if (Array.isArray(value)) {
|
|
15
|
+
return value.length ? value.map((byte) => Number(byte) || 0) : null;
|
|
16
|
+
}
|
|
17
|
+
if (value === null || value === undefined || value === '') {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
const numeric = Number(value);
|
|
21
|
+
if (!Number.isFinite(numeric) || numeric < 0) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
const bytes = [];
|
|
25
|
+
let rest = Math.floor(numeric);
|
|
26
|
+
for (let i = 0; i < 8; i++) {
|
|
27
|
+
bytes.push(rest % 256);
|
|
28
|
+
rest = Math.floor(rest / 256);
|
|
29
|
+
}
|
|
30
|
+
return bytes;
|
|
31
|
+
};
|
|
32
|
+
const compareRank = (a, b) => {
|
|
33
|
+
for (let i = Math.max(a.length, b.length) - 1; i >= 0; i--) {
|
|
34
|
+
const diff = (a[i] || 0) - (b[i] || 0);
|
|
35
|
+
if (diff) {
|
|
36
|
+
return diff;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return 0;
|
|
40
|
+
};
|
|
41
|
+
const pickMax = (entries, compare) => {
|
|
42
|
+
let best = entries[0];
|
|
43
|
+
let ambiguous = false;
|
|
44
|
+
for (const entry of entries.slice(1)) {
|
|
45
|
+
const diff = compare(entry.value, best.value);
|
|
46
|
+
if (diff > 0) {
|
|
47
|
+
best = entry;
|
|
48
|
+
ambiguous = false;
|
|
49
|
+
}
|
|
50
|
+
else if (diff === 0) {
|
|
51
|
+
ambiguous = true;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return ambiguous ? null : best.endpoint;
|
|
55
|
+
};
|
|
56
|
+
const bestEndpoint = (active) => {
|
|
57
|
+
if (active.length === 1) {
|
|
58
|
+
return active[0];
|
|
59
|
+
}
|
|
60
|
+
for (const key of ['r', 'l']) {
|
|
61
|
+
const ranked = [];
|
|
62
|
+
for (const endpoint of active) {
|
|
63
|
+
const value = toRank(endpoint[key]);
|
|
64
|
+
if (value) {
|
|
65
|
+
ranked.push({ endpoint, value });
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
const best = ranked.length ? pickMax(ranked, compareRank) : null;
|
|
69
|
+
if (best) {
|
|
70
|
+
return best;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return null;
|
|
74
|
+
};
|
|
75
|
+
const activeEndpoints = (endpoints, flow) => endpoints.filter((endpoint) => endpoint.f === flow && Number(endpoint.s) === 1 && (endpoint.n || '').trim());
|
|
76
|
+
const audioFlowNames = (endpoints, flow) => activeEndpoints(endpoints, flow).map((endpoint) => endpoint.n.trim().toLowerCase());
|
|
77
|
+
exports.audioFlowNames = audioFlowNames;
|
|
78
|
+
const endpointNames = (endpoint) => (endpoint?.n || '').trim().toLowerCase() || null;
|
|
79
|
+
const pickDefaultAudioNames = (endpoints) => ({
|
|
80
|
+
render: endpointNames(bestEndpoint(activeEndpoints(endpoints, 'Render'))),
|
|
81
|
+
capture: endpointNames(bestEndpoint(activeEndpoints(endpoints, 'Capture')))
|
|
82
|
+
});
|
|
83
|
+
exports.pickDefaultAudioNames = pickDefaultAudioNames;
|
|
84
|
+
const matchesAudioDevice = (name, names) => {
|
|
85
|
+
const needle = (name || '').trim().toLowerCase();
|
|
86
|
+
return needle.length > 2 && names.some((entry) => entry.includes(needle));
|
|
87
|
+
};
|
|
88
|
+
exports.matchesAudioDevice = matchesAudioDevice;
|
|
89
|
+
const audioFlowFlags = (name, renderNames, captureNames) => {
|
|
90
|
+
const out = (0, exports.matchesAudioDevice)(name, renderNames);
|
|
91
|
+
const isIn = (0, exports.matchesAudioDevice)(name, captureNames);
|
|
92
|
+
return out || isIn ? { in: isIn, out } : { in: null, out: null };
|
|
93
|
+
};
|
|
94
|
+
exports.audioFlowFlags = audioFlowFlags;
|
|
95
|
+
const audioChannelWin = (pnpDeviceId, name) => {
|
|
96
|
+
const id = (pnpDeviceId || '').toUpperCase();
|
|
97
|
+
const label = (name || '').toLowerCase();
|
|
98
|
+
if (label.includes('hdmi') || label.includes('displayport')) {
|
|
99
|
+
return 'HDMI';
|
|
100
|
+
}
|
|
101
|
+
if (id.startsWith('USB\\')) {
|
|
102
|
+
return 'USB';
|
|
103
|
+
}
|
|
104
|
+
if (id.startsWith('BTH')) {
|
|
105
|
+
return 'Bluetooth';
|
|
106
|
+
}
|
|
107
|
+
if (id.startsWith('HDAUDIO\\') || id.startsWith('INTELAUDIO\\')) {
|
|
108
|
+
return 'Onboard';
|
|
109
|
+
}
|
|
110
|
+
if (id.startsWith('PCI\\')) {
|
|
111
|
+
return 'PCIe';
|
|
112
|
+
}
|
|
113
|
+
return null;
|
|
114
|
+
};
|
|
115
|
+
exports.audioChannelWin = audioChannelWin;
|
|
116
|
+
const audioDefaultFlag = (name, defaults, flows) => {
|
|
117
|
+
const known = [defaults.render, defaults.capture].filter((entry) => Boolean(entry));
|
|
118
|
+
if ((0, exports.matchesAudioDevice)(name, known)) {
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
if (!known.length || (flows.out && !defaults.render) || (flows.in && !defaults.capture)) {
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
124
|
+
return false;
|
|
125
|
+
};
|
|
126
|
+
exports.audioDefaultFlag = audioDefaultFlag;
|
|
127
|
+
const getWindowsAudioEndpoints = async () => {
|
|
128
|
+
try {
|
|
129
|
+
return (0, windows_1.psArray)(await windows_1.ps.exec(WIN_AUDIO_ENDPOINTS));
|
|
130
|
+
}
|
|
131
|
+
catch {
|
|
132
|
+
return [];
|
|
133
|
+
}
|
|
134
|
+
};
|
|
8
135
|
const audio = async () => {
|
|
9
136
|
await (0, common_1.nextTick)();
|
|
10
137
|
const defaults = (0, common_1.cloneObj)(defaults_1.initAudioResult);
|
|
11
|
-
const
|
|
12
|
-
|
|
138
|
+
const [deviceList, endpoints] = await Promise.all([
|
|
139
|
+
windows_1.ps.exec('Get-CimInstance Win32_SoundDevice | Select-Object DeviceID,PNPDeviceID,StatusInfo,Name,Manufacturer | ConvertTo-Json -Depth 5'),
|
|
140
|
+
getWindowsAudioEndpoints()
|
|
141
|
+
]);
|
|
142
|
+
const defaultNames = (0, exports.pickDefaultAudioNames)(endpoints);
|
|
143
|
+
const renderNames = (0, exports.audioFlowNames)(endpoints, 'Render');
|
|
144
|
+
const captureNames = (0, exports.audioFlowNames)(endpoints, 'Capture');
|
|
145
|
+
return (0, windows_1.psArray)(deviceList)
|
|
13
146
|
.filter((data) => data?.Name)
|
|
14
|
-
.map((data) =>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
147
|
+
.map((data) => {
|
|
148
|
+
const flows = (0, exports.audioFlowFlags)(data.Name, renderNames, captureNames);
|
|
149
|
+
return {
|
|
150
|
+
...defaults,
|
|
151
|
+
id: data.DeviceID || '',
|
|
152
|
+
name: data.Name,
|
|
153
|
+
manufacturer: (data.Manufacturer || '').trim(),
|
|
154
|
+
default: (0, exports.audioDefaultFlag)(data.Name, defaultNames, flows),
|
|
155
|
+
channel: (0, exports.audioChannelWin)(data.PNPDeviceID, data.Name),
|
|
156
|
+
type: (0, mappings_1.audioTypeLabel)(data.Name, Boolean(flows.in), Boolean(flows.out)),
|
|
157
|
+
in: flows.in,
|
|
158
|
+
out: flows.out,
|
|
159
|
+
status: (0, mappings_1.audioWindowsStatus)(data.StatusInfo)
|
|
160
|
+
};
|
|
161
|
+
});
|
|
22
162
|
};
|
|
23
163
|
exports.audio = audio;
|
|
@@ -99,6 +99,9 @@ const diskLayout = async () => {
|
|
|
99
99
|
const smartDev = JSON.parse(stdout.trim());
|
|
100
100
|
if (smartDev?.devices && smartDev.devices.length > 0) {
|
|
101
101
|
for (const dev of smartDev.devices) {
|
|
102
|
+
if (!/^[\w/.,:\\-]+$/.test(String(dev.name || ''))) {
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
102
105
|
try {
|
|
103
106
|
const { stdout: smartOut } = await (0, exec_1.execSave)(`smartctl -j -a ${dev.name}`, const_1.execOptsWin);
|
|
104
107
|
const smartData = JSON.parse(smartOut);
|
package/dist/windows/disks-io.js
CHANGED
|
@@ -34,9 +34,9 @@ const disksIO = async () => {
|
|
|
34
34
|
rIO_sec: filesys_1._disk_io.rIO_sec,
|
|
35
35
|
wIO_sec: filesys_1._disk_io.wIO_sec,
|
|
36
36
|
tIO_sec: filesys_1._disk_io.tIO_sec,
|
|
37
|
-
rWaitTime: filesys_1._disk_io.
|
|
38
|
-
wWaitTime: filesys_1._disk_io.
|
|
39
|
-
tWaitTime: filesys_1._disk_io.
|
|
37
|
+
rWaitTime: filesys_1._disk_io.rWaitTimeDelta,
|
|
38
|
+
wWaitTime: filesys_1._disk_io.wWaitTimeDelta,
|
|
39
|
+
tWaitTime: filesys_1._disk_io.tWaitTimeDelta,
|
|
40
40
|
rWaitPercent: filesys_1._disk_io.rWaitPercent,
|
|
41
41
|
wWaitPercent: filesys_1._disk_io.wWaitPercent,
|
|
42
42
|
tWaitPercent: filesys_1._disk_io.tWaitPercent
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import type { DisplayData } from '../common/types';
|
|
2
|
+
export declare const parseEnumDisplayDevices: (stdout: any) => Map<string, {
|
|
3
|
+
gpu: string;
|
|
4
|
+
deviceId: string;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const windowsAvailabilityToPowerState: (value: string) => string;
|
|
2
7
|
export declare const displays: () => Promise<DisplayData[]>;
|
package/dist/windows/displays.js
CHANGED
|
@@ -1,12 +1,58 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.displays = void 0;
|
|
3
|
+
exports.displays = exports.windowsAvailabilityToPowerState = exports.parseEnumDisplayDevices = void 0;
|
|
4
4
|
const common_1 = require("../common");
|
|
5
5
|
const mappings_1 = require("../common/mappings");
|
|
6
6
|
const exec_1 = require("../common/exec");
|
|
7
7
|
const windows_1 = require("../common/windows");
|
|
8
|
-
const psCurrentModes = "Add-Type -AssemblyName System.Windows.Forms; if (-not ('SiDevMode' -as [Type])) { Add-Type -TypeDefinition 'using System;using System.Runtime.InteropServices;[StructLayout(LayoutKind.Sequential,CharSet=CharSet.Ansi)]public struct SIDEVMODE{[MarshalAs(UnmanagedType.ByValTStr,SizeConst=32)]public string dmDeviceName;public short dmSpecVersion;public short dmDriverVersion;public short dmSize;public short dmDriverExtra;public int dmFields;public int dmPositionX;public int dmPositionY;public int dmDisplayOrientation;public int dmDisplayFixedOutput;public short dmColor;public short dmDuplex;public short dmYResolution;public short dmTTOption;public short dmCollate;[MarshalAs(UnmanagedType.ByValTStr,SizeConst=32)]public string dmFormName;public short dmLogPixels;public int dmBitsPerPel;public int dmPelsWidth;public int dmPelsHeight;public int dmDisplayFlags;public int dmDisplayFrequency;public int dmICMMethod;public int dmICMIntent;public int dmMediaType;public int dmDitherType;public int dmReserved1;public int dmReserved2;public int dmPanningWidth;public int dmPanningHeight;}public class SiDevMode{[DllImport(\"user32.dll\",CharSet=CharSet.Ansi)]public static extern bool EnumDisplaySettings(string lpszDeviceName,int iModeNum,ref SIDEVMODE lpDevMode);}' }; [System.Windows.Forms.Screen]::AllScreens | ForEach-Object { $dm = New-Object SIDEVMODE; $dm.dmSize = [System.Runtime.InteropServices.Marshal]::SizeOf($dm); if ([SiDevMode]::EnumDisplaySettings($_.DeviceName, -1, [ref]$dm)) { $_.DeviceName + '|' + $dm.dmDisplayFrequency + '|' + $dm.dmBitsPerPel + '|' + $dm.dmPelsWidth + '|' + $dm.dmPelsHeight } }";
|
|
9
|
-
const
|
|
8
|
+
const psCurrentModes = "Add-Type -AssemblyName System.Windows.Forms; if (-not ('SiDevMode' -as [Type])) { Add-Type -TypeDefinition 'using System;using System.Runtime.InteropServices;[StructLayout(LayoutKind.Sequential,CharSet=CharSet.Ansi)]public struct SIDEVMODE{[MarshalAs(UnmanagedType.ByValTStr,SizeConst=32)]public string dmDeviceName;public short dmSpecVersion;public short dmDriverVersion;public short dmSize;public short dmDriverExtra;public int dmFields;public int dmPositionX;public int dmPositionY;public int dmDisplayOrientation;public int dmDisplayFixedOutput;public short dmColor;public short dmDuplex;public short dmYResolution;public short dmTTOption;public short dmCollate;[MarshalAs(UnmanagedType.ByValTStr,SizeConst=32)]public string dmFormName;public short dmLogPixels;public int dmBitsPerPel;public int dmPelsWidth;public int dmPelsHeight;public int dmDisplayFlags;public int dmDisplayFrequency;public int dmICMMethod;public int dmICMIntent;public int dmMediaType;public int dmDitherType;public int dmReserved1;public int dmReserved2;public int dmPanningWidth;public int dmPanningHeight;}public class SiDevMode{[DllImport(\"user32.dll\",CharSet=CharSet.Ansi)]public static extern bool EnumDisplaySettings(string lpszDeviceName,int iModeNum,ref SIDEVMODE lpDevMode);}' }; [System.Windows.Forms.Screen]::AllScreens | ForEach-Object { $dm = New-Object SIDEVMODE; $dm.dmSize = [System.Runtime.InteropServices.Marshal]::SizeOf($dm); if ([SiDevMode]::EnumDisplaySettings($_.DeviceName, -1, [ref]$dm)) { $_.DeviceName + '|' + $dm.dmDisplayFrequency + '|' + $dm.dmBitsPerPel + '|' + $dm.dmPelsWidth + '|' + $dm.dmPelsHeight + '|' + $dm.dmPositionX + '|' + $dm.dmPositionY } }";
|
|
9
|
+
const psDisplayAdapters = `if (-not ([System.Management.Automation.PSTypeName]'SIDispHolder').Type) { Add-Type -TypeDefinition @"
|
|
10
|
+
using System;
|
|
11
|
+
using System.Runtime.InteropServices;
|
|
12
|
+
public class SIDispHolder {
|
|
13
|
+
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
|
|
14
|
+
public struct DISPLAY_DEVICE {
|
|
15
|
+
public int cb;
|
|
16
|
+
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=32)] public string DeviceName;
|
|
17
|
+
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=128)] public string DeviceString;
|
|
18
|
+
public int StateFlags;
|
|
19
|
+
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=128)] public string DeviceID;
|
|
20
|
+
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=128)] public string DeviceKey;
|
|
21
|
+
}
|
|
22
|
+
[DllImport("user32.dll", CharSet=CharSet.Unicode)]
|
|
23
|
+
public static extern bool EnumDisplayDevices(string lpDevice, uint iDevNum, ref SIDispHolder.DISPLAY_DEVICE lpDisplayDevice, uint dwFlags);
|
|
24
|
+
}
|
|
25
|
+
"@ -ErrorAction SilentlyContinue };
|
|
26
|
+
$d = New-Object SIDispHolder+DISPLAY_DEVICE;
|
|
27
|
+
for ($i = 0; $i -lt 16; $i++) {
|
|
28
|
+
$d.cb = [System.Runtime.InteropServices.Marshal]::SizeOf($d);
|
|
29
|
+
if (-not [SIDispHolder]::EnumDisplayDevices($null, $i, [ref]$d, 0)) { break };
|
|
30
|
+
"$($d.DeviceName)|$($d.DeviceString)|$($d.DeviceID)"
|
|
31
|
+
}`;
|
|
32
|
+
const parseEnumDisplayDevices = (stdout) => {
|
|
33
|
+
const result = new Map();
|
|
34
|
+
for (const line of String(stdout ?? '').split('\n')) {
|
|
35
|
+
const parts = line.trim().split('|');
|
|
36
|
+
if (parts.length < 3 || !parts[0].startsWith('\\\\.\\')) {
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
result.set(parts[0].toLowerCase(), { gpu: parts[1].trim(), deviceId: parts[2].trim() });
|
|
40
|
+
}
|
|
41
|
+
return result;
|
|
42
|
+
};
|
|
43
|
+
exports.parseEnumDisplayDevices = parseEnumDisplayDevices;
|
|
44
|
+
const WIN_AVAILABILITY = new Map([
|
|
45
|
+
['3', 'on'],
|
|
46
|
+
['7', 'off'],
|
|
47
|
+
['8', 'off'],
|
|
48
|
+
['13', 'standby'],
|
|
49
|
+
['14', 'standby'],
|
|
50
|
+
['15', 'standby'],
|
|
51
|
+
['17', 'standby']
|
|
52
|
+
]);
|
|
53
|
+
const windowsAvailabilityToPowerState = (value) => WIN_AVAILABILITY.get(String(value ?? '').trim()) || '';
|
|
54
|
+
exports.windowsAvailabilityToPowerState = windowsAvailabilityToPowerState;
|
|
55
|
+
const parseLinesWindowsDisplaysPowershell = (ssections, monitors, dsections, connections, isections, currentModes, adapters, locations) => {
|
|
10
56
|
const displays = [];
|
|
11
57
|
const desktopMonitors = (dsections || []).map((section) => {
|
|
12
58
|
const linesDisplay = section.split('\n');
|
|
@@ -15,7 +61,8 @@ const parseLinesWindowsDisplaysPowershell = (ssections, monitors, dsections, con
|
|
|
15
61
|
vendor: (0, common_1.getValue)(linesDisplay, 'MonitorManufacturer', ':'),
|
|
16
62
|
model: (0, common_1.getValue)(linesDisplay, 'Name', ':'),
|
|
17
63
|
resolutionX: (0, common_1.toInt)((0, common_1.getValue)(linesDisplay, 'ScreenWidth', ':')),
|
|
18
|
-
resolutionY: (0, common_1.toInt)((0, common_1.getValue)(linesDisplay, 'ScreenHeight', ':'))
|
|
64
|
+
resolutionY: (0, common_1.toInt)((0, common_1.getValue)(linesDisplay, 'ScreenHeight', ':')),
|
|
65
|
+
powerState: (0, exports.windowsAvailabilityToPowerState)((0, common_1.getValue)(linesDisplay, 'Availability', ':'))
|
|
19
66
|
};
|
|
20
67
|
});
|
|
21
68
|
const count = Math.max(ssections.length, monitors.length);
|
|
@@ -28,11 +75,24 @@ const parseLinesWindowsDisplaysPowershell = (ssections, monitors, dsections, con
|
|
|
28
75
|
const instanceName = monitor ? monitor.instanceName : '';
|
|
29
76
|
const bitsPerPixel = (0, common_1.toInt)((0, common_1.getValue)(linesScreen, 'BitsPerPixel'));
|
|
30
77
|
const bounds = (0, common_1.getValue)(linesScreen, 'Bounds').replace('{', '').replace('}', '').replace(/=/g, ':').split(',');
|
|
78
|
+
const workArea = (0, common_1.getValue)(linesScreen, 'WorkingArea').replace('{', '').replace('}', '').replace(/=/g, ':').split(',');
|
|
31
79
|
const primary = (0, common_1.getValue)(linesScreen, 'Primary');
|
|
32
80
|
const sizeX = monitor ? monitor.sizeX : '';
|
|
33
81
|
const sizeY = monitor ? monitor.sizeY : '';
|
|
34
82
|
const videoOutputTechnology = instanceName && connections[instanceName] !== undefined ? connections[instanceName] : '';
|
|
35
83
|
const deviceName = (0, common_1.getValue)(linesScreen, 'DeviceName');
|
|
84
|
+
const mode = currentModes[deviceName.toLowerCase()];
|
|
85
|
+
const boundsWidth = (0, common_1.toInt)((0, common_1.getValue)(bounds, 'Width', ':'));
|
|
86
|
+
const boundsHeight = (0, common_1.toInt)((0, common_1.getValue)(bounds, 'Height', ':'));
|
|
87
|
+
const boundsX = (0, common_1.toInt)((0, common_1.getValue)(bounds, 'X', ':'));
|
|
88
|
+
const boundsY = (0, common_1.toInt)((0, common_1.getValue)(bounds, 'Y', ':'));
|
|
89
|
+
const resX = mode ? mode.width : boundsWidth;
|
|
90
|
+
const resY = mode ? mode.height : boundsHeight;
|
|
91
|
+
const posX = mode ? mode.positionX : boundsX;
|
|
92
|
+
const posY = mode ? mode.positionY : boundsY;
|
|
93
|
+
const dpiScale = mode && boundsWidth ? mode.width / boundsWidth : 1;
|
|
94
|
+
const workAreaWidth = (0, common_1.getValue)(workArea, 'Width', ':');
|
|
95
|
+
const workAreaHeight = (0, common_1.getValue)(workArea, 'Height', ':');
|
|
36
96
|
const isection = instanceName ? isections.find((element) => element.instanceId.toLowerCase().startsWith(instanceName)) : undefined;
|
|
37
97
|
const dsection = instanceName ? desktopMonitors.find((element) => element.deviceId && instanceName.startsWith(element.deviceId)) : undefined;
|
|
38
98
|
displays.push({
|
|
@@ -44,24 +104,36 @@ const parseLinesWindowsDisplaysPowershell = (ssections, monitors, dsections, con
|
|
|
44
104
|
deviceName,
|
|
45
105
|
displayId: instanceName || null,
|
|
46
106
|
main: hasOwnScreen ? primary.toLowerCase() === 'true' : false,
|
|
107
|
+
mirror: !hasOwnScreen || (monitors.length > ssections.length && i === 0),
|
|
47
108
|
builtin: videoOutputTechnology === '2147483648',
|
|
48
109
|
connection: videoOutputTechnology && mappings_1.graphicsVideoTypes[videoOutputTechnology] ? mappings_1.graphicsVideoTypes[videoOutputTechnology] : '',
|
|
49
|
-
resolutionX:
|
|
50
|
-
resolutionY:
|
|
110
|
+
resolutionX: resX,
|
|
111
|
+
resolutionY: resY,
|
|
51
112
|
sizeX: sizeX ? parseInt(sizeX, 10) : null,
|
|
52
113
|
sizeY: sizeY ? parseInt(sizeY, 10) : null,
|
|
53
114
|
pixelDepth: bitsPerPixel,
|
|
54
|
-
currentResX:
|
|
55
|
-
currentResY:
|
|
56
|
-
positionX:
|
|
57
|
-
positionY:
|
|
58
|
-
|
|
115
|
+
currentResX: resX,
|
|
116
|
+
currentResY: resY,
|
|
117
|
+
positionX: posX,
|
|
118
|
+
positionY: posY,
|
|
119
|
+
workAreaResolutionX: workAreaWidth ? Math.round((0, common_1.toInt)(workAreaWidth) * dpiScale) : null,
|
|
120
|
+
workAreaResolutionY: workAreaHeight ? Math.round((0, common_1.toInt)(workAreaHeight) * dpiScale) : null,
|
|
121
|
+
workAreaPositionX: workAreaWidth ? Math.round(posX + ((0, common_1.toInt)((0, common_1.getValue)(workArea, 'X', ':')) - boundsX) * dpiScale) : null,
|
|
122
|
+
workAreaPositionY: workAreaHeight ? Math.round(posY + ((0, common_1.toInt)((0, common_1.getValue)(workArea, 'Y', ':')) - boundsY) * dpiScale) : null,
|
|
123
|
+
currentRefreshRate: (mode && mode.refreshRate) || null,
|
|
124
|
+
scale: mode && boundsWidth ? Math.round((mode.width / boundsWidth) * 100) / 100 : null,
|
|
125
|
+
powerState: dsection ? dsection.powerState : '',
|
|
126
|
+
gpu: adapters.get(deviceName.toLowerCase())?.gpu || '',
|
|
127
|
+
gpuBusAddress: (0, windows_1.matchPnpLocation)(adapters.get(deviceName.toLowerCase())?.deviceId || '', locations)
|
|
59
128
|
});
|
|
60
129
|
}
|
|
61
130
|
}
|
|
62
131
|
if (ssections.length === 0) {
|
|
63
132
|
const first = desktopMonitors[0];
|
|
64
133
|
displays.push({
|
|
134
|
+
powerState: first ? first.powerState : '',
|
|
135
|
+
gpu: [...adapters.values()][0]?.gpu || '',
|
|
136
|
+
gpuBusAddress: (0, windows_1.matchPnpLocation)([...adapters.values()][0]?.deviceId || '', locations),
|
|
65
137
|
vendor: first ? first.vendor : '',
|
|
66
138
|
vendorId: null,
|
|
67
139
|
model: first ? first.model : '',
|
|
@@ -70,6 +142,7 @@ const parseLinesWindowsDisplaysPowershell = (ssections, monitors, dsections, con
|
|
|
70
142
|
deviceName: '',
|
|
71
143
|
displayId: null,
|
|
72
144
|
main: true,
|
|
145
|
+
mirror: false,
|
|
73
146
|
builtin: true,
|
|
74
147
|
sizeX: null,
|
|
75
148
|
sizeY: null,
|
|
@@ -81,7 +154,12 @@ const parseLinesWindowsDisplaysPowershell = (ssections, monitors, dsections, con
|
|
|
81
154
|
currentResY: first ? first.resolutionY : 0,
|
|
82
155
|
positionX: 0,
|
|
83
156
|
positionY: 0,
|
|
84
|
-
|
|
157
|
+
workAreaResolutionX: null,
|
|
158
|
+
workAreaResolutionY: null,
|
|
159
|
+
workAreaPositionX: null,
|
|
160
|
+
workAreaPositionY: null,
|
|
161
|
+
currentRefreshRate: null,
|
|
162
|
+
scale: null
|
|
85
163
|
});
|
|
86
164
|
}
|
|
87
165
|
return displays;
|
|
@@ -98,6 +176,7 @@ const displays = async () => {
|
|
|
98
176
|
workload.push(windows_1.ps.exec('Get-CimInstance -Namespace root\\wmi -ClassName WmiMonitorConnectionParams | fl'));
|
|
99
177
|
workload.push(windows_1.ps.exec('gwmi WmiMonitorID -Namespace root\\wmi | ForEach-Object {(($_.ManufacturerName -notmatch 0 | foreach {[char]$_}) -join "") + "|" + (($_.ProductCodeID -notmatch 0 | foreach {[char]$_}) -join "") + "|" + (($_.UserFriendlyName -notmatch 0 | foreach {[char]$_}) -join "") + "|" + (($_.SerialNumberID -notmatch 0 | foreach {[char]$_}) -join "") + "|" + $_.YearOfManufacture + "|" + $_.InstanceName}'));
|
|
100
178
|
workload.push(windows_1.ps.exec(psCurrentModes));
|
|
179
|
+
workload.push(windows_1.ps.exec(psDisplayAdapters));
|
|
101
180
|
const data = await Promise.allSettled(workload).then((results) => results.map((result) => (result.status === 'fulfilled' ? result.value : '')));
|
|
102
181
|
let _resolutionX = 0;
|
|
103
182
|
let _resolutionY = 0;
|
|
@@ -177,12 +256,18 @@ const displays = async () => {
|
|
|
177
256
|
.split(/\n/)
|
|
178
257
|
.forEach((element) => {
|
|
179
258
|
const parts = element.split('|');
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
currentModes[parts[0].trim().toLowerCase()] =
|
|
259
|
+
if (parts.length === 7 && parts[0].trim() && (0, common_1.toInt)(parts[3])) {
|
|
260
|
+
const frequency = (0, common_1.toInt)(parts[1]);
|
|
261
|
+
currentModes[parts[0].trim().toLowerCase()] = {
|
|
262
|
+
refreshRate: frequency > 1 ? frequency : 0,
|
|
263
|
+
width: (0, common_1.toInt)(parts[3]),
|
|
264
|
+
height: (0, common_1.toInt)(parts[4]),
|
|
265
|
+
positionX: (0, common_1.toInt)(parts[5]),
|
|
266
|
+
positionY: (0, common_1.toInt)(parts[6])
|
|
267
|
+
};
|
|
183
268
|
}
|
|
184
269
|
});
|
|
185
|
-
result = parseLinesWindowsDisplaysPowershell(ssections, monitors, dsections, connections, isections, currentModes);
|
|
270
|
+
result = parseLinesWindowsDisplaysPowershell(ssections, monitors, dsections, connections, isections, currentModes, (0, exports.parseEnumDisplayDevices)(data[7]), await (0, windows_1.windowsPciBusAddresses)());
|
|
186
271
|
if (result.length === 1) {
|
|
187
272
|
if (_resolutionX) {
|
|
188
273
|
result[0].resolutionX = _resolutionX;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fans = void 0;
|
|
4
|
+
const common_1 = require("../common");
|
|
5
|
+
const windows_1 = require("../common/windows");
|
|
6
|
+
const HARDWARE_MONITORS = [
|
|
7
|
+
{ namespace: 'root\\LibreHardwareMonitor', source: 'LibreHardwareMonitor' },
|
|
8
|
+
{ namespace: 'root\\OpenHardwareMonitor', source: 'OpenHardwareMonitor' }
|
|
9
|
+
];
|
|
10
|
+
const toNumber = (value) => {
|
|
11
|
+
const result = Number.parseFloat(value);
|
|
12
|
+
return Number.isNaN(result) ? null : result;
|
|
13
|
+
};
|
|
14
|
+
const win32Fans = async () => {
|
|
15
|
+
const fans = [];
|
|
16
|
+
try {
|
|
17
|
+
const entries = (0, windows_1.psArray)(await windows_1.ps.exec('Get-CimInstance Win32_Fan | Select-Object DeviceID,Name,DesiredSpeed | ConvertTo-Json -compress'));
|
|
18
|
+
entries.forEach((entry, index) => {
|
|
19
|
+
const rpm = toNumber(entry?.DesiredSpeed);
|
|
20
|
+
fans.push({
|
|
21
|
+
id: entry?.DeviceID || `fan${index}`,
|
|
22
|
+
label: entry?.Name || null,
|
|
23
|
+
rpm: rpm && rpm > 0 ? rpm : null,
|
|
24
|
+
pwm: null,
|
|
25
|
+
source: 'Win32_Fan'
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
catch { }
|
|
30
|
+
return fans;
|
|
31
|
+
};
|
|
32
|
+
const monitorFans = async (namespace, source) => {
|
|
33
|
+
const fans = [];
|
|
34
|
+
try {
|
|
35
|
+
const entries = (0, windows_1.psArray)(await windows_1.ps.exec(`Get-CimInstance -Namespace "${namespace}" -ClassName Sensor | Where-Object { $_.SensorType -eq 'Fan' -or $_.SensorType -eq 'Control' } | Select-Object Identifier,Name,SensorType,Value | ConvertTo-Json -compress`));
|
|
36
|
+
const controls = {};
|
|
37
|
+
entries.forEach((entry) => {
|
|
38
|
+
const value = toNumber(entry?.Value);
|
|
39
|
+
if (entry?.SensorType === 'Control' && entry?.Identifier && value !== null) {
|
|
40
|
+
controls[String(entry.Identifier).replace('/control/', '/fan/')] = Math.round(value);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
entries.forEach((entry, index) => {
|
|
44
|
+
if (entry?.SensorType !== 'Fan') {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const identifier = entry?.Identifier ? String(entry.Identifier) : `fan${index}`;
|
|
48
|
+
const pwm = controls[identifier];
|
|
49
|
+
fans.push({
|
|
50
|
+
id: identifier,
|
|
51
|
+
label: entry?.Name || null,
|
|
52
|
+
rpm: toNumber(entry?.Value),
|
|
53
|
+
pwm: pwm === undefined ? null : pwm,
|
|
54
|
+
source
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
catch { }
|
|
59
|
+
return fans;
|
|
60
|
+
};
|
|
61
|
+
const fans = async () => {
|
|
62
|
+
await (0, common_1.nextTick)();
|
|
63
|
+
for (const monitor of HARDWARE_MONITORS) {
|
|
64
|
+
const result = await monitorFans(monitor.namespace, monitor.source);
|
|
65
|
+
if (result.length) {
|
|
66
|
+
return result;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return win32Fans();
|
|
70
|
+
};
|
|
71
|
+
exports.fans = fans;
|
package/dist/windows/fs-size.js
CHANGED
|
@@ -33,10 +33,7 @@ const fsSize = async (drives) => {
|
|
|
33
33
|
await (0, common_1.nextTick)();
|
|
34
34
|
let data = [];
|
|
35
35
|
try {
|
|
36
|
-
const conditions = drives
|
|
37
|
-
.map((drive) => (drive ? (0, security_1.sanitizeShellString)(drive, true) : ''))
|
|
38
|
-
.filter((drive) => drive !== '')
|
|
39
|
-
.map((drive) => `$_.Caption -eq '${drive}'`);
|
|
36
|
+
const conditions = drives.filter((drive) => !!drive).map((drive) => `$_.Caption -eq '${(0, security_1.sanitizeDriveLetter)(drive)}'`);
|
|
40
37
|
const filter = conditions.length ? ` | where { ${conditions.join(' -or ')} }` : '';
|
|
41
38
|
const stdout = await windows_1.ps.exec(`Get-CimInstance Win32_logicaldisk | select Access,Caption,FileSystem,FreeSpace,Size${filter} | fl`);
|
|
42
39
|
data = parseFsSize(String(stdout));
|
package/dist/windows/gpu.js
CHANGED
|
@@ -5,7 +5,7 @@ const common_1 = require("../common");
|
|
|
5
5
|
const nvidia_1 = require("../common/nvidia");
|
|
6
6
|
const exec_1 = require("../common/exec");
|
|
7
7
|
const windows_1 = require("../common/windows");
|
|
8
|
-
const parseLinesWindowsControllers = (sections, vections) => {
|
|
8
|
+
const parseLinesWindowsControllers = (sections, vections, locations) => {
|
|
9
9
|
const memorySizes = {};
|
|
10
10
|
for (const i in vections) {
|
|
11
11
|
if (Object.prototype.hasOwnProperty.call(vections, i)) {
|
|
@@ -70,6 +70,7 @@ const parseLinesWindowsControllers = (sections, vections) => {
|
|
|
70
70
|
vendor: (0, common_1.getValue)(lines, 'AdapterCompatibility', ':'),
|
|
71
71
|
model: (0, common_1.getValue)(lines, 'name', ':'),
|
|
72
72
|
bus: (0, common_1.getValue)(lines, 'PNPDeviceID', ':').startsWith('PCI') ? 'PCI' : '',
|
|
73
|
+
busAddress: (0, windows_1.matchPnpLocation)((0, common_1.getValue)(lines, 'PNPDeviceID', ':'), locations),
|
|
73
74
|
vram: (memorySize == null ? (0, common_1.toInt)((0, common_1.getValue)(lines, 'AdapterRAM', ':')) : memorySize) / 1024 / 1024,
|
|
74
75
|
vramDynamic: (0, common_1.getValue)(lines, 'VideoMemoryType', ':') === '2',
|
|
75
76
|
subDeviceId
|
|
@@ -96,7 +97,7 @@ const gpu = async () => {
|
|
|
96
97
|
.toString()
|
|
97
98
|
.replace(/\r/g, '')
|
|
98
99
|
.split(/\n\s*\n/);
|
|
99
|
-
result = parseLinesWindowsControllers(csections, vsections);
|
|
100
|
+
result = parseLinesWindowsControllers(csections, vsections, await (0, windows_1.windowsPciBusAddresses)());
|
|
100
101
|
result = result.map((controller) => {
|
|
101
102
|
if (controller.vendor.toLowerCase() === 'nvidia') {
|
|
102
103
|
return (0, nvidia_1.mergeControllerNvidia)(controller, nvidiaData.find((device) => {
|
package/dist/windows/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export { cpu } from './cpu';
|
|
|
19
19
|
export { cpuCache } from './cpu-cache';
|
|
20
20
|
export { cpuFlags } from './cpu-flags';
|
|
21
21
|
export { cpuTemperature } from './cpu-temperature';
|
|
22
|
+
export { fans } from './fans';
|
|
22
23
|
export { diskLayout } from './disk-layout';
|
|
23
24
|
export { disksIO } from './disks-io';
|
|
24
25
|
export { displays } from './displays';
|
|
@@ -42,12 +43,14 @@ export { osInfo } from './os-info';
|
|
|
42
43
|
export { pci } from './pci';
|
|
43
44
|
export { printer } from './printer';
|
|
44
45
|
export { processLoad } from './process-load';
|
|
46
|
+
export { processFocused } from './process-focused';
|
|
45
47
|
export { processes } from './processes';
|
|
46
48
|
export { services } from './services';
|
|
47
49
|
export { shell } from './shell';
|
|
48
50
|
export { software } from './software';
|
|
49
51
|
export { system } from './system';
|
|
50
52
|
export { thunderbolt } from './thunderbolt';
|
|
53
|
+
export { serialPorts } from './serial-ports';
|
|
51
54
|
export { usb } from './usb';
|
|
52
55
|
export { users } from './users';
|
|
53
56
|
export { uuid } from './uuid';
|
package/dist/windows/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.wifiNetworks = exports.wifiInterfaces = exports.wifiConnections = exports.uuid = exports.users = exports.usb = exports.thunderbolt = exports.system = exports.software = exports.shell = exports.services = exports.processes = void 0;
|
|
3
|
+
exports.printer = exports.pci = exports.osInfo = exports.npu = exports.npm = exports.networkStats = exports.networkInterfaces = exports.networkInterfaceDefault = exports.networkGatewayDefault = exports.networkConnections = exports.mouse = exports.memLayout = exports.mem = exports.keyboard = exports.inetLatency = exports.gpu = exports.fsStats = exports.fsSize = exports.fsOpenFiles = exports.displays = exports.disksIO = exports.diskLayout = exports.fans = exports.cpuTemperature = exports.cpuFlags = exports.cpuCache = exports.cpu = exports.chassis = exports.camera = exports.bluetoothDevices = exports.blockDevices = exports.bios = exports.battery = exports.baseboard = exports.audio = exports.vboxInfo = exports.versions = exports.version = exports.time = exports.inetChecksite = exports.dockerVolumes = exports.dockerInfo = exports.dockerImages = exports.dockerContainerStats = exports.dockerContainers = exports.dockerContainerProcesses = exports.dockerAll = exports.fullLoad = exports.cpuCurrentSpeed = exports.currentLoad = void 0;
|
|
4
|
+
exports.wifiNetworks = exports.wifiInterfaces = exports.wifiConnections = exports.uuid = exports.users = exports.usb = exports.serialPorts = exports.thunderbolt = exports.system = exports.software = exports.shell = exports.services = exports.processes = exports.processFocused = exports.processLoad = void 0;
|
|
5
5
|
var cpu_current_load_1 = require("../cpu-current-load");
|
|
6
6
|
Object.defineProperty(exports, "currentLoad", { enumerable: true, get: function () { return cpu_current_load_1.currentLoad; } });
|
|
7
7
|
var cpu_current_speed_1 = require("../cpu-current-speed");
|
|
@@ -50,6 +50,8 @@ var cpu_flags_1 = require("./cpu-flags");
|
|
|
50
50
|
Object.defineProperty(exports, "cpuFlags", { enumerable: true, get: function () { return cpu_flags_1.cpuFlags; } });
|
|
51
51
|
var cpu_temperature_1 = require("./cpu-temperature");
|
|
52
52
|
Object.defineProperty(exports, "cpuTemperature", { enumerable: true, get: function () { return cpu_temperature_1.cpuTemperature; } });
|
|
53
|
+
var fans_1 = require("./fans");
|
|
54
|
+
Object.defineProperty(exports, "fans", { enumerable: true, get: function () { return fans_1.fans; } });
|
|
53
55
|
var disk_layout_1 = require("./disk-layout");
|
|
54
56
|
Object.defineProperty(exports, "diskLayout", { enumerable: true, get: function () { return disk_layout_1.diskLayout; } });
|
|
55
57
|
var disks_io_1 = require("./disks-io");
|
|
@@ -96,6 +98,8 @@ var printer_1 = require("./printer");
|
|
|
96
98
|
Object.defineProperty(exports, "printer", { enumerable: true, get: function () { return printer_1.printer; } });
|
|
97
99
|
var process_load_1 = require("./process-load");
|
|
98
100
|
Object.defineProperty(exports, "processLoad", { enumerable: true, get: function () { return process_load_1.processLoad; } });
|
|
101
|
+
var process_focused_1 = require("./process-focused");
|
|
102
|
+
Object.defineProperty(exports, "processFocused", { enumerable: true, get: function () { return process_focused_1.processFocused; } });
|
|
99
103
|
var processes_1 = require("./processes");
|
|
100
104
|
Object.defineProperty(exports, "processes", { enumerable: true, get: function () { return processes_1.processes; } });
|
|
101
105
|
var services_1 = require("./services");
|
|
@@ -108,6 +112,8 @@ var system_1 = require("./system");
|
|
|
108
112
|
Object.defineProperty(exports, "system", { enumerable: true, get: function () { return system_1.system; } });
|
|
109
113
|
var thunderbolt_1 = require("./thunderbolt");
|
|
110
114
|
Object.defineProperty(exports, "thunderbolt", { enumerable: true, get: function () { return thunderbolt_1.thunderbolt; } });
|
|
115
|
+
var serial_ports_1 = require("./serial-ports");
|
|
116
|
+
Object.defineProperty(exports, "serialPorts", { enumerable: true, get: function () { return serial_ports_1.serialPorts; } });
|
|
111
117
|
var usb_1 = require("./usb");
|
|
112
118
|
Object.defineProperty(exports, "usb", { enumerable: true, get: function () { return usb_1.usb; } });
|
|
113
119
|
var users_1 = require("./users");
|