/** * Public API for VersionGuard. * * @packageDocumentation * @public */ import { type DoctorReport, type FullValidationResult, type ValidateMode, type ValidationResult, type VersionGuardConfig } from './types'; export { type CkmEngine, type CkmManifest, createCkmEngine } from 'ckm-sdk'; export * as calver from './calver'; export { type ChangelogStructureOptions, fixChangesetMangling, isChangesetMangled, validateChangelog, } from './changelog'; export { getConfig, initConfig } from './config'; export * from './feedback'; export * from './fix'; export * from './github'; export * from './guard'; export { areHooksInstalled, installHooks, uninstallHooks } from './hooks'; export { getPackageVersion, getVersionSource } from './project'; export { findProjectRoot, formatNotProjectError } from './project-root'; export { checkPublishStatus, REGISTRY_TABLE, readPackageName } from './publish'; export * as semver from './semver'; export * from './sources'; export { checkHardcodedVersions, scanRepoForVersions, syncVersion } from './sync'; export * from './tag'; export * from './types'; /** * Validates a version string against the active versioning strategy. * * @public * @since 0.1.0 * @remarks * This helper dispatches to SemVer or CalVer validation based on * `config.versioning.type`. * * @param version - Version string to validate. * @param config - VersionGuard configuration that selects the validation rules. * @returns The validation result for the provided version. * @example * ```ts * import { getDefaultConfig, validateVersion } from 'versionguard'; * * const result = validateVersion('1.2.3', getDefaultConfig()); * ``` */ export declare function validateVersion(version: string, config: VersionGuardConfig): ValidationResult; /** * Validates the current project state against the supplied configuration. * * @public * @since 0.1.0 * @remarks * Runs version, sync, changelog, scan, guard, and publish checks based on * the validation mode. Full mode (default) runs all checks. Lightweight * mode (for pre-commit hooks) runs only version + sync. * * @param config - VersionGuard configuration to apply. * @param cwd - Project directory to inspect. * @param mode - Validation mode: 'full' (default) or 'lightweight'. * @returns A full validation report for the project rooted at `cwd`. * @example * ```ts * import { getDefaultConfig, validate } from 'versionguard'; * * const result = await validate(getDefaultConfig(), process.cwd()); * ``` */ export declare function validate(config: VersionGuardConfig, cwd?: string, mode?: ValidateMode): Promise; /** * Runs an extended readiness check for a project. * * @public * @since 0.1.0 * @remarks * In addition to `validate`, this inspects Git state so callers can determine * whether hooks are installed and the worktree is clean. * * @param config - VersionGuard configuration to apply. * @param cwd - Project directory to inspect. * @returns A readiness report that includes validation and Git diagnostics. * @example * ```ts * import { doctor, getDefaultConfig } from 'versionguard'; * * const report = doctor(getDefaultConfig(), process.cwd()); * ``` */ export declare function doctor(config: VersionGuardConfig, cwd?: string): Promise; /** * Synchronizes configured files to the current package version. * * @public * @since 0.1.0 * @remarks * This reads the version from `package.json` and rewrites configured files * using the sync patterns defined in the VersionGuard config. * * @param config - VersionGuard configuration containing sync rules. * @param cwd - Project directory whose files should be synchronized. * @example * ```ts * import { getDefaultConfig, sync } from 'versionguard'; * * sync(getDefaultConfig(), process.cwd()); * ``` */ export declare function sync(config: VersionGuardConfig, cwd?: string): void; /** * Determines whether a project can move from one version to another. * * @public * @since 0.1.0 * @remarks * Both the current and proposed versions must validate against the configured * versioning scheme, and the new version must compare greater than the current * version. * * @param currentVersion - Version currently in use. * @param newVersion - Proposed next version. * @param config - VersionGuard configuration that defines version rules. * @returns An object indicating whether the bump is allowed and why it failed. * @example * ```ts * import { canBump, getDefaultConfig } from 'versionguard'; * * const result = canBump('1.2.3', '1.3.0', getDefaultConfig()); * ``` */ export declare function canBump(currentVersion: string, newVersion: string, config: VersionGuardConfig): { canBump: boolean; error?: string; }; //# sourceMappingURL=index.d.ts.map