@eui/tools 6.14.8 → 6.14.10

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.14.8
1
+ 6.14.10
package/CHANGELOG.md CHANGED
@@ -1,3 +1,22 @@
1
+ ## 6.14.10 (2023-12-06)
2
+
3
+ ##### Chores
4
+
5
+ * **other:**
6
+ * transfer cli args to internal function for angular app build - EUI-7121 [EUI-7121](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7121) ([eac5c2c1](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/eac5c2c169bb945a6b699a62f88c81632a9f7357))
7
+
8
+ * * *
9
+ * * *
10
+ ## 6.14.9 (2023-12-06)
11
+
12
+ ##### Chores
13
+
14
+ * **other:**
15
+ * adapted distribution list fetch for app-group release - EUI-7121 [EUI-7121](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7121) ([0e75bc2b](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/0e75bc2be61e0f1b2c997616e5ccb9bcfc7e5c6a))
16
+ * added debugging for baseHref fetch - EUI-7121 [EUI-7121](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7121) ([5fb6a07e](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/5fb6a07edc9e5410fe8be768b53e44cbd55f6c41))
17
+
18
+ * * *
19
+ * * *
1
20
  ## 6.14.8 (2023-12-06)
2
21
 
3
22
  ##### Chores
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.14.8",
3
+ "version": "6.14.10",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
package/sandbox.js CHANGED
@@ -4,6 +4,7 @@ const fs = require('fs');
4
4
  const moment = require('moment');
5
5
  const execa = require('execa');
6
6
  const glob = require('glob');
7
+ const utils = require('./scripts/utils');
7
8
  const tools = require('./scripts/utils/tools');
8
9
  const semver = require('semver');
9
10
  const gitUtils = require('./scripts/utils/git-utils');
@@ -1354,13 +1355,29 @@ const publishUtils = require('./scripts/utils/publish/publish-utils');
1354
1355
  // console.log(e);
1355
1356
  // })
1356
1357
 
1358
+ // Promise.resolve()
1359
+ // .then(() => {
1360
+ // const prj = configUtils.projects.getCsdrProject('my-workplace-host');
1361
+ // const envTarget = 'INT';
1362
+ // return installUtils.projects.getDeps(prj, envTarget);
1363
+ // })
1364
+
1365
+ // .then((compositeDeps) => {
1366
+ // console.log(compositeDeps);
1367
+ // })
1368
+
1369
+ const prj = configUtils.projects.getCsdrProject('eui-showcase-ux-components');
1370
+
1357
1371
  Promise.resolve()
1358
1372
  .then(() => {
1359
- const prj = configUtils.projects.getCsdrProject('my-workplace-host');
1360
- const envTarget = 'INT';
1361
- return installUtils.projects.getDeps(prj, envTarget);
1373
+ return utils.buildApp.generateProjectDistributionList(prj, true);
1362
1374
  })
1363
1375
 
