/** Bounded page and layout entity discovery. @module types/entities/getEntityInfo */ import type { EntityInfo } from "../entities.js"; import type { RuntimeAdapter } from "../../platform/adapters/base.js"; /** @internal Immutable directory-entry snapshot used during route discovery. */ export interface EntityResolutionDirectoryEntry { readonly name: string; readonly isFile: boolean; readonly isDirectory: boolean; } export interface EntityResolutionOptions { /** Caller cancellation for this one page or layout lookup. */ readonly signal?: AbortSignal; /** Absolute Unix timestamp in milliseconds for this lookup. */ readonly deadline?: number; /** Stable tenant/project identity used only for resolution admission isolation. */ readonly scopeKey?: string; } export interface EntityInfoOptions extends EntityResolutionOptions { /** Explicit directory from which an index page slug is derived. */ readonly routeRoot?: string; } /** @internal Cancellation-aware operations shared by framework entity resolvers. */ export interface EntityResolutionGate { throwIfCancelled(): void; awaitOperation(operation: () => Promise): Promise; } /** @internal Captured route-filesystem operations for one admitted lookup. */ export interface EntityResolutionSession extends EntityResolutionGate { readonly hasResolveFile: boolean; resolveFile(path: string): Promise; readDirectory(path: string): Promise; readEntityWithinRoot(filePath: string, rootDir: string, virtualRoot?: string): Promise; } /** * Run an internal resolver under the same tenant and isolate-wide admission * boundary used by Pages Router entity discovery. * @internal */ export declare function withEntityResolutionAdmission(projectDir: string, adapter: RuntimeAdapter, options: EntityResolutionOptions, operation: (session: EntityResolutionSession) => Promise): Promise; /** * Reads and classifies one entity source file. * * Returns `null` when the source path does not identify a file. Adapter failures * other than a missing path are propagated to the caller. */ export declare function getEntityInfo(filePath: string, adapter?: RuntimeAdapter, options?: EntityInfoOptions): Promise; /** * Resolves a page entity for a project-relative route slug. * * Resolution checks exact page files, directory index files, and dynamic route * files without allowing candidates to escape the project root. */ export declare function getEntityBySlug(projectDir: string, slug: string, adapter?: RuntimeAdapter, pagesDirectory?: string, options?: EntityResolutionOptions): Promise; /** * Resolves a layout entity by alias, project-relative path, or naming convention. * * Returns `null` when the requested layout cannot be found inside the project root. */ export declare function getLayoutEntity(projectDir: string, layoutName: string, adapter?: RuntimeAdapter, options?: EntityResolutionOptions): Promise; //# sourceMappingURL=getEntityInfo.d.ts.map