@zohodesk/testinglibrary 0.1.8-eslint-26 → 0.1.8-eslint-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.
|
@@ -26,5 +26,5 @@ function showMsgPopUp(condition) {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
function getPopupJarPath() {
|
|
29
|
-
return _path.default.resolve(
|
|
29
|
+
return _path.default.resolve(__dirname, 'java-jar', 'IDEMessagePluginRecent.jar');
|
|
30
30
|
}
|
|
@@ -24,7 +24,7 @@ function getSummaryOfLint(cliParams) {
|
|
|
24
24
|
}
|
|
25
25
|
return {
|
|
26
26
|
projectName: $projectName,
|
|
27
|
-
reportUrl: `https://serverlinter-np.zohodesk.csez.zohocorpin.com/project/issues?id=${$projectName}&
|
|
27
|
+
reportUrl: `https://serverlinter-np.zohodesk.csez.zohocorpin.com/project/issues?id=${$projectName}&resolved=false`,
|
|
28
28
|
jsonReportPath: (0, _eslintLintStage.getReportPath)().toString()
|
|
29
29
|
};
|
|
30
30
|
}
|
|
@@ -9,7 +9,6 @@ exports.getProjectNameFrmGit = getProjectNameFrmGit;
|
|
|
9
9
|
exports.getSpawnOutput = getSpawnOutput;
|
|
10
10
|
exports.runSonarAnalysis = runSonarAnalysis;
|
|
11
11
|
var _path = _interopRequireDefault(require("path"));
|
|
12
|
-
var _fs = _interopRequireDefault(require("fs"));
|
|
13
12
|
var _child_process = require("child_process");
|
|
14
13
|
var _eslintLintStage = require("./eslintLintStage");
|
|
15
14
|
var _cliArgsToObject = require("../utils/cliArgsToObject");
|
|
@@ -43,7 +42,7 @@ function runSonarAnalysis(cliParams) {
|
|
|
43
42
|
} = getCredentials(login, password);
|
|
44
43
|
var project_name = repo && branch && branch ? `${repo}_${branch}_${username}` : 'UAT_Testing';
|
|
45
44
|
if (lintEnv === 'pre-commit') {
|
|
46
|
-
project_name = getProjectNameFrmGit()
|
|
45
|
+
project_name = `${getProjectNameFrmGit()}_pre-commit`;
|
|
47
46
|
}
|
|
48
47
|
var resultFilesPath = diffPath ? (_filterSpecAndFeature = filterSpecAndFeatureFiles((0, _eslintLintStage.getDiffFiles)(require((0, _eslintLintStage.getDiffJsonPath)(diffPath))))) === null || _filterSpecAndFeature === void 0 ? void 0 : _filterSpecAndFeature.stepFilesPath.join(',') : [`${_path.default.resolve(process.cwd(), 'uat', 'modules')}`].join(',');
|
|
49
48
|
var source_directories = diffPath ? (_filterSpecAndFeature2 = filterSpecAndFeatureFiles((0, _eslintLintStage.getDiffFiles)(require((0, _eslintLintStage.getDiffJsonPath)(diffPath))))) === null || _filterSpecAndFeature2 === void 0 ? void 0 : _filterSpecAndFeature2.featureFilesPath : [' '];
|
|
@@ -108,10 +107,13 @@ function getRepoName() {
|
|
|
108
107
|
return repoName.pop().split('/').pop().split('.')[0];
|
|
109
108
|
}
|
|
110
109
|
function getBranchName() {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
110
|
+
var branchName = getSpawnOutput('git', ['branch']); // to get current branch
|
|
111
|
+
branchName = branchName.filter($branch => {
|
|
112
|
+
if ($branch.startsWith('*') || $branch.includes('*')) {
|
|
113
|
+
return true;
|
|
114
|
+
}
|
|
115
|
+
return false;
|
|
116
|
+
}).shift();
|
|
115
117
|
return branchName.trim();
|
|
116
118
|
}
|
|
117
119
|
function getSpawnOutput(command, params = []) {
|
package/build/utils/rootPath.js
CHANGED
|
@@ -47,7 +47,7 @@ function getExecutableBinaryPath(command) {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
function getSonarJarPath() {
|
|
50
|
-
const jarPath = _path.default.resolve(
|
|
50
|
+
const jarPath = _path.default.resolve(__dirname, '..', 'lint-ci', 'java-jar', 'sonar-scanner-cli-4.8.0.2856.jar');
|
|
51
51
|
if ((0, _fileUtils.checkIfFileExists)(jarPath)) {
|
|
52
52
|
return jarPath;
|
|
53
53
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/testinglibrary",
|
|
3
|
-
"version": "0.1.8-eslint-
|
|
3
|
+
"version": "0.1.8-eslint-27",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -50,7 +50,6 @@
|
|
|
50
50
|
"@babel/polyfill": "7.12.1",
|
|
51
51
|
"@babel/preset-env": "7.22.15",
|
|
52
52
|
"@babel/runtime": "7.22.15",
|
|
53
|
-
"commander": "^11.0.0"
|
|
54
|
-
"sonarqube-scanner": "^3.3.0"
|
|
53
|
+
"commander": "^11.0.0"
|
|
55
54
|
}
|
|
56
55
|
}
|