/** * TOML-based version source provider for Cargo.toml and pyproject.toml. * * @packageDocumentation */ import type { VersionSourceProvider } from './provider'; /** * Reads and writes version strings from TOML manifest files. * * @remarks * Uses targeted regex replacement for writes to preserve file formatting, * comments, and whitespace. Supports standard section headers, dotted keys, * and inline table syntax. * * @public * @since 0.3.0 */ export declare class TomlVersionSource implements VersionSourceProvider { /** Human-readable provider name. */ readonly name: string; /** Filename of the TOML manifest (e.g. `'Cargo.toml'`). */ readonly manifestFile: string; /** Dotted key path to the version field within the TOML document. */ private readonly versionPath; /** * Creates a new TOML version source. * * @param manifestFile - TOML manifest filename. * @param versionPath - Dotted key path to the version field. */ constructor(manifestFile?: string, versionPath?: string); /** * Returns `true` when the manifest file exists in `cwd`. * * @param cwd - Project directory to check. * @returns Whether the manifest file exists. */ exists(cwd: string): boolean; /** * Reads the version string from the TOML manifest. * * @param cwd - Project directory containing the manifest. * @returns The version string extracted from the manifest. */ getVersion(cwd: string): string; /** * Writes a version string to the TOML manifest, preserving formatting. * * @param version - Version string to write. * @param cwd - Project directory containing the manifest. */ setVersion(version: string, cwd: string): void; /** * Splits the dotted version path into a TOML section name and key name. * * @returns An object with `section` and `key` components. */ private getSectionKey; } //# sourceMappingURL=toml.d.ts.map