@ganakailabs/cloudeval-cli 0.26.12 → 0.27.0
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-H7B3T5QW.js → App-GQMIIL3U.js} +2 -2
- package/dist/{Banner-MOLW4ADA.js → Banner-J2ESX3JN.js} +2 -2
- package/dist/{chunk-GR76HJZF.js → chunk-5AH64UNL.js} +1 -1
- package/dist/{chunk-4AK6A5GF.js → chunk-YW5JWFYV.js} +1 -1
- package/dist/cli.js +54 -21
- package/package.json +1 -1
- package/sbom.spdx.json +1 -1
|
@@ -38,10 +38,10 @@ import {
|
|
|
38
38
|
} from "./chunk-USSCB2ZU.js";
|
|
39
39
|
import {
|
|
40
40
|
Banner
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-5AH64UNL.js";
|
|
42
42
|
import {
|
|
43
43
|
CLI_VERSION
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-YW5JWFYV.js";
|
|
45
45
|
import {
|
|
46
46
|
raisedButtonStyle,
|
|
47
47
|
terminalTheme
|
package/dist/cli.js
CHANGED
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
} from "./chunk-USSCB2ZU.js";
|
|
40
40
|
import {
|
|
41
41
|
CLI_VERSION
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-YW5JWFYV.js";
|
|
43
43
|
|
|
44
44
|
// src/runtime/prepareInk.ts
|
|
45
45
|
import fs from "fs";
|
|
@@ -2413,14 +2413,41 @@ var parseGateConfig = (configText) => {
|
|
|
2413
2413
|
const match = configText.match(new RegExp(`^\\s*${key}\\s*:\\s*([^\\s#]+)`, "m"));
|
|
2414
2414
|
return match ? match[1].trim() : void 0;
|
|
2415
2415
|
};
|
|
2416
|
+
const firstStringValue = (...keys) => {
|
|
2417
|
+
for (const key of keys) {
|
|
2418
|
+
const value = stringValue2(key);
|
|
2419
|
+
if (value !== void 0) {
|
|
2420
|
+
return value;
|
|
2421
|
+
}
|
|
2422
|
+
}
|
|
2423
|
+
return void 0;
|
|
2424
|
+
};
|
|
2416
2425
|
const numberValue2 = (key) => {
|
|
2417
2426
|
const match = configText.match(new RegExp(`^\\s*${key}\\s*:\\s*([0-9]+(?:\\.[0-9]+)?)`, "m"));
|
|
2418
2427
|
return match ? Number(match[1]) : void 0;
|
|
2419
2428
|
};
|
|
2429
|
+
const firstNumberValue = (...keys) => {
|
|
2430
|
+
for (const key of keys) {
|
|
2431
|
+
const value = numberValue2(key);
|
|
2432
|
+
if (value !== void 0) {
|
|
2433
|
+
return value;
|
|
2434
|
+
}
|
|
2435
|
+
}
|
|
2436
|
+
return void 0;
|
|
2437
|
+
};
|
|
2420
2438
|
const booleanValue2 = (key) => {
|
|
2421
2439
|
const match = configText.match(new RegExp(`^\\s*${key}\\s*:\\s*(true|false)`, "im"));
|
|
2422
2440
|
return match ? match[1].toLowerCase() === "true" : void 0;
|
|
2423
2441
|
};
|
|
2442
|
+
const firstBooleanValue = (...keys) => {
|
|
2443
|
+
for (const key of keys) {
|
|
2444
|
+
const value = booleanValue2(key);
|
|
2445
|
+
if (value !== void 0) {
|
|
2446
|
+
return value;
|
|
2447
|
+
}
|
|
2448
|
+
}
|
|
2449
|
+
return void 0;
|
|
2450
|
+
};
|
|
2424
2451
|
const pillarScoreMins = {};
|
|
2425
2452
|
const pillarBlock = configText.match(/^(\s*)pillars\s*:\s*$(?<body>(?:\n\s+[-\w]+\s*:\s*[0-9]+(?:\.[0-9]+)?\s*)+)/m);
|
|
2426
2453
|
const pillarBody = pillarBlock?.groups?.body ?? "";
|
|
@@ -2442,15 +2469,21 @@ var parseGateConfig = (configText) => {
|
|
|
2442
2469
|
pillarScoreMins[key] = value;
|
|
2443
2470
|
}
|
|
2444
2471
|
}
|
|
2445
|
-
const enforcement =
|
|
2472
|
+
const enforcement = firstStringValue("enforcement", "mode")?.toLowerCase();
|
|
2446
2473
|
return {
|
|
2447
|
-
enforcement: enforcement === "warn" ? "warn" : "required",
|
|
2448
|
-
overallScoreMin:
|
|
2449
|
-
pillarScoreMin:
|
|
2474
|
+
enforcement: enforcement === "warn" || enforcement === "comment_only" ? "warn" : "required",
|
|
2475
|
+
overallScoreMin: firstNumberValue("overall_score_min", "minimum_well_architected_score") ?? 80,
|
|
2476
|
+
pillarScoreMin: firstNumberValue("pillar_score_min", "minimum_pillar_score"),
|
|
2450
2477
|
pillarScoreMins,
|
|
2451
|
-
failOnHighRisk:
|
|
2452
|
-
|
|
2453
|
-
|
|
2478
|
+
failOnHighRisk: firstBooleanValue(
|
|
2479
|
+
"fail_on_high_risk",
|
|
2480
|
+
"fail_when_high_risk_findings_exist"
|
|
2481
|
+
) ?? true,
|
|
2482
|
+
failOnValidationErrors: firstBooleanValue(
|
|
2483
|
+
"fail_on_validation_errors",
|
|
2484
|
+
"fail_when_validation_fails"
|
|
2485
|
+
) ?? true,
|
|
2486
|
+
maxMonthlyCost: firstNumberValue("max_monthly_cost", "max_monthly_cost_usd")
|
|
2454
2487
|
};
|
|
2455
2488
|
};
|
|
2456
2489
|
var numberFrom = (...values) => {
|
|
@@ -6127,18 +6160,18 @@ var readWorkspaceConfig = (content) => {
|
|
|
6127
6160
|
};
|
|
6128
6161
|
};
|
|
6129
6162
|
var generateWorkspaceConfig = (entry, parameters, sourceEntry) => {
|
|
6130
|
-
const parameterLine = parameters ? ` parameters: ${parameters}
|
|
6131
|
-
` : "";
|
|
6163
|
+
const parameterLine = parameters ? ` parameters: ${parameters}` : "";
|
|
6132
6164
|
const sourceEntryLine = sourceEntry ? ` source_entry: ${sourceEntry}` : "";
|
|
6133
6165
|
return [
|
|
6134
6166
|
"# CloudEval config v1. Paths are relative to this workspace root.",
|
|
6135
6167
|
"# Visualization source for diagrams and reports.",
|
|
6136
6168
|
"version: 1",
|
|
6137
6169
|
"stacks:",
|
|
6138
|
-
" - id:
|
|
6170
|
+
" - id: primary-architecture",
|
|
6171
|
+
" name: Primary architecture",
|
|
6139
6172
|
` entry: ${entry}`,
|
|
6140
6173
|
sourceEntryLine,
|
|
6141
|
-
parameterLine
|
|
6174
|
+
parameterLine,
|
|
6142
6175
|
"resolve:",
|
|
6143
6176
|
" # Follow relative ARM templateLink files when building the analysis bundle.",
|
|
6144
6177
|
" linked_templates: true",
|
|
@@ -6151,12 +6184,12 @@ var generateWorkspaceConfig = (entry, parameters, sourceEntry) => {
|
|
|
6151
6184
|
"# Uncomment and tune these when pull requests should be blocked by CloudEval.",
|
|
6152
6185
|
"# ci:",
|
|
6153
6186
|
"# gates:",
|
|
6154
|
-
"# enforcement:
|
|
6155
|
-
"#
|
|
6156
|
-
"#
|
|
6157
|
-
"#
|
|
6158
|
-
"#
|
|
6159
|
-
"#
|
|
6187
|
+
"# enforcement: block_pull_request",
|
|
6188
|
+
"# minimum_well_architected_score: 80",
|
|
6189
|
+
"# minimum_pillar_score: 75",
|
|
6190
|
+
"# fail_when_high_risk_findings_exist: true",
|
|
6191
|
+
"# fail_when_validation_fails: true",
|
|
6192
|
+
"# max_monthly_cost_usd: 500",
|
|
6160
6193
|
""
|
|
6161
6194
|
].filter((line) => line.length > 0).join("\n");
|
|
6162
6195
|
};
|
|
@@ -15598,7 +15631,7 @@ program.command("tui").description("Open the CloudEval Terminal UI").option(
|
|
|
15598
15631
|
const { assertSecureBaseUrl } = await import("./dist-PEYJDO7A.js");
|
|
15599
15632
|
const [{ render }, { App }] = await Promise.all([
|
|
15600
15633
|
import("ink"),
|
|
15601
|
-
import("./App-
|
|
15634
|
+
import("./App-GQMIIL3U.js")
|
|
15602
15635
|
]);
|
|
15603
15636
|
const baseUrl = await resolveBaseUrl(options, command);
|
|
15604
15637
|
assertSecureBaseUrl(baseUrl);
|
|
@@ -15656,7 +15689,7 @@ program.command("chat").description("Start an interactive chat session").option(
|
|
|
15656
15689
|
const { assertSecureBaseUrl } = await import("./dist-PEYJDO7A.js");
|
|
15657
15690
|
const [{ render }, { App }] = await Promise.all([
|
|
15658
15691
|
import("ink"),
|
|
15659
|
-
import("./App-
|
|
15692
|
+
import("./App-GQMIIL3U.js")
|
|
15660
15693
|
]);
|
|
15661
15694
|
const baseUrl = await resolveBaseUrl(options, command);
|
|
15662
15695
|
assertSecureBaseUrl(baseUrl);
|
|
@@ -16410,7 +16443,7 @@ Error: ${errorMsg}
|
|
|
16410
16443
|
program.command("banner").description("Preview the startup banner and terminal capabilities").action(async () => {
|
|
16411
16444
|
const { render } = await import("ink");
|
|
16412
16445
|
const BannerPreview = React.lazy(async () => ({
|
|
16413
|
-
default: (await import("./Banner-
|
|
16446
|
+
default: (await import("./Banner-J2ESX3JN.js")).Banner
|
|
16414
16447
|
}));
|
|
16415
16448
|
render(
|
|
16416
16449
|
/* @__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.
|
|
17
|
+
"versionInfo": "0.27.0",
|
|
18
18
|
"downloadLocation": "https://github.com/ganakailabs/cloudeval-cli",
|
|
19
19
|
"filesAnalyzed": false,
|
|
20
20
|
"licenseConcluded": "LicenseRef-CloudEval-CLI",
|