@farm.js/core 0.1.35 → 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/{metadata-BnLDsUOS.d.ts → agent-mcp-BC0bAGVF.d.mts} +45 -2
- package/dist/agent-mcp-handler-LPJ2CADR.mjs +19 -0
- package/dist/agent-mcp-handler-SJAHFSPI.cjs +19 -0
- package/dist/{metadata-WGpBYcGn.d.mts → agent-mcp-jyDHbQKe.d.ts} +45 -2
- package/dist/agent-runtime.cjs +6 -4
- package/dist/agent-runtime.d.mts +1 -1
- package/dist/agent-runtime.d.ts +1 -1
- package/dist/agent-runtime.mjs +5 -3
- package/dist/api/client.cjs +3 -3
- package/dist/api/client.mjs +2 -2
- package/dist/api/route-manager.cjs +9 -9
- package/dist/api/route-manager.d.mts +10 -4
- package/dist/api/route-manager.d.ts +10 -4
- package/dist/api/route-manager.mjs +8 -8
- package/dist/api/runtime.cjs +6 -6
- package/dist/api/runtime.d.mts +4 -62
- package/dist/api/runtime.d.ts +4 -62
- package/dist/api/runtime.mjs +5 -5
- package/dist/api.cjs +13 -12
- package/dist/api.d.mts +3 -3
- package/dist/api.d.ts +3 -3
- package/dist/api.mjs +12 -11
- package/dist/{app-BXB3JZYc.d.ts → app-CKO3iN1c.d.ts} +17 -3
- package/dist/{app-D_j9AAVL.d.mts → app-Cbkj9ufe.d.mts} +17 -3
- package/dist/app-markdown.cjs +6 -4
- package/dist/app-markdown.d.mts +3 -3
- package/dist/app-markdown.d.ts +3 -3
- package/dist/app-markdown.mjs +5 -3
- package/dist/{chunk-F7JZENPF.cjs → chunk-3A4KGQYI.cjs} +38 -30
- package/dist/{chunk-4MMGO7YW.cjs → chunk-3IP27TCG.cjs} +43 -32
- package/dist/{chunk-FDR64H6B.mjs → chunk-3KGDJLJK.mjs} +41 -2
- package/dist/{chunk-UJD4PHYB.mjs → chunk-4E5WBPEG.mjs} +72 -354
- package/dist/{chunk-KXWRO25S.cjs → chunk-4GPOC4LN.cjs} +3 -3
- package/dist/{chunk-Z2HLU4IX.cjs → chunk-4GWRFP22.cjs} +23 -2
- package/dist/{chunk-4KU5Q7C2.mjs → chunk-4P6ULFMD.mjs} +253 -67
- package/dist/chunk-4WQ6PGSJ.cjs +367 -0
- package/dist/{chunk-SMHH4VDG.mjs → chunk-4WVJLURN.mjs} +1 -1
- package/dist/{chunk-2F2ER724.cjs → chunk-5BXGGEC7.cjs} +27 -22
- package/dist/{chunk-3BHT4WMP.cjs → chunk-5D2JIPLH.cjs} +8 -8
- package/dist/{chunk-AHGECQEW.mjs → chunk-666CKENS.mjs} +1 -1
- package/dist/{chunk-GFHLGIYC.cjs → chunk-6LGFV2CQ.cjs} +8 -8
- package/dist/chunk-6SJ2KJTA.mjs +314 -0
- package/dist/{chunk-PFQKNERH.cjs → chunk-6TJITR2B.cjs} +457 -218
- package/dist/{chunk-73MC7ZL6.cjs → chunk-75X755YZ.cjs} +2 -2
- package/dist/{chunk-3UH7MRCP.cjs → chunk-7DWNJI73.cjs} +13 -13
- package/dist/{chunk-7L5V3KQO.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-CP6X4AEU.mjs → chunk-AJQTP4OO.mjs} +1 -1
- package/dist/{chunk-YKX5BK66.cjs → chunk-ATWHHSY2.cjs} +7 -7
- package/dist/{chunk-EFCQPQMG.cjs → chunk-B5PFZLKV.cjs} +89 -8
- package/dist/{chunk-FNO7A7CM.cjs → chunk-BHY547NB.cjs} +34 -16
- package/dist/{chunk-JHWOVJ3M.mjs → chunk-BUGNQIHC.mjs} +5 -0
- package/dist/{chunk-7GLPRTTF.cjs → chunk-CGBDNNSM.cjs} +2 -2
- package/dist/chunk-CI6E3UOH.cjs +314 -0
- package/dist/{chunk-2G2NNLE2.mjs → chunk-CQMVIOYP.mjs} +5 -5
- package/dist/{chunk-X6W5FFH6.cjs → chunk-CVH2BXPY.cjs} +8 -8
- package/dist/{chunk-TKSCR644.cjs → chunk-D3C5LBQY.cjs} +2 -2
- package/dist/{chunk-PZNL3WEG.mjs → chunk-DMEPTZTI.mjs} +22 -11
- package/dist/chunk-DTSROJ5J.mjs +367 -0
- package/dist/{chunk-DBNKI4NF.cjs → chunk-ECKF2BAM.cjs} +6 -2
- package/dist/{chunk-GQ3Z3IZI.cjs → chunk-EMMQ64QW.cjs} +18 -18
- package/dist/{chunk-6DU6UFUE.mjs → chunk-EXG5LD6B.mjs} +16 -8
- package/dist/{chunk-HUMR6LSU.mjs → chunk-F5QO4FNE.mjs} +1 -1
- package/dist/{chunk-YULD7ICZ.mjs → chunk-FBOJ55OM.mjs} +1 -1
- package/dist/{chunk-IHNMMXHV.mjs → chunk-FGRYBX5X.mjs} +15 -10
- package/dist/{chunk-D227TIEN.cjs → chunk-FWE7LEQC.cjs} +13 -13
- package/dist/{chunk-3BU22U3M.cjs → chunk-G2TEB74S.cjs} +5 -2
- package/dist/{chunk-G5RT7EXW.mjs → chunk-HEVMCTSR.mjs} +21 -6
- package/dist/{chunk-W7LF2J2S.mjs → chunk-HMRSWN47.mjs} +1 -1
- package/dist/{chunk-JG6DJF5A.mjs → chunk-HZFM2LWQ.mjs} +22 -1
- package/dist/{chunk-UAORZ7QA.mjs → chunk-IAIYV4RZ.mjs} +2 -2
- 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-F6Z3Y5KL.mjs → chunk-K3SAEIM3.mjs} +5 -2
- package/dist/{chunk-QAU5JD57.mjs → chunk-K4I4O5TS.mjs} +289 -50
- package/dist/{chunk-KN7K4VQN.mjs → chunk-KDTBF3UU.mjs} +1 -1
- package/dist/{chunk-OMVAU7NT.cjs → chunk-KIIMAWOJ.cjs} +11 -1
- package/dist/{chunk-43FMW62B.mjs → chunk-KMTGADN3.mjs} +28 -0
- 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-6ETPZTJI.mjs → chunk-LBGILORX.mjs} +116 -55
- package/dist/{chunk-IPXLADVO.cjs → chunk-LOFKRKO7.cjs} +122 -61
- package/dist/{chunk-ULAWS2PA.cjs → chunk-LPFV45AY.cjs} +29 -26
- package/dist/{chunk-3KZS4SUS.mjs → chunk-MCIZVNOQ.mjs} +1 -1
- package/dist/{chunk-RU3M2FIK.cjs → chunk-MRMI32SN.cjs} +87 -369
- package/dist/{chunk-XCMCS4DA.mjs → chunk-ND2CWPOD.mjs} +2 -2
- package/dist/{chunk-XCACDAZZ.cjs → chunk-NDILNQ4L.cjs} +25 -10
- package/dist/{chunk-6TJOML4E.mjs → chunk-NFMDCAOS.mjs} +14 -11
- package/dist/{chunk-UXFQ3UDA.cjs → chunk-NICDYKBS.cjs} +42 -3
- package/dist/{chunk-EZDQRNQ7.mjs → chunk-NNSAQX3U.mjs} +23 -5
- package/dist/{chunk-YC6V7PWE.cjs → chunk-NQ6QFZWD.cjs} +1 -1
- package/dist/{chunk-PDOCJ6RY.mjs → chunk-O6WAEAX3.mjs} +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-PTZ2TVNE.cjs +178 -0
- package/dist/{chunk-6WCPV6G2.mjs → chunk-Q2KB32T4.mjs} +1 -1
- package/dist/{chunk-ICUQICNC.cjs → chunk-Q5FYSK45.cjs} +718 -532
- package/dist/{chunk-5SJWVY6R.mjs → chunk-QHSH7IH4.mjs} +9 -0
- package/dist/{chunk-Q3VLETLE.mjs → chunk-RRMVL6CJ.mjs} +4 -4
- package/dist/{chunk-IZY3V5XW.mjs → chunk-S3VWVTVA.mjs} +14 -1
- package/dist/{chunk-FFFW3OQ7.cjs → chunk-S6FJO323.cjs} +2 -2
- package/dist/{chunk-VFQT3LAO.cjs → chunk-SDOTRX3V.cjs} +5 -5
- package/dist/chunk-SGBZPZUW.mjs +75 -0
- package/dist/{chunk-BMWDEBXO.cjs → chunk-SHLXACIO.cjs} +31 -3
- package/dist/{chunk-ZXGAFZDO.cjs → chunk-T5OJPTVN.cjs} +2 -2
- package/dist/{chunk-2ELDTQRN.mjs → chunk-TDNWPAVR.mjs} +1 -1
- package/dist/{chunk-VZJR7UTG.cjs → chunk-TE2G5ION.cjs} +2 -2
- package/dist/{chunk-IHNIDL6H.cjs → chunk-TO4GJ56K.cjs} +22 -11
- package/dist/{chunk-4JHOT46A.mjs → chunk-TPLJVC7E.mjs} +86 -5
- package/dist/{chunk-NRSN7G7E.mjs → chunk-TW4GYDBJ.mjs} +1 -1
- package/dist/{chunk-XBML5KMG.cjs → chunk-U6MPZ35Q.cjs} +24 -14
- package/dist/chunk-UH6QN5NL.mjs +178 -0
- package/dist/{chunk-FTFYRMQQ.cjs → chunk-UJZLSXUB.cjs} +53 -28
- package/dist/chunk-UXHS27O6.cjs +75 -0
- package/dist/{chunk-DQQOKWYA.cjs → chunk-VR4GD5I3.cjs} +3 -3
- package/dist/{chunk-22LTEMGQ.mjs → chunk-VXAWRDK7.mjs} +14 -4
- package/dist/{chunk-62XKI4Z3.cjs → chunk-W2YDNK66.cjs} +6 -3
- package/dist/{chunk-VPTDD5XF.cjs → chunk-WBKEZXWE.cjs} +5 -0
- package/dist/{chunk-EJQT6KZN.cjs → chunk-WC5UV2HQ.cjs} +2 -2
- package/dist/{chunk-SAZVVAJH.mjs → chunk-WQ7T2263.mjs} +18 -7
- package/dist/chunk-WRPHYQVY.mjs +109 -0
- package/dist/chunk-WT4TGLXT.cjs +109 -0
- package/dist/{chunk-SOMHP6GF.mjs → chunk-XOPOIFTJ.mjs} +2 -2
- package/dist/{chunk-3PXS2MHU.mjs → chunk-YCKO6FRS.mjs} +1 -1
- package/dist/{chunk-C35ZBVRD.mjs → chunk-YWMZUGIS.mjs} +6 -2
- package/dist/{chunk-HMIJDL7S.mjs → chunk-Z5BEWYVO.mjs} +31 -6
- package/dist/{chunk-OKZUAXHF.mjs → chunk-Z7LA7MHQ.mjs} +1 -1
- package/dist/{chunk-Y7RKTKYI.mjs → chunk-ZMMBIVQM.mjs} +10 -0
- package/dist/{client-plugins-HIyulDym.d.ts → client-plugins-C8DjftDF.d.ts} +112 -5
- package/dist/{client-plugins-CvIslxWi.d.mts → client-plugins-CV4eJ9De.d.mts} +112 -5
- 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-EAUY43BS.cjs → devtools-JXFQNWSH.cjs} +11 -10
- package/dist/{devtools-EE5RIBTH.mjs → devtools-KVOY2TCZ.mjs} +10 -9
- package/dist/docs.cjs +13 -12
- package/dist/docs.d.mts +2 -2
- package/dist/docs.d.ts +2 -2
- package/dist/docs.mjs +12 -11
- 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/image/server.cjs +3 -3
- package/dist/image/server.mjs +2 -2
- package/dist/image/sharp.cjs +10 -10
- package/dist/image/sharp.mjs +2 -2
- package/dist/index.cjs +61 -54
- package/dist/index.d.mts +14 -14
- package/dist/index.d.ts +14 -14
- package/dist/index.mjs +60 -53
- package/dist/integrations.cjs +8 -4
- package/dist/integrations.d.mts +1 -1
- package/dist/integrations.d.ts +1 -1
- package/dist/integrations.mjs +7 -3
- package/dist/internal/app-markdown-runtime.cjs +5 -3
- 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 +4 -2
- package/dist/internal/build-runtime.cjs +38 -34
- package/dist/internal/build-runtime.d.mts +3 -3
- package/dist/internal/build-runtime.d.ts +3 -3
- package/dist/internal/build-runtime.mjs +37 -33
- package/dist/internal/cli-runtime.cjs +17 -16
- package/dist/internal/cli-runtime.mjs +16 -15
- 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 +11 -10
- package/dist/internal/config-runtime.d.mts +2 -2
- package/dist/internal/config-runtime.d.ts +2 -2
- package/dist/internal/config-runtime.mjs +10 -9
- package/dist/internal/infra-analytics-runtime.cjs +5 -5
- package/dist/internal/infra-analytics-runtime.mjs +3 -3
- package/dist/internal/isolated-boundary.cjs +2 -2
- package/dist/internal/isolated-boundary.d.mts +0 -1
- package/dist/internal/isolated-boundary.d.ts +0 -1
- package/dist/internal/isolated-boundary.mjs +1 -1
- package/dist/internal/metadata-image-runtime.cjs +3 -3
- package/dist/internal/metadata-image-runtime.mjs +2 -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 +27 -48
- package/dist/internal/production-runtime.d.mts +67 -27
- package/dist/internal/production-runtime.d.ts +67 -27
- package/dist/internal/production-runtime.mjs +34 -55
- package/dist/{layers-BRQF5ETU.mjs → layers-UTB43B7A.mjs} +1 -1
- package/dist/layers-VUWIOFEO.cjs +18 -0
- package/dist/markdown.cjs +1 -1
- package/dist/markdown.d.mts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/markdown.mjs +1 -1
- package/dist/middleware.cjs +10 -10
- package/dist/middleware.d.mts +6 -4
- package/dist/middleware.d.ts +6 -4
- package/dist/middleware.mjs +9 -9
- 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/{nitro-OVPLKPE2.cjs → nitro-7F65EZZS.cjs} +3 -3
- package/dist/{nitro-MXRDCXWZ.mjs → nitro-MPZJGPXK.mjs} +2 -2
- package/dist/plugin.cjs +31 -28
- package/dist/plugin.d.mts +1 -1
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.mjs +30 -27
- package/dist/{production-runtime-Crq6CJ-2.d.ts → production-runtime-C2kkrPVZ.d.ts} +1 -1
- package/dist/{production-runtime-0sRnuYc-.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-8ozZh2Qv.d.ts → render-plan-BnnPTpus.d.ts} +1 -1
- package/dist/{render-plan-gs9GGPzw.d.mts → render-plan-Cgx7v8tJ.d.mts} +1 -1
- package/dist/renderer/react/server.cjs +3 -3
- package/dist/renderer/react/server.mjs +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-B5G8rLBH.d.ts → request-BNWr7r5e.d.ts} +1 -1
- package/dist/{request-fkhiynXe.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-lS5nUMua.d.ts → route-rendering-Bx4Auw6Q.d.ts} +1 -1
- package/dist/{route-rendering-CLnS7AZj.d.mts → route-rendering-DWFp3Yq4.d.mts} +1 -1
- package/dist/{router-ifU8Dui1.d.mts → router-BK6K42Ij.d.mts} +1 -1
- package/dist/{router-4iuiYnOW.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-CA3Ei5k_.d.ts +69 -0
- package/dist/runtime-DJDaCMd_.d.mts +69 -0
- package/dist/server-action-security.cjs +3 -3
- package/dist/server-action-security.mjs +2 -2
- package/dist/server-fn.cjs +5 -5
- package/dist/server-fn.mjs +4 -4
- 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 +6 -6
- package/dist/server-query.mjs +5 -5
- package/dist/server.cjs +57 -54
- package/dist/server.d.mts +7 -7
- package/dist/server.d.ts +7 -7
- package/dist/server.mjs +35 -32
- package/dist/{spa-router-Bq7VCOwx.d.mts → spa-router-D6fUA4Rn.d.mts} +2 -2
- package/dist/{spa-router-DaJk5Re4.d.ts → spa-router-Mwbd7g2L.d.ts} +2 -2
- package/dist/testing.cjs +13 -13
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.mjs +10 -10
- package/dist/theme/server.cjs +4 -4
- package/dist/theme/server.mjs +3 -3
- package/dist/{utils-BXLmFsVR.d.ts → utils-BwVcAfUR.d.ts} +1 -1
- package/dist/{utils-XJn0c9bj.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 +31 -28
- package/dist/vite.d.mts +1 -1
- package/dist/vite.d.ts +1 -1
- package/dist/vite.mjs +30 -27
- package/dist/workflows.cjs +3 -3
- package/dist/workflows.mjs +2 -2
- 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/layers-4PNE2HOY.cjs +0 -18
- /package/dist/{chunk-SJNMVDDF.cjs → chunk-FUCSUGDM.cjs} +0 -0
- /package/dist/{chunk-UDNPLXW7.mjs → chunk-MYIZXDZA.mjs} +0 -0
|
@@ -3,20 +3,21 @@ import {
|
|
|
3
3
|
parseMiddlewareCookieHeader,
|
|
4
4
|
serializeMiddlewareCookie,
|
|
5
5
|
serializeMiddlewareCookieDeletion
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-J3ANCZKA.mjs";
|
|
7
7
|
import {
|
|
8
8
|
compileMiddlewareConfig,
|
|
9
9
|
compileMiddlewareRoute,
|
|
10
10
|
matchesMiddlewareConfig,
|
|
11
11
|
matchesMiddlewareConfigAt,
|
|
12
|
-
matchesMiddlewareRouteAt
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
createFarmAPIMiddlewarePathnames
|
|
16
|
-
} from "./chunk-BTHHUD7Q.mjs";
|
|
12
|
+
matchesMiddlewareRouteAt,
|
|
13
|
+
toMiddlewareRoutePathname
|
|
14
|
+
} from "./chunk-HZFM2LWQ.mjs";
|
|
17
15
|
import {
|
|
18
16
|
emitFarmEvent
|
|
19
17
|
} from "./chunk-FUZEBRP3.mjs";
|
|
18
|
+
import {
|
|
19
|
+
createFarmAPIMiddlewarePathnames
|
|
20
|
+
} from "./chunk-BTHHUD7Q.mjs";
|
|
20
21
|
import {
|
|
21
22
|
_withFarmResponseHeaders
|
|
22
23
|
} from "./chunk-Z3HATSKO.mjs";
|
|
@@ -260,7 +261,7 @@ function createHandledResponse(body, init, headers) {
|
|
|
260
261
|
return new Response(body, { ...init, headers: responseHeaders });
|
|
261
262
|
}
|
|
262
263
|
__name(createHandledResponse, "createHandledResponse");
|
|
263
|
-
function createWebMiddlewareContext(request, parent, trustProxy = false, clientAddress) {
|
|
264
|
+
function createWebMiddlewareContext(request, parent, trustProxy = false, clientAddress, toRoutePathname) {
|
|
264
265
|
let currentRequest = withNodeRequestShape(request, trustProxy, clientAddress);
|
|
265
266
|
let handledResponse = null;
|
|
266
267
|
const url = new URL(currentRequest.url);
|
|
@@ -281,6 +282,7 @@ function createWebMiddlewareContext(request, parent, trustProxy = false, clientA
|
|
|
281
282
|
response: responseShim.response,
|
|
282
283
|
url,
|
|
283
284
|
pathname: url.pathname,
|
|
285
|
+
routePathname: toMiddlewareRoutePathname(url.pathname, toRoutePathname),
|
|
284
286
|
searchParams: url.searchParams,
|
|
285
287
|
method: currentRequest.method || "GET",
|
|
286
288
|
params: {},
|
|
@@ -323,6 +325,7 @@ function createWebMiddlewareContext(request, parent, trustProxy = false, clientA
|
|
|
323
325
|
ctx.request = currentRequest;
|
|
324
326
|
ctx.url = nextUrl;
|
|
325
327
|
ctx.pathname = nextUrl.pathname;
|
|
328
|
+
ctx.routePathname = toMiddlewareRoutePathname(nextUrl.pathname, toRoutePathname);
|
|
326
329
|
ctx.searchParams = nextUrl.searchParams;
|
|
327
330
|
ctx.route = nextUrl.pathname;
|
|
328
331
|
},
|
|
@@ -480,15 +483,16 @@ function createProductionMiddlewareRunner(options = {}) {
|
|
|
480
483
|
if (!globalConfig && entries.length === 0) {
|
|
481
484
|
return emptyResult(request);
|
|
482
485
|
}
|
|
486
|
+
const toRoutePathname = /* @__PURE__ */ __name((pathname) => options.i18n?.enabled ? stripFarmLocaleFromPathname(pathname, options.i18n) : stripFarmBasePath(pathname, options.i18n?.basePath ?? "/"), "toRoutePathname");
|
|
483
487
|
let contextState = createWebMiddlewareContext(
|
|
484
488
|
request,
|
|
485
489
|
void 0,
|
|
486
490
|
options.server?.trustProxy === true,
|
|
487
|
-
requestOptions.clientAddress
|
|
491
|
+
requestOptions.clientAddress,
|
|
492
|
+
toRoutePathname
|
|
488
493
|
);
|
|
489
494
|
let ctx = contextState.ctx;
|
|
490
495
|
let currentRequest = contextState.getRequest();
|
|
491
|
-
const toRoutePathname = /* @__PURE__ */ __name((pathname) => options.i18n?.enabled ? stripFarmLocaleFromPathname(pathname, options.i18n) : stripFarmBasePath(pathname, options.i18n?.basePath ?? "/"), "toRoutePathname");
|
|
492
496
|
const initialRequestPathname = ctx.pathname;
|
|
493
497
|
const initialPathname = toRoutePathname(initialRequestPathname);
|
|
494
498
|
const matchPathnames = /* @__PURE__ */ __name((pathname, requestPathname) => options.rawPathRouting && requestPathname !== pathname ? [
|
|
@@ -542,7 +546,8 @@ function createProductionMiddlewareRunner(options = {}) {
|
|
|
542
546
|
currentRequest,
|
|
543
547
|
parentData,
|
|
544
548
|
options.server?.trustProxy === true,
|
|
545
|
-
requestOptions.clientAddress
|
|
549
|
+
requestOptions.clientAddress,
|
|
550
|
+
toRoutePathname
|
|
546
551
|
);
|
|
547
552
|
ctx = contextState.ctx;
|
|
548
553
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
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
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkS6FJO323cjs = require('./chunk-S6FJO323.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkR5A5KNVXcjs = require('./chunk-R5A5KNVX.cjs');
|
|
@@ -9,7 +9,7 @@ var _chunkR5A5KNVXcjs = require('./chunk-R5A5KNVX.cjs');
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkJEZO6VURcjs = require('./chunk-JEZO6VUR.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
var _chunkJ7FSKED3cjs = require('./chunk-J7FSKED3.cjs');
|
|
@@ -227,12 +227,12 @@ var _SPARouter = class _SPARouter {
|
|
|
227
227
|
viewTransition = false,
|
|
228
228
|
refresh = false
|
|
229
229
|
} = options;
|
|
230
|
-
const url =
|
|
231
|
-
if (
|
|
230
|
+
const url = _chunkJEZO6VURcjs.resolveFarmNavigationURL.call(void 0, href, window.location.href);
|
|
231
|
+
if (_chunkJEZO6VURcjs.isFarmBlockedNavigationURL.call(void 0, url)) return;
|
|
232
232
|
const pathname = url.pathname;
|
|
233
233
|
const search = url.search;
|
|
234
234
|
const fullPath = pathname + search;
|
|
235
|
-
if (
|
|
235
|
+
if (_chunkJEZO6VURcjs.isFarmExternalNavigationURL.call(void 0, url, window.location.origin) || _chunkS6FJO323cjs.isFarmLocaleChangeHref.call(void 0, url.toString()) || this.options.shouldUseDocumentNavigation(pathname)) {
|
|
236
236
|
this.cancelActiveNavigation();
|
|
237
237
|
if (replace) window.location.replace(url.toString());
|
|
238
238
|
else window.location.assign(url.toString());
|
|
@@ -336,9 +336,9 @@ var _SPARouter = class _SPARouter {
|
|
|
336
336
|
*/
|
|
337
337
|
async prefetch(href) {
|
|
338
338
|
if (this.destroyed) return;
|
|
339
|
-
if (
|
|
340
|
-
const url =
|
|
341
|
-
if (
|
|
339
|
+
if (_chunkS6FJO323cjs.isFarmLocaleChangeHref.call(void 0, href)) return;
|
|
340
|
+
const url = _chunkJEZO6VURcjs.resolveFarmNavigationURL.call(void 0, href, window.location.href);
|
|
341
|
+
if (_chunkJEZO6VURcjs.isFarmExternalNavigationURL.call(void 0, url, window.location.origin)) return;
|
|
342
342
|
if (this.options.shouldUseDocumentNavigation(url.pathname)) return;
|
|
343
343
|
const fullPath = url.pathname + url.search;
|
|
344
344
|
const interceptFrom = window.location.pathname + window.location.search;
|
|
@@ -497,7 +497,7 @@ var _SPARouter = class _SPARouter {
|
|
|
497
497
|
this.writePageState(action, readPageState(), href, false);
|
|
498
498
|
}
|
|
499
499
|
async commitNavigation(options) {
|
|
500
|
-
const historyUrl =
|
|
500
|
+
const historyUrl = _chunkJEZO6VURcjs.resolveFarmNavigationURL.call(void 0,
|
|
501
501
|
options.pageData.canonicalPath || options.fullPath,
|
|
502
502
|
window.location.href
|
|
503
503
|
);
|
|
@@ -519,13 +519,13 @@ var _SPARouter = class _SPARouter {
|
|
|
519
519
|
window.history.pushState(historyState, "", historyPath);
|
|
520
520
|
}
|
|
521
521
|
this.currentHistoryIndex = nextHistoryIndex;
|
|
522
|
-
const resolvedHistoryUrl =
|
|
522
|
+
const resolvedHistoryUrl = _chunkJEZO6VURcjs.resolveFarmNavigationURL.call(void 0, historyPath, window.location.href);
|
|
523
523
|
this.currentHistoryPath = resolvedHistoryUrl.pathname + resolvedHistoryUrl.search;
|
|
524
524
|
this.currentHistoryHash = resolvedHistoryUrl.hash;
|
|
525
525
|
this.currentInterceptFrom = historyState[FARM_INTERCEPT_FROM_KEY];
|
|
526
526
|
notifyRouterHistoryChange();
|
|
527
527
|
this.updateDocumentMetadata(options.pageData.metadata);
|
|
528
|
-
|
|
528
|
+
_chunkS6FJO323cjs._hydrateFarmI18n.call(void 0, options.pageData.i18n);
|
|
529
529
|
if (this.onNavigate) {
|
|
530
530
|
await this.onNavigate(options.pageData);
|
|
531
531
|
}
|
|
@@ -757,7 +757,7 @@ var _SPARouter = class _SPARouter {
|
|
|
757
757
|
}
|
|
758
758
|
if (!this.isCurrentNavigation(navigation, clientNavigation)) return;
|
|
759
759
|
this.updateDocumentMetadata(pageData.metadata);
|
|
760
|
-
|
|
760
|
+
_chunkS6FJO323cjs._hydrateFarmI18n.call(void 0, pageData.i18n);
|
|
761
761
|
if (this.onNavigate) {
|
|
762
762
|
await this.onNavigate(pageData);
|
|
763
763
|
}
|
|
@@ -872,7 +872,7 @@ var _SPARouter = class _SPARouter {
|
|
|
872
872
|
}
|
|
873
873
|
writePageState(action, state, href, notify = true) {
|
|
874
874
|
if (typeof window === "undefined") return;
|
|
875
|
-
const url = href ?
|
|
875
|
+
const url = href ? _chunkJEZO6VURcjs.resolveFarmNavigationURL.call(void 0, href, window.location.href).toString() : window.location.href;
|
|
876
876
|
const parsedUrl = new URL(url);
|
|
877
877
|
const nextPath = parsedUrl.pathname + parsedUrl.search;
|
|
878
878
|
const historyPath = nextPath + parsedUrl.hash;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkAI7QMY7Ocjs = require('./chunk-AI7QMY7O.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkNICDYKBScjs = require('./chunk-NICDYKBS.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
@@ -112,7 +112,7 @@ function toWebRequest(ctx) {
|
|
|
112
112
|
if (isWebRequest(ctx.request)) {
|
|
113
113
|
return ctx.request;
|
|
114
114
|
}
|
|
115
|
-
return
|
|
115
|
+
return _chunkNICDYKBScjs.createWebRequestFromFarmRequest.call(void 0, ctx.request, { origin: ctx.url.origin });
|
|
116
116
|
}
|
|
117
117
|
_chunkS3JO3N4Hcjs.__name.call(void 0, toWebRequest, "toWebRequest");
|
|
118
118
|
function createRequestMiddlewareContext(ctx) {
|
|
@@ -123,6 +123,9 @@ function createRequestMiddlewareContext(ctx) {
|
|
|
123
123
|
get pathname() {
|
|
124
124
|
return ctx.pathname;
|
|
125
125
|
},
|
|
126
|
+
get routePathname() {
|
|
127
|
+
return ctx.routePathname;
|
|
128
|
+
},
|
|
126
129
|
get searchParams() {
|
|
127
130
|
return ctx.searchParams;
|
|
128
131
|
},
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
DEFAULT_FARM_SERVER_BODY_SIZE_LIMIT,
|
|
16
16
|
bufferFarmRequestBody,
|
|
17
17
|
createFarmRequestBodyErrorResponse
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ZMMBIVQM.mjs";
|
|
19
19
|
import {
|
|
20
20
|
resolveFarmAPICanonicalPathname
|
|
21
21
|
} from "./chunk-BTHHUD7Q.mjs";
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
} from "./chunk-4SIYUGRY.mjs";
|
|
35
35
|
import {
|
|
36
36
|
_runWithCurrentRequest
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-3KGDJLJK.mjs";
|
|
38
38
|
import {
|
|
39
39
|
__name
|
|
40
40
|
} from "./chunk-LPEX4YW6.mjs";
|
|
@@ -66,7 +66,7 @@ function mergePluginAPIRoutes(existing, plugins, expected, options = {}) {
|
|
|
66
66
|
endpoints: { ...route.endpoints }
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
const api = createPluginLocalAPI(existing, options.bodySizeLimit);
|
|
69
|
+
const api = createPluginLocalAPI(existing, options.bodySizeLimit, options.dispatch);
|
|
70
70
|
for (const definition of resolvePluginRoutes(plugins, { api })) {
|
|
71
71
|
registerAPIRouteShape(shapes, definition.path, `plugin:${definition.path}`, "app");
|
|
72
72
|
let route = routes.get(definition.path);
|
|
@@ -101,7 +101,18 @@ ${actualSignature || "(none)"}`
|
|
|
101
101
|
return result;
|
|
102
102
|
}
|
|
103
103
|
__name(mergePluginAPIRoutes, "mergePluginAPIRoutes");
|
|
104
|
-
|
|
104
|
+
var DISPATCH_DROPPED_HEADERS = [
|
|
105
|
+
"accept-encoding",
|
|
106
|
+
"connection",
|
|
107
|
+
"content-length",
|
|
108
|
+
"keep-alive",
|
|
109
|
+
"proxy-connection",
|
|
110
|
+
"te",
|
|
111
|
+
"trailer",
|
|
112
|
+
"transfer-encoding",
|
|
113
|
+
"upgrade"
|
|
114
|
+
];
|
|
115
|
+
function createPluginLocalAPI(routes, bodySizeLimit, dispatch) {
|
|
105
116
|
const endpoints = /* @__PURE__ */ new Map();
|
|
106
117
|
for (const route of routes) {
|
|
107
118
|
for (const method of route.methods) {
|
|
@@ -119,8 +130,12 @@ function createPluginLocalAPI(routes, bodySizeLimit) {
|
|
|
119
130
|
}),
|
|
120
131
|
output: endpoint.__output,
|
|
121
132
|
mcp: endpoint.__mcp === true ? true : endpoint.__mcp ? Object.freeze({ ...endpoint.__mcp }) : void 0,
|
|
122
|
-
invoke(request, params = {}) {
|
|
123
|
-
|
|
133
|
+
async invoke(request, params = {}) {
|
|
134
|
+
if (!dispatch)
|
|
135
|
+
return invokeAPIRouteEndpoint(endpoint, request, { ...params }, bodySizeLimit);
|
|
136
|
+
const headers = new Headers(request.headers);
|
|
137
|
+
for (const name of DISPATCH_DROPPED_HEADERS) headers.delete(name);
|
|
138
|
+
return dispatch(new Request(request, { headers }));
|
|
124
139
|
}
|
|
125
140
|
});
|
|
126
141
|
endpoints.set(`${normalizedMethod} ${route.path}`, descriptor);
|
|
@@ -183,6 +183,25 @@ function matchPattern(pattern, pathname) {
|
|
|
183
183
|
};
|
|
184
184
|
}
|
|
185
185
|
__name(matchPattern, "matchPattern");
|
|
186
|
+
function withRoutePathname(ctx, routePathname) {
|
|
187
|
+
return new Proxy(ctx, {
|
|
188
|
+
get(target, key) {
|
|
189
|
+
return key === "pathname" || key === "routePathname" ? routePathname : Reflect.get(target, key, target);
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
__name(withRoutePathname, "withRoutePathname");
|
|
194
|
+
function matchesMiddlewarePredicate(predicate, ctx, getRoutePathname = () => ctx.routePathname) {
|
|
195
|
+
if (predicate(ctx)) return true;
|
|
196
|
+
const routePathname = getRoutePathname();
|
|
197
|
+
if (routePathname === void 0 || routePathname === ctx.pathname) return false;
|
|
198
|
+
return Boolean(predicate(withRoutePathname(ctx, routePathname)));
|
|
199
|
+
}
|
|
200
|
+
__name(matchesMiddlewarePredicate, "matchesMiddlewarePredicate");
|
|
201
|
+
function toMiddlewareRoutePathname(pathname, toRoutePathname = (value) => value) {
|
|
202
|
+
return canonicalizeRequestPathname(toRoutePathname(pathname));
|
|
203
|
+
}
|
|
204
|
+
__name(toMiddlewareRoutePathname, "toMiddlewareRoutePathname");
|
|
186
205
|
function matchesCompiledMiddlewareConfig(pathname, config, ctx) {
|
|
187
206
|
let canonicalPathname;
|
|
188
207
|
const getCanonicalPathname = /* @__PURE__ */ __name(() => canonicalPathname ?? (canonicalPathname = canonicalizeRequestPathname(pathname)), "getCanonicalPathname");
|
|
@@ -196,7 +215,7 @@ function matchesCompiledMiddlewareConfig(pathname, config, ctx) {
|
|
|
196
215
|
if (config.matcher) {
|
|
197
216
|
for (const matcher of config.matcher) {
|
|
198
217
|
if (typeof matcher === "function") {
|
|
199
|
-
if (matcher
|
|
218
|
+
if (matchesMiddlewarePredicate(matcher, ctx, getCanonicalPathname)) {
|
|
200
219
|
return { matched: true };
|
|
201
220
|
}
|
|
202
221
|
continue;
|
|
@@ -232,6 +251,8 @@ export {
|
|
|
232
251
|
matchesMiddlewareRoute,
|
|
233
252
|
matchesMiddlewareRouteAt,
|
|
234
253
|
compileMiddlewareConfig,
|
|
254
|
+
matchesMiddlewarePredicate,
|
|
255
|
+
toMiddlewareRoutePathname,
|
|
235
256
|
matchesCompiledMiddlewareConfig,
|
|
236
257
|
matchesMiddlewareConfig,
|
|
237
258
|
matchesMiddlewareConfigAt
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
_runServerFunctionForCaller,
|
|
5
5
|
createServerFn,
|
|
6
6
|
createServerFunctionDescriptor
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RRMVL6CJ.mjs";
|
|
8
8
|
import {
|
|
9
9
|
createFarmServerQueryResult
|
|
10
10
|
} from "./chunk-KGB5UXJJ.mjs";
|
|
11
11
|
import {
|
|
12
12
|
getServerActionExecutionContext
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-4WVJLURN.mjs";
|
|
14
14
|
import {
|
|
15
15
|
createRouteDataCacheTag,
|
|
16
16
|
getFarmDataCache
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-JM5XPKWH.mjs";
|
|
4
4
|
import {
|
|
5
5
|
createWebRequestFromFarmRequest
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3KGDJLJK.mjs";
|
|
7
7
|
import {
|
|
8
8
|
__name
|
|
9
9
|
} from "./chunk-LPEX4YW6.mjs";
|
|
@@ -123,6 +123,9 @@ function createRequestMiddlewareContext(ctx) {
|
|
|
123
123
|
get pathname() {
|
|
124
124
|
return ctx.pathname;
|
|
125
125
|
},
|
|
126
|
+
get routePathname() {
|
|
127
|
+
return ctx.routePathname;
|
|
128
|
+
},
|
|
126
129
|
get searchParams() {
|
|
127
130
|
return ctx.searchParams;
|
|
128
131
|
},
|
|
@@ -10,6 +10,14 @@ function isFarmBlockedNavigationURL(url) {
|
|
|
10
10
|
return true;
|
|
11
11
|
}
|
|
12
12
|
_chunkS3JO3N4Hcjs.__name.call(void 0, isFarmBlockedNavigationURL, "isFarmBlockedNavigationURL");
|
|
13
|
+
function isFarmScriptURL(href) {
|
|
14
|
+
try {
|
|
15
|
+
return new URL(href, "http://farm.invalid").protocol === "javascript:";
|
|
16
|
+
} catch (e) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, isFarmScriptURL, "isFarmScriptURL");
|
|
13
21
|
function isFarmExternalNavigationURL(url, currentOrigin) {
|
|
14
22
|
return url.protocol !== "http:" && url.protocol !== "https:" || url.origin !== currentOrigin;
|
|
15
23
|
}
|
|
@@ -23,4 +31,5 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, resolveFarmNavigationURL, "resolveFarmNavi
|
|
|
23
31
|
|
|
24
32
|
|
|
25
33
|
|
|
26
|
-
|
|
34
|
+
|
|
35
|
+
exports.isFarmBlockedNavigationURL = isFarmBlockedNavigationURL; exports.isFarmScriptURL = isFarmScriptURL; exports.isFarmExternalNavigationURL = isFarmExternalNavigationURL; exports.resolveFarmNavigationURL = resolveFarmNavigationURL;
|
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
notifyHistoryChange,
|
|
8
8
|
readPageState,
|
|
9
9
|
subscribeHistoryChange
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ND2CWPOD.mjs";
|
|
11
11
|
import {
|
|
12
12
|
getFarmI18nClientState
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-IHQIOZLC.mjs";
|
|
14
14
|
import {
|
|
15
15
|
_resolveCurrentRequest
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-S3VWVTVA.mjs";
|
|
17
17
|
import {
|
|
18
18
|
stripFarmLocaleFromPathname
|
|
19
19
|
} from "./chunk-L3KT7IXV.mjs";
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MiddlewareManager
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NFMDCAOS.mjs";
|
|
4
|
+
import {
|
|
5
|
+
matchesMiddlewarePredicate
|
|
6
|
+
} from "./chunk-HZFM2LWQ.mjs";
|
|
4
7
|
import {
|
|
5
8
|
resolveFarmI18nConfig
|
|
6
9
|
} from "./chunk-BCMSYSN2.mjs";
|
|
@@ -210,7 +213,7 @@ var _MiddlewareChainImpl = class _MiddlewareChainImpl {
|
|
|
210
213
|
*/
|
|
211
214
|
when(condition, fn) {
|
|
212
215
|
const conditionalMiddleware = /* @__PURE__ */ __name(async (ctx, next) => {
|
|
213
|
-
const shouldRun = typeof condition === "function" ? condition
|
|
216
|
+
const shouldRun = typeof condition === "function" ? matchesMiddlewarePredicate(condition, ctx) : condition;
|
|
214
217
|
if (!shouldRun) {
|
|
215
218
|
return next();
|
|
216
219
|
}
|