UNPKG

cdk-insights

Version:

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

58 lines (57 loc) 1.56 kB
import type { Issue, ServiceName } from '../../types/analysis.types'; export type OutputFormat = 'json' | 'table' | 'markdown' | 'summary'; export interface AnalyzeCommandArgs { stackName?: string; output: OutputFormat; format: OutputFormat; withIssue: boolean; failOnCritical?: boolean; ci?: boolean; all?: boolean; services?: ServiceName[]; redact?: boolean; yes?: boolean; reset?: boolean; summaryOnly?: boolean; synth?: boolean; ruleFilter?: string[]; } /** 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[]; [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;