/** * Code Order — directory walker, size aggregation and metrics. * * Iterative (stack-based) traversal — never recurses so deep trees cannot blow * the call stack. Honors a hardcoded ignore list (node_modules, .git, dist…), * a hard cap on scanned files, and a max depth. * * The walker builds the full folder tree in one pass, aggregating size, * file/folder counts and max depth into each FolderNode as it unwinds. */ import type { AnalysisResult, FileNode, FolderNode, ProjectMetrics, TreeNode, Issue } from "./types.js"; /** Returns true for media/binary extensions that should not be flagged as oversized. */ declare function isBinaryExtension(ext: string): boolean; /** * Walk the directory tree under `root` and return the full folder tree plus * flat lists of every file/folder encountered (used for metrics + heuristics). */ export declare function walkTree(root: string): Promise<{ tree: FolderNode; allFiles: FileNode[]; allFolders: string[]; maxDepth: number; fileCount: number; }>; /** * Compute project-wide metrics from the flat file list. */ export declare function computeMetrics(allFiles: FileNode[], allFolders: string[], maxDepth: number): ProjectMetrics; /** How many top items to keep in ranked lists. Exposed for tests. */ export declare const TOP_N: 15; /** Exposed so heuristics.ts can use the same thresholds. */ export declare const HEURISTIC_LIMITS: { /** Stop scanning after this many files regardless of depth. */ readonly maxFiles: 50000; /** Maximum directory depth the walker descends into. */ readonly maxDepth: 20; /** A file larger than this (bytes) is flagged as oversized. */ readonly largeFileThreshold: 100000; /** A directory deeper than this is flagged as deep nesting. */ readonly deepNestingThreshold: 8; /** How many items to keep in "top N" lists. */ readonly topN: 15; }; export { isBinaryExtension }; /** Re-exported for the analyzer entry point. */ export type { AnalysisResult, Issue, TreeNode, FolderNode, FileNode }; //# sourceMappingURL=analyzer.d.ts.map