@eui/tools 6.12.41 → 6.12.42

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.12.41
1
+ 6.12.42
package/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 6.12.42 (2023-08-16)
2
+
3
+ ##### Chores
4
+
5
+ * **other:**
6
+ * registering local packages sources in remote tsconfig paths - EUI-7860 [EUI-7860](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7860) ([9c02e719](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/9c02e719be5bd0e85c19357933c1c0355af38b99))
7
+
8
+ * * *
9
+ * * *
1
10
  ## 6.12.41 (2023-08-16)
2
11
 
3
12
  ##### Chores
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.12.41",
3
+ "version": "6.12.42",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
@@ -299,7 +299,13 @@ module.exports.generateVirtualRemote = (remoteName, cloneRemote = true) => {
299
299
  tools.replaceInPath(remoteSrcPath, '@sub.route.url@', '');
300
300
  }
301
301
  tools.replaceInPath(remoteSrcPath, '@element.name@', remote.skeletonConfig.elementName);
302
- tools.replaceInPath(remoteSrcPath, '@store.name@', remote.skeletonConfig.storeName);
302
+ let storeName;
303
+ if (remote.skeletonConfig.storeName) {
304
+ storeName = remote.skeletonConfig.storeName;
305
+ } else {
306
+ storeName = remote.skeletonConfig.elementName;
307
+ }
308
+ tools.replaceInPath(remoteSrcPath, '@store.name@', storeName);
303
309
  tools.replaceInPath(remoteSrcPath, '@root.common.module@', remote.skeletonConfig.rootCommonModule);
304
310
  tools.replaceInPath(remoteSrcPath, '@root.npm.pkg@', remote.skeletonConfig.rootNpmPkg);
305
311
 
@@ -18,11 +18,11 @@ module.exports.getMetadata = (pkg) => {
18
18
 
19
19
  return Promise.resolve()
20
20
  .then(() => {
21
- if (!DEVOPS_METADATA_PATH) {
22
- throw new Error(`Devops metadata folder ${DEVOPS_METADATA_PATH} NOT FOUND`) ;
21
+ if (DEVOPS_METADATA_PATH) {
22
+ return tools.getJsonFileContent(path.join(DEVOPS_METADATA_PATH, pkg.devopsEnvsMetadataFile));
23
+ } else {
24
+ return;
23
25
  }
24
-
25
- return tools.getJsonFileContent(path.join(DEVOPS_METADATA_PATH, pkg.devopsEnvsMetadataFile));
26
26
  })
27
27
  .catch((e) => {
28
28
  throw e;
@@ -26,6 +26,37 @@ module.exports.preBuild = (pkg, build = false) => {
26
26
  return configUtils.angular.registerAngularProjectDef(pkg, build, true);
27
27
  })
28
28
 
29
+ .then(() => {
30
+ if (build) {
31
+ return;
32
+ }
33
+
34
+ tools.logInfo('Registering element tsconfig local paths...');
35
+
36
+ const tsConfigFile = path.join(pkg.paths.root, 'tsconfig.app.json');
37
+ const tsConfig = require(tsConfigFile);
38
+
39
+ const registerPkg = (localPkg) => {
40
+ tools.logInfo(`Registering local package on element : ${localPkg.name}`);
41
+ const pathBase = './packages';
42
+
43
+ if (tools.isDirExists(localPkg.paths.src)) {
44
+ tsConfig['compilerOptions']['paths'][`${localPkg.npmPkgScope}/${localPkg.npmPkgName}`] = [`${pathBase}/${localPkg.folder || localPkg.name}/src`];
45
+ tsConfig['compilerOptions']['paths'][`${localPkg.npmPkgScope}/${localPkg.npmPkgName}/*`] = [`${pathBase}/${localPkg.folder || localPkg.name}/src`];
46
+ } else {
47
+ tsConfig['compilerOptions']['paths'][`${localPkg.npmPkgScope}/${localPkg.npmPkgName}`] = [`${pathBase}/${localPkg.folder || localPkg.name}`];
48
+ tsConfig['compilerOptions']['paths'][`${localPkg.npmPkgScope}/${localPkg.npmPkgName}/*`] = [`${pathBase}/${localPkg.folder || localPkg.name}/*`];
49
+ }
50
+ }
51
+
52
+ const localPackages = configUtils.packages.getPackages();
53
+ localPackages.forEach((p) => {
54
+ registerPkg(p);
55
+ })
56
+
57
+ tools.writeJsonFileSync(tsConfigFile, tsConfig);
58
+ })
59
+
29
60
  // inject external app sources declaration
30
61
  .then(() => {
31
62
  if (pkg.externalSources) {