@eui/tools 6.2.5 → 6.2.6

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
- 6.2.5
1
+ 6.2.6
package/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 6.2.6 (2022-11-10)
2
+
3
+ ##### Chores
4
+
5
+ * **other:**
6
+ * add exclude non compatible routes per environment on dynamic replacement for MWP - EUI-6448 [EUI-6448](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-6448) ([bdaf38b4](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/bdaf38b478b797e454abdc1b73d3cc9ecae071b0))
7
+
8
+ * * *
9
+ * * *
1
10
  ## 6.2.5 (2022-11-10)
2
11
 
3
12
  ##### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.2.5",
3
+ "version": "6.2.6",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
package/sandbox.js CHANGED
@@ -934,12 +934,12 @@ const versionUtils = require('./scripts/csdr/version/version-utils');
934
934
 
935
935
  // STYLES AUDIT TESTS
936
936
 
937
- Promise.resolve()
938
- .then(() => {
939
- const { pkg } = tools.getArgs();
940
- const p = configUtils.packages.getPackage(pkg, true);
941
- return auditUtils.styles.audit(p);
942
- })
937
+ // Promise.resolve()
938
+ // .then(() => {
939
+ // const { pkg } = tools.getArgs();
940
+ // const p = configUtils.packages.getPackage(pkg, true);
941
+ // return auditUtils.styles.audit(p);
942
+ // })
943
943
 
944
944
  // const installPackages = async packages => {
945
945
  // const promises = packages.map(async p => {
@@ -1027,3 +1027,32 @@ Promise.resolve()
1027
1027
  // // })
1028
1028
 
1029
1029
  // })
1030
+
1031
+ // Promise.resolve()
1032
+ // .then(() => {
1033
+ // const dev = tools.getJsonFileContent(path.join(process.cwd(), 'packages', 'mywp-routes-config', 'assets', 'route-defs.dev.json'));
1034
+ // const tst = tools.getJsonFileContent(path.join(process.cwd(), 'packages', 'mywp-routes-config', 'assets', 'route-defs.test.json'));
1035
+
1036
+ // const devPaths = dev.map((p) => {
1037
+ // return p.path;
1038
+ // })
1039
+ // const tstPaths = tst.map((p) => {
1040
+ // return p.path;
1041
+ // })
1042
+
1043
+ // console.log(devPaths);
1044
+ // console.log(tstPaths);
1045
+
1046
+
1047
+ // console.log(devPaths.filter(n => !tstPaths.includes(n)))
1048
+ // console.log(tstPaths.filter(n => !devPaths.includes(n)))
1049
+ // })
1050
+
1051
+
1052
+ Promise.resolve()
1053
+ .then(() => {
1054
+ const prjName = 'my-workplace-host';
1055
+ const project = configUtils.projects.getCsdrProject(prjName);
1056
+
1057
+ return injectionUtils.routesReplacement.buildRoutes(project, 'TST', true);
1058
+ })
@@ -304,16 +304,23 @@ const replaceRoutes = (project, envTarget, build, routesFileContent, euiVersion)
304
304
  finalRouteDefs.forEach((route) => {
305
305
  if (debug) tools.logInfo(`====> route : ${route.path}`);
306
306
 
307
- if (euiVersion === 'DEFAULT' || euiVersion === '10.x') {
308
- tools.logInfo(`Legacy routes replacement for v7 and v10 => replacing ${route.path}`);
309
- placeHolderContent += replaceRouteLegacy(route);
307
+ if (!route.loadChildren) {
308
+ tools.logInfo('Loadchildren does not exist for route...skipping');
309
+ tools.logInfo('Route excluded:');
310
+ console.log(route);
310
311
 
311
312
  } else {
312
- tools.logInfo(`New route replacement for v14+ => replacing ${route.path}`);
313
- placeHolderContent += replaceRoute(route);
314
- }
313
+ if (euiVersion === 'DEFAULT' || euiVersion === '10.x') {
314
+ tools.logInfo(`Legacy routes replacement for v7 and v10 => replacing ${route.path}`);
315
+ placeHolderContent += replaceRouteLegacy(route);
316
+
317
+ } else {
318
+ tools.logInfo(`New route replacement for v14+ => replacing ${route.path}`);
319
+ placeHolderContent += replaceRoute(route);
320
+ }
315
321
 
316
- if (debug) tools.logSuccess('======> OK replaced');
322
+ if (debug) tools.logSuccess('======> OK replaced');
323
+ }
317
324
  })
318
325
 
319
326
  const placeHolderToken = '// routes-placeholder';