@eui/tools 5.3.75 → 5.3.77
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 +10 -8
- package/sandbox.js +51 -9
- package/scripts/csdr/config/angular.js +59 -26
- package/scripts/csdr/init/resources/nodejs-10.x/resolutions.json +1 -1
- package/scripts/csdr/release/package/common.js +7 -1
- package/scripts/utils/build/package/build-package-utils.js +17 -7
- package/scripts/utils/notification/common.js +10 -0
package/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
5.3.
|
|
1
|
+
5.3.77
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## 5.3.77 (2022-10-24)
|
|
2
|
+
|
|
3
|
+
##### Chores
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* added check for remote envTarget always on master - added lunr for eUI showcase search indexation - EUI-6448 [EUI-6448](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-6448) ([24bae11f](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/24bae11ff62fa9eb9c8cf0c64fc1f1ccaee35bbe))
|
|
7
|
+
|
|
8
|
+
* * *
|
|
9
|
+
* * *
|
|
10
|
+
## 5.3.76 (2022-10-20)
|
|
11
|
+
|
|
12
|
+
##### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **karma:**
|
|
15
|
+
* tests - EUI-6702 [EUI-6702](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-6702) ([fa48abd6](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/fa48abd64eb3a83b1344e84f62c452447ca8d40f))
|
|
16
|
+
|
|
17
|
+
* * *
|
|
18
|
+
* * *
|
|
1
19
|
## 5.3.75 (2022-10-20)
|
|
2
20
|
|
|
3
21
|
##### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eui/tools",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.77",
|
|
4
4
|
"tag": "latest",
|
|
5
5
|
"license": "EUPL-1.1",
|
|
6
6
|
"description": "eUI common tools and scripts",
|
|
@@ -16,25 +16,25 @@
|
|
|
16
16
|
"chalk": "4.1.2",
|
|
17
17
|
"fs-extra": "9.0.0",
|
|
18
18
|
"replace-in-file": "4.1.3",
|
|
19
|
-
"semver": "7.3.
|
|
19
|
+
"semver": "7.3.8",
|
|
20
20
|
"cross-spawn": "6.0.5",
|
|
21
21
|
"eol": "0.9.1",
|
|
22
22
|
"rimraf": "3.0.2",
|
|
23
23
|
"ncp": "2.0.0",
|
|
24
|
-
"moment": "2.29.
|
|
25
|
-
"moment-timezone": "0.5.
|
|
24
|
+
"moment": "2.29.4",
|
|
25
|
+
"moment-timezone": "0.5.37",
|
|
26
26
|
"npm-run-all": "4.1.5",
|
|
27
27
|
"figures": "3.2.0",
|
|
28
28
|
"xml2js": "0.4.23",
|
|
29
29
|
"https-proxy-agent": "2.2.3",
|
|
30
|
-
"json-server": "0.
|
|
30
|
+
"json-server": "0.17.0",
|
|
31
31
|
"faker": "5.5.3",
|
|
32
|
-
"nodemon": "2.0.
|
|
32
|
+
"nodemon": "2.0.20",
|
|
33
33
|
"lowdb": "1.0.0",
|
|
34
34
|
"event-stream": "3.3.4",
|
|
35
35
|
"empty-module": "0.0.2",
|
|
36
36
|
"autoprefixer": "9.6.1",
|
|
37
|
-
"sass": "1.
|
|
37
|
+
"sass": "1.55.0",
|
|
38
38
|
"postcss": "7.0.36",
|
|
39
39
|
"cssnano": "4.1.11",
|
|
40
40
|
"extend": "3.0.2",
|
|
@@ -43,7 +43,9 @@
|
|
|
43
43
|
"nyc": "15.1.0",
|
|
44
44
|
"node-fetch": "2.6.7",
|
|
45
45
|
"sendmail": "1.6.1",
|
|
46
|
+
"svg-sprite": "2.0.0",
|
|
46
47
|
"imagemin": "7.0.1",
|
|
47
|
-
"imagemin-svgo": "9.0.0"
|
|
48
|
+
"imagemin-svgo": "9.0.0",
|
|
49
|
+
"lunr": "2.3.9"
|
|
48
50
|
}
|
|
49
51
|
}
|
package/sandbox.js
CHANGED
|
@@ -864,16 +864,16 @@ const versionUtils = require('./scripts/csdr/version/version-utils');
|
|
|
864
864
|
|
|
865
865
|
|
|
866
866
|
|
|
867
|
-
const pkg = configUtils.packages.getPackage('opsys-epc-esub-bo-ui', true);
|
|
867
|
+
// const pkg = configUtils.packages.getPackage('opsys-epc-esub-bo-ui', true);
|
|
868
868
|
|
|
869
|
-
Promise.resolve()
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
869
|
+
// Promise.resolve()
|
|
870
|
+
// .then(() => {
|
|
871
|
+
// return metadataUtils.package.getPackageVersionsByMajor(pkg, '9', false)
|
|
872
|
+
// })
|
|
873
|
+
// .then((versions) => {
|
|
874
|
+
// console.log(versions);
|
|
875
|
+
// console.log(versions.splice(-1)[0].version);
|
|
876
|
+
// })
|
|
877
877
|
|
|
878
878
|
|
|
879
879
|
// PROJECT VERSION CSDR BUILD TESTING (à la carte way === MWP / PMO MOBILE / SEDIA)
|
|
@@ -913,3 +913,45 @@ Promise.resolve()
|
|
|
913
913
|
// })
|
|
914
914
|
|
|
915
915
|
|
|
916
|
+
// const lunr = require('lunr');
|
|
917
|
+
|
|
918
|
+
// Promise.resolve()
|
|
919
|
+
// .then(() => {
|
|
920
|
+
// const rootPath = path.join(process.cwd(), 'apps', 'eui-showcase-ux-components', 'src', 'assets', 'samples');
|
|
921
|
+
|
|
922
|
+
// let documents = [];
|
|
923
|
+
|
|
924
|
+
// const sampleTypes = tools.getFolders(rootPath);
|
|
925
|
+
// sampleTypes.forEach((sampleType) => {
|
|
926
|
+
// const sampleSubTypes = tools.getFolders(path.join(rootPath, sampleType));
|
|
927
|
+
// sampleSubTypes.forEach((sampleSubType) => {
|
|
928
|
+
// const components = tools.getFolders(path.join(rootPath, sampleType, sampleSubType));
|
|
929
|
+
// components.forEach((cmp) => {
|
|
930
|
+
// const samples = tools.getFolders(path.join(rootPath, sampleType, sampleSubType, cmp, 'samples'));
|
|
931
|
+
// samples.forEach((sample) => {
|
|
932
|
+
// const metadata = {
|
|
933
|
+
// "name": `${sampleType}/${sampleSubType}/${cmp}#${sample}`,
|
|
934
|
+
// "fileContent": tools.getFileContent(path.join(rootPath, sampleType, sampleSubType, cmp, 'samples', sample, 'component.html')),
|
|
935
|
+
// }
|
|
936
|
+
// documents.push(metadata);
|
|
937
|
+
// })
|
|
938
|
+
// });
|
|
939
|
+
// })
|
|
940
|
+
// })
|
|
941
|
+
|
|
942
|
+
// var idx = lunr(function () {
|
|
943
|
+
// this.ref('name')
|
|
944
|
+
// this.field('fileContent')
|
|
945
|
+
|
|
946
|
+
// documents.forEach(function (doc) {
|
|
947
|
+
// this.add(doc)
|
|
948
|
+
// }, this)
|
|
949
|
+
// })
|
|
950
|
+
|
|
951
|
+
// tools.writeFileContent(path.join(process.cwd(),'full-index.txt'), JSON.stringify(idx));
|
|
952
|
+
|
|
953
|
+
// console.log(idx.search('test'));
|
|
954
|
+
// })
|
|
955
|
+
|
|
956
|
+
|
|
957
|
+
|
|
@@ -1145,10 +1145,6 @@ const angularPackageDef = {
|
|
|
1145
1145
|
"test": {
|
|
1146
1146
|
"builder": "@angular-devkit/build-angular:karma",
|
|
1147
1147
|
"options": {
|
|
1148
|
-
"polyfills": [
|
|
1149
|
-
"zone.js",
|
|
1150
|
-
"zone.js/testing"
|
|
1151
|
-
],
|
|
1152
1148
|
"main": "@path@/@module.name@/src/test.ts",
|
|
1153
1149
|
"tsConfig": "@path@/@module.name@/tsconfig.spec.json",
|
|
1154
1150
|
"karmaConfig": "@path@/@module.name@/karma.conf.js"
|
|
@@ -1158,6 +1154,35 @@ const angularPackageDef = {
|
|
|
1158
1154
|
};
|
|
1159
1155
|
|
|
1160
1156
|
const angularPackageSubEntryDef = {
|
|
1157
|
+
"root": "packages/eui/packages/components/@subEntry.path@",
|
|
1158
|
+
"sourceRoot": "packages/eui/packages/components/@subEntry.path@",
|
|
1159
|
+
"projectType": "library",
|
|
1160
|
+
"prefix": "lib",
|
|
1161
|
+
"architect": {
|
|
1162
|
+
"build": {
|
|
1163
|
+
"builder": "@angular-devkit/build-angular:ng-packagr",
|
|
1164
|
+
"options": {
|
|
1165
|
+
"tsConfig": "packages/eui/packages/components/@tsconfig@",
|
|
1166
|
+
"project": "packages/eui/packages/components/@subEntry.path@/@subEntry.package.name@"
|
|
1167
|
+
},
|
|
1168
|
+
"configurations": {
|
|
1169
|
+
"production": {
|
|
1170
|
+
"tsConfig": "packages/eui/packages/components/@tsconfig@"
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
},
|
|
1174
|
+
"test": {
|
|
1175
|
+
"builder": "@angular-devkit/build-angular:karma",
|
|
1176
|
+
"options": {
|
|
1177
|
+
"main": "packages/eui/packages/components/@subEntry.path@/test.ts",
|
|
1178
|
+
"tsConfig": "packages/eui/packages/components/@subEntry.path@/tsconfig.spec.json",
|
|
1179
|
+
"karmaConfig": "packages/eui/packages/components/@subEntry.path@/karma.conf.js"
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
};
|
|
1184
|
+
|
|
1185
|
+
const angularPackageSubEntryDef15 = {
|
|
1161
1186
|
"root": "packages/eui/packages/components/@subEntry.path@",
|
|
1162
1187
|
"sourceRoot": "packages/eui/packages/components/@subEntry.path@",
|
|
1163
1188
|
"projectType": "library",
|
|
@@ -1301,6 +1326,10 @@ const angularPackageDefV15 = {
|
|
|
1301
1326
|
"test": {
|
|
1302
1327
|
"builder": "@angular-devkit/build-angular:karma",
|
|
1303
1328
|
"options": {
|
|
1329
|
+
"polyfills": [
|
|
1330
|
+
"zone.js",
|
|
1331
|
+
"zone.js/testing"
|
|
1332
|
+
],
|
|
1304
1333
|
"tsConfig": "@path@/@module.name@/tsconfig.spec.json",
|
|
1305
1334
|
"karmaConfig": "@path@/@module.name@/karma.conf.js"
|
|
1306
1335
|
}
|
|
@@ -1561,35 +1590,39 @@ module.exports.registerAngularPackageSubEntry = (subEntryName, subEntryPath, pkg
|
|
|
1561
1590
|
let projectDef = JSON.stringify(angularPackageSubEntryDef);
|
|
1562
1591
|
|
|
1563
1592
|
if (packageEuiVersion === '15.x') {
|
|
1593
|
+
projectDef = JSON.stringify(angularPackageSubEntryDef15);
|
|
1564
1594
|
projectDef = projectDef.replace('"main":"packages/eui/packages/components/@subEntry.path@/test.ts",', '');
|
|
1565
1595
|
}
|
|
1566
1596
|
projectDef = tools.replaceAll(projectDef, '@subEntry.path@', subEntryName)
|
|
1567
1597
|
projectDef = tools.replaceAll(projectDef, '@subEntry.package.name@', 'ng-package.json');
|
|
1568
1598
|
projectDef = tools.replaceAll(projectDef, '@tsconfig@', pkg.tsConfigFileName);
|
|
1569
|
-
// if tsconfig is missing add it
|
|
1570
|
-
const tsConfigSpecPath = path.join(process.cwd(), JSON.parse(projectDef).architect.test.options.tsConfig);
|
|
1571
|
-
// check if tsconfig exists otherwise created it
|
|
1572
|
-
if (!tools.isFileExists(tsConfigSpecPath)) {
|
|
1573
|
-
// determine tsconfig path
|
|
1574
|
-
const tsConfigFolder = JSON.parse(projectDef).architect.build.options.tsConfig.replace(/\/tsconfig.*/g, '');
|
|
1575
|
-
const projectFolder = JSON.parse(projectDef).architect.build.options.project.replace('/ng-package.json', '');
|
|
1576
|
-
const parent = projectFolder.replace(tsConfigFolder, '').split('/').length - 1;
|
|
1577
|
-
// calculate the parent tsconfig path
|
|
1578
|
-
tsConfigSpecDef.extends = '../'.repeat(parent) + 'tsconfig.json';
|
|
1579
|
-
|
|
1580
|
-
// check if parent tsconfig.json is missing
|
|
1581
|
-
if(!tools.isFileExists(path.join(process.cwd(), projectFolder, tsConfigSpecDef.extends))) {
|
|
1582
|
-
tools.logError('The tsconfig.json file is missing in the parent folder of the sub entry: ' + subEntryName);
|
|
1583
|
-
return;
|
|
1584
|
-
}
|
|
1585
1599
|
|
|
1586
|
-
|
|
1587
|
-
|
|
1600
|
+
if (packageEuiVersion === '15.x') {
|
|
1601
|
+
// if tsconfig is missing add it
|
|
1602
|
+
const tsConfigSpecPath = path.join(process.cwd(), JSON.parse(projectDef).architect.test.options.tsConfig);
|
|
1603
|
+
// check if tsconfig exists otherwise created it
|
|
1604
|
+
if (!tools.isFileExists(tsConfigSpecPath)) {
|
|
1605
|
+
// determine tsconfig path
|
|
1606
|
+
const tsConfigFolder = JSON.parse(projectDef).architect.build.options.tsConfig.replace(/\/tsconfig.*/g, '');
|
|
1607
|
+
const projectFolder = JSON.parse(projectDef).architect.build.options.project.replace('/ng-package.json', '');
|
|
1608
|
+
const parent = projectFolder.replace(tsConfigFolder, '').split('/').length - 1;
|
|
1609
|
+
// calculate the parent tsconfig path
|
|
1610
|
+
tsConfigSpecDef.extends = '../'.repeat(parent) + 'tsconfig.json';
|
|
1611
|
+
|
|
1612
|
+
// check if parent tsconfig.json is missing
|
|
1613
|
+
if(!tools.isFileExists(path.join(process.cwd(), projectFolder, tsConfigSpecDef.extends))) {
|
|
1614
|
+
tools.logError('The tsconfig.json file is missing in the parent folder of the sub entry: ' + subEntryName);
|
|
1615
|
+
return;
|
|
1616
|
+
}
|
|
1588
1617
|
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1618
|
+
tools.writeJsonFileSync(tsConfigSpecPath, tsConfigSpecDef);
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
// if karma.conf.js is missing add it
|
|
1622
|
+
const karmaConfPath = path.join(process.cwd(), JSON.parse(projectDef).architect.test.options.karmaConfig);
|
|
1623
|
+
if(!tools.isFileExists(karmaConfPath)) {
|
|
1624
|
+
tools.writeFileContent(karmaConfPath, karmaConfDef)
|
|
1625
|
+
}
|
|
1593
1626
|
}
|
|
1594
1627
|
|
|
1595
1628
|
jsonFile['projects'][subEntryName] = JSON.parse(projectDef);
|
|
@@ -88,7 +88,13 @@ module.exports.init = (pkg, envTarget, compositeType) => {
|
|
|
88
88
|
// checking if at least the branch has been given as a parameter
|
|
89
89
|
if (!branches.branch) {
|
|
90
90
|
utils.tools.logError('ERROR : "branch" NOT PROVIDED as argument !!!');
|
|
91
|
-
|
|
91
|
+
throw 'BRANCH_NOT_PROVIDED';
|
|
92
|
+
|
|
93
|
+
// for envTarget / à la carte remote delivery, only master branch is allowed
|
|
94
|
+
} else {
|
|
95
|
+
if (pkg.remote && pkg.build && pkg.build.envTargetActive && !branches.isMaster) {
|
|
96
|
+
throw 'REMOTE_ENVTARGET_NOT_MASTER_BRANCH';
|
|
97
|
+
}
|
|
92
98
|
}
|
|
93
99
|
|
|
94
100
|
return Promise.resolve()
|
|
@@ -16,6 +16,7 @@ const innerMaven = require('./maven');
|
|
|
16
16
|
const innerStyles = require('./styles');
|
|
17
17
|
const innerAngular = require('./angular');
|
|
18
18
|
const innerElement = require('./element');
|
|
19
|
+
const innerPackages = require("../../../csdr/config/packages");
|
|
19
20
|
|
|
20
21
|
// RE-EXPORTS MODULES
|
|
21
22
|
module.exports.element = innerElement;
|
|
@@ -222,13 +223,22 @@ module.exports.buildSubEntry = (pkg, subEntry) => {
|
|
|
222
223
|
}
|
|
223
224
|
})
|
|
224
225
|
.then(() => {
|
|
225
|
-
|
|
226
|
-
if(
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
226
|
+
let packageEuiVersion;
|
|
227
|
+
if (pkg.build && pkg.build.euiVersion) {
|
|
228
|
+
packageEuiVersion = pkg.build.euiVersion;
|
|
229
|
+
} else {
|
|
230
|
+
packageEuiVersion = innerPackages.getPackageEuiVerison(pkg);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
if(packageEuiVersion === '15.x') {
|
|
234
|
+
const { skipTest } = tools.getArgs();
|
|
235
|
+
if(!skipTest) {
|
|
236
|
+
tools.logInfo('Testing...');
|
|
237
|
+
const ng = path.resolve(process.cwd(), 'node_modules', '@angular', 'cli', 'bin', 'ng');
|
|
238
|
+
let args = ['--max_old_space_size=8096', ng, 'test', subEntry, '--code-coverage', '--watch=false'];
|
|
239
|
+
tools.logInfo(`running ng test : with args: ${args} on folder : ${pkg.paths.pkgRootDirectory}`);
|
|
240
|
+
return execa('node', args, { cwd: pkg.paths.pkgRootDirectory, stdio: 'inherit' });
|
|
241
|
+
}
|
|
232
242
|
}
|
|
233
243
|
})
|
|
234
244
|
.then(() => {
|
|
@@ -69,6 +69,16 @@ module.exports.getMessage = (options) => {
|
|
|
69
69
|
message.detailText = 'Uncompatible version of eUI found installed in the local CSDR project, please adjust and keep same compatible versions of eUI packages and projects';
|
|
70
70
|
break;
|
|
71
71
|
|
|
72
|
+
case 'BRANCH_NOT_PROVIDED':
|
|
73
|
+
message.detailTitle = 'RELEASE BRANCH missing - ABORTING!';
|
|
74
|
+
message.detailText = 'Package release needs to have a branch to build from as parameter from Bamboo';
|
|
75
|
+
break;
|
|
76
|
+
|
|
77
|
+
case 'REMOTE_ENVTARGET_NOT_MASTER_BRANCH':
|
|
78
|
+
message.detailTitle = 'REMOTE envTarget type branchis different from master - ABORTING!';
|
|
79
|
+
message.detailText = 'For envTarget remote delivery or "à la carte", only the master branch is allowed for build, contact support if any question';
|
|
80
|
+
break;
|
|
81
|
+
|
|
72
82
|
default:
|
|
73
83
|
message.detailTitle = 'GENERAL ERROR!';
|
|
74
84
|
message.detailText = options.exception;
|