@farm.js/core 0.1.43 → 0.1.45
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-mcp-3KDz4hr9.d.mts → agent-mcp-CWI-awqd.d.mts} +1 -1
- package/dist/{agent-mcp-6yRebHk7.d.ts → agent-mcp-EnzWYv_X.d.ts} +1 -1
- package/dist/agent-runtime.cjs +3 -2
- package/dist/agent-runtime.d.mts +1 -1
- package/dist/agent-runtime.d.ts +1 -1
- package/dist/agent-runtime.mjs +2 -1
- package/dist/api/route-manager.d.mts +3 -3
- package/dist/api/route-manager.d.ts +3 -3
- package/dist/api/runtime.d.mts +2 -2
- package/dist/api/runtime.d.ts +2 -2
- package/dist/api.d.mts +3 -3
- package/dist/api.d.ts +3 -3
- package/dist/{app-8Db1zR-2.d.ts → app-CAN_2Cqo.d.ts} +4 -4
- package/dist/{app-DlTWv4cn.d.mts → app-DG3dE8v5.d.mts} +4 -4
- package/dist/{app-manifest-TRzS7ZZ9.d.mts → app-manifest-8x5VjZ0L.d.mts} +1 -1
- package/dist/{app-manifest-cO2jkG1F.d.ts → app-manifest-DazjgQya.d.ts} +1 -1
- package/dist/app-markdown.d.mts +2 -2
- package/dist/app-markdown.d.ts +2 -2
- package/dist/{chunk-YBDSTNMH.cjs → chunk-2DZOABRK.cjs} +1 -1
- package/dist/{chunk-OYSGGV6O.mjs → chunk-2NCY6O6Q.mjs} +5 -5
- package/dist/{chunk-AX7S67YV.mjs → chunk-37VKVISD.mjs} +9 -173
- package/dist/chunk-3SAWHWDH.cjs +186 -0
- package/dist/{chunk-RHGK2JEN.cjs → chunk-B6XAA7V6.cjs} +18 -182
- package/dist/{chunk-RQYTOFQM.cjs → chunk-CW6SNEN2.cjs} +2 -2
- package/dist/{chunk-T7J7E63D.cjs → chunk-E22SWCXB.cjs} +2 -2
- package/dist/{chunk-ZYWJIPKQ.mjs → chunk-FDCV5OCT.mjs} +1 -1
- package/dist/{chunk-YGZH4T2X.mjs → chunk-FHQZJJQR.mjs} +1 -1
- package/dist/chunk-GZWHCWLB.mjs +186 -0
- package/dist/{chunk-JDJAPCR2.cjs → chunk-I5IO3ASU.cjs} +92 -90
- package/dist/{chunk-XARSG2TG.mjs → chunk-IOMVXBLZ.mjs} +1 -1
- package/dist/{chunk-VLXNGUKO.mjs → chunk-JVXW76I7.mjs} +1 -1
- package/dist/{chunk-7SCCY6SI.mjs → chunk-K5DHVEXC.mjs} +3 -3
- package/dist/{chunk-BKPXWRTT.cjs → chunk-KVN3YEFF.cjs} +6 -6
- package/dist/{chunk-LVABUXLA.cjs → chunk-LPE3ED4R.cjs} +2 -2
- package/dist/{chunk-NXO75WY4.mjs → chunk-OYZGFRPA.mjs} +1 -1
- package/dist/{chunk-RACQTC7K.cjs → chunk-SIVK2SRR.cjs} +52 -52
- package/dist/{chunk-GVNCWSQV.cjs → chunk-UN4B2TXC.cjs} +4 -4
- package/dist/{chunk-4OCEMK72.mjs → chunk-VR64PHNT.mjs} +10 -8
- package/dist/{chunk-4MRQ5OKQ.mjs → chunk-WWYXIECF.mjs} +1 -1
- package/dist/{chunk-TESO7EFU.mjs → chunk-X6YOWNDZ.mjs} +2 -2
- package/dist/{chunk-VIVQERJ5.cjs → chunk-YAD64RWI.cjs} +57 -57
- package/dist/{chunk-HUMEHX24.cjs → chunk-YN2QEMMO.cjs} +2 -2
- package/dist/{client-plugins-kwQuZcWq.d.ts → client-plugins-BGS0wqzc.d.ts} +16 -15
- package/dist/{client-plugins-Cv0OJtnM.d.mts → client-plugins-nQ0tYt4l.d.mts} +16 -15
- package/dist/client-plugins.d.mts +1 -1
- package/dist/client-plugins.d.ts +1 -1
- package/dist/client.d.mts +5 -5
- package/dist/client.d.ts +5 -5
- package/dist/config.d.mts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/{devtools-MLB3JJMC.cjs → devtools-5Q7VRKVH.cjs} +4 -3
- package/dist/{devtools-M22FEFPK.mjs → devtools-LJ4IGYGW.mjs} +3 -2
- package/dist/docs.cjs +5 -4
- package/dist/docs.d.mts +2 -2
- package/dist/docs.d.ts +2 -2
- package/dist/docs.mjs +4 -3
- package/dist/{index-DAl0QTZS.d.ts → index-Cy26isrh.d.ts} +1 -1
- package/dist/{index-CQOp8EmB.d.mts → index-y1jgR74U.d.mts} +1 -1
- package/dist/index.cjs +13 -11
- package/dist/index.d.mts +15 -15
- package/dist/index.d.ts +15 -15
- package/dist/index.mjs +14 -12
- package/dist/integrations.cjs +5 -3
- package/dist/integrations.d.mts +1 -1
- package/dist/integrations.d.ts +1 -1
- package/dist/integrations.mjs +6 -4
- package/dist/internal/app-markdown-runtime.d.mts +2 -2
- package/dist/internal/app-markdown-runtime.d.ts +2 -2
- package/dist/internal/build-runtime.cjs +11 -10
- package/dist/internal/build-runtime.d.mts +3 -3
- package/dist/internal/build-runtime.d.ts +3 -3
- package/dist/internal/build-runtime.mjs +10 -9
- package/dist/internal/cli-runtime.cjs +5 -4
- package/dist/internal/cli-runtime.mjs +4 -3
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/compression-runtime.d.mts +1 -1
- package/dist/internal/compression-runtime.d.ts +1 -1
- package/dist/internal/config-runtime.cjs +4 -3
- package/dist/internal/config-runtime.d.mts +2 -2
- package/dist/internal/config-runtime.d.ts +2 -2
- package/dist/internal/config-runtime.mjs +3 -2
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +5 -11
- package/dist/internal/production-runtime.d.mts +10 -10
- package/dist/internal/production-runtime.d.ts +10 -10
- package/dist/internal/production-runtime.mjs +4 -10
- package/dist/markdown.d.mts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/middleware.d.mts +3 -3
- package/dist/middleware.d.ts +3 -3
- package/dist/navigation.d.mts +4 -4
- package/dist/navigation.d.ts +4 -4
- package/dist/plugin.cjs +7 -6
- package/dist/plugin.d.mts +3 -3
- package/dist/plugin.d.ts +3 -3
- package/dist/plugin.mjs +6 -5
- package/dist/{production-runtime-5nArjFpn.d.ts → production-runtime-BVMDgHrA.d.ts} +1 -1
- package/dist/{production-runtime-BzsF2z5F.d.mts → production-runtime-ClFA_1KQ.d.mts} +1 -1
- package/dist/{render-plan-B9yQorV4.d.mts → render-plan-CoSovy_O.d.mts} +1 -1
- package/dist/{render-plan-fg6E_HvL.d.ts → render-plan-y2DefWf8.d.ts} +1 -1
- package/dist/renderer-client.d.mts +3 -3
- package/dist/renderer-client.d.ts +3 -3
- package/dist/{request-gz8vFK0n.d.ts → request-aG5Wovm5.d.ts} +1 -1
- package/dist/{request-C4j_g-BH.d.mts → request-cNM09Q7e.d.mts} +1 -1
- package/dist/request.d.mts +2 -2
- package/dist/request.d.ts +2 -2
- package/dist/{route-rendering-DamyKVi3.d.ts → route-rendering-B3uQmCWX.d.ts} +1 -1
- package/dist/{route-rendering-iTTOwz1f.d.mts → route-rendering-EyInfsjI.d.mts} +1 -1
- package/dist/{router-OVjDqVo8.d.ts → router-DNUf-Bg1.d.ts} +1 -1
- package/dist/{router-EoSzHlos.d.mts → router-Devibh4r.d.mts} +1 -1
- package/dist/routes.d.mts +1 -1
- package/dist/routes.d.ts +1 -1
- package/dist/{rsc-pipeline-YCDRJME4.cjs → rsc-pipeline-4ZJ6GUVQ.cjs} +5 -4
- package/dist/{rsc-pipeline-LK4K5JFK.mjs → rsc-pipeline-KK6GFDET.mjs} +4 -3
- package/dist/{runtime-DDH4tiuF.d.mts → runtime-9KZb8AI5.d.mts} +1 -1
- package/dist/{runtime-CwiuozLd.d.ts → runtime-CLr9P5kn.d.ts} +1 -1
- package/dist/server-plugins.d.mts +2 -2
- package/dist/server-plugins.d.ts +2 -2
- package/dist/server.cjs +22 -21
- package/dist/server.d.mts +9 -9
- package/dist/server.d.ts +9 -9
- package/dist/server.mjs +8 -7
- package/dist/{spa-router-Br4qFCWf.d.mts → spa-router-BIxh4IY-.d.mts} +2 -2
- package/dist/{spa-router-BsWUKH73.d.ts → spa-router-Ds6R_oe-.d.ts} +2 -2
- package/dist/{ssg-Donyfcxy.d.mts → ssg-ByrOVYdM.d.mts} +2 -2
- package/dist/{ssg-Csy2vwpi.d.ts → ssg-XnMHCyEc.d.ts} +2 -2
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/{utils-Luk72LXC.d.ts → utils-BN70ueSN.d.ts} +1 -1
- package/dist/{utils-d_k1ZZw0.d.mts → utils-BrjR5xRs.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +7 -6
- package/dist/vite.d.mts +4 -4
- package/dist/vite.d.ts +4 -4
- package/dist/vite.mjs +6 -5
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ad as Metadata, bj as FarmAgentJsonLd, bk as FarmMCPServerRegistration, bl as FarmMarkdownResolvedConfig } from './client-plugins-
|
|
1
|
+
import { ad as Metadata, bj as FarmAgentJsonLd, bk as FarmMCPServerRegistration, bl as FarmMarkdownResolvedConfig } from './client-plugins-nQ0tYt4l.mjs';
|
|
2
2
|
|
|
3
3
|
type MetadataImageKind = "opengraph" | "twitter";
|
|
4
4
|
interface FarmMetadataImageReference {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ad as Metadata, bj as FarmAgentJsonLd, bk as FarmMCPServerRegistration, bl as FarmMarkdownResolvedConfig } from './client-plugins-
|
|
1
|
+
import { ad as Metadata, bj as FarmAgentJsonLd, bk as FarmMCPServerRegistration, bl as FarmMarkdownResolvedConfig } from './client-plugins-BGS0wqzc.js';
|
|
2
2
|
|
|
3
3
|
type MetadataImageKind = "opengraph" | "twitter";
|
|
4
4
|
interface FarmMetadataImageReference {
|
package/dist/agent-runtime.cjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkB6XAA7V6cjs = require('./chunk-B6XAA7V6.cjs');
|
|
4
4
|
require('./chunk-6QOLZITB.cjs');
|
|
5
|
+
require('./chunk-3SAWHWDH.cjs');
|
|
5
6
|
require('./chunk-G643DQCH.cjs');
|
|
6
7
|
require('./chunk-ALPWLT27.cjs');
|
|
7
8
|
require('./chunk-64SBBZDU.cjs');
|
|
@@ -98,7 +99,7 @@ function createAgentRuntimeIntegration(options) {
|
|
|
98
99
|
});
|
|
99
100
|
}
|
|
100
101
|
};
|
|
101
|
-
return
|
|
102
|
+
return _chunkB6XAA7V6cjs.defineIntegration.call(void 0, {
|
|
102
103
|
category: "agent",
|
|
103
104
|
type: provider,
|
|
104
105
|
serverRuntime: options.serverRuntime,
|
package/dist/agent-runtime.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChildProcess } from 'node:child_process';
|
|
2
|
-
import { n as BundleResultPayload, a as FarmPlugin, ax as FarmIntegration } from './client-plugins-
|
|
2
|
+
import { n as BundleResultPayload, a as FarmPlugin, ax as FarmIntegration } from './client-plugins-nQ0tYt4l.mjs';
|
|
3
3
|
import './lifecycle-DK06VuKP.mjs';
|
|
4
4
|
import './integration-api-DWyMmvrR.mjs';
|
|
5
5
|
import './endpoint-DGZRZHux.mjs';
|
package/dist/agent-runtime.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChildProcess } from 'node:child_process';
|
|
2
|
-
import { n as BundleResultPayload, a as FarmPlugin, ax as FarmIntegration } from './client-plugins-
|
|
2
|
+
import { n as BundleResultPayload, a as FarmPlugin, ax as FarmIntegration } from './client-plugins-BGS0wqzc.js';
|
|
3
3
|
import './lifecycle-DK06VuKP.js';
|
|
4
4
|
import './integration-api-BuPHMeKz.js';
|
|
5
5
|
import './endpoint-BOE0IAaG.js';
|
package/dist/agent-runtime.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as PluginAPIDispatch } from '../runtime-
|
|
2
|
-
export { A as API_ROUTE_METHODS, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, a as isWebResponse, n as normalizeRouteResponse, r as resolveAPIRouteEndpoint } from '../runtime-
|
|
3
|
-
import { F as FarmRouteRuntimeConfig, a as FarmPlugin } from '../client-plugins-
|
|
1
|
+
import { P as PluginAPIDispatch } from '../runtime-9KZb8AI5.mjs';
|
|
2
|
+
export { A as API_ROUTE_METHODS, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, a as isWebResponse, n as normalizeRouteResponse, r as resolveAPIRouteEndpoint } from '../runtime-9KZb8AI5.mjs';
|
|
3
|
+
import { F as FarmRouteRuntimeConfig, a as FarmPlugin } from '../client-plugins-nQ0tYt4l.mjs';
|
|
4
4
|
import { ViteDevServer } from 'vite';
|
|
5
5
|
import '../types-CnH8DOqo.mjs';
|
|
6
6
|
import { F as FarmI18nRuntime } from '../runtime-CV2UCV-5.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as PluginAPIDispatch } from '../runtime-
|
|
2
|
-
export { A as API_ROUTE_METHODS, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, a as isWebResponse, n as normalizeRouteResponse, r as resolveAPIRouteEndpoint } from '../runtime-
|
|
3
|
-
import { F as FarmRouteRuntimeConfig, a as FarmPlugin } from '../client-plugins-
|
|
1
|
+
import { P as PluginAPIDispatch } from '../runtime-CLr9P5kn.js';
|
|
2
|
+
export { A as API_ROUTE_METHODS, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, a as isWebResponse, n as normalizeRouteResponse, r as resolveAPIRouteEndpoint } from '../runtime-CLr9P5kn.js';
|
|
3
|
+
import { F as FarmRouteRuntimeConfig, a as FarmPlugin } from '../client-plugins-BGS0wqzc.js';
|
|
4
4
|
import { ViteDevServer } from 'vite';
|
|
5
5
|
import '../types-CnH8DOqo.js';
|
|
6
6
|
import { F as FarmI18nRuntime } from '../runtime-BgDQzBiu.js';
|
package/dist/api/runtime.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { i as isEndpointFailure, p as parseRouteSchema } from '../endpoint-DGZRZHux.mjs';
|
|
2
|
-
export { f as APIRouteShapeSource, A as API_ROUTE_METHODS, d as createEndpointFailureResponse, c as createStaticAPIRouteMatcherAtBasePath, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, b as isFarmAPIPathname, a as isWebResponse, m as matchAPIRouteAtBasePath, h as mergePluginAPIRoutes, n as normalizeRouteResponse, e as registerAPIRouteShape, r as resolveAPIRouteEndpoint } from '../runtime-
|
|
2
|
+
export { f as APIRouteShapeSource, A as API_ROUTE_METHODS, d as createEndpointFailureResponse, c as createStaticAPIRouteMatcherAtBasePath, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, b as isFarmAPIPathname, a as isWebResponse, m as matchAPIRouteAtBasePath, h as mergePluginAPIRoutes, n as normalizeRouteResponse, e as registerAPIRouteShape, r as resolveAPIRouteEndpoint } from '../runtime-9KZb8AI5.mjs';
|
|
3
3
|
export { A as APIRouteMatch, b as APIRouteParamValue, a as APIRouteParams, m as matchAPIRoute } from '../route-pattern-W-SsJGSp.mjs';
|
|
4
|
-
export { ba as FarmMCPCatalogDetails, bk as FarmMCPServerRegistration, bm as _findFarmMCPEndpointTool, bn as _publishFarmMCPCatalog, bo as registerFarmMCPServer } from '../client-plugins-
|
|
4
|
+
export { ba as FarmMCPCatalogDetails, bk as FarmMCPServerRegistration, bm as _findFarmMCPEndpointTool, bn as _publishFarmMCPCatalog, bo as registerFarmMCPServer } from '../client-plugins-nQ0tYt4l.mjs';
|
|
5
5
|
import '../cache.mjs';
|
|
6
6
|
import '../cache-invalidation-BD0z_lfu.mjs';
|
|
7
7
|
import '../integration-api-DWyMmvrR.mjs';
|
package/dist/api/runtime.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { i as isEndpointFailure, p as parseRouteSchema } from '../endpoint-BOE0IAaG.js';
|
|
2
|
-
export { f as APIRouteShapeSource, A as API_ROUTE_METHODS, d as createEndpointFailureResponse, c as createStaticAPIRouteMatcherAtBasePath, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, b as isFarmAPIPathname, a as isWebResponse, m as matchAPIRouteAtBasePath, h as mergePluginAPIRoutes, n as normalizeRouteResponse, e as registerAPIRouteShape, r as resolveAPIRouteEndpoint } from '../runtime-
|
|
2
|
+
export { f as APIRouteShapeSource, A as API_ROUTE_METHODS, d as createEndpointFailureResponse, c as createStaticAPIRouteMatcherAtBasePath, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, b as isFarmAPIPathname, a as isWebResponse, m as matchAPIRouteAtBasePath, h as mergePluginAPIRoutes, n as normalizeRouteResponse, e as registerAPIRouteShape, r as resolveAPIRouteEndpoint } from '../runtime-CLr9P5kn.js';
|
|
3
3
|
export { A as APIRouteMatch, b as APIRouteParamValue, a as APIRouteParams, m as matchAPIRoute } from '../route-pattern-W-SsJGSp.js';
|
|
4
|
-
export { ba as FarmMCPCatalogDetails, bk as FarmMCPServerRegistration, bm as _findFarmMCPEndpointTool, bn as _publishFarmMCPCatalog, bo as registerFarmMCPServer } from '../client-plugins-
|
|
4
|
+
export { ba as FarmMCPCatalogDetails, bk as FarmMCPServerRegistration, bm as _findFarmMCPEndpointTool, bn as _publishFarmMCPCatalog, bo as registerFarmMCPServer } from '../client-plugins-BGS0wqzc.js';
|
|
5
5
|
import '../cache.js';
|
|
6
6
|
import '../cache-invalidation-BD0z_lfu.js';
|
|
7
7
|
import '../integration-api-BuPHMeKz.js';
|
package/dist/api.d.mts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export { A as AnyEndpointMiddleware, D as DELETE, k as EndpointErrorContracts, h as EndpointErrorDefinition, j as EndpointErrorDefinitions, l as EndpointErrorHandler, g as EndpointErrorSchema, m as EndpointFail, f as EndpointFailure, w as EndpointHandler, t as EndpointInvalidationContext, s as EndpointInvalidationTarget, u as EndpointInvalidations, E as EndpointMCPMetadata, a as EndpointMCPOptions, r as EndpointMiddleware, q as EndpointMiddlewareContext, c as EndpointMiddlewareResult, b as EndpointOpenAPIMetadata, v as EndpointOptions, n as EndpointParamValue, o as EndpointParams, K as FarmAPIStream, J as FarmStreamResponse, G as GET, H as HEAD, I as InferEndpointMiddlewareContext, M as MultipartField, F as MultipartSchema, B as MultipartValues, O as OPTIONS, z as PATCH, P as POST, y as PUT, Q as QUERY, T as TypedEndpoint, C as TypedFormData, x as createEndpoint, i as isEndpointFailure, X as isFarmAPIStream, V as isJSONStreamResponse, N as isMultipartSchema, U as jsonStream, L as multipart, W as readJSONStream, S as toFormData } from './endpoint-DGZRZHux.mjs';
|
|
2
2
|
export { APIRoute, APIRouteConflictError, APIRouteHandlerOptions, APIRouteManager, APIRouteManagerOptions } from './api/route-manager.mjs';
|
|
3
3
|
export { v as APIClient, h as APIClientError, b as APIClientOptions, i as APIClientSystemError, c as APIClientWithoutIntegrationsOptions, s as APIQueryPrimitive, t as APIQueryValue, g as APIResult, K as APIRouteManifest, A as APIRouteRefMetadata, x as ApiClients, C as CacheKey, n as CacheOptions, l as CachePolicy, m as CacheScope, r as ClientOptions, a as FARM_API_ROUTE_META_SYMBOL, F as FARM_API_ROUTE_REF_SYMBOL, p as InvalidateOptions, I as InvalidateTarget, q as OptimisticOptions, O as OptimisticUpdate, j as RequestEvent, k as ResponseEvent, o as RetryAttemptContext, R as RetryOptions, u as RouteAPIClient, w as ServerAPIClient, S as ServerAPIClientOptions, d as ServerAPIClientWithoutIntegrationsOptions, f as StatusEvent, e as StatusPhase, G as applyServerFnOptimisticUpdates, z as createAPIClient, y as createApiClients, E as createServerAPIClient, D as getAPIRouteRefMetadata, B as isAPIRouteRef, J as resolveServerFnInvalidateTargets, H as settleServerFnOptimisticUpdates } from './api-client-Dk9QOLwr.mjs';
|
|
4
|
-
import { br as ResolvedFarmAPIConfig } from './client-plugins-
|
|
5
|
-
export { es as DEFAULT_FARM_API_BASE_PATH, ev as FarmAPIConfig, et as FarmAPIConfigResolverContext, eu as FarmAPIConfigValue, ez as getFarmAPIBaseURL, ey as normalizeFarmAPIBasePath, ex as normalizeFarmAPIConfig, ew as resolveFarmAPIConfig, eA as resolveFarmAPIRequestURL } from './client-plugins-
|
|
4
|
+
import { br as ResolvedFarmAPIConfig } from './client-plugins-nQ0tYt4l.mjs';
|
|
5
|
+
export { es as DEFAULT_FARM_API_BASE_PATH, ev as FarmAPIConfig, et as FarmAPIConfigResolverContext, eu as FarmAPIConfigValue, ez as getFarmAPIBaseURL, ey as normalizeFarmAPIBasePath, ex as normalizeFarmAPIConfig, ew as resolveFarmAPIConfig, eA as resolveFarmAPIRequestURL } from './client-plugins-nQ0tYt4l.mjs';
|
|
6
6
|
import { Plugin } from 'vite';
|
|
7
7
|
import { c as PluginRoutesFactory } from './integration-api-DWyMmvrR.mjs';
|
|
8
8
|
export { t as PluginAPIRouter, P as PluginLocalAPI, a as PluginLocalAPIEndpoint, b as PluginRoutes, R as RouteDefinition, r as RouteFactory, o as RouteInputSchemas, p as RouteJSON, d as RouteMethod, q as RouteOptions, n as RoutePathParams, s as createRouteFactory, u as resolvePluginRoutes } from './integration-api-DWyMmvrR.mjs';
|
|
9
|
-
export { A as API_ROUTE_METHODS, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, a as isWebResponse, n as normalizeRouteResponse, r as resolveAPIRouteEndpoint } from './runtime-
|
|
9
|
+
export { A as API_ROUTE_METHODS, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, a as isWebResponse, n as normalizeRouteResponse, r as resolveAPIRouteEndpoint } from './runtime-9KZb8AI5.mjs';
|
|
10
10
|
export { A as APIRouteMatch, b as APIRouteParamValue, a as APIRouteParams, m as matchAPIRoute } from './route-pattern-W-SsJGSp.mjs';
|
|
11
11
|
import './cache.mjs';
|
|
12
12
|
import './cache-invalidation-BD0z_lfu.mjs';
|
package/dist/api.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export { A as AnyEndpointMiddleware, D as DELETE, k as EndpointErrorContracts, h as EndpointErrorDefinition, j as EndpointErrorDefinitions, l as EndpointErrorHandler, g as EndpointErrorSchema, m as EndpointFail, f as EndpointFailure, w as EndpointHandler, t as EndpointInvalidationContext, s as EndpointInvalidationTarget, u as EndpointInvalidations, E as EndpointMCPMetadata, a as EndpointMCPOptions, r as EndpointMiddleware, q as EndpointMiddlewareContext, c as EndpointMiddlewareResult, b as EndpointOpenAPIMetadata, v as EndpointOptions, n as EndpointParamValue, o as EndpointParams, K as FarmAPIStream, J as FarmStreamResponse, G as GET, H as HEAD, I as InferEndpointMiddlewareContext, M as MultipartField, F as MultipartSchema, B as MultipartValues, O as OPTIONS, z as PATCH, P as POST, y as PUT, Q as QUERY, T as TypedEndpoint, C as TypedFormData, x as createEndpoint, i as isEndpointFailure, X as isFarmAPIStream, V as isJSONStreamResponse, N as isMultipartSchema, U as jsonStream, L as multipart, W as readJSONStream, S as toFormData } from './endpoint-BOE0IAaG.js';
|
|
2
2
|
export { APIRoute, APIRouteConflictError, APIRouteHandlerOptions, APIRouteManager, APIRouteManagerOptions } from './api/route-manager.js';
|
|
3
3
|
export { v as APIClient, h as APIClientError, b as APIClientOptions, i as APIClientSystemError, c as APIClientWithoutIntegrationsOptions, s as APIQueryPrimitive, t as APIQueryValue, g as APIResult, K as APIRouteManifest, A as APIRouteRefMetadata, x as ApiClients, C as CacheKey, n as CacheOptions, l as CachePolicy, m as CacheScope, r as ClientOptions, a as FARM_API_ROUTE_META_SYMBOL, F as FARM_API_ROUTE_REF_SYMBOL, p as InvalidateOptions, I as InvalidateTarget, q as OptimisticOptions, O as OptimisticUpdate, j as RequestEvent, k as ResponseEvent, o as RetryAttemptContext, R as RetryOptions, u as RouteAPIClient, w as ServerAPIClient, S as ServerAPIClientOptions, d as ServerAPIClientWithoutIntegrationsOptions, f as StatusEvent, e as StatusPhase, G as applyServerFnOptimisticUpdates, z as createAPIClient, y as createApiClients, E as createServerAPIClient, D as getAPIRouteRefMetadata, B as isAPIRouteRef, J as resolveServerFnInvalidateTargets, H as settleServerFnOptimisticUpdates } from './api-client-BJv9mTbO.js';
|
|
4
|
-
import { br as ResolvedFarmAPIConfig } from './client-plugins-
|
|
5
|
-
export { es as DEFAULT_FARM_API_BASE_PATH, ev as FarmAPIConfig, et as FarmAPIConfigResolverContext, eu as FarmAPIConfigValue, ez as getFarmAPIBaseURL, ey as normalizeFarmAPIBasePath, ex as normalizeFarmAPIConfig, ew as resolveFarmAPIConfig, eA as resolveFarmAPIRequestURL } from './client-plugins-
|
|
4
|
+
import { br as ResolvedFarmAPIConfig } from './client-plugins-BGS0wqzc.js';
|
|
5
|
+
export { es as DEFAULT_FARM_API_BASE_PATH, ev as FarmAPIConfig, et as FarmAPIConfigResolverContext, eu as FarmAPIConfigValue, ez as getFarmAPIBaseURL, ey as normalizeFarmAPIBasePath, ex as normalizeFarmAPIConfig, ew as resolveFarmAPIConfig, eA as resolveFarmAPIRequestURL } from './client-plugins-BGS0wqzc.js';
|
|
6
6
|
import { Plugin } from 'vite';
|
|
7
7
|
import { c as PluginRoutesFactory } from './integration-api-BuPHMeKz.js';
|
|
8
8
|
export { t as PluginAPIRouter, P as PluginLocalAPI, a as PluginLocalAPIEndpoint, b as PluginRoutes, R as RouteDefinition, r as RouteFactory, o as RouteInputSchemas, p as RouteJSON, d as RouteMethod, q as RouteOptions, n as RoutePathParams, s as createRouteFactory, u as resolvePluginRoutes } from './integration-api-BuPHMeKz.js';
|
|
9
|
-
export { A as API_ROUTE_METHODS, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, a as isWebResponse, n as normalizeRouteResponse, r as resolveAPIRouteEndpoint } from './runtime-
|
|
9
|
+
export { A as API_ROUTE_METHODS, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, a as isWebResponse, n as normalizeRouteResponse, r as resolveAPIRouteEndpoint } from './runtime-CLr9P5kn.js';
|
|
10
10
|
export { A as APIRouteMatch, b as APIRouteParamValue, a as APIRouteParams, m as matchAPIRoute } from './route-pattern-W-SsJGSp.js';
|
|
11
11
|
import './cache.js';
|
|
12
12
|
import './cache-invalidation-BD0z_lfu.js';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { aB as FarmConfig, a8 as ParsedRoute, bp as ResolvedFarmRouteRuntimeConfig, bq as ApplicationMetadataRouteKind, ak as RouteModule, b0 as LayoutModule, b7 as SSGCollectionResult, aa as FarmRequest, ab as FarmResponse, br as ResolvedFarmAPIConfig, bs as FarmDocsResolvedConfig, bl as FarmMarkdownResolvedConfig, am as FarmMdxResolvedConfig, _ as ResolvedFarmDevtoolsConfig, bt as ResolvedFarmDevIndicatorsConfig, bu as ResolvedFarmAuthConfig, bv as ResolvedFarmPerformanceConfig, bw as ResolvedFarmSecurityConfig } from './client-plugins-
|
|
1
|
+
import { aB as FarmConfig, a8 as ParsedRoute, bp as ResolvedFarmRouteRuntimeConfig, bq as ApplicationMetadataRouteKind, ak as RouteModule, b0 as LayoutModule, b7 as SSGCollectionResult, aa as FarmRequest, ab as FarmResponse, br as ResolvedFarmAPIConfig, bs as FarmDocsResolvedConfig, bl as FarmMarkdownResolvedConfig, am as FarmMdxResolvedConfig, _ as ResolvedFarmDevtoolsConfig, bt as ResolvedFarmDevIndicatorsConfig, bu as ResolvedFarmAuthConfig, bv as ResolvedFarmPerformanceConfig, bw as ResolvedFarmSecurityConfig } from './client-plugins-BGS0wqzc.js';
|
|
2
2
|
import { F as FarmWorkflowsResolvedConfig } from './workflows-IWP1ddBm.js';
|
|
3
3
|
import { FarmCronResolvedConfig } from './cron.js';
|
|
4
4
|
import { R as ResolvedFarmImageConfig } from './image-config-BpH1q5R8.js';
|
|
5
5
|
import { ProgrammaticRedirectRoute, ProgrammaticRouteSearchClientOptions } from './routes.js';
|
|
6
|
-
import { P as ProgrammaticClientRoutes } from './ssg-
|
|
6
|
+
import { P as ProgrammaticClientRoutes } from './ssg-XnMHCyEc.js';
|
|
7
7
|
import { ViteDevServer } from 'vite';
|
|
8
8
|
import { F as FarmIslandStrategy } from './island-CfGru1MO.js';
|
|
9
|
-
import { M as MetadataImageKind, c as createFarmDefaultMCPServer } from './agent-mcp-
|
|
9
|
+
import { M as MetadataImageKind, c as createFarmDefaultMCPServer } from './agent-mcp-EnzWYv_X.js';
|
|
10
10
|
import { FarmServerRendererRuntime, FarmRenderer } from './renderer.js';
|
|
11
|
-
import { F as FarmRouteRenderPlan } from './render-plan-
|
|
11
|
+
import { F as FarmRouteRenderPlan } from './render-plan-y2DefWf8.js';
|
|
12
12
|
import { R as ResolvedFarmI18nConfig } from './types-CnH8DOqo.js';
|
|
13
13
|
import { F as FarmI18nRuntime } from './runtime-BgDQzBiu.js';
|
|
14
14
|
import { R as ResolvedFarmThemeConfig } from './types-DQnyD3VD.js';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { aB as FarmConfig, a8 as ParsedRoute, bp as ResolvedFarmRouteRuntimeConfig, bq as ApplicationMetadataRouteKind, ak as RouteModule, b0 as LayoutModule, b7 as SSGCollectionResult, aa as FarmRequest, ab as FarmResponse, br as ResolvedFarmAPIConfig, bs as FarmDocsResolvedConfig, bl as FarmMarkdownResolvedConfig, am as FarmMdxResolvedConfig, _ as ResolvedFarmDevtoolsConfig, bt as ResolvedFarmDevIndicatorsConfig, bu as ResolvedFarmAuthConfig, bv as ResolvedFarmPerformanceConfig, bw as ResolvedFarmSecurityConfig } from './client-plugins-
|
|
1
|
+
import { aB as FarmConfig, a8 as ParsedRoute, bp as ResolvedFarmRouteRuntimeConfig, bq as ApplicationMetadataRouteKind, ak as RouteModule, b0 as LayoutModule, b7 as SSGCollectionResult, aa as FarmRequest, ab as FarmResponse, br as ResolvedFarmAPIConfig, bs as FarmDocsResolvedConfig, bl as FarmMarkdownResolvedConfig, am as FarmMdxResolvedConfig, _ as ResolvedFarmDevtoolsConfig, bt as ResolvedFarmDevIndicatorsConfig, bu as ResolvedFarmAuthConfig, bv as ResolvedFarmPerformanceConfig, bw as ResolvedFarmSecurityConfig } from './client-plugins-nQ0tYt4l.mjs';
|
|
2
2
|
import { F as FarmWorkflowsResolvedConfig } from './workflows-IWP1ddBm.mjs';
|
|
3
3
|
import { FarmCronResolvedConfig } from './cron.mjs';
|
|
4
4
|
import { R as ResolvedFarmImageConfig } from './image-config-BpH1q5R8.mjs';
|
|
5
5
|
import { ProgrammaticRedirectRoute, ProgrammaticRouteSearchClientOptions } from './routes.mjs';
|
|
6
|
-
import { P as ProgrammaticClientRoutes } from './ssg-
|
|
6
|
+
import { P as ProgrammaticClientRoutes } from './ssg-ByrOVYdM.mjs';
|
|
7
7
|
import { ViteDevServer } from 'vite';
|
|
8
8
|
import { F as FarmIslandStrategy } from './island-CfGru1MO.mjs';
|
|
9
|
-
import { M as MetadataImageKind, c as createFarmDefaultMCPServer } from './agent-mcp-
|
|
9
|
+
import { M as MetadataImageKind, c as createFarmDefaultMCPServer } from './agent-mcp-CWI-awqd.mjs';
|
|
10
10
|
import { FarmServerRendererRuntime, FarmRenderer } from './renderer.mjs';
|
|
11
|
-
import { F as FarmRouteRenderPlan } from './render-plan-
|
|
11
|
+
import { F as FarmRouteRenderPlan } from './render-plan-CoSovy_O.mjs';
|
|
12
12
|
import { R as ResolvedFarmI18nConfig } from './types-CnH8DOqo.mjs';
|
|
13
13
|
import { F as FarmI18nRuntime } from './runtime-CV2UCV-5.mjs';
|
|
14
14
|
import { R as ResolvedFarmThemeConfig } from './types-DQnyD3VD.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ba as FarmMCPCatalogDetails, bb as ResolvedFarmAppManifestConfig } from './client-plugins-
|
|
1
|
+
import { ba as FarmMCPCatalogDetails, bb as ResolvedFarmAppManifestConfig } from './client-plugins-nQ0tYt4l.mjs';
|
|
2
2
|
|
|
3
3
|
interface FarmAppManifestWebMCPTool {
|
|
4
4
|
name: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ba as FarmMCPCatalogDetails, bb as ResolvedFarmAppManifestConfig } from './client-plugins-
|
|
1
|
+
import { ba as FarmMCPCatalogDetails, bb as ResolvedFarmAppManifestConfig } from './client-plugins-BGS0wqzc.js';
|
|
2
2
|
|
|
3
3
|
interface FarmAppManifestWebMCPTool {
|
|
4
4
|
name: string;
|
package/dist/app-markdown.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { al as FarmMdxComponents, am as FarmMdxResolvedConfig, ak as RouteModule } from './client-plugins-
|
|
2
|
-
export { ar as FARM_MARKDOWN_CONTENT_TYPE, ap as FarmMdxComponent, aq as FarmMdxUserConfig, as as createFarmMarkdownErrorBody, at as farmRequestWantsMarkdown, an as resolveFarmMdxComponentsModulePath, ao as resolveMdxConfig } from './client-plugins-
|
|
1
|
+
import { al as FarmMdxComponents, am as FarmMdxResolvedConfig, ak as RouteModule } from './client-plugins-nQ0tYt4l.mjs';
|
|
2
|
+
export { ar as FARM_MARKDOWN_CONTENT_TYPE, ap as FarmMdxComponent, aq as FarmMdxUserConfig, as as createFarmMarkdownErrorBody, at as farmRequestWantsMarkdown, an as resolveFarmMdxComponentsModulePath, ao as resolveMdxConfig } from './client-plugins-nQ0tYt4l.mjs';
|
|
3
3
|
export { FARM_MARKDOWN_ANONYMOUS_CLIENT_ADDRESS, FarmMarkdownPageModuleInput, FarmMarkdownPageSource, createFarmMarkdownRouteModule, createFarmMarkdownSourceResponse, createMarkdownMetadata, isFarmMarkdownPageFile, isFarmMarkdownPublicSourceResponse, normalizeFarmMarkdownRoutePath, parseMarkdownFrontmatter, titleFromMarkdown } from './internal/app-markdown-runtime.mjs';
|
|
4
4
|
import './lifecycle-DK06VuKP.mjs';
|
|
5
5
|
import './integration-api-DWyMmvrR.mjs';
|
package/dist/app-markdown.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { al as FarmMdxComponents, am as FarmMdxResolvedConfig, ak as RouteModule } from './client-plugins-
|
|
2
|
-
export { ar as FARM_MARKDOWN_CONTENT_TYPE, ap as FarmMdxComponent, aq as FarmMdxUserConfig, as as createFarmMarkdownErrorBody, at as farmRequestWantsMarkdown, an as resolveFarmMdxComponentsModulePath, ao as resolveMdxConfig } from './client-plugins-
|
|
1
|
+
import { al as FarmMdxComponents, am as FarmMdxResolvedConfig, ak as RouteModule } from './client-plugins-BGS0wqzc.js';
|
|
2
|
+
export { ar as FARM_MARKDOWN_CONTENT_TYPE, ap as FarmMdxComponent, aq as FarmMdxUserConfig, as as createFarmMarkdownErrorBody, at as farmRequestWantsMarkdown, an as resolveFarmMdxComponentsModulePath, ao as resolveMdxConfig } from './client-plugins-BGS0wqzc.js';
|
|
3
3
|
export { FARM_MARKDOWN_ANONYMOUS_CLIENT_ADDRESS, FarmMarkdownPageModuleInput, FarmMarkdownPageSource, createFarmMarkdownRouteModule, createFarmMarkdownSourceResponse, createMarkdownMetadata, isFarmMarkdownPageFile, isFarmMarkdownPublicSourceResponse, normalizeFarmMarkdownRoutePath, parseMarkdownFrontmatter, titleFromMarkdown } from './internal/app-markdown-runtime.js';
|
|
4
4
|
import './lifecycle-DK06VuKP.js';
|
|
5
5
|
import './integration-api-BuPHMeKz.js';
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
resolveFarmIsolatedClientHydrationMode,
|
|
31
31
|
resolveModuleSourcePath,
|
|
32
32
|
stripUseClientDirective
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-K5DHVEXC.mjs";
|
|
34
34
|
import {
|
|
35
35
|
FARM_NODE_RESPONSE_END_PENDING
|
|
36
36
|
} from "./chunk-FGH3ZXTP.mjs";
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
resolveFarmApiCatalogInput,
|
|
59
59
|
resolveFarmAppManifestInput,
|
|
60
60
|
stripRouteGroups
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-X6YOWNDZ.mjs";
|
|
62
62
|
import {
|
|
63
63
|
isFarmPreviewDeploymentEnvironment
|
|
64
64
|
} from "./chunk-BOYNDCZL.mjs";
|
|
@@ -140,7 +140,7 @@ import {
|
|
|
140
140
|
getIntegrationDocumentNavigationMatchers,
|
|
141
141
|
getIntegrationProviders,
|
|
142
142
|
matchIntegrationRoute
|
|
143
|
-
} from "./chunk-
|
|
143
|
+
} from "./chunk-37VKVISD.mjs";
|
|
144
144
|
import {
|
|
145
145
|
MiddlewareManager
|
|
146
146
|
} from "./chunk-HJ64F4GS.mjs";
|
|
@@ -218,7 +218,7 @@ import {
|
|
|
218
218
|
} from "./chunk-ZZGQD7A4.mjs";
|
|
219
219
|
import {
|
|
220
220
|
FARM_VERSION
|
|
221
|
-
} from "./chunk-
|
|
221
|
+
} from "./chunk-FHQZJJQR.mjs";
|
|
222
222
|
import {
|
|
223
223
|
DEFAULT_FARM_API_BASE_PATH
|
|
224
224
|
} from "./chunk-7LTCDQRS.mjs";
|
|
@@ -769,7 +769,7 @@ function loadFarmWorkflowsDevRuntime() {
|
|
|
769
769
|
}
|
|
770
770
|
__name(loadFarmWorkflowsDevRuntime, "loadFarmWorkflowsDevRuntime");
|
|
771
771
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
772
|
-
return import("./devtools-
|
|
772
|
+
return import("./devtools-LJ4IGYGW.mjs");
|
|
773
773
|
}
|
|
774
774
|
__name(loadFarmDevtoolsSnapshotRuntime, "loadFarmDevtoolsSnapshotRuntime");
|
|
775
775
|
function loadFarmDevtoolsUIRuntime() {
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
setFarmPluginIntegrationContext
|
|
3
3
|
} from "./chunk-H3EGVQE5.mjs";
|
|
4
|
+
import {
|
|
5
|
+
isFarmIntegration,
|
|
6
|
+
matchPathSegments,
|
|
7
|
+
resolveIntegrationMiddlewareParams,
|
|
8
|
+
splitPath
|
|
9
|
+
} from "./chunk-GZWHCWLB.mjs";
|
|
4
10
|
import {
|
|
5
11
|
defineSchema
|
|
6
12
|
} from "./chunk-44SYJEG3.mjs";
|
|
7
13
|
import {
|
|
8
|
-
assertSupportedMiddlewareMatcher
|
|
9
|
-
compileMiddlewareConfig,
|
|
10
|
-
matchesCompiledMiddlewareConfig
|
|
14
|
+
assertSupportedMiddlewareMatcher
|
|
11
15
|
} from "./chunk-HKFBMHCD.mjs";
|
|
12
16
|
import {
|
|
13
17
|
toPublicValidationIssues
|
|
@@ -16,10 +20,6 @@ import {
|
|
|
16
20
|
applyWebResponseHeaders,
|
|
17
21
|
sendWebResponse
|
|
18
22
|
} from "./chunk-Z2RZJZIZ.mjs";
|
|
19
|
-
import {
|
|
20
|
-
createFarmAPIMiddlewarePathnames,
|
|
21
|
-
resolveFarmAPIServerBasePath
|
|
22
|
-
} from "./chunk-BTHHUD7Q.mjs";
|
|
23
23
|
import {
|
|
24
24
|
bufferFarmRequestBody,
|
|
25
25
|
createFarmRequestBodyErrorResponse,
|
|
@@ -43,15 +43,8 @@ import {
|
|
|
43
43
|
validateConfigRouteSource
|
|
44
44
|
} from "./chunk-SAXPH6G5.mjs";
|
|
45
45
|
import {
|
|
46
|
-
canonicalizeRequestPathSegments
|
|
47
|
-
canonicalizeRequestPathname
|
|
46
|
+
canonicalizeRequestPathSegments
|
|
48
47
|
} from "./chunk-CQ6OSQ3K.mjs";
|
|
49
|
-
import {
|
|
50
|
-
resolveFarmLocalePath
|
|
51
|
-
} from "./chunk-L3KT7IXV.mjs";
|
|
52
|
-
import {
|
|
53
|
-
stripFarmBasePath
|
|
54
|
-
} from "./chunk-4RB44K6Z.mjs";
|
|
55
48
|
import {
|
|
56
49
|
assertTerminalCatchAll,
|
|
57
50
|
assertUniqueRouteParameters,
|
|
@@ -268,10 +261,6 @@ function defineIntegration(integration) {
|
|
|
268
261
|
};
|
|
269
262
|
}
|
|
270
263
|
__name(defineIntegration, "defineIntegration");
|
|
271
|
-
function isFarmIntegration(value) {
|
|
272
|
-
return !!value && typeof value === "object" && value.kind === "farm-integration";
|
|
273
|
-
}
|
|
274
|
-
__name(isFarmIntegration, "isFarmIntegration");
|
|
275
264
|
function resolveIntegrationPlugins(integrations) {
|
|
276
265
|
if (!integrations) {
|
|
277
266
|
return [];
|
|
@@ -2011,156 +2000,6 @@ function matchesMethod(methods, normalizedMethod) {
|
|
|
2011
2000
|
return methods.some((candidate) => candidate === "ALL" || candidate === normalizedMethod);
|
|
2012
2001
|
}
|
|
2013
2002
|
__name(matchesMethod, "matchesMethod");
|
|
2014
|
-
var compiledIntegrationGuards = /* @__PURE__ */ new WeakMap();
|
|
2015
|
-
var noMiddlewareContext = {};
|
|
2016
|
-
function resolveIntegrationMiddlewareParams(entry, pathname, config) {
|
|
2017
|
-
const params = resolveMatcherParams(entry.matcher, pathname);
|
|
2018
|
-
if (params || !entry.matcher) return params;
|
|
2019
|
-
const routePathname = resolveIntegrationRoutePathname(pathname, config);
|
|
2020
|
-
const candidates = [.../* @__PURE__ */ new Set([pathname, ...getIntegrationAPIPathnames(config)(routePathname)])];
|
|
2021
|
-
for (const candidate of candidates) {
|
|
2022
|
-
if (candidate === pathname) continue;
|
|
2023
|
-
const routeParams = resolveMatcherParams(entry.matcher, candidate);
|
|
2024
|
-
if (routeParams) return routeParams;
|
|
2025
|
-
}
|
|
2026
|
-
let compiled = compiledIntegrationGuards.get(entry);
|
|
2027
|
-
if (!compiled) {
|
|
2028
|
-
compiled = compileMiddlewareConfig({
|
|
2029
|
-
matcher: typeof entry.matcher === "string" ? entry.matcher : [...entry.matcher]
|
|
2030
|
-
});
|
|
2031
|
-
compiledIntegrationGuards.set(entry, compiled);
|
|
2032
|
-
}
|
|
2033
|
-
for (const candidate of candidates) {
|
|
2034
|
-
const result = matchesCompiledMiddlewareConfig(candidate, compiled, noMiddlewareContext);
|
|
2035
|
-
if (result.matched) return result.params ?? {};
|
|
2036
|
-
}
|
|
2037
|
-
return null;
|
|
2038
|
-
}
|
|
2039
|
-
__name(resolveIntegrationMiddlewareParams, "resolveIntegrationMiddlewareParams");
|
|
2040
|
-
function integrationMiddlewareMayHandlePath(integrations, pathname, catchAllProbe) {
|
|
2041
|
-
if (!integrations) return false;
|
|
2042
|
-
const covers = /* @__PURE__ */ __name((entry) => resolveIntegrationMiddlewareParams(entry, pathname, void 0) !== null, "covers");
|
|
2043
|
-
return Object.values(integrations).some(
|
|
2044
|
-
(integration) => isFarmIntegration(integration) && (integration.middleware || []).some((entry) => {
|
|
2045
|
-
if (catchAllProbe === void 0) return covers(entry);
|
|
2046
|
-
if (!entry.matcher) return false;
|
|
2047
|
-
const specific = (Array.isArray(entry.matcher) ? entry.matcher : [entry.matcher]).filter(
|
|
2048
|
-
(matcher) => resolveIntegrationMiddlewareParams({ matcher }, catchAllProbe, void 0) === null
|
|
2049
|
-
);
|
|
2050
|
-
return specific.length > 0 && covers({ matcher: specific });
|
|
2051
|
-
})
|
|
2052
|
-
);
|
|
2053
|
-
}
|
|
2054
|
-
__name(integrationMiddlewareMayHandlePath, "integrationMiddlewareMayHandlePath");
|
|
2055
|
-
var FARM_INTEGRATION_API_BASE_PATH_KEY = "__farmAPIServerBasePath";
|
|
2056
|
-
var integrationAPIPathnames = /* @__PURE__ */ new WeakMap();
|
|
2057
|
-
function getIntegrationAPIPathnames(config) {
|
|
2058
|
-
if (!config) return (pathname) => [pathname];
|
|
2059
|
-
let toPathnames = integrationAPIPathnames.get(config);
|
|
2060
|
-
if (!toPathnames) {
|
|
2061
|
-
const recorded = config[FARM_INTEGRATION_API_BASE_PATH_KEY];
|
|
2062
|
-
const api2 = config.api;
|
|
2063
|
-
const serverBasePath = typeof recorded === "string" ? recorded : typeof api2?.baseURL === "string" && typeof api2.basePath === "string" ? resolveFarmAPIServerBasePath(api2) : void 0;
|
|
2064
|
-
toPathnames = createFarmAPIMiddlewarePathnames(serverBasePath);
|
|
2065
|
-
integrationAPIPathnames.set(config, toPathnames);
|
|
2066
|
-
}
|
|
2067
|
-
return toPathnames;
|
|
2068
|
-
}
|
|
2069
|
-
__name(getIntegrationAPIPathnames, "getIntegrationAPIPathnames");
|
|
2070
|
-
function resolveIntegrationRoutePathname(pathname, config) {
|
|
2071
|
-
const basePath = typeof config?.basePath === "string" ? config.basePath : void 0;
|
|
2072
|
-
let routePathname = basePath ? stripFarmBasePath(pathname, basePath) : pathname;
|
|
2073
|
-
const i18n = config?.i18n;
|
|
2074
|
-
if (i18n && Array.isArray(i18n.locales) && i18n.locales.length > 0) {
|
|
2075
|
-
routePathname = resolveFarmLocalePath(routePathname, {
|
|
2076
|
-
locales: i18n.locales,
|
|
2077
|
-
defaultLocale: i18n.defaultLocale,
|
|
2078
|
-
routing: i18n.routing || "prefix-except-default"
|
|
2079
|
-
}).pathname;
|
|
2080
|
-
}
|
|
2081
|
-
return routePathname;
|
|
2082
|
-
}
|
|
2083
|
-
__name(resolveIntegrationRoutePathname, "resolveIntegrationRoutePathname");
|
|
2084
|
-
function resolveMatcherParams(matcher, pathname) {
|
|
2085
|
-
if (!matcher) {
|
|
2086
|
-
return {};
|
|
2087
|
-
}
|
|
2088
|
-
const list = Array.isArray(matcher) ? matcher : [matcher];
|
|
2089
|
-
let canonicalPathname;
|
|
2090
|
-
let canonicalSegments;
|
|
2091
|
-
for (const item of list) {
|
|
2092
|
-
if (item === "/(.*)" || item === "*") {
|
|
2093
|
-
return {};
|
|
2094
|
-
}
|
|
2095
|
-
if (item.endsWith("(.*)")) {
|
|
2096
|
-
canonicalPathname ?? (canonicalPathname = canonicalizeRequestPathname(pathname));
|
|
2097
|
-
const prefix = item.slice(0, -4);
|
|
2098
|
-
if (canonicalPathname === prefix || canonicalPathname.startsWith(`${prefix}/`)) {
|
|
2099
|
-
return {};
|
|
2100
|
-
}
|
|
2101
|
-
continue;
|
|
2102
|
-
}
|
|
2103
|
-
canonicalSegments ?? (canonicalSegments = canonicalizeRequestPathSegments(pathname));
|
|
2104
|
-
const params = matchPathSegments(splitPath(item), canonicalSegments);
|
|
2105
|
-
if (params) {
|
|
2106
|
-
return params;
|
|
2107
|
-
}
|
|
2108
|
-
}
|
|
2109
|
-
return null;
|
|
2110
|
-
}
|
|
2111
|
-
__name(resolveMatcherParams, "resolveMatcherParams");
|
|
2112
|
-
function matchPathSegments(routeSegments, pathSegments) {
|
|
2113
|
-
const params = {};
|
|
2114
|
-
let routeIndex = 0;
|
|
2115
|
-
let pathIndex = 0;
|
|
2116
|
-
while (routeIndex < routeSegments.length && pathIndex < pathSegments.length) {
|
|
2117
|
-
const routeSegment = routeSegments[routeIndex];
|
|
2118
|
-
const pathSegment = pathSegments[pathIndex];
|
|
2119
|
-
if (isCatchAllSegment(routeSegment)) {
|
|
2120
|
-
params[getSegmentParamName(routeSegment)] = pathSegments.slice(pathIndex);
|
|
2121
|
-
return params;
|
|
2122
|
-
}
|
|
2123
|
-
if (isDynamicSegment(routeSegment)) {
|
|
2124
|
-
params[getSegmentParamName(routeSegment)] = pathSegment;
|
|
2125
|
-
routeIndex += 1;
|
|
2126
|
-
pathIndex += 1;
|
|
2127
|
-
continue;
|
|
2128
|
-
}
|
|
2129
|
-
if (routeSegment !== pathSegment) {
|
|
2130
|
-
return null;
|
|
2131
|
-
}
|
|
2132
|
-
routeIndex += 1;
|
|
2133
|
-
pathIndex += 1;
|
|
2134
|
-
}
|
|
2135
|
-
if (routeIndex === routeSegments.length && pathIndex === pathSegments.length) {
|
|
2136
|
-
return params;
|
|
2137
|
-
}
|
|
2138
|
-
if (routeIndex === routeSegments.length - 1 && isCatchAllSegment(routeSegments[routeIndex])) {
|
|
2139
|
-
params[getSegmentParamName(routeSegments[routeIndex])] = [];
|
|
2140
|
-
return params;
|
|
2141
|
-
}
|
|
2142
|
-
return null;
|
|
2143
|
-
}
|
|
2144
|
-
__name(matchPathSegments, "matchPathSegments");
|
|
2145
|
-
function splitPath(value) {
|
|
2146
|
-
return value.split("/").filter(Boolean);
|
|
2147
|
-
}
|
|
2148
|
-
__name(splitPath, "splitPath");
|
|
2149
|
-
function isDynamicSegment(segment) {
|
|
2150
|
-
return segment.startsWith("[") && segment.endsWith("]");
|
|
2151
|
-
}
|
|
2152
|
-
__name(isDynamicSegment, "isDynamicSegment");
|
|
2153
|
-
function isCatchAllSegment(segment) {
|
|
2154
|
-
return segment.startsWith("[...") && segment.endsWith("]");
|
|
2155
|
-
}
|
|
2156
|
-
__name(isCatchAllSegment, "isCatchAllSegment");
|
|
2157
|
-
function getSegmentParamName(segment) {
|
|
2158
|
-
if (isCatchAllSegment(segment)) {
|
|
2159
|
-
return segment.slice(4, -1);
|
|
2160
|
-
}
|
|
2161
|
-
return segment.slice(1, -1);
|
|
2162
|
-
}
|
|
2163
|
-
__name(getSegmentParamName, "getSegmentParamName");
|
|
2164
2003
|
function getRequestId(req) {
|
|
2165
2004
|
const headerValue = req.headers["x-request-id"];
|
|
2166
2005
|
if (Array.isArray(headerValue)) {
|
|
@@ -2187,7 +2026,6 @@ export {
|
|
|
2187
2026
|
createIntegrationRoute,
|
|
2188
2027
|
integrationRoute,
|
|
2189
2028
|
defineIntegration,
|
|
2190
|
-
isFarmIntegration,
|
|
2191
2029
|
resolveIntegrationPlugins,
|
|
2192
2030
|
getIntegrationProviders,
|
|
2193
2031
|
isFarmIntegrationProviderComponentReference,
|
|
@@ -2200,7 +2038,5 @@ export {
|
|
|
2200
2038
|
matchRegisteredIntegrationRoute,
|
|
2201
2039
|
getRegisteredIntegrationAPIManifest,
|
|
2202
2040
|
dispatchIntegrationRequest,
|
|
2203
|
-
dispatchIntegrationRequests
|
|
2204
|
-
integrationMiddlewareMayHandlePath,
|
|
2205
|
-
FARM_INTEGRATION_API_BASE_PATH_KEY
|
|
2041
|
+
dispatchIntegrationRequests
|
|
2206
2042
|
};
|