cloudburn 0.16.0 → 0.16.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/README.md +2 -0
- package/dist/cli.js +12 -2
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -115,6 +115,8 @@ cloudburn rules list --service ec2 --source discovery --severity high
|
|
|
115
115
|
|
|
116
116
|
The discovery config equivalent is `discovery.fail-on`.
|
|
117
117
|
|
|
118
|
+
Discovery has a five-minute deadline. Use `--timeout <seconds>` to change it, for example `cloudburn discover --timeout 600`. If the deadline expires, the command exits with code 2 and reports the timeout.
|
|
119
|
+
|
|
118
120
|
The CLI targets one region per run. Multi-region discovery remains available through the SDK and still needs an AWS Resource Explorer aggregator plus an unfiltered default view in the aggregator region.
|
|
119
121
|
`CLDBRN-AWS-TAGGING-1` is opt-in and requires an accessible aggregator; a local-only setup cannot run account-wide tagging discovery.
|
|
120
122
|
`CLDBRN-AWS-LAMBDA-4` is opt-in and requires AWS Compute Optimizer enrollment.
|
package/dist/cli.js
CHANGED
|
@@ -1142,6 +1142,13 @@ var validateServiceList = (mode, services) => {
|
|
|
1142
1142
|
};
|
|
1143
1143
|
|
|
1144
1144
|
// src/commands/discover.ts
|
|
1145
|
+
var parseDiscoveryTimeout = (value) => {
|
|
1146
|
+
const seconds = Number(value);
|
|
1147
|
+
if (!Number.isInteger(seconds) || seconds < 1 || seconds > 2147483) {
|
|
1148
|
+
throw new InvalidArgumentError3("Timeout must be a whole number of seconds between 1 and 2147483.");
|
|
1149
|
+
}
|
|
1150
|
+
return seconds;
|
|
1151
|
+
};
|
|
1145
1152
|
var parseDiscoveryServiceList = (value) => validateServiceList("discovery", parseServiceList(value)) ?? [];
|
|
1146
1153
|
var describeInitializationMessage = (result) => {
|
|
1147
1154
|
const baseMessage = result.indexType === "aggregator" ? result.aggregatorAction === "promoted" ? `Promoted the existing local Resource Explorer index in ${result.aggregatorRegion} to the aggregator.` : result.aggregatorAction === "created" ? `Configured ${result.aggregatorRegion} as the Resource Explorer aggregator.` : result.coverage === "full" ? `Resource Explorer aggregator already exists in ${result.aggregatorRegion}.` : `Resource Explorer aggregator already exists in ${result.aggregatorRegion}, but only ${result.observedStatus.indexedRegionCount} of ${result.observedStatus.totalRegionCount} regions are indexed.` : result.status === "EXISTING" ? `Local Resource Explorer setup already exists in ${result.aggregatorRegion}.` : `Local Resource Explorer setup created in ${result.aggregatorRegion}.`;
|
|
@@ -1249,7 +1256,7 @@ var registerDiscoverCommand = (program) => {
|
|
|
1249
1256
|
"--region <region>",
|
|
1250
1257
|
"AWS region to discover. Defaults to the current AWS region from AWS_REGION when omitted.",
|
|
1251
1258
|
parseAwsRegion
|
|
1252
|
-
).option("--config <path>", "Explicit CloudBurn config file to load (required for config files in CI)").option(
|
|
1259
|
+
).option("--config <path>", "Explicit CloudBurn config file to load (required for config files in CI)").option("--timeout <seconds>", "Maximum discovery duration in seconds (default: 300).", parseDiscoveryTimeout).option(
|
|
1253
1260
|
"--enabled-rules <ruleIds>",
|
|
1254
1261
|
"Comma-separated rule IDs to enable. When set, CloudBurn checks only these rules. By default, AWS Core preset rules are enabled.",
|
|
1255
1262
|
parseRuleIdList
|
|
@@ -1280,6 +1287,9 @@ var registerDiscoverCommand = (program) => {
|
|
|
1280
1287
|
if (onProgress !== void 0) {
|
|
1281
1288
|
discoveryOptions.onProgress = onProgress;
|
|
1282
1289
|
}
|
|
1290
|
+
if (options.timeout !== void 0) {
|
|
1291
|
+
discoveryOptions.timeoutMs = options.timeout * 1e3;
|
|
1292
|
+
}
|
|
1283
1293
|
const result = await scanner.discover(discoveryOptions);
|
|
1284
1294
|
const format = resolveOutputFormat(command, void 0, loadedConfig.discovery.format ?? "table");
|
|
1285
1295
|
const output = renderResponse({ kind: "scan-result", result }, format);
|
|
@@ -1556,7 +1566,7 @@ var isCliEntrypoint = (moduleUrl, argvEntry = process.argv[1]) => {
|
|
|
1556
1566
|
};
|
|
1557
1567
|
var createProgram = () => {
|
|
1558
1568
|
const program = createCliCommand();
|
|
1559
|
-
program.name("cloudburn").usage("[command]").description("Know what you spend. Fix what you waste.").version("0.16.
|
|
1569
|
+
program.name("cloudburn").usage("[command]").description("Know what you spend. Fix what you waste.").version("0.16.1").option("--debug", "Write execution trace messages to stderr").option("--format <format>", OUTPUT_FORMAT_OPTION_DESCRIPTION, parseOutputFormat);
|
|
1560
1570
|
configureCliHelp(program);
|
|
1561
1571
|
program.exitOverride();
|
|
1562
1572
|
registerCompletionCommand(program);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloudburn",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"description": "Cloudburn CLI for cloud cost optimization",
|
|
5
5
|
"homepage": "https://cloudburn.io/docs",
|
|
6
6
|
"bugs": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"commander": "^13.1.0",
|
|
23
|
-
"@cloudburn/sdk": "0.32.
|
|
23
|
+
"@cloudburn/sdk": "0.32.1"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@biomejs/biome": "^2.5.3",
|
|
@@ -51,6 +51,8 @@
|
|
|
51
51
|
"build": "tsup",
|
|
52
52
|
"typecheck": "tsc --noEmit",
|
|
53
53
|
"test": "vitest run",
|
|
54
|
+
"test:e2e": "node --test test/e2e/*.test.mjs",
|
|
55
|
+
"test:package": "node --test test/package/*.test.mjs",
|
|
54
56
|
"lint": "biome check --error-on-warnings .",
|
|
55
57
|
"lint:fix": "biome check --write .",
|
|
56
58
|
"clean": "rm -rf dist",
|