@farm.js/core 0.1.14 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-runtime.d.mts +5 -2
- package/dist/agent-runtime.d.ts +5 -2
- package/dist/api/client.d.mts +3 -2
- package/dist/api/client.d.ts +3 -2
- package/dist/api/route-manager.d.mts +5 -2
- package/dist/api/route-manager.d.ts +5 -2
- package/dist/api/runtime.d.mts +3 -2
- package/dist/api/runtime.d.ts +3 -2
- package/dist/{api-client-C8d7BZNp.d.mts → api-client-B-n3pm_Q.d.mts} +2 -1
- package/dist/{api-client-BWrEbxfO.d.ts → api-client-C0_NZEBl.d.ts} +2 -1
- package/dist/api.d.mts +7 -4
- package/dist/api.d.ts +7 -4
- package/dist/{app-wIYse61b.d.ts → app-AyjEsCBq.d.ts} +3 -3
- package/dist/{app-B3nVSjen.d.mts → app-CYPHeOo_.d.mts} +3 -3
- package/dist/app-markdown.d.mts +6 -3
- package/dist/app-markdown.d.ts +6 -3
- package/dist/{chunk-FOGLGRDS.mjs → chunk-7HDZYYS4.mjs} +100 -8
- package/dist/{chunk-DNCKVMSV.mjs → chunk-IL5RWYK7.mjs} +1 -1
- package/dist/{chunk-GNTPTTLA.mjs → chunk-IXTEENRS.mjs} +1 -1
- package/dist/{chunk-J2F5LFQ2.mjs → chunk-NHHKW2T6.mjs} +175 -8
- package/dist/{chunk-NJ47VORC.mjs → chunk-NUD6XBMO.mjs} +1 -1
- package/dist/{chunk-U6CRU23N.mjs → chunk-TYVVIQ5M.mjs} +10 -7
- package/dist/{chunk-W7IVHTOP.mjs → chunk-UQZPTIML.mjs} +15 -2
- package/dist/{chunk-S3QW3BIS.mjs → chunk-VVTREAG5.mjs} +89 -4
- package/dist/{client-plugins-C1EgdoJM.d.mts → client-plugins-CIPRtSsW.d.mts} +16 -4
- package/dist/{client-plugins-CslwYp3E.d.ts → client-plugins-CqVtZi5X.d.ts} +16 -4
- package/dist/client-plugins.d.mts +5 -2
- package/dist/client-plugins.d.ts +5 -2
- package/dist/client.d.mts +8 -7
- package/dist/client.d.ts +8 -7
- package/dist/config.d.mts +5 -2
- package/dist/config.d.ts +5 -2
- package/dist/{devtools-PCGEBRSC.mjs → devtools-IU7LKZOH.mjs} +2 -2
- package/dist/docs.cjs +74 -3
- package/dist/docs.mjs +3 -3
- package/dist/{route-C6UClI1z.d.mts → endpoint-Bu3XgeMK.d.mts} +3 -128
- package/dist/{route-CHBaW55F.d.ts → endpoint-kSAxE52R.d.ts} +3 -128
- package/dist/env.cjs +101 -8
- package/dist/env.d.mts +20 -2
- package/dist/env.d.ts +20 -2
- package/dist/env.mjs +3 -1
- package/dist/index.cjs +383 -24
- package/dist/index.d.mts +16 -15
- package/dist/index.d.ts +16 -15
- package/dist/index.mjs +20 -8
- package/dist/integrations.d.mts +5 -2
- package/dist/integrations.d.ts +5 -2
- package/dist/internal/app-markdown-runtime.d.mts +5 -2
- package/dist/internal/app-markdown-runtime.d.ts +5 -2
- package/dist/internal/build-runtime.cjs +435 -174
- package/dist/internal/build-runtime.d.mts +7 -4
- package/dist/internal/build-runtime.d.ts +7 -4
- package/dist/internal/build-runtime.mjs +6 -6
- package/dist/internal/cli-runtime.cjs +68 -4
- package/dist/internal/cli-runtime.mjs +2 -2
- package/dist/internal/client-error-overlay.cjs +1 -1
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/compression-runtime.d.mts +5 -2
- package/dist/internal/compression-runtime.d.ts +5 -2
- package/dist/internal/config-runtime.cjs +68 -4
- package/dist/internal/config-runtime.d.mts +6 -3
- package/dist/internal/config-runtime.d.ts +6 -3
- package/dist/internal/config-runtime.mjs +2 -2
- package/dist/internal/product-telemetry-runtime.cjs +1 -1
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.d.mts +11 -8
- package/dist/internal/production-runtime.d.ts +11 -8
- package/dist/{metadata-BsUcOEXg.d.ts → metadata-8g__AMPM.d.ts} +1 -1
- package/dist/{metadata-B1bxCPUY.d.mts → metadata-OMX6wFNf.d.mts} +1 -1
- package/dist/middleware.d.mts +7 -4
- package/dist/middleware.d.ts +7 -4
- package/dist/{nitro-ICBP5APY.mjs → nitro-3N4ZXRYM.mjs} +5 -2
- package/dist/plugin.cjs +278 -11
- package/dist/plugin.d.mts +5 -2
- package/dist/plugin.d.ts +5 -2
- package/dist/plugin.mjs +3 -3
- package/dist/{production-runtime-CsNn2-zx.d.ts → production-runtime-BJh7o6Cr.d.ts} +1 -1
- package/dist/{production-runtime-BDllolVh.d.mts → production-runtime-W3M0eNDV.d.mts} +1 -1
- package/dist/{render-plan-EG4hNFjy.d.ts → render-plan-Be4ZGTJP.d.ts} +1 -1
- package/dist/{render-plan-CNUlzylR.d.mts → render-plan-io7pvDNc.d.mts} +1 -1
- package/dist/renderer-client.d.mts +5 -4
- package/dist/renderer-client.d.ts +5 -4
- package/dist/{request-Blh_f7Z3.d.mts → request-DZkHYQ89.d.mts} +1 -1
- package/dist/{request-DsVSQVfD.d.ts → request-G8JhKr4F.d.ts} +1 -1
- package/dist/request.d.mts +6 -3
- package/dist/request.d.ts +6 -3
- package/dist/route-BxNJT447.d.ts +128 -0
- package/dist/route-C_eLaFTZ.d.mts +128 -0
- package/dist/{route-rendering-hUETRCbM.d.ts → route-rendering-BcLLPJgN.d.ts} +1 -1
- package/dist/{route-rendering-LT4XSoQK.d.mts → route-rendering-CbAKr1TY.d.mts} +1 -1
- package/dist/routes.d.mts +4 -2
- package/dist/routes.d.ts +4 -2
- package/dist/server-fn-client.d.mts +3 -2
- package/dist/server-fn-client.d.ts +3 -2
- package/dist/server-fn.cjs +141 -3
- package/dist/server-fn.d.mts +72 -1
- package/dist/server-fn.d.ts +72 -1
- package/dist/server-fn.mjs +12 -1
- package/dist/server-plugins.d.mts +6 -3
- package/dist/server-plugins.d.ts +6 -3
- package/dist/server-query-client.d.mts +1 -0
- package/dist/server-query-client.d.ts +1 -0
- package/dist/server-query.cjs +60 -3
- package/dist/server-query.d.mts +6 -1
- package/dist/server-query.d.ts +6 -1
- package/dist/server-query.mjs +3 -2
- package/dist/server.cjs +331 -15
- package/dist/server.d.mts +9 -8
- package/dist/server.d.ts +9 -8
- package/dist/server.mjs +6 -6
- package/dist/{spa-router-csKR9Ebj.d.mts → spa-router-BcS_4nqm.d.mts} +2 -2
- package/dist/{spa-router-Y_2FSJQK.d.ts → spa-router-BzFBUJkn.d.ts} +2 -2
- package/dist/testing.d.mts +5 -3
- package/dist/testing.d.ts +5 -3
- package/dist/{utils-DR2wfZAn.d.mts → utils-5kQP1mFR.d.mts} +1 -1
- package/dist/{utils-jISOE9SD.d.ts → utils-C4yrAhNc.d.ts} +1 -1
- package/dist/version.cjs +1 -1
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +416 -153
- package/dist/vite.d.mts +5 -2
- package/dist/vite.d.ts +5 -2
- package/dist/vite.mjs +3 -3
- package/package.json +3 -3
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { n as FarmClientPlugin } from './lifecycle-DK06VuKP.js';
|
|
2
|
-
import {
|
|
2
|
+
import { R as RouteMethod, g as PluginRoutes, P as PluginRoutesFactory } from './route-BxNJT447.js';
|
|
3
|
+
import { T as TypedEndpoint, d as EndpointMCPMetadata, R as RouteSchema, a as RouteSchemaOutput, c as RouteSchemaInput, Y as OpenAPISecurityMode } from './endpoint-kSAxE52R.js';
|
|
3
4
|
import { FarmRenderer } from './renderer.js';
|
|
4
5
|
import { IncomingMessage, ServerResponse } from 'http';
|
|
5
6
|
import { FarmMarkdownResolvedConfig, FarmMarkdownUserConfig } from './markdown.js';
|
|
@@ -21,6 +22,8 @@ import * as esbuild from 'esbuild';
|
|
|
21
22
|
import { F as FarmImageConfig, R as ResolvedFarmImageConfig } from './image-config-Duob7wER.js';
|
|
22
23
|
import { g as FarmI18nUserConfig, R as ResolvedFarmI18nConfig } from './types-Z0aotQ8w.js';
|
|
23
24
|
import { FarmCacheUserConfig } from './cache.js';
|
|
25
|
+
import { ServerFn } from './server-fn.js';
|
|
26
|
+
import { ServerQuery } from './server-query.js';
|
|
24
27
|
import { R as ResolvedFarmThemeConfig, d as FarmThemeConfig } from './types-DQnyD3VD.js';
|
|
25
28
|
import { FarmLayoutFonts } from './font.js';
|
|
26
29
|
import { _withAfterNodeMiddleware } from './after.js';
|
|
@@ -1091,8 +1094,13 @@ interface FarmMCPStandaloneTool<Schema extends RouteSchema = RouteSchema, Result
|
|
|
1091
1094
|
execute(input: RouteSchemaOutput<Schema>, context: FarmMCPExecuteContext): OutputSchema extends RouteSchema ? NoInfer<RouteSchemaInput<OutputSchema>> | Promise<NoInfer<RouteSchemaInput<OutputSchema>>> : Result | Promise<Result>;
|
|
1092
1095
|
endpoint?: never;
|
|
1093
1096
|
}
|
|
1094
|
-
/**
|
|
1095
|
-
|
|
1097
|
+
/**
|
|
1098
|
+
* A createServerFn or createServerQuery function with `mcp` metadata. It runs through its own
|
|
1099
|
+
* input schema, middleware and output schema, with the MCP request as its request.
|
|
1100
|
+
*/
|
|
1101
|
+
type FarmMCPServerFunction = ServerFn<any, any, any> | ServerQuery<any, any>;
|
|
1102
|
+
/** Compose endpoint references, server functions and standalone tools. */
|
|
1103
|
+
type FarmMCPToolDefinition = FarmMCPEndpoint | FarmMCPServerFunction | (EndpointMCPMetadata & {
|
|
1096
1104
|
endpoint: FarmMCPEndpoint;
|
|
1097
1105
|
execute?: never;
|
|
1098
1106
|
}) | FarmMCPStandaloneTool<any, unknown, any>;
|
|
@@ -1107,6 +1115,10 @@ type FarmMCPTool = Readonly<EndpointMCPMetadata> & {
|
|
|
1107
1115
|
readonly kind: "standalone";
|
|
1108
1116
|
readonly method?: never;
|
|
1109
1117
|
readonly path?: never;
|
|
1118
|
+
} | {
|
|
1119
|
+
readonly kind: "serverFunction";
|
|
1120
|
+
readonly method?: never;
|
|
1121
|
+
readonly path?: never;
|
|
1110
1122
|
});
|
|
1111
1123
|
interface FarmMCPServer {
|
|
1112
1124
|
readonly name: string;
|
|
@@ -3098,4 +3110,4 @@ interface MetadataRobots extends MetadataRobotsDirectives {
|
|
|
3098
3110
|
googleBot?: string | MetadataRobotsDirectives;
|
|
3099
3111
|
}
|
|
3100
3112
|
|
|
3101
|
-
export { type GenerateStaticParams as $, type AppRoutePattern as A, type BundleResultPayload as B, type PageRouteParams as C, type FarmMigrationCommand as D, type FarmMigrationsConfig as E, type FarmRouteRuntimeConfig as F, type FarmMigrationsUserConfig as G, type ResolvedFarmMigrationsConfig as H, type FarmContextFactoryInput as I, type FarmIsolatedClientHydrationMode as J, type LoadingProps as K, type LayoutProps as L, type Metadata as M, type NitroPreset as N, type ErrorProps as O, type ParsedRoute as P, type PagePropsWithMiddleware as Q, type RouteSegment as R, type MetadataProps as S, type LayoutMetadataProps as T, type Page as U, type Layout as V, type Loading as W, type ErrorBoundary as X, type StaticPathPrimitive as Y, type StaticPathParams as Z, type StaticRouteParams as _, type FarmPlugin as a, type InferPluginOptionsInput as a$, type LayoutModule as a0, type MetadataJsonLd as a1, type ServerAction as a2, type BuildOptions as a3, type SSGPage as a4, type SSGCollectionResult as a5, type MetadataRobotsDirectives as a6, type MetadataRobots as a7, type FarmLayerEntry as a8, type ResolvedFarmLayer as a9, createFarmDefaultLlmsTxt as aA, createFarmLlmsMarkdownReader as aB, renderFarmLlmsFullTxt as aC, manageFarmDocumentPreloads as aD, manageFarmHtmlPreloads as aE, manageFarmLinkHeaderPreloads as aF, reportFarmPreloadWarnings as aG, applyFarmCspNonceToResponse as aH, resolveFarmSecurityConfig as aI, type ResolvedSchemaField as aJ, type FarmSqlDialect as aK, type FarmSqlStatement as aL, type CollectedSchemaModel as aM, type FarmSchemaMigrationStep as aN, type OpenAPIConfig as aO, type FarmAgentUserConfig as aP, type FarmAgentCrawlers as aQ, type FarmCrawlerPolicy as aR, definePlugin as aS, FarmRuntimeShutdownError as aT, PluginManager as aU, type FarmPluginDatabase as aV, type FarmPluginDefinition as aW, FarmPluginOptionsError as aX, type FarmPluginFactory as aY, type FarmPluginOptionsIssue as aZ, type FarmPluginOptionsSchema as a_, type FarmSourceRoot as aa, type ResolveFarmLayersOptions as ab, type FarmLayerResolution as ac, resolveFarmLayers as ad, getFarmSourceRoots as ae, getFarmAppDirectories as af, getFarmLayerAliases as ag, createFarmConfigResolutionPlugin as ah, loadFarmConfigFile as ai, type ReadonlyMiddlewareStore as aj, type FarmMiddlewareConfig as ak, type MiddlewareModule as al, type MiddlewareConfig$1 as am, type MiddlewareContext as an, type ResolvedFarmRouteRuntimeConfig as ao, type ApplicationMetadataRouteKind as ap, type ResolvedFarmAPIConfig as aq, type ResolvedFarmDevtoolsConfig as ar, type ResolvedFarmDevIndicatorsConfig as as, type ResolvedFarmAuthConfig as at, type ResolvedFarmPerformanceConfig as au, type ResolvedFarmSecurityConfig as av, type APIRequestRuntime as aw, createFarmMetadataRouteResponse as ax, createFarmAgentRobots as ay, collectFarmLlmsTxtPages as az, type FarmRequest as b, type FarmPluginBuildHooks as b$, type InferPluginOptionsOutput as b0, resolveConfig as b1, loadConfig as b2, resolveDeployConfig as b3, resolveMigrationsConfig as b4, resolveDeployOutputPath as b5, normalizeDeployTarget as b6, getDeployTargetForPreset as b7, getPresetForDeployTarget as b8, type FarmLayerConfig as b9, type FarmMCPUserConfig as bA, type ResolvedFarmMCPConfig as bB, type PluginRequestContext as bC, type FarmPluginIntegrationContext as bD, type FarmPluginLifecycle as bE, type FarmRequestPluginContext as bF, type FarmRequestStore as bG, type FarmPluginRuntimeKind as bH, type FarmPluginRouteRuntimePayload as bI, type FarmPluginSetupContext as bJ, type FarmPluginStateContext as bK, type FarmPluginRuntimeBaseEvent as bL, type FarmPluginRuntimeContextEvent as bM, type FarmPluginRuntimeEndpoint as bN, type FarmPluginRuntimeEndpointEvent as bO, type FarmPluginRuntimeBeforeEvent as bP, type FarmPluginRuntimeAfterEvent as bQ, type FarmPluginRuntimeErrorEvent as bR, type FarmPluginRuntimeStartEvent as bS, type FarmPluginRuntimeCloseEvent as bT, type FarmPluginRuntimeHooks as bU, type FarmPluginRuntimeRequestOptions as bV, type FarmPluginRuntimeRequestHandler as bW, type FarmPluginRuntimeSession as bX, type FarmPluginDiscoveredRoute as bY, type FarmPluginRouterHooks as bZ, type FarmPluginRenderHooks as b_, type FarmPerformanceConfig as ba, type FarmPreloadMode as bb, type FarmPreloadUserConfig as bc, type ResolvedFarmPreloadConfig as bd, type FarmCspConfig as be, type FarmCspDirectives as bf, type FarmCspDirectiveValue as bg, type FarmCspOptions as bh, type FarmSecurityConfig as bi, type ResolvedFarmCspConfig as bj, MetadataRoute as bk, type MetadataRouteContext as bl, type FarmAuthConfig as bm, type FarmAuthDatabaseConfig as bn, type FarmAuthEmailAndPasswordConfig as bo, type FarmAuthSessionConfig as bp, type FarmAuthUserConfig as bq, type FarmMCPAuthorization as br, type FarmMCPEndpoint as bs, type FarmMCPToolDefinition as bt, type FarmMCPStandaloneTool as bu, type FarmMCPExecuteContext as bv, type FarmMCPTool as bw, type FarmMCPServer as bx, type FarmMCPAuthorizeContext as by, type FarmMCPConfig as bz, type FarmResponse as c, type FarmIntegrationLifecycleLogLevel as c$, type FarmPluginDevHooks as c0, type FarmPluginClientConfig as c1, type RouteDiscoveredPayload as c2, type RoutesGeneratedPayload as c3, type MiddlewareDiscoveredPayload as c4, type APIRouteDiscoveredPayload as c5, type RouteMatchPayload as c6, type RouteMatchResultPayload as c7, type RenderLifecyclePayload as c8, type APIHandlerLifecyclePayload as c9, escapeSqlString as cA, resolveSchemaModels as cB, type ResolvedSchemaModel as cC, type FarmIntegrationCategory as cD, type FarmIntegrationSlot as cE, type FarmIntegrationRouteParamValue as cF, type FarmIntegrationRouteParams as cG, type FarmIntegrationRouteMethod as cH, type FarmIntegrationRouteInputSource as cI, type FarmIntegrationValidationPathSegment as cJ, type FarmIntegrationRouteInput as cK, type FarmIntegrationValidationIssue as cL, type FarmIntegrationValidationErrorLike as cM, type FarmIntegrationValidationResult as cN, type FarmIntegrationStandardValidationResult as cO, type FarmIntegrationInputSchema as cP, type FarmIntegrationRouteInputSchemas as cQ, type FarmIntegrationRequestContextStore as cR, FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY as cS, FARM_INTEGRATION_SET_COOKIES_KEY as cT, forwardIntegrationSetCookies as cU, type FarmIntegrationRouteDb as cV, type FarmIntegrationRouteStorageArgs as cW, type FarmIntegrationRouteArgs as cX, type FarmIntegrationConfigContext as cY, type FarmIntegrationConfigDefinition as cZ, type FarmIntegrationConfigInput as c_, type ErrorLifecyclePayload as ca, type HMRUpdatePayload as cb, type BundleLifecyclePayload as cc, type NitroBuildLifecyclePayload as cd, type ShutdownPayload as ce, type ResolvedFarmConfig as cf, type RedirectConfig as cg, type HeaderConfig as ch, type RewriteConfig as ci, type ImageConfig as cj, type I18nConfig as ck, type MiddlewareConfig as cl, type FarmDeployConfig as cm, type ResolvedFarmDeployConfig as cn, type FarmDeployTarget as co, describeSchemaReference as cp, collectSchemaModels as cq, generateSqlStatements as cr, renderSqlSchemaFile as cs, getSqlColumnType as ct, getSqlDefaultExpression as cu, isNullableField as cv, quoteSqlIdentifier as cw, toSnakeCase as cx, toPascalCase as cy, toCamelCase as cz, type FarmPluginContext as d, type IntegrationOriginResult as d$, type FarmIntegrationLifecycleLogger as d0, type FarmIntegrationLifecycleContext as d1, type FarmIntegrationLifecycleHook as d2, type FarmIntegrationData as d3, type FarmIntegrationHandlerContext as d4, type FarmIntegrationRouteHookContext as d5, type FarmIntegrationRouteHook as d6, type FarmIntegrationRoute as d7, type FarmTypedIntegrationRoute as d8, type FarmIntegrationRouteMiddleware as d9, type FarmIntegrationEndpointValue as dA, type FarmIntegrationEndpoints as dB, type FarmIntegrationEndpointsFactoryContext as dC, type FarmIntegrationEndpointsFactory as dD, createIntegrationRoute as dE, integrationRoute as dF, type DefinedIntegration as dG, defineIntegration as dH, isFarmIntegration as dI, resolveIntegrationPlugins as dJ, getIntegrationProviders as dK, isFarmIntegrationProviderComponentReference as dL, getIntegrationDocumentNavigationMatchers as dM, getIntegrationSchemas as dN, getRegisteredIntegrationRuntime as dO, getRegisteredIntegrations as dP, getRegisteredIntegrationSchemas as dQ, matchIntegrationRoute as dR, matchRegisteredIntegrationRoute as dS, getRegisteredIntegrationAPIManifest as dT, dispatchIntegrationRequest as dU, dispatchIntegrationRequests as dV, describeIntegrationOriginRejection as dW, resolveIntegrationAllowedOrigins as dX, validateIntegrationRequestOrigin as dY, type IntegrationOriginPolicy as dZ, type IntegrationOriginRejection as d_, type FarmIntegrationMiddleware as da, type FarmIntegrationProviderProps as db, type FarmIntegrationProviderComponentReference as dc, type FarmIntegrationProvider as dd, type FarmIntegrationDocumentNavigation as de, type FarmIntegrationSchemaFieldType as df, type FarmIntegrationSchemaReference as dg, type FarmIntegrationSchemaField as dh, type FarmIntegrationSchemaConstraint as di, type FarmIntegrationSchemaModel as dj, type FarmIntegrationSchemaModelExtension as dk, type FarmIntegrationSchemaModelOverride as dl, type FarmIntegrationSchema as dm, defineIntegrationSchema as dn, type FarmIntegrationLogPhase as dp, type FarmIntegrationLogEvent as dq, type FarmIntegrationLogger as dr, type FarmIntegrationPluginOwner as ds, type FarmIntegrationContributedPlugin as dt, type FarmIntegrationsUserConfig as du, getFarmIntegrationPluginServerRuntime as dv, getFarmIntegrationPluginOwner as dw, type FarmIntegrationRouteFactory as dx, type FarmIntegrationRoutesFactoryContext as dy, type FarmIntegrationRoutesFactory as dz, type FarmRouteRuntime as e, resolveFarmDevIndicatorsConfig as e$, type FarmIntegrationOrmSchema as e0, type FarmIntegrationOrmClient as e1, type InferFarmIntegrationOrmField as e2, type InferFarmIntegrationOrmFields as e3, type InferFarmIntegrationOrmSchema as e4, type InferFarmIntegrationOrmClient as e5, type CreateIntegrationOrmOptions as e6, createIntegrationOrm as e7, resolveIntegrationOrmRuntimeClient as e8, farmIntegrationSchemaToOrmSchema as e9, type FarmRouteRuleCors as eA, type FarmRouteRule as eB, type FarmRouteRules as eC, normalizeRouteRules as eD, routeRulesToRedirects as eE, routeRulesToHeaders as eF, routeRulesToNitroRouteRules as eG, type FarmRouteRuntimeEntryKind as eH, type FarmRouteRenderingMode as eI, type FarmRouteRuntimeManifestEntry as eJ, type FarmRouteRuntimeManifest as eK, normalizeFarmRouteRuntimeConfig as eL, mergeFarmRouteRuntimeConfigs as eM, resolveFarmRouteRuntimeConfig as eN, hasFarmRouteRuntimeControls as eO, getFarmRouteRuntimeConfig as eP, createFarmRouteRuntimeKey as eQ, resolveFarmRouteRuleRuntimeConfig as eR, farmRouteRuleMatches as eS, DEFAULT_FARM_DEVTOOLS_SHORTCUT as eT, FARM_DEVTOOLS_PATH as eU, FARM_DEVTOOLS_LAUNCH_PARAM as eV, type FarmDevtoolsConfig as eW, type FarmDevtoolsUserConfig as eX, resolveFarmDevtoolsConfig as eY, type FarmBuildActivityPosition as eZ, type FarmDevIndicatorsConfig as e_, type IntegrationOrmModelNames as ea, DEFAULT_FARM_API_BASE_PATH as eb, type FarmAPIConfigResolverContext as ec, type FarmAPIConfigValue as ed, type FarmAPIConfig as ee, resolveFarmAPIConfig as ef, normalizeFarmAPIConfig as eg, normalizeFarmAPIBasePath as eh, getFarmAPIBaseURL as ei, resolveFarmAPIRequestURL as ej, type MiddlewareFunction as ek, type RequestMiddleware as el, type RequestMiddlewareContext as em, type MiddlewareStore as en, type MiddlewareChain as eo, type CookieJar as ep, type CookieOptions as eq, type RateLimitConfig as er, type RateLimitIncrementResult as es, type RateLimitStorage as et, type RateLimitStatus as eu, type MemoryRateLimitStorageOptions as ev, type NextFunction as ew, type MiddlewareResult as ex, type FarmRouteRuleRenderMode as ey, type FarmRouteRuleRedirect as ez, type FarmRouteRegions as f, generateFarmDevIndicatorsClientRuntime as f0, farmI18nClientBridgePlugin as f1, farmServerOnlyEntriesPlugin as f2, withFarmRequestTracing as f3, rewriteEarlySsrRelativeImports as f4, transformIsolatedClientBoundaryModule as f5, shouldEmitFarmClientRootHmr as f6, generateClientCachePersistenceCode as f7, resolveFarmClientCacheAdapterEntry as f8, type ClientCachePersistenceEntryCode as f9, FARM_NODE_RESPONSE_END_PENDING as fa, type FarmRouteMaxDuration as g, type FarmAppContext as h, type PageProps as i, type PluginContextProps as j, type RouteModule as k, type FarmMdxComponents as l, type FarmMdxResolvedConfig as m, resolveMdxConfig as n, type FarmMdxComponent as o, type FarmMdxUserConfig as p, type FarmUserConfig as q, resolveFarmMdxComponentsModulePath as r, type FarmAgentJsonLd as s, type FarmContextFactory as t, type MiddlewareProps as u, type FarmIntegration as v, type FarmConfig as w, farmPlugin as x, defineConfig as y, type FarmComponentType as z };
|
|
3113
|
+
export { type GenerateStaticParams as $, type AppRoutePattern as A, type BundleResultPayload as B, type PageRouteParams as C, type FarmMigrationCommand as D, type FarmMigrationsConfig as E, type FarmRouteRuntimeConfig as F, type FarmMigrationsUserConfig as G, type ResolvedFarmMigrationsConfig as H, type FarmContextFactoryInput as I, type FarmIsolatedClientHydrationMode as J, type LoadingProps as K, type LayoutProps as L, type Metadata as M, type NitroPreset as N, type ErrorProps as O, type ParsedRoute as P, type PagePropsWithMiddleware as Q, type RouteSegment as R, type MetadataProps as S, type LayoutMetadataProps as T, type Page as U, type Layout as V, type Loading as W, type ErrorBoundary as X, type StaticPathPrimitive as Y, type StaticPathParams as Z, type StaticRouteParams as _, type FarmPlugin as a, type InferPluginOptionsInput as a$, type LayoutModule as a0, type MetadataJsonLd as a1, type ServerAction as a2, type BuildOptions as a3, type SSGPage as a4, type SSGCollectionResult as a5, type MetadataRobotsDirectives as a6, type MetadataRobots as a7, type FarmLayerEntry as a8, type ResolvedFarmLayer as a9, createFarmDefaultLlmsTxt as aA, createFarmLlmsMarkdownReader as aB, renderFarmLlmsFullTxt as aC, manageFarmDocumentPreloads as aD, manageFarmHtmlPreloads as aE, manageFarmLinkHeaderPreloads as aF, reportFarmPreloadWarnings as aG, applyFarmCspNonceToResponse as aH, resolveFarmSecurityConfig as aI, type ResolvedSchemaField as aJ, type FarmSqlDialect as aK, type FarmSqlStatement as aL, type CollectedSchemaModel as aM, type FarmSchemaMigrationStep as aN, type OpenAPIConfig as aO, type FarmAgentUserConfig as aP, type FarmAgentCrawlers as aQ, type FarmCrawlerPolicy as aR, definePlugin as aS, FarmRuntimeShutdownError as aT, PluginManager as aU, type FarmPluginDatabase as aV, type FarmPluginDefinition as aW, FarmPluginOptionsError as aX, type FarmPluginFactory as aY, type FarmPluginOptionsIssue as aZ, type FarmPluginOptionsSchema as a_, type FarmSourceRoot as aa, type ResolveFarmLayersOptions as ab, type FarmLayerResolution as ac, resolveFarmLayers as ad, getFarmSourceRoots as ae, getFarmAppDirectories as af, getFarmLayerAliases as ag, createFarmConfigResolutionPlugin as ah, loadFarmConfigFile as ai, type ReadonlyMiddlewareStore as aj, type FarmMiddlewareConfig as ak, type MiddlewareModule as al, type MiddlewareConfig$1 as am, type MiddlewareContext as an, type ResolvedFarmRouteRuntimeConfig as ao, type ApplicationMetadataRouteKind as ap, type ResolvedFarmAPIConfig as aq, type ResolvedFarmDevtoolsConfig as ar, type ResolvedFarmDevIndicatorsConfig as as, type ResolvedFarmAuthConfig as at, type ResolvedFarmPerformanceConfig as au, type ResolvedFarmSecurityConfig as av, type APIRequestRuntime as aw, createFarmMetadataRouteResponse as ax, createFarmAgentRobots as ay, collectFarmLlmsTxtPages as az, type FarmRequest as b, type FarmPluginRenderHooks as b$, type InferPluginOptionsOutput as b0, resolveConfig as b1, loadConfig as b2, resolveDeployConfig as b3, resolveMigrationsConfig as b4, resolveDeployOutputPath as b5, normalizeDeployTarget as b6, getDeployTargetForPreset as b7, getPresetForDeployTarget as b8, type FarmLayerConfig as b9, type FarmMCPConfig as bA, type FarmMCPUserConfig as bB, type ResolvedFarmMCPConfig as bC, type PluginRequestContext as bD, type FarmPluginIntegrationContext as bE, type FarmPluginLifecycle as bF, type FarmRequestPluginContext as bG, type FarmRequestStore as bH, type FarmPluginRuntimeKind as bI, type FarmPluginRouteRuntimePayload as bJ, type FarmPluginSetupContext as bK, type FarmPluginStateContext as bL, type FarmPluginRuntimeBaseEvent as bM, type FarmPluginRuntimeContextEvent as bN, type FarmPluginRuntimeEndpoint as bO, type FarmPluginRuntimeEndpointEvent as bP, type FarmPluginRuntimeBeforeEvent as bQ, type FarmPluginRuntimeAfterEvent as bR, type FarmPluginRuntimeErrorEvent as bS, type FarmPluginRuntimeStartEvent as bT, type FarmPluginRuntimeCloseEvent as bU, type FarmPluginRuntimeHooks as bV, type FarmPluginRuntimeRequestOptions as bW, type FarmPluginRuntimeRequestHandler as bX, type FarmPluginRuntimeSession as bY, type FarmPluginDiscoveredRoute as bZ, type FarmPluginRouterHooks as b_, type FarmPerformanceConfig as ba, type FarmPreloadMode as bb, type FarmPreloadUserConfig as bc, type ResolvedFarmPreloadConfig as bd, type FarmCspConfig as be, type FarmCspDirectives as bf, type FarmCspDirectiveValue as bg, type FarmCspOptions as bh, type FarmSecurityConfig as bi, type ResolvedFarmCspConfig as bj, MetadataRoute as bk, type MetadataRouteContext as bl, type FarmAuthConfig as bm, type FarmAuthDatabaseConfig as bn, type FarmAuthEmailAndPasswordConfig as bo, type FarmAuthSessionConfig as bp, type FarmAuthUserConfig as bq, type FarmMCPAuthorization as br, type FarmMCPEndpoint as bs, type FarmMCPServerFunction as bt, type FarmMCPToolDefinition as bu, type FarmMCPStandaloneTool as bv, type FarmMCPExecuteContext as bw, type FarmMCPTool as bx, type FarmMCPServer as by, type FarmMCPAuthorizeContext as bz, type FarmResponse as c, type FarmIntegrationConfigInput as c$, type FarmPluginBuildHooks as c0, type FarmPluginDevHooks as c1, type FarmPluginClientConfig as c2, type RouteDiscoveredPayload as c3, type RoutesGeneratedPayload as c4, type MiddlewareDiscoveredPayload as c5, type APIRouteDiscoveredPayload as c6, type RouteMatchPayload as c7, type RouteMatchResultPayload as c8, type RenderLifecyclePayload as c9, toCamelCase as cA, escapeSqlString as cB, resolveSchemaModels as cC, type ResolvedSchemaModel as cD, type FarmIntegrationCategory as cE, type FarmIntegrationSlot as cF, type FarmIntegrationRouteParamValue as cG, type FarmIntegrationRouteParams as cH, type FarmIntegrationRouteMethod as cI, type FarmIntegrationRouteInputSource as cJ, type FarmIntegrationValidationPathSegment as cK, type FarmIntegrationRouteInput as cL, type FarmIntegrationValidationIssue as cM, type FarmIntegrationValidationErrorLike as cN, type FarmIntegrationValidationResult as cO, type FarmIntegrationStandardValidationResult as cP, type FarmIntegrationInputSchema as cQ, type FarmIntegrationRouteInputSchemas as cR, type FarmIntegrationRequestContextStore as cS, FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY as cT, FARM_INTEGRATION_SET_COOKIES_KEY as cU, forwardIntegrationSetCookies as cV, type FarmIntegrationRouteDb as cW, type FarmIntegrationRouteStorageArgs as cX, type FarmIntegrationRouteArgs as cY, type FarmIntegrationConfigContext as cZ, type FarmIntegrationConfigDefinition as c_, type APIHandlerLifecyclePayload as ca, type ErrorLifecyclePayload as cb, type HMRUpdatePayload as cc, type BundleLifecyclePayload as cd, type NitroBuildLifecyclePayload as ce, type ShutdownPayload as cf, type ResolvedFarmConfig as cg, type RedirectConfig as ch, type HeaderConfig as ci, type RewriteConfig as cj, type ImageConfig as ck, type I18nConfig as cl, type MiddlewareConfig as cm, type FarmDeployConfig as cn, type ResolvedFarmDeployConfig as co, type FarmDeployTarget as cp, describeSchemaReference as cq, collectSchemaModels as cr, generateSqlStatements as cs, renderSqlSchemaFile as ct, getSqlColumnType as cu, getSqlDefaultExpression as cv, isNullableField as cw, quoteSqlIdentifier as cx, toSnakeCase as cy, toPascalCase as cz, type FarmPluginContext as d, type IntegrationOriginRejection as d$, type FarmIntegrationLifecycleLogLevel as d0, type FarmIntegrationLifecycleLogger as d1, type FarmIntegrationLifecycleContext as d2, type FarmIntegrationLifecycleHook as d3, type FarmIntegrationData as d4, type FarmIntegrationHandlerContext as d5, type FarmIntegrationRouteHookContext as d6, type FarmIntegrationRouteHook as d7, type FarmIntegrationRoute as d8, type FarmTypedIntegrationRoute as d9, type FarmIntegrationRoutesFactory as dA, type FarmIntegrationEndpointValue as dB, type FarmIntegrationEndpoints as dC, type FarmIntegrationEndpointsFactoryContext as dD, type FarmIntegrationEndpointsFactory as dE, createIntegrationRoute as dF, integrationRoute as dG, type DefinedIntegration as dH, defineIntegration as dI, isFarmIntegration as dJ, resolveIntegrationPlugins as dK, getIntegrationProviders as dL, isFarmIntegrationProviderComponentReference as dM, getIntegrationDocumentNavigationMatchers as dN, getIntegrationSchemas as dO, getRegisteredIntegrationRuntime as dP, getRegisteredIntegrations as dQ, getRegisteredIntegrationSchemas as dR, matchIntegrationRoute as dS, matchRegisteredIntegrationRoute as dT, getRegisteredIntegrationAPIManifest as dU, dispatchIntegrationRequest as dV, dispatchIntegrationRequests as dW, describeIntegrationOriginRejection as dX, resolveIntegrationAllowedOrigins as dY, validateIntegrationRequestOrigin as dZ, type IntegrationOriginPolicy as d_, type FarmIntegrationRouteMiddleware as da, type FarmIntegrationMiddleware as db, type FarmIntegrationProviderProps as dc, type FarmIntegrationProviderComponentReference as dd, type FarmIntegrationProvider as de, type FarmIntegrationDocumentNavigation as df, type FarmIntegrationSchemaFieldType as dg, type FarmIntegrationSchemaReference as dh, type FarmIntegrationSchemaField as di, type FarmIntegrationSchemaConstraint as dj, type FarmIntegrationSchemaModel as dk, type FarmIntegrationSchemaModelExtension as dl, type FarmIntegrationSchemaModelOverride as dm, type FarmIntegrationSchema as dn, defineIntegrationSchema as dp, type FarmIntegrationLogPhase as dq, type FarmIntegrationLogEvent as dr, type FarmIntegrationLogger as ds, type FarmIntegrationPluginOwner as dt, type FarmIntegrationContributedPlugin as du, type FarmIntegrationsUserConfig as dv, getFarmIntegrationPluginServerRuntime as dw, getFarmIntegrationPluginOwner as dx, type FarmIntegrationRouteFactory as dy, type FarmIntegrationRoutesFactoryContext as dz, type FarmRouteRuntime as e, type FarmDevIndicatorsConfig as e$, type IntegrationOriginResult as e0, type FarmIntegrationOrmSchema as e1, type FarmIntegrationOrmClient as e2, type InferFarmIntegrationOrmField as e3, type InferFarmIntegrationOrmFields as e4, type InferFarmIntegrationOrmSchema as e5, type InferFarmIntegrationOrmClient as e6, type CreateIntegrationOrmOptions as e7, createIntegrationOrm as e8, resolveIntegrationOrmRuntimeClient as e9, type FarmRouteRuleRedirect as eA, type FarmRouteRuleCors as eB, type FarmRouteRule as eC, type FarmRouteRules as eD, normalizeRouteRules as eE, routeRulesToRedirects as eF, routeRulesToHeaders as eG, routeRulesToNitroRouteRules as eH, type FarmRouteRuntimeEntryKind as eI, type FarmRouteRenderingMode as eJ, type FarmRouteRuntimeManifestEntry as eK, type FarmRouteRuntimeManifest as eL, normalizeFarmRouteRuntimeConfig as eM, mergeFarmRouteRuntimeConfigs as eN, resolveFarmRouteRuntimeConfig as eO, hasFarmRouteRuntimeControls as eP, getFarmRouteRuntimeConfig as eQ, createFarmRouteRuntimeKey as eR, resolveFarmRouteRuleRuntimeConfig as eS, farmRouteRuleMatches as eT, DEFAULT_FARM_DEVTOOLS_SHORTCUT as eU, FARM_DEVTOOLS_PATH as eV, FARM_DEVTOOLS_LAUNCH_PARAM as eW, type FarmDevtoolsConfig as eX, type FarmDevtoolsUserConfig as eY, resolveFarmDevtoolsConfig as eZ, type FarmBuildActivityPosition as e_, farmIntegrationSchemaToOrmSchema as ea, type IntegrationOrmModelNames as eb, DEFAULT_FARM_API_BASE_PATH as ec, type FarmAPIConfigResolverContext as ed, type FarmAPIConfigValue as ee, type FarmAPIConfig as ef, resolveFarmAPIConfig as eg, normalizeFarmAPIConfig as eh, normalizeFarmAPIBasePath as ei, getFarmAPIBaseURL as ej, resolveFarmAPIRequestURL as ek, type MiddlewareFunction as el, type RequestMiddleware as em, type RequestMiddlewareContext as en, type MiddlewareStore as eo, type MiddlewareChain as ep, type CookieJar as eq, type CookieOptions as er, type RateLimitConfig as es, type RateLimitIncrementResult as et, type RateLimitStorage as eu, type RateLimitStatus as ev, type MemoryRateLimitStorageOptions as ew, type NextFunction as ex, type MiddlewareResult as ey, type FarmRouteRuleRenderMode as ez, type FarmRouteRegions as f, resolveFarmDevIndicatorsConfig as f0, generateFarmDevIndicatorsClientRuntime as f1, farmI18nClientBridgePlugin as f2, farmServerOnlyEntriesPlugin as f3, withFarmRequestTracing as f4, rewriteEarlySsrRelativeImports as f5, transformIsolatedClientBoundaryModule as f6, shouldEmitFarmClientRootHmr as f7, generateClientCachePersistenceCode as f8, resolveFarmClientCacheAdapterEntry as f9, type ClientCachePersistenceEntryCode as fa, FARM_NODE_RESPONSE_END_PENDING as fb, type FarmRouteMaxDuration as g, type FarmAppContext as h, type PageProps as i, type PluginContextProps as j, type RouteModule as k, type FarmMdxComponents as l, type FarmMdxResolvedConfig as m, resolveMdxConfig as n, type FarmMdxComponent as o, type FarmMdxUserConfig as p, type FarmUserConfig as q, resolveFarmMdxComponentsModulePath as r, type FarmAgentJsonLd as s, type FarmContextFactory as t, type MiddlewareProps as u, type FarmIntegration as v, type FarmConfig as w, farmPlugin as x, defineConfig as y, type FarmComponentType as z };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
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-DK06VuKP.mjs';
|
|
2
|
-
export { a as FarmPlugin, d as FarmPluginContext,
|
|
3
|
-
import './route-
|
|
2
|
+
export { a as FarmPlugin, d as FarmPluginContext, bG as FarmRequestPluginContext, bH as FarmRequestStore } from './client-plugins-CIPRtSsW.mjs';
|
|
3
|
+
import './route-C_eLaFTZ.mjs';
|
|
4
|
+
import './endpoint-Bu3XgeMK.mjs';
|
|
4
5
|
import './cache.mjs';
|
|
5
6
|
import './renderer.mjs';
|
|
6
7
|
import './deployment.mjs';
|
|
@@ -27,6 +28,8 @@ import './server-fn-error-DDh14a0V.mjs';
|
|
|
27
28
|
import 'esbuild';
|
|
28
29
|
import './image-config-Duob7wER.mjs';
|
|
29
30
|
import './types-Z0aotQ8w.mjs';
|
|
31
|
+
import './server-fn.mjs';
|
|
32
|
+
import './server-query.mjs';
|
|
30
33
|
import './types-DQnyD3VD.mjs';
|
|
31
34
|
import './font.mjs';
|
|
32
35
|
import './after.mjs';
|
package/dist/client-plugins.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
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-DK06VuKP.js';
|
|
2
|
-
export { a as FarmPlugin, d as FarmPluginContext,
|
|
3
|
-
import './route-
|
|
2
|
+
export { a as FarmPlugin, d as FarmPluginContext, bG as FarmRequestPluginContext, bH as FarmRequestStore } from './client-plugins-CqVtZi5X.js';
|
|
3
|
+
import './route-BxNJT447.js';
|
|
4
|
+
import './endpoint-kSAxE52R.js';
|
|
4
5
|
import './cache.js';
|
|
5
6
|
import './renderer.js';
|
|
6
7
|
import './deployment.js';
|
|
@@ -27,6 +28,8 @@ import './server-fn-error-DDh14a0V.js';
|
|
|
27
28
|
import 'esbuild';
|
|
28
29
|
import './image-config-Duob7wER.js';
|
|
29
30
|
import './types-Z0aotQ8w.js';
|
|
31
|
+
import './server-fn.js';
|
|
32
|
+
import './server-query.js';
|
|
30
33
|
import './types-DQnyD3VD.js';
|
|
31
34
|
import './font.js';
|
|
32
35
|
import './after.js';
|
package/dist/client.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as ClientOptions, g as APIResult } from './api-client-
|
|
2
|
-
export { v as APIClient, h as APIClientError, b as APIClientOptions, i as APIClientSystemError, c as APIClientWithoutIntegrationsOptions, x as ApiClients, L as ClientHeaders, M as ClientLifecycleHooks, N as ClientRequestEvent, P as ClientResponseEvent, a9 as InferIntegrationOperationBody, aa as InferIntegrationOperationQuery, ab as InferIntegrationOperationResponse, a5 as IntegrationAPI, a0 as IntegrationClient, a1 as IntegrationClientAliases, a7 as IntegrationClientData, T as IntegrationClientError, a3 as IntegrationClientOptions, a4 as IntegrationClientRequestOptions, a2 as IntegrationClientRoot, a6 as IntegrationClients, a8 as IntegrationOperationResult, ac as IntegrationServerClient, ad as IntegrationServerClientAliases, ae as IntegrationServerClientOptions, af as IntegrationServerClientRequestOptions, ag as IntegrationServerClientRoot, ah as IntegrationServerRequestLike, u as RouteAPIClient, w as ServerAPIClient, S as ServerAPIClientOptions, d as ServerAPIClientWithoutIntegrationsOptions, z as createAPIClient, y as createApiClients, U as createIntegrationApi, Q as createIntegrationClient, V as createIntegrationClients, X as createIntegrationServerClient, W as createIntegrations, E as createServerAPIClient, Y as getIntegrationAPIManifest, Z as integrationClients, _ as integrationsClient, $ as integrationsServer } from './api-client-
|
|
3
|
-
export {
|
|
1
|
+
import { r as ClientOptions, g as APIResult } from './api-client-B-n3pm_Q.mjs';
|
|
2
|
+
export { v as APIClient, h as APIClientError, b as APIClientOptions, i as APIClientSystemError, c as APIClientWithoutIntegrationsOptions, x as ApiClients, L as ClientHeaders, M as ClientLifecycleHooks, N as ClientRequestEvent, P as ClientResponseEvent, a9 as InferIntegrationOperationBody, aa as InferIntegrationOperationQuery, ab as InferIntegrationOperationResponse, a5 as IntegrationAPI, a0 as IntegrationClient, a1 as IntegrationClientAliases, a7 as IntegrationClientData, T as IntegrationClientError, a3 as IntegrationClientOptions, a4 as IntegrationClientRequestOptions, a2 as IntegrationClientRoot, a6 as IntegrationClients, a8 as IntegrationOperationResult, ac as IntegrationServerClient, ad as IntegrationServerClientAliases, ae as IntegrationServerClientOptions, af as IntegrationServerClientRequestOptions, ag as IntegrationServerClientRoot, ah as IntegrationServerRequestLike, u as RouteAPIClient, w as ServerAPIClient, S as ServerAPIClientOptions, d as ServerAPIClientWithoutIntegrationsOptions, z as createAPIClient, y as createApiClients, U as createIntegrationApi, Q as createIntegrationClient, V as createIntegrationClients, X as createIntegrationServerClient, W as createIntegrations, E as createServerAPIClient, Y as getIntegrationAPIManifest, Z as integrationClients, _ as integrationsClient, $ as integrationsServer } from './api-client-B-n3pm_Q.mjs';
|
|
3
|
+
export { K as FarmAPIStream } from './endpoint-Bu3XgeMK.mjs';
|
|
4
4
|
import React__default, { ComponentType, FormHTMLAttributes, FormEvent, AnchorHTMLAttributes, RefObject } from 'react';
|
|
5
5
|
export { RouteActionTarget, UseActionFormProps, UseActionReturn, UseServerFnOptions, useAction } from './server-fn-client.mjs';
|
|
6
6
|
export { UseServerQueryOptions, UseServerQueryResult, useServerQuery } from './server-query-client.mjs';
|
|
@@ -8,19 +8,20 @@ export { a as FarmClientCacheEntry, b as FarmClientCacheKey, F as FarmClientCach
|
|
|
8
8
|
export { F as FarmIntegrationAPI, c as FarmIntegrationAPIBodyFormat, e as FarmIntegrationAPIMethod, f as FarmIntegrationAPIOperation, g as FarmIntegrationAPIResponseFormat, a as api, d as defineIntegrationAPI, b as defineIntegrationAPIOperation, i as endpoint } from './integration-api-BbaiokCC.mjs';
|
|
9
9
|
export { UseThemeResult, useTheme } from './theme/client.mjs';
|
|
10
10
|
import { FarmRouterPathParams, FarmRouterPathParam, FarmRouterBuildOptions, FarmRouterRouteInput } from './router.mjs';
|
|
11
|
-
import { i as FarmViewTransitionMode, e as FarmNavigationBlockerContext, F as FarmNavigationState } from './spa-router-
|
|
12
|
-
export { a as FarmNavigateOptions, d as FarmNavigationBlocker, f as FarmNavigationListener, h as FarmNavigationLocation, S as SPARouter, g as getRouter, n as navigateTo, p as prefetch, b as pushState, r as readPageState, c as replaceState } from './spa-router-
|
|
11
|
+
import { i as FarmViewTransitionMode, e as FarmNavigationBlockerContext, F as FarmNavigationState } from './spa-router-BcS_4nqm.mjs';
|
|
12
|
+
export { a as FarmNavigateOptions, d as FarmNavigationBlocker, f as FarmNavigationListener, h as FarmNavigationLocation, S as SPARouter, g as getRouter, n as navigateTo, p as prefetch, b as pushState, r as readPageState, c as replaceState } from './spa-router-BcS_4nqm.mjs';
|
|
13
13
|
import { b as FarmI18nLocale } from './types-Z0aotQ8w.mjs';
|
|
14
14
|
export { F as FarmChunkRecoveryOptions, i as installChunkErrorRecovery, a as isChunkLoadError } from './chunk-recovery-lnQFzcQP.mjs';
|
|
15
15
|
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-DK06VuKP.mjs';
|
|
16
16
|
export { S as ServerQueryFetchOptions, f as fetchServerQuery, p as prefetchServerQuery } from './server-query-runtime-aP52iuL5.mjs';
|
|
17
17
|
export { getTheme, setTheme, toggleTheme } from './theme/runtime.mjs';
|
|
18
18
|
import './cache.mjs';
|
|
19
|
+
import './route-C_eLaFTZ.mjs';
|
|
19
20
|
import './server-fn.mjs';
|
|
20
21
|
import './server-fn-error-DDh14a0V.mjs';
|
|
21
22
|
import './server-query.mjs';
|
|
22
23
|
import './types-DQnyD3VD.mjs';
|
|
23
|
-
import './client-plugins-
|
|
24
|
+
import './client-plugins-CIPRtSsW.mjs';
|
|
24
25
|
import './renderer.mjs';
|
|
25
26
|
import './deployment.mjs';
|
|
26
27
|
import 'http';
|
|
@@ -46,7 +47,7 @@ import './font.mjs';
|
|
|
46
47
|
import './after.mjs';
|
|
47
48
|
import 'node:http';
|
|
48
49
|
import './island-CfGru1MO.mjs';
|
|
49
|
-
import './render-plan-
|
|
50
|
+
import './render-plan-io7pvDNc.mjs';
|
|
50
51
|
|
|
51
52
|
type MutationStatus = "idle" | "pending" | "success" | "error";
|
|
52
53
|
type AnyMutationTarget = (...args: any[]) => Promise<any>;
|
package/dist/client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as ClientOptions, g as APIResult } from './api-client-
|
|
2
|
-
export { v as APIClient, h as APIClientError, b as APIClientOptions, i as APIClientSystemError, c as APIClientWithoutIntegrationsOptions, x as ApiClients, L as ClientHeaders, M as ClientLifecycleHooks, N as ClientRequestEvent, P as ClientResponseEvent, a9 as InferIntegrationOperationBody, aa as InferIntegrationOperationQuery, ab as InferIntegrationOperationResponse, a5 as IntegrationAPI, a0 as IntegrationClient, a1 as IntegrationClientAliases, a7 as IntegrationClientData, T as IntegrationClientError, a3 as IntegrationClientOptions, a4 as IntegrationClientRequestOptions, a2 as IntegrationClientRoot, a6 as IntegrationClients, a8 as IntegrationOperationResult, ac as IntegrationServerClient, ad as IntegrationServerClientAliases, ae as IntegrationServerClientOptions, af as IntegrationServerClientRequestOptions, ag as IntegrationServerClientRoot, ah as IntegrationServerRequestLike, u as RouteAPIClient, w as ServerAPIClient, S as ServerAPIClientOptions, d as ServerAPIClientWithoutIntegrationsOptions, z as createAPIClient, y as createApiClients, U as createIntegrationApi, Q as createIntegrationClient, V as createIntegrationClients, X as createIntegrationServerClient, W as createIntegrations, E as createServerAPIClient, Y as getIntegrationAPIManifest, Z as integrationClients, _ as integrationsClient, $ as integrationsServer } from './api-client-
|
|
3
|
-
export {
|
|
1
|
+
import { r as ClientOptions, g as APIResult } from './api-client-C0_NZEBl.js';
|
|
2
|
+
export { v as APIClient, h as APIClientError, b as APIClientOptions, i as APIClientSystemError, c as APIClientWithoutIntegrationsOptions, x as ApiClients, L as ClientHeaders, M as ClientLifecycleHooks, N as ClientRequestEvent, P as ClientResponseEvent, a9 as InferIntegrationOperationBody, aa as InferIntegrationOperationQuery, ab as InferIntegrationOperationResponse, a5 as IntegrationAPI, a0 as IntegrationClient, a1 as IntegrationClientAliases, a7 as IntegrationClientData, T as IntegrationClientError, a3 as IntegrationClientOptions, a4 as IntegrationClientRequestOptions, a2 as IntegrationClientRoot, a6 as IntegrationClients, a8 as IntegrationOperationResult, ac as IntegrationServerClient, ad as IntegrationServerClientAliases, ae as IntegrationServerClientOptions, af as IntegrationServerClientRequestOptions, ag as IntegrationServerClientRoot, ah as IntegrationServerRequestLike, u as RouteAPIClient, w as ServerAPIClient, S as ServerAPIClientOptions, d as ServerAPIClientWithoutIntegrationsOptions, z as createAPIClient, y as createApiClients, U as createIntegrationApi, Q as createIntegrationClient, V as createIntegrationClients, X as createIntegrationServerClient, W as createIntegrations, E as createServerAPIClient, Y as getIntegrationAPIManifest, Z as integrationClients, _ as integrationsClient, $ as integrationsServer } from './api-client-C0_NZEBl.js';
|
|
3
|
+
export { K as FarmAPIStream } from './endpoint-kSAxE52R.js';
|
|
4
4
|
import React__default, { ComponentType, FormHTMLAttributes, FormEvent, AnchorHTMLAttributes, RefObject } from 'react';
|
|
5
5
|
export { RouteActionTarget, UseActionFormProps, UseActionReturn, UseServerFnOptions, useAction } from './server-fn-client.js';
|
|
6
6
|
export { UseServerQueryOptions, UseServerQueryResult, useServerQuery } from './server-query-client.js';
|
|
@@ -8,19 +8,20 @@ export { a as FarmClientCacheEntry, b as FarmClientCacheKey, F as FarmClientCach
|
|
|
8
8
|
export { F as FarmIntegrationAPI, c as FarmIntegrationAPIBodyFormat, e as FarmIntegrationAPIMethod, f as FarmIntegrationAPIOperation, g as FarmIntegrationAPIResponseFormat, a as api, d as defineIntegrationAPI, b as defineIntegrationAPIOperation, i as endpoint } from './integration-api-BbaiokCC.js';
|
|
9
9
|
export { UseThemeResult, useTheme } from './theme/client.js';
|
|
10
10
|
import { FarmRouterPathParams, FarmRouterPathParam, FarmRouterBuildOptions, FarmRouterRouteInput } from './router.js';
|
|
11
|
-
import { i as FarmViewTransitionMode, e as FarmNavigationBlockerContext, F as FarmNavigationState } from './spa-router-
|
|
12
|
-
export { a as FarmNavigateOptions, d as FarmNavigationBlocker, f as FarmNavigationListener, h as FarmNavigationLocation, S as SPARouter, g as getRouter, n as navigateTo, p as prefetch, b as pushState, r as readPageState, c as replaceState } from './spa-router-
|
|
11
|
+
import { i as FarmViewTransitionMode, e as FarmNavigationBlockerContext, F as FarmNavigationState } from './spa-router-BzFBUJkn.js';
|
|
12
|
+
export { a as FarmNavigateOptions, d as FarmNavigationBlocker, f as FarmNavigationListener, h as FarmNavigationLocation, S as SPARouter, g as getRouter, n as navigateTo, p as prefetch, b as pushState, r as readPageState, c as replaceState } from './spa-router-BzFBUJkn.js';
|
|
13
13
|
import { b as FarmI18nLocale } from './types-Z0aotQ8w.js';
|
|
14
14
|
export { F as FarmChunkRecoveryOptions, i as installChunkErrorRecovery, a as isChunkLoadError } from './chunk-recovery-lnQFzcQP.js';
|
|
15
15
|
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-DK06VuKP.js';
|
|
16
16
|
export { S as ServerQueryFetchOptions, f as fetchServerQuery, p as prefetchServerQuery } from './server-query-runtime-DXRNhX_3.js';
|
|
17
17
|
export { getTheme, setTheme, toggleTheme } from './theme/runtime.js';
|
|
18
18
|
import './cache.js';
|
|
19
|
+
import './route-BxNJT447.js';
|
|
19
20
|
import './server-fn.js';
|
|
20
21
|
import './server-fn-error-DDh14a0V.js';
|
|
21
22
|
import './server-query.js';
|
|
22
23
|
import './types-DQnyD3VD.js';
|
|
23
|
-
import './client-plugins-
|
|
24
|
+
import './client-plugins-CqVtZi5X.js';
|
|
24
25
|
import './renderer.js';
|
|
25
26
|
import './deployment.js';
|
|
26
27
|
import 'http';
|
|
@@ -46,7 +47,7 @@ import './font.js';
|
|
|
46
47
|
import './after.js';
|
|
47
48
|
import 'node:http';
|
|
48
49
|
import './island-CfGru1MO.js';
|
|
49
|
-
import './render-plan-
|
|
50
|
+
import './render-plan-Be4ZGTJP.js';
|
|
50
51
|
|
|
51
52
|
type MutationStatus = "idle" | "pending" | "success" | "error";
|
|
52
53
|
type AnyMutationTarget = (...args: any[]) => Promise<any>;
|
package/dist/config.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { q as FarmUserConfig } from './client-plugins-
|
|
1
|
+
import { q as FarmUserConfig } from './client-plugins-CIPRtSsW.mjs';
|
|
2
2
|
import './lifecycle-DK06VuKP.mjs';
|
|
3
|
-
import './route-
|
|
3
|
+
import './route-C_eLaFTZ.mjs';
|
|
4
|
+
import './endpoint-Bu3XgeMK.mjs';
|
|
4
5
|
import './cache.mjs';
|
|
5
6
|
import './renderer.mjs';
|
|
6
7
|
import './deployment.mjs';
|
|
@@ -27,6 +28,8 @@ import './server-fn-error-DDh14a0V.mjs';
|
|
|
27
28
|
import 'esbuild';
|
|
28
29
|
import './image-config-Duob7wER.mjs';
|
|
29
30
|
import './types-Z0aotQ8w.mjs';
|
|
31
|
+
import './server-fn.mjs';
|
|
32
|
+
import './server-query.mjs';
|
|
30
33
|
import './types-DQnyD3VD.mjs';
|
|
31
34
|
import './font.mjs';
|
|
32
35
|
import './after.mjs';
|
package/dist/config.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { q as FarmUserConfig } from './client-plugins-
|
|
1
|
+
import { q as FarmUserConfig } from './client-plugins-CqVtZi5X.js';
|
|
2
2
|
import './lifecycle-DK06VuKP.js';
|
|
3
|
-
import './route-
|
|
3
|
+
import './route-BxNJT447.js';
|
|
4
|
+
import './endpoint-kSAxE52R.js';
|
|
4
5
|
import './cache.js';
|
|
5
6
|
import './renderer.js';
|
|
6
7
|
import './deployment.js';
|
|
@@ -27,6 +28,8 @@ import './server-fn-error-DDh14a0V.js';
|
|
|
27
28
|
import 'esbuild';
|
|
28
29
|
import './image-config-Duob7wER.js';
|
|
29
30
|
import './types-Z0aotQ8w.js';
|
|
31
|
+
import './server-fn.js';
|
|
32
|
+
import './server-query.js';
|
|
30
33
|
import './types-DQnyD3VD.js';
|
|
31
34
|
import './font.js';
|
|
32
35
|
import './after.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDeployTargetForPreset
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IXTEENRS.mjs";
|
|
4
4
|
import "./chunk-XZNTNMHT.mjs";
|
|
5
5
|
import "./chunk-FZC7EEPM.mjs";
|
|
6
6
|
import "./chunk-JBSVKMC5.mjs";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
resolveCronConfig
|
|
14
14
|
} from "./chunk-4L7SZOHZ.mjs";
|
|
15
15
|
import "./chunk-QCFFHV5H.mjs";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-7HDZYYS4.mjs";
|
|
17
17
|
import "./chunk-FA2W42OV.mjs";
|
|
18
18
|
import "./chunk-6SCB2MXB.mjs";
|
|
19
19
|
import "./chunk-MUUZJLCI.mjs";
|
package/dist/docs.cjs
CHANGED
|
@@ -4640,6 +4640,7 @@ var import_node_path6 = require("path");
|
|
|
4640
4640
|
|
|
4641
4641
|
// src/env.ts
|
|
4642
4642
|
var FARM_ENV_SYMBOL = /* @__PURE__ */ Symbol.for("farm.env");
|
|
4643
|
+
var FARM_ENV_RUNTIME_SYMBOL = /* @__PURE__ */ Symbol.for("farm.env.runtime");
|
|
4643
4644
|
var farmEnvGlobal = globalThis;
|
|
4644
4645
|
var currentEnv = getInitialEnv();
|
|
4645
4646
|
var env = createEnvProxy("server");
|
|
@@ -4653,7 +4654,7 @@ function createEnvProxy(scope) {
|
|
|
4653
4654
|
return void 0;
|
|
4654
4655
|
}
|
|
4655
4656
|
const env2 = getEnvScope(scope);
|
|
4656
|
-
return env2[property];
|
|
4657
|
+
return scope === "server" ? readServerEnvKey(env2, property) : env2[property];
|
|
4657
4658
|
},
|
|
4658
4659
|
ownKeys() {
|
|
4659
4660
|
return Reflect.ownKeys(getEnvScope(scope));
|
|
@@ -4677,12 +4678,75 @@ function createEnvProxy(scope) {
|
|
|
4677
4678
|
}
|
|
4678
4679
|
__name(createEnvProxy, "createEnvProxy");
|
|
4679
4680
|
function getEnvScope(scope) {
|
|
4681
|
+
const env2 = getCurrentEnv();
|
|
4680
4682
|
if (scope === "server") {
|
|
4681
4683
|
assertServerEnvAccess();
|
|
4684
|
+
readRuntimeServerEnv(env2);
|
|
4682
4685
|
}
|
|
4683
|
-
return
|
|
4686
|
+
return env2[scope] || {};
|
|
4684
4687
|
}
|
|
4685
4688
|
__name(getEnvScope, "getEnvScope");
|
|
4689
|
+
function readServerEnvKey(server, key) {
|
|
4690
|
+
const value = server[key];
|
|
4691
|
+
if (value === void 0) {
|
|
4692
|
+
const state = getCurrentEnv()[FARM_ENV_RUNTIME_SYMBOL];
|
|
4693
|
+
if (state && key in state.pending && !state.warned.has(key)) {
|
|
4694
|
+
state.warned.add(key);
|
|
4695
|
+
console.warn(
|
|
4696
|
+
`[Farm] Server env "${key}" was set when this app was built but is not set where the server runs, so it reads as undefined. Farm reads server env at runtime and does not store it in the build output; set "${key}" in the server's environment.`
|
|
4697
|
+
);
|
|
4698
|
+
}
|
|
4699
|
+
}
|
|
4700
|
+
return value;
|
|
4701
|
+
}
|
|
4702
|
+
__name(readServerEnvKey, "readServerEnvKey");
|
|
4703
|
+
function readRuntimeServerEnv(env2) {
|
|
4704
|
+
const state = env2[FARM_ENV_RUNTIME_SYMBOL];
|
|
4705
|
+
if (!state) return;
|
|
4706
|
+
const source = getProcessEnv();
|
|
4707
|
+
for (const [key, type] of Object.entries(state.pending)) {
|
|
4708
|
+
const raw = source[key];
|
|
4709
|
+
if (raw === void 0) continue;
|
|
4710
|
+
env2.server[key] = coerceRuntimeEnvValue(raw, type);
|
|
4711
|
+
delete state.pending[key];
|
|
4712
|
+
}
|
|
4713
|
+
}
|
|
4714
|
+
__name(readRuntimeServerEnv, "readRuntimeServerEnv");
|
|
4715
|
+
function coerceRuntimeEnvValue(raw, type) {
|
|
4716
|
+
if (type === "number") {
|
|
4717
|
+
const value = Number(raw);
|
|
4718
|
+
return raw.trim() !== "" && Number.isFinite(value) ? value : raw;
|
|
4719
|
+
}
|
|
4720
|
+
if (type === "boolean") {
|
|
4721
|
+
if (/^(true|1)$/i.test(raw.trim())) return true;
|
|
4722
|
+
if (/^(false|0|)$/i.test(raw.trim())) return false;
|
|
4723
|
+
return raw;
|
|
4724
|
+
}
|
|
4725
|
+
if (type === "json") {
|
|
4726
|
+
try {
|
|
4727
|
+
return JSON.parse(raw);
|
|
4728
|
+
} catch {
|
|
4729
|
+
return raw;
|
|
4730
|
+
}
|
|
4731
|
+
}
|
|
4732
|
+
return raw;
|
|
4733
|
+
}
|
|
4734
|
+
__name(coerceRuntimeEnvValue, "coerceRuntimeEnvValue");
|
|
4735
|
+
function prepareEnv(env2) {
|
|
4736
|
+
const normalized = normalizeResolvedEnv(env2);
|
|
4737
|
+
const runtime = env2.runtime?.server;
|
|
4738
|
+
if (!isRecord(runtime) || Object.keys(runtime).length === 0) return normalized;
|
|
4739
|
+
const prepared = { server: { ...normalized.server }, public: normalized.public };
|
|
4740
|
+
Object.defineProperty(prepared, FARM_ENV_RUNTIME_SYMBOL, {
|
|
4741
|
+
value: {
|
|
4742
|
+
pending: { ...runtime },
|
|
4743
|
+
warned: /* @__PURE__ */ new Set()
|
|
4744
|
+
},
|
|
4745
|
+
enumerable: false
|
|
4746
|
+
});
|
|
4747
|
+
return prepared;
|
|
4748
|
+
}
|
|
4749
|
+
__name(prepareEnv, "prepareEnv");
|
|
4686
4750
|
function assertServerEnvAccess() {
|
|
4687
4751
|
if (typeof window !== "undefined") {
|
|
4688
4752
|
throw new Error("Farm server env is not available in the browser. Use publicEnv.");
|
|
@@ -4713,7 +4777,7 @@ __name(getCurrentEnv, "getCurrentEnv");
|
|
|
4713
4777
|
function getInjectedEnv() {
|
|
4714
4778
|
try {
|
|
4715
4779
|
if (typeof __FARM_ENV__ !== "undefined" && __FARM_ENV__) {
|
|
4716
|
-
return
|
|
4780
|
+
return prepareEnv(__FARM_ENV__);
|
|
4717
4781
|
}
|
|
4718
4782
|
} catch {
|
|
4719
4783
|
}
|
|
@@ -4741,6 +4805,13 @@ function isRecord(value) {
|
|
|
4741
4805
|
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
4742
4806
|
}
|
|
4743
4807
|
__name(isRecord, "isRecord");
|
|
4808
|
+
function getProcessEnv() {
|
|
4809
|
+
if (typeof process !== "undefined" && process.env) {
|
|
4810
|
+
return process.env;
|
|
4811
|
+
}
|
|
4812
|
+
return {};
|
|
4813
|
+
}
|
|
4814
|
+
__name(getProcessEnv, "getProcessEnv");
|
|
4744
4815
|
|
|
4745
4816
|
// src/app-markdown-config.ts
|
|
4746
4817
|
var import_node_path7 = __toESM(require("path"));
|
package/dist/docs.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
createFarmDocsAdapterHandler,
|
|
5
5
|
hasFarmDocsRuntimeAdapter,
|
|
6
6
|
isFarmDocsAPIRequest
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NUD6XBMO.mjs";
|
|
8
8
|
import {
|
|
9
9
|
createFarmDocsHandler,
|
|
10
10
|
discoverFarmDocsPages,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "./chunk-MOQNHLTS.mjs";
|
|
17
17
|
import "./chunk-UP4CW6WP.mjs";
|
|
18
18
|
import "./chunk-TFQG7TBC.mjs";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-IXTEENRS.mjs";
|
|
20
20
|
import "./chunk-XZNTNMHT.mjs";
|
|
21
21
|
import "./chunk-TVGP4BBZ.mjs";
|
|
22
22
|
import "./chunk-FZC7EEPM.mjs";
|
|
@@ -28,7 +28,7 @@ import "./chunk-Q3MDL7TM.mjs";
|
|
|
28
28
|
import "./chunk-G2KY33I6.mjs";
|
|
29
29
|
import "./chunk-4L7SZOHZ.mjs";
|
|
30
30
|
import "./chunk-QCFFHV5H.mjs";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-7HDZYYS4.mjs";
|
|
32
32
|
import "./chunk-FA2W42OV.mjs";
|
|
33
33
|
import "./chunk-6SCB2MXB.mjs";
|
|
34
34
|
import "./chunk-MUUZJLCI.mjs";
|
|
@@ -129,7 +129,7 @@ type MaybePromise<T> = T | Promise<T>;
|
|
|
129
129
|
type Simplify<T> = {
|
|
130
130
|
[TKey in keyof T]: T[TKey];
|
|
131
131
|
} & {};
|
|
132
|
-
type UnionToIntersection
|
|
132
|
+
type UnionToIntersection<T> = (T extends unknown ? (value: T) => void : never) extends (value: infer TIntersection) => void ? TIntersection : never;
|
|
133
133
|
type InferOutput<T> = RouteSchemaOutput<T>;
|
|
134
134
|
type InferInput<T> = T extends {
|
|
135
135
|
_input: infer I;
|
|
@@ -222,7 +222,7 @@ type ValidateEndpointMiddlewares<TMiddlewares extends readonly AnyEndpointMiddle
|
|
|
222
222
|
};
|
|
223
223
|
type ContextFromMiddlewareResult<TResult> = Exclude<TResult, Response | boolean> extends infer TContext ? [TContext] extends [never] ? {} : TContext extends object ? TContext : {} : {};
|
|
224
224
|
type ContextFromMiddleware<TMiddleware> = TMiddleware extends (...args: any[]) => infer TResult ? ContextFromMiddlewareResult<Awaited<TResult>> : {};
|
|
225
|
-
type InferEndpointMiddlewareContext<TMiddlewares extends readonly ((...args: any[]) => any)[], TContext extends object = {}> = TMiddlewares extends readonly [infer TMiddleware, ...infer TRest] ? TMiddleware extends (...args: any[]) => any ? TRest extends readonly ((...args: any[]) => any)[] ? InferEndpointMiddlewareContext<TRest, Simplify<TContext & ContextFromMiddleware<TMiddleware>>> : Simplify<TContext> : Simplify<TContext> : number extends TMiddlewares["length"] ? Simplify<TContext & UnionToIntersection
|
|
225
|
+
type InferEndpointMiddlewareContext<TMiddlewares extends readonly ((...args: any[]) => any)[], TContext extends object = {}> = TMiddlewares extends readonly [infer TMiddleware, ...infer TRest] ? TMiddleware extends (...args: any[]) => any ? TRest extends readonly ((...args: any[]) => any)[] ? InferEndpointMiddlewareContext<TRest, Simplify<TContext & ContextFromMiddleware<TMiddleware>>> : Simplify<TContext> : Simplify<TContext> : number extends TMiddlewares["length"] ? Simplify<TContext & UnionToIntersection<ContextFromMiddleware<TMiddlewares[number]>>> : Simplify<TContext>;
|
|
226
226
|
type EndpointOptions<TBody extends AnySchema = never, TQuery extends AnySchema = never, THeaders extends AnySchema = never, TMiddlewares extends readonly AnyEndpointMiddleware[] = readonly [], TErrors extends EndpointErrorDefinitions = {}> = {
|
|
227
227
|
method?: "GET" | "HEAD" | "QUERY" | "POST" | "PUT" | "DELETE" | "PATCH" | "OPTIONS";
|
|
228
228
|
body?: TBody;
|
|
@@ -364,129 +364,4 @@ declare function OPTIONS<T = any>(handler: EndpointHandler<never, never, never,
|
|
|
364
364
|
declare function OPTIONS<const TOptions extends MethodlessEndpointOptions, TResponse = any>(options: TOptions, handler: ValidatedEndpointHandlerFromOptions<TOptions, TResponse>): CreatedEndpointFromOptions<TOptions, TResponse>;
|
|
365
365
|
declare function OPTIONS<TBody extends AnySchema = never, TQuery extends AnySchema = never, THeaders extends AnySchema = never, TResponse = any>(options: Omit<EndpointOptions<TBody, TQuery, THeaders, readonly []>, "method">, handler: EndpointHandler<TBody, TQuery, THeaders, TResponse>): CreatedEndpoint<TBody, TQuery, THeaders, TResponse>;
|
|
366
366
|
|
|
367
|
-
type
|
|
368
|
-
type RoutePathParams<Path extends string> = Path extends `${infer Head}/${infer Tail}` ? RoutePathParams<Head> & RoutePathParams<Tail> : Path extends `[[...${infer Name}]]` ? {
|
|
369
|
-
[K in Name]?: string[];
|
|
370
|
-
} : Path extends `[...${infer Name}]` ? {
|
|
371
|
-
[K in Name]: string[];
|
|
372
|
-
} : Path extends `[${infer Name}]` ? {
|
|
373
|
-
[K in Name]: string;
|
|
374
|
-
} : {};
|
|
375
|
-
interface RouteInputSchemas {
|
|
376
|
-
body?: RouteSchema;
|
|
377
|
-
query?: RouteSchema;
|
|
378
|
-
params?: RouteSchema;
|
|
379
|
-
headers?: RouteSchema;
|
|
380
|
-
}
|
|
381
|
-
type Input<I, K extends PropertyKey> = K extends keyof I ? RouteSchemaInput<I[K]> : never;
|
|
382
|
-
type Output<I, K extends PropertyKey, Fallback = unknown> = K extends keyof I ? RouteSchemaOutput<I[K]> : Fallback;
|
|
383
|
-
/** JSON responses have wire types, not server-side instances such as Date. */
|
|
384
|
-
type RouteJSON<T> = T extends Response ? unknown : T extends {
|
|
385
|
-
toJSON(): infer J;
|
|
386
|
-
} ? RouteJSON<J> : T extends bigint | symbol | ((...args: any[]) => any) ? never : T extends readonly (infer V)[] ? RouteJSON<V>[] : T extends object ? {
|
|
387
|
-
[K in keyof T]: RouteJSON<T[K]>;
|
|
388
|
-
} : T;
|
|
389
|
-
type RouteDefinition<P extends string = string, M extends RouteMethod = RouteMethod, E = any> = {
|
|
390
|
-
readonly path: P;
|
|
391
|
-
readonly method: M;
|
|
392
|
-
readonly endpoint: E;
|
|
393
|
-
};
|
|
394
|
-
type RouteEndpoint<P extends string, I extends RouteInputSchemas, R> = TypedEndpoint<Output<I, "body">, Input<I, "query">, RouteJSON<R>, Input<I, "headers">, never, Input<I, "body">> & {
|
|
395
|
-
__types: {
|
|
396
|
-
params: RoutePathParams<P>;
|
|
397
|
-
inputHeaders: Input<I, "headers">;
|
|
398
|
-
};
|
|
399
|
-
};
|
|
400
|
-
type TrimStart<P extends string> = P extends `/${infer Rest}` ? TrimStart<Rest> : P;
|
|
401
|
-
type Join<P extends string, C extends string> = C extends "" ? P : `${P}/${TrimStart<C>}`;
|
|
402
|
-
type ParamsCheck<P extends string, I extends RouteInputSchemas> = I extends {
|
|
403
|
-
params: infer S;
|
|
404
|
-
} ? Exclude<keyof RoutePathParams<P>, keyof RouteSchemaOutput<S>> extends never ? Exclude<keyof RouteSchemaOutput<S>, keyof RoutePathParams<P>> extends never ? unknown : {
|
|
405
|
-
__error_unknown_route_params: never;
|
|
406
|
-
} : {
|
|
407
|
-
__error_missing_route_params: never;
|
|
408
|
-
} : unknown;
|
|
409
|
-
type RouteMiddlewareResults = readonly (EndpointMiddlewareResult | Promise<EndpointMiddlewareResult>)[];
|
|
410
|
-
type RouteMiddlewares<Results extends readonly unknown[]> = {
|
|
411
|
-
readonly [K in keyof Results]: (context: Parameters<AnyEndpointMiddleware>[0]) => Results[K];
|
|
412
|
-
};
|
|
413
|
-
type RouteOptions<P extends string, I extends RouteInputSchemas, O extends RouteSchema | undefined, R, MiddlewareResults extends RouteMiddlewareResults = RouteMiddlewareResults> = {
|
|
414
|
-
input?: I & ParamsCheck<P, I>;
|
|
415
|
-
/** Validate plain JSON handler results. Raw Response/stream results are never buffered. */
|
|
416
|
-
output?: O;
|
|
417
|
-
/** Opt this app-owned endpoint into an installed MCP transport. */
|
|
418
|
-
mcp?: EndpointMCPOptions;
|
|
419
|
-
middleware?: RouteMiddlewares<MiddlewareResults>;
|
|
420
|
-
handler(request: Request, context: {
|
|
421
|
-
input: {
|
|
422
|
-
body: Output<I, "body">;
|
|
423
|
-
query: Output<I, "query", Record<string, string | string[]>>;
|
|
424
|
-
headers: Output<I, "headers", Record<string, string>>;
|
|
425
|
-
params: Output<I, "params", RoutePathParams<P>>;
|
|
426
|
-
};
|
|
427
|
-
params: Output<I, "params", RoutePathParams<P>>;
|
|
428
|
-
context: Readonly<InferEndpointMiddlewareContext<RouteMiddlewares<MiddlewareResults>>>;
|
|
429
|
-
}): R | Promise<R>;
|
|
430
|
-
};
|
|
431
|
-
type RouteBuilder<P extends string, M extends RouteMethod> = <const C extends string, const MiddlewareResults extends RouteMiddlewareResults, const I extends RouteInputSchemas = {}, O extends RouteSchema | undefined = undefined, R = unknown>(path: C, options: RouteOptions<Join<P, C>, I, O, R, MiddlewareResults>) => RouteDefinition<Join<P, C>, M, RouteEndpoint<Join<P, C>, I, Extract<Awaited<R>, Response> extends never ? O extends RouteSchema ? RouteSchemaOutput<O> : Awaited<R> : unknown>>;
|
|
432
|
-
type RouteFactory<P extends string = ""> = {
|
|
433
|
-
[M in Lowercase<RouteMethod>]: RouteBuilder<P, Uppercase<M> & RouteMethod>;
|
|
434
|
-
} & {
|
|
435
|
-
/** Return a new builder; never mutate the parent scope. */
|
|
436
|
-
scope<const C extends string>(path: C): RouteFactory<Join<P, C>>;
|
|
437
|
-
};
|
|
438
|
-
type PluginRoutes = readonly RouteDefinition[];
|
|
439
|
-
interface PluginLocalAPIEndpoint {
|
|
440
|
-
readonly path: string;
|
|
441
|
-
readonly method: RouteMethod;
|
|
442
|
-
readonly input: Readonly<RouteInputSchemas>;
|
|
443
|
-
readonly output?: RouteSchema;
|
|
444
|
-
readonly mcp?: EndpointMCPOptions;
|
|
445
|
-
invoke(request: Request, params?: Readonly<Record<string, string | string[]>>): Promise<Response>;
|
|
446
|
-
}
|
|
447
|
-
/**
|
|
448
|
-
* Read-only access to app-owned API endpoints while plugin routes are mounted.
|
|
449
|
-
* Plugin routes are intentionally excluded so a plugin cannot recurse through
|
|
450
|
-
* itself or depend on plugin registration order.
|
|
451
|
-
*/
|
|
452
|
-
interface PluginLocalAPI {
|
|
453
|
-
/** False during type-only route discovery, where app endpoint modules are unavailable. */
|
|
454
|
-
readonly available: boolean;
|
|
455
|
-
get(method: RouteMethod, path: string): PluginLocalAPIEndpoint | undefined;
|
|
456
|
-
/** Enumerate app-owned endpoints. Plugin routes are excluded. */
|
|
457
|
-
list(): readonly PluginLocalAPIEndpoint[];
|
|
458
|
-
}
|
|
459
|
-
type PluginRoutesFactory<R extends PluginRoutes = PluginRoutes> = (context: {
|
|
460
|
-
route: RouteFactory;
|
|
461
|
-
api: PluginLocalAPI;
|
|
462
|
-
}) => R;
|
|
463
|
-
declare function createRouteFactory(): RouteFactory;
|
|
464
|
-
type UnionToIntersection<U> = (U extends unknown ? (v: U) => void : never) extends (v: infer I) => void ? I : never;
|
|
465
|
-
type RouteTree<P extends string, M extends string, E> = P extends `${infer Head}/${infer Tail}` ? {
|
|
466
|
-
[K in Head]: RouteTree<Tail, M, E>;
|
|
467
|
-
} : P extends "" ? {
|
|
468
|
-
[K in Lowercase<M>]: E;
|
|
469
|
-
} : {
|
|
470
|
-
[K in P]: {
|
|
471
|
-
[Method in Lowercase<M>]: E;
|
|
472
|
-
};
|
|
473
|
-
};
|
|
474
|
-
type HasMethodSegment<P extends string> = P extends `${infer H}/${infer T}` ? H extends Lowercase<RouteMethod> ? true : HasMethodSegment<T> : P extends Lowercase<RouteMethod> ? true : false;
|
|
475
|
-
type DefinitionTree<D> = D extends RouteDefinition<infer P, infer M, infer E> ? string extends P ? {} : (P extends `/api/integrations${string}` ? true : HasMethodSegment<P>) extends true ? {
|
|
476
|
-
[K in P extends `/api/${infer C}` ? `/${C}` : "/"]: {
|
|
477
|
-
[Method in Lowercase<M>]: E;
|
|
478
|
-
};
|
|
479
|
-
} : RouteTree<P extends `/api/${infer C}` ? C : "", M, E> : {};
|
|
480
|
-
type PluginAPIRouter<C> = C extends {
|
|
481
|
-
plugins: readonly (infer P)[];
|
|
482
|
-
} ? UnionToIntersection<P extends {
|
|
483
|
-
routes?: PluginRoutesFactory<infer R>;
|
|
484
|
-
} ? DefinitionTree<R[number]> : {}> : {};
|
|
485
|
-
declare function resolvePluginRoutes(plugins?: readonly {
|
|
486
|
-
name: string;
|
|
487
|
-
routes?: PluginRoutesFactory;
|
|
488
|
-
}[], context?: {
|
|
489
|
-
api?: PluginLocalAPI;
|
|
490
|
-
}): PluginRoutes;
|
|
491
|
-
|
|
492
|
-
export { type RouteOptions as $, type AnyEndpointMiddleware as A, type TypedFormData as B, type MultipartSchema as C, DELETE as D, EndpointFailure as E, type FarmStreamResponse as F, GET as G, HEAD as H, type InferEndpointMiddlewareContext as I, type FarmAPIStream as J, multipart as K, isMultipartSchema as L, type MultipartField as M, toFormData as N, OPTIONS as O, type PluginRoutesFactory as P, QUERY as Q, jsonStream as R, isJSONStreamResponse as S, type TypedEndpoint as T, readJSONStream as U, isFarmAPIStream as V, type RouteMethod as W, type RoutePathParams as X, type RouteInputSchemas as Y, type RouteJSON as Z, type RouteDefinition as _, type EndpointOpenAPIMetadata as a, type RouteFactory as a0, type PluginRoutes as a1, type PluginLocalAPIEndpoint as a2, type PluginLocalAPI as a3, createRouteFactory as a4, type PluginAPIRouter as a5, resolvePluginRoutes as a6, type RouteSchema as a7, type RouteSchemaOutput as a8, type RouteSchemaInput as a9, type OpenAPISecurityMode as aa, type EndpointErrorSchema as b, type EndpointErrorDefinition as c, type EndpointErrorDefinitions as d, type EndpointErrorContracts as e, type EndpointErrorHandler as f, type EndpointFail as g, type EndpointParamValue as h, isEndpointFailure as i, type EndpointParams as j, type EndpointMiddlewareContext as k, type EndpointMiddlewareResult as l, type EndpointMiddleware as m, type EndpointInvalidationTarget as n, type EndpointInvalidationContext as o, parseRouteSchema as p, type EndpointInvalidations as q, type EndpointMCPMetadata as r, type EndpointMCPOptions as s, type EndpointOptions as t, type EndpointHandler as u, createEndpoint as v, POST as w, PUT as x, PATCH as y, type MultipartValues as z };
|
|
367
|
+
export { type AnyEndpointMiddleware as A, type MultipartValues as B, type TypedFormData as C, DELETE as D, type EndpointMiddlewareResult as E, type MultipartSchema as F, GET as G, HEAD as H, type InferEndpointMiddlewareContext as I, type FarmStreamResponse as J, type FarmAPIStream as K, multipart as L, type MultipartField as M, isMultipartSchema as N, OPTIONS as O, POST as P, QUERY as Q, type RouteSchema as R, toFormData as S, type TypedEndpoint as T, jsonStream as U, isJSONStreamResponse as V, readJSONStream as W, isFarmAPIStream as X, type OpenAPISecurityMode as Y, type RouteSchemaOutput as a, type EndpointMCPOptions as b, type RouteSchemaInput as c, type EndpointMCPMetadata as d, EndpointFailure as e, type EndpointOpenAPIMetadata as f, type EndpointErrorSchema as g, type EndpointErrorDefinition as h, type EndpointErrorDefinitions as i, type EndpointErrorContracts as j, type EndpointErrorHandler as k, type EndpointFail as l, isEndpointFailure as m, type EndpointParamValue as n, type EndpointParams as o, parseRouteSchema as p, type EndpointMiddlewareContext as q, type EndpointMiddleware as r, type EndpointInvalidationTarget as s, type EndpointInvalidationContext as t, type EndpointInvalidations as u, type EndpointOptions as v, type EndpointHandler as w, createEndpoint as x, PUT as y, PATCH as z };
|