1364
- .then((compositeDeps) => {
1365
- console.log(compositeDeps);
1376
+ .then((output) => {
1377
+ console.log(output);
1378
+
1379
+ const { baseHrefIn } = tools.getArgs();
1380
+ const baseHref = configUtils.projects.getBaseHref(prj, '17.0.2-snapshot-1701859601406', baseHrefIn);
1381
+
1382
+ console.log(baseHref);
1366
1383
  })
@@ -192,12 +192,18 @@ module.exports.getTeamsProject = (projects, project) => {
192
192
  };
193
193
 
194
194
  module.exports.getBaseHref = (prj, version, providedBaseHref) => {
195
+ tools.logInfo('Contructing baseHref :');
196
+ tools.logInfo('provided args : ');
197
+ console.log(version, providedBaseHref);
198
+
195
199
  if (providedBaseHref) {
200
+ tools.logInfo(`---> provided baseHref: ${providedBaseHref}`);
196
201
  return providedBaseHref;
197
202
  }
198
203
 
199
204
  if (prj.build) {
200
205
  if (prj.build.baseHref) {
206
+ tools.logInfo(`---> prj.build.baseHref: ${prj.build.baseHref}`);
201
207
  return prj.build.baseHref;
202
208
  } else {
203
209
  if (prj.build.distribution) {
@@ -207,16 +213,20 @@ module.exports.getBaseHref = (prj, version, providedBaseHref) => {
207
213
  let baseHref = distOptions.folder;
208
214
  if (distOptions.includeMajorVersion && version) {
209
215
  baseHref = '/' + baseHref + '-' + version.split('.')[0] + '.x' + '/';
216
+ tools.logInfo(`---> distribution and includeMajorVersion and version found: ${baseHref}`);
210
217
  } else {
211
218
  if (distOptions.folder === '/') {
212
219
  baseHref = '/';
220
+ tools.logInfo(`---> distribution folder is '/': ${baseHref}`);
213
221
  } else {
222
+ tools.logInfo(`---> distribution folder is not '/': ${baseHref}`);
214
223
  baseHref = '/' + baseHref + '/';
215
224
  }
216
225
  }
217
226
 
218
227
  return baseHref;
219
228
  } else {
229
+ tools.logInfo(`---> ${baseHref}`);
220
230
  return null;
221
231
  }
222
232
  }
@@ -208,7 +208,7 @@ const releaseProject = (projectName, isSnapshot, isSupportBranch, branch) => {
208
208
  // generate distribution for s3
209
209
  .then(() => {
210
210
  utils.tools.logTitle('Generate distribution list');
211
- return utils.buildApp.generateProjectDistributionList(project, isSnapshot);
211
+ return utils.buildApp.generateProjectDistributionList(project, isSnapshot || isSupportSnapshotBranch);
212
212
  })
213
213
  .then((distJson) => {
214
214
  utils.tools.logInfo('Distribution list for project :');
@@ -10,23 +10,6 @@ const versionUtils = require('../../../csdr/version/version-utils');
10
10
 
11
11
  const preBuildUtils = require('../../pre-build/pre-build-utils');
12
12
 
13
- let {
14
- skipLint,
15
- skipTest,
16
- skipCompile,
17
- configuration,
18
- baseHref,
19
- watch,
20
- dryRun,
21
- maxSpaceSize,
22
- statsJson,
23
- extraWebpackConfig,
24
- ci,
25
- deployUrl,
26
- sourceMap,
27
- configEnvTarget,
28
- } = tools.getArgs();
29
-
30
13
  const getProjectInfos = () => {
31
14
  // getting the project from installed config
32
15
  const prj = configUtils.projects.getProject();
@@ -50,6 +33,23 @@ module.exports.angular = (
50
33
  configEnvTargetIn: null,
51
34
  }
52
35
  ) => {
36
+ let {
37
+ skipLint,
38
+ skipTest,
39
+ skipCompile,
40
+ configuration,
41
+ baseHref,
42
+ watch,
43
+ dryRun,
44
+ maxSpaceSize,
45
+ statsJson,
46
+ extraWebpackConfig,
47
+ ci,
48
+ deployUrl,
49
+ sourceMap,
50
+ configEnvTarget,
51
+ } = tools.getArgs();
52
+
53
53
  let currentProject;
54
54
 
55
55
  if (args.project) {
@@ -68,6 +68,9 @@ module.exports.angular = (
68
68
  tools.logInfo('With build params : ');
69
69
  console.log(envTarget, isSnapshot, version, configEnvTargetIn);
70
70
 
71
+ tools.logInfo('With CLI args provided :');
72
+ console.log(tools.getArgs());
73
+
71
74
  const ng = path.resolve(currentProject.paths.nodeModulesPath, '@angular', 'cli', 'bin', 'ng');
72
75
 
73
76
  // checking if configEnvTarget is passed as param, if not take the global script param
@@ -300,6 +303,8 @@ module.exports.maven = () => {
300
303
  };
301
304
 
302
305
  module.exports.postBuild = (project) => {
306
+ const { dryRun } = tools.getArgs();
307
+
303
308
  tools.logTitle('Executing project post-build script');
304
309
 
305
310
  return Promise.resolve()