UNPKG

everything-dev

Version:

A consolidated product package for building Module Federation apps with oRPC APIs.

48 lines • 2.08 kB
import { ClientRuntimeConfig } from "../types.mjs"; import { ClientServiceConfig } from "./api.mjs"; import { AppRouterFactory } from "./types.mjs"; import { index_d_exports } from "./manifest/index.mjs"; import { QueryClient } from "@tanstack/react-query"; //#region src/ui/hydrate.d.ts declare global { interface Window { __EVERYTHING_DEV_HYDRATE_PROMISE__?: Promise<void>; __EVERYTHING_DEV_SSR__?: boolean; __CLIENT_PROGRESS__?: string[]; $_TSR?: unknown; } } interface CoreHydrateOptions { /** * Loads the app's generated core route config — the only app-specific * input; clients, compose machinery, and the router come from the package. */ routeConfig: () => Promise<index_d_exports.RouteConfigModule | { default: index_d_exports.RouteConfigModule; }>; /** * Loads the app's generated core manifest — the degradation target when the * runtime config carries no (or no usable) compose payload: a plugin-free * deployment has no payload at all, yet the core-only tree is still the * tree. Absent, a payload-less page cannot construct a tree. The value is * parsed through the manifest contract at the boundary (a skewed version * or shape fails loudly here). */ manifest?: () => Promise<unknown>; /** * The app's authored router factory — notFound/pending/error components, * scroll behavior, and router defaults live there. Absent, the framework's * own factory runs. */ createRouter?: AppRouterFactory; /** The app's query client factory (staleTime, gcTime, …). Absent, the framework default. */ createQueryClient?: () => QueryClient; /** Overrides the runtime config source (tests, embeds). */ config?: ClientRuntimeConfig; /** Localized copy for the API connection-failure toast (see `createApiClient`). */ apiConnectionError?: ClientServiceConfig["connectionError"]; } declare function hydrate(options: CoreHydrateOptions): Promise<void>; //#endregion export { type AppRouterFactory, CoreHydrateOptions, hydrate as default, hydrate }; //# sourceMappingURL=hydrate.d.mts.map