@ganakailabs/cloudeval-cli 0.26.5 → 0.26.7
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/dist/{App-OO33TPPB.js → App-ZUKNFEP4.js} +2 -2
- package/dist/{Banner-VMUZ3OSJ.js → Banner-ZPALP2NW.js} +2 -2
- package/dist/{chunk-72IJSEJN.js → chunk-MNNLTARP.js} +1 -1
- package/dist/{chunk-MBRSB26X.js → chunk-SMZ375N4.js} +1 -1
- package/dist/cli.js +34 -27
- package/package.json +1 -1
- package/sbom.spdx.json +1 -1
|
@@ -38,10 +38,10 @@ import {
|
|
|
38
38
|
} from "./chunk-3MIP274G.js";
|
|
39
39
|
import {
|
|
40
40
|
Banner
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-MNNLTARP.js";
|
|
42
42
|
import {
|
|
43
43
|
CLI_VERSION
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-SMZ375N4.js";
|
|
45
45
|
import {
|
|
46
46
|
raisedButtonStyle,
|
|
47
47
|
terminalTheme
|
package/dist/cli.js
CHANGED
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
} from "./chunk-3MIP274G.js";
|
|
37
37
|
import {
|
|
38
38
|
CLI_VERSION
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-SMZ375N4.js";
|
|
40
40
|
|
|
41
41
|
// src/runtime/prepareInk.ts
|
|
42
42
|
import fs from "fs";
|
|
@@ -2480,6 +2480,25 @@ var entriesAsNamedRecords = (value, amountKey = "amount") => {
|
|
|
2480
2480
|
[amountKey]: amount
|
|
2481
2481
|
}));
|
|
2482
2482
|
};
|
|
2483
|
+
var publicFinding = (rule) => ({
|
|
2484
|
+
id: rule.id ?? rule.rule_id ?? rule.ruleId,
|
|
2485
|
+
pillar: rule.pillar,
|
|
2486
|
+
title: rule.title ?? rule.name,
|
|
2487
|
+
status: rule.status ?? rule.outcome,
|
|
2488
|
+
severity: rule.severity
|
|
2489
|
+
});
|
|
2490
|
+
var reviewReportStatus = (report) => ({
|
|
2491
|
+
available: Boolean(report)
|
|
2492
|
+
});
|
|
2493
|
+
var reviewReportStatuses = ({
|
|
2494
|
+
cost,
|
|
2495
|
+
waf,
|
|
2496
|
+
preload
|
|
2497
|
+
}) => ({
|
|
2498
|
+
cost: reviewReportStatus(cost),
|
|
2499
|
+
wellArchitected: reviewReportStatus(waf),
|
|
2500
|
+
preload: reviewReportStatus(preload)
|
|
2501
|
+
});
|
|
2483
2502
|
var displayNumber = (value, fallback = "not available") => {
|
|
2484
2503
|
const number = numberFrom(value);
|
|
2485
2504
|
return number === void 0 ? fallback : String(number);
|
|
@@ -2492,9 +2511,7 @@ var formatMoney = (amount, currency, fallback = "not available") => {
|
|
|
2492
2511
|
return currency ? `${numericAmount} ${currency}` : String(numericAmount);
|
|
2493
2512
|
};
|
|
2494
2513
|
var formatValidation = (validation) => {
|
|
2495
|
-
const policyFailed = displayNumber(
|
|
2496
|
-
validation?.policyChecks?.failed ?? validation?.psRule?.failed
|
|
2497
|
-
);
|
|
2514
|
+
const policyFailed = displayNumber(validation?.policyChecks?.failed);
|
|
2498
2515
|
const unitFailed = displayNumber(validation?.unitTests?.failed);
|
|
2499
2516
|
return `Policy checks ${policyFailed} failed, unit tests ${unitFailed} failed`;
|
|
2500
2517
|
};
|
|
@@ -2535,7 +2552,7 @@ var extractValidation = ({
|
|
|
2535
2552
|
preload,
|
|
2536
2553
|
project
|
|
2537
2554
|
}) => {
|
|
2538
|
-
const
|
|
2555
|
+
const policySummary = firstRecord(
|
|
2539
2556
|
waf?.parsed?.validation_summary,
|
|
2540
2557
|
waf?.raw?.validation_summary,
|
|
2541
2558
|
waf?.validation_summary
|
|
@@ -2550,17 +2567,11 @@ var extractValidation = ({
|
|
|
2550
2567
|
project?.status?.unit_tests
|
|
2551
2568
|
);
|
|
2552
2569
|
return {
|
|
2553
|
-
psRule: {
|
|
2554
|
-
total: numberFrom(psRuleSummary?.total_rules, psRuleSummary?.totalRules, rules.length),
|
|
2555
|
-
passed: numberFrom(psRuleSummary?.passed_rules, psRuleSummary?.passedRules),
|
|
2556
|
-
failed: numberFrom(psRuleSummary?.failed_rules, psRuleSummary?.failedRules, failedRules.length),
|
|
2557
|
-
errors: numberFrom(psRuleSummary?.error_rules, psRuleSummary?.errorRules)
|
|
2558
|
-
},
|
|
2559
2570
|
policyChecks: {
|
|
2560
|
-
total: numberFrom(
|
|
2561
|
-
passed: numberFrom(
|
|
2562
|
-
failed: numberFrom(
|
|
2563
|
-
errors: numberFrom(
|
|
2571
|
+
total: numberFrom(policySummary?.total_rules, policySummary?.totalRules, rules.length),
|
|
2572
|
+
passed: numberFrom(policySummary?.passed_rules, policySummary?.passedRules),
|
|
2573
|
+
failed: numberFrom(policySummary?.failed_rules, policySummary?.failedRules, failedRules.length),
|
|
2574
|
+
errors: numberFrom(policySummary?.error_rules, policySummary?.errorRules)
|
|
2564
2575
|
},
|
|
2565
2576
|
unitTests: {
|
|
2566
2577
|
status: unitSummary?.status,
|
|
@@ -2640,7 +2651,7 @@ var evaluateGate = ({
|
|
|
2640
2651
|
medium: numberFrom(waf?.parsed?.counts?.mediumRisk, waf?.parsed?.counts?.medium_count),
|
|
2641
2652
|
critical: numberFrom(waf?.parsed?.counts?.criticalRisk, waf?.parsed?.counts?.critical_count)
|
|
2642
2653
|
},
|
|
2643
|
-
topFindings: Array.isArray(waf?.parsed?.rules) ? waf.parsed.rules.slice(0, 5) : []
|
|
2654
|
+
topFindings: Array.isArray(waf?.parsed?.rules) ? waf.parsed.rules.slice(0, 5).map((rule) => publicFinding(asRecord(rule))) : []
|
|
2644
2655
|
};
|
|
2645
2656
|
const costSummary = {
|
|
2646
2657
|
monthly: {
|
|
@@ -2683,11 +2694,11 @@ var evaluateGate = ({
|
|
|
2683
2694
|
failures.push(`${pillar.label} score ${pillar.score} is below ${pillar.threshold}`);
|
|
2684
2695
|
}
|
|
2685
2696
|
}
|
|
2686
|
-
const
|
|
2697
|
+
const failedPolicyChecks = validation.policyChecks.failed ?? 0;
|
|
2687
2698
|
const failedUnitTests = validation.unitTests.failed ?? 0;
|
|
2688
|
-
if (gateConfig.failOnValidationErrors && (
|
|
2699
|
+
if (gateConfig.failOnValidationErrors && (failedPolicyChecks > 0 || failedUnitTests > 0)) {
|
|
2689
2700
|
failures.push(
|
|
2690
|
-
`validation has ${
|
|
2701
|
+
`validation has ${failedPolicyChecks} failed policy checks and ${failedUnitTests} failed unit tests`
|
|
2691
2702
|
);
|
|
2692
2703
|
}
|
|
2693
2704
|
if (gateConfig.maxMonthlyCost !== void 0 && monthlyCost !== void 0 && monthlyCost > gateConfig.maxMonthlyCost) {
|
|
@@ -3063,11 +3074,7 @@ var registerReviewCommand = (program2, deps) => {
|
|
|
3063
3074
|
commitSha,
|
|
3064
3075
|
sourceRoot,
|
|
3065
3076
|
sync: finalStatus ? { ...asRecord(sync), finalStatus } : sync,
|
|
3066
|
-
reports: {
|
|
3067
|
-
cost,
|
|
3068
|
-
waf,
|
|
3069
|
-
preload
|
|
3070
|
-
},
|
|
3077
|
+
reports: reviewReportStatuses({ cost, waf, preload }),
|
|
3071
3078
|
gate: evaluateGate({ configText, waf, cost, preload, project })
|
|
3072
3079
|
};
|
|
3073
3080
|
if (options.aiSummary !== false) {
|
|
@@ -14968,7 +14975,7 @@ program.command("tui").description("Open the CloudEval Terminal UI").option(
|
|
|
14968
14975
|
const { assertSecureBaseUrl } = await import("./dist-QLN52XKY.js");
|
|
14969
14976
|
const [{ render }, { App }] = await Promise.all([
|
|
14970
14977
|
import("ink"),
|
|
14971
|
-
import("./App-
|
|
14978
|
+
import("./App-ZUKNFEP4.js")
|
|
14972
14979
|
]);
|
|
14973
14980
|
const baseUrl = await resolveBaseUrl(options, command);
|
|
14974
14981
|
assertSecureBaseUrl(baseUrl);
|
|
@@ -15026,7 +15033,7 @@ program.command("chat").description("Start an interactive chat session").option(
|
|
|
15026
15033
|
const { assertSecureBaseUrl } = await import("./dist-QLN52XKY.js");
|
|
15027
15034
|
const [{ render }, { App }] = await Promise.all([
|
|
15028
15035
|
import("ink"),
|
|
15029
|
-
import("./App-
|
|
15036
|
+
import("./App-ZUKNFEP4.js")
|
|
15030
15037
|
]);
|
|
15031
15038
|
const baseUrl = await resolveBaseUrl(options, command);
|
|
15032
15039
|
assertSecureBaseUrl(baseUrl);
|
|
@@ -15780,7 +15787,7 @@ Error: ${errorMsg}
|
|
|
15780
15787
|
program.command("banner").description("Preview the startup banner and terminal capabilities").action(async () => {
|
|
15781
15788
|
const { render } = await import("ink");
|
|
15782
15789
|
const BannerPreview = React.lazy(async () => ({
|
|
15783
|
-
default: (await import("./Banner-
|
|
15790
|
+
default: (await import("./Banner-ZPALP2NW.js")).Banner
|
|
15784
15791
|
}));
|
|
15785
15792
|
render(
|
|
15786
15793
|
/* @__PURE__ */ jsx(React.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(BannerPreview, { disable: false }) })
|
package/package.json
CHANGED
package/sbom.spdx.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
{
|
|
15
15
|
"SPDXID": "SPDXRef-Package-CloudEval-CLI",
|
|
16
16
|
"name": "CloudEval CLI",
|
|
17
|
-
"versionInfo": "0.26.
|
|
17
|
+
"versionInfo": "0.26.7",
|
|
18
18
|
"downloadLocation": "https://github.com/ganakailabs/cloudeval-cli",
|
|
19
19
|
"filesAnalyzed": false,
|
|
20
20
|
"licenseConcluded": "LicenseRef-CloudEval-CLI",
|