@eui/tools 6.12.45 → 6.12.46

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.45
1
+ 6.12.46
package/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 6.12.46 (2023-08-17)
2
+
3
+ ##### Chores
4
+
5
+ * **other:**
6
+ * csdr-remotes-config defs from global config for MFE generic portal seperated config - EUI-7680 [EUI-7680](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7680) ([7b186e72](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/7b186e729197b618721a8991532f261b239b8838))
7
+
8
+ * * *
9
+ * * *
1
10
  ## 6.12.45 (2023-08-17)
2
11
 
3
12
  ##### Chores
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.12.45",
3
+ "version": "6.12.46",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
@@ -55,7 +55,9 @@ const generateRemote = (args = constants.DEFAULT_CONFIG) => {
55
55
  tools.logInfo('In target path');
56
56
  console.log(targetPath);
57
57
 
58
- const remoteConfigTargetPath = path.join(process.cwd(), 'packages', 'csdr-remotes-config', 'assets', args.fullName);
58
+ const configOptions = configUtils.global.getConfigOptions();
59
+
60
+ const remoteConfigTargetPath = path.join(configOptions.CSDR_REMOTES_CONFIG_PATH , 'assets', args.fullName);
59
61
 
60
62
  return Promise.resolve()
61
63
  // INIT and cleanup
@@ -88,7 +90,7 @@ const generateRemote = (args = constants.DEFAULT_CONFIG) => {
88
90
 
89
91
  // CLEANING REMOTES CONFIG ENTRY
90
92
  .then(() => {
91
- tools.logInfo('Cleaning csdr-remotes-config target entry');
93
+ tools.logInfo('Cleaning remotes-config target entry');
92
94
  return tools.rimraf(remoteConfigTargetPath + '/**/*');
93
95
  })
94
96
 
@@ -99,7 +101,7 @@ const generateRemote = (args = constants.DEFAULT_CONFIG) => {
99
101
  remoteConfigTargetPath
100
102
  );
101
103
 
102
- tools.logInfo('Replace sources content in csdr-remotes-config target entry');
104
+ tools.logInfo('Replace sources content in remotes-config target entry');
103
105
  replaceContent(remoteConfigTargetPath, args.pkgName, args.pkgScope, args.fullName);
104
106
  })
105
107
 
@@ -229,6 +229,8 @@ module.exports.getConfigOptions = () => {
229
229
  DEVOPS_METADATA_PATH: null,
230
230
  DEVOPS_METADATA_LOCKS_PATH: null,
231
231
  DEVOPS_CONFIG_JSON: '.devops-config.json',
232
+ CSDR_REMOTES_CONFIG_REPOSITORY: null,
233
+ CSDR_REMOTES_CONFIG_PATH: null,
232
234
  ISSUES_MANAGER_HOST: null,
233
235
  NPM_REGISTRY_DEFAULT: null,
234
236
  NPM_REGISTRY_DEFAULT_2: null,
@@ -268,6 +270,19 @@ module.exports.getConfigOptions = () => {
268
270
  }
269
271
  }
270
272
 
273
+ // csdr remotes config options
274
+ const csdrRemotesConfig = config && config.csdrRemotesConfig;
275
+
276
+ if (csdrRemotesConfig) {
277
+ if (csdrRemotesConfig.repository) {
278
+ configOptions.CSDR_REMOTES_CONFIG_REPOSITORY = csdrRemotesConfig.repository;
279
+ }
280
+
281
+ if (csdrRemotesConfig.folder) {
282
+ configOptions.CSDR_REMOTES_CONFIG_PATH = path.join(process.cwd(), csdrRemotesConfig.folder);
283
+ }
284
+ }
285
+
271
286
  // getting issues manager options
272
287
  const issuesManager = config && config.issuesManager;
273
288
 
@@ -5,13 +5,13 @@ const path = require('path');
5
5
 
6
6
  // LOCAL
7
7
  const tools = require('../../utils/tools');
8
+ const configUtils = require('../config/config-utils');
8
9
 
9
10
  // INNER
10
11
  const innerGlobal = require('./global');
11
12
  const innerPackages = require('./packages');
12
13
 
13
14
 
14
-
15
15
  module.exports.getRemote = (remoteName) => {
16
16
  // if not provided as param, we fetch them from the command line (local operations)
17
17
  if (!remoteName) {
@@ -21,10 +21,12 @@ module.exports.getRemote = (remoteName) => {
21
21
  const remotesConfig = require(path.join(process.cwd(), '.csdr', '.euirc-csdr-remotes.json'));
22
22
  const remoteConfig = remotesConfig[remoteName];
23
23
 
24
- const remotePath = path.join(process.cwd(), 'packages', 'csdr-remotes-config', 'assets', remoteName);
24
+ const configOptions = configUtils.global.getConfigOptions();
25
+
26
+ const remotePath = path.join(configOptions.CSDR_REMOTES_CONFIG_PATH , 'assets', remoteName);
25
27
 
26
28
  if (!tools.isDirExists(remotePath)) {
27
- throw new Error(`Remote ${remoteName} cannot be found in the remotes global config - check packages/csdr-remotes-config for available remotes`);
29
+ throw new Error(`Remote ${remoteName} cannot be found in the remotes global config - check ${configOptions.CSDR_REMOTES_CONFIG_PATH} for available remotes`);
28
30
  }
29
31
 
30
32
  const remoteRootPath = path.join(process.cwd(), 'remotes', remoteName);