From 5e04e4fcb90f27703b04370e97a28bfee273f5f1 Mon Sep 17 00:00:00 2001 From: venetrius Date: Fri, 18 Oct 2024 10:04:14 +0200 Subject: [PATCH 1/9] chore(webapps): use HeroDev libraries related to: #4549 --- Jenkinsfile | 2 +- webapps/frontend/package.json | 2 +- webapps/frontend/scripts/xlts.js | 17 ++++++++++------- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e05722de3b2..b32a8ffc5d4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -51,7 +51,7 @@ pipeline { withVault([vaultSecrets: [ [ - path : 'secret/products/cambpm/ci/xlts.dev', + path : 'secret/products/cambpm/ci/hero-dev', secretValues: [ [envVar: 'XLTS_REGISTRY', vaultKey: 'registry'], [envVar: 'XLTS_AUTH_TOKEN', vaultKey: 'authToken']] diff --git a/webapps/frontend/package.json b/webapps/frontend/package.json index 100de91cae8..45a432e5cc3 100644 --- a/webapps/frontend/package.json +++ b/webapps/frontend/package.json @@ -100,7 +100,7 @@ "webpack-merge": "5.10.0" }, "xlts": { - "xltsVersion": "1.9.3", + "xltsVersion": "1.9.7", "dependencies": [ "angular", "angular-animate", diff --git a/webapps/frontend/scripts/xlts.js b/webapps/frontend/scripts/xlts.js index c603ad9715e..377a4c2fb75 100755 --- a/webapps/frontend/scripts/xlts.js +++ b/webapps/frontend/scripts/xlts.js @@ -15,7 +15,7 @@ * limitations under the License. */ -const scope = 'xlts.dev'; +const scope = 'neverendingsupport'; const {execSync} = require('child_process'); @@ -33,18 +33,24 @@ const exec = (cmd, successMsg) => { }).toString(); }; +const dependencyVersion = (npmPackage, xltsVersion) => { + let versionPostfix = npmPackage.split('-')[1] || ''; + versionPostfix = versionPostfix ? '-' + versionPostfix : ''; + return `${npmPackage}@npm:@${scope}/angularjs@${xltsVersion}${versionPostfix}`; +}; + const registryConfigured = exec(`npm get @${scope}:registry`) !== 'undefined\n'; const {XLTS_REGISTRY, XLTS_AUTH_TOKEN} = process.env; if (!registryConfigured && XLTS_REGISTRY && XLTS_AUTH_TOKEN) { exec( - `npm set @${scope}:registry https://${XLTS_REGISTRY}/`, + `npm set @${scope}:registry https://${XLTS_REGISTRY}`, 'XLTS.dev registry configured.' ); exec( - `npm set //${XLTS_REGISTRY}/:_authToken ${XLTS_AUTH_TOKEN}`, + `npm set //${XLTS_REGISTRY}:_authToken ${XLTS_AUTH_TOKEN}`, 'XLTS.dev auth token configured.' ); } @@ -54,12 +60,9 @@ if ( process.argv[2] === 'install' ) { const {xltsVersion, dependencies} = require('../package.json').xlts; - const getNpmPackages = dependencies => dependencies - .map( - npmPackage => `${npmPackage}@npm:@${scope}/${npmPackage}@${xltsVersion}` - ) + .map(npmPackage => dependencyVersion(npmPackage, xltsVersion)) .join(' '); exec(`npm i --save-exact ${getNpmPackages(dependencies)}`); From 3055689e7c0b7bf45507e4bebc99c275d8b0c9dd Mon Sep 17 00:00:00 2001 From: venetrius Date: Mon, 21 Oct 2024 16:18:18 +0200 Subject: [PATCH 2/9] chore(webapps): add bootstrap xlts version related to: #4549 --- webapps/frontend/package.json | 32 ++++++++++++++++++++------------ webapps/frontend/scripts/xlts.js | 24 +++++++++++++++++------- 2 files changed, 37 insertions(+), 19 deletions(-) diff --git a/webapps/frontend/package.json b/webapps/frontend/package.json index 45a432e5cc3..65aa1ab5d38 100644 --- a/webapps/frontend/package.json +++ b/webapps/frontend/package.json @@ -100,17 +100,25 @@ "webpack-merge": "5.10.0" }, "xlts": { - "xltsVersion": "1.9.7", - "dependencies": [ - "angular", - "angular-animate", - "angular-cookies", - "angular-loader", - "angular-resource", - "angular-route", - "angular-sanitize", - "angular-touch", - "angular-mocks" - ] + "angular": { + "xltsVersion": "1.9.7", + "dependencies": [ + "angular", + "angular-animate", + "angular-cookies", + "angular-loader", + "angular-resource", + "angular-route", + "angular-sanitize", + "angular-touch", + "angular-mocks" + ] + }, + "bootstrap": { + "xltsVersion": "3.4.5", + "dependencies": [ + "bootstrap" + ] + } } } diff --git a/webapps/frontend/scripts/xlts.js b/webapps/frontend/scripts/xlts.js index 377a4c2fb75..faefb47e45c 100755 --- a/webapps/frontend/scripts/xlts.js +++ b/webapps/frontend/scripts/xlts.js @@ -33,7 +33,11 @@ const exec = (cmd, successMsg) => { }).toString(); }; -const dependencyVersion = (npmPackage, xltsVersion) => { +const getDependencyVersion = (nameSpace, npmPackage, xltsVersion) => { + if (nameSpace !== 'angular') { + return `${npmPackage}@npm:@${scope}/${npmPackage}@${xltsVersion}`; + } + let versionPostfix = npmPackage.split('-')[1] || ''; versionPostfix = versionPostfix ? '-' + versionPostfix : ''; return `${npmPackage}@npm:@${scope}/angularjs@${xltsVersion}${versionPostfix}`; @@ -59,13 +63,19 @@ if ( (registryConfigured || (XLTS_REGISTRY && XLTS_AUTH_TOKEN)) && process.argv[2] === 'install' ) { - const {xltsVersion, dependencies} = require('../package.json').xlts; - const getNpmPackages = dependencies => - dependencies - .map(npmPackage => dependencyVersion(npmPackage, xltsVersion)) - .join(' '); + const xlts = require('../package.json').xlts; + + const npmPackages = Object.entries(xlts) + .map(([nameSpace, settings]) => + settings.dependencies + .map(npmPackage => + getDependencyVersion(nameSpace, npmPackage, settings.xltsVersion) + ) + .join(' ') + ) + .join(' '); - exec(`npm i --save-exact ${getNpmPackages(dependencies)}`); + exec(`npm i --save-exact ${npmPackages}`); } else { console.log('XLTS installation skipped.'); // eslint-disable-line } From facf4522f700dd4371115554bd6d32734615b039 Mon Sep 17 00:00:00 2001 From: venetrius Date: Tue, 22 Oct 2024 13:45:45 +0200 Subject: [PATCH 3/9] chore(webapps): update Readme and comments related to: #4549 --- webapps/README.md | 19 +++++++++++++------ webapps/frontend/scripts/xlts.js | 4 ++-- webapps/pom.xml | 2 +- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/webapps/README.md b/webapps/README.md index 0a92b873b39..c7db9c40547 100644 --- a/webapps/README.md +++ b/webapps/README.md @@ -92,18 +92,25 @@ mvn jetty:run -Pdevelop npm run start ``` -#### AngularJS libraries from XLTS.dev +#### Never Ending Support libraries from Hero Devs -Since December 31, 2021, AngularJS is no longer officially supported by the original maintainers (Google). We replaced the official AngularJS libraries with the ones from [XLTS.dev](https://XLTS.dev) to ensure that our used libraries stay secure and supported. We include the AngularJS libraries from XLTS.dev in our Community Edition releases from 7.18.0-alpha2 on. +##### AngularJS +Since December 31, 2021, AngularJS is no longer officially supported by the original maintainers (Google). We replaced the official AngularJS libraries with the ones from [herodevs](https://www.herodevs.com/) to ensure that our used libraries stay secure and supported. We include the AngularJS libraries from herodevs in our Community Edition releases from 7.18.0-alpha2 on. -**Heads-up:** If you build the Webapps from source code, the build includes the no longer maintained AngularJS libraries in version 1.8.2 unless you have access to the XLTS.dev registry and configure it as shown below. +**Heads-up:** If you build the Webapps from source code, the build includes the no longer maintained AngularJS libraries in version 1.8.2 unless you have access to the herodevs registry and configure it as shown below. -To enable pulling the XLTS.dev AngularJS libraries while building the Webapps, please configure the npm registry. Add the XLTS.dev npm registry by replacing the variables `${XLTS_REGISTRY}` and `${XLTS_AUTH_TOKEN}` in the following commands and execute the commands in your terminal. +##### Bootstrap +Since December 31, 2021, the legacy Bootstrap 3 library is no longer officially supported by the original maintainers (twbs Bootstrap). We replaced the official Bootstrap 3 libraries with the ones from [herodevs](https://www.herodevs.com/) to ensure that our used libraries stay secure and supported. We include the Bootstrap 3 libraries from herodevs in our Community Edition releases from 7.23.0-alpha1 on. -Commands to configure the XLTS.dev npm registry: +**Heads-up:** If you build the Webapps from source code, the build includes the no longer maintained Bootstrap 3 libraries in version 3.4.1 unless you have access to the herodevs registry and configure it as shown below. + +##### Configure the herodevs registry +To enable pulling the HeroDevs AngularJS and Bootstrap libraries while building the Webapps, please configure the npm registry. Add the HeroDevs npm registry by replacing the variables `${XLTS_REGISTRY}` and `${XLTS_AUTH_TOKEN}` in the following commands and execute the commands in your terminal. + +Commands to configure the herodevs npm registry: ``` -npm set @xlts.dev:registry https://${XLTS_REGISTRY}/ +npm set @neverendingsupport:registry=https://${XLTS_REGISTRY}/ npm set //${XLTS_REGISTRY}/:_authToken ${XLTS_AUTH_TOKEN} ``` diff --git a/webapps/frontend/scripts/xlts.js b/webapps/frontend/scripts/xlts.js index faefb47e45c..76a8891e3e8 100755 --- a/webapps/frontend/scripts/xlts.js +++ b/webapps/frontend/scripts/xlts.js @@ -50,12 +50,12 @@ const {XLTS_REGISTRY, XLTS_AUTH_TOKEN} = process.env; if (!registryConfigured && XLTS_REGISTRY && XLTS_AUTH_TOKEN) { exec( `npm set @${scope}:registry https://${XLTS_REGISTRY}`, - 'XLTS.dev registry configured.' + 'XLTS registry configured.' ); exec( `npm set //${XLTS_REGISTRY}:_authToken ${XLTS_AUTH_TOKEN}`, - 'XLTS.dev auth token configured.' + 'XLTS auth token configured.' ); } diff --git a/webapps/pom.xml b/webapps/pom.xml index 315e940f161..1593693a0ae 100644 --- a/webapps/pom.xml +++ b/webapps/pom.xml @@ -173,7 +173,7 @@ - Install XLTS.dev dependencies + Install heroDev XLTS dependencies npm From ec2be0fa366ed3c583e31472ddf29494342bce31 Mon Sep 17 00:00:00 2001 From: venetrius Date: Thu, 7 Nov 2024 09:41:59 +0100 Subject: [PATCH 4/9] chore(webapps): add NES version for angularjs-essentials libs related to: #4549 --- webapps/frontend/package.json | 31 +++++++++++++++---------------- webapps/frontend/scripts/xlts.js | 32 +++++++++++++++++++++----------- 2 files changed, 36 insertions(+), 27 deletions(-) diff --git a/webapps/frontend/package.json b/webapps/frontend/package.json index 65aa1ab5d38..e5533b6ed24 100644 --- a/webapps/frontend/package.json +++ b/webapps/frontend/package.json @@ -101,24 +101,23 @@ }, "xlts": { "angular": { - "xltsVersion": "1.9.7", - "dependencies": [ - "angular", - "angular-animate", - "angular-cookies", - "angular-loader", - "angular-resource", - "angular-route", - "angular-sanitize", - "angular-touch", - "angular-mocks" - ] + "angular": "1.9.7", + "angular-animate": "1.9.7", + "angular-cookies": "1.9.7", + "angular-loader": "1.9.7", + "angular-resource": "1.9.7", + "angular-route": "1.9.7", + "angular-sanitize": "1.9.7", + "angular-touch": "1.9.7", + "angular-mocks": "1.9.7" }, "bootstrap": { - "xltsVersion": "3.4.5", - "dependencies": [ - "bootstrap" - ] + "bootstrap": "3.4.5" + }, + "angularjs-essentials": { + "angular-ui-bootstrap": "2.5.7", + "angular-translate": "2.20.3", + "angular-moment": "1.3.2" } } } diff --git a/webapps/frontend/scripts/xlts.js b/webapps/frontend/scripts/xlts.js index 76a8891e3e8..32322b10742 100755 --- a/webapps/frontend/scripts/xlts.js +++ b/webapps/frontend/scripts/xlts.js @@ -33,14 +33,26 @@ const exec = (cmd, successMsg) => { }).toString(); }; +// These are the last supported versions for these packages ????? +const baseVersions = { + 'angular-translate': '2.19.1', + 'angular-moment': '1.3.0', + 'angular-ui-bootstrap': '2.5.6' +}; + const getDependencyVersion = (nameSpace, npmPackage, xltsVersion) => { - if (nameSpace !== 'angular') { - return `${npmPackage}@npm:@${scope}/${npmPackage}@${xltsVersion}`; + if (nameSpace === 'angularjs-essentials') { + const baseVersion = baseVersions[npmPackage]; + return `${npmPackage}@npm:@${scope}/${nameSpace}@${baseVersion}-${npmPackage}-${xltsVersion}`; + } + + if (nameSpace === 'angular') { + const versionPostfix = + npmPackage === 'angular' ? '' : '-' + npmPackage.split('-')[1]; + return `${npmPackage}@npm:@${scope}/angularjs@${xltsVersion}${versionPostfix}`; } - let versionPostfix = npmPackage.split('-')[1] || ''; - versionPostfix = versionPostfix ? '-' + versionPostfix : ''; - return `${npmPackage}@npm:@${scope}/angularjs@${xltsVersion}${versionPostfix}`; + return `${npmPackage}@npm:@${scope}/${npmPackage}@${xltsVersion}`; }; const registryConfigured = exec(`npm get @${scope}:registry`) !== 'undefined\n'; @@ -66,12 +78,10 @@ if ( const xlts = require('../package.json').xlts; const npmPackages = Object.entries(xlts) - .map(([nameSpace, settings]) => - settings.dependencies - .map(npmPackage => - getDependencyVersion(nameSpace, npmPackage, settings.xltsVersion) - ) - .join(' ') + .flatMap(([nameSpace, settings]) => + Object.entries(settings).map(([npmPackage, version]) => + getDependencyVersion(nameSpace, npmPackage, version) + ) ) .join(' '); From 3c2d865491f9bb588301e81d6e489b89e54837d8 Mon Sep 17 00:00:00 2001 From: venetrius Date: Thu, 7 Nov 2024 09:42:38 +0100 Subject: [PATCH 5/9] refactor code --- webapps/frontend/scripts/xlts.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/webapps/frontend/scripts/xlts.js b/webapps/frontend/scripts/xlts.js index 32322b10742..4e962922ce7 100755 --- a/webapps/frontend/scripts/xlts.js +++ b/webapps/frontend/scripts/xlts.js @@ -33,26 +33,26 @@ const exec = (cmd, successMsg) => { }).toString(); }; -// These are the last supported versions for these packages ????? -const baseVersions = { +const lastOpenSourceVersions = { 'angular-translate': '2.19.1', 'angular-moment': '1.3.0', 'angular-ui-bootstrap': '2.5.6' }; -const getDependencyVersion = (nameSpace, npmPackage, xltsVersion) => { - if (nameSpace === 'angularjs-essentials') { - const baseVersion = baseVersions[npmPackage]; - return `${npmPackage}@npm:@${scope}/${nameSpace}@${baseVersion}-${npmPackage}-${xltsVersion}`; - } +const getVersionPostFix = angularPackage => + angularPackage === 'angular' ? '' : '-' + angularPackage.split('-')[1]; - if (nameSpace === 'angular') { - const versionPostfix = - npmPackage === 'angular' ? '' : '-' + npmPackage.split('-')[1]; - return `${npmPackage}@npm:@${scope}/angularjs@${xltsVersion}${versionPostfix}`; +const getDependencyVersion = (nameSpace, npmPackage, xltsVersion) => { + switch (nameSpace) { + case 'angularjs-essentials': + return `${npmPackage}@npm:@${scope}/${nameSpace}@${lastOpenSourceVersions[npmPackage]}-${npmPackage}-${xltsVersion}`; + case 'angular': + return `${npmPackage}@npm:@${scope}/angularjs@${xltsVersion}${getVersionPostFix( + npmPackage + )}`; + default: + return `${npmPackage}@npm:@${scope}/${npmPackage}@${xltsVersion}`; } - - return `${npmPackage}@npm:@${scope}/${npmPackage}@${xltsVersion}`; }; const registryConfigured = exec(`npm get @${scope}:registry`) !== 'undefined\n'; From 710061547baa1f0f2bb885ce6dc5f9733b86c27e Mon Sep 17 00:00:00 2001 From: venetrius Date: Thu, 7 Nov 2024 12:47:28 +0100 Subject: [PATCH 6/9] make heroDevs name systemic --- Jenkinsfile | 2 +- webapps/frontend/scripts/xlts.js | 2 +- webapps/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b32a8ffc5d4..0ec39bd3174 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -51,7 +51,7 @@ pipeline { withVault([vaultSecrets: [ [ - path : 'secret/products/cambpm/ci/hero-dev', + path : 'secret/products/cambpm/ci/hero-devs', secretValues: [ [envVar: 'XLTS_REGISTRY', vaultKey: 'registry'], [envVar: 'XLTS_AUTH_TOKEN', vaultKey: 'authToken']] diff --git a/webapps/frontend/scripts/xlts.js b/webapps/frontend/scripts/xlts.js index 4e962922ce7..e077a6ddc3b 100755 --- a/webapps/frontend/scripts/xlts.js +++ b/webapps/frontend/scripts/xlts.js @@ -61,7 +61,7 @@ const {XLTS_REGISTRY, XLTS_AUTH_TOKEN} = process.env; if (!registryConfigured && XLTS_REGISTRY && XLTS_AUTH_TOKEN) { exec( - `npm set @${scope}:registry https://${XLTS_REGISTRY}`, + `npm set @${scope}:registry https://${XLTS_REGISTRY}/`, 'XLTS registry configured.' ); diff --git a/webapps/pom.xml b/webapps/pom.xml index 1593693a0ae..1ead91ea590 100644 --- a/webapps/pom.xml +++ b/webapps/pom.xml @@ -173,7 +173,7 @@ - Install heroDev XLTS dependencies + Install heroDevs XLTS dependencies npm From a2d136d11ea2baed86c1bf4fbf15eaa61882a81b Mon Sep 17 00:00:00 2001 From: venetrius Date: Thu, 7 Nov 2024 15:26:21 +0100 Subject: [PATCH 7/9] fix setting outh token --- webapps/frontend/scripts/xlts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapps/frontend/scripts/xlts.js b/webapps/frontend/scripts/xlts.js index e077a6ddc3b..91df588d04d 100755 --- a/webapps/frontend/scripts/xlts.js +++ b/webapps/frontend/scripts/xlts.js @@ -66,7 +66,7 @@ if (!registryConfigured && XLTS_REGISTRY && XLTS_AUTH_TOKEN) { ); exec( - `npm set //${XLTS_REGISTRY}:_authToken ${XLTS_AUTH_TOKEN}`, + `npm set //${XLTS_REGISTRY}/:_authToken ${XLTS_AUTH_TOKEN}`, 'XLTS auth token configured.' ); } From f5ed3601b08a81a3ce4a50b54aa19a93c9f854d7 Mon Sep 17 00:00:00 2001 From: venetrius Date: Tue, 12 Nov 2024 13:44:39 +0100 Subject: [PATCH 8/9] chore(webapps): update Front End README --- webapps/README.md | 31 +++++++++++++++++++++++-------- webapps/pom.xml | 2 +- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/webapps/README.md b/webapps/README.md index c7db9c40547..40abe8ebec8 100644 --- a/webapps/README.md +++ b/webapps/README.md @@ -92,22 +92,37 @@ mvn jetty:run -Pdevelop npm run start ``` -#### Never Ending Support libraries from Hero Devs +#### Extended Support libraries from HeroDevs ##### AngularJS -Since December 31, 2021, AngularJS is no longer officially supported by the original maintainers (Google). We replaced the official AngularJS libraries with the ones from [herodevs](https://www.herodevs.com/) to ensure that our used libraries stay secure and supported. We include the AngularJS libraries from herodevs in our Community Edition releases from 7.18.0-alpha2 on. +Since December 31, 2021, AngularJS is no longer officially supported by the original maintainers (Google). We replaced the official AngularJS libraries with the ones from [HeroDevs](https://www.herodevs.com/) to ensure that our used libraries stay secure and supported. We include the AngularJS libraries from HeroDevs in our Community Edition releases from 7.18.0-alpha2 on. -**Heads-up:** If you build the Webapps from source code, the build includes the no longer maintained AngularJS libraries in version 1.8.2 unless you have access to the herodevs registry and configure it as shown below. +**Heads-up:** If you build the Webapps from source code, the build includes the no longer maintained AngularJS libraries in version 1.8.2 unless you have access to the HeroDevs registry and configure it as shown below. ##### Bootstrap -Since December 31, 2021, the legacy Bootstrap 3 library is no longer officially supported by the original maintainers (twbs Bootstrap). We replaced the official Bootstrap 3 libraries with the ones from [herodevs](https://www.herodevs.com/) to ensure that our used libraries stay secure and supported. We include the Bootstrap 3 libraries from herodevs in our Community Edition releases from 7.23.0-alpha1 on. +Since December 31, 2021, the legacy Bootstrap 3 library is no longer officially supported by the original maintainers (twbs Bootstrap). We replaced the official Bootstrap 3 libraries with the ones from [HeroDevs](https://www.herodevs.com/) to ensure that our used libraries stay secure and supported. We include the Bootstrap 3 libraries from HeroDevs in our Community Edition releases from 7.23.0-alpha2 on. -**Heads-up:** If you build the Webapps from source code, the build includes the no longer maintained Bootstrap 3 libraries in version 3.4.1 unless you have access to the herodevs registry and configure it as shown below. +**Heads-up:** If you build the Webapps from source code, the build includes the no longer maintained Bootstrap 3 libraries in version 3.4.1 unless you have access to the HeroDevs registry and configure it as shown below. -##### Configure the herodevs registry -To enable pulling the HeroDevs AngularJS and Bootstrap libraries while building the Webapps, please configure the npm registry. Add the HeroDevs npm registry by replacing the variables `${XLTS_REGISTRY}` and `${XLTS_AUTH_TOKEN}` in the following commands and execute the commands in your terminal. +#### angular-ui-bootstrap +The angular-ui-bootstrap project is no longer being maintained. We replaced the official angular-ui-bootstrap libraries with the ones from [HeroDevs](https://www.herodevs.com/) to ensure that our used libraries stay secure and supported. We include the angular-ui-bootstrap libraries from HeroDevs in our Community Edition releases from 7.23.0-alpha2 on. -Commands to configure the herodevs npm registry: +**Heads-up:** If you build the Webapps from source code, the build includes the no longer maintained angular-ui-bootstrap libraries in version 2.5.6 unless you have access to the HeroDevs registry and configure it as shown below. + +#### angular-translate +Since 2024-01-15 the angular-translate project has been archived. We replaced the official angular-translate libraries with the ones from [HeroDevs](https://www.herodevs.com/) to ensure that our used libraries stay secure and supported. We include the angular-translate libraries from HeroDevs in our Community Edition releases from 7.23.0-alpha2 on. + +**Heads-up:** If you build the Webapps from source code, the build includes the no longer maintained angular-translate libraries in version 2.19.0 unless you have access to the HeroDevs registry and configure it as shown below. + +#### angular-moment +The angular-moment project has been archived on Nov 30, 2021. We replaced the official angular-moment libraries with the ones from [HeroDevs](https://www.herodevs.com/) to ensure that our used libraries stay secure and supported. We include the angular-moment libraries from HeroDevs in our Community Edition releases from 7.23.0-alpha2 on. + +**Heads-up:** If you build the Webapps from source code, the build includes the no longer maintained angular-moment libraries in version 1.3.0 unless you have access to the HeroDevs registry and configure it as shown below. + +##### Configure the HeroDevs registry +To enable pulling the HeroDevs extended support libraries while building the Webapps, please configure the npm registry. Add the HeroDevs npm registry by replacing the variables `${XLTS_REGISTRY}` and `${XLTS_AUTH_TOKEN}` in the following commands and execute the commands in your terminal. + +Commands to configure the HeroDevs npm registry: ``` npm set @neverendingsupport:registry=https://${XLTS_REGISTRY}/ diff --git a/webapps/pom.xml b/webapps/pom.xml index 1ead91ea590..81ffe98d8e4 100644 --- a/webapps/pom.xml +++ b/webapps/pom.xml @@ -173,7 +173,7 @@ - Install heroDevs XLTS dependencies + Install HeroDevs XLTS dependencies npm From 4b23b4cd83929b669fc0f7035337e4098e2ed573 Mon Sep 17 00:00:00 2001 From: venetrius Date: Thu, 14 Nov 2024 09:59:34 +0100 Subject: [PATCH 9/9] chore(webapps): adjust herdevs credentials related to: #4549 --- Jenkinsfile | 4 ++-- webapps/README.md | 10 +++++----- webapps/frontend/scripts/xlts.js | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0ec39bd3174..df6b22d753d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -53,8 +53,8 @@ pipeline { [ path : 'secret/products/cambpm/ci/hero-devs', secretValues: [ - [envVar: 'XLTS_REGISTRY', vaultKey: 'registry'], - [envVar: 'XLTS_AUTH_TOKEN', vaultKey: 'authToken']] + [envVar: 'HERODEVS_REGISTRY', vaultKey: 'registry'], + [envVar: 'HERODEVS_AUTH_TOKEN', vaultKey: 'authToken']] ]]]) { cambpmRunMaven('.', 'clean source:jar deploy source:test-jar com.mycila:license-maven-plugin:check -Pdistro,distro-ce,distro-wildfly,distro-webjar,h2-in-memory -DaltStagingDirectory=${WORKSPACE}/staging -DskipRemoteStaging=true '+ skipTests, diff --git a/webapps/README.md b/webapps/README.md index 40abe8ebec8..8b92b59d69a 100644 --- a/webapps/README.md +++ b/webapps/README.md @@ -120,20 +120,20 @@ The angular-moment project has been archived on Nov 30, 2021. We replaced the of **Heads-up:** If you build the Webapps from source code, the build includes the no longer maintained angular-moment libraries in version 1.3.0 unless you have access to the HeroDevs registry and configure it as shown below. ##### Configure the HeroDevs registry -To enable pulling the HeroDevs extended support libraries while building the Webapps, please configure the npm registry. Add the HeroDevs npm registry by replacing the variables `${XLTS_REGISTRY}` and `${XLTS_AUTH_TOKEN}` in the following commands and execute the commands in your terminal. +To enable pulling the HeroDevs extended support libraries while building the Webapps, please configure the npm registry. Add the HeroDevs npm registry by replacing the variables `${HERODEVS_REGISTRY}` and `${HERODEVS_AUTH_TOKEN}` in the following commands and execute the commands in your terminal. Commands to configure the HeroDevs npm registry: ``` -npm set @neverendingsupport:registry=https://${XLTS_REGISTRY}/ -npm set //${XLTS_REGISTRY}/:_authToken ${XLTS_AUTH_TOKEN} +npm set @neverendingsupport:registry=https://${HERODEVS_REGISTRY}/ +npm set //${HERODEVS_REGISTRY}/:_authToken ${HERODEVS_AUTH_TOKEN} ``` Alternatively, you can set the following environment variables: ```sh -export XLTS_REGISTRY = "example.com" # Hostname without protocol (e.g., "https://"), leading or trailing slashes -export XLTS_AUTH_TOKEN = "abc..." # Token to authenticate against the registry +export HERODEVS_REGISTRY = "example.com" # Hostname without protocol (e.g., "https://"), leading or trailing slashes +export HERODEVS_AUTH_TOKEN = "abc..." # Token to authenticate against the registry ``` You receive the information about the registry and the auth token directly from XLTS.dev. diff --git a/webapps/frontend/scripts/xlts.js b/webapps/frontend/scripts/xlts.js index 91df588d04d..903e1e985d3 100755 --- a/webapps/frontend/scripts/xlts.js +++ b/webapps/frontend/scripts/xlts.js @@ -57,22 +57,22 @@ const getDependencyVersion = (nameSpace, npmPackage, xltsVersion) => { const registryConfigured = exec(`npm get @${scope}:registry`) !== 'undefined\n'; -const {XLTS_REGISTRY, XLTS_AUTH_TOKEN} = process.env; +const {HERODEVS_REGISTRY, HERODEVS_AUTH_TOKEN} = process.env; -if (!registryConfigured && XLTS_REGISTRY && XLTS_AUTH_TOKEN) { +if (!registryConfigured && HERODEVS_REGISTRY && HERODEVS_AUTH_TOKEN) { exec( - `npm set @${scope}:registry https://${XLTS_REGISTRY}/`, + `npm set @${scope}:registry https://${HERODEVS_REGISTRY}/`, 'XLTS registry configured.' ); exec( - `npm set //${XLTS_REGISTRY}/:_authToken ${XLTS_AUTH_TOKEN}`, + `npm set //${HERODEVS_REGISTRY}/:_authToken ${HERODEVS_AUTH_TOKEN}`, 'XLTS auth token configured.' ); } if ( - (registryConfigured || (XLTS_REGISTRY && XLTS_AUTH_TOKEN)) && + (registryConfigured || (HERODEVS_REGISTRY && HERODEVS_AUTH_TOKEN)) && process.argv[2] === 'install' ) { const xlts = require('../package.json').xlts;