@eui/tools 6.2.21 → 6.2.23

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.21
1
+ 6.2.23
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## 6.2.23 (2022-11-14)
2
+
3
+ ##### Bug Fixes
4
+
5
+ * **other:**
6
+ * force root project export of gitlab variables - MWP-9010 [MWP-9010](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9010) ([27a75cec](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/27a75cecd5a2e61ca17ef4c66097335c3e72c604))
7
+
8
+ * * *
9
+ * * *
10
+ ## 6.2.22 (2022-11-14)
11
+
12
+ ##### Bug Fixes
13
+
14
+ * **other:**
15
+ * virtual host building issue - MWP-9010 [MWP-9010](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9010) ([4e158dbf](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/4e158dbf0995cd9e5cf6b83ac51f0999ceab2b87))
16
+
17
+ * * *
18
+ * * *
1
19
  ## 6.2.21 (2022-11-14)
2
20
 
3
21
  ##### Bug Fixes
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ const lintAppUtils = require('../../scripts/utils/lint/app/lint-app-utils');
4
+
5
+ Promise.resolve()
6
+ .then(() => {
7
+ return lintAppUtils.run();
8
+ })
9
+ .catch((e) => {
10
+ console.error(e);
11
+ process.exit(1);
12
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.2.21",
3
+ "version": "6.2.23",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
package/sandbox.js CHANGED
@@ -1049,10 +1049,15 @@ const versionUtils = require('./scripts/csdr/version/version-utils');
1049
1049
  // })
1050
1050
 
1051
1051
 
1052
- Promise.resolve()
1053
- .then(() => {
1054
- const prjName = 'my-workplace-host';
1055
- const project = configUtils.projects.getCsdrProject(prjName);
1052
+ // Promise.resolve()
1053
+ // .then(() => {
1054
+ // const prjName = 'my-workplace-host';
1055
+ // const project = configUtils.projects.getCsdrProject(prjName);
1056
+
1057
+ // return injectionUtils.routesReplacement.buildRoutes(project, 'TST', true);
1058
+ // })
1059
+
1060
+ const rootDirectory = fs.realpathSync(process.cwd());
1061
+ const rootDirectory2 = process.cwd();
1056
1062
 
1057
- return injectionUtils.routesReplacement.buildRoutes(project, 'TST', true);
1058
- })
1063
+ console.log(rootDirectory, rootDirectory2);
@@ -87,12 +87,15 @@ module.exports.init = () => {
87
87
 
88
88
  // clone or install linked host package to project if any
89
89
  .then(() => {
90
- if (finalResponse.project && !build) {
90
+ // TODO
91
+ // if (finalResponse.project && !build) {
92
+ if (finalResponse.project) {
91
93
  return initUtils.packages.cloneHostPackage(finalResponse.project);
92
-
93
- } else if (finalResponse.project && build) {
94
- return initUtils.packages.installHostPackage(finalResponse.project);
95
94
  }
95
+ // TODO
96
+ // } else if (finalResponse.project && build) {
97
+ // return initUtils.packages.installHostPackage(finalResponse.project);
98
+ // }
96
99
  })
97
100
 
98
101
  // Initializing .meta based on .euirc.json for local respoisitories cloning
@@ -92,7 +92,7 @@ module.exports.cloneHostPackage = (projectName) => {
92
92
  return;
93
93
  }
94
94
 
95
- tools.logTitle('Installing host package');
95
+ tools.logTitle('Initializing host package');
96
96
 
97
97
  let pkg;
98
98
 
@@ -96,7 +96,7 @@ const storeMetadata = (pkg, diffMetadata, newVersion) => {
96
96
  tools.logInfo(`Unique issues found for this version : ${issuesList}`);
97
97
 
98
98
  if (!dryRun) {
99
- return pipelineUtils.setVariables(pkg.paths.root, `export ISSUES_LIST=${issuesList}\n`);
99
+ return pipelineUtils.setVariables(process.cwd(), `export ISSUES_LIST=${issuesList}\n`);
100
100
  }
101
101
  }
102
102
  })
@@ -609,7 +609,7 @@ module.exports.exportPipelineVariables = (pkg, compositeType) => {
609
609
  utils.tools.logWarning('dryRun...skipping export');
610
610
  } else {
611
611
  utils.tools.logInfo('Exporting appTarget variable');
612
- return utils.pipeline.setVariables(pkg.paths.root, variablesContent);
612
+ return utils.pipeline.setVariables(process.cwd(), variablesContent);
613
613
  }
614
614
  }
615
615
  })
