@eui/tools 6.3.35 → 6.3.37

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.3.35
1
+ 6.3.37
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## 6.3.37 (2023-02-17)
2
+
3
+ ##### Chores
4
+
5
+ * **other:**
6
+ * added dynamic forms for full remote skeleton injection - MWP-9204 [MWP-9204](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9204) ([22d0cd8a](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/22d0cd8adbde4fd2422eb73bfd99e4c30dfa8736))
7
+
8
+ * * *
9
+ * * *
10
+ ## 6.3.36 (2023-02-15)
11
+
12
+ ##### Bug Fixes
13
+
14
+ * **other:**
15
+ * remotes initialisation issues - MWP-9204 [MWP-9204](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9204) ([bac59a6c](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/bac59a6c5e1b9329d01373b5cee1be1c8b613d3b))
16
+
17
+ * * *
18
+ * * *
1
19
  ## 6.3.35 (2023-02-15)
2
20
 
3
21
  ##### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.3.35",
3
+ "version": "6.3.37",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
package/sandbox.js CHANGED
@@ -1134,18 +1134,6 @@ const versionUtils = require('./scripts/csdr/version/version-utils');
1134
1134
  // console.log(e);
1135
1135
  // })
1136
1136
 
1137
- // const prj = configUtils.projects.getCsdrProject('my-workplace-host-playground');
1138
-
1139
- // Promise.resolve()
1140
- // .then(() => {
1141
- // return installUtils.projects.getLocalProjectRemoteDeps(prj);
1142
- // })
1143
- // .then((deps) => {
1144
- // return installUtils.projects.importLocalProjectRemotes(prj, deps);
1145
- // })
1146
- // .then(() => {
1147
- // })
1148
-
1149
1137
 
1150
1138
  // Promise.resolve()
1151
1139
  // .then(() => {
@@ -1165,11 +1153,31 @@ const versionUtils = require('./scripts/csdr/version/version-utils');
1165
1153
  // .then(() => {
1166
1154
  // console.log('ok');
1167
1155
  // })
1156
+ // Promise.resolve()
1157
+ // .then(() => {
1158
+ // const pkg = configUtils.packages.getPackage('mywp-eusearch-eui10-remote-el-ui');
1159
+ // const euiVersion = configUtils.packages.getPackageEuiVersion(pkg, true);
1160
+ // console.log(euiVersion);
1161
+ // })
1162
+ // Promise.resolve()
1163
+ // .then(() => {
1164
+ // // const packages = configUtils.packages.getCsdrPackages();
1165
+ // // console.log(packages);
1166
+ // const remotes = configUtils.remotes.getCsdrRemotes();
1167
+ // console.log(remotes);
1168
+ // })
1169
+
1170
+ const prj = configUtils.projects.getCsdrProject('my-workplace-host-playground');
1171
+
1172
+
1168
1173
  Promise.resolve()
1169
1174
  .then(() => {
1170
- const pkg = configUtils.packages.getPackage('mywp-eusearch-eui10-remote-el-ui');
1171
- const euiVersion = configUtils.packages.getPackageEuiVersion(pkg, true);
1172
- console.log(euiVersion);
1175
+ return installUtils.projects.getLocalProjectRemoteDeps(prj);
1176
+ })
1177
+ .then((deps) => {
1178
+ return installUtils.projects.importLocalProjectRemotes(prj, deps);
1179
+ })
1180
+ .then(() => {
1173
1181
  })
1174
1182
 
1175
1183
 
@@ -27,7 +27,7 @@ module.exports.run = (args) => {
27
27
  }
28
28
 
