@eui/tools 6.11.26 → 6.11.27
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.11.
|
|
1
|
+
6.11.27
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## 6.11.27 (2023-06-05)
|
|
2
|
+
|
|
3
|
+
##### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* fetch remotes config prior to remotes metadata extraction - EUI-7121 [EUI-7121](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7121) ([311a71af](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/311a71affb35768e8cff04c3edd7ec97cd2d58fa))
|
|
7
|
+
|
|
8
|
+
* * *
|
|
9
|
+
* * *
|
|
1
10
|
## 6.11.26 (2023-06-05)
|
|
2
11
|
|
|
3
12
|
##### Chores
|
package/package.json
CHANGED
|
@@ -5,6 +5,7 @@ const _ = require('lodash');
|
|
|
5
5
|
|
|
6
6
|
const tools = require('../../tools');
|
|
7
7
|
const configUtils = require('../../../csdr/config/config-utils');
|
|
8
|
+
const initUtils = require('../../../csdr/init/init-utils');
|
|
8
9
|
|
|
9
10
|
const { debug } = tools.getArgs();
|
|
10
11
|
|
|
@@ -629,48 +630,59 @@ const injectRoutesConfig = (project, npmPkg) => {
|
|
|
629
630
|
module.exports.extractRemotesMetadata = (project) => {
|
|
630
631
|
tools.logTitle('Extracting remotes-metadata.json for known participant remotes');
|
|
631
632
|
|
|
632
|
-
|
|
633
|
+
return Promise.resolve()
|
|
634
|
+
.then(() => {
|
|
635
|
+
return initUtils.remotes.cloneRemotesConfig();
|
|
636
|
+
})
|
|
633
637
|
|
|
634
|
-
|
|
635
|
-
|
|
638
|
+
.then(() => {
|
|
639
|
+
const projectAssetsPath = path.join(process.cwd(), project.folder, 'src', 'assets');
|
|
636
640
|
|
|
637
|
-
|
|
638
|
-
|
|
641
|
+
const finalRemotesDefsFile = path.join(projectAssetsPath, 'remotes-metadata.json');
|
|
642
|
+
const openidConfigFile = path.join(projectAssetsPath, 'openid-login-config.json');
|
|
639
643
|
|
|
640
|
-
|
|
641
|
-
|
|
644
|
+
let remoteMetadataJSON = tools.getJsonFileContent(finalRemotesDefsFile);
|
|
645
|
+
const openidConfigJSON = tools.getJsonFileContent(openidConfigFile);
|
|
642
646
|
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
remote = configUtils.remotes.getRemote(r);
|
|
646
|
-
} else {
|
|
647
|
-
remote = configUtils.packages.getPackage(r, true);
|
|
648
|
-
}
|
|
647
|
+
remoteMetadataJSON.forEach((r) => {
|
|
648
|
+
tools.logInfo(`Fetching remote info for : ${r}`);
|
|
649
649
|
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
650
|
+
let remote;
|
|
651
|
+
if (configUtils.remotes.isVirtualRemote(r)) {
|
|
652
|
+
remote = configUtils.remotes.getRemote(r);
|
|
653
|
+
} else {
|
|
654
|
+
remote = configUtils.packages.getPackage(r, true);
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
if (remote.build && remote.build.hasParticipants) {
|
|
658
|
+
let participantsList;
|
|
659
|
+
if (remote.euiVersion === '15.x') {
|
|
660
|
+
participantsList = openidConfigJSON.modules[remote.build.configModuleName].participants_v15
|
|
661
|
+
} else {
|
|
662
|
+
participantsList = openidConfigJSON.modules[remote.build.configModuleName].participants
|
|
663
|
+
}
|
|
664
|
+
if (participantsList) {
|
|
665
|
+
let participantRemotes = [];
|
|
666
|
+
Object.keys(participantsList).forEach((p) => {
|
|
667
|
+
participantRemotes.push(participantsList[p].moduleId);
|
|
668
|
+
});
|
|
669
|
+
tools.logInfo('Found participant remotes : ');
|
|
670
|
+
console.log(participantRemotes);
|
|
671
|
+
|
|
672
|
+
remoteMetadataJSON = [...remoteMetadataJSON, ...participantRemotes];
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
})
|
|
676
|
+
|
|
677
|
+
remoteMetadataJSON = tools.removeArrayDuplicates(remoteMetadataJSON);
|
|
669
678
|
|
|
670
|
-
|
|
679
|
+
tools.logInfo('Final remotes metadata list found :');
|
|
680
|
+
console.log(remoteMetadataJSON);
|
|
671
681
|
|
|
672
|
-
|
|
673
|
-
|
|
682
|
+
return tools.writeJsonFileSync(finalRemotesDefsFile, remoteMetadataJSON);
|
|
683
|
+
})
|
|
674
684
|
|
|
675
|
-
|
|
685
|
+
.catch((e) => {
|
|
686
|
+
throw e;
|
|
687
|
+
});
|
|
676
688
|
}
|