standarbuild-detect 0.1.0

Detect project kind (Rust, Node, Bun, Deno, Python, Lua, C/C++) and scan polyglot monorepo workspaces
Documentation
//! Declarative list of the files [`detect_in_dir`](crate::detect_in_dir) looks
//! for. Exposed so callers (LSP servers, editor extensions, documentation
//! tools) can introspect *why* a kind was chosen without re-implementing the
//! table.

use crate::kind::ProjectKind;

pub struct SignalFile {
	pub name: &'static str,
	pub kind: ProjectKind,
}

pub const SIGNAL_FILES: &[SignalFile] = &[
	SignalFile { name: "Cargo.toml", kind: ProjectKind::Rust },
	SignalFile { name: "bun.lock", kind: ProjectKind::Bun },
	SignalFile { name: "bun.lockb", kind: ProjectKind::Bun },
	SignalFile { name: "bunfig.toml", kind: ProjectKind::Bun },
	SignalFile { name: "deno.json", kind: ProjectKind::Deno },
	SignalFile { name: "deno.jsonc", kind: ProjectKind::Deno },
	SignalFile { name: "deno.lock", kind: ProjectKind::Deno },
	SignalFile { name: "package.json", kind: ProjectKind::Node },
	SignalFile { name: "pyproject.toml", kind: ProjectKind::Python },
	SignalFile { name: "requirements.txt", kind: ProjectKind::Python },
	SignalFile { name: "setup.py", kind: ProjectKind::Python },
	SignalFile { name: "setup.cfg", kind: ProjectKind::Python },
	SignalFile { name: ".luarc.json", kind: ProjectKind::Lua },
	SignalFile { name: "CMakeLists.txt", kind: ProjectKind::Cpp },
];

pub fn signal_filenames() -> impl Iterator<Item = &'static str> {
	SIGNAL_FILES.iter().map(|s| s.name)
}