@eui/tools 6.2.14 → 6.2.16
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 -33
- package/scripts/csdr/config/sync.js +2 -1
- package/scripts/csdr/init/init.js +6 -12
- package/scripts/csdr/init/remotes.js +9 -9
- package/scripts/csdr/init/resources/15.x/resolutions.json +4 -0
- package/scripts/csdr/install/local-dev.js +5 -1
- package/scripts/csdr/release/package/release-package.js +1 -1
package/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.2.
|
|
1
|
+
6.2.16
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## 6.2.16 (2022-11-12)
|
|
2
|
+
|
|
3
|
+
##### Chores
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* 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))
|
|
7
|
+
|
|
8
|
+
* * *
|
|
9
|
+
* * *
|
|
10
|
+
## 6.2.15 (2022-11-12)
|
|
11
|
+
|
|
12
|
+
##### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **other:**
|
|
15
|
+
* local-dev sync on virtual remotes - added 15.x resolutions (issues with https for slack output) - tsconfig root not generated - MWP-9010 [MWP-9010](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9010) ([75b0e212](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/75b0e212d67bb780c60b65d417ac4b7ab1e3f65f))
|
|
16
|
+
|
|
17
|
+
* * *
|
|
18
|
+
* * *
|
|
1
19
|
## 6.2.14 (2022-11-12)
|
|
2
20
|
|
|
3
21
|
##### Chores
|
package/package.json
CHANGED
|
@@ -6,54 +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
|
-
|
|
22
|
-
tools.logTitle(`Getting remote config for ${remoteName} version ${euiVersion}`);
|
|
23
|
-
|
|
24
|
-
if (!euiVersion) {
|
|
25
|
-
throw new error('euiVersion should be provided as parameter');
|
|
26
|
-
}
|
|
17
|
+
tools.logTitle(`Getting remote config for ${remoteName}`);
|
|
27
18
|
|
|
28
19
|
const remotesConfig = require(path.join(process.cwd(), '.csdr', '.euirc-csdr-remotes.json'));
|
|
29
20
|
const remoteConfig = remotesConfig[remoteName];
|
|
30
21
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
} else {
|
|
35
|
-
tools.logInfo('Global config found');
|
|
36
|
-
console.log(remoteConfig);
|
|
37
|
-
}
|
|
22
|
+
tools.logInfo('Global config found');
|
|
23
|
+
console.log(remoteConfig);
|
|
38
24
|
|
|
39
|
-
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);
|
|
40
26
|
|
|
41
27
|
tools.logInfo(`Getting remote information from ${remotePath}`);
|
|
42
28
|
|
|
43
29
|
if (!tools.isDirExists(remotePath)) {
|
|
44
|
-
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`);
|
|
45
31
|
}
|
|
46
32
|
|
|
47
|
-
|
|
48
|
-
const euiVersionNumber = euiVersion.split('.')[0];
|
|
49
|
-
|
|
50
|
-
const fullName = `${remoteName}-eui${euiVersionNumber}`;
|
|
51
|
-
const remoteRootPath = path.join(process.cwd(), 'remotes', fullName);
|
|
33
|
+
const remoteRootPath = path.join(process.cwd(), 'remotes', remoteName);
|
|
52
34
|
|
|
53
35
|
const remote = {
|
|
54
36
|
name: remoteName,
|
|
55
|
-
version: euiVersion,
|
|
56
|
-
fullName: fullName,
|
|
57
37
|
element: true,
|
|
58
38
|
remote: true,
|
|
59
39
|
virtual: true,
|
|
@@ -63,13 +43,13 @@ module.exports.getRemote = (remoteName, euiVersion) => {
|
|
|
63
43
|
root: remoteRootPath,
|
|
64
44
|
dist: path.join(remoteRootPath, 'dist'),
|
|
65
45
|
publish: path.join(remoteRootPath, 'dist'), // maintain compat with core publish utils
|
|
66
|
-
fromRoot: `remotes/${
|
|
46
|
+
fromRoot: `remotes/${remoteName}`,
|
|
67
47
|
repoNodeModules: path.join(remoteRootPath, 'node_modules'),
|
|
68
48
|
},
|
|
69
|
-
devopsMetadataFile: `${
|
|
70
|
-
devopsVersionsMetadataFile: `${
|
|
71
|
-
devopsHistoryMetadataFile: `${
|
|
72
|
-
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`,
|
|
73
53
|
...remoteConfig,
|
|
74
54
|
}
|
|
75
55
|
|
|
@@ -27,6 +27,7 @@ module.exports.run = () => {
|
|
|
27
27
|
const pkgFolders = tools.getFolders(path.join(process.cwd(), 'packages'));
|
|
28
28
|
const prjFolders = tools.getFolders(path.join(process.cwd(), 'apps'));
|
|
29
29
|
const hostFolders = tools.getFolders(path.join(process.cwd(), 'hosts'));
|
|
30
|
+
const remoteFolders = tools.getFolders(path.join(process.cwd(), 'remotes'));
|
|
30
31
|
|
|
31
32
|
const csdrProjects = innerProjects.getCsdrProjects();
|
|
32
33
|
|
|
@@ -68,7 +69,7 @@ module.exports.run = () => {
|
|
|
68
69
|
// update the local config file
|
|
69
70
|
const config = {
|
|
70
71
|
projects: projects,
|
|
71
|
-
packages: pkgFolders
|
|
72
|
+
packages: [...pkgFolders, ...remoteFolders]
|
|
72
73
|
};
|
|
73
74
|
|
|
74
75
|
tools.writeJsonFileSync(path.join(process.cwd(), '.csdr', '.euirc.json'), config);
|
|
@@ -109,13 +109,6 @@ module.exports.init = () => {
|
|
|
109
109
|
}
|
|
110
110
|
})
|
|
111
111
|
|
|
112
|
-
// Importing packages and generating definitions
|
|
113
|
-
.then(() => {
|
|
114
|
-
if (!finalResponse.remote) {
|
|
115
|
-
return initUtils.packages.importPackages(finalResponse);
|
|
116
|
-
}
|
|
117
|
-
})
|
|
118
|
-
|
|
119
112
|
// Importing external sources
|
|
120
113
|
.then(() => {
|
|
121
114
|
if (finalResponse.project) {
|
|
@@ -126,14 +119,15 @@ module.exports.init = () => {
|
|
|
126
119
|
// Generating virtual remote - experimental
|
|
127
120
|
.then(() => {
|
|
128
121
|
if (finalResponse.remote) {
|
|
129
|
-
|
|
130
|
-
return initUtils.remotes.generateVirtualRemote(finalResponse.remote, finalResponse.euiVersion);
|
|
131
|
-
} else {
|
|
132
|
-
throw new Error('When a remote is initialized, an "euiVersion" parameter must be specified');
|
|
133
|
-
}
|
|
122
|
+
return initUtils.remotes.generateVirtualRemote(finalResponse.remote);
|
|
134
123
|
}
|
|
135
124
|
})
|
|
136
125
|
|
|
126
|
+
// Importing packages and generating definitions
|
|
127
|
+
.then(() => {
|
|
128
|
+
return initUtils.packages.importPackages(finalResponse);
|
|
129
|
+
})
|
|
130
|
+
|
|
137
131
|
// adapt and inject particular root data/config for eUI version detected on project
|
|
138
132
|
// if multiple versions of eUI are detected on the same project, an exception is thrown
|
|
139
133
|
.then(() => {
|
|
@@ -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,7 +13,11 @@ const innerPackages = require('./packages');
|
|
|
13
13
|
|
|
14
14
|
module.exports.installPackage = (pkgName) => {
|
|
15
15
|
|
|
16
|
-
const pkg = configUtils.
|
|
16
|
+
const pkg = configUtils.remotes.getRemote(pkgName);
|
|
17
|
+
|
|
18
|
+
if (!pkg) {
|
|
19
|
+
pkg = configUtils.packages.getPackage(pkgName, false, true);
|
|
20
|
+
}
|
|
17
21
|
|
|
18
22
|
return Promise.resolve()
|
|
19
23
|
.then(() => {
|
|
@@ -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
|