penguins-eggs 25.7.7 → 25.7.22

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 (740) hide show
  1. package/.oclif.manifest.json +1 -1
  2. package/README.md +62 -48
  3. package/README.pdf +5870 -18
  4. package/bootloaders/README.md +22 -0
  5. package/bootloaders/grubx64.efi +0 -0
  6. package/bootloaders/grubx64.efi.signed +0 -0
  7. package/bootloaders/shimx64.efi +0 -0
  8. package/bootloaders/shimx64.efi.signed +0 -0
  9. package/conf/distros/alpine/calamares/calamares-modules/machineid-openrc/machineid-openrc.sh +4 -0
  10. package/conf/distros/alpine/calamares/calamares-modules/machineid-openrc/module.yml +8 -0
  11. package/conf/distros/alpine/calamares/modules/removeuser.yml +1 -1
  12. package/conf/distros/alpine/calamares/modules/services-openrc.yml +56 -0
  13. package/conf/distros/alpine/calamares/modules/users.yml +3 -2
  14. package/conf/distros/alpine/calamares/settings.yml +9 -11
  15. package/conf/distros/buster/calamares/settings.yml +0 -4
  16. package/conf/distros/fedora/calamares/calamares-modules/bootloaderspecification/bootloaderspecification.sh +37 -0
  17. package/conf/distros/fedora/calamares/calamares-modules/bootloaderspecification/module.yml +8 -0
  18. package/conf/distros/fedora/calamares/modules/dracut.yml +14 -0
  19. package/conf/distros/fedora/calamares/modules/removeuser.yml +1 -1
  20. package/conf/distros/fedora/calamares/settings.yml +1 -0
  21. package/conf/distros/jessie/krill/settings.yml +1 -1
  22. package/conf/distros/opensuse/calamares/calamares-modules/bootloaderspecification/bootloaderspecification.sh +37 -0
  23. package/conf/distros/opensuse/calamares/calamares-modules/bootloaderspecification/module.yml +8 -0
  24. package/conf/distros/opensuse/calamares/modules/dracut.yml +14 -0
  25. package/conf/distros/opensuse/calamares/settings.yml +2 -1
  26. package/conf/distros/stretch/krill/settings.yml +1 -1
  27. package/dist/classes/bleach.d.ts +1 -1
  28. package/dist/classes/bleach.js +1 -1
  29. package/dist/classes/cli-autologin.d.ts +1 -1
  30. package/dist/classes/cli-autologin.js +1 -1
  31. package/dist/classes/compressors.d.ts +1 -1
  32. package/dist/classes/compressors.js +1 -1
  33. package/dist/classes/daddy.d.ts +1 -1
  34. package/dist/classes/daddy.js +1 -1
  35. package/dist/classes/distro.d.ts +3 -27
  36. package/dist/classes/distro.js +322 -352
  37. package/dist/classes/diversions.d.ts +1 -1
  38. package/dist/classes/diversions.js +1 -1
  39. package/dist/classes/incubation/branding.d.ts +1 -1
  40. package/dist/classes/incubation/branding.js +1 -1
  41. package/dist/classes/incubation/fisherman-helper/displaymanager.d.ts +1 -1
  42. package/dist/classes/incubation/fisherman-helper/displaymanager.js +1 -1
  43. package/dist/classes/incubation/fisherman-helper/packages.d.ts +1 -1
  44. package/dist/classes/incubation/fisherman-helper/packages.js +1 -1
  45. package/dist/classes/incubation/fisherman-helper/settings.d.ts +1 -1
  46. package/dist/classes/incubation/fisherman-helper/settings.js +1 -1
  47. package/dist/classes/incubation/fisherman.d.ts +4 -0
  48. package/dist/classes/incubation/fisherman.js +9 -1
  49. package/dist/classes/incubation/incubator.d/alpine.d.ts +1 -1
  50. package/dist/classes/incubation/incubator.d/alpine.js +3 -3
  51. package/dist/classes/incubation/incubator.d/bionic.d.ts +1 -1
  52. package/dist/classes/incubation/incubator.d/bionic.js +1 -1
  53. package/dist/classes/incubation/incubator.d/buster.d.ts +1 -1
  54. package/dist/classes/incubation/incubator.d/buster.js +2 -2
  55. package/dist/classes/incubation/incubator.d/fedora.d.ts +1 -1
  56. package/dist/classes/incubation/incubator.d/fedora.js +6 -5
  57. package/dist/classes/incubation/incubator.d/jessie.d.ts +1 -1
  58. package/dist/classes/incubation/incubator.d/jessie.js +1 -1
  59. package/dist/classes/incubation/incubator.d/noble.d.ts +1 -1
  60. package/dist/classes/incubation/incubator.d/noble.js +1 -1
  61. package/dist/classes/incubation/incubator.d/openmamba.d.ts +1 -1
  62. package/dist/classes/incubation/incubator.d/openmamba.js +2 -2
  63. package/dist/classes/incubation/incubator.d/opensuse.d.ts +1 -1
  64. package/dist/classes/incubation/incubator.d/opensuse.js +3 -4
  65. package/dist/classes/incubation/incubator.d/rolling.d.ts +1 -1
  66. package/dist/classes/incubation/incubator.d/rolling.js +2 -2
  67. package/dist/classes/incubation/incubator.d.ts +1 -1
  68. package/dist/classes/incubation/incubator.js +110 -101
  69. package/dist/classes/incubation/installer.d.ts +1 -1
  70. package/dist/classes/incubation/installer.js +1 -1
  71. package/dist/classes/keyboards.d.ts +1 -1
  72. package/dist/classes/keyboards.js +1 -1
  73. package/dist/classes/locales.d.ts +1 -1
  74. package/dist/classes/locales.js +1 -1
  75. package/dist/classes/network.d.ts +1 -1
  76. package/dist/classes/network.js +1 -1
  77. package/dist/classes/ovary.d/bind-live-fs.d.ts +1 -1
  78. package/dist/classes/ovary.d/bind-live-fs.js +13 -5
  79. package/dist/classes/ovary.d/bind-vfs.d.ts +1 -1
  80. package/dist/classes/ovary.d/bind-vfs.js +1 -1
  81. package/dist/classes/ovary.d/create-xdg-autostart.d.ts +1 -1
  82. package/dist/classes/ovary.d/create-xdg-autostart.js +1 -1
  83. package/dist/classes/ovary.d/edit-live-fs.d.ts +1 -1
  84. package/dist/classes/ovary.d/edit-live-fs.js +1 -1
  85. package/dist/classes/ovary.d/fertilization.d.ts +1 -1
  86. package/dist/classes/ovary.d/fertilization.js +2 -1
  87. package/dist/classes/ovary.d/finished.d.ts +1 -1
  88. package/dist/classes/ovary.d/finished.js +6 -3
  89. package/dist/classes/ovary.d/initrd.d.ts +1 -1
  90. package/dist/classes/ovary.d/initrd.js +4 -4
  91. package/dist/classes/ovary.d/kernel-copy.d.ts +1 -1
  92. package/dist/classes/ovary.d/kernel-copy.js +1 -1
  93. package/dist/classes/ovary.d/live-create-structure.d.ts +1 -1
  94. package/dist/classes/ovary.d/live-create-structure.js +1 -1
  95. package/dist/classes/ovary.d/make-dot-disk.d.ts +1 -1
  96. package/dist/classes/ovary.d/make-dot-disk.js +1 -1
  97. package/dist/classes/ovary.d/make-efi.d.ts +6 -2
  98. package/dist/classes/ovary.d/make-efi.js +53 -113
  99. package/dist/classes/ovary.d/make-iso.d.ts +1 -1
  100. package/dist/classes/ovary.d/make-iso.js +1 -1
  101. package/dist/classes/ovary.d/make-squashfs.d.ts +1 -1
  102. package/dist/classes/ovary.d/make-squashfs.js +1 -1
  103. package/dist/classes/ovary.d/merged.d.ts +1 -1
  104. package/dist/classes/ovary.d/merged.js +6 -6
  105. package/dist/classes/ovary.d/produce.d.ts +1 -1
  106. package/dist/classes/ovary.d/produce.js +18 -1
  107. package/dist/classes/ovary.d/rexec.d.ts +1 -1
  108. package/dist/classes/ovary.d/rexec.js +1 -1
  109. package/dist/classes/ovary.d/syslinux.d.ts +1 -1
  110. package/dist/classes/ovary.d/syslinux.js +3 -2
  111. package/dist/classes/ovary.d/user-create-live.d.ts +1 -1
  112. package/dist/classes/ovary.d/user-create-live.js +3 -3
  113. package/dist/classes/ovary.d/users-remove.d.ts +1 -1
  114. package/dist/classes/ovary.d/users-remove.js +1 -1
  115. package/dist/classes/ovary.d/xorriso-command.d.ts +1 -1
  116. package/dist/classes/ovary.d/xorriso-command.js +1 -1
  117. package/dist/classes/ovary.d.ts +2 -1
  118. package/dist/classes/ovary.js +2 -1
  119. package/dist/classes/pacman.d/aldos.d.ts +1 -1
  120. package/dist/classes/pacman.d/aldos.js +1 -1
  121. package/dist/classes/pacman.d/alpine.d.ts +1 -1
  122. package/dist/classes/pacman.d/alpine.js +1 -1
  123. package/dist/classes/pacman.d/archlinux.d.ts +1 -1
  124. package/dist/classes/pacman.d/archlinux.js +1 -1
  125. package/dist/classes/pacman.d/debian.d.ts +1 -1
  126. package/dist/classes/pacman.d/debian.js +1 -1
  127. package/dist/classes/pacman.d/fedora.d.ts +1 -1
  128. package/dist/classes/pacman.d/fedora.js +1 -1
  129. package/dist/classes/pacman.d/openmamba.d.ts +1 -1
  130. package/dist/classes/pacman.d/openmamba.js +1 -1
  131. package/dist/classes/pacman.d/opensuse.d.ts +1 -1
  132. package/dist/classes/pacman.d/opensuse.js +1 -1
  133. package/dist/classes/pacman.d/voidlinux.d.ts +1 -1
  134. package/dist/classes/pacman.d/voidlinux.js +1 -1
  135. package/dist/classes/pacman.d.ts +1 -1
  136. package/dist/classes/pacman.js +1 -1
  137. package/dist/classes/pve-live.d.ts +1 -1
  138. package/dist/classes/pve-live.js +1 -1
  139. package/dist/classes/pxe.d.ts +1 -1
  140. package/dist/classes/pxe.js +19 -15
  141. package/dist/classes/settings.d.ts +1 -1
  142. package/dist/classes/settings.js +1 -1
  143. package/dist/classes/sources_list.d.ts +1 -1
  144. package/dist/classes/sources_list.js +1 -1
  145. package/dist/classes/tailor.d.ts +1 -1
  146. package/dist/classes/tailor.js +1 -1
  147. package/dist/classes/tools.d.ts +1 -1
  148. package/dist/classes/tools.js +1 -1
  149. package/dist/classes/users.d.ts +1 -1
  150. package/dist/classes/users.js +1 -1
  151. package/dist/classes/utils.d/kernel.d.ts +16 -12
  152. package/dist/classes/utils.d/kernel.js +98 -18
  153. package/dist/classes/utils.d.ts +309 -78
  154. package/dist/classes/utils.js +913 -89
  155. package/dist/classes/xdg.d.ts +1 -1
  156. package/dist/classes/xdg.js +1 -1
  157. package/dist/classes/yolk.d.ts +1 -1
  158. package/dist/classes/yolk.js +1 -1
  159. package/dist/commands/adapt.d.ts +1 -1
  160. package/dist/commands/adapt.js +1 -1
  161. package/dist/commands/analyze.d.ts +1 -1
  162. package/dist/commands/analyze.js +1 -1
  163. package/dist/commands/calamares.d.ts +1 -1
  164. package/dist/commands/calamares.js +1 -1
  165. package/dist/commands/config.d.ts +1 -1
  166. package/dist/commands/config.js +1 -1
  167. package/dist/commands/cuckoo.d.ts +1 -1
  168. package/dist/commands/cuckoo.js +1 -1
  169. package/dist/commands/dad.d.ts +1 -1
  170. package/dist/commands/dad.js +1 -1
  171. package/dist/commands/export/iso.d.ts +1 -1
  172. package/dist/commands/export/iso.js +1 -1
  173. package/dist/commands/export/pkg.d.ts +1 -1
  174. package/dist/commands/export/pkg.js +1 -1
  175. package/dist/commands/export/tarballs.d.ts +1 -1
  176. package/dist/commands/export/tarballs.js +2 -2
  177. package/dist/commands/install.d.ts +1 -1
  178. package/dist/commands/install.js +1 -1
  179. package/dist/commands/kill.d.ts +1 -1
  180. package/dist/commands/kill.js +1 -1
  181. package/dist/commands/love.d.ts +1 -1
  182. package/dist/commands/love.js +1 -1
  183. package/dist/commands/mom.d.ts +1 -1
  184. package/dist/commands/mom.js +1 -1
  185. package/dist/commands/pods.d.ts +1 -1
  186. package/dist/commands/pods.js +1 -1
  187. package/dist/commands/produce.d.ts +1 -1
  188. package/dist/commands/produce.js +1 -1
  189. package/dist/commands/status.d.ts +1 -1
  190. package/dist/commands/status.js +1 -1
  191. package/dist/commands/syncfrom.d.ts +1 -1
  192. package/dist/commands/syncfrom.js +1 -1
  193. package/dist/commands/syncto.d.ts +1 -1
  194. package/dist/commands/syncto.js +1 -1
  195. package/dist/commands/tools/clean.d.ts +1 -1
  196. package/dist/commands/tools/clean.js +1 -1
  197. package/dist/commands/tools/ppa.d.ts +1 -1
  198. package/dist/commands/tools/ppa.js +1 -1
  199. package/dist/commands/tools/skel.d.ts +1 -1
  200. package/dist/commands/tools/skel.js +1 -1
  201. package/dist/commands/tools/stat.d.ts +1 -1
  202. package/dist/commands/tools/stat.js +1 -1
  203. package/dist/commands/tools/yolk.d.ts +1 -1
  204. package/dist/commands/tools/yolk.js +1 -1
  205. package/dist/commands/update.d.ts +1 -1
  206. package/dist/commands/update.js +1 -1
  207. package/dist/commands/wardrobe/get.d.ts +1 -1
  208. package/dist/commands/wardrobe/get.js +1 -1
  209. package/dist/commands/wardrobe/list.d.ts +1 -1
  210. package/dist/commands/wardrobe/list.js +1 -1
  211. package/dist/commands/wardrobe/show.d.ts +1 -1
  212. package/dist/commands/wardrobe/show.js +1 -1
  213. package/dist/commands/wardrobe/wear.d.ts +1 -1
  214. package/dist/commands/wardrobe/wear.js +1 -1
  215. package/dist/index.d.ts +1 -1
  216. package/dist/index.js +1 -1
  217. package/dist/interfaces/i-addons.d.ts +1 -1
  218. package/dist/interfaces/i-addons.js +1 -1
  219. package/dist/interfaces/i-analyze.d.ts +1 -1
  220. package/dist/interfaces/i-analyze.js +1 -1
  221. package/dist/interfaces/i-app.d.ts +1 -1
  222. package/dist/interfaces/i-app.js +1 -1
  223. package/dist/interfaces/i-branding.d.ts +1 -1
  224. package/dist/interfaces/i-branding.js +1 -1
  225. package/dist/interfaces/i-calamares-displaymanager.d.ts +1 -1
  226. package/dist/interfaces/i-calamares-finished.d.ts +1 -1
  227. package/dist/interfaces/i-calamares-packages.d.ts +1 -1
  228. package/dist/interfaces/i-calamares-partition.d.ts +1 -1
  229. package/dist/interfaces/i-config-tools.d.ts +1 -1
  230. package/dist/interfaces/i-config-tools.js +1 -1
  231. package/dist/interfaces/i-devices.d.ts +1 -1
  232. package/dist/interfaces/i-devices.js +1 -1
  233. package/dist/interfaces/i-distro.d.ts +1 -1
  234. package/dist/interfaces/i-distro.js +1 -1
  235. package/dist/interfaces/i-drive-list.d.ts +1 -1
  236. package/dist/interfaces/i-drive-list.js +1 -1
  237. package/dist/interfaces/i-eggs-config.d.ts +1 -1
  238. package/dist/interfaces/i-eggs-config.js +1 -1
  239. package/dist/interfaces/i-excludes.d.ts +1 -1
  240. package/dist/interfaces/i-excludes.js +1 -1
  241. package/dist/interfaces/i-exec.d.ts +1 -1
  242. package/dist/interfaces/i-exec.js +1 -1
  243. package/dist/interfaces/i-initrd.d.ts +1 -1
  244. package/dist/interfaces/i-initrd.js +1 -1
  245. package/dist/interfaces/i-install.d.ts +1 -1
  246. package/dist/interfaces/i-install.js +1 -1
  247. package/dist/interfaces/i-installer.d.ts +1 -1
  248. package/dist/interfaces/i-installer.js +1 -1
  249. package/dist/interfaces/i-luks-passphrase.d.ts +1 -1
  250. package/dist/interfaces/i-luks-passphrase.js +1 -1
  251. package/dist/interfaces/i-materia.d.ts +1 -1
  252. package/dist/interfaces/i-materia.js +1 -1
  253. package/dist/interfaces/i-net.d.ts +1 -1
  254. package/dist/interfaces/i-net.js +1 -1
  255. package/dist/interfaces/i-packages.d.ts +1 -1
  256. package/dist/interfaces/i-packages.js +1 -1
  257. package/dist/interfaces/i-partitions.d.ts +1 -1
  258. package/dist/interfaces/i-partitions.js +1 -1
  259. package/dist/interfaces/i-remix.d.ts +1 -1
  260. package/dist/interfaces/i-remix.js +1 -1
  261. package/dist/interfaces/i-settings.d.ts +1 -1
  262. package/dist/interfaces/i-settings.js +1 -1
  263. package/dist/interfaces/i-user.d.ts +1 -1
  264. package/dist/interfaces/i-user.js +1 -1
  265. package/dist/interfaces/i-workdir.d.ts +1 -1
  266. package/dist/interfaces/i-workdir.js +1 -1
  267. package/dist/interfaces/i-xkb-model.d.ts +1 -1
  268. package/dist/interfaces/i-xkb-model.js +1 -1
  269. package/dist/interfaces/index.d.ts +1 -1
  270. package/dist/interfaces/index.js +1 -1
  271. package/dist/krill/classes/cfs.d.ts +1 -1
  272. package/dist/krill/classes/cfs.js +1 -1
  273. package/dist/krill/classes/krill_enums.d.ts +1 -1
  274. package/dist/krill/classes/krill_enums.js +1 -1
  275. package/dist/krill/classes/prepare.d/keyboard.d.ts +1 -1
  276. package/dist/krill/classes/prepare.d/keyboard.js +1 -1
  277. package/dist/krill/classes/prepare.d/location.d.ts +1 -1
  278. package/dist/krill/classes/prepare.d/location.js +1 -1
  279. package/dist/krill/classes/prepare.d/network.d.ts +1 -1
  280. package/dist/krill/classes/prepare.d/network.js +1 -1
  281. package/dist/krill/classes/prepare.d/partitions.d.ts +1 -1
  282. package/dist/krill/classes/prepare.d/partitions.js +1 -1
  283. package/dist/krill/classes/prepare.d/summary.d.ts +1 -1
  284. package/dist/krill/classes/prepare.d/summary.js +1 -1
  285. package/dist/krill/classes/prepare.d/users.js +1 -1
  286. package/dist/krill/classes/prepare.d/welcome.js +1 -1
  287. package/dist/krill/classes/prepare.d.ts +1 -1
  288. package/dist/krill/classes/prepare.js +1 -1
  289. package/dist/krill/classes/sequence.d/add_user.d.ts +1 -1
  290. package/dist/krill/classes/sequence.d/add_user.js +2 -2
  291. package/dist/krill/classes/sequence.d/bootloader.d.ts +1 -1
  292. package/dist/krill/classes/sequence.d/bootloader.js +1 -1
  293. package/dist/krill/classes/sequence.d/bootloader_config.d.ts +1 -1
  294. package/dist/krill/classes/sequence.d/bootloader_config.js +1 -1
  295. package/dist/krill/classes/sequence.d/change_password.d.ts +1 -1
  296. package/dist/krill/classes/sequence.d/change_password.js +2 -2
  297. package/dist/krill/classes/sequence.d/del_live_user.d.ts +1 -1
  298. package/dist/krill/classes/sequence.d/del_live_user.js +1 -1
  299. package/dist/krill/classes/sequence.d/fstab.d.ts +1 -1
  300. package/dist/krill/classes/sequence.d/fstab.js +1 -1
  301. package/dist/krill/classes/sequence.d/grubcfg.d.ts +1 -1
  302. package/dist/krill/classes/sequence.d/grubcfg.js +1 -1
  303. package/dist/krill/classes/sequence.d/hostname.d.ts +1 -1
  304. package/dist/krill/classes/sequence.d/hostname.js +1 -1
  305. package/dist/krill/classes/sequence.d/initramfs.d.ts +1 -1
  306. package/dist/krill/classes/sequence.d/initramfs.js +1 -1
  307. package/dist/krill/classes/sequence.d/initramfs_cfg.d.ts +1 -1
  308. package/dist/krill/classes/sequence.d/initramfs_cfg.js +1 -1
  309. package/dist/krill/classes/sequence.d/locale.d.ts +1 -1
  310. package/dist/krill/classes/sequence.d/locale.js +1 -1
  311. package/dist/krill/classes/sequence.d/locale_cfg.d.ts +1 -1
  312. package/dist/krill/classes/sequence.d/locale_cfg.js +1 -1
  313. package/dist/krill/classes/sequence.d/m_keyboard.d.ts +1 -1
  314. package/dist/krill/classes/sequence.d/m_keyboard.js +1 -1
  315. package/dist/krill/classes/sequence.d/mkfs.d.ts +1 -1
  316. package/dist/krill/classes/sequence.d/mkfs.js +1 -1
  317. package/dist/krill/classes/sequence.d/mount_fs.d.ts +1 -1
  318. package/dist/krill/classes/sequence.d/mount_fs.js +1 -1
  319. package/dist/krill/classes/sequence.d/mount_vfs.d.ts +1 -1
  320. package/dist/krill/classes/sequence.d/mount_vfs.js +1 -1
  321. package/dist/krill/classes/sequence.d/network_cfg.d.ts +1 -1
  322. package/dist/krill/classes/sequence.d/network_cfg.js +1 -1
  323. package/dist/krill/classes/sequence.d/packages.d.ts +1 -1
  324. package/dist/krill/classes/sequence.d/packages.js +1 -1
  325. package/dist/krill/classes/sequence.d/partition.d/bios_luks.d.ts +1 -1
  326. package/dist/krill/classes/sequence.d/partition.d/bios_luks.js +1 -1
  327. package/dist/krill/classes/sequence.d/partition.d/bios_standard.d.ts +1 -1
  328. package/dist/krill/classes/sequence.d/partition.d/bios_standard.js +1 -1
  329. package/dist/krill/classes/sequence.d/partition.d/uefi_luks.d.ts +1 -1
  330. package/dist/krill/classes/sequence.d/partition.d/uefi_luks.js +1 -1
  331. package/dist/krill/classes/sequence.d/partition.d/uefi_standard.d.ts +1 -1
  332. package/dist/krill/classes/sequence.d/partition.d/uefi_standard.js +1 -1
  333. package/dist/krill/classes/sequence.d/partition.d.ts +1 -1
  334. package/dist/krill/classes/sequence.d/partition.js +1 -1
  335. package/dist/krill/classes/sequence.d/remove_installer_link.d.ts +1 -1
  336. package/dist/krill/classes/sequence.d/remove_installer_link.js +1 -1
  337. package/dist/krill/classes/sequence.d/umount.d.ts +1 -1
  338. package/dist/krill/classes/sequence.d/umount.js +1 -1
  339. package/dist/krill/classes/sequence.d/unpackfs.d.ts +1 -1
  340. package/dist/krill/classes/sequence.d/unpackfs.js +1 -1
  341. package/dist/krill/classes/sequence.d.ts +1 -1
  342. package/dist/krill/classes/sequence.js +1 -1
  343. package/dist/krill/components/finished.d.ts +1 -1
  344. package/dist/krill/components/finished.js +1 -1
  345. package/dist/krill/components/information.d.ts +1 -1
  346. package/dist/krill/components/information.js +1 -1
  347. package/dist/krill/components/install.d.ts +1 -1
  348. package/dist/krill/components/install.js +1 -1
  349. package/dist/krill/components/keyboard.d.ts +1 -1
  350. package/dist/krill/components/keyboard.js +1 -1
  351. package/dist/krill/components/location.d.ts +1 -1
  352. package/dist/krill/components/location.js +1 -1
  353. package/dist/krill/components/network.d.ts +1 -1
  354. package/dist/krill/components/network.js +1 -1
  355. package/dist/krill/components/partitions.d.ts +1 -1
  356. package/dist/krill/components/partitions.js +1 -1
  357. package/dist/krill/components/steps.d.ts +1 -1
  358. package/dist/krill/components/steps.js +1 -1
  359. package/dist/krill/components/summary.d.ts +1 -1
  360. package/dist/krill/components/summary.js +1 -1
  361. package/dist/krill/components/title.d.ts +1 -1
  362. package/dist/krill/components/title.js +1 -1
  363. package/dist/krill/components/users.d.ts +1 -1
  364. package/dist/krill/components/users.js +1 -1
  365. package/dist/krill/components/welcome.d.ts +1 -1
  366. package/dist/krill/components/welcome.js +1 -1
  367. package/dist/krill/interfaces/i_krill.d.ts +1 -1
  368. package/dist/krill/interfaces/i_krill.js +1 -1
  369. package/dist/krill/interfaces/i_krill_config.d.ts +1 -1
  370. package/dist/krill/interfaces/i_krill_config.js +1 -1
  371. package/dist/krill/lib/get_address.d.ts +1 -1
  372. package/dist/krill/lib/get_address.js +1 -1
  373. package/dist/krill/lib/get_dns.d.ts +1 -1
  374. package/dist/krill/lib/get_dns.js +1 -1
  375. package/dist/krill/lib/get_domain.d.ts +1 -1
  376. package/dist/krill/lib/get_domain.js +1 -1
  377. package/dist/krill/lib/get_gateway.d.ts +1 -1
  378. package/dist/krill/lib/get_gateway.js +1 -1
  379. package/dist/krill/lib/get_hostname.d.ts +1 -1
  380. package/dist/krill/lib/get_hostname.js +1 -1
  381. package/dist/krill/lib/get_luks_passphrase.d.ts +1 -1
  382. package/dist/krill/lib/get_luks_passphrase.js +1 -1
  383. package/dist/krill/lib/get_netmask.d.ts +1 -1
  384. package/dist/krill/lib/get_netmask.js +1 -1
  385. package/dist/krill/lib/get_password.d.ts +1 -1
  386. package/dist/krill/lib/get_password.js +1 -1
  387. package/dist/krill/lib/get_userfullname.d.ts +1 -1
  388. package/dist/krill/lib/get_userfullname.js +1 -1
  389. package/dist/krill/lib/get_username.d.ts +1 -1
  390. package/dist/krill/lib/get_username.js +1 -1
  391. package/dist/krill/lib/select_address_type.d.ts +1 -1
  392. package/dist/krill/lib/select_address_type.js +1 -1
  393. package/dist/krill/lib/select_filesystem_type.d.ts +1 -1
  394. package/dist/krill/lib/select_filesystem_type.js +1 -1
  395. package/dist/krill/lib/select_installation_device.d.ts +1 -1
  396. package/dist/krill/lib/select_installation_device.js +1 -1
  397. package/dist/krill/lib/select_installation_mode.d.ts +1 -1
  398. package/dist/krill/lib/select_installation_mode.js +1 -1
  399. package/dist/krill/lib/select_interface.d.ts +1 -1
  400. package/dist/krill/lib/select_interface.js +1 -1
  401. package/dist/krill/lib/select_keyboard_layout.d.ts +1 -1
  402. package/dist/krill/lib/select_keyboard_layout.js +1 -1
  403. package/dist/krill/lib/select_keyboard_model.d.ts +1 -1
  404. package/dist/krill/lib/select_keyboard_model.js +1 -1
  405. package/dist/krill/lib/select_keyboard_option.d.ts +1 -1
  406. package/dist/krill/lib/select_keyboard_option.js +1 -1
  407. package/dist/krill/lib/select_keyboard_variant.d.ts +1 -1
  408. package/dist/krill/lib/select_keyboard_variant.js +1 -1
  409. package/dist/krill/lib/select_languages.d.ts +1 -1
  410. package/dist/krill/lib/select_languages.js +1 -1
  411. package/dist/krill/lib/select_regions.d.ts +1 -1
  412. package/dist/krill/lib/select_regions.js +1 -1
  413. package/dist/krill/lib/select_replaced_partition.d.ts +1 -1
  414. package/dist/krill/lib/select_replaced_partition.js +1 -1
  415. package/dist/krill/lib/select_user_swap_choice.d.ts +1 -1
  416. package/dist/krill/lib/select_user_swap_choice.js +1 -1
  417. package/dist/krill/lib/select_zones.d.ts +1 -1
  418. package/dist/krill/lib/select_zones.js +1 -1
  419. package/dist/lib/kill_me_softly.d.ts +1 -1
  420. package/dist/lib/kill_me_softly.js +1 -1
  421. package/dist/lib/utils.d.ts +1 -1
  422. package/dist/lib/utils.js +1 -1
  423. package/package.json +10 -11
  424. package/conf/distros/alpine/calamares/modules/machineid.yml +0 -17
  425. package/dist/classes/utils.d/architecture.d.ts +0 -41
  426. package/dist/classes/utils.d/architecture.js +0 -87
  427. package/dist/classes/utils.d/console-output.d.ts +0 -26
  428. package/dist/classes/utils.d/console-output.js +0 -46
  429. package/dist/classes/utils.d/filesystem.d.ts +0 -53
  430. package/dist/classes/utils.d/filesystem.js +0 -154
  431. package/dist/classes/utils.d/formatters.d.ts +0 -32
  432. package/dist/classes/utils.d/formatters.js +0 -64
  433. package/dist/classes/utils.d/network.d.ts +0 -43
  434. package/dist/classes/utils.d/network.js +0 -133
  435. package/dist/classes/utils.d/package-info.d.ts +0 -55
  436. package/dist/classes/utils.d/package-info.js +0 -137
  437. package/dist/classes/utils.d/snapshot.d.ts +0 -44
  438. package/dist/classes/utils.d/snapshot.js +0 -102
  439. package/dist/classes/utils.d/system.d.ts +0 -63
  440. package/dist/classes/utils.d/system.js +0 -200
  441. package/dist/classes/utils.d/user-interaction.d.ts +0 -39
  442. package/dist/classes/utils.d/user-interaction.js +0 -104
  443. package/dist/penguins-eggs_25.7.7-1_amd64.deb +0 -0
  444. package/dist/penguins-eggs_25.7.7-1_amd64.deb.sha256 +0 -1
  445. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/acpi.mod +0 -0
  446. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/adler32.mod +0 -0
  447. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/affs.mod +0 -0
  448. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/afs.mod +0 -0
  449. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/afsplitter.mod +0 -0
  450. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/ahci.mod +0 -0
  451. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/all_video.mod +0 -0
  452. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/aout.mod +0 -0
  453. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/appleldr.mod +0 -0
  454. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/archelp.mod +0 -0
  455. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/at_keyboard.mod +0 -0
  456. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/ata.mod +0 -0
  457. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/backtrace.mod +0 -0
  458. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/bfs.mod +0 -0
  459. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/bitmap.mod +0 -0
  460. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/bitmap_scale.mod +0 -0
  461. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/blocklist.mod +0 -0
  462. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/boot.mod +0 -0
  463. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/bsd.mod +0 -0
  464. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/bswap_test.mod +0 -0
  465. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/btrfs.mod +0 -0
  466. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/bufio.mod +0 -0
  467. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/cat.mod +0 -0
  468. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/cbfs.mod +0 -0
  469. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/cbls.mod +0 -0
  470. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/cbmemc.mod +0 -0
  471. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/cbtable.mod +0 -0
  472. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/cbtime.mod +0 -0
  473. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/chain.mod +0 -0
  474. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/cmdline_cat_test.mod +0 -0
  475. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/cmp.mod +0 -0
  476. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/cmp_test.mod +0 -0
  477. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/command.lst +0 -0
  478. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/config.h +0 -0
  479. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/configfile.mod +0 -0
  480. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/cpio.mod +0 -0
  481. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/cpio_be.mod +0 -0
  482. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/cpuid.mod +0 -0
  483. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/crc64.mod +0 -0
  484. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/crypto.lst +0 -0
  485. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/crypto.mod +0 -0
  486. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/cryptodisk.mod +0 -0
  487. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/cs5536.mod +0 -0
  488. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/ctz_test.mod +0 -0
  489. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/date.mod +0 -0
  490. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/datehook.mod +0 -0
  491. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/datetime.mod +0 -0
  492. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/disk.mod +0 -0
  493. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/diskfilter.mod +0 -0
  494. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/div.mod +0 -0
  495. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/div_test.mod +0 -0
  496. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/dm_nv.mod +0 -0
  497. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/echo.mod +0 -0
  498. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/efi_gop.mod +0 -0
  499. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/efi_uga.mod +0 -0
  500. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/efifwsetup.mod +0 -0
  501. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/efinet.mod +0 -0
  502. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/ehci.mod +0 -0
  503. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/elf.mod +0 -0
  504. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/eval.mod +0 -0
  505. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/exfat.mod +0 -0
  506. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/exfctest.mod +0 -0
  507. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/ext2.mod +0 -0
  508. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/extcmd.mod +0 -0
  509. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/f2fs.mod +0 -0
  510. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/fat.mod +0 -0
  511. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/fdt.lst +0 -0
  512. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/file.mod +0 -0
  513. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/fixvideo.mod +0 -0
  514. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/font.mod +0 -0
  515. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/fs.lst +0 -0
  516. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/fshelp.mod +0 -0
  517. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/functional_test.mod +0 -0
  518. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gcry_arcfour.mod +0 -0
  519. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gcry_blowfish.mod +0 -0
  520. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gcry_camellia.mod +0 -0
  521. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gcry_cast5.mod +0 -0
  522. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gcry_crc.mod +0 -0
  523. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gcry_des.mod +0 -0
  524. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gcry_dsa.mod +0 -0
  525. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gcry_idea.mod +0 -0
  526. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gcry_md4.mod +0 -0
  527. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gcry_md5.mod +0 -0
  528. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gcry_rfc2268.mod +0 -0
  529. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gcry_rijndael.mod +0 -0
  530. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gcry_rmd160.mod +0 -0
  531. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gcry_rsa.mod +0 -0
  532. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gcry_seed.mod +0 -0
  533. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gcry_serpent.mod +0 -0
  534. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gcry_sha1.mod +0 -0
  535. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gcry_sha256.mod +0 -0
  536. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gcry_sha512.mod +0 -0
  537. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gcry_tiger.mod +0 -0
  538. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gcry_twofish.mod +0 -0
  539. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gcry_whirlpool.mod +0 -0
  540. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/geli.mod +0 -0
  541. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gettext.mod +0 -0
  542. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gfxmenu.mod +0 -0
  543. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gfxterm.mod +0 -0
  544. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gfxterm_background.mod +0 -0
  545. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gfxterm_menu.mod +0 -0
  546. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gptsync.mod +0 -0
  547. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/gzio.mod +0 -0
  548. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/halt.mod +0 -0
  549. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/hashsum.mod +0 -0
  550. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/hdparm.mod +0 -0
  551. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/hello.mod +0 -0
  552. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/help.mod +0 -0
  553. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/hexdump.mod +0 -0
  554. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/hfs.mod +0 -0
  555. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/hfsplus.mod +0 -0
  556. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/hfspluscomp.mod +0 -0
  557. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/http.mod +0 -0
  558. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/iorw.mod +0 -0
  559. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/iso9660.mod +0 -0
  560. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/jfs.mod +0 -0
  561. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/jpeg.mod +0 -0
  562. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/json.mod +0 -0
  563. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/kernel.img +0 -0
  564. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/keylayouts.mod +0 -0
  565. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/keystatus.mod +0 -0
  566. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/ldm.mod +0 -0
  567. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/legacy_password_test.mod +0 -0
  568. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/legacycfg.mod +0 -0
  569. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/linux.mod +0 -0
  570. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/linux16.mod +0 -0
  571. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/linuxefi.mod +0 -0
  572. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/loadbios.mod +0 -0
  573. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/loadenv.mod +0 -0
  574. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/loopback.mod +0 -0
  575. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/ls.mod +0 -0
  576. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/lsacpi.mod +0 -0
  577. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/lsefi.mod +0 -0
  578. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/lsefimmap.mod +0 -0
  579. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/lsefisystab.mod +0 -0
  580. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/lsmmap.mod +0 -0
  581. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/lspci.mod +0 -0
  582. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/lssal.mod +0 -0
  583. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/luks.mod +0 -0
  584. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/luks2.mod +0 -0
  585. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/lvm.mod +0 -0
  586. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/lzopio.mod +0 -0
  587. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/macbless.mod +0 -0
  588. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/macho.mod +0 -0
  589. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/mdraid09.mod +0 -0
  590. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/mdraid09_be.mod +0 -0
  591. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/mdraid1x.mod +0 -0
  592. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/memdisk.mod +0 -0
  593. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/memrw.mod +0 -0
  594. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/minicmd.mod +0 -0
  595. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/minix.mod +0 -0
  596. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/minix2.mod +0 -0
  597. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/minix2_be.mod +0 -0
  598. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/minix3.mod +0 -0
  599. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/minix3_be.mod +0 -0
  600. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/minix_be.mod +0 -0
  601. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/mmap.mod +0 -0
  602. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/moddep.lst +0 -0
  603. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/modinfo.sh +0 -0
  604. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/monolithic/gcdx64.efi +0 -0
  605. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/monolithic/grubnetx64-installer.efi +0 -0
  606. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/monolithic/grubnetx64.efi +0 -0
  607. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/monolithic/grubx64.efi +0 -0
  608. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/morse.mod +0 -0
  609. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/mpi.mod +0 -0
  610. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/msdospart.mod +0 -0
  611. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/mul_test.mod +0 -0
  612. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/multiboot.mod +0 -0
  613. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/multiboot2.mod +0 -0
  614. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/nativedisk.mod +0 -0
  615. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/net.mod +0 -0
  616. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/newc.mod +0 -0
  617. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/nilfs2.mod +0 -0
  618. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/normal.mod +0 -0
  619. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/ntfs.mod +0 -0
  620. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/ntfscomp.mod +0 -0
  621. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/odc.mod +0 -0
  622. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/offsetio.mod +0 -0
  623. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/ohci.mod +0 -0
  624. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/part_acorn.mod +0 -0
  625. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/part_amiga.mod +0 -0
  626. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/part_apple.mod +0 -0
  627. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/part_bsd.mod +0 -0
  628. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/part_dfly.mod +0 -0
  629. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/part_dvh.mod +0 -0
  630. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/part_gpt.mod +0 -0
  631. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/part_msdos.mod +0 -0
  632. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/part_plan.mod +0 -0
  633. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/part_sun.mod +0 -0
  634. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/part_sunpc.mod +0 -0
  635. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/partmap.lst +0 -0
  636. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/parttool.lst +0 -0
  637. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/parttool.mod +0 -0
  638. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/password.mod +0 -0
  639. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/password_pbkdf2.mod +0 -0
  640. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/pata.mod +0 -0
  641. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/pbkdf2.mod +0 -0
  642. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/pbkdf2_test.mod +0 -0
  643. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/pcidump.mod +0 -0
  644. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/pgp.mod +0 -0
  645. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/play.mod +0 -0
  646. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/png.mod +0 -0
  647. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/priority_queue.mod +0 -0
  648. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/probe.mod +0 -0
  649. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/procfs.mod +0 -0
  650. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/progress.mod +0 -0
  651. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/raid5rec.mod +0 -0
  652. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/raid6rec.mod +0 -0
  653. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/random.mod +0 -0
  654. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/rdmsr.mod +0 -0
  655. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/read.mod +0 -0
  656. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/reboot.mod +0 -0
  657. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/regexp.mod +0 -0
  658. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/reiserfs.mod +0 -0
  659. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/relocator.mod +0 -0
  660. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/romfs.mod +0 -0
  661. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/scsi.mod +0 -0
  662. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/search.mod +0 -0
  663. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/search_fs_file.mod +0 -0
  664. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/search_fs_uuid.mod +0 -0
  665. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/search_label.mod +0 -0
  666. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/serial.mod +0 -0
  667. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/setjmp.mod +0 -0
  668. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/setjmp_test.mod +0 -0
  669. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/setpci.mod +0 -0
  670. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/sfs.mod +0 -0
  671. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/shift_test.mod +0 -0
  672. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/signature_test.mod +0 -0
  673. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/sleep.mod +0 -0
  674. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/sleep_test.mod +0 -0
  675. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/smbios.mod +0 -0
  676. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/spkmodem.mod +0 -0
  677. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/squash4.mod +0 -0
  678. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/strtoull_test.mod +0 -0
  679. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/syslinuxcfg.mod +0 -0
  680. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/tar.mod +0 -0
  681. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/terminal.lst +0 -0
  682. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/terminal.mod +0 -0
  683. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/terminfo.mod +0 -0
  684. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/test.mod +0 -0
  685. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/test_blockarg.mod +0 -0
  686. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/testload.mod +0 -0
  687. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/testspeed.mod +0 -0
  688. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/tftp.mod +0 -0
  689. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/tga.mod +0 -0
  690. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/time.mod +0 -0
  691. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/tpm.mod +0 -0
  692. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/tr.mod +0 -0
  693. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/trig.mod +0 -0
  694. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/true.mod +0 -0
  695. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/udf.mod +0 -0
  696. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/ufs1.mod +0 -0
  697. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/ufs1_be.mod +0 -0
  698. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/ufs2.mod +0 -0
  699. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/uhci.mod +0 -0
  700. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/usb.mod +0 -0
  701. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/usb_keyboard.mod +0 -0
  702. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/usbms.mod +0 -0
  703. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/usbserial_common.mod +0 -0
  704. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/usbserial_ftdi.mod +0 -0
  705. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/usbserial_pl2303.mod +0 -0
  706. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/usbserial_usbdebug.mod +0 -0
  707. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/usbtest.mod +0 -0
  708. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/video.lst +0 -0
  709. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/video.mod +0 -0
  710. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/video_bochs.mod +0 -0
  711. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/video_cirrus.mod +0 -0
  712. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/video_colors.mod +0 -0
  713. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/video_fb.mod +0 -0
  714. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/videoinfo.mod +0 -0
  715. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/videotest.mod +0 -0
  716. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/videotest_checksum.mod +0 -0
  717. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/wrmsr.mod +0 -0
  718. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/xfs.mod +0 -0
  719. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/xnu.mod +0 -0
  720. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/xnu_uuid.mod +0 -0
  721. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/xnu_uuid_test.mod +0 -0
  722. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/xzio.mod +0 -0
  723. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/zfs.mod +0 -0
  724. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/zfscrypt.mod +0 -0
  725. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/zfsinfo.mod +0 -0
  726. /package/{ipxe/grub → bootloaders/grub/x86_64-efi}/zstd.mod +0 -0
  727. /package/{ipxe → bootloaders}/grubnetx64.efi.signed +0 -0
  728. /package/{ipxe → bootloaders}/ipxe.pxe +0 -0
  729. /package/{syslinux → bootloaders/syslinux}/README.md +0 -0
  730. /package/{syslinux → bootloaders/syslinux}/chain.c32 +0 -0
  731. /package/{syslinux → bootloaders/syslinux}/isohdpfx.bin +0 -0
  732. /package/{syslinux → bootloaders/syslinux}/isolinux.bin +0 -0
  733. /package/{syslinux → bootloaders/syslinux}/ldlinux.c32 +0 -0
  734. /package/{syslinux → bootloaders/syslinux}/libcom32.c32 +0 -0
  735. /package/{syslinux → bootloaders/syslinux}/libutil.c32 +0 -0
  736. /package/{syslinux → bootloaders/syslinux}/lpxelinux.0 +0 -0
  737. /package/{syslinux → bootloaders/syslinux}/memdisk +0 -0
  738. /package/{syslinux → bootloaders/syslinux}/pxelinux.0 +0 -0
  739. /package/{syslinux → bootloaders/syslinux}/vesamenu.c32 +0 -0
  740. /package/{ipxe → bootloaders}/undionly.kpxe +0 -0
