@codacy/verity-cli 0.30.1-experimental.67b8921 → 0.30.1-experimental.cbeb697
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/bin/verity.js +7 -6
- package/package.json +1 -1
package/bin/verity.js
CHANGED
|
@@ -18383,7 +18383,7 @@ function channelSilence(input) {
|
|
|
18383
18383
|
// src/lib/cli-version.ts
|
|
18384
18384
|
function cliVersion() {
|
|
18385
18385
|
try {
|
|
18386
|
-
return true ? "0.30.1-experimental.
|
|
18386
|
+
return true ? "0.30.1-experimental.cbeb697" : "dev";
|
|
18387
18387
|
} catch {
|
|
18388
18388
|
return "dev";
|
|
18389
18389
|
}
|
|
@@ -21776,9 +21776,10 @@ function extractStatedIntent(moment, command, pushedMessages = null) {
|
|
|
21776
21776
|
const text = moment === "pre-commit" ? parseCommitMessage(command) : parsePrIntent(command) ?? pushedMessages;
|
|
21777
21777
|
return isSubstantiveIntent(text) ? text : null;
|
|
21778
21778
|
}
|
|
21779
|
-
function hasBlockingFinding(response) {
|
|
21779
|
+
function hasBlockingFinding(response, sentFiles) {
|
|
21780
21780
|
const findings = response.findings ?? [];
|
|
21781
|
-
|
|
21781
|
+
const sent = sentFiles ? new Set(sentFiles.map((p) => p.replace(/\\/g, "/"))) : null;
|
|
21782
|
+
return findings.some((f) => f.scope !== "pre-existing" && ["critical", "high"].includes((f.severity ?? "").toLowerCase()) && (sent === null || typeof f.file === "string" && sent.has(f.file.replace(/\\/g, "/"))));
|
|
21782
21783
|
}
|
|
21783
21784
|
function buildGuardRequest(moment, files, codeDelta, iter, sessionId, statedIntent, coverageTelemetry) {
|
|
21784
21785
|
const analyzable = filterAnalyzable(files);
|
|
@@ -21942,7 +21943,7 @@ async function runGuard(opts, globals) {
|
|
|
21942
21943
|
const link = viewUrl ? ` \u2014 ${viewUrl}` : "";
|
|
21943
21944
|
const covLine = coverageSummary(coverage);
|
|
21944
21945
|
const covDetail = coverageBlock(coverage);
|
|
21945
|
-
if (decision === "FAIL" && hasBlockingFinding(response)) {
|
|
21946
|
+
if (decision === "FAIL" && hasBlockingFinding(response, codeDelta.files.map((f) => f.path))) {
|
|
21946
21947
|
writeIter(moment, iter + 1);
|
|
21947
21948
|
writeBlockMessage(moment, response, covDetail);
|
|
21948
21949
|
process.exit(2);
|
|
@@ -23431,8 +23432,8 @@ function registerTelemetryCommands(program2) {
|
|
|
23431
23432
|
}
|
|
23432
23433
|
|
|
23433
23434
|
// src/cli.ts
|
|
23434
|
-
program.name("verity").description("CLI for Verity quality gate service").version("0.30.1-experimental.
|
|
23435
|
-
installStderrLog(actionCommand.name(), process.argv.slice(2), "0.30.1-experimental.
|
|
23435
|
+
program.name("verity").description("CLI for Verity quality gate service").version("0.30.1-experimental.cbeb697").option("--token <token>", "Override authentication token").option("--service-url <url>", "Override service URL").option("--verbose", "Log HTTP requests/responses to stderr").hook("preAction", async (_thisCommand, actionCommand) => {
|
|
23436
|
+
installStderrLog(actionCommand.name(), process.argv.slice(2), "0.30.1-experimental.cbeb697");
|
|
23436
23437
|
setUserNamedServiceUrl(program.opts().serviceUrl);
|
|
23437
23438
|
try {
|
|
23438
23439
|
await foldLegacyLocalCredential();
|
package/package.json
CHANGED