mod dependencies;
mod detector;
mod git_context;
pub use dependencies::{parse_cargo_toml, parse_package_json, parse_pyproject_toml};
pub use detector::{
analyze_project, analyze_project_with_options, detect_frameworks, detect_languages,
AnalyzeProjectOptions,
};
pub use git_context::extract_git_keywords;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
use std::path::PathBuf;
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct ProjectProfile {
pub languages: HashMap<String, LanguageInfo>,
pub dependencies: HashMap<String, Vec<DependencyInfo>>,
pub description: Option<String>,
pub keywords: Vec<String>,
pub git_keywords: Vec<String>,
pub frameworks: Vec<String>,
pub project_type: ProjectType,
pub root: PathBuf,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct LanguageInfo {
pub file_count: usize,
pub extensions: Vec<String>,
pub primary: bool,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DependencyInfo {
pub name: String,
pub version: Option<String>,
pub dev: bool,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq)]
pub enum ProjectType {
#[default]
Unknown,
Library,
Application,
Plugin,
Monorepo,
Service,
}