UNPKG

cdk-insights

Version:

AWS CDK security and cost analysis tool with AI-powered insights

71 lines (70 loc) 1.81 kB
import type { Issue, ServiceName } from '../../types/analysis.types'; export type OutputFormat = 'json' | 'table' | 'markdown' | 'summary'; export interface AnalyzeCommandArgs { stackName?: string; ci?: boolean; withIssue?: boolean; output?: string; all?: boolean; services?: ServiceName[]; format?: string; yes?: boolean; reset?: boolean; failOnCritical?: boolean; ruleFilter?: string[]; github?: boolean; redact?: boolean; summaryOnly?: boolean; synth?: boolean; noCache?: boolean; cache?: { enabled?: boolean; ttl?: number; maxSize?: number; }; } /** Project-level user configuration */ export interface UserConfig { failOnCritical?: boolean; stackName?: string; output?: OutputFormat; services?: ServiceName[]; redact?: boolean; withIssue?: boolean; summaryOnly?: boolean; synth?: boolean; ruleFilter?: string[]; noCache?: boolean; cache?: { enabled?: boolean; ttl?: number; maxSize?: number; }; [key: string]: unknown; } export interface AnalysisSuccess { status: 'success'; redactedId: string; resourceKey: string; remappedIssues: Issue[]; resourceName?: string; } export interface AnalysisTimeout { status: 'timeout'; redactedId: string; } export interface AnalysisFailure { status: 'fail'; redactedId: string; error: unknown; } export interface AnalysisSkipped { status: 'skipped'; redactedId: string; } export type ResourceAnalysisResult = AnalysisSuccess | AnalysisTimeout | AnalysisFailure | AnalysisSkipped; export interface ErrorHandlerParams { analysisError: unknown; redactedId: string; } export type ErrorHandler = (params: ErrorHandlerParams) => ResourceAnalysisResult;