/**** * Module Fetcher * * Fetches and caches ESM modules for MDX rendering. * Handles direct file reads, HTTP fallback, and recursive dependency resolution. * * Features: * - Distributed transform cache for cross-pod sharing (Redis/API) * - Local filesystem cache for fast repeated access * - Parallel nested import resolution * * @module build/transforms/mdx/esm-module-loader/module-fetcher */ import { type Logger } from "../../../../utils/index.js"; import type { RuntimeAdapter } from "../../../../platform/adapters/base.js"; import type { ModuleFetcherContext } from "../types.js"; export { MAX_MDX_MODULE_GRAPH_ENTRIES, ModuleGraphLimitError, ModuleImportLimitError, ModuleSourceLimitError, } from "./limits.js"; export { rewriteDntImports } from "./import-rewriter.js"; export { endRenderSession, hasRenderSession, runInRenderSession, startRenderSession, } from "./render-sessions.js"; /** * Error thrown when transform tree exceeds the timeout. */ export declare class TransformTreeTimeoutError extends Error { constructor(normalizedPath: string, elapsedMs: number); } /** * Error thrown when a circular module dependency is detected in the current fetch chain. */ export declare class CircularModuleDependencyError extends Error { constructor(pathChain: string); } /** * Fetch and cache a module. * This is the main entry point for module fetching operations. */ export declare function fetchAndCacheModule(modulePath: string, context: ModuleFetcherContext, parentModulePath?: string, lineage?: Set): Promise; /** * Create a module fetcher context. */ export declare function createModuleFetcherContext(esmCacheDir: string, adapter: RuntimeAdapter, projectDir: string, projectId: string, options?: { contentSourceId?: string; isLocalProject?: boolean; projectSlug?: string; /** Compile fetched modules in development mode. Defaults to false. */ dev?: boolean; reactVersion?: string; moduleServerOrigin?: string; dependencyPinningCacheKey?: string; dependencyPinningDependencies?: Readonly>; dependencyPinningSource?: ModuleFetcherContext["dependencyPinningSource"]; serverExternalPackages?: readonly string[]; logger?: Logger; strictMissingModules?: boolean; }): ModuleFetcherContext; //# sourceMappingURL=index.d.ts.map