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,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cpuCurrentSpeed = exports.getCpuCurrentSpeed = 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 cpu_1 = require("./common/cpu");
|
|
8
|
+
const exec_1 = require("./common/exec");
|
|
9
|
+
const getCpuCurrentSpeed = async () => {
|
|
10
|
+
const oscpus = (0, node_os_1.cpus)();
|
|
11
|
+
let minFreq = 999999999;
|
|
12
|
+
let maxFreq = 0;
|
|
13
|
+
let avgFreq = 0;
|
|
14
|
+
const cores = [];
|
|
15
|
+
const speeds = [];
|
|
16
|
+
if (oscpus?.length && oscpus[0]?.speed !== undefined) {
|
|
17
|
+
for (const i in oscpus) {
|
|
18
|
+
speeds.push(oscpus[i].speed > 100 ? (oscpus[i].speed + 1) / 1000 : oscpus[i].speed / 10);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
else if (const_1.LINUX) {
|
|
22
|
+
try {
|
|
23
|
+
const { stdout } = await (0, exec_1.exec)('cat /proc/cpuinfo | grep "cpu MHz" | cut -d " " -f 3', const_1.execOptsLinux);
|
|
24
|
+
const speedStrings = stdout.split('\n').filter((line) => line.length > 0);
|
|
25
|
+
for (const i in speedStrings) {
|
|
26
|
+
speeds.push(Math.floor(parseInt(speedStrings[i], 10) / 10) / 100);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
catch { }
|
|
30
|
+
}
|
|
31
|
+
if (speeds?.length) {
|
|
32
|
+
try {
|
|
33
|
+
for (const i in speeds) {
|
|
34
|
+
avgFreq = avgFreq + speeds[i];
|
|
35
|
+
if (speeds[i] > maxFreq) {
|
|
36
|
+
maxFreq = speeds[i];
|
|
37
|
+
}
|
|
38
|
+
if (speeds[i] < minFreq) {
|
|
39
|
+
minFreq = speeds[i];
|
|
40
|
+
}
|
|
41
|
+
cores.push(parseFloat(speeds[i].toFixed(2)));
|
|
42
|
+
}
|
|
43
|
+
avgFreq = avgFreq / speeds.length;
|
|
44
|
+
return {
|
|
45
|
+
min: parseFloat(minFreq.toFixed(2)),
|
|
46
|
+
max: parseFloat(maxFreq.toFixed(2)),
|
|
47
|
+
avg: parseFloat(avgFreq.toFixed(2)),
|
|
48
|
+
cores: cores
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
return {
|
|
53
|
+
min: 0,
|
|
54
|
+
max: 0,
|
|
55
|
+
avg: 0,
|
|
56
|
+
cores: cores
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
return {
|
|
62
|
+
min: 0,
|
|
63
|
+
max: 0,
|
|
64
|
+
avg: 0,
|
|
65
|
+
cores: cores
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
exports.getCpuCurrentSpeed = getCpuCurrentSpeed;
|
|
70
|
+
const cpuCurrentSpeed = async () => {
|
|
71
|
+
await (0, common_1.nextTick)();
|
|
72
|
+
let result = await (0, exports.getCpuCurrentSpeed)();
|
|
73
|
+
if (result.avg === 0 && (0, cpu_1.getCpuSpeed)() !== 0) {
|
|
74
|
+
const currCpuSpeed = (0, cpu_1.getCpuSpeed)();
|
|
75
|
+
result = {
|
|
76
|
+
min: currCpuSpeed,
|
|
77
|
+
max: currCpuSpeed,
|
|
78
|
+
avg: currCpuSpeed,
|
|
79
|
+
cores: []
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
return result;
|
|
83
|
+
};
|
|
84
|
+
exports.cpuCurrentSpeed = cpuCurrentSpeed;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const cpuFlags: () => Promise<string | null>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cpuFlags = void 0;
|
|
4
|
+
const const_1 = require("./common/const");
|
|
5
|
+
const cpuFlags = async () => {
|
|
6
|
+
switch (true) {
|
|
7
|
+
case const_1.LINUX || const_1.ANDROID:
|
|
8
|
+
return (await import('./linux/cpu-flags.js')).cpuFlags();
|
|
9
|
+
case const_1.FREEBSD || const_1.NETBSD || const_1.OPENBSD:
|
|
10
|
+
return (await import('./bsd/cpu-flags.js')).cpuFlags();
|
|
11
|
+
case const_1.DARWIN:
|
|
12
|
+
return (await import('./darwin/cpu-flags.js')).cpuFlags();
|
|
13
|
+
case const_1.WINDOWS:
|
|
14
|
+
return (await import('./windows/cpu-flags.js')).cpuFlags();
|
|
15
|
+
default:
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
exports.cpuFlags = cpuFlags;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const fullLoad: () => Promise<number>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fullLoad = 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 fullLoad = async () => {
|
|
8
|
+
await (0, common_1.nextTick)();
|
|
9
|
+
const oscpus = (0, node_os_1.cpus)();
|
|
10
|
+
let totalUser = 0;
|
|
11
|
+
let totalSystem = 0;
|
|
12
|
+
let totalNice = 0;
|
|
13
|
+
let totalIrq = 0;
|
|
14
|
+
let totalIdle = 0;
|
|
15
|
+
let result = 0;
|
|
16
|
+
if (oscpus && oscpus.length) {
|
|
17
|
+
for (let i = 0, len = oscpus.length; i < len; i++) {
|
|
18
|
+
const cpu = oscpus[i].times;
|
|
19
|
+
totalUser += cpu.user;
|
|
20
|
+
totalSystem += const_1.WINDOWS ? Math.max(0, cpu.sys - cpu.irq) : cpu.sys;
|
|
21
|
+
totalNice += cpu.nice;
|
|
22
|
+
totalIrq += cpu.irq;
|
|
23
|
+
totalIdle += cpu.idle;
|
|
24
|
+
}
|
|
25
|
+
const totalTicks = totalIdle + totalIrq + totalNice + totalSystem + totalUser;
|
|
26
|
+
result = ((totalTicks - totalIdle) / totalTicks) * 100.0;
|
|
27
|
+
}
|
|
28
|
+
return result;
|
|
29
|
+
};
|
|
30
|
+
exports.fullLoad = fullLoad;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const cpuTemperature: () => Promise<any>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cpuTemperature = void 0;
|
|
4
|
+
const const_1 = require("./common/const");
|
|
5
|
+
const cpuTemperature = async () => {
|
|
6
|
+
switch (true) {
|
|
7
|
+
case const_1.LINUX:
|
|
8
|
+
return (await import('./linux/cpu-temperature.js')).cpuTemperature();
|
|
9
|
+
case const_1.FREEBSD || const_1.NETBSD || const_1.OPENBSD:
|
|
10
|
+
return (await import('./bsd/cpu-temperature.js')).cpuTemperature();
|
|
11
|
+
case const_1.DARWIN:
|
|
12
|
+
return (await import('./darwin/cpu-temperature.js')).cpuTemperature();
|
|
13
|
+
case const_1.WINDOWS:
|
|
14
|
+
return (await import('./windows/cpu-temperature.js')).cpuTemperature();
|
|
15
|
+
default:
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
exports.cpuTemperature = cpuTemperature;
|
package/dist/cpu.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const cpu: () => Promise<any>;
|
package/dist/cpu.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cpu = void 0;
|
|
4
|
+
const const_1 = require("./common/const");
|
|
5
|
+
const cpu = async () => {
|
|
6
|
+
switch (true) {
|
|
7
|
+
case const_1.LINUX:
|
|
8
|
+
return (await import('./linux/cpu.js')).cpu();
|
|
9
|
+
case const_1.FREEBSD || const_1.NETBSD || const_1.OPENBSD:
|
|
10
|
+
return (await import('./bsd/cpu.js')).cpu();
|
|
11
|
+
case const_1.DARWIN:
|
|
12
|
+
return (await import('./darwin/cpu.js')).cpu();
|
|
13
|
+
case const_1.WINDOWS:
|
|
14
|
+
return (await import('./windows/cpu.js')).cpu();
|
|
15
|
+
default:
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
exports.cpu = cpu;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.audio = void 0;
|
|
4
|
+
const common_1 = require("../common");
|
|
5
|
+
const exec_1 = require("../common/exec");
|
|
6
|
+
const mappings_1 = require("../common/mappings");
|
|
7
|
+
const darwin_1 = require("./../common/darwin");
|
|
8
|
+
const parseAudioObject = (audioObject, id) => {
|
|
9
|
+
const name = audioObject._name;
|
|
10
|
+
const channelStr = ((audioObject.coreaudio_device_transport || '') + ' ' + (audioObject._name || '')).toLowerCase();
|
|
11
|
+
return {
|
|
12
|
+
id,
|
|
13
|
+
name,
|
|
14
|
+
manufacturer: audioObject.coreaudio_device_manufacturer,
|
|
15
|
+
revision: null,
|
|
16
|
+
driver: null,
|
|
17
|
+
default: Boolean(audioObject.coreaudio_default_audio_input_device || false) || Boolean(audioObject.coreaudio_default_audio_output_device || false),
|
|
18
|
+
channel: (0, mappings_1.audioDarwinChannelLabel)(channelStr),
|
|
19
|
+
type: (0, mappings_1.audioTypeLabel)(name, Boolean(audioObject.coreaudio_device_input || ''), Boolean(audioObject.coreaudio_device_output || '')),
|
|
20
|
+
in: Boolean(audioObject.coreaudio_device_input || ''),
|
|
21
|
+
out: Boolean(audioObject.coreaudio_device_output || ''),
|
|
22
|
+
status: 'online'
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
const parseAudio = (data) => {
|
|
26
|
+
const result = [];
|
|
27
|
+
const outObj = (0, darwin_1.plistParser)(data.toString());
|
|
28
|
+
if (outObj?.length && outObj[0] && outObj[0]._items && outObj[0]._items.length) {
|
|
29
|
+
for (let i = 0; i < outObj[0]._items.length; i++) {
|
|
30
|
+
const audio = parseAudioObject(outObj[0]._items[i], String(i));
|
|
31
|
+
result.push(audio);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
const audio = async () => {
|
|
37
|
+
try {
|
|
38
|
+
await (0, common_1.nextTick)();
|
|
39
|
+
const { stdout } = await (0, exec_1.exec)('system_profiler SPAudioDataType -xml');
|
|
40
|
+
return parseAudio(stdout);
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
return [];
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
exports.audio = audio;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const baseboard: () => Promise<any>;
|
|
@@ -0,0 +1,48 @@
|
|
|
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 darwin_1 = require("./../common/darwin");
|
|
7
|
+
const defaults_1 = require("../common/defaults");
|
|
8
|
+
const exec_1 = require("../common/exec");
|
|
9
|
+
const mappings_1 = require("../common/mappings");
|
|
10
|
+
const parseBaseboardObject = (platformData, memoryData) => {
|
|
11
|
+
const defaults = (0, common_1.cloneObj)(defaults_1.initBaseboard);
|
|
12
|
+
let memSlots = 1;
|
|
13
|
+
let isUpgradable = true;
|
|
14
|
+
if (memoryData) {
|
|
15
|
+
const memDataObject = (0, darwin_1.plistParser)(memoryData);
|
|
16
|
+
if (memDataObject && memDataObject[0] && memDataObject[0]._items) {
|
|
17
|
+
memSlots = memDataObject[0]._items.length;
|
|
18
|
+
}
|
|
19
|
+
if (memDataObject && memDataObject[0] && memDataObject[0].is_memory_upgradeable) {
|
|
20
|
+
isUpgradable = memDataObject[0].is_memory_upgradeable === 'Yes';
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
if ((0, node_os_1.arch)() === 'arm64') {
|
|
24
|
+
memSlots = 0;
|
|
25
|
+
}
|
|
26
|
+
const lines = platformData.replace(/[<>"]/g, '').split('\n');
|
|
27
|
+
const model = (0, mappings_1.getAppleModel)((0, common_1.getValue)(lines, 'model', '=', true));
|
|
28
|
+
return {
|
|
29
|
+
...defaults,
|
|
30
|
+
manufacturer: (0, common_1.getValue)(lines, 'manufacturer', '=', true),
|
|
31
|
+
model: model.model,
|
|
32
|
+
version: model.version,
|
|
33
|
+
serial: (0, common_1.getValue)(lines, 'ioplatformserialnumber', '=', true),
|
|
34
|
+
assetTag: (0, common_1.getValue)(lines, 'board-id', '=', true),
|
|
35
|
+
sku: model.key,
|
|
36
|
+
memSlots,
|
|
37
|
+
memMax: (0, node_os_1.arch)() === 'arm64' || !isUpgradable ? (0, node_os_1.totalmem)() : null
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
const baseboard = async () => {
|
|
41
|
+
await (0, common_1.nextTick)();
|
|
42
|
+
const workload = [];
|
|
43
|
+
workload.push((0, exec_1.exec)('ioreg -c IOPlatformExpertDevice -d 2'));
|
|
44
|
+
workload.push((0, exec_1.exec)('system_profiler SPMemoryDataType -xml'));
|
|
45
|
+
const data = await Promise.allSettled(workload).then((results) => results.map((result) => (result.status === 'fulfilled' ? result.value : { stdout: '', stderr: '' })));
|
|
46
|
+
return parseBaseboardObject(data[0].stdout, data[1].stdout);
|
|
47
|
+
};
|
|
48
|
+
exports.baseboard = baseboard;
|
|
@@ -0,0 +1,65 @@
|
|
|
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 exec_1 = require("../common/exec");
|
|
7
|
+
const parseBatteryObject = (data) => {
|
|
8
|
+
const defaults = (0, common_1.cloneObj)(defaults_1.initBatteryResult);
|
|
9
|
+
data = data || '';
|
|
10
|
+
const lines = data.replace(/ +/g, '').replace(/"+/g, '').replace(/-/g, '').split('\n');
|
|
11
|
+
let percent = null;
|
|
12
|
+
const line = (0, common_1.getValue)(lines, 'internal', 'Battery');
|
|
13
|
+
const parts = line.split(';');
|
|
14
|
+
if (parts && parts[0]) {
|
|
15
|
+
const parts2 = parts[0].split('\t');
|
|
16
|
+
if (parts2 && parts2[1]) {
|
|
17
|
+
percent = parseFloat(parts2[1].trim().replace(/%/g, ''));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
const isCharging = parts && parts[1] ? parts[1].trim() === 'charging' : (0, common_1.getValue)(lines, 'ischarging', '=').toLowerCase() === 'yes';
|
|
21
|
+
const acConnected = parts && parts[1] ? parts[1].trim() !== 'discharging' : false;
|
|
22
|
+
const voltage = parseInt('0' + (0, common_1.getValue)(lines, 'voltage', '='), 10) / 1000.0;
|
|
23
|
+
const capacityUnit = voltage ? 'mWh' : 'mAh';
|
|
24
|
+
const maxCapacity = Math.round(parseInt('0' + (0, common_1.getValue)(lines, 'applerawmaxcapacity', '='), 10) * (voltage || 1));
|
|
25
|
+
const currentCapacity = Math.round(parseInt('0' + (0, common_1.getValue)(lines, 'applerawcurrentcapacity', '='), 10) * (voltage || 1));
|
|
26
|
+
const designedCapacity = Math.round(parseInt('0' + (0, common_1.getValue)(lines, 'DesignCapacity', '='), 10) * (voltage || 1));
|
|
27
|
+
let hasBattery = defaults.hasBattery;
|
|
28
|
+
let type = defaults.type;
|
|
29
|
+
let timeRemaining = defaults.timeRemaining;
|
|
30
|
+
if (maxCapacity && currentCapacity) {
|
|
31
|
+
hasBattery = true;
|
|
32
|
+
type = 'Li-ion';
|
|
33
|
+
percent = percent !== null ? percent : Math.round((100.0 * currentCapacity) / maxCapacity);
|
|
34
|
+
if (!isCharging) {
|
|
35
|
+
timeRemaining = parseInt('0' + (0, common_1.getValue)(lines, 'TimeRemaining', '='), 10);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return hasBattery
|
|
39
|
+
? [
|
|
40
|
+
{
|
|
41
|
+
...defaults,
|
|
42
|
+
cycleCount: (0, common_1.toInt)('0' + (0, common_1.getValue)(lines, 'cyclecount', '=')),
|
|
43
|
+
voltage,
|
|
44
|
+
capacityUnit,
|
|
45
|
+
maxCapacity,
|
|
46
|
+
currentCapacity,
|
|
47
|
+
designedCapacity,
|
|
48
|
+
manufacturer: 'Apple',
|
|
49
|
+
serial: (0, common_1.getValue)(lines, 'BatterySerialNumber', '=') || (0, common_1.getValue)(lines, 'Serial', '='),
|
|
50
|
+
type,
|
|
51
|
+
model: (0, common_1.getValue)(lines, 'DeviceName', '='),
|
|
52
|
+
percent,
|
|
53
|
+
timeRemaining,
|
|
54
|
+
isCharging,
|
|
55
|
+
acConnected
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
: [];
|
|
59
|
+
};
|
|
60
|
+
const battery = async () => {
|
|
61
|
+
await (0, common_1.nextTick)();
|
|
62
|
+
const { stdout } = await (0, exec_1.execSave)('ioreg -n AppleSmartBattery -r | egrep "CycleCount|IsCharging|DesignCapacity|MaxCapacity|CurrentCapacity|DeviceName|BatterySerialNumber|Serial|TimeRemaining|Voltage"; pmset -g batt | grep %');
|
|
63
|
+
return parseBatteryObject(stdout);
|
|
64
|
+
};
|
|
65
|
+
exports.battery = battery;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const bios: () => Promise<any>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bios = void 0;
|
|
4
|
+
const darwin_1 = require("./../common/darwin");
|
|
5
|
+
const common_1 = require("../common");
|
|
6
|
+
const exec_1 = require("../common/exec");
|
|
7
|
+
const defaults_1 = require("../common/defaults");
|
|
8
|
+
const getIBridgeData = async () => {
|
|
9
|
+
try {
|
|
10
|
+
const { stdout } = await (0, exec_1.exec)('system_profiler SPiBridgeDataType -xml');
|
|
11
|
+
const iBridgeData = (0, darwin_1.plistParser)(stdout);
|
|
12
|
+
if (iBridgeData && iBridgeData.length) {
|
|
13
|
+
return {
|
|
14
|
+
modelName: iBridgeData[0].ibridge_model_name || '',
|
|
15
|
+
build: iBridgeData[0].ibridge_build || '',
|
|
16
|
+
bootUuid: iBridgeData[0].ibridge_boot_uuid || '',
|
|
17
|
+
secureBoot: iBridgeData[0].ibridge_secure_boot || ''
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
catch { }
|
|
22
|
+
return null;
|
|
23
|
+
};
|
|
24
|
+
const bios = async () => {
|
|
25
|
+
await (0, common_1.nextTick)();
|
|
26
|
+
const defaults = (0, common_1.cloneObj)(defaults_1.initBios);
|
|
27
|
+
let bootRomVersion = defaults_1.initBios.version;
|
|
28
|
+
try {
|
|
29
|
+
const { stdout } = await (0, exec_1.exec)('system_profiler SPHardwareDataType -xml');
|
|
30
|
+
const hardwareData = (0, darwin_1.plistParser)(stdout);
|
|
31
|
+
if (hardwareData && hardwareData.length) {
|
|
32
|
+
bootRomVersion = hardwareData[0].boot_rom_version;
|
|
33
|
+
bootRomVersion = bootRomVersion ? bootRomVersion.split('(')[0].trim() : null;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
catch { }
|
|
37
|
+
const iBridge = await getIBridgeData();
|
|
38
|
+
return {
|
|
39
|
+
...defaults,
|
|
40
|
+
vendor: 'Apple Inc.',
|
|
41
|
+
version: bootRomVersion,
|
|
42
|
+
...(iBridge ? { iBridge } : {})
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
exports.bios = bios;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.blockDevices = void 0;
|
|
4
|
+
const defaults_1 = require("../common/defaults");
|
|
5
|
+
const index_1 = require("../common/index");
|
|
6
|
+
const exec_1 = require("../common/exec");
|
|
7
|
+
const common_1 = require("../common");
|
|
8
|
+
const const_1 = require("../common/const");
|
|
9
|
+
const parseBytes = (s) => {
|
|
10
|
+
const from = s.indexOf(' (') + 2;
|
|
11
|
+
const to = s.indexOf(' Bytes)');
|
|
12
|
+
return (0, common_1.toInt)(s.substring(from, to));
|
|
13
|
+
};
|
|
14
|
+
const getDevicesMac = (data) => {
|
|
15
|
+
const result = [];
|
|
16
|
+
data.forEach((element) => {
|
|
17
|
+
if (element.type.startsWith('disk')) {
|
|
18
|
+
result.push({ name: element.name, model: element.model, device: element.name });
|
|
19
|
+
}
|
|
20
|
+
if (element.type.startsWith('virtual')) {
|
|
21
|
+
let device = '';
|
|
22
|
+
result.forEach((e) => {
|
|
23
|
+
if (e.model === element.model) {
|
|
24
|
+
device = e.device;
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
if (device) {
|
|
28
|
+
result.push({ name: element.name, model: element.model, device });
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
const matchDevicesMac = (data) => {
|
|
35
|
+
let result = data;
|
|
36
|
+
try {
|
|
37
|
+
const devices = getDevicesMac(data);
|
|
38
|
+
result = result.map((blockdevice) => {
|
|
39
|
+
if (blockdevice.type.startsWith('part') || blockdevice.type.startsWith('disk') || blockdevice.type.startsWith('virtual')) {
|
|
40
|
+
devices.forEach((element) => {
|
|
41
|
+
if (blockdevice.name.startsWith(element.name)) {
|
|
42
|
+
blockdevice.device = element.device;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
return blockdevice;
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
catch { }
|
|
50
|
+
return result;
|
|
51
|
+
};
|
|
52
|
+
const parseDarwinDevices = (stdout) => {
|
|
53
|
+
const parts = stdout.toString().split('\n***');
|
|
54
|
+
const defaults = (0, index_1.cloneObj)(defaults_1.initFsBlockDevice);
|
|
55
|
+
const devices = [];
|
|
56
|
+
parts.forEach((part) => {
|
|
57
|
+
const lines = part.split('\n');
|
|
58
|
+
const label = (0, common_1.getValue)(lines, 'Volume Name', ':', true);
|
|
59
|
+
let physical = (0, common_1.getValue)(lines, 'Media Read-Only', ':', true) === 'Yes' ? 'CD/ DVD' : defaults.physical;
|
|
60
|
+
if ((0, common_1.getValue)(lines, 'Solid State', ':', true) === 'Yes') {
|
|
61
|
+
physical = 'SSD';
|
|
62
|
+
}
|
|
63
|
+
let deviceType = (0, common_1.getValue)(lines, 'Virtual', ':', true) === 'Yes' ? 'virtual' : defaults.type;
|
|
64
|
+
if ((0, common_1.getValue)(lines, 'Partition Type', ':', true)) {
|
|
65
|
+
deviceType = 'part';
|
|
66
|
+
}
|
|
67
|
+
const identifier = (0, common_1.getValue)(lines, 'Device Identifier', ':', true);
|
|
68
|
+
if (identifier) {
|
|
69
|
+
devices.push({
|
|
70
|
+
...defaults,
|
|
71
|
+
identifier,
|
|
72
|
+
name: (0, common_1.getValue)(lines, 'Device Node', ':', true),
|
|
73
|
+
label: label.indexOf('Not applicable') === -1 ? label : '',
|
|
74
|
+
protocol: (0, common_1.getValue)(lines, 'Protocol', ':', true),
|
|
75
|
+
size: parseBytes((0, common_1.getValue)(lines, 'Disk Size', ':', true)),
|
|
76
|
+
fsType: (0, common_1.getValue)(lines, 'File System Personality', ':', true),
|
|
77
|
+
mount: (0, common_1.getValue)(lines, 'Mount Point', ':', true),
|
|
78
|
+
uuid: (0, common_1.getValue)(lines, 'Volume UUID', ':', true),
|
|
79
|
+
physical,
|
|
80
|
+
type: deviceType,
|
|
81
|
+
removable: (0, common_1.getValue)(lines, 'Removable Media', ':', true) === 'Yes',
|
|
82
|
+
model: (0, common_1.getValue)(lines, 'Device / Media Name', ':', true),
|
|
83
|
+
group: '',
|
|
84
|
+
device: ''
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
return devices;
|
|
89
|
+
};
|
|
90
|
+
const blockDevices = async () => {
|
|
91
|
+
await (0, common_1.nextTick)();
|
|
92
|
+
try {
|
|
93
|
+
const { stdout } = await (0, exec_1.exec)('diskutil info -all', { maxBuffer: const_1.MAX_BUFFER_SIZE });
|
|
94
|
+
const data = parseDarwinDevices(stdout);
|
|
95
|
+
return matchDevicesMac(data);
|
|
96
|
+
}
|
|
97
|
+
catch {
|
|
98
|
+
return [];
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
exports.blockDevices = blockDevices;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bluetoothDevices = exports.parseBluetooth = void 0;
|
|
4
|
+
const darwin_1 = require("./../common/darwin");
|
|
5
|
+
const common_1 = require("../common");
|
|
6
|
+
const exec_1 = require("../common/exec");
|
|
7
|
+
const mappings_1 = require("../common/mappings");
|
|
8
|
+
const deviceId = (id) => {
|
|
9
|
+
return id.split(' < ')[0];
|
|
10
|
+
};
|
|
11
|
+
const parseBluetoothObjects = (bluetoothObject, macAddr2) => {
|
|
12
|
+
const typeStr = ((bluetoothObject.device_minorClassOfDevice_string || bluetoothObject.device_majorClassOfDevice_string || bluetoothObject.device_minorType || '') + (bluetoothObject.device_name || '')).toLowerCase();
|
|
13
|
+
return {
|
|
14
|
+
device: deviceId(bluetoothObject.device_productID || ''),
|
|
15
|
+
name: bluetoothObject.device_name || '',
|
|
16
|
+
manufacturer: bluetoothObject.device_manufacturer || (0, mappings_1.parseBluetoothVendor)(bluetoothObject.device_vendorID) || (0, mappings_1.bluetoothManufacturer)(bluetoothObject.device_name || '') || '',
|
|
17
|
+
macDevice: (bluetoothObject.device_addr || bluetoothObject.device_address || '').toLowerCase().replace(/-/g, ':'),
|
|
18
|
+
macHost: macAddr2,
|
|
19
|
+
batteryPercent: bluetoothObject.device_batteryPercent || null,
|
|
20
|
+
type: (0, mappings_1.bluetoothTypeLabel)(typeStr),
|
|
21
|
+
connected: bluetoothObject.device_isconnected === 'attrib_Yes' || false
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
const parseBluetooth = (outObj) => {
|
|
25
|
+
const result = [];
|
|
26
|
+
if (outObj.length && outObj[0] && outObj[0]['device_title'] && outObj[0]['device_title'].length) {
|
|
27
|
+
let macAddr2 = null;
|
|
28
|
+
if (outObj[0]['local_device_title'] && outObj[0].local_device_title.general_address) {
|
|
29
|
+
macAddr2 = outObj[0].local_device_title.general_address.toLowerCase().replace(/-/g, ':');
|
|
30
|
+
}
|
|
31
|
+
outObj[0]['device_title'].forEach((element) => {
|
|
32
|
+
const obj = element;
|
|
33
|
+
const objKey = Object.keys(obj);
|
|
34
|
+
if (objKey && objKey.length === 1) {
|
|
35
|
+
const innerObject = obj[objKey[0]];
|
|
36
|
+
innerObject.device_name = objKey[0];
|
|
37
|
+
const bluetoothDevice = parseBluetoothObjects(innerObject, macAddr2);
|
|
38
|
+
result.push(bluetoothDevice);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
if (outObj?.length && outObj[0] && outObj[0]['device_connected'] && outObj[0]['device_connected'].length) {
|
|
43
|
+
const macAddr2 = outObj[0].controller_properties?.controller_address ? outObj[0].controller_properties.controller_address.toLowerCase().replace(/-/g, ':') : null;
|
|
44
|
+
outObj[0]['device_connected'].forEach((element) => {
|
|
45
|
+
const obj = element;
|
|
46
|
+
const objKey = Object.keys(obj);
|
|
47
|
+
if (objKey && objKey.length === 1) {
|
|
48
|
+
const innerObject = obj[objKey[0]];
|
|
49
|
+
innerObject.device_name = objKey[0];
|
|
50
|
+
innerObject.device_isconnected = 'attrib_Yes';
|
|
51
|
+
const bluetoothDevice = parseBluetoothObjects(innerObject, macAddr2);
|
|
52
|
+
result.push(bluetoothDevice);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
if (outObj?.length && outObj[0] && outObj[0]['device_not_connected'] && outObj[0]['device_not_connected'].length) {
|
|
57
|
+
const macAddr2 = outObj[0].controller_properties?.controller_address ? outObj[0].controller_properties.controller_address.toLowerCase().replace(/-/g, ':') : null;
|
|
58
|
+
outObj[0]['device_not_connected'].forEach((element) => {
|
|
59
|
+
const obj = element;
|
|
60
|
+
const objKey = Object.keys(obj);
|
|
61
|
+
if (objKey && objKey.length === 1) {
|
|
62
|
+
const innerObject = obj[objKey[0]];
|
|
63
|
+
innerObject.device_name = objKey[0];
|
|
64
|
+
innerObject.device_isconnected = 'attrib_No';
|
|
65
|
+
const bluetoothDevice = parseBluetoothObjects(innerObject, macAddr2);
|
|
66
|
+
result.push(bluetoothDevice);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
return result;
|
|
71
|
+
};
|
|
72
|
+
exports.parseBluetooth = parseBluetooth;
|
|
73
|
+
const bluetoothDevices = async () => {
|
|
74
|
+
await (0, common_1.nextTick)();
|
|
75
|
+
try {
|
|
76
|
+
const { stdout } = await (0, exec_1.exec)('system_profiler SPBluetoothDataType -xml');
|
|
77
|
+
const data = (0, darwin_1.plistParser)(stdout);
|
|
78
|
+
return (0, exports.parseBluetooth)(data);
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
return [];
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
exports.bluetoothDevices = bluetoothDevices;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.camera = void 0;
|
|
4
|
+
const darwin_1 = require("../common/darwin");
|
|
5
|
+
const common_1 = require("../common");
|
|
6
|
+
const exec_1 = require("../common/exec");
|
|
7
|
+
const mappings_1 = require("../common/mappings");
|
|
8
|
+
const parseCamera = (data) => {
|
|
9
|
+
const result = [];
|
|
10
|
+
data.forEach((element) => {
|
|
11
|
+
result.push({
|
|
12
|
+
name: element._name || '',
|
|
13
|
+
vendor: element.manufacturer || (0, mappings_1.manufacturedApple)(element._name) || '',
|
|
14
|
+
model: element.model || '',
|
|
15
|
+
serial: element.serial || '',
|
|
16
|
+
connection: 'internal'
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
const parseUsb = (data) => {
|
|
22
|
+
const result = [];
|
|
23
|
+
data.forEach((part) => {
|
|
24
|
+
if (part._items) {
|
|
25
|
+
part._items.forEach((usb) => {
|
|
26
|
+
if ((0, mappings_1.usbDarwinType)(usb._name).toLowerCase().includes('camera')) {
|
|
27
|
+
result.push({
|
|
28
|
+
name: usb._name || '',
|
|
29
|
+
vendor: usb.manufacturer || '',
|
|
30
|
+
model: '' + usb.product_id,
|
|
31
|
+
serial: usb.serial || '',
|
|
32
|
+
connection: 'usb'
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
const camera = async () => {
|
|
41
|
+
await (0, common_1.nextTick)();
|
|
42
|
+
try {
|
|
43
|
+
const { stdout } = await (0, exec_1.exec)('system_profiler SPCameraDataType SPUSBDataType -xml');
|
|
44
|
+
const data = (0, darwin_1.plistParser)(stdout, false);
|
|
45
|
+
const cameraData = data.length >= 2 && data[0]._items ? data[0]._items : [];
|
|
46
|
+
const usbData = data.length >= 2 && data[1]._items ? data[1]._items : [];
|
|
47
|
+
let result = parseCamera(cameraData);
|
|
48
|
+
result = result.concat(parseUsb(usbData));
|
|
49
|
+
return result;
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
return [];
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
exports.camera = camera;
|