@eui/tools 6.12.12 → 6.12.14

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.12.12
1
+ 6.12.14
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## 6.12.14 (2023-06-23)
2
+
3
+ ##### Chores
4
+
5
+ * **other:**
6
+ * add piwik injection in index.html of remote if set in config - EUI-7121 [EUI-7121](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7121) ([e2e07b03](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/e2e07b031966d3ef64b24d54160a56637620425d))
7
+
8
+ * * *
9
+ * * *
10
+ ## 6.12.13 (2023-06-23)
11
+
12
+ ##### Chores
13
+
14
+ * **other:**
15
+ * adapted route replacement for workspace integration - MWP-9751 [MWP-9751](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9751) ([a5f0985f](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/a5f0985f0b63a27e9e4de73b1d0699d168847964))
16
+
17
+ * * *
18
+ * * *
1
19
  ## 6.12.12 (2023-06-22)
2
20
 
3
21
  ##### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.12.12",
3
+ "version": "6.12.14",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
@@ -131,7 +131,7 @@ module.exports.postBuild = (pkg, version) => {
131
131
  })
132
132
 
133
133
  .then(() => {
134
- return remotesUtils.emptyIndexHtml(path.join(pkg.paths.dist, 'bundles'));
134
+ return remotesUtils.emptyIndexHtml(path.join(pkg, pkg.paths.dist, 'bundles'));
135
135
  })
136
136
 
137
137
  .then(() => {
@@ -341,7 +341,8 @@ const processRoutesConfig = (project, envTarget, build, routesFile, routesFileCo
341
341
  // processing each routes found in the routeDefs entry
342
342
 
343
343
  mergedRoutes.forEach((route) => {
344
- tools.logInfo(`Processing route : ${route.path}`);
344
+ tools.logInfo(`Processing route : `);
345
+ console.log(route);
345
346
 
346
347
  const defRoute = routeDefsBaseJSON.filter((r) => r.path === route.path)[0];
347
348
  if (!defRoute) {
@@ -482,6 +483,9 @@ const processRoutesConfig = (project, envTarget, build, routesFile, routesFileCo
482
483
  if (link.optional) {
483
484
  routeDef.optional = link.optional;
484
485
  }
486
+ if (link.workspace) {
487
+ routeDef.workspace = link.workspace;
488
+ }
485
489
  return;
486
490
  }
487
491
  });
@@ -66,15 +66,24 @@ module.exports.copyPackageJson = (srcPath, destPath, euiVersion) => {
66
66
  }
67
67
 
68
68
 
69
- module.exports.emptyIndexHtml = (destPath) => {
69
+ module.exports.emptyIndexHtml = (pkg, destPath) => {
70
70
  return Promise.resolve()
71
71
  .then(() => {
72
72
  try {
73
- tools.logInfo('Set empty index.html');
73
+ if (pkg.build.injectPiwikScript) {
74
+ tools.logInfo('Inject index.html with piwik script embedded');
74
75
 
75
- const emptyIndexHtmlFile = path.join(__dirname, 'skeletons', 'elements', 'index.html');
76
- const outputIndexHmtlFile = path.join(destPath, 'index.html');
77
- return tools.copy(emptyIndexHtmlFile, outputIndexHmtlFile);
76
+ const emptyIndexHtmlFile = path.join(__dirname, 'skeletons', 'elements', 'index-piwik.html');
77
+ const outputIndexHmtlFile = path.join(destPath, 'index.html');
78
+ return tools.copy(emptyIndexHtmlFile, outputIndexHmtlFile);
79
+
80
+ } else {
81
+ tools.logInfo('Set empty index.html');
82
+
83
+ const emptyIndexHtmlFile = path.join(__dirname, 'skeletons', 'elements', 'index.html');
84
+ const outputIndexHmtlFile = path.join(destPath, 'index.html');
85
+ return tools.copy(emptyIndexHtmlFile, outputIndexHmtlFile);
86
+ }
78
87
 
79
88
  } catch(e) {
80
89
  console.log(e);
@@ -0,0 +1,21 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <base href="/">
6
+ <script defer src="https://europa.eu/webtools/load.js" type="text/javascript"></script>
7
+ <!--Used for analytics-->
8
+ <script type="application/json">
9
+ {
10
+ "utility": "piwik",
11
+ "siteID": 237,
12
+ "instance": "ec.europa.eu",
13
+ "sitePath": ["ec.europa.eu\/info"],
14
+ "siteSection": "info classFundingTenders opportunities",
15
+ "mode": "manual"
16
+ }
17
+ </script>
18
+ </head>
19
+ <body>
20
+ </body>
21
+ </html>
@@ -106,7 +106,7 @@ module.exports.serve = (remote = false) => {
106
106
  })
107
107
 
108
108
  .then(() => {
109
- return remotesUtils.emptyIndexHtml(destPath);
109
+ return remotesUtils.emptyIndexHtml(pkg, destPath);
110
110
  })
111
111
 
112
112
  .catch((e) => {