@eui/tools 4.19.7 → 4.19.11
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 +36 -0
- package/package.json +1 -1
- package/sandbox.js +15 -2
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/module.ts +2 -1
- package/scripts/utils/pre-build/injection/routes-replacement.js +33 -27
- package/scripts/utils/pre-build/translations/elements.js +21 -5
package/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.19.
|
|
1
|
+
4.19.11
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,39 @@
|
|
|
1
|
+
## 4.19.11 (2022-02-21)
|
|
2
|
+
|
|
3
|
+
##### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* routes replacement wrong injection when ids is used - MWP-7941 [MWP-7941](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-7941) ([1716ddd3](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/1716ddd31a49cb5c9158454491b51685e038d070))
|
|
7
|
+
|
|
8
|
+
* * *
|
|
9
|
+
* * *
|
|
10
|
+
## 4.19.10 (2022-02-18)
|
|
11
|
+
|
|
12
|
+
##### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **other:**
|
|
15
|
+
* missing eui i18n path from elements generated translations - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([3f359cab](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/3f359cabcc60b938538fd3ace45714439fb5d8c6))
|
|
16
|
+
|
|
17
|
+
* * *
|
|
18
|
+
* * *
|
|
19
|
+
## 4.19.9 (2022-02-17)
|
|
20
|
+
|
|
21
|
+
##### Chores
|
|
22
|
+
|
|
23
|
+
* **other:**
|
|
24
|
+
* BreadcrumbsService mapping MWP-7583 [MWP-7583](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-7583) ([730d5cbe](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/730d5cbe68e007dc1570e41d4917058e857dfcc1))
|
|
25
|
+
|
|
26
|
+
* * *
|
|
27
|
+
* * *
|
|
28
|
+
## 4.19.8 (2022-02-16)
|
|
29
|
+
|
|
30
|
+
##### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* **other:**
|
|
33
|
+
* routes replacement for local-dev not taken into account - MWP-7941 [MWP-7941](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-7941) ([18a42cee](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/18a42ceeeb32aacf72fb2d441059ec91b6cef055))
|
|
34
|
+
|
|
35
|
+
* * *
|
|
36
|
+
* * *
|
|
1
37
|
## 4.19.7 (2022-02-13)
|
|
2
38
|
|
|
3
39
|
##### Chores
|
package/package.json
CHANGED
package/sandbox.js
CHANGED
|
@@ -14,7 +14,7 @@ const injectionUtils = require('./scripts/utils/pre-build/injection/injection-ut
|
|
|
14
14
|
const compositeUtils = require('./scripts/csdr/install/composite-utils');
|
|
15
15
|
const installUtils = require('./scripts/csdr/install/install-utils');
|
|
16
16
|
const notificationUtils = require('./scripts/utils/notification/notification-utils');
|
|
17
|
-
|
|
17
|
+
const translationUtils = require('./scripts/utils/pre-build/translations/translation-utils');
|
|
18
18
|
|
|
19
19
|
// console.log(configUtils.packages.getPackages());
|
|
20
20
|
// console.log(configUtils.packages.getPackage('eui-tools'));
|
|
@@ -640,6 +640,9 @@ const notificationUtils = require('./scripts/utils/notification/notification-uti
|
|
|
640
640
|
// })
|
|
641
641
|
|
|
642
642
|
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
|
|
643
646
|
const prjName = 'my-workplace';
|
|
644
647
|
const prj = configUtils.projects.getCsdrProject(prjName);
|
|
645
648
|
|
|
@@ -649,5 +652,15 @@ return Promise.resolve()
|
|
|
649
652
|
// })
|
|
650
653
|
.then(() => {
|
|
651
654
|
// return injectionUtils.externals.remapRoutesByEnvConfig(prj, 'DEV', true);
|
|
652
|
-
return injectionUtils.routesReplacement.buildRoutes(prj, 'DEV',
|
|
655
|
+
return injectionUtils.routesReplacement.buildRoutes(prj, 'DEV', true);
|
|
653
656
|
})
|
|
657
|
+
|
|
658
|
+
|
|
659
|
+
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
// return Promise.resolve()
|
|
663
|
+
// .then(() => {
|
|
664
|
+
// const pkg = configUtils.packages.getPackage('opsys-result-quality-management-eui10-remote-el-ui', true);
|
|
665
|
+
// return translationUtils.elements.generate('eui,opsys', pkg)
|
|
666
|
+
// })
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
EuiButtonModule,
|
|
38
38
|
EuiLabelModule,
|
|
39
39
|
} from '@eui/components-next';
|
|
40
|
-
import { LanguageInterceptor, PushNotificationsService } from '@csdr/core';
|
|
40
|
+
import { LanguageInterceptor, PushNotificationsService, BreadcrumbsService } from '@csdr/core';
|
|
41
41
|
// TODO[REMOTE-SETUP] uncomment if zipkin is used
|
|
42
42
|
// import { TRACE_LOCAL_SERVICE_NAME, ZipkinHttpInterceptor, ZipkinTraceManager } from '@csdr/zipkin-tracing';
|
|
43
43
|
|
|
@@ -195,6 +195,7 @@ export function openidConnectInterceptorFactory(config) {
|
|
|
195
195
|
deps: [CONFIG_TOKEN, HttpClient, PLATFORM_ID, Router, StoreService, I18nService,
|
|
196
196
|
UX_SERVICE_HOST_TOKEN, UX_APP_SHELL_SERVICE_HOST_TOKEN, NG_ZONE_HOST_TOKEN],
|
|
197
197
|
},
|
|
198
|
+
{ provide: BreadcrumbsService, useFactory: () => window['PROVIDERS']['BreadcrumbsService'], deps: [] },
|
|
198
199
|
{ provide: ELEMENT_ROUTER_TOKEN, useFactory: () => window['PROVIDERS']['ELEMENT_ROUTER_TOKEN'], deps: [] },
|
|
199
200
|
// TODO[REMOTE-SETUP] uncomment if zipkin is used
|
|
200
201
|
// { provide: TRACE_LOCAL_SERVICE_NAME, useFactory: () => window['PROVIDERS']['TRACE_LOCAL_SERVICE_NAME'], deps: [] },
|
|
@@ -7,6 +7,29 @@ const tools = require('../../tools');
|
|
|
7
7
|
const configUtils = require('../../../csdr/config/config-utils');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
+
const getEnvTarget = (envTarget, build) => {
|
|
11
|
+
let envTargetFinal = envTarget.toLowerCase();
|
|
12
|
+
|
|
13
|
+
if (build) {
|
|
14
|
+
// dirty fix as openid files do not respect envTarget names
|
|
15
|
+
if (envTargetFinal === 'tst') {
|
|
16
|
+
envTargetFinal = 'test';
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// serve configuration based
|
|
20
|
+
} else {
|
|
21
|
+
if (envTarget.indexOf('local') > -1) {
|
|
22
|
+
envTargetFinal = envTarget.replace('-openid', '');
|
|
23
|
+
} else {
|
|
24
|
+
envTargetFinal = 'local-' + envTargetFinal;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return envTargetFinal;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
10
33
|
const getEnvConfig = (project, envTarget, build) => {
|
|
11
34
|
tools.logInfo(`Getting config file for env : ${envTarget}`);
|
|
12
35
|
|
|
@@ -14,25 +37,8 @@ const getEnvConfig = (project, envTarget, build) => {
|
|
|
14
37
|
.then(() => {
|
|
15
38
|
// getting config file
|
|
16
39
|
const projectAssetsPath = path.join(process.cwd(), project.folder, 'src', 'assets');
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
// build - envTarget based
|
|
20
|
-
if (build) {
|
|
21
|
-
let envTargetFinal = envTarget.toLowerCase();
|
|
22
|
-
// dirty fix as openid files do not respect envTarget names
|
|
23
|
-
if (envTargetFinal === 'tst') {
|
|
24
|
-
envTargetFinal = 'test';
|
|
25
|
-
}
|
|
26
|
-
configFile = path.join(projectAssetsPath, 'openid-login-config.' + envTargetFinal + '.json');
|
|
27
|
-
|
|
28
|
-
// serve configuration based
|
|
29
|
-
} else {
|
|
30
|
-
if (envTarget.indexOf('local') > -1) {
|
|
31
|
-
configFile = path.join(projectAssetsPath, 'openid-login-config.' + envTarget.replace('-openid', '') + '.json');
|
|
32
|
-
} else {
|
|
33
|
-
configFile = path.join(projectAssetsPath, 'openid-login-config.local-' + envTarget + '.json');
|
|
34
|
-
}
|
|
35
|
-
}
|
|
40
|
+
const envTargetFinal = getEnvTarget(envTarget, build);
|
|
41
|
+
const configFile = path.join(projectAssetsPath, 'openid-login-config.' + envTargetFinal + '.json');
|
|
36
42
|
|
|
37
43
|
tools.logInfo(`checking ${configFile}`);
|
|
38
44
|
if (!tools.isFileExists(configFile)) {
|
|
@@ -178,15 +184,15 @@ const replaceRoutes = (project, envTarget, build, routesFileContent) => {
|
|
|
178
184
|
|
|
179
185
|
// getting env route defs content if build mode (not serve)
|
|
180
186
|
let envRouteDefsPath, envRouteDefsJSON = [];
|
|
181
|
-
|
|
182
|
-
envRouteDefsPath = path.join(projectAssetsPath, 'route-defs.' + envTarget.toLowerCase() + '.json');
|
|
187
|
+
const envTargetFinal = getEnvTarget(envTarget, build);
|
|
183
188
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
+
envRouteDefsPath = path.join(projectAssetsPath, 'route-defs.' + envTargetFinal + '.json');
|
|
190
|
+
|
|
191
|
+
if (!tools.isFileExists(envRouteDefsPath)) {
|
|
192
|
+
tools.logError(`${envRouteDefsPath} File NOT FOUND`);
|
|
193
|
+
throw 'ENV_ROUTE_DEFS_FILE_NOT_FOUND';
|
|
189
194
|
}
|
|
195
|
+
envRouteDefsJSON = require(envRouteDefsPath);
|
|
190
196
|
|
|
191
197
|
// merging content of base + env
|
|
192
198
|
tools.logInfo(`Merging ${baseRouteDefsPath} with ${envRouteDefsPath}`);
|
|
@@ -212,7 +218,7 @@ const replaceRoutes = (project, envTarget, build, routesFileContent) => {
|
|
|
212
218
|
routeContent += ` id: '${route.data.id}',\n`;
|
|
213
219
|
}
|
|
214
220
|
if (route.data.ids) {
|
|
215
|
-
routeContent += ` ids:
|
|
221
|
+
routeContent += ` ids: ${route.data.ids},\n`;
|
|
216
222
|
}
|
|
217
223
|
if (route.data.featureName) {
|
|
218
224
|
routeContent += ` featureName: '${route.data.featureName}',\n`;
|
|
@@ -51,7 +51,13 @@ module.exports.generate = (inputScopes = '', inputPkg) => {
|
|
|
51
51
|
tools.logInfo(`Adding packages from scope "${scope}"`);
|
|
52
52
|
const scopePath = path.resolve(nmPath, scope);
|
|
53
53
|
if (tools.isDirExists(scopePath)) {
|
|
54
|
-
let files = fs.readdirSync(scopePath).map(pkg =>
|
|
54
|
+
let files = fs.readdirSync(scopePath).map((pkg) => {
|
|
55
|
+
return {
|
|
56
|
+
name: pkg,
|
|
57
|
+
scope: scope,
|
|
58
|
+
folder: path.resolve(nmPath, `${scope}/${pkg}`)
|
|
59
|
+
}
|
|
60
|
+
});
|
|
55
61
|
packages = [...packages, ...files];
|
|
56
62
|
}
|
|
57
63
|
});
|
|
@@ -63,7 +69,7 @@ module.exports.generate = (inputScopes = '', inputPkg) => {
|
|
|
63
69
|
})
|
|
64
70
|
|
|
65
71
|
.then(() => {
|
|
66
|
-
if (!fs.existsSync(destFolder)) {
|
|
72
|
+
if (!fs.existsSync(destFolder) && !dryRun) {
|
|
67
73
|
fs.mkdirSync(destFolder);
|
|
68
74
|
}
|
|
69
75
|
|
|
@@ -76,9 +82,19 @@ module.exports.generate = (inputScopes = '', inputPkg) => {
|
|
|
76
82
|
|
|
77
83
|
// Add module translations
|
|
78
84
|
packages.forEach((pkg) => {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
85
|
+
let baseI18nPath = 'i18n';
|
|
86
|
+
if (pkg.scope === '@eui') {
|
|
87
|
+
baseI18nPath = 'i18n-eui';
|
|
88
|
+
}
|
|
89
|
+
file = path.join(pkg.folder, `assets/${baseI18nPath}/${lang}.json`);
|
|
90
|
+
|
|
91
|
+
tools.logInfo(`Adding translations from ${pkg.folder}`);
|
|
92
|
+
if (tools.isFileExists(file)) {
|
|
93
|
+
tools.logInfo(`${file} found...adding`);
|
|
94
|
+
addTranslation(file, lang)
|
|
95
|
+
} else {
|
|
96
|
+
tools.logInfo(`${file} not found...skipping`);
|
|
97
|
+
}
|
|
82
98
|
});
|
|
83
99
|
|
|
84
100
|
// Write final file
|