@farm.js/core 0.1.36 → 0.1.37
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-BVExL8rZ.d.mts → agent-mcp-BC0bAGVF.d.mts} +1 -1
- package/dist/{agent-mcp-luzfXK-P.d.ts → agent-mcp-jyDHbQKe.d.ts} +1 -1
- package/dist/agent-runtime.cjs +3 -3
- package/dist/agent-runtime.d.mts +1 -1
- package/dist/agent-runtime.d.ts +1 -1
- package/dist/agent-runtime.mjs +2 -2
- package/dist/api/client.cjs +3 -3
- package/dist/api/client.mjs +2 -2
- package/dist/api/route-manager.cjs +6 -6
- package/dist/api/route-manager.d.mts +3 -3
- package/dist/api/route-manager.d.ts +3 -3
- package/dist/api/route-manager.mjs +5 -5
- package/dist/api/runtime.cjs +4 -4
- package/dist/api/runtime.d.mts +2 -2
- package/dist/api/runtime.d.ts +2 -2
- package/dist/api/runtime.mjs +3 -3
- package/dist/api.cjs +9 -8
- package/dist/api.d.mts +3 -3
- package/dist/api.d.ts +3 -3
- package/dist/api.mjs +8 -7
- package/dist/{app-Yfa2dsFy.d.ts → app-CKO3iN1c.d.ts} +3 -3
- package/dist/{app-BukwkFIu.d.mts → app-Cbkj9ufe.d.mts} +3 -3
- package/dist/app-markdown.cjs +5 -3
- package/dist/app-markdown.d.mts +3 -3
- package/dist/app-markdown.d.ts +3 -3
- package/dist/app-markdown.mjs +4 -2
- package/dist/{chunk-UVW64BCB.cjs → chunk-3A4KGQYI.cjs} +2 -2
- package/dist/{chunk-AO6RYU5N.cjs → chunk-3IP27TCG.cjs} +30 -22
- package/dist/{chunk-FDR64H6B.mjs → chunk-3KGDJLJK.mjs} +41 -2
- package/dist/{chunk-KXWRO25S.cjs → chunk-4GPOC4LN.cjs} +3 -3
- package/dist/{chunk-Z2HLU4IX.cjs → chunk-4GWRFP22.cjs} +23 -2
- package/dist/{chunk-276VJSM6.mjs → chunk-4P6ULFMD.mjs} +43 -30
- package/dist/{chunk-BPMATOP2.cjs → chunk-5BXGGEC7.cjs} +25 -20
- package/dist/{chunk-JNUWCDTF.cjs → chunk-5D2JIPLH.cjs} +2 -2
- package/dist/{chunk-AHGECQEW.mjs → chunk-666CKENS.mjs} +1 -1
- package/dist/{chunk-BO36SELV.cjs → chunk-6LGFV2CQ.cjs} +2 -2
- package/dist/{chunk-2YTDKNH3.cjs → chunk-6TJITR2B.cjs} +192 -120
- package/dist/{chunk-JZVADIOD.cjs → chunk-75X755YZ.cjs} +2 -2
- package/dist/{chunk-VQLJWDVW.cjs → chunk-7DWNJI73.cjs} +2 -2
- package/dist/{chunk-N2NAS2AM.cjs → chunk-7O5M4UKW.cjs} +2 -2
- package/dist/{chunk-BJPBQNIE.cjs → chunk-7SQ5SGYZ.cjs} +2 -2
- package/dist/{chunk-27ZWSI3W.cjs → chunk-ADOAUDQ6.cjs} +2 -2
- package/dist/{chunk-YKX5BK66.cjs → chunk-ATWHHSY2.cjs} +7 -7
- package/dist/{chunk-42NHY7HW.cjs → chunk-B5PFZLKV.cjs} +40 -9
- package/dist/{chunk-FNO7A7CM.cjs → chunk-BHY547NB.cjs} +34 -16
- package/dist/{chunk-4GLOOWKE.mjs → chunk-CQMVIOYP.mjs} +1 -1
- package/dist/{chunk-D2BB47NB.cjs → chunk-CVH2BXPY.cjs} +6 -6
- package/dist/{chunk-TKSCR644.cjs → chunk-D3C5LBQY.cjs} +2 -2
- package/dist/{chunk-PZNL3WEG.mjs → chunk-DMEPTZTI.mjs} +22 -11
- package/dist/{chunk-GQ3Z3IZI.cjs → chunk-EMMQ64QW.cjs} +18 -18
- package/dist/{chunk-OHLSEQ57.mjs → chunk-EXG5LD6B.mjs} +1 -1
- package/dist/{chunk-WZ77PUAM.mjs → chunk-FBOJ55OM.mjs} +1 -1
- package/dist/{chunk-OTC5BDGO.mjs → chunk-FGRYBX5X.mjs} +12 -7
- package/dist/{chunk-D227TIEN.cjs → chunk-FWE7LEQC.cjs} +13 -13
- package/dist/{chunk-3BU22U3M.cjs → chunk-G2TEB74S.cjs} +5 -2
- package/dist/{chunk-O6I6VWKK.mjs → chunk-HEVMCTSR.mjs} +1 -1
- package/dist/{chunk-W7LF2J2S.mjs → chunk-HMRSWN47.mjs} +1 -1
- package/dist/{chunk-JG6DJF5A.mjs → chunk-HZFM2LWQ.mjs} +22 -1
- package/dist/{chunk-35GKZR22.mjs → chunk-IAIYV4RZ.mjs} +1 -1
- package/dist/{chunk-F2SE2VDO.mjs → chunk-IHQIOZLC.mjs} +1 -1
- package/dist/{chunk-2NNMOPDN.mjs → chunk-J3ANCZKA.mjs} +4 -1
- package/dist/{chunk-C4SPBWFM.cjs → chunk-JEZO6VUR.cjs} +10 -1
- package/dist/{chunk-SC2WYWPF.mjs → chunk-JPNFPAZ4.mjs} +3 -3
- package/dist/{chunk-HOXTWRGB.mjs → chunk-K3SAEIM3.mjs} +5 -2
- package/dist/{chunk-35WV46VL.mjs → chunk-K4I4O5TS.mjs} +98 -26
- package/dist/{chunk-KN7K4VQN.mjs → chunk-KDTBF3UU.mjs} +1 -1
- package/dist/{chunk-QORUJDIV.mjs → chunk-KPFKMDM7.mjs} +2 -2
- package/dist/{chunk-YSCV4SJF.cjs → chunk-L5H2GSUC.cjs} +4 -4
- package/dist/{chunk-YDQZGSDS.mjs → chunk-LBDP3YT3.mjs} +1 -1
- package/dist/{chunk-LSZAVSGY.mjs → chunk-LBGILORX.mjs} +1 -1
- package/dist/{chunk-ADEA7PN3.cjs → chunk-LOFKRKO7.cjs} +2 -2
- package/dist/{chunk-ZWM5KGAA.cjs → chunk-LPFV45AY.cjs} +23 -20
- package/dist/{chunk-3KZS4SUS.mjs → chunk-MCIZVNOQ.mjs} +1 -1
- package/dist/{chunk-XCMCS4DA.mjs → chunk-ND2CWPOD.mjs} +2 -2
- package/dist/{chunk-S6VYG6XU.cjs → chunk-NDILNQ4L.cjs} +2 -2
- package/dist/{chunk-BPOF5U4N.mjs → chunk-NFMDCAOS.mjs} +10 -7
- package/dist/{chunk-UXFQ3UDA.cjs → chunk-NICDYKBS.cjs} +42 -3
- package/dist/{chunk-EZDQRNQ7.mjs → chunk-NNSAQX3U.mjs} +23 -5
- package/dist/{chunk-DZ5ZVB2K.cjs → chunk-NQ6QFZWD.cjs} +1 -1
- package/dist/{chunk-U4KT7QP3.cjs → chunk-OW67PDDS.cjs} +14 -1
- package/dist/{chunk-77GNHH2Z.cjs → chunk-PMQHMWZU.cjs} +3 -3
- package/dist/{chunk-NMHWYWDR.cjs → chunk-Q5FYSK45.cjs} +169 -156
- package/dist/{chunk-5SJWVY6R.mjs → chunk-QHSH7IH4.mjs} +9 -0
- package/dist/{chunk-EWET4D2Y.mjs → chunk-RRMVL6CJ.mjs} +3 -3
- package/dist/{chunk-IZY3V5XW.mjs → chunk-S3VWVTVA.mjs} +14 -1
- package/dist/{chunk-FFFW3OQ7.cjs → chunk-S6FJO323.cjs} +2 -2
- package/dist/chunk-SGBZPZUW.mjs +75 -0
- package/dist/{chunk-2ELDTQRN.mjs → chunk-TDNWPAVR.mjs} +1 -1
- package/dist/{chunk-IHNIDL6H.cjs → chunk-TO4GJ56K.cjs} +22 -11
- package/dist/{chunk-4WCZJQUO.mjs → chunk-TPLJVC7E.mjs} +37 -6
- package/dist/{chunk-NRSN7G7E.mjs → chunk-TW4GYDBJ.mjs} +1 -1
- package/dist/{chunk-FO427P6I.cjs → chunk-U6MPZ35Q.cjs} +10 -10
- package/dist/{chunk-CBJJH36A.cjs → chunk-UJZLSXUB.cjs} +3 -3
- package/dist/chunk-UXHS27O6.cjs +75 -0
- package/dist/{chunk-DQQOKWYA.cjs → chunk-VR4GD5I3.cjs} +3 -3
- package/dist/{chunk-T4OGRVNS.mjs → chunk-VXAWRDK7.mjs} +2 -2
- package/dist/{chunk-4NU4GGTC.cjs → chunk-W2YDNK66.cjs} +6 -3
- package/dist/{chunk-GQRWBCWK.mjs → chunk-WQ7T2263.mjs} +13 -5
- package/dist/chunk-WRPHYQVY.mjs +109 -0
- package/dist/chunk-WT4TGLXT.cjs +109 -0
- package/dist/{chunk-4E5AEDKY.mjs → chunk-XOPOIFTJ.mjs} +1 -1
- package/dist/{chunk-OO7GXVSR.mjs → chunk-YCKO6FRS.mjs} +1 -1
- package/dist/{chunk-MKYBIIAQ.mjs → chunk-Z5BEWYVO.mjs} +1 -1
- package/dist/{chunk-VILIPRS6.mjs → chunk-Z7LA7MHQ.mjs} +1 -1
- package/dist/{client-plugins-r1mOtSC1.d.ts → client-plugins-C8DjftDF.d.ts} +14 -0
- package/dist/{client-plugins-C3mK9Pol.d.mts → client-plugins-CV4eJ9De.d.mts} +14 -0
- package/dist/client-plugins.d.mts +1 -1
- package/dist/client-plugins.d.ts +1 -1
- package/dist/client.cjs +8 -8
- package/dist/client.d.mts +5 -5
- package/dist/client.d.ts +5 -5
- package/dist/client.mjs +7 -7
- package/dist/config.d.mts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/{devtools-JZJJY5CK.cjs → devtools-JXFQNWSH.cjs} +4 -4
- package/dist/{devtools-ERIKFEXX.mjs → devtools-KVOY2TCZ.mjs} +3 -3
- package/dist/docs.cjs +5 -5
- package/dist/docs.d.mts +2 -2
- package/dist/docs.d.ts +2 -2
- package/dist/docs.mjs +4 -4
- package/dist/headers.cjs +4 -4
- package/dist/headers.mjs +3 -3
- package/dist/i18n/client.cjs +11 -11
- package/dist/i18n/client.mjs +3 -3
- package/dist/index.cjs +42 -39
- package/dist/index.d.mts +14 -14
- package/dist/index.d.ts +14 -14
- package/dist/index.mjs +41 -38
- package/dist/integrations.cjs +3 -3
- package/dist/integrations.d.mts +1 -1
- package/dist/integrations.d.ts +1 -1
- package/dist/integrations.mjs +2 -2
- package/dist/internal/app-markdown-runtime.cjs +4 -2
- package/dist/internal/app-markdown-runtime.d.mts +19 -5
- package/dist/internal/app-markdown-runtime.d.ts +19 -5
- package/dist/internal/app-markdown-runtime.mjs +3 -1
- package/dist/internal/build-runtime.cjs +25 -23
- package/dist/internal/build-runtime.d.mts +3 -3
- package/dist/internal/build-runtime.d.ts +3 -3
- package/dist/internal/build-runtime.mjs +24 -22
- package/dist/internal/cli-runtime.cjs +8 -8
- package/dist/internal/cli-runtime.mjs +7 -7
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +2 -2
- package/dist/internal/client-runtime.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 -4
- 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 -3
- package/dist/internal/infra-analytics-runtime.cjs +5 -5
- package/dist/internal/infra-analytics-runtime.mjs +3 -3
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +15 -50
- package/dist/internal/production-runtime.d.mts +8 -8
- package/dist/internal/production-runtime.d.ts +8 -8
- package/dist/internal/production-runtime.mjs +11 -46
- package/dist/markdown.d.mts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/middleware.cjs +8 -8
- package/dist/middleware.d.mts +6 -4
- package/dist/middleware.d.ts +6 -4
- package/dist/middleware.mjs +7 -7
- package/dist/navigation.cjs +7 -7
- package/dist/navigation.d.mts +4 -4
- package/dist/navigation.d.ts +4 -4
- package/dist/navigation.mjs +6 -6
- package/dist/plugin.cjs +19 -18
- package/dist/plugin.d.mts +1 -1
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.mjs +18 -17
- package/dist/{production-runtime-DPnsggY3.d.ts → production-runtime-C2kkrPVZ.d.ts} +1 -1
- package/dist/{production-runtime-CCeVZXst.d.mts → production-runtime-Du_FHb2-.d.mts} +1 -1
- package/dist/query/client.cjs +9 -9
- package/dist/query/client.mjs +4 -4
- package/dist/{render-plan-Cw4f5E_R.d.ts → render-plan-BnnPTpus.d.ts} +1 -1
- package/dist/{render-plan-BuGaPFe6.d.mts → render-plan-Cgx7v8tJ.d.mts} +1 -1
- package/dist/renderer-client.cjs +12 -12
- package/dist/renderer-client.d.mts +3 -3
- package/dist/renderer-client.d.ts +3 -3
- package/dist/renderer-client.mjs +4 -4
- package/dist/{request-Bkg-hERy.d.ts → request-BNWr7r5e.d.ts} +1 -1
- package/dist/{request-CsGARcAw.d.mts → request-sKayKcop.d.mts} +1 -1
- package/dist/request.cjs +3 -3
- package/dist/request.d.mts +2 -2
- package/dist/request.d.ts +2 -2
- package/dist/request.mjs +2 -2
- package/dist/{route-rendering-BUZMH_64.d.ts → route-rendering-Bx4Auw6Q.d.ts} +1 -1
- package/dist/{route-rendering-f11yh5dp.d.mts → route-rendering-DWFp3Yq4.d.mts} +1 -1
- package/dist/{router-Cp6yRE8A.d.mts → router-BK6K42Ij.d.mts} +1 -1
- package/dist/{router-B8CR9GbD.d.ts → router-DnW_2tQi.d.ts} +1 -1
- package/dist/routes.cjs +2 -2
- package/dist/routes.d.mts +1 -1
- package/dist/routes.d.ts +1 -1
- package/dist/routes.mjs +1 -1
- package/dist/{runtime-CQVsT330.d.ts → runtime-CA3Ei5k_.d.ts} +1 -1
- package/dist/{runtime-CAEv36S_.d.mts → runtime-DJDaCMd_.d.mts} +1 -1
- package/dist/server-fn.cjs +3 -3
- package/dist/server-fn.mjs +2 -2
- package/dist/server-plugins.cjs +5 -5
- package/dist/server-plugins.d.mts +2 -2
- package/dist/server-plugins.d.ts +2 -2
- package/dist/server-plugins.mjs +4 -4
- package/dist/server-query.cjs +4 -4
- package/dist/server-query.mjs +3 -3
- package/dist/server.cjs +45 -44
- package/dist/server.d.mts +7 -7
- package/dist/server.d.ts +7 -7
- package/dist/server.mjs +23 -22
- package/dist/{spa-router-DwbqGkGj.d.mts → spa-router-D6fUA4Rn.d.mts} +2 -2
- package/dist/{spa-router-BuciWGCZ.d.ts → spa-router-Mwbd7g2L.d.ts} +2 -2
- package/dist/testing.cjs +8 -8
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.mjs +6 -6
- package/dist/theme/server.cjs +4 -4
- package/dist/theme/server.mjs +3 -3
- package/dist/{utils-CaoWKtYM.d.ts → utils-BwVcAfUR.d.ts} +1 -1
- package/dist/{utils-B9V0S_yL.d.mts → utils-p9Hs-jCc.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +19 -18
- package/dist/vite.d.mts +1 -1
- package/dist/vite.d.ts +1 -1
- package/dist/vite.mjs +18 -17
- package/package.json +1 -1
- package/types/middleware.d.ts +5 -1
- package/dist/chunk-FXEF4PPL.mjs +0 -47
- package/dist/chunk-XD32KALF.cjs +0 -47
- /package/dist/{chunk-SJNMVDDF.cjs → chunk-FUCSUGDM.cjs} +0 -0
- /package/dist/{chunk-UDNPLXW7.mjs → chunk-MYIZXDZA.mjs} +0 -0
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createFarmDevServerDispatch
|
|
3
|
+
} from "./chunk-SGBZPZUW.mjs";
|
|
1
4
|
import {
|
|
2
5
|
_runWithAPIRequestRuntime
|
|
3
6
|
} from "./chunk-R3DS7A2T.mjs";
|
|
@@ -6,10 +9,10 @@ import {
|
|
|
6
9
|
} from "./chunk-IOEH4VWN.mjs";
|
|
7
10
|
import {
|
|
8
11
|
APIRouteConflictError
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-VXAWRDK7.mjs";
|
|
10
13
|
import {
|
|
11
14
|
findProgrammaticRouteFilesInDir
|
|
12
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-MYIZXDZA.mjs";
|
|
13
16
|
import {
|
|
14
17
|
isFarmAPIRouteFileName
|
|
15
18
|
} from "./chunk-CU625VAY.mjs";
|
|
@@ -20,7 +23,7 @@ import {
|
|
|
20
23
|
matchAPIRouteAtBasePath,
|
|
21
24
|
mergePluginAPIRoutes,
|
|
22
25
|
resolveAPIRouteEndpoint
|
|
23
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-HEVMCTSR.mjs";
|
|
24
27
|
import {
|
|
25
28
|
isProgrammaticRoutesFileName
|
|
26
29
|
} from "./chunk-EA5K5BKU.mjs";
|
|
@@ -44,7 +47,7 @@ import {
|
|
|
44
47
|
} from "./chunk-Z2RZJZIZ.mjs";
|
|
45
48
|
import {
|
|
46
49
|
resolveFarmRequestURL
|
|
47
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-3KGDJLJK.mjs";
|
|
48
51
|
import {
|
|
49
52
|
AmbiguousRouteError,
|
|
50
53
|
assertUniqueRouteParameters,
|
|
@@ -65,6 +68,7 @@ function farmApiPlugin(options = {}) {
|
|
|
65
68
|
let apiRoutesCache = /* @__PURE__ */ new Map();
|
|
66
69
|
let apiRouterHandler = null;
|
|
67
70
|
let projectRoot = process.cwd();
|
|
71
|
+
let devServer;
|
|
68
72
|
let pluginMergedRoutes = null;
|
|
69
73
|
const servedRoutes = /* @__PURE__ */ __name(() => pluginMergedRoutes ?? apiRoutesCache, "servedRoutes");
|
|
70
74
|
let routePlugins;
|
|
@@ -190,7 +194,10 @@ function farmApiPlugin(options = {}) {
|
|
|
190
194
|
bodySizeLimit,
|
|
191
195
|
// A plugin calling an app endpoint (an MCP tool, say) goes back through this server,
|
|
192
196
|
// so the middleware that guards the endpoint's path runs for it.
|
|
193
|
-
dispatch: /* @__PURE__ */ __name((request) =>
|
|
197
|
+
dispatch: /* @__PURE__ */ __name((request) => {
|
|
198
|
+
if (!devServer) throw new Error("The Farm API dev server is not running.");
|
|
199
|
+
return createFarmDevServerDispatch(devServer)(request);
|
|
200
|
+
}, "dispatch")
|
|
194
201
|
}).map((route) => [route.path, route])
|
|
195
202
|
) : null;
|
|
196
203
|
const totalEndpoints = Array.from(servedRoutes().values()).reduce(
|
|
@@ -238,6 +245,7 @@ function farmApiPlugin(options = {}) {
|
|
|
238
245
|
enforce: "pre",
|
|
239
246
|
configureServer(server) {
|
|
240
247
|
projectRoot = server.config.root;
|
|
248
|
+
devServer = server;
|
|
241
249
|
const discoverFileRoutes = /* @__PURE__ */ __name(async (apiDir) => {
|
|
242
250
|
const fs = await import("fs");
|
|
243
251
|
const path = await import("path");
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import {
|
|
2
|
+
matchSegmentParts,
|
|
3
|
+
normalizePathname,
|
|
4
|
+
parseRoutePattern,
|
|
5
|
+
splitNormalizedPathname
|
|
6
|
+
} from "./chunk-OT6ZEW74.mjs";
|
|
7
|
+
import {
|
|
8
|
+
getRouteGroupScope,
|
|
9
|
+
isInRouteGroupScope
|
|
10
|
+
} from "./chunk-LBGILORX.mjs";
|
|
11
|
+
import {
|
|
12
|
+
__name
|
|
13
|
+
} from "./chunk-LPEX4YW6.mjs";
|
|
14
|
+
|
|
15
|
+
// src/nitro/native-mcp-source.ts
|
|
16
|
+
function generateNativeMCPPluginSource(mcp) {
|
|
17
|
+
if (mcp?.enabled !== true) {
|
|
18
|
+
return { importSource: "", registerSource: "", pluginSource: "" };
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
importSource: `import { createFarmMCPPlugin as __farmCreateMCPPlugin } from "@farm.js/mcp/internal";`,
|
|
22
|
+
registerSource: `function __farmMCPIsPlainObject(value) {
|
|
23
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
24
|
+
const prototype = Object.getPrototypeOf(value);
|
|
25
|
+
return prototype === Object.prototype || prototype === null;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function __farmMergeMCPConfig(base, override) {
|
|
29
|
+
const output = { ...base };
|
|
30
|
+
for (const [key, value] of Object.entries(override)) {
|
|
31
|
+
if (value === undefined) continue;
|
|
32
|
+
output[key] =
|
|
33
|
+
__farmMCPIsPlainObject(output[key]) && __farmMCPIsPlainObject(value)
|
|
34
|
+
? __farmMergeMCPConfig(output[key], value)
|
|
35
|
+
: value;
|
|
36
|
+
}
|
|
37
|
+
return output;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const farmNativeMCPConfig = farmRuntimeConfigs.reduce((merged, runtimeConfig) => {
|
|
41
|
+
const value = runtimeConfig?.mcp;
|
|
42
|
+
if (value === undefined) return merged;
|
|
43
|
+
if (value === false) return false;
|
|
44
|
+
return __farmMergeMCPConfig(merged && merged !== false ? merged : {}, value);
|
|
45
|
+
}, undefined);
|
|
46
|
+
const farmNativeMCPPlugin =
|
|
47
|
+
farmNativeMCPConfig && farmNativeMCPConfig.enabled !== false
|
|
48
|
+
? __farmCreateMCPPlugin(farmNativeMCPConfig)
|
|
49
|
+
: null;`,
|
|
50
|
+
pluginSource: `...(farmNativeMCPPlugin ? [farmNativeMCPPlugin] : []),`
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
__name(generateNativeMCPPluginSource, "generateNativeMCPPluginSource");
|
|
54
|
+
|
|
55
|
+
// src/routing/layout-selector.ts
|
|
56
|
+
function createFarmLayoutSelector(layouts, resolveRouteDirectory) {
|
|
57
|
+
const prepared = layouts.map((layout) => {
|
|
58
|
+
const segments = layout.pattern === "/" ? [] : parseRoutePattern(layout.pattern);
|
|
59
|
+
return {
|
|
60
|
+
layout,
|
|
61
|
+
segments: segments.length === 0 ? null : segments,
|
|
62
|
+
groupScope: getRouteGroupScope(layout.pattern)
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
return (pathname, routeDirectory) => {
|
|
66
|
+
const applicable = [];
|
|
67
|
+
let parts;
|
|
68
|
+
let directory = routeDirectory;
|
|
69
|
+
for (const { layout, segments, groupScope } of prepared) {
|
|
70
|
+
if (segments !== null) {
|
|
71
|
+
parts ?? (parts = splitNormalizedPathname(normalizePathname(pathname.replace(/\/$/, "") || "/")));
|
|
72
|
+
if (matchSegmentParts(segments, parts, true) === null) continue;
|
|
73
|
+
}
|
|
74
|
+
if (groupScope !== null) {
|
|
75
|
+
if (directory === void 0) directory = resolveRouteDirectory?.(pathname) ?? null;
|
|
76
|
+
if (!isInRouteGroupScope(directory, groupScope)) continue;
|
|
77
|
+
}
|
|
78
|
+
applicable.push(layout);
|
|
79
|
+
}
|
|
80
|
+
return applicable;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
__name(createFarmLayoutSelector, "createFarmLayoutSelector");
|
|
84
|
+
function layoutsCanCoverSamePage(a, b) {
|
|
85
|
+
const scopeA = getRouteGroupScope(a);
|
|
86
|
+
const scopeB = getRouteGroupScope(b);
|
|
87
|
+
if (scopeA !== null && scopeB !== null && !isInRouteGroupScope(scopeA, scopeB) && !isInRouteGroupScope(scopeB, scopeA)) {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
const segmentsA = a === "/" ? [] : parseRoutePattern(a);
|
|
91
|
+
const segmentsB = b === "/" ? [] : parseRoutePattern(b);
|
|
92
|
+
const length = Math.min(segmentsA.length, segmentsB.length);
|
|
93
|
+
for (let index = 0; index < length; index++) {
|
|
94
|
+
const segmentA = segmentsA[index];
|
|
95
|
+
const segmentB = segmentsB[index];
|
|
96
|
+
if (segmentA.type === "dynamic" && segmentA.catchAll) return true;
|
|
97
|
+
if (segmentB.type === "dynamic" && segmentB.catchAll) return true;
|
|
98
|
+
if (segmentA.type === "dynamic" || segmentB.type === "dynamic") continue;
|
|
99
|
+
if (segmentA.value !== segmentB.value) return false;
|
|
100
|
+
}
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
__name(layoutsCanCoverSamePage, "layoutsCanCoverSamePage");
|
|
104
|
+
|
|
105
|
+
export {
|
|
106
|
+
generateNativeMCPPluginSource,
|
|
107
|
+
createFarmLayoutSelector,
|
|
108
|
+
layoutsCanCoverSamePage
|
|
109
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
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
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkPCOTGFSMcjs = require('./chunk-PCOTGFSM.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunkLOFKRKO7cjs = require('./chunk-LOFKRKO7.cjs');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
14
|
+
|
|
15
|
+
// src/nitro/native-mcp-source.ts
|
|
16
|
+
function generateNativeMCPPluginSource(mcp) {
|
|
17
|
+
if (_optionalChain([mcp, 'optionalAccess', _ => _.enabled]) !== true) {
|
|
18
|
+
return { importSource: "", registerSource: "", pluginSource: "" };
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
importSource: `import { createFarmMCPPlugin as __farmCreateMCPPlugin } from "@farm.js/mcp/internal";`,
|
|
22
|
+
registerSource: `function __farmMCPIsPlainObject(value) {
|
|
23
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
24
|
+
const prototype = Object.getPrototypeOf(value);
|
|
25
|
+
return prototype === Object.prototype || prototype === null;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function __farmMergeMCPConfig(base, override) {
|
|
29
|
+
const output = { ...base };
|
|
30
|
+
for (const [key, value] of Object.entries(override)) {
|
|
31
|
+
if (value === undefined) continue;
|
|
32
|
+
output[key] =
|
|
33
|
+
__farmMCPIsPlainObject(output[key]) && __farmMCPIsPlainObject(value)
|
|
34
|
+
? __farmMergeMCPConfig(output[key], value)
|
|
35
|
+
: value;
|
|
36
|
+
}
|
|
37
|
+
return output;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const farmNativeMCPConfig = farmRuntimeConfigs.reduce((merged, runtimeConfig) => {
|
|
41
|
+
const value = runtimeConfig?.mcp;
|
|
42
|
+
if (value === undefined) return merged;
|
|
43
|
+
if (value === false) return false;
|
|
44
|
+
return __farmMergeMCPConfig(merged && merged !== false ? merged : {}, value);
|
|
45
|
+
}, undefined);
|
|
46
|
+
const farmNativeMCPPlugin =
|
|
47
|
+
farmNativeMCPConfig && farmNativeMCPConfig.enabled !== false
|
|
48
|
+
? __farmCreateMCPPlugin(farmNativeMCPConfig)
|
|
49
|
+
: null;`,
|
|
50
|
+
pluginSource: `...(farmNativeMCPPlugin ? [farmNativeMCPPlugin] : []),`
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, generateNativeMCPPluginSource, "generateNativeMCPPluginSource");
|
|
54
|
+
|
|
55
|
+
// src/routing/layout-selector.ts
|
|
56
|
+
function createFarmLayoutSelector(layouts, resolveRouteDirectory) {
|
|
57
|
+
const prepared = layouts.map((layout) => {
|
|
58
|
+
const segments = layout.pattern === "/" ? [] : _chunkPCOTGFSMcjs.parseRoutePattern.call(void 0, layout.pattern);
|
|
59
|
+
return {
|
|
60
|
+
layout,
|
|
61
|
+
segments: segments.length === 0 ? null : segments,
|
|
62
|
+
groupScope: _chunkLOFKRKO7cjs.getRouteGroupScope.call(void 0, layout.pattern)
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
return (pathname, routeDirectory) => {
|
|
66
|
+
const applicable = [];
|
|
67
|
+
let parts;
|
|
68
|
+
let directory = routeDirectory;
|
|
69
|
+
for (const { layout, segments, groupScope } of prepared) {
|
|
70
|
+
if (segments !== null) {
|
|
71
|
+
_nullishCoalesce(parts, () => ( (parts = _chunkPCOTGFSMcjs.splitNormalizedPathname.call(void 0, _chunkPCOTGFSMcjs.normalizePathname.call(void 0, pathname.replace(/\/$/, "") || "/")))));
|
|
72
|
+
if (_chunkPCOTGFSMcjs.matchSegmentParts.call(void 0, segments, parts, true) === null) continue;
|
|
73
|
+
}
|
|
74
|
+
if (groupScope !== null) {
|
|
75
|
+
if (directory === void 0) directory = _nullishCoalesce(_optionalChain([resolveRouteDirectory, 'optionalCall', _2 => _2(pathname)]), () => ( null));
|
|
76
|
+
if (!_chunkLOFKRKO7cjs.isInRouteGroupScope.call(void 0, directory, groupScope)) continue;
|
|
77
|
+
}
|
|
78
|
+
applicable.push(layout);
|
|
79
|
+
}
|
|
80
|
+
return applicable;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, createFarmLayoutSelector, "createFarmLayoutSelector");
|
|
84
|
+
function layoutsCanCoverSamePage(a, b) {
|
|
85
|
+
const scopeA = _chunkLOFKRKO7cjs.getRouteGroupScope.call(void 0, a);
|
|
86
|
+
const scopeB = _chunkLOFKRKO7cjs.getRouteGroupScope.call(void 0, b);
|
|
87
|
+
if (scopeA !== null && scopeB !== null && !_chunkLOFKRKO7cjs.isInRouteGroupScope.call(void 0, scopeA, scopeB) && !_chunkLOFKRKO7cjs.isInRouteGroupScope.call(void 0, scopeB, scopeA)) {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
const segmentsA = a === "/" ? [] : _chunkPCOTGFSMcjs.parseRoutePattern.call(void 0, a);
|
|
91
|
+
const segmentsB = b === "/" ? [] : _chunkPCOTGFSMcjs.parseRoutePattern.call(void 0, b);
|
|
92
|
+
const length = Math.min(segmentsA.length, segmentsB.length);
|
|
93
|
+
for (let index = 0; index < length; index++) {
|
|
94
|
+
const segmentA = segmentsA[index];
|
|
95
|
+
const segmentB = segmentsB[index];
|
|
96
|
+
if (segmentA.type === "dynamic" && segmentA.catchAll) return true;
|
|
97
|
+
if (segmentB.type === "dynamic" && segmentB.catchAll) return true;
|
|
98
|
+
if (segmentA.type === "dynamic" || segmentB.type === "dynamic") continue;
|
|
99
|
+
if (segmentA.value !== segmentB.value) return false;
|
|
100
|
+
}
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, layoutsCanCoverSamePage, "layoutsCanCoverSamePage");
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
exports.generateNativeMCPPluginSource = generateNativeMCPPluginSource; exports.createFarmLayoutSelector = createFarmLayoutSelector; exports.layoutsCanCoverSamePage = layoutsCanCoverSamePage;
|
|
@@ -997,6 +997,8 @@ type MiddlewareFunction = (ctx: MiddlewareContext, next: NextFunction) => Middle
|
|
|
997
997
|
interface RequestMiddlewareContext<TLocals extends Record<string, any> = Record<string, any>, TData extends Record<string, any> = Record<string, any>> {
|
|
998
998
|
readonly url: URL;
|
|
999
999
|
readonly pathname: string;
|
|
1000
|
+
/** The pathname the router matches: decoded once, without basePath or locale. */
|
|
1001
|
+
readonly routePathname: string;
|
|
1000
1002
|
readonly searchParams: URLSearchParams;
|
|
1001
1003
|
readonly method: string;
|
|
1002
1004
|
readonly params: Record<string, string>;
|
|
@@ -1092,7 +1094,13 @@ interface MiddlewareContext {
|
|
|
1092
1094
|
request: IncomingMessage;
|
|
1093
1095
|
response: ServerResponse;
|
|
1094
1096
|
url: URL;
|
|
1097
|
+
/** Request pathname as received: still percent-encoded and carrying basePath/locale. */
|
|
1095
1098
|
pathname: string;
|
|
1099
|
+
/**
|
|
1100
|
+
* The pathname the router matches: decoded once, without basePath or locale. String matchers
|
|
1101
|
+
* compare this value; compare it in path checks too. Updated by `rewrite()`.
|
|
1102
|
+
*/
|
|
1103
|
+
readonly routePathname: string;
|
|
1096
1104
|
searchParams: URLSearchParams;
|
|
1097
1105
|
method: string;
|
|
1098
1106
|
params: Record<string, string>;
|
|
@@ -2376,6 +2384,12 @@ interface FarmMCPConfig {
|
|
|
2376
2384
|
* larger batch is refused before any of them is authorized. @default 25
|
|
2377
2385
|
*/
|
|
2378
2386
|
maxBatchSize?: number;
|
|
2387
|
+
/**
|
|
2388
|
+
* Most array elements and object members, counted together across nested values, one tool
|
|
2389
|
+
* call's arguments may contain. Larger arguments are refused before validation or the tool
|
|
2390
|
+
* runs. `Infinity` removes the limit. @default 10000
|
|
2391
|
+
*/
|
|
2392
|
+
maxToolInputElements?: number;
|
|
2379
2393
|
/**
|
|
2380
2394
|
* OAuth discovery for MCP clients. When set, a rejected request's 401 points at
|
|
2381
2395
|
* RFC 9728 Protected Resource Metadata naming these authorization servers, which
|
|
@@ -997,6 +997,8 @@ type MiddlewareFunction = (ctx: MiddlewareContext, next: NextFunction) => Middle
|
|
|
997
997
|
interface RequestMiddlewareContext<TLocals extends Record<string, any> = Record<string, any>, TData extends Record<string, any> = Record<string, any>> {
|
|
998
998
|
readonly url: URL;
|
|
999
999
|
readonly pathname: string;
|
|
1000
|
+
/** The pathname the router matches: decoded once, without basePath or locale. */
|
|
1001
|
+
readonly routePathname: string;
|
|
1000
1002
|
readonly searchParams: URLSearchParams;
|
|
1001
1003
|
readonly method: string;
|
|
1002
1004
|
readonly params: Record<string, string>;
|
|
@@ -1092,7 +1094,13 @@ interface MiddlewareContext {
|
|
|
1092
1094
|
request: IncomingMessage;
|
|
1093
1095
|
response: ServerResponse;
|
|
1094
1096
|
url: URL;
|
|
1097
|
+
/** Request pathname as received: still percent-encoded and carrying basePath/locale. */
|
|
1095
1098
|
pathname: string;
|
|
1099
|
+
/**
|
|
1100
|
+
* The pathname the router matches: decoded once, without basePath or locale. String matchers
|
|
1101
|
+
* compare this value; compare it in path checks too. Updated by `rewrite()`.
|
|
1102
|
+
*/
|
|
1103
|
+
readonly routePathname: string;
|
|
1096
1104
|
searchParams: URLSearchParams;
|
|
1097
1105
|
method: string;
|
|
1098
1106
|
params: Record<string, string>;
|
|
@@ -2376,6 +2384,12 @@ interface FarmMCPConfig {
|
|
|
2376
2384
|
* larger batch is refused before any of them is authorized. @default 25
|
|
2377
2385
|
*/
|
|
2378
2386
|
maxBatchSize?: number;
|
|
2387
|
+
/**
|
|
2388
|
+
* Most array elements and object members, counted together across nested values, one tool
|
|
2389
|
+
* call's arguments may contain. Larger arguments are refused before validation or the tool
|
|
2390
|
+
* runs. `Infinity` removes the limit. @default 10000
|
|
2391
|
+
*/
|
|
2392
|
+
maxToolInputElements?: number;
|
|
2379
2393
|
/**
|
|
2380
2394
|
* OAuth discovery for MCP clients. When set, a rejected request's 401 points at
|
|
2381
2395
|
* RFC 9728 Protected Resource Metadata naming these authorization servers, which
|
|
@@ -1,5 +1,5 @@
|
|
|
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, h as FarmPluginContext, bX as FarmRequestPluginContext, bY as FarmRequestStore } from './client-plugins-
|
|
2
|
+
export { a as FarmPlugin, h as FarmPluginContext, bX as FarmRequestPluginContext, bY as FarmRequestStore } from './client-plugins-CV4eJ9De.mjs';
|
|
3
3
|
import './integration-api-0y4FXJpC.mjs';
|
|
4
4
|
import './endpoint-CCHFqyTE.mjs';
|
|
5
5
|
import './cache.mjs';
|
package/dist/client-plugins.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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, h as FarmPluginContext, bX as FarmRequestPluginContext, bY as FarmRequestStore } from './client-plugins-
|
|
2
|
+
export { a as FarmPlugin, h as FarmPluginContext, bX as FarmRequestPluginContext, bY as FarmRequestStore } from './client-plugins-C8DjftDF.js';
|
|
3
3
|
import './integration-api-BPJo5oXb.js';
|
|
4
4
|
import './endpoint-CA-TNX60.js';
|
|
5
5
|
import './cache.js';
|
package/dist/client.cjs
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkBHY547NBcjs = require('./chunk-BHY547NB.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
@@ -30,7 +30,7 @@ var _chunkIE7XCHH3cjs = require('./chunk-IE7XCHH3.cjs');
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
var
|
|
33
|
+
var _chunkEMMQ64QWcjs = require('./chunk-EMMQ64QW.cjs');
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
var _chunkPZYCPSCCcjs = require('./chunk-PZYCPSCC.cjs');
|
|
@@ -49,7 +49,7 @@ var _chunkPZYCPSCCcjs = require('./chunk-PZYCPSCC.cjs');
|
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
|
|
52
|
-
var
|
|
52
|
+
var _chunk7SQ5SGYZcjs = require('./chunk-7SQ5SGYZ.cjs');
|
|
53
53
|
require('./chunk-LTNGXMQ6.cjs');
|
|
54
54
|
|
|
55
55
|
|
|
@@ -70,10 +70,10 @@ require('./chunk-PCOTGFSM.cjs');
|
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
|
|
73
|
-
var
|
|
74
|
-
require('./chunk-
|
|
73
|
+
var _chunkFWE7LEQCcjs = require('./chunk-FWE7LEQC.cjs');
|
|
74
|
+
require('./chunk-S6FJO323.cjs');
|
|
75
75
|
require('./chunk-R5A5KNVX.cjs');
|
|
76
|
-
require('./chunk-
|
|
76
|
+
require('./chunk-JEZO6VUR.cjs');
|
|
77
77
|
|
|
78
78
|
|
|
79
79
|
|
|
@@ -103,7 +103,7 @@ require('./chunk-QBK2AA4U.cjs');
|
|
|
103
103
|
require('./chunk-LIUGYUX3.cjs');
|
|
104
104
|
require('./chunk-NYJMY3JA.cjs');
|
|
105
105
|
require('./chunk-ZEG3OPIB.cjs');
|
|
106
|
-
require('./chunk-
|
|
106
|
+
require('./chunk-OW67PDDS.cjs');
|
|
107
107
|
require('./chunk-BIDYX3SL.cjs');
|
|
108
108
|
require('./chunk-I57LW5VZ.cjs');
|
|
109
109
|
require('./chunk-NO3WWW3N.cjs');
|
|
@@ -167,4 +167,4 @@ require('./chunk-S3JO3N4H.cjs');
|
|
|
167
167
|
|
|
168
168
|
|
|
169
169
|
|
|
170
|
-
exports.APIClientError =
|
|
170
|
+
exports.APIClientError = _chunk7SQ5SGYZcjs.APIClientError; exports.FARM_CACHE_INVALIDATION_CHANNEL = _chunkBHY547NBcjs.FARM_CACHE_INVALIDATION_CHANNEL; exports.FARM_CLIENT_CACHE_PERSIST_VERSION = _chunkBHY547NBcjs.FARM_CLIENT_CACHE_PERSIST_VERSION; exports.FarmClientPluginManager = _chunkVB6UCX3Vcjs.FarmClientPluginManager; exports.FetcherInputError = _chunkBHY547NBcjs.FetcherInputError; exports.IntegrationClientError = _chunk7SQ5SGYZcjs.IntegrationClientError; exports.Link = _chunkBHY547NBcjs.Link; exports.SPARouter = _chunkFWE7LEQCcjs.SPARouter; exports.api = _chunkNZKJGRB3cjs.api; exports.clearPersistedCache = _chunkBHY547NBcjs.clearPersistedCache; exports.createAPIClient = _chunk7SQ5SGYZcjs.createAPIClient; exports.createApiClients = _chunk7SQ5SGYZcjs.createApiClients; exports.createClientPluginManager = _chunkVB6UCX3Vcjs.createClientPluginManager; exports.createIntegrationApi = _chunk7SQ5SGYZcjs.createIntegrationApi; exports.createIntegrationClient = _chunk7SQ5SGYZcjs.createIntegrationClient; exports.createIntegrationClients = _chunk7SQ5SGYZcjs.createIntegrationClients; exports.createIntegrationServerClient = _chunk7SQ5SGYZcjs.createIntegrationServerClient; exports.createIntegrations = _chunk7SQ5SGYZcjs.createIntegrations; exports.createServerAPIClient = _chunk7SQ5SGYZcjs.createServerAPIClient; exports.createStore = _chunkBHY547NBcjs.createStore; exports.defineClientCacheAdapter = _chunkBHY547NBcjs.defineClientCacheAdapter; exports.defineIntegrationAPI = _chunkNZKJGRB3cjs.defineIntegrationAPI; exports.defineIntegrationAPIOperation = _chunkNZKJGRB3cjs.defineIntegrationAPIOperation; exports.enableCrossTabCacheInvalidation = _chunkBHY547NBcjs.enableCrossTabCacheInvalidation; exports.enableLiveCacheInvalidation = _chunkBHY547NBcjs.enableLiveCacheInvalidation; exports.endpoint = _chunkNZKJGRB3cjs.endpoint; exports.fetchServerQuery = _chunkN4UOK6ZIcjs.fetchServerQuery; exports.getFarmClientDataCache = _chunk63H6BKXGcjs.getFarmClientDataCache; exports.getIntegrationAPIManifest = _chunk7SQ5SGYZcjs.getIntegrationAPIManifest; exports.getRouter = _chunkFWE7LEQCcjs.getRouter; exports.getTheme = _chunkFK6GO24Vcjs.getTheme; exports.initConfiguredClientCachePersistence = _chunkBHY547NBcjs.initConfiguredClientCachePersistence; exports.initPersistedClientCache = _chunkBHY547NBcjs.initPersistedClientCache; exports.installChunkErrorRecovery = _chunkJGLC4TO3cjs.installChunkErrorRecovery; exports.integrationClients = _chunk7SQ5SGYZcjs.integrationClients; exports.integrationsClient = _chunk7SQ5SGYZcjs.integrationsClient; exports.integrationsServer = _chunk7SQ5SGYZcjs.integrationsServer; exports.isChunkLoadError = _chunkJGLC4TO3cjs.isChunkLoadError; exports.navigateTo = _chunkFWE7LEQCcjs.navigateTo; exports.normalizeFarmClientCacheKey = _chunk63H6BKXGcjs.normalizeFarmClientCacheKey; exports.prefetch = _chunkFWE7LEQCcjs.prefetch; exports.prefetchServerQuery = _chunkN4UOK6ZIcjs.prefetchServerQuery; exports.pushState = _chunkFWE7LEQCcjs.pushState; exports.readPageState = _chunkFWE7LEQCcjs.readPageState; exports.replaceState = _chunkFWE7LEQCcjs.replaceState; exports.setTheme = _chunkFK6GO24Vcjs.setTheme; exports.storageClientCacheAdapter = _chunkBHY547NBcjs.storageClientCacheAdapter; exports.toggleTheme = _chunkFK6GO24Vcjs.toggleTheme; exports.useAction = _chunkD7JTOLFKcjs.useAction; exports.useBlocker = _chunkEMMQ64QWcjs.useBlocker; exports.useFetcher = _chunkBHY547NBcjs.useFetcher; exports.useMutation = _chunkBHY547NBcjs.useMutation; exports.useNavigation = _chunkEMMQ64QWcjs.useNavigation; exports.usePageState = _chunkEMMQ64QWcjs.usePageState; exports.useRouter = _chunkEMMQ64QWcjs.useRouter; exports.useScrollRestoration = _chunkEMMQ64QWcjs.useScrollRestoration; exports.useServerQuery = _chunkIE7XCHH3cjs.useServerQuery; exports.useTheme = _chunkPZYCPSCCcjs.useTheme;
|
package/dist/client.d.mts
CHANGED
|
@@ -8,10 +8,10 @@ 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-0y4FXJpC.mjs';
|
|
9
9
|
export { UseThemeResult, useTheme } from './theme/client.mjs';
|
|
10
10
|
import { FarmRouterPathParams, FarmRouterPathParam, FarmRouterBuildOptions } from './router.mjs';
|
|
11
|
-
import { i as FarmViewTransitionMode } from './spa-router-
|
|
12
|
-
export { a as FarmNavigateOptions, e as FarmNavigationBlocker, b as FarmNavigationBlockerContext, f as FarmNavigationListener, h as FarmNavigationLocation, F as FarmNavigationState, S as SPARouter, g as getRouter, n as navigateTo, p as prefetch, c as pushState, r as readPageState, d as replaceState } from './spa-router-
|
|
11
|
+
import { i as FarmViewTransitionMode } from './spa-router-D6fUA4Rn.mjs';
|
|
12
|
+
export { a as FarmNavigateOptions, e as FarmNavigationBlocker, b as FarmNavigationBlockerContext, f as FarmNavigationListener, h as FarmNavigationLocation, F as FarmNavigationState, S as SPARouter, g as getRouter, n as navigateTo, p as prefetch, c as pushState, r as readPageState, d as replaceState } from './spa-router-D6fUA4Rn.mjs';
|
|
13
13
|
import { b as FarmI18nLocale } from './types-CnH8DOqo.mjs';
|
|
14
|
-
export { U as UseBlockerOptions, e as UseBlockerReturn, f as UseRouterOptions, u as useBlocker, a as useNavigation, b as usePageState, c as useRouter, d as useScrollRestoration } from './router-
|
|
14
|
+
export { U as UseBlockerOptions, e as UseBlockerReturn, f as UseRouterOptions, u as useBlocker, a as useNavigation, b as usePageState, c as useRouter, d as useScrollRestoration } from './router-BK6K42Ij.mjs';
|
|
15
15
|
export { F as FarmChunkRecoveryOptions, i as installChunkErrorRecovery, a as isChunkLoadError } from './chunk-recovery-lnQFzcQP.mjs';
|
|
16
16
|
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';
|
|
17
17
|
export { S as ServerQueryFetchOptions, f as fetchServerQuery, p as prefetchServerQuery } from './server-query-runtime-aP52iuL5.mjs';
|
|
@@ -22,7 +22,7 @@ import './server-fn.mjs';
|
|
|
22
22
|
import './server-fn-error-DDh14a0V.mjs';
|
|
23
23
|
import './server-query.mjs';
|
|
24
24
|
import './types-DQnyD3VD.mjs';
|
|
25
|
-
import './client-plugins-
|
|
25
|
+
import './client-plugins-CV4eJ9De.mjs';
|
|
26
26
|
import './renderer.mjs';
|
|
27
27
|
import './deployment.mjs';
|
|
28
28
|
import 'http';
|
|
@@ -46,7 +46,7 @@ import './font.mjs';
|
|
|
46
46
|
import './after.mjs';
|
|
47
47
|
import 'node:http';
|
|
48
48
|
import './island-CfGru1MO.mjs';
|
|
49
|
-
import './render-plan-
|
|
49
|
+
import './render-plan-Cgx7v8tJ.mjs';
|
|
50
50
|
|
|
51
51
|
type MutationStatus = "idle" | "pending" | "success" | "error";
|
|
52
52
|
type AnyMutationTarget = (...args: any[]) => Promise<any>;
|
package/dist/client.d.ts
CHANGED
|
@@ -8,10 +8,10 @@ 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-BPJo5oXb.js';
|
|
9
9
|
export { UseThemeResult, useTheme } from './theme/client.js';
|
|
10
10
|
import { FarmRouterPathParams, FarmRouterPathParam, FarmRouterBuildOptions } from './router.js';
|
|
11
|
-
import { i as FarmViewTransitionMode } from './spa-router-
|
|
12
|
-
export { a as FarmNavigateOptions, e as FarmNavigationBlocker, b as FarmNavigationBlockerContext, f as FarmNavigationListener, h as FarmNavigationLocation, F as FarmNavigationState, S as SPARouter, g as getRouter, n as navigateTo, p as prefetch, c as pushState, r as readPageState, d as replaceState } from './spa-router-
|
|
11
|
+
import { i as FarmViewTransitionMode } from './spa-router-Mwbd7g2L.js';
|
|
12
|
+
export { a as FarmNavigateOptions, e as FarmNavigationBlocker, b as FarmNavigationBlockerContext, f as FarmNavigationListener, h as FarmNavigationLocation, F as FarmNavigationState, S as SPARouter, g as getRouter, n as navigateTo, p as prefetch, c as pushState, r as readPageState, d as replaceState } from './spa-router-Mwbd7g2L.js';
|
|
13
13
|
import { b as FarmI18nLocale } from './types-CnH8DOqo.js';
|
|
14
|
-
export { U as UseBlockerOptions, e as UseBlockerReturn, f as UseRouterOptions, u as useBlocker, a as useNavigation, b as usePageState, c as useRouter, d as useScrollRestoration } from './router-
|
|
14
|
+
export { U as UseBlockerOptions, e as UseBlockerReturn, f as UseRouterOptions, u as useBlocker, a as useNavigation, b as usePageState, c as useRouter, d as useScrollRestoration } from './router-DnW_2tQi.js';
|
|
15
15
|
export { F as FarmChunkRecoveryOptions, i as installChunkErrorRecovery, a as isChunkLoadError } from './chunk-recovery-lnQFzcQP.js';
|
|
16
16
|
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';
|
|
17
17
|
export { S as ServerQueryFetchOptions, f as fetchServerQuery, p as prefetchServerQuery } from './server-query-runtime-DXRNhX_3.js';
|
|
@@ -22,7 +22,7 @@ import './server-fn.js';
|
|
|
22
22
|
import './server-fn-error-DDh14a0V.js';
|
|
23
23
|
import './server-query.js';
|
|
24
24
|
import './types-DQnyD3VD.js';
|
|
25
|
-
import './client-plugins-
|
|
25
|
+
import './client-plugins-C8DjftDF.js';
|
|
26
26
|
import './renderer.js';
|
|
27
27
|
import './deployment.js';
|
|
28
28
|
import 'http';
|
|
@@ -46,7 +46,7 @@ import './font.js';
|
|
|
46
46
|
import './after.js';
|
|
47
47
|
import 'node:http';
|
|
48
48
|
import './island-CfGru1MO.js';
|
|
49
|
-
import './render-plan-
|
|
49
|
+
import './render-plan-BnnPTpus.js';
|
|
50
50
|
|
|
51
51
|
type MutationStatus = "idle" | "pending" | "success" | "error";
|
|
52
52
|
type AnyMutationTarget = (...args: any[]) => Promise<any>;
|
package/dist/client.mjs
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
storageClientCacheAdapter,
|
|
14
14
|
useFetcher,
|
|
15
15
|
useMutation
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-NNSAQX3U.mjs";
|
|
17
17
|
import {
|
|
18
18
|
installChunkErrorRecovery,
|
|
19
19
|
isChunkLoadError
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
usePageState,
|
|
31
31
|
useRouter,
|
|
32
32
|
useScrollRestoration
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-JPNFPAZ4.mjs";
|
|
34
34
|
import {
|
|
35
35
|
useTheme
|
|
36
36
|
} from "./chunk-BJIYRUGQ.mjs";
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
integrationClients,
|
|
50
50
|
integrationsClient,
|
|
51
51
|
integrationsServer
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-LBDP3YT3.mjs";
|
|
53
53
|
import "./chunk-72AK62H5.mjs";
|
|
54
54
|
import {
|
|
55
55
|
fetchServerQuery,
|
|
@@ -70,10 +70,10 @@ import {
|
|
|
70
70
|
pushState,
|
|
71
71
|
readPageState,
|
|
72
72
|
replaceState
|
|
73
|
-
} from "./chunk-
|
|
74
|
-
import "./chunk-
|
|
73
|
+
} from "./chunk-ND2CWPOD.mjs";
|
|
74
|
+
import "./chunk-IHQIOZLC.mjs";
|
|
75
75
|
import "./chunk-2PQNJXFM.mjs";
|
|
76
|
-
import "./chunk-
|
|
76
|
+
import "./chunk-QHSH7IH4.mjs";
|
|
77
77
|
import {
|
|
78
78
|
getFarmClientDataCache,
|
|
79
79
|
normalizeFarmClientCacheKey
|
|
@@ -103,7 +103,7 @@ import "./chunk-JNZ4TDWM.mjs";
|
|
|
103
103
|
import "./chunk-C4NCTZLM.mjs";
|
|
104
104
|
import "./chunk-CNOQY6Z7.mjs";
|
|
105
105
|
import "./chunk-4SIYUGRY.mjs";
|
|
106
|
-
import "./chunk-
|
|
106
|
+
import "./chunk-S3VWVTVA.mjs";
|
|
107
107
|
import "./chunk-L3KT7IXV.mjs";
|
|
108
108
|
import "./chunk-4RB44K6Z.mjs";
|
|
109
109
|
import "./chunk-55YI3RRB.mjs";
|
package/dist/config.d.mts
CHANGED
package/dist/config.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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 _chunk3A4KGQYIcjs = require('./chunk-3A4KGQYI.cjs');
|
|
4
4
|
require('./chunk-KR6CKSXT.cjs');
|
|
5
5
|
require('./chunk-6MVFL3R5.cjs');
|
|
6
6
|
require('./chunk-YJRZR7VU.cjs');
|
|
@@ -23,9 +23,9 @@ require('./chunk-SDOTRX3V.cjs');
|
|
|
23
23
|
require('./chunk-JDNHKPTD.cjs');
|
|
24
24
|
require('./chunk-CMGMGHUZ.cjs');
|
|
25
25
|
require('./chunk-OI6CMLWX.cjs');
|
|
26
|
-
require('./chunk-
|
|
26
|
+
require('./chunk-UJZLSXUB.cjs');
|
|
27
27
|
require('./chunk-G643DQCH.cjs');
|
|
28
|
-
require('./chunk-
|
|
28
|
+
require('./chunk-4GWRFP22.cjs');
|
|
29
29
|
require('./chunk-75RZHGLS.cjs');
|
|
30
30
|
|
|
31
31
|
|
|
@@ -355,7 +355,7 @@ async function createFarmDevtoolsSnapshot(input) {
|
|
|
355
355
|
}));
|
|
356
356
|
const deploymentPreset = String(_optionalChain([config, 'access', _13 => _13.deploy, 'optionalAccess', _14 => _14.preset]) || config.preset || "node-server");
|
|
357
357
|
const deploymentTarget = String(
|
|
358
|
-
_optionalChain([config, 'access', _15 => _15.deploy, 'optionalAccess', _16 => _16.target]) ||
|
|
358
|
+
_optionalChain([config, 'access', _15 => _15.deploy, 'optionalAccess', _16 => _16.target]) || _chunk3A4KGQYIcjs.getDeployTargetForPreset.call(void 0, deploymentPreset) || "node"
|
|
359
359
|
);
|
|
360
360
|
const env = input.env || process.env;
|
|
361
361
|
if (pageRoutes.length === 0) {
|