@eui/tools 6.2.20 → 6.2.22
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 +18 -0
- package/bin/scripts/lint-app.js +12 -0
- package/package.json +1 -1
- package/scripts/csdr/init/init.js +7 -4
- package/scripts/csdr/init/packages.js +2 -2
- package/scripts/csdr/install/local-dev.js +1 -6
- package/scripts/utils/lint/app/lint-app-utils.js +87 -0
package/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.2.
|
|
1
|
+
6.2.22
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## 6.2.22 (2022-11-14)
|
|
2
|
+
|
|
3
|
+
##### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* 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))
|
|
7
|
+
|
|
8
|
+
* * *
|
|
9
|
+
* * *
|
|
10
|
+
## 6.2.21 (2022-11-14)
|
|
11
|
+
|
|
12
|
+
##### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **other:**
|
|
15
|
+
* wrong pkg gathered on normal package installation - MWP-9010 [MWP-9010](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9010) ([84a6147d](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/84a6147da6a3c13a4f4a638fba0990c8a070ed02))
|
|
16
|
+
|
|
17
|
+
* * *
|
|
18
|
+
* * *
|
|
1
19
|
## 6.2.20 (2022-11-12)
|
|
2
20
|
|
|
3
21
|
##### Bug Fixes
|
package/package.json
CHANGED
|
@@ -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
|
-
|
|
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('
|
|
95
|
+
tools.logTitle('Initializing host package');
|
|
96
96
|
|
|
97
97
|
let pkg;
|
|
98
98
|
|
|
@@ -102,7 +102,7 @@ module.exports.cloneHostPackage = (projectName) => {
|
|
|
102
102
|
if (!pkg) {
|
|
103
103
|
throw new Error('Invalid host package provided / unknown to CSDR config');
|
|
104
104
|
}
|
|
105
|
-
return gitUtils.cloneAndCheckout(pkg.repository, path.join(process.cwd(), 'packages', pkg.name), '
|
|
105
|
+
return gitUtils.cloneAndCheckout(pkg.repository, path.join(process.cwd(), 'packages', pkg.name), 'master');
|
|
106
106
|
})
|
|
107
107
|
|
|
108
108
|
.then(() => {
|
|
@@ -12,12 +12,7 @@ const innerProjects = require('./projects');
|
|
|
12
12
|
const innerPackages = require('./packages');
|
|
13
13
|
|
|
14
14
|
module.exports.installPackage = (pkgName) => {
|
|
15
|
-
|
|
16
|
-
const pkg = configUtils.remotes.getRemote(pkgName);
|
|
17
|
-
|
|
18
|
-
if (!pkg) {
|
|
19
|
-
pkg = configUtils.packages.getPackage(pkgName, false, true);
|
|
20
|
-
}
|
|
15
|
+
pkg = configUtils.packages.getPackage(pkgName, false, true);
|
|
21
16
|
|
|
22
17
|
return Promise.resolve()
|
|
23
18
|
.then(() => {
|
|
@@ -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
|
+
}
|