@@ -1,102 +1,34 @@
1
1
  /**
2
2
  * ./src/classes/utils.ts
3
- * penguins-eggs v.10.0.0 / ecmascript 2020
3
+ * penguins-eggs v.25.7.x / ecmascript 2020
4
4
  * author: Piero Proietti
5
5
  * email: piero.proietti@gmail.com
6
6
  * license: MIT
7
7
  *
8
8
  * Refactored Utils class - imports from modular utilities
9
9
  */
10
- // Import all utility modules
11
- import System from './utils.d/system.js';
12
- import PackageInfo from './utils.d/package-info.js';
13
- import Network from './utils.d/network.js';
14
- import Filesystem from './utils.d/filesystem.js';
15
- import Snapshot from './utils.d/snapshot.js';
16
- import Architecture from './utils.d/architecture.js';
17
- import UserInteraction from './utils.d/user-interaction.js';
18
- import ConsoleOutput from './utils.d/console-output.js';
19
- import Formatters from './utils.d/formatters.js';
10
+ import shx from 'shelljs';
11
+ import fs from 'fs';
12
+ import dns from 'dns';
13
+ import path from 'path';
14
+ import os from 'os';
15
+ import inquirer from 'inquirer';
16
+ import { execSync, spawnSync } from 'child_process';
17
+ import chalk from 'chalk';
18
+ import { Netmask } from 'netmask';
20
19
  import Kernel from './utils.d/kernel.js';
