@eui/tools 4.19.8 → 4.19.12

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.
@@ -1 +1 @@
1
- 4.19.8
1
+ 4.19.12
package/CHANGELOG.md CHANGED
@@ -1,3 +1,39 @@
1
+ ## 4.19.12 (2022-02-22)
2
+
3
+ ##### Bug Fixes
4
+
5
+ * **other:**
6
+ * support to support/develop back merge issue - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([3ffcbe18](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/3ffcbe188c9693817745fb817213b909bb564fba))
7
+
8
+ * * *
9
+ * * *
10
+ ## 4.19.11 (2022-02-21)
11
+
12
+ ##### Bug Fixes
13
+
14
+ * **other:**
15
+ * routes replacement wrong injection when ids is used - MWP-7941 [MWP-7941](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-7941) ([1716ddd3](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/1716ddd31a49cb5c9158454491b51685e038d070))
16
+
17
+ * * *
18
+ * * *
19
+ ## 4.19.10 (2022-02-18)
20
+
21
+ ##### Bug Fixes
22
+
23
+ * **other:**
24
+ * missing eui i18n path from elements generated translations - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([3f359cab](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/3f359cabcc60b938538fd3ace45714439fb5d8c6))
25
+
26
+ * * *
27
+ * * *
28
+ ## 4.19.9 (2022-02-17)
29
+
30
+ ##### Chores
31
+
32
+ * **other:**
33
+ * BreadcrumbsService mapping MWP-7583 [MWP-7583](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-7583) ([730d5cbe](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/730d5cbe68e007dc1570e41d4917058e857dfcc1))
34
+
35
+ * * *
36
+ * * *
1
37
  ## 4.19.8 (2022-02-16)
2
38
 
3
39
  ##### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "4.19.8",
