@zohodesk/codestandard-validator 1.0.0-exp-5 → 1.0.0-exp-6
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.
|
@@ -37,9 +37,7 @@ const {
|
|
|
37
37
|
const {
|
|
38
38
|
Logger
|
|
39
39
|
} = require('../../utils/Logger/Logger');
|
|
40
|
-
const {
|
|
41
|
-
default: fetchProjectIssuesViaCurl
|
|
42
|
-
} = require('../../utils/General/SonarQubeUtil');
|
|
40
|
+
// const { default: fetchProjectIssuesViaCurl } = require('../../utils/General/SonarQubeUtil');
|
|
43
41
|
const execAsync = promisify(exec);
|
|
44
42
|
async function lintFiles(filePath) {
|
|
45
43
|
const ext = path.extname(filePath);
|
|
@@ -84,7 +84,6 @@ async function fetchProjectIssuesViaCurl(componentKey) {
|
|
|
84
84
|
try {
|
|
85
85
|
const token = 'sqa_1f6675c05f63c4784dc741ce751efa0066d2693c' || decrypt(getAPIToken(), process.env.DECRYPT_TOKEN);
|
|
86
86
|
const command = `curl --tlsv1.2 -s -u "${token}:" "${url}"`;
|
|
87
|
-
console.log("command", command);
|
|
88
87
|
const output = await execAsync(command).toString();
|
|
89
88
|
const json = JSON.parse(output);
|
|
90
89
|
const {
|
|
@@ -31,15 +31,24 @@ async function installPlugins(pluginsToBeInstalled) {
|
|
|
31
31
|
Logger.log(Logger.INFO_TYPE, 'Installing plugins ....');
|
|
32
32
|
const installCommand = `npm install --save-dev ${pluginsToBeInstalled.join(' ')} --legacy-peer-deps`;
|
|
33
33
|
Logger.log(Logger.INFO_TYPE, `Install command being executed: ${installCommand}`);
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
try {
|
|
35
|
+
let {
|
|
36
|
+
stdout,
|
|
37
|
+
stderr
|
|
38
|
+
} = await execAsync(installCommand, {
|
|
39
|
+
cwd: getNodeModulesPath(),
|
|
40
|
+
shell: true
|
|
41
|
+
});
|
|
42
|
+
if (stdout) {
|
|
43
|
+
Logger.logger(stdout);
|
|
44
|
+
} else if (stderr) {
|
|
45
|
+
Logger.logger(stderr);
|
|
46
|
+
}
|
|
39
47
|
Logger.log(Logger.SUCCESS_TYPE, 'Plugins installation successful');
|
|
40
48
|
return restorePackageJsonContent(packageJsonBeforePluginsInstallation);
|
|
41
|
-
}
|
|
49
|
+
} catch (error) {
|
|
42
50
|
Logger.log(Logger.FAILURE_TYPE, "Unable to install plugins. Kindly retry the command");
|
|
51
|
+
Logger.log(Logger.FAILURE_TYPE, error);
|
|
43
52
|
return false;
|
|
44
53
|
}
|
|
45
54
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/codestandard-validator",
|
|
3
|
-
"version": "1.0.0-exp-
|
|
3
|
+
"version": "1.0.0-exp-6",
|
|
4
4
|
"description": "library to enforce code standard using eslint",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "commonjs",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@zohodesk/codestandard-analytics": "1.0.2-exp-
|
|
18
|
+
"@zohodesk/codestandard-analytics": "1.0.2-exp-6",
|
|
19
19
|
"@zohodesk-private/client_deployment_tool": "0.0.5",
|
|
20
20
|
"eslint": "8.26.0",
|
|
21
21
|
"stylelint": "16.23.0"
|