@zohodesk/codestandard-validator 1.1.0 → 1.1.1
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/build/hooks/hook.js
CHANGED
|
@@ -25,6 +25,7 @@ const config = require(path.join(process.cwd(), 'lint.config.js'));
|
|
|
25
25
|
process.env.SONARQUBE_EXTERNAL = config.metric_token;
|
|
26
26
|
process.env.SONARQUBE = config.meticHandler_api_token;
|
|
27
27
|
process.env.ZGIT_TOKEN = config.token;
|
|
28
|
+
process.env.TOOL_TOKEN = config.toolToken;
|
|
28
29
|
async function hooks() {
|
|
29
30
|
var jsonFilePath = path.join(__dirname, '..', '..', 'jsonUtils', 'fsUtils.json');
|
|
30
31
|
if (!(getLastCommitHash() == getStoredCommitHash())) {
|
package/build/lib/postinstall.js
CHANGED
|
@@ -39,6 +39,7 @@ async function postInstall() {
|
|
|
39
39
|
process.env.SONARQUBE_EXTERNAL = config.metric_token;
|
|
40
40
|
process.env.SONARQUBE = config.meticHandler_api_token;
|
|
41
41
|
process.env.ZGIT_TOKEN = config.token;
|
|
42
|
+
process.env.TOOL_TOKEN = config.toolToken;
|
|
42
43
|
});
|
|
43
44
|
isGitInitialized() ? await executeMethodsThatReturnBooleanValue('Some issue occurred in setting up husky.', setupHusky, null) : null;
|
|
44
45
|
await executeMethodsThatReturnBooleanValue('Make sure zgit.csez.zohocorpin.com is accessible', cloneViaCdt, null);
|
|
@@ -25,8 +25,8 @@ module.exports = {
|
|
|
25
25
|
impactBased: true,
|
|
26
26
|
lintReportPath: path.resolve(process.cwd(), "lint-report", "lintReport.json"),
|
|
27
27
|
metricServerHost: "https://client-linters.zdesk.csez.zohocorpin.com",
|
|
28
|
-
meticHandler_api_token: "
|
|
29
|
-
metric_token: "
|
|
28
|
+
meticHandler_api_token: "",
|
|
29
|
+
metric_token: "",
|
|
30
30
|
branchDiffPath: path.resolve(process.cwd(), "diffBranch.json"),
|
|
31
31
|
gitEndPoint: "https://zgit.csez.zohocorpin.com",
|
|
32
32
|
tsConfigurationPath: path.resolve(process.cwd(), 'tsconfig.json'),
|
|
@@ -34,7 +34,8 @@ module.exports = {
|
|
|
34
34
|
impactBasedPrecommit: true,
|
|
35
35
|
shouldWarningsAbortCommit: false,
|
|
36
36
|
pushMetricsOnPreCommit: true,
|
|
37
|
-
token: "
|
|
37
|
+
token: "",
|
|
38
|
+
toolToken: "",
|
|
38
39
|
compareBranch: 'release',
|
|
39
40
|
supportedExtensions: ['.js', '.jsx', '.ts', '.tsx', '.properties']
|
|
40
41
|
};
|
|
@@ -90,7 +90,7 @@ function getRunningEnv() {
|
|
|
90
90
|
function getLastCommitHash() {
|
|
91
91
|
try {
|
|
92
92
|
var _JSON$parse$;
|
|
93
|
-
const cmd = `curl --header "PRIVATE-TOKEN: ${process.env.
|
|
93
|
+
const cmd = `curl --header "PRIVATE-TOKEN: ${process.env.TOOL_TOKEN}" --url ${commitHashEndPoint}`;
|
|
94
94
|
return (_JSON$parse$ = JSON.parse(execSync(cmd))[0]) === null || _JSON$parse$ === void 0 ? void 0 : _JSON$parse$.id;
|
|
95
95
|
} catch (err) {
|
|
96
96
|
Logger.log(Logger.FAILURE_TYPE, err);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/codestandard-validator",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
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.1.
|
|
18
|
+
"@zohodesk/codestandard-analytics": "1.1.3",
|
|
19
19
|
"@zohodesk-private/client_deployment_tool": "0.0.5",
|
|
20
20
|
"eslint": "8.26.0",
|
|
21
21
|
"stylelint": "16.23.0"
|