@eui/tools 6.7.4 → 6.8.0
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/app/public/index.html +9 -7
- package/scripts/app/public/index.js +10 -4
- package/scripts/app/routes/index.js +4 -4
- package/scripts/csdr/config/angular.js +10 -3
- package/scripts/csdr/config/remotes.js +21 -14
- package/scripts/csdr/init/init-custom.js +2 -3
- package/scripts/csdr/init/resources/16.x/browserslistrc +6 -0
- package/scripts/csdr/init/resources/16.x/resolutions.json +2 -0
- package/scripts/csdr/init/resources/16.x/yarn.lock +12961 -0
- package/scripts/csdr/install/local-dev.js +5 -1
- package/scripts/utils/build/package/build-package-utils.js +1 -1
- package/scripts/utils/build/package/styles.js +2 -1
- package/scripts/utils/pre-build/injection/skeletons.js +1 -1
- package/scripts/utils/pre-build/projects.js +2 -0
package/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.
|
|
1
|
+
6.8.0
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## 6.8.0 (2023-03-09)
|
|
2
|
+
|
|
3
|
+
##### New Features
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* adapted build scripts for eUI 16 - EUI-7240 [EUI-7240](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7240) ([c3693b58](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/c3693b5893a812038e3031ae4b9ef59c2cc09bcd))
|
|
7
|
+
|
|
8
|
+
* * *
|
|
9
|
+
* * *
|
|
10
|
+
## 6.7.5 (2023-03-09)
|
|
11
|
+
|
|
12
|
+
##### Chores
|
|
13
|
+
|
|
14
|
+
* **other:**
|
|
15
|
+
* adapted csdr app phase 3 - finalized custom init json - EUI-7121 [EUI-7121](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7121) ([d64762e8](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/d64762e8de1716e46d227186bbdbc1adf17efd22))
|
|
16
|
+
|
|
17
|
+
* * *
|
|
18
|
+
* * *
|
|
1
19
|
## 6.7.4 (2023-03-09)
|
|
2
20
|
|
|
3
21
|
##### Bug Fixes
|
package/package.json
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
<label class="col-sm-2 col-form-label">App</label>
|
|
37
37
|
<div class="col-sm-10">
|
|
38
38
|
<select disabled class="form-select" v-model="selectedProject">
|
|
39
|
-
<option value="my-workplace">MyWorkplace</option>
|
|
39
|
+
<option value="my-workplace-host-playground-custom">MyWorkplace</option>
|
|
40
40
|
</select>
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
<thead>
|
|
64
64
|
<tr>
|
|
65
65
|
<th scope="col">Remote</th>
|
|
66
|
-
<th scope="col">Participant</th>
|
|
66
|
+
<!-- <th scope="col">Participant</th> -->
|
|
67
67
|
<th scope="col">Full SK</th>
|
|
68
68
|
<th scope="col">Local</th>
|
|
69
69
|
<th scope="col">Installed</th>
|
|
@@ -72,9 +72,9 @@
|
|
|
72
72
|
<tbody>
|
|
73
73
|
<tr v-for="remote in remotes">
|
|
74
74
|
<td>{{ remote.name }}</td>
|
|
75
|
-
<td>
|
|
75
|
+
<!-- <td>
|
|
76
76
|
<div :class="{ 'text-primary fw-bold': remote.participant }">{{ remote.participant }}</div>
|
|
77
|
-
</td>
|
|
77
|
+
</td> -->
|
|
78
78
|
<td>
|
|
79
79
|
<div :class="{ 'text-success fw-bold': remote.fullSkeletonSources }">
|
|
80
80
|
{{ remote.fullSkeletonSources }}
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
type="checkbox"
|
|
88
88
|
:value="remote.name"
|
|
89
89
|
:id="remote.name"
|
|
90
|
+
:disabled="isInstallRemoteSelected(remote.name)"
|
|
90
91
|
v-model="selectedRemotes" />
|
|
91
92
|
</div>
|
|
92
93
|
</td>
|
|
@@ -97,6 +98,7 @@
|
|
|
97
98
|
type="checkbox"
|
|
98
99
|
:value="remote.name"
|
|
99
100
|
:id="remote.name"
|
|
101
|
+
:disabled="isRemoteSelected(remote.name)"
|
|
100
102
|
v-model="selectedInstalledRemotes" />
|
|
101
103
|
</div>
|
|
102
104
|
</td>
|
|
@@ -108,12 +110,12 @@
|
|
|
108
110
|
|
|
109
111
|
<div class="col-6">
|
|
110
112
|
<h5 class="mt-5 mb-3">
|
|
111
|
-
Selected
|
|
113
|
+
Selected remotes - intialized as sources:
|
|
112
114
|
<span class="text-primary fw-bold">{{ selectedRemotes.length }}</span>
|
|
113
115
|
</h5>
|
|
114
116
|
{{ selectedRemotes }}
|
|
115
117
|
<h5 class="mt-5 mb-3">
|
|
116
|
-
Selected
|
|
118
|
+
Selected "to-be-installed" remotes - intialized as dependencies:
|
|
117
119
|
<span class="text-primary fw-bold">{{ selectedInstalledRemotes.length }}</span>
|
|
118
120
|
</h5>
|
|
119
121
|
{{ selectedInstalledRemotes }}
|
|
@@ -151,7 +153,7 @@
|
|
|
151
153
|
</p>
|
|
152
154
|
<p>
|
|
153
155
|
Execute after the
|
|
154
|
-
<strong>npm run init -- --custom</strong> from your command line to follow progress of installation
|
|
156
|
+
<strong>npm run init -- --custom [--git local]</strong> from your command line to follow progress of installation
|
|
155
157
|
</p>
|
|
156
158
|
</div>
|
|
157
159
|
</div>
|
|
@@ -40,14 +40,14 @@ new Vue({
|
|
|
40
40
|
if (Object.keys(finalRes).length !== 0) {
|
|
41
41
|
this.selectedApp = finalRes.project;
|
|
42
42
|
this.selectedEuiVersion = finalRes.euiVersion;
|
|
43
|
-
this.
|
|
43
|
+
this.selectedRemotes = finalRes.remotes;
|
|
44
44
|
this.selectedInstalledRemotes = finalRes.installedRemotes;
|
|
45
45
|
this.deps = finalRes.deps;
|
|
46
46
|
this.packages = finalRes.packages;
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
async getPackages() {
|
|
50
|
-
const res = await fetch("http://localhost:3000/api/remotes/packages", getRequestBody(this.
|
|
50
|
+
const res = await fetch("http://localhost:3000/api/remotes/packages", getRequestBody(this.selectedRemotes));
|
|
51
51
|
const finalRes = await res.json();
|
|
52
52
|
this.packages = finalRes.packages.filter(
|
|
53
53
|
(p) => p.indexOf("csdr-") < 0 && p.indexOf("cc-shared-ui") < 0 && p.indexOf("mywp-shared-ui") < 0
|
|
@@ -55,7 +55,7 @@ new Vue({
|
|
|
55
55
|
this.deps = finalRes.deps;
|
|
56
56
|
},
|
|
57
57
|
reset() {
|
|
58
|
-
this.
|
|
58
|
+
this.selectedRemotes = [];
|
|
59
59
|
this.selectedInstalledRemotes = [];
|
|
60
60
|
this.packages = [];
|
|
61
61
|
this.deps = [];
|
|
@@ -83,9 +83,15 @@ new Vue({
|
|
|
83
83
|
}
|
|
84
84
|
this.saveConfigSubmitted = true;
|
|
85
85
|
},
|
|
86
|
+
isRemoteSelected(remoteName) {
|
|
87
|
+
return this.selectedRemotes.includes(remoteName);
|
|
88
|
+
},
|
|
89
|
+
isInstallRemoteSelected(remoteName) {
|
|
90
|
+
return this.selectedInstalledRemotes.includes(remoteName);
|
|
91
|
+
}
|
|
86
92
|
},
|
|
87
93
|
watch: {
|
|
88
|
-
|
|
94
|
+
selectedRemotes: {
|
|
89
95
|
handler: function (val) {
|
|
90
96
|
this.saveConfigOK = false;
|
|
91
97
|
this.saveConfigSubmitted = false;
|
|
@@ -21,16 +21,16 @@ router.get('/remotes', function (req, res) {
|
|
|
21
21
|
})
|
|
22
22
|
.then((fetchedRemotes) => {
|
|
23
23
|
let remotes = tools.sortArray(fetchedRemotes, 'name');
|
|
24
|
-
remotes = remotes.
|
|
24
|
+
remotes = remotes.filter((r) => {
|
|
25
25
|
let participant = false;
|
|
26
26
|
if (r.fullSkeletonSources) {
|
|
27
27
|
if (r.skeletonConfig.options && r.skeletonConfig.options.participant) {
|
|
28
28
|
participant = true;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
|
|
32
|
+
if (r.fullSkeletonSources && !participant) {
|
|
33
|
+
return true;
|
|
34
34
|
}
|
|
35
35
|
})
|
|
36
36
|
res.send(remotes);
|
|
@@ -93,6 +93,9 @@ module.exports.registerAngularPackage = (pkg, isReset) => {
|
|
|
93
93
|
if (packageEuiVersion === '15.x') {
|
|
94
94
|
projectDef = JSON.stringify(angularPackageDefV15);
|
|
95
95
|
}
|
|
96
|
+
if (packageEuiVersion === '16.x') {
|
|
97
|
+
projectDef = JSON.stringify(angularPackageDefV15);
|
|
98
|
+
}
|
|
96
99
|
|
|
97
100
|
let srcRoot = '/src', srcRootTesting = '';
|
|
98
101
|
if (pkg.build && typeof pkg.build.srcRootDefault === 'boolean' && pkg.build.srcRootDefault === false) {
|
|
@@ -124,11 +127,15 @@ module.exports.registerAngularPackageSubEntry = (subEntryName, subEntryPath, pkg
|
|
|
124
127
|
projectDef = JSON.stringify(angularPackageSubEntryDef15);
|
|
125
128
|
projectDef = projectDef.replace('"main":"packages/eui/packages/components/@subEntry.path@/test.ts",', '');
|
|
126
129
|
}
|
|
130
|
+
if (packageEuiVersion === '16.x') {
|
|
131
|
+
projectDef = JSON.stringify(angularPackageSubEntryDef15);
|
|
132
|
+
projectDef = projectDef.replace('"main":"packages/eui/packages/components/@subEntry.path@/test.ts",', '');
|
|
133
|
+
}
|
|
127
134
|
projectDef = tools.replaceAll(projectDef, '@subEntry.path@', subEntryName)
|
|
128
135
|
projectDef = tools.replaceAll(projectDef, '@subEntry.package.name@', 'ng-package.json');
|
|
129
136
|
projectDef = tools.replaceAll(projectDef, '@tsconfig@', pkg.tsConfigFileName);
|
|
130
137
|
|
|
131
|
-
if (packageEuiVersion === '15.x') {
|
|
138
|
+
if (packageEuiVersion === '15.x' || packageEuiVersion === '16.x') {
|
|
132
139
|
// if tsconfig is missing add it
|
|
133
140
|
const tsConfigSpecPath = path.join(process.cwd(), JSON.parse(projectDef).architect.test.options.tsConfig);
|
|
134
141
|
// check if tsconfig exists otherwise created it
|
|
@@ -218,7 +225,7 @@ module.exports.registerAngularProjectDef = (project, build = false, element = fa
|
|
|
218
225
|
if (euiVersion === '13.x') {
|
|
219
226
|
projectDef = JSON.stringify(angularProjectDefFullSkeletonV13);
|
|
220
227
|
tools.logInfo(`----using angularProjectDefFullSkeletonV13`);
|
|
221
|
-
} else if (euiVersion === '14.x' || euiVersion === '15.x') {
|
|
228
|
+
} else if (euiVersion === '14.x' || euiVersion === '15.x' || euiVersion === '16.x') {
|
|
222
229
|
projectDef = JSON.stringify(angularProjectDefFullSkeletonV14);
|
|
223
230
|
tools.logInfo(`----using angularProjectDefFullSkeletonV14`);
|
|
224
231
|
} else {
|
|
@@ -230,7 +237,7 @@ module.exports.registerAngularProjectDef = (project, build = false, element = fa
|
|
|
230
237
|
if (euiVersion === '13.x') {
|
|
231
238
|
projectDef = JSON.stringify(angularProjectDefV13);
|
|
232
239
|
tools.logInfo(`----using angularProjectDefV13`);
|
|
233
|
-
} else if (euiVersion === '14.x' || euiVersion === '15.x') {
|
|
240
|
+
} else if (euiVersion === '14.x' || euiVersion === '15.x' || euiVersion === '16.x') {
|
|
234
241
|
projectDef = JSON.stringify(angularProjectDefV14);
|
|
235
242
|
tools.logInfo(`----using angularProjectDefV14`);
|
|
236
243
|
} else {
|
|
@@ -151,29 +151,36 @@ module.exports.isLocalRemote = (npmPkg) => {
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
module.exports.getRemotesPackages = (remotes) => {
|
|
154
|
-
let packages = [], deps =
|
|
154
|
+
let packages = [], deps = {};
|
|
155
155
|
|
|
156
|
-
|
|
156
|
+
remotes.forEach((r) => {
|
|
157
157
|
const remote = this.getRemote(r);
|
|
158
|
-
const npmPkgs = Object.keys(remote.dependencies.composite);
|
|
159
158
|
|
|
160
|
-
|
|
159
|
+
// check sub-entry declared rootNpmPkg in config, in that case we take the real root npmPkg
|
|
160
|
+
const rootNpmPkg = remote.skeletonConfig.rootNpmPkg;
|
|
161
|
+
let rootNpmPkgName = rootNpmPkg;
|
|
162
|
+
if (rootNpmPkg.split('/').length > 2) {
|
|
163
|
+
rootNpmPkgName = rootNpmPkg.substr(0, rootNpmPkg.lastIndexOf('/'));
|
|
164
|
+
}
|
|
161
165
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
+
// adding dependencies except the rootPkg dep (as it's installed as source)
|
|
167
|
+
const npmPkgs = Object.keys(remote.dependencies.composite);
|
|
168
|
+
npmPkgs.forEach((n) => {
|
|
169
|
+
if (n !== rootNpmPkgName) {
|
|
170
|
+
deps[n] = remote.dependencies.composite[n];
|
|
166
171
|
}
|
|
167
|
-
})
|
|
168
|
-
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
// adding the deps-base if the remote as any
|
|
175
|
+
deps = { ...deps, ...remote.dependencies.base };
|
|
169
176
|
|
|
170
|
-
|
|
171
|
-
|
|
177
|
+
// adding the package root as source
|
|
178
|
+
const pkg = innerPackages.getPackageByNpmPkg(rootNpmPkgName, true);
|
|
179
|
+
packages.push(pkg.name);
|
|
172
180
|
});
|
|
173
181
|
|
|
174
182
|
return {
|
|
175
|
-
deps
|
|
183
|
+
deps,
|
|
176
184
|
packages: tools.removeArrayDuplicates(packages)
|
|
177
185
|
}
|
|
178
186
|
}
|
|
179
|
-
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const tools = require('../../utils/tools');
|
|
4
4
|
const configUtils = require('../config/config-utils');
|
|
5
|
+
const installUtils = require('../install/install-utils');
|
|
5
6
|
|
|
6
7
|
const innerInitProject = require('./init-project');
|
|
7
8
|
const innerRemotes = require('./remotes');
|
|
@@ -41,10 +42,8 @@ module.exports.init = (finalResponse) => {
|
|
|
41
42
|
})
|
|
42
43
|
|
|
43
44
|
.then(() => {
|
|
44
|
-
// this is only executed for local dev installation,
|
|
45
|
-
// in case of release the initialisation is managed by the application / package themselves
|
|
46
45
|
if (!build && !skipInstall) {
|
|
47
|
-
return installUtils.localDev.install();
|
|
46
|
+
return installUtils.localDev.install(customConfig.deps);
|
|
48
47
|
}
|
|
49
48
|
})
|
|
50
49
|
|