@eui/tools 6.2.15 → 6.2.17
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 +1 -1
- package/CHANGELOG.md +18 -0
- package/package.json +1 -1
- package/scripts/csdr/config/remotes.js +13 -32
- package/scripts/csdr/init/init.js +1 -5
- package/scripts/csdr/init/remotes.js +9 -9
- package/scripts/csdr/install/local-dev.js +1 -3
- package/scripts/csdr/release/package/release-package.js +1 -1
- package/scripts/utils/build/package/element.js +1 -6
- package/scripts/utils/serve/element.js +1 -6
package/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.2.
|
|
1
|
+
6.2.17
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## 6.2.17 (2022-11-12)
|
|
2
|
+
|
|
3
|
+
##### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* wrong package name on serve and build for virtual remote - MWP-9010 [MWP-9010](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9010) ([5504acc3](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/5504acc3d6bb9ba4d412ef8c5b8ce1c363e64491))
|
|
7
|
+
|
|
8
|
+
* * *
|
|
9
|
+
* * *
|
|
10
|
+
## 6.2.16 (2022-11-12)
|
|
11
|
+
|
|
12
|
+
##### Chores
|
|
13
|
+
|
|
14
|
+
* **other:**
|
|
15
|
+
* adapted naming conventions compliant to actual remote name format for virtual remotes - MWP-9010 [MWP-9010](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9010) ([ed9b7ffa](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/ed9b7ffad457790d49534ea2f5c8832cd4d59a95))
|
|
16
|
+
|
|
17
|
+
* * *
|
|
18
|
+
* * *
|
|
1
19
|
## 6.2.15 (2022-11-12)
|
|
2
20
|
|
|
3
21
|
##### Bug Fixes
|
package/package.json
CHANGED
|
@@ -6,53 +6,34 @@ const path = require('path');
|
|
|
6
6
|
// LOCAL
|
|
7
7
|
const tools = require('../../utils/tools');
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
module.exports.getRemote = (remoteName) => {
|
|
10
11
|
|
|
11
12
|
// if not provided as param, we fetch them from the command line (local operations)
|
|
12
13
|
if (!remoteName) {
|
|
13
14
|
remoteName = tools.getArgs().root;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
euiVersion = tools.getArgs().euiVersion;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (!euiVersion) {
|
|
22
|
-
throw new Error('euiVersion should be provided as parameter');
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
tools.logTitle(`Getting remote config for ${remoteName} version ${euiVersion}`);
|
|
17
|
+
tools.logTitle(`Getting remote config for ${remoteName}`);
|
|
26
18
|
|
|
27
19
|
const remotesConfig = require(path.join(process.cwd(), '.csdr', '.euirc-csdr-remotes.json'));
|
|
28
20
|
const remoteConfig = remotesConfig[remoteName];
|
|
29
21
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
} else {
|
|
34
|
-
tools.logInfo('Global config found');
|
|
35
|
-
console.log(remoteConfig);
|
|
36
|
-
}
|
|
22
|
+
tools.logInfo('Global config found');
|
|
23
|
+
console.log(remoteConfig);
|
|
37
24
|
|
|
38
|
-
const remotePath = path.join(process.cwd(), 'packages', 'csdr-remotes-config', 'assets', remoteName
|
|
25
|
+
const remotePath = path.join(process.cwd(), 'packages', 'csdr-remotes-config', 'assets', remoteName);
|
|
39
26
|
|
|
40
27
|
tools.logInfo(`Getting remote information from ${remotePath}`);
|
|
41
28
|
|
|
42
29
|
if (!tools.isDirExists(remotePath)) {
|
|
43
|
-
throw new Error(`Remote ${remoteName} cannot be found in the remotes config
|
|
30
|
+
throw new Error(`Remote ${remoteName} cannot be found in the remotes global config - check packages/csdr-remotes-config for available remotes`);
|
|
44
31
|
}
|
|
45
32
|
|
|
46
|
-
|
|
47
|
-
const euiVersionNumber = euiVersion.split('.')[0];
|
|
48
|
-
|
|
49
|
-
const fullName = `${remoteName}-eui${euiVersionNumber}`;
|
|
50
|
-
const remoteRootPath = path.join(process.cwd(), 'remotes', fullName);
|
|
33
|
+
const remoteRootPath = path.join(process.cwd(), 'remotes', remoteName);
|
|
51
34
|
|
|
52
35
|
const remote = {
|
|
53
36
|
name: remoteName,
|
|
54
|
-
version: euiVersion,
|
|
55
|
-
fullName: fullName,
|
|
56
37
|
element: true,
|
|
57
38
|
remote: true,
|
|
58
39
|
virtual: true,
|
|
@@ -62,13 +43,13 @@ module.exports.getRemote = (remoteName, euiVersion) => {
|
|
|
62
43
|
root: remoteRootPath,
|
|
63
44
|
dist: path.join(remoteRootPath, 'dist'),
|
|
64
45
|
publish: path.join(remoteRootPath, 'dist'), // maintain compat with core publish utils
|
|
65
|
-
fromRoot: `remotes/${
|
|
46
|
+
fromRoot: `remotes/${remoteName}`,
|
|
66
47
|
repoNodeModules: path.join(remoteRootPath, 'node_modules'),
|
|
67
48
|
},
|
|
68
|
-
devopsMetadataFile: `${
|
|
69
|
-
devopsVersionsMetadataFile: `${
|
|
70
|
-
devopsHistoryMetadataFile: `${
|
|
71
|
-
devopsEnvsMetadataFile: `${
|
|
49
|
+
devopsMetadataFile: `${remoteName}-build-metadata.json`,
|
|
50
|
+
devopsVersionsMetadataFile: `${remoteName}-versions-metadata.json`,
|
|
51
|
+
devopsHistoryMetadataFile: `${remoteName}-history-metadata.json`,
|
|
52
|
+
devopsEnvsMetadataFile: `${remoteName}-envs-metadata.json`,
|
|
72
53
|
...remoteConfig,
|
|
73
54
|
}
|
|
74
55
|
|
|
@@ -119,11 +119,7 @@ module.exports.init = () => {
|
|
|
119
119
|
// Generating virtual remote - experimental
|
|
120
120
|
.then(() => {
|
|
121
121
|
if (finalResponse.remote) {
|
|
122
|
-
|
|
123
|
-
return initUtils.remotes.generateVirtualRemote(finalResponse.remote, finalResponse.euiVersion);
|
|
124
|
-
} else {
|
|
125
|
-
throw new Error('When a remote is initialized, an "euiVersion" parameter must be specified');
|
|
126
|
-
}
|
|
122
|
+
return initUtils.remotes.generateVirtualRemote(finalResponse.remote);
|
|
127
123
|
}
|
|
128
124
|
})
|
|
129
125
|
|
|
@@ -36,7 +36,7 @@ const cloneRemotesConfig = module.exports.cloneRemotesConfig = () => {
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
module.exports.generateVirtualRemote = (remoteName
|
|
39
|
+
module.exports.generateVirtualRemote = (remoteName) => {
|
|
40
40
|
tools.logTitle('Generating virtual remote');
|
|
41
41
|
|
|
42
42
|
return Promise.resolve()
|
|
@@ -48,18 +48,18 @@ module.exports.generateVirtualRemote = (remoteName, euiVersion) => {
|
|
|
48
48
|
|
|
49
49
|
.then(() => {
|
|
50
50
|
// getting the remote config
|
|
51
|
-
const remote = configUtils.remotes.getRemote(remoteName
|
|
51
|
+
const remote = configUtils.remotes.getRemote(remoteName);
|
|
52
52
|
|
|
53
53
|
if (!remote) {
|
|
54
54
|
throw new Error(`Remote ${remoteName} can't be found in the remotes CSDR configuration OR the remotes configs of the project`);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
tools.logInfo('Remote config
|
|
57
|
+
tools.logInfo('Remote config found: ')
|
|
58
58
|
console.log(remote);
|
|
59
59
|
|
|
60
60
|
// constructing the remote folder
|
|
61
|
-
const remotePath = path.join(process.cwd(), 'remotes', remote.
|
|
62
|
-
const remoteSkeletonPath = path.join(__dirname, 'remotes', euiVersion);
|
|
61
|
+
const remotePath = path.join(process.cwd(), 'remotes', remote.name);
|
|
62
|
+
const remoteSkeletonPath = path.join(__dirname, 'remotes', remote.euiVersion);
|
|
63
63
|
|
|
64
64
|
tools.logInfo(`Copying angular.json => ${remoteSkeletonPath} ==> ${remotePath}`);
|
|
65
65
|
|
|
@@ -90,14 +90,14 @@ module.exports.generateVirtualRemote = (remoteName, euiVersion) => {
|
|
|
90
90
|
let angularJson = tools.getJsonFileContent(angularJsonPath);
|
|
91
91
|
|
|
92
92
|
let angularContent = JSON.stringify(angularJson);
|
|
93
|
-
angularContent = angularContent.replace('@remote.name@', remote.
|
|
93
|
+
angularContent = angularContent.replace('@remote.name@', remote.name);
|
|
94
94
|
|
|
95
95
|
angularJson = JSON.parse(angularContent);
|
|
96
|
-
angularJson.projects[remote.
|
|
96
|
+
angularJson.projects[remote.name].architect.build.options.styles = remote.angularConfig.styles;
|
|
97
97
|
|
|
98
98
|
if (remote.angularConfig.scripts) {
|
|
99
|
-
angularJson.projects[remote.
|
|
100
|
-
...angularJson.projects[remote.
|
|
99
|
+
angularJson.projects[remote.name].architect.build.options.scripts = [
|
|
100
|
+
...angularJson.projects[remote.name].architect.build.options.scripts,
|
|
101
101
|
...remote.angularConfig.scripts
|
|
102
102
|
];
|
|
103
103
|
}
|
|
@@ -13,9 +13,7 @@ const innerPackages = require('./packages');
|
|
|
13
13
|
|
|
14
14
|
module.exports.installPackage = (pkgName) => {
|
|
15
15
|
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
const pkg = configUtils.remotes.getRemote(pkgName, euiVersion);
|
|
16
|
+
const pkg = configUtils.remotes.getRemote(pkgName);
|
|
19
17
|
|
|
20
18
|
if (!pkg) {
|
|
21
19
|
pkg = configUtils.packages.getPackage(pkgName, false, true);
|
|
@@ -12,7 +12,7 @@ module.exports.run = () => {
|
|
|
12
12
|
|
|
13
13
|
// TESTING a release pipeline in DRY-RUN mode :
|
|
14
14
|
// virtual remotes
|
|
15
|
-
// npm run pkg:release mywp-dashboard -- --
|
|
15
|
+
// npm run pkg:release mywp-dashboard-eui15-remote-el-ui -- --dryRun --branch master --remoteBuild true --virtual true --envTarget DEV --skipInstall
|
|
16
16
|
|
|
17
17
|
// normal UI package / old style remote
|
|
18
18
|
// npm run pkg:release csdr-core-ui -- --dryRun --branch develop --skipInstall
|
|
@@ -22,12 +22,7 @@ module.exports.build = (pkg, isMaster) => {
|
|
|
22
22
|
|
|
23
23
|
const remoteEuiVersion = configUtils.packages.getRemoteEuiVersion(pkg);
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
if (pkg.remote && pkg.virtual) {
|
|
27
|
-
pkgName = pkg.fullName;
|
|
28
|
-
} else {
|
|
29
|
-
pkgName = pkg.name;
|
|
30
|
-
}
|
|
25
|
+
const pkgName = pkg.name;
|
|
31
26
|
|
|
32
27
|
return Promise.resolve()
|
|
33
28
|
|
|
@@ -21,12 +21,7 @@ module.exports.serve = (remote = false) => {
|
|
|
21
21
|
pkg = configUtils.packages.getPackage();
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
if (pkg.remote && pkg.virtual) {
|
|
26
|
-
pkgName = pkg.fullName;
|
|
27
|
-
} else {
|
|
28
|
-
pkgName = pkg.name;
|
|
29
|
-
}
|
|
24
|
+
const pkgName = pkg.name;
|
|
30
25
|
|
|
31
26
|
const remoteEuiVersion = configUtils.packages.getRemoteEuiVersion(pkg);
|
|
32
27
|
const euiVersionNumber = remoteEuiVersion.split('.')[0];
|