antelope-cli 1.2.3 → 1.2.5

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 (37) hide show
  1. package/ansible/onboarding-ca/README.md +105 -105
  2. package/ansible/onboarding-ca/onboard-ca.yml +43 -51
  3. package/ansible/onboarding-ca/requirements.yml +8 -8
  4. package/ansible/onboarding-ca/roles/onboard_ca/defaults/main.yml +77 -49
  5. package/ansible/onboarding-ca/roles/onboard_ca/meta/main.yml +10 -10
  6. package/ansible/onboarding-ca/roles/onboard_ca/tasks/main.yml +311 -193
  7. package/ansible/onboarding-ca/roles/onboard_ca/tasks/per_branch.yml +114 -107
  8. package/ansible/onboarding-ca/roles/onboard_ca/vars/main.yml +9 -9
  9. package/ansible/onboarding-crm/README.md +107 -0
  10. package/ansible/onboarding-crm/onboard-crm.yml +57 -0
  11. package/ansible/onboarding-crm/requirements.yml +8 -0
  12. package/ansible/onboarding-crm/roles/onboard_crm/defaults/main.yml +98 -0
  13. package/ansible/onboarding-crm/roles/onboard_crm/meta/main.yml +10 -0
  14. package/ansible/onboarding-crm/roles/onboard_crm/tasks/main.yml +357 -0
  15. package/ansible/onboarding-crm/roles/onboard_crm/tasks/per_branch.yml +138 -0
  16. package/ansible/onboarding-crm/roles/onboard_crm/vars/main.yml +9 -0
  17. package/index.js +12 -12
  18. package/onboarding/brand.js +21 -21
  19. package/onboarding/createConfig.js +71 -71
  20. package/onboarding/favicon.js +24 -24
  21. package/onboarding/index.js +62 -62
  22. package/onboarding/logo.js +16 -16
  23. package/onboarding/themes.js +92 -92
  24. package/onboarding/translations.js +41 -41
  25. package/onboarding/variablesColors.js +58 -58
  26. package/onboarding-ca/brand.js +13 -13
  27. package/onboarding-ca/index.js +94 -94
  28. package/onboarding-ca/riskDisclaimer.js +27 -27
  29. package/onboarding-ca/scss.js +24 -24
  30. package/onboarding-ca/templates/risk-disclaimer.html +12 -12
  31. package/onboarding-crm/brand.js +22 -22
  32. package/onboarding-crm/brandLogos.js +31 -0
  33. package/onboarding-crm/createConfig.js +47 -40
  34. package/onboarding-crm/index.js +181 -171
  35. package/onboarding-crm/themes.js +92 -92
  36. package/onboarding-crm/variablesColors.js +53 -53
  37. package/package.json +30 -30
