@eui/tools 5.3.23 → 5.3.26
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 +27 -0
- package/package.json +1 -1
- package/scripts/csdr/config/angular.js +12 -2
- package/scripts/csdr/config/packages.js +46 -35
- package/scripts/csdr/install/common.js +16 -9
- package/scripts/csdr/release/app/release-app.js +1 -1
- package/scripts/utils/build/app/build-app-utils.js +31 -1
- package/scripts/utils/pre-build/injection/externals.js +24 -3
- package/scripts/utils/pre-build/projects.js +1 -1
package/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
5.3.
|
|
1
|
+
5.3.26
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,30 @@
|
|
|
1
|
+
## 5.3.26 (2022-06-23)
|
|
2
|
+
|
|
3
|
+
##### Chores
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* adapted for MWP v14 setup and migration - MWP-8474 [MWP-8474](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-8474) ([4fc90eca](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/4fc90eca36fe64366397bded27818675f17485f4))
|
|
7
|
+
|
|
8
|
+
* * *
|
|
9
|
+
* * *
|
|
10
|
+
## 5.3.25 (2022-06-22)
|
|
11
|
+
|
|
12
|
+
##### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **other:**
|
|
15
|
+
* avoid removing assets path on app source injection - MWP-7700 [MWP-7700](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-7700) ([63b520d1](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/63b520d107bdfe4dd64f46bd6eb78943db71fc93))
|
|
16
|
+
|
|
17
|
+
* * *
|
|
18
|
+
* * *
|
|
19
|
+
## 5.3.24 (2022-06-21)
|
|
20
|
+
|
|
21
|
+
##### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* **other:**
|
|
24
|
+
* prevent cleaning injected sources at build time - MWP-7700 [MWP-7700](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-7700) ([edda50d6](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/edda50d6d28c3760af0903ed55a9354f7e994bfd))
|
|
25
|
+
|
|
26
|
+
* * *
|
|
27
|
+
* * *
|
|
1
28
|
## 5.3.23 (2022-06-21)
|
|
2
29
|
|
|
3
30
|
##### Chores
|
package/package.json
CHANGED
|
@@ -6,6 +6,7 @@ const path = require('path');
|
|
|
6
6
|
// LOCAL
|
|
7
7
|
const tools = require('../../utils/tools');
|
|
8
8
|
|
|
9
|
+
const innerPackages = require('./packages');
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
const angularConfigDef = {
|
|
@@ -1307,12 +1308,21 @@ module.exports.registerAngularPackage = (pkg, isReset) => {
|
|
|
1307
1308
|
pathBase = 'packages/' + pkg.parentPkg + '/packages';
|
|
1308
1309
|
}
|
|
1309
1310
|
|
|
1311
|
+
let packageEuiVersion;
|
|
1312
|
+
|
|
1313
|
+
if (pkg.build && pkg.build.euiVersion) {
|
|
1314
|
+
packageEuiVersion = pkg.build.euiVersion;
|
|
1315
|
+
|
|
1316
|
+
} else {
|
|
1317
|
+
packageEuiVersion = innerPackages.getPackageEuiVerison(pkg);
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1310
1320
|
let projectDef = JSON.stringify(angularPackageDef);
|
|
1311
1321
|
|
|
1312
|
-
if (
|
|
1322
|
+
if (packageEuiVersion === '13.x') {
|
|
1313
1323
|
projectDef = JSON.stringify(angularPackageDefV13);
|
|
1314
1324
|
}
|
|
1315
|
-
if (
|
|
1325
|
+
if (packageEuiVersion === '14.x') {
|
|
1316
1326
|
projectDef = JSON.stringify(angularPackageDefV14);
|
|
1317
1327
|
}
|
|
1318
1328
|
|
|
@@ -243,52 +243,63 @@ module.exports.getDepGraph = () => {
|
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
|
|
246
|
-
module.exports.
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
const pkgs = getPackages();
|
|
250
|
-
let versionsFound = [];
|
|
251
|
-
|
|
252
|
-
pkgs.forEach((p) => {
|
|
253
|
-
if (p.parent !== true && p.tsPackage !== false) {
|
|
254
|
-
tools.logInfo(`checking ${p.name}`);
|
|
246
|
+
const getPackageEuiVersion = module.exports.getPackageEuiVerison = (pkg) => {
|
|
247
|
+
if (pkg.parent !== true && pkg.tsPackage !== false) {
|
|
248
|
+
tools.logInfo(`checking ${pkg.name}`);
|
|
255
249
|
|
|
256
|
-
|
|
250
|
+
let version;
|
|
257
251
|
|
|
258
|
-
|
|
259
|
-
|
|
252
|
+
if (pkg.build && pkg.build.euiVersion) {
|
|
253
|
+
version = pkg.build.euiVersion;
|
|
260
254
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
255
|
+
} else if (!pkg.remote) {
|
|
256
|
+
const depsCompositeFile = path.join(pkg.paths.pkgRootDirectory, 'dependencies-composite.json');
|
|
257
|
+
tools.logInfo(`Try fetching version from ${depsCompositeFile}`);
|
|
264
258
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
259
|
+
if (!tools.isFileExists(depsCompositeFile)) {
|
|
260
|
+
tools.logInfo('---- no dependencies-composite.json file found');
|
|
261
|
+
} else {
|
|
262
|
+
const deps = tools.getJsonFileContent(depsCompositeFile);
|
|
263
|
+
const euiDepsBase = deps['@eui/deps-base'];
|
|
270
264
|
|
|
271
|
-
|
|
272
|
-
|
|
265
|
+
if (euiDepsBase) {
|
|
266
|
+
let euiVersion = euiDepsBase.split('.')[0];
|
|
273
267
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
268
|
+
if (euiVersion.substr(0,1) === '^') {
|
|
269
|
+
euiVersion = euiVersion.substr(1);
|
|
270
|
+
}
|
|
271
|
+
version = `${euiVersion}.x`;
|
|
278
272
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
}
|
|
273
|
+
if (version === '7.x') {
|
|
274
|
+
version = 'DEFAULT';
|
|
282
275
|
}
|
|
283
276
|
}
|
|
284
277
|
}
|
|
278
|
+
}
|
|
285
279
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
280
|
+
if (version) {
|
|
281
|
+
tools.logInfo(`---- version found : ${version}\n`);
|
|
282
|
+
} else {
|
|
283
|
+
tools.logInfo('---- version detection skipped');
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
return version;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
module.exports.getLocalPackagesEuiVersion = () => {
|
|
293
|
+
tools.logTitle('getting local packages installed eUI version...');
|
|
294
|
+
|
|
295
|
+
const pkgs = getPackages();
|
|
296
|
+
let versionsFound = [];
|
|
297
|
+
|
|
298
|
+
pkgs.forEach((p) => {
|
|
299
|
+
const version = getPackageEuiVersion(p);
|
|
300
|
+
|
|
301
|
+
if (version) {
|
|
302
|
+
versionsFound.push(version);
|
|
292
303
|
}
|
|
293
304
|
})
|
|
294
305
|
|
|
@@ -10,7 +10,7 @@ const configUtils = require('../config/config-utils');
|
|
|
10
10
|
const metadataUtils = require('../metadata/metadata-utils');
|
|
11
11
|
|
|
12
12
|
// FETCH ARGS
|
|
13
|
-
const { dryRun, skipInstall, registry, remotesImport } = tools.getArgs();
|
|
13
|
+
const { dryRun, skipInstall, registry, remotesImport, skipLocalPackagesDeps } = tools.getArgs();
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
@@ -227,17 +227,24 @@ const getLocalPackagesDeps = () => {
|
|
|
227
227
|
const getLocalPackageCompositeDeps = (pkg) => {
|
|
228
228
|
let pkgJsonFile;
|
|
229
229
|
|
|
230
|
-
if (
|
|
231
|
-
|
|
230
|
+
if (!skipLocalPackagesDeps) {
|
|
231
|
+
if (pkg.child) {
|
|
232
|
+
pkgJsonFile = path.join(process.cwd(), 'packages', pkg.parentPkg, 'packages', pkg.folder || pkg.name, 'dependencies-composite.json');
|
|
233
|
+
} else {
|
|
234
|
+
pkgJsonFile = path.join(process.cwd(), 'packages', pkg.name, 'dependencies-composite.json');
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
if (tools.isFileExists(pkgJsonFile)) {
|
|
238
|
+
tools.logInfo(`found ${pkgJsonFile}, parsing...`);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
return tools.getJsonFileContent(pkgJsonFile) || {};
|
|
242
|
+
|
|
232
243
|
} else {
|
|
233
|
-
|
|
234
|
-
}
|
|
244
|
+
tools.logInfo('Skipping gathering local packages composite deps');
|
|
235
245
|
|
|
236
|
-
|
|
237
|
-
tools.logInfo(`found ${pkgJsonFile}, parsing...`);
|
|
246
|
+
return {};
|
|
238
247
|
}
|
|
239
|
-
|
|
240
|
-
return tools.getJsonFileContent(pkgJsonFile) || {};
|
|
241
248
|
}
|
|
242
249
|
|
|
243
250
|
|
|
@@ -290,7 +290,7 @@ module.exports.run = () => {
|
|
|
290
290
|
if (project.build && project.build.distribution) {
|
|
291
291
|
return Promise.resolve()
|
|
292
292
|
.then(() => {
|
|
293
|
-
return utils.buildApp.generateProjectDistributionFile(project, (isSnapshot || isSupportSnapshotBranch));
|
|
293
|
+
return utils.buildApp.generateProjectDistributionFile(project, (isSnapshot || isSupportSnapshotBranch), envTarget);
|
|
294
294
|
})
|
|
295
295
|
.catch((e) => {
|
|
296
296
|
throw e;
|
|
@@ -270,7 +270,7 @@ module.exports.postBuild = (project) => {
|
|
|
270
270
|
}
|
|
271
271
|
|
|
272
272
|
|
|
273
|
-
module.exports.generateProjectDistributionFile = (project, isSnapshot) => {
|
|
273
|
+
module.exports.generateProjectDistributionFile = (project, isSnapshot, envTarget) => {
|
|
274
274
|
tools.logTitle('Generating distribution file');
|
|
275
275
|
|
|
276
276
|
let projectVersion;
|
|
@@ -298,6 +298,36 @@ module.exports.generateProjectDistributionFile = (project, isSnapshot) => {
|
|
|
298
298
|
if (isSnapshot && project.build.distribution.bucketNameSnapshot) {
|
|
299
299
|
bucketName = project.build.distribution.bucketNameSnapshot;
|
|
300
300
|
}
|
|
301
|
+
|
|
302
|
+
if (envTarget) {
|
|
303
|
+
if (envTarget === 'DEV' && project.build.distribution.bucketNameDev) {
|
|
304
|
+
bucketName = project.build.distribution.bucketNameDev;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
if (envTarget === 'TST' && project.build.distribution.bucketNameTst) {
|
|
308
|
+
bucketName = project.build.distribution.bucketNameTst;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
if (envTarget === 'INT' && project.build.distribution.bucketNameInt) {
|
|
312
|
+
bucketName = project.build.distribution.bucketNameInt;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
if (envTarget === 'ACC' && project.build.distribution.bucketNameAcc) {
|
|
316
|
+
bucketName = project.build.distribution.bucketNameAcc;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
if (envTarget === 'DLT' && project.build.distribution.bucketNameDlt) {
|
|
320
|
+
bucketName = project.build.distribution.bucketNameDlt;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
if (envTarget === 'TRN' && project.build.distribution.bucketNameTrn) {
|
|
324
|
+
bucketName = project.build.distribution.bucketNameTrn;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
if (envTarget === 'PROD' && project.build.distribution.bucketNameProd) {
|
|
328
|
+
bucketName = project.build.distribution.bucketNameProd;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
301
331
|
}
|
|
302
332
|
|
|
303
333
|
// final output bucket location
|
|
@@ -64,7 +64,7 @@ module.exports.injectExternalFeatures = (project) => {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
module.exports.injectExternalAppSources = (project) => {
|
|
67
|
+
module.exports.injectExternalAppSources = (project, build = false) => {
|
|
68
68
|
|
|
69
69
|
tools.logTitle(`Injecting project external application sources for : ${project.name}`);
|
|
70
70
|
|
|
@@ -106,11 +106,32 @@ module.exports.injectExternalAppSources = (project) => {
|
|
|
106
106
|
throw new Error('External features not found');
|
|
107
107
|
|
|
108
108
|
} else {
|
|
109
|
-
tools.logInfo(`Removing ${projectSrcPath} content`);
|
|
110
109
|
|
|
111
110
|
return Promise.resolve()
|
|
112
111
|
.then(() => {
|
|
113
|
-
|
|
112
|
+
if (!build) {
|
|
113
|
+
// removing previously injected content, except assets
|
|
114
|
+
const projectSrcAppPath = path.join(projectSrcPath, 'app');
|
|
115
|
+
const projectSrcConfigPath = path.join(projectSrcPath, 'config');
|
|
116
|
+
const projectSrcEnvironmentsPath = path.join(projectSrcPath, 'environments');
|
|
117
|
+
|
|
118
|
+
return Promise.resolve()
|
|
119
|
+
.then(() => {
|
|
120
|
+
tools.logInfo(`Removing ${projectSrcAppPath} content`);
|
|
121
|
+
return tools.rimraf(projectSrcAppPath);
|
|
122
|
+
})
|
|
123
|
+
.then(() => {
|
|
124
|
+
tools.logInfo(`Removing ${projectSrcConfigPath} content`);
|
|
125
|
+
return tools.rimraf(projectSrcConfigPath);
|
|
126
|
+
})
|
|
127
|
+
.then(() => {
|
|
128
|
+
tools.logInfo(`Removing ${projectSrcEnvironmentsPath} content`);
|
|
129
|
+
return tools.rimraf(projectSrcEnvironmentsPath);
|
|
130
|
+
})
|
|
131
|
+
.catch((e) => {
|
|
132
|
+
throw e;
|
|
133
|
+
})
|
|
134
|
+
}
|
|
114
135
|
})
|
|
115
136
|
.then(() => {
|
|
116
137
|
tools.logInfo(`${appSourcesSrcPath} injecting in ${projectSrcPath}`);
|
|
@@ -29,7 +29,7 @@ module.exports.preBuild = (project, envTarget, build, configEnvTarget) => {
|
|
|
29
29
|
// inject external app sources declaration
|
|
30
30
|
.then(() => {
|
|
31
31
|
if (project.appSources && project.appSources.external) {
|
|
32
|
-
return injectionUtils.externals.injectExternalAppSources(project);
|
|
32
|
+
return injectionUtils.externals.injectExternalAppSources(project, build);
|
|
33
33
|
}
|
|
34
34
|
})
|
|
35
35
|
|