3
+ "version": "4.19.12",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
package/sandbox.js CHANGED
@@ -14,7 +14,7 @@ const injectionUtils = require('./scripts/utils/pre-build/injection/injection-ut
14
14
  const compositeUtils = require('./scripts/csdr/install/composite-utils');
15
15
  const installUtils = require('./scripts/csdr/install/install-utils');
16
16
  const notificationUtils = require('./scripts/utils/notification/notification-utils');
17
-
17
+ const translationUtils = require('./scripts/utils/pre-build/translations/translation-utils');
18
18
 
19
19
  // console.log(configUtils.packages.getPackages());
20
20
  // console.log(configUtils.packages.getPackage('eui-tools'));
@@ -640,14 +640,35 @@ const notificationUtils = require('./scripts/utils/notification/notification-uti
640
640
  // })
641
641
 
642
642
 
643
- const prjName = 'my-workplace';
644
- const prj = configUtils.projects.getCsdrProject(prjName);
643
+
644
+
645
+
646
+ // const prjName = 'my-workplace';
647
+ // const prj = configUtils.projects.getCsdrProject(prjName);
648
+
649
+ // return Promise.resolve()
650
+ // // .then(() => {
651
+ // // return injectionUtils.externals.injectExternalAppSources(prj);
652
+ // // })
653
+ // .then(() => {
654
+ // // return injectionUtils.externals.remapRoutesByEnvConfig(prj, 'DEV', true);
655
+ // return injectionUtils.routesReplacement.buildRoutes(prj, 'DEV', true);
656
+ // })
657
+
658
+
659
+
660
+
661
+
662
+ // return Promise.resolve()
663
+ // .then(() => {
664
+ // const pkg = configUtils.packages.getPackage('opsys-result-quality-management-eui10-remote-el-ui', true);
665
+ // return translationUtils.elements.generate('eui,opsys', pkg)
666
+ // })
667
+
668
+
645
669
 
646
670
  return Promise.resolve()
647
- // .then(() => {
648
- // return injectionUtils.externals.injectExternalAppSources(prj);
649
- // })
650
671
  .then(() => {
651
- // return injectionUtils.externals.remapRoutesByEnvConfig(prj, 'DEV', true);
652
- return injectionUtils.routesReplacement.buildRoutes(prj, 'DEV', true);
672
+ const pkg = configUtils.packages.getPackage('eui', true);
673
+ console.log(pkg);
653
674
  })
@@ -37,7 +37,7 @@ import {
37
37
  EuiButtonModule,
38
38
  EuiLabelModule,
39
39
  } from '@eui/components-next';
40
- import { LanguageInterceptor, PushNotificationsService } from '@csdr/core';
40
+ import { LanguageInterceptor, PushNotificationsService, BreadcrumbsService } from '@csdr/core';
41
41
  // TODO[REMOTE-SETUP] uncomment if zipkin is used
42
42
  // import { TRACE_LOCAL_SERVICE_NAME, ZipkinHttpInterceptor, ZipkinTraceManager } from '@csdr/zipkin-tracing';
43
43
 
@@ -195,6 +195,7 @@ export function openidConnectInterceptorFactory(config) {
195
195
  deps: [CONFIG_TOKEN, HttpClient, PLATFORM_ID, Router, StoreService, I18nService,
196
196
  UX_SERVICE_HOST_TOKEN, UX_APP_SHELL_SERVICE_HOST_TOKEN, NG_ZONE_HOST_TOKEN],
197
197
  },
198
+ { provide: BreadcrumbsService, useFactory: () => window['PROVIDERS']['BreadcrumbsService'], deps: [] },
198
199
  { provide: ELEMENT_ROUTER_TOKEN, useFactory: () => window['PROVIDERS']['ELEMENT_ROUTER_TOKEN'], deps: [] },
199
200
  // TODO[REMOTE-SETUP] uncomment if zipkin is used
200
201
  // { provide: TRACE_LOCAL_SERVICE_NAME, useFactory: () => window['PROVIDERS']['TRACE_LOCAL_SERVICE_NAME'], deps: [] },
@@ -44,6 +44,7 @@ module.exports.getEnvTarget = () => {
44
44
 
45
45
 
46
46
  module.exports.init = (pkg) => {
47
+ utils.tools.logBanner('INIT');
47
48
 
48
49
  const branches = this.getBranches();
49
50
 
@@ -91,6 +92,8 @@ module.exports.init = (pkg) => {
91
92
 
92
93
 
93
94
  module.exports.preReleaseChecks = (pkg) => {
95
+ utils.tools.logBanner('PRE-RELEASE checks');
96
+
94
97
  return Promise.resolve()
95
98
 
96
99
  // GET AND CHECK DEVOPS CONFIG
@@ -121,6 +124,8 @@ module.exports.preReleaseChecks = (pkg) => {
121
124
 
122
125
 
123
126
  module.exports.commitMetadataChecks = (pkg) => {
127
+ utils.tools.logBanner('Commit metadata checks');
128
+
124
129
  utils.tools.logTitle('Checking package commit metadata');
125
130
  let pkgMetadata;
126
131
 
@@ -155,6 +160,8 @@ module.exports.commitMetadataChecks = (pkg) => {
155
160
 
156
161
 
157
162
  module.exports.preBuild = (pkg) => {
163
+ utils.tools.logBanner('PRE-BUILD');
164
+
158
165
  return Promise.resolve()
159
166
  .then(() => {
160
167
  return utils.buildPackage.preBuild(pkg);
@@ -169,6 +176,7 @@ module.exports.preBuild = (pkg) => {
169
176
 
170
177
 
171
178
  module.exports.updateVersion = (pkg, pkgMetadata) => {
179
+ utils.tools.logBanner('UPDATE VERSION');
172
180
 
173
181
  // getting branch flags
174
182
  const branches = this.getBranches();
@@ -207,6 +215,8 @@ module.exports.updateVersion = (pkg, pkgMetadata) => {
207
215
 
208
216
 
209
217
  module.exports.generateChangelog = (pkg, version, pkgMetadata) => {
218
+ utils.tools.logBanner('GENERATE CHANGELOG');
219
+
210
220
  return Promise.resolve()
211
221
 
212
222
  // GENERATE CHANGELOG
@@ -241,6 +251,8 @@ module.exports.generateChangelog = (pkg, version, pkgMetadata) => {
241
251
 
242
252
 
243
253
  module.exports.postBuild = (pkg, version) => {
254
+ utils.tools.logBanner('POST BUILD');
255
+
244
256
  return Promise.resolve()
245
257
  // all packages
246
258
  .then(() => {
@@ -262,6 +274,8 @@ module.exports.postBuild = (pkg, version) => {
262
274
 
263
275
 
264
276
  module.exports.storeMetadataAssets = (pkg, pkgCompositeDeps) => {
277
+ utils.tools.logBanner('STORE METADATA ASSETS');
278
+
265
279
  return Promise.resolve()
266
280
  .then(() => {
267
281
  if (pkg.remote) {
@@ -275,8 +289,10 @@ module.exports.storeMetadataAssets = (pkg, pkgCompositeDeps) => {
275
289
  }
276
290
 
277
291
  module.exports.runGitOperations = (pkg, version) => {
292
+ utils.tools.logBanner('RUN GIT OPERATIONS');
278
293
 
279
294
  const branches = this.getBranches();
295
+ console.log(branches);
280
296
 
281
297
  return Promise.resolve()
282
298
  // COMMIT and PUSH UPDATED FILES ON PACKAGE REPOSITORY
@@ -302,14 +318,16 @@ module.exports.runGitOperations = (pkg, version) => {
302
318
  // MERGE BACK ON DEVELOP for MASTER / LATEST RELEASE
303
319
  .then(() => {
304
320
  if (branches.isMaster) {
321
+ utils.tools.logInfo('Branch is master merge back to develop');
305
322
  return utils.git.mergeMasterToDevelop(pkg, pkg.paths.pkgDirectory, version);
306
323
  }
307
324
  })
308
325
 
309
326
  // MERGE BACK ON support/develop for support release for package that has a support/develop branch active
310
327
  .then(() => {
311
- if (branches.isSupport && pkg.build && pkg.build.supportDevelopBranch) {
312
- return utils.git.mergeSupportToSupportDevelop(pkg, pkg.paths.pkgDirectory, branches.branch, pkg.build.supportDevelopBranch);
328
+ if (branches.isSupport && pkg.build && pkg.build.supportSnapshotBranch) {
329
+ utils.tools.logInfo('Branch is support / supportSnapshotBranch config detected');
330
+ return utils.git.mergeSupportToSupportDevelop(pkg, pkg.paths.pkgDirectory, branches.branch, pkg.build.supportSnapshotBranch);
313
331
  }
314
332
  })
315
333
 
@@ -321,6 +339,8 @@ module.exports.runGitOperations = (pkg, version) => {
321
339
 
322
340
 
323
341
  module.exports.storeMetadata = (pkg, version, pkgMetadata, pkgCompositeDeps, duration) => {
342
+ utils.tools.logBanner('STORE METADATA');
343
+
324
344
  const branches = this.getBranches();
325
345
 
326
346
  return Promise.resolve()
@@ -340,6 +360,8 @@ module.exports.storeMetadata = (pkg, version, pkgMetadata, pkgCompositeDeps, dur
340
360
 
341
361
 
342
362
  module.exports.generateDiffReport = (pkg, newVersion) => {
363
+ utils.tools.logBanner('GENERATE DIFF REPORT');
364
+
343
365
  const branches = this.getBranches();
344
366
 
345
367
  return Promise.resolve()
@@ -375,6 +397,8 @@ module.exports.generateDiffReport = (pkg, newVersion) => {
375
397
 
376
398
 
377
399
  module.exports.sendSuccessNotification = (pkg, version, pkgMetadata) => {
400
+ utils.tools.logBanner('SEND SUCCESS NOTIFICATION');
401
+
378
402
  return Promise.resolve()
379
403
  .then(() => {
380
404
  utils.tools.logTitle('Sending slack success');
@@ -410,6 +434,8 @@ module.exports.sendSuccessNotification = (pkg, version, pkgMetadata) => {
410
434
 
411
435
 
412
436
  module.exports.sendErrorNotification = (pkg, exception, pkgMetadata) => {
437
+ utils.tools.logBanner('SEND ERROR NOTIFICATION');
438
+
413
439
  // console.log(pkgMetadata);
414
440
 
415
441
  return Promise.resolve()
@@ -229,14 +229,14 @@ const mergeMasterToDevelop = (pkg, folder, version) => {
229
229
  }
230
230
 
231
231
 
232
- const mergeSupportToSupportDevelop = (pkg, folder, supportBranch, supportDevelopBranch) => {
233
- if (!supportDevelopBranch) {
234
- tools.logWarning('supportDevelopBranch not found in package config...skipping');
232
+ const mergeSupportToSupportDevelop = (pkg, folder, supportBranch, supportSnapshotBranch) => {
233
+ if (!supportSnapshotBranch) {
234
+ tools.logWarning('supportSnapshotBranch not found in package config...skipping');
235
235
  return Promise.resolve();
236
236
  }
237
237
 
238
- tools.logTitle(`Merge back on ${supportDevelopBranch}`);
239
- tools.logInfo(`Merging release changes into ${supportDevelopBranch} branch...`);
238
+ tools.logTitle(`Merge back on ${supportSnapshotBranch}`);
239
+ tools.logInfo(`Merging release changes into ${supportSnapshotBranch} branch...`);
240
240
 
241
241
  if (dryRun) {
242
242
  tools.logInfo('DRY-RUN: skipping merge support to supportDevelop');
@@ -252,17 +252,17 @@ const mergeSupportToSupportDevelop = (pkg, folder, supportBranch, supportDevelop
252
252
  return Promise.resolve()
253
253
  .then(() => {
254
254
  execa.shellSync(`git fetch origin`, { cwd: folder });
255
- execa.shellSync(`git checkout ${supportDevelopBranch}`, { cwd: folder });
256
- execa.shellSync(`git merge origin/${supportDevelopBranch}`, { cwd: folder });
255
+ execa.shellSync(`git checkout ${supportSnapshotBranch}`, { cwd: folder });
256
+ execa.shellSync(`git merge origin/${supportSnapshotBranch}`, { cwd: folder });
257
257
  execa.shellSync(`git merge -X theirs ${supportBranch}`, { cwd: folder });
258
- execa.shellSync(`git push origin ${supportDevelopBranch}`, { cwd: folder });
258
+ execa.shellSync(`git push origin ${supportSnapshotBranch}`, { cwd: folder });
259
259
  execa.shellSync(`git checkout ${supportBranch}`, { cwd: folder });
260
260
  })
261
261
  .then(() => {
262
262
  tools.logSuccess();
263
263
  })
264
264
  .catch((e) => {
265
- throw new Error(`Error trying merging ${supportBranch} to ${supportDevelopBranch} on ${folder}`);
265
+ throw new Error(`Error trying merging ${supportBranch} to ${supportSnapshotBranch} on ${folder}`);
266
266
  })
267
267
  }
268
268
  }
@@ -218,7 +218,7 @@ const replaceRoutes = (project, envTarget, build, routesFileContent) => {
218
218
  routeContent += ` id: '${route.data.id}',\n`;
219
219
  }
220
220
  if (route.data.ids) {
221
- routeContent += ` ids: '${route.data.ids}',\n`;
221
+ routeContent += ` ids: ${route.data.ids},\n`;
222
222
  }
223
223
  if (route.data.featureName) {
224
224
  routeContent += ` featureName: '${route.data.featureName}',\n`;
@@ -51,7 +51,13 @@ module.exports.generate = (inputScopes = '', inputPkg) => {
51
51
  tools.logInfo(`Adding packages from scope "${scope}"`);
52
52
  const scopePath = path.resolve(nmPath, scope);
53
53
  if (tools.isDirExists(scopePath)) {
54
- let files = fs.readdirSync(scopePath).map(pkg => path.resolve(nmPath, `${scope}/${pkg}`))
54
+ let files = fs.readdirSync(scopePath).map((pkg) => {
55
+ return {
56
+ name: pkg,
57
+ scope: scope,
58
+ folder: path.resolve(nmPath, `${scope}/${pkg}`)
59
+ }
60
+ });
55
61
  packages = [...packages, ...files];
56
62
  }
57
63
  });
@@ -63,7 +69,7 @@ module.exports.generate = (inputScopes = '', inputPkg) => {
63
69
  })
64
70
 
65
71
  .then(() => {
66
- if (!fs.existsSync(destFolder)) {
72
+ if (!fs.existsSync(destFolder) && !dryRun) {
67
73
  fs.mkdirSync(destFolder);
68
74
  }
69
75
 
@@ -76,9 +82,19 @@ module.exports.generate = (inputScopes = '', inputPkg) => {
76
82
 
77
83
  // Add module translations
78
84
  packages.forEach((pkg) => {
79
- // console.log('...adding translation from module "' + pkg + '".');
80
- file = path.join(pkg, `assets/i18n/${lang}.json`);
81
- addTranslation(file, lang)
85
+ let baseI18nPath = 'i18n';
86
+ if (pkg.scope === '@eui') {
87
+ baseI18nPath = 'i18n-eui';
88
+ }
89
+ file = path.join(pkg.folder, `assets/${baseI18nPath}/${lang}.json`);
90
+
91
+ tools.logInfo(`Adding translations from ${pkg.folder}`);
92
+ if (tools.isFileExists(file)) {
93
+ tools.logInfo(`${file} found...adding`);
94
+ addTranslation(file, lang)
95
+ } else {
96
+ tools.logInfo(`${file} not found...skipping`);
97
+ }
82
98
  });
83
99
 
84
100
  // Write final file