infra-cost 0.2.2 → 0.2.4

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/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
3
 
4
- require('../dist/index.cjs');
4
+ require('../dist/index.js');
@@ -34,13 +34,13 @@ __export(test_enhanced_ui_exports, {
34
34
  testPDFGeneration: () => testPDFGeneration
35
35
  });
36
36
  module.exports = __toCommonJS(test_enhanced_ui_exports);
37
- var import_chalk2 = __toESM(require("chalk"), 1);
37
+ var import_chalk2 = __toESM(require("chalk"));
38
38
 
39
39
  // src/visualization/terminal-ui.ts
40
- var import_cli_table3 = __toESM(require("cli-table3"), 1);
41
- var import_chalk = __toESM(require("chalk"), 1);
42
- var import_cli_progress = __toESM(require("cli-progress"), 1);
43
- var import_moment = __toESM(require("moment"), 1);
40
+ var import_cli_table3 = __toESM(require("cli-table3"));
41
+ var import_chalk = __toESM(require("chalk"));
42
+ var import_cli_progress = __toESM(require("cli-progress"));
43
+ var import_moment = __toESM(require("moment"));
44
44
  var TerminalUIEngine = class {
45
45
  constructor() {
46
46
  this.progressBar = null;
@@ -671,10 +671,10 @@ var DemoDataGenerator = class {
671
671
  };
672
672
 
673
673
  // src/exporters/pdf-exporter.ts
674
- var import_puppeteer = __toESM(require("puppeteer"), 1);
674
+ var import_puppeteer = __toESM(require("puppeteer"));
675
675
  var import_fs = require("fs");
676
676
  var import_path = require("path");
677
- var import_moment2 = __toESM(require("moment"), 1);
677
+ var import_moment2 = __toESM(require("moment"));
678
678
  var PDFExporter = class {
679
679
  constructor(options = {}) {
680
680
  this.browser = null;
@@ -1694,4 +1694,4 @@ if (import_meta.url === `file://${process.argv[1]}`) {
1694
1694
  testEnhancedUI,
1695
1695
  testPDFGeneration
1696
1696
  });
1697
- //# sourceMappingURL=test-enhanced-ui.cjs.map
1697
+ //# sourceMappingURL=test-enhanced-ui.js.map
@@ -23,7 +23,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
23
23
  ));
24
24
 
25
25
  // src/visualization/multi-cloud-dashboard.ts
26
- var import_chalk4 = __toESM(require("chalk"), 1);
26
+ var import_chalk4 = __toESM(require("chalk"));
27
27
 
28
28
  // src/types/providers.ts
29
29
  var CloudProviderAdapter = class {
@@ -110,11 +110,11 @@ var import_client_s3 = require("@aws-sdk/client-s3");
110
110
  var import_client_rds = require("@aws-sdk/client-rds");
111
111
  var import_client_lambda = require("@aws-sdk/client-lambda");
112
112
  var import_client_budgets = require("@aws-sdk/client-budgets");
113
- var import_dayjs = __toESM(require("dayjs"), 1);
113
+ var import_dayjs = __toESM(require("dayjs"));
114
114
 
115
115
  // src/logger.ts
116
- var import_chalk = __toESM(require("chalk"), 1);
117
- var import_ora = __toESM(require("ora"), 1);
116
+ var import_chalk = __toESM(require("chalk"));
117
+ var import_ora = __toESM(require("ora"));
118
118
  var spinner;
119
119
  function showSpinner(text) {
120
120
  if (!spinner) {
@@ -2357,7 +2357,7 @@ var CloudProviderFactory = class {
2357
2357
  var import_fs = require("fs");
2358
2358
  var import_path = require("path");
2359
2359
  var import_os = require("os");
2360
- var import_chalk2 = __toESM(require("chalk"), 1);
2360
+ var import_chalk2 = __toESM(require("chalk"));
2361
2361
  var CloudProfileDiscovery = class {
2362
2362
  constructor() {
2363
2363
  this.warnings = [];
@@ -2707,10 +2707,10 @@ ${this.getProviderIcon(provider)} ${import_chalk2.default.bold(provider.toUpperC
2707
2707
  };
2708
2708
 
2709
2709
  // src/visualization/terminal-ui.ts
2710
- var import_cli_table3 = __toESM(require("cli-table3"), 1);
2711
- var import_chalk3 = __toESM(require("chalk"), 1);
2712
- var import_cli_progress = __toESM(require("cli-progress"), 1);
2713
- var import_moment = __toESM(require("moment"), 1);
2710
+ var import_cli_table3 = __toESM(require("cli-table3"));
2711
+ var import_chalk3 = __toESM(require("chalk"));
2712
+ var import_cli_progress = __toESM(require("cli-progress"));
2713
+ var import_moment = __toESM(require("moment"));
2714
2714
  var TerminalUIEngine = class {
2715
2715
  constructor() {
2716
2716
  this.progressBar = null;
@@ -3383,4 +3383,4 @@ async function testMultiCloudDashboard() {
3383
3383
  if (import_meta.url === `file://${process.argv[1]}`) {
3384
3384
  testMultiCloudDashboard();
3385
3385
  }
3386
- //# sourceMappingURL=test-multi-cloud-dashboard.cjs.map
3386
+ //# sourceMappingURL=test-multi-cloud-dashboard.js.map
@@ -37,10 +37,10 @@ __export(terminal_ui_exports, {
37
37
  var import_cli_table3, import_chalk3, import_cli_progress, import_moment, TerminalUIEngine, terminal_ui_default;
38
38
  var init_terminal_ui = __esm({
39
39
  "src/visualization/terminal-ui.ts"() {
40
- import_cli_table3 = __toESM(require("cli-table3"), 1);
41
- import_chalk3 = __toESM(require("chalk"), 1);
42
- import_cli_progress = __toESM(require("cli-progress"), 1);
43
- import_moment = __toESM(require("moment"), 1);
40
+ import_cli_table3 = __toESM(require("cli-table3"));
41
+ import_chalk3 = __toESM(require("chalk"));
42
+ import_cli_progress = __toESM(require("cli-progress"));
43
+ import_moment = __toESM(require("moment"));
44
44
  TerminalUIEngine = class {
45
45
  constructor() {
46
46
  this.progressBar = null;
@@ -456,10 +456,10 @@ __export(pdf_exporter_exports, {
456
456
  var import_puppeteer, import_fs6, import_path6, import_moment2, PDFExporter, pdf_exporter_default;
457
457
  var init_pdf_exporter = __esm({
458
458
  "src/exporters/pdf-exporter.ts"() {
459
- import_puppeteer = __toESM(require("puppeteer"), 1);
459
+ import_puppeteer = __toESM(require("puppeteer"));
460
460
  import_fs6 = require("fs");
461
461
  import_path6 = require("path");
462
- import_moment2 = __toESM(require("moment"), 1);
462
+ import_moment2 = __toESM(require("moment"));
463
463
  init_providers();
464
464
  PDFExporter = class {
465
465
  constructor(options = {}) {
@@ -1353,9 +1353,8 @@ var import_commander = require("commander");
1353
1353
  // package.json
1354
1354
  var package_default = {
1355
1355
  name: "infra-cost",
1356
- version: "0.2.2",
1356
+ version: "0.2.4",
1357
1357
  description: "Multi-cloud FinOps CLI tool for comprehensive cost analysis and infrastructure optimization across AWS, GCP, Azure, Alibaba Cloud, and Oracle Cloud",
1358
- type: "module",
1359
1358
  author: {
1360
1359
  name: "Code Collab",
1361
1360
  email: "codecollab.co@gmail.com",
@@ -1496,11 +1495,11 @@ var package_default = {
1496
1495
 
1497
1496
  // src/config.ts
1498
1497
  var import_credential_providers = require("@aws-sdk/credential-providers");
1499
- var import_chalk2 = __toESM(require("chalk"), 1);
1498
+ var import_chalk2 = __toESM(require("chalk"));
1500
1499
 
1501
1500
  // src/logger.ts
1502
- var import_chalk = __toESM(require("chalk"), 1);
1503
- var import_ora = __toESM(require("ora"), 1);
1501
+ var import_chalk = __toESM(require("chalk"));
1502
+ var import_ora = __toESM(require("ora"));
1504
1503
  function printFatalError(error) {
1505
1504
  console.error(`
1506
1505
  ${import_chalk.default.bold.redBright.underline(`Error:`)}
@@ -1613,7 +1612,7 @@ function handleCredentialError(error, profile) {
1613
1612
  }
1614
1613
 
1615
1614
  // src/printers/fancy.ts
1616
- var import_chalk4 = __toESM(require("chalk"), 1);
1615
+ var import_chalk4 = __toESM(require("chalk"));
1617
1616
  init_terminal_ui();
1618
1617
  function printFancy(accountAlias, totals, isSummary = false) {
1619
1618
  hideSpinner();
@@ -1675,7 +1674,7 @@ function printJson(accountAlias, totalCosts, isSummary = false) {
1675
1674
  }
1676
1675
 
1677
1676
  // src/printers/slack.ts
1678
- var import_node_fetch = __toESM(require("node-fetch"), 1);
1677
+ var import_node_fetch = __toESM(require("node-fetch"));
1679
1678
  function formatServiceBreakdown(costs) {
1680
1679
  const serviceCosts = costs.totalsByService;
1681
1680
  const allServices = /* @__PURE__ */ new Set([
@@ -1808,7 +1807,7 @@ function printPlainText(accountAlias, totals, isSummary = false) {
1808
1807
  }
1809
1808
 
1810
1809
  // src/printers/inventory.ts
1811
- var import_chalk5 = __toESM(require("chalk"), 1);
1810
+ var import_chalk5 = __toESM(require("chalk"));
1812
1811
  init_providers();
1813
1812
  function printInventory(accountAlias, inventory, detailed = false) {
1814
1813
  hideSpinner();
@@ -1952,8 +1951,8 @@ function printOptimizationRecommendations(recommendations) {
1952
1951
  var import_fs = require("fs");
1953
1952
 
1954
1953
  // src/exporters/xlsx-exporter.ts
1955
- var import_exceljs = __toESM(require("exceljs"), 1);
1956
- var import_path = __toESM(require("path"), 1);
1954
+ var import_exceljs = __toESM(require("exceljs"));
1955
+ var import_path = __toESM(require("path"));
1957
1956
  var XlsxExporter = class {
1958
1957
  constructor(options = {}) {
1959
1958
  this.workbook = new import_exceljs.default.Workbook();
@@ -2406,7 +2405,7 @@ var import_client_s3 = require("@aws-sdk/client-s3");
2406
2405
  var import_client_rds = require("@aws-sdk/client-rds");
2407
2406
  var import_client_lambda = require("@aws-sdk/client-lambda");
2408
2407
  var import_client_budgets = require("@aws-sdk/client-budgets");
2409
- var import_dayjs = __toESM(require("dayjs"), 1);
2408
+ var import_dayjs = __toESM(require("dayjs"));
2410
2409
  init_providers();
2411
2410
 
2412
2411
  // src/analytics/anomaly-detector.ts
@@ -5455,7 +5454,7 @@ var CrossCloudOptimizer = class {
5455
5454
  };
5456
5455
 
5457
5456
  // src/monitoring/cost-monitor.ts
5458
- var import_events2 = __toESM(require("events"), 1);
5457
+ var import_events2 = __toESM(require("events"));
5459
5458
  init_providers();
5460
5459
  var AlertThresholdType = /* @__PURE__ */ ((AlertThresholdType3) => {
5461
5460
  AlertThresholdType3["ABSOLUTE"] = "ABSOLUTE";
@@ -7868,7 +7867,7 @@ var CostForecastingEngine = class {
7868
7867
  };
7869
7868
 
7870
7869
  // src/optimization/automated-optimizer.ts
7871
- var import_events3 = __toESM(require("events"), 1);
7870
+ var import_events3 = __toESM(require("events"));
7872
7871
  var AutomatedOptimizer = class extends import_events3.default {
7873
7872
  constructor() {
7874
7873
  super();
@@ -8414,7 +8413,7 @@ var AutomatedOptimizer = class extends import_events3.default {
8414
8413
  var import_fs3 = require("fs");
8415
8414
  var import_path3 = require("path");
8416
8415
  init_providers();
8417
- var import_events4 = __toESM(require("events"), 1);
8416
+ var import_events4 = __toESM(require("events"));
8418
8417
  var AuditLogger = class extends import_events4.default {
8419
8418
  constructor(config = {}) {
8420
8419
  super();
@@ -9097,7 +9096,7 @@ var AuditLogger = class extends import_events4.default {
9097
9096
 
9098
9097
  // src/analytics/rightsizing-engine.ts
9099
9098
  init_providers();
9100
- var import_events5 = __toESM(require("events"), 1);
9099
+ var import_events5 = __toESM(require("events"));
9101
9100
  var RightsizingEngine = class extends import_events5.default {
9102
9101
  constructor(config = {}) {
9103
9102
  super();
@@ -11009,7 +11008,7 @@ var SecurityCostAnalyzer = class extends import_events7.EventEmitter {
11009
11008
 
11010
11009
  // src/integrations/tool-integrations.ts
11011
11010
  var import_events8 = require("events");
11012
- var crypto = __toESM(require("crypto"), 1);
11011
+ var crypto = __toESM(require("crypto"));
11013
11012
  var IntegrationCategory = /* @__PURE__ */ ((IntegrationCategory2) => {
11014
11013
  IntegrationCategory2["CI_CD"] = "CI_CD";
11015
11014
  IntegrationCategory2["MONITORING"] = "MONITORING";
@@ -12222,7 +12221,7 @@ if (!crypto2.randomUUID) {
12222
12221
 
12223
12222
  // src/enterprise/multi-tenant.ts
12224
12223
  var import_events10 = require("events");
12225
- var crypto3 = __toESM(require("crypto"), 1);
12224
+ var crypto3 = __toESM(require("crypto"));
12226
12225
  var UserRole = /* @__PURE__ */ ((UserRole2) => {
12227
12226
  UserRole2["SUPER_ADMIN"] = "SUPER_ADMIN";
12228
12227
  UserRole2["TENANT_ADMIN"] = "TENANT_ADMIN";
@@ -12900,13 +12899,13 @@ var MultiTenantManager = class extends import_events10.EventEmitter {
12900
12899
 
12901
12900
  // src/api/api-server.ts
12902
12901
  var import_events12 = require("events");
12903
- var import_express = __toESM(require("express"), 1);
12902
+ var import_express = __toESM(require("express"));
12904
12903
  var import_crypto3 = require("crypto");
12905
12904
 
12906
12905
  // src/api/webhook-manager.ts
12907
12906
  var import_events11 = require("events");
12908
12907
  var import_crypto2 = require("crypto");
12909
- var import_axios = __toESM(require("axios"), 1);
12908
+ var import_axios = __toESM(require("axios"));
12910
12909
  var WebhookManager = class extends import_events11.EventEmitter {
12911
12910
  constructor(config = {}) {
12912
12911
  super();
@@ -14410,14 +14409,14 @@ var AdvancedVisualizationEngine = class extends import_events13.EventEmitter {
14410
14409
  };
14411
14410
 
14412
14411
  // src/visualization/multi-cloud-dashboard.ts
14413
- var import_chalk7 = __toESM(require("chalk"), 1);
14412
+ var import_chalk7 = __toESM(require("chalk"));
14414
14413
  init_providers();
14415
14414
 
14416
14415
  // src/discovery/profile-discovery.ts
14417
14416
  var import_fs5 = require("fs");
14418
14417
  var import_path5 = require("path");
14419
14418
  var import_os = require("os");
14420
- var import_chalk6 = __toESM(require("chalk"), 1);
14419
+ var import_chalk6 = __toESM(require("chalk"));
14421
14420
  init_providers();
14422
14421
  var CloudProfileDiscovery = class {
14423
14422
  constructor() {
@@ -15097,7 +15096,7 @@ var MultiCloudDashboard = class {
15097
15096
  };
15098
15097
 
15099
15098
  // src/index.ts
15100
- var import_chalk8 = __toESM(require("chalk"), 1);
15099
+ var import_chalk8 = __toESM(require("chalk"));
15101
15100
  var import_path7 = require("path");
15102
15101
  var program = new import_commander.Command();
15103
15102
  program.version(package_default.version).name("infra-cost").description(package_default.description).option("--provider [provider]", "Cloud provider to use (aws, gcp, azure, alicloud, oracle)", "aws").option("-p, --profile [profile]", "Cloud provider profile to use", "default").option("-k, --access-key [key]", "Access key (AWS Access Key, GCP Service Account, etc.)").option("-s, --secret-key [key]", "Secret key (AWS Secret Key, etc.)").option("-T, --session-token [key]", "Session token (AWS Session Token, etc.)").option("-r, --region [region]", "Cloud provider region", "us-east-1").option("--project-id [id]", "GCP Project ID").option("--key-file [path]", "Path to service account key file (GCP) or private key (Oracle)").option("--subscription-id [id]", "Azure Subscription ID").option("--tenant-id [id]", "Azure Tenant ID").option("--client-id [id]", "Azure Client ID").option("--client-secret [secret]", "Azure Client Secret").option("--user-id [id]", "Oracle User OCID").option("--tenancy-id [id]", "Oracle Tenancy OCID").option("--fingerprint [fingerprint]", "Oracle Public Key Fingerprint").option("-j, --json", "Get the output as JSON").option("-u, --summary", "Get only the summary without service breakdown").option("-t, --text", "Get the output as plain text (no colors / tables)").option("-S, --slack-token [token]", "Token for the slack integration").option("-C, --slack-channel [channel]", "Channel to which the slack integration should post").option("--inventory", "Show complete resource inventory").option("--inventory-type [type]", "Filter by resource type (compute, storage, database, network, security, serverless, container, analytics)").option("--inventory-regions [regions]", "Comma-separated list of regions for inventory scanning").option("--resource-costs", "Include cost-per-resource analysis").option("--optimization-tips", "Show resource optimization recommendations").option("--inventory-export [format]", "Export inventory (json, csv, xlsx)").option("--include-metadata", "Include detailed metadata in inventory export").option("--group-by [field]", "Group inventory results by provider, region, or type").option("--budgets", "Show budget information and alerts").option("--trends [months]", "Show cost trend analysis (default: 6 months)", "6").option("--finops", "Show comprehensive FinOps recommendations with potential savings").option("--alerts", "Show budget alerts and cost anomalies").option("--compare-clouds [providers]", "Compare costs across multiple cloud providers (comma-separated)").option("--optimization-report", "Generate cross-cloud optimization recommendations").option("--multi-cloud-dashboard", "Display comprehensive multi-cloud infrastructure dashboard").option("--all-clouds-inventory", "Show inventory across all configured cloud providers").option("--dependency-mapping", "Analyze resource dependencies and relationships").option("--tagging-compliance", "Analyze tagging compliance against standards").option("--resource-graph", "Generate resource dependency graph visualization").option("--monitor", "Start real-time cost monitoring").option("--monitor-setup [config]", "Setup monitoring configuration (json file path or inline json)").option("--monitor-start [name]", "Start a named monitoring session").option("--monitor-stop [name]", "Stop a named monitoring session").option("--monitor-status", "Show status of all monitoring sessions").option("--alert-threshold [value]", "Set alert threshold (e.g., 1000 for $1000, 20% for percentage)").option("--alert-type [type]", "Alert type: ABSOLUTE, PERCENTAGE, ANOMALY, TREND, BUDGET_FORECAST").option("--alert-channel [channel]", "Notification channel: slack, email, webhook, teams, sms, discord").option("--config-init [path]", "Initialize monitoring configuration file").option("--config-validate [path]", "Validate monitoring configuration file").option("--config-sample [path]", "Create sample configuration file").option("--forecast [days]", "Generate cost forecast (default: 30 days)", "30").option("--forecast-model [model]", "Forecasting model: LINEAR, EXPONENTIAL, SEASONAL, AUTO", "AUTO").option("--forecast-confidence [level]", "Confidence level for predictions (80, 90, 95, 99)", "95").option("--forecast-services", "Generate individual service forecasts").option("--forecast-export [format]", "Export forecast results (json, csv, xlsx)").option("--optimize", "Run automated cost optimization").option("--optimize-plan [file]", "Execute optimization plan from file").option("--optimize-dry-run", "Run optimization in dry-run mode (no changes)").option("--optimize-rules [rules]", "Comma-separated list of rule IDs to execute").option("--optimize-budget [amount]", "Maximum budget for optimization actions").option("--optimize-stats", "Show optimization statistics and history").option("--optimize-stop", "Stop all active optimizations").option("--optimize-create-plan [file]", "Create a new optimization plan template").option("--audit-query [filters]", "Query audit logs with JSON filters").option("--audit-export [format]", "Export audit logs (json, csv, xml, syslog)").option("--audit-report [framework]", "Generate compliance report (soc2, gdpr, hipaa, pci_dss)").option("--audit-period [days]", "Audit period in days (default: 30)", "30").option("--audit-stats", "Show audit statistics and compliance overview").option("--compliance-check [framework]", "Run compliance check against framework").option("--compliance-frameworks", "List available compliance frameworks").option("--rightsize", "Generate ML-based rightsizing recommendations").option("--rightsize-conservative", "Use conservative rightsizing approach (lower risk)").option("--rightsize-aggressive", "Use aggressive rightsizing approach (higher savings)").option("--rightsize-min-savings [amount]", "Minimum monthly savings threshold (default: $10)", "10").option("--rightsize-export [format]", "Export rightsizing recommendations (json, csv, xlsx)").option("--rightsize-simulate", "Show potential savings without generating recommendations").option("--rightsize-filter [types]", "Filter by resource types (comma-separated)").option("--sustainability", "Analyze carbon footprint and sustainability metrics").option("--carbon-footprint", "Calculate detailed carbon emissions for resources").option("--sustainability-export [format]", "Export sustainability analysis (json, csv, xlsx, pdf)").option("--green-recommendations", "Generate green optimization recommendations").option("--sustainability-targets", "Set sustainability targets (JSON format)").option("--carbon-pricing [model]", "Carbon pricing model: SOCIAL_COST, CARBON_TAX, MARKET_PRICE").option("--sustainability-deep", "Include supply chain and indirect emissions analysis").option("--renewable-regions", "Show regions with highest renewable energy adoption").option("--sustainability-score", "Calculate overall sustainability score").option("--security-analysis", "Analyze security costs and risk posture").option("--security-vulnerabilities", "Detailed vulnerability assessment and costs").option("--security-compliance [framework]", "Analyze compliance against framework (soc2, iso27001, pci_dss, hipaa)").option("--security-recommendations", "Generate security cost optimization recommendations").option("--security-export [format]", "Export security analysis (json, csv, xlsx)").option("--security-risk-tolerance [level]", "Risk tolerance level: LOW, MEDIUM, HIGH").option("--security-industry [vertical]", "Industry vertical: FINANCE, HEALTHCARE, RETAIL, TECHNOLOGY, GOVERNMENT").option("--security-deep", "Include detailed vulnerability and incident cost analysis").option("--security-trends", "Show security cost and risk trends").option("--integrations", "List all available tool integrations").option("--integrations-status", "Show status of all configured integrations").option("--integrations-configure [integration]", "Configure a specific integration").option("--integrations-enable [integration]", "Enable a specific integration").option("--integrations-disable [integration]", "Disable a specific integration").option("--integrations-sync [integration]", "Manually sync a specific integration").option("--integrations-test [integration]", "Test connection to a specific integration").option("--integrations-export [format]", "Export integration report (json, csv)").option("--integrations-category [category]", "Filter integrations by category (ci_cd, monitoring, collaboration)").option("--analytics", "Generate comprehensive cost intelligence report").option("--analytics-executive", "Generate executive summary report").option("--analytics-insights", "Show key business insights and recommendations").option("--analytics-trends", "Analyze cost trends and patterns").option("--analytics-drivers", "Identify and analyze primary cost drivers").option("--analytics-efficiency", "Calculate efficiency metrics and benchmarks").option("--analytics-forecast", "Generate predictive analytics and forecasts").option("--analytics-alerts", "Show intelligent cost alerts and anomalies").option("--analytics-export [format]", "Export analytics report (json, csv, xlsx, pdf)").option("--analytics-timeframe [days]", "Analysis timeframe in days (default: 30)", "30").option("--analytics-dashboard [name]", "Create custom dashboard with specified name").option("--cohort-analysis [criteria]", "Perform cohort analysis with specified criteria").option("--unit-economics [unit]", "Calculate unit economics for specified business unit").option("--enterprise", "Show enterprise and multi-tenant overview").option("--tenants", "List all tenants and their status").option("--tenant-create [name]", "Create a new tenant").option("--tenant-info [id]", "Show detailed tenant information").option("--tenant-suspend [id]", "Suspend a tenant").option("--tenant-activate [id]", "Activate a suspended tenant").option("--users [tenant]", "List users (optionally filtered by tenant)").option("--user-create [email]", "Create a new user").option("--user-role [userId:role]", "Update user role").option("--api-key-generate [userId:name]", "Generate API key for user").option("--quotas [tenantId]", "Check quota usage for tenant").option("--platform-metrics", "Show platform-wide metrics and health").option("--enterprise-export [format]", "Export enterprise report (json, csv)").option("--api-server", "Start the REST API server").option("--api-port [port]", "API server port (default: 3000)", "3000").option("--api-host [host]", "API server host (default: 0.0.0.0)", "0.0.0.0").option("--api-key-create [name:permissions]", "Create API key with optional permissions").option("--api-key-list", "List all API keys for current user").option("--api-key-revoke [id]", "Revoke an API key").option("--api-status", "Show API server status and statistics").option("--webhook-create [url:events]", "Create webhook subscription").option("--webhook-list", "List webhook subscriptions").option("--webhook-delete [id]", "Delete webhook subscription").option("--webhook-test [id]", "Test webhook delivery").option("--webhook-history [id]", "Show webhook delivery history").option("--webhook-stats", "Show webhook statistics").option("--anomaly-detect", "Run AI-powered cost anomaly detection").option("--anomaly-report [days]", "Generate anomaly detection report (default: 30 days)", "30").option("--anomaly-config [config]", "Set anomaly detection configuration (JSON)").option("--anomaly-sensitivity [level]", "Set detection sensitivity: low, medium, high", "medium").option("--anomaly-models [models]", "Enable specific AI models: spike,pattern,seasonal,ensemble,deep", "spike,pattern,seasonal").option("--anomaly-realtime", "Enable real-time anomaly monitoring").option("--anomaly-list [filter]", "List detected anomalies with optional filter").option("--anomaly-status [id]", "Update anomaly status (id:status format)").option("--anomaly-export [format]", "Export anomaly report (json, csv, xlsx)").option("--anomaly-insights", "Show AI-generated insights about cost patterns").option("--dashboard-create [name]", "Create a new dashboard with specified name").option("--dashboard-template [id]", "Create dashboard from template (cost-overview, resource-optimization)").option("--dashboard-list", "List all available dashboards").option("--dashboard-view [id]", "View dashboard by ID").option("--dashboard-export [id:format]", "Export dashboard (id:html|pdf|json format)").option("--chart-create [type:title]", "Create a new chart (line:title, bar:title, pie:title, etc.)").option("--chart-list", "List all available charts").option("--chart-export [id:format]", "Export chart (id:html|svg|csv|json format)").option("--visualization-theme [theme]", "Set visualization theme (default, dark, corporate)").option("--visualization-templates", "Show available dashboard templates").option("--visualization-demo", "Generate demo dashboard with sample data").option("--trend", "Generate 6-month cost trend analysis with visualization").option("--audit", "Generate comprehensive audit report with recommendations").option("--executive-summary", "Generate executive-level cost summary report").option("--pdf-report [filename]", "Generate PDF report with specified filename").option("--combine-profiles", "Combine cost data from multiple profiles of same account").option("--all-profiles", "Use all available cloud provider profiles").option("--interactive", "Start interactive guided cost analysis mode").option("--discover-profiles", "Auto-discover available cloud provider profiles").option("--auto-profile", "Automatically select best available profile").option("--smart-alerts", "Enable intelligent cost alerting with visual indicators").option("--compact", "Use compact display mode for large datasets").option("-h, --help", "Get the help of the CLI").parse(process.argv);
@@ -19080,4 +19079,4 @@ main().catch((error) => {
19080
19079
  console.error("An error occurred:", error);
19081
19080
  process.exit(1);
19082
19081
  });
19083
- //# sourceMappingURL=index.cjs.map
19082
+ //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "infra-cost",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Multi-cloud FinOps CLI tool for comprehensive cost analysis and infrastructure optimization across AWS, GCP, Azure, Alibaba Cloud, and Oracle Cloud",
5
- "type": "module",
6
5
  "author": {
7
6
  "name": "Code Collab",
8
7
  "email": "codecollab.co@gmail.com",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/demo/test-enhanced-ui.ts","../../src/visualization/terminal-ui.ts","../../src/demo/demo-data-generator.ts","../../src/exporters/pdf-exporter.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport chalk from 'chalk';\nimport { TerminalUIEngine } from '../visualization/terminal-ui';\nimport { DemoDataGenerator } from './demo-data-generator';\nimport { PDFExporter } from '../exporters/pdf-exporter';\n\n/**\n * Test utility for enhanced UI features using demo data\n * Run with: node dist/demo/test-enhanced-ui.js\n */\nasync function testEnhancedUI() {\n console.log(chalk.bold.cyan('🧪 Testing Enhanced Terminal UI Features\\n'));\n\n const ui = new TerminalUIEngine();\n\n // Test 1: Enhanced Header\n console.log(chalk.bold.yellow('Test 1: Enhanced Header'));\n console.log('─'.repeat(50));\n const header = ui.createHeader('🚀 Infrastructure Cost Analysis', 'Demo Production Account');\n console.log(header);\n\n // Test 2: Cost Table with Rich Formatting\n console.log(chalk.bold.yellow('Test 2: Rich Cost Breakdown Table'));\n console.log('─'.repeat(50));\n const costBreakdown = DemoDataGenerator.generateCostBreakdown();\n const costTable = ui.createCostTable(costBreakdown, {\n showPercentages: true,\n highlightTop: 8,\n currency: 'USD',\n compact: false\n });\n console.log(costTable);\n\n // Test 3: Trend Chart Visualization\n console.log(chalk.bold.yellow('Test 3: ASCII Trend Chart'));\n console.log('─'.repeat(50));\n const trendAnalysis = DemoDataGenerator.generateTrendAnalysis();\n if (trendAnalysis.trendData) {\n const trendChart = ui.createTrendChart(trendAnalysis.trendData, {\n width: 50,\n showLabels: true,\n currency: 'USD',\n colorThreshold: 0.7\n });\n console.log(trendChart);\n }\n\n // Test 4: Cost Anomaly Alerts\n console.log(chalk.bold.yellow('Test 4: Cost Anomaly Alerts'));\n console.log('─'.repeat(50));\n const anomalies = DemoDataGenerator.generateCostAnomalies();\n const anomalyAlert = ui.createAnomalyAlert(anomalies);\n console.log(anomalyAlert);\n\n // Test 5: Progress Indicators\n console.log(chalk.bold.yellow('Test 5: Progress Indicators'));\n console.log('─'.repeat(50));\n ui.startProgress('Processing cost analysis', 100);\n\n // Simulate processing steps\n for (let i = 0; i <= 100; i += 20) {\n await new Promise(resolve => setTimeout(resolve, 200));\n ui.updateProgress(i, { step: `Processing step ${i/20 + 1}/6` });\n }\n\n ui.stopProgress();\n console.log(chalk.green('✅ Processing completed!\\n'));\n\n // Test 6: Summary Display\n console.log(chalk.bold.yellow('Test 6: Executive Summary Format'));\n console.log('─'.repeat(50));\n const recommendations = DemoDataGenerator.generateRecommendations();\n const totalSavings = recommendations.reduce((sum, rec) => sum + rec.potentialSavings.amount, 0);\n\n console.log('\\n' + chalk.bold.cyan('🎯 Key Performance Indicators'));\n console.log('═'.repeat(50));\n console.log(`Monthly Spend: ${chalk.yellow('$' + costBreakdown.totals.thisMonth.toFixed(2))}`);\n console.log(`Cost Change: ${costBreakdown.totals.thisMonth > costBreakdown.totals.lastMonth ?\n chalk.red('↗ +' + ((costBreakdown.totals.thisMonth - costBreakdown.totals.lastMonth) / costBreakdown.totals.lastMonth * 100).toFixed(1) + '%') :\n chalk.green('↘ ' + ((costBreakdown.totals.thisMonth - costBreakdown.totals.lastMonth) / costBreakdown.totals.lastMonth * 100).toFixed(1) + '%')\n }`);\n console.log(`Optimization Potential: ${chalk.green('$' + totalSavings.toFixed(2))}`);\n console.log(`Active Recommendations: ${chalk.cyan(recommendations.length.toString())}`);\n\n // Test 7: Recommendations Display\n console.log('\\n' + chalk.bold.cyan('💡 Top Cost Optimization Recommendations'));\n console.log('═'.repeat(60));\n recommendations.slice(0, 3).forEach((rec, index) => {\n console.log(`\\n${index + 1}. ${chalk.bold(rec.title)}`);\n console.log(` ${rec.description}`);\n console.log(` 💰 Potential savings: ${chalk.green('$' + rec.potentialSavings.amount.toFixed(2))} ${rec.potentialSavings.timeframe.toLowerCase()}`);\n console.log(` 🎯 Priority: ${chalk[rec.priority === 'HIGH' ? 'red' : rec.priority === 'MEDIUM' ? 'yellow' : 'cyan'](rec.priority)}`);\n console.log(` 🔧 Effort: ${chalk.gray(rec.effort)}`);\n });\n\n console.log('\\n' + chalk.gray('━'.repeat(70)));\n console.log(chalk.gray('💡 Demo completed successfully! All enhanced UI features are working.'));\n console.log(chalk.gray('📊 Use --trend, --audit, or --executive-summary with real data'));\n\n return true;\n}\n\n/**\n * Test PDF generation with demo data\n */\nasync function testPDFGeneration() {\n console.log('\\n' + chalk.bold.cyan('📄 Testing PDF Generation'));\n console.log('─'.repeat(50));\n\n try {\n const pdfExporter = new PDFExporter({\n outputPath: './demo-reports',\n includeCharts: true,\n includeSummary: true,\n includeDetails: true,\n includeRecommendations: true\n });\n\n const accountInfo = DemoDataGenerator.generateAccountInfo();\n const costBreakdown = DemoDataGenerator.generateCostBreakdown();\n const recommendations = DemoDataGenerator.generateRecommendations();\n const anomalies = DemoDataGenerator.generateCostAnomalies();\n const inventory = DemoDataGenerator.generateResourceInventory();\n\n console.log('🔄 Generating comprehensive demo audit report...');\n\n const auditData = {\n accountInfo,\n costBreakdown,\n resourceInventory: inventory,\n recommendations,\n anomalies,\n generatedAt: new Date(),\n reportPeriod: {\n start: new Date(Date.now() - 30 * 24 * 60 * 60 * 1000),\n end: new Date()\n }\n };\n\n const pdfPath = await pdfExporter.generateAuditReport(auditData);\n console.log(chalk.green(`✅ Demo PDF report generated: ${pdfPath}`));\n\n return true;\n } catch (error) {\n console.log(chalk.yellow(`⚠️ PDF generation test skipped: ${error instanceof Error ? error.message : 'Unknown error'}`));\n console.log(chalk.gray(' (This is expected in environments without browser support)'));\n return false;\n }\n}\n\n// Main execution\nasync function main() {\n try {\n console.log(chalk.bold.blue('🚀 Enhanced infra-cost UI Testing Suite'));\n console.log(chalk.gray('Testing all new features with realistic demo data\\n'));\n\n const uiTestResult = await testEnhancedUI();\n const pdfTestResult = await testPDFGeneration();\n\n console.log('\\n' + chalk.bold.green('🎉 Testing Complete!'));\n console.log(`Terminal UI Features: ${uiTestResult ? chalk.green('✅ PASS') : chalk.red('❌ FAIL')}`);\n console.log(`PDF Generation: ${pdfTestResult ? chalk.green('✅ PASS') : chalk.yellow('⚠️ SKIP')}`);\n\n if (uiTestResult) {\n console.log('\\n' + chalk.bold.cyan('Next Steps:'));\n console.log('• Run with real AWS credentials: infra-cost --trend');\n console.log('• Generate audit reports: infra-cost --audit --pdf-report');\n console.log('• Create executive summaries: infra-cost --executive-summary');\n }\n\n } catch (error) {\n console.error(chalk.red('❌ Test failed:'), error instanceof Error ? error.message : error);\n process.exit(1);\n }\n}\n\n// Run if called directly (ES module version)\nif (import.meta.url === `file://${process.argv[1]}`) {\n main();\n}\n\nexport { testEnhancedUI, testPDFGeneration };","import Table from 'cli-table3';\nimport chalk from 'chalk';\nimport cliProgress from 'cli-progress';\nimport moment from 'moment';\nimport { CostBreakdown, TrendData, CostTrendAnalysis } from '../types/providers';\n\ninterface TableColumn {\n header: string;\n width?: number;\n align?: 'left' | 'right' | 'center';\n color?: keyof typeof chalk;\n}\n\ninterface TableRow {\n [key: string]: string | number;\n}\n\ninterface TrendChartOptions {\n width: number;\n showLabels: boolean;\n colorThreshold?: number;\n currency?: string;\n}\n\ninterface CostTableOptions {\n showPercentages: boolean;\n highlightTop: number;\n currency: string;\n compact: boolean;\n}\n\nexport class TerminalUIEngine {\n private progressBar: cliProgress.SingleBar | null = null;\n\n /**\n * Creates a formatted table with enhanced styling\n */\n createTable(columns: TableColumn[], rows: TableRow[]): string {\n const table = new Table({\n head: columns.map(col => chalk.bold(col.header)),\n colWidths: columns.map(col => col.width || 20),\n colAligns: columns.map(col => col.align || 'left'),\n style: {\n head: [],\n border: [],\n compact: false\n },\n chars: {\n 'top': '─',\n 'top-mid': '┬',\n 'top-left': '┌',\n 'top-right': '┐',\n 'bottom': '─',\n 'bottom-mid': '┴',\n 'bottom-left': '└',\n 'bottom-right': '┘',\n 'left': '│',\n 'left-mid': '├',\n 'mid': '─',\n 'mid-mid': '┼',\n 'right': '│',\n 'right-mid': '┤',\n 'middle': '│'\n }\n });\n\n // Add rows with color formatting\n rows.forEach(row => {\n const formattedRow = columns.map((col, index) => {\n const value = Object.values(row)[index];\n const colorKey = col.color;\n\n if (colorKey && typeof value === 'string') {\n return chalk[colorKey](value);\n }\n\n return String(value);\n });\n\n table.push(formattedRow);\n });\n\n return table.toString();\n }\n\n /**\n * Creates a cost breakdown table with rich formatting\n * Optimized for large datasets with pagination and filtering\n */\n createCostTable(costBreakdown: CostBreakdown, options: CostTableOptions = {\n showPercentages: true,\n highlightTop: 5,\n currency: 'USD',\n compact: false\n }): string {\n const { totals, totalsByService } = costBreakdown;\n\n // Header with summary\n let output = '\\n' + chalk.bold.cyan('💰 Cost Analysis Summary') + '\\n';\n output += '═'.repeat(50) + '\\n\\n';\n\n // Create summary table\n const summaryColumns: TableColumn[] = [\n { header: 'Period', width: 15, align: 'left', color: 'cyan' },\n { header: 'Cost', width: 15, align: 'right', color: 'yellow' },\n { header: 'Change', width: 20, align: 'right' }\n ];\n\n const summaryRows: TableRow[] = [\n {\n period: 'Yesterday',\n cost: this.formatCurrency(totals.yesterday, options.currency),\n change: ''\n },\n {\n period: 'Last 7 Days',\n cost: this.formatCurrency(totals.last7Days, options.currency),\n change: this.calculateChange(totals.last7Days, totals.yesterday * 7)\n },\n {\n period: 'This Month',\n cost: this.formatCurrency(totals.thisMonth, options.currency),\n change: this.calculateChange(totals.thisMonth, totals.lastMonth)\n },\n {\n period: 'Last Month',\n cost: this.formatCurrency(totals.lastMonth, options.currency),\n change: ''\n }\n ];\n\n output += this.createTable(summaryColumns, summaryRows) + '\\n\\n';\n\n // Service breakdown for this month with performance optimizations\n output += chalk.bold.cyan('📊 Service Breakdown (This Month)') + '\\n';\n output += '═'.repeat(50) + '\\n\\n';\n\n // Performance optimization: Pre-filter and batch process large datasets\n const allServiceEntries = Object.entries(totalsByService.thisMonth);\n const significantServices = allServiceEntries\n .filter(([_, cost]) => cost > 0.01) // Filter out negligible costs for performance\n .sort(([, a], [, b]) => b - a);\n\n const maxDisplay = options.highlightTop || 15;\n const serviceEntries = significantServices.slice(0, maxDisplay);\n\n // Show stats for large datasets\n if (allServiceEntries.length > maxDisplay) {\n const hiddenServices = allServiceEntries.length - maxDisplay;\n const hiddenCost = significantServices.slice(maxDisplay)\n .reduce((sum, [_, cost]) => sum + cost, 0);\n\n if (hiddenCost > 0) {\n output += chalk.gray(`Showing top ${maxDisplay} of ${allServiceEntries.length} services `) +\n chalk.gray(`(${hiddenServices} services with $${hiddenCost.toFixed(2)} hidden)\\n\\n`);\n }\n }\n\n const serviceColumns: TableColumn[] = [\n { header: 'Service', width: 25, align: 'left', color: 'blue' },\n { header: 'Cost', width: 15, align: 'right', color: 'yellow' },\n { header: 'Share', width: 10, align: 'right' },\n { header: 'Trend', width: 15, align: 'center' }\n ];\n\n const serviceRows: TableRow[] = serviceEntries.map(([service, cost]) => {\n const share = (cost / totals.thisMonth * 100).toFixed(1);\n const lastMonthCost = totalsByService.lastMonth[service] || 0;\n const trend = this.getTrendIndicator(cost, lastMonthCost);\n\n return {\n service: service,\n cost: this.formatCurrency(cost, options.currency),\n share: `${share}%`,\n trend: trend\n };\n });\n\n output += this.createTable(serviceColumns, serviceRows);\n\n return output;\n }\n\n /**\n * Creates ASCII trend chart for cost visualization\n */\n createTrendChart(trendData: TrendData[], options: TrendChartOptions = {\n width: 60,\n showLabels: true,\n currency: 'USD'\n }): string {\n if (!trendData || trendData.length === 0) {\n return chalk.red('No trend data available');\n }\n\n let output = '\\n' + chalk.bold.cyan('📈 Cost Trend Analysis') + '\\n';\n output += '═'.repeat(50) + '\\n\\n';\n\n const maxCost = Math.max(...trendData.map(d => d.actualCost));\n const minCost = Math.min(...trendData.map(d => d.actualCost));\n const range = maxCost - minCost;\n\n trendData.forEach((data, index) => {\n const normalizedValue = range > 0 ? (data.actualCost - minCost) / range : 0.5;\n const barLength = Math.round(normalizedValue * options.width);\n\n // Create the bar\n const bar = '█'.repeat(barLength) + '░'.repeat(options.width - barLength);\n const coloredBar = this.colorizeBar(bar, normalizedValue, options.colorThreshold);\n\n // Format the line\n const period = moment(data.period).format('MMM YYYY');\n const cost = this.formatCurrency(data.actualCost, options.currency);\n const change = data.changeFromPrevious ?\n this.formatChangeIndicator(data.changeFromPrevious.percentage) : '';\n\n output += `${period.padEnd(10)} ${coloredBar} ${cost.padStart(10)} ${change}\\n`;\n });\n\n output += '\\n' + '─'.repeat(options.width + 25) + '\\n';\n output += `Range: ${this.formatCurrency(minCost, options.currency)} - ${this.formatCurrency(maxCost, options.currency)}\\n`;\n\n return output;\n }\n\n /**\n * Creates a progress bar for long-running operations\n */\n startProgress(label: string, total: number = 100): void {\n if (this.progressBar) {\n this.progressBar.stop();\n }\n\n this.progressBar = new cliProgress.SingleBar({\n format: `${chalk.cyan(label)} ${chalk.cyan('[')}${chalk.yellow('{bar}')}${chalk.cyan(']')} {percentage}% | ETA: {eta}s | {value}/{total}`,\n barCompleteChar: '\\u2588',\n barIncompleteChar: '\\u2591',\n hideCursor: true\n });\n\n this.progressBar.start(total, 0);\n }\n\n /**\n * Updates progress bar\n */\n updateProgress(value: number, payload?: object): void {\n if (this.progressBar) {\n this.progressBar.update(value, payload);\n }\n }\n\n /**\n * Stops and clears progress bar\n */\n stopProgress(): void {\n if (this.progressBar) {\n this.progressBar.stop();\n this.progressBar = null;\n }\n }\n\n /**\n * Creates a cost anomaly alert box\n */\n createAnomalyAlert(anomalies: Array<{\n date: string;\n actualCost: number;\n expectedCost: number;\n deviation: number;\n severity: string;\n description?: string;\n }>): string {\n if (anomalies.length === 0) {\n return chalk.green('✅ No cost anomalies detected');\n }\n\n let output = '\\n' + chalk.bold.red('🚨 Cost Anomalies Detected') + '\\n';\n output += '═'.repeat(50) + '\\n\\n';\n\n anomalies.forEach(anomaly => {\n const severityColor = this.getSeverityColor(anomaly.severity);\n const icon = this.getSeverityIcon(anomaly.severity);\n\n output += chalk[severityColor](`${icon} ${anomaly.date}\\n`);\n output += ` Expected: ${this.formatCurrency(anomaly.expectedCost, 'USD')}\\n`;\n output += ` Actual: ${this.formatCurrency(anomaly.actualCost, 'USD')}\\n`;\n output += ` Deviation: ${anomaly.deviation > 0 ? '+' : ''}${anomaly.deviation.toFixed(1)}%\\n`;\n\n if (anomaly.description) {\n output += ` ${chalk.gray(anomaly.description)}\\n`;\n }\n output += '\\n';\n });\n\n return output;\n }\n\n /**\n * Creates a fancy header with branding\n */\n createHeader(title: string, subtitle?: string): string {\n const width = 60;\n let output = '\\n';\n\n // Top border\n output += chalk.cyan('┌' + '─'.repeat(width - 2) + '┐') + '\\n';\n\n // Title line\n const titlePadding = Math.floor((width - title.length - 4) / 2);\n output += chalk.cyan('│') + ' '.repeat(titlePadding) + chalk.bold.white(title) +\n ' '.repeat(width - title.length - titlePadding - 2) + chalk.cyan('│') + '\\n';\n\n // Subtitle if provided\n if (subtitle) {\n const subtitlePadding = Math.floor((width - subtitle.length - 4) / 2);\n output += chalk.cyan('│') + ' '.repeat(subtitlePadding) + chalk.gray(subtitle) +\n ' '.repeat(width - subtitle.length - subtitlePadding - 2) + chalk.cyan('│') + '\\n';\n }\n\n // Bottom border\n output += chalk.cyan('└' + '─'.repeat(width - 2) + '┘') + '\\n\\n';\n\n return output;\n }\n\n // Helper methods\n private formatCurrency(amount: number, currency: string): string {\n return new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency: currency,\n minimumFractionDigits: 2,\n maximumFractionDigits: 2\n }).format(amount);\n }\n\n private calculateChange(current: number, previous: number): string {\n if (previous === 0) return '';\n\n const change = ((current - previous) / previous) * 100;\n const changeStr = `${change >= 0 ? '+' : ''}${change.toFixed(1)}%`;\n\n if (change > 0) {\n return chalk.red(`↗ ${changeStr}`);\n } else if (change < 0) {\n return chalk.green(`↘ ${changeStr}`);\n } else {\n return chalk.gray('→ 0.0%');\n }\n }\n\n private getTrendIndicator(current: number, previous: number): string {\n if (previous === 0) return chalk.gray('─');\n\n const change = ((current - previous) / previous) * 100;\n\n if (change > 10) return chalk.red('↗↗');\n if (change > 0) return chalk.yellow('↗');\n if (change < -10) return chalk.green('↘↘');\n if (change < 0) return chalk.green('↘');\n return chalk.gray('→');\n }\n\n private colorizeBar(bar: string, normalizedValue: number, threshold?: number): string {\n const thresholdValue = threshold || 0.7;\n\n if (normalizedValue > thresholdValue) {\n return chalk.red(bar);\n } else if (normalizedValue > 0.4) {\n return chalk.yellow(bar);\n } else {\n return chalk.green(bar);\n }\n }\n\n private formatChangeIndicator(percentage: number): string {\n const indicator = percentage >= 0 ? '↗' : '↘';\n const color = percentage >= 0 ? 'red' : 'green';\n const sign = percentage >= 0 ? '+' : '';\n\n return chalk[color](`${indicator} ${sign}${percentage.toFixed(1)}%`);\n }\n\n private getSeverityColor(severity: string): keyof typeof chalk {\n switch (severity.toLowerCase()) {\n case 'critical': return 'red';\n case 'high': return 'red';\n case 'medium': return 'yellow';\n case 'low': return 'cyan';\n default: return 'gray';\n }\n }\n\n private getSeverityIcon(severity: string): string {\n switch (severity.toLowerCase()) {\n case 'critical': return '🔴';\n case 'high': return '🟠';\n case 'medium': return '🟡';\n case 'low': return '🔵';\n default: return '⚪';\n }\n }\n}\n\nexport default TerminalUIEngine;","import {\n CloudProvider,\n CostBreakdown,\n TrendData,\n CostTrendAnalysis,\n FinOpsRecommendation,\n AccountInfo,\n ResourceInventory,\n ResourceType\n} from '../types/providers';\n\n/**\n * Demo data generator for testing enhanced features without real cloud credentials\n */\nexport class DemoDataGenerator {\n\n /**\n * Generate sample account information\n */\n static generateAccountInfo(): AccountInfo {\n return {\n id: '123456789012',\n name: 'Demo Production Account',\n provider: CloudProvider.AWS\n };\n }\n\n /**\n * Generate realistic cost breakdown data\n */\n static generateCostBreakdown(): CostBreakdown {\n const services = [\n 'Amazon EC2-Instance', 'Amazon S3', 'Amazon RDS', 'AWS Lambda',\n 'Amazon CloudFront', 'Amazon EBS', 'Amazon VPC', 'Amazon Route 53',\n 'AWS Application Load Balancer', 'Amazon ElastiCache', 'Amazon SES',\n 'Amazon CloudWatch', 'AWS Data Transfer', 'Amazon DynamoDB'\n ];\n\n const generateServiceCosts = (baseMultiplier: number) => {\n const costs: { [key: string]: number } = {};\n services.forEach(service => {\n // Generate realistic cost variations\n const baseCost = Math.random() * 1000 * baseMultiplier;\n const serviceMultiplier = this.getServiceMultiplier(service);\n costs[service] = Math.round(baseCost * serviceMultiplier * 100) / 100;\n });\n return costs;\n };\n\n const lastMonth = generateServiceCosts(1.0);\n const thisMonth = generateServiceCosts(0.85); // 15% decrease this month\n const last7Days = generateServiceCosts(0.2); // Proportional to monthly\n const yesterday = generateServiceCosts(0.03); // Daily portion\n\n return {\n totals: {\n lastMonth: Object.values(lastMonth).reduce((sum, cost) => sum + cost, 0),\n thisMonth: Object.values(thisMonth).reduce((sum, cost) => sum + cost, 0),\n last7Days: Object.values(last7Days).reduce((sum, cost) => sum + cost, 0),\n yesterday: Object.values(yesterday).reduce((sum, cost) => sum + cost, 0)\n },\n totalsByService: {\n lastMonth,\n thisMonth,\n last7Days,\n yesterday\n }\n };\n }\n\n /**\n * Generate trend analysis data for the last 6 months\n */\n static generateTrendAnalysis(): CostTrendAnalysis {\n const months = 6;\n const trendData: TrendData[] = [];\n\n // Generate trend data with some seasonal patterns\n for (let i = months - 1; i >= 0; i--) {\n const date = new Date();\n date.setMonth(date.getMonth() - i);\n\n const baselineCost = 3500;\n const seasonalFactor = 1 + 0.2 * Math.sin((date.getMonth() / 12) * 2 * Math.PI);\n const trendFactor = 1 + (months - i - 1) * 0.05; // Gradual increase\n const randomVariation = 0.9 + Math.random() * 0.2;\n\n const actualCost = baselineCost * seasonalFactor * trendFactor * randomVariation;\n const previousCost = i === months - 1 ? actualCost * 0.95 : trendData[i - 1]?.actualCost || actualCost;\n\n trendData.push({\n period: date.toISOString().substring(0, 7), // YYYY-MM format\n actualCost: Math.round(actualCost * 100) / 100,\n forecastedCost: actualCost * (0.95 + Math.random() * 0.1),\n budgetLimit: 4000,\n previousPeriodCost: previousCost,\n changeFromPrevious: {\n amount: actualCost - previousCost,\n percentage: ((actualCost - previousCost) / previousCost) * 100\n }\n });\n }\n\n // Generate top services data\n const topServices = [\n { serviceName: 'Amazon EC2-Instance', cost: 1250.80, percentage: 32.1, trend: 'INCREASING' as const },\n { serviceName: 'Amazon RDS', cost: 890.45, percentage: 22.9, trend: 'STABLE' as const },\n { serviceName: 'Amazon S3', cost: 420.30, percentage: 10.8, trend: 'DECREASING' as const },\n { serviceName: 'AWS Lambda', cost: 380.70, percentage: 9.8, trend: 'INCREASING' as const },\n { serviceName: 'Amazon CloudFront', cost: 220.15, percentage: 5.7, trend: 'STABLE' as const }\n ];\n\n // Generate cost anomalies\n const costAnomalies = [\n {\n date: new Date(Date.now() - 5 * 24 * 60 * 60 * 1000).toISOString().substring(0, 10),\n actualCost: 4850.30,\n expectedCost: 3200.50,\n deviation: 51.6,\n severity: 'HIGH' as const,\n possibleCause: 'EC2 instance scale-out event',\n description: 'Unusual spike in EC2 costs detected during weekend scaling event'\n },\n {\n date: new Date(Date.now() - 12 * 24 * 60 * 60 * 1000).toISOString().substring(0, 10),\n actualCost: 2100.80,\n expectedCost: 3100.20,\n deviation: -32.2,\n severity: 'MEDIUM' as const,\n possibleCause: 'Scheduled maintenance window',\n description: 'Lower than expected costs during planned maintenance'\n }\n ];\n\n return {\n provider: CloudProvider.AWS,\n timeRange: {\n start: trendData[0].period + '-01',\n end: trendData[trendData.length - 1].period + '-28'\n },\n granularity: 'MONTHLY',\n trendData,\n totalCost: trendData.reduce((sum, data) => sum + data.actualCost, 0),\n averageDailyCost: trendData[trendData.length - 1].actualCost / 30,\n projectedMonthlyCost: trendData[trendData.length - 1].actualCost * 1.05,\n avgMonthOverMonthGrowth: 5.2,\n topServices,\n costAnomalies,\n analytics: {\n insights: [\n 'EC2 costs have increased by 15% over the last 3 months due to increased workload',\n 'S3 storage costs decreased by 8% after implementing lifecycle policies',\n 'Lambda usage shows steady growth pattern aligned with application scaling',\n 'RDS costs remain stable with good resource utilization',\n 'CloudFront costs show seasonal variation with higher usage in Q4'\n ],\n recommendations: [\n 'Consider Reserved Instances for EC2 to reduce costs by up to 30%',\n 'Implement automated S3 lifecycle management for additional savings',\n 'Review Lambda memory allocation for cost optimization',\n 'Consider RDS instance rightsizing based on utilization metrics'\n ],\n volatilityScore: 0.15,\n trendStrength: 0.72\n }\n };\n }\n\n /**\n * Generate realistic FinOps recommendations\n */\n static generateRecommendations(): FinOpsRecommendation[] {\n return [\n {\n id: 'rec-001',\n type: 'COST_OPTIMIZATION',\n title: 'Purchase EC2 Reserved Instances',\n description: 'Based on your consistent EC2 usage patterns, purchasing Reserved Instances could save up to 30% on compute costs.',\n potentialSavings: {\n amount: 450.30,\n percentage: 30,\n timeframe: 'MONTHLY'\n },\n effort: 'LOW',\n priority: 'HIGH',\n resources: ['i-1234567890abcdef0', 'i-0987654321fedcba0'],\n implementationSteps: [\n 'Analyze current EC2 usage patterns over the last 12 months',\n 'Purchase 1-year Reserved Instances for consistent workloads',\n 'Set up automated monitoring for RI utilization',\n 'Review and optimize instance sizing before purchasing RIs'\n ],\n tags: ['ec2', 'reserved-instances', 'cost-optimization']\n },\n {\n id: 'rec-002',\n type: 'RESOURCE_RIGHTSIZING',\n title: 'Rightsize RDS Instances',\n description: 'Several RDS instances show low CPU utilization. Downsizing these instances could reduce costs without impacting performance.',\n potentialSavings: {\n amount: 280.75,\n percentage: 25,\n timeframe: 'MONTHLY'\n },\n effort: 'MEDIUM',\n priority: 'MEDIUM',\n resources: ['mydb-instance-1', 'mydb-instance-2'],\n implementationSteps: [\n 'Review RDS CloudWatch metrics for CPU, memory, and I/O utilization',\n 'Create RDS snapshots before making changes',\n 'Modify instance class during maintenance window',\n 'Monitor performance after changes for 1 week'\n ],\n tags: ['rds', 'rightsizing', 'database-optimization']\n },\n {\n id: 'rec-003',\n type: 'ARCHITECTURE',\n title: 'Implement S3 Intelligent Tiering',\n description: 'Enable S3 Intelligent Tiering to automatically optimize storage costs based on access patterns.',\n potentialSavings: {\n amount: 125.50,\n percentage: 15,\n timeframe: 'MONTHLY'\n },\n effort: 'LOW',\n priority: 'MEDIUM',\n resources: ['s3-bucket-logs', 's3-bucket-backups'],\n implementationSteps: [\n 'Enable S3 Intelligent Tiering on identified buckets',\n 'Set up lifecycle policies for automatic transitions',\n 'Monitor cost impact over 3 months',\n 'Review and adjust policies based on access patterns'\n ],\n tags: ['s3', 'storage-optimization', 'intelligent-tiering']\n },\n {\n id: 'rec-004',\n type: 'COST_OPTIMIZATION',\n title: 'Optimize Lambda Memory Allocation',\n description: 'Lambda functions are over-provisioned with memory. Optimizing memory allocation can reduce costs significantly.',\n potentialSavings: {\n amount: 95.80,\n percentage: 20,\n timeframe: 'MONTHLY'\n },\n effort: 'HIGH',\n priority: 'LOW',\n resources: ['process-images-lambda', 'data-processor-lambda'],\n implementationSteps: [\n 'Use AWS Lambda Power Tuning tool to find optimal memory settings',\n 'Test performance with different memory allocations',\n 'Update Lambda configurations incrementally',\n 'Set up monitoring for execution duration and cost metrics'\n ],\n tags: ['lambda', 'serverless-optimization', 'memory-tuning']\n }\n ];\n }\n\n /**\n * Generate sample resource inventory\n */\n static generateResourceInventory(): ResourceInventory {\n return {\n provider: CloudProvider.AWS,\n region: 'us-east-1',\n totalResources: 145,\n resourcesByType: {\n [ResourceType.COMPUTE]: 35,\n [ResourceType.STORAGE]: 28,\n [ResourceType.DATABASE]: 12,\n [ResourceType.NETWORK]: 25,\n [ResourceType.SECURITY]: 18,\n [ResourceType.SERVERLESS]: 15,\n [ResourceType.CONTAINER]: 8,\n [ResourceType.ANALYTICS]: 4\n },\n totalCost: 3890.50,\n resources: {\n compute: [],\n storage: [],\n database: [],\n network: []\n },\n lastUpdated: new Date()\n };\n }\n\n /**\n * Generate cost anomalies for testing\n */\n static generateCostAnomalies() {\n return [\n {\n date: new Date(Date.now() - 2 * 24 * 60 * 60 * 1000).toISOString().substring(0, 10),\n actualCost: 5200.80,\n expectedCost: 3500.20,\n deviation: 48.6,\n severity: 'CRITICAL',\n description: 'Significant cost spike detected in EC2 Auto Scaling group due to unexpected traffic surge'\n },\n {\n date: new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString().substring(0, 10),\n actualCost: 2800.30,\n expectedCost: 3200.50,\n deviation: -12.5,\n severity: 'LOW',\n description: 'Lower than expected S3 costs due to successful data archiving policies'\n }\n ];\n }\n\n /**\n * Helper method to generate realistic service cost multipliers\n */\n private static getServiceMultiplier(serviceName: string): number {\n const multipliers: { [key: string]: number } = {\n 'Amazon EC2-Instance': 2.5,\n 'Amazon RDS': 1.8,\n 'Amazon S3': 1.0,\n 'AWS Lambda': 0.8,\n 'Amazon CloudFront': 0.6,\n 'Amazon EBS': 0.9,\n 'Amazon VPC': 0.3,\n 'Amazon Route 53': 0.2,\n 'AWS Application Load Balancer': 0.4,\n 'Amazon ElastiCache': 0.7,\n 'Amazon SES': 0.1,\n 'Amazon CloudWatch': 0.3,\n 'AWS Data Transfer': 0.5,\n 'Amazon DynamoDB': 0.6\n };\n\n return multipliers[serviceName] || 0.5;\n }\n}\n\nexport default DemoDataGenerator;","import puppeteer, { Browser, Page } from 'puppeteer';\nimport { writeFileSync, existsSync, mkdirSync } from 'fs';\nimport { join } from 'path';\nimport moment from 'moment';\nimport {\n CostBreakdown,\n CostTrendAnalysis,\n ResourceInventory,\n FinOpsRecommendation,\n AccountInfo,\n CloudProvider\n} from '../types/providers';\n\ninterface PDFExportOptions {\n outputPath?: string;\n filename?: string;\n includeCharts: boolean;\n includeSummary: boolean;\n includeDetails: boolean;\n includeRecommendations: boolean;\n format?: 'A4' | 'Letter';\n orientation?: 'portrait' | 'landscape';\n theme?: 'light' | 'dark';\n}\n\ninterface AuditReportData {\n accountInfo: AccountInfo;\n costBreakdown: CostBreakdown;\n trendAnalysis?: CostTrendAnalysis;\n resourceInventory?: ResourceInventory;\n recommendations?: FinOpsRecommendation[];\n anomalies?: Array<{\n date: string;\n actualCost: number;\n expectedCost: number;\n deviation: number;\n severity: string;\n description?: string;\n }>;\n generatedAt: Date;\n reportPeriod: {\n start: Date;\n end: Date;\n };\n}\n\nexport class PDFExporter {\n private browser: Browser | null = null;\n private options: PDFExportOptions;\n\n constructor(options: Partial<PDFExportOptions> = {}) {\n this.options = {\n outputPath: './reports',\n includeCharts: true,\n includeSummary: true,\n includeDetails: true,\n includeRecommendations: true,\n format: 'A4',\n orientation: 'portrait',\n theme: 'light',\n ...options\n };\n }\n\n /**\n * Generate comprehensive audit report PDF\n */\n async generateAuditReport(data: AuditReportData): Promise<string> {\n try {\n await this.initializeBrowser();\n\n const html = this.generateAuditHTML(data);\n const filename = this.options.filename ||\n `infra-cost-audit-${moment(data.generatedAt).format('YYYY-MM-DD-HHmm')}.pdf`;\n\n const outputPath = this.ensureOutputDirectory();\n const fullPath = join(outputPath, filename);\n\n const page = await this.browser!.newPage();\n await page.setContent(html, { waitUntil: 'networkidle0' });\n\n await page.pdf({\n path: fullPath,\n format: this.options.format,\n orientation: this.options.orientation,\n printBackground: true,\n margin: {\n top: '1in',\n bottom: '1in',\n left: '0.8in',\n right: '0.8in'\n },\n displayHeaderFooter: true,\n headerTemplate: this.generateHeaderTemplate(data.accountInfo),\n footerTemplate: this.generateFooterTemplate()\n });\n\n await page.close();\n await this.closeBrowser();\n\n return fullPath;\n } catch (error) {\n await this.closeBrowser();\n throw new Error(`PDF generation failed: ${error instanceof Error ? error.message : 'Unknown error'}`);\n }\n }\n\n /**\n * Generate cost trend report PDF\n */\n async generateTrendReport(\n accountInfo: AccountInfo,\n trendAnalysis: CostTrendAnalysis\n ): Promise<string> {\n const data: AuditReportData = {\n accountInfo,\n costBreakdown: {\n totals: {\n lastMonth: 0,\n thisMonth: 0,\n last7Days: 0,\n yesterday: 0\n },\n totalsByService: {\n lastMonth: {},\n thisMonth: {},\n last7Days: {},\n yesterday: {}\n }\n },\n trendAnalysis,\n generatedAt: new Date(),\n reportPeriod: {\n start: new Date(trendAnalysis.timeRange?.start || Date.now() - 6 * 30 * 24 * 60 * 60 * 1000),\n end: new Date(trendAnalysis.timeRange?.end || Date.now())\n }\n };\n\n return this.generateAuditReport(data);\n }\n\n /**\n * Generate executive summary PDF\n */\n async generateExecutiveSummary(data: AuditReportData): Promise<string> {\n this.options.includeDetails = false;\n this.options.includeCharts = true;\n this.options.includeSummary = true;\n this.options.includeRecommendations = true;\n\n const filename = `infra-cost-executive-summary-${moment(data.generatedAt).format('YYYY-MM-DD')}.pdf`;\n this.options.filename = filename;\n\n return this.generateAuditReport(data);\n }\n\n private generateAuditHTML(data: AuditReportData): string {\n const theme = this.getThemeStyles();\n\n return `\n <!DOCTYPE html>\n <html>\n <head>\n <meta charset=\"UTF-8\">\n <title>Infrastructure Cost Audit Report</title>\n <style>\n ${theme}\n ${this.getBaseStyles()}\n </style>\n </head>\n <body>\n <div class=\"report-container\">\n ${this.generateCoverPage(data)}\n ${this.options.includeSummary ? this.generateExecutiveSummary(data) : ''}\n ${this.generateCostBreakdownSection(data.costBreakdown)}\n ${data.trendAnalysis && this.options.includeCharts ? this.generateTrendAnalysisSection(data.trendAnalysis) : ''}\n ${data.resourceInventory && this.options.includeDetails ? this.generateResourceInventorySection(data.resourceInventory) : ''}\n ${data.anomalies && data.anomalies.length > 0 ? this.generateAnomaliesSection(data.anomalies) : ''}\n ${data.recommendations && this.options.includeRecommendations ? this.generateRecommendationsSection(data.recommendations) : ''}\n ${this.generateAppendixSection(data)}\n </div>\n </body>\n </html>`;\n }\n\n private generateCoverPage(data: AuditReportData): string {\n return `\n <div class=\"cover-page\">\n <div class=\"header\">\n <h1>Infrastructure Cost Analysis Report</h1>\n <div class=\"subtitle\">Comprehensive Cloud Cost Audit & Optimization</div>\n </div>\n\n <div class=\"account-info\">\n <h2>Account Information</h2>\n <div class=\"info-grid\">\n <div class=\"info-item\">\n <strong>Account ID:</strong> ${data.accountInfo.id}\n </div>\n <div class=\"info-item\">\n <strong>Account Name:</strong> ${data.accountInfo.name || 'N/A'}\n </div>\n <div class=\"info-item\">\n <strong>Cloud Provider:</strong> ${this.getProviderDisplayName(data.accountInfo.provider)}\n </div>\n <div class=\"info-item\">\n <strong>Report Generated:</strong> ${moment(data.generatedAt).format('MMMM Do YYYY, h:mm:ss a')}\n </div>\n <div class=\"info-item\">\n <strong>Report Period:</strong>\n ${moment(data.reportPeriod.start).format('MMM DD, YYYY')} -\n ${moment(data.reportPeriod.end).format('MMM DD, YYYY')}\n </div>\n </div>\n </div>\n\n <div class=\"cost-summary-card\">\n <h2>Cost Summary</h2>\n <div class=\"summary-grid\">\n <div class=\"summary-item\">\n <div class=\"amount\">${this.formatCurrency(data.costBreakdown.totals.thisMonth)}</div>\n <div class=\"label\">This Month</div>\n </div>\n <div class=\"summary-item\">\n <div class=\"amount\">${this.formatCurrency(data.costBreakdown.totals.lastMonth)}</div>\n <div class=\"label\">Last Month</div>\n </div>\n <div class=\"summary-item\">\n <div class=\"amount\">${this.formatCurrency(data.costBreakdown.totals.last7Days)}</div>\n <div class=\"label\">Last 7 Days</div>\n </div>\n <div class=\"summary-item\">\n <div class=\"amount\">${this.formatCurrency(data.costBreakdown.totals.yesterday)}</div>\n <div class=\"label\">Yesterday</div>\n </div>\n </div>\n </div>\n\n <div class=\"report-scope\">\n <h2>Report Scope</h2>\n <ul>\n ${this.options.includeSummary ? '<li>Executive Summary</li>' : ''}\n <li>Cost Breakdown Analysis</li>\n ${this.options.includeCharts ? '<li>Trend Analysis & Visualizations</li>' : ''}\n ${this.options.includeDetails ? '<li>Resource Inventory</li>' : ''}\n ${this.options.includeRecommendations ? '<li>Cost Optimization Recommendations</li>' : ''}\n </ul>\n </div>\n </div>\n <div class=\"page-break\"></div>`;\n }\n\n private generateExecutiveSummary(data: AuditReportData): string {\n const monthlyChange = this.calculatePercentageChange(\n data.costBreakdown.totals.thisMonth,\n data.costBreakdown.totals.lastMonth\n );\n\n const topServices = Object.entries(data.costBreakdown.totalsByService.thisMonth)\n .sort(([, a], [, b]) => b - a)\n .slice(0, 5);\n\n return `\n <div class=\"section\">\n <h1>Executive Summary</h1>\n\n <div class=\"executive-insights\">\n <div class=\"insight-card ${monthlyChange >= 0 ? 'warning' : 'success'}\">\n <h3>Monthly Cost Trend</h3>\n <p>Your cloud spending has ${monthlyChange >= 0 ? 'increased' : 'decreased'} by\n <strong>${Math.abs(monthlyChange).toFixed(1)}%</strong> compared to last month.</p>\n </div>\n\n <div class=\"insight-card info\">\n <h3>Top Cost Drivers</h3>\n <ul>\n ${topServices.map(([service, cost]) => `\n <li>${service}: ${this.formatCurrency(cost)}\n (${((cost / data.costBreakdown.totals.thisMonth) * 100).toFixed(1)}% of total)\n </li>\n `).join('')}\n </ul>\n </div>\n\n ${data.anomalies && data.anomalies.length > 0 ? `\n <div class=\"insight-card warning\">\n <h3>Cost Anomalies</h3>\n <p><strong>${data.anomalies.length}</strong> cost anomalies detected requiring attention.</p>\n </div>\n ` : ''}\n </div>\n\n <div class=\"key-metrics\">\n <h3>Key Performance Indicators</h3>\n <div class=\"metrics-grid\">\n <div class=\"metric\">\n <div class=\"metric-value\">${this.formatCurrency(data.costBreakdown.totals.thisMonth / moment().date())}</div>\n <div class=\"metric-label\">Avg Daily Spend</div>\n </div>\n <div class=\"metric\">\n <div class=\"metric-value\">${topServices.length}</div>\n <div class=\"metric-label\">Active Services</div>\n </div>\n <div class=\"metric\">\n <div class=\"metric-value\">${data.trendAnalysis?.projectedMonthlyCost ? this.formatCurrency(data.trendAnalysis.projectedMonthlyCost) : 'N/A'}</div>\n <div class=\"metric-label\">Projected Monthly</div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"page-break\"></div>`;\n }\n\n private generateCostBreakdownSection(costBreakdown: CostBreakdown): string {\n const serviceEntries = Object.entries(costBreakdown.totalsByService.thisMonth)\n .filter(([, cost]) => cost > 0)\n .sort(([, a], [, b]) => b - a);\n\n return `\n <div class=\"section\">\n <h1>Cost Breakdown Analysis</h1>\n\n <div class=\"cost-comparison\">\n <h3>Period Comparison</h3>\n <table class=\"data-table\">\n <thead>\n <tr>\n <th>Period</th>\n <th>Total Cost</th>\n <th>Change</th>\n <th>Trend</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>This Month</td>\n <td>${this.formatCurrency(costBreakdown.totals.thisMonth)}</td>\n <td>${this.formatChangePercentage(costBreakdown.totals.thisMonth, costBreakdown.totals.lastMonth)}</td>\n <td>${this.getTrendIcon(costBreakdown.totals.thisMonth, costBreakdown.totals.lastMonth)}</td>\n </tr>\n <tr>\n <td>Last Month</td>\n <td>${this.formatCurrency(costBreakdown.totals.lastMonth)}</td>\n <td>-</td>\n <td>-</td>\n </tr>\n <tr>\n <td>Last 7 Days</td>\n <td>${this.formatCurrency(costBreakdown.totals.last7Days)}</td>\n <td>${this.formatChangePercentage(costBreakdown.totals.last7Days, costBreakdown.totals.yesterday * 7)}</td>\n <td>${this.getTrendIcon(costBreakdown.totals.last7Days, costBreakdown.totals.yesterday * 7)}</td>\n </tr>\n <tr>\n <td>Yesterday</td>\n <td>${this.formatCurrency(costBreakdown.totals.yesterday)}</td>\n <td>-</td>\n <td>-</td>\n </tr>\n </tbody>\n </table>\n </div>\n\n <div class=\"service-breakdown\">\n <h3>Service-Level Breakdown (This Month)</h3>\n <table class=\"data-table\">\n <thead>\n <tr>\n <th>Service</th>\n <th>Cost</th>\n <th>Share</th>\n <th>vs Last Month</th>\n </tr>\n </thead>\n <tbody>\n ${serviceEntries.map(([service, cost]) => {\n const share = ((cost / costBreakdown.totals.thisMonth) * 100).toFixed(1);\n const lastMonthCost = costBreakdown.totalsByService.lastMonth[service] || 0;\n const change = this.formatChangePercentage(cost, lastMonthCost);\n\n return `\n <tr>\n <td>${service}</td>\n <td>${this.formatCurrency(cost)}</td>\n <td>${share}%</td>\n <td>${change}</td>\n </tr>\n `;\n }).join('')}\n </tbody>\n </table>\n </div>\n </div>\n <div class=\"page-break\"></div>`;\n }\n\n private generateTrendAnalysisSection(trendAnalysis: CostTrendAnalysis): string {\n return `\n <div class=\"section\">\n <h1>Trend Analysis</h1>\n\n <div class=\"trend-insights\">\n <div class=\"insight-grid\">\n <div class=\"insight-item\">\n <div class=\"insight-value\">${this.formatCurrency(trendAnalysis.totalCost)}</div>\n <div class=\"insight-label\">Total Period Cost</div>\n </div>\n <div class=\"insight-item\">\n <div class=\"insight-value\">${this.formatCurrency(trendAnalysis.averageDailyCost)}</div>\n <div class=\"insight-label\">Average Daily Cost</div>\n </div>\n <div class=\"insight-item\">\n <div class=\"insight-value\">${this.formatCurrency(trendAnalysis.projectedMonthlyCost)}</div>\n <div class=\"insight-label\">Projected Monthly</div>\n </div>\n <div class=\"insight-item\">\n <div class=\"insight-value\">${trendAnalysis.avgMonthOverMonthGrowth?.toFixed(1) || 'N/A'}%</div>\n <div class=\"insight-label\">Avg MoM Growth</div>\n </div>\n </div>\n </div>\n\n ${trendAnalysis.topServices ? `\n <div class=\"top-services\">\n <h3>Top Services by Cost</h3>\n <table class=\"data-table\">\n <thead>\n <tr>\n <th>Service</th>\n <th>Cost</th>\n <th>Share</th>\n <th>Trend</th>\n </tr>\n </thead>\n <tbody>\n ${trendAnalysis.topServices.map(service => `\n <tr>\n <td>${service.serviceName}</td>\n <td>${this.formatCurrency(service.cost)}</td>\n <td>${service.percentage.toFixed(1)}%</td>\n <td>${service.trend}</td>\n </tr>\n `).join('')}\n </tbody>\n </table>\n </div>\n ` : ''}\n\n ${trendAnalysis.analytics ? `\n <div class=\"analytics-insights\">\n <h3>Analytics Insights</h3>\n <ul>\n ${trendAnalysis.analytics.insights.map(insight => `<li>${insight}</li>`).join('')}\n </ul>\n\n <div class=\"analytics-metrics\">\n <div class=\"metric-row\">\n <span>Volatility Score:</span>\n <span class=\"metric-value\">${trendAnalysis.analytics.volatilityScore.toFixed(2)}</span>\n </div>\n <div class=\"metric-row\">\n <span>Trend Strength:</span>\n <span class=\"metric-value\">${trendAnalysis.analytics.trendStrength.toFixed(2)}</span>\n </div>\n </div>\n </div>\n ` : ''}\n </div>\n <div class=\"page-break\"></div>`;\n }\n\n private generateResourceInventorySection(inventory: ResourceInventory): string {\n return `\n <div class=\"section\">\n <h1>Resource Inventory</h1>\n\n <div class=\"inventory-summary\">\n <div class=\"summary-stats\">\n <div class=\"stat\">\n <div class=\"stat-value\">${inventory.totalResources}</div>\n <div class=\"stat-label\">Total Resources</div>\n </div>\n <div class=\"stat\">\n <div class=\"stat-value\">${this.formatCurrency(inventory.totalCost)}</div>\n <div class=\"stat-label\">Total Cost</div>\n </div>\n <div class=\"stat\">\n <div class=\"stat-value\">${inventory.region}</div>\n <div class=\"stat-label\">Primary Region</div>\n </div>\n </div>\n </div>\n\n <div class=\"resource-breakdown\">\n <h3>Resources by Type</h3>\n <table class=\"data-table\">\n <thead>\n <tr>\n <th>Resource Type</th>\n <th>Count</th>\n <th>Percentage</th>\n </tr>\n </thead>\n <tbody>\n ${Object.entries(inventory.resourcesByType).map(([type, count]) => `\n <tr>\n <td>${type.charAt(0).toUpperCase() + type.slice(1)}</td>\n <td>${count}</td>\n <td>${((count / inventory.totalResources) * 100).toFixed(1)}%</td>\n </tr>\n `).join('')}\n </tbody>\n </table>\n </div>\n </div>\n <div class=\"page-break\"></div>`;\n }\n\n private generateAnomaliesSection(anomalies: Array<{\n date: string;\n actualCost: number;\n expectedCost: number;\n deviation: number;\n severity: string;\n description?: string;\n }>): string {\n return `\n <div class=\"section\">\n <h1>Cost Anomalies</h1>\n\n <div class=\"anomalies-overview\">\n <p class=\"overview-text\">\n <strong>${anomalies.length}</strong> cost anomalies have been detected during the report period.\n These represent significant deviations from expected spending patterns and require investigation.\n </p>\n </div>\n\n <div class=\"anomalies-list\">\n ${anomalies.map(anomaly => `\n <div class=\"anomaly-card severity-${anomaly.severity.toLowerCase()}\">\n <div class=\"anomaly-header\">\n <h4>${moment(anomaly.date).format('MMMM DD, YYYY')}</h4>\n <span class=\"severity-badge ${anomaly.severity.toLowerCase()}\">${anomaly.severity}</span>\n </div>\n <div class=\"anomaly-details\">\n <div class=\"detail-row\">\n <span>Expected Cost:</span>\n <span>${this.formatCurrency(anomaly.expectedCost)}</span>\n </div>\n <div class=\"detail-row\">\n <span>Actual Cost:</span>\n <span>${this.formatCurrency(anomaly.actualCost)}</span>\n </div>\n <div class=\"detail-row\">\n <span>Deviation:</span>\n <span class=\"${anomaly.deviation > 0 ? 'increase' : 'decrease'}\">\n ${anomaly.deviation > 0 ? '+' : ''}${anomaly.deviation.toFixed(1)}%\n </span>\n </div>\n ${anomaly.description ? `\n <div class=\"anomaly-description\">\n <p>${anomaly.description}</p>\n </div>\n ` : ''}\n </div>\n </div>\n `).join('')}\n </div>\n </div>\n <div class=\"page-break\"></div>`;\n }\n\n private generateRecommendationsSection(recommendations: FinOpsRecommendation[]): string {\n const totalPotentialSavings = recommendations.reduce((sum, rec) => sum + rec.potentialSavings.amount, 0);\n\n return `\n <div class=\"section\">\n <h1>Cost Optimization Recommendations</h1>\n\n <div class=\"recommendations-overview\">\n <div class=\"savings-potential\">\n <h3>Potential Savings: ${this.formatCurrency(totalPotentialSavings)}</h3>\n <p>${recommendations.length} optimization opportunities identified</p>\n </div>\n </div>\n\n <div class=\"recommendations-list\">\n ${recommendations.map(rec => `\n <div class=\"recommendation-card priority-${rec.priority.toLowerCase()}\">\n <div class=\"recommendation-header\">\n <h4>${rec.title}</h4>\n <div class=\"recommendation-meta\">\n <span class=\"priority-badge ${rec.priority.toLowerCase()}\">${rec.priority}</span>\n <span class=\"effort-badge effort-${rec.effort.toLowerCase()}\">${rec.effort} Effort</span>\n </div>\n </div>\n\n <div class=\"recommendation-body\">\n <p>${rec.description}</p>\n\n <div class=\"savings-info\">\n <div class=\"savings-amount\">\n Potential Savings: <strong>${this.formatCurrency(rec.potentialSavings.amount)}</strong>\n <span class=\"timeframe\">(${rec.potentialSavings.timeframe.toLowerCase()})</span>\n </div>\n <div class=\"savings-percentage\">\n ${rec.potentialSavings.percentage.toFixed(1)}% reduction\n </div>\n </div>\n\n ${rec.implementationSteps.length > 0 ? `\n <div class=\"implementation-steps\">\n <h5>Implementation Steps:</h5>\n <ol>\n ${rec.implementationSteps.map(step => `<li>${step}</li>`).join('')}\n </ol>\n </div>\n ` : ''}\n\n ${rec.resources && rec.resources.length > 0 ? `\n <div class=\"affected-resources\">\n <h5>Affected Resources:</h5>\n <ul>\n ${rec.resources.map(resource => `<li>${resource}</li>`).join('')}\n </ul>\n </div>\n ` : ''}\n\n ${rec.tags.length > 0 ? `\n <div class=\"recommendation-tags\">\n ${rec.tags.map(tag => `<span class=\"tag\">${tag}</span>`).join('')}\n </div>\n ` : ''}\n </div>\n </div>\n `).join('')}\n </div>\n </div>\n <div class=\"page-break\"></div>`;\n }\n\n private generateAppendixSection(data: AuditReportData): string {\n return `\n <div class=\"section\">\n <h1>Appendix</h1>\n\n <div class=\"report-metadata\">\n <h3>Report Generation Details</h3>\n <table class=\"metadata-table\">\n <tr>\n <td>Report Generated:</td>\n <td>${moment(data.generatedAt).format('MMMM Do YYYY, h:mm:ss a')}</td>\n </tr>\n <tr>\n <td>Tool Version:</td>\n <td>infra-cost v0.1.0</td>\n </tr>\n <tr>\n <td>Report Type:</td>\n <td>Comprehensive Audit Report</td>\n </tr>\n <tr>\n <td>Data Source:</td>\n <td>${this.getProviderDisplayName(data.accountInfo.provider)} Cost Explorer API</td>\n </tr>\n <tr>\n <td>Analysis Period:</td>\n <td>${moment(data.reportPeriod.start).format('MMM DD, YYYY')} - ${moment(data.reportPeriod.end).format('MMM DD, YYYY')}</td>\n </tr>\n </table>\n </div>\n\n <div class=\"methodology\">\n <h3>Methodology</h3>\n <ul>\n <li>Cost data retrieved from cloud provider's native billing APIs</li>\n <li>Trend analysis based on historical spending patterns</li>\n <li>Anomaly detection using statistical analysis and machine learning algorithms</li>\n <li>Recommendations generated based on FinOps best practices and usage patterns</li>\n <li>All costs displayed in USD unless otherwise specified</li>\n </ul>\n </div>\n\n <div class=\"disclaimers\">\n <h3>Important Notes</h3>\n <ul>\n <li>Cost data is subject to cloud provider billing cycles and may include estimates</li>\n <li>Savings projections are estimates based on current usage patterns</li>\n <li>Implementation of recommendations should be carefully planned and tested</li>\n <li>This report is generated automatically and should be reviewed by qualified personnel</li>\n </ul>\n </div>\n </div>`;\n }\n\n // Helper methods and styles...\n private getThemeStyles(): string {\n if (this.options.theme === 'dark') {\n return `\n :root {\n --primary-color: #2563eb;\n --secondary-color: #64748b;\n --background-color: #1e293b;\n --text-color: #f8fafc;\n --border-color: #374151;\n --success-color: #10b981;\n --warning-color: #f59e0b;\n --danger-color: #ef4444;\n --card-background: #334155;\n }\n `;\n }\n\n return `\n :root {\n --primary-color: #2563eb;\n --secondary-color: #64748b;\n --background-color: #ffffff;\n --text-color: #1f2937;\n --border-color: #e5e7eb;\n --success-color: #10b981;\n --warning-color: #f59e0b;\n --danger-color: #ef4444;\n --card-background: #f9fafb;\n }\n `;\n }\n\n private getBaseStyles(): string {\n return `\n body {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n line-height: 1.6;\n color: var(--text-color);\n background-color: var(--background-color);\n margin: 0;\n padding: 0;\n }\n\n .report-container {\n max-width: 100%;\n margin: 0 auto;\n }\n\n .page-break {\n page-break-before: always;\n }\n\n .cover-page {\n text-align: center;\n padding: 2rem;\n min-height: 80vh;\n display: flex;\n flex-direction: column;\n justify-content: center;\n }\n\n .header h1 {\n font-size: 2.5rem;\n color: var(--primary-color);\n margin-bottom: 0.5rem;\n }\n\n .subtitle {\n font-size: 1.2rem;\n color: var(--secondary-color);\n margin-bottom: 3rem;\n }\n\n .section {\n padding: 2rem;\n margin-bottom: 2rem;\n }\n\n .section h1 {\n color: var(--primary-color);\n border-bottom: 2px solid var(--primary-color);\n padding-bottom: 0.5rem;\n margin-bottom: 2rem;\n }\n\n .data-table {\n width: 100%;\n border-collapse: collapse;\n margin: 1rem 0;\n }\n\n .data-table th,\n .data-table td {\n padding: 0.75rem;\n text-align: left;\n border-bottom: 1px solid var(--border-color);\n }\n\n .data-table th {\n background-color: var(--card-background);\n font-weight: 600;\n }\n\n .cost-summary-card {\n background: var(--card-background);\n border-radius: 8px;\n padding: 2rem;\n margin: 2rem 0;\n border: 1px solid var(--border-color);\n }\n\n .summary-grid {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n gap: 1rem;\n text-align: center;\n }\n\n .summary-item .amount {\n font-size: 1.5rem;\n font-weight: bold;\n color: var(--primary-color);\n }\n\n .summary-item .label {\n color: var(--secondary-color);\n font-size: 0.9rem;\n }\n\n .anomaly-card {\n border-left: 4px solid;\n padding: 1rem;\n margin: 1rem 0;\n background: var(--card-background);\n border-radius: 0 8px 8px 0;\n }\n\n .anomaly-card.severity-critical {\n border-left-color: var(--danger-color);\n }\n\n .anomaly-card.severity-high {\n border-left-color: #ff6b35;\n }\n\n .anomaly-card.severity-medium {\n border-left-color: var(--warning-color);\n }\n\n .anomaly-card.severity-low {\n border-left-color: #3b82f6;\n }\n\n .recommendation-card {\n border: 1px solid var(--border-color);\n border-radius: 8px;\n padding: 1.5rem;\n margin: 1rem 0;\n background: var(--card-background);\n }\n\n .priority-badge {\n padding: 0.25rem 0.5rem;\n border-radius: 4px;\n font-size: 0.75rem;\n font-weight: 600;\n text-transform: uppercase;\n }\n\n .priority-badge.critical {\n background-color: var(--danger-color);\n color: white;\n }\n\n .priority-badge.high {\n background-color: #ff6b35;\n color: white;\n }\n\n .priority-badge.medium {\n background-color: var(--warning-color);\n color: white;\n }\n\n .priority-badge.low {\n background-color: #3b82f6;\n color: white;\n }\n\n .trend-chart {\n font-family: monospace;\n background: var(--card-background);\n padding: 1rem;\n border-radius: 4px;\n margin: 1rem 0;\n }\n\n @media print {\n body { print-color-adjust: exact; }\n .page-break { page-break-before: always; }\n }\n `;\n }\n\n private generateHeaderTemplate(accountInfo: AccountInfo): string {\n return `\n <div style=\"font-size: 10px; color: #666; width: 100%; text-align: center; margin-top: 10px;\">\n Infrastructure Cost Report - ${accountInfo.name || accountInfo.id} - ${this.getProviderDisplayName(accountInfo.provider)}\n </div>`;\n }\n\n private generateFooterTemplate(): string {\n return `\n <div style=\"font-size: 10px; color: #666; width: 100%; text-align: center; margin-bottom: 10px;\">\n <div style=\"display: flex; justify-content: space-between; width: 100%; align-items: center;\">\n <span>Generated by infra-cost v0.1.0</span>\n <span>Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span></span>\n <span>${moment().format('YYYY-MM-DD HH:mm')}</span>\n </div>\n </div>`;\n }\n\n private async initializeBrowser(): Promise<void> {\n if (!this.browser) {\n this.browser = await puppeteer.launch({\n headless: true,\n args: ['--no-sandbox', '--disable-setuid-sandbox']\n });\n }\n }\n\n private async closeBrowser(): Promise<void> {\n if (this.browser) {\n await this.browser.close();\n this.browser = null;\n }\n }\n\n private ensureOutputDirectory(): string {\n const outputPath = this.options.outputPath!;\n\n if (!existsSync(outputPath)) {\n mkdirSync(outputPath, { recursive: true });\n }\n\n return outputPath;\n }\n\n private formatCurrency(amount: number): string {\n return new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: 2,\n maximumFractionDigits: 2\n }).format(amount);\n }\n\n private calculatePercentageChange(current: number, previous: number): number {\n if (previous === 0) return 0;\n return ((current - previous) / previous) * 100;\n }\n\n private formatChangePercentage(current: number, previous: number): string {\n const change = this.calculatePercentageChange(current, previous);\n const sign = change >= 0 ? '+' : '';\n return `${sign}${change.toFixed(1)}%`;\n }\n\n private getTrendIcon(current: number, previous: number): string {\n const change = this.calculatePercentageChange(current, previous);\n if (change > 5) return '↗️';\n if (change < -5) return '↘️';\n return '➡️';\n }\n\n private getProviderDisplayName(provider: CloudProvider): string {\n const displayNames = {\n [CloudProvider.AWS]: 'Amazon Web Services',\n [CloudProvider.GOOGLE_CLOUD]: 'Google Cloud Platform',\n [CloudProvider.AZURE]: 'Microsoft Azure',\n [CloudProvider.ALIBABA_CLOUD]: 'Alibaba Cloud',\n [CloudProvider.ORACLE_CLOUD]: 'Oracle Cloud Infrastructure'\n };\n\n return displayNames[provider] || provider;\n }\n}\n\nexport default PDFExporter;"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,IAAAA,gBAAkB;;;ACFlB,wBAAkB;AAClB,mBAAkB;AAClB,0BAAwB;AACxB,oBAAmB;AA4BZ,IAAM,mBAAN,MAAuB;AAAA,EAAvB;AACL,SAAQ,cAA4C;AAAA;AAAA;AAAA;AAAA;AAAA,EAKpD,YAAY,SAAwB,MAA0B;AAC5D,UAAM,QAAQ,IAAI,kBAAAC,QAAM;AAAA,MACtB,MAAM,QAAQ,IAAI,SAAO,aAAAC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