@eui/tools 6.11.5 → 6.11.7

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.11.5
1
+ 6.11.7
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## 6.11.7 (2023-04-18)
2
+
3
+ ##### Bug Fixes
4
+
5
+ * **other:**
6
+ * routes replacement not overriding local config if provided - MWP-9533 [MWP-9533](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9533) ([931623c5](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/931623c5ce06279ab3325255bc719ea7f5074aaa))
7
+
8
+ * * *
9
+ * * *
10
+ ## 6.11.6 (2023-04-18)
11
+
12
+ ##### Bug Fixes
13
+
14
+ * **other:**
15
+ * adapted virtual remotes release and msteams notifications - EUI-7121 [EUI-7121](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7121) ([a508f7bf](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/a508f7bf46290dafcdbaf18890e18e914a9b9ee7))
16
+
17
+ * * *
18
+ * * *
1
19
  ## 6.11.5 (2023-04-17)
2
20
 
3
21
  ##### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.11.5",
3
+ "version": "6.11.7",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
package/sandbox.js CHANGED
@@ -1224,8 +1224,8 @@ const versionUtils = require('./scripts/csdr/version/version-utils');
1224
1224
 
1225
1225
  Promise.resolve()
1226
1226
  .then(() => {
1227
- const pkgName = 'ppgms-core-eui10-remote-el-ui-not';
1228
- const remote = configUtils.remotes.isVirtualRemote(pkgName);
1227
+ const pkgName = 'mapar-administration-eui15-remote-el-ui';
1228
+ const remote = configUtils.remotes.getRemote(pkgName);
1229
1229
 
1230
1230
  console.log(remote);
1231
1231
  })
@@ -50,6 +50,15 @@ module.exports.getRemote = (remoteName) => {
50
50
  ...remoteConfig,
51
51
  }
52
52
 
53
+ // check notification method
54
+ if (remote.notification) {
55
+ if (remote.notification.client === 'MSTEAMS') {
56
+ remote.msteamsActive = true;
57
+ } else {
58
+ remote.msteamsActive = false;
59
+ }
60
+ }
61
+
53
62
  if (!remote.dependencies.composite) {
54
63
  throw new Error('The remote config does not contains the manadatory "composite" dependencies');
55
64
  }
@@ -341,7 +341,7 @@ module.exports.unlockPackage = (pkg) => {
341
341
  })
342
342
 
343
343
  .catch((e) => {
344
- throw e;
344
+ tools.logError('Unable to unlock package => package will be auto-unlock at next build 10m after the current one');
345
345
  })
346
346
  }
347
347
 
@@ -363,11 +363,11 @@ module.exports.isPackageLocked = (pkg) => {
363
363
 
364
364
  tools.logInfo(`checking diff current date from locked date : ${diff}`);
365
365
 
366
- if (diff > 15) {
367
- tools.logInfo(`> 15m => ok forcing unlock`);
366
+ if (diff > 10) {
367
+ tools.logInfo(`> 10m => ok forcing unlock`);
368
368
  return false;
369
369
  } else {
370
- tools.logInfo(`< 15m => keep lock`);
370
+ tools.logInfo(`< 10m => keep lock`);
371
371
  return true;
372
372
  }
373
373
 
@@ -213,6 +213,7 @@ module.exports.run = () => {
213
213
  });
214
214
  })
215
215
 
