import { T as ThresholdPreset, b as ThresholdOverride, c as ThresholdConfig, M as MatchFunctions, A as AnalyzeOptions, d as AnalysisResult, e as FunctionVerdict, W as Warning, B as BreakdownMode, f as ComplexityContributor } from './types-ZDtydC8W.js'; export { g as AnalysisSummary, h as ContributorKind, i as CoverageRatio, C as CrapScore, F as FunctionComplexity, a as FunctionCoverage, j as FunctionFilter, k as FunctionIdentity, l as MatchResult, m as RiskDistribution, R as RiskLevel, S as ScoredFunction, n as SourceSpan, U as UnmatchedFunction, o as WarningCode } from './types-ZDtydC8W.js'; import { C as ComplexityPort } from './complexity-port-CJWOvUhL.js'; import { C as CoveragePort } from './coverage-port-DTXJNDB0.js'; export { a as CoverageParseResult } from './coverage-port-DTXJNDB0.js'; import { z } from 'zod'; declare const PRESETS: Readonly>; interface ThresholdOptions { readonly preset?: ThresholdPreset | number; readonly overrides?: readonly ThresholdOverride[]; } declare function createThresholdConfig(options?: ThresholdOptions): ThresholdConfig; type GlobMatcher = (path: string, glob: string) => boolean; declare function resolveThreshold(config: ThresholdConfig, filePath: string, matcher: GlobMatcher): number; interface AnalyzeDeps { complexityPort: ComplexityPort; coveragePort: CoveragePort; matcher: MatchFunctions; globMatcher: GlobMatcher; readFile: (path: string) => Promise; readJson: (path: string) => Promise; findFiles: (patterns: string[], options: { cwd: string; exclude: string[]; }) => Promise; } declare function analyze(options?: AnalyzeOptions, deps?: AnalyzeDeps): Promise; interface AnalyzeFileOptions { coverage?: string; threshold?: number; coverageMetric?: "line" | "branch"; cwd?: string; } interface AnalyzeFileResult { readonly verdicts: ReadonlyArray; readonly warnings: ReadonlyArray; } /** * Analyze a single file and return verdicts for every function found. * * - Reads the file and extracts cyclomatic complexity via the complexity adapter. * - If a `coverage` path is provided, parses it and matches functions. * - If no coverage data is available, scores every function at 0% (worst case). * - Applies the optional `threshold` (defaults to PRESETS.default). */ declare function analyzeFile(filePath: string, options?: AnalyzeFileOptions, deps?: AnalyzeDeps): Promise; declare const configSchema: z.ZodObject<{ threshold: z.ZodOptional; coverageMetric: z.ZodOptional>; include: z.ZodOptional>; exclude: z.ZodOptional>; thresholds: z.ZodOptional>; format: z.ZodOptional>; src: z.ZodOptional]>>; breakdown: z.ZodOptional>; sort: z.ZodOptional>; top: z.ZodOptional; summary: z.ZodOptional; }, "strip", z.ZodTypeAny, { sort?: "coverage" | "complexity" | "crap" | "name" | undefined; summary?: boolean | undefined; threshold?: number | undefined; coverageMetric?: "line" | "branch" | undefined; include?: string[] | undefined; exclude?: string[] | undefined; thresholds?: Record | undefined; format?: "table" | "json" | "markdown" | undefined; src?: string | string[] | undefined; breakdown?: "all" | "exceeding" | "off" | undefined; top?: number | undefined; }, { sort?: "coverage" | "complexity" | "crap" | "name" | undefined; summary?: boolean | undefined; threshold?: number | undefined; coverageMetric?: "line" | "branch" | undefined; include?: string[] | undefined; exclude?: string[] | undefined; thresholds?: Record | undefined; format?: "table" | "json" | "markdown" | undefined; src?: string | string[] | undefined; breakdown?: "all" | "exceeding" | "off" | undefined; top?: number | undefined; }>; type Crap4tsConfig = z.infer; declare function defineConfig(config: Crap4tsConfig): Crap4tsConfig; declare function createDefaultDeps(cwd?: string): AnalyzeDeps; declare function selectContributors(verdict: FunctionVerdict, mode: BreakdownMode): ReadonlyArray; declare function prepareForJsonOutput(result: AnalysisResult, breakdown: BreakdownMode): AnalysisResult; export { AnalysisResult, type AnalyzeDeps, type AnalyzeFileOptions, type AnalyzeFileResult, AnalyzeOptions, BreakdownMode, ComplexityContributor, ComplexityPort, CoveragePort, type Crap4tsConfig, FunctionVerdict, type GlobMatcher, MatchFunctions, PRESETS, ThresholdConfig, type ThresholdOptions, ThresholdOverride, ThresholdPreset, Warning, analyze, analyzeFile, createDefaultDeps, createThresholdConfig, defineConfig, prepareForJsonOutput, resolveThreshold, selectContributors };