@eui/tools 6.2.26 → 6.2.28

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.
@@ -1 +1 @@
1
- 6.2.26
1
+ 6.2.28
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## 6.2.28 (2022-11-15)
2
+
3
+ ##### Chores
4
+
5
+ * **v15-remote:**
6
+ * adds locale registration for v15 remote skeleton - EUI-8998 [EUI-8998](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-8998) ([e63397f3](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/e63397f38416ec82b4d3673049ac3e2db5fab1ba))
7
+
8
+ * * *
9
+ * * *
10
+ ## 6.2.27 (2022-11-15)
11
+
12
+ ##### Bug Fixes
13
+
14
+ * **other:**
15
+ * fetching latest fixed deps issue - MWP-9010 [MWP-9010](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9010) ([c8c9792d](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/c8c9792da91db89a46d820dfe465c397c2d920a5))
16
+
17
+ * * *
18
+ * * *
1
19
  ## 6.2.26 (2022-11-14)
2
20
 
3
21
  ##### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.2.26",
3
+ "version": "6.2.28",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
package/sandbox.js CHANGED
@@ -1057,7 +1057,13 @@ const versionUtils = require('./scripts/csdr/version/version-utils');
1057
1057
  // return injectionUtils.routesReplacement.buildRoutes(project, 'TST', true);
1058
1058
  // })
1059
1059
 
1060
- const rootDirectory = fs.realpathSync(process.cwd());
1061
- const rootDirectory2 = process.cwd();
1062
-
1063
- console.log(rootDirectory, rootDirectory2);
1060
+ Promise.resolve()
1061
+ .then(() => {
1062
+ const prjName = 'my-workplace-host';
1063
+ const prj = configUtils.projects.getCsdrProject(prjName);
1064
+
1065
+ return installUtils.projects.getLocalProjectFixedDeps(prj);
1066
+ })
1067
+ .then((deps) => {
1068
+ console.log(deps);
1069
+ })
@@ -0,0 +1,53 @@
1
+ import { GlobalConfig, I18nConfig, LocaleServiceConfig } from '@eui/core';
2
+
3
+ /**
4
+ * import and register locales (currently MWP uses only French and english)
5
+ */
6
+ import { registerLocaleData } from '@angular/common';
7
+ import localeEn from '@angular/common/locales/en';
8
+ import localeEnExtra from '@angular/common/locales/extra/en';
9
+ import localeFr from '@angular/common/locales/fr';
10
+ import localeFrExtra from '@angular/common/locales/extra/fr';
11
+ registerLocaleData(localeEn, 'en', localeEnExtra);
12
+ registerLocaleData(localeFr, 'fr', localeFrExtra);
13
+
14
+ /**
15
+ * Internationalization Configuration
16
+ */
17
+ const i18nConfig: I18nConfig = {
18
+ i18nLoader: {
19
+ i18nFolders: ['elements/@module.full.name@/bundles/assets/i18n-compiled'],
20
+ i18nResources: [{
21
+ prefix: 'assets/i18n-eui/',
22
+ suffix: '.json',
23
+ }],
24
+ },
25
+ i18nService: {
26
+ languages: ['en', 'fr'],
27
+ defaultLanguage: 'en',
28
+ },
29
+ };
30
+
31
+ /**
32
+ * Locale Configuration
33
+ */
34
+ const localeConfig: LocaleServiceConfig = {
35
+ id: 'en',
36
+ available: ['en', 'fr'],
37
+ bindWithTranslate: true,
38
+ affectGlobalLocale: true,
39
+ };
40
+
41
+ /**
42
+ * Global Configuration
43
+ */
44
+ export const GLOBAL: GlobalConfig = {
45
+ /* URL that needs to be used in the appRouting of the MWP */
46
+ baseUrl: '@module.name@',
47
+ /* Element tag name that needs to be unique - make sure it doesn't collide with any other MWP element */
48
+ elementName: '@module.scope-name@',
49
+ /* in case you are using NgRx give it a unique name (mostly for debugging) */
50
+ storeName: '@module.scope-name@',
51
+ i18n: i18nConfig,
52
+ locale: localeConfig,
53
+ };
@@ -79,16 +79,11 @@ module.exports.getLocalProjectsDeps = () => {
79
79
  }
80
80
 
81
81
 
82
- const getLocalProjectFixedDeps = (prj) => {
82
+ const getLocalProjectFixedDeps = module.exports.getLocalProjectFixedDeps = (prj) => {
83
83
  tools.logTitle('Getting project fixed dependencies - not part of the composite');
84
84
 
85
85
  return Promise.resolve()
86
86
  .then(() => {
87
- return metadataUtils.package.getPackagesDeps('packages');
88
- })
89
-
90
- // extracting the fixed deps versions from metadata
91
- .then((pkgDeps) => {
92
87
  let deps = {};
93
88
 
94
89
  if (prj.fixedDependencies) {
@@ -96,7 +91,8 @@ const getLocalProjectFixedDeps = (prj) => {
96
91
  console.log(prj.fixedDependencies);
97
92
 
98
93
  prj.fixedDependencies.forEach((dep) => {
99
- const newDep = { [dep]: pkgDeps[dep] };
94
+ const pkg = configUtils.packages.getPackageByNpmPkg(dep, true);
95
+ const newDep = { [dep]: metadataUtils.package.getPackageVersionLast(pkg)};
100
96
  deps = { ...deps, ...newDep }
101
97
  })
102
98
  }
@@ -367,6 +367,18 @@ module.exports.getPackageVersionsLatest = (pkg) => {
367
367
  return;
368
368
  }
369
369
 
370
+ module.exports.getPackageVersionLast = (pkg) => {
371
+ const pkgVersionsJson = this.getPackageVersionsJson(pkg);
372
+
373
+
374
+
375
+ if (pkgVersionsJson) {
376
+ return pkgVersionsJson.versions.splice(-1)[0].version;
377
+ }
378
+
379
+ return;
380
+ }
381
+
370
382
 
371
383
  module.exports.getPackageVersionsByMajor = (pkg, major, isMaster) => {
372
384
  const pkgVersions = this.getPackageVersions(pkg);