systeminformation 5.33.3 → 6.0.0-beta.0
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 -957
- 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 +21 -0
- package/dist/bsd/os-info.js +38 -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/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 +299 -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 +1 -0
- package/dist/common/internet.js +47 -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 +992 -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 +1 -0
- package/dist/darwin/os-info.js +110 -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 +59 -0
- package/dist/index.js +130 -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/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 +2 -0
- package/dist/linux/gpu.js +273 -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 +104 -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 +1122 -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 +2 -0
- package/dist/windows/block-devices.js +48 -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 +112 -0
- package/dist/windows/disks-io.d.ts +2 -0
- package/dist/windows/disks-io.js +43 -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 +65 -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 -1832
- 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 -1321
- 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 -2824
- package/lib/virtualbox.js +0 -116
- package/lib/wifi.js +0 -839
package/dist/versions.js
ADDED
|
@@ -0,0 +1,1122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.versions = 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 darwin_1 = require("./common/darwin");
|
|
8
|
+
const exec_1 = require("./common/exec");
|
|
9
|
+
const files_1 = require("./common/files");
|
|
10
|
+
const windows_1 = require("./common/windows");
|
|
11
|
+
const versions = async (apps) => {
|
|
12
|
+
const versionObject = {
|
|
13
|
+
kernel: (0, node_os_1.release)(),
|
|
14
|
+
openssl: '',
|
|
15
|
+
systemOpenssl: '',
|
|
16
|
+
systemOpensslLib: '',
|
|
17
|
+
node: '',
|
|
18
|
+
v8: process.versions.v8,
|
|
19
|
+
angular: '',
|
|
20
|
+
apache: '',
|
|
21
|
+
bash: '',
|
|
22
|
+
bun: '',
|
|
23
|
+
cargo: '',
|
|
24
|
+
composer: '',
|
|
25
|
+
curl: '',
|
|
26
|
+
deno: '',
|
|
27
|
+
docker: '',
|
|
28
|
+
dockerCompose: '',
|
|
29
|
+
dotnet: '',
|
|
30
|
+
fish: '',
|
|
31
|
+
gcc: '',
|
|
32
|
+
git: '',
|
|
33
|
+
go: '',
|
|
34
|
+
gradle: '',
|
|
35
|
+
grunt: '',
|
|
36
|
+
gulp: '',
|
|
37
|
+
herd: '',
|
|
38
|
+
homebrew: '',
|
|
39
|
+
java: '',
|
|
40
|
+
laravel: '',
|
|
41
|
+
maven: '',
|
|
42
|
+
mongodb: '',
|
|
43
|
+
mysql: '',
|
|
44
|
+
nginx: '',
|
|
45
|
+
npm: '',
|
|
46
|
+
perl: '',
|
|
47
|
+
php: '',
|
|
48
|
+
pip3: '',
|
|
49
|
+
pip: '',
|
|
50
|
+
pm2: '',
|
|
51
|
+
podman: '',
|
|
52
|
+
postfix: '',
|
|
53
|
+
postgresql: '',
|
|
54
|
+
powershell: '',
|
|
55
|
+
python3: '',
|
|
56
|
+
python: '',
|
|
57
|
+
redis: '',
|
|
58
|
+
ruby: '',
|
|
59
|
+
rust: '',
|
|
60
|
+
sqlite3: '',
|
|
61
|
+
tsc: '',
|
|
62
|
+
virtualbox: '',
|
|
63
|
+
vi: '',
|
|
64
|
+
vue: '',
|
|
65
|
+
yarn: '',
|
|
66
|
+
zsh: ''
|
|
67
|
+
};
|
|
68
|
+
const checkVersionParam = (apps = '') => {
|
|
69
|
+
if (apps === '*') {
|
|
70
|
+
return {
|
|
71
|
+
versions: versionObject,
|
|
72
|
+
counter: Object.keys(versionObject).length - 4
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
if (!Array.isArray(apps)) {
|
|
76
|
+
apps = apps.trim().toLowerCase().replace(/,+/g, '|').replace(/ /g, '|');
|
|
77
|
+
apps = apps.split('|');
|
|
78
|
+
}
|
|
79
|
+
const result = {
|
|
80
|
+
versions: {},
|
|
81
|
+
counter: 0
|
|
82
|
+
};
|
|
83
|
+
apps.forEach((el) => {
|
|
84
|
+
if (el) {
|
|
85
|
+
for (const key in versionObject) {
|
|
86
|
+
if (Object.keys(versionObject).includes(key)) {
|
|
87
|
+
if (key.toLowerCase() === el.toLowerCase() && !Object.keys(result.versions).includes(key)) {
|
|
88
|
+
result.versions[key] = versionObject[key];
|
|
89
|
+
if (key === 'openssl') {
|
|
90
|
+
result.versions.systemOpenssl = '';
|
|
91
|
+
result.versions.systemOpensslLib = '';
|
|
92
|
+
}
|
|
93
|
+
if (!result.versions[key]) {
|
|
94
|
+
result.counter++;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
return result;
|
|
102
|
+
};
|
|
103
|
+
return new Promise((resolve) => {
|
|
104
|
+
process.nextTick(async () => {
|
|
105
|
+
apps = apps || '*';
|
|
106
|
+
const appsObj = checkVersionParam(apps);
|
|
107
|
+
let totalFunctions = appsObj.counter;
|
|
108
|
+
if (totalFunctions <= 0) {
|
|
109
|
+
return resolve(appsObj.versions);
|
|
110
|
+
}
|
|
111
|
+
const functionProcessed = (() => () => {
|
|
112
|
+
if (--totalFunctions === 0) {
|
|
113
|
+
resolve(appsObj.versions);
|
|
114
|
+
}
|
|
115
|
+
})();
|
|
116
|
+
let cmd = '';
|
|
117
|
+
try {
|
|
118
|
+
if (Object.keys(appsObj.versions).includes('openssl')) {
|
|
119
|
+
appsObj.versions.openssl = process.versions.openssl;
|
|
120
|
+
(0, exec_1.exec)('openssl version')
|
|
121
|
+
.then((res) => {
|
|
122
|
+
if (res.stdout) {
|
|
123
|
+
const openssl_string = res.stdout.split('\n')[0].trim();
|
|
124
|
+
const openssl = openssl_string.split(' ');
|
|
125
|
+
appsObj.versions.systemOpenssl = openssl.length > 0 ? openssl[1] : openssl[0];
|
|
126
|
+
appsObj.versions.systemOpensslLib = openssl.length > 0 ? openssl[0] : 'openssl';
|
|
127
|
+
}
|
|
128
|
+
functionProcessed();
|
|
129
|
+
})
|
|
130
|
+
.catch(() => {
|
|
131
|
+
functionProcessed();
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
if (Object.keys(appsObj.versions).includes('npm')) {
|
|
135
|
+
(0, exec_1.exec)('npm -v')
|
|
136
|
+
.then((res) => {
|
|
137
|
+
if (res.stdout) {
|
|
138
|
+
appsObj.versions.npm = res.stdout.split('\n')[0];
|
|
139
|
+
}
|
|
140
|
+
functionProcessed();
|
|
141
|
+
})
|
|
142
|
+
.catch(() => {
|
|
143
|
+
functionProcessed();
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
if (Object.keys(appsObj.versions).includes('pm2')) {
|
|
147
|
+
cmd = 'pm2';
|
|
148
|
+
if (const_1.WINDOWS) {
|
|
149
|
+
cmd += '.cmd';
|
|
150
|
+
}
|
|
151
|
+
(0, exec_1.exec)(`${cmd} -v`)
|
|
152
|
+
.then((res) => {
|
|
153
|
+
if (res.stdout) {
|
|
154
|
+
const lines = res.stdout.split('\n').slice(0, -1);
|
|
155
|
+
const pm2 = lines[lines.length - 1];
|
|
156
|
+
if (!pm2.startsWith('[PM2]')) {
|
|
157
|
+
appsObj.versions.pm2 = pm2;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
functionProcessed();
|
|
161
|
+
})
|
|
162
|
+
.catch(() => {
|
|
163
|
+
functionProcessed();
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
if (Object.keys(appsObj.versions).includes('yarn')) {
|
|
167
|
+
(0, exec_1.exec)('yarn --version')
|
|
168
|
+
.then((res) => {
|
|
169
|
+
if (res.stdout) {
|
|
170
|
+
appsObj.versions.yarn = res.stdout.split('\n')[0];
|
|
171
|
+
}
|
|
172
|
+
functionProcessed();
|
|
173
|
+
})
|
|
174
|
+
.catch(() => {
|
|
175
|
+
functionProcessed();
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
if (Object.keys(appsObj.versions).includes('gulp')) {
|
|
179
|
+
cmd = 'gulp';
|
|
180
|
+
if (const_1.WINDOWS) {
|
|
181
|
+
cmd += '.cmd';
|
|
182
|
+
}
|
|
183
|
+
(0, exec_1.exec)(`${cmd} --version`)
|
|
184
|
+
.then((res) => {
|
|
185
|
+
if (res.stdout) {
|
|
186
|
+
const gulp = res.stdout.split('\n')[0] || '';
|
|
187
|
+
appsObj.versions.gulp = (gulp.toLowerCase().split('version')[1] || '').trim();
|
|
188
|
+
}
|
|
189
|
+
functionProcessed();
|
|
190
|
+
})
|
|
191
|
+
.catch(() => {
|
|
192
|
+
functionProcessed();
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
if (Object.keys(appsObj.versions).includes('homebrew')) {
|
|
196
|
+
cmd = 'brew';
|
|
197
|
+
(0, exec_1.exec)(`${cmd} --version`)
|
|
198
|
+
.then((res) => {
|
|
199
|
+
if (res.stdout) {
|
|
200
|
+
const brew = res.stdout.split('\n')[0] || '';
|
|
201
|
+
appsObj.versions.homebrew = (brew.toLowerCase().split(' ')[1] || '').trim();
|
|
202
|
+
}
|
|
203
|
+
functionProcessed();
|
|
204
|
+
})
|
|
205
|
+
.catch(() => {
|
|
206
|
+
functionProcessed();
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
if (Object.keys(appsObj.versions).includes('tsc')) {
|
|
210
|
+
cmd = 'tsc';
|
|
211
|
+
if (const_1.WINDOWS) {
|
|
212
|
+
cmd += '.cmd';
|
|
213
|
+
}
|
|
214
|
+
(0, exec_1.exec)(`${cmd} --version`)
|
|
215
|
+
.then((res) => {
|
|
216
|
+
if (res.stdout) {
|
|
217
|
+
const tsc = res.stdout.split('\n')[0] || '';
|
|
218
|
+
appsObj.versions.tsc = (tsc.toLowerCase().split('version')[1] || '').trim();
|
|
219
|
+
}
|
|
220
|
+
functionProcessed();
|
|
221
|
+
})
|
|
222
|
+
.catch(() => {
|
|
223
|
+
functionProcessed();
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
if (Object.keys(appsObj.versions).includes('grunt')) {
|
|
227
|
+
cmd = 'grunt';
|
|
228
|
+
if (const_1.WINDOWS) {
|
|
229
|
+
cmd += '.cmd';
|
|
230
|
+
}
|
|
231
|
+
(0, exec_1.exec)(`${cmd} --version`)
|
|
232
|
+
.then((res) => {
|
|
233
|
+
if (res.stdout) {
|
|
234
|
+
const grunt = res.stdout.split('\n')[0] || '';
|
|
235
|
+
appsObj.versions.grunt = (grunt.toLowerCase().split('cli v')[1] || '').trim();
|
|
236
|
+
}
|
|
237
|
+
functionProcessed();
|
|
238
|
+
})
|
|
239
|
+
.catch(() => {
|
|
240
|
+
functionProcessed();
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
if (Object.keys(appsObj.versions).includes('git')) {
|
|
244
|
+
if (const_1.DARWIN) {
|
|
245
|
+
const gitHomebrewExists = (await (0, files_1.fileExists)('/usr/local/Cellar/git')) || (await (0, files_1.fileExists)('/opt/homebrew/bin/git'));
|
|
246
|
+
if ((await (0, darwin_1.darwinXcodeExists)()) || gitHomebrewExists) {
|
|
247
|
+
(0, exec_1.exec)('git --version')
|
|
248
|
+
.then((res) => {
|
|
249
|
+
if (res.stdout) {
|
|
250
|
+
let git = res.stdout.split('\n')[0] || '';
|
|
251
|
+
git = (git.toLowerCase().split('version')[1] || '').trim();
|
|
252
|
+
appsObj.versions.git = (git.split(' ')[0] || '').trim();
|
|
253
|
+
}
|
|
254
|
+
functionProcessed();
|
|
255
|
+
})
|
|
256
|
+
.catch(() => {
|
|
257
|
+
functionProcessed();
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
else {
|
|
261
|
+
functionProcessed();
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
else {
|
|
265
|
+
(0, exec_1.exec)('git --version')
|
|
266
|
+
.then((res) => {
|
|
267
|
+
if (res.stdout) {
|
|
268
|
+
let git = res.stdout.split('\n')[0] || '';
|
|
269
|
+
git = (git.toLowerCase().split('version')[1] || '').trim();
|
|
270
|
+
appsObj.versions.git = (git.split(' ')[0] || '').trim();
|
|
271
|
+
}
|
|
272
|
+
functionProcessed();
|
|
273
|
+
})
|
|
274
|
+
.catch(() => {
|
|
275
|
+
functionProcessed();
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
if (Object.keys(appsObj.versions).includes('apache')) {
|
|
280
|
+
(0, exec_1.exec)('apachectl -v 2>&1')
|
|
281
|
+
.then((res) => {
|
|
282
|
+
if (res.stdout) {
|
|
283
|
+
const apache = (res.stdout.split('\n')[0] || '').split(':');
|
|
284
|
+
appsObj.versions.apache = apache.length > 1 ? apache[1].replace('Apache', '').replace('/', '').split('(')[0].trim() : '';
|
|
285
|
+
}
|
|
286
|
+
functionProcessed();
|
|
287
|
+
})
|
|
288
|
+
.catch(() => {
|
|
289
|
+
functionProcessed();
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
if (Object.keys(appsObj.versions).includes('nginx')) {
|
|
293
|
+
(0, exec_1.exec)('nginx -v 2>&1')
|
|
294
|
+
.then((res) => {
|
|
295
|
+
if (res.stdout) {
|
|
296
|
+
const nginx = res.stdout.split('\n')[0] || '';
|
|
297
|
+
appsObj.versions.nginx = (nginx.toLowerCase().split('/')[1] || '').trim();
|
|
298
|
+
}
|
|
299
|
+
functionProcessed();
|
|
300
|
+
})
|
|
301
|
+
.catch(() => {
|
|
302
|
+
functionProcessed();
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
if (Object.keys(appsObj.versions).includes('mysql')) {
|
|
306
|
+
(0, exec_1.exec)('mysql -V')
|
|
307
|
+
.then((res) => {
|
|
308
|
+
if (res.stdout) {
|
|
309
|
+
let mysql = res.stdout.split('\n')[0] || '';
|
|
310
|
+
mysql = mysql.toLowerCase();
|
|
311
|
+
if (mysql.indexOf(',') > -1) {
|
|
312
|
+
mysql = (mysql.split(',')[0] || '').trim();
|
|
313
|
+
const parts = mysql.split(' ');
|
|
314
|
+
appsObj.versions.mysql = (parts[parts.length - 1] || '').trim();
|
|
315
|
+
}
|
|
316
|
+
else {
|
|
317
|
+
if (mysql.indexOf(' ver ') > -1) {
|
|
318
|
+
mysql = mysql.split(' ver ')[1];
|
|
319
|
+
appsObj.versions.mysql = mysql.split(' ')[0];
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
functionProcessed();
|
|
324
|
+
})
|
|
325
|
+
.catch(() => {
|
|
326
|
+
functionProcessed();
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
if (Object.keys(appsObj.versions).includes('php')) {
|
|
330
|
+
(0, exec_1.exec)('php -v')
|
|
331
|
+
.then((res) => {
|
|
332
|
+
if (res.stdout) {
|
|
333
|
+
const php = res.stdout.split('\n')[0] || '';
|
|
334
|
+
let parts = php.split('(');
|
|
335
|
+
if (parts[0].indexOf('-')) {
|
|
336
|
+
parts = parts[0].split('-');
|
|
337
|
+
}
|
|
338
|
+
appsObj.versions.php = parts[0].replace(/[^0-9.]/g, '');
|
|
339
|
+
}
|
|
340
|
+
functionProcessed();
|
|
341
|
+
})
|
|
342
|
+
.catch(() => {
|
|
343
|
+
functionProcessed();
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
if (Object.keys(appsObj.versions).includes('redis')) {
|
|
347
|
+
(0, exec_1.exec)('redis-server --version')
|
|
348
|
+
.then((res) => {
|
|
349
|
+
if (res.stdout) {
|
|
350
|
+
const redis = res.stdout.split('\n')[0] || '';
|
|
351
|
+
const parts = redis.split(' ');
|
|
352
|
+
appsObj.versions.redis = (0, common_1.getValue)(parts, 'v', '=', true);
|
|
353
|
+
}
|
|
354
|
+
functionProcessed();
|
|
355
|
+
})
|
|
356
|
+
.catch(() => {
|
|
357
|
+
functionProcessed();
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
if (Object.keys(appsObj.versions).includes('docker')) {
|
|
361
|
+
(0, exec_1.exec)('docker --version')
|
|
362
|
+
.then((res) => {
|
|
363
|
+
if (res.stdout) {
|
|
364
|
+
const docker = res.stdout.split('\n')[0] || '';
|
|
365
|
+
const parts = docker.split(' ');
|
|
366
|
+
appsObj.versions.docker = parts.length > 2 && parts[2].endsWith(',') ? parts[2].slice(0, -1) : '';
|
|
367
|
+
}
|
|
368
|
+
functionProcessed();
|
|
369
|
+
})
|
|
370
|
+
.catch(() => {
|
|
371
|
+
functionProcessed();
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
if (Object.keys(appsObj.versions).includes('podman')) {
|
|
375
|
+
(0, exec_1.exec)('podman --version')
|
|
376
|
+
.then((res) => {
|
|
377
|
+
if (res.stdout) {
|
|
378
|
+
const podman = res.stdout.split('\n')[0] || '';
|
|
379
|
+
const parts = podman.split(' ');
|
|
380
|
+
appsObj.versions.podman = parts.length > 2 ? parts[2] : '';
|
|
381
|
+
}
|
|
382
|
+
functionProcessed();
|
|
383
|
+
})
|
|
384
|
+
.catch(() => {
|
|
385
|
+
functionProcessed();
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
if (Object.keys(appsObj.versions).includes('postfix')) {
|
|
389
|
+
(0, exec_1.exec)('postconf -d | grep mail_version')
|
|
390
|
+
.then((res) => {
|
|
391
|
+
if (res.stdout) {
|
|
392
|
+
const postfix = res.stdout.split('\n') || [];
|
|
393
|
+
appsObj.versions.postfix = (0, common_1.getValue)(postfix, 'mail_version', '=', true);
|
|
394
|
+
}
|
|
395
|
+
functionProcessed();
|
|
396
|
+
})
|
|
397
|
+
.catch(() => {
|
|
398
|
+
functionProcessed();
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
if (Object.keys(appsObj.versions).includes('mongodb')) {
|
|
402
|
+
(0, exec_1.exec)('mongod --version')
|
|
403
|
+
.then((res) => {
|
|
404
|
+
if (res.stdout) {
|
|
405
|
+
const mongodb = res.stdout.split('\n')[0] || '';
|
|
406
|
+
appsObj.versions.mongodb = (mongodb.toLowerCase().split(',')[0] || '').replace(/[^0-9.]/g, '');
|
|
407
|
+
}
|
|
408
|
+
functionProcessed();
|
|
409
|
+
})
|
|
410
|
+
.catch(() => {
|
|
411
|
+
functionProcessed();
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
if (Object.keys(appsObj.versions).includes('postgresql')) {
|
|
415
|
+
if (const_1.LINUX) {
|
|
416
|
+
(0, exec_1.exec)('locate bin/postgres')
|
|
417
|
+
.then((res) => {
|
|
418
|
+
const postgresqlBin = res.stdout.split('\n').sort();
|
|
419
|
+
if (postgresqlBin.length) {
|
|
420
|
+
(0, exec_1.exec)(postgresqlBin[postgresqlBin.length - 1] + ' -V')
|
|
421
|
+
.then((res) => {
|
|
422
|
+
if (res.stdout) {
|
|
423
|
+
const postgresql = res.stdout.split('\n')[0].split(' ') || [];
|
|
424
|
+
appsObj.versions.postgresql = postgresql.length ? postgresql[postgresql.length - 1] : '';
|
|
425
|
+
}
|
|
426
|
+
functionProcessed();
|
|
427
|
+
})
|
|
428
|
+
.catch(() => {
|
|
429
|
+
functionProcessed();
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
else {
|
|
433
|
+
functionProcessed();
|
|
434
|
+
}
|
|
435
|
+
})
|
|
436
|
+
.catch(() => {
|
|
437
|
+
(0, exec_1.exec)('psql -V')
|
|
438
|
+
.then((res) => {
|
|
439
|
+
const postgresql = res.stdout.split('\n')[0].split(' ') || [];
|
|
440
|
+
appsObj.versions.postgresql = postgresql.length ? postgresql[postgresql.length - 1] : '';
|
|
441
|
+
appsObj.versions.postgresql = appsObj.versions.postgresql.split('-')[0];
|
|
442
|
+
functionProcessed();
|
|
443
|
+
})
|
|
444
|
+
.catch(() => {
|
|
445
|
+
functionProcessed();
|
|
446
|
+
});
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
else {
|
|
450
|
+
if (const_1.WINDOWS) {
|
|
451
|
+
windows_1.ps.exec('Get-CimInstance Win32_Service | select caption | fl')
|
|
452
|
+
.then((stdout) => {
|
|
453
|
+
const serviceSections = (stdout ? stdout.toString() : '').split(/\n\s*\n/);
|
|
454
|
+
serviceSections.forEach((item) => {
|
|
455
|
+
const lines = item.trim().split('\r\n');
|
|
456
|
+
const srvCaption = (0, common_1.getValue)(lines, 'caption', ':', true).toLowerCase();
|
|
457
|
+
if (srvCaption.indexOf('postgresql') > -1) {
|
|
458
|
+
const parts = srvCaption.split(' server ');
|
|
459
|
+
if (parts.length > 1) {
|
|
460
|
+
appsObj.versions.postgresql = parts[1];
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
});
|
|
464
|
+
functionProcessed();
|
|
465
|
+
})
|
|
466
|
+
.catch(() => {
|
|
467
|
+
functionProcessed();
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
else {
|
|
471
|
+
(0, exec_1.exec)('postgres -V')
|
|
472
|
+
.then((res) => {
|
|
473
|
+
if (res.stdout) {
|
|
474
|
+
const postgresql = res.stdout.split('\n')[0].split(' ') || [];
|
|
475
|
+
appsObj.versions.postgresql = postgresql.length ? postgresql[postgresql.length - 1] : '';
|
|
476
|
+
if (appsObj.versions.postgresql.includes('(') && postgresql.length >= 2 && !postgresql[postgresql.length - 2].includes('(')) {
|
|
477
|
+
appsObj.versions.postgresql = postgresql[postgresql.length - 2];
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
functionProcessed();
|
|
481
|
+
})
|
|
482
|
+
.catch(() => {
|
|
483
|
+
(0, exec_1.exec)('pg_config --version 2> /dev/null')
|
|
484
|
+
.then((res) => {
|
|
485
|
+
if (res.stdout) {
|
|
486
|
+
const postgresql = res.stdout.toString().split('\n')[0].split(' ') || [];
|
|
487
|
+
appsObj.versions.postgresql = postgresql.length ? postgresql[postgresql.length - 1] : '';
|
|
488
|
+
if (appsObj.versions.postgresql.includes('(') && postgresql.length >= 2 && !postgresql[postgresql.length - 2].includes('(')) {
|
|
489
|
+
appsObj.versions.postgresql = postgresql[postgresql.length - 2];
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
})
|
|
493
|
+
.catch(() => { })
|
|
494
|
+
.finally(() => {
|
|
495
|
+
functionProcessed();
|
|
496
|
+
});
|
|
497
|
+
});
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
if (Object.keys(appsObj.versions).includes('perl')) {
|
|
502
|
+
(0, exec_1.exec)('perl -v')
|
|
503
|
+
.then((res) => {
|
|
504
|
+
if (res.stdout) {
|
|
505
|
+
let perl = res.stdout.split('\n') || '';
|
|
506
|
+
while (perl.length > 0 && perl[0].trim() === '') {
|
|
507
|
+
perl = perl.splice(1);
|
|
508
|
+
}
|
|
509
|
+
if (perl.length > 0) {
|
|
510
|
+
appsObj.versions.perl = (perl[0].split('(').pop() || '').split(')')[0].replace('v', '');
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
functionProcessed();
|
|
514
|
+
})
|
|
515
|
+
.catch(() => {
|
|
516
|
+
functionProcessed();
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
if (Object.keys(appsObj.versions).includes('python')) {
|
|
520
|
+
if (const_1.DARWIN) {
|
|
521
|
+
const { stdout } = await (0, exec_1.execSave)('sw_vers');
|
|
522
|
+
const lines = stdout.split('\n');
|
|
523
|
+
const osVersion = (0, common_1.getValue)(lines, 'ProductVersion', ':');
|
|
524
|
+
const pythonHomebrewExists1 = await (0, files_1.fileExists)('/usr/local/Cellar/python');
|
|
525
|
+
const pythonHomebrewExists2 = await (0, files_1.fileExists)('/opt/homebrew/bin/python');
|
|
526
|
+
if (((await (0, darwin_1.darwinXcodeExists)()) && (0, common_1.semverCompare)('12.0.1', osVersion) < 0) || pythonHomebrewExists1 || pythonHomebrewExists2) {
|
|
527
|
+
const cmd = pythonHomebrewExists1 ? '/usr/local/Cellar/python -V 2>&1' : pythonHomebrewExists2 ? '/opt/homebrew/bin/python -V 2>&1' : 'python -V 2>&1';
|
|
528
|
+
(0, exec_1.exec)(cmd)
|
|
529
|
+
.then((res) => {
|
|
530
|
+
if (res.stdout) {
|
|
531
|
+
const python = res.stdout.split('\n')[0] || '';
|
|
532
|
+
appsObj.versions.python = python.toLowerCase().replace('python', '').trim();
|
|
533
|
+
}
|
|
534
|
+
functionProcessed();
|
|
535
|
+
})
|
|
536
|
+
.catch(() => {
|
|
537
|
+
functionProcessed();
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
else {
|
|
541
|
+
functionProcessed();
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
else {
|
|
545
|
+
(0, exec_1.exec)('python -V 2>&1')
|
|
546
|
+
.then((res) => {
|
|
547
|
+
if (res.stdout) {
|
|
548
|
+
const python = res.stdout.split('\n')[0] || '';
|
|
549
|
+
appsObj.versions.python = python.toLowerCase().replace('python', '').trim();
|
|
550
|
+
}
|
|
551
|
+
functionProcessed();
|
|
552
|
+
})
|
|
553
|
+
.catch(() => {
|
|
554
|
+
functionProcessed();
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
if (Object.keys(appsObj.versions).includes('python3')) {
|
|
559
|
+
if (const_1.DARWIN) {
|
|
560
|
+
const pythonHomebrewExists = (await (0, files_1.fileExists)('/usr/local/Cellar/python3')) || (await (0, files_1.fileExists)('/opt/homebrew/bin/python3'));
|
|
561
|
+
if ((await (0, darwin_1.darwinXcodeExists)()) || pythonHomebrewExists) {
|
|
562
|
+
(0, exec_1.exec)('python3 -V 2>&1')
|
|
563
|
+
.then((res) => {
|
|
564
|
+
if (res.stdout) {
|
|
565
|
+
const python = res.stdout.split('\n')[0] || '';
|
|
566
|
+
appsObj.versions.python3 = python.toLowerCase().replace('python', '').trim();
|
|
567
|
+
}
|
|
568
|
+
functionProcessed();
|
|
569
|
+
})
|
|
570
|
+
.catch(() => {
|
|
571
|
+
functionProcessed();
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
else {
|
|
575
|
+
functionProcessed();
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
else {
|
|
579
|
+
(0, exec_1.exec)('python3 -V 2>&1')
|
|
580
|
+
.then((res) => {
|
|
581
|
+
if (res.stdout) {
|
|
582
|
+
const python = res.stdout.split('\n')[0] || '';
|
|
583
|
+
appsObj.versions.python3 = python.toLowerCase().replace('python', '').trim();
|
|
584
|
+
}
|
|
585
|
+
functionProcessed();
|
|
586
|
+
})
|
|
587
|
+
.catch(() => {
|
|
588
|
+
functionProcessed();
|
|
589
|
+
});
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
if (Object.keys(appsObj.versions).includes('pip')) {
|
|
593
|
+
if (const_1.DARWIN) {
|
|
594
|
+
const pipHomebrewExists = (await (0, files_1.fileExists)('/usr/local/Cellar/pip')) || (await (0, files_1.fileExists)('/opt/homebrew/bin/pip'));
|
|
595
|
+
if ((await (0, darwin_1.darwinXcodeExists)()) || pipHomebrewExists) {
|
|
596
|
+
(0, exec_1.exec)('pip -V 2>&1')
|
|
597
|
+
.then((res) => {
|
|
598
|
+
if (res.stdout) {
|
|
599
|
+
const pip = res.stdout.split('\n')[0] || '';
|
|
600
|
+
const parts = pip.split(' ');
|
|
601
|
+
appsObj.versions.pip = parts.length >= 2 ? parts[1] : '';
|
|
602
|
+
}
|
|
603
|
+
functionProcessed();
|
|
604
|
+
})
|
|
605
|
+
.catch(() => {
|
|
606
|
+
functionProcessed();
|
|
607
|
+
});
|
|
608
|
+
}
|
|
609
|
+
else {
|
|
610
|
+
functionProcessed();
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
else {
|
|
614
|
+
(0, exec_1.exec)('pip -V 2>&1')
|
|
615
|
+
.then((res) => {
|
|
616
|
+
if (res.stdout) {
|
|
617
|
+
const pip = res.stdout.split('\n')[0] || '';
|
|
618
|
+
const parts = pip.split(' ');
|
|
619
|
+
appsObj.versions.pip = parts.length >= 2 ? parts[1] : '';
|
|
620
|
+
}
|
|
621
|
+
functionProcessed();
|
|
622
|
+
})
|
|
623
|
+
.catch(() => {
|
|
624
|
+
functionProcessed();
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
if (Object.keys(appsObj.versions).includes('pip3')) {
|
|
629
|
+
if (const_1.DARWIN) {
|
|
630
|
+
const pipHomebrewExists = (await (0, files_1.fileExists)('/usr/local/Cellar/pip3')) || (await (0, files_1.fileExists)('/opt/homebrew/bin/pip3'));
|
|
631
|
+
if ((await (0, darwin_1.darwinXcodeExists)()) || pipHomebrewExists) {
|
|
632
|
+
(0, exec_1.exec)('pip3 -V 2>&1')
|
|
633
|
+
.then((res) => {
|
|
634
|
+
if (res.stdout) {
|
|
635
|
+
const pip = res.stdout.split('\n')[0] || '';
|
|
636
|
+
const parts = pip.split(' ');
|
|
637
|
+
appsObj.versions.pip3 = parts.length >= 2 ? parts[1] : '';
|
|
638
|
+
}
|
|
639
|
+
functionProcessed();
|
|
640
|
+
})
|
|
641
|
+
.catch(() => {
|
|
642
|
+
functionProcessed();
|
|
643
|
+
});
|
|
644
|
+
}
|
|
645
|
+
else {
|
|
646
|
+
functionProcessed();
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
else {
|
|
650
|
+
(0, exec_1.exec)('pip3 -V 2>&1')
|
|
651
|
+
.then((res) => {
|
|
652
|
+
if (res.stdout) {
|
|
653
|
+
const pip = res.stdout.split('\n')[0] || '';
|
|
654
|
+
const parts = pip.split(' ');
|
|
655
|
+
appsObj.versions.pip3 = parts.length >= 2 ? parts[1] : '';
|
|
656
|
+
}
|
|
657
|
+
functionProcessed();
|
|
658
|
+
})
|
|
659
|
+
.catch(() => {
|
|
660
|
+
functionProcessed();
|
|
661
|
+
});
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
if (Object.keys(appsObj.versions).includes('java')) {
|
|
665
|
+
if (const_1.DARWIN) {
|
|
666
|
+
(0, exec_1.exec)('/usr/libexec/java_home -V 2>&1')
|
|
667
|
+
.then((res) => {
|
|
668
|
+
if (res.stdout && res.stdout.toLowerCase().indexOf('no java runtime') === -1) {
|
|
669
|
+
(0, exec_1.exec)('java -version 2>&1')
|
|
670
|
+
.then((res) => {
|
|
671
|
+
if (res.stdout) {
|
|
672
|
+
const java = res.stdout.split('\n')[0] || '';
|
|
673
|
+
const parts = java.split('"');
|
|
674
|
+
appsObj.versions.java = parts.length === 3 ? parts[1].trim() : '';
|
|
675
|
+
}
|
|
676
|
+
functionProcessed();
|
|
677
|
+
})
|
|
678
|
+
.catch(() => {
|
|
679
|
+
functionProcessed();
|
|
680
|
+
});
|
|
681
|
+
}
|
|
682
|
+
else {
|
|
683
|
+
functionProcessed();
|
|
684
|
+
}
|
|
685
|
+
})
|
|
686
|
+
.catch(() => {
|
|
687
|
+
functionProcessed();
|
|
688
|
+
});
|
|
689
|
+
}
|
|
690
|
+
else {
|
|
691
|
+
(0, exec_1.exec)('java -version 2>&1')
|
|
692
|
+
.then((res) => {
|
|
693
|
+
if (res.stdout) {
|
|
694
|
+
const java = res.stdout.split('\n')[0] || '';
|
|
695
|
+
const parts = java.split('"');
|
|
696
|
+
appsObj.versions.java = parts.length === 3 ? parts[1].trim() : '';
|
|
697
|
+
}
|
|
698
|
+
functionProcessed();
|
|
699
|
+
})
|
|
700
|
+
.catch(() => {
|
|
701
|
+
functionProcessed();
|
|
702
|
+
});
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
if (Object.keys(appsObj.versions).includes('gcc')) {
|
|
706
|
+
if ((const_1.DARWIN && (await (0, darwin_1.darwinXcodeExists)())) || !const_1.DARWIN) {
|
|
707
|
+
(0, exec_1.exec)('gcc -dumpversion')
|
|
708
|
+
.then((res) => {
|
|
709
|
+
if (res.stdout) {
|
|
710
|
+
appsObj.versions.gcc = res.stdout.split('\n')[0].trim() || '';
|
|
711
|
+
}
|
|
712
|
+
if (appsObj.versions.gcc.indexOf('.') > -1) {
|
|
713
|
+
functionProcessed();
|
|
714
|
+
}
|
|
715
|
+
else {
|
|
716
|
+
(0, exec_1.exec)('gcc --version')
|
|
717
|
+
.then((res) => {
|
|
718
|
+
if (res.stdout) {
|
|
719
|
+
const gcc = res.stdout.split('\n')[0].trim();
|
|
720
|
+
if (gcc.indexOf('gcc') > -1 && gcc.indexOf(')') > -1) {
|
|
721
|
+
const parts = gcc.split(')');
|
|
722
|
+
appsObj.versions.gcc = parts[1].trim() || appsObj.versions.gcc;
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
functionProcessed();
|
|
726
|
+
})
|
|
727
|
+
.catch(() => {
|
|
728
|
+
functionProcessed();
|
|
729
|
+
});
|
|
730
|
+
}
|
|
731
|
+
})
|
|
732
|
+
.catch(() => {
|
|
733
|
+
functionProcessed();
|
|
734
|
+
});
|
|
735
|
+
}
|
|
736
|
+
else {
|
|
737
|
+
functionProcessed();
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
if (Object.keys(appsObj.versions).includes('virtualbox')) {
|
|
741
|
+
(0, exec_1.exec)(const_1.VBOXMANAGE + ' -v 2>&1')
|
|
742
|
+
.then((res) => {
|
|
743
|
+
if (res.stdout) {
|
|
744
|
+
const vbox = res.stdout.split('\n')[0] || '';
|
|
745
|
+
const parts = vbox.split('r');
|
|
746
|
+
appsObj.versions.virtualbox = parts[0];
|
|
747
|
+
}
|
|
748
|
+
functionProcessed();
|
|
749
|
+
})
|
|
750
|
+
.catch(() => {
|
|
751
|
+
functionProcessed();
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
if (Object.keys(appsObj.versions).includes('bash')) {
|
|
755
|
+
(0, exec_1.exec)('bash --version')
|
|
756
|
+
.then((res) => {
|
|
757
|
+
if (res.stdout) {
|
|
758
|
+
const line = res.stdout.split('\n')[0];
|
|
759
|
+
const parts = line.split(' version ');
|
|
760
|
+
if (parts.length > 1) {
|
|
761
|
+
appsObj.versions.bash = parts[1].split(' ')[0].split('(')[0];
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
functionProcessed();
|
|
765
|
+
})
|
|
766
|
+
.catch(() => {
|
|
767
|
+
functionProcessed();
|
|
768
|
+
});
|
|
769
|
+
}
|
|
770
|
+
if (Object.keys(appsObj.versions).includes('zsh')) {
|
|
771
|
+
(0, exec_1.exec)('zsh --version')
|
|
772
|
+
.then((res) => {
|
|
773
|
+
if (res.stdout) {
|
|
774
|
+
const line = res.stdout.split('\n')[0];
|
|
775
|
+
const parts = line.split('zsh ');
|
|
776
|
+
if (parts.length > 1) {
|
|
777
|
+
appsObj.versions.zsh = parts[1].split(' ')[0];
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
functionProcessed();
|
|
781
|
+
})
|
|
782
|
+
.catch(() => {
|
|
783
|
+
functionProcessed();
|
|
784
|
+
});
|
|
785
|
+
}
|
|
786
|
+
if (Object.keys(appsObj.versions).includes('fish')) {
|
|
787
|
+
(0, exec_1.exec)('fish --version')
|
|
788
|
+
.then((res) => {
|
|
789
|
+
if (res.stdout) {
|
|
790
|
+
const line = res.stdout.split('\n')[0];
|
|
791
|
+
const parts = line.split(' version ');
|
|
792
|
+
if (parts.length > 1) {
|
|
793
|
+
appsObj.versions.fish = parts[1].split(' ')[0];
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
functionProcessed();
|
|
797
|
+
})
|
|
798
|
+
.catch(() => {
|
|
799
|
+
functionProcessed();
|
|
800
|
+
});
|
|
801
|
+
}
|
|
802
|
+
if (Object.keys(appsObj.versions).includes('powershell')) {
|
|
803
|
+
if (const_1.WINDOWS) {
|
|
804
|
+
windows_1.ps.exec('$PSVersionTable')
|
|
805
|
+
.then((stdout) => {
|
|
806
|
+
const lines = (stdout ? stdout.toString() : '')
|
|
807
|
+
.toLowerCase()
|
|
808
|
+
.split('\n')
|
|
809
|
+
.map((line) => line.replace(/ +/g, ' ').replace(/ +/g, ':'));
|
|
810
|
+
appsObj.versions.powershell = (0, common_1.getValue)(lines, 'psversion');
|
|
811
|
+
functionProcessed();
|
|
812
|
+
})
|
|
813
|
+
.catch(() => {
|
|
814
|
+
functionProcessed();
|
|
815
|
+
});
|
|
816
|
+
}
|
|
817
|
+
else {
|
|
818
|
+
functionProcessed();
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
if (Object.keys(appsObj.versions).includes('dotnet')) {
|
|
822
|
+
if (const_1.WINDOWS) {
|
|
823
|
+
windows_1.ps.exec('gci "HKLM:\\SOFTWARE\\Microsoft\\NET Framework Setup\\NDP" -recurse | gp -name Version,Release -EA 0 | where { $_.PSChildName -match "^(?!S)\\p{L}"} | select PSChildName, Version, Release')
|
|
824
|
+
.then((stdout) => {
|
|
825
|
+
const lines = (stdout ? stdout.toString() : '').split('\r\n');
|
|
826
|
+
let dotnet = '';
|
|
827
|
+
lines.forEach((line) => {
|
|
828
|
+
line = line.replace(/ +/g, ' ');
|
|
829
|
+
const parts = line.split(' ');
|
|
830
|
+
dotnet =
|
|
831
|
+
dotnet ||
|
|
832
|
+
(parts[0].toLowerCase().startsWith('client') && parts.length > 2 ? parts[1].trim() : parts[0].toLowerCase().startsWith('full') && parts.length > 2 ? parts[1].trim() : '');
|
|
833
|
+
});
|
|
834
|
+
appsObj.versions.dotnet = dotnet.trim();
|
|
835
|
+
functionProcessed();
|
|
836
|
+
})
|
|
837
|
+
.catch(() => {
|
|
838
|
+
functionProcessed();
|
|
839
|
+
});
|
|
840
|
+
}
|
|
841
|
+
else {
|
|
842
|
+
functionProcessed();
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
if (Object.keys(appsObj.versions).includes('vue')) {
|
|
846
|
+
(0, exec_1.exec)('vue --version')
|
|
847
|
+
.then((res) => {
|
|
848
|
+
if (res.stdout) {
|
|
849
|
+
const line = res.stdout.split('\n')[0];
|
|
850
|
+
const parts = line.split(' ');
|
|
851
|
+
if (parts.length > 1) {
|
|
852
|
+
appsObj.versions.vue = parts[1];
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
functionProcessed();
|
|
856
|
+
})
|
|
857
|
+
.catch(() => {
|
|
858
|
+
functionProcessed();
|
|
859
|
+
});
|
|
860
|
+
}
|
|
861
|
+
if (Object.keys(appsObj.versions).includes('angular')) {
|
|
862
|
+
(0, exec_1.exec)('ng version')
|
|
863
|
+
.then((res) => {
|
|
864
|
+
if (res.stdout) {
|
|
865
|
+
const lines = res.stdout.split('\n');
|
|
866
|
+
lines.forEach((line) => {
|
|
867
|
+
if (line.toLowerCase().startsWith('angular cli')) {
|
|
868
|
+
const parts = line.split(':');
|
|
869
|
+
if (parts.length > 1) {
|
|
870
|
+
appsObj.versions.angular = parts[1].trim();
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
});
|
|
874
|
+
}
|
|
875
|
+
functionProcessed();
|
|
876
|
+
})
|
|
877
|
+
.catch(() => {
|
|
878
|
+
functionProcessed();
|
|
879
|
+
});
|
|
880
|
+
}
|
|
881
|
+
if (Object.keys(appsObj.versions).includes('rust')) {
|
|
882
|
+
(0, exec_1.exec)('rustc --version')
|
|
883
|
+
.then((res) => {
|
|
884
|
+
if (res.stdout) {
|
|
885
|
+
const line = res.stdout.split('\n')[0];
|
|
886
|
+
const parts = line.split(' ');
|
|
887
|
+
if (parts.length > 1) {
|
|
888
|
+
appsObj.versions.rust = parts[1].trim();
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
functionProcessed();
|
|
892
|
+
})
|
|
893
|
+
.catch(() => {
|
|
894
|
+
functionProcessed();
|
|
895
|
+
});
|
|
896
|
+
}
|
|
897
|
+
if (Object.keys(appsObj.versions).includes('go')) {
|
|
898
|
+
(0, exec_1.exec)('go version')
|
|
899
|
+
.then((res) => {
|
|
900
|
+
if (res.stdout) {
|
|
901
|
+
const line = res.stdout.split('\n')[0];
|
|
902
|
+
const parts = line.split(' ');
|
|
903
|
+
if (parts.length > 2) {
|
|
904
|
+
appsObj.versions.go = parts[2].trim();
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
functionProcessed();
|
|
908
|
+
})
|
|
909
|
+
.catch(() => {
|
|
910
|
+
functionProcessed();
|
|
911
|
+
});
|
|
912
|
+
}
|
|
913
|
+
if (Object.keys(appsObj.versions).includes('maven')) {
|
|
914
|
+
(0, exec_1.exec)('mvn --version')
|
|
915
|
+
.then((res) => {
|
|
916
|
+
if (res.stdout) {
|
|
917
|
+
const line = res.stdout.split('\n')[0];
|
|
918
|
+
const parts = line.split(' ');
|
|
919
|
+
if (parts.length > 2) {
|
|
920
|
+
appsObj.versions.maven = parts[2].trim();
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
functionProcessed();
|
|
924
|
+
})
|
|
925
|
+
.catch(() => {
|
|
926
|
+
functionProcessed();
|
|
927
|
+
});
|
|
928
|
+
}
|
|
929
|
+
if (Object.keys(appsObj.versions).includes('gradle')) {
|
|
930
|
+
(0, exec_1.exec)('gradle -v')
|
|
931
|
+
.then((res) => {
|
|
932
|
+
if (res.stdout) {
|
|
933
|
+
const lines = res.stdout.split('\n');
|
|
934
|
+
lines.forEach((line) => {
|
|
935
|
+
if (line.toLowerCase().startsWith('gradle')) {
|
|
936
|
+
const parts = line.split(' ');
|
|
937
|
+
if (parts.length >= 2) {
|
|
938
|
+
appsObj.versions.gradle = parts[1].trim();
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
});
|
|
942
|
+
}
|
|
943
|
+
functionProcessed();
|
|
944
|
+
})
|
|
945
|
+
.catch(() => {
|
|
946
|
+
functionProcessed();
|
|
947
|
+
});
|
|
948
|
+
}
|
|
949
|
+
if (Object.keys(appsObj.versions).includes('dockerCompose')) {
|
|
950
|
+
(0, exec_1.exec)('docker-compose -v')
|
|
951
|
+
.then((res) => {
|
|
952
|
+
if (res.stdout) {
|
|
953
|
+
const line = res.stdout.split('\n')[0];
|
|
954
|
+
const parts = line.split('version ');
|
|
955
|
+
appsObj.versions.dockerCompose = parts.length > 1 ? parts[1].trim() : '';
|
|
956
|
+
}
|
|
957
|
+
functionProcessed();
|
|
958
|
+
})
|
|
959
|
+
.catch(() => {
|
|
960
|
+
functionProcessed();
|
|
961
|
+
});
|
|
962
|
+
}
|
|
963
|
+
if (Object.keys(appsObj.versions).includes('bun')) {
|
|
964
|
+
(0, exec_1.exec)('bun -v')
|
|
965
|
+
.then((res) => {
|
|
966
|
+
if (res.stdout) {
|
|
967
|
+
const line = res.stdout.split('\n')[0];
|
|
968
|
+
appsObj.versions.bun = line.trim();
|
|
969
|
+
}
|
|
970
|
+
functionProcessed();
|
|
971
|
+
})
|
|
972
|
+
.catch(() => {
|
|
973
|
+
functionProcessed();
|
|
974
|
+
});
|
|
975
|
+
}
|
|
976
|
+
if (Object.keys(appsObj.versions).includes('deno')) {
|
|
977
|
+
(0, exec_1.exec)('deno -v')
|
|
978
|
+
.then((res) => {
|
|
979
|
+
if (res.stdout) {
|
|
980
|
+
const line = res.stdout.split('\n')[0];
|
|
981
|
+
const parts = line.split(' ');
|
|
982
|
+
appsObj.versions.deno = line.length > 1 ? parts[1].trim() : '';
|
|
983
|
+
}
|
|
984
|
+
functionProcessed();
|
|
985
|
+
})
|
|
986
|
+
.catch(() => {
|
|
987
|
+
functionProcessed();
|
|
988
|
+
});
|
|
989
|
+
}
|
|
990
|
+
if (Object.keys(appsObj.versions).includes('curl')) {
|
|
991
|
+
(0, exec_1.exec)('curl -V')
|
|
992
|
+
.then((res) => {
|
|
993
|
+
if (res.stdout) {
|
|
994
|
+
const line = res.stdout.split('\n')[0];
|
|
995
|
+
const parts = line.split(' ');
|
|
996
|
+
appsObj.versions.curl = line.length > 1 ? parts[1].trim() : '';
|
|
997
|
+
}
|
|
998
|
+
functionProcessed();
|
|
999
|
+
})
|
|
1000
|
+
.catch(() => {
|
|
1001
|
+
functionProcessed();
|
|
1002
|
+
});
|
|
1003
|
+
}
|
|
1004
|
+
if (Object.keys(appsObj.versions).includes('ruby')) {
|
|
1005
|
+
(0, exec_1.exec)('ruby -v')
|
|
1006
|
+
.then((res) => {
|
|
1007
|
+
if (res.stdout) {
|
|
1008
|
+
const line = res.stdout.split('\n')[0];
|
|
1009
|
+
const parts = line.split(' ');
|
|
1010
|
+
appsObj.versions.ruby = line.length > 1 ? parts[1].trim() : '';
|
|
1011
|
+
}
|
|
1012
|
+
functionProcessed();
|
|
1013
|
+
})
|
|
1014
|
+
.catch(() => {
|
|
1015
|
+
functionProcessed();
|
|
1016
|
+
});
|
|
1017
|
+
}
|
|
1018
|
+
if (Object.keys(appsObj.versions).includes('cargo')) {
|
|
1019
|
+
(0, exec_1.exec)('cargo -V')
|
|
1020
|
+
.then((res) => {
|
|
1021
|
+
if (res.stdout) {
|
|
1022
|
+
const line = res.stdout.split('\n')[0];
|
|
1023
|
+
const parts = line.split(' ');
|
|
1024
|
+
appsObj.versions.cargo = line.length > 1 ? parts[1].trim() : '';
|
|
1025
|
+
}
|
|
1026
|
+
functionProcessed();
|
|
1027
|
+
})
|
|
1028
|
+
.catch(() => {
|
|
1029
|
+
functionProcessed();
|
|
1030
|
+
});
|
|
1031
|
+
}
|
|
1032
|
+
if (Object.keys(appsObj.versions).includes('sqlite3')) {
|
|
1033
|
+
(0, exec_1.exec)('sqlite3 --version')
|
|
1034
|
+
.then((res) => {
|
|
1035
|
+
if (res.stdout) {
|
|
1036
|
+
const line = res.stdout.split('\n')[0];
|
|
1037
|
+
const parts = line.split(' ');
|
|
1038
|
+
appsObj.versions.sqlite3 = line.length > 1 ? parts[0].trim() : '';
|
|
1039
|
+
}
|
|
1040
|
+
functionProcessed();
|
|
1041
|
+
})
|
|
1042
|
+
.catch(() => {
|
|
1043
|
+
functionProcessed();
|
|
1044
|
+
});
|
|
1045
|
+
}
|
|
1046
|
+
if (Object.keys(appsObj.versions).includes('vi')) {
|
|
1047
|
+
(0, exec_1.exec)('vi --version')
|
|
1048
|
+
.then((res) => {
|
|
1049
|
+
if (res.stdout) {
|
|
1050
|
+
const line = res.stdout.split('\n')[0];
|
|
1051
|
+
const parts = line.split('(');
|
|
1052
|
+
appsObj.versions.vi = line.length > 1 ? parts[0].trim() : '';
|
|
1053
|
+
}
|
|
1054
|
+
functionProcessed();
|
|
1055
|
+
})
|
|
1056
|
+
.catch(() => {
|
|
1057
|
+
functionProcessed();
|
|
1058
|
+
});
|
|
1059
|
+
}
|
|
1060
|
+
if (Object.keys(appsObj.versions).includes('node')) {
|
|
1061
|
+
(0, exec_1.exec)('node -v')
|
|
1062
|
+
.then((res) => {
|
|
1063
|
+
if (res.stdout) {
|
|
1064
|
+
let line = res.stdout.split('\n')[0].trim();
|
|
1065
|
+
if (line.startsWith('v')) {
|
|
1066
|
+
line = line.slice(1);
|
|
1067
|
+
}
|
|
1068
|
+
appsObj.versions.node = line;
|
|
1069
|
+
}
|
|
1070
|
+
functionProcessed();
|
|
1071
|
+
})
|
|
1072
|
+
.catch(() => {
|
|
1073
|
+
functionProcessed();
|
|
1074
|
+
});
|
|
1075
|
+
}
|
|
1076
|
+
if (Object.keys(appsObj.versions).includes('composer')) {
|
|
1077
|
+
(0, exec_1.exec)('composer --version')
|
|
1078
|
+
.then((res) => {
|
|
1079
|
+
if (res.stdout) {
|
|
1080
|
+
const parts = res.stdout.split('\n')[0].trim().split(' ');
|
|
1081
|
+
appsObj.versions.composer = parts.length >= 3 ? parts[2].trim() : '';
|
|
1082
|
+
}
|
|
1083
|
+
functionProcessed();
|
|
1084
|
+
})
|
|
1085
|
+
.catch(() => {
|
|
1086
|
+
functionProcessed();
|
|
1087
|
+
});
|
|
1088
|
+
}
|
|
1089
|
+
if (Object.keys(appsObj.versions).includes('herd')) {
|
|
1090
|
+
(0, exec_1.exec)('herd --version')
|
|
1091
|
+
.then((res) => {
|
|
1092
|
+
if (res.stdout) {
|
|
1093
|
+
const parts = res.stdout.split('\n')[0].trim().split(' ');
|
|
1094
|
+
appsObj.versions.herd = parts.length >= 2 ? parts[1].trim() : '';
|
|
1095
|
+
}
|
|
1096
|
+
functionProcessed();
|
|
1097
|
+
})
|
|
1098
|
+
.catch(() => {
|
|
1099
|
+
functionProcessed();
|
|
1100
|
+
});
|
|
1101
|
+
}
|
|
1102
|
+
if (Object.keys(appsObj.versions).includes('laravel')) {
|
|
1103
|
+
(0, exec_1.exec)('laravel --version')
|
|
1104
|
+
.then((res) => {
|
|
1105
|
+
if (res.stdout) {
|
|
1106
|
+
const parts = res.stdout.split('\n')[0].trim().split(' ');
|
|
1107
|
+
appsObj.versions.laravel = parts.length >= 3 ? parts[2].trim() : '';
|
|
1108
|
+
}
|
|
1109
|
+
functionProcessed();
|
|
1110
|
+
})
|
|
1111
|
+
.catch(() => {
|
|
1112
|
+
functionProcessed();
|
|
1113
|
+
});
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
catch (e) {
|
|
1117
|
+
return appsObj.versions;
|
|
1118
|
+
}
|
|
1119
|
+
});
|
|
1120
|
+
});
|
|
1121
|
+
};
|
|
1122
|
+
exports.versions = versions;
|