File size: 1,692 Bytes
fd8cdf5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import type { ProjectMetadata } from '../../types/dashboard.js';
/**
 * Represents a discovered source file with metadata.
 */
export interface FileEntry {
    /** Absolute path to the file */
    path: string;
    /** Path relative to the project root */
    relativePath: string;
    /** Category of the file based on its location and extension */
    category: 'code' | 'config' | 'docs' | 'infra' | 'data' | 'script' | 'markup';
    /** Detected programming language */
    language: string;
    /** Number of lines in the file */
    lineCount: number;
}
/**
 * Result of scanning a project directory.
 */
export interface ScanResult {
    /** All discovered source files */
    files: FileEntry[];
    /** Project metadata detected from manifest files (package.json, etc.) */
    metadata: ProjectMetadata;
}
/**
 * Default directories to exclude from scanning.
 */
export declare const DEFAULT_IGNORE_DIRS: string[];
/**
 * Default file patterns to exclude from scanning (binary, generated, lock files).
 */
export declare const DEFAULT_IGNORE_FILE_PATTERNS: string[];
/**
 * Detects project metadata from manifest files and scanned file entries.
 */
export declare function detectMetadata(projectRoot: string, files: FileEntry[]): ProjectMetadata;
/**
 * Scans a project directory for source files, excluding common non-source
 * directories and respecting ignore patterns.
 *
 * @param projectRoot - Absolute path to the project root directory
 * @param ignorePatterns - Additional glob patterns to exclude
 * @returns ScanResult with discovered files and detected project metadata
 */
export declare function scanProject(projectRoot: string, ignorePatterns?: string[]): ScanResult;