import { h as RouteModule, a1 as SSGCollectionResult, a0 as SSGPage, q as FarmConfig, av as OpenAPIConfig, a as FarmPlugin, a3 as ResolvedFarmLayer, a4 as FarmSourceRoot } from './client-plugins-IR4yJ6w3.js'; export { bu as APIHandlerLifecyclePayload, bq as APIRouteDiscoveredPayload, A as AppRoutePattern, $ as BuildOptions, bx as BundleLifecyclePayload, B as BundleResultPayload, dv as CookieJar, dw as CookieOptions, db as CreateIntegrationOrmOptions, dg as DEFAULT_FARM_API_BASE_PATH, dZ as DEFAULT_FARM_DEVTOOLS_SHORTCUT, cM as DefinedIntegration, S as ErrorBoundary, bv as ErrorLifecyclePayload, G as ErrorProps, d$ as FARM_DEVTOOLS_LAUNCH_PARAM, d_ as FARM_DEVTOOLS_PATH, bZ as FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY, b_ as FARM_INTEGRATION_SET_COOKIES_KEY, dj as FarmAPIConfig, dh as FarmAPIConfigResolverContext, di as FarmAPIConfigValue, ai as FarmAgentJsonLd, aw as FarmAgentUserConfig, e as FarmAppContext, aT as FarmAuthConfig, aU as FarmAuthDatabaseConfig, aV as FarmAuthEmailAndPasswordConfig, aW as FarmAuthSessionConfig, aX as FarmAuthUserConfig, e3 as FarmBuildActivityPosition, u as FarmComponentType, n as FarmContextFactory, C as FarmContextFactoryInput, aN as FarmCspConfig, aP as FarmCspDirectiveValue, aO as FarmCspDirectives, aQ as FarmCspOptions, bH as FarmDeployConfig, bJ as FarmDeployTarget, e4 as FarmDevIndicatorsConfig, e0 as FarmDevtoolsConfig, e1 as FarmDevtoolsUserConfig, p as FarmIntegration, bK as FarmIntegrationCategory, c3 as FarmIntegrationConfigContext, c4 as FarmIntegrationConfigDefinition, c5 as FarmIntegrationConfigInput, cz as FarmIntegrationContributedPlugin, ca as FarmIntegrationData, cl as FarmIntegrationDocumentNavigation, cG as FarmIntegrationEndpointValue, cH as FarmIntegrationEndpoints, cJ as FarmIntegrationEndpointsFactory, cI as FarmIntegrationEndpointsFactoryContext, cb as FarmIntegrationHandlerContext, bW as FarmIntegrationInputSchema, c8 as FarmIntegrationLifecycleContext, c9 as FarmIntegrationLifecycleHook, c6 as FarmIntegrationLifecycleLogLevel, c7 as FarmIntegrationLifecycleLogger, cw as FarmIntegrationLogEvent, cv as FarmIntegrationLogPhase, cx as FarmIntegrationLogger, ch as FarmIntegrationMiddleware, d6 as FarmIntegrationOrmClient, d5 as FarmIntegrationOrmSchema, cy as FarmIntegrationPluginOwner, ck as FarmIntegrationProvider, cj as FarmIntegrationProviderComponentReference, ci as FarmIntegrationProviderProps, bY as FarmIntegrationRequestContextStore, ce as FarmIntegrationRoute, c2 as FarmIntegrationRouteArgs, c0 as FarmIntegrationRouteDb, cD as FarmIntegrationRouteFactory, cd as FarmIntegrationRouteHook, cc as FarmIntegrationRouteHookContext, bR as FarmIntegrationRouteInput, bX as FarmIntegrationRouteInputSchemas, bP as FarmIntegrationRouteInputSource, bO as FarmIntegrationRouteMethod, cg as FarmIntegrationRouteMiddleware, bM as FarmIntegrationRouteParamValue, bN as FarmIntegrationRouteParams, c1 as FarmIntegrationRouteStorageArgs, cF as FarmIntegrationRoutesFactory, cE as FarmIntegrationRoutesFactoryContext, ct as FarmIntegrationSchema, cp as FarmIntegrationSchemaConstraint, co as FarmIntegrationSchemaField, cm as FarmIntegrationSchemaFieldType, cq as FarmIntegrationSchemaModel, cr as FarmIntegrationSchemaModelExtension, cs as FarmIntegrationSchemaModelOverride, cn as FarmIntegrationSchemaReference, bL as FarmIntegrationSlot, bV as FarmIntegrationStandardValidationResult, bT as FarmIntegrationValidationErrorLike, bS as FarmIntegrationValidationIssue, bQ as FarmIntegrationValidationPathSegment, bU as FarmIntegrationValidationResult, cA as FarmIntegrationsUserConfig, D as FarmIsolatedClientHydrationMode, aI as FarmLayerConfig, a2 as FarmLayerEntry, k as FarmMdxComponent, i as FarmMdxComponents, j as FarmMdxResolvedConfig, l as FarmMdxUserConfig, ae as FarmMiddlewareConfig, w as FarmMigrationCommand, x as FarmMigrationsConfig, y as FarmMigrationsUserConfig, aJ as FarmPerformanceConfig, bk as FarmPluginBuildHooks, bm as FarmPluginClientConfig, aZ as FarmPluginContext, bl as FarmPluginDevHooks, bh as FarmPluginDiscoveredRoute, a_ as FarmPluginIntegrationContext, a$ as FarmPluginLifecycle, bj as FarmPluginRenderHooks, b3 as FarmPluginRouteRuntimePayload, bi as FarmPluginRouterHooks, b9 as FarmPluginRuntimeAfterEvent, b6 as FarmPluginRuntimeBaseEvent, b8 as FarmPluginRuntimeBeforeEvent, bc as FarmPluginRuntimeCloseEvent, b7 as FarmPluginRuntimeContextEvent, ba as FarmPluginRuntimeErrorEvent, bd as FarmPluginRuntimeHooks, b2 as FarmPluginRuntimeKind, bf as FarmPluginRuntimeRequestHandler, be as FarmPluginRuntimeRequestOptions, bg as FarmPluginRuntimeSession, bb as FarmPluginRuntimeStartEvent, b4 as FarmPluginSetupContext, b5 as FarmPluginStateContext, aK as FarmPreloadMode, aL as FarmPreloadUserConfig, Y as FarmRequest, b0 as FarmRequestPluginContext, b1 as FarmRequestStore, Z as FarmResponse, d as FarmRouteMaxDuration, c as FarmRouteRegions, dO as FarmRouteRenderingMode, dH as FarmRouteRule, dG as FarmRouteRuleCors, dF as FarmRouteRuleRedirect, dE as FarmRouteRuleRenderMode, dI as FarmRouteRules, b as FarmRouteRuntime, F as FarmRouteRuntimeConfig, dN as FarmRouteRuntimeEntryKind, dQ as FarmRouteRuntimeManifest, dP as FarmRouteRuntimeManifestEntry, ay as FarmRuntimeShutdownError, aR as FarmSecurityConfig, cf as FarmTypedIntegrationRoute, m as FarmUserConfig, W as GenerateStaticParams, bw as HMRUpdatePayload, bC as HeaderConfig, bF as I18nConfig, bE as ImageConfig, da as InferFarmIntegrationOrmClient, d7 as InferFarmIntegrationOrmField, d8 as InferFarmIntegrationOrmFields, d9 as InferFarmIntegrationOrmSchema, d2 as IntegrationOriginPolicy, d3 as IntegrationOriginRejection, d4 as IntegrationOriginResult, df as IntegrationOrmModelNames, O as Layout, J as LayoutMetadataProps, X as LayoutModule, L as LayoutProps, Q as Loading, E as LoadingProps, dB as MemoryRateLimitStorageOptions, M as Metadata, I as MetadataProps, du as MiddlewareChain, bG as MiddlewareConfig, ah as MiddlewareContext, bp as MiddlewareDiscoveredPayload, dq as MiddlewareFunction, o as MiddlewareProps, dD as MiddlewareResult, dt as MiddlewareStore, dC as NextFunction, by as NitroBuildLifecyclePayload, N as NitroPreset, K as Page, f as PageProps, H as PagePropsWithMiddleware, v as PageRouteParams, P as ParsedRoute, g as PluginContextProps, az as PluginManager, aY as PluginRequestContext, dx as RateLimitConfig, dy as RateLimitIncrementResult, dA as RateLimitStatus, dz as RateLimitStorage, ad as ReadonlyMiddlewareStore, bB as RedirectConfig, bt as RenderLifecyclePayload, dr as RequestMiddleware, ds as RequestMiddlewareContext, ak as ResolvedFarmAPIConfig, an as ResolvedFarmAuthConfig, bA as ResolvedFarmConfig, aS as ResolvedFarmCspConfig, bI as ResolvedFarmDeployConfig, am as ResolvedFarmDevIndicatorsConfig, al as ResolvedFarmDevtoolsConfig, z as ResolvedFarmMigrationsConfig, ao as ResolvedFarmPerformanceConfig, aM as ResolvedFarmPreloadConfig, aj as ResolvedFarmRouteRuntimeConfig, ap as ResolvedFarmSecurityConfig, bD as RewriteConfig, bn as RouteDiscoveredPayload, br as RouteMatchPayload, bs as RouteMatchResultPayload, R as RouteSegment, bo as RoutesGeneratedPayload, _ as ServerAction, bz as ShutdownPayload, U as StaticPathParams, T as StaticPathPrimitive, V as StaticRouteParams, dW as createFarmRouteRuntimeKey, dc as createIntegrationOrm, cK as createIntegrationRoute, cN as defineIntegration, cu as defineIntegrationSchema, ax as definePlugin, c$ as describeIntegrationOriginRejection, c_ as dispatchIntegrationRequest, de as farmIntegrationSchemaToOrmSchema, dY as farmRouteRuleMatches, b$ as forwardIntegrationSetCookies, e6 as generateFarmDevIndicatorsClientRuntime, aG as getDeployTargetForPreset, dn as getFarmAPIBaseURL, a9 as getFarmAppDirectories, cC as getFarmIntegrationPluginOwner, cB as getFarmIntegrationPluginServerRuntime, aa as getFarmLayerAliases, dV as getFarmRouteRuntimeConfig, a8 as getFarmSourceRoots, cS as getIntegrationDocumentNavigationMatchers, cQ as getIntegrationProviders, cT as getIntegrationSchemas, aH as getPresetForDeployTarget, cZ as getRegisteredIntegrationAPIManifest, cU as getRegisteredIntegrationRuntime, cW as getRegisteredIntegrationSchemas, cV as getRegisteredIntegrations, dU as hasFarmRouteRuntimeControls, cL as integrationRoute, cO as isFarmIntegration, cR as isFarmIntegrationProviderComponentReference, aB as loadConfig, cX as matchIntegrationRoute, cY as matchRegisteredIntegrationRoute, dS as mergeFarmRouteRuntimeConfigs, aF as normalizeDeployTarget, dm as normalizeFarmAPIBasePath, dl as normalizeFarmAPIConfig, dR as normalizeFarmRouteRuntimeConfig, dJ as normalizeRouteRules, aA as resolveConfig, aC as resolveDeployConfig, aE as resolveDeployOutputPath, dk as resolveFarmAPIConfig, dp as resolveFarmAPIRequestURL, e5 as resolveFarmDevIndicatorsConfig, e2 as resolveFarmDevtoolsConfig, a7 as resolveFarmLayers, dX as resolveFarmRouteRuleRuntimeConfig, dT as resolveFarmRouteRuntimeConfig, d0 as resolveIntegrationAllowedOrigins, dd as resolveIntegrationOrmRuntimeClient, cP as resolveIntegrationPlugins, r as resolveMdxConfig, aD as resolveMigrationsConfig, dL as routeRulesToHeaders, dM as routeRulesToNitroRouteRules, dK as routeRulesToRedirects, d1 as validateIntegrationRequestOrigin } from './client-plugins-IR4yJ6w3.js'; export { FarmRenderer, FarmRendererCapabilities, FarmRendererCapabilitiesInput, FarmRendererStreamingCapabilities, REACT_RENDERER, defineRenderer } from './renderer.js'; export { f as fileExists, g as globFiles, l as logger, m as matchRoute, a as matchRoutePrefix, p as parseRoutePath, d as parseSearchParams, r as resolveAppPath, s as segmentsToPattern, b as toPosixPath, t as toRootRelativeUrlPath, c as toViteModuleId } from './utils-Cb_lH54T.js'; export { createFarmStorage, createStorageClient, databaseStorage, defineStorageClient, disposeStorage, driverStorage, getStorage, initStorage, libsqlStorage, localStorage, memoryStorage, mongodbStorage, mysql2Storage, mysqlStorage, netlifyBlobsStorage, pgStorage, pgliteStorage, planetscaleStorage, postgresStorage, redisStorage, resolveStorageRuntimeClient, s3Storage, sqliteStorage, upstashStorage, vercelBlobStorage, vercelKVStorage } from './storage.js'; import { FarmSchemaField, FarmSchemaModel, FarmSchema } from './schema.js'; export { FarmSchemaConstraint, FarmSchemaFieldType, FarmSchemaModelExtension, FarmSchemaModelOverride, FarmSchemaReference, defineSchema } from './schema.js'; export { F as FarmIntegrationAPI, c as FarmIntegrationAPIBodyFormat, e as FarmIntegrationAPIMethod, f as FarmIntegrationAPIOperation, g as FarmIntegrationAPIResponseFormat, h as FarmIntegrationRouteOperationCarrier, I as InferIntegrationAPIFromRoutes, a as api, d as defineIntegrationAPI, b as defineIntegrationAPIOperation, i as endpoint } from './integration-api-BbaiokCC.js'; export { c as createFarmApp } from './app-CKZN9fH0.js'; import * as react_jsx_runtime from 'react/jsx-runtime'; import { ReactNode } from 'react'; export { ComponentType, FC, PropsWithChildren, ReactElement, ReactNode } from 'react'; export { g as getCurrentRequest } from './request-CqXjjm8s.js'; export { F as FarmIslandStrategy } from './island-CfGru1MO.js'; import { ViteDevServer } from 'vite'; export { createCompressionPlugin, createEnvPlugin, createHeadersPlugin, createLoggerPlugin, createRedirectsPlugin, createRewritesPlugin } from './server-plugins.js'; export { A as AnyEndpointMiddleware, D as DELETE, d as EndpointErrorContracts, b as EndpointErrorDefinition, c as EndpointErrorDefinitions, e as EndpointErrorHandler, a as EndpointErrorSchema, f as EndpointFail, E as EndpointFailure, q as EndpointHandler, n as EndpointInvalidationContext, m as EndpointInvalidationTarget, o as EndpointInvalidations, l as EndpointMiddleware, j as EndpointMiddlewareContext, k as EndpointMiddlewareResult, p as EndpointOptions, g as EndpointParamValue, h as EndpointParams, y as FarmAPIStream, F as FarmStreamResponse, G as GET, H as HEAD, I as InferEndpointMiddlewareContext, M as MultipartField, x as MultipartSchema, v as MultipartValues, O as OPTIONS, u as PATCH, s as POST, t as PUT, $ as PluginAPIRouter, Z as PluginRoutes, P as PluginRoutesFactory, Q as QUERY, W as RouteDefinition, Y as RouteFactory, U as RouteInputSchemas, V as RouteJSON, R as RouteMethod, X as RouteOptions, S as RoutePathParams, T as TypedEndpoint, w as TypedFormData, r as createEndpoint, _ as createRouteFactory, i as isEndpointFailure, N as isFarmAPIStream, K as isJSONStreamResponse, B as isMultipartSchema, J as jsonStream, z as multipart, L as readJSONStream, a0 as resolvePluginRoutes, C as toFormData } from './route-CZkTBD-s.js'; export { APIRoute, APIRouteConflictError, APIRouteHandlerOptions, APIRouteManager, APIRouteManagerOptions, API_ROUTE_METHODS } from './api/route-manager.js'; export { t as APIClient, h as APIClientError, b as APIClientOptions, i as APIClientSystemError, c as APIClientWithoutIntegrationsOptions, g as APIResult, H as APIRouteManifest, A as APIRouteRefMetadata, v as ApiClients, C as CacheKey, n as CacheOptions, l as CachePolicy, m as CacheScope, J as ClientHeaders, K as ClientLifecycleHooks, r as ClientOptions, L as ClientRequestEvent, M as ClientResponseEvent, a as FARM_API_ROUTE_META_SYMBOL, F as FARM_API_ROUTE_REF_SYMBOL, a7 as InferIntegrationOperationBody, a8 as InferIntegrationOperationQuery, a9 as InferIntegrationOperationResponse, a3 as IntegrationAPI, _ as IntegrationClient, $ as IntegrationClientAliases, a5 as IntegrationClientData, P as IntegrationClientError, a1 as IntegrationClientOptions, a2 as IntegrationClientRequestOptions, a0 as IntegrationClientRoot, a4 as IntegrationClients, a6 as IntegrationOperationResult, aa as IntegrationServerClient, ab as IntegrationServerClientAliases, ac as IntegrationServerClientOptions, ad as IntegrationServerClientRequestOptions, ae as IntegrationServerClientRoot, af as IntegrationServerRequestLike, p as InvalidateOptions, I as InvalidateTarget, q as OptimisticOptions, O as OptimisticUpdate, j as RequestEvent, k as ResponseEvent, o as RetryAttemptContext, R as RetryOptions, s as RouteAPIClient, u as ServerAPIClient, S as ServerAPIClientOptions, d as ServerAPIClientWithoutIntegrationsOptions, f as StatusEvent, e as StatusPhase, D as applyServerFnOptimisticUpdates, x as createAPIClient, w as createApiClients, Q as createIntegrationApi, N as createIntegrationClient, T as createIntegrationClients, V as createIntegrationServerClient, U as createIntegrations, B as createServerAPIClient, z as getAPIRouteRefMetadata, W as getIntegrationAPIManifest, X as integrationClients, Y as integrationsClient, Z as integrationsServer, y as isAPIRouteRef, G as resolveServerFnInvalidateTargets, E as settleServerFnOptimisticUpdates } from './api-client-C1YzJu3J.js'; export { ApiRoute, FarmApiPluginOptions, farmApiPlugin, resolveFarmAPIServerBasePath } from './api.js'; export { ArrayParserOptions, Parser, asArrayOf, asBoolean, asFloat, asInteger, asIsoDate, asIsoDateTime, asJson, asString, createParser, inferParserType } from './query/parsers.js'; export { R as RouteParamsInput, l as loadRouteParams, p as parseRouteParams } from './params-BALtrRim.js'; export { FarmQueryStateContext, LayoutPropsSafe, PagePropsSafe, QueryStateConfig, QueryStateProvider } from './query/index.js'; export { FarmMiddlewarePluginOptions, MiddlewareManager, UnsupportedRateLimitStorageError, createContext, farmMiddlewarePlugin, getFromMiddleware, getRateLimitStatus, hasMiddlewareData, memoryRateLimitStorage, middleware, unwrapMiddleware } from './middleware.js'; export { _ as _runWithMiddlewareContext, b as _runWithMiddlewareData, a as applyProductionMiddlewareHeaders, c as createProductionMiddlewareRunner, g as getMiddlewareContext, d as getMiddlewareData, e as getMiddlewareValue, m as matchesMiddlewareConfig } from './production-runtime-B46wY--f.js'; export { FarmRouter, FarmRouterActiveOptions, FarmRouterBuildOptions, FarmRouterMatch, FarmRouterParams, FarmRouterPathParam, FarmRouterPathParams, FarmRouterPrimitiveParam, FarmRouterQueryValue, FarmRouterRoute, FarmRouterRouteInput, buildFarmRoutePath, createFarmRouter, isFarmRouteActive, matchFarmRoute } from './router.js'; export { b as MetadataRoute, d as MetadataRouteContext } from './metadata-route-Du0gRdBR.js'; export { CreateRouteOptions, InferProgrammaticRouteData, InferProgrammaticRouteSchema, ProgrammaticApiRoute, ProgrammaticApiRouteOptions, ProgrammaticLayoutRoute, ProgrammaticPageRoute, ProgrammaticRedirectRoute, ProgrammaticRouteAction, ProgrammaticRouteActionContract, ProgrammaticRouteActions, ProgrammaticRouteBuilder, ProgrammaticRouteComponentProps, ProgrammaticRouteContext, ProgrammaticRouteDataCacheContext, ProgrammaticRouteDataCacheKeys, ProgrammaticRouteDataContext, ProgrammaticRouteDataHooks, ProgrammaticRouteDataStaleTime, ProgrammaticRouteDefaultAction, ProgrammaticRouteDefinition, ProgrammaticRouteErrorComponentProps, ProgrammaticRouteFactory, ProgrammaticRouteGuard, ProgrammaticRouteGuardContext, ProgrammaticRouteManifest, ProgrammaticRouteMaybePromise, ProgrammaticRouteMethod, ProgrammaticRouteParamsFallback, ProgrammaticRoutePendingComponentProps, ProgrammaticRoutePrimitive, ProgrammaticRouteRenderMode, ProgrammaticRouteSchema, ProgrammaticRouteSearchClientOptions, ProgrammaticRouteSearchConfig, ProgrammaticRouteSearchFallback, ProgrammaticRouteSearchOptions, ProgrammaticRouteWithActions, ProgrammaticStaticPath, ProgrammaticStaticPathParams, ProgrammaticStaticPaths, createLayoutModuleFromProgrammaticLayout, createProgrammaticRouteModuleId, createRoute, createRouteModuleFromProgrammaticPage, defineRoutes, getProgrammaticRouteManifest, isProgrammaticRouteManifest, isProgrammaticRoutesFileName, layout, page, parseProgrammaticRouteModuleId, parseProgrammaticRoutePath, routesBuilder, scanProgrammaticPagePaths } from './routes.js'; export { FarmDocsAPIHandler, FarmDocsAPIOptions, FarmDocsAPIRouteHandlers, FarmDocsAdapterHandlerOptions, FarmDocsCloudIntegration, FarmDocsCloudRouteOptions, FarmDocsCloudServer, FarmDocsHandlerOptions, FarmDocsPage, LoadedFarmDocsPage, createDocsAPI, createFarmDocsAPIHandler, createFarmDocsAdapterHandler, createFarmDocsHandler, discoverFarmDocsPages, getFarmDocsDocumentNavigationMatchers, getFarmDocsRouteTypeEntries, hasFarmDocsRuntimeAdapter, isFarmDocsAPIRequest, isFarmDocsRequest, loadFarmDocsPage, resolveFarmDocsContentDir } from './docs.js'; export { b as FarmDocsConfigInput, c as FarmDocsNavigationConfig, F as FarmDocsResolvedConfig, f as FarmDocsSidebarItem, d as FarmDocsSocialImageConfig, e as FarmDocsSocialImageFonts, a as FarmDocsUserConfig } from './types-CKwggz9n.js'; export { ApplyMarkdownNegotiationHeadersOptions, CreateMarkdownMirrorResponseOptions, FarmMarkdownMirrorTarget, FarmMarkdownResolvedConfig, FarmMarkdownResolvedRoute, FarmMarkdownRouteInput, FarmMarkdownUserConfig, ResolveMarkdownMirrorTargetOptions, applyMarkdownNegotiationHeaders, createMarkdownMirrorResponse, farmAcceptQuality, htmlToMarkdown, requestAcceptsMarkdown, resolveMarkdownConfig, resolveMarkdownMirrorTarget } from './markdown.js'; export { FARM_MARKDOWN_CONTENT_TYPE, FarmMarkdownPageModuleInput, FarmMarkdownPageSource, createFarmMarkdownErrorBody, createFarmMarkdownRouteModule, createFarmMarkdownRouteModuleFromFile, createFarmMarkdownSourceResponse, createMarkdownMetadata, farmRequestWantsMarkdown, isFarmMarkdownPageFile, loadFarmMdxComponents, normalizeFarmMarkdownRoutePath, parseMarkdownFrontmatter, titleFromMarkdown } from './app-markdown.js'; export { FarmAPIEvent, FarmBuildEvent, FarmCacheEvent, FarmErrorEvent, FarmEvent, FarmEventBase, FarmEventHandler, FarmEventInput, FarmEventLevel, FarmEventSubscriptionOptions, FarmEventType, FarmIntegrationEvent, FarmMiddlewareEvent, FarmObservabilityUserConfig, FarmPPREvent, FarmPluginEvent, FarmRenderEvent, FarmRequestEvent, FarmRequestSpanOptions, FarmResolvedObservabilityConfig, FarmResolvedTracingConfig, FarmRouteEvent, FarmServerEvent, FarmSpanOptions, FarmStorageEvent, FarmTraceContext, FarmTraceSpanKind, FarmTracingConfig, FarmTracingUserConfig, configureFarmObservability, configureFarmTracing, emitFarmEvent, getFarmTraceContext, normalizeFarmObservabilityConfig, normalizeFarmTracingConfig, onFarmEvent, resetFarmObservability, runWithFarmRequestSpan, runWithFarmSpan } from './observability.js'; import { FarmCronJob } from './cron.js'; export { DEFAULT_FARM_CRON_SECRET_ENV, FARM_CRON_MANIFEST, FarmCronCloudflareConfig, FarmCronJobConfig, FarmCronResolvedConfig, FarmCronRouteOptions, FarmCronSchedule, FarmCronUserConfig, PreparedFarmCron, applyFarmCronVercelCrons, createFarmCronCloudflareConfig, createFarmCronCloudflareTriggers, createFarmCronManifest, createFarmCronVercelCrons, cronRoute, isCronRequestAuthorized, mergeScheduledTasks, prepareFarmCronForNitro, resolveCronConfig } from './cron.js'; export { D as DEFAULT_FARM_WORKFLOW_DIRS, t as DEFAULT_FARM_WORKFLOW_ROUTE, u as DEFAULT_FARM_WORKFLOW_SECRET_ENV, p as FarmCronDefinition, q as FarmDiscoveredWorkflow, a as FarmServerConfig, g as FarmServerDuration, h as FarmServerHealthConfig, o as FarmWorkflowDefinition, s as FarmWorkflowHTTPHandlerOptions, l as FarmWorkflowLogger, n as FarmWorkflowRunContext, k as FarmWorkflowSchedule, F as FarmWorkflowsResolvedConfig, j as FarmWorkflowsUserConfig, P as PreparedFarmWorkflows, R as ResolvedFarmServerConfig, i as ResolvedFarmServerHealthConfig, G as applyFarmWorkflowVercelCrons, A as createFarmWorkflowRequestHandler, E as createFarmWorkflowVercelCrons, x as defineCron, w as defineTask, v as defineWorkflow, z as discoverFarmWorkflows, C as prepareFarmWorkflowsForNitro, y as resolveWorkflowsConfig, B as runFarmWorkflowModule } from './workflows-BantWytQ.js'; export { EnvParser, EnvSchema, EnvShape, FarmEnvConfig, FarmEnvTypes, FarmPublicEnv, FarmServerEnv, FarmTypedEnv, InferEnv, InferEnvParser, InferEnvShape, ResolvedFarmEnv, env, getEnv, getPublicEnv, getResolvedEnv, publicEnv, resolveEnv, serverEnv, setEnv } from './env.js'; export { GenerateEnvTypesOptions, createEnvTypeDeclarations, generateEnvTypes } from './env-types.js'; export { resolveFarmThemeConfig } from './theme/index.js'; export { b as FarmResolvedTheme, d as FarmThemeConfig, a as FarmThemePreference, F as FarmThemeSnapshot, R as ResolvedFarmThemeConfig } from './types-DQnyD3VD.js'; export { FarmEnvironment, FarmEnvironmentError, FarmIsomorphicFnOptions, createClientOnlyFn, createIsomorphicFn, createServerOnlyFn } from './environment.js'; export { FarmFont, FarmFontDisplay, FarmFontOptions, FarmFontSource, FarmLayoutFontModule, FarmLayoutFonts, LocalFontOptions, RemoteFontOptions, RemoteFontSource, defineLayoutFonts, localFont, remoteFont, resolveFarmLayoutFonts } from './font.js'; import { R as ResolvedFarmI18nConfig } from './types-CnH8DOqo.js'; export { g as FarmI18nCookieConfig, h as FarmI18nDetectionSignal, i as FarmI18nDirection, j as FarmI18nRouting, k as FarmI18nUserConfig } from './types-CnH8DOqo.js'; export { AnyServerFnMiddleware, FARM_SERVER_FN_SYMBOL, InferServerFnError, InferServerFnSchemaInput, InferServerFnSchemaOutput, ServerFn, ServerFnContext, ServerFnDeclaredError, ServerFnError, ServerFnErrorDefinition, ServerFnErrorDefinitions, ServerFnErrorHandler, ServerFnErrorSchema, ServerFnFormInput, ServerFnHandler, ServerFnHandlerContext, ServerFnInvalidationContext, ServerFnInvalidations, ServerFnMiddleware, ServerFnMiddlewareContext, ServerFnMiddlewareContinuation, ServerFnMiddlewareHandler, ServerFnMiddlewareHandlerContext, ServerFnMiddlewareNext, ServerFnMiddlewareOptions, ServerFnOptions, ServerFnOutputOptions, ServerFnSchema, _parseServerFnSchema, createServerFn, createServerMiddleware } from './server-fn.js'; export { RouteActionTarget, ServerFnActionStatus, ServerFnOptimisticContext, ServerFnSubmit, UseActionFormProps, UseActionReturn, UseServerFnOptions, UseServerFnReturn, useAction, useServerFn } from './server-fn-client.js'; export { FARM_SERVER_QUERY_SYMBOL, ServerQuery, ServerQueryKey, ServerQueryOptions, ServerQueryOutputOptions, ServerQueryStaleTime, createServerQuery } from './server-query.js'; export { UseServerQueryOptions, UseServerQueryResult, useServerQuery } from './server-query-client.js'; export { DEFAULT_SERVER_ACTION_BODY_SIZE_LIMIT, FarmServerActionsConfig, PreparedServerActionRequest, ResolvedFarmServerActionsConfig, SanitizedServerActionError, ServerActionRequestError, ServerActionRequestKind, createServerActionRequestErrorResponse, getServerActionExecutionContext, getServerActionInvalidations, getServerActionSignal, prepareServerActionRequest, resolveServerActionsConfig, runWithServerActionRequest, sanitizeServerActionError, validateServerActionRequest } from './server-action-security.js'; export { FARM_DEPLOYMENT_COOKIE, FARM_DEPLOYMENT_ID_HEADER, FARM_DEPLOYMENT_MISMATCH_CODE, FARM_DEPLOYMENT_MISMATCH_HEADER, FARM_DEPLOYMENT_MISMATCH_STATUS, FarmDeploymentMismatch, FarmDeploymentMismatchError, FarmDeploymentResponseOptions, FarmPresetRuntime, createFarmDeploymentCookie, createFarmDeploymentMismatchError, createFarmDeploymentMismatchResponse, createFarmDeploymentRequestHeaders, getFarmDeploymentMismatch, getFarmPresetRuntime, getFarmRequestDeploymentId, getFarmResponseDeploymentId, isFarmDeploymentMismatchResponse, normalizeFarmDeploymentId, withFarmDeploymentResponse } from './deployment.js'; export { F as FarmImageConfig, a as FarmImageFormat, b as FarmImageLocalPattern, c as FarmImageProvider, d as FarmImageRemotePattern, R as ResolvedFarmImageConfig } from './image-config-Duob7wER.js'; export { build } from './internal/build-runtime.js'; export { AnyMutationTarget, ClientCachePersistenceOptions, CrossTabCacheInvalidationOptions, DefaultRouteHref, DefaultRoutePath, DefaultRoutePattern, ExternalHref, FARM_CACHE_INVALIDATION_CHANNEL, FARM_CLIENT_CACHE_PERSIST_VERSION, FarmClientCacheAdapter, FarmClientCacheStorage, FetcherFormDataContext, FetcherFormProps, FetcherInputError, FetcherState, FetcherSubmit, FetcherSubmitAsync, InferMutationData, InferMutationError, InferMutationVariables, Link, LinkDefaultRoute, LinkExternalUriSchemes, LinkProps, MutationAsync, MutationNetworkMode, MutationOptimisticContext, MutationStatus, MutationTrigger, PersistedEntry, PrefetchBehavior, RouteHref, RouteOptionalParamValue, RouteParamValue, RouteParams, Store, StoreApi, StoreFields, StoreKeyListener, StoreKeysListener, StoreListener, StorePatch, StoreState, StoreValueUpdater, UseBlockerOptions, UseBlockerReturn, UseFetcherOptions, UseFetcherReturn, UseMutationOptions, UseMutationReturn, UseRouterOptions, clearPersistedCache, createStore, defineClientCacheAdapter, enableCrossTabCacheInvalidation, initConfiguredClientCachePersistence, initPersistedClientCache, storageClientCacheAdapter, useBlocker, useFetcher, useMutation, useNavigation, usePageState, useRouter, useScrollRestoration } from './client.js'; export { a as FarmClientCacheEntry, b as FarmClientCacheKey, F as FarmClientCacheStatus, g as getFarmClientDataCache, n as normalizeFarmClientCacheKey } from './client-cache-BwNdIy9R.js'; export { UseThemeResult, useTheme } from './theme/client.js'; export { a as FarmNavigateOptions, d as FarmNavigationBlocker, e as FarmNavigationBlockerContext, f as FarmNavigationListener, h as FarmNavigationLocation, F as FarmNavigationState, i as FarmViewTransitionMode, S as SPARouter, g as getRouter, n as navigateTo, p as prefetch, b as pushState, r as readPageState, c as replaceState } from './spa-router-CqSJjuIQ.js'; export { F as FarmChunkRecoveryOptions, i as installChunkErrorRecovery, a as isChunkLoadError } from './chunk-recovery-lnQFzcQP.js'; export { a as FarmClientHydrationCompleteEvent, b as FarmClientHydrationEvent, d as FarmClientHydrationMode, e as FarmClientHydrationSession, f as FarmClientLocation, g as FarmClientNavigationAction, h as FarmClientNavigationErrorEvent, i as FarmClientNavigationEvent, j as FarmClientNavigationLoadedEvent, k as FarmClientNavigationResolvedEvent, l as FarmClientNavigationSession, m as FarmClientPerformanceEvent, n as FarmClientPlugin, o as FarmClientPluginCloseEvent, p as FarmClientPluginEnforce, q as FarmClientPluginErrorEvent, r as FarmClientPluginErrorPhase, F as FarmClientPluginManager, s as FarmClientPluginManagerOptions, t as FarmClientPluginMetadata, u as FarmClientPluginRegistration, v as FarmClientPluginRouter, w as FarmClientPluginSetupEvent, x as FarmClientPluginStateEvent, c as createClientPluginManager } from './lifecycle-De0vQG45.js'; export { CacheKeyFactory, DefinedCacheKey, FarmCacheAdapter, FarmCacheEntry, FarmCacheInvalidationTarget, FarmCacheOptions, FarmCacheSetOptions, FarmCacheStorage, FarmCacheUserConfig, FarmClientCacheUserConfig, FarmDataCache, GetFarmCacheEntryOptions, InferCacheKeyData, RevalidateTagProfile, RouteDataCacheKey, StorageFarmCacheAdapterOptions, applyFarmCacheInvalidationTargets, applyFarmCacheInvalidations, configureFarmCache, createFarmCacheKey, createPathCacheTag, createRouteDataCacheKey, createRouteDataCacheTag, defineCacheKey, getFarmDataCache, invalidate, invalidateRouteData, normalizeRevalidatePath, revalidatePath, revalidateTag, storageCacheAdapter, unstable_cache, updateTag } from './cache.js'; export { Deferred, DeferredDataError, DeferredDataResponseOptions, DeferredRecord, DeferredSettlement, DeferredSettlements, FARM_DEFERRED_BRAND, FARM_DEFERRED_CONTENT_TYPE, FARM_DEFERRED_ERROR_CODE, PreparedDeferredData, createDeferredDataResponse, defer, isDeferred, prepareDeferredData, readDeferredDataResponse, reviveDeferredData, snapshotDeferredData } from './deferred.js'; export { AfterCallback, FarmAfterPlatformContext, _runWithAfterNodeResponse, _runWithAfterRequest, _withAfterNodeMiddleware, after } from './after.js'; export { usePathname, useSearchParams } from './navigation.js'; export { ReadonlyHeaders, ReadonlyRequestCookies, RequestCookie, cookies, headers } from './headers.js'; export { defineConfig, defineFarmConfig } from './config.js'; export { F as FarmRedirectSignal, b as FarmRedirectStatus, g as getFarmRedirectError, i as isFarmNotFoundError, a as isFarmRedirectError, n as notFound, p as permanentRedirect, r as redirect } from './navigation-errors-Dvwpzaer.js'; export { e as FarmStorageBuiltinDriverConfig, F as FarmStorageClient, a as FarmStorageClientConfig, f as FarmStorageConfigObject, g as FarmStorageCustomDriverConfig, c as FarmStorageDatabaseConfig, h as FarmStorageDatabaseDriverName, b as FarmStorageLocalDriverConfig, j as FarmStorageMountConfig, k as FarmStorageMounts, i as FarmStorageRuntimeClient, d as FarmStorageUserConfig } from './types-Cc8l9IqS.js'; export { BuiltinDriverName, BuiltinDriverOptions, Driver, Storage, StorageMeta, StorageValue, TransactionOptions } from 'unstorage'; export { ConnectorName, ConnectorOptions, Database } from 'db0'; export { getAllowedAPIRouteMethods, invokeAPIRouteEndpoint, isWebResponse, normalizeRouteResponse, resolveAPIRouteEndpoint } from './api/runtime.js'; export { A as APIRouteMatch, b as APIRouteParamValue, a as APIRouteParams, m as matchAPIRoute } from './route-pattern-W-SsJGSp.js'; export { F as FARM_SERVER_FN_FAILURE_SYMBOL, b as SerializedServerFnFailure, a as ServerActionError, S as ServerFnFailure, c as createServerFnTransportError, i as isServerFnFailure } from './server-fn-error-DDh14a0V.js'; export { F as FarmServerQueryActionInvocation, S as ServerQueryFetchOptions, b as beginFarmServerQueryAction, c as completeFarmServerQueryAction, f as fetchServerQuery, p as prefetchServerQuery, s as shouldApplyFarmServerQueryActionResult } from './server-query-runtime-DXRNhX_3.js'; export { getTheme, setTheme, toggleTheme } from './theme/runtime.js'; import 'http'; import '@farming-labs/orm'; import 'esbuild'; import './render-plan-CWfyp4ZG.js'; import './runtime-BgDQzBiu.js'; import './resolver-DadfRL6F.js'; import '@farming-labs/docs'; import '@opentelemetry/api'; import 'node:http'; import './internal/config-runtime.js'; type FarmSqlDialect = "postgres" | "mysql" | "sqlite"; type ResolvedSchemaField = FarmSchemaField & { name: string; }; type ResolvedSchemaModel = Omit & { name: string; fields: Record; }; type CollectedSchemaModel = { /** Namespace that owns the model: an integration key or a plugin name. */ ownerKey: string; modelKey: string; modelName: string; exportName: string; prismaModelName: string; model: ResolvedSchemaModel; }; /** * Resolve a schema's extensions, overrides, and name mappings. * * Table and column names fall back to the schema's own keys, which is what the * runtime orm uses (`createIntegrationOrm` reads `model.name ?? modelKey`). Any * other default would generate artifacts describing tables the app cannot * actually read. */ declare function resolveSchemaModels(ownerKey: string, schema: FarmSchema): Record; /** * Flatten owners' schemas into one list, rejecting two models that would * resolve to the same table. * * `only` narrows an owner to the models it actually controls; an owner handed a * schema it shares with the rest of the app should not claim all of it. */ declare function collectSchemaModels(entries: ReadonlyArray): CollectedSchemaModel[]; type FarmSqlStatement = { kind: "table" | "index"; /** The object this statement creates, for drift reporting. */ target: string; sql: string; }; /** * Emit create statements for a set of models. * * Everything here is derivable from the schema: nothing is inferred from a live * database, so the output is stable and reviewable before it is applied. */ declare function generateSqlStatements(models: readonly CollectedSchemaModel[], dialect: FarmSqlDialect): FarmSqlStatement[]; /** Render models as a standalone `.sql` file. */ declare function renderSqlSchemaFile(models: readonly CollectedSchemaModel[], dialect: FarmSqlDialect): string; declare function getSqlColumnType(field: ResolvedSchemaField, dialect: FarmSqlDialect): "BOOLEAN" | "INTEGER" | "DOUBLE PRECISION" | "TIMESTAMPTZ" | "JSONB" | "TEXT" | "INT" | "DOUBLE" | "DATETIME" | "JSON" | "VARCHAR(255)" | "REAL"; declare function getSqlDefaultExpression(field: ResolvedSchemaField, dialect: FarmSqlDialect): string | null; declare function isNullableField(field: ResolvedSchemaField): boolean; declare function quoteSqlIdentifier(dialect: FarmSqlDialect, value: string): string; declare function toSnakeCase(value: string): string; declare function toPascalCase(value: string): string; declare function toCamelCase(value: string): string; declare function escapeSqlString(value: string): string; /** The subset of a database client this needs: run a statement, read a result. */ type FarmSchemaExecutor = { /** Run a statement that returns nothing. */ execute(sql: string): Promise; /** Run a query and return its rows. */ query(sql: string, params?: unknown[]): Promise[]>; }; type FarmSchemaDrift = { table: string; /** Declared in the schema but absent from the table. */ missingColumns: string[]; /** Present in the table but not declared. Reported, never dropped. */ extraColumns: string[]; }; type FarmSchemaMigratePlan = { dialect: FarmSqlDialect; /** Statements for tables that do not exist yet. */ statements: FarmSqlStatement[]; /** Tables that exist and already match the schema. */ upToDate: string[]; /** Tables that exist but differ. Never altered automatically. */ drift: FarmSchemaDrift[]; }; /** * Compare resolved models against the live database and plan what to create. * * Creation is derivable from the schema alone, so it is safe to emit. Changing * an existing table is not: a rename and a drop-plus-add look identical here, * and one of them destroys data. Differences are reported for a human instead. */ declare function planSchemaMigration(models: readonly CollectedSchemaModel[], dialect: FarmSqlDialect, executor: FarmSchemaExecutor): Promise; type FarmSchemaMigrateResult = { applied: string[]; skipped: FarmSchemaDrift[]; }; /** * Run the plan's create statements. Drift is never applied: a plan that reports * differences leaves those tables untouched and says so. */ declare function applySchemaMigration(plan: FarmSchemaMigratePlan, executor: FarmSchemaExecutor): Promise; /** Render a plan as a reviewable SQL file. */ declare function formatSchemaMigration(plan: FarmSchemaMigratePlan, owner: string): string; /** Human-readable summary of tables that exist but no longer match the schema. */ declare function describeSchemaDrift(drift: readonly FarmSchemaDrift[]): string; /** * Adapt a raw database client to the executor the planner needs. * * Each client reports rows differently, so the shape is detected rather than * configured: `pg` returns `{ rows }`, `mysql2` returns `[rows]`, and * `node:sqlite` exposes prepare/exec. A key-value storage mount has no tables, * which is reported as `null` rather than an error. */ declare function createSchemaExecutor(client: unknown, owner: string): { executor: FarmSchemaExecutor; dialect: FarmSqlDialect; } | null; /** * Attached to a plugin or integration to say "I own these tables". * * Read by tooling so it can reach an already-resolved schema and connection * instead of re-reading and re-validating configuration. */ declare const FARM_SCHEMA_TABLES: unique symbol; interface FarmSchemaTablesDeclaration { /** Command namespace: this is the `` in `farm migrate`. */ name: string; /** The schema whose models this owner stores. */ schema: FarmSchema; /** * Model keys this owner actually controls. Defaults to every model in the * schema; narrow it when an app shares one schema with the rest of its code. */ models?: readonly string[]; /** * Resolves the configured database client, or the storage mount behind it. * * The app's resolved config is passed because an owner may read its * connection from there rather than from its own options — an integration * configured through `storage.client`, for example. */ resolveClient(config: FarmSchemaOwnerConfig): Promise; /** Set explicitly when the client's dialect cannot be detected. */ dialect?: FarmSqlDialect; } /** * Declare that a plugin owns tables, so `farm migrate` can create them * and `farm generate` can include them in schema artifacts. * * ```ts * const plugin = definePlugin({ name: "farm:jobs", ... }); * * return declareSchemaTables(plugin, { * name: "jobs", * schema: options.schema, * models: ["jobs", "jobRuns"], * resolveClient: () => resolveClient(options), * }); * ``` * * The declaration is non-enumerable, so it never reaches a config serializer or * a plugin's own option spreading. */ declare function declareSchemaTables(target: TTarget, declaration: FarmSchemaTablesDeclaration): TTarget; /** The declaration on a plugin, when it has one. */ declare function readSchemaTables(candidate: unknown): FarmSchemaTablesDeclaration | undefined; /** * Every table owner an app has configured. * * Plugins and integrations are both searched, because either can own storage. */ declare function findSchemaTableOwners(config: { plugins?: readonly unknown[]; integrations?: Record | readonly unknown[]; }): FarmSchemaTablesDeclaration[]; /** Resolve one owner's declaration into the models tooling works with. */ declare function collectOwnerModels(owner: FarmSchemaTablesDeclaration): CollectedSchemaModel[]; /** What an owner may read when resolving its client. */ type FarmSchemaOwnerConfig = { storage?: unknown; integrations?: Record | readonly unknown[]; [key: string]: unknown; }; interface MigrateSchemaTablesOptions { /** The app's resolved config, handed to the owner's `resolveClient`. */ config?: FarmSchemaOwnerConfig; /** Write the plan to this path instead of applying it. */ write?: string; /** Execute the plan. */ apply?: boolean; log?: (message: string) => void; } interface MigrateSchemaTablesResult { plan: FarmSchemaMigratePlan; sql: string; applied: string[]; } /** * Plan, and optionally apply, the tables one owner needs. * * Nothing is executed unless `apply` is set: the default is to hand back sql a * person can read before it touches a database. */ declare function migrateSchemaTables(owner: FarmSchemaTablesDeclaration, options?: MigrateSchemaTablesOptions): Promise; /** * Farm.js SSG (Static Site Generation) Module * * Handles collection and pre-rendering of SSG pages at build time. * * SSR is the default - pages render on each request * SSG is opt-in via `export const ssg = true`, Next-compatible route * config exports, or a top-of-file rendering directive. * * @example * ```tsx * // SSG Page * export const ssg = true; * export default function AboutPage() { * return

About

; * } * * // SSG with ISR * export const ssg = true; * export const revalidate = 60; * export default async function ProductsPage() { * const products = await fetchProducts(); * return ; * } * * // Dynamic SSG * export const ssg = true; * export async function getStaticPaths() { * const posts = await fetchPosts(); * return posts.map(post => ({ slug: post.slug })); * } * export default async function BlogPost({ params }) { * return
{params.slug}
; * } * * // Next-compatible route config * export const dynamic = "force-static"; * export const revalidate = 60; * * // PPR/static-shell route * export const experimental_ppr = true; * export const revalidate = 60; * * // Directive config * "use ssg; 60"; * export default function DocsPage() { * return

Docs

; * } * ``` */ interface RouteEntry { path: string; filePath: string; isDynamic: boolean; pattern: string; } type RouteRenderingDynamic = NonNullable; interface RouteRenderingConfig { ssg: boolean; ppr: boolean; revalidate?: number; dynamic?: RouteRenderingDynamic; directive?: string; } interface RouteRenderingOptions { /** * Whether `experimental.ppr` is enabled in the app config. Route-level PPR * opt-ins (`ppr`, `experimental_ppr`, `"use ppr"`) are inert without it. */ experimentalPPR?: boolean; } interface StaticRouteCandidateAnalysis { candidate: boolean; blockers: string[]; } interface DirectiveRenderingConfig { ssg: boolean; ppr: boolean; revalidate?: number; dynamic?: RouteRenderingDynamic; directive: string; } /** * Resolve the effective rendering mode. Direct request reads make an explicitly * static route dynamic so request-specific HTML cannot enter a shared artifact. */ declare function resolveRouteRenderingConfig(mod: RouteModule | null | undefined, source?: string, options?: RouteRenderingOptions): RouteRenderingConfig; declare function resolveRouteRenderingConfigFromFile(mod: RouteModule | null | undefined, filePath: string, options?: RouteRenderingOptions): Promise; /** * Conservatively identify a route that may be safe to pre-render. * * This intentionally produces a suggestion rather than changing rendering: * request-bound work can live in a transitive import, which source inspection * of the route module cannot prove safe. Explicit route config always wins. */ declare function analyzeStaticRouteCandidate(mod: RouteModule | null | undefined, source: string | undefined, options?: { isDynamic?: boolean; }): StaticRouteCandidateAnalysis; declare function parseRouteRenderingDirective(source: string | undefined): DirectiveRenderingConfig | undefined; /** * Collect SSG pages from route modules * * Scans all routes and categorizes them into: * - SSG pages: Pre-rendered at build time * - SSR routes: Rendered on each request * * @param routes - Array of route entries * @param loadModule - Function to load a route module * @returns SSG pages and SSR routes */ declare function collectSSGPages(routes: RouteEntry[], loadModule: (filePath: string) => Promise, options?: { suggestStaticRendering?: boolean; }): Promise; /** * Check if a route module is SSG */ declare function isSSGModule(mod: RouteModule | null | undefined): boolean; /** * Check if a route module has ISR (Incremental Static Regeneration) */ declare function hasISR(mod: RouteModule | null | undefined): boolean; /** * Get revalidation interval for a module */ declare function getRevalidateInterval(mod: RouteModule | null | undefined): number | undefined; /** * Check if a route module has PPR/static-shell caching enabled. */ declare function hasPPR(mod: RouteModule | null | undefined, options?: RouteRenderingOptions): boolean; /** * Generate SSG manifest for production builds */ declare function generateSSGManifest(pages: SSGPage[]): string; /** * Check if a URL path matches an SSG page */ declare function matchSSGPage(urlPath: string, ssgPages: SSGPage[]): SSGPage | undefined; interface FarmProviderProps { children: ReactNode; config: FarmConfig; } /** * Farm.js context provider for client-side components */ declare function FarmProvider({ children, config }: FarmProviderProps): react_jsx_runtime.JSX.Element; declare class HMRManager { private server; constructor(server: ViteDevServer); /** * Send HMR update to client */ send(payload: any): Promise; /** * Trigger full page reload */ reloadPage(): Promise; /** * Handle file change and trigger HMR */ handleFileChange(file: string): Promise; /** * Get all affected modules in the dependency graph */ private getAffectedModules; /** * Handle custom HMR events from client */ onClientMessage(event: string, callback: (data: any) => void): void; } interface APIRouteInfo { path: string; methods: string[]; filePath: string; relativePath: string; } declare class APITypeGenerator { private appDirs; constructor(appDir: string | readonly string[]); /** * Scan all API route files and extract route information */ scanAPIRoutes(): APIRouteInfo[]; private scanDirectory; private extractRouteInfo; private extractExportedMethods; private isTypeOnlyExportSpecifier; /** * Generate TypeScript code for the API router */ generateAPIRouter(routes: APIRouteInfo[], options?: { outFile?: string; pluginConfigs?: readonly string[]; pluginRoutes?: readonly { path: string; method: string; }[]; }): string; private getRouteImportPath; private pathToRouteName; private uniqueRouteName; private structureToTypeString; private toTypePropertyKey; private getBaseExportName; private getExportName; /** * Generate the API index file */ generateAPIIndex(outputPath: string): void; } interface OpenAPISpec { openapi: string; info: { title: string; description?: string; version: string; contact?: { name?: string; email?: string; url?: string; }; license?: { name: string; url?: string; }; }; servers?: Array<{ url: string; description?: string; }>; paths: Record; components?: { schemas?: Record; securitySchemes?: Record; }; } declare class OpenAPIGenerator { private config; private appDir; constructor(appDir: string, config: OpenAPIConfig); /** * Get type from Zod type */ private getTypeFromZodType; /** * Whether a schema field must be supplied by the caller. A field with a * default is supplied by the server when omitted, so — like an explicitly * optional field — it is not required. Only ZodOptional was excluded before, * which documented every `.default()` field as required. */ private isRequiredField; /** * Process Zod type to OpenAPI schema */ private processZodType; /** * Generate standard error responses */ private getStandardResponses; /** * Generate OpenAPI spec from API routes */ generateSpec(routes: APIRouteInfo[]): Promise; /** * Convert a Farm.js API path to OpenAPI path format. * * Strips the `/api` prefix and rewrites dynamic segments to OpenAPI's * `{name}` templating: `[id]` -> `{id}`, `[...slug]` -> `{slug}`, and * `[[...slug]]` -> `{slug}`. Leaving the bracket form produces a path key that * is invalid OpenAPI, which breaks "try it" and any generated client. */ private convertToOpenAPIPath; /** * Path parameters implied by a Farm.js API path's dynamic segments. Every * path parameter is `required: true` per the OpenAPI spec (a path parameter * cannot be optional), including catch-all segments. */ private getPathParameters; /** * Extract request body schema from endpoint */ private getRequestBody; /** * Extract query parameters from endpoint */ private getParameters; /** * Generate OpenAPI operation from route info */ private generateOperation; /** * Generate operation summary */ private generateSummary; /** * Generate operation description */ private generateDescription; /** * Generate operation ID */ private generateOperationId; /** * Generate tags for grouping operations */ private generateTags; /** * Generate OpenAPI spec file */ generateSpecFile(routes: APIRouteInfo[], outputPath: string): Promise; } declare class OpenAPIManager { private generator; private apiTypeGenerator; private config; private appDir; private specCache; constructor(appDir: string | readonly string[], config: OpenAPIConfig); /** * Generate OpenAPI spec from API routes */ generateSpec(): Promise; /** * Get cached spec or generate new one */ getSpec(): Promise; /** * Generate and save OpenAPI spec file */ generateSpecFile(): Promise; /** * Invalidate cache and regenerate spec */ invalidateCache(): Promise; /** * Get the docs route handler */ getDocsRouteHandler(): (req: any, res: any) => Promise; } interface ScalarAPIDocumentationProps { spec: any; config?: { theme?: "default" | "purple" | "blue" | "green" | "red" | "yellow"; layout?: "modern" | "classic"; showSidebar?: boolean; hideDownloadButton?: boolean; hideTryItPanel?: boolean; }; } declare function ScalarAPIDocumentation({ spec, config }: ScalarAPIDocumentationProps): react_jsx_runtime.JSX.Element; declare global { interface Window { ScalarApiReference: (config: any) => void; } } interface DocsRouteProps { spec: any; config?: any; } declare function DocsRoute({ spec, config }: DocsRouteProps): react_jsx_runtime.JSX.Element; type FarmDevtoolsRuntime = { runtime: "auto" | "node" | "edge"; regions?: string[]; maxDuration?: number; }; type FarmDevtoolsDiagnostic = { severity: "error" | "warning" | "info"; code: string; title: string; message: string; action?: string; }; type FarmDevtoolsSnapshot = { generatedAt: string; health: "ready" | "attention" | "error"; project: { name: string; root: string; srcDir: string; basePath: string; deploymentId: string; }; deployment: { target: string; preset: string; outputDir?: string; }; counts: { pages: number; layouts: number; loadingBoundaries: number; errorBoundaries: number; apiRoutes: number; middleware: number; integrations: number; storageMounts: number; cronJobs: number; workflows: number; layers: number; diagnostics: number; }; routes: Array<{ kind: "page" | "layout" | "loading" | "error"; pattern: string; filePath: string; runtime?: FarmDevtoolsRuntime; }>; apiRoutes: Array<{ path: string; methods: string[]; filePath: string; runtime: FarmDevtoolsRuntime; }>; middleware: Array<{ path: string; source: "config" | "file"; filePath: string; handlerCount: number; }>; integrations: Array<{ key: string; type: string; category: string; serverRuntime: boolean; routes: Array<{ path: string; methods: string[]; }>; middlewareCount: number; providerCount: number; schemaModelCount: number; }>; storage: Array<{ mount: string; driver: string; default: boolean; }>; cron: FarmCronJob[]; workflows: Array<{ id: string; filePath: string; routePath: string; schedule: string[]; timezone?: string; }>; layers: Array<{ name: string; source: string; srcDir: string; }>; environment: { server: string[]; public: string[]; }; docs: { enabled: boolean; entry?: string; }; features: { openapi: boolean; markdown: boolean; serverComponents: boolean; serverActions: boolean; optimizedBoundary: boolean; observability: boolean; }; diagnostics: FarmDevtoolsDiagnostic[]; }; interface GenerateFarmI18nTypesOptions { root: string; srcDir?: string; config: ResolvedFarmI18nConfig; outFile?: string; } declare function generateFarmI18nTypes(options: GenerateFarmI18nTypesOptions): Promise; interface GenerateFarmTypeArtifactsOptions { root: string; srcDir?: string; configPath?: string; plugins?: readonly FarmPlugin[]; extraRoutes?: string[]; layers?: readonly ResolvedFarmLayer[]; suppressLintOnLink?: boolean; componentExtensions?: readonly string[]; routeTypesOutFile?: string; apiTypesOutFile?: string; envTypesOutFile?: string; imageTypesOutFile?: string; i18nTypesOutFile?: string; i18nConfig?: ResolvedFarmI18nConfig; routes?: boolean; api?: boolean; env?: boolean; images?: boolean; i18n?: boolean; /** Compare generated content with disk without writing files. */ check?: boolean; } interface GenerateFarmTypeArtifactsResult { typesPath?: string; routeTypesPath?: string; apiTypesPath?: string; envTypesPath?: string; imageTypesPath?: string; i18nTypesPath?: string; apiRoutes: APIRouteInfo[]; /** Generated files whose checked-in content is missing or stale. */ stalePaths: string[]; } declare function generateFarmTypeArtifacts(options: GenerateFarmTypeArtifactsOptions): Promise; interface GenerateFarmImageTypesOptions { root: string; srcDir?: string; outFile?: string; } declare function generateFarmImageTypes(options: GenerateFarmImageTypesOptions): string; declare function createFarmImageTypeDeclarations(): string; interface GenerateRouteTypesOptions { root: string; srcDir?: string; outFile?: string; extraRoutes?: string[]; /** Ordered layer roots followed by the project root. */ sourceRoots?: readonly FarmSourceRoot[]; /** When true, do not augment LinkDefaultRoute so Link href accepts any string (no route-type errors). */ suppressLintOnLink?: boolean; /** Additional renderer-owned component extensions, such as `.vue` or `.svelte`. */ componentExtensions?: readonly string[]; } /** * Scan application route modules, generate page and module route unions, * and write a .d.ts file for typed Link hrefs and route component props. */ declare function generateRouteTypes(options: GenerateRouteTypesOptions): Promise; export { APITypeGenerator, type CollectedSchemaModel, DocsRoute, FARM_SCHEMA_TABLES, FarmConfig, FarmCronJob, type FarmDevtoolsDiagnostic, type FarmDevtoolsRuntime, type FarmDevtoolsSnapshot, FarmPlugin, FarmProvider, FarmSchema, type FarmSchemaDrift, type FarmSchemaExecutor, FarmSchemaField, type FarmSchemaMigratePlan, type FarmSchemaMigrateResult, FarmSchemaModel, type FarmSchemaOwnerConfig, type FarmSchemaTablesDeclaration, type FarmSqlDialect, type FarmSqlStatement, type GenerateFarmImageTypesOptions, type GenerateFarmTypeArtifactsOptions, type GenerateFarmTypeArtifactsResult, type GenerateRouteTypesOptions, HMRManager, type MigrateSchemaTablesOptions, type MigrateSchemaTablesResult, OpenAPIConfig, OpenAPIGenerator, OpenAPIManager, type OpenAPISpec, ResolvedFarmI18nConfig, ResolvedFarmLayer, type ResolvedSchemaField, type ResolvedSchemaModel, RouteModule, type RouteRenderingConfig, type RouteRenderingDynamic, type RouteRenderingOptions, SSGCollectionResult, SSGPage, ScalarAPIDocumentation, type StaticRouteCandidateAnalysis, analyzeStaticRouteCandidate, applySchemaMigration, collectOwnerModels, collectSSGPages, collectSchemaModels, createFarmImageTypeDeclarations, createSchemaExecutor, declareSchemaTables, describeSchemaDrift, escapeSqlString, findSchemaTableOwners, formatSchemaMigration, generateFarmI18nTypes, generateFarmImageTypes, generateFarmTypeArtifacts, generateRouteTypes, generateSSGManifest, generateSqlStatements, getRevalidateInterval, getSqlColumnType, getSqlDefaultExpression, hasISR, hasPPR, isNullableField, isSSGModule, matchSSGPage, migrateSchemaTables, parseRouteRenderingDirective, planSchemaMigration, quoteSqlIdentifier, readSchemaTables, renderSqlSchemaFile, resolveRouteRenderingConfig, resolveRouteRenderingConfigFromFile, resolveSchemaModels, toCamelCase, toPascalCase, toSnakeCase };