import { PrefixIndexDefinition, PrefixIndexDepth } from "./utils/typs.js"; import { JSONSchema7 } from "./validator/Validator.js"; export type { SourceRecord, DirectRelation, ThroughRelation, Relation, } from "./types.js"; import type { Relation } from "./types.js"; /** * Supported content types. */ export type SourceType = string; /** * Configuration for a single source (as defined in user config). */ export interface SourceConfig { type: SourceType; pattern: string; schema: JSONSchema7; relations?: Record; index?: Record; customIndex?: Record; } /** * Internally resolved and enriched source configuration. */ export interface ResolvedSourceConfig { name: string; type: SourceType; pattern: string; schema: JSONSchema7; relations?: Record; indexes?: PrefixIndexDefinition; } /** * Resolves user-defined source configurations into a normalized internal format. */ export declare class SourceConfigResolver { private readonly sources; private cache; private indexConfigFactory; constructor(sources: Record); /** * Resolves all sources and returns the enriched configurations. */ resolveAll(): ResolvedSourceConfig[]; /** * Resolves a single source by name. * * @param sourceName - The name of the source. * @returns Resolved configuration. * @throws If the source does not exist. */ resolveOne(sourceName: string): ResolvedSourceConfig; /** * Determines whether a relation is a through (indirect) relation. */ isThroughRelation(rel: Relation): rel is import("./types.js").ThroughRelation; /** * Converts a list of slugs into full paths based on a glob pattern. */ static getSourcePathsBySlugs(pattern: string, slugs: string[]): string[]; /** * Converts a slug (with `--`) to a file path (`/`). */ static slugToPath(slug: string): string; /** * Converts a path (`/`) to a slug (with `--`). */ static pathToSlug(path: string): string; /** * Extracts the base directory from a glob pattern (up to the first wildcard). */ static extractBaseDir(globPath: string): string; /** * Resolves a logical file path from a glob source and a relative path. */ static resolveFilePath(sourceGlob: string, relativePath: string): string; /** * Extracts the slug from a full file path using the source glob. */ static getSlugFromPath(sourcePath: string, filePath: string): string; static patternTest(pattern: string, filePath: string): boolean; private static globToRegExp; }