import type { Version } from '../../shared/types'; import type { PathVersionInfo } from '../plugins/types'; import type { ContentProvider } from './content-provider'; export declare class VersionsConfig { contentProvider: ContentProvider; private config; constructor(contentProvider: ContentProvider); get versionedFolders(): string[]; parsePath(relativePath: string): { versionFolderPath: string; filePathInVersion: string; versionName: string; } | null; /** * Goes through config and makes sure each folder has a default version set * By default, versions are sorted alphabetically and last one becomes default */ private setDefaultVersionsAndOrder; /** * Checks for nested versions and files in the root of versioned folder * @param allFiles relative paths of all files */ private validateVersionsStructure; /** * Read config and store it in the state and mark folder with hasVersionsConfig = true * to prevent versions list from being deducted automatically. * This means that if file strucutre has 3 versions, but config only specifies 2, the list will only have 2 * @param versionsFilePath path to versions.yaml */ private parseVersionsFile; /** * Reads and validates versions config. * TODO: takes ~200-400ms on tests/starter. Consider partial updates instead of rebuilding if this is becoming a bottleneck * @param allFilePaths */ collectVersionsConfig(allFilePaths: Set): void; getPageVersions(pagePath: string, suffix?: string): Version[] | undefined; getDefaultByPath(path: string): string | null | undefined; getVersionInfoByFsPath(path: string): PathVersionInfo | undefined; } //# sourceMappingURL=versions-config.d.ts.map