@eui/tools 6.2.9 → 6.2.11

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.9
1
+ 6.2.11
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## 6.2.11 (2022-11-11)
2
+
3
+ ##### Chores
4
+
5
+ * **other:**
6
+ * adapted init parameters for CI virtual remotes build - MWP-9010 [MWP-9010](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9010) ([b28cf25b](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/b28cf25bb9302f6161de724e1110bc216deba5ae))
7
+
8
+ * * *
9
+ * * *
10
+ ## 6.2.10 (2022-11-11)
11
+
12
+ ##### Chores
13
+
14
+ * **other:**
15
+ * adapted init parameters for CI virtual remotes build - MWP-9010 [MWP-9010](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9010) ([5a5e28de](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/5a5e28de787650552cd282d722f2a55424ff1a63))
16
+
17
+ * * *
18
+ * * *
1
19
  ## 6.2.9 (2022-11-11)
2
20
 
3
21
  ##### Chores
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.2.9",
3
+ "version": "6.2.11",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
@@ -17,8 +17,6 @@ module.exports.run = (args) => {
17
17
  return Promise.resolve()
18
18
  .then(() => {
19
19
  tools.logInfo('Updating local configuration')
20
- tools.logInfo('Current configuration: ');
21
- console.log(args);
22
20
 
23
21
  return getInputPackages(args.project, args.pkg, args.team, args.prjOnly, args.containerOnly);
24
22
  })
@@ -8,7 +8,7 @@ const configUtils = require('../config/config-utils');
8
8
  // Getting arguments if they are provided for the CI/CD pipeline
9
9
  const {
10
10
  project, team, pkg, branch, configOnly, skipClone, skipInstall, reset, pkgOnly, prjOnly,
11
- build, containerOnly, skipAppContainers, remote, euiVersion, remoteOnly
11
+ build, containerOnly, skipAppContainers, remote, euiVersion, remoteOnly, remoteBuild, virtual
12
12
  } = tools.getArgs();
13
13
 
14
14
 
@@ -19,6 +19,8 @@ module.exports.init = () => {
19
19
  team: team || 'all',
20
20
  pkg: pkg || null,
21
21
  remote: remote || null,
22
+ remoteBuild: remoteBuild || false,
23
+ virtual: virtual || false,
22
24
  euiVersion: euiVersion || null,
23
25
  branch: branch || 'develop',
24
26
  configOnly: configOnly || false,
@@ -37,15 +39,34 @@ module.exports.init = () => {
37
39
  initialResponse.branch = 'develop';
38
40
  }
39
41
 
42
+ // converting inputs
43
+ if (initialResponse.branch && typeof (initialResponse.branch) === 'boolean') {
44
+ initialResponse.branch = 'develop';
45
+ }
46
+ if (initialResponse.remoteBuild && typeof (initialResponse.remoteBuild) === 'boolean') {
47
+ initialResponse.remoteBuild = false;
48
+ }
49
+ if (initialResponse.virtual && typeof (initialResponse.virtual) === 'boolean') {
50
+ initialResponse.virtual = false;
51
+ }
52
+ if (initialResponse.euiVersion && typeof (initialResponse.euiVersion) === 'boolean') {
53
+ initialResponse.euiVersion = null;
54
+ }
55
+
40
56
  // setting project to null if forced to NONE
41
57
  if (initialResponse.project === 'NONE') {
42
58
  initialResponse.project = null;
43
59
  }
44
60
 
61
+ // swapping to remote build if virtual remote is pass to default gitlab call
62
+ if (initialResponse.remoteBuild && initialResponse.pkg && initialResponse.virtual) {
63
+ initialResponse.remote = initialResponse.pkg;
64
+ initialResponse.pkg = null;
65
+ }
66
+
45
67
  // Storing the response for propagation
46
68
  var finalResponse;
47
69
 
48
-
49
70
  return Promise.resolve()
50
71
  .then(() => {
51
72
 
@@ -62,6 +83,9 @@ module.exports.init = () => {
62
83
  // merge with response found from prompts
63
84
  .then((response) => {
64
85
  finalResponse = { ...initialResponse, ...response };
86
+
87
+ tools.logInfo('Init configuration :');
88
+ console.log(finalResponse);
65
89
  })
66
90
 
67
91
  // Initializing .euirc.json local file - the core of CSDR operations
@@ -84,21 +108,21 @@ module.exports.init = () => {
84
108
 
85
109
  // Initializing .meta based on .euirc.json for local respoisitories cloning
86
110
  .then(() => {
87
- if (!remote) {
111
+ if (!finalResponse.remote) {
88
112
  return initUtils.meta.init();
89
113
  }
90
114
  })
91
115
 
92
116
  // Cloning repositories based on the .meta file generated
93
117
  .then(() => {
94
- if (!skipClone && !remote) {
118
+ if (!skipClone && !finalResponse.remote) {
95
119
  return initUtils.repos.init(finalResponse);
96
120
  }
97
121
  })
98
122
 
99
123
  // Importing packages and generating definitions
100
124
  .then(() => {
101
- if (!remote) {
125
+ if (!finalResponse.remote) {
102
126
  return initUtils.packages.importPackages(finalResponse);
103
127
  }
104
128
  })
@@ -114,10 +138,9 @@ module.exports.init = () => {
114
138
  .then(() => {
115
139
  if (finalResponse.remote) {
116
140
  if (finalResponse.euiVersion) {
117
- return initUtils.remotes.generateVirtualRemote(remote, euiVersion);
141
+ return initUtils.remotes.generateVirtualRemote(finalResponse.remote, finalResponse.euiVersion);
118
142
  } else {
119
- tools.logError('When a remote is initialized, an "euiVersion" parameter must be specified');
120
- process.exit(1);
143
+ throw new Error('When a remote is initialized, an "euiVersion" parameter must be specified');
121
144
  }
122
145
  }
123
146
  })
@@ -140,9 +163,9 @@ module.exports.init = () => {
140
163
  if (!build && !skipInstall) {
141
164
  if (finalResponse.pkgOnly || finalResponse.remoteOnly) {
142
165
  if (finalResponse.remote) {
143
- return installUtils.localDev.installRemote(remote);
166
+ return installUtils.localDev.installRemote(finalResponse.remote);
144
167
  } else {
145
- return installUtils.localDev.installPackage(pkg);
168
+ return installUtils.localDev.installPackage(finalResponse.pkg);
146
169
  }
147
170
  } else {
148
171
  return installUtils.localDev.install();
@@ -177,7 +200,7 @@ module.exports.init = () => {
177
200
 
178
201
  // Attaching external mock repo for project
179
202
  .then(() => {
180
- if (finalResponse.project && !build && !prjOnly) {
203
+ if (finalResponse.project && !build && !finalResponse.prjOnly) {
181
204
  return initUtils.projects.importExternalMock();
182
205
  }
183
206
  })