@eui/tools 4.15.14 → 4.16.0

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 (36) hide show
  1. package/.version.properties +1 -1
  2. package/CHANGELOG.md +17 -0
  3. package/bin/eui-scripts.js +0 -4
  4. package/global.test.js +1 -4
  5. package/package.json +6 -6
  6. package/sandbox.js +10 -3
  7. package/scripts/csdr/config/packages.js +28 -0
  8. package/scripts/csdr/init/init-utils.js +37 -0
  9. package/scripts/csdr/init/init.js +6 -0
  10. package/scripts/csdr/init/resources/13.x/resolutions.json +15 -0
  11. package/scripts/csdr/install/build-package.js +0 -84
  12. package/scripts/csdr/install/common.js +0 -16
  13. package/scripts/csdr/metadata/app.js +3 -3
  14. package/scripts/csdr/release/package/backend.js +26 -0
  15. package/scripts/csdr/release/package/common.js +1 -1
  16. package/scripts/csdr/release/package/release-package.js +4 -0
  17. package/scripts/csdr/release/package/ui.js +83 -1
  18. package/scripts/csdr/sync/sync-utils.js +7 -4
  19. package/scripts/csdr/version/package.js +2 -1
  20. package/scripts/utils/build/app/build-app-utils.js +2 -2
  21. package/scripts/utils/build/package/element.js +2 -2
  22. package/scripts/utils/notification/common.js +5 -0
  23. package/scripts/utils/notification/mail-utils.js +3 -0
  24. package/scripts/utils/notification/mailstack.js +3 -5
  25. package/scripts/utils/notification/package.js +0 -2
  26. package/scripts/utils/notification/slack-utils.js +6 -7
  27. package/scripts/utils/pre-build/injection/config.js +29 -30
  28. package/scripts/utils/pre-build/injection/externals.js +6 -0
  29. package/scripts/utils/serve/app.js +6 -3
  30. package/scripts/utils/tools.js +362 -304
  31. package/bin/scripts/csdr-jira-update.js +0 -12
  32. package/bin/scripts/csdr-migrate-package.js +0 -17
  33. package/bin/scripts/e2e-app.js +0 -62
  34. package/scripts/csdr/init/resources/yarn-eui13.lock +0 -15857
  35. package/scripts/migration/eui8-migration.js +0 -94
  36. package/scripts/migration/migrate-utils.js +0 -191
@@ -1 +1 @@
1
- 4.15.14
1
+ 4.16.0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ ## 4.16.0 (2021-11-03)
2
+
3
+ ##### Chores
4
+
5
+ * **other:**
6
+ * refactoring ([6bd95ede](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/6bd95ede679710adc95353089c0efe1691cac5f0))
7
+ ##### New Features
8
+
9
+ * **other:**
10
+ * refactoring - added timestamp to logger - cleanup - added dynamic resolutions generation on sync and init - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([0ab46918](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/0ab46918dbfd7fc73609c90fc00e901f5e36469f))
11
+ ##### Bug Fixes
12
+
13
+ * **other:**
14
+ * wrong declaration of private method ([70ad7ceb](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/70ad7cebf87369f20cdc431fdce95cb14549cbfa))
15
+
16
+ * * *
17
+ * * *
1
18
  ## 4.15.14 (2021-10-29)
2
19
 
3
20
  ##### Bug Fixes