@@ -0,0 +1,87 @@
1
+ 'use strict';
2
+
3
+ const path = require('path');
4
+
5
+ const tools = require('../../tools');
6
+ const configUtils = require('../../../csdr/config/config-utils');
7
+
8
+ let {
9
+ skipLint, skipTest, baseHref, maxSpaceSize, sourceMap,
10
+ } = tools.getArgs();
11
+
12
+
13
+ const getProjectInfos = () => {
14
+ // getting the project from installed config
15
+ const prj = configUtils.projects.getProject();
16
+
17
+ // exit if project can't be found in the local installed config
18
+ if (!prj) {
19
+ tools.logError('ERROR!!! Unable to find project to be used');
20
+ tools.logInfo('usage : eui-scripts build-app <project-name>');
21
+ throw new Error('PROJECT_NOT_FOUND');
22
+ }
23
+
24
+ return prj;
25
+ };
26
+
27
+
28
+ module.exports.run = () => {
29
+
30
+ const currentProject = getProjectInfos();
31
+
32
+ const ng = path.resolve(currentProject.paths.nodeModulesPath, '@angular', 'cli', 'bin', 'ng');
33
+
34
+ // getting param from project config
35
+ if (currentProject.build) {
36
+ if (currentProject.build.skipLint) {
37
+ skipLint = true;
38
+ }
39
+ if (currentProject.build.skipTest) {
40
+ skipTest = true;
41
+ }
42
+ if (currentProject.build.maxSpaceSize) {
43
+ maxSpaceSize = true;
44
+ }
45
+ if (currentProject.build.sourceMap) {
46
+ sourceMap = true;
47
+ }
48
+ // getting baseHref from project config, dynamic or staticly defined
49
+ baseHref = configUtils.projects.getBaseHref(currentProject, version, baseHref);
50
+ tools.logInfo(`base-href found : ${baseHref}`);
51
+ }
52
+
53
+
54
+ return Promise.resolve()
55
+ .then(() => {
56
+ if (!skipLint) {
57
+ tools.logInfo(`TS Linting application...`);
58
+ let tsLintPath = currentProject.paths.tslintPath;
59
+ let esLintPath = currentProject.paths.eslintPath;
60
+
61
+ // TODO: remove TSLint since it's deprecated and should not be used by projects in the future
62
+ if(tsLintPath) {
63
+ tsLintPath = path.join(tsLintPath);
64
+ let tsConfigPath = path.join(currentProject.paths.angularPath, 'tsconfig.app.json');
65
+ tools.logWarning('TSLint is deprecated and will be removed in the future. Consider migrating to ESLint')
66
+ if (!tools.isFileExists(tsConfigPath)) {
67
+ tsConfigPath = path.join(currentProject.paths.angularPath, 'src', 'tsconfig.app.json');
68
+ }
69
+ if (tools.isFileExists(tsConfigPath)) {
70
+ tools.logInfo(`running tslint -c ${tsLintPath} -p ${tsConfigPath}`);
71
+ return tools.runScript(`tslint -c ${tsLintPath} -p ${tsConfigPath}`);
72
+ }
73
+ } else if (esLintPath) {
74
+ // the project path information are located inside the .eslintrc.json
75
+ tools.logInfo(`running ng lint ${currentProject.name}`);
76
+ return tools.runScript(`ng lint ${currentProject.name}`);
77
+ } else {
78
+ tools.logError(`No ESLint or TSLint configuration found for the project`);
79
+ }
80
+
81
+ }
82
+ })
83
+
84
+ .catch((e) => {
85
+ throw e;
86
+ })
87
+ }