penguins-eggs 9.0.48 → 9.1.10

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 (60) hide show
  1. package/README.md +81 -47
  2. package/assets/leaves.svg +1 -0
  3. package/assets/live-installer/com.github.pieroproietti.penguins-eggs.policy +25 -0
  4. package/assets/live-installer/filesystem.packages-remove +49 -0
  5. package/assets/penguins-live-installer.desktop +27 -0
  6. package/lib/classes/daddy.js +22 -22
  7. package/lib/classes/distro.d.ts +1 -1
  8. package/lib/classes/distro.js +1 -1
  9. package/lib/classes/family/debian.d.ts +4 -0
  10. package/lib/classes/family/debian.js +7 -0
  11. package/lib/classes/ovary.d.ts +6 -0
  12. package/lib/classes/ovary.js +21 -7
  13. package/lib/classes/settings.js +3 -4
  14. package/lib/classes/sources_list.d.ts +27 -0
  15. package/lib/classes/sources_list.js +103 -0
  16. package/lib/classes/tailor.d.ts +25 -4
  17. package/lib/classes/tailor.js +225 -329
  18. package/lib/classes/utils.d.ts +10 -0
  19. package/lib/classes/utils.js +31 -11
  20. package/lib/classes/xdg.d.ts +2 -1
  21. package/lib/classes/xdg.js +47 -106
  22. package/lib/commands/config.js +4 -2
  23. package/lib/commands/info.js +1 -1
  24. package/lib/commands/update.d.ts +0 -2
  25. package/lib/commands/update.js +3 -52
  26. package/lib/commands/wardrobe/get.d.ts +17 -0
  27. package/lib/commands/wardrobe/get.js +43 -0
  28. package/lib/commands/wardrobe/ironing.d.ts +6 -5
  29. package/lib/commands/wardrobe/ironing.js +80 -78
  30. package/lib/commands/wardrobe/list.d.ts +5 -1
  31. package/lib/commands/wardrobe/list.js +46 -11
  32. package/lib/commands/wardrobe/show.d.ts +5 -1
  33. package/lib/commands/wardrobe/show.js +36 -20
  34. package/lib/commands/wardrobe/wear.d.ts +10 -1
  35. package/lib/commands/wardrobe/wear.js +54 -17
  36. package/lib/components/elements/information.js +23 -19
  37. package/lib/components/elements/title.js +4 -3
  38. package/lib/components/finished.js +1 -0
  39. package/lib/components/network.js +1 -0
  40. package/lib/components/welcome.js +2 -2
  41. package/lib/interfaces/i-costume.d.ts +4 -20
  42. package/lib/interfaces/i-materia.d.ts +32 -0
  43. package/lib/interfaces/i-materia.js +2 -0
  44. package/lib/interfaces/index.d.ts +1 -0
  45. package/oclif.manifest.json +1 -1
  46. package/package.json +17 -19
  47. package/scripts/_eggs +23 -19
  48. package/scripts/eggs.bash +7 -6
  49. package/scripts/mom-cli.sh +66 -0
  50. package/scripts/resy.sh +1 -1
  51. package/assets/penguins-clinstaller.desktop +0 -24
  52. package/assets/penguins-minstall.desktop +0 -95
  53. package/lib/classes/basket.d.ts +0 -22
  54. package/lib/classes/basket.js +0 -114
  55. package/wardrobe.d/external.yml +0 -7
  56. package/wardrobe.d/hen/control.template +0 -10
  57. package/wardrobe.d/hen/index.yml +0 -212
  58. package/wardrobe.d/kde/index.yml +0 -41
  59. package/wardrobe.d/lamp/index.yml +0 -35
  60. package/wardrobe.d/xfce4/index.yml +0 -53
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ /**
3
+ * penguins-eggs: tailor.ts
4
+ * author: Piero Proietti
5
+ * mail: piero.proietti@gmail.com
6
+ *
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ const tslib_1 = require("tslib");
10
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
11
+ const utils_1 = tslib_1.__importDefault(require("./utils"));
12
+ const utils_2 = require("../lib/utils");
13
+ const distro_1 = tslib_1.__importDefault(require("./distro"));
14
+ /**
15
+ *
16
+ */
17
+ class SourcesList {
18
+ /**
19
+ *
20
+ * @param repos
21
+ * @returns
22
+ */
23
+ async distribution(distributions) {
24
+ /**
25
+ * Linuxmint non ha nessuna configurazione in /etc/apt/sources.list
26
+ */
27
+ let checked = true;
28
+ const repos = await this.get();
29
+ if (repos.length !== 0) {
30
+ checked = false;
31
+ const distro = new distro_1.default();
32
+ for (const distribution of distributions) {
33
+ for (const repo of repos) {
34
+ if (repo.includes(distro.codenameLikeId)) {
35
+ checked = true;
36
+ }
37
+ }
38
+ }
39
+ if (!checked) {
40
+ console.log('You are on: ' + chalk_1.default.green(distro.distroId) + '/' + chalk_1.default.green(distro.codenameId));
41
+ console.log('compatible with: ' + chalk_1.default.green(distro.distroLike) + '/' + chalk_1.default.green(distro.codenameLikeId));
42
+ console.log(`This costume/accessory apply to: `);
43
+ for (const distribution of distributions) {
44
+ console.log(`- ${distribution}`);
45
+ }
46
+ utils_1.default.pressKeyToExit('distribution warning, check your /etc/apt/sources.list', true);
47
+ }
48
+ }
49
+ return checked;
50
+ }
51
+ /**
52
+ *
53
+ * @param repos
54
+ * @returns
55
+ */
56
+ async components(components) {
57
+ /**
58
+ * Linuxmint non ha nessuna configurazione in /etc/apt/sources.list
59
+ */
60
+ let checked = true;
61
+ const repos = await this.get();
62
+ if (repos.length !== 0) {
63
+ for (const repo of repos) {
64
+ for (const component of components) {
65
+ // On security we need just main
66
+ if (!repo.includes('security')) {
67
+ if (!repo.includes(component)) {
68
+ console.log('component: ' + chalk_1.default.green(component) + ' is not included in repo: ' + chalk_1.default.green(repo));
69
+ checked = false;
70
+ }
71
+ }
72
+ }
73
+ }
74
+ if (checked) {
75
+ utils_1.default.warning('repositories checked');
76
+ }
77
+ else {
78
+ utils_1.default.pressKeyToExit('component warning, check your /etc/apt/sources.list', true);
79
+ }
80
+ }
81
+ return checked;
82
+ }
83
+ /**
84
+ *
85
+ */
86
+ async get() {
87
+ // deb uri distribution [component1] [component2] [...]
88
+ let checkRepos = await (0, utils_2.exec)(`grep "deb http"</etc/apt/sources.list`, { echo: false, capture: true });
89
+ let tmp = [];
90
+ if (checkRepos.code === 0) {
91
+ tmp = checkRepos.data.split('\n');
92
+ }
93
+ // remove empty line
94
+ let repos = [];
95
+ for (const repo of tmp) {
96
+ if (repo !== '') {
97
+ repos.push(repo);
98
+ }
99
+ }
100
+ return repos;
101
+ }
102
+ }
103
+ exports.default = SourcesList;
@@ -1,4 +1,10 @@
1
- import { ICostume } from '../interfaces';
1
+ /**
2
+ * penguins-eggs: tailor.ts
3
+ * author: Piero Proietti
4
+ * mail: piero.proietti@gmail.com
5
+ *
6
+ */
7
+ import { IMateria } from '../interfaces';
2
8
  /**
3
9
  *
4
10
  */
@@ -7,14 +13,29 @@ export default class Tailor {
7
13
  private echo;
8
14
  private costume;
9
15
  private wardrobe;
10
- materials: ICostume;
11
- constructor(wardrobe: string, costume: string, verbose?: boolean);
16
+ materials: IMateria;
17
+ /**
18
+ * @param wardrobe
19
+ * @param costume
20
+ */
21
+ constructor(costume: string);
12
22
  /**
13
23
  *
14
24
  */
15
- prepare(verbose?: boolean): Promise<void>;
25
+ prepare(verbose?: boolean, no_accessories?: boolean): Promise<void>;
26
+ /**
27
+ * - check if every package if installed
28
+ * - if find any packages to install
29
+ * - install packages
30
+ */
31
+ helper(packages: string[], comment?: string, cmd?: string): Promise<void>;
16
32
  /**
17
33
  * hostname and hosts
18
34
  */
19
35
  private hostname;
36
+ /**
37
+ *
38
+ * @param command
39
+ */
40
+ titles(command?: string): void;
20
41
  }