20
+ import Distro from './distro.js';
21
+ // pjson
22
+ import { createRequire } from 'module';
23
+ const require = createRequire(import.meta.url);
24
+ const pjson = require('../../package.json');
25
+ // __dirname
26
+ const __dirname = path.dirname(new URL(import.meta.url).pathname);
21
27
  /**
22
- * Utils: general purpose utils
23
- * @remarks all the utilities - refactored into modular structure
28
+ * Utils: general porpourse utils
29
+ * @remarks all the utilities
24
30
  */
25
31
  export default class Utils {
26
- // ===== SYSTEM UTILITIES =====
27
- static isContainer = System.isContainer;
28
- static isSystemd = System.isSystemd;
29
- static isSysvinit = System.isSysvinit;
30
- static isOpenRc = System.isOpenRc;
31
- static isLive = System.isLive;
32
- static isMountpoint = System.isMountpoint;
33
- static isBlockDevice = System.isBlockDevice;
34
- static isRoot = System.isRoot;
35
- static machineId = System.machineId;
36
- static getDebianVersion = System.getDebianVersion;
37
- static getLiveRootSpace = System.getLiveRootSpace;
38
- // ===== PACKAGE INFO UTILITIES =====
39
- static getPackageName = PackageInfo.getPackageName;
40
- static getFriendName = PackageInfo.getFriendName;
41
- static getPackageVersion = PackageInfo.getPackageVersion;
42
- static getAuthorName = PackageInfo.getAuthorName;
43
- static isPackage = PackageInfo.isPackage;
44
- static isSources = PackageInfo.isSources;
45
- static isNpmPackage = PackageInfo.isNpmPackage;
46
- static rootPenguin = PackageInfo.rootPenguin;
47
- static wardrobe = PackageInfo.wardrobe;
48
- static getPrimaryUser = PackageInfo.getPrimaryUser;
49
- // ===== NETWORK UTILITIES =====
50
- static iface = Network.iface;
51
- static address = Network.address;
52
- static netmask = Network.netmask;
53
- static cidr = Network.cidr;
54
- static broadcast = Network.broadcast;
55
- static getDns = Network.getDns;
56
- static getDomain = Network.getDomain;
57
- static gateway = Network.gateway;
58
- // ===== FILESYSTEM UTILITIES =====
59
- static searchOnFile = Filesystem.searchOnFile;
60
- static uuid = Filesystem.uuid;
61
- static uuidGen = Filesystem.uuidGen;
62
- static getUsedSpace = Filesystem.getUsedSpace;
63
- static write = Filesystem.write;
64
- static writeX = Filesystem.writeX;
65
- static writeXs = Filesystem.writeXs;
66
- static getOsRelease = Filesystem.getOsRelease;
67
- // ===== SNAPSHOT UTILITIES =====
68
- static snapshotPrefix = Snapshot.snapshotPrefix;
69
- static getSnapshotCount = Snapshot.getSnapshotCount;
70
- static getSnapshotSize = Snapshot.getSnapshotSize;
71
- static getPrefix = Snapshot.getPrefix;
72
- static getVolid = Snapshot.getVolid;
73
- static getPostfix = Snapshot.getPostfix;
74
- // ===== ARCHITECTURE UTILITIES =====
75
- static isi686 = Architecture.isi686;
76
- static uefiArch = Architecture.uefiArch;
77
- static uefiFormat = Architecture.uefiFormat;
78
- static usrLibPath = Architecture.usrLibPath;
79
- static kernelVersion = Architecture.kernelVersion;
80
- // ===== USER INTERACTION UTILITIES =====
81
- static customConfirm = UserInteraction.customConfirm;
82
- static customConfirmCompanion = UserInteraction.customConfirmCompanion;
83
- static customConfirmAbort = UserInteraction.customConfirmAbort;
84
- static pressKeyToExit = UserInteraction.pressKeyToExit;
85
- static useRoot = UserInteraction.useRoot;
86
- static setEcho = UserInteraction.setEcho;
87
- // ===== CONSOLE OUTPUT UTILITIES =====
88
- static warning = ConsoleOutput.warning;
89
- static error = ConsoleOutput.error;
90
- static titles = ConsoleOutput.titles;
91
- static flag = ConsoleOutput.flag;
92
- // ===== FORMATTERS UTILITIES =====
93
- static sortObjectKeys = Formatters.sortObjectKeys;
94
- static formatDate = Formatters.formatDate;
95
- static formatBytes = Formatters.formatBytes;
96
- // ===== KERNEL UTILITIES (already existing) =====
97
- /**
98
- * @deprecated Use Kernel.vmlinuz() instead
99
- */
100
32
  static vmlinuz(kernel = '') {
101
33
  return Kernel.vmlinuz(kernel);
102
34
  }
@@ -106,6 +38,898 @@ export default class Utils {
106
38
  static initrdImg(kernel = '') {
107
39
  return Kernel.initramfs(kernel);
108
40
  }
41
+ /**
42
+ * Custom function to sort object keys
43
+ * @param obj
44
+ * @returns
45
+ */
46
+ static sortObjectKeys(obj) {
47
+ const sorted = {};
48
+ Object.keys(obj)
49
+ .sort()
50
+ .forEach(key => {
51
+ sorted[key] = obj[key];
52
+ });
53
+ return sorted;
54
+ }
55
+ /**
56
+ *
57
+ * @param file
58
+ * @param search
59
+ * @returns value
60
+ */
61
+ static searchOnFile(file = '', search = '') {
62
+ const lines = fs.readFileSync(file, 'utf8').split("\n");
63
+ let value = '';
64
+ lines.forEach(line => {
65
+ line = line.replace(/\s+/g, ' '); // Remove multiple spaces with single space
66
+ if (line.includes(search)) {
67
+ value = line.substring(line.indexOf('=') + 1);
68
+ }
69
+ });
70
+ value = value.replaceAll('"', ''); // Remove "
71
+ return value.trim();
72
+ }
73
+ /**
74
+ * Restituisce il prefisso della iso
75
+ * @param distroId
76
+ * @param codenameId
77
+ */
78
+ static snapshotPrefix(distroId, codenameId) {
79
+ let result = `egg-of_${distroId.toLowerCase()}-`;
80
+ if (codenameId === 'rolling' || codenameId === '') {
81
+ const releaseId = Utils.getOsRelease().VERSION_ID.trim();
82
+ if (releaseId !== '') {
83
+ result += `${releaseId}-`;
84
+ }
85
+ }
86
+ else {
87
+ result += `${codenameId.toLowerCase()}-`;
88
+ }
89
+ result = result.replace(`/`, '-');
90
+ return result;
91
+ }
92
+ /**
93
+ * Detect if running inside a container (Docker or LXC)
94
+ */
95
+ static isContainer() {
96
+ let isContainer = false;
97
+ let pathToCheck = '/ci/README.md';
98
+ if (fs.existsSync(pathToCheck)) {
99
+ isContainer = true;
100
+ }
101
+ return isContainer;
102
+ }
103
+ /**
104
+ * Check if the system uses Systemd
105
+ */
106
+ static isSystemd() {
107
+ let isSystemd = false;
108
+ if (!this.isContainer()) {
109
+ isSystemd = fs.readFileSync("/proc/1/comm").includes('systemd');
110
+ }
111
+ else {
112
+ isSystemd = true;
113
+ let distro = new Distro();
114
+ if (distro.distroId === "Devuan") {
115
+ isSystemd = false;
116
+ }
117
+ }
118
+ return isSystemd;
119
+ }
120
+ /**
121
+ * Check if the system uses SysVinit
122
+ */
123
+ static isSysvinit() {
124
+ let isSysvinit = false;
125
+ if (!this.isContainer()) {
126
+ isSysvinit = fs.readFileSync("/proc/1/comm").includes('init');
127
+ }
128
+ else {
129
+ let distro = new Distro();
130
+ if (distro.distroId === "Devuan") {
131
+ isSysvinit = true;
132
+ }
133
+ }
134
+ return isSysvinit;
135
+ }
136
+ /**
137
+ * Check if the system uses OpenRC
138
+ */
139
+ static isOpenRc() {
140
+ let isOpenRc = false;
141
+ if (!this.isContainer()) {
142
+ try {
143
+ execSync('command -v openrc');
144
+ isOpenRc = true;
145
+ }
146
+ catch (error) {
147
+ isOpenRc = false;
148
+ }
149
+ }
150
+ return isOpenRc;
151
+ }
152
+ /**
153
+ * Occore vedere un modo per creare machine-id dove non esiste
154
+ */
155
+ static machineId() {
156
+ let result = '';
157
+ if (fs.existsSync('/etc/machine-id')) {
158
+ result = fs.readFileSync('/etc/machine-id', 'utf-8').trim();
159
+ }
160
+ else if (fs.existsSync('/var/lib/dbus/machine-id')) {
161
+ result = fs.readFileSync('/var/lib/dbus/machine-id', 'utf-8').trim();
162
+ }
163
+ return result;
164
+ }
165
+ /**
166
+ *
167
+ * @param msg
168
+ */
169
+ static warning(msg = '') {
170
+ console.log(pjson.shortName + ' >>> ' + chalk.cyanBright(msg) + '.');
171
+ }
172
+ static error(msg = '') {
173
+ console.error(pjson.shortName + ' >>> ' + chalk.bgMagentaBright(chalk.whiteBright(msg)) + '.');
174
+ }
175
+ /**
176
+ * Return the primary user's name
177
+ */
178
+ static async getPrimaryUser() {
179
+ const { execSync } = require('child_process');
180
+ let primaryUser = '';
181
+ try {
182
+ // Attempt to get the user from logname
183
+ primaryUser = execSync('/usr/bin/logname 2>/dev/null', { encoding: 'utf-8' }).trim();
184
+ }
185
+ catch (error) {
186
+ // console.log("logname failed, so we continue with other methods")
187
+ }
188
+ if (primaryUser === 'root') {
189
+ primaryUser = '';
190
+ }
191
+ if (primaryUser === '') {
192
+ try {
193
+ // Check if doas is installed and get the DOAS_USER
194
+ execSync('command -v doas', { stdio: 'ignore' });
195
+ primaryUser = execSync('echo $DOAS_USER', { encoding: 'utf-8' }).trim();
196
+ }
197
+ catch (error) {
198
+ // console.log("doas is not installed or DOAS_USER is not set, continue with the next method")
199
+ }
200
+ }
201
+ if (primaryUser === '') {
202
+ try {
203
+ // Check for the SUDO_USER
204
+ primaryUser = execSync('echo $SUDO_USER', { encoding: 'utf-8' }).trim();
205
+ }
206
+ catch (error) {
207
+ // console.log("SUDO_USER is not set, continue with the next method")
208
+ }
209
+ }
210
+ if (primaryUser === '') {
211
+ // console.log("Fallback to the USER environment variable")
212
+ primaryUser = process.env.USER || '';
213
+ }
214
+ if (primaryUser === '') {
215
+ primaryUser = 'dummy';
216
+ // console.error('Cannot determine the primary user.');
217
+ // process.exit(1);
218
+ }
219
+ return primaryUser;
220
+ }
221
+ /**
222
+ * restituisce uuid
223
+ * @param device
224
+ */
225
+ static uuid(device) {
226
+ const uuid = shx.exec(`blkid -s UUID -o value ${device}`).stdout.trim();
227
+ return uuid;
228
+ }
229
+ /**
230
+ *
231
+ * @param device
232
+ * @returns
233
+ */
234
+ static uuidGen() {
235
+ const uuid = shx.exec(`uuidgen`, { silent: true }).stdout.trim();
236
+ return uuid;
237
+ }
238
+ /**
239
+ *
240
+ * @param date
241
+ */
242
+ static formatDate(date) {
243
+ const d = new Date(date);
244
+ let month = String(d.getMonth() + 1);
245
+ let day = String(d.getDate());
246
+ const year = d.getFullYear();
247
+ let hh = String(d.getHours());
248
+ let mm = String(d.getMinutes());
249
+ if (month.length < 2) {
250
+ month = '0' + month;
251
+ }
252
+ if (day.length < 2) {
253
+ day = '0' + day;
254
+ }
255
+ if (hh.length < 2) {
256
+ hh = '0' + hh;
257
+ }
258
+ if (mm.length < 2) {
259
+ mm = '0' + mm;
260
+ }
261
+ return [year, month, day].join('-') + '_' + hh + mm;
262
+ }
263
+ /**
264
+ * return the name of the package: penguins-eggs
265
+ * @returns penguins-eggs
266
+ */
267
+ static getPackageName() {
268
+ return pjson.shortName;
269
+ }
270
+ /**
271
+ * Count the eggs present in the nest
272
+ * @returns {number} Numero degli snapshot presenti
273
+ */
274
+ static getSnapshotCount(snapshot_dir = '/') {
275
+ if (fs.existsSync(snapshot_dir)) {
276
+ const files = fs.readdirSync(snapshot_dir);
277
+ let nIsos = 0;
278
+ for (const f of files) {
279
+ if (f.endsWith('.iso')) {
280
+ nIsos++;
281
+ }
282
+ }
283
+ return nIsos;
284
+ }
285
+ return 0;
286
+ }
287
+ /**
288
+ * Get the syze of the snapshot
289
+ * @returns {string} grandezza dello snapshot in Byte
290
+ */
291
+ static getSnapshotSize(snapshot_dir = '/') {
292
+ let fileSizeInBytes = 0;
293
+ const size = shx.exec(`/usr/bin/find ${snapshot_dir} -maxdepth 1 -type f -name '*.iso' -exec du -sc {} + | tail -1 | awk '{print $1}'`, { silent: true }).stdout.trim();
294
+ if (size === '') {
295
+ fileSizeInBytes = 0;
296
+ }
297
+ else {
298
+ fileSizeInBytes = Number(size);
299
+ }
300
+ return fileSizeInBytes;
301
+ }
302
+ /**
303
+ * uefiArch
304
+ * @returns arch
305
+ */
306
+ static uefiArch() {
307
+ let arch = '';
308
+ if (process.arch === 'ia32') {
309
+ arch = 'i386';
310
+ //
311
+ if (shx.exec('uname -m', { silent: true }).stdout.trim() === 'x86_64') {
312
+ arch = 'amd64';
313
+ }
314
+ }
315
+ else if (process.arch === 'x64') {
316
+ arch = 'amd64';
317
+ }
318
+ else if (process.arch === 'arm64') {
319
+ arch = 'arm64';
320
+ }
321
+ return arch;
322
+ }
323
+ /**
324
+ * i386-pc,
325
+ * i386-efi,
326
+ * x86_64-efi,
327
+ * arm64-efi,
328
+ *
329
+ * ATTEMZIONE: install efibootmgr
330
+ *
331
+ * Fedora/RHEL have i386-pc
332
+ */
333
+ static uefiFormat() {
334
+ let format = '';
335
+ if (process.arch === 'ia32') {
336
+ format = 'i386-efi';
337
+ if (shx.exec('uname -m', { silent: true }).stdout.trim() === 'x86_64') {
338
+ format = 'x86_64-efi';
339
+ }
340
+ }
341
+ else if (process.arch === 'x64') {
342
+ format = 'x86_64-efi';
343
+ }
344
+ else if (process.arch === 'arm64') {
345
+ format = 'arm64-efi';
346
+ }
347
+ return format;
348
+ }
349
+ /**
350
+ *
351
+ * @returns
352
+ */
353
+ static usrLibPath() {
354
+ let path = '';
355
+ if (process.arch === 'x64') {
356
+ path = 'x86_64-linux-gnu';
357
+ }
358
+ else if (process.arch === 'arm64') {
359
+ path = 'aarch64-linux-gnu';
360
+ }
361
+ return path;
362
+ }
363
+ /**
364
+ *
365
+ * @param prefix
366
+ * @param backup
367
+ * @returns
368
+ */
369
+ static getPrefix(prefix, backup = false) {
370
+ if (backup) {
371
+ if (prefix.substring(0, 7) === 'egg-of_') {
372
+ prefix = 'egg-bk_' + prefix.substring(7);
373
+ }
374
+ else {
375
+ prefix = 'egg-bk_' + prefix;
376
+ }
377
+ }
378
+ return prefix;
379
+ }
380
+ /**
381
+ *
382
+ * @param volid
383
+ */
384
+ static getVolid(volid = 'unknown') {
385
+ // // 28 + 4 .iso = 32 lunghezza max di volid
386
+ if (volid.length >= 32) {
387
+ volid = volid.substring(0, 32);
388
+ }
389
+ return volid;
390
+ }
391
+ /**
392
+ * Return postfix
393
+ * @param basename
394
+ * @returns eggName
395
+ */
396
+ static getPostfix() {
397
+ let postfix = '_' + Utils.formatDate(new Date()) + '.iso';
398
+ return postfix;
399
+ }
400
+ /**
401
+ * Calculate the space used on the disk
402
+ * @return {void}
403
+ */
404
+ static getUsedSpace() {
405
+ let fileSizeInBytes = 0;
406
+ if (this.isLive()) {
407
+ fileSizeInBytes = 0; // this.getLiveRootSpace()
408
+ }
409
+ else {
410
+ fileSizeInBytes = Number(shx.exec(`df /home | /usr/bin/awk 'NR==2 {print $3}'`, {
411
+ silent: true
412
+ }).stdout);
413
+ }
414
+ return fileSizeInBytes;
415
+ }
416
+ /**
417
+ * Extimate the linuxfs dimension
418
+ * probably is better to rename it as
419
+ * getLiveSpaceRootNeed
420
+ * @returns {number} Byte
421
+ */
422
+ static getLiveRootSpace(type = 'debian-live') {
423
+ let squashFs = '/run/live/medium/live/filesystem.squashfs';
424
+ if (type === 'mx') {
425
+ squashFs = '/live/boot-dev/antiX/linuxfs';
426
+ }
427
+ // Ottengo la dimensione del file compresso
428
+ const compressedFs = fs.statSync(squashFs).size;
429
+ // get compression factor by reading the linuxfs squasfs file, if available
430
+ const compressedFs_compression_type = shx.exec(`dd if=${compressedFs} bs=1 skip=20 count=2 status=none 2>/dev/null| /usr/bin/od -An -tdI`);
431
+ let compression_factor = 0;
432
+ if (compressedFs_compression_type === '1') {
433
+ compression_factor = 37; // gzip
434
+ }
435
+ else if (compressedFs_compression_type === '2') {
436
+ compression_factor = 52; // lzo, not used by antiX
437
+ }
438
+ else if (compressedFs_compression_type === '3') {
439
+ compression_factor = 52; // lzma, not used by antiX
440
+ }
441
+ else if (compressedFs_compression_type === '4') {
442
+ compression_factor = 31; // xz
443
+ }
444
+ else if (compressedFs_compression_type === '5') {
445
+ compression_factor = 52; // lz4
446
+ }
447
+ else {
448
+ compression_factor = 30; // anything else or linuxfs not reachable (toram), should be pretty conservative
449
+ }
450
+ let rootfs_file_size = 0;
451
+ const linuxfs_file_size = (Number(shx.exec('df /live/linux --output=used --total | /usr/bin/tail -n1').stdout.trim()) * 1024 * 100) / compression_factor;
452
+ if (fs.existsSync('/live/persist-root')) {
453
+ rootfs_file_size = Number(shx.exec('df /live/persist-root --output=used --total | /usr/bin/tail -n1').stdout.trim()) * 1024;
454
+ }
455
+ let rootSpaceNeeded;
456
+ if (type === 'mx') {
457
+ /**
458
+ * add rootfs file size to the calculated linuxfs file size. Probaby conservative, as rootfs will likely have some overlap with linuxfs
459
+ */
460
+ rootSpaceNeeded = linuxfs_file_size + rootfs_file_size;
461
+ }
462
+ else {
463
+ rootSpaceNeeded = linuxfs_file_size;
464
+ }
465
+ return rootSpaceNeeded / 1073741824.0; // Converte in GB
466
+ }
467
+ /**
468
+ * Return true if i686 architecture
469
+ * @remarks to move in Utils
470
+ * @returns {boolean} true se l'architettura è i686
471
+ */
472
+ static isi686() {
473
+ return process.arch === 'ia32';
474
+ }
475
+ /**
476
+ * Controlla se è un pacchetto deb
477
+ * /usr/lib/penguins-eggs/bin/node
478
+ */
479
+ static isPackage() {
480
+ let ret = false;
481
+ //if (process.execPath !== '/usr/bin/node') {
482
+ if (process.execPath === '/usr/lib/penguins-eggs/bin/node') {
483
+ ret = true;
484
+ }
485
+ return ret;
486
+ }
487
+ /**
488
+ * Controlla se è un pacchetto sorgente
489
+ */
490
+ static isSources() {
491
+ let ret = false;
492
+ if (__dirname.substring(0, 6) === '/home/') {
493
+ ret = true;
494
+ }
495
+ return ret;
496
+ }
497
+ /**
498
+ * Controlla se è un pacchetto npm
499
+ */
500
+ static isNpmPackage() {
501
+ return !(this.isPackage() || this.isSources());
502
+ }
503
+ /**
504
+ *
505
+ */
506
+ static rootPenguin() {
507
+ return path.resolve(__dirname, '../../');
508
+ }
509
+ /**
510
+ * return the short name of the package: eggs
511
+ * @returns eggs
512
+ */
513
+ static getFriendName() {
514
+ return pjson.shortName;
515
+ }
516
+ /**
517
+ * return the version of the package
518
+ * @returns version example 8.0.0
519
+ */
520
+ static getPackageVersion() {
521
+ return pjson.version;
522
+ }
523
+ /**
524
+ * Get author name
525
+ */
526
+ static getAuthorName() {
527
+ return 'Piero Proietti piero.proietti@gmail.com';
528
+ }
529
+ /**
530
+ * Return the Debian version
531
+ * @returns {number} Versione di Debian
532
+ */
533
+ static getDebianVersion() {
534
+ const cmd = "cat /etc/debian_version | /usr/bin/cut -f1 -d'.'";
535
+ const version = Number(shx.exec(cmd, { silent: true }).stdout);
536
+ return version;
537
+ }
538
+ /**
539
+ * Return true if live system
540
+ * @returns {boolean} isLive
541
+ */
542
+ static isLive() {
543
+ let retVal = false;
544
+ const paths = [
545
+ '/lib/live/mount', // debian-live
546
+ '/run/live/rootfs/filesystem.squashfs', // debian trixie
547
+ '/lib/live/mount/rootfs/filesystem.squashfs', // ubuntu bionic
548
+ '/live/aufs', // mx-linux
549
+ '/media/root-rw', // AlpineLinux
550
+ '/run/archiso/airootfs', // Arch
551
+ '/run/miso/sfs/livefs', // Manjarolinux
552
+ '/run/rootfsbase' // Fedora
553
+ ];
554
+ for (let i = 0; i < paths.length; i++) {
555
+ if (Utils.isMountpoint(paths[i])) {
556
+ retVal = true;
557
+ }
558
+ }
559
+ return retVal;
560
+ }
561
+ /**
562
+ * Ritorna vero se path è un mountpoint
563
+ * @param path
564
+ */
565
+ static isMountpoint(path = '') {
566
+ const cmd = `mountpoint -q ${path}`;
567
+ // return 0 if the directory is a mountpoint, non-zero if not.
568
+ const result = shx.exec(cmd, { silent: true }).code;
569
+ return result === 0;
570
+ }
571
+ /**
572
+ *
573
+ * @param device
574
+ * @returns
575
+ */
576
+ static isBlockDevice(device = '') {
577
+ const cmd = `lsblk -d -o name | grep ${device}`;
578
+ const result = shx.exec(cmd, { silent: true }).code;
579
+ return result === 0;
580
+ }
581
+ /**
582
+ * return true if eggs run as root
583
+ * @returns isRoot
584
+ */
585
+ static isRoot(command = '') {
586
+ if (process.getuid && process.getuid() === 0) {
587
+ return true;
588
+ }
589
+ return false;
590
+ }
591
+ /**
592
+ *
593
+ * @param command
594
+ */
595
+ static useRoot(command = '') {
596
+ Utils.titles(pjson.shortName + ' ' + command + ` need to run with root privileges. Please, prefix it with sudo`);
597
+ }
598
+ /**
599
+ * get the kernel version
600
+ */
601
+ static kernelVersion() {
602
+ return os.release();
603
+ }
604
+ /**
605
+ * return the name of network device
606
+ */
607
+ static async iface() {
608
+ // return shx.exec(`ifconfig | awk 'FNR==1 { print $1 }' | tr --d :`, { silent: true }).stdout.trim()
609
+ const interfaces = Object.keys(os.networkInterfaces());
610
+ let netDeviceName = '';
611
+ for (const k in interfaces) {
612
+ if (interfaces[k] != 'lo') {
613
+ netDeviceName = interfaces[k];
614
+ }
615
+ }
616
+ return netDeviceName;
617
+ }
618
+ /**
619
+ * address
620
+ */
621
+ static address() {
622
+ const interfaces = os.networkInterfaces();
623
+ let address = '';
624
+ if (interfaces !== undefined) {
625
+ for (const devName in interfaces) {
626
+ const iface = interfaces[devName];
627
+ if (iface !== undefined) {
628
+ for (const alias of iface) {
629
+ if (alias.family === 'IPv4' &&
630
+ alias.address !== '127.0.0.1' &&
631
+ !alias.internal) {
632
+ // take just the first!
633
+ if (address === '') {
634
+ address = alias.address;
635
+ }
636
+ }
637
+ }
638
+ }
639
+ }
640
+ }
641
+ return address;
642
+ }
643
+ /**
644
+ * netmask
645
+ */
646
+ static netmask() {
647
+ const interfaces = os.networkInterfaces();
648
+ let netmask = '';
649
+ if (interfaces !== undefined) {
650
+ for (const devName in interfaces) {
651
+ const iface = interfaces[devName];
652
+ if (iface !== undefined) {
653
+ for (const alias of iface) {
654
+ if (alias.family === 'IPv4' &&
655
+ alias.address !== '127.0.0.1' &&
656
+ !alias.internal) {
657
+ // take just the first!
658
+ if (netmask === '') {
659
+ netmask = alias.netmask;
660
+ }
661
+ }
662
+ }
663
+ }
664
+ }
665
+ }
666
+ return netmask;
667
+ }
668
+ /**
669
+ * cidr
670
+ */
671
+ static cidr() {
672
+ const interfaces = os.networkInterfaces();
673
+ let cidr = '';
674
+ if (interfaces !== undefined) {
675
+ for (const devName in interfaces) {
676
+ const iface = interfaces[devName];
677
+ if (iface !== undefined) {
678
+ for (const alias of iface) {
679
+ if (alias.family === 'IPv4' &&
680
+ alias.address !== '127.0.0.1' &&
681
+ !alias.internal) {
682
+ // take just the first!
683
+ if (cidr === '') {
684
+ if (alias.cidr !== null) {
685
+ cidr = alias.cidr;
686
+ }
687
+ }
688
+ }
689
+ }
690
+ }
691
+ }
692
+ }
693
+ return cidr;
694
+ }
695
+ /**
696
+ *
697
+ * broadcast
698
+ */
699
+ static broadcast() {
700
+ let n = new Netmask(Utils.cidr());
701
+ return n.broadcast;
702
+ }
703
+ /**
704
+ * dns
705
+ */
706
+ static getDns() {
707
+ return dns.getServers();
708
+ }
709
+ /**
710
+ * getDomain
711
+ */
712
+ static getDomain() {
713
+ return shx.exec('domainname', { silent: true }).stdout.trim();
714
+ // return shx.exec(`route -n | grep 'UG[ \t]' | awk '{print $2}'`, { silent: true }).stdout.trim()
715
+ }
716
+ /**
717
+ * @returns gateway
718
+ */
719
+ static gateway() {
720
+ return shx.exec(`ip r | grep 'default' | awk '{print $3}'`, { silent: true }).stdout.trim();
721
+ //return shx.exec(`route -n | grep 'UG[ \t]' | awk '{print $2}'`, { silent: true }).stdout.trim()
722
+ }
723
+ /**
724
+ * write a file
725
+ * @param file
726
+ * @param text
727
+ */
728
+ static write(file, text) {
729
+ text = text.trim() + '\n';
730
+ file = file.trim();
731
+ fs.writeFileSync(file, text);
732
+ }
733
+ /**
734
+ *
735
+ * @param file
736
+ * @param cmd
737
+ */
738
+ static writeX(file, cmd) {
739
+ let text = `#!/bin/sh\n\n`;
740
+ text += `# Created at: ${Utils.formatDate(new Date())}\n`;
741
+ text += `# By: penguins_eggs v. ${Utils.getPackageVersion()}\n`;
742
+ text += `# ==> Perri\'s Brewery edition <== \n\n`;
743
+ text += cmd;
744
+ Utils.write(file, text);
745
+ shx.chmod('+x', file);
746
+ }
747
+ /**
748
+ *
749
+ * @param file
750
+ * @param cmd
751
+ */
752
+ static writeXs(file, cmds) {
753
+ let cmd = '';
754
+ for (const elem of cmds) {
755
+ cmd += elem + '\n';
756
+ }
757
+ Utils.writeX(file, cmd);
758
+ }
759
+ /**
760
+ *
761
+ * @param msg
762
+ */
763
+ static async customConfirm(msg = 'Select yes to continue... ') {
764
+ const varResult = await Utils.customConfirmCompanion(msg);
765
+ const result = JSON.parse(varResult);
766
+ if (result.confirm === 'Yes') {
767
+ return true;
768
+ }
769
+ else {
770
+ return false;
771
+ }
772
+ }
773
+ /**
774
+ *
775
+ * @param msg
776
+ */
777
+ static async customConfirmCompanion(msg = 'Select yes to continue... ') {
778
+ return new Promise(function (resolve) {
779
+ const questions = [
780
+ {
781
+ type: 'list',
782
+ name: 'confirm',
783
+ message: msg,
784
+ choices: ['No', 'Yes'],
785
+ default: 'No'
786
+ }
787
+ ];
788
+ inquirer.prompt(questions).then(function (options) {
789
+ resolve(JSON.stringify(options));
790
+ });
791
+ });
792
+ }
793
+ /**
794
+ *
795
+ * @param msg
796
+ */
797
+ static async customConfirmAbort(msg = 'Confirm') {
798
+ return new Promise(function (resolve) {
799
+ const questions = [
800
+ {
801
+ type: 'list',
802
+ name: 'confirm',
803
+ message: msg,
804
+ choices: ['No', 'Yes', 'Abort'],
805
+ default: 'Yes'
806
+ }
807
+ ];
808
+ inquirer.prompt(questions).then(function (options) {
809
+ resolve(JSON.stringify(options));
810
+ });
811
+ });
812
+ }
813
+ /**
814
+ *
815
+ */
816
+ static async pressKeyToExit(warming = 'Process will end', procContinue = true) {
817
+ Utils.warning(warming);
818
+ let msg = 'Press a key to exit...';
819
+ if (procContinue) {
820
+ msg = 'Press a key to continue...';
821
+ }
822
+ console.log(msg);
823
+ const pressKeyToExit = spawnSync('read _ ', { shell: true, stdio: [0, 1, 2] });
824
+ if (!procContinue) {
825
+ process.exit(0);
826
+ }
827
+ }
828
+ /**
829
+ * titles
830
+ * Penguin's are gettings alive!
831
+ */
832
+ static titles(command = '') {
833
+ console.clear();
834
+ console.log('');
835
+ console.log(' E G G S: the reproductive system of penguins');
836
+ console.log('');
837
+ console.log(Utils.flag());
838
+ console.log('command: ' + chalk.bgBlack.white(command) + '\n');
839
+ }
840
+ /**
841
+ *
842
+ * @returns flag
843
+ */
844
+ static flag() {
845
+ return chalk.bgGreen.whiteBright(' ' + pjson.name + ' ') +
846
+ chalk.bgWhite.blue(" Perri's Brewery edition ") +
847
+ chalk.bgRed.whiteBright(' ver. ' + pjson.version + ' ');
848
+ }
849
+ /**
850
+ *
851
+ * @param verbose
852
+ */
853
+ static setEcho(verbose = false) {
854
+ let echo = { echo: false, ignore: true };
855
+ if (verbose) {
856
+ echo = { echo: true, ignore: false };
857
+ }
858
+ return echo;
859
+ }
860
+ /**
861
+ *
862
+ * @param bytes
863
+ * @param decimals
864
+ * @returns
865
+ */
866
+ static formatBytes(bytes, decimals = 2) {
867
+ if (bytes === 0)
868
+ return '0 Bytes';
869
+ const k = 1024;
870
+ const dm = decimals < 0 ? 0 : decimals;
871
+ const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
872
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
873
+ return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + sizes[i];
874
+ }
875
+ /**
876
+ *
877
+ * @returns wardrobe
878
+ */
879
+ static async wardrobe() {
880
+ let wardrobe = `${os.homedir()}/.wardrobe`;
881
+ if (Utils.isRoot()) {
882
+ wardrobe = `/home/${await Utils.getPrimaryUser()}/.wardrobe`;
883
+ }
884
+ return wardrobe;
885
+ }
886
+ // Se il metodo fa parte di una classe, usa `static`. Altrimenti, rimuovilo.
887
+ static getOsRelease() {
888
+ const osReleasePath = path.join('/etc', 'os-release');
889
+ // Inizializza l'oggetto con valori predefiniti
890
+ const osInfo = {
891
+ ID: '',
892
+ VERSION_ID: '',
893
+ VERSION_CODENAME: 'n/a'
894
+ };
895
+ // Verifica se il file esiste
896
+ if (!fs.existsSync(osReleasePath)) {
897
+ console.error('/etc/os-release file does not exist.');
898
+ return osInfo;
899
+ }
900
+ // Leggi il contenuto del file
901
+ let fileContent;
902
+ try {
903
+ fileContent = fs.readFileSync(osReleasePath, 'utf8');
904
+ }
905
+ catch (error) {
906
+ console.error('Error reading /etc/os-release:', error);
907
+ return osInfo;
908
+ }
909
+ // Analizza ogni linea
910
+ const lines = fileContent.split('\n');
911
+ lines.forEach(line => {
912
+ if (line.startsWith('#') || line.trim() === '')
913
+ return;
914
+ const [key, value] = line.split('=');
915
+ if (key && value) {
916
+ const trimmedKey = key.trim();
917
+ const trimmedValue = value.trim().replace(/"/g, '');
918
+ // Popola solo le chiavi desiderate
919
+ if (trimmedKey === 'ID') {
920
+ osInfo.ID = trimmedValue;
921
+ }
922
+ else if (trimmedKey === 'VERSION_ID') {
923
+ osInfo.VERSION_ID = trimmedValue;
924
+ }
925
+ else if (trimmedKey === 'VERSION_CODENAME') {
926
+ osInfo.VERSION_CODENAME = trimmedValue;
927
+ }
928
+ }
929
+ });
930
+ // capitalize distroId
931
+ osInfo.ID = osInfo.ID[0].toUpperCase() + osInfo.ID.slice(1).toLowerCase();
932
+ osInfo.VERSION_CODENAME = osInfo.VERSION_CODENAME.toLowerCase();
933
+ return osInfo;
934
+ }
109
935
  }
110
- // Export individual modules for direct access if needed
111
- export { System, PackageInfo, Network, Filesystem, Snapshot, Architecture, UserInteraction, ConsoleOutput, Formatters, Kernel };