penguins-eggs 10.0.2 → 10.0.7

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 (185) hide show
  1. package/.oclif.manifest.json +26 -30
  2. package/README.md +106 -1164
  3. package/addons/eggs/theme/livecd/grub.main.cfg +3 -3
  4. package/addons/eggs/theme/livecd/isolinux.main.cfg +3 -3
  5. package/assets/calamares/install-system.sh +9 -5
  6. package/conf/derivatives.yaml +2 -1
  7. package/dist/classes/bleach.d.ts +6 -6
  8. package/dist/classes/bleach.js +6 -6
  9. package/dist/classes/cfs.d.ts +6 -6
  10. package/dist/classes/cfs.js +6 -6
  11. package/dist/classes/compressors.d.ts +8 -7
  12. package/dist/classes/compressors.js +19 -9
  13. package/dist/classes/daddy.d.ts +6 -6
  14. package/dist/classes/daddy.js +13 -13
  15. package/dist/classes/distro.d.ts +12 -2
  16. package/dist/classes/distro.js +41 -46
  17. package/dist/classes/families/archlinux.d.ts +6 -6
  18. package/dist/classes/families/archlinux.js +7 -11
  19. package/dist/classes/families/debian.d.ts +6 -6
  20. package/dist/classes/families/debian.js +6 -6
  21. package/dist/classes/families/mockup.js +2 -4
  22. package/dist/classes/families/suse.d.ts +2 -2
  23. package/dist/classes/families/suse.js +2 -2
  24. package/dist/classes/incubation/branding.js +24 -25
  25. package/dist/classes/incubation/distros/focal.js +1 -1
  26. package/dist/classes/incubation/distros/rolling.d.ts +4 -4
  27. package/dist/classes/incubation/distros/rolling.js +4 -4
  28. package/dist/classes/incubation/fisherman-helper/packages.js +9 -6
  29. package/dist/classes/incubation/incubator.js +6 -7
  30. package/dist/classes/incubation/installer.js +1 -2
  31. package/dist/classes/initrd.d.ts +6 -6
  32. package/dist/classes/initrd.js +6 -6
  33. package/dist/classes/keyboards.d.ts +6 -6
  34. package/dist/classes/keyboards.js +6 -6
  35. package/dist/classes/locales.d.ts +12 -12
  36. package/dist/classes/locales.js +14 -14
  37. package/dist/classes/n8.d.ts +6 -6
  38. package/dist/classes/n8.js +6 -6
  39. package/dist/classes/network.d.ts +6 -6
  40. package/dist/classes/network.js +9 -11
  41. package/dist/classes/ovary.d.ts +43 -43
  42. package/dist/classes/ovary.js +215 -217
  43. package/dist/classes/pacman.d.ts +6 -6
  44. package/dist/classes/pacman.js +8 -10
  45. package/dist/classes/pve-live.d.ts +6 -6
  46. package/dist/classes/pve-live.js +6 -6
  47. package/dist/classes/pxe.d.ts +34 -25
  48. package/dist/classes/pxe.js +205 -190
  49. package/dist/classes/settings.d.ts +6 -6
  50. package/dist/classes/settings.js +9 -9
  51. package/dist/classes/sources_list.d.ts +16 -16
  52. package/dist/classes/sources_list.js +20 -20
  53. package/dist/classes/systemctl.js +2 -2
  54. package/dist/classes/tailor.d.ts +22 -22
  55. package/dist/classes/tailor.js +88 -88
  56. package/dist/classes/tools.d.ts +6 -6
  57. package/dist/classes/tools.js +6 -6
  58. package/dist/classes/users.d.ts +9 -9
  59. package/dist/classes/users.js +33 -35
  60. package/dist/classes/xdg.d.ts +6 -6
  61. package/dist/classes/xdg.js +13 -9
  62. package/dist/classes/yolk.d.ts +8 -8
  63. package/dist/classes/yolk.js +9 -15
  64. package/dist/commands/adapt.d.ts +2 -2
  65. package/dist/commands/adapt.js +2 -4
  66. package/dist/commands/analyze.d.ts +2 -2
  67. package/dist/commands/analyze.js +1 -1
  68. package/dist/commands/calamares.d.ts +8 -8
  69. package/dist/commands/calamares.js +8 -13
  70. package/dist/commands/config.d.ts +6 -7
  71. package/dist/commands/config.js +11 -23
  72. package/dist/commands/cuckoo.d.ts +2 -2
  73. package/dist/commands/cuckoo.js +11 -10
  74. package/dist/commands/dad.d.ts +4 -4
  75. package/dist/commands/dad.js +2 -6
  76. package/dist/commands/export/deb.d.ts +4 -4
  77. package/dist/commands/export/deb.js +2 -6
  78. package/dist/commands/export/iso.d.ts +4 -4
  79. package/dist/commands/export/iso.js +2 -5
  80. package/dist/commands/install.d.ts +15 -15
  81. package/dist/commands/install.js +7 -25
  82. package/dist/commands/kill.d.ts +4 -4
  83. package/dist/commands/kill.js +3 -5
  84. package/dist/commands/mom.d.ts +1 -1
  85. package/dist/commands/mom.js +2 -4
  86. package/dist/commands/produce.d.ts +19 -18
  87. package/dist/commands/produce.js +16 -18
  88. package/dist/commands/status.d.ts +2 -2
  89. package/dist/commands/status.js +2 -4
  90. package/dist/commands/syncfrom.d.ts +7 -7
  91. package/dist/commands/syncfrom.js +6 -9
  92. package/dist/commands/syncto.d.ts +4 -4
  93. package/dist/commands/syncto.js +8 -12
  94. package/dist/commands/tools/clean.d.ts +3 -3
  95. package/dist/commands/tools/clean.js +3 -5
  96. package/dist/commands/tools/ppa.d.ts +5 -5
  97. package/dist/commands/tools/ppa.js +14 -17
  98. package/dist/commands/tools/skel.d.ts +3 -3
  99. package/dist/commands/tools/skel.js +2 -5
  100. package/dist/commands/tools/stat.d.ts +3 -3
  101. package/dist/commands/tools/stat.js +3 -7
  102. package/dist/commands/tools/yolk.d.ts +2 -2
  103. package/dist/commands/tools/yolk.js +2 -4
  104. package/dist/commands/update.d.ts +2 -2
  105. package/dist/commands/update.js +4 -6
  106. package/dist/commands/wardrobe/get.d.ts +3 -3
  107. package/dist/commands/wardrobe/get.js +4 -7
  108. package/dist/commands/wardrobe/list.d.ts +4 -4
  109. package/dist/commands/wardrobe/list.js +11 -15
  110. package/dist/commands/wardrobe/show.d.ts +5 -5
  111. package/dist/commands/wardrobe/show.js +11 -15
  112. package/dist/commands/wardrobe/wear.d.ts +6 -6
  113. package/dist/commands/wardrobe/wear.js +3 -7
  114. package/dist/interfaces/i-packages.d.ts +4 -17
  115. package/dist/interfaces/i-packages.js +0 -14
  116. package/dist/interfaces/i-pxe.d.ts +35 -11
  117. package/dist/interfaces/i-pxe.js +0 -7
  118. package/dist/interfaces/i-settings.d.ts +15 -21
  119. package/dist/krill/modules/change-password.d.ts +4 -4
  120. package/dist/krill/modules/change-password.js +4 -4
  121. package/dist/krill/modules/del-live-user.d.ts +3 -3
  122. package/dist/krill/modules/del-live-user.js +3 -3
  123. package/dist/krill/modules/fstab.d.ts +3 -3
  124. package/dist/krill/modules/fstab.js +5 -5
  125. package/dist/krill/modules/grubcfg.d.ts +6 -6
  126. package/dist/krill/modules/grubcfg.js +6 -6
  127. package/dist/krill/modules/hostname.js +4 -4
  128. package/dist/krill/modules/initramfs.d.ts +2 -2
  129. package/dist/krill/modules/initramfs.js +2 -2
  130. package/dist/krill/modules/locale-cfg.js +8 -7
  131. package/dist/krill/modules/locale.d.ts +2 -2
  132. package/dist/krill/modules/locale.js +6 -6
  133. package/dist/krill/modules/m-keyboard.js +14 -14
  134. package/dist/krill/modules/mkfs.d.ts +2 -2
  135. package/dist/krill/modules/mkfs.js +2 -2
  136. package/dist/krill/modules/mount-fs.d.ts +2 -2
  137. package/dist/krill/modules/mount-fs.js +2 -2
  138. package/dist/krill/modules/mount-vfs.d.ts +4 -4
  139. package/dist/krill/modules/mount-vfs.js +4 -4
  140. package/dist/krill/modules/packages.js +39 -37
  141. package/dist/krill/modules/partition.js +38 -38
  142. package/dist/krill/modules/remove-installer-link.d.ts +2 -2
  143. package/dist/krill/modules/remove-installer-link.js +2 -2
  144. package/dist/krill/modules/umount.d.ts +3 -3
  145. package/dist/krill/modules/umount.js +4 -4
  146. package/dist/krill/modules/unpackfs.d.ts +2 -2
  147. package/dist/krill/modules/unpackfs.js +2 -2
  148. package/dist/krill/prepare.d.ts +2 -1
  149. package/dist/krill/prepare.js +4 -2
  150. package/dist/krill/sequence.d.ts +2 -1
  151. package/dist/krill/sequence.js +64 -43
  152. package/dist/lib/cli-autologin.js +4 -4
  153. package/dist/lib/get_address.js +2 -3
  154. package/dist/lib/get_dns.js +2 -3
  155. package/dist/lib/get_domain.js +2 -3
  156. package/dist/lib/get_gateway.js +2 -3
  157. package/dist/lib/get_hostname.js +2 -3
  158. package/dist/lib/get_netmask.js +2 -3
  159. package/dist/lib/get_password.js +3 -4
  160. package/dist/lib/get_userfullname.js +2 -3
  161. package/dist/lib/get_username.js +2 -2
  162. package/dist/lib/kill_me_softly.js +3 -18
  163. package/dist/lib/select_address_type.js +2 -2
  164. package/dist/lib/select_filesystem_type.js +9 -3
  165. package/dist/lib/select_installation_device.js +2 -2
  166. package/dist/lib/select_installation_mode.js +2 -3
  167. package/dist/lib/select_interface.js +2 -2
  168. package/dist/lib/select_keyboard_layout.d.ts +2 -2
  169. package/dist/lib/select_keyboard_layout.js +4 -4
  170. package/dist/lib/select_keyboard_model.d.ts +2 -2
  171. package/dist/lib/select_keyboard_model.js +4 -4
  172. package/dist/lib/select_keyboard_option.d.ts +2 -2
  173. package/dist/lib/select_keyboard_option.js +4 -4
  174. package/dist/lib/select_keyboard_variant.d.ts +2 -2
  175. package/dist/lib/select_keyboard_variant.js +4 -4
  176. package/dist/lib/select_languages.js +2 -2
  177. package/dist/lib/select_regions.js +2 -3
  178. package/dist/lib/select_user_swap_choice.js +2 -3
  179. package/dist/lib/select_zones.js +8 -10
  180. package/dist/lib/utils.js +1 -1
  181. package/manpages/doc/man/eggs.1.gz +0 -0
  182. package/manpages/doc/man/eggs.html +21 -27
  183. package/package.json +27 -24
  184. package/scripts/_eggs +354 -314
  185. package/scripts/eggs.bash +8 -8
