export { _runWithAfterRequest } from '../after.mjs'; import { R as ResolvedFarmServerConfig } from '../workflows-BantWytQ.mjs'; export { a as FarmServerConfig, b as bufferFarmRequestBody, c as createFarmNodeRequestAbortSignal, d as createFarmRequestBodyErrorResponse, m as matchesFarmIfNoneMatch, r as readFarmRequestBody, e as readNodeRequestBody, f as resolveFarmServerConfig } from '../workflows-BantWytQ.mjs'; export { _ as _runWithCurrentRequest, g as getCurrentRequest } from '../request-tGEE5X5s.mjs'; import { aq as APIRequestRuntime, q as FarmConfig, C as FarmContextFactoryInput } from '../client-plugins-Bz7W8EKI.mjs'; export { ar as manageFarmDocumentPreloads, as as manageFarmHtmlPreloads, at as manageFarmLinkHeaderPreloads, au as reportFarmPreloadWarnings } from '../client-plugins-Bz7W8EKI.mjs'; export { configureFarmCache, createFarmCacheKey, getFarmDataCache, normalizeRevalidatePath } from '../cache.mjs'; export { c as createFarmLocaleCookie, g as getFarmLocaleVaryHeaders } from '../resolver-khasx3fU.mjs'; export { localizeFarmHref, localizeFarmPathname, stripFarmLocaleFromPathname } from '../i18n/index.mjs'; export { a as addMetadataImageReference, c as createFarmMetadataRouteResponse, m as mergeMetadata, r as renderMetadataHead } from '../metadata-route-IoJ1h4a0.mjs'; export { _ as _runWithMiddlewareContext, b as _runWithMiddlewareData, a as applyProductionMiddlewareHeaders, c as createProductionMiddlewareRunner } from '../production-runtime-eRqnLz8i.mjs'; export { g as getFarmRedirectError, i as isFarmNotFoundError, a as isFarmRedirectError } from '../navigation-errors-Dvwpzaer.mjs'; export { configureFarmObservability, emitFarmEvent, runWithFarmRequestSpan } from '../observability.mjs'; export { f as createFarmInstrumentationLifecycle, r as resolveFarmInstrumentationRuntime } from '../instrumentation-runtime-CE06JLHZ.mjs'; export { _setDefaultFarmThemeConfig, getTheme } from '../theme/server.mjs'; import { c as FarmThemeRuntime, d as FarmThemeConfig, R as ResolvedFarmThemeConfig, a as FarmThemePreference } from '../types-DQnyD3VD.mjs'; export { d as applyFarmBasePath, r as resolveFarmTrailingSlashRedirect, s as searchParamsToObject, b as setFarmBasePath, a as setFarmTrailingSlashPreference, c as stripFarmBasePath } from '../base-path-BU16ETmo.mjs'; export { m as matchFarmPageRoute, p as parseRoutePath } from '../utils-DWt-mzCi.mjs'; import 'node:http'; import '../lifecycle-De0vQG45.mjs'; import '../route-C8RuFaMN.mjs'; import '../renderer.mjs'; import 'http'; import '../types-Cc8l9IqS.mjs'; import 'db0'; import 'unstorage'; import '../schema.mjs'; import 'react'; import '../integration-api-BbaiokCC.mjs'; import '@farming-labs/orm'; import '../types-CKwggz9n.mjs'; import '@farming-labs/docs'; import '../markdown.mjs'; import 'vite'; import '../cron.mjs'; import '../env.mjs'; import '../server-action-security.mjs'; import '../server-fn-error-DDh14a0V.mjs'; import 'esbuild'; import '../image-config-Duob7wER.mjs'; import '../types-CnH8DOqo.mjs'; import '../font.mjs'; import '../island-CfGru1MO.mjs'; import '@opentelemetry/api'; /** * Compare a caller-supplied secret against the configured one without leaking * how much of it matched. * * `===` on strings stops at the first differing character, so the time it takes * to reject a guess grows with the length of the correct prefix. Over enough * requests that recovers a cron or workflow secret one character at a time. This * always inspects every position instead. * * Deliberately not node:crypto's `timingSafeEqual`: these callers are bundled * into the generated Nitro runtime, which also targets edge and browser-like * environments where importing node:crypto breaks the build. */ declare function farmSecretsMatch(provided: string, expected: string): boolean; type FarmProductionLifecycleState = "starting" | "ready" | "draining" | "failed" | "closed"; interface FarmProductionLifecycleOptions { server: ResolvedFarmServerConfig; start?: () => void | Promise; close?: (reason: string) => void | Promise; } interface FarmResponseCompletionContext { onResponseFinished?: (callback: () => void) => void; } interface FarmProductionLifecycle { readonly state: FarmProductionLifecycleState; readonly activeRequests: number; start(): Promise; beginDrain(reason?: string): void; waitForIdle(timeoutMs?: number): Promise; close(reason?: string): Promise; forceClose(reason?: string): Promise; handleHealthRequest(request: Request): Promise; runRequest(handler: () => Response | Promise, context?: FarmResponseCompletionContext): Promise; } declare function createFarmProductionLifecycle(options: FarmProductionLifecycleOptions): FarmProductionLifecycle; /** Bind the owning app's live route dispatcher, never a process-wide route table. */ declare function _runWithAPIRequestRuntime(runtime: APIRequestRuntime, run: () => T): T; declare const FARM_ROUTE_CONTEXT_SYMBOL: unique symbol; type FarmRouteContextCarrier = { [FARM_ROUTE_CONTEXT_SYMBOL]?: TContext; }; declare function resolveFarmRouteContext(config: Pick, input: FarmContextFactoryInput): Promise; declare function withFarmRouteContext(props: TProps, context: TContext | undefined): TProps & FarmRouteContextCarrier; declare global { interface Window { __FARM_THEME__?: FarmThemeRuntime; } } interface FarmThemeDocumentParts { attributes: string; head: string; } declare function createFarmThemeDocumentParts(input: FarmThemeConfig | ResolvedFarmThemeConfig | false | undefined, basePath?: string, serverTheme?: FarmThemePreference): FarmThemeDocumentParts; declare function applyFarmThemeDocument(html: string, input: FarmThemeConfig | ResolvedFarmThemeConfig | false | undefined, basePath?: string, serverTheme?: FarmThemePreference): string; interface DefaultErrorSourceLine { number: number; content: string; highlight?: boolean; } interface DefaultErrorSourceFrame { file: string; line: number; column: number; lines: DefaultErrorSourceLine[]; } interface DefaultErrorPageOptions { statusCode?: number; statusText?: string; requestPath?: string; method?: string; message?: string; errorName?: string; stack?: string; sourceFrame?: DefaultErrorSourceFrame; development?: boolean; farmVersion?: string; nodeVersion?: string; mode?: string; } declare function resolveDefaultErrorStatus(error: unknown): number; declare function getDefaultErrorStatusText(statusCode: number): string; declare function createDefaultErrorMarkup(options?: DefaultErrorPageOptions): string; type RouteSegmentSpecificity = "static" | "dynamic" | "catch-all" | "optional-catch-all"; /** Sort route patterns from the most specific segment sequence to the least specific. */ declare function compareRouteSpecificity(left: readonly RouteSegmentSpecificity[], right: readonly RouteSegmentSpecificity[]): number; type RoutePatternSyntax = "page" | "router" | "api"; /** Return the specificity of every URL-consuming segment in a route pattern. */ declare function getRoutePatternSpecificity(pattern: string, syntax?: RoutePatternSyntax): RouteSegmentSpecificity[]; declare function createFarmLegacyRequest(event: TEvent, input: string | URL, headers: HeadersInit, readRawBody: (event: TEvent, encoding: false) => Promise): Promise; declare function serializeFarmInlineValue(value: unknown): string; declare function renderFarmLegacyHtml(options: { deploymentId: unknown; pageProps: unknown; pathname: unknown; html: string; clientScript: string; }): string; declare function renderFarmLegacyErrorHtml(): string; /** Preserve an incoming query when a redirect destination does not declare one. */ declare function appendFarmRedirectQuery(destination: string, search: string): string; declare function appendFarmLinkHeader(headers: Headers, value: string): void; export { _runWithAPIRequestRuntime, appendFarmLinkHeader, appendFarmRedirectQuery, applyFarmThemeDocument, compareRouteSpecificity, createDefaultErrorMarkup, createFarmLegacyRequest, createFarmProductionLifecycle, createFarmThemeDocumentParts, farmSecretsMatch, getDefaultErrorStatusText, getRoutePatternSpecificity, renderFarmLegacyErrorHtml, renderFarmLegacyHtml, resolveDefaultErrorStatus, resolveFarmRouteContext, serializeFarmInlineValue, withFarmRouteContext };