@eui/tools 6.3.40 → 6.3.41
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.
package/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.3.
|
|
1
|
+
6.3.41
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## 6.3.41 (2023-02-20)
|
|
2
|
+
|
|
3
|
+
##### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* remotes injection issue when no options set - add skipReset not regenerating remote locally for debugging - MWP-9204 [MWP-9204](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9204) ([b15687c9](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/b15687c9bd33c8e6762ca77eefecd40f9f734bbb))
|
|
7
|
+
|
|
8
|
+
* * *
|
|
9
|
+
* * *
|
|
1
10
|
## 6.3.40 (2023-02-20)
|
|
2
11
|
|
|
3
12
|
##### Chores
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"imports": "import { DynamicFormsModule } from '@eui/dynamic-forms';",
|
|
3
|
-
"definitions": "DynamicFormsModule.forRoot(
|
|
2
|
+
"imports": "import { DynamicFormsModule } from '@eui/dynamic-forms'; import { dynMapConfig } from '@root.npm.pkg@'; ",
|
|
3
|
+
"definitions": "DynamicFormsModule.forRoot(dynMapConfig)"
|
|
4
4
|
}
|
|
@@ -8,6 +8,9 @@ const tools = require('../../utils/tools');
|
|
|
8
8
|
const configUtils = require('../config/config-utils');
|
|
9
9
|
const gitUtils = require('../../utils/git-utils');
|
|
10
10
|
|
|
11
|
+
// ARGS
|
|
12
|
+
const { skipReset } = tools.getArgs();
|
|
13
|
+
|
|
11
14
|
|
|
12
15
|
|
|
13
16
|
const cloneRemotesConfig = module.exports.cloneRemotesConfig = () => {
|
|
@@ -41,6 +44,11 @@ module.exports.generateVirtualRemote = (remoteName, cloneRemote = true) => {
|
|
|
41
44
|
|
|
42
45
|
let remote, remotePath, remoteSrcPath, remoteSkeletonRootPath, remoteSkeletonPath;
|
|
43
46
|
|
|
47
|
+
// checking if reset has to bypassed, in that case no-regeneration occurs
|
|
48
|
+
if (skipReset) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
|
|
44
52
|
return Promise.resolve()
|
|
45
53
|
// clone remotes config if first init
|
|
46
54
|
.then(() => {
|
|
@@ -151,14 +159,23 @@ module.exports.generateVirtualRemote = (remoteName, cloneRemote = true) => {
|
|
|
151
159
|
tools.logInfo(`copying full sources skeleton : ${fullCommonPath} ==> ${remoteSrcPath}`);
|
|
152
160
|
tools.copy(fullCommonPath, remoteSrcPath);
|
|
153
161
|
|
|
162
|
+
// initializing dynamic contents, filled based on options provided in config metadata
|
|
163
|
+
let importsContent = [];
|
|
164
|
+
let definitionsContent = [];
|
|
165
|
+
let declarationsContent = [];
|
|
166
|
+
let providersContent = [];
|
|
167
|
+
let constructorDeclarationsContent = [];
|
|
168
|
+
|
|
154
169
|
// checking options
|
|
155
|
-
if (remote.skeletonConfig.options) {
|
|
156
|
-
let importsContent = [];
|
|
157
|
-
let definitionsContent = [];
|
|
158
|
-
let declarationsContent = [];
|
|
159
|
-
let providersContent = [];
|
|
160
|
-
let constructorDeclarationsContent = [];
|
|
161
170
|
|
|
171
|
+
// if no options found, we inject default modules defs
|
|
172
|
+
if (!remote.skeletonConfig.options) {
|
|
173
|
+
definitionsContent.push('StoreModule.forRoot(TOKEN, { metaReducers })');
|
|
174
|
+
definitionsContent.push(`StoreRouterConnectingModule.forRoot({ stateKey: 'router', serializer: CustomSerializer })`);
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
// if options, all options are checked and default modules defs are injected following certain conditions
|
|
178
|
+
} else {
|
|
162
179
|
const pushContent = (obj) => {
|
|
163
180
|
if (obj.imports) importsContent.push(obj.imports);
|
|
164
181
|
if (obj.definitions) definitionsContent.push(obj.definitions);
|
|
@@ -199,19 +216,19 @@ module.exports.generateVirtualRemote = (remoteName, cloneRemote = true) => {
|
|
|
199
216
|
definitionsContent.push(`StoreRouterConnectingModule.forRoot({ stateKey: 'router', serializer: CustomSerializer })`);
|
|
200
217
|
}
|
|
201
218
|
|
|
202
|
-
// replace option in module.ts placeholders
|
|
203
|
-
const moduleTsPath = path.join(remoteSrcPath, 'app', 'module.ts');
|
|
204
|
-
tools.replaceInFileSync(moduleTsPath, '// IMPORTS', importsContent.join('\n'));
|
|
205
|
-
tools.replaceInFileSync(moduleTsPath, '// DEFINITIONS', definitionsContent.join(',\n'));
|
|
206
|
-
tools.replaceInFileSync(moduleTsPath, '// DECLARATIONS', declarationsContent.join('\n'));
|
|
207
|
-
tools.replaceInFileSync(moduleTsPath, '// PROVIDERS', providersContent.join(',\n'));
|
|
208
|
-
tools.replaceInFileSync(moduleTsPath, '// CONSTRUCTOR DECLARATIONS', constructorDeclarationsContent.join('\n'));
|
|
209
|
-
|
|
210
219
|
if (remote.skeletonConfig.options.participant) {
|
|
211
220
|
tools.replaceInPath(remoteSrcPath, '@block.container.name@', remote.skeletonConfig.blockContainerName);
|
|
212
221
|
}
|
|
213
222
|
}
|
|
214
223
|
|
|
224
|
+
// replace option in module.ts placeholders
|
|
225
|
+
const moduleTsPath = path.join(remoteSrcPath, 'app', 'module.ts');
|
|
226
|
+
tools.replaceInFileSync(moduleTsPath, '// IMPORTS', importsContent.join('\n'));
|
|
227
|
+
tools.replaceInFileSync(moduleTsPath, '// DEFINITIONS', definitionsContent.join(',\n'));
|
|
228
|
+
tools.replaceInFileSync(moduleTsPath, '// DECLARATIONS', declarationsContent.join('\n'));
|
|
229
|
+
tools.replaceInFileSync(moduleTsPath, '// PROVIDERS', providersContent.join(',\n'));
|
|
230
|
+
tools.replaceInFileSync(moduleTsPath, '// CONSTRUCTOR DECLARATIONS', constructorDeclarationsContent.join('\n'));
|
|
231
|
+
|
|
215
232
|
tools.logInfo('Replacing skeleton config tokens');
|
|
216
233
|
tools.replaceInPath(remoteSrcPath, '@remote.name@', remote.name);
|
|
217
234
|
tools.replaceInPath(remoteSrcPath, '@base.url@', remote.skeletonConfig.baseUrl);
|