@@ -1,53 +1,53 @@
1
- const fs = require('fs');
2
- const brandModule = require('./brand.js');
3
- const chalk = require('chalk');
4
- const variablesColorsPath = 'src/ng1/assets/css/sass/variables-colors.scss';
5
- const defaultColor = '$corp';
6
-
7
- // Same edits as onboarding/variablesColors.js, driven by resolved brand state (no prompts).
8
- function start() {
9
- return new Promise((resolve, reject) => {
10
- try {
11
- const { connectedBrandName, color: hexColor } = brandModule.getBrand();
12
- let data = fs.readFileSync(variablesColorsPath, 'utf8');
13
-
14
- // Check if $colors map exists in the file
15
- const colorsRegex = /\$colors:\s*\(([\s\S]*?)\)/;
16
- const match = data.match(colorsRegex);
17
- if (match) {
18
- const colorsMap = match[1];
19
-
20
- const newColorsMap = `$colors: (${colorsMap.replace(/\s*$/, '')},\n '${connectedBrandName}': ${
21
- hexColor ? '$' + connectedBrandName : defaultColor
22
- }\n)`;
23
-
24
- // Replace the $colors map in the file with the new one
25
- data = data.replace(colorsRegex, newColorsMap);
26
- } else {
27
- return reject('Error: Could not find $colors map in the file');
28
- }
29
-
30
- const brandVar = `\$${connectedBrandName}: (
31
- 'lighten-5': lighten(${hexColor}, 25%),
32
- 'lighten-4': lighten(${hexColor}, 20%),
33
- 'lighten-3': lighten(${hexColor}, 15%),
34
- 'lighten-2': lighten(${hexColor}, 10%),
35
- 'lighten-1': lighten(${hexColor}, 5%),
36
- 'base': ${hexColor},
37
- 'darken-1': darken(${hexColor}, 5%),
38
- 'darken-2': darken(${hexColor}, 10%),
39
- 'darken-3': darken(${hexColor}, 15%),
40
- 'darken-4': darken(${hexColor}, 20%),
41
- );\n`;
42
-
43
- const newData = hexColor ? brandVar + data : data;
44
- fs.writeFileSync(variablesColorsPath, newData, 'utf8');
45
- console.log(chalk.cyan('\nvariables-colors.scss file updated successfully!'));
46
- resolve(null);
47
- } catch (error) {
48
- reject(error);
49
- }
50
- });
51
- }
52
-
53
- module.exports = { start };
1
+ const fs = require('fs');
2
+ const brandModule = require('./brand.js');
3
+ const chalk = require('chalk');
4
+ const variablesColorsPath = 'src/ng1/assets/css/sass/variables-colors.scss';
5
+ const defaultColor = '$corp';
6
+
7
+ // Same edits as onboarding/variablesColors.js, driven by resolved brand state (no prompts).
8
+ function start() {
9
+ return new Promise((resolve, reject) => {
10
+ try {
11
+ const { connectedBrandName, color: hexColor } = brandModule.getBrand();
12
+ let data = fs.readFileSync(variablesColorsPath, 'utf8');
13
+
14
+ // Check if $colors map exists in the file
15
+ const colorsRegex = /\$colors:\s*\(([\s\S]*?)\)/;
16
+ const match = data.match(colorsRegex);
17
+ if (match) {
18
+ const colorsMap = match[1];
19
+
20
+ const newColorsMap = `$colors: (${colorsMap.replace(/\s*$/, '')},\n '${connectedBrandName}': ${
21
+ hexColor ? '$' + connectedBrandName : defaultColor
22
+ }\n)`;
23
+
24
+ // Replace the $colors map in the file with the new one
25
+ data = data.replace(colorsRegex, newColorsMap);
26
+ } else {
27
+ return reject('Error: Could not find $colors map in the file');
28
+ }
29
+
30
+ const brandVar = `\$${connectedBrandName}: (
31
+ 'lighten-5': lighten(${hexColor}, 25%),
32
+ 'lighten-4': lighten(${hexColor}, 20%),
33
+ 'lighten-3': lighten(${hexColor}, 15%),
34
+ 'lighten-2': lighten(${hexColor}, 10%),
35
+ 'lighten-1': lighten(${hexColor}, 5%),
36
+ 'base': ${hexColor},
37
+ 'darken-1': darken(${hexColor}, 5%),
38
+ 'darken-2': darken(${hexColor}, 10%),
39
+ 'darken-3': darken(${hexColor}, 15%),
40
+ 'darken-4': darken(${hexColor}, 20%),
41
+ );\n`;
42
+
43
+ const newData = hexColor ? brandVar + data : data;
44
+ fs.writeFileSync(variablesColorsPath, newData, 'utf8');
45
+ console.log(chalk.cyan('\nvariables-colors.scss file updated successfully!'));
46
+ resolve(null);
47
+ } catch (error) {
48
+ reject(error);
49
+ }
50
+ });
51
+ }
52
+
53
+ module.exports = { start };
package/package.json CHANGED
@@ -1,30 +1,30 @@
1
- {
2
- "name": "antelope-cli",
3
- "version": "1.2.3",
4
- "description": "CLI-Tool for automating processes for Antelope-Systems ",
5
- "main": "index.js",
6
- "bin": {
7
- "ant-cli": "./index.js"
8
- },
9
- "engines": {
10
- "node": "^16.20.2"
11
- },
12
- "scripts": {
13
- "test": "test"
14
- },
15
- "repository": {
16
- "type": "git",
17
- "url": ""
18
- },
19
- "keywords": [
20
- "cli"
21
- ],
22
- "author": "Idan Atias",
23
- "license": "ISC",
24
- "homepage": "",
25
- "dependencies": {
26
- "chalk": "^2.0.0",
27
- "node-fetch": "^2.6.1",
28
- "unzipper": "^0.12.1"
29
- }
30
- }
1
+ {
2
+ "name": "antelope-cli",
3
+ "version": "1.2.5",
4
+ "description": "CLI-Tool for automating processes for Antelope-Systems ",
5
+ "main": "index.js",
6
+ "bin": {
7
+ "ant-cli": "./index.js"
8
+ },
9
+ "engines": {
10
+ "node": "^16.20.2"
11
+ },
12
+ "scripts": {
13
+ "test": "test"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": ""
18
+ },
19
+ "keywords": [
20
+ "cli"
21
+ ],
22
+ "author": "Idan Atias",
23
+ "license": "ISC",
24
+ "homepage": "",
25
+ "dependencies": {
26
+ "chalk": "^2.0.0",
27
+ "node-fetch": "^2.6.1",
28
+ "unzipper": "^0.12.1"
29
+ }
30
+ }