namespace Sdt.Config; public sealed class DevToolConfig { public string Name { get; init; } = "SDT Project"; public string Version { get; init; } = "0.1.0"; public List Targets { get; init; } = []; public List Env { get; init; } = []; public ToolchainConfig? Toolchains { get; init; } } public sealed class BuildTarget { public string Id { get; init; } = ""; public string Label { get; init; } = ""; public string Description { get; init; } = ""; public string Group { get; init; } = "General"; /// Executable name. Null = virtual aggregator (runs DependsOn only). public string? Command { get; init; } public List Args { get; init; } = []; /// Working directory relative to project root. public string WorkingDir { get; init; } = "."; public List DependsOn { get; init; } = []; } public sealed class EnvVarDef { public string Key { get; init; } = ""; public string Description { get; init; } = ""; [System.Text.Json.Serialization.JsonPropertyName("default")] public string DefaultValue { get; init; } = ""; /// If non-empty, shown as a dropdown. Otherwise free-text input. public List Options { get; init; } = []; } // ── Toolchain config ────────────────────────────────────────────────────────── public sealed class ToolchainConfig { public PythonToolchain? Python { get; init; } public NodeToolchain? Node { get; init; } } public sealed class PythonToolchain { /// Python executable (e.g. "python3.14", "python"). public string Executable { get; init; } = "python"; /// Windows-specific override (e.g. "py" when using the launcher). public string? WindowsExecutable { get; init; } /// Optional version flag to pass (e.g. "-3.14" for py launcher). public string? LauncherVersion { get; init; } /// Venv directory relative to project root. public string VenvDir { get; init; } = ".venv"; public List Profiles { get; init; } = []; /// Optional path to a pip wrapper script (relative to project root). public string? PipScript { get; init; } } public sealed class PythonProfile { public string Id { get; init; } = ""; public string Label { get; init; } = ""; public string RequirementsFile { get; init; } = ""; public string? ExtraIndexUrl { get; init; } public List PostInstallCommands { get; init; } = []; } public sealed class NodeToolchain { /// Package manager: "npm", "pnpm", or "yarn". public string PackageManager { get; init; } = "npm"; /// Working directory for the frontend (relative to project root). public string WorkingDir { get; init; } = "."; }