import { ProjectType } from '../../models'; /** * Type evidence for detection. */ interface TypeEvidence { /** Evidence factor */ factor: string; /** Confidence contribution */ confidence: number; /** Description */ description: string; } /** * Project type detection result. */ interface ProjectTypeDetection { /** Primary project type */ type: ProjectType; /** Secondary types */ secondaryTypes: ProjectType[]; /** Detection confidence (0-100) */ confidence: number; /** Evidence collected */ evidence: TypeEvidence[]; } /** * Options for project type detection. */ interface DetectProjectTypeOptions { /** Skip technology detection (faster but less accurate) */ skipTechDetection?: boolean; } /** * Detect the type of a project based on its structure and configuration. * * Uses multiple heuristics including: * - Package name patterns * - Exports/main/module fields * - Binary (bin) field * - Entry point patterns * - Testing framework presence * - Directory structure * - Framework detection * - NX project type field * * @param projectPath - Project directory path * @param options - Detection options * @returns Project type detection result with confidence score * * @example Detecting project type * ```typescript * import { detectProjectType } from '@hyperfrontend/project-scope' * * const result = detectProjectType('./my-lib') * console.log(result.type) // 'library' | 'application' | 'e2e' | 'tool' | 'plugin' * console.log(result.confidence) // 85 * console.log(result.evidence) // [{ factor: 'exports', confidence: 20, ... }] * ``` */ declare function detectProjectType(projectPath: string, options?: DetectProjectTypeOptions): ProjectTypeDetection; export { detectProjectType }; export type { DetectProjectTypeOptions, ProjectTypeDetection, TypeEvidence };