penguins-eggs 10.0.26 → 10.0.28

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 (324) hide show
  1. package/.oclif.manifest.json +2 -1463
  2. package/README.md +3 -741
  3. package/manpages/doc/man/eggs.1.gz +0 -0
  4. package/manpages/doc/man/eggs.html +4 -4
  5. package/package.json +3 -3
  6. package/scripts/love +13 -18
  7. package/dist/classes/bleach.d.ts +0 -32
  8. package/dist/classes/bleach.js +0 -136
  9. package/dist/classes/cfs.d.ts +0 -17
  10. package/dist/classes/cfs.js +0 -39
  11. package/dist/classes/cli-autologin.d.ts +0 -52
  12. package/dist/classes/cli-autologin.js +0 -230
  13. package/dist/classes/compressors.d.ts +0 -54
  14. package/dist/classes/compressors.js +0 -109
  15. package/dist/classes/daddy.d.ts +0 -26
  16. package/dist/classes/daddy.js +0 -161
  17. package/dist/classes/distro.d.ts +0 -36
  18. package/dist/classes/distro.js +0 -346
  19. package/dist/classes/families/alpine.d.ts +0 -55
  20. package/dist/classes/families/alpine.js +0 -108
  21. package/dist/classes/families/archlinux.d.ts +0 -61
  22. package/dist/classes/families/archlinux.js +0 -140
  23. package/dist/classes/families/debian.d.ts +0 -65
  24. package/dist/classes/families/debian.js +0 -138
  25. package/dist/classes/families/fedora.d.ts +0 -52
  26. package/dist/classes/families/fedora.js +0 -100
  27. package/dist/classes/families/mockup.d.ts +0 -60
  28. package/dist/classes/families/mockup.js +0 -79
  29. package/dist/classes/families/opensuse.d.ts +0 -52
  30. package/dist/classes/families/opensuse.js +0 -104
  31. package/dist/classes/incubation/branding.d.ts +0 -17
  32. package/dist/classes/incubation/branding.js +0 -89
  33. package/dist/classes/incubation/distros/bionic.d.ts +0 -32
  34. package/dist/classes/incubation/distros/bionic.js +0 -83
  35. package/dist/classes/incubation/distros/buster.d.ts +0 -32
  36. package/dist/classes/incubation/distros/buster.js +0 -85
  37. package/dist/classes/incubation/distros/jessie.d.ts +0 -31
  38. package/dist/classes/incubation/distros/jessie.js +0 -44
  39. package/dist/classes/incubation/distros/noble.d.ts +0 -32
  40. package/dist/classes/incubation/distros/noble.js +0 -85
  41. package/dist/classes/incubation/distros/rolling.d.ts +0 -32
  42. package/dist/classes/incubation/distros/rolling.js +0 -82
  43. package/dist/classes/incubation/fisherman-helper/displaymanager.d.ts +0 -11
  44. package/dist/classes/incubation/fisherman-helper/displaymanager.js +0 -39
  45. package/dist/classes/incubation/fisherman-helper/packages.d.ts +0 -20
  46. package/dist/classes/incubation/fisherman-helper/packages.js +0 -72
  47. package/dist/classes/incubation/fisherman-helper/settings.d.ts +0 -15
  48. package/dist/classes/incubation/fisherman-helper/settings.js +0 -83
  49. package/dist/classes/incubation/fisherman.d.ts +0 -77
  50. package/dist/classes/incubation/fisherman.js +0 -251
  51. package/dist/classes/incubation/incubator.d.ts +0 -40
  52. package/dist/classes/incubation/incubator.js +0 -328
  53. package/dist/classes/incubation/installer.d.ts +0 -13
  54. package/dist/classes/incubation/installer.js +0 -64
  55. package/dist/classes/keyboards.d.ts +0 -50
  56. package/dist/classes/keyboards.js +0 -217
  57. package/dist/classes/locales.d.ts +0 -21
  58. package/dist/classes/locales.js +0 -80
  59. package/dist/classes/n8.d.ts +0 -18
  60. package/dist/classes/n8.js +0 -36
  61. package/dist/classes/network.d.ts +0 -37
  62. package/dist/classes/network.js +0 -98
  63. package/dist/classes/ovary.d.ts +0 -214
  64. package/dist/classes/ovary.js +0 -1879
  65. package/dist/classes/pacman.d.ts +0 -149
  66. package/dist/classes/pacman.js +0 -699
  67. package/dist/classes/pve-live.d.ts +0 -17
  68. package/dist/classes/pve-live.js +0 -52
  69. package/dist/classes/pxe.d.ts +0 -74
  70. package/dist/classes/pxe.js +0 -410
  71. package/dist/classes/settings.d.ts +0 -53
  72. package/dist/classes/settings.js +0 -185
  73. package/dist/classes/sources_list.d.ts +0 -28
  74. package/dist/classes/sources_list.js +0 -89
  75. package/dist/classes/systemctl.d.ts +0 -47
  76. package/dist/classes/systemctl.js +0 -86
  77. package/dist/classes/tailor.d.ts +0 -46
  78. package/dist/classes/tailor.js +0 -539
  79. package/dist/classes/tools.d.ts +0 -30
  80. package/dist/classes/tools.js +0 -54
  81. package/dist/classes/users.d.ts +0 -28
  82. package/dist/classes/users.js +0 -143
  83. package/dist/classes/utils.d.ts +0 -323
  84. package/dist/classes/utils.js +0 -946
  85. package/dist/classes/xdg.d.ts +0 -45
  86. package/dist/classes/xdg.js +0 -329
  87. package/dist/classes/yolk.d.ts +0 -33
  88. package/dist/classes/yolk.js +0 -114
  89. package/dist/commands/adapt.d.ts +0 -17
  90. package/dist/commands/adapt.js +0 -33
  91. package/dist/commands/analyze.d.ts +0 -26
  92. package/dist/commands/analyze.js +0 -95
  93. package/dist/commands/calamares.d.ts +0 -29
  94. package/dist/commands/calamares.js +0 -110
  95. package/dist/commands/config.d.ts +0 -35
  96. package/dist/commands/config.js +0 -192
  97. package/dist/commands/cuckoo.d.ts +0 -16
  98. package/dist/commands/cuckoo.js +0 -62
  99. package/dist/commands/dad.d.ts +0 -20
  100. package/dist/commands/dad.js +0 -46
  101. package/dist/commands/export/deb.d.ts +0 -19
  102. package/dist/commands/export/deb.js +0 -51
  103. package/dist/commands/export/iso.d.ts +0 -19
  104. package/dist/commands/export/iso.js +0 -55
  105. package/dist/commands/install.d.ts +0 -37
  106. package/dist/commands/install.js +0 -92
  107. package/dist/commands/kill.d.ts +0 -24
  108. package/dist/commands/kill.js +0 -50
  109. package/dist/commands/mom.d.ts +0 -16
  110. package/dist/commands/mom.js +0 -30
  111. package/dist/commands/produce.d.ts +0 -34
  112. package/dist/commands/produce.js +0 -199
  113. package/dist/commands/status.d.ts +0 -23
  114. package/dist/commands/status.js +0 -31
  115. package/dist/commands/syncfrom.d.ts +0 -45
  116. package/dist/commands/syncfrom.js +0 -152
  117. package/dist/commands/syncto.d.ts +0 -40
  118. package/dist/commands/syncto.js +0 -175
  119. package/dist/commands/tools/clean.d.ts +0 -18
  120. package/dist/commands/tools/clean.js +0 -37
  121. package/dist/commands/tools/ppa.d.ts +0 -26
  122. package/dist/commands/tools/ppa.js +0 -138
  123. package/dist/commands/tools/skel.d.ts +0 -18
  124. package/dist/commands/tools/skel.js +0 -44
  125. package/dist/commands/tools/stat.d.ts +0 -31
  126. package/dist/commands/tools/stat.js +0 -70
  127. package/dist/commands/tools/yolk.d.ts +0 -24
  128. package/dist/commands/tools/yolk.js +0 -45
  129. package/dist/commands/update.d.ts +0 -47
  130. package/dist/commands/update.js +0 -140
  131. package/dist/commands/wardrobe/get.d.ts +0 -23
  132. package/dist/commands/wardrobe/get.js +0 -52
  133. package/dist/commands/wardrobe/list.d.ts +0 -24
  134. package/dist/commands/wardrobe/list.js +0 -125
  135. package/dist/commands/wardrobe/show.d.ts +0 -25
  136. package/dist/commands/wardrobe/show.js +0 -97
  137. package/dist/commands/wardrobe/wear.d.ts +0 -26
  138. package/dist/commands/wardrobe/wear.js +0 -81
  139. package/dist/components/finished.d.ts +0 -15
  140. package/dist/components/finished.js +0 -55
  141. package/dist/components/information.d.ts +0 -8
  142. package/dist/components/information.js +0 -153
  143. package/dist/components/install.d.ts +0 -15
  144. package/dist/components/install.js +0 -56
  145. package/dist/components/keyboard.d.ts +0 -16
  146. package/dist/components/keyboard.js +0 -54
  147. package/dist/components/location.d.ts +0 -16
  148. package/dist/components/location.js +0 -59
  149. package/dist/components/network.d.ts +0 -19
  150. package/dist/components/network.js +0 -65
  151. package/dist/components/partitions.d.ts +0 -16
  152. package/dist/components/partitions.js +0 -73
  153. package/dist/components/steps.d.ts +0 -13
  154. package/dist/components/steps.js +0 -148
  155. package/dist/components/summary.d.ts +0 -24
  156. package/dist/components/summary.js +0 -82
  157. package/dist/components/title.d.ts +0 -11
  158. package/dist/components/title.js +0 -35
  159. package/dist/components/users.d.ts +0 -24
  160. package/dist/components/users.js +0 -80
  161. package/dist/components/welcome.d.ts +0 -13
  162. package/dist/components/welcome.js +0 -63
  163. package/dist/index.d.ts +0 -8
  164. package/dist/index.js +0 -8
  165. package/dist/interfaces/i-addons.d.ts +0 -13
  166. package/dist/interfaces/i-addons.js +0 -8
  167. package/dist/interfaces/i-analyze.d.ts +0 -17
  168. package/dist/interfaces/i-analyze.js +0 -17
  169. package/dist/interfaces/i-app.d.ts +0 -14
  170. package/dist/interfaces/i-app.js +0 -8
  171. package/dist/interfaces/i-branding.d.ts +0 -36
  172. package/dist/interfaces/i-branding.js +0 -8
  173. package/dist/interfaces/i-calamares-partition.d.ts +0 -18
  174. package/dist/interfaces/i-calamares-partition.js +0 -8
  175. package/dist/interfaces/i-config-tools.d.ts +0 -18
  176. package/dist/interfaces/i-config-tools.js +0 -8
  177. package/dist/interfaces/i-devices.d.ts +0 -20
  178. package/dist/interfaces/i-devices.js +0 -8
  179. package/dist/interfaces/i-distro.d.ts +0 -27
  180. package/dist/interfaces/i-distro.js +0 -8
  181. package/dist/interfaces/i-drive-list.d.ts +0 -33
  182. package/dist/interfaces/i-drive-list.js +0 -8
  183. package/dist/interfaces/i-eggs-config.d.ts +0 -32
  184. package/dist/interfaces/i-eggs-config.js +0 -8
  185. package/dist/interfaces/i-excludes.d.ts +0 -14
  186. package/dist/interfaces/i-excludes.js +0 -8
  187. package/dist/interfaces/i-exec.d.ts +0 -11
  188. package/dist/interfaces/i-exec.js +0 -8
  189. package/dist/interfaces/i-initrd.d.ts +0 -13
  190. package/dist/interfaces/i-initrd.js +0 -8
  191. package/dist/interfaces/i-install.d.ts +0 -16
  192. package/dist/interfaces/i-install.js +0 -8
  193. package/dist/interfaces/i-installer.d.ts +0 -17
  194. package/dist/interfaces/i-installer.js +0 -8
  195. package/dist/interfaces/i-krill-config.d.ts +0 -33
  196. package/dist/interfaces/i-krill-config.js +0 -8
  197. package/dist/interfaces/i-krill.d.ts +0 -42
  198. package/dist/interfaces/i-krill.js +0 -8
  199. package/dist/interfaces/i-materia.d.ts +0 -41
  200. package/dist/interfaces/i-materia.js +0 -8
  201. package/dist/interfaces/i-net.d.ts +0 -16
  202. package/dist/interfaces/i-net.js +0 -8
  203. package/dist/interfaces/i-packages.d.ts +0 -16
  204. package/dist/interfaces/i-packages.js +0 -8
  205. package/dist/interfaces/i-partitions.d.ts +0 -16
  206. package/dist/interfaces/i-partitions.js +0 -8
  207. package/dist/interfaces/i-pxe.d.ts +0 -45
  208. package/dist/interfaces/i-pxe.js +0 -1
  209. package/dist/interfaces/i-remix.d.ts +0 -21
  210. package/dist/interfaces/i-remix.js +0 -8
  211. package/dist/interfaces/i-settings.d.ts +0 -33
  212. package/dist/interfaces/i-settings.js +0 -8
  213. package/dist/interfaces/i-user.d.ts +0 -14
  214. package/dist/interfaces/i-user.js +0 -8
  215. package/dist/interfaces/i-workdir.d.ts +0 -14
  216. package/dist/interfaces/i-workdir.js +0 -8
  217. package/dist/interfaces/i-xkb-model.d.ts +0 -24
  218. package/dist/interfaces/i-xkb-model.js +0 -8
  219. package/dist/interfaces/index.d.ts +0 -25
  220. package/dist/interfaces/index.js +0 -8
  221. package/dist/krill/modules/add-user.d.ts +0 -20
  222. package/dist/krill/modules/add-user.js +0 -50
  223. package/dist/krill/modules/bootloader-config-arch.d.ts +0 -14
  224. package/dist/krill/modules/bootloader-config-arch.js +0 -37
  225. package/dist/krill/modules/bootloader-config-debian.d.ts +0 -10
  226. package/dist/krill/modules/bootloader-config-debian.js +0 -50
  227. package/dist/krill/modules/bootloader-config.d.ts +0 -10
  228. package/dist/krill/modules/bootloader-config.js +0 -16
  229. package/dist/krill/modules/bootloader.d.ts +0 -14
  230. package/dist/krill/modules/bootloader.js +0 -30
  231. package/dist/krill/modules/change-password.d.ts +0 -15
  232. package/dist/krill/modules/change-password.js +0 -18
  233. package/dist/krill/modules/del-live-user.d.ts +0 -14
  234. package/dist/krill/modules/del-live-user.js +0 -38
  235. package/dist/krill/modules/fstab.d.ts +0 -14
  236. package/dist/krill/modules/fstab.js +0 -121
  237. package/dist/krill/modules/grubcfg.d.ts +0 -17
  238. package/dist/krill/modules/grubcfg.js +0 -29
  239. package/dist/krill/modules/hostname.d.ts +0 -13
  240. package/dist/krill/modules/hostname.js +0 -50
  241. package/dist/krill/modules/initramfs-cfg.d.ts +0 -14
  242. package/dist/krill/modules/initramfs-cfg.js +0 -25
  243. package/dist/krill/modules/initramfs.d.ts +0 -13
  244. package/dist/krill/modules/initramfs.js +0 -48
  245. package/dist/krill/modules/locale-cfg.d.ts +0 -10
  246. package/dist/krill/modules/locale-cfg.js +0 -61
  247. package/dist/krill/modules/locale.d.ts +0 -13
  248. package/dist/krill/modules/locale.js +0 -48
  249. package/dist/krill/modules/m-keyboard.d.ts +0 -14
  250. package/dist/krill/modules/m-keyboard.js +0 -79
  251. package/dist/krill/modules/m-timezone.d.ts +0 -14
  252. package/dist/krill/modules/m-timezone.js +0 -22
  253. package/dist/krill/modules/machine-id.d.ts +0 -15
  254. package/dist/krill/modules/machine-id.js +0 -30
  255. package/dist/krill/modules/mkfs.d.ts +0 -13
  256. package/dist/krill/modules/mkfs.js +0 -48
  257. package/dist/krill/modules/mount-fs.d.ts +0 -17
  258. package/dist/krill/modules/mount-fs.js +0 -60
  259. package/dist/krill/modules/mount-vfs.d.ts +0 -17
  260. package/dist/krill/modules/mount-vfs.js +0 -40
  261. package/dist/krill/modules/network-cfg.d.ts +0 -19
  262. package/dist/krill/modules/network-cfg.js +0 -64
  263. package/dist/krill/modules/packages.d.ts +0 -14
  264. package/dist/krill/modules/packages.js +0 -98
  265. package/dist/krill/modules/partition.d.ts +0 -20
  266. package/dist/krill/modules/partition.js +0 -324
  267. package/dist/krill/modules/remove-installer-link.d.ts +0 -13
  268. package/dist/krill/modules/remove-installer-link.js +0 -35
  269. package/dist/krill/modules/umount.d.ts +0 -14
  270. package/dist/krill/modules/umount.js +0 -27
  271. package/dist/krill/modules/unpackfs.d.ts +0 -13
  272. package/dist/krill/modules/unpackfs.js +0 -19
  273. package/dist/krill/prepare.d.ts +0 -78
  274. package/dist/krill/prepare.js +0 -626
  275. package/dist/krill/sequence.d.ts +0 -157
  276. package/dist/krill/sequence.js +0 -665
  277. package/dist/lib/get_address.d.ts +0 -8
  278. package/dist/lib/get_address.js +0 -23
  279. package/dist/lib/get_dns.d.ts +0 -8
  280. package/dist/lib/get_dns.js +0 -23
  281. package/dist/lib/get_domain.d.ts +0 -8
  282. package/dist/lib/get_domain.js +0 -23
  283. package/dist/lib/get_gateway.d.ts +0 -8
  284. package/dist/lib/get_gateway.js +0 -23
  285. package/dist/lib/get_hostname.d.ts +0 -8
  286. package/dist/lib/get_hostname.js +0 -23
  287. package/dist/lib/get_netmask.d.ts +0 -8
  288. package/dist/lib/get_netmask.js +0 -23
  289. package/dist/lib/get_password.d.ts +0 -8
  290. package/dist/lib/get_password.js +0 -36
  291. package/dist/lib/get_userfullname.d.ts +0 -8
  292. package/dist/lib/get_userfullname.js +0 -23
  293. package/dist/lib/get_username.d.ts +0 -8
  294. package/dist/lib/get_username.js +0 -23
  295. package/dist/lib/kill_me_softly.d.ts +0 -11
  296. package/dist/lib/kill_me_softly.js +0 -61
  297. package/dist/lib/select_address_type.d.ts +0 -8
  298. package/dist/lib/select_address_type.js +0 -24
  299. package/dist/lib/select_filesystem_type.d.ts +0 -8
  300. package/dist/lib/select_filesystem_type.js +0 -45
  301. package/dist/lib/select_installation_device.d.ts +0 -8
  302. package/dist/lib/select_installation_device.js +0 -30
  303. package/dist/lib/select_installation_mode.d.ts +0 -8
  304. package/dist/lib/select_installation_mode.js +0 -24
  305. package/dist/lib/select_interface.d.ts +0 -8
  306. package/dist/lib/select_interface.js +0 -24
  307. package/dist/lib/select_keyboard_layout.d.ts +0 -11
  308. package/dist/lib/select_keyboard_layout.js +0 -36
  309. package/dist/lib/select_keyboard_model.d.ts +0 -11
  310. package/dist/lib/select_keyboard_model.js +0 -34
  311. package/dist/lib/select_keyboard_option.d.ts +0 -11
  312. package/dist/lib/select_keyboard_option.js +0 -34
  313. package/dist/lib/select_keyboard_variant.d.ts +0 -11
  314. package/dist/lib/select_keyboard_variant.js +0 -35
  315. package/dist/lib/select_languages.d.ts +0 -8
  316. package/dist/lib/select_languages.js +0 -28
  317. package/dist/lib/select_regions.d.ts +0 -8
  318. package/dist/lib/select_regions.js +0 -24
  319. package/dist/lib/select_user_swap_choice.d.ts +0 -8
  320. package/dist/lib/select_user_swap_choice.js +0 -34
  321. package/dist/lib/select_zones.d.ts +0 -8
  322. package/dist/lib/select_zones.js +0 -518
  323. package/dist/lib/utils.d.ts +0 -34
  324. package/dist/lib/utils.js +0 -79
@@ -1,13 +0,0 @@
1
- /**
2
- * ./src/classes/incubation/installer.ts
3
- * penguins-eggs v.10.0.0 / ecmascript 2020
4
- * author: Piero Proietti
5
- * email: piero.proietti@gmail.com
6
- * license: MIT
7
- */
8
- import { IInstaller } from '../../interfaces/index.js';
9
- /**
10
- *
11
- * @returns
12
- */
13
- export declare function installer(): IInstaller;
@@ -1,64 +0,0 @@
1
- /**
2
- * ./src/classes/incubation/installer.ts
3
- * penguins-eggs v.10.0.0 / ecmascript 2020
4
- * author: Piero Proietti
5
- * email: piero.proietti@gmail.com
6
- * license: MIT
7
- */
8
- /**
9
- * installer
10
- *
11
- * name = 'calamares' oppure 'krill'
12
- * configRoot = '/etc/calamares/' oppure '/etc/penguins-eggs.d/krill/'
13
- * modules = configuration + 'modules/'
14
- * modulesMultiarch = '/usr/lib/' + arch-linux-gnu + '/' + installer + '/'
15
- *
16
- * template = '/etc/penguins-eggs/' + .distro.codenameLikeId + '/' + installer + '/'
17
- * templateModules = template + '/modules/'
18
- * templateMultiarch = template + installer + '-modules/'
19
- *
20
- */
21
- import Distro from '../../classes/distro.js';
22
- import Pacman from '../../classes/pacman.js';
23
- /**
24
- *
25
- * @returns
26
- */
27
- export function installer() {
28
- const installer = {};
29
- // configRoot
30
- installer.configRoot = '';
31
- if (Pacman.calamaresExists()) {
32
- installer.name = 'calamares';
33
- installer.configRoot = '/etc/calamares/';
34
- installer.multiarch = Pacman.distro().usrLibPath + '/calamares/';
35
- }
36
- else {
37
- installer.name = 'krill';
38
- installer.configRoot = '/etc/penguins-eggs.d/krill/';
39
- installer.multiarch = Pacman.distro().usrLibPath + '/krill/';
40
- }
41
- installer.modules = installer.configRoot + 'modules/';
42
- installer.multiarchModules = installer.multiarch + 'modules/';
43
- /**
44
- * se distro.isCalamaresAvailable()
45
- * i template di calamares e krill sono gli stessi
46
- */
47
- const distro = new Distro();
48
- if (distro.isCalamaresAvailable) {
49
- installer.template = '/etc/penguins-eggs.d/distros/' + distro.codenameLikeId + '/calamares/';
50
- /*
51
- if (distro.distroId === 'ManjaroLinux') {
52
- installer.template = '/etc/penguins-eggs.d/distros/' + distro.codenameLikeId + '/calamares-3.2/'
53
- }
54
- */
55
- installer.templateModules = installer.template + 'modules/';
56
- installer.templateMultiarch = installer.template + 'calamares-modules/';
57
- }
58
- else {
59
- installer.template = '/etc/penguins-eggs.d/distros/' + distro.codenameLikeId + '/krill/';
60
- installer.templateModules = installer.template + 'modules/';
61
- installer.templateMultiarch = installer.template + 'krill-modules/';
62
- }
63
- return installer;
64
- }
@@ -1,50 +0,0 @@
1
- /**
2
- * ./src/classes/keyboards.ts
3
- * penguins-eggs v.10.0.0 / ecmascript 2020
4
- * author: Piero Proietti
5
- * email: piero.proietti@gmail.com
6
- * license: MIT
7
- */
8
- import { IXkbLayout, IXkbModel, IXkbOption, IXkbVariant } from '../interfaces/i-xkb-model.js';
9
- /**
10
- * /usr/share/X11/xkb/rules/xorg.lst
11
- */
12
- export default class Keyboard {
13
- layouts: string[];
14
- models: string[];
15
- options: string[];
16
- variants: string[];
17
- constructor();
18
- /**
19
- * XKBLAYOUT='us'
20
- */
21
- getLayout(): Promise<string>;
22
- /**
23
- * XKBLAYOUT=[]
24
- */
25
- getLayouts(): IXkbLayout[];
26
- /**
27
- * XKBMODEL='pc105'
28
- */
29
- getModel(): Promise<string>;
30
- /**
31
- * XKBMODEL[]
32
- */
33
- getModels(): IXkbModel[];
34
- /**
35
- * XKBOPTIONS=''
36
- */
37
- getOption(): Promise<string>;
38
- /**
39
- * XKBOPTIONS[]
40
- */
41
- getOptions(): IXkbOption[];
42
- /**
43
- * XKBVARIANT=''
44
- */
45
- getVariant(): Promise<string>;
46
- /**
47
- * IXkbVariant[]
48
- */
49
- getVariants(layout: string): IXkbVariant[];
50
- }
@@ -1,217 +0,0 @@
1
- /**
2
- * ./src/classes/keyboards.ts
3
- * penguins-eggs v.10.0.0 / ecmascript 2020
4
- * author: Piero Proietti
5
- * email: piero.proietti@gmail.com
6
- * license: MIT
7
- */
8
- import fs from 'node:fs';
9
- import { exec } from '../lib/utils.js';
10
- // XkbModel - name of the model of your keyboard type
11
- // XkbLayout - layout(s) you intend to use
12
- // XkbVariant - variant(s) of the layout you intend to use
13
- // XkbOptions - extra xkb configuration options
14
- /**
15
- * /usr/share/X11/xkb/rules/xorg.lst
16
- */
17
- export default class Keyboard {
18
- layouts = [];
19
- models = [];
20
- options = [];
21
- variants = [];
22
- constructor() {
23
- const xorg = '/usr/share/X11/xkb/rules/xorg.lst';
24
- if (fs.existsSync(xorg)) {
25
- const lines = fs.readFileSync(xorg, 'utf8').split('\n');
26
- const lenght = lines.length;
27
- let isModel = false;
28
- let isLayout = false;
29
- let isVariant = false;
30
- let isOption = false;
31
- for (let i = 0; i < lenght; i++) {
32
- if (lines[i].slice(0, 1) === '!') {
33
- switch (lines[i]) {
34
- case '! model': {
35
- isModel = true;
36
- isLayout = false;
37
- isVariant = false;
38
- isOption = false;
39
- break;
40
- }
41
- case '! layout': {
42
- isModel = false;
43
- isLayout = true;
44
- isVariant = false;
45
- isOption = false;
46
- break;
47
- }
48
- case '! variant': {
49
- isModel = false;
50
- isLayout = false;
51
- isVariant = true;
52
- isOption = false;
53
- break;
54
- }
55
- case '! option': {
56
- isModel = false;
57
- isLayout = false;
58
- isVariant = false;
59
- isOption = true;
60
- break;
61
- }
62
- // No default
63
- }
64
- i++;
65
- }
66
- if (isModel) {
67
- this.models.push(lines[i].trim());
68
- }
69
- else if (isLayout) {
70
- this.layouts.push(lines[i].trim());
71
- }
72
- else if (isVariant) {
73
- this.variants.push(lines[i].trim());
74
- }
75
- else if (isOption) {
76
- this.options.push(lines[i].trim());
77
- }
78
- }
79
- }
80
- else {
81
- this.models.push('pc105');
82
- this.layouts = [
83
- 'af', 'al', 'am', 'ara', 'at', 'az', 'ba', 'bd', 'be', 'bg', 'br',
84
- 'brai', 'by', 'ca', 'ch', 'cm', 'cn', 'cz', 'de', 'dk', 'dz', 'ee',
85
- 'epo', 'fr', 'gb', 'ge', 'gh', 'gr', 'hr', 'hu', 'id', 'ie', 'il',
86
- 'in', 'iq', 'ir', 'is', 'it', 'jp', 'ke', 'kg', 'kr', 'kz', 'la',
87
- 'latam', 'lk', 'lt', 'lv', 'ma', 'md', 'me', 'mk', 'ml', 'mm',
88
- 'mt', 'my', 'ng', 'nl', 'no', 'nz', 'ph', 'pk', 'pl', 'pt', 'ro',
89
- 'rs', 'ru', 'se', 'si', 'sk', 'sy', 'th', 'tj', 'tw', 'ua',
90
- 'us', 'uz', 'vn'
91
- ];
92
- this.variants.push('none');
93
- this.options.push('none');
94
- }
95
- }
96
- /**
97
- * XKBLAYOUT='us'
98
- */
99
- async getLayout() {
100
- const file = '/etc/default/keyboard';
101
- const cmd = 'grep XKBLAYOUT < /etc/default/keyboard | cut -f2 -d= | cut -f2 "-d\\""';
102
- let keyboardLayout = 'us';
103
- if (fs.existsSync(file)) {
104
- const result = await exec(cmd, { capture: true, echo: false, ignore: false });
105
- if (result.code === 0) {
106
- keyboardLayout = result.data.trim();
107
- }
108
- }
109
- return keyboardLayout;
110
- }
111
- /**
112
- * XKBLAYOUT=[]
113
- */
114
- getLayouts() {
115
- const oLayouts = [];
116
- for (const layout of this.layouts) {
117
- const l = {};
118
- l.code = layout.slice(0, 15).trim();
119
- l.description = layout.slice(16);
120
- oLayouts.push(l);
121
- }
122
- return oLayouts;
123
- }
124
- /**
125
- * XKBMODEL='pc105'
126
- */
127
- async getModel() {
128
- const file = '/etc/default/keyboard';
129
- const cmd = `grep XKBMODEL < ${file} |cut -f2 -d= | cut -f2 "-d\\""`;
130
- let keyboardModel = 'pc105';
131
- if (fs.existsSync(file)) {
132
- const result = await exec(cmd, { capture: true, echo: false, ignore: false });
133
- if (result.code === 0) {
134
- keyboardModel = result.data.trim();
135
- }
136
- }
137
- return keyboardModel;
138
- }
139
- /**
140
- * XKBMODEL[]
141
- */
142
- getModels() {
143
- // 0123456789012345678901234567890123456789
144
- // pc101 Generic 101-key PC
145
- const oModels = [];
146
- for (const model of this.models) {
147
- const m = {};
148
- m.code = model.slice(0, 15).trim();
149
- m.description = model.slice(16);
150
- oModels.push(m);
151
- }
152
- return oModels;
153
- }
154
- /**
155
- * XKBOPTIONS=''
156
- */
157
- async getOption() {
158
- const file = '/etc/default/keyboard';
159
- const cmd = `grep XKBOPTIONS < ${file} | cut -f2 -d= | cut -f2 "-d\\""`;
160
- let keyboardOption = '';
161
- if (fs.existsSync(file)) {
162
- const result = await exec(cmd, { capture: true, echo: false, ignore: false });
163
- if (result.code === 0) {
164
- keyboardOption = result.data.trim();
165
- }
166
- }
167
- return keyboardOption;
168
- }
169
- /**
170
- * XKBOPTIONS[]
171
- */
172
- getOptions() {
173
- // 0123456789012345678901234567890123456789
174
- // grp:switch Right Alt (while pressed)
175
- const aoOptions = [];
176
- for (const option of this.options) {
177
- const o = {};
178
- o.code = option.slice(0, 15).trim();
179
- o.description = option.slice(21);
180
- aoOptions.push(o);
181
- }
182
- return aoOptions;
183
- }
184
- /**
185
- * XKBVARIANT=''
186
- */
187
- async getVariant() {
188
- const file = '/etc/default/keyboard';
189
- const cmd = `grep XKBVARIANT < ${file} | cut -f2 -d=|cut -f2 "-d\\""`;
190
- let keyboardVariant = '';
191
- if (fs.existsSync(file)) {
192
- const result = await exec(cmd, { capture: true, echo: false, ignore: false });
193
- if (result.code === 0) {
194
- keyboardVariant = result.data.trim();
195
- }
196
- }
197
- return keyboardVariant;
198
- }
199
- /**
200
- * IXkbVariant[]
201
- */
202
- getVariants(layout) {
203
- // 0123456789012345678901234567890123456789
204
- // chr us: Cherokee
205
- const aoVariants = [];
206
- for (const variant of this.variants) {
207
- const v = {};
208
- v.code = variant.slice(0, 15).trim();
209
- v.lang = variant.substring(16, variant.indexOf(':')).trim();
210
- v.description = variant.slice(Math.max(0, variant.indexOf(':')));
211
- if (v.lang === layout) {
212
- aoVariants.push(v);
213
- }
214
- }
215
- return aoVariants;
216
- }
217
- }
@@ -1,21 +0,0 @@
1
- /**
2
- * ./src/classes/locales.ts
3
- * penguins-eggs v.10.0.0 / ecmascript 2020
4
- * author: Piero Proietti
5
- * email: piero.proietti@gmail.com
6
- * license: MIT
7
- */
8
- export default class Locales {
9
- /**
10
- *
11
- */
12
- getDefault(): Promise<string>;
13
- /**
14
- *
15
- */
16
- getEnabled(): Promise<string[]>;
17
- /**
18
- *
19
- */
20
- getSupported(): Promise<string[]>;
21
- }
@@ -1,80 +0,0 @@
1
- /**
2
- * ./src/classes/locales.ts
3
- * penguins-eggs v.10.0.0 / ecmascript 2020
4
- * author: Piero Proietti
5
- * email: piero.proietti@gmail.com
6
- * license: MIT
7
- */
8
- import fs from 'node:fs';
9
- import { exec } from '../lib/utils.js';
10
- import Distro from './distro.js';
11
- export default class Locales {
12
- /**
13
- *
14
- */
15
- async getDefault() {
16
- const file = '/etc/default/locale';
17
- const cmd = `grep LANG < ${file}|cut -f2 -d=`;
18
- let defaultLanguage = 'en_US.UTF-8';
19
- if (fs.existsSync(file)) {
20
- const result = await exec(cmd, { capture: true, echo: false, ignore: false });
21
- if (result.code === 0) {
22
- defaultLanguage = result.data.replaceAll('"', '').replaceAll("'", '').trim();
23
- }
24
- }
25
- return defaultLanguage;
26
- }
27
- /**
28
- *
29
- */
30
- async getEnabled() {
31
- const distro = new Distro();
32
- let cmd = 'localectl list-locales';
33
- if (distro.familyId === 'alpine') {
34
- cmd = 'locale -a';
35
- }
36
- // Restituisce i locales abilitati in Debian, per manjaro quelli presenti
37
- // in /etc/locale.gen anche se #disabilitati
38
- const enabledLocales = [];
39
- const result = await exec(cmd, { capture: true, echo: false, ignore: false });
40
- if (result.code === 0) {
41
- const lines = result.data.split('\n');
42
- for (const line of lines) {
43
- if (distro.familyId === 'alpine') {
44
- enabledLocales.push(line.replaceAll('"', '').replaceAll("'", '').trim() + '.UTF-8');
45
- }
46
- else {
47
- enabledLocales.push(line.replaceAll('"', '').replaceAll("'", '').trim());
48
- }
49
- }
50
- }
51
- return enabledLocales;
52
- }
53
- /**
54
- *
55
- */
56
- async getSupported() {
57
- const distro = new Distro();
58
- let supporteds = [];
59
- switch (distro.familyId) {
60
- case 'alpine': {
61
- supporteds = await this.getEnabled();
62
- break;
63
- }
64
- case 'debian': {
65
- supporteds = fs.readFileSync('/usr/share/i18n/SUPPORTED', 'utf8').split('\n');
66
- break;
67
- }
68
- case 'archlinux': {
69
- supporteds = (await exec('localectl list-locales', { capture: true, echo: false, ignore: false })).data.split('\n');
70
- break;
71
- }
72
- // No default
73
- }
74
- const elements = [];
75
- for (const elem of supporteds) {
76
- elements.push(elem.replace(' UTF-8', ''));
77
- }
78
- return elements;
79
- }
80
- }
@@ -1,18 +0,0 @@
1
- /**
2
- * ./src/classes/n8.ts (node 8)
3
- * penguins-eggs v.10.0.0 / ecmascript 2020
4
- * author: Piero Proietti
5
- * email: piero.proietti@gmail.com
6
- * license: MIT
7
- */
8
- import { Dirent } from 'node:fs';
9
- export default class n8 {
10
- static dirent2string(dir: Dirent): string;
11
- /**
12
- *
13
- * @param dirPath
14
- */
15
- static isDirectory(name: string): boolean;
16
- static isFile(name: string): boolean;
17
- static isSymbolicLink(name: string): boolean;
18
- }
@@ -1,36 +0,0 @@
1
- /**
2
- * ./src/classes/n8.ts (node 8)
3
- * penguins-eggs v.10.0.0 / ecmascript 2020
4
- * author: Piero Proietti
5
- * email: piero.proietti@gmail.com
6
- * license: MIT
7
- */
8
- import fs from 'node:fs';
9
- export default class n8 {
10
- static dirent2string(dir) {
11
- return dir.name;
12
- // Removed not needed more node8 is past
13
- let dirname = '';
14
- dirname = process.versions.node.split('.')[0] === '8' ? JSON.stringify(dir).replace('"', '').replace('"', '') : dir.name;
15
- return dirname;
16
- }
17
- /**
18
- *
19
- * @param dirPath
20
- */
21
- static isDirectory(name) {
22
- const path = '/' + name;
23
- const isDirectory = fs.existsSync(path) && fs.lstatSync(path).isDirectory();
24
- return isDirectory;
25
- }
26
- static isFile(name) {
27
- const path = '/' + name;
28
- const isFile = fs.existsSync(path) && fs.lstatSync(path).isFile();
29
- return isFile;
30
- }
31
- static isSymbolicLink(name) {
32
- const path = '/' + name;
33
- const isSymbolicLink = fs.existsSync(path) && fs.lstatSync(path).isSymbolicLink();
34
- return isSymbolicLink;
35
- }
36
- }
@@ -1,37 +0,0 @@
1
- /**
2
- * ./src/classes/network.ts
3
- * penguins-eggs v.10.0.0 / ecmascript 2020
4
- * author: Piero Proietti
5
- * email: piero.proietti@gmail.com
6
- * license: MIT
7
- */
8
- import { Netmask } from 'netmask';
9
- /**
10
- *
11
- */
12
- export default class Network {
13
- address: string;
14
- cidr: string;
15
- family: string;
16
- internal: boolean;
17
- mac: string;
18
- netmask: string;
19
- o: Netmask;
20
- /**
21
- *
22
- */
23
- constructor();
24
- base(): string;
25
- bitmask(): void;
26
- broadcast(): string;
27
- contains(): (address: string | Netmask | number) => boolean;
28
- first(): string;
29
- forEach(): (cb: (ip: string, long: number, index: number) => void) => void;
30
- hostmask(): string;
31
- last(): string;
32
- maskLong(): number;
33
- netLong(): number;
34
- next(): (count?: number) => Netmask;
35
- size(): number;
36
- toString(): () => string;
37
- }
@@ -1,98 +0,0 @@
1
- /**
2
- * ./src/classes/network.ts
3
- * penguins-eggs v.10.0.0 / ecmascript 2020
4
- * author: Piero Proietti
5
- * email: piero.proietti@gmail.com
6
- * license: MIT
7
- */
8
- import { Netmask } from 'netmask';
9
- import os from 'node:os';
10
- /**
11
- *
12
- */
13
- export default class Network {
14
- address = '';
15
- cidr = '';
16
- family = '';
17
- internal = false;
18
- mac = '';
19
- netmask = '';
20
- o = {};
21
- /**
22
- *
23
- */
24
- constructor() {
25
- const interfaces = os.networkInterfaces();
26
- const address = '';
27
- if (interfaces !== undefined) {
28
- for (const devName in interfaces) {
29
- const iface = interfaces[devName];
30
- if (iface !== undefined) {
31
- for (const alias of iface) {
32
- if (alias.family === 'IPv4' && alias.address !== '127.0.0.1' && !alias.internal) {
33
- // take just the first!
34
- if (this.address === '') {
35
- this.address = alias.address;
36
- }
37
- if (this.cidr === '' && alias.cidr !== null) {
38
- this.cidr = alias.cidr;
39
- }
40
- if (this.family === '') {
41
- this.family = alias.family;
42
- }
43
- if (this.mac === '') {
44
- this.mac = alias.mac;
45
- }
46
- if (this.netmask === '') {
47
- this.netmask = alias.netmask;
48
- }
49
- }
50
- }
51
- }
52
- }
53
- /**
54
- * valori da netmask
55
- */
56
- this.o = new Netmask(this.cidr);
57
- }
58
- }
59
- base() {
60
- return this.o.base;
61
- }
62
- bitmask() {
63
- this.o.bitmask;
64
- }
65
- broadcast() {
66
- return this.o.broadcast;
67
- }
68
- contains() {
69
- return this.o.contains;
70
- }
71
- first() {
72
- return this.o.first;
73
- }
74
- forEach() {
75
- return this.o.forEach;
76
- }
77
- hostmask() {
78
- return this.o.hostmask;
79
- }
80
- last() {
81
- return this.o.last;
82
- }
83
- maskLong() {
84
- return this.o.maskLong;
85
- }
86
- netLong() {
87
- return this.o.netLong;
88
- }
89
- next() {
90
- return this.o.next;
91
- }
92
- size() {
93
- return this.o.size;
94
- }
95
- toString() {
96
- return this.o.toString;
97
- }
98
- }