@eui/tools 6.2.25 → 6.2.27

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.25
1
+ 6.2.27
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## 6.2.27 (2022-11-15)
2
+
3
+ ##### Bug Fixes
4
+
5
+ * **other:**
6
+ * 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))
7
+
8
+ * * *
9
+ * * *
10
+ ## 6.2.26 (2022-11-14)
11
+
12
+ ##### Bug Fixes
13
+
14
+ * **other:**
15
+ * adapted remote post build/serve concat for v10 v15 - MWP-9010 [MWP-9010](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9010) ([0cfce97e](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/0cfce97e398c4fed36d3db51a0d276ffab3dbc16))
16
+
17
+ * * *
18
+ * * *
1
19
  ## 6.2.25 (2022-11-14)
2
20
 
3
21
  ##### Chores
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.2.25",
3
+ "version": "6.2.27",
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
+ })
@@ -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);
@@ -194,9 +194,7 @@ module.exports.postBuild = (pkg, version) => {
194
194
  })
195
195
 
196
196
  .then(() => {
197
- // if (euiVersionNumber >= 15) {
198
- return remotesUtils.concatFiles(path.join(pkg.paths.dist, 'bundles'));
199
- // }
197
+ return remotesUtils.concatFiles(path.join(pkg.paths.dist, 'bundles'), euiVersionNumber);
200
198
  })
201
199
 
202
200
  .then(() => {
@@ -8,7 +8,7 @@ const concat = require('concat');
8
8
  const tools = require('../tools');
9
9
 
10
10
 
11
- module.exports.concatFiles = (workingPath) => {
11
+ module.exports.concatFiles = (workingPath, euiVersionNumber = 10) => {
12
12
  return Promise.resolve()
13
13
  .then(() => {
14
14
  tools.logInfo('Concatening JS files to main.js');
@@ -16,7 +16,7 @@ module.exports.concatFiles = (workingPath) => {
16
16
  tools.move(path.join(workingPath, 'main.js'), path.join(workingPath, 'main-old.js'));
17
17
 
18
18
  const files = [
19
- 'runtime.js',
19
+ ...(euiVersionNumber >= 15 ? ['runtime.js'] : []),
20
20
  'polyfills.js',
21
21
  'scripts.js',
22
22
  'main-old.js'
@@ -92,9 +92,7 @@ module.exports.serve = (remote = false) => {
92
92
  })
93
93
 
94
94
  .then(() => {
95
- // if (euiVersionNumber >= 15) {
96
- return remotesUtils.concatFiles(destPath);
97
- // }
95
+ return remotesUtils.concatFiles(destPath, euiVersionNumber);
98
96
  })
99
97
 
100
98
  .then(() => {
@@ -102,9 +100,7 @@ module.exports.serve = (remote = false) => {
102
100
  })
103
101
 
104
102
  .then(() => {
105
- // if (euiVersionNumber >= 15) {
106
- return remotesUtils.emptyIndexHtml(destPath);
107
- // }
103
+ return remotesUtils.emptyIndexHtml(destPath);
108
104
  })
109
105
 
110
106
  .catch((e) => {