@eui/tools 6.5.1 → 6.5.3

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.5.1
1
+ 6.5.3
package/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
1
+ ## 6.5.3 (2023-03-02)
2
+
3
+ ##### Chores
4
+
5
+ * **other:**
6
+ * Apply SonarQube Citnet naming convention MWP-9366 [MWP-9366](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9366) ([3f31397d](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/3f31397d90c20deab0060dc3e71087b96fc6b390))
7
+ * SonarQube Citnet nameing convention ([bc50d5c3](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/bc50d5c3bab190a975e862f9b55d4a0af6628c30))
8
+ * Change name for soanrqube template for project key. Name remains the same, key has to be changed to comply ([5a1a420e](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/5a1a420eb3991eeab2b99ed8a5a74af86d416e20))
9
+
10
+ * * *
11
+ * * *
12
+ ## 6.5.2 (2023-03-02)
13
+
14
+ ##### Chores
15
+
16
+ * **other:**
17
+ * enhanced csdr-app for custom installation of MWP - MWP-9204 [MWP-9204](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9204) ([f457624e](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/f457624e91b20020bc47704e5a5fd27589026f35))
18
+
19
+ * * *
20
+ * * *
1
21
  ## 6.5.1 (2023-03-01)
2
22
 
3
23
  ##### Chores
package/LICENSE CHANGED
@@ -293,3 +293,4 @@ Appendix
293
293
  * Common Public License v. 1.0
294
294
  * Eclipse Public License v. 1.0
295
295
  * Cecill v. 2.0
296
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.5.1",
3
+ "version": "6.5.3",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
@@ -156,7 +156,8 @@
156
156
  <button
157
157
  class="btn btn-primary"
158
158
  type="button"
159
- :disabled="selectedRemotes.length === 0">
159
+ :disabled="selectedRemotes.length === 0"
160
+ @click="saveConfig()">
160
161
  Save configuration
161
162
  </button>
162
163
 
@@ -202,6 +203,7 @@
202
203
  },
203
204
  created() {
204
205
  this.getRemotes();
206
+ this.getConfig();
205
207
  },
206
208
  methods: {
207
209
  async getRemotes() {
@@ -212,6 +214,18 @@
212
214
  this.remotes = finalRes;
213
215
  this.getRemotesToInstall();
214
216
  },
217
+ async getConfig() {
218
+ const res = await fetch(
219
+ "http://localhost:3000/api/config"
220
+ );
221
+ const finalRes = await res.json();
222
+ if (finalRes.selectedRemotes) {
223
+ this.selectedRemotes = finalRes.selectedRemotes;
224
+ this.deps = finalRes.deps;
225
+ this.packages = finalRes.packages;
226
+ this.remotesToInstall = finalRes.remotesToInstall;
227
+ }
228
+ },
215
229
  async getPackages() {
216
230
  const res = await fetch(
217
231
  "http://localhost:3000/api/remotes/packages",
@@ -237,6 +251,19 @@
237
251
  return !this.selectedRemotes.includes(r);
238
252
  });
239
253
  },
254
+ async saveConfig() {
255
+ console.log('Saving configuration...');
256
+ const res = await fetch(
257
+ "http://localhost:3000/api/config",
258
+ getRequestBody({
259
+ selectedRemotes: this.selectedRemotes,
260
+ deps: this.deps,
261
+ packages: this.packages,
262
+ remotesToInstall: this.remotesToInstall
263
+ })
264
+ );
265
+ const finalRes = await res.json();
266
+ },
240
267
  },
241
268
  });
242
269
  </script>
@@ -60,6 +60,31 @@ router.post('/remotes/stats', function (req, res) {
60
60
  });
61
61
 
62
62
 
63
+ router.get('/config', function (req, res) {
64
+ return Promise.resolve()
65
+ .then(() => {
66
+ return configUtils.global.getCustomConfig();
67
+ })
68
+ .then((customConfig) => {
69
+ res.send(customConfig);
70
+ })
71
+ .catch((e) => {
72
+ console.log(e);
73
+ })
74
+ });
75
+
76
+
77
+
78
+ router.post('/config', function (req, res) {
79
+ return Promise.resolve()
80
+ .then(() => {
81
+ return configUtils.global.generateCustomConfig(req.body);
82
+ })
83
+ .catch((e) => {
84
+ console.log(e);
85
+ })
86
+ });
87
+
63
88
 
64
89
  // Export API routes
65
90
  module.exports = router;
@@ -405,3 +405,17 @@ module.exports.getLocalEuiVersion = () => {
405
405
  return null;
406
406
  }
407
407
  }
408
+
409
+
410
+ module.exports.generateCustomConfig = (customConfig) => {
411
+ const configFile = path.join(process.cwd(), '.csdr', '.euirc-csdr-custom.json');
412
+
413
+ return tools.writeJsonFileSync(configFile, customConfig);
414
+ }
415
+
416
+
417
+ module.exports.getCustomConfig = () => {
418
+ const configFile = path.join(process.cwd(), '.csdr', '.euirc-csdr-custom.json');
419
+
420
+ return tools.getJsonFileContent(configFile) || null;
421
+ }
@@ -1,4 +1,4 @@
1
- sonar.projectKey=@project.groupid@.@project.name@
1
+ sonar.projectKey=CSDR-@project.groupid@.@project.name@
2
2
  sonar.projectName=@project.name@
3
3
  sonar.projectVersion=@project.version@
4
4
 
@@ -1,4 +1,4 @@
1
- sonar.projectKey=eu.europa.ec.digit.eui.@project.name@
1
+ sonar.projectKey=CSDR-@project.name@
2
2
  sonar.projectName=@project.name@
3
3
  sonar.projectVersion=@project.version@
4
4