@@ -31,8 +31,6 @@ const scriptIndex = args.findIndex(
31
31
  x === 'release-app' ||
32
32
  x === 'generate-translations' ||
33
33
  x === 'csdr-sync' ||
34
- x === 'csdr-migrate-package' ||
35
- x === 'csdr-jira-update' ||
36
34
  x === 'csdr-cli' ||
37
35
  x === 'csdr-stats' ||
38
36
  x === 'generate-app-metadata' ||
@@ -65,11 +63,9 @@ switch (script) {
65
63
  case 'csdr-init':
66
64
  case 'csdr-upgrade-deps':
67
65
  case 'csdr-serve-app':
68
- case 'csdr-migrate-package':
69
66
  case 'release-package':
70
67
  case 'release-app':
71
68
  case 'csdr-sync':
72
- case 'csdr-jira-update':
73
69
  case 'csdr-cli':
74
70
  case 'csdr-stats':
75
71
  case 'generate-app-metadata':
package/global.test.js CHANGED
@@ -96,10 +96,6 @@ describe('eUI tools - test imports', () => {
96
96
  const csdrInstallUtils = require('./scripts/csdr/install/install-utils');
97
97
  const csdrInstallLocalDev = require('./scripts/csdr/install/local-dev');
98
98
 
99
- // csdr - jira
100
- // const csdrJiraUtils = require('./scripts/csdr/jira/jira-utils');
101
- // const csdrJiraUpdate = require('./scripts/csdr/jira/update');
102
-
103
99
  // csdr - metadata
104
100
  const csdrMetadataAppEnvs = require('./scripts/csdr/metadata/app-envs');
105
101
  const csdrMetadataAppHistory = require('./scripts/csdr/metadata/app-history');
@@ -117,6 +113,7 @@ describe('eUI tools - test imports', () => {
117
113
  const csdrReleasePackageCommon = require('./scripts/csdr/release/package/common');
118
114
  const csdrReleasePackageRemote = require('./scripts/csdr/release/package/remote');
119
115
  const csdrReleasePackageUi = require('./scripts/csdr/release/package/ui');
116
+ const csdrReleasePackageBackend = require('./scripts/csdr/release/package/backend');
120
117
 
121
118
  // csdr - template
122
119
  const csdrTemplateUtils = require('./scripts/csdr/templates/template-utils');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "4.15.14",
3
+ "version": "4.16.0",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
@@ -12,8 +12,8 @@
12
12
  "dependencies": {
13
13
  "inquirer": "6.5.0",
14
14
  "execa": "1.0.0",
15
- "figlet": "1.3.0",
16
- "chalk": "2.4.2",
15
+ "figlet": "1.5.2",
16
+ "chalk": "4.1.2",
17
17
  "fs-extra": "9.0.0",
18
18
  "replace-in-file": "4.1.3",
19
19
  "semver": "6.0.0",
@@ -28,9 +28,9 @@
28
28
  "figures": "3.2.0",
29
29
  "xml2js": "0.4.23",
30
30
  "https-proxy-agent": "2.2.3",
31
- "jest": "26.6.3",
32
- "supertest": "4.0.2",
33
- "memfs": "3.2.4",
31
+ "jest": "27.3.1",
32
+ "supertest": "6.1.6",
33
+ "memfs": "3.3.0",
34
34
  "json-server": "0.16.3",
35
35
  "faker": "5.5.3",
36
36
  "nodemon": "2.0.12",
package/sandbox.js CHANGED
@@ -596,8 +596,15 @@ const notificationUtils = require('./scripts/utils/notification/notification-uti
596
596
 
597
597
  return Promise.resolve()
598
598
  .then(() => {
599
- const prjName = 'eui-showcase-ux';
600
- const prj = configUtils.projects.getCsdrProject(prjName);
601
- console.log(prj);
599
+ tools.logBigTitle('BIG TITLE');
600
+ tools.logTitle('TITLE');
601
+ tools.logInfo('test log info');
602
+ tools.logInfo('test log info');
603
+ tools.logInfo('test log info');
604
+ tools.logSuccess('test log success');
605
+ tools.logError('test log error');
606
+ tools.logWarning('test log warning');
607
+ tools.logAccent('test log accent');
608
+ tools.logBanner('this is the content of the banner');
602
609
  })
603
610
 
@@ -6,6 +6,7 @@ const fs = require('fs');
6
6
 
7
7
  // LOCAL
8
8
  const tools = require('../../utils/tools');
9
+ const configUtils = require('./config-utils');
9
10
 
10
11
  // INNER MODULES
11
12
  const innerGlobal = require('./global');
@@ -233,3 +234,30 @@ module.exports.getDepGraph = () => {
233
234
 
234
235
  return graph;
235
236
  }
237
+
238
+
239
+ module.exports.getLocalPackagesEuiVersion = () => {
240
+ tools.logInfo('getting local installed eUI version...');
241
+
242
+ const pkgs = configUtils.packages.getPackages();
243
+ let versionsFound = [];
244
+
245
+ pkgs.forEach((p) => {
246
+ if (p.parent !== true && p.tsPackage !== false) {
247
+
248
+ let version = 'DEFAULT';
249
+
250
+ if (p.build) {
251
+ if (p.build.euiVersion) {
252
+ version = p.build.euiVersion;
253
+ }
254
+ }
255
+ tools.logInfo(`checking ${p.name} - version found : ${version}`);
256
+ versionsFound.push(version);
257
+ }
258
+ })
259
+
260
+ versionsFound = tools.removeArrayDuplicates(versionsFound);
261
+
262
+ return versionsFound;
263
+ }
@@ -171,3 +171,40 @@ module.exports.importExtraTsConfig = () => {
171
171
  throw e;
172
172
  })
173
173
  }
174
+
175
+
176
+ module.exports.processLocalEuiVersions = () => {
177
+ tools.logTitle('Processing injections for local installed eUI versions if needed');
178
+
179
+ return Promise.resolve()
180
+ .then(() => {
181
+ const euiVersionsLocal = configUtils.packages.getLocalPackagesEuiVersion();
182
+
183
+ if (euiVersionsLocal.length > 1) {
184
+ throw new Error('MULTIPLE_LOCAL_EUI_VERSIONS_FOUND');
185
+ }
186
+
187
+ const euiVersion = euiVersionsLocal[0];
188
+
189
+ if (euiVersion === 'DEFAULT') {
190
+ tools.logInfo('Default eUI version found, taking default resolutions..skipping');
191
+
192
+ } else {
193
+ const rootPackageJsonFile = path.join(process.cwd(), 'package.json');
194
+ const rootPackageJson = require(rootPackageJsonFile);
195
+
196
+ const resolutionsJsonFile = path.join(__dirname, 'resources', euiVersion, 'resolutions.json');
197
+ const resolutionsJson = require(resolutionsJsonFile);
198
+
199
+ tools.logInfo('Injecting resolutions content');
200
+ console.log(resolutionsJson);
201
+ rootPackageJson.resolutions = resolutionsJson;
202
+
203
+ tools.logInfo('Updating root package.json');
204
+ tools.writeJsonFileSync(rootPackageJsonFile, rootPackageJson);
205
+ }
206
+ })
207
+ .catch((e) => {
208
+ throw e;
209
+ })
210
+ }
@@ -77,6 +77,12 @@ module.exports.init = () => {
77
77
  return initUtils.importPackages(finalResponse);
78
78
  })
79
79
 
80
+ // adapt and inject particular root data/config for eUI version detected on project
81
+ // if multiple versions of eUI are detected on the same project, an exception is thrown
82
+ .then(() => {
83
+ return initUtils.processLocalEuiVersions();
84
+ })
85
+
80
86
  // Install deps based on current config generated => take last know snapshots
81
87
  .then(() => {
82
88
  // this is only executed for local dev installation,
@@ -0,0 +1,15 @@
1
+ {
2
+ "lodash": ">=4.17.21",
3
+ "handlebars": ">=4.5.3",
4
+ "mem": ">=4.3.0 <=8.1.1",
5
+ "https-proxy-agent": ">=2.2.3",
6
+ "minimatch": ">=3.0.4",
7
+ "acorn-globals": ">=6.0.0",
8
+ "open": ">=7.0.3",
9
+ "dot-prop": ">=5.2.0",
10
+ "serialize-javascript": ">=3.1.0",
11
+ "socket.io": ">=2.4.0",
12
+ "ssri": ">=8.0.1",
13
+ "@types/node": ">=14.14.10",
14
+ "hosted-git-info": ">=3.0.8"
15
+ }
@@ -100,87 +100,3 @@ module.exports.install = (prj, pkg, isMaster) => {
100
100
  throw e;
101
101
  })
102
102
  }
103
-
104
-
105
-
106
-
107
-
108
-
109
- module.exports.checkDeps = (pkg) => {
110
- tools.logTitle('Checking package internal dependencies');
111
-
112
- return Promise.resolve()
113
- .then(() => {
114
- var depsFound = [];
115
- var files = glob.sync('**/*.ts', { cwd: pkg.paths.pkgLibFolder, nodir: true, follow: true, dot: true });
116
- files.forEach(file => {
117
- const filePath = path.join(pkg.paths.pkgLibFolder, file);
118
- const fileContent = tools.getFileContent(filePath);
119
- var regex = /@cc\/|@mywp\/|@opsys\/|@sfc\//gi, result, indices = [];
120
- while ( (result = regex.exec(fileContent)) ) {
121
- indices.push(result.index);
122
- }
123
- if (indices.length !== 0) {
124
- // tools.logInfo(`Number of occurences found : ${indices.length}`);
125
- indices.forEach((i) => {
126
- const endPos = fileContent.substr(i, 40).indexOf("'");
127
- const dep = fileContent.substr(i, endPos);
128
- if (endPos > -1) {
129
- // tools.logInfo(`dep found on : ${dep}`);
130
- depsFound.push(dep);
131
-
132
- } else {
133
- tools.logInfo(`Potential wrong import detected on file : ${file}`);
134
- const subContent = fileContent.substr(i, 40);
135
- const detectMultiSlashes = subContent.match(/\//g);
136
- if (detectMultiSlashes.length > 0) {
137
- tools.logError('Multislashes on import : ');
138
- console.log(subContent);
139
- }
140
- }
141
- })
142
- }
143
- });
144
- depsFound = tools.removeArrayDuplicates(depsFound);
145
- tools.logWarning(`Dependencies found : ${depsFound.length}`);
146
- console.log(depsFound);
147
-
148
- return depsFound;
149
- })
150
-
151
- .then((depsFound) => {
152
- var depsLevel;
153
-
154
- switch(true) {
155
- case (depsFound.length === 1):
156
- depsLevel = 'LOW (1)';
157
- break;
158
- case (depsFound.length > 1 && depsFound.length <= 3):
159
- depsLevel = 'MEDIUM (between 1 and 3)';
160
- break;
161
- case (depsFound.length > 3 && depsFound.length <= 5):
162
- depsLevel = 'HIGH (between 3 and 5)';
163
- break;
164
- case (depsFound.length > 5):
165
- depsLevel = 'VERY HIGH (>5)';
166
- break;
167
- default:
168
- depsLevel = 'NONE';
169
- }
170
-
171
- var message = `Internal dependencies detected : ${depsFound.length} - deps level: ${depsLevel}\n`;
172
- message += depsFound.join('\n');
173
-
174
-
175
- return notificationUtils.package.sendPackageMessage({
176
- package: pkg,
177
- text: message
178
- });
179
- })
180
-
181
- .catch((e) => {
182
- console.log(e);
183
- })
184
-
185
- }
186
-
@@ -217,22 +217,6 @@ const getLocalPackagesDeps = () => {
217
217
  }
218
218
 
219
219
 
220
- // const getLocalPackageCompositeDeps = (pkg) => {
221
- // let pkgJsonFile;
222
-
223
- // if (pkg.parent) {
224
- // return {};
225
- // } else {
226
- // if (pkg.child) {
227
- // pkgJsonFile = path.join(process.cwd(), 'packages', pkg.parentPkg, 'packages', pkg.folder || pkg.name, 'dependencies-composite.json');
228
- // } else {
229
- // pkgJsonFile = path.join(process.cwd(), 'packages', pkg.name, 'dependencies-composite.json');
230
- // }
231
- // }
232
-
233
- // return tools.getJsonFileContent(pkgJsonFile) || {};
234
- // }
235
-
236
220
  const getLocalPackageCompositeDeps = (pkg) => {
237
221
  let pkgJsonFile;
238
222
 
@@ -98,7 +98,7 @@ const storeMetadataAssets = (project, newVersion, packagesDeps, historyMetadata,
98
98
 
99
99
  const metadataFile = path.join(project.folder, 'src', 'assets', 'app-metadata.json');
100
100
 
101
- console.log(`Creating ${metadataFile}`);
101
+ tools.logInfo(`Creating ${metadataFile}`);
102
102
  console.log(appMetadata);
103
103
 
104
104
  if (!dryRun) {
@@ -112,7 +112,7 @@ const storeMetadataAssets = (project, newVersion, packagesDeps, historyMetadata,
112
112
 
113
113
  const metadataFile = path.join(project.folder, 'src', 'assets', 'app-metadata-history.json');
114
114
 
115
- console.log(`Creating ${metadataFile}`);
115
+ tools.logInfo(`Creating ${metadataFile}`);
116
116
 
117
117
  if (!dryRun && envTarget && envTarget !== 'DEV') {
118
118
  return tools.writeJsonFileSync(metadataFile, historyMetadata);
@@ -160,7 +160,7 @@ const storeMetadataAssetsStandAlone = () => {
160
160
 
161
161
  const metadataFile = path.join(prj.folder, 'src', 'assets', 'app-metadata.json');
162
162
 
163
- console.log(`Creating ${metadataFile}`);
163
+ tools.logInfo(`Creating ${metadataFile}`);
164
164
  console.log(appMetadata);
165
165
 
166
166
  if (!dryRun) {
@@ -0,0 +1,26 @@
1
+ 'use strict';
2
+
3
+ // GLOBAL
4
+ const path = require('path');
5
+
6
+ // LOCAL
7
+ const installUtils = require('../../install/install-utils');
8
+ const configUtils = require('../../config/config-utils');
9
+
10
+ module.exports.install = (pkg, isMaster) => {
11
+ return Promise.resolve()
12
+
13
+ // FETCHING CURRENT PACKAGES & INSTALL
14
+ .then(() => {
15
+ // fetch related project if passed as arguments
16
+ const prj = configUtils.projects.getProject();
17
+
18
+ // install the dependencies for current package build
19
+ return installUtils.buildPackage.install(prj, pkg, isMaster);
20
+ })
21
+
22
+ .catch((e) => {
23
+ throw e;
24
+ })
25
+ }
26
+
@@ -381,7 +381,7 @@ module.exports.sendSuccessNotification = (pkg, version, pkgMetadata) => {
381
381
 
382
382
 
383
383
  module.exports.sendErrorNotification = (pkg, exception, pkgMetadata) => {
384
- console.log(pkgMetadata);
384
+ // console.log(pkgMetadata);
385
385
 
386
386
  return Promise.resolve()
387
387
  .then(() => {
@@ -14,6 +14,7 @@ const metadataUtils = require('../../metadata/metadata-utils');
14
14
  const innerCommon = require('./common');
15
15
  const innerUi = require('./ui');
16
16
  const innerRemote = require('./remote');
17
+ const innerBackend = require('./backend');
17
18
 
18
19
 
19
20
  module.exports.run = () => {
@@ -80,6 +81,9 @@ module.exports.run = () => {
80
81
  if (pkg.remote) {
81
82
  return innerRemote.install(pkg, branches.isMaster);
82
83
 
84
+ } else if (pkg.backend) {
85
+ return innerBackend.install(pkg, branches.isMaster);
86
+
83
87
  } else {
84
88
  return innerUi.install(pkg, branches.isMaster);
85
89
  }
@@ -7,6 +7,8 @@ const path = require('path');
7
7
  const installUtils = require('../../install/install-utils');
8
8
  const configUtils = require('../../config/config-utils');
9
9
  const auditUtils = require('../../audit/audit-utils');
10
+ const notificationUtils = require('../../../utils/notification/notification-utils');
11
+ const tools = require('../../../utils/tools');
10
12
 
11
13
 
12
14
  module.exports.install = (pkg, isMaster) => {
@@ -24,7 +26,7 @@ module.exports.install = (pkg, isMaster) => {
24
26
 
25
27
  // CHECK INTERNAL DEPENDENCIES
26
28
  .then(() => {
27
- return installUtils.buildPackage.checkDeps(pkg);
29
+ return checkDeps(pkg);
28
30
  })
29
31
 
30
32
 
@@ -38,3 +40,83 @@ module.exports.install = (pkg, isMaster) => {
38
40
  throw e;
39
41
  })
40
42
  }
43
+
44
+
45
+ const checkDeps = (pkg) => {
46
+ tools.logTitle('Checking package internal dependencies');
47
+
48
+ return Promise.resolve()
49
+ .then(() => {
50
+ var depsFound = [];
51
+ var files = glob.sync('**/*.ts', { cwd: pkg.paths.pkgLibFolder, nodir: true, follow: true, dot: true });
52
+ files.forEach(file => {
53
+ const filePath = path.join(pkg.paths.pkgLibFolder, file);
54
+ const fileContent = tools.getFileContent(filePath);
55
+ var regex = /@cc\/|@mywp\/|@opsys\/|@sfc\//gi, result, indices = [];
56
+ while ( (result = regex.exec(fileContent)) ) {
57
+ indices.push(result.index);
58
+ }
59
+ if (indices.length !== 0) {
60
+ // tools.logInfo(`Number of occurences found : ${indices.length}`);
61
+ indices.forEach((i) => {
62
+ const endPos = fileContent.substr(i, 40).indexOf("'");
63
+ const dep = fileContent.substr(i, endPos);
64
+ if (endPos > -1) {
65
+ // tools.logInfo(`dep found on : ${dep}`);
66
+ depsFound.push(dep);
67
+
68
+ } else {
69
+ tools.logInfo(`Potential wrong import detected on file : ${file}`);
70
+ const subContent = fileContent.substr(i, 40);
71
+ const detectMultiSlashes = subContent.match(/\//g);
72
+ if (detectMultiSlashes.length > 0) {
73
+ tools.logError('Multislashes on import : ');
74
+ console.log(subContent);
75
+ }
76
+ }
77
+ })
78
+ }
79
+ });
80
+ depsFound = tools.removeArrayDuplicates(depsFound);
81
+ tools.logWarning(`Dependencies found : ${depsFound.length}`);
82
+ console.log(depsFound);
83
+
84
+ return depsFound;
85
+ })
86
+
87
+ .then((depsFound) => {
88
+ var depsLevel;
89
+
90
+ switch(true) {
91
+ case (depsFound.length === 1):
92
+ depsLevel = 'LOW (1)';
93
+ break;
94
+ case (depsFound.length > 1 && depsFound.length <= 3):
95
+ depsLevel = 'MEDIUM (between 1 and 3)';
96
+ break;
97
+ case (depsFound.length > 3 && depsFound.length <= 5):
98
+ depsLevel = 'HIGH (between 3 and 5)';
99
+ break;
100
+ case (depsFound.length > 5):
101
+ depsLevel = 'VERY HIGH (>5)';
102
+ break;
103
+ default:
104
+ depsLevel = 'NONE';
105
+ }
106
+
107
+ var message = `Internal dependencies detected : ${depsFound.length} - deps level: ${depsLevel}\n`;
108
+ message += depsFound.join('\n');
109
+
110
+
111
+ return notificationUtils.package.sendPackageMessage({
112
+ package: pkg,
113
+ text: message
114
+ });
115
+ })
116
+
117
+ .catch((e) => {
118
+ console.log(e);
119
+ })
120
+
121
+ }
122
+
@@ -16,10 +16,10 @@ module.exports.sync = () => {
16
16
  tools.logInfo('Resetting package.json');
17
17
  return tools.copy(path.join(process.cwd(), '.csdr', 'package.json.reset'), path.join(process.cwd(), 'package.json'));
18
18
  })
19
- .then(() => {
20
- tools.logInfo('Removing yarn.lock');
21
- return tools.remove(path.join(process.cwd(), 'yarn.lock'));
22
- })
19
+ // .then(() => {
20
+ // tools.logInfo('Removing yarn.lock');
21
+ // return tools.remove(path.join(process.cwd(), 'yarn.lock'));
22
+ // })
23
23
  .then(() => {
24
24
  tools.logSuccess();
25
25
  })
@@ -53,6 +53,9 @@ module.exports.sync = () => {
53
53
  .then(() => {
54
54
  return initUtils.meta.init();
55
55
  })
56
+ .then(() => {
57
+ return initUtils.processLocalEuiVersions();
58
+ })
56
59
  .catch((e) => {
57
60
  throw e;
58
61
  })
@@ -37,8 +37,9 @@ const getCurrentVersion = (pkg) => {
37
37
  // by default maven java backend is taken into account
38
38
  } else {
39
39
  tools.logInfo('Backend => extracting pom.xml');
40
-
41
40
  const xmlContent = tools.getXMLJsContent(path.join(pkg.paths.pkgDirectory, 'pom.xml'));
41
+
42
+ tools.logInfo('Content found:');
42
43
  console.log(xmlContent);
43
44
 
44
45
  currentVersion = xmlContent.project.version.toString();
@@ -120,7 +120,7 @@ module.exports.angular = (envTarget, isSnapshot, version) => {
120
120
 
121
121
  tools.logInfo(`ng test : watching = ${watch || false}`);
122
122
 
123
- console.log(`running Angular TEST with args: ${args} on`);
123
+ tools.logInfo(`running Angular TEST with args: ${args} on :`);
124
124
  console.log(currentProject.paths.angularPath);
125
125
 
126
126
  if (!dryRun) {
@@ -204,7 +204,7 @@ module.exports.angular = (envTarget, isSnapshot, version) => {
204
204
 
205
205
  tools.logInfo(`ng build for configuration : ${configuration || 'production'}`);
206
206
 
207
- console.log(`running Angular BUILD with args: ${args} on`);
207
+ tools.logInfo(`running Angular BUILD with args: ${args} on :`);
208
208
  console.log(currentProject.paths.angularPath);
209
209
 
210
210
  if (!dryRun && !skipCompile) {
@@ -91,7 +91,7 @@ module.exports.build = (pkg, isMaster) => {
91
91
 
92
92
  tools.logInfo(`ng test : watching = ${watch || false}`);
93
93
 
94
- console.log(`running Angular TEST with args: ${args} on`);
94
+ tools.logInfo(`running Angular TEST with args: ${args} on`);
95
95
  console.log(pkg.paths.pkgRootDirectory);
96
96
 
97
97
  if (!dryRun) {
@@ -140,7 +140,7 @@ module.exports.build = (pkg, isMaster) => {
140
140
 
141
141
  tools.logInfo(`ng build for configuration : ${configuration || 'production'}`);
142
142
 
143
- console.log(`running Angular BUILD with args: ${args} on`);
143
+ tools.logInfo(`running Angular BUILD with args: ${args} on`);
144
144
  console.log(pkg.paths.pkgRootDirectory);
145
145
 
146
146
  if (!dryRun) {
@@ -64,6 +64,11 @@ module.exports.getMessage = (options) => {
64
64
  message.detailText = 'Another build has been detected for the current package being build\n Retry again this build after 30m, lock will be auto-cleared';
65
65
  break;
66
66
 
67
+ case 'MULTIPLE_LOCAL_EUI_VERSIONS_FOUND':
68
+ message.detailTitle = 'MULTIPLE eUI VERSIONS FOUND IN LOCAL PROJECT - ABORTING!';
69
+ message.detailText = 'Uncompatible version of eUI found installed in the local CSDR project, please adjust and keep same compatible versions of eUI packages and projects';
70
+ break;
71
+
67
72
  default:
68
73
  message.detailTitle = 'GENERAL ERROR!';
69
74
  message.detailText = options.exception;
@@ -10,6 +10,9 @@ let { dryRun, debug} = tools.getArgs();
10
10
 
11
11
  const sendCore = (subject, body, recipient) => {
12
12
  tools.logInfo(`Sending mail to : ${recipient}`);
13
+ tools.logInfo('Message subject / body :');
14
+ console.log(subject);
15
+ console.log(body);
13
16
 
14
17
  if (dryRun) {
15
18
  console.log('----------------------------------------------');
@@ -33,9 +33,6 @@ module.exports.endMailStack = () => {
33
33
  }
34
34
 
35
35
  module.exports.bufferMessage = (message) => {
36
- tools.logInfo('Buffering mail content');
37
- console.log(message);
38
-
39
36
  if (message.text) {
40
37
  mailContent.buffer.push(message.text);
41
38
 
@@ -73,8 +70,9 @@ const sendMailStack = (config, scope, target) => {
73
70
  status = 'ERROR';
74
71
  }
75
72
 
76
- const subject = `RELEASE <b style="color: ${statusColor};">${status}</b> - <b style="color:blue;">${scope}</b> - branch: <b styles="color: blue;">${target}</b>`;
77
- let fullMessage = mailContent.buffer.join('\n');
73
+ // const subject = `RELEASE <b style="color: ${statusColor};">${status}</b> - <b style="color:blue;">${scope}</b> - branch: <b styles="color: blue;">${target}</b>`;
74
+ const subject = `Release of **${scope}** for ${target} ---- status : ${status}`;
75
+ let fullMessage = `<pre>${mailContent.buffer.join('\n')}</pre>`;
78
76
 
79
77
  if (mailContent.exception) {
80
78
  fullMessage += mailContent.exception;
@@ -15,8 +15,6 @@ const innerMailstack = require('./mailstack');
15
15
 
16
16
  module.exports.sendPackageMessage = (options) => {
17
17
 
18
- tools.logInfo('Sending package message');
19
-
20
18
  const message = innerCommon.getMessage(options);
21
19
 
22
20
  // buffer message