penguins-eggs 9.3.26 → 9.3.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 (142) hide show
  1. package/.oclif.manifest.json +1 -1
  2. package/conf/derivatives.yaml +7 -0
  3. package/dist/classes/bleach.js +26 -24
  4. package/dist/classes/compressors.js +7 -5
  5. package/dist/classes/daddy.js +38 -36
  6. package/dist/classes/distro.js +30 -27
  7. package/dist/classes/family/archlinux.js +21 -19
  8. package/dist/classes/family/debian.js +33 -31
  9. package/dist/classes/family/fedora.js +19 -17
  10. package/dist/classes/family/suse.js +19 -17
  11. package/dist/classes/incubation/branding.js +8 -6
  12. package/dist/classes/incubation/distros/bionic.js +5 -3
  13. package/dist/classes/incubation/distros/buster.js +5 -3
  14. package/dist/classes/incubation/distros/focal.js +5 -3
  15. package/dist/classes/incubation/distros/jessie.js +6 -4
  16. package/dist/classes/incubation/distros/rolling.js +9 -7
  17. package/dist/classes/incubation/fisherman-helper/displaymanager.js +5 -3
  18. package/dist/classes/incubation/fisherman-helper/packages.js +17 -15
  19. package/dist/classes/incubation/fisherman.js +19 -19
  20. package/dist/classes/incubation/incubator.js +37 -35
  21. package/dist/classes/incubation/installer.js +8 -6
  22. package/dist/classes/initrd.js +5 -3
  23. package/dist/classes/keyboards.js +25 -23
  24. package/dist/classes/locales.js +19 -17
  25. package/dist/classes/n8.js +4 -2
  26. package/dist/classes/network.js +9 -9
  27. package/dist/classes/ovary.js +280 -281
  28. package/dist/classes/pacman.js +128 -128
  29. package/dist/classes/pve-live.js +7 -5
  30. package/dist/classes/pxe.js +141 -138
  31. package/dist/classes/settings.js +34 -32
  32. package/dist/classes/sources_list.js +31 -31
  33. package/dist/classes/systemctl.js +16 -14
  34. package/dist/classes/tailor.js +255 -262
  35. package/dist/classes/tools.js +7 -5
  36. package/dist/classes/users.js +30 -28
  37. package/dist/classes/utils.js +22 -20
  38. package/dist/classes/xdg.js +60 -58
  39. package/dist/classes/yolk.js +33 -33
  40. package/dist/commands/adapt.js +14 -12
  41. package/dist/commands/analyze.js +48 -15
  42. package/dist/commands/calamares.js +28 -26
  43. package/dist/commands/config.js +77 -79
  44. package/dist/commands/cuckoo.js +19 -17
  45. package/dist/commands/dad.js +16 -14
  46. package/dist/commands/export/deb.js +19 -17
  47. package/dist/commands/export/iso.js +17 -15
  48. package/dist/commands/install.js +31 -29
  49. package/dist/commands/kill.js +17 -15
  50. package/dist/commands/mom.js +11 -9
  51. package/dist/commands/produce.js +30 -28
  52. package/dist/commands/status.js +7 -5
  53. package/dist/commands/syncfrom.js +41 -41
  54. package/dist/commands/syncto.js +77 -80
  55. package/dist/commands/tools/clean.js +13 -11
  56. package/dist/commands/tools/ppa.js +26 -24
  57. package/dist/commands/tools/skel.js +18 -16
  58. package/dist/commands/tools/stat.js +12 -10
  59. package/dist/commands/tools/yolk.js +13 -11
  60. package/dist/commands/update.js +29 -27
  61. package/dist/commands/wardrobe/get.js +14 -12
  62. package/dist/commands/wardrobe/list.js +25 -23
  63. package/dist/commands/wardrobe/show.js +25 -23
  64. package/dist/commands/wardrobe/wear.js +24 -22
  65. package/dist/components/elements/information.js +21 -19
  66. package/dist/components/elements/steps.js +4 -2
  67. package/dist/components/elements/title.js +4 -2
  68. package/dist/components/finished.js +10 -8
  69. package/dist/components/install.js +10 -8
  70. package/dist/components/keyboard.js +10 -8
  71. package/dist/components/location.js +10 -8
  72. package/dist/components/network.js +10 -8
  73. package/dist/components/partitions.js +10 -8
  74. package/dist/components/summary.js +10 -8
  75. package/dist/components/users.js +33 -8
  76. package/dist/components/welcome.js +10 -8
  77. package/dist/interfaces/i-packages.js +1 -1
  78. package/dist/interfaces/i-pxe.js +39 -0
  79. package/dist/krill/krill-prepare.js +92 -90
  80. package/dist/krill/krill-sequence.js +148 -145
  81. package/dist/krill/modules/add-user.js +11 -9
  82. package/dist/krill/modules/bootloader-config-ubuntu.js +25 -23
  83. package/dist/krill/modules/bootloader.js +11 -9
  84. package/dist/krill/modules/change-password.js +2 -2
  85. package/dist/krill/modules/del-live-user.js +8 -6
  86. package/dist/krill/modules/fstab.js +35 -33
  87. package/dist/krill/modules/grubcfg.js +8 -6
  88. package/dist/krill/modules/hostname.js +19 -17
  89. package/dist/krill/modules/initramfs-cfg.js +6 -4
  90. package/dist/krill/modules/initramfs.js +17 -15
  91. package/dist/krill/modules/locale-cfg.js +12 -10
  92. package/dist/krill/modules/locale.js +13 -11
  93. package/dist/krill/modules/m-keyboard.js +33 -31
  94. package/dist/krill/modules/m-timezone.js +7 -5
  95. package/dist/krill/modules/machine-id.js +8 -6
  96. package/dist/krill/modules/mkfs.js +7 -7
  97. package/dist/krill/modules/mount-fs.js +22 -22
  98. package/dist/krill/modules/mount-vfs.js +12 -12
  99. package/dist/krill/modules/network-cfg.js +21 -21
  100. package/dist/krill/modules/packages.js +20 -18
  101. package/dist/krill/modules/partition.js +148 -139
  102. package/dist/krill/modules/remove-installer-link.js +5 -3
  103. package/dist/krill/modules/umount.js +9 -7
  104. package/dist/krill/modules/unpackfs.js +8 -6
  105. package/dist/lib/cli-autologin.js +163 -163
  106. package/dist/lib/dependencies.js +10 -10
  107. package/dist/lib/get_address.js +6 -4
  108. package/dist/lib/get_dns.js +6 -4
  109. package/dist/lib/get_domain.js +6 -4
  110. package/dist/lib/get_gateway.js +6 -4
  111. package/dist/lib/get_hostname.js +6 -4
  112. package/dist/lib/get_netmask.js +6 -4
  113. package/dist/lib/get_password.js +8 -6
  114. package/dist/lib/get_root_password.js +7 -5
  115. package/dist/lib/get_userfullname.js +6 -4
  116. package/dist/lib/get_username.js +6 -4
  117. package/dist/lib/select_address_type.js +6 -4
  118. package/dist/lib/select_filesystem_type.js +8 -6
  119. package/dist/lib/select_installation_device.js +7 -5
  120. package/dist/lib/select_installation_mode.js +6 -4
  121. package/dist/lib/select_interface.js +6 -4
  122. package/dist/lib/select_keyboard_layout.js +10 -8
  123. package/dist/lib/select_keyboard_model.js +10 -8
  124. package/dist/lib/select_keyboard_option.js +10 -8
  125. package/dist/lib/select_keyboard_variant.js +10 -8
  126. package/dist/lib/select_languages.js +9 -7
  127. package/dist/lib/select_regions.js +6 -4
  128. package/dist/lib/select_user_swap_choice.js +8 -6
  129. package/dist/lib/select_zones.js +12 -10
  130. package/dist/lib/utils.js +3 -3
  131. package/package.json +12 -5
  132. package/dist/dhcpd/dhcpd.js +0 -222
  133. package/dist/dhcpd/index.js +0 -7
  134. package/dist/dhcpd/packet/converters.js +0 -377
  135. package/dist/dhcpd/packet/options.js +0 -2
  136. package/dist/dhcpd/packet/types.js +0 -2
  137. package/dist/dhcpd/packet.js +0 -251
  138. package/dist/dhcpd/proxy.js +0 -152
  139. package/dist/dhcpd/server.js +0 -152
  140. package/dist/dhcpd/sprintf.js +0 -170
  141. package/dist/dhcpd/utils.js +0 -190
  142. package/dist/interfaces/i-pxe-options.js +0 -2
