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
@@ -5,18 +5,20 @@
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
12
  const core_1 = require("@oclif/core");
11
- const utils_1 = tslib_1.__importDefault(require("../classes/utils"));
12
- const krill_prepare_1 = tslib_1.__importDefault(require("../krill/krill-prepare"));
13
- const node_path_1 = tslib_1.__importDefault(require("node:path"));
14
- const js_yaml_1 = tslib_1.__importDefault(require("js-yaml"));
15
- const fs_1 = tslib_1.__importDefault(require("fs"));
16
- const axios_1 = tslib_1.__importDefault(require("axios"));
17
- const node_https_1 = tslib_1.__importDefault(require("node:https"));
13
+ const utils_js_1 = __importDefault(require("../classes/utils.js"));
14
+ const krill_prepare_js_1 = __importDefault(require("../krill/krill-prepare.js"));
15
+ const node_path_1 = __importDefault(require("node:path"));
16
+ const js_yaml_1 = __importDefault(require("js-yaml"));
17
+ const fs_1 = __importDefault(require("fs"));
18
+ const axios_1 = __importDefault(require("axios"));
19
+ const node_https_1 = __importDefault(require("node:https"));
18
20
  const agent = new node_https_1.default.Agent({
19
- rejectUnauthorized: false
21
+ rejectUnauthorized: false,
20
22
  });
21
23
  /**
22
24
  * Class Krill
@@ -26,7 +28,7 @@ class Install extends core_1.Command {
26
28
  * Execute
27
29
  */
