@eui/tools 5.3.10 → 5.3.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
- 5.3.10
1
+ 5.3.11
package/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 5.3.11 (2022-06-14)
2
+
3
+ ##### Chores
4
+
5
+ * **other:**
6
+ * added envTarget delivery option for new remote v10 and up creation - EUI-4106 [EUI-4106](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4106) ([6451fcd3](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/6451fcd3047c344eb64906e6485ee9b855e13c27))
7
+
8
+ * * *
9
+ * * *
1
10
  ## 5.3.10 (2022-06-10)
2
11
 
3
12
  ##### Chores
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "5.3.10",
3
+ "version": "5.3.11",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
@@ -178,7 +178,12 @@ const prompt = () => {
178
178
 
179
179
 
180
180
 
181
- const buildFrontend = (name, scope, frontendType, frontendVersion, isRouteModule, isCsdrRepo, externalRepoName) => {
181
+ const buildFrontend = (
182
+ name, scope,
183
+ frontendType, frontendVersion,
184
+ isRouteModule, isCsdrRepo, externalRepoName, isEnvTargetRemote,
185
+ ) => {
186
+
182
187
  tools.logTitle('Generating package');
183
188
 
184
189
  let fullName = scope.substr(1) + '-' + name;
@@ -207,14 +212,23 @@ const buildFrontend = (name, scope, frontendType, frontendVersion, isRouteModule
207
212
  }
208
213
  }
209
214
 
215
+ // generating default git repo
210
216
  if (isCsdrRepo) {
211
217
  repoName = `${fullName}.git`;
212
-
213
218
  } else {
214
219
  repoName = `${externalRepoName}/${fullName}.git`;
215
220
  }
216
221
 
222
+ // generating target paths
217
223
  const targetPath = path.join(TARGET_ROOT_PATH, fullName);
224
+ const rootPackagePath = path.join(TARGET_ROOT_PATH, `${scope.substr(1)}-${name}-ui`);
225
+
226
+ if (!frontendVersion === defaultConfig.pkgFrontendVersion.DEFAULT) {
227
+ if (frontendType === defaultConfig.pkgFrontendType.REMOTE && !tools.isDirExists(rootPackagePath)) {
228
+ tools.logError(`${rootPackagePath} NOT FOUND, you must mount the root package ui before creating the remote`);
229
+ throw 'ROOT_PACKAGE_NOT_FOUND';
230
+ }
231
+ }
218
232
 
219
233
  const pkg = {
220
234
  name: fullName,
@@ -322,6 +336,7 @@ const buildFrontend = (name, scope, frontendType, frontendVersion, isRouteModule
322
336
  return configUtils.global.registerCsdrPackage(pkg, frontendType === defaultConfig.pkgFrontendType.REMOTE, scope, name);
323
337
  })
324
338
 
339
+
325
340
  .then(() => {
326
341
  tools.logInfo('Executing post build operations');
327
342
  tools.move(path.join(targetPath, 'gitignore_TO_REPLACE'), path.join(targetPath, '.gitignore'));
@@ -335,6 +350,14 @@ const buildFrontend = (name, scope, frontendType, frontendVersion, isRouteModule
335
350
  return tools.removeFilesExtension(targetPath, '.TO_REPLACE');
336
351
  })
337
352
 
353
+ .then(() => {
354
+ // envTarget remote type specific
355
+ if (isEnvTargetRemote) {
356
+ tools.logInfo('Moving sources from remote to root package for envTarget remote type');
357
+ tools.move(path.join(targetPath, 'src'), path.join(rootPackagePath, 'assets', 'remote-sources'));
358
+ }
359
+ })
360
+
338
361
  .then(() => {
339
362
  tools.logSuccess();
340
363
  })
@@ -434,6 +457,7 @@ module.exports.generate = () => {
434
457
  answers.isRouteModule,
435
458
  answers.isCsdrRepo,
436
459
  answers.externalRepoName,
460
+ answers.isEnvTargetRemote,
437
461
  );
438
462
 
439
463
  } else if (answers.pkgType === defaultConfig.pkgType.BACKEND) {
@@ -2,5 +2,7 @@
2
2
  "@eui/deps-base": "^10.0.0",
3
3
 
4
4
  "@csdr/core": "^2.0.0",
5
- "@csdr/integration": "^2.0.0"
5
+ "@csdr/integration": "^2.0.0",
6
+
7
+ "@module.scope@/@module.name@": "^1.0.0"
6
8
  }
@@ -7,5 +7,5 @@ import { Component } from '@angular/core';
7
7
  </eui-block-content>
8
8
  `,
9
9
  })
10
- export class FallbackComponent{
10
+ export class FallbackComponent {
11
11
  }