@@ -1,20 +1,22 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.tryInstall = exports.remove = void 0;
4
- const tslib_1 = require("tslib");
5
- const pacman_1 = tslib_1.__importDefault(require("../../pacman"));
7
+ const pacman_js_1 = __importDefault(require("../../pacman.js"));
6
8
  /**
7
9
  *
8
10
  * @param distro
9
11
  * @returns yaml-string
10
12
  */
11
13
  function remove(distro) {
12
- let packages = ["calamares"];
14
+ const packages = ['calamares'];
13
15
  if (distro.familyId === 'archlinux') {
14
- packages.push("penguins-eggs");
16
+ packages.push('penguins-eggs');
15
17
  }
16
18
  if (distro.familyId === 'debian') {
17
- packages.push("eggs");
19
+ packages.push('eggs');
18
20
  }
19
21
  let yaml = '';
20
22
  for (const elem of packages) {
@@ -40,21 +42,21 @@ function tryInstall(distro) {
40
42
  yaml += ' - language-pack-$LOCALE\n';
41
43
  }
42
44
  // Da localizzare se presenti
43
- if (pacman_1.default.packageIsInstalled('hunspell')) {
45
+ if (pacman_js_1.default.packageIsInstalled('hunspell')) {
44
46
  yaml += ' - hunspell-$LOCALE\n';
45
47
  }
46
- if (pacman_1.default.packageIsInstalled('libreoffice-base-core')) {
47
- yaml += ` - libreoffice-l10n-$LOCALE\n`;
48
- yaml += ` - libreoffice-help-$LOCALE\n`;
48
+ if (pacman_js_1.default.packageIsInstalled('libreoffice-base-core')) {
49
+ yaml += ' - libreoffice-l10n-$LOCALE\n';
50
+ yaml += ' - libreoffice-help-$LOCALE\n';
49
51
  }
50
- if (pacman_1.default.packageIsInstalled('firefox-esr')) {
51
- yaml += ` - firefox-esr-$LOCALE\n`;
52
+ if (pacman_js_1.default.packageIsInstalled('firefox-esr')) {
53
+ yaml += ' - firefox-esr-$LOCALE\n';
52
54
  }
53
- if (pacman_1.default.packageIsInstalled('firefox')) {
54
- yaml += ` - firefox-$LOCALE\n`;
55
+ if (pacman_js_1.default.packageIsInstalled('firefox')) {
56
+ yaml += ' - firefox-$LOCALE\n';
55
57
  }
56
- if (pacman_1.default.packageIsInstalled('thunderbird')) {
57
- yaml += ` - thunderbird-locale-$LOCALE\n`;
58
+ if (pacman_js_1.default.packageIsInstalled('thunderbird')) {
59
+ yaml += ' - thunderbird-locale-$LOCALE\n';
58
60
  }
59
61
  if (yaml !== '') {
60
62
  yaml = '- try_install:\n' + yaml;
@@ -5,15 +5,17 @@
5
5
  * author: Piero Proietti
6
6
  * mail: piero.proietti@gmail.com
7
7
  */
8
+ var __importDefault = (this && this.__importDefault) || function (mod) {
9
+ return (mod && mod.__esModule) ? mod : { "default": mod };
10
+ };
8
11
  Object.defineProperty(exports, "__esModule", { value: true });
9
- const tslib_1 = require("tslib");
10
- const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
11
- const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
12
- const node_path_1 = tslib_1.__importDefault(require("node:path"));
13
- const chalk_1 = tslib_1.__importDefault(require("chalk"));
14
- const utils_1 = tslib_1.__importDefault(require("../utils"));
15
- const displaymanager_1 = require("./fisherman-helper/displaymanager");
16
- const utils_2 = require("../../lib/utils");
12
+ const node_fs_1 = __importDefault(require("node:fs"));
13
+ const shelljs_1 = __importDefault(require("shelljs"));
14
+ const node_path_1 = __importDefault(require("node:path"));
15
+ const chalk_1 = __importDefault(require("chalk"));
16
+ const utils_js_1 = __importDefault(require("../utils.js"));
17
+ const displaymanager_js_1 = require("./fisherman-helper/displaymanager.js");
18
+ const utils_js_2 = require("../../lib/utils.js");
17
19
  class Fisherman {
18
20
  constructor(distro, installer, verbose = false) {
19
21
  this.installer = {};
@@ -27,26 +29,24 @@ class Fisherman {
27
29
  */
28
30
  async settings(vendor = 'eggs') {
29
31
  let branding = vendor;
30
- if (vendor !== 'eggs') {
31
- if (vendor.includes('/')) {
32
- branding = vendor.substring(vendor.lastIndexOf('/'));
33
- }
32
+ if (vendor !== 'eggs' && vendor.includes('/')) {
33
+ branding = vendor.slice(Math.max(0, vendor.lastIndexOf('/')));
34
34
  }
35
35
  const settings = this.installer.configuration + 'settings.conf';
36
36
  shelljs_1.default.cp(this.installer.template + 'settings.yml', settings);
37
37
  let hasSystemd = '# ';
38
- if (utils_1.default.isSystemd()) {
38
+ if (utils_js_1.default.isSystemd()) {
39
39
  hasSystemd = '- ';
40
40
  }
41
41
  /**
42
42
  * Controllo se è un clone: ovary, fisherman, krill
43
43
  */
44
- let is_clone = '/etc/penguins-eggs/is_clone';
44
+ const is_clone = '/etc/penguins-eggs/is_clone';
45
45
  let hasDisplaymanager = '# ';
46
46
  let createUsers = '# ';
47
47
  if (!node_fs_1.default.existsSync(is_clone)) {
48
48
  createUsers = '- ';
49
- if ((0, displaymanager_1.displaymanager)() !== '') {
49
+ if ((0, displaymanager_js_1.displaymanager)() !== '') {
50
50
  hasDisplaymanager = '- ';
51
51
  }
52
52
  }
@@ -151,7 +151,7 @@ class Fisherman {
151
151
  shelljs_1.default.cp(`${moduleTemplate}/module.yml`, `${moduleDest}/module.desc`);
152
152
  if (isScript) {
153
153
  shelljs_1.default.cp(`${moduleTemplate}/${name}.sh`, moduleScript);
154
- await (0, utils_2.exec)(`chmod +x ${moduleScript}`);
154
+ await (0, utils_js_2.exec)(`chmod +x ${moduleScript}`);
155
155
  }
156
156
  return moduleScript;
157
157
  }
@@ -170,7 +170,7 @@ class Fisherman {
170
170
  shelljs_1.default.cp(`${moduleSource}/module.yml`, `${moduleDest}/module.desc`);
171
171
  shelljs_1.default.cp(`${moduleSource}/${name}.yml`, `${moduleDest}/${name}.conf`);
172
172
  shelljs_1.default.cp(`${moduleSource}/main.py`, moduleDest);
173
- await (0, utils_2.exec)(`chmod +x ${moduleSource}/main.py`);
173
+ await (0, utils_js_2.exec)(`chmod +x ${moduleSource}/main.py`);
174
174
  }
175
175
  /**
176
176
  *
@@ -238,14 +238,14 @@ class Fisherman {
238
238
  const removePackages = require('./fisherman-helper/packages').remove;
239
239
  const tryInstall = require('./fisherman-helper/packages').tryInstall;
240
240
  this.buildModule(name);
241
- let yamlInstall = tryInstall(distro);
241
+ const yamlInstall = tryInstall(distro);
242
242
  let yamlRemove = '';
243
243
  if (release) {
244
244
  yamlRemove = removePackages(distro);
245
245
  }
246
246
  let operations = '';
247
247
  if (yamlRemove !== '' || yamlInstall !== '') {
248
- operations = "operations:\n" + yamlRemove + yamlInstall;
248
+ operations = 'operations:\n' + yamlRemove + yamlInstall;
249
249
  }
250
250
  shelljs_1.default.sed('-i', '{{operations}}', operations, this.installer.modules + name + '.conf');
251
251
  }
@@ -1,23 +1,25 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
6
  /**
5
7
  * penguins-eggs: incubator.ts
6
8
  *
7
9
  * author: Piero Proietti
8
10
  * mail: piero.proietti@gmail.com
9
11
  */
10
- const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
11
- const node_path_1 = tslib_1.__importDefault(require("node:path"));
12
- const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
13
- const utils_1 = tslib_1.__importDefault(require("../utils"));
14
- const jessie_1 = require("./distros/jessie");
15
- const buster_1 = require("./distros/buster");
16
- const focal_1 = require("./distros/focal");
17
- const bionic_1 = require("./distros/bionic");
18
- const rolling_1 = require("./distros/rolling");
19
- const installer_1 = require("./installer");
20
- const utils_2 = require("../../lib/utils");
12
+ const node_fs_1 = __importDefault(require("node:fs"));
13
+ const node_path_1 = __importDefault(require("node:path"));
14
+ const shelljs_1 = __importDefault(require("shelljs"));
15
+ const utils_js_1 = __importDefault(require("../utils.js"));
16
+ const jessie_js_1 = require("./distros/jessie.js");
17
+ const buster_js_1 = require("./distros/buster.js");
18
+ const focal_js_1 = require("./distros/focal.js");
19
+ const bionic_js_1 = require("./distros/bionic.js");
20
+ const rolling_js_1 = require("./distros/rolling.js");
21
+ const installer_js_1 = require("./installer.js");
22
+ const utils_js_2 = require("../../lib/utils.js");
21
23
  /**
22
24
  *
23
25
  */
@@ -31,7 +33,7 @@ class Incubator {
31
33
  constructor(remix, distro, user_opt = 'live', theme = 'eggs', verbose = false) {
32
34
  this.verbose = false;
33
35
  this.installer = {};
34
- this.installer = (0, installer_1.installer)();
36
+ this.installer = (0, installer_js_1.installer)();
35
37
  this.remix = remix;
36
38
  this.distro = distro;
37
39
  this.user_opt = user_opt;
@@ -39,7 +41,7 @@ class Incubator {
39
41
  this.verbose = verbose;
40
42
  this.remix.branding = theme;
41
43
  if (theme.includes('/')) {
42
- this.remix.branding = theme.substring(theme.lastIndexOf('/') + 1);
44
+ this.remix.branding = theme.slice(Math.max(0, theme.lastIndexOf('/') + 1));
43
45
  }
44
46
  }
45
47
  /**
@@ -47,82 +49,82 @@ class Incubator {
47
49
  */
48
50
  async config(release = false) {
49
51
  const verbose = true;
50
- const echo = utils_1.default.setEcho(verbose);
52
+ const echo = utils_js_1.default.setEcho(verbose);
51
53
  this.createInstallerDirs();
52
54
  // DEBIAN
53
55
  switch (this.distro.codenameLikeId) {
54
56
  case 'jessie': {
55
- const jessie = new jessie_1.Jessie(this.installer, this.remix, this.distro, this.user_opt, release, this.verbose);
57
+ const jessie = new jessie_js_1.Jessie(this.installer, this.remix, this.distro, this.user_opt, release, this.verbose);
56
58
  await jessie.create();
57
59
  break;
58
60
  }
59
61
  case 'stretch': {
60
- const stretch = new jessie_1.Jessie(this.installer, this.remix, this.distro, this.user_opt, release, this.verbose);
62
+ const stretch = new jessie_js_1.Jessie(this.installer, this.remix, this.distro, this.user_opt, release, this.verbose);
61
63
  await stretch.create();
62
64
  break;
63
65
  }
64
66
  case 'buster': {
65
- const buster = new buster_1.Buster(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.verbose);
67
+ const buster = new buster_js_1.Buster(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.verbose);
66
68
  await buster.create();
67
69
  break;
68
70
  }
69
71
  case 'bullseye': {
70
- const bullseye = new buster_1.Buster(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.verbose);
72
+ const bullseye = new buster_js_1.Buster(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.verbose);
71
73
  await bullseye.create();
72
74
  break;
73
75
  }
74
76
  case 'bookworm': {
75
- const bookworm = new buster_1.Buster(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.verbose);
77
+ const bookworm = new buster_js_1.Buster(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.verbose);
76
78
  await bookworm.create();
77
79
  // DEVUAN
78
80
  break;
79
81
  }
80
82
  /**
81
- * DEVUAN
82
- */
83
+ * DEVUAN
84
+ */
83
85
  case 'beowulf': {
84
- const beowulf = new buster_1.Buster(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.verbose);
86
+ const beowulf = new buster_js_1.Buster(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.verbose);
85
87
  await beowulf.create();
86
88
  break;
87
89
  }
88
90
  case 'chimaera': {
89
- const chimaera = new buster_1.Buster(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.verbose);
91
+ const chimaera = new buster_js_1.Buster(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.verbose);
90
92
  await chimaera.create();
91
93
  break;
92
94
  }
93
95
  case 'daedalus': {
94
- const daedalus = new buster_1.Buster(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.verbose);
96
+ const daedalus = new buster_js_1.Buster(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.verbose);
95
97
  await daedalus.create();
96
98
  break;
97
99
  }
98
100
  /**
99
- * UBUNTU
100
- */
101
+ * UBUNTU
102
+ */
101
103
  case 'bionic': {
102
- const bionic = new bionic_1.Bionic(this.installer, this.remix, this.distro, this.user_opt, release, this.verbose);
104
+ const bionic = new bionic_js_1.Bionic(this.installer, this.remix, this.distro, this.user_opt, release, this.verbose);
103
105
  await bionic.create();
104
106
  break;
105
107
  }
106
108
  case 'focal': {
107
- const focal = new focal_1.Focal(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.verbose);
109
+ const focal = new focal_js_1.Focal(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.verbose);
108
110
  await focal.create();
109
111
  break;
110
112
  }
111
113
  case 'jammy': {
112
- const jammy = new focal_1.Focal(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.verbose);
114
+ const jammy = new focal_js_1.Focal(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.verbose);
113
115
  await jammy.create();
114
116
  break;
115
117
  }
116
118
  case 'kinetic': {
117
- const kinetic = new focal_1.Focal(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.verbose);
119
+ const kinetic = new focal_js_1.Focal(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.verbose);
118
120
  await kinetic.create();
119
121
  break;
120
122
  }
121
123
  /**
122
- * Arch
123
- */
124
+ * Arch
125
+ */
124
126
  case 'rolling': {
125
- const rolling = new rolling_1.Rolling(this.installer, this.remix, this.distro, this.user_opt, release, this.verbose);
127
+ const rolling = new rolling_js_1.Rolling(this.installer, this.remix, this.distro, this.user_opt, release, this.verbose);
126
128
  await rolling.create();
127
129
  break;
128
130
  }
@@ -271,7 +273,7 @@ class Incubator {
271
273
  const scriptFile = scriptDir + 'install-debian';
272
274
  const scriptContent = scriptInstallDebian();
273
275
  write(scriptFile, scriptContent, this.verbose);
274
- await (0, utils_2.exec)(`chmod +x ${scriptFile}`);
276
+ await (0, utils_js_2.exec)(`chmod +x ${scriptFile}`);
275
277
  }
276
278
  }
277
279
  exports.default = Incubator;
@@ -1,12 +1,14 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.installer = void 0;
4
- const tslib_1 = require("tslib");
5
- const distro_1 = tslib_1.__importDefault(require("../../classes/distro"));
6
- const pacman_1 = tslib_1.__importDefault(require("../../classes/pacman"));
7
+ const distro_js_1 = __importDefault(require("../../classes/distro.js"));
8
+ const pacman_js_1 = __importDefault(require("../../classes/pacman.js"));
7
9
  function installer() {
8
10
  const installer = {};
9
- if (pacman_1.default.packageIsInstalled('calamares')) {
11
+ if (pacman_js_1.default.packageIsInstalled('calamares')) {
10
12
  installer.name = 'calamares';
11
13
  installer.configuration = '/etc/calamares/';
12
14
  installer.multiarch = multiarch() + 'calamares/';
@@ -22,7 +24,7 @@ function installer() {
22
24
  * i template nelle versioni isCalamaresAvailable sono QUELLI di calamares
23
25
  */
24
26
  const remix = {};
25
- const distro = new distro_1.default(remix);
27
+ const distro = new distro_js_1.default(remix);
26
28
  if (distro.isCalamaresAvailable) {
27
29
  installer.template = '/etc/penguins-eggs.d/distros/' + distro.codenameLikeId + '/calamares/';
28
30
  installer.templateModules = installer.template + 'modules/';
@@ -41,5 +43,5 @@ exports.installer = installer;
41
43
  * @returns
42
44
  */
43
45
  function multiarch() {
44
- return pacman_1.default.distro().usrLibPath;
46
+ return pacman_js_1.default.distro().usrLibPath;
45
47
  }
@@ -7,11 +7,13 @@
7
7
  * Schema from "refractasnapshot-10.2.10 (20191218)"
8
8
  * Copyright: fsmithred@gmail.com 2011-2019
9
9
  */
10
+ var __importDefault = (this && this.__importDefault) || function (mod) {
11
+ return (mod && mod.__esModule) ? mod : { "default": mod };
12
+ };
10
13
  Object.defineProperty(exports, "__esModule", { value: true });
11
- const tslib_1 = require("tslib");
12
14
  // packages
13
- const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
14
- const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
15
+ const node_fs_1 = __importDefault(require("node:fs"));
16
+ const shelljs_1 = __importDefault(require("shelljs"));
15
17
  /**
16
18
  * initrd
17
19
  * Controlla e rimuove, se necessario cryptroot, resume
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const utils_1 = require("../lib/utils");
5
- const fs_1 = tslib_1.__importDefault(require("fs"));
6
+ const utils_js_1 = require("../lib/utils.js");
7
+ const fs_1 = __importDefault(require("fs"));
6
8
  // XkbModel - name of the model of your keyboard type
7
9
  // XkbLayout - layout(s) you intend to use
8
10
  // XkbVariant - variant(s) of the layout you intend to use
@@ -25,26 +27,26 @@ class Keyboard {
25
27
  let isVariant = false;
26
28
  let isOption = false;
27
29
  for (let i = 0; i < lenght; i++) {
28
- if (lines[i].substring(0, 1) === '!') {
29
- if (lines[i] === "! model") {
30
+ if (lines[i].slice(0, 1) === '!') {
31
+ if (lines[i] === '! model') {
30
32
  isModel = true;
31
33
  isLayout = false;
32
34
  isVariant = false;
33
35
  isOption = false;
34
36
  }
35
- else if (lines[i] === "! layout") {
37
+ else if (lines[i] === '! layout') {
36
38
  isModel = false;
37
39
  isLayout = true;
38
40
  isVariant = false;
39
41
  isOption = false;
40
42
  }
41
- else if (lines[i] === "! variant") {
43
+ else if (lines[i] === '! variant') {
42
44
  isModel = false;
43
45
  isLayout = false;
44
46
  isVariant = true;
45
47
  isOption = false;
46
48
  }
47
- else if (lines[i] === "! option") {
49
+ else if (lines[i] === '! option') {
48
50
  isModel = false;
49
51
  isLayout = false;
50
52
  isVariant = false;
@@ -75,9 +77,9 @@ class Keyboard {
75
77
  // pc101 Generic 101-key PC
76
78
  const oModels = [];
77
79
  for (const model of this.models) {
78
- let m = {};
79
- m.code = model.substring(0, 15).trim();
80
- m.description = model.substring(16);
80
+ const m = {};
81
+ m.code = model.slice(0, 15).trim();
82
+ m.description = model.slice(16);
81
83
  oModels.push(m);
82
84
  }
83
85
  return oModels;
@@ -89,8 +91,8 @@ class Keyboard {
89
91
  const oLayouts = [];
90
92
  for (const layout of this.layouts) {
91
93
  const l = {};
92
- l.code = layout.substring(0, 15).trim();
93
- l.description = layout.substring(16);
94
+ l.code = layout.slice(0, 15).trim();
95
+ l.description = layout.slice(16);
94
96
  oLayouts.push(l);
95
97
  }
96
98
  return oLayouts;
@@ -100,13 +102,13 @@ class Keyboard {
100
102
  */
101
103
  getVariants(layout) {
102
104
  // 0123456789012345678901234567890123456789
103
- // chr us: Cherokee
105
+ // chr us: Cherokee
104
106
  const aoVariants = [];
105
107
  for (const variant of this.variants) {
106
108
  const v = {};
107
- v.code = variant.substring(0, 15).trim();
109
+ v.code = variant.slice(0, 15).trim();
108
110
  v.lang = variant.substring(16, variant.indexOf(':')).trim();
109
- v.description = variant.substring(variant.indexOf(':'));
111
+ v.description = variant.slice(Math.max(0, variant.indexOf(':')));
110
112
  if (v.lang === layout) {
111
113
  aoVariants.push(v);
112
114
  }
@@ -122,8 +124,8 @@ class Keyboard {
122
124
  const aoOptions = [];
123
125
  for (const option of this.options) {
124
126
  const o = {};
125
- o.code = option.substring(0, 15).trim();
126
- o.description = option.substring(21);
127
+ o.code = option.slice(0, 15).trim();
128
+ o.description = option.slice(21);
127
129
  aoOptions.push(o);
128
130
  }
129
131
  return aoOptions;
@@ -136,7 +138,7 @@ class Keyboard {
136
138
  const cmd = `grep XKBMODEL < ${file} |cut -f2 -d= | cut -f2 "-d\\""`;
137
139
  let keyboardModel = 'pc105';
138
140
  if (fs_1.default.existsSync(file)) {
139
- const result = await (0, utils_1.exec)(cmd, { capture: true, echo: false, ignore: false });
141
+ const result = await (0, utils_js_1.exec)(cmd, { capture: true, echo: false, ignore: false });
140
142
  if (result.code === 0) {
141
143
  keyboardModel = result.data.trim();
142
144
  }
@@ -148,10 +150,10 @@ class Keyboard {
148
150
  */
149
151
  async getLayout() {
150
152
  const file = '/etc/default/keyboard';
151
- const cmd = `grep XKBLAYOUT < /etc/default/keyboard | cut -f2 -d= | cut -f2 "-d\\""`;
153
+ const cmd = 'grep XKBLAYOUT < /etc/default/keyboard | cut -f2 -d= | cut -f2 "-d\\""';
152
154
  let keyboardLayout = 'us';
153
155
  if (fs_1.default.existsSync(file)) {
154
- const result = await (0, utils_1.exec)(cmd, { capture: true, echo: false, ignore: false });
156
+ const result = await (0, utils_js_1.exec)(cmd, { capture: true, echo: false, ignore: false });
155
157
  if (result.code === 0) {
156
158
  keyboardLayout = result.data.trim();
157
159
  }
@@ -166,7 +168,7 @@ class Keyboard {
166
168
  const cmd = `grep XKBVARIANT < ${file} | cut -f2 -d=|cut -f2 "-d\\""`;
167
169
  let keyboardVariant = '';
168
170
  if (fs_1.default.existsSync(file)) {
169
- const result = await (0, utils_1.exec)(cmd, { capture: true, echo: false, ignore: false });
171
+ const result = await (0, utils_js_1.exec)(cmd, { capture: true, echo: false, ignore: false });
170
172
  if (result.code === 0) {
171
173
  keyboardVariant = result.data.trim();
172
174
  }
@@ -181,7 +183,7 @@ class Keyboard {
181
183
  const cmd = `grep XKBOPTIONS < ${file} | cut -f2 -d= | cut -f2 "-d\\""`;
182
184
  let keyboardOption = '';
183
185
  if (fs_1.default.existsSync(file)) {
184
- const result = await (0, utils_1.exec)(cmd, { capture: true, echo: false, ignore: false });
186
+ const result = await (0, utils_js_1.exec)(cmd, { capture: true, echo: false, ignore: false });
185
187
  if (result.code === 0) {
186
188
  keyboardOption = result.data.trim();
187
189
  }
@@ -1,19 +1,21 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const utils_1 = require("../lib/utils");
5
- const fs_1 = tslib_1.__importDefault(require("fs"));
6
- const distro_1 = tslib_1.__importDefault(require("./distro"));
6
+ const utils_js_1 = require("../lib/utils.js");
7
+ const fs_1 = __importDefault(require("fs"));
8
+ const distro_js_1 = __importDefault(require("./distro.js"));
7
9
  class Locales {
8
10
  /**
9
- *
10
- */
11
+ *
12
+ */
11
13
  async getEnabled() {
12
14
  // Restituisce i locales abilitati in Debian, per manjaro quelli presenti
13
15
  // in /etc/locale.gen anche se #disabilitati
14
- const cmd = `localectl list-locales`;
15
- let enabledLocales = [];
16
- const result = await (0, utils_1.exec)(cmd, { capture: true, echo: false, ignore: false });
16
+ const cmd = 'localectl list-locales';
17
+ const enabledLocales = [];
18
+ const result = await (0, utils_js_1.exec)(cmd, { capture: true, echo: false, ignore: false });
17
19
  if (result.code === 0) {
18
20
  const lines = result.data.split('\n');
19
21
  for (const line of lines) {
@@ -23,16 +25,16 @@ class Locales {
23
25
  return enabledLocales;
24
26
  }
25
27
  /**
26
- *
27
- */
28
+ *
29
+ */
28
30
  async getSupported() {
29
- const distro = new distro_1.default();
31
+ const distro = new distro_js_1.default();
30
32
  let supporteds = [];
31
33
  if (distro.familyId === 'debian') {
32
34
  supporteds = fs_1.default.readFileSync('/usr/share/i18n/SUPPORTED', 'utf-8').split('\n');
33
35
  }
34
36
  else if (distro.familyId === 'archlinux') {
35
- supporteds = (await (0, utils_1.exec)('localectl list-locales', { capture: true, echo: false, ignore: false })).data.split('\n');
37
+ supporteds = (await (0, utils_js_1.exec)('localectl list-locales', { capture: true, echo: false, ignore: false })).data.split('\n');
36
38
  }
37
39
  const elements = [];
38
40
  for (const elem of supporteds) {
@@ -41,14 +43,14 @@ class Locales {
41
43
  return elements;
42
44
  }
43
45
  /**
44
- *
45
- */
46
+ *
47
+ */
46
48
  async getDefault() {
47
49
  const file = '/etc/default/locale';
48
50
  const cmd = `grep LANG < ${file}|cut -f2 -d=`;
49
- let defaultLanguage = "";
51
+ let defaultLanguage = '';
50
52
  if (fs_1.default.existsSync(file)) {
51
- const result = await (0, utils_1.exec)(cmd, { capture: true, echo: false, ignore: false });
53
+ const result = await (0, utils_js_1.exec)(cmd, { capture: true, echo: false, ignore: false });
52
54
  if (result.code === 0) {
53
55
  defaultLanguage = result.data.replace(/"/g, '').replace(/'/g, '').trim();
54
56
  }
@@ -5,9 +5,11 @@
5
5
  * email: piero.proietti@gmail.com
6
6
  * license: MIT
7
7
  */
8
+ var __importDefault = (this && this.__importDefault) || function (mod) {
9
+ return (mod && mod.__esModule) ? mod : { "default": mod };
10
+ };
8
11
  Object.defineProperty(exports, "__esModule", { value: true });
9
- const tslib_1 = require("tslib");
10
- const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
12
+ const node_fs_1 = __importDefault(require("node:fs"));
11
13
  class n8 {
12
14
  /**
13
15
  *
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
6
  const netmask_1 = require("netmask");
5
- const os_1 = tslib_1.__importDefault(require("os"));
7
+ const os_1 = __importDefault(require("os"));
6
8
  /**
7
9
  *
8
10
  */
@@ -19,7 +21,7 @@ class Network {
19
21
  this.netmask = '';
20
22
  this.o = {};
21
23
  const interfaces = os_1.default.networkInterfaces();
22
- let address = '';
24
+ const address = '';
23
25
  if (interfaces !== undefined) {
24
26
  for (const devName in interfaces) {
25
27
  const iface = interfaces[devName];
@@ -32,10 +34,8 @@ class Network {
32
34
  if (this.address === '') {
33
35
  this.address = alias.address;
34
36
  }
35
- if (this.cidr === '') {
36
- if (alias.cidr !== null) {
37
- this.cidr = alias.cidr;
38
- }
37
+ if (this.cidr === '' && alias.cidr !== null) {
38
+ this.cidr = alias.cidr;
39
39
  }
40
40
  if (this.family === '') {
41
41
  this.family = alias.family;
@@ -51,8 +51,8 @@ class Network {
51
51
  }
52
52
  }
53
53
  /**
54
- * valori da netmask
55
- */
54
+ * valori da netmask
55
+ */
56
56
  this.o = new netmask_1.Netmask(this.cidr);
57
57
  }
58
58
  }