28
30
  async run() {
29
- utils_1.default.titles(this.id + ' ' + this.argv);
31
+ utils_js_1.default.titles(this.id + ' ' + this.argv);
30
32
  const { flags } = await this.parse(Install);
31
33
  let custom = flags.custom;
32
34
  let unattended = flags.unattended;
@@ -36,9 +38,9 @@ class Install extends core_1.Command {
36
38
  // krillConfig
37
39
  let krillConfig = {};
38
40
  if (custom !== undefined) {
39
- let fname = node_path_1.default.basename(custom);
41
+ const fname = node_path_1.default.basename(custom);
40
42
  unattended = true;
41
- let url = `https://raw.githubusercontent.com/pieroproietti/penguins-wardrobe/main/config/${fname}.yaml`;
43
+ const url = `https://raw.githubusercontent.com/pieroproietti/penguins-wardrobe/main/config/${fname}.yaml`;
42
44
  let res;
43
45
  await axios_1.default.get(url, { httpsAgent: agent })
44
46
  .then(function (response) {
@@ -50,35 +52,35 @@ class Install extends core_1.Command {
50
52
  });
51
53
  }
52
54
  // nointeractive
53
- let nointeractive = flags.nointeractive;
55
+ const nointeractive = flags.nointeractive;
54
56
  // hostname
55
- let ip = flags.ip;
56
- let random = flags.random;
57
+ const ip = flags.ip;
58
+ const random = flags.random;
57
59
  let domain = '.local';
58
60
  if (flags.domain) {
59
61
  domain = flags.domain;
60
62
  }
61
63
  // swap
62
- let suspend = flags.suspend;
63
- let small = flags.small;
64
- let none = flags.none;
64
+ const suspend = flags.suspend;
65
+ const small = flags.small;
66
+ const none = flags.none;
65
67
  let crypted = flags.crypted;
66
- let pve = flags.pve;
68
+ const pve = flags.pve;
67
69
  if (pve) {
68
70
  crypted = false;
69
71
  }
70
- let verbose = flags.verbose;
71
- if (utils_1.default.isRoot()) {
72
- if (utils_1.default.isLive()) {
73
- const krill = new krill_prepare_1.default();
72
+ const verbose = flags.verbose;
73
+ if (utils_js_1.default.isRoot()) {
74
+ if (utils_js_1.default.isLive()) {
75
+ const krill = new krill_prepare_js_1.default();
74
76
  await krill.prepare(unattended, nointeractive, krillConfig, ip, random, domain, suspend, small, none, crypted, pve, verbose);
75
77
  }
76
78
  else {
77
- utils_1.default.warning('You are in an installed system!');
79
+ utils_js_1.default.warning('You are in an installed system!');
78
80
  }
79
81
  }
80
82
  else {
81
- utils_1.default.useRoot(this.id);
83
+ utils_js_1.default.useRoot(this.id);
82
84
  }
83
85
  }
84
86
  }
@@ -96,11 +98,11 @@ Install.flags = {
96
98
  small: core_1.Flags.boolean({ char: 's', description: 'Swap small: RAM' }),
97
99
  suspend: core_1.Flags.boolean({ char: 'S', description: 'Swap suspend: RAM x 2' }),
98
100
  unattended: core_1.Flags.boolean({ char: 'u', description: 'Unattended installation' }),
99
- verbose: core_1.Flags.boolean({ char: 'v', description: 'Verbose' })
101
+ verbose: core_1.Flags.boolean({ char: 'v', description: 'Verbose' }),
100
102
  };
101
103
  Install.description = 'krill: the CLI system installer - the egg became a penguin!';
102
104
  Install.examples = [
103
- "sudo eggs install",
104
- "sudo eggs install --unattended",
105
- "sudo eggs install --custom it"
105
+ 'sudo eggs install',
106
+ 'sudo eggs install --unattended',
107
+ 'sudo eggs install --custom it',
106
108
  ];
@@ -1,6 +1,8 @@
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-v7 based on Debian live
6
8
  * author: Piero Proietti
@@ -8,9 +10,9 @@ const tslib_1 = require("tslib");
8
10
  * license: MIT
9
11
  */
10
12
  const core_1 = require("@oclif/core");
11
- const utils_1 = tslib_1.__importDefault(require("../classes/utils"));
12
- const settings_1 = tslib_1.__importDefault(require("../classes/settings"));
13
- const utils_2 = require("../lib/utils");
13
+ const utils_js_1 = __importDefault(require("../classes/utils.js"));
14
+ const settings_js_1 = __importDefault(require("../classes/settings.js"));
15
+ const utils_js_2 = require("../lib/utils.js");
14
16
  class Kill extends core_1.Command {
15
17
  constructor() {
16
18
  super(...arguments);
@@ -19,26 +21,26 @@ class Kill extends core_1.Command {
19
21
  this.work_dir = {};
20
22
  }
21
23
  async run() {
22
- utils_1.default.titles(this.id + ' ' + this.argv);
24
+ utils_js_1.default.titles(this.id + ' ' + this.argv);
23
25
  const { flags } = await this.parse(Kill);
24
26
  let verbose = false;
25
27
  if (flags.verbose) {
26
28
  verbose = true;
27
29
  }
28
- let nointeractive = flags.nointeractive;
29
- const echo = utils_1.default.setEcho(verbose);
30
- if (utils_1.default.isRoot()) {
30
+ const nointeractive = flags.nointeractive;
31
+ const echo = utils_js_1.default.setEcho(verbose);
32
+ if (utils_js_1.default.isRoot()) {
31
33
  // Utils.warning('Cleaning the nest...')
32
- const settings = new settings_1.default();
34
+ const settings = new settings_js_1.default();
33
35
  await settings.load();
34
36
  await settings.listFreeSpace();
35
- if (nointeractive || await utils_1.default.customConfirm()) {
36
- await (0, utils_2.exec)(`rm ${settings.work_dir.path}/* -rf`, echo);
37
- await (0, utils_2.exec)(`rm ${settings.config.snapshot_dir} -rf`, echo);
37
+ if (nointeractive || await utils_js_1.default.customConfirm()) {
38
+ await (0, utils_js_2.exec)(`rm ${settings.work_dir.path}/* -rf`, echo);
39
+ await (0, utils_js_2.exec)(`rm ${settings.config.snapshot_dir} -rf`, echo);
38
40
  }
39
41
  }
40
42
  else {
41
- utils_1.default.useRoot(this.id);
43
+ utils_js_1.default.useRoot(this.id);
42
44
  }
43
45
  }
44
46
  }
@@ -46,9 +48,9 @@ exports.default = Kill;
46
48
  Kill.flags = {
47
49
  help: core_1.Flags.help({ char: 'h' }),
48
50
  nointeractive: core_1.Flags.boolean({ char: 'n', description: 'no user interaction' }),
49
- verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
51
+ verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' }),
50
52
  };
51
53
  Kill.description = 'kill the eggs/free the nest';
52
54
  Kill.examples = [
53
- "sudo eggs kill"
55
+ 'sudo eggs kill',
54
56
  ];
@@ -1,6 +1,8 @@
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-v8
6
8
  * author: Piero Proietti
@@ -8,26 +10,26 @@ const tslib_1 = require("tslib");
8
10
  * license: MIT
9
11
  */
10
12
  const core_1 = require("@oclif/core");
11
- const node_path_1 = tslib_1.__importDefault(require("node:path"));
12
- const utils_1 = tslib_1.__importDefault(require("../classes/utils"));
13
- const utils_2 = require("../lib/utils");
13
+ const node_path_1 = __importDefault(require("node:path"));
14
+ const utils_js_1 = __importDefault(require("../classes/utils.js"));
15
+ const utils_js_2 = require("../lib/utils.js");
14
16
  class Mom extends core_1.Command {
15
17
  async run() {
16
- utils_1.default.titles(this.id + ' ' + this.argv);
18
+ utils_js_1.default.titles(this.id + ' ' + this.argv);
17
19
  // No sudo!
18
20
  if (process.getuid && process.getuid() === 0) {
19
- utils_1.default.warning('You must to be kind with your mom! Call her without sudo');
21
+ utils_js_1.default.warning('You must to be kind with your mom! Call her without sudo');
20
22
  process.exit(0);
21
23
  }
22
24
  const cmd = node_path_1.default.resolve(__dirname, '../../scripts/mom.sh');
23
- await (0, utils_2.exec)(cmd);
25
+ await (0, utils_js_2.exec)(cmd);
24
26
  }
25
27
  }
26
28
  exports.default = Mom;
27
29
  Mom.flags = {
28
- help: core_1.Flags.help({ char: 'h' })
30
+ help: core_1.Flags.help({ char: 'h' }),
29
31
  };
30
32
  Mom.description = 'ask help from mommy - TUI helper';
31
33
  Mom.examples = [
32
- "eggs mom"
34
+ 'eggs mom',
33
35
  ];
@@ -1,6 +1,8 @@
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-v7 based on Debian live
6
8
  * author: Piero Proietti
@@ -8,18 +10,18 @@ const tslib_1 = require("tslib");
8
10
  * license: MIT
9
11
  */
10
12
  const core_1 = require("@oclif/core");
11
- const utils_1 = tslib_1.__importDefault(require("../classes/utils"));
12
- const ovary_1 = tslib_1.__importDefault(require("../classes/ovary"));
13
- const compressors_1 = tslib_1.__importDefault(require("../classes/compressors"));
14
- const config_1 = tslib_1.__importDefault(require("./config"));
15
- const chalk_1 = tslib_1.__importDefault(require("chalk"));
16
- const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
17
- const node_path_1 = tslib_1.__importDefault(require("node:path"));
13
+ const utils_js_1 = __importDefault(require("../classes/utils.js"));
14
+ const ovary_js_1 = __importDefault(require("../classes/ovary.js"));
15
+ const compressors_js_1 = __importDefault(require("../classes/compressors.js"));
16
+ const config_js_1 = __importDefault(require("./config.js"));
17
+ const chalk_1 = __importDefault(require("chalk"));
18
+ const node_fs_1 = __importDefault(require("node:fs"));
19
+ const node_path_1 = __importDefault(require("node:path"));
18
20
  class Produce extends core_1.Command {
19
21
  async run() {
20
- utils_1.default.titles(this.id + ' ' + this.argv);
22
+ utils_js_1.default.titles(this.id + ' ' + this.argv);
21
23
  const { flags } = await this.parse(Produce);
22
- if (utils_1.default.isRoot()) {
24
+ if (utils_js_1.default.isRoot()) {
23
25
  /**
24
26
  * ADDONS dei vendors
25
27
  * Fino a 3
@@ -35,7 +37,7 @@ class Produce extends core_1.Command {
35
37
  const dirAddon = node_path_1.default.resolve(__dirname, `../../addons/${addon}`);
36
38
  if (!node_fs_1.default.existsSync(dirAddon)) {
37
39
  console.log(dirAddon);
38
- utils_1.default.warning('addon: ' + chalk_1.default.white(addon) + ' not found, terminate!');
40
+ utils_js_1.default.warning('addon: ' + chalk_1.default.white(addon) + ' not found, terminate!');
39
41
  process.exit();
40
42
  }
41
43
  const vendorAddon = addon.slice(0, Math.max(0, addon.search('/')));
@@ -56,7 +58,7 @@ class Produce extends core_1.Command {
56
58
  if (flags.basename !== undefined) {
57
59
  basename = flags.basename;
58
60
  }
59
- const compressors = new compressors_1.default();
61
+ const compressors = new compressors_js_1.default();
60
62
  await compressors.populate();
61
63
  let compression = compressors.fast();
62
64
  if (flags.max) {
@@ -80,7 +82,7 @@ class Produce extends core_1.Command {
80
82
  theme = flags.theme;
81
83
  if (theme.includes('/')) {
82
84
  if (theme.endsWith('/')) {
83
- theme = theme.substring(0, theme.length - 1);
85
+ theme = theme.slice(0, Math.max(0, theme.length - 1));
84
86
  }
85
87
  if (!node_fs_1.default.existsSync(theme + '/theme')) {
86
88
  console.log('Cannot find theme: ' + theme);
@@ -88,9 +90,9 @@ class Produce extends core_1.Command {
88
90
  }
89
91
  }
90
92
  }
91
- const i = await config_1.default.thatWeNeed(nointeractive, verbose, cryptedclone);
92
- if ((i.needApt || i.configurationInstall || i.configurationRefresh || i.distroTemplate) && (await utils_1.default.customConfirm('Select yes to continue...'))) {
93
- await config_1.default.install(i, nointeractive, verbose);
93
+ const i = await config_js_1.default.thatWeNeed(nointeractive, verbose, cryptedclone);
94
+ if ((i.needApt || i.configurationInstall || i.configurationRefresh || i.distroTemplate) && (await utils_js_1.default.customConfirm('Select yes to continue...'))) {
95
+ await config_js_1.default.install(i, nointeractive, verbose);
94
96
  }
95
97
  const myAddons = {};
96
98
  if (flags.addons != undefined) {
@@ -107,16 +109,16 @@ class Produce extends core_1.Command {
107
109
  myAddons.rsupport = true;
108
110
  }
109
111
  }
110
- utils_1.default.titles(this.id + ' ' + this.argv);
111
- const ovary = new ovary_1.default();
112
- utils_1.default.warning('Produce an egg...');
112
+ utils_js_1.default.titles(this.id + ' ' + this.argv);
113
+ const ovary = new ovary_js_1.default();
114
+ utils_js_1.default.warning('Produce an egg...');
113
115
  if (await ovary.fertilization(prefix, basename, theme, compression, !nointeractive)) {
114
116
  await ovary.produce(clone, cryptedclone, scriptOnly, yolkRenew, release, myAddons, nointeractive, verbose);
115
117
  ovary.finished(scriptOnly);
116
118
  }
117
119
  }
118
120
  else {
119
- utils_1.default.useRoot(this.id);
121
+ utils_js_1.default.useRoot(this.id);
120
122
  }
121
123
  }
122
124
  }
@@ -139,12 +141,12 @@ Produce.flags = {
139
141
  };
140
142
  Produce.description = 'produce a live image from your system whithout your data';
141
143
  Produce.examples = [
142
- "sudo eggs produce",
143
- "sudo eggs produce --standard",
144
- "sudo eggs produce --max",
145
- "sudo eggs produce --max --basename=colibri",
146
- "sudo eggs produce --cryptedclone",
147
- "sudo eggs produce --clone",
148
- "sudo eggs produce --basename=colibri",
149
- "sudo eggs produce --basename=colibri --theme /path/to/theme --addons adapt",
144
+ 'sudo eggs produce',
145
+ 'sudo eggs produce --standard',
146
+ 'sudo eggs produce --max',
147
+ 'sudo eggs produce --max --basename=colibri',
148
+ 'sudo eggs produce --cryptedclone',
149
+ 'sudo eggs produce --clone',
150
+ 'sudo eggs produce --basename=colibri',
151
+ 'sudo eggs produce --basename=colibri --theme /path/to/theme --addons adapt',
150
152
  ];
@@ -2,10 +2,12 @@
2
2
  /**
3
3
  * info
4
4
  */
5
+ var __importDefault = (this && this.__importDefault) || function (mod) {
6
+ return (mod && mod.__esModule) ? mod : { "default": mod };
7
+ };
5
8
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const tslib_1 = require("tslib");
7
9
  const core_1 = require("@oclif/core");
8
- const information_1 = tslib_1.__importDefault(require("../components/elements/information"));
10
+ const information_js_1 = __importDefault(require("../components/elements/information.js"));
9
11
  /**
10
12
  *
11
13
  */
@@ -19,15 +21,15 @@ class Status extends core_1.Command {
19
21
  if (flags.verbose) {
20
22
  verbose = true;
21
23
  }
22
- await (0, information_1.default)(verbose);
24
+ await (0, information_js_1.default)(verbose);
23
25
  }
24
26
  }
25
27
  exports.default = Status;
26
28
  Status.flags = {
27
29
  help: core_1.Flags.help({ char: 'h' }),
28
- verbose: core_1.Flags.boolean({ char: 'v' })
30
+ verbose: core_1.Flags.boolean({ char: 'v' }),
29
31
  };
30
32
  Status.description = 'informations about eggs status';
31
33
  Status.examples = [
32
- "eggs status"
34
+ 'eggs status',
33
35
  ];
@@ -1,6 +1,8 @@
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-v9
6
8
  * author: Piero Proietti
@@ -8,10 +10,10 @@ const tslib_1 = require("tslib");
8
10
  * license: MIT
9
11
  */
10
12
  const core_1 = require("@oclif/core");
11
- const fs_1 = tslib_1.__importDefault(require("fs"));
12
- const path_1 = tslib_1.__importDefault(require("path"));
13
- const utils_1 = tslib_1.__importDefault(require("../classes/utils"));
14
- const utils_2 = require("../lib/utils");
13
+ const fs_1 = __importDefault(require("fs"));
14
+ const path_1 = __importDefault(require("path"));
15
+ const utils_js_1 = __importDefault(require("../classes/utils.js"));
16
+ const utils_js_2 = require("../lib/utils.js");
15
17
  /**
16
18
  *
17
19
  */
@@ -31,7 +33,7 @@ class Syncfrom extends core_1.Command {
31
33
  if (flags.verbose) {
32
34
  this.verbose = true;
33
35
  }
34
- this.echo = utils_1.default.setEcho(this.verbose);
36
+ this.echo = utils_js_1.default.setEcho(this.verbose);
35
37
  let fileVolume = '';
36
38
  if (flags.file) {
37
39
  fileVolume = flags.file;
@@ -40,19 +42,19 @@ class Syncfrom extends core_1.Command {
40
42
  if (flags.delete) {
41
43
  destDelete = true;
42
44
  }
43
- if (utils_1.default.isLive()) {
45
+ if (utils_js_1.default.isLive()) {
44
46
  if (flags.rootdir) {
45
47
  this.rootDir = flags.rootdir;
46
48
  }
47
49
  else {
48
- utils_1.default.pressKeyToExit(`Argument --rootdir is mandatory, when running live! Process will terminate`);
50
+ utils_js_1.default.pressKeyToExit('Argument --rootdir is mandatory, when running live! Process will terminate');
49
51
  }
50
52
  }
51
- if (utils_1.default.isRoot()) {
53
+ if (utils_js_1.default.isRoot()) {
52
54
  if (fileVolume === '') {
53
55
  fileVolume = '/run/live/medium/live/luks-eggs-dada';
54
56
  }
55
- if (!utils_1.default.isLive()) {
57
+ if (!utils_js_1.default.isLive()) {
56
58
  /**
57
59
  * WORKING FROM INSTALLED
58
60
  */
@@ -62,12 +64,12 @@ class Syncfrom extends core_1.Command {
62
64
  this.luksDevice = `/dev/mapper/${this.luksName}`;
63
65
  this.luksMountpoint = '/tmp/eggs-data';
64
66
  await this.restorePrivateData();
65
- if (await utils_1.default.customConfirm(`Your system was updated! Press a key to reboot`)) {
66
- await (0, utils_2.exec)('reboot');
67
+ if (await utils_js_1.default.customConfirm('Your system was updated! Press a key to reboot')) {
68
+ await (0, utils_js_2.exec)('reboot');
67
69
  }
68
70
  }
69
71
  else {
70
- utils_1.default.pressKeyToExit(`Can't find ${this.luksFile}`);
72
+ utils_js_1.default.pressKeyToExit(`Can't find ${this.luksFile}`);
71
73
  }
72
74
  }
73
75
  else {
@@ -82,7 +84,7 @@ class Syncfrom extends core_1.Command {
82
84
  }
83
85
  }
84
86
  else {
85
- utils_1.default.useRoot(this.id);
87
+ utils_js_1.default.useRoot(this.id);
86
88
  }
87
89
  }
88
90
  /**
@@ -91,29 +93,27 @@ class Syncfrom extends core_1.Command {
91
93
  */
92
94
  async restorePrivateData(destDelete = false) {
93
95
  if (!fs_1.default.existsSync(this.luksMountpoint)) {
94
- await (0, utils_2.exec)(`mkdir ${this.luksMountpoint}`, this.echo);
96
+ await (0, utils_js_2.exec)(`mkdir ${this.luksMountpoint}`, this.echo);
95
97
  }
96
98
  await this.luksOpen();
97
99
  /**
98
100
  * ONLY FROM LIVE
99
101
  * rm home, subst /etc/passwd, /etc/shadow, /etc/groups
100
102
  */
101
- if (utils_1.default.isLive()) {
102
- if (this.rootDir !== '/') {
103
- utils_1.default.warning('Removing live user on destination system');
104
- await (0, utils_2.exec)(`rm -rf ${this.rootDir}/home/*`, this.echo);
105
- utils_1.default.warning('Restoring accounts');
106
- await (0, utils_2.exec)(`cp ${this.luksMountpoint}/etc/passwd ${this.rootDir}/etc/`, this.echo);
107
- await (0, utils_2.exec)(`cp ${this.luksMountpoint}/etc/shadow ${this.rootDir}/etc/`, this.echo);
108
- await (0, utils_2.exec)(`cp ${this.luksMountpoint}/etc/group ${this.rootDir}/etc/`, this.echo);
109
- }
110
- }
111
- utils_1.default.warning('Restoring crypted data');
103
+ if (utils_js_1.default.isLive() && this.rootDir !== '/') {
104
+ utils_js_1.default.warning('Removing live user on destination system');
105
+ await (0, utils_js_2.exec)(`rm -rf ${this.rootDir}/home/*`, this.echo);
106
+ utils_js_1.default.warning('Restoring accounts');
107
+ await (0, utils_js_2.exec)(`cp ${this.luksMountpoint}/etc/passwd ${this.rootDir}/etc/`, this.echo);
108
+ await (0, utils_js_2.exec)(`cp ${this.luksMountpoint}/etc/shadow ${this.rootDir}/etc/`, this.echo);
109
+ await (0, utils_js_2.exec)(`cp ${this.luksMountpoint}/etc/group ${this.rootDir}/etc/`, this.echo);
110
+ }
111
+ utils_js_1.default.warning('Restoring crypted data');
112
112
  let cmd = `rsync -a ${this.luksMountpoint}/ROOT/ ${this.rootDir}/`;
113
113
  if (destDelete) {
114
114
  cmd = `rsync --archive --delete ${this.luksMountpoint}/ROOT/ ${this.rootDir}/`;
115
115
  }
116
- await (0, utils_2.exec)(cmd, this.echo);
116
+ await (0, utils_js_2.exec)(cmd, this.echo);
117
117
  await this.luksClose();
118
118
  }
119
119
  /**
@@ -121,43 +121,43 @@ class Syncfrom extends core_1.Command {
121
121
  */
122
122
  async luksOpen() {
123
123
  if (!fs_1.default.existsSync(this.luksDevice)) {
124
- utils_1.default.warning(`LUKS open volume: ${this.luksName}`);
125
- await (0, utils_2.exec)(`cryptsetup luksOpen --type luks2 ${this.luksFile} ${this.luksName}`, utils_1.default.setEcho(true));
124
+ utils_js_1.default.warning(`LUKS open volume: ${this.luksName}`);
125
+ await (0, utils_js_2.exec)(`cryptsetup luksOpen --type luks2 ${this.luksFile} ${this.luksName}`, utils_js_1.default.setEcho(true));
126
126
  }
127
127
  else {
128
- utils_1.default.warning(`LUKS volume: ${this.luksName} already open`);
128
+ utils_js_1.default.warning(`LUKS volume: ${this.luksName} already open`);
129
129
  }
130
130
  if (!fs_1.default.existsSync(this.luksMountpoint)) {
131
- await (0, utils_2.exec)(`mkdir -p ${this.luksMountpoint}`, this.echo);
131
+ await (0, utils_js_2.exec)(`mkdir -p ${this.luksMountpoint}`, this.echo);
132
132
  }
133
- if (!utils_1.default.isMountpoint(this.luksMountpoint)) {
134
- utils_1.default.warning(`mount volume: ${this.luksDevice} on ${this.luksMountpoint}`);
135
- await (0, utils_2.exec)(`mount ${this.luksDevice} ${this.luksMountpoint}`, this.echo);
133
+ if (!utils_js_1.default.isMountpoint(this.luksMountpoint)) {
134
+ utils_js_1.default.warning(`mount volume: ${this.luksDevice} on ${this.luksMountpoint}`);
135
+ await (0, utils_js_2.exec)(`mount ${this.luksDevice} ${this.luksMountpoint}`, this.echo);
136
136
  }
137
137
  else {
138
- utils_1.default.warning(`mount volume: ${this.luksDevice} already mounted on ${this.luksMountpoint}`);
138
+ utils_js_1.default.warning(`mount volume: ${this.luksDevice} already mounted on ${this.luksMountpoint}`);
139
139
  }
140
140
  }
141
141
  /**
142
142
  *
143
143
  */
144
144
  async luksClose() {
145
- if (utils_1.default.isMountpoint(this.luksMountpoint)) {
146
- await (0, utils_2.exec)(`umount ${this.luksMountpoint}`, this.echo);
145
+ if (utils_js_1.default.isMountpoint(this.luksMountpoint)) {
146
+ await (0, utils_js_2.exec)(`umount ${this.luksMountpoint}`, this.echo);
147
147
  }
148
148
  if (fs_1.default.existsSync(this.luksDevice)) {
149
- utils_1.default.warning(`LUKS close volume: ${this.luksName}`);
150
- await (0, utils_2.exec)(`cryptsetup luksClose ${this.luksName}`, this.echo);
149
+ utils_js_1.default.warning(`LUKS close volume: ${this.luksName}`);
150
+ await (0, utils_js_2.exec)(`cryptsetup luksClose ${this.luksName}`, this.echo);
151
151
  }
152
152
  }
153
153
  }
154
154
  exports.default = Syncfrom;
155
155
  Syncfrom.flags = {
156
156
  delete: core_1.Flags.string({ description: 'rsync --delete delete extraneous files from dest dirs' }),
157
- file: core_1.Flags.string({ char: 'f', description: "file LUKS volume encrypted" }),
157
+ file: core_1.Flags.string({ char: 'f', description: 'file LUKS volume encrypted' }),
158
158
  help: core_1.Flags.help({ char: 'h' }),
159
159
  rootdir: core_1.Flags.string({ char: 'r', description: 'rootdir of the installed system, when used from live' }),
160
- verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
160
+ verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' }),
161
161
  };
162
162
  Syncfrom.description = 'restore users and user data from a LUKS volumes';
163
163
  Syncfrom.examples = [