systeminformation 5.33.5 → 6.0.0-beta.1
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 +873 -958
- package/dist/audio.d.ts +1 -0
- package/dist/audio.js +18 -0
- package/dist/baseboard.d.ts +1 -0
- package/dist/baseboard.js +17 -0
- package/dist/battery.d.ts +1 -0
- package/dist/battery.js +19 -0
- package/dist/bios.d.ts +1 -0
- package/dist/bios.js +17 -0
- package/dist/block-devices.d.ts +1 -0
- package/dist/block-devices.js +17 -0
- package/dist/bluetooth.d.ts +1 -0
- package/dist/bluetooth.js +17 -0
- package/dist/bsd/battery.d.ts +2 -0
- package/dist/bsd/battery.js +27 -0
- package/dist/bsd/cpu-cache.d.ts +1 -0
- package/dist/bsd/cpu-cache.js +37 -0
- package/dist/bsd/cpu-flags.d.ts +1 -0
- package/dist/bsd/cpu-flags.js +28 -0
- package/dist/bsd/cpu-temperature.d.ts +1 -0
- package/dist/bsd/cpu-temperature.js +29 -0
- package/dist/bsd/cpu.d.ts +1 -0
- package/dist/bsd/cpu.js +98 -0
- package/dist/bsd/index.d.ts +38 -0
- package/dist/bsd/index.js +85 -0
- package/dist/bsd/mem.d.ts +1 -0
- package/dist/bsd/mem.js +37 -0
- package/dist/bsd/network-stats.d.ts +2 -0
- package/dist/bsd/network-stats.js +92 -0
- package/dist/bsd/os-info.d.ts +24 -0
- package/dist/bsd/os-info.js +47 -0
- package/dist/bsd/uuid.d.ts +2 -0
- package/dist/bsd/uuid.js +30 -0
- package/dist/camera.d.ts +1 -0
- package/dist/camera.js +17 -0
- package/dist/chassis.d.ts +1 -0
- package/dist/chassis.js +17 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +107 -0
- package/dist/common/acceleration.d.ts +8 -0
- package/dist/common/acceleration.js +86 -0
- package/dist/common/codepage.d.ts +1 -0
- package/dist/common/codepage.js +43 -0
- package/dist/common/const.d.ts +25 -0
- package/dist/common/const.js +26 -0
- package/dist/common/cpu.d.ts +2 -0
- package/dist/common/cpu.js +12 -0
- package/dist/common/darwin.d.ts +6 -0
- package/dist/common/darwin.js +266 -0
- package/dist/common/datetime.d.ts +9 -0
- package/dist/common/datetime.js +161 -0
- package/dist/common/defaults.d.ts +25 -0
- package/dist/common/defaults.js +304 -0
- package/dist/common/exec.d.ts +10 -0
- package/dist/common/exec.js +69 -0
- package/dist/common/files.d.ts +2 -0
- package/dist/common/files.js +39 -0
- package/dist/common/filesys.d.ts +11 -0
- package/dist/common/filesys.js +282 -0
- package/dist/common/host.d.ts +2 -0
- package/dist/common/host.js +67 -0
- package/dist/common/index.d.ts +12 -0
- package/dist/common/index.js +146 -0
- package/dist/common/internet.d.ts +6 -0
- package/dist/common/internet.js +92 -0
- package/dist/common/mappings.d.ts +55 -0
- package/dist/common/mappings.js +4133 -0
- package/dist/common/network.d.ts +8 -0
- package/dist/common/network.js +162 -0
- package/dist/common/nvidia.d.ts +22 -0
- package/dist/common/nvidia.js +159 -0
- package/dist/common/parse.d.ts +13 -0
- package/dist/common/parse.js +157 -0
- package/dist/common/raspberry.d.ts +5 -0
- package/dist/common/raspberry.js +277 -0
- package/dist/common/security.d.ts +31 -0
- package/dist/common/security.js +241 -0
- package/dist/common/types.d.ts +1024 -0
- package/dist/common/types.js +2 -0
- package/dist/common/windows.d.ts +58 -0
- package/dist/common/windows.js +292 -0
- package/dist/cpu-cache.d.ts +1 -0
- package/dist/cpu-cache.js +19 -0
- package/dist/cpu-current-load.d.ts +2 -0
- package/dist/cpu-current-load.js +249 -0
- package/dist/cpu-current-speed.d.ts +3 -0
- package/dist/cpu-current-speed.js +84 -0
- package/dist/cpu-flags.d.ts +1 -0
- package/dist/cpu-flags.js +19 -0
- package/dist/cpu-full-load.d.ts +1 -0
- package/dist/cpu-full-load.js +30 -0
- package/dist/cpu-temperature.d.ts +1 -0
- package/dist/cpu-temperature.js +19 -0
- package/dist/cpu.d.ts +1 -0
- package/dist/cpu.js +19 -0
- package/dist/darwin/audio.d.ts +2 -0
- package/dist/darwin/audio.js +46 -0
- package/dist/darwin/baseboard.d.ts +1 -0
- package/dist/darwin/baseboard.js +48 -0
- package/dist/darwin/battery.d.ts +2 -0
- package/dist/darwin/battery.js +65 -0
- package/dist/darwin/bios.d.ts +1 -0
- package/dist/darwin/bios.js +45 -0
- package/dist/darwin/block-devices.d.ts +2 -0
- package/dist/darwin/block-devices.js +101 -0
- package/dist/darwin/bluetooth.d.ts +3 -0
- package/dist/darwin/bluetooth.js +84 -0
- package/dist/darwin/camera.d.ts +2 -0
- package/dist/darwin/camera.js +55 -0
- package/dist/darwin/chassis.d.ts +2 -0
- package/dist/darwin/chassis.js +32 -0
- package/dist/darwin/cpu-cache.d.ts +2 -0
- package/dist/darwin/cpu-cache.js +29 -0
- package/dist/darwin/cpu-flags.d.ts +1 -0
- package/dist/darwin/cpu-flags.js +16 -0
- package/dist/darwin/cpu-temperature.d.ts +1 -0
- package/dist/darwin/cpu-temperature.js +44 -0
- package/dist/darwin/cpu.d.ts +1 -0
- package/dist/darwin/cpu.js +69 -0
- package/dist/darwin/disk-layout.d.ts +2 -0
- package/dist/darwin/disk-layout.js +231 -0
- package/dist/darwin/disks-io.d.ts +2 -0
- package/dist/darwin/disks-io.js +56 -0
- package/dist/darwin/displays.d.ts +2 -0
- package/dist/darwin/displays.js +98 -0
- package/dist/darwin/fs-open-files.d.ts +2 -0
- package/dist/darwin/fs-open-files.js +27 -0
- package/dist/darwin/fs-stats.d.ts +2 -0
- package/dist/darwin/fs-stats.js +47 -0
- package/dist/darwin/gpu.d.ts +2 -0
- package/dist/darwin/gpu.js +55 -0
- package/dist/darwin/index.d.ts +56 -0
- package/dist/darwin/index.js +122 -0
- package/dist/darwin/keyboard.d.ts +2 -0
- package/dist/darwin/keyboard.js +73 -0
- package/dist/darwin/mem-layout.d.ts +2 -0
- package/dist/darwin/mem-layout.js +60 -0
- package/dist/darwin/mem.d.ts +2 -0
- package/dist/darwin/mem.js +50 -0
- package/dist/darwin/mouse.d.ts +2 -0
- package/dist/darwin/mouse.js +78 -0
- package/dist/darwin/network-connections.d.ts +2 -0
- package/dist/darwin/network-connections.js +98 -0
- package/dist/darwin/network-gateway-default.d.ts +1 -0
- package/dist/darwin/network-gateway-default.js +26 -0
- package/dist/darwin/network-interface-default.d.ts +2 -0
- package/dist/darwin/network-interface-default.js +41 -0
- package/dist/darwin/network-interfaces.d.ts +2 -0
- package/dist/darwin/network-interfaces.js +205 -0
- package/dist/darwin/network-stats.d.ts +2 -0
- package/dist/darwin/network-stats.js +86 -0
- package/dist/darwin/npm.d.ts +1 -0
- package/dist/darwin/npm.js +5 -0
- package/dist/darwin/npu.d.ts +2 -0
- package/dist/darwin/npu.js +41 -0
- package/dist/darwin/os-info.d.ts +2 -0
- package/dist/darwin/os-info.js +140 -0
- package/dist/darwin/pci.d.ts +2 -0
- package/dist/darwin/pci.js +37 -0
- package/dist/darwin/printer.d.ts +2 -0
- package/dist/darwin/printer.js +45 -0
- package/dist/darwin/software.d.ts +2 -0
- package/dist/darwin/software.js +39 -0
- package/dist/darwin/system.d.ts +1 -0
- package/dist/darwin/system.js +29 -0
- package/dist/darwin/thunderbolt.d.ts +1 -0
- package/dist/darwin/thunderbolt.js +53 -0
- package/dist/darwin/usb.d.ts +3 -0
- package/dist/darwin/usb.js +69 -0
- package/dist/darwin/users.d.ts +2 -0
- package/dist/darwin/users.js +13 -0
- package/dist/darwin/uuid.d.ts +2 -0
- package/dist/darwin/uuid.js +39 -0
- package/dist/darwin/wifi-connections.d.ts +2 -0
- package/dist/darwin/wifi-connections.js +60 -0
- package/dist/darwin/wifi-interfaces.d.ts +2 -0
- package/dist/darwin/wifi-interfaces.js +27 -0
- package/dist/darwin/wifi-networks.d.ts +2 -0
- package/dist/darwin/wifi-networks.js +61 -0
- package/dist/disk-layout.d.ts +1 -0
- package/dist/disk-layout.js +17 -0
- package/dist/disks-io.d.ts +1 -0
- package/dist/disks-io.js +17 -0
- package/dist/displays.d.ts +1 -0
- package/dist/displays.js +17 -0
- package/dist/docker-socket.d.ts +11 -0
- package/dist/docker-socket.js +113 -0
- package/dist/docker.d.ts +102 -0
- package/dist/docker.js +532 -0
- package/dist/fs-open-files.d.ts +1 -0
- package/dist/fs-open-files.js +17 -0
- package/dist/fs-size.d.ts +1 -0
- package/dist/fs-size.js +23 -0
- package/dist/fs-stats.d.ts +1 -0
- package/dist/fs-stats.js +17 -0
- package/dist/get-data.d.ts +110 -0
- package/dist/get-data.js +151 -0
- package/dist/get.d.ts +5 -0
- package/dist/get.js +117 -0
- package/dist/gpu.d.ts +1 -0
- package/dist/gpu.js +17 -0
- package/dist/index.d.ts +60 -0
- package/dist/index.js +132 -0
- package/dist/inet-checksite.d.ts +1 -0
- package/dist/inet-checksite.js +11 -0
- package/dist/inet-latency.d.ts +1 -0
- package/dist/inet-latency.js +17 -0
- package/dist/inet-public-ip.d.ts +2 -0
- package/dist/inet-public-ip.js +10 -0
- package/dist/keyboard.d.ts +1 -0
- package/dist/keyboard.js +17 -0
- package/dist/linux/audio.d.ts +2 -0
- package/dist/linux/audio.js +67 -0
- package/dist/linux/baseboard.d.ts +1 -0
- package/dist/linux/baseboard.js +81 -0
- package/dist/linux/battery.d.ts +2 -0
- package/dist/linux/battery.js +88 -0
- package/dist/linux/bios.d.ts +2 -0
- package/dist/linux/bios.js +55 -0
- package/dist/linux/block-devices.d.ts +2 -0
- package/dist/linux/block-devices.js +30 -0
- package/dist/linux/bluetooth.d.ts +2 -0
- package/dist/linux/bluetooth.js +86 -0
- package/dist/linux/camera.d.ts +2 -0
- package/dist/linux/camera.js +63 -0
- package/dist/linux/chassis.d.ts +1 -0
- package/dist/linux/chassis.js +41 -0
- package/dist/linux/cpu-cache.d.ts +1 -0
- package/dist/linux/cpu-cache.js +35 -0
- package/dist/linux/cpu-flags.d.ts +1 -0
- package/dist/linux/cpu-flags.js +33 -0
- package/dist/linux/cpu-temperature.d.ts +1 -0
- package/dist/linux/cpu-temperature.js +179 -0
- package/dist/linux/cpu.d.ts +1 -0
- package/dist/linux/cpu.js +135 -0
- package/dist/linux/disk-layout.d.ts +2 -0
- package/dist/linux/disk-layout.js +151 -0
- package/dist/linux/disks-io.d.ts +2 -0
- package/dist/linux/disks-io.js +58 -0
- package/dist/linux/displays.d.ts +2 -0
- package/dist/linux/displays.js +193 -0
- package/dist/linux/fs-open-files.d.ts +2 -0
- package/dist/linux/fs-open-files.js +44 -0
- package/dist/linux/fs-size.d.ts +2 -0
- package/dist/linux/fs-size.js +157 -0
- package/dist/linux/fs-stats.d.ts +2 -0
- package/dist/linux/fs-stats.js +65 -0
- package/dist/linux/gpu.d.ts +15 -0
- package/dist/linux/gpu.js +383 -0
- package/dist/linux/index.d.ts +56 -0
- package/dist/linux/index.js +122 -0
- package/dist/linux/inet-latency.d.ts +1 -0
- package/dist/linux/inet-latency.js +39 -0
- package/dist/linux/keyboard.d.ts +2 -0
- package/dist/linux/keyboard.js +61 -0
- package/dist/linux/mem-layout.d.ts +2 -0
- package/dist/linux/mem-layout.js +112 -0
- package/dist/linux/mem.d.ts +2 -0
- package/dist/linux/mem.js +61 -0
- package/dist/linux/mouse.d.ts +2 -0
- package/dist/linux/mouse.js +73 -0
- package/dist/linux/network-connections.d.ts +2 -0
- package/dist/linux/network-connections.js +114 -0
- package/dist/linux/network-gateway-default.d.ts +1 -0
- package/dist/linux/network-gateway-default.js +22 -0
- package/dist/linux/network-interface-default.d.ts +2 -0
- package/dist/linux/network-interface-default.js +46 -0
- package/dist/linux/network-interfaces.d.ts +3 -0
- package/dist/linux/network-interfaces.js +353 -0
- package/dist/linux/network-stats.d.ts +2 -0
- package/dist/linux/network-stats.js +99 -0
- package/dist/linux/npm.d.ts +1 -0
- package/dist/linux/npm.js +5 -0
- package/dist/linux/npu.d.ts +2 -0
- package/dist/linux/npu.js +77 -0
- package/dist/linux/os-info.d.ts +1 -0
- package/dist/linux/os-info.js +114 -0
- package/dist/linux/pci.d.ts +2 -0
- package/dist/linux/pci.js +56 -0
- package/dist/linux/printer.d.ts +2 -0
- package/dist/linux/printer.js +80 -0
- package/dist/linux/process-load.d.ts +2 -0
- package/dist/linux/process-load.js +164 -0
- package/dist/linux/processes.d.ts +2 -0
- package/dist/linux/processes.js +358 -0
- package/dist/linux/services.d.ts +2 -0
- package/dist/linux/services.js +222 -0
- package/dist/linux/software.d.ts +2 -0
- package/dist/linux/software.js +110 -0
- package/dist/linux/system.d.ts +1 -0
- package/dist/linux/system.js +186 -0
- package/dist/linux/thunderbolt.d.ts +2 -0
- package/dist/linux/thunderbolt.js +51 -0
- package/dist/linux/time.d.ts +6 -0
- package/dist/linux/time.js +28 -0
- package/dist/linux/usb.d.ts +2 -0
- package/dist/linux/usb.js +62 -0
- package/dist/linux/users.d.ts +2 -0
- package/dist/linux/users.js +102 -0
- package/dist/linux/uuid.d.ts +2 -0
- package/dist/linux/uuid.js +44 -0
- package/dist/linux/wifi-connections.d.ts +2 -0
- package/dist/linux/wifi-connections.js +196 -0
- package/dist/linux/wifi-interfaces.d.ts +2 -0
- package/dist/linux/wifi-interfaces.js +96 -0
- package/dist/linux/wifi-networks.d.ts +2 -0
- package/dist/linux/wifi-networks.js +176 -0
- package/dist/mem-layout.d.ts +1 -0
- package/dist/mem-layout.js +17 -0
- package/dist/mem.d.ts +1 -0
- package/dist/mem.js +19 -0
- package/dist/mouse.d.ts +1 -0
- package/dist/mouse.js +17 -0
- package/dist/network-connections.d.ts +1 -0
- package/dist/network-connections.js +17 -0
- package/dist/network-gateway-default.d.ts +1 -0
- package/dist/network-gateway-default.js +17 -0
- package/dist/network-interface-default.d.ts +1 -0
- package/dist/network-interface-default.js +17 -0
- package/dist/network-interfaces.d.ts +1 -0
- package/dist/network-interfaces.js +18 -0
- package/dist/network-stats.d.ts +1 -0
- package/dist/network-stats.js +19 -0
- package/dist/npm.d.ts +2 -0
- package/dist/npm.js +22 -0
- package/dist/npu.d.ts +1 -0
- package/dist/npu.js +17 -0
- package/dist/observe.d.ts +5 -0
- package/dist/observe.js +16 -0
- package/dist/os-info.d.ts +1 -0
- package/dist/os-info.js +21 -0
- package/dist/pci.d.ts +1 -0
- package/dist/pci.js +17 -0
- package/dist/printer.d.ts +1 -0
- package/dist/printer.js +17 -0
- package/dist/process-load.d.ts +1 -0
- package/dist/process-load.js +15 -0
- package/dist/processes.d.ts +1 -0
- package/dist/processes.js +15 -0
- package/dist/services.d.ts +1 -0
- package/dist/services.js +15 -0
- package/dist/shell.d.ts +1 -0
- package/dist/shell.js +16 -0
- package/dist/software.d.ts +1 -0
- package/dist/software.js +17 -0
- package/dist/sun/index.d.ts +17 -0
- package/dist/sun/index.js +43 -0
- package/dist/sun/inet-latency.d.ts +1 -0
- package/dist/sun/inet-latency.js +30 -0
- package/dist/sun/os-info.d.ts +1 -0
- package/dist/sun/os-info.js +26 -0
- package/dist/sun/users.d.ts +2 -0
- package/dist/sun/users.js +13 -0
- package/dist/system.d.ts +1 -0
- package/dist/system.js +17 -0
- package/dist/thunderbolt.d.ts +1 -0
- package/dist/thunderbolt.js +17 -0
- package/dist/time.d.ts +6 -0
- package/dist/time.js +28 -0
- package/dist/usb.d.ts +1 -0
- package/dist/usb.js +17 -0
- package/dist/users.d.ts +1 -0
- package/dist/users.js +21 -0
- package/dist/uuid.d.ts +1 -0
- package/dist/uuid.js +19 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +16 -0
- package/dist/versions.d.ts +2 -0
- package/dist/versions.js +1150 -0
- package/dist/virtualbox.d.ts +2 -0
- package/dist/virtualbox.js +89 -0
- package/dist/wifi-connections.d.ts +1 -0
- package/dist/wifi-connections.js +17 -0
- package/dist/wifi-interfaces.d.ts +1 -0
- package/dist/wifi-interfaces.js +17 -0
- package/dist/wifi-networks.d.ts +1 -0
- package/dist/wifi-networks.js +17 -0
- package/dist/windows/audio.d.ts +2 -0
- package/dist/windows/audio.js +23 -0
- package/dist/windows/baseboard.d.ts +1 -0
- package/dist/windows/baseboard.js +35 -0
- package/dist/windows/battery.d.ts +1 -0
- package/dist/windows/battery.js +81 -0
- package/dist/windows/bios.d.ts +1 -0
- package/dist/windows/bios.js +37 -0
- package/dist/windows/block-devices.d.ts +3 -0
- package/dist/windows/block-devices.js +58 -0
- package/dist/windows/bluetooth.d.ts +2 -0
- package/dist/windows/bluetooth.js +31 -0
- package/dist/windows/camera.d.ts +2 -0
- package/dist/windows/camera.js +47 -0
- package/dist/windows/chassis.d.ts +1 -0
- package/dist/windows/chassis.js +29 -0
- package/dist/windows/cpu-cache.d.ts +2 -0
- package/dist/windows/cpu-cache.js +59 -0
- package/dist/windows/cpu-flags.d.ts +1 -0
- package/dist/windows/cpu-flags.js +61 -0
- package/dist/windows/cpu-temperature.d.ts +1 -0
- package/dist/windows/cpu-temperature.js +32 -0
- package/dist/windows/cpu.d.ts +1 -0
- package/dist/windows/cpu.js +96 -0
- package/dist/windows/disk-layout.d.ts +2 -0
- package/dist/windows/disk-layout.js +129 -0
- package/dist/windows/disks-io.d.ts +2 -0
- package/dist/windows/disks-io.js +46 -0
- package/dist/windows/displays.d.ts +2 -0
- package/dist/windows/displays.js +213 -0
- package/dist/windows/fs-open-files.d.ts +2 -0
- package/dist/windows/fs-open-files.js +22 -0
- package/dist/windows/fs-size.d.ts +2 -0
- package/dist/windows/fs-size.js +47 -0
- package/dist/windows/fs-stats.d.ts +2 -0
- package/dist/windows/fs-stats.js +37 -0
- package/dist/windows/gpu.d.ts +2 -0
- package/dist/windows/gpu.js +128 -0
- package/dist/windows/index.d.ts +56 -0
- package/dist/windows/index.js +122 -0
- package/dist/windows/inet-latency.d.ts +1 -0
- package/dist/windows/inet-latency.js +34 -0
- package/dist/windows/keyboard.d.ts +2 -0
- package/dist/windows/keyboard.js +47 -0
- package/dist/windows/mem-layout.d.ts +2 -0
- package/dist/windows/mem-layout.js +39 -0
- package/dist/windows/mem.d.ts +2 -0
- package/dist/windows/mem.js +33 -0
- package/dist/windows/mouse.d.ts +2 -0
- package/dist/windows/mouse.js +64 -0
- package/dist/windows/network-connections.d.ts +2 -0
- package/dist/windows/network-connections.js +93 -0
- package/dist/windows/network-gateway-default.d.ts +1 -0
- package/dist/windows/network-gateway-default.js +36 -0
- package/dist/windows/network-interface-default.d.ts +2 -0
- package/dist/windows/network-interface-default.js +56 -0
- package/dist/windows/network-interfaces.d.ts +2 -0
- package/dist/windows/network-interfaces.js +346 -0
- package/dist/windows/network-stats.d.ts +2 -0
- package/dist/windows/network-stats.js +135 -0
- package/dist/windows/npm.d.ts +1 -0
- package/dist/windows/npm.js +5 -0
- package/dist/windows/npu.d.ts +2 -0
- package/dist/windows/npu.js +29 -0
- package/dist/windows/os-info.d.ts +1 -0
- package/dist/windows/os-info.js +70 -0
- package/dist/windows/pci.d.ts +2 -0
- package/dist/windows/pci.js +33 -0
- package/dist/windows/printer.d.ts +2 -0
- package/dist/windows/printer.js +36 -0
- package/dist/windows/process-load.d.ts +2 -0
- package/dist/windows/process-load.js +121 -0
- package/dist/windows/processes.d.ts +9 -0
- package/dist/windows/processes.js +139 -0
- package/dist/windows/services.d.ts +2 -0
- package/dist/windows/services.js +83 -0
- package/dist/windows/shell.d.ts +1 -0
- package/dist/windows/shell.js +19 -0
- package/dist/windows/software.d.ts +2 -0
- package/dist/windows/software.js +53 -0
- package/dist/windows/system.d.ts +1 -0
- package/dist/windows/system.js +98 -0
- package/dist/windows/thunderbolt.d.ts +2 -0
- package/dist/windows/thunderbolt.js +34 -0
- package/dist/windows/usb.d.ts +2 -0
- package/dist/windows/usb.js +37 -0
- package/dist/windows/users.d.ts +2 -0
- package/dist/windows/users.js +151 -0
- package/dist/windows/uuid.d.ts +2 -0
- package/dist/windows/uuid.js +28 -0
- package/dist/windows/wifi-connections.d.ts +2 -0
- package/dist/windows/wifi-connections.js +56 -0
- package/dist/windows/wifi-interfaces.d.ts +2 -0
- package/dist/windows/wifi-interfaces.js +45 -0
- package/dist/windows/wifi-networks.d.ts +2 -0
- package/dist/windows/wifi-networks.js +50 -0
- package/package.json +78 -12
- package/lib/audio.js +0 -277
- package/lib/battery.js +0 -334
- package/lib/bluetooth.js +0 -315
- package/lib/bluetoothVendors.js +0 -1138
- package/lib/cli.js +0 -100
- package/lib/cpu.js +0 -2285
- package/lib/docker.js +0 -791
- package/lib/dockerSocket.js +0 -117
- package/lib/filesystem.js +0 -1849
- package/lib/graphics.js +0 -1321
- package/lib/index.d.ts +0 -1051
- package/lib/index.js +0 -520
- package/lib/internet.js +0 -259
- package/lib/memory.js +0 -622
- package/lib/network.js +0 -2008
- package/lib/osinfo.js +0 -1322
- package/lib/printer.js +0 -209
- package/lib/processes.js +0 -1459
- package/lib/system.js +0 -855
- package/lib/usb.js +0 -309
- package/lib/users.js +0 -412
- package/lib/util.js +0 -2833
- package/lib/virtualbox.js +0 -116
- package/lib/wifi.js +0 -839
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.vboxInfo = void 0;
|
|
4
|
+
const node_os_1 = require("node:os");
|
|
5
|
+
const common_1 = require("./common");
|
|
6
|
+
const const_1 = require("./common/const");
|
|
7
|
+
const exec_1 = require("./common/exec");
|
|
8
|
+
const vboxInfo = async () => {
|
|
9
|
+
await (0, common_1.nextTick)();
|
|
10
|
+
const result = [];
|
|
11
|
+
try {
|
|
12
|
+
const { stdout } = await (0, exec_1.exec)(const_1.VBOXMANAGE + ' list vms --long');
|
|
13
|
+
const parts = (node_os_1.EOL + stdout.toString()).split(node_os_1.EOL + 'Name:').splice(1);
|
|
14
|
+
parts.forEach((part) => {
|
|
15
|
+
const lines = ('Name:' + part).split(node_os_1.EOL);
|
|
16
|
+
const state = (0, common_1.getValue)(lines, 'State');
|
|
17
|
+
const running = state.startsWith('running');
|
|
18
|
+
const runningSinceString = running ? state.replace('running (since ', '').replace(')', '').trim() : '';
|
|
19
|
+
let runningSince = 0;
|
|
20
|
+
try {
|
|
21
|
+
if (running) {
|
|
22
|
+
const sinceDateObj = new Date(runningSinceString);
|
|
23
|
+
const parsed = sinceDateObj.getTime();
|
|
24
|
+
if (!Number.isNaN(parsed)) {
|
|
25
|
+
const offset = sinceDateObj.getTimezoneOffset();
|
|
26
|
+
runningSince = Math.round((Date.now() - parsed) / 1000) + offset * 60;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch { }
|
|
31
|
+
const stoppedSinceString = !running ? state.replace('powered off (since', '').replace(')', '').trim() : '';
|
|
32
|
+
let stoppedSince = 0;
|
|
33
|
+
try {
|
|
34
|
+
if (!running) {
|
|
35
|
+
const sinceDateObj = new Date(stoppedSinceString);
|
|
36
|
+
const parsed = sinceDateObj.getTime();
|
|
37
|
+
if (!Number.isNaN(parsed)) {
|
|
38
|
+
const offset = sinceDateObj.getTimezoneOffset();
|
|
39
|
+
stoppedSince = Math.round((Date.now() - parsed) / 1000) + offset * 60;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
catch { }
|
|
44
|
+
result.push({
|
|
45
|
+
id: (0, common_1.getValue)(lines, 'UUID'),
|
|
46
|
+
name: (0, common_1.getValue)(lines, 'Name'),
|
|
47
|
+
running,
|
|
48
|
+
started: runningSinceString,
|
|
49
|
+
runningSince,
|
|
50
|
+
stopped: stoppedSinceString,
|
|
51
|
+
stoppedSince,
|
|
52
|
+
guestOS: (0, common_1.getValue)(lines, 'Guest OS'),
|
|
53
|
+
hardwareUUID: (0, common_1.getValue)(lines, 'Hardware UUID'),
|
|
54
|
+
memory: parseInt((0, common_1.getValue)(lines, 'Memory size', ' '), 10),
|
|
55
|
+
vram: parseInt((0, common_1.getValue)(lines, 'VRAM size'), 10),
|
|
56
|
+
cpus: parseInt((0, common_1.getValue)(lines, 'Number of CPUs'), 10),
|
|
57
|
+
cpuExepCap: (0, common_1.getValue)(lines, 'CPU exec cap'),
|
|
58
|
+
cpuProfile: (0, common_1.getValue)(lines, 'CPUProfile'),
|
|
59
|
+
chipset: (0, common_1.getValue)(lines, 'Chipset'),
|
|
60
|
+
firmware: (0, common_1.getValue)(lines, 'Firmware'),
|
|
61
|
+
pageFusion: (0, common_1.getValue)(lines, 'Page Fusion') === 'enabled',
|
|
62
|
+
configFile: (0, common_1.getValue)(lines, 'Config file'),
|
|
63
|
+
snapshotFolder: (0, common_1.getValue)(lines, 'Snapshot folder'),
|
|
64
|
+
logFolder: (0, common_1.getValue)(lines, 'Log folder'),
|
|
65
|
+
hpet: (0, common_1.getValue)(lines, 'HPET') === 'enabled',
|
|
66
|
+
pae: (0, common_1.getValue)(lines, 'PAE') === 'enabled',
|
|
67
|
+
longMode: (0, common_1.getValue)(lines, 'Long Mode') === 'enabled',
|
|
68
|
+
tripleFaultReset: (0, common_1.getValue)(lines, 'Triple Fault Reset') === 'enabled',
|
|
69
|
+
apic: (0, common_1.getValue)(lines, 'APIC') === 'enabled',
|
|
70
|
+
x2Apic: (0, common_1.getValue)(lines, 'X2APIC') === 'enabled',
|
|
71
|
+
acpi: (0, common_1.getValue)(lines, 'ACPI') === 'enabled',
|
|
72
|
+
ioApic: (0, common_1.getValue)(lines, 'IOAPIC') === 'enabled',
|
|
73
|
+
biosApicMode: (0, common_1.getValue)(lines, 'BIOS APIC mode'),
|
|
74
|
+
bootMenuMode: (0, common_1.getValue)(lines, 'Boot menu mode'),
|
|
75
|
+
bootDevice1: (0, common_1.getValue)(lines, 'Boot Device 1'),
|
|
76
|
+
bootDevice2: (0, common_1.getValue)(lines, 'Boot Device 2'),
|
|
77
|
+
bootDevice3: (0, common_1.getValue)(lines, 'Boot Device 3'),
|
|
78
|
+
bootDevice4: (0, common_1.getValue)(lines, 'Boot Device 4'),
|
|
79
|
+
timeOffset: (0, common_1.getValue)(lines, 'Time offset'),
|
|
80
|
+
rtc: (0, common_1.getValue)(lines, 'RTC')
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
return result;
|
|
84
|
+
}
|
|
85
|
+
catch (e) {
|
|
86
|
+
return result;
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
exports.vboxInfo = vboxInfo;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const wifiConnections: () => Promise<import("./common/types").WifiConnectionData[] | null>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.wifiConnections = void 0;
|
|
4
|
+
const const_1 = require("./common/const");
|
|
5
|
+
const wifiConnections = async () => {
|
|
6
|
+
switch (true) {
|
|
7
|
+
case const_1.LINUX || const_1.ANDROID:
|
|
8
|
+
return (await import('./linux/wifi-connections.js')).wifiConnections();
|
|
9
|
+
case const_1.DARWIN:
|
|
10
|
+
return (await import('./darwin/wifi-connections.js')).wifiConnections();
|
|
11
|
+
case const_1.WINDOWS:
|
|
12
|
+
return (await import('./windows/wifi-connections.js')).wifiConnections();
|
|
13
|
+
default:
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
exports.wifiConnections = wifiConnections;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const wifiInterfaces: () => Promise<import("./common/types").WifiInterfaceData[] | null>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.wifiInterfaces = void 0;
|
|
4
|
+
const const_1 = require("./common/const");
|
|
5
|
+
const wifiInterfaces = async () => {
|
|
6
|
+
switch (true) {
|
|
7
|
+
case const_1.LINUX || const_1.ANDROID:
|
|
8
|
+
return (await import('./linux/wifi-interfaces.js')).wifiInterfaces();
|
|
9
|
+
case const_1.DARWIN:
|
|
10
|
+
return (await import('./darwin/wifi-interfaces.js')).wifiInterfaces();
|
|
11
|
+
case const_1.WINDOWS:
|
|
12
|
+
return (await import('./windows/wifi-interfaces.js')).wifiInterfaces();
|
|
13
|
+
default:
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
exports.wifiInterfaces = wifiInterfaces;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const wifiNetworks: () => Promise<import("./common/types").WifiNetworkData[] | null>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.wifiNetworks = void 0;
|
|
4
|
+
const const_1 = require("./common/const");
|
|
5
|
+
const wifiNetworks = async () => {
|
|
6
|
+
switch (true) {
|
|
7
|
+
case const_1.LINUX || const_1.ANDROID:
|
|
8
|
+
return (await import('./linux/wifi-networks.js')).wifiNetworks();
|
|
9
|
+
case const_1.DARWIN:
|
|
10
|
+
return (await import('./darwin/wifi-networks.js')).wifiNetworks();
|
|
11
|
+
case const_1.WINDOWS:
|
|
12
|
+
return (await import('./windows/wifi-networks.js')).wifiNetworks();
|
|
13
|
+
default:
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
exports.wifiNetworks = wifiNetworks;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.audio = void 0;
|
|
4
|
+
const common_1 = require("../common");
|
|
5
|
+
const defaults_1 = require("../common/defaults");
|
|
6
|
+
const mappings_1 = require("../common/mappings");
|
|
7
|
+
const windows_1 = require("../common/windows");
|
|
8
|
+
const audio = async () => {
|
|
9
|
+
await (0, common_1.nextTick)();
|
|
10
|
+
const defaults = (0, common_1.cloneObj)(defaults_1.initAudioResult);
|
|
11
|
+
const devices = (0, windows_1.psArray)(await windows_1.ps.exec('Get-CimInstance Win32_SoundDevice | Select-Object DeviceID,StatusInfo,Name,Manufacturer | ConvertTo-Json -Depth 5'));
|
|
12
|
+
return devices
|
|
13
|
+
.filter((data) => data?.Name)
|
|
14
|
+
.map((data) => ({
|
|
15
|
+
...defaults,
|
|
16
|
+
id: data.DeviceID || '',
|
|
17
|
+
name: data.Name,
|
|
18
|
+
manufacturer: (data.Manufacturer || '').trim(),
|
|
19
|
+
type: (0, mappings_1.audioTypeLabel)(data.Name),
|
|
20
|
+
status: (0, mappings_1.audioWindowsStatus)(data.StatusInfo)
|
|
21
|
+
}));
|
|
22
|
+
};
|
|
23
|
+
exports.audio = audio;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const baseboard: () => Promise<any>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.baseboard = void 0;
|
|
4
|
+
const node_os_1 = require("node:os");
|
|
5
|
+
const common_1 = require("../common");
|
|
6
|
+
const defaults_1 = require("../common/defaults");
|
|
7
|
+
const parse_1 = require("../common/parse");
|
|
8
|
+
const windows_1 = require("../common/windows");
|
|
9
|
+
const baseboard = async () => {
|
|
10
|
+
await (0, common_1.nextTick)();
|
|
11
|
+
const result = (0, common_1.cloneObj)(defaults_1.initBaseboard);
|
|
12
|
+
try {
|
|
13
|
+
const workload = [];
|
|
14
|
+
const win10plus = Number.parseInt((0, node_os_1.release)(), 10) >= 10;
|
|
15
|
+
const maxCapacityAttribute = win10plus ? 'MaxCapacityEx' : 'MaxCapacity';
|
|
16
|
+
workload.push(windows_1.ps.exec('Get-CimInstance Win32_baseboard | select Model,Manufacturer,Product,Version,SerialNumber,PartNumber,SKU | ConvertTo-Json -Depth 5'));
|
|
17
|
+
workload.push(windows_1.ps.exec(`Get-CimInstance Win32_physicalmemoryarray | select ${maxCapacityAttribute}, MemoryDevices | ConvertTo-Json -Depth 5`));
|
|
18
|
+
const data = await Promise.allSettled(workload).then((results) => results.map((result) => (result.status === 'fulfilled' ? result.value : null)));
|
|
19
|
+
const baseBoard = (0, windows_1.psArray)(data[0])[0] || {};
|
|
20
|
+
const physicalMemory = (0, windows_1.psArray)(data[1])[0] || {};
|
|
21
|
+
return {
|
|
22
|
+
...result,
|
|
23
|
+
manufacturer: (0, parse_1.cleanDefaults)(baseBoard.Manufacturer || ''),
|
|
24
|
+
model: (0, parse_1.cleanDefaults)(baseBoard.Model || '') || (0, parse_1.cleanDefaults)(baseBoard.Product || ''),
|
|
25
|
+
version: (0, parse_1.cleanDefaults)(baseBoard.Version || ''),
|
|
26
|
+
serial: (0, parse_1.cleanDefaults)(baseBoard.SerialNumber || ''),
|
|
27
|
+
assetTag: (0, parse_1.cleanDefaults)(baseBoard.PartNumber || '') || (0, parse_1.cleanDefaults)(baseBoard.SKU || ''),
|
|
28
|
+
memMax: Number(physicalMemory[maxCapacityAttribute]) * (win10plus ? 1024 : 1) || null,
|
|
29
|
+
memSlots: Number(physicalMemory.MemoryDevices) || null
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
catch { }
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
exports.baseboard = baseboard;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const battery: () => Promise<any[]>;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.battery = void 0;
|
|
4
|
+
const common_1 = require("../common");
|
|
5
|
+
const defaults_1 = require("../common/defaults");
|
|
6
|
+
const windows_1 = require("../common/windows");
|
|
7
|
+
const parseWinBatteryPart = (lines, designedCapacity, fullChargeCapacity) => {
|
|
8
|
+
const status = (0, common_1.toInt)((0, common_1.getValue)(lines, 'BatteryStatus', ':').trim());
|
|
9
|
+
const percent = Number.parseInt((0, common_1.getValue)(lines, 'EstimatedChargeRemaining', ':'), 10) || 0;
|
|
10
|
+
const maxCapacity = fullChargeCapacity || Number.parseInt((0, common_1.getValue)(lines, 'DesignCapacity', ':'), 10) || 0;
|
|
11
|
+
const isCharging = (status >= 6 && status <= 9) || status === 11 || (status !== 3 && status !== 1 && percent < 100);
|
|
12
|
+
return {
|
|
13
|
+
status: status > 0 ? status : -1,
|
|
14
|
+
hasBattery: true,
|
|
15
|
+
maxCapacity: fullChargeCapacity || Number.parseInt((0, common_1.getValue)(lines, 'DesignCapacity', ':'), 10) || 0,
|
|
16
|
+
designedCapacity: Number.parseInt((0, common_1.getValue)(lines, 'DesignCapacity', ':'), 10) || designedCapacity,
|
|
17
|
+
voltage: Number.parseInt((0, common_1.getValue)(lines, 'DesignVoltage', ':') || '0', 10) / 1000.0,
|
|
18
|
+
capacityUnit: 'mWh',
|
|
19
|
+
percent: Number.parseInt((0, common_1.getValue)(lines, 'EstimatedChargeRemaining', ':'), 10) || 0,
|
|
20
|
+
currentCapacity: Number(((maxCapacity * percent) / 100).toFixed(2)),
|
|
21
|
+
isCharging,
|
|
22
|
+
acConnected: isCharging || status === 2,
|
|
23
|
+
model: (0, common_1.getValue)(lines, 'DeviceID', ':')
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
const battery = async () => {
|
|
27
|
+
await (0, common_1.nextTick)();
|
|
28
|
+
const defaults = (0, common_1.cloneObj)(defaults_1.initBatteryResult);
|
|
29
|
+
const result = [];
|
|
30
|
+
try {
|
|
31
|
+
const workload = [];
|
|
32
|
+
workload.push(windows_1.ps.exec('Get-CimInstance Win32_Battery | select BatteryStatus, DesignCapacity, DesignVoltage, EstimatedChargeRemaining, DeviceID | fl'), windows_1.ps.exec('(Get-WmiObject -Class BatteryStaticData -Namespace ROOT/WMI).DesignedCapacity'), windows_1.ps.exec('(Get-CimInstance -Class BatteryFullChargedCapacity -Namespace ROOT/WMI).FullChargedCapacity'));
|
|
33
|
+
const data = await Promise.allSettled(workload).then((results) => results.map((result) => (result.status === 'fulfilled' ? result.value : '')));
|
|
34
|
+
if (data) {
|
|
35
|
+
const parts = data[0].toString().split(/\n\s*\n/);
|
|
36
|
+
const batteries = [];
|
|
37
|
+
const hasValue = (value) => /\S/.test(value);
|
|
38
|
+
for (const element of parts) {
|
|
39
|
+
if (hasValue(element)) {
|
|
40
|
+
batteries.push(element);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
const designCapacities = data[1]
|
|
44
|
+
.toString()
|
|
45
|
+
.split('\r\n')
|
|
46
|
+
.filter((e) => e);
|
|
47
|
+
const fullChargeCapacities = data[2]
|
|
48
|
+
.toString()
|
|
49
|
+
.split('\r\n')
|
|
50
|
+
.filter((e) => e);
|
|
51
|
+
if (batteries.length) {
|
|
52
|
+
for (let i = 0; i < batteries.length; i++) {
|
|
53
|
+
const lines = batteries[i].split('\r\n');
|
|
54
|
+
const designedCapacity = designCapacities && designCapacities.length >= i + 1 && designCapacities[i] ? (0, common_1.toInt)(designCapacities[i]) : 0;
|
|
55
|
+
const fullChargeCapacity = fullChargeCapacities && fullChargeCapacities.length >= i + 1 && fullChargeCapacities[i] ? (0, common_1.toInt)(fullChargeCapacities[i]) : 0;
|
|
56
|
+
const parsed = parseWinBatteryPart(lines, designedCapacity, fullChargeCapacity);
|
|
57
|
+
if (parsed.status > 0 && parsed.status !== 10) {
|
|
58
|
+
result.push({
|
|
59
|
+
...defaults,
|
|
60
|
+
hasBattery: parsed.hasBattery,
|
|
61
|
+
maxCapacity: parsed.maxCapacity,
|
|
62
|
+
designedCapacity: parsed.designedCapacity,
|
|
63
|
+
voltage: parsed.voltage,
|
|
64
|
+
capacityUnit: parsed.capacityUnit,
|
|
65
|
+
percent: parsed.percent,
|
|
66
|
+
currentCapacity: parsed.currentCapacity,
|
|
67
|
+
isCharging: parsed.isCharging,
|
|
68
|
+
acConnected: parsed.acConnected,
|
|
69
|
+
model: parsed.model
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return result;
|
|
76
|
+
}
|
|
77
|
+
catch {
|
|
78
|
+
return result;
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
exports.battery = battery;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const bios: () => Promise<any>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bios = void 0;
|
|
4
|
+
const common_1 = require("../common");
|
|
5
|
+
const defaults_1 = require("../common/defaults");
|
|
6
|
+
const parse_1 = require("../common/parse");
|
|
7
|
+
const windows_1 = require("../common/windows");
|
|
8
|
+
const bios = async () => {
|
|
9
|
+
await (0, common_1.nextTick)();
|
|
10
|
+
const result = (0, common_1.cloneObj)(defaults_1.initBios);
|
|
11
|
+
try {
|
|
12
|
+
const stdout = await windows_1.ps.exec('Get-CimInstance Win32_bios | select Description,Version,Manufacturer,@{n="ReleaseDate";e={$_.ReleaseDate.ToString("yyyy-MM-dd")}},BuildNumber,SerialNumber,SMBIOSBIOSVersion | fl');
|
|
13
|
+
if (stdout) {
|
|
14
|
+
const lines = stdout.toString().split('\r\n');
|
|
15
|
+
const description = (0, common_1.getValue)(lines, 'description', ':');
|
|
16
|
+
const version = (0, common_1.getValue)(lines, 'SMBIOSBIOSVersion', ':');
|
|
17
|
+
if (description.indexOf(' Version ') !== -1) {
|
|
18
|
+
result.vendor = description.split(' Version ')[0].trim();
|
|
19
|
+
result.version = description.split(' Version ')[1].trim();
|
|
20
|
+
}
|
|
21
|
+
else if (description.indexOf(' Ver: ') !== -1) {
|
|
22
|
+
result.vendor = (0, common_1.getValue)(lines, 'manufacturer', ':');
|
|
23
|
+
result.version = description.split(' Ver: ')[1].trim();
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
result.vendor = (0, common_1.getValue)(lines, 'manufacturer', ':');
|
|
27
|
+
result.version = version || (0, common_1.getValue)(lines, 'version', ':');
|
|
28
|
+
}
|
|
29
|
+
result.releaseDate = (0, common_1.getValue)(lines, 'releasedate', ':');
|
|
30
|
+
result.revision = (0, common_1.getValue)(lines, 'buildnumber', ':');
|
|
31
|
+
result.serial = (0, parse_1.cleanDefaults)((0, common_1.getValue)(lines, 'serialnumber', ':'));
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
catch { }
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
exports.bios = bios;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.blockDevices = exports.parseBlockDevices = void 0;
|
|
4
|
+
const common_1 = require("../common");
|
|
5
|
+
const filesys_1 = require("../common/filesys");
|
|
6
|
+
const windows_1 = require("../common/windows");
|
|
7
|
+
const parseBlockDevices = (logicalDisks, volumes) => {
|
|
8
|
+
const drivetypes = ['Unknown', 'NoRoot', 'Removable', 'Local', 'Network', 'CD/DVD', 'RAM'];
|
|
9
|
+
const guids = {};
|
|
10
|
+
volumes.forEach((volume) => {
|
|
11
|
+
const driveLetter = String(volume?.DriveLetter || '').toUpperCase();
|
|
12
|
+
if (driveLetter && volume.DeviceID) {
|
|
13
|
+
guids[driveLetter] = volume.DeviceID;
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
const data = [];
|
|
17
|
+
logicalDisks.forEach((logicalDisk) => {
|
|
18
|
+
if (logicalDisk && logicalDisk.DriveType != null) {
|
|
19
|
+
const drivetype = (0, common_1.toInt)(logicalDisk.DriveType);
|
|
20
|
+
data.push({
|
|
21
|
+
name: logicalDisk.Name || '',
|
|
22
|
+
identifier: logicalDisk.Caption || '',
|
|
23
|
+
type: 'disk',
|
|
24
|
+
fsType: (logicalDisk.FileSystem || '').toLowerCase(),
|
|
25
|
+
mount: logicalDisk.Caption || '',
|
|
26
|
+
size: (0, common_1.toInt)(logicalDisk.Size),
|
|
27
|
+
physical: drivetype >= 0 && drivetype <= 6 ? drivetypes[drivetype] : drivetypes[0],
|
|
28
|
+
uuid: logicalDisk.VolumeSerialNumber || '',
|
|
29
|
+
guid: guids[String(logicalDisk.Caption || '').toUpperCase()] || '',
|
|
30
|
+
label: logicalDisk.VolumeName || '',
|
|
31
|
+
model: '',
|
|
32
|
+
serial: logicalDisk.VolumeSerialNumber || '',
|
|
33
|
+
removable: drivetype === 2,
|
|
34
|
+
protocol: '',
|
|
35
|
+
group: '',
|
|
36
|
+
device: ''
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
return data;
|
|
41
|
+
};
|
|
42
|
+
exports.parseBlockDevices = parseBlockDevices;
|
|
43
|
+
const blockDevices = async () => {
|
|
44
|
+
await (0, common_1.nextTick)();
|
|
45
|
+
try {
|
|
46
|
+
const [logicalDisks, diskDrives, volumes] = await Promise.all([
|
|
47
|
+
windows_1.ps.exec('Get-CimInstance -ClassName Win32_LogicalDisk | select Caption,DriveType,Name,FileSystem,Size,VolumeSerialNumber,VolumeName | ConvertTo-Json'),
|
|
48
|
+
windows_1.ps.exec("Get-WmiObject -Class Win32_diskdrive | Select-Object -Property PNPDeviceId,DeviceID, Model, Size, @{L='Partitions'; E={$_.GetRelated('Win32_DiskPartition').GetRelated('Win32_LogicalDisk') | Select-Object -Property DeviceID, VolumeName, Size, FreeSpace}} | fl"),
|
|
49
|
+
windows_1.ps.exec('Get-CimInstance -ClassName Win32_Volume | select DriveLetter,DeviceID | ConvertTo-Json').catch(() => null)
|
|
50
|
+
]);
|
|
51
|
+
const data = (0, exports.parseBlockDevices)((0, windows_1.psArray)(logicalDisks), (0, windows_1.psArray)(volumes));
|
|
52
|
+
return (0, filesys_1.matchDevicesWin)(data, String(diskDrives).split(/\n\s*\n/));
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
return [];
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
exports.blockDevices = blockDevices;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bluetoothDevices = void 0;
|
|
4
|
+
const common_1 = require("../common");
|
|
5
|
+
const mappings_1 = require("../common/mappings");
|
|
6
|
+
const windows_1 = require("../common/windows");
|
|
7
|
+
const parseBluetoothDevices = (device) => {
|
|
8
|
+
const name = device.Name || '';
|
|
9
|
+
return {
|
|
10
|
+
device: null,
|
|
11
|
+
name,
|
|
12
|
+
manufacturer: device.Manufacturer || null,
|
|
13
|
+
macDevice: null,
|
|
14
|
+
macHost: null,
|
|
15
|
+
batteryPercent: null,
|
|
16
|
+
type: (0, mappings_1.bluetoothTypeLabel)(name.toLowerCase()),
|
|
17
|
+
connected: null
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
const bluetoothDevices = async () => {
|
|
21
|
+
await (0, common_1.nextTick)();
|
|
22
|
+
const result = [];
|
|
23
|
+
const pnpDevices = (0, windows_1.psArray)(await windows_1.ps.exec('Get-CimInstance Win32_PNPEntity | select PNPClass, Name, Manufacturer, Status, Service, ConfigManagerErrorCode, Present | ConvertTo-Json -Depth 5 -Compress'));
|
|
24
|
+
pnpDevices.forEach((device) => {
|
|
25
|
+
if ((device.PNPClass || '').toLowerCase() === 'bluetooth' && Number(device.ConfigManagerErrorCode) === 0 && !device.Service) {
|
|
26
|
+
result.push(parseBluetoothDevices(device));
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
return result;
|
|
30
|
+
};
|
|
31
|
+
exports.bluetoothDevices = bluetoothDevices;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.camera = void 0;
|
|
4
|
+
const common_1 = require("../common");
|
|
5
|
+
const windows_1 = require("../common/windows");
|
|
6
|
+
const matchId = (deviceId, key) => {
|
|
7
|
+
const match = deviceId.match(new RegExp(`${key}_([0-9A-Fa-f]{4})`));
|
|
8
|
+
return match ? match[1].toLowerCase() : '';
|
|
9
|
+
};
|
|
10
|
+
const parseSerial = (deviceId) => {
|
|
11
|
+
const last = deviceId.split('\\').pop() || '';
|
|
12
|
+
return last.includes('&') ? '' : last;
|
|
13
|
+
};
|
|
14
|
+
const parseConnection = (deviceId) => {
|
|
15
|
+
const id = deviceId.toUpperCase();
|
|
16
|
+
if (id.includes('BTHENUM') || id.startsWith('BTH')) {
|
|
17
|
+
return 'bluetooth';
|
|
18
|
+
}
|
|
19
|
+
if (id.startsWith('USB')) {
|
|
20
|
+
return 'usb';
|
|
21
|
+
}
|
|
22
|
+
if (id.startsWith('PCI')) {
|
|
23
|
+
return 'pci';
|
|
24
|
+
}
|
|
25
|
+
return '';
|
|
26
|
+
};
|
|
27
|
+
const parseCamera = (devices) => devices.map((data) => {
|
|
28
|
+
const deviceId = data.DeviceID || '';
|
|
29
|
+
return {
|
|
30
|
+
name: (data.Name || '').trim(),
|
|
31
|
+
vendor: (data.Manufacturer || '').trim() || matchId(deviceId, 'VID'),
|
|
32
|
+
model: matchId(deviceId, 'PID'),
|
|
33
|
+
serial: parseSerial(deviceId),
|
|
34
|
+
connection: parseConnection(deviceId)
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
const camera = async () => {
|
|
38
|
+
await (0, common_1.nextTick)();
|
|
39
|
+
try {
|
|
40
|
+
const result = await windows_1.ps.exec("@(Get-CimInstance Win32_PnPEntity | Where-Object { $_.PNPClass -eq 'Camera' -or $_.PNPClass -eq 'Image' } | Select-Object Name,Manufacturer,DeviceID) | ConvertTo-Json -Depth 3");
|
|
41
|
+
return parseCamera((0, windows_1.psArray)(result));
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
return [];
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
exports.camera = camera;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const chassis: () => Promise<any>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.chassis = void 0;
|
|
4
|
+
const common_1 = require("../common");
|
|
5
|
+
const defaults_1 = require("../common/defaults");
|
|
6
|
+
const mappings_1 = require("../common/mappings");
|
|
7
|
+
const parse_1 = require("../common/parse");
|
|
8
|
+
const windows_1 = require("../common/windows");
|
|
9
|
+
const chassis = async () => {
|
|
10
|
+
await (0, common_1.nextTick)();
|
|
11
|
+
const result = (0, common_1.cloneObj)(defaults_1.initChassis);
|
|
12
|
+
try {
|
|
13
|
+
const stdout = await windows_1.ps.exec('Get-CimInstance Win32_SystemEnclosure | select Model,Manufacturer,ChassisTypes,Version,SerialNumber,PartNumber,SKU,SMBIOSAssetTag | fl');
|
|
14
|
+
if (stdout) {
|
|
15
|
+
const lines = stdout.toString().split('\r\n');
|
|
16
|
+
result.manufacturer = (0, parse_1.cleanDefaults)((0, common_1.getValue)(lines, 'manufacturer', ':'));
|
|
17
|
+
result.model = (0, parse_1.cleanDefaults)((0, common_1.getValue)(lines, 'model', ':'));
|
|
18
|
+
const ctype = Number.parseInt((0, common_1.getValue)(lines, 'ChassisTypes', ':').replace(/\D/g, ''), 10);
|
|
19
|
+
result.type = ctype && !Number.isNaN(ctype) && ctype <= mappings_1.chassisTypes.length ? mappings_1.chassisTypes[ctype - 1] : '';
|
|
20
|
+
result.version = (0, parse_1.cleanDefaults)((0, common_1.getValue)(lines, 'version', ':'));
|
|
21
|
+
result.serial = (0, parse_1.cleanDefaults)((0, common_1.getValue)(lines, 'serialnumber', ':'));
|
|
22
|
+
result.assetTag = (0, parse_1.cleanDefaults)((0, common_1.getValue)(lines, 'partnumber', ':')) || (0, parse_1.cleanDefaults)((0, common_1.getValue)(lines, 'SMBIOSAssetTag', ':'));
|
|
23
|
+
result.sku = (0, parse_1.cleanDefaults)((0, common_1.getValue)(lines, 'sku', ':'));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
catch { }
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
29
|
+
exports.chassis = chassis;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cpuCache = exports.parseWinCache = void 0;
|
|
4
|
+
const common_1 = require("../common");
|
|
5
|
+
const defaults_1 = require("../common/defaults");
|
|
6
|
+
const windows_1 = require("../common/windows");
|
|
7
|
+
const parseWinCache = (processorObj, cacheParts) => {
|
|
8
|
+
const result = (0, common_1.cloneObj)(defaults_1.initCpuCacheResult);
|
|
9
|
+
result.l1d = 0;
|
|
10
|
+
result.l1i = 0;
|
|
11
|
+
result.l2 = processorObj?.L2CacheSize ? (0, common_1.toInt)(processorObj.L2CacheSize) * 1024 : 0;
|
|
12
|
+
result.l3 = processorObj?.L3CacheSize ? (0, common_1.toInt)(processorObj.L3CacheSize) * 1024 : 0;
|
|
13
|
+
let l1i = 0;
|
|
14
|
+
let l1d = 0;
|
|
15
|
+
let l2 = 0;
|
|
16
|
+
cacheParts.forEach((part) => {
|
|
17
|
+
const cacheType = part.CacheType != null ? String(part.CacheType) : '';
|
|
18
|
+
const level = part.Level != null ? String(part.Level) : '';
|
|
19
|
+
const installedSize = part.InstalledSize;
|
|
20
|
+
if (level === '3' && cacheType === '3') {
|
|
21
|
+
result.l1i = result.l1i + (0, common_1.toInt)(installedSize) * 1024;
|
|
22
|
+
}
|
|
23
|
+
if (level === '3' && cacheType === '4') {
|
|
24
|
+
result.l1d = result.l1d + (0, common_1.toInt)(installedSize) * 1024;
|
|
25
|
+
}
|
|
26
|
+
if (level === '3' && cacheType === '5') {
|
|
27
|
+
l1i = (0, common_1.toInt)(installedSize) / 2;
|
|
28
|
+
l1d = (0, common_1.toInt)(installedSize) / 2;
|
|
29
|
+
}
|
|
30
|
+
if (level === '4' && cacheType === '5') {
|
|
31
|
+
l2 = l2 + (0, common_1.toInt)(installedSize) * 1024;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
if (!result.l1i && !result.l1d) {
|
|
35
|
+
result.l1i = l1i;
|
|
36
|
+
result.l1d = l1d;
|
|
37
|
+
}
|
|
38
|
+
if (l2) {
|
|
39
|
+
result.l2 = l2;
|
|
40
|
+
}
|
|
41
|
+
return result;
|
|
42
|
+
};
|
|
43
|
+
exports.parseWinCache = parseWinCache;
|
|
44
|
+
const cpuCache = async () => {
|
|
45
|
+
await (0, common_1.nextTick)();
|
|
46
|
+
const defaults = (0, common_1.cloneObj)(defaults_1.initCpuCacheResult);
|
|
47
|
+
try {
|
|
48
|
+
const workload = [];
|
|
49
|
+
workload.push(windows_1.ps.exec('Get-CimInstance Win32_Processor | select L2CacheSize, L3CacheSize | ConvertTo-Json'));
|
|
50
|
+
workload.push(windows_1.ps.exec('Get-CimInstance Win32_CacheMemory | select CacheType,InstalledSize,Level | ConvertTo-Json'));
|
|
51
|
+
const data = await Promise.all(workload);
|
|
52
|
+
const processors = (0, windows_1.psArray)(data[0]);
|
|
53
|
+
return (0, exports.parseWinCache)(processors[0], (0, windows_1.psArray)(data[1]));
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
return defaults;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
exports.cpuCache = cpuCache;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const cpuFlags: () => Promise<string>;
|