use std::path::PathBuf;
#[derive(Debug, Clone, Default)]
pub struct AutoOptions {
pub roots: Vec<PathBuf>,
pub full_scan: bool,
pub scan_all: bool,
pub for_agent_feed: bool,
pub agent_json: bool,
pub suppress_duplicates: bool,
pub suppress_dynamic: bool,
}
#[derive(Debug, Clone, Default)]
pub struct ScanOptions {
pub roots: Vec<PathBuf>,
pub full_scan: bool,
pub scan_all: bool,
pub watch: bool,
pub replace: bool,
pub wait_seconds: Option<u64>,
pub wait_indefinite: bool,
}
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
pub enum WatchMode {
#[default]
Dev,
Bg,
Lsp,
Http,
Report,
}
#[derive(Debug, Clone, Default)]
pub struct WatchOptions {
pub roots: Vec<PathBuf>,
pub mode: WatchMode,
pub full_scan: bool,
pub scan_all: bool,
pub replace: bool,
pub wait_seconds: Option<u64>,
pub wait_indefinite: bool,
pub port: Option<u16>,
}
#[derive(Debug, Clone, Default)]
pub struct TreeOptions {
pub roots: Vec<PathBuf>,
pub depth: Option<usize>,
pub summary: Option<usize>,
pub summary_only: bool,
pub loc_threshold: Option<usize>,
pub show_hidden: bool,
pub find_artifacts: bool,
pub show_ignored: bool,
pub files_only: bool,
pub path_filter: Option<String>,
}
#[derive(Debug, Clone)]
pub struct SliceOptions {
pub target: String,
pub root: Option<PathBuf>,
pub consumers: bool,
pub depth: Option<usize>,
pub rescan: bool,
}
impl Default for SliceOptions {
fn default() -> Self {
Self {
target: String::new(),
root: None,
consumers: true,
depth: None,
rescan: false,
}
}
}
#[derive(Debug, Clone, Default)]
pub struct FindOptions {
pub query: Option<String>,
pub queries: Vec<String>,
pub or_mode: bool,
pub symbol: Option<String>,
pub file: Option<String>,
pub impact: Option<String>,
pub similar: Option<String>,
pub literal: bool,
pub regex: bool,
pub dead_only: bool,
pub exported_only: bool,
pub lang: Option<String>,
pub limit: Option<usize>,
pub offset: usize,
pub whole_token: bool,
pub group_by_file: bool,
pub count_only: bool,
pub where_symbol: bool,
}
#[derive(Debug, Clone, Default)]
pub struct OccurrencesOptions {
pub ident: String,
pub roots: Vec<PathBuf>,
pub whole_token: bool,
pub group_by_file: bool,
pub count_only: bool,
pub compact: bool,
pub offset: usize,
pub limit: Option<usize>,
}
#[derive(Debug, Clone, Default)]
pub struct FindingsOptions {
pub roots: Vec<PathBuf>,
pub summary: bool,
}
#[derive(Debug, Clone, Default)]
pub struct DeadOptions {
pub roots: Vec<PathBuf>,
pub confidence: Option<String>,
pub top: Option<usize>,
pub full: bool,
pub path_filter: Option<String>,
pub with_tests: bool,
pub with_helpers: bool,
pub with_shadows: bool,
pub with_ambient: bool,
pub with_dynamic: bool,
}
#[derive(Debug, Clone, Default)]
pub struct CyclesOptions {
pub roots: Vec<PathBuf>,
pub path_filter: Option<String>,
pub breaking_only: bool,
pub explain: bool,
pub legacy_format: bool,
pub include_artifacts: bool,
}
#[derive(Debug, Clone, Default)]
pub struct TraceOptions {
pub handler: String,
pub roots: Vec<PathBuf>,
}
#[derive(Debug, Clone, Default)]
pub struct CommandsOptions {
pub roots: Vec<PathBuf>,
pub name_filter: Option<String>,
pub missing_only: bool,
pub unused_only: bool,
pub suppress_duplicates: bool,
pub suppress_dynamic: bool,
pub limit: Option<usize>,
}
#[derive(Debug, Clone, Default)]
pub struct CoverageOptions {
pub roots: Vec<PathBuf>,
pub handlers_only: bool,
pub events_only: bool,
pub min_severity: Option<String>,
pub tests: bool,
pub gaps: bool,
pub include_artifacts: bool,
}
#[derive(Debug, Clone, Default)]
pub struct RepoViewOptions {
pub project: Option<PathBuf>,
}
#[derive(Debug, Clone)]
pub struct FollowOptions {
pub scope: String,
pub handler: Option<String>,
pub limit: Option<usize>,
pub roots: Vec<PathBuf>,
}
impl Default for FollowOptions {
fn default() -> Self {
Self {
scope: "all".to_string(),
handler: None,
limit: None,
roots: Vec::new(),
}
}
}
#[derive(Debug, Clone, Default)]
pub struct RoutesOptions {
pub roots: Vec<PathBuf>,
pub framework: Option<String>,
pub path_filter: Option<String>,
}
#[derive(Debug, Clone, Default)]
pub struct EventsOptions {
pub roots: Vec<PathBuf>,
pub ghost: bool,
pub orphan: bool,
pub races: bool,
pub fe_sync: bool,
pub suppress_duplicates: bool,
pub suppress_dynamic: bool,
pub include_artifacts: bool,
}
#[derive(Debug, Clone, Default)]
pub struct PipelinesOptions {
pub roots: Vec<PathBuf>,
}
#[derive(Debug, Clone, Default)]
pub struct InsightsOptions {
pub roots: Vec<PathBuf>,
}
#[derive(Debug, Clone, Default)]
pub struct ManifestsOptions {
pub roots: Vec<PathBuf>,
}
#[derive(Debug, Clone, Default)]
pub struct InfoOptions {
pub root: Option<PathBuf>,
}
#[derive(Debug, Clone, Default)]
pub struct LintOptions {
pub roots: Vec<PathBuf>,
pub entrypoints: bool,
pub fail: bool,
pub sarif: bool,
pub tauri: bool,
pub deep: bool,
pub ts: bool,
pub react: bool,
pub memory: bool,
pub suppress_duplicates: bool,
pub suppress_dynamic: bool,
}
#[derive(Debug, Clone, Default)]
pub struct ReportOptions {
pub roots: Vec<PathBuf>,
pub output: Option<PathBuf>,
pub serve: bool,
pub port: Option<u16>,
pub editor: Option<String>,
}
#[derive(Debug, Clone)]
pub struct PrismOptions {
pub tasks: Vec<String>,
pub project: Option<PathBuf>,
pub aicx_project_override: Option<String>,
pub with_aicx: bool,
pub no_aicx: bool,
pub json: bool,
pub limit: usize,
}
impl Default for PrismOptions {
fn default() -> Self {
Self {
tasks: Vec::new(),
project: None,
aicx_project_override: None,
with_aicx: true,
no_aicx: false,
json: false,
limit: 8,
}
}
}
#[derive(Debug, Clone, Default)]
pub struct DiffOptions {
pub since: Option<String>,
pub to: Option<String>,
pub jsonl: bool,
pub changed_files: bool,
pub problems_only: bool,
pub auto_scan_base: bool,
pub include_artifacts: bool,
}
#[derive(Debug, Clone, Default)]
pub struct CrowdOptions {
pub pattern: Option<String>,
pub roots: Vec<PathBuf>,
pub auto_detect: bool,
pub min_size: Option<usize>,
pub limit: Option<usize>,
pub include_tests: bool,
}
#[derive(Debug, Clone, Default)]
pub struct TagmapOptions {
pub keyword: String,
pub roots: Vec<PathBuf>,
pub include_tests: bool,
pub limit: Option<usize>,
}
#[derive(Debug, Clone, Default)]
pub struct TwinsOptions {
pub path: Option<PathBuf>,
pub dead_only: bool,
pub include_suppressed: bool,
pub include_tests: bool,
pub ignore_conventions: bool,
}
#[derive(Debug, Clone, Default)]
pub struct SuppressionsOptions {
pub root: Option<PathBuf>,
pub kinds: Vec<String>,
pub summary: bool,
pub json: bool,
pub include_fixtures: bool,
}
#[derive(Debug, Clone, Default)]
pub struct SuppressOptions {
pub path: Option<PathBuf>,
pub suppression_type: Option<String>,
pub symbol: Option<String>,
pub file: Option<String>,
pub reason: Option<String>,
pub list: bool,
pub clear: bool,
pub remove: bool,
}
#[derive(Debug, Clone, Default)]
pub struct DistOptions {
pub source_maps: Vec<PathBuf>,
pub src: Option<PathBuf>,
pub report_path: Option<PathBuf>,
}
#[derive(Debug, Clone, Default)]
pub struct SniffOptions {
pub path: Option<PathBuf>,
pub dead_only: bool,
pub twins_only: bool,
pub crowds_only: bool,
pub include_tests: bool,
pub min_crowd_size: Option<usize>,
}
#[derive(Debug, Clone, Default)]
pub struct JqQueryOptions {
pub filter: String,
pub raw_output: bool,
pub compact_output: bool,
pub exit_status: bool,
pub string_args: Vec<(String, String)>,
pub json_args: Vec<(String, String)>,
pub snapshot_path: Option<PathBuf>,
}
#[derive(Debug, Clone, Default)]
pub struct ImpactCommandOptions {
pub target: String,
pub depth: Option<usize>,
pub root: Option<PathBuf>,
}
#[derive(Debug, Clone)]
pub struct FocusOptions {
pub target: String,
pub root: Option<PathBuf>,
pub consumers: bool,
pub depth: Option<usize>,
pub json: bool,
pub markdown: bool,
}
impl Default for FocusOptions {
fn default() -> Self {
Self {
target: String::new(),
root: None,
consumers: true,
depth: None,
json: false,
markdown: false,
}
}
}
#[derive(Debug, Clone, Default)]
pub struct HotspotsOptions {
pub root: Option<PathBuf>,
pub min_imports: Option<usize>,
pub limit: Option<usize>,
pub leaves_only: bool,
pub coupling: bool,
}
#[derive(Debug, Clone, Default)]
pub struct LayoutmapOptions {
pub root: Option<PathBuf>,
pub zindex_only: bool,
pub sticky_only: bool,
pub grid_only: bool,
pub min_zindex: Option<i32>,
pub exclude: Vec<String>,
}
#[derive(Debug, Clone, Default)]
pub struct ZombieOptions {
pub roots: Vec<PathBuf>,
pub include_tests: bool,
}
#[derive(Debug, Clone, Default)]
pub struct HealthOptions {
pub roots: Vec<PathBuf>,
pub include_tests: bool,
}
#[derive(Debug, Clone, Default)]
pub struct AuditOptions {
pub roots: Vec<PathBuf>,
pub include_tests: bool,
pub todos: bool,
pub limit: Option<usize>,
pub no_open: bool,
}
#[derive(Debug, Clone, Default)]
pub struct DoctorOptions {
pub cache: bool,
pub scope: bool,
pub list: bool,
pub json: bool,
pub fix: bool,
pub yes: bool,
pub project: Option<PathBuf>,
pub roots: Vec<PathBuf>,
pub include_tests: bool,
pub apply_suppressions: bool,
}
#[derive(Debug, Clone, Default)]
pub struct PlanOptions {
pub roots: Vec<PathBuf>,
pub target_layout: Option<String>,
pub markdown: bool,
pub json: bool,
pub script: bool,
pub all: bool,
pub min_coupling: Option<f64>,
pub max_module_size: Option<usize>,
pub include_tests: bool,
pub output: Option<PathBuf>,
pub no_open: bool,
}
#[derive(Debug, Clone, Default)]
pub struct HelpOptions {
pub command: Option<String>,
pub legacy: bool,
pub full: bool,
}
#[derive(Debug, Clone)]
pub enum CacheAction {
List,
Clean {
project: Option<PathBuf>,
older_than: Option<String>,
max_size: Option<String>,
force: bool,
},
}
#[derive(Debug, Clone)]
pub struct CacheOptions {
pub action: CacheAction,
}
#[derive(Debug, Clone, Default)]
pub struct EnvTruthOptions {
pub roots: Vec<PathBuf>,
pub restricted_paths: Vec<PathBuf>,
pub json: bool,
pub markdown: bool,
pub name: Option<String>,
pub include_orphans: bool,
pub no_orphans: bool,
pub stale_threshold_days: Option<u32>,
pub fail_on: Vec<String>,
pub all: bool,
pub show_hashes: bool,
}
#[derive(Debug, Clone)]
pub enum QueryKind {
WhoImports,
WhereSymbol,
ComponentOf,
SwiftTypes,
}
#[derive(Debug, Clone)]
pub struct QueryOptions {
pub kind: QueryKind,
pub target: String,
}
#[derive(Debug, Clone)]
pub struct BodyOptions {
pub symbol: String,
pub line_cap: Option<usize>,
}
#[derive(Debug, Clone)]
pub struct PruneOldArtifactsOptions {
pub root: Option<PathBuf>,
pub keep: usize,
pub include_sub: bool,
pub apply: bool,
}
impl Default for PruneOldArtifactsOptions {
fn default() -> Self {
Self {
root: None,
keep: 3,
include_sub: false,
apply: false,
}
}
}