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