@eui/tools 5.3.47 → 5.3.49

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
- 5.3.47
1
+ 5.3.49
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## 5.3.49 (2022-09-16)
2
+
3
+ ##### Bug Fixes
4
+
5
+ * **other:**
6
+ * remove backend locks - exception not rethrown in case of ui locks - 15m for auto-unlocking - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([abb792a5](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/abb792a5fd391e0eab7c09e9bdfa40b31e951e3b))
7
+
8
+ * * *
9
+ * * *
10
+ ## 5.3.48 (2022-09-15)
11
+
12
+ ##### Bug Fixes
13
+
14
+ * **other:**
15
+ * master build of package take snapshots as dependencies - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([fc0fca99](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/fc0fca99b916e2f7fe4cd147c73452395bbf363d))
16
+
17
+ * * *
18
+ * * *
1
19
  ## 5.3.47 (2022-09-15)
2
20
 
3
21
  ##### Chores
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "5.3.47",
3
+ "version": "5.3.49",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
@@ -10,11 +10,11 @@ const innerRemotes = require('./remotes');
10
10
 
11
11
 
12
12
 
13
- module.exports.installPackage = (prj, pkg) => {
13
+ module.exports.installPackage = (prj, pkg, isMaster) => {
14
14
  return Promise.resolve()
15
15
  // checking remotes
16
16
  .then(() => {
17
- return innerPackages.installDeps(prj, pkg);
17
+ return innerPackages.installDeps(prj, pkg, isMaster);
18
18
  })
19
19
 
20
20
  // returning metadata dependencies
@@ -14,7 +14,7 @@ const innerCommon = require('./common');
14
14
  const innerProjects = require('./projects');
15
15
 
16
16
 
17
- module.exports.installDeps = (prj, pkg) => {
17
+ module.exports.installDeps = (prj, pkg, isMaster) => {
18
18
  let compositeDeps, localPkgDeps, localPkgCompositeDeps;
19
19
 
20
20
  return Promise.resolve()
@@ -62,7 +62,7 @@ module.exports.installDeps = (prj, pkg) => {
62
62
  })
63
63
 
64
64
  .then((depsMetadata) => {
65
- return innerCommon.getRemappedDeps(depsMetadata, localPkgCompositeDeps);
65
+ return innerCommon.getRemappedDeps(depsMetadata, localPkgCompositeDeps, isMaster);
66
66
  })
67
67
 
68
68
  .then((remappedLocalPkgCompositeDeps) => {
@@ -533,11 +533,11 @@ module.exports.isPackageLocked = (pkg) => {
533
533
 
534
534
  tools.logInfo(`checking diff current date from locked date : ${diff}`);
535
535
 
536
- if (diff > 30) {
537
- tools.logInfo(`> 30m => ok forcing unlock`);
536
+ if (diff > 15) {
537
+ tools.logInfo(`> 15m => ok forcing unlock`);
538
538
  return false;
539
539
  } else {
540
- tools.logInfo(`< 30m => keep lock`);
540
+ tools.logInfo(`< 15m => keep lock`);
541
541
  return true;
542
542
  }
543
543
 
@@ -154,16 +154,18 @@ module.exports.preReleaseChecks = (pkg) => {
154
154
 
155
155
  // CHECKING PACKAGE LOCK STATE - AVOID SAME PACKAGE RUN issuing race conditions
156
156
  .then(() => {
157
- utils.tools.logTitle('Checking package lock state');
157
+ if (!pkg.backend) {
158
+ utils.tools.logTitle('Checking package lock state');
158
159
 
159
- // if package is locked, exception is thrown, check this specific exception handling in the global catch
160
- if (metadataUtils.package.isPackageLocked(pkg)) {
161
- utils.tools.logInfo('Package is locked ==> throwing exception');
162
- throw 'PACKAGE_LOCKED';
160
+ // if package is locked, exception is thrown, check this specific exception handling in the global catch
161
+ if (metadataUtils.package.isPackageLocked(pkg)) {
162
+ utils.tools.logInfo('Package is locked ==> throwing exception');
163
+ throw 'PACKAGE_LOCKED';
163
164
 
164
- // if package is not locked, we lock it
165
- } else {
166
- return metadataUtils.package.lockPackage(pkg);
165
+ // if package is not locked, we lock it
166
+ } else {
167
+ return metadataUtils.package.lockPackage(pkg);
168
+ }
167
169
  }
168
170
  })
169
171
 
@@ -599,7 +601,9 @@ module.exports.sendSuccessNotification = (pkg, version, pkgMetadata) => {
599
601
  })
600
602
 
601
603
  .then(() => {
602
- return metadataUtils.package.unlockPackage(pkg);
604
+ if (!pkg.backend) {
605
+ return metadataUtils.package.unlockPackage(pkg);
606
+ }
603
607
  });
604
608
  })
605
609
  }
@@ -629,9 +633,18 @@ module.exports.sendErrorNotification = (pkg, exception, pkgMetadata) => {
629
633
  })
630
634
 
631
635
  .then(() => {
632
- // in case of package locked detected, we don't unlock the package
633
- if (exception !== 'PACKAGE_LOCKED') {
634
- return metadataUtils.package.unlockPackage(pkg);
636
+ if (!pkg.backend) {
637
+ // in case of package locked detected, we don't unlock the package
638
+ if (exception !== 'PACKAGE_LOCKED') {
639
+ return Promise.resolve()
640
+ .then(() => {
641
+ return metadataUtils.package.unlockPackage(pkg);
642
+ })
643
+ .catch((e) => {
644
+ utils.tools.logError('ERROR UNLOCKING PACKAGE');
645
+ console.log(e);
646
+ })
647
+ }
635
648
  }
636
649
  })
637
650
 
@@ -14,7 +14,6 @@ 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');
18
17
 
19
18
 
20
19
  module.exports.run = () => {
@@ -87,11 +86,8 @@ module.exports.run = () => {
87
86
  if (pkg.remote) {
88
87
  return innerRemote.install(pkg, envTarget, compositeType);
89
88
 
90
- // } else if (pkg.backend) {
91
- // return innerBackend.install(pkg);
92
-
93
89
  } else {
94
- return innerUi.install(pkg);
90
+ return innerUi.install(pkg, branches.isMaster);
95
91
  }
96
92
  })
97
93
  .then((compositeDeps) => {
@@ -3,8 +3,12 @@
3
3
  // GLOBAL
4
4
  const path = require('path');
5
5
  const installUtils = require('../../install/install-utils');
6
+ const tools = require('../../../utils/tools');
7
+
6
8
 
7
9
  module.exports.install = (pkg, envTarget, compositeType) => {
10
+ tools.logBanner('INSTALL');
11
+
8
12
  var pkgCompositeDeps = {};
9
13
 
10
14
  return Promise.resolve()
@@ -12,7 +12,9 @@ const notificationUtils = require('../../../utils/notification/notification-util
12
12
  const tools = require('../../../utils/tools');
13
13
 
14
14
 
15
- module.exports.install = (pkg) => {
15
+ module.exports.install = (pkg, isMaster) => {
16
+ tools.logBanner('INSTALL');
17
+
16
18
  return Promise.resolve()
17
19
 
18
20
  // FETCHING CURRENT PACKAGES & INSTALL
@@ -21,7 +23,7 @@ module.exports.install = (pkg) => {
21
23
  const prj = configUtils.projects.getProject();
22
24
 
23
25
  // install the dependencies for current package build
24
- return installUtils.buildPackage.installPackage(prj, pkg);
26
+ return installUtils.buildPackage.installPackage(prj, pkg, isMaster);
25
27
  })
26
28
 
27
29
 
package/scripts/index.js CHANGED
@@ -124,7 +124,6 @@ module.exports.metadataStats = require('./csdr/metadata/stats');
124
124
 
125
125
  // csdr - release
126
126
  module.exports.realeaseApp = require('./csdr/release/app/release-app');
127
- module.exports.releasePackageBackend = require('./csdr/release/package/backend');
128
127
  module.exports.releasePackageCommon = require('./csdr/release/package/common');
129
128
  module.exports.releasePackage = require('./csdr/release/package/release-package');
130
129
  module.exports.releasePackageRemote = require('./csdr/release/package/remote');
@@ -61,7 +61,7 @@ module.exports.getMessage = (options) => {
61
61
 
62
62
  case 'PACKAGE_LOCKED':
63
63
  message.detailTitle = 'CONCURRENT BUILD DETECTED FOR PACKAGE - ABORTING!';
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';
64
+ message.detailText = 'Another build has been detected for the current package being build\n Retry again this build after 15m, lock will be auto-cleared';
65
65
  break;
66
66
 
67
67
  case 'MULTIPLE_LOCAL_EUI_VERSIONS_FOUND':
@@ -1,26 +0,0 @@
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) => {
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);
20
- })
21
-
22
- .catch((e) => {
23
- throw e;
24
- })
25
- }
26
-