29
29
  if (args.remote) {
30
- const remote = innerRemotes.getRemote(args.remote);
30
+ const remote = innerRemotes.getCsdrRemotes()[args.remote];
31
31
  if (remote) {
32
32
  remotes.push(args.remote);
33
33
  }
@@ -91,24 +91,35 @@ module.exports.getCsdrRemotes = (hostName, euiVersion) => {
91
91
  }
92
92
 
93
93
  const remotesConfig = require(path.join(process.cwd(), '.csdr', '.euirc-csdr-remotes.json'));
94
- const remotesArray = Object.keys(remotesConfig).map((r) => {
94
+ let remotesArray = Object.keys(remotesConfig).map((r) => {
95
95
  const remote = remotesConfig[r];
96
96
  remote.name = r;
97
97
  return remote;
98
98
  });
99
99
 
100
- let outRemotes = remotesArray;
101
-
102
100
  if (hostName) {
103
- outRemotes = outRemotes.filter(r => hostNameFilterFn(r));
101
+ remotesArray = remotesArray.filter(r => hostNameFilterFn(r));
104
102
  }
105
103
  if (euiVersion) {
106
- outRemotes = outRemotes.filter(r => r.euiVersion === euiVersion);
104
+ remotesArray = remotesArray.filter(r => r.euiVersion === euiVersion);
107
105
  }
108
106
 
107
+ const outRemotes = {};
108
+ remotesArray.forEach((r) => {
109
+ outRemotes[r.name] = r;
110
+ })
111
+
109
112
  return outRemotes;
110
113
  }
111
114
 
115
+ module.exports.getCsdrRemotesArray = (hostName, euiVersion) => {
116
+ const remotes = this.getCsdrRemotes(hostName, euiVersion);
117
+
118
+ return Object.keys(remotes).map((r) => {
119
+ return remotes[r];
120
+ })
121
+ }
122
+
112
123
 
113
124
  module.exports.getRemotes = () => {
114
125
  const remotes = innerGlobal.getConfig().remotes;
@@ -125,7 +136,7 @@ module.exports.getRemoteByNpmPkg = (npmPkg, fromCsdrConfig) => {
125
136
  let remotes;
126
137
 
127
138
  if (fromCsdrConfig) {
128
- remotes = this.getCsdrRemotes();
139
+ remotes = this.getCsdrRemotesArray();
129
140
 
130
141
  } else {
131
142
  remotes = this.getRemotes();
@@ -0,0 +1,4 @@
1
+ {
2
+ "imports": "import { DynamicFormsModule } from '@eui/dynamic-forms';",
3
+ "definitions": "DynamicFormsModule.forRoot({ componentMap: {}, rulesMap: {}, validationsMap: {}, valMessagesMap: {}, })"
4
+ }
@@ -146,6 +146,7 @@ module.exports.generateVirtualRemote = (remoteName, cloneRemote = true) => {
146
146
  const optionZipkinDef = tools.getJsonFileContent(path.join(fullOptionsPath, 'definitions', 'zipkin.json'));
147
147
  const optionDynatraceDef = tools.getJsonFileContent(path.join(fullOptionsPath, 'definitions', 'dynatrace.json'));
148
148
  const optionParticipantDef = tools.getJsonFileContent(path.join(fullOptionsPath, 'definitions', 'participant.json'));
149
+ const optionDynamicFormsDef = tools.getJsonFileContent(path.join(fullOptionsPath, 'definitions', 'dynamic-forms.json'));
149
150
 
150
151
  tools.logInfo(`copying full sources skeleton : ${fullCommonPath} ==> ${remoteSrcPath}`);
151
152
  tools.copy(fullCommonPath, remoteSrcPath);
@@ -185,6 +186,11 @@ module.exports.generateVirtualRemote = (remoteName, cloneRemote = true) => {
185
186
  pushContent(optionDynatraceDef);
186
187
  }
187
188
 
189
+ // dynamic-forms
190
+ if (remote.skeletonConfig.options.dynamicForms) {
191
+ pushContent(optionDynamicFormsDef);
192
+ }
193
+
188
194
  // participant
189
195
  if (remote.skeletonConfig.options.participant) {
190
196
  tools.copy(optionParticipantPath, remoteSrcPath);
@@ -194,7 +194,7 @@ const getLocalProjectRemoteDeps = module.exports.getLocalProjectRemoteDeps = (pr
194
194
  tools.logTitle(`Detecting remotes deps for project : ${prj.name}`);
195
195
 
196
196
  const euiVersion = configUtils.global.getLocalEuiVersion();
197
- const remotes = configUtils.remotes.getCsdrRemotes(prj.hostName, euiVersion);
197
+ const remotes = configUtils.remotes.getCsdrRemotesArray(prj.hostName, euiVersion);
198
198
 
199
199
  let remoteDeps = {};
200
200
  remotes