penguins-eggs 8.17.4 → 9.0.2
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.
- package/README.md +235 -155
- package/addons/README.md +78 -84
- package/addons/{pve → blissos}/theme/applications/install-debian.desktop +0 -0
- package/addons/{pve → blissos}/theme/artwork/install-debian.png +0 -0
- package/addons/blissos/theme/calamares/branding/blissos-logo.png +0 -0
- package/addons/{pve → blissos}/theme/calamares/branding/branding.desc +0 -0
- package/addons/blissos/theme/calamares/branding/languages.png +0 -0
- package/addons/blissos/theme/calamares/branding/show.qml +75 -0
- package/addons/blissos/theme/calamares/branding/slide1.png +0 -0
- package/addons/blissos/theme/calamares/branding/slide2.png +0 -0
- package/addons/blissos/theme/calamares/branding/slide3.png +0 -0
- package/addons/blissos/theme/calamares/branding/welcome.png +0 -0
- package/addons/{pve → blissos}/theme/calamares/modules/partition.yml +2 -2
- package/addons/blissos/theme/livecd/README.md +23 -0
- package/addons/blissos/theme/livecd/grub.template.cfg +34 -0
- package/addons/blissos/theme/livecd/grub.theme.cfg +46 -0
- package/addons/blissos/theme/livecd/isolinux.template.cfg +29 -0
- package/addons/blissos/theme/livecd/isolinux.theme.cfg +45 -0
- package/addons/blissos/theme/livecd/splash.png +0 -0
- package/addons/debian/theme/README.md +23 -0
- package/addons/debian/theme/{branding → calamares/branding}/branding.desc +0 -0
- package/addons/debian/theme/{branding → calamares/branding}/debian-logo.png +0 -0
- package/addons/debian/theme/{branding → calamares/branding}/show.qml +0 -0
- package/addons/debian/theme/{branding → calamares/branding}/slide1.png +0 -0
- package/addons/debian/theme/{branding → calamares/branding}/welcome.png +0 -0
- package/addons/debian/theme/calamares/modules/partition.yml +233 -0
- package/addons/debian/theme/livecd/README.md +23 -0
- package/addons/debian/theme/livecd/grub.template.cfg +34 -0
- package/addons/{pve/theme/livecd/theme.cfg → debian/theme/livecd/grub.theme.cfg} +4 -0
- package/addons/debian/theme/livecd/isolinux.template.cfg +30 -0
- package/{conf/distros/buster/isolinux/stdmenu.template.cfg → addons/debian/theme/livecd/isolinux.theme.cfg} +4 -0
- package/addons/debian/theme/livecd/splash.png +0 -0
- package/addons/deblinux/theme/README.md +19 -12
- package/addons/eggs/adapt/applications/eggs-adapt.desktop +1 -1
- package/addons/eggs/theme/livecd/README.md +21 -6
- package/addons/eggs/theme/livecd/grub.template.cfg +11 -37
- package/addons/eggs/theme/livecd/{theme.cfg → grub.theme.cfg} +5 -1
- package/addons/eggs/theme/livecd/isolinux.template.cfg +29 -0
- package/addons/eggs/theme/livecd/isolinux.theme.cfg +46 -0
- package/addons/eggs/theme/livecd/splash.png +0 -0
- package/addons/guadalinex/theme/livecd/README.md +23 -0
- package/addons/guadalinex/theme/livecd/{menu.template.cfg → isolinux.template.cfg} +12 -3
- package/addons/guadalinex/theme/livecd/{theme.cfg → isolinux.theme.cfg} +0 -0
- package/addons/neon/theme/livecd/README.md +23 -0
- package/addons/neon/theme/livecd/grub.template.cfg +34 -0
- package/addons/{ufficiozero/theme/livecd/theme.cfg → neon/theme/livecd/grub.theme.cfg} +5 -1
- package/addons/neon/theme/livecd/isolinux.template.cfg +29 -0
- package/addons/neon/theme/livecd/isolinux.theme.cfg +46 -0
- package/addons/neon/theme/livecd/splash.pcx +0 -0
- package/addons/neon/theme/livecd/splash.png +0 -0
- package/addons/openos/theme/livecd/README.md +23 -0
- package/addons/openos/theme/livecd/{theme.cfg → grub.theme.cfg} +0 -0
- package/addons/openos/theme/livecd/{menu.template.cfg → isolinux.template.cfg} +11 -3
- package/addons/openos/theme/livecd/isolinux.theme.cfg +45 -0
- package/addons/ufficiozero/theme/applications/install-debian.desktop +17 -2
- package/bin/dev +17 -0
- package/bin/dev.cmd +3 -0
- package/bin/run +2 -4
- package/conf/distros/bionic/calamares/settings.yml +5 -5
- package/conf/distros/bookworm/README.md +9 -0
- package/conf/distros/bullseye/README.md +6 -8
- package/conf/distros/buster/calamares/modules/shellprocess_eggs-cleanup.yml +6 -0
- package/conf/distros/buster/calamares/settings.yml +14 -3
- package/conf/distros/chimaera/README.md +3 -0
- package/conf/distros/daedalus/README.md +3 -0
- package/conf/distros/focal/calamares/settings.yml +2 -2
- package/conf/distros/jammy/README.md +9 -0
- package/conf/distros/rolling/README.md +3 -0
- package/conf/distros/rolling/calamares/calamares-modules/remove-link/module.yml +9 -0
- package/conf/distros/rolling/calamares/calamares-modules/remove-link/remove-link.sh +3 -0
- package/conf/distros/rolling/calamares/modules/displaymanager.yml +22 -0
- package/conf/distros/rolling/calamares/modules/finished.yml +6 -0
- package/conf/distros/rolling/calamares/modules/fstab.yml +13 -0
- package/conf/distros/rolling/calamares/modules/locale.yml +97 -0
- package/conf/distros/rolling/calamares/modules/luksopenswaphookcfg.yml +6 -0
- package/conf/distros/rolling/calamares/modules/mount.yml +38 -0
- package/conf/distros/rolling/calamares/modules/packages.yml +8 -0
- package/conf/distros/rolling/calamares/modules/removeuser.yml +15 -0
- package/conf/distros/rolling/calamares/modules/unpackfs.yml +7 -0
- package/conf/distros/rolling/calamares/modules/users.yml +20 -0
- package/conf/distros/rolling/calamares/modules/welcome.yml +19 -0
- package/conf/distros/{bullseye → rolling}/calamares/settings.yml +17 -12
- package/conf/distros/thirtyfive/README.md +3 -0
- package/conf/distros/tumbleweed/README.md +3 -0
- package/conf/eggs.yaml +1 -1
- package/conf/exclude.list +2 -4
- package/conf/tools.yaml +1 -1
- package/lib/classes/basket.js +24 -28
- package/lib/classes/bleach.js +17 -17
- package/lib/classes/compressors.js +15 -14
- package/lib/classes/daddy.js +38 -31
- package/lib/classes/distro.d.ts +3 -2
- package/lib/classes/distro.js +288 -179
- package/lib/classes/family/archlinux.d.ts +69 -0
- package/lib/classes/family/archlinux.js +181 -0
- package/lib/classes/family/debian.d.ts +64 -0
- package/lib/classes/family/debian.js +227 -0
- package/lib/classes/family/fedora.d.ts +63 -0
- package/lib/classes/family/fedora.js +169 -0
- package/lib/classes/family/suse.d.ts +63 -0
- package/lib/classes/family/suse.js +169 -0
- package/lib/classes/i18n.js +16 -16
- package/lib/classes/incubation/branding.js +5 -4
- package/lib/classes/incubation/distros/bionic.js +1 -2
- package/lib/classes/incubation/distros/buster.js +2 -2
- package/lib/classes/incubation/distros/focal.js +3 -2
- package/lib/classes/incubation/distros/jessie.js +1 -25
- package/lib/classes/incubation/distros/{bullseye.d.ts → rolling.d.ts} +3 -3
- package/lib/classes/incubation/distros/{bullseye.js → rolling.js} +15 -16
- package/lib/classes/incubation/fisherman-helper/displaymanager.js +2 -7
- package/lib/classes/incubation/fisherman-helper/packages.js +31 -32
- package/lib/classes/incubation/fisherman.d.ts +17 -17
- package/lib/classes/incubation/fisherman.js +84 -71
- package/lib/classes/incubation/incubator.js +116 -78
- package/lib/classes/incubation/installer.d.ts +2 -2
- package/lib/classes/incubation/installer.js +6 -20
- package/lib/classes/initrd.d.ts +1 -1
- package/lib/classes/initrd.js +37 -30
- package/lib/classes/krill_install.js +135 -132
- package/lib/classes/krill_prepare.js +51 -51
- package/lib/classes/n8.js +6 -11
- package/lib/classes/ovary.d.ts +29 -11
- package/lib/classes/ovary.js +711 -605
- package/lib/classes/pacman.d.ts +53 -58
- package/lib/classes/pacman.js +512 -431
- package/lib/classes/pve-live.js +6 -6
- package/lib/classes/settings.js +46 -55
- package/lib/classes/systemctl.d.ts +6 -6
- package/lib/classes/systemctl.js +7 -7
- package/lib/classes/tools.d.ts +1 -1
- package/lib/classes/tools.js +10 -10
- package/lib/classes/utils.d.ts +9 -12
- package/lib/classes/utils.js +127 -106
- package/lib/classes/xdg.js +94 -90
- package/lib/classes/yolk.js +36 -29
- package/lib/commands/adapt.d.ts +3 -3
- package/lib/commands/adapt.js +12 -12
- package/lib/commands/bro.d.ts +14 -0
- package/lib/commands/bro.js +31 -0
- package/lib/commands/calamares.d.ts +7 -7
- package/lib/commands/calamares.js +21 -46
- package/lib/commands/config.d.ts +5 -5
- package/lib/commands/config.js +68 -75
- package/lib/commands/dad.d.ts +5 -5
- package/lib/commands/dad.js +11 -11
- package/lib/commands/export/deb.d.ts +8 -8
- package/lib/commands/export/deb.js +16 -16
- package/lib/commands/export/docs.d.ts +2 -2
- package/lib/commands/export/docs.js +9 -9
- package/lib/commands/export/iso.d.ts +4 -4
- package/lib/commands/export/iso.js +12 -17
- package/lib/commands/info.d.ts +9 -3
- package/lib/commands/info.js +14 -164
- package/lib/commands/install.d.ts +4 -4
- package/lib/commands/install.js +19 -14
- package/lib/commands/kill.d.ts +3 -3
- package/lib/commands/kill.js +11 -13
- package/lib/commands/mom.d.ts +2 -2
- package/lib/commands/mom.js +8 -8
- package/lib/commands/produce.d.ts +14 -14
- package/lib/commands/produce.js +42 -45
- package/lib/commands/remove.d.ts +5 -5
- package/lib/commands/remove.js +46 -57
- package/lib/commands/tools/clean.d.ts +3 -3
- package/lib/commands/tools/clean.js +10 -12
- package/lib/commands/tools/locales.d.ts +4 -4
- package/lib/commands/tools/locales.js +8 -8
- package/lib/commands/tools/skel.d.ts +4 -4
- package/lib/commands/tools/skel.js +10 -15
- package/lib/commands/tools/stat.d.ts +7 -4
- package/lib/commands/tools/stat.js +20 -13
- package/lib/commands/tools/yolk.d.ts +3 -3
- package/lib/commands/tools/yolk.js +12 -12
- package/lib/commands/update.d.ts +5 -10
- package/lib/commands/update.js +56 -72
- package/lib/components/elements/information.d.ts +4 -0
- package/lib/components/elements/information.js +166 -0
- package/lib/components/elements/steps.js +1 -1
- package/lib/components/elements/title.js +7 -10
- package/lib/components/finished.js +5 -5
- package/lib/components/install.js +5 -5
- package/lib/components/keyboard.js +5 -5
- package/lib/components/location.js +5 -5
- package/lib/components/network.js +5 -5
- package/lib/components/partitions.js +5 -5
- package/lib/components/summary.js +5 -5
- package/lib/components/users.js +6 -6
- package/lib/components/welcome.js +6 -6
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -2
- package/lib/interfaces/i-distro.d.ts +3 -2
- package/lib/interfaces/i-settings.d.ts +2 -2
- package/lib/lib/cli-autologin.d.ts +19 -2
- package/lib/lib/cli-autologin.js +114 -39
- package/lib/lib/dependencies.d.ts +9 -6
- package/lib/lib/dependencies.js +22 -13
- package/lib/lib/get_address.js +2 -2
- package/lib/lib/get_dns.js +2 -2
- package/lib/lib/get_domain.js +2 -2
- package/lib/lib/get_gateway.js +2 -2
- package/lib/lib/get_hostname.js +2 -2
- package/lib/lib/get_netmask.js +2 -2
- package/lib/lib/get_password.js +2 -2
- package/lib/lib/get_root_password.js +2 -2
- package/lib/lib/get_userfullname.js +2 -2
- package/lib/lib/get_username.js +2 -2
- package/lib/lib/select_address_type.js +2 -5
- package/lib/lib/select_filesystem_type.js +5 -14
- package/lib/lib/select_installation_device.js +3 -3
- package/lib/lib/select_interface.js +1 -1
- package/lib/lib/select_keyboard_layout.js +2 -10
- package/lib/lib/select_languages.js +2 -2
- package/lib/lib/select_regions.js +1 -12
- package/lib/lib/select_user_swap_choice.js +4 -4
- package/lib/lib/select_zones.js +483 -62
- package/oclif.manifest.json +1 -1
- package/package.json +115 -107
- package/scripts/bros/waydroid-helper.sh +92 -0
- package/scripts/eggs.bash +65 -35
- package/scripts/not-used/eggs-cleanup.sh +7 -0
- package/scripts/{install-eggs-ppa.sh → not-used/install-eggs-ppa.sh} +0 -0
- package/scripts/{mkinitramfs → not-used/mkinitramfs} +0 -0
- package/scripts/{pve-live.sh → not-used/pve-live.sh} +0 -0
- package/addons/eggs/theme/livecd/menu.template.cfg +0 -54
- package/addons/pve/theme/applications/penguins-pve.desktop +0 -24
- package/addons/pve/theme/calamares/branding/pve-logo.png +0 -0
- package/addons/pve/theme/calamares/branding/show.qml +0 -227
- package/addons/pve/theme/calamares/branding/slide1.png +0 -0
- package/addons/pve/theme/calamares/branding/slide2.png +0 -0
- package/addons/pve/theme/calamares/branding/slide3.png +0 -0
- package/addons/pve/theme/calamares/branding/slide4.png +0 -0
- package/addons/pve/theme/calamares/branding/slide5.png +0 -0
- package/addons/pve/theme/calamares/branding/slide6.png +0 -0
- package/addons/pve/theme/calamares/branding/slide7.png +0 -0
- package/addons/pve/theme/calamares/branding/slide8.png +0 -0
- package/addons/pve/theme/calamares/branding/slide9.png +0 -0
- package/addons/pve/theme/calamares/branding/welcome.png +0 -0
- package/addons/pve/theme/livecd/README.md +0 -8
- package/addons/pve/theme/livecd/grub.template.cfg +0 -60
- package/addons/pve/theme/livecd/menu.template.cfg +0 -54
- package/addons/pve/theme/livecd/splash.png +0 -0
- package/addons/ufficiozero/theme/artwork/install-debian.png +0 -0
- package/addons/ufficiozero/theme/livecd/README.md +0 -8
- package/addons/ufficiozero/theme/livecd/grub.template.cfg +0 -60
- package/addons/ufficiozero/theme/livecd/menu.template.cfg +0 -54
- package/changelog.md +0 -154
- package/conf/distros/bullseye/calamares/calamares-modules/bootloader-config/bootloader-config.sh +0 -28
- package/conf/distros/bullseye/calamares/calamares-modules/bootloader-config/module.yml +0 -8
- package/conf/distros/buster/grub/grub.template.cfg +0 -58
- package/conf/distros/buster/grub/loopback.cfg +0 -1
- package/conf/distros/buster/grub/theme.cfg +0 -42
- package/conf/distros/buster/isolinux/isolinux.template.cfg +0 -8
- package/conf/distros/buster/isolinux/menu.template.cfg +0 -56
- package/conf/distros/focal/grub/grub.template.cfg +0 -67
- package/conf/distros/focal/isolinux/menu.template.cfg +0 -54
- package/lib/classes/incubation/distros/beowulf.d.ts +0 -30
- package/lib/classes/incubation/distros/beowulf.js +0 -69
- package/lib/classes/krill_install_compare.d.ts +0 -200
- package/lib/classes/krill_install_compare.js +0 -1110
- package/manpages/doc/man/eggs.1.gz +0 -0
- package/scripts/python-minimal-deb/anti-python-minimal +0 -7
- package/scripts/python-minimal-deb/python-minimal_99_all.deb +0 -0
- package/scripts/python-minimal-deb/python-minimal_99_amd64.buildinfo +0 -168
- package/scripts/python-minimal-deb/python-minimal_99_amd64.changes +0 -25
package/lib/commands/produce.js
CHANGED
|
@@ -10,19 +10,19 @@ const tslib_1 = require("tslib");
|
|
|
10
10
|
* email: piero.proietti@gmail.com
|
|
11
11
|
* license: MIT
|
|
12
12
|
*/
|
|
13
|
-
const
|
|
14
|
-
const utils_1 = tslib_1.__importDefault(require("../classes/utils"));
|
|
15
|
-
const ovary_1 = tslib_1.__importDefault(require("../classes/ovary"));
|
|
16
|
-
const compressors_1 = tslib_1.__importDefault(require("../classes/compressors"));
|
|
17
|
-
const config_1 = tslib_1.__importDefault(require("./config"));
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const settings_1 = tslib_1.__importDefault(require("../classes/settings"));
|
|
22
|
-
class Produce extends
|
|
13
|
+
const core_1 = require("@oclif/core");
|
|
14
|
+
const utils_1 = (0, tslib_1.__importDefault)(require("../classes/utils"));
|
|
15
|
+
const ovary_1 = (0, tslib_1.__importDefault)(require("../classes/ovary"));
|
|
16
|
+
const compressors_1 = (0, tslib_1.__importDefault)(require("../classes/compressors"));
|
|
17
|
+
const config_1 = (0, tslib_1.__importDefault)(require("./config"));
|
|
18
|
+
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
19
|
+
const node_fs_1 = (0, tslib_1.__importDefault)(require("node:fs"));
|
|
20
|
+
const node_path_1 = (0, tslib_1.__importDefault)(require("node:path"));
|
|
21
|
+
const settings_1 = (0, tslib_1.__importDefault)(require("../classes/settings"));
|
|
22
|
+
class Produce extends core_1.Command {
|
|
23
23
|
async run() {
|
|
24
24
|
utils_1.default.titles(this.id + ' ' + this.argv);
|
|
25
|
-
const { flags } = this.parse(Produce);
|
|
25
|
+
const { flags } = await this.parse(Produce);
|
|
26
26
|
if (utils_1.default.isRoot(this.id)) {
|
|
27
27
|
/**
|
|
28
28
|
* ADDONS dei vendors
|
|
@@ -31,23 +31,23 @@ class Produce extends command_1.Command {
|
|
|
31
31
|
const addons = [];
|
|
32
32
|
if (flags.addons) {
|
|
33
33
|
const addons = flags.addons; // array
|
|
34
|
-
|
|
34
|
+
for (let addon of addons) {
|
|
35
35
|
// se non viene specificato il vendor il default è eggs
|
|
36
|
-
if (addon.
|
|
36
|
+
if (!addon.includes('//')) {
|
|
37
37
|
addon = 'eggs/' + addon;
|
|
38
38
|
}
|
|
39
|
-
const dirAddon =
|
|
40
|
-
if (!
|
|
39
|
+
const dirAddon = node_path_1.default.resolve(__dirname, `../../addons/${addon}`);
|
|
40
|
+
if (!node_fs_1.default.existsSync(dirAddon)) {
|
|
41
41
|
console.log(dirAddon);
|
|
42
|
-
utils_1.default.warning('addon: ' +
|
|
42
|
+
utils_1.default.warning('addon: ' + chalk_1.default.white(addon) + ' not found, terminate!');
|
|
43
43
|
process.exit();
|
|
44
44
|
}
|
|
45
|
-
const vendorAddon = addon.
|
|
45
|
+
const vendorAddon = addon.slice(0, Math.max(0, addon.search('/')));
|
|
46
46
|
const nameAddon = addon.substring(addon.search('/') + 1, addon.length);
|
|
47
47
|
if (nameAddon === 'theme') {
|
|
48
48
|
flags.theme = vendorAddon;
|
|
49
49
|
}
|
|
50
|
-
}
|
|
50
|
+
}
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
53
|
* composizione dei flag
|
|
@@ -64,7 +64,7 @@ class Produce extends command_1.Command {
|
|
|
64
64
|
* Analisi del tipo di compressione del kernel
|
|
65
65
|
*
|
|
66
66
|
*/
|
|
67
|
-
const compressors = new
|
|
67
|
+
const compressors = new compressors_1.default();
|
|
68
68
|
await compressors.populate();
|
|
69
69
|
let fastest = 'gzip';
|
|
70
70
|
if (compressors.isEnabled.zstd) {
|
|
@@ -101,10 +101,8 @@ class Produce extends command_1.Command {
|
|
|
101
101
|
theme = flags.theme;
|
|
102
102
|
}
|
|
103
103
|
const i = await config_1.default.thatWeNeed(verbose);
|
|
104
|
-
if (i.needApt || i.configurationInstall || i.configurationRefresh || i.distroTemplate) {
|
|
105
|
-
|
|
106
|
-
await config_1.default.install(i, verbose);
|
|
107
|
-
}
|
|
104
|
+
if ((i.needApt || i.configurationInstall || i.configurationRefresh || i.distroTemplate) && (await utils_1.default.customConfirm('Select yes to continue...'))) {
|
|
105
|
+
await config_1.default.install(i, verbose);
|
|
108
106
|
}
|
|
109
107
|
const myAddons = {};
|
|
110
108
|
if (flags.addons != undefined) {
|
|
@@ -133,30 +131,29 @@ class Produce extends command_1.Command {
|
|
|
133
131
|
}
|
|
134
132
|
exports.default = Produce;
|
|
135
133
|
Produce.flags = {
|
|
136
|
-
prefix:
|
|
137
|
-
basename:
|
|
138
|
-
backup:
|
|
139
|
-
fast:
|
|
140
|
-
normal:
|
|
141
|
-
max:
|
|
142
|
-
verbose:
|
|
143
|
-
yolk:
|
|
144
|
-
script:
|
|
145
|
-
help:
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
release: command_1.flags.boolean({ description: 'release: configure GUI installer to remove eggs and calamares after installation' }),
|
|
134
|
+
prefix: core_1.Flags.string({ char: 'p', description: 'prefix' }),
|
|
135
|
+
basename: core_1.Flags.string({ description: 'basename' }),
|
|
136
|
+
backup: core_1.Flags.boolean({ char: 'b', description: 'backup mode' }),
|
|
137
|
+
fast: core_1.Flags.boolean({ char: 'f', description: 'fast compression' }),
|
|
138
|
+
normal: core_1.Flags.boolean({ char: 'n', description: 'normal compression' }),
|
|
139
|
+
max: core_1.Flags.boolean({ char: 'm', description: 'max compression' }),
|
|
140
|
+
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' }),
|
|
141
|
+
yolk: core_1.Flags.boolean({ char: 'y', description: '-y force yolk renew' }),
|
|
142
|
+
script: core_1.Flags.boolean({ char: 's', description: 'script mode. Generate scripts to manage iso build' }),
|
|
143
|
+
help: core_1.Flags.help({ char: 'h' }),
|
|
144
|
+
theme: core_1.Flags.string({ description: 'theme for livecd, calamares branding and partitions' }),
|
|
145
|
+
addons: core_1.Flags.string({ multiple: true, description: 'addons to be used: adapt, ichoice, pve, rsupport' }),
|
|
146
|
+
release: core_1.Flags.boolean({ description: 'release: configure GUI installer to remove eggs and calamares after installation' })
|
|
150
147
|
};
|
|
151
148
|
Produce.description = 'the system produce an egg: iso image of your system';
|
|
152
149
|
Produce.aliases = ['spawn', 'lay'];
|
|
153
150
|
Produce.examples = [
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
151
|
+
'$ sudo eggs produce \nproduce an ISO called [hostname]-[arch]-YYYY-MM-DD_HHMM.iso, compressed xz (standard compression).\nIf hostname=ugo and arch=i386 ugo-x86-2020-08-25_1215.iso\n',
|
|
152
|
+
'$ sudo eggs produce -v\nsame as previuos, but with --verbose output\n',
|
|
153
|
+
'$ sudo eggs produce -vf\nsame as previuos, compression zstd, lz4 or gzip (depend from system capability)\n',
|
|
154
|
+
'$ sudo eggs produce -vm\nsame as previuos, compression xz -Xbcj x86 (max compression, about 10%\nmore compressed)\n',
|
|
155
|
+
'$ sudo eggs produce -vf --basename leo --theme debian --addons adapt \nproduce an ISO called leo-i386-2020-08-25_1215.iso compression fast,\nusing Debian theme and link to adapt\n',
|
|
156
|
+
'$ sudo eggs produce -v --basename leo --theme debian --addons rsupport \nproduce an ISO called leo-i386-2020-08-25_1215.iso compression xz,\nusing Debian theme and link to dwagent\n',
|
|
157
|
+
'$ sudo eggs produce -v --basename leo --rsupport \nproduce an ISO called leo-i386-2020-08-25_1215.iso compression xz, using eggs\ntheme and link to dwagent\n',
|
|
158
|
+
'$ sudo eggs produce -vs --basename leo --rsupport \nproduce scripts to build an ISO as the previus example. Scripts can be found\nin /home/eggs/ovarium and you can customize all you need\n'
|
|
162
159
|
];
|
package/lib/commands/remove.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* email: piero.proietti@gmail.com
|
|
5
5
|
* license: MIT
|
|
6
6
|
*/
|
|
7
|
-
import { Command } from '@oclif/
|
|
7
|
+
import { Command } from '@oclif/core';
|
|
8
8
|
/**
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
@@ -12,10 +12,10 @@ export default class Remove extends Command {
|
|
|
12
12
|
static description: string;
|
|
13
13
|
static examples: string[];
|
|
14
14
|
static flags: {
|
|
15
|
-
purge: import("@oclif/
|
|
16
|
-
autoremove: import("@oclif/
|
|
17
|
-
help: import("@oclif/
|
|
18
|
-
verbose: import("@oclif/
|
|
15
|
+
purge: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
autoremove: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
17
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
18
|
+
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
19
19
|
};
|
|
20
20
|
run(): Promise<void>;
|
|
21
21
|
}
|
package/lib/commands/remove.js
CHANGED
|
@@ -7,86 +7,75 @@ const tslib_1 = require("tslib");
|
|
|
7
7
|
* email: piero.proietti@gmail.com
|
|
8
8
|
* license: MIT
|
|
9
9
|
*/
|
|
10
|
-
const
|
|
11
|
-
const utils_1 = tslib_1.__importDefault(require("../classes/utils"));
|
|
12
|
-
const pacman_1 = tslib_1.__importDefault(require("../classes/pacman"));
|
|
13
|
-
const
|
|
14
|
-
const exec = require('../lib/utils').exec;
|
|
10
|
+
const core_1 = require("@oclif/core");
|
|
11
|
+
const utils_1 = (0, tslib_1.__importDefault)(require("../classes/utils"));
|
|
12
|
+
const pacman_1 = (0, tslib_1.__importDefault)(require("../classes/pacman"));
|
|
13
|
+
const node_child_process_1 = require("node:child_process");
|
|
15
14
|
/**
|
|
16
15
|
*
|
|
17
16
|
*/
|
|
18
|
-
class Remove extends
|
|
17
|
+
class Remove extends core_1.Command {
|
|
19
18
|
async run() {
|
|
20
19
|
utils_1.default.titles(this.id + ' ' + this.argv);
|
|
21
|
-
const { flags } = this.parse(Remove);
|
|
20
|
+
const { flags } = await this.parse(Remove);
|
|
22
21
|
let verbose = false;
|
|
23
22
|
if (flags.verbose) {
|
|
24
23
|
verbose = true;
|
|
25
24
|
}
|
|
26
25
|
if (utils_1.default.isRoot()) {
|
|
27
|
-
|
|
26
|
+
/**
|
|
27
|
+
* debian package
|
|
28
|
+
*/
|
|
29
|
+
if (utils_1.default.isDebPackage() && (await utils_1.default.customConfirm())) {
|
|
28
30
|
/**
|
|
29
|
-
*
|
|
31
|
+
* in caso di autoremove, tolgo le dipendenze di versione PRIMA di eggs, altrimenti si inchioda
|
|
30
32
|
*/
|
|
31
|
-
if (
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
if (flags.autoremove) {
|
|
34
|
+
/**
|
|
35
|
+
* Rimozione dipendenze da versione live-config / open-infrastructure-system-config (ubuntu bionic)
|
|
36
|
+
*/
|
|
37
|
+
if (pacman_1.default.packageIsInstalled('open-infrastructure-system-config')) {
|
|
38
|
+
(0, node_child_process_1.execSync)('apt-get purge open-infrastructure-system-config --yes');
|
|
34
39
|
}
|
|
35
|
-
else {
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
if (flags.autoremove) {
|
|
39
|
-
child_process_1.execSync('apt-get autoremove --yes');
|
|
40
|
+
else if (pacman_1.default.packageIsInstalled('live-config')) {
|
|
41
|
+
(0, node_child_process_1.execSync)('apt-get purge live-config --yes');
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
if (flags.purge) {
|
|
52
|
-
await pacman_1.default.configurationRemove();
|
|
53
|
-
}
|
|
54
|
-
utils_1.default.warning('You are using eggs as sources. I\'ll NOT remove it');
|
|
44
|
+
if (flags.purge) {
|
|
45
|
+
(0, node_child_process_1.execSync)('apt-get purge eggs --yes');
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
(0, node_child_process_1.execSync)('apt-get remove eggs --yes');
|
|
49
|
+
}
|
|
50
|
+
if (flags.autoremove) {
|
|
51
|
+
(0, node_child_process_1.execSync)('apt-get autoremove --yes');
|
|
55
52
|
}
|
|
56
53
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
//
|
|
67
|
-
|
|
68
|
-
//
|
|
69
|
-
|
|
70
|
-
// purge configurations files
|
|
71
|
-
if (flags.purge) {
|
|
72
|
-
await pacman_1.default.configurationRemove();
|
|
73
|
-
}
|
|
74
|
-
// Rimuove eggs
|
|
75
|
-
child_process_1.execSync('npm remove penguins-eggs -g');
|
|
54
|
+
/**
|
|
55
|
+
* sources
|
|
56
|
+
*/
|
|
57
|
+
if (utils_1.default.isSources() && (await utils_1.default.customConfirm())) {
|
|
58
|
+
if (flags.autoremove) {
|
|
59
|
+
// await Pacman.prerequisitesRemove()
|
|
60
|
+
}
|
|
61
|
+
if (flags.purge) {
|
|
62
|
+
await pacman_1.default.configurationRemove();
|
|
63
|
+
// eggs completion
|
|
64
|
+
(0, node_child_process_1.execSync)('rm -f /etc/bash_completion.d/eggs.bash');
|
|
65
|
+
// manpages
|
|
66
|
+
(0, node_child_process_1.execSync)('rm -f /usr/share/man/man1/eggs.1.gz');
|
|
76
67
|
}
|
|
68
|
+
utils_1.default.warning("You are using eggs as sources. I'll NOT remove it");
|
|
77
69
|
}
|
|
78
70
|
}
|
|
79
71
|
}
|
|
80
72
|
}
|
|
81
73
|
exports.default = Remove;
|
|
82
74
|
Remove.description = 'remove eggs and others stuff';
|
|
83
|
-
Remove.examples = [
|
|
84
|
-
`$ sudo eggs remove \nremove eggs\n`,
|
|
85
|
-
`$ sudo eggs remove --purge \nremove eggs, eggs configurations, packages prerequisites\n`,
|
|
86
|
-
];
|
|
75
|
+
Remove.examples = ['$ sudo eggs remove \nremove eggs\n', "$ sudo eggs remove --purge \nremove eggs, eggs configurations, configuration's files\n", '$ sudo eggs remove --autoremove \nremove eggs, eggs configurations, packages dependencies\n'];
|
|
87
76
|
Remove.flags = {
|
|
88
|
-
purge:
|
|
89
|
-
autoremove:
|
|
90
|
-
help:
|
|
91
|
-
verbose:
|
|
77
|
+
purge: core_1.Flags.boolean({ char: 'p', description: 'remove eggs configurations files' }),
|
|
78
|
+
autoremove: core_1.Flags.boolean({ char: 'a', description: 'remove eggs packages dependencies' }),
|
|
79
|
+
help: core_1.Flags.help({ char: 'h' }),
|
|
80
|
+
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
92
81
|
};
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* email: piero.proietti@gmail.com
|
|
5
5
|
* license: MIT
|
|
6
6
|
*/
|
|
7
|
-
import { Command } from '@oclif/
|
|
7
|
+
import { Command } from '@oclif/core';
|
|
8
8
|
export default class Clean extends Command {
|
|
9
9
|
static description: string;
|
|
10
10
|
static aliases: string[];
|
|
11
11
|
static flags: {
|
|
12
|
-
help: import("@oclif/
|
|
13
|
-
verbose: import("@oclif/
|
|
12
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
13
|
+
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
14
|
};
|
|
15
15
|
run(): Promise<void>;
|
|
16
16
|
}
|
|
@@ -7,22 +7,20 @@ const tslib_1 = require("tslib");
|
|
|
7
7
|
* email: piero.proietti@gmail.com
|
|
8
8
|
* license: MIT
|
|
9
9
|
*/
|
|
10
|
-
const
|
|
11
|
-
const utils_1 = tslib_1.__importDefault(require("../../classes/utils"));
|
|
12
|
-
const bleach_1 = tslib_1.__importDefault(require("../../classes/bleach"));
|
|
13
|
-
class Clean extends
|
|
10
|
+
const core_1 = require("@oclif/core");
|
|
11
|
+
const utils_1 = (0, tslib_1.__importDefault)(require("../../classes/utils"));
|
|
12
|
+
const bleach_1 = (0, tslib_1.__importDefault)(require("../../classes/bleach"));
|
|
13
|
+
class Clean extends core_1.Command {
|
|
14
14
|
async run() {
|
|
15
|
-
const { flags } = this.parse(Clean);
|
|
15
|
+
const { flags } = await this.parse(Clean);
|
|
16
16
|
utils_1.default.titles(this.id + ' ' + this.argv);
|
|
17
17
|
let verbose = false;
|
|
18
18
|
if (flags.verbose) {
|
|
19
19
|
verbose = true;
|
|
20
20
|
}
|
|
21
|
-
if (utils_1.default.isRoot()) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
bleach.clean(verbose);
|
|
25
|
-
}
|
|
21
|
+
if (utils_1.default.isRoot() && (await utils_1.default.customConfirm('Select yes to continue...'))) {
|
|
22
|
+
const bleach = new bleach_1.default();
|
|
23
|
+
bleach.clean(verbose);
|
|
26
24
|
}
|
|
27
25
|
}
|
|
28
26
|
}
|
|
@@ -30,6 +28,6 @@ exports.default = Clean;
|
|
|
30
28
|
Clean.description = 'clean system log, apt, etc';
|
|
31
29
|
Clean.aliases = ['clean'];
|
|
32
30
|
Clean.flags = {
|
|
33
|
-
help:
|
|
34
|
-
verbose:
|
|
31
|
+
help: core_1.Flags.help({ char: 'h' }),
|
|
32
|
+
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
35
33
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Command } from '@oclif/
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
4
|
*/
|
|
5
5
|
export default class Locales extends Command {
|
|
6
6
|
static description: string;
|
|
7
7
|
static flags: {
|
|
8
|
-
help: import("@oclif/
|
|
9
|
-
reinstall: import("@oclif/
|
|
10
|
-
verbose: import("@oclif/
|
|
8
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
9
|
+
reinstall: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
11
|
};
|
|
12
12
|
run(): Promise<void>;
|
|
13
13
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const
|
|
5
|
-
const utils_1 = tslib_1.__importDefault(require("../../classes/utils"));
|
|
6
|
-
const i18n_1 = tslib_1.__importDefault(require("../../classes/i18n"));
|
|
4
|
+
const core_1 = require("@oclif/core");
|
|
5
|
+
const utils_1 = (0, tslib_1.__importDefault)(require("../../classes/utils"));
|
|
6
|
+
const i18n_1 = (0, tslib_1.__importDefault)(require("../../classes/i18n"));
|
|
7
7
|
/**
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
class Locales extends
|
|
10
|
+
class Locales extends core_1.Command {
|
|
11
11
|
async run() {
|
|
12
12
|
utils_1.default.titles(this.id + ' ' + this.argv);
|
|
13
|
-
const { args, flags } = this.parse(Locales);
|
|
13
|
+
const { args, flags } = await this.parse(Locales);
|
|
14
14
|
let verbose = false;
|
|
15
15
|
if (flags.verbose) {
|
|
16
16
|
verbose = true;
|
|
@@ -29,7 +29,7 @@ class Locales extends command_1.Command {
|
|
|
29
29
|
exports.default = Locales;
|
|
30
30
|
Locales.description = 'install/clean locales';
|
|
31
31
|
Locales.flags = {
|
|
32
|
-
help:
|
|
33
|
-
reinstall:
|
|
34
|
-
verbose:
|
|
32
|
+
help: core_1.Flags.help({ char: 'h' }),
|
|
33
|
+
reinstall: core_1.Flags.boolean({ char: 'r', description: 'reinstall locales' }),
|
|
34
|
+
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
35
35
|
};
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
* email: piero.proietti@gmail.com
|
|
5
5
|
* license: MIT
|
|
6
6
|
*/
|
|
7
|
-
import { Command
|
|
7
|
+
import { Command } from '@oclif/core';
|
|
8
8
|
export default class Skel extends Command {
|
|
9
9
|
static description: string;
|
|
10
10
|
static aliases: string[];
|
|
11
11
|
static examples: string[];
|
|
12
12
|
static flags: {
|
|
13
|
-
help: import("@oclif/
|
|
14
|
-
user:
|
|
15
|
-
verbose: import("@oclif/
|
|
13
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
14
|
+
user: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
15
|
+
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
16
|
};
|
|
17
17
|
run(): Promise<void>;
|
|
18
18
|
}
|
|
@@ -7,30 +7,25 @@ const tslib_1 = require("tslib");
|
|
|
7
7
|
* email: piero.proietti@gmail.com
|
|
8
8
|
* license: MIT
|
|
9
9
|
*/
|
|
10
|
-
const
|
|
11
|
-
const utils_1 = tslib_1.__importDefault(require("../../classes/utils"));
|
|
10
|
+
const core_1 = require("@oclif/core");
|
|
11
|
+
const utils_1 = (0, tslib_1.__importDefault)(require("../../classes/utils"));
|
|
12
12
|
const fs = require("fs");
|
|
13
|
-
const xdg_1 = tslib_1.__importDefault(require("../../classes/xdg"));
|
|
14
|
-
class Skel extends
|
|
13
|
+
const xdg_1 = (0, tslib_1.__importDefault)(require("../../classes/xdg"));
|
|
14
|
+
class Skel extends core_1.Command {
|
|
15
15
|
async run() {
|
|
16
16
|
utils_1.default.titles(this.id + ' ' + this.argv);
|
|
17
|
-
const { flags } = this.parse(Skel);
|
|
17
|
+
const { flags } = await this.parse(Skel);
|
|
18
18
|
let verbose = false;
|
|
19
19
|
if (flags.verbose) {
|
|
20
20
|
verbose = true;
|
|
21
21
|
}
|
|
22
22
|
let user = '';
|
|
23
|
-
|
|
24
|
-
user = flags.user;
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
user = utils_1.default.getPrimaryUser();
|
|
28
|
-
}
|
|
23
|
+
user = flags.user ? flags.user : utils_1.default.getPrimaryUser();
|
|
29
24
|
utils_1.default.warning(`user: ${user}`);
|
|
30
25
|
const homeSource = `/home/${user}`;
|
|
31
26
|
if (!fs.existsSync(homeSource)) {
|
|
32
27
|
utils_1.default.error(`User ${user} not exist or not exist a proper home`);
|
|
33
|
-
utils_1.default.warning(
|
|
28
|
+
utils_1.default.warning('terminate');
|
|
34
29
|
process.exit(0);
|
|
35
30
|
}
|
|
36
31
|
if (utils_1.default.isRoot()) {
|
|
@@ -47,7 +42,7 @@ Skel.examples = [
|
|
|
47
42
|
desktop configuration of user mauro will get used as default`
|
|
48
43
|
];
|
|
49
44
|
Skel.flags = {
|
|
50
|
-
help:
|
|
51
|
-
user:
|
|
52
|
-
verbose:
|
|
45
|
+
help: core_1.Flags.help({ char: 'h' }),
|
|
46
|
+
user: core_1.Flags.string({ char: 'u', description: 'user to be used' }),
|
|
47
|
+
verbose: core_1.Flags.boolean({ char: 'v' })
|
|
53
48
|
};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { Command } from '@oclif/
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
2
5
|
export default class ToolsStat extends Command {
|
|
3
6
|
static description: string;
|
|
4
7
|
static flags: {
|
|
5
|
-
help: import("@oclif/
|
|
6
|
-
month: import("@oclif/
|
|
7
|
-
year: import("@oclif/
|
|
8
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
9
|
+
month: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
year: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
11
|
};
|
|
9
12
|
static aliases: string[];
|
|
10
13
|
run(): Promise<void>;
|
|
@@ -1,20 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const
|
|
5
|
-
const utils_1 = tslib_1.__importDefault(require("../../classes/utils"));
|
|
6
|
-
const
|
|
7
|
-
|
|
4
|
+
const core_1 = require("@oclif/core");
|
|
5
|
+
const utils_1 = (0, tslib_1.__importDefault)(require("../../classes/utils"));
|
|
6
|
+
const axios_1 = (0, tslib_1.__importDefault)(require("axios"));
|
|
7
|
+
const node_https_1 = (0, tslib_1.__importDefault)(require("node:https"));
|
|
8
|
+
const agent = new node_https_1.default.Agent({
|
|
9
|
+
rejectUnauthorized: false
|
|
10
|
+
});
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
class ToolsStat extends core_1.Command {
|
|
8
15
|
async run() {
|
|
9
|
-
const { args, flags } = this.parse(ToolsStat);
|
|
16
|
+
const { args, flags } = await this.parse(ToolsStat);
|
|
10
17
|
utils_1.default.titles(this.id + ' ' + this.argv);
|
|
11
18
|
const yesterday = new Date();
|
|
12
19
|
yesterday.setDate(yesterday.getDate() - 1);
|
|
13
20
|
// current date
|
|
14
21
|
// adjust 0 before single digit date
|
|
15
|
-
const day = (
|
|
22
|
+
const day = ('0' + yesterday.getDate()).slice(-2);
|
|
16
23
|
// current month
|
|
17
|
-
const month = (
|
|
24
|
+
const month = ('0' + (yesterday.getMonth() + 1)).slice(-2);
|
|
18
25
|
// current year
|
|
19
26
|
const year = yesterday.getFullYear();
|
|
20
27
|
const end = year + '-' + month + '-' + day;
|
|
@@ -34,18 +41,18 @@ class ToolsStat extends command_1.Command {
|
|
|
34
41
|
const request = '?start_date=' + start + '&end_date=' + end;
|
|
35
42
|
url += request;
|
|
36
43
|
console.log(type);
|
|
37
|
-
const axios = require('axios').default
|
|
38
|
-
const res = await
|
|
44
|
+
// const axios = require('axios').default
|
|
45
|
+
const res = await axios_1.default.get(url, { httpsAgent: agent });
|
|
39
46
|
const data = res.data;
|
|
40
47
|
console.log(data.countries);
|
|
41
|
-
//console.log(yaml.dump(data))
|
|
48
|
+
// console.log(yaml.dump(data))
|
|
42
49
|
}
|
|
43
50
|
}
|
|
44
51
|
exports.default = ToolsStat;
|
|
45
52
|
ToolsStat.description = 'get statistics from sourceforge';
|
|
46
53
|
ToolsStat.flags = {
|
|
47
|
-
help:
|
|
48
|
-
month:
|
|
49
|
-
year:
|
|
54
|
+
help: core_1.Flags.help({ char: 'h' }),
|
|
55
|
+
month: core_1.Flags.boolean({ char: 'm', description: 'current month' }),
|
|
56
|
+
year: core_1.Flags.boolean({ char: 'y', description: 'current year' })
|
|
50
57
|
};
|
|
51
58
|
ToolsStat.aliases = ['stat'];
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* email: piero.proietti@gmail.com
|
|
5
5
|
* license: MIT
|
|
6
6
|
*/
|
|
7
|
-
import { Command } from '@oclif/
|
|
7
|
+
import { Command } from '@oclif/core';
|
|
8
8
|
/**
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
@@ -12,8 +12,8 @@ export default class DevYolk extends Command {
|
|
|
12
12
|
static description: string;
|
|
13
13
|
static examples: string[];
|
|
14
14
|
static flags: {
|
|
15
|
-
help: import("@oclif/
|
|
16
|
-
verbose: import("@oclif/
|
|
15
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
16
|
+
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
17
17
|
};
|
|
18
18
|
static dir: string;
|
|
19
19
|
/**
|
|
@@ -7,28 +7,28 @@ const tslib_1 = require("tslib");
|
|
|
7
7
|
* email: piero.proietti@gmail.com
|
|
8
8
|
* license: MIT
|
|
9
9
|
*/
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const utils_1 = tslib_1.__importDefault(require("../../classes/utils"));
|
|
14
|
-
const yolk_1 = tslib_1.__importDefault(require("../../classes/yolk"));
|
|
10
|
+
const core_1 = require("@oclif/core");
|
|
11
|
+
const shelljs_1 = (0, tslib_1.__importDefault)(require("shelljs"));
|
|
12
|
+
const node_fs_1 = (0, tslib_1.__importDefault)(require("node:fs"));
|
|
13
|
+
const utils_1 = (0, tslib_1.__importDefault)(require("../../classes/utils"));
|
|
14
|
+
const yolk_1 = (0, tslib_1.__importDefault)(require("../../classes/yolk"));
|
|
15
15
|
/**
|
|
16
16
|
*
|
|
17
17
|
*/
|
|
18
|
-
class DevYolk extends
|
|
18
|
+
class DevYolk extends core_1.Command {
|
|
19
19
|
/**
|
|
20
20
|
*
|
|
21
21
|
*/
|
|
22
22
|
async run() {
|
|
23
23
|
utils_1.default.titles(this.id + ' ' + this.argv);
|
|
24
|
-
const { flags } = this.parse(DevYolk);
|
|
24
|
+
const { flags } = await this.parse(DevYolk);
|
|
25
25
|
let verbose = false;
|
|
26
26
|
if (flags.verbose) {
|
|
27
27
|
verbose = true;
|
|
28
28
|
}
|
|
29
29
|
if (utils_1.default.isRoot()) {
|
|
30
|
-
if (
|
|
31
|
-
|
|
30
|
+
if (node_fs_1.default.existsSync(DevYolk.dir)) {
|
|
31
|
+
shelljs_1.default.exec(`rm ${DevYolk.dir} -rf `);
|
|
32
32
|
}
|
|
33
33
|
const yolk = new yolk_1.default();
|
|
34
34
|
await yolk.create(verbose);
|
|
@@ -37,9 +37,9 @@ class DevYolk extends command_1.Command {
|
|
|
37
37
|
}
|
|
38
38
|
exports.default = DevYolk;
|
|
39
39
|
DevYolk.description = 'configure eggs to install without internet';
|
|
40
|
-
DevYolk.examples = [
|
|
40
|
+
DevYolk.examples = ['$ eggs yolk -v'];
|
|
41
41
|
DevYolk.flags = {
|
|
42
|
-
help:
|
|
43
|
-
verbose:
|
|
42
|
+
help: core_1.Flags.help({ char: 'h' }),
|
|
43
|
+
verbose: core_1.Flags.boolean({ char: 'v' })
|
|
44
44
|
};
|
|
45
45
|
DevYolk.dir = '/usr/local/yolk';
|