216
+ // SEND ERROR NOTIFICATION
216
217
  .catch((e) => {
217
218
  return innerCommon.sendErrorNotification(pkg, e, pkgMetadata)
218
219
  .then(() => {
@@ -140,15 +140,18 @@ module.exports.run = () => {
140
140
  .then(() => {
141
141
  return innerCommon.sendSuccessNotification(pkg, newVersion, pkgMetadata)
142
142
  .then(() => {
143
- innerCommon.close(pkg);
143
+ return innerCommon.close(pkg);
144
144
  });
145
145
  })
146
146
 
147
+ // SEND ERROR NOTIFICATION
147
148
  .catch((e) => {
148
149
  return innerCommon.sendErrorNotification(pkg, e, pkgMetadata)
149
150
  .then(() => {
150
- innerCommon.close(pkg);
151
+ return innerCommon.close(pkg);
152
+ })
153
+ .then(() => {
151
154
  process.exit(1);
152
- });
155
+ })
153
156
  })
154
157
  }
@@ -10,7 +10,7 @@ const configUtils = require('../../../csdr/config/config-utils');
10
10
  const preBuildUtils = require('../../pre-build/pre-build-utils');
11
11
  const remotesUtils = require('../../remotes/remotes-utils');
12
12
 
13
- let { configuration, baseHref, dryRun, statsJson, sourceMap, build } = tools.getArgs();
13
+ let { configuration, baseHref, dryRun, statsJson, sourceMap, build, skipCompile } = tools.getArgs();
14
14
 
15
15
 
16
16
  module.exports.build = (pkg, isMaster) => {
@@ -78,8 +78,13 @@ module.exports.build = (pkg, isMaster) => {
78
78
  tools.logInfo(`running Angular BUILD with args: ${args} on`);
79
79
  console.log(pkg.paths.root);
80
80
 
81
- if (!dryRun) {
82
- return execa('node', args, { cwd: pkg.paths.root, stdio: 'inherit' });
81
+ if (!skipCompile) {
82
+ if (build && pkg.msteamsActive) {
83
+ return tools.runNodeScriptProcessOutput(args, pkg.paths.root);
84
+
85
+ } else {
86
+ return execa('node', args, { cwd: pkg.paths.root, stdio: 'inherit' });
87
+ }
83
88
  }
84
89
  })
85
90
 
@@ -275,6 +275,8 @@ const processRoutesConfig = (project, envTarget, build, routesFile, routesFileCo
275
275
  const euiVersionNumber = euiVersion.split('.')[0];
276
276
  const envTargetFinal = getEnvTarget(envTarget, build);
277
277
 
278
+ tools.logInfo(`Processing for envTarget : ${envTargetFinal}`);
279
+
278
280
  // getting the input file definitions of routes for replacements
279
281
  // from tokenized template in config -- allowing to control playground vs normal env (when using the MWP HOST for release)
280
282
  // format :
@@ -287,6 +289,7 @@ const processRoutesConfig = (project, envTarget, build, routesFile, routesFileCo
287
289
  throw 'ROUTES_CONFIG_V2_TEMPLATE_NOT_FOUND';
288
290
  }
289
291
 
292
+
290
293
  routeDefsInputFilename = project.externalRoutesSources.routesFilenameTemplate.replace('@eui.version@', euiVersionNumber);
291
294
  routeDefsInputFilename = routeDefsInputFilename.replace('@env.target@', envTargetFinal);
292
295
 
@@ -303,13 +306,40 @@ const processRoutesConfig = (project, envTarget, build, routesFile, routesFileCo
303
306
 
304
307
  const routeDefsInputJSON = require(path.join(routeDefsInputPath));
305
308
 
309
+ // Merging content with "local" route file defs if existing
310
+
311
+ let mergedRoutes = [];
312
+
313
+ if (envTargetFinal.indexOf('local') > -1) {
314
+ const localRouteDefsInputFilename = `route-defs.${envTargetFinal}.json`;
315
+ const localRouteDefsInputPath = path.join(projectAssetsPath, localRouteDefsInputFilename);
316
+
317
+ if (tools.isFileExists(localRouteDefsInputPath)) {
318
+ tools.logInfo(`Merging local configuration found : ${localRouteDefsInputFilename}`);
319
+ const localRouteDefsInputJSON = require(path.join(localRouteDefsInputPath));
320
+
321
+ routeDefsInputJSON.forEach((route) => {
322
+ const matchedRoute = localRouteDefsInputJSON.filter(newRoute => newRoute.path === route.path)[0];
323
+ if (matchedRoute) {
324
+ tools.logInfo(`-- replacing ${route.path} route entry with overriden local config`);
325
+ tools.logInfo(`-----> ${JSON.stringify(matchedRoute)}`);
326
+ mergedRoutes.push(matchedRoute);
327
+ } else {
328
+ mergedRoutes.push(route);
329
+ }
330
+ });
331
+ }
332
+ } else {
333
+ mergedRoutes = routeDefsInputJSON;
334
+ }
335
+
306
336
  const appRoutes = [],
307
337
  appFeatureLibs = [],
308
338
  finalRemotesDefs = [];
309
339
 
310
340
  // processing each routes found in the routeDefs entry
311
341
 
312
- routeDefsInputJSON.forEach((route) => {
342
+ mergedRoutes.forEach((route) => {
313
343
  tools.logInfo(`Processing route : ${route.path}`);
314
344
 
315
345
  const defRoute = routeDefsBaseJSON.filter((r) => r.path === route.path)[0];