@@ -15,25 +15,25 @@ import yaml from 'js-yaml';
15
15
  * @returns
16
16
  */
17
17
  export function branding(remix, distro, theme = '', verbose = false) {
18
- const { homeUrl } = distro;
19
- const { supportUrl } = distro;
20
- const bugReportUrl = 'https://github.com/pieroproietti/penguins-eggs/issues';
18
+ const { bugReportUrl, homeUrl, supportUrl } = distro;
19
+ // Li ridenomino per calamares
20
+ const productUrl = homeUrl;
21
+ // const supportUrl= supportUrl
22
+ const releaseNotesUrl = bugReportUrl;
23
+ const knownIssuesUrl = 'https://github.com/pieroproietti/penguins-eggs/issues/';
21
24
  const productName = remix.versionName; // Questa va nel titolo ed in basso
22
25
  const shortProductName = remix.fullname;
23
26
  const today = new Date();
24
- const day = ('0' + today.getDate()).slice(-2);
25
- const month = ('0' + (today.getMonth() + 1)).slice(-2);
26
- const year = today.getFullYear();
27
- const version = year + '-' + month + '-' + day;
28
- const shortVersion = version;
29
- const versionedName = remix.fullname + ' (' + version + ')'; // Questa la mette nella descrizione andrebbe aggiunta la versione dal nome della iso
27
+ const version = today.toISOString().split('T')[0]; // 2021-09-30
28
+ const shortVersion = version.split('-').join('.'); // 2021.09.30
29
+ const versionedName = remix.fullname + ' (' + shortVersion + ')';
30
30
  const shortVersionedName = remix.versionName + ' ' + version;
31
- let bootloaderEntryName = distro.distroId;
32
31
  /**
33
32
  * some distros: Devuan, LMDE, syslinuxos
34
33
  * must have: bootloaderEntryName=Debian
35
34
  * to work on EFI
36
35
  */
36
+ let bootloaderEntryName = '';
37
37
  switch (distro.distroId.toLowerCase()) {
38
38
  case 'devuan':
39
39
  case 'lmde':
@@ -45,8 +45,6 @@ export function branding(remix, distro, theme = '', verbose = false) {
45
45
  bootloaderEntryName = distro.distroId;
46
46
  }
47
47
  }
48
- const productUrl = homeUrl;
49
- const releaseNotesUrl = 'https://github.com/pieroproietti/penguins-eggs/changelog.md';
50
48
  const productLogo = `${remix.branding}-logo.png`;
51
49
  const productIcon = `${remix.branding}-logo.png`;
52
50
  const productWelcome = 'welcome.png';
@@ -56,13 +54,13 @@ export function branding(remix, distro, theme = '', verbose = false) {
56
54
  images: {
57
55
  productIcon,
58
56
  productLogo,
59
- productWelcome,
57
+ productWelcome
60
58
  },
61
59
  slideshow,
62
60
  slideshowAPI: 1,
63
61
  strings: {
64
62
  bootloaderEntryName,
65
- bugReportUrl,
63
+ knownIssuesUrl,
66
64
  productName,
67
65
  productUrl,
68
66
  releaseNotesUrl,
@@ -71,20 +69,21 @@ export function branding(remix, distro, theme = '', verbose = false) {
71
69
  shortVersionedName,
72
70
  supportUrl,
73
71
  version,
74
- versionedName,
72
+ versionedName
75
73
  },
76
74
  style: {
77
- // li ripeto per calamares 3.3
78
- SidebarBackground: "#010027",
79
- SidebarBackgroundCurrent: "#017877",
80
- SidebarText: "#FFFFFF",
81
- SidebarTextCurrent: "#fbfbfb",
82
- sidebarBackground: "#010027",
83
- sidebarBackgroundCurrent: "#017877",
84
- sidebarText: "#FFFFFF",
85
- sidebarTextCurrent: "#fbfbfb"
75
+ // 3.3.x
76
+ SidebarBackground: '#292F34',
77
+ SidebarBackgroundCurrent: '#D35400',
78
+ SidebarText: '#FFFFFF',
79
+ SidebarTextCurrent: '#292F34',
80
+ // 3.2.x
81
+ sidebarBackground: '#292F34',
82
+ sidebarBackgroundCurrent: '#D35400',
83
+ sidebarText: '#FFFFFF',
84
+ sidebarTextCurrent: '#292F34'
86
85
  },
87
- welcomeStyleCalamares: true,
86
+ welcomeStyleCalamares: true
88
87
  };
89
88
  return yaml.dump(branding);
90
89
  }
@@ -16,7 +16,7 @@ export class Focal {
16
16
  isClone;
17
17
  release = false;
18
18
  remix;
19
- theme; // theme comprende il path
19
+ theme; // theme comprende il path
20
20
  user_opt;
21
21
  verbose = false;
22
22
  /**
@@ -7,8 +7,8 @@
7
7
  */
8
8
  import { IDistro, IInstaller, IRemix } from '../../../interfaces/index.js';
9
9
  /**
10
- *
11
- */
10
+ *
11
+ */
12
12
  export declare class Rolling {
13
13
  distro: IDistro;
14
14
  installer: IInstaller;
@@ -26,7 +26,7 @@ export declare class Rolling {
26
26
  */
27
27
  constructor(installer: IInstaller, remix: IRemix, distro: IDistro, user_opt: string, release?: boolean, theme?: string, isClone?: boolean, verbose?: boolean);
28
28
  /**
29
- * locale, partitions, users can come from themes
30
- */
29
+ * locale, partitions, users can come from themes
30
+ */
31
31
  create(): Promise<void>;
32
32
  }
@@ -8,8 +8,8 @@
8
8
  import CFS from '../../cfs.js';
9
9
  import Fisherman from '../fisherman.js';
10
10
  /**
11
- *
12
- */
11
+ *
12
+ */
13
13
  export class Rolling {
14
14
  distro;
15
15
  installer = {};
@@ -36,8 +36,8 @@ export class Rolling {
36
36
  this.isClone = isClone;
37
37
  }
38
38
  /**
39
- * locale, partitions, users can come from themes
40
- */
39
+ * locale, partitions, users can come from themes
40
+ */
41
41
  async create() {
42
42
  const fisherman = new Fisherman(this.distro, this.installer, this.verbose);
43
43
  await fisherman.createCalamaresSettings(this.theme, this.isClone);
@@ -12,19 +12,22 @@ import Pacman from '../../pacman.js';
12
12
  * @returns yaml-string
13
13
  */
14
14
  export function remove(distro) {
15
- const packages = [
16
- 'calamares-eggs',
17
- 'calamares-garuda',
18
- 'calamares',
19
- ];
15
+ const packages = ['calamares-eggs', 'calamares-garuda', 'calamares'];
20
16
  if (distro.familyId === 'archlinux') {
21
17
  packages.push('penguins-eggs');
22
18
  }
23
19
  if (distro.familyId === 'debian') {
24
20
  packages.push('penguins-eggs', 'live-boot', 'live-boot-doc', 'live-boot-initramfs-tools', 'live-tools');
25
21
  }
26
- let yaml = '';
22
+ const installedPackages = [];
27
23
  for (const elem of packages) {
24
+ if (Pacman.packageIsInstalled(elem)) {
25
+ installedPackages.push(elem);
26
+ }
27
+ }
28
+ installedPackages.sort();
29
+ let yaml = '';
30
+ for (const elem of installedPackages) {
28
31
  yaml += ` - ${elem.trim()}\n`;
29
32
  }
30
33
  if (yaml !== '') {
@@ -93,8 +93,8 @@ export default class Incubator {
93
93
  break;
94
94
  }
95
95
  /**
96
- * DEVUAN
97
- */
96
+ * DEVUAN
97
+ */
98
98
  case 'beowulf': {
99
99
  const beowulf = new Buster(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.isClone, this.verbose);
100
100
  await beowulf.create();
@@ -111,8 +111,8 @@ export default class Incubator {
111
111
  break;
112
112
  }
113
113
  /**
114
- * UBUNTU
115
- */
114
+ * UBUNTU
115
+ */
116
116
  case 'bionic': {
117
117
  const bionic = new Bionic(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.isClone, this.verbose);
118
118
  await bionic.create();
@@ -134,8 +134,8 @@ export default class Incubator {
134
134
  break;
135
135
  }
136
136
  /**
137
- * Arch
138
- */
137
+ * Arch
138
+ */
139
139
  case 'rolling': {
140
140
  const rolling = new Rolling(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.isClone, this.verbose);
141
141
  await rolling.create();
@@ -150,7 +150,6 @@ export default class Incubator {
150
150
  *
151
151
  */
152
152
  createBranding() {
153
- // const branding = require('./branding.js').branding
154
153
  const dir = this.installer.configRoot + 'branding/' + this.remix.branding + '/';
155
154
  if (!fs.existsSync(dir)) {
156
155
  shx.exec(`mkdir ${dir} -p`);
@@ -44,8 +44,7 @@ export function installer() {
44
44
  * se distro.isCalamaresAvailable()
45
45
  * i template di calamares e krill sono gli stessi
46
46
  */
47
- const remix = {};
48
- const distro = new Distro(remix);
47
+ const distro = new Distro();
49
48
  if (distro.isCalamaresAvailable) {
50
49
  installer.template = '/etc/penguins-eggs.d/distros/' + distro.codenameLikeId + '/calamares/';
51
50
  /*
@@ -1,10 +1,10 @@
1
1
  /**
2
- * ./src/classes/initrd.ts
3
- * penguins-eggs v.10.0.0 / ecmascript 2020
4
- * author: Piero Proietti
5
- * email: piero.proietti@gmail.com
6
- * license: MIT
7
- */
2
+ * ./src/classes/initrd.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
8
  import { IInitrd } from '../interfaces/index.js';
9
9
  /**
10
10
  * initrd
@@ -1,10 +1,10 @@
1
1
  /**
2
- * ./src/classes/initrd.ts
3
- * penguins-eggs v.10.0.0 / ecmascript 2020
4
- * author: Piero Proietti
5
- * email: piero.proietti@gmail.com
6
- * license: MIT
7
- */
2
+ * ./src/classes/initrd.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
8
  /**
9
9
  * Schema from "refractasnapshot-10.2.10 (20191218)"
10
10
  * Copyright: fsmithred@gmail.com 2011-2019
@@ -1,10 +1,10 @@
1
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
- */
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
8
  import { IXkbLayout, IXkbModel, IXkbOption, IXkbVariant } from '../interfaces/i-xkb-model.js';
9
9
  /**
10
10
  * /usr/share/X11/xkb/rules/xorg.lst
@@ -1,10 +1,10 @@
1
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
- */
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
8
  import fs from 'node:fs';
9
9
  import { exec } from '../lib/utils.js';
10
10
  // XkbModel - name of the model of your keyboard type
@@ -1,21 +1,21 @@
1
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
- */
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
8
  export default class Locales {
9
9
  /**
10
- *
11
- */
10
+ *
11
+ */
12
12
  getDefault(): Promise<string>;
13
13
  /**
14
- *
15
- */
14
+ *
15
+ */
16
16
  getEnabled(): Promise<string[]>;
17
17
  /**
18
- *
19
- */
18
+ *
19
+ */
20
20
  getSupported(): Promise<string[]>;
21
21
  }
@@ -1,17 +1,17 @@
1
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
- */
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
8
  import fs from 'node:fs';
9
9
  import { exec } from '../lib/utils.js';
10
10
  import Distro from './distro.js';
11
11
  export default class Locales {
12
12
  /**
13
- *
14
- */
13
+ *
14
+ */
15
15
  async getDefault() {
16
16
  const file = '/etc/default/locale';
17
17
  const cmd = `grep LANG < ${file}|cut -f2 -d=`;
@@ -19,14 +19,14 @@ export default class Locales {
19
19
  if (fs.existsSync(file)) {
20
20
  const result = await exec(cmd, { capture: true, echo: false, ignore: false });
21
21
  if (result.code === 0) {
22
- defaultLanguage = result.data.replaceAll('"', '').replaceAll('\'', '').trim();
22
+ defaultLanguage = result.data.replaceAll('"', '').replaceAll("'", '').trim();
23
23
  }
24
24
  }
25
25
  return defaultLanguage;
26
26
  }
27
27
  /**
28
- *
29
- */
28
+ *
29
+ */
30
30
  async getEnabled() {
31
31
  // Restituisce i locales abilitati in Debian, per manjaro quelli presenti
32
32
  // in /etc/locale.gen anche se #disabilitati
@@ -36,14 +36,14 @@ export default class Locales {
36
36
  if (result.code === 0) {
37
37
  const lines = result.data.split('\n');
38
38
  for (const line of lines) {
39
- enabledLocales.push(line.replaceAll('"', '').replaceAll('\'', '').trim());
39
+ enabledLocales.push(line.replaceAll('"', '').replaceAll("'", '').trim());
40
40
  }
41
41
  }
42
42
  return enabledLocales;
43
43
  }
44
44
  /**
45
- *
46
- */
45
+ *
46
+ */
47
47
  async getSupported() {
48
48
  const distro = new Distro();
49
49
  let supporteds = [];
@@ -1,10 +1,10 @@
1
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
- */
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
8
  export default class n8 {
9
9
  static dirent2string(dir: any): string;
10
10
  /**
@@ -1,10 +1,10 @@
1
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
- */
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
8
  import fs from 'node:fs';
9
9
  export default class n8 {
10
10
  static dirent2string(dir) {
@@ -1,10 +1,10 @@
1
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
- */
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
8
  import { Netmask } from 'netmask';
9
9
  /**
10
10
  *
@@ -1,10 +1,10 @@
1
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
- */
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
8
  import { Netmask } from 'netmask';
9
9
  import os from 'node:os';
10
10
  /**
@@ -29,9 +29,7 @@ export default class Network {
29
29
  const iface = interfaces[devName];
30
30
  if (iface !== undefined) {
31
31
  for (const alias of iface) {
32
- if (alias.family === 'IPv4' &&
33
- alias.address !== '127.0.0.1' &&
34
- !alias.internal) {
32
+ if (alias.family === 'IPv4' && alias.address !== '127.0.0.1' && !alias.internal) {
35
33
  // take just the first!
36
34
  if (this.address === '') {
37
35
  this.address = alias.address;
@@ -53,8 +51,8 @@ export default class Network {
53
51
  }
54
52
  }
55
53
  /**
56
- * valori da netmask
57
- */
54
+ * valori da netmask
55
+ */
58
56
  this.o = new Netmask(this.cidr);
59
57
  }
60
58
  }
@@ -1,10 +1,10 @@
1
1
  /**
2
- * ./src/classes/ovary.ts
3
- * penguins-eggs v.10.0.0 / ecmascript 2020
4
- * author: Piero Proietti
5
- * email: piero.proietti@gmail.com
6
- * license: MIT
7
- */
2
+ * ./src/classes/ovary.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
8
  import { IAddons, IExcludes } from '../interfaces/index.js';
9
9
  import CliAutologin from '../lib/cli-autologin.js';
10
10
  import Incubator from './incubation/incubator.js';
@@ -82,9 +82,9 @@ export default class Ovary {
82
82
  */
83
83
  fertilization(snapshot_prefix?: string, snapshot_basename?: string, theme?: string, compression?: string, nointeratctive?: boolean): Promise<boolean>;
84
84
  /**
85
- * finished = show the results
86
- * @param scriptOnly
87
- */
85
+ * finished = show the results
86
+ * @param scriptOnly
87
+ */
88
88
  finished(scriptOnly?: boolean): void;
89
89
  /**
90
90
  * initrdArch()
@@ -97,12 +97,12 @@ export default class Ovary {
97
97
  */
98
98
  initrdDebian(verbose?: boolean): Promise<void>;
99
99
  /**
100
- * async isolinux
101
- */
100
+ * async isolinux
101
+ */
102
102
  isolinux(theme?: string): Promise<void>;
103
103
  /**
104
- * kernelCopy
105
- */
104
+ * kernelCopy
105
+ */
106
106
  kernelCopy(): Promise<void>;
107
107
  /**
108
108
  *
@@ -114,8 +114,8 @@ export default class Ovary {
114
114
  */
115
115
  liveCreateStructure(): Promise<void>;
116
116
  /**
117
- * makeDotDisk
118
- */
117
+ * makeDotDisk
118
+ */
119
119
  makeDotDisk(info?: string, mksquashfs?: string, mkisofs?: string): void;
120
120
  makeEfi(theme?: string): Promise<void>;
121
121
  /**
@@ -128,27 +128,27 @@ export default class Ovary {
128
128
  */
129
129
  makeSquashfs(scriptOnly?: boolean, unsecure?: boolean): Promise<string>;
130
130
  /**
131
- * Ritorna true se c'è bisogno del mount --bind
132
- *
133
- * Ci sono tre tipologie:
134
- *
135
- * - normal solo la creazione della directory, nessun mount
136
- * - merged creazione della directory e mount ro
137
- * - mergedAndOverlay creazione directory, overlay e mount rw
138
- * - copied: creazione directory e copia
139
- */
131
+ * Ritorna true se c'è bisogno del mount --bind
132
+ *
133
+ * Ci sono tre tipologie:
134
+ *
135
+ * - normal solo la creazione della directory, nessun mount
136
+ * - merged creazione della directory e mount ro
137
+ * - mergedAndOverlay creazione directory, overlay e mount rw
138
+ * - copied: creazione directory e copia
139
+ */
140
140
  merged(dir: string): boolean;
141
141
  /**
142
- * Restituisce true per le direcory da montare con overlay
143
- *
144
- * Ci sono tre tipologie:
145
- *
146
- * - normal solo la creazione della directory, nessun mount
147
- * - merged creazione della directory e mount ro
148
- * - mergedAndOverlay creazione directory, overlay e mount rw
149
- *
150
- * @param dir
151
- */
142
+ * Restituisce true per le direcory da montare con overlay
143
+ *
144
+ * Ci sono tre tipologie:
145
+ *
146
+ * - normal solo la creazione della directory, nessun mount
147
+ * - merged creazione della directory e mount ro
148
+ * - mergedAndOverlay creazione directory, overlay e mount rw
149
+ *
150
+ * @param dir
151
+ */
152
152
  mergedAndOverlay(dir: string): boolean;
153
153
  /**
154
154
  * produce
@@ -170,25 +170,25 @@ export default class Ovary {
170
170
  syslinux(): Promise<void>;
171
171
  /**
172
172
  * makeEfi
173
- */
173
+ */
174
174
  /**
175
175
  *
176
176
  * @param cmd
177
177
  */
178
178
  tryCatch(cmd?: string): Promise<void>;
179
179
  /**
180
- * ubind del fs live
181
- * @param verbose
182
- */
180
+ * ubind del fs live
181
+ * @param verbose
182
+ */
183
183
  uBindLiveFs(): Promise<void>;
184
184
  /**
185
- *
186
- * @param verbose
187
- */
185
+ *
186
+ * @param verbose
187
+ */
188
188
  ubindVfs(): Promise<void>;
189
189
  /**
190
- * fill
191
- */
190
+ * fill
191
+ */
192
192
  usersFill(): Promise<Users[]>;
193
193
  /**
194
194
  *