@farm.js/core 0.1.38 → 0.1.40
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-BwKlpnc7.d.mts → agent-mcp-DRlXq3lM.d.ts} +1 -1
- package/dist/{agent-mcp-De1imoMS.d.ts → agent-mcp-XNF4JqHw.d.mts} +1 -1
- package/dist/{agent-mcp-handler-OLRMZONF.mjs → agent-mcp-handler-HVV5LNXF.mjs} +6 -6
- package/dist/{agent-mcp-handler-MRGP3WJ3.cjs → agent-mcp-handler-YKG7KVCY.cjs} +7 -7
- package/dist/agent-runtime.cjs +10 -6
- package/dist/agent-runtime.d.mts +5 -7
- package/dist/agent-runtime.d.ts +5 -7
- package/dist/agent-runtime.mjs +9 -5
- package/dist/api/client.cjs +3 -3
- package/dist/api/client.d.mts +3 -3
- package/dist/api/client.d.ts +3 -3
- package/dist/api/client.mjs +2 -2
- package/dist/api/route-manager.cjs +15 -13
- package/dist/api/route-manager.d.mts +7 -9
- package/dist/api/route-manager.d.ts +7 -9
- package/dist/api/route-manager.mjs +14 -12
- package/dist/api/runtime.cjs +12 -10
- package/dist/api/runtime.d.mts +6 -8
- package/dist/api/runtime.d.ts +6 -8
- package/dist/api/runtime.mjs +11 -9
- package/dist/{api-client-CyFtZFJ4.d.ts → api-client-BJv9mTbO.d.ts} +2 -2
- package/dist/{api-client-BjMmY8OD.d.mts → api-client-Dk9QOLwr.d.mts} +2 -2
- package/dist/api.cjs +17 -15
- package/dist/api.d.mts +9 -11
- package/dist/api.d.ts +9 -11
- package/dist/api.mjs +16 -14
- package/dist/{app-kT_QXTdx.d.ts → app-CDJHPqZn.d.ts} +11 -4
- package/dist/{app-CFZt-srr.d.mts → app-CWjCklhF.d.mts} +11 -4
- package/dist/app-markdown.cjs +7 -6
- package/dist/app-markdown.d.mts +6 -8
- package/dist/app-markdown.d.ts +6 -8
- package/dist/app-markdown.mjs +6 -5
- package/dist/cache.cjs +6 -3
- package/dist/cache.d.mts +23 -2
- package/dist/cache.d.ts +23 -2
- package/dist/cache.mjs +5 -2
- package/dist/{chunk-3UEVPCGW.mjs → chunk-2DMWQWNJ.mjs} +6 -1
- package/dist/{chunk-ZXH4TS3F.cjs → chunk-2JG2LJDI.cjs} +3 -64
- package/dist/{chunk-QTXBII4Z.cjs → chunk-3TB5QGUW.cjs} +5 -5
- package/dist/chunk-45QJHGZM.cjs +1063 -0
- package/dist/{chunk-JCKYH4LG.mjs → chunk-45UZKX2J.mjs} +12 -44
- package/dist/{chunk-FUCSUGDM.cjs → chunk-4A3YUB4D.cjs} +3 -3
- package/dist/{chunk-FUZEBRP3.mjs → chunk-4GP3XZ4Z.mjs} +5 -3
- package/dist/chunk-4TLUFAIP.cjs +92 -0
- package/dist/chunk-4U5XZDLG.cjs +80 -0
- package/dist/{chunk-VXEEATVD.cjs → chunk-4XO5GSD6.cjs} +2 -2
- package/dist/{chunk-P664ZVTV.mjs → chunk-4ZZNPK25.mjs} +2 -2
- package/dist/{chunk-TGFQVLLF.cjs → chunk-54QWHSNR.cjs} +697 -422
- package/dist/{chunk-W36M2BQ4.mjs → chunk-5E65AL7P.mjs} +3 -3
- package/dist/{chunk-3LOLJTFV.cjs → chunk-5JEC43MQ.cjs} +11 -11
- package/dist/{chunk-INL3THCU.mjs → chunk-5LL6TKII.mjs} +1 -1
- package/dist/{chunk-KIIMAWOJ.cjs → chunk-5NAVKJCZ.cjs} +35 -105
- package/dist/{chunk-PGZDEPTM.cjs → chunk-5XS5NCVM.cjs} +10 -10
- package/dist/{chunk-HXRYZWTA.mjs → chunk-62DY5GKS.mjs} +3 -3
- package/dist/{chunk-LSKZMJMP.cjs → chunk-64SBBZDU.cjs} +38 -1
- package/dist/chunk-6BWKJ6QS.cjs +43 -0
- package/dist/{chunk-JSROZYYO.cjs → chunk-6D24SDKO.cjs} +1 -20
- package/dist/{chunk-EIPC3FDA.cjs → chunk-6ILGLCXF.cjs} +9 -5
- package/dist/chunk-6QOLZITB.cjs +22 -0
- package/dist/{chunk-CXEN47J3.mjs → chunk-73WX6PRY.mjs} +25 -0
- package/dist/{chunk-RW63BOV7.cjs → chunk-7FHZ3E6D.cjs} +2 -2
- package/dist/chunk-7GNWGLWB.mjs +14 -0
- package/dist/{chunk-34UCJRQO.cjs → chunk-7RNAKBWF.cjs} +2 -2
- package/dist/{chunk-MSSFIQGM.mjs → chunk-7VAJSSPG.mjs} +41 -10
- package/dist/{chunk-KHKLMNI5.mjs → chunk-ACLPN56I.mjs} +43 -25
- package/dist/{chunk-JCYYXBAJ.cjs → chunk-AGR7F3LA.cjs} +3 -3
- package/dist/{chunk-4GWRFP22.cjs → chunk-ALPWLT27.cjs} +35 -3
- package/dist/{chunk-IBUQWVYA.mjs → chunk-AX7S67YV.mjs} +43 -40
- package/dist/{chunk-CUM5NYL5.mjs → chunk-AXB5P7BK.mjs} +1 -1
- package/dist/{chunk-2ZYGC6SS.cjs → chunk-B6IMBBOS.cjs} +3 -3
- package/dist/{chunk-472NCAZ7.cjs → chunk-B77AUCBV.cjs} +3 -3
- package/dist/{chunk-FWE7LEQC.cjs → chunk-BD3D7EZV.cjs} +4 -4
- package/dist/{chunk-H5CLOUZS.cjs → chunk-BMOBTMDR.cjs} +5 -5
- package/dist/{chunk-CQMVIOYP.mjs → chunk-BPGO2IEP.mjs} +7 -7
- package/dist/{chunk-E2ROOWQC.cjs → chunk-BPOTSHDO.cjs} +24 -87
- package/dist/chunk-BRYPZIMB.mjs +6 -0
- package/dist/{chunk-WFRT7JPX.mjs → chunk-BYQVROIP.mjs} +2 -2
- package/dist/{chunk-HALDNTIV.mjs → chunk-BYR3RQPB.mjs} +10 -73
- package/dist/{chunk-IWZKTWHZ.cjs → chunk-CA62IQY3.cjs} +7 -2
- package/dist/chunk-CALY6QG6.mjs +963 -0
- package/dist/{chunk-WC5UV2HQ.cjs → chunk-CBXBGM72.cjs} +2 -2
- package/dist/{chunk-WW46B6HA.cjs → chunk-CGR525MJ.cjs} +84 -45
- package/dist/{chunk-6V4TDWEC.cjs → chunk-CGVPXIRN.cjs} +18 -1
- package/dist/{chunk-TYMMBFN2.mjs → chunk-CKFK3Z2V.mjs} +1 -1
- package/dist/chunk-CZS6OACQ.mjs +63 -0
- package/dist/{chunk-SGBJ247Q.cjs → chunk-D4ROBNTK.cjs} +2 -2
- package/dist/{chunk-WEW2JVA4.cjs → chunk-D5IHNDHI.cjs} +6 -6
- package/dist/{chunk-ULASELLA.cjs → chunk-DATEWH3W.cjs} +13 -1
- package/dist/{chunk-KKSTAEMY.cjs → chunk-DKU6NXRK.cjs} +1 -1
- package/dist/{chunk-NBBEQLOK.cjs → chunk-E55H6UKH.cjs} +9 -9
- package/dist/{chunk-YR2VBEMO.cjs → chunk-EGCT3AHF.cjs} +1455 -8187
- package/dist/{chunk-SDOTRX3V.cjs → chunk-EORXKFLR.cjs} +7 -7
- package/dist/{chunk-HD5CF3OE.mjs → chunk-ETPEZLS3.mjs} +2 -2
- package/dist/{chunk-2DD4JMQC.cjs → chunk-EW4MEVLE.cjs} +30 -30
- package/dist/{chunk-TUBTR2OP.mjs → chunk-FCOLU5P6.mjs} +1173 -7905
- package/dist/chunk-FGH3ZXTP.mjs +1063 -0
- package/dist/{chunk-Q3NXS4MU.cjs → chunk-FLZ4H25A.cjs} +44 -32
- package/dist/chunk-FVPXT2JR.cjs +63 -0
- package/dist/{chunk-D2ULAULS.cjs → chunk-FXFKIJDA.cjs} +9 -7
- package/dist/chunk-GC3EM6H4.mjs +80 -0
- package/dist/chunk-GKQL726H.cjs +6096 -0
- package/dist/{chunk-5PWXMJOH.cjs → chunk-GNVEJUT5.cjs} +36 -36
- package/dist/{chunk-E3UK5IIB.cjs → chunk-GS3WR5HX.cjs} +5 -3
- package/dist/{chunk-QFW2IH5E.mjs → chunk-GZTUT75U.mjs} +5 -2
- package/dist/chunk-H3EGVQE5.mjs +22 -0
- package/dist/{chunk-KCQBAKIY.cjs → chunk-H44XGLFU.cjs} +36 -68
- package/dist/{chunk-LI2F57NI.mjs → chunk-H56MQYEG.mjs} +1 -1
- package/dist/chunk-HANGSYMB.mjs +67 -0
- package/dist/{chunk-5BWWFHR2.mjs → chunk-HBEBV7OZ.mjs} +3 -3
- package/dist/{chunk-RSOJ7DRT.mjs → chunk-HCSVR4YZ.mjs} +1 -58
- package/dist/{chunk-HZFM2LWQ.mjs → chunk-HKFBMHCD.mjs} +34 -2
- package/dist/{chunk-MLY2RP5R.mjs → chunk-I63UCMXW.mjs} +6 -2
- package/dist/{chunk-TO4GJ56K.cjs → chunk-I64GEPOB.cjs} +58 -18
- package/dist/{chunk-VNGH5MLF.mjs → chunk-I6UVKUYK.mjs} +1 -1
- package/dist/{chunk-EPYU2EBL.mjs → chunk-IF4NU2NG.mjs} +1 -1
- package/dist/{chunk-IVLZZZEI.mjs → chunk-IM7DY3ED.mjs} +1 -1
- package/dist/{chunk-A3EAIURZ.mjs → chunk-IMQO6ZUU.mjs} +2 -2
- package/dist/{chunk-F5QO4FNE.mjs → chunk-INQ64HTJ.mjs} +43 -11
- package/dist/{chunk-XKVVMZP5.cjs → chunk-IRYK4Z5M.cjs} +4 -4
- package/dist/{chunk-UWPLULNK.mjs → chunk-JGHCKIRI.mjs} +84 -24
- package/dist/{chunk-7FPTZLKH.mjs → chunk-JIYYX7WU.mjs} +10 -8
- package/dist/{chunk-6MVFL3R5.cjs → chunk-JR4QCLJY.cjs} +1 -58
- package/dist/{chunk-Q2KB32T4.mjs → chunk-JXB6DVCO.mjs} +5 -5
- package/dist/{chunk-CGBDNNSM.cjs → chunk-KEXK442I.cjs} +44 -12
- package/dist/{chunk-5D2JIPLH.cjs → chunk-KK22JPQM.cjs} +10 -10
- package/dist/{chunk-EA5K5BKU.mjs → chunk-KNHBTJP6.mjs} +18 -1
- package/dist/{chunk-MVL2RAJW.mjs → chunk-KYN5ODF6.mjs} +1 -1
- package/dist/{chunk-TYJALEHQ.cjs → chunk-LDPKAYVS.cjs} +16 -16
- package/dist/chunk-LFHCG2DU.mjs +43 -0
- package/dist/{chunk-EK4QAEFZ.cjs → chunk-LZESP4IR.cjs} +25 -0
- package/dist/{chunk-FZ6YYU2W.mjs → chunk-MGMF4VP7.mjs} +38 -1
- package/dist/{chunk-EKF7KDFD.mjs → chunk-MNUSIXGS.mjs} +2 -2
- package/dist/{chunk-MYIZXDZA.mjs → chunk-MOSYH4CY.mjs} +1 -1
- package/dist/{chunk-4ZFL5GFN.cjs → chunk-OILHPMFX.cjs} +86 -26
- package/dist/{chunk-AJQTP4OO.mjs → chunk-OJ7JP7RJ.mjs} +1 -1
- package/dist/{chunk-7PEP3BUT.mjs → chunk-OLQ73ZO5.mjs} +2 -2
- package/dist/{chunk-5OKBARDN.cjs → chunk-OZN4XL6L.cjs} +10 -10
- package/dist/{chunk-T5OJPTVN.cjs → chunk-P4TYB4SF.cjs} +2 -2
- package/dist/chunk-P7XDC7UJ.mjs +92 -0
- package/dist/{chunk-4E5QXOCL.cjs → chunk-PGW7HZE2.cjs} +6 -6
- package/dist/{chunk-SHLXACIO.cjs → chunk-PJ42JESY.cjs} +1 -9
- package/dist/{chunk-U6QLDL3G.mjs → chunk-PNCM5MFD.mjs} +1 -1
- package/dist/{chunk-OAHTRMIC.mjs → chunk-PYQ3ZG4Z.mjs} +11 -11
- package/dist/{chunk-KMTGADN3.mjs → chunk-QCVIRVHE.mjs} +1 -9
- package/dist/{chunk-RWFLWR5J.cjs → chunk-QJM7A4CR.cjs} +17 -15
- package/dist/{chunk-VU6AAZVY.cjs → chunk-RHGK2JEN.cjs} +65 -62
- package/dist/{chunk-QV4VE2OW.mjs → chunk-S6ENKNNG.mjs} +5 -3
- package/dist/{chunk-EMO6K4YY.cjs → chunk-SHFXCE5A.cjs} +7 -7
- package/dist/{chunk-EKN7NSZO.cjs → chunk-SZLNU3GJ.cjs} +8 -5
- package/dist/{chunk-WLL43JMO.mjs → chunk-T36UJS3X.mjs} +7 -5
- package/dist/{chunk-CNNOLE4O.mjs → chunk-T4II4MMW.mjs} +1 -1
- package/dist/{chunk-B6G5CKMC.mjs → chunk-T6DLMX5V.mjs} +11 -11
- package/dist/{chunk-4IE345DM.cjs → chunk-TAKG7ZCD.cjs} +14 -14
- package/dist/{chunk-SKVTP5PR.mjs → chunk-TFX4RTH2.mjs} +1 -62
- package/dist/chunk-TI7UANHI.cjs +77 -0
- package/dist/{chunk-ND2CWPOD.mjs → chunk-TS4JHGUJ.mjs} +1 -1
- package/dist/{chunk-6BK3K2GB.mjs → chunk-UIDWEU7M.mjs} +83 -44
- package/dist/{chunk-DRLKAXDM.mjs → chunk-UM3ZV5EP.mjs} +2 -2
- package/dist/{chunk-YWN746US.cjs → chunk-UMQAK3KP.cjs} +85 -54
- package/dist/chunk-UNJZGVPU.cjs +6 -0
- package/dist/{chunk-XKG2BLFN.cjs → chunk-UXMIFB44.cjs} +18 -35
- package/dist/{chunk-DMEPTZTI.mjs → chunk-VBN3UAPQ.mjs} +47 -7
- package/dist/chunk-VDRM36QB.cjs +963 -0
- package/dist/{chunk-RG4A6LB2.cjs → chunk-VNPXKF3G.cjs} +7 -7
- package/dist/chunk-VQDBNVOO.cjs +14 -0
- package/dist/chunk-VQGKD7RV.mjs +25 -0
- package/dist/{chunk-6HB6V3R7.mjs → chunk-WCWV25PG.mjs} +10 -27
- package/dist/{chunk-ZMSZZXOR.mjs → chunk-WDMIW6Q6.mjs} +0 -19
- package/dist/{chunk-4WVJLURN.mjs → chunk-WMHG64DA.mjs} +1 -1
- package/dist/{chunk-L4DD7ODZ.cjs → chunk-WSOBCAYO.cjs} +37 -35
- package/dist/{chunk-ARC7I3O2.mjs → chunk-WW374SGU.mjs} +1 -1
- package/dist/{chunk-J63ZH5OQ.cjs → chunk-X3GMHKO3.cjs} +2 -2
- package/dist/{chunk-VT4WFRHA.mjs → chunk-XJAEZCT6.mjs} +1 -1
- package/dist/{chunk-OCIEZME4.mjs → chunk-XKIUHXHW.mjs} +618 -343
- package/dist/{chunk-6XWDE2P2.cjs → chunk-XVIEGKTT.cjs} +30 -5
- package/dist/{chunk-N32CC42M.cjs → chunk-Y2GNNXGV.cjs} +72 -54
- package/dist/{chunk-ZJD2PN6Z.mjs → chunk-Y4QVEU67.mjs} +30 -18
- package/dist/chunk-Y5RG6B7S.mjs +77 -0
- package/dist/{chunk-QRKIMN7T.mjs → chunk-Y6LRPO2K.mjs} +13 -1
- package/dist/{chunk-BZHXGVMA.mjs → chunk-YJBWB6GF.mjs} +5 -3
- package/dist/{chunk-WXJLNP33.cjs → chunk-YR2P74F7.cjs} +9 -7
- package/dist/chunk-YZAKIXRL.cjs +67 -0
- package/dist/chunk-ZKVJYQPO.mjs +6095 -0
- package/dist/{chunk-POSPE3IO.mjs → chunk-ZOABCQGT.mjs} +27 -2
- package/dist/chunk-ZQRCSUSB.cjs +25 -0
- package/dist/{chunk-ZMMBIVQM.mjs → chunk-ZZGQD7A4.mjs} +16 -86
- package/dist/{client-plugins-DUrIYX9B.d.mts → client-plugins-B_5QbNrp.d.mts} +2551 -2653
- package/dist/{client-plugins-BvlNhGEB.d.ts → client-plugins-DgSfIWIF.d.ts} +2551 -2653
- package/dist/client-plugins.d.mts +5 -7
- package/dist/client-plugins.d.ts +5 -7
- package/dist/client.cjs +7 -7
- package/dist/client.d.mts +11 -12
- package/dist/client.d.ts +11 -12
- package/dist/client.mjs +6 -6
- package/dist/config.d.mts +5 -7
- package/dist/config.d.ts +5 -7
- package/dist/{devtools-VQWJANJV.cjs → devtools-ANJ7JAPQ.cjs} +21 -18
- package/dist/{devtools-JYJNOLPQ.mjs → devtools-VEQQDVHE.mjs} +20 -17
- package/dist/docs.cjs +23 -20
- package/dist/docs.d.mts +6 -8
- package/dist/docs.d.ts +6 -8
- package/dist/docs.mjs +22 -19
- package/dist/{endpoint-CA-TNX60.d.ts → endpoint-BOE0IAaG.d.ts} +6 -3
- package/dist/{endpoint-CCHFqyTE.d.mts → endpoint-DGZRZHux.d.mts} +6 -3
- package/dist/environment/vite.cjs +6 -2
- package/dist/environment/vite.d.mts +11 -2
- package/dist/environment/vite.d.ts +11 -2
- package/dist/environment/vite.mjs +5 -1
- package/dist/headers.cjs +4 -4
- package/dist/headers.mjs +3 -3
- package/dist/image/server.cjs +7 -3
- package/dist/image/server.d.mts +9 -1
- package/dist/image/server.d.ts +9 -1
- package/dist/image/server.mjs +6 -2
- package/dist/image/sharp.cjs +12 -10
- package/dist/image/sharp.mjs +4 -2
- package/dist/index.cjs +89 -69
- package/dist/index.d.mts +27 -24
- package/dist/index.d.ts +27 -24
- package/dist/index.mjs +102 -82
- package/dist/{integration-api-BPJo5oXb.d.ts → integration-api-BuPHMeKz.d.ts} +2 -2
- package/dist/{integration-api-0y4FXJpC.d.mts → integration-api-DWyMmvrR.d.mts} +2 -2
- package/dist/integration-orm-P2II2EBK.cjs +14 -0
- package/dist/{integration-orm-KV5B3BGZ.mjs → integration-orm-RBKCIQYZ.mjs} +4 -3
- package/dist/integrations.cjs +7 -5
- package/dist/integrations.d.mts +7 -9
- package/dist/integrations.d.ts +7 -9
- package/dist/integrations.mjs +6 -4
- package/dist/internal/app-markdown-runtime.cjs +6 -5
- package/dist/internal/app-markdown-runtime.d.mts +6 -8
- package/dist/internal/app-markdown-runtime.d.ts +6 -8
- package/dist/internal/app-markdown-runtime.mjs +5 -4
- package/dist/internal/build-runtime.cjs +57 -56
- package/dist/internal/build-runtime.d.mts +7 -9
- package/dist/internal/build-runtime.d.ts +7 -9
- package/dist/internal/build-runtime.mjs +56 -55
- package/dist/internal/cli-runtime.cjs +36 -30
- package/dist/internal/cli-runtime.mjs +36 -30
- 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 +5 -7
- package/dist/internal/compression-runtime.d.ts +5 -7
- package/dist/internal/config-runtime.cjs +21 -18
- package/dist/internal/config-runtime.d.mts +6 -8
- package/dist/internal/config-runtime.d.ts +6 -8
- package/dist/internal/config-runtime.mjs +20 -17
- package/dist/internal/docs-precompiled-runtime.cjs +3 -3
- package/dist/internal/docs-precompiled-runtime.mjs +2 -2
- package/dist/internal/infra-analytics-runtime.cjs +7 -7
- package/dist/internal/infra-analytics-runtime.mjs +5 -5
- package/dist/internal/metadata-image-runtime.cjs +4 -3
- package/dist/internal/metadata-image-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-node-env.cjs +2 -2
- package/dist/internal/production-node-env.mjs +1 -1
- package/dist/internal/production-runtime.cjs +47 -28
- package/dist/internal/production-runtime.d.mts +25 -14
- package/dist/internal/production-runtime.d.ts +25 -14
- package/dist/internal/production-runtime.mjs +50 -31
- package/dist/layers-CM5i6T7z.d.mts +55 -0
- package/dist/layers-CM5i6T7z.d.ts +55 -0
- package/dist/markdown.cjs +4 -4
- package/dist/markdown.d.mts +5 -7
- package/dist/markdown.d.ts +5 -7
- package/dist/markdown.mjs +3 -3
- package/dist/middleware.cjs +16 -10
- package/dist/middleware.d.mts +7 -9
- package/dist/middleware.d.ts +7 -9
- package/dist/middleware.mjs +19 -13
- package/dist/navigation.cjs +6 -6
- package/dist/navigation.d.mts +8 -9
- package/dist/navigation.d.ts +8 -9
- package/dist/navigation.mjs +5 -5
- package/dist/{nitro-MPZJGPXK.mjs → nitro-NFG2LBRC.mjs} +3 -2
- package/dist/{nitro-7F65EZZS.cjs → nitro-S2QABUFA.cjs} +4 -3
- package/dist/observability.cjs +2 -2
- package/dist/observability.mjs +1 -1
- package/dist/plugin-DBBZ4JI2.cjs +32 -0
- package/dist/plugin-SYMK7PQ2.mjs +32 -0
- package/dist/plugin.cjs +56 -43
- package/dist/plugin.d.mts +23 -7
- package/dist/plugin.d.ts +23 -7
- package/dist/plugin.mjs +57 -44
- package/dist/{production-runtime-D2aMyzjr.d.ts → production-runtime-DfknD3g_.d.ts} +17 -3
- package/dist/{production-runtime-BQ4_WLwQ.d.mts → production-runtime-j_WCfuwB.d.mts} +17 -3
- package/dist/programmatic-routes-client-DcoxEaLe.d.mts +55 -0
- package/dist/programmatic-routes-client-DcoxEaLe.d.ts +55 -0
- package/dist/query/client.cjs +8 -8
- package/dist/query/client.mjs +3 -3
- package/dist/{render-plan-25p4hrj4.d.ts → render-plan-CFIhcYYS.d.ts} +1 -1
- package/dist/{render-plan-DtkXMN8D.d.mts → render-plan-ChUtsymc.d.mts} +1 -1
- package/dist/renderer-client.cjs +5 -5
- package/dist/renderer-client.d.mts +7 -8
- package/dist/renderer-client.d.ts +7 -8
- package/dist/renderer-client.mjs +2 -2
- package/dist/{request-DgCkIdcn.d.mts → request-F4HRwzSd.d.mts} +1 -1
- package/dist/{request-jF4jwx8f.d.ts → request-RJvelT8L.d.ts} +1 -1
- package/dist/request.cjs +3 -3
- package/dist/request.d.mts +6 -8
- package/dist/request.d.ts +6 -8
- package/dist/request.mjs +2 -2
- package/dist/{route-rendering-Bji6S6a_.d.ts → route-rendering-3a4fbNyC.d.mts} +1 -1
- package/dist/{route-rendering-CSBF78Ya.d.mts → route-rendering-D4coJ-kw.d.ts} +1 -1
- package/dist/{router-B09Ui3Qm.d.mts → router-DqIssGRO.d.mts} +1 -1
- package/dist/{router-CPB9cXtG.d.ts → router-WLEW3Te1.d.ts} +1 -1
- package/dist/routes.cjs +6 -5
- package/dist/routes.d.mts +5 -7
- package/dist/routes.d.ts +5 -7
- package/dist/routes.mjs +5 -4
- package/dist/{runtime-EDMwLdjv.d.ts → runtime-BrNdLOq9.d.ts} +3 -3
- package/dist/{runtime-CM6E6yuI.d.mts → runtime-CmE_j-js.d.mts} +3 -3
- package/dist/{schema-dev-notice-Y7MQEFGN.cjs → schema-dev-notice-5JPE67AI.cjs} +6 -4
- package/dist/{schema-dev-notice-O67CPXJ6.mjs → schema-dev-notice-WLPZ6WKU.mjs} +4 -2
- package/dist/server-action-security.cjs +4 -3
- package/dist/server-action-security.mjs +3 -2
- package/dist/server-client-bridge-DKWDl5NB.d.mts +7 -0
- package/dist/server-client-bridge-DKWDl5NB.d.ts +7 -0
- package/dist/server-fn-client.d.mts +3 -3
- package/dist/server-fn-client.d.ts +3 -3
- package/dist/server-fn.cjs +8 -7
- package/dist/server-fn.d.mts +1 -1
- package/dist/server-fn.d.ts +1 -1
- package/dist/server-fn.mjs +7 -6
- package/dist/server-plugins.cjs +5 -5
- package/dist/server-plugins.d.mts +6 -8
- package/dist/server-plugins.d.ts +6 -8
- package/dist/server-plugins.mjs +4 -4
- package/dist/server-query-client.d.mts +1 -1
- package/dist/server-query-client.d.ts +1 -1
- package/dist/server-query.cjs +9 -8
- package/dist/server-query.d.mts +1 -1
- package/dist/server-query.d.ts +1 -1
- package/dist/server-query.mjs +8 -7
- package/dist/server.cjs +97 -73
- package/dist/server.d.mts +16 -12
- package/dist/server.d.ts +16 -12
- package/dist/server.mjs +82 -58
- package/dist/{spa-router-Cgimzfbi.d.mts → spa-router-C41zjnFl.d.mts} +2 -2
- package/dist/{spa-router-B_N8XgVu.d.ts → spa-router-D_0VXqPC.d.ts} +2 -2
- package/dist/storage.cjs +6 -2
- package/dist/storage.d.mts +9 -1
- package/dist/storage.d.ts +9 -1
- package/dist/storage.mjs +5 -1
- package/dist/testing.cjs +20 -18
- package/dist/testing.d.mts +6 -8
- package/dist/testing.d.ts +6 -8
- package/dist/testing.mjs +16 -14
- package/dist/theme/server.cjs +4 -4
- package/dist/theme/server.mjs +3 -3
- package/dist/{utils-DZciYXYl.d.mts → utils-BKWSe3S7.d.mts} +1 -1
- package/dist/{utils-BNxAKAuT.d.ts → utils-YYcWsOJp.d.ts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +58 -45
- package/dist/vite.d.mts +92 -10
- package/dist/vite.d.ts +92 -10
- package/dist/vite.mjs +59 -46
- package/dist/{workflows-jZ4BcdoZ.d.ts → workflows-IWP1ddBm.d.mts} +5 -2
- package/dist/{workflows-jZ4BcdoZ.d.mts → workflows-IWP1ddBm.d.ts} +5 -2
- package/dist/workflows.cjs +4 -3
- package/dist/workflows.d.mts +1 -1
- package/dist/workflows.d.ts +1 -1
- package/dist/workflows.mjs +3 -2
- package/package.json +2 -1
- package/dist/chunk-3SDFA7UF.cjs +0 -701
- package/dist/chunk-E5GNDG5F.mjs +0 -701
- package/dist/integration-orm-55F7CII5.cjs +0 -13
|
@@ -304,6 +304,13 @@ function appendOpenGraph(tags, input, metadataBase, page) {
|
|
|
304
304
|
appendMetaProperty(tags, "og:image:alt", image.alt);
|
|
305
305
|
appendMetaProperty(tags, "og:image:type", image.type);
|
|
306
306
|
}
|
|
307
|
+
for (const video of normalizeMetadataVideos(openGraph.videos, metadataBase)) {
|
|
308
|
+
appendMetaProperty(tags, "og:video", video.url);
|
|
309
|
+
appendMetaProperty(tags, "og:video:secure_url", video.secureUrl);
|
|
310
|
+
appendMetaProperty(tags, "og:video:type", video.type);
|
|
311
|
+
appendMetaProperty(tags, "og:video:width", video.width);
|
|
312
|
+
appendMetaProperty(tags, "og:video:height", video.height);
|
|
313
|
+
}
|
|
307
314
|
if (openGraph.type === "article") {
|
|
308
315
|
appendMetaProperty(tags, "article:published_time", normalizeDate(openGraph.publishedTime));
|
|
309
316
|
appendMetaProperty(tags, "article:modified_time", normalizeDate(openGraph.modifiedTime));
|
|
@@ -432,6 +439,24 @@ function normalizeMetadataImages(value, metadataBase) {
|
|
|
432
439
|
}).filter((item) => item !== null);
|
|
433
440
|
}
|
|
434
441
|
__name(normalizeMetadataImages, "normalizeMetadataImages");
|
|
442
|
+
function normalizeMetadataVideos(value, metadataBase) {
|
|
443
|
+
return normalizeArray(value).map((item) => {
|
|
444
|
+
if (typeof item === "string") {
|
|
445
|
+
return { url: resolveMetadataUrl(item, metadataBase) || item };
|
|
446
|
+
}
|
|
447
|
+
if (!isRecord(item)) return null;
|
|
448
|
+
const url = resolveMetadataUrl(item.url, metadataBase);
|
|
449
|
+
if (!url) return null;
|
|
450
|
+
return {
|
|
451
|
+
url,
|
|
452
|
+
secureUrl: resolveMetadataUrl(item.secureUrl, metadataBase) || void 0,
|
|
453
|
+
width: normalizeNumber(item.width),
|
|
454
|
+
height: normalizeNumber(item.height),
|
|
455
|
+
type: typeof item.type === "string" ? item.type : void 0
|
|
456
|
+
};
|
|
457
|
+
}).filter((item) => item !== null);
|
|
458
|
+
}
|
|
459
|
+
__name(normalizeMetadataVideos, "normalizeMetadataVideos");
|
|
435
460
|
function normalizeArray(value) {
|
|
436
461
|
if (value == null) return [];
|
|
437
462
|
return Array.isArray(value) ? value : [value];
|
|
@@ -34,7 +34,7 @@ var _chunkS3A45T7Fcjs = require('./chunk-S3A45T7F.cjs');
|
|
|
34
34
|
var _chunkZEG3OPIBcjs = require('./chunk-ZEG3OPIB.cjs');
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
var
|
|
37
|
+
var _chunkDATEWH3Wcjs = require('./chunk-DATEWH3W.cjs');
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
@@ -1119,7 +1119,7 @@ function createApiClients(options = {}) {
|
|
|
1119
1119
|
"api is server-only. Use apiClient from createApiClients() in the browser."
|
|
1120
1120
|
);
|
|
1121
1121
|
}
|
|
1122
|
-
const currentRequest =
|
|
1122
|
+
const currentRequest = _chunkDATEWH3Wcjs._resolveCurrentRequest.call(void 0, );
|
|
1123
1123
|
const runtime = _chunk72ADZ6GQcjs.resolveAPIRequestRuntime.call(void 0, );
|
|
1124
1124
|
if (!currentRequest || !runtime) {
|
|
1125
1125
|
throw new Error(
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__name
|
|
3
|
+
} from "./chunk-LPEX4YW6.mjs";
|
|
4
|
+
|
|
5
|
+
// src/utils/file-module.ts
|
|
6
|
+
import { pathToFileURL } from "url";
|
|
7
|
+
function toFileModuleUrl(filePath) {
|
|
8
|
+
return pathToFileURL(filePath).href;
|
|
9
|
+
}
|
|
10
|
+
__name(toFileModuleUrl, "toFileModuleUrl");
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
toFileModuleUrl
|
|
14
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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 _chunkSZLNU3GJcjs = require('./chunk-SZLNU3GJ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
@@ -11,7 +11,7 @@ var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
|
11
11
|
var _url = require('url');
|
|
12
12
|
async function createFarmMarkdownRouteModuleFromFile(filePath, options = {}) {
|
|
13
13
|
const source = await _promises.readFile.call(void 0, filePath, "utf8");
|
|
14
|
-
return
|
|
14
|
+
return _chunkSZLNU3GJcjs.createFarmMarkdownRouteModule.call(void 0, {
|
|
15
15
|
source,
|
|
16
16
|
filePath,
|
|
17
17
|
components: options.components,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
emitFarmEvent
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4GP3XZ4Z.mjs";
|
|
4
4
|
import {
|
|
5
5
|
getActiveFarmI18nSnapshot
|
|
6
6
|
} from "./chunk-C4NCTZLM.mjs";
|
|
@@ -15,6 +15,9 @@ import {
|
|
|
15
15
|
notifyFarmCacheTask,
|
|
16
16
|
subscribeFarmCacheInvalidation
|
|
17
17
|
} from "./chunk-4SIYUGRY.mjs";
|
|
18
|
+
import {
|
|
19
|
+
_runInSharedCacheScope
|
|
20
|
+
} from "./chunk-Y6LRPO2K.mjs";
|
|
18
21
|
import {
|
|
19
22
|
__name
|
|
20
23
|
} from "./chunk-LPEX4YW6.mjs";
|
|
@@ -208,6 +211,7 @@ async function encodeStorageKeySegment(value) {
|
|
|
208
211
|
}
|
|
209
212
|
__name(encodeStorageKeySegment, "encodeStorageKeySegment");
|
|
210
213
|
var MIN_STALE_RETENTION_MS = 6e4;
|
|
214
|
+
var PPR_SHELL_ADAPTER_TTL_SECONDS = 86400;
|
|
211
215
|
function getFarmCacheEntryExpiresAt(createdAt, revalidate, now = Date.now()) {
|
|
212
216
|
if (typeof revalidate !== "number") return void 0;
|
|
213
217
|
const revalidateMs = revalidate * 1e3;
|
|
@@ -232,6 +236,8 @@ var _FarmDataCache = class _FarmDataCache {
|
|
|
232
236
|
this.namespace = "farm";
|
|
233
237
|
this.local = true;
|
|
234
238
|
this.maxEntries = 1024;
|
|
239
|
+
this.config = {};
|
|
240
|
+
this.isShellCache = false;
|
|
235
241
|
this.lease = {
|
|
236
242
|
enabled: true,
|
|
237
243
|
ttlMs: 1e4,
|
|
@@ -241,6 +247,8 @@ var _FarmDataCache = class _FarmDataCache {
|
|
|
241
247
|
this.configure(config);
|
|
242
248
|
}
|
|
243
249
|
configure(config = {}) {
|
|
250
|
+
this.config = config;
|
|
251
|
+
this.shells?.configure(config);
|
|
244
252
|
this.generation++;
|
|
245
253
|
this.entries.clear();
|
|
246
254
|
this.entriesByTag.clear();
|
|
@@ -267,6 +275,19 @@ var _FarmDataCache = class _FarmDataCache {
|
|
|
267
275
|
)
|
|
268
276
|
};
|
|
269
277
|
}
|
|
278
|
+
/**
|
|
279
|
+
* Where PPR shells live: the same adapter and namespace, so path and tag invalidation
|
|
280
|
+
* reaches them, but their own in-memory LRU of `maxEntries`.
|
|
281
|
+
* @internal
|
|
282
|
+
*/
|
|
283
|
+
get pprShellCache() {
|
|
284
|
+
if (this.isShellCache) return this;
|
|
285
|
+
if (!this.shells) {
|
|
286
|
+
this.shells = new _FarmDataCache(this.config);
|
|
287
|
+
this.shells.isShellCache = true;
|
|
288
|
+
}
|
|
289
|
+
return this.shells;
|
|
290
|
+
}
|
|
270
291
|
get adapterName() {
|
|
271
292
|
return this.adapter?.name || (this.adapter ? "custom" : "memory");
|
|
272
293
|
}
|
|
@@ -396,7 +417,7 @@ var _FarmDataCache = class _FarmDataCache {
|
|
|
396
417
|
const tags = normalizeCacheOptionsTags(options);
|
|
397
418
|
const capturedVersions = tagVersions ?? await this.getAdapterTagVersions(Array.from(tags.values()));
|
|
398
419
|
const createdAt = options.createdAt ?? Date.now();
|
|
399
|
-
const expiresAt = getFarmCacheEntryExpiresAt(createdAt, revalidate);
|
|
420
|
+
const expiresAt = getFarmCacheEntryExpiresAt(createdAt, revalidate) ?? (this.isShellCache && this.adapter ? createdAt + PPR_SHELL_ADAPTER_TTL_SECONDS * 1e3 : void 0);
|
|
400
421
|
const entry = {
|
|
401
422
|
key,
|
|
402
423
|
value,
|
|
@@ -435,6 +456,11 @@ var _FarmDataCache = class _FarmDataCache {
|
|
|
435
456
|
return this.adapter ? true : deleted;
|
|
436
457
|
}
|
|
437
458
|
clear() {
|
|
459
|
+
const count = this.entries.size + (this.shells?.resetLocal() ?? 0);
|
|
460
|
+
this.resetLocal();
|
|
461
|
+
emitFarmEvent({ type: "cache.clear", count });
|
|
462
|
+
}
|
|
463
|
+
resetLocal() {
|
|
438
464
|
const count = this.entries.size;
|
|
439
465
|
this.generation++;
|
|
440
466
|
this.entries.clear();
|
|
@@ -443,7 +469,7 @@ var _FarmDataCache = class _FarmDataCache {
|
|
|
443
469
|
this.invalidatedTagVersions.clear();
|
|
444
470
|
this.activeGenerations.clear();
|
|
445
471
|
this.version = 0;
|
|
446
|
-
|
|
472
|
+
return count;
|
|
447
473
|
}
|
|
448
474
|
async clearAsync() {
|
|
449
475
|
this.clear();
|
|
@@ -469,7 +495,7 @@ var _FarmDataCache = class _FarmDataCache {
|
|
|
469
495
|
}
|
|
470
496
|
revalidateTag(tag, options = {}) {
|
|
471
497
|
const normalized = normalizeCacheTag(tag);
|
|
472
|
-
const count = this.invalidateTag(normalized);
|
|
498
|
+
const count = this.invalidateTag(normalized) + (this.shells?.invalidateTag(normalized) ?? 0);
|
|
473
499
|
emitFarmEvent(
|
|
474
500
|
options.source === "updateTag" ? { type: "cache.updateTag", tag: normalized, count } : { type: "cache.revalidateTag", tag: normalized, profile: options.profile, count }
|
|
475
501
|
);
|
|
@@ -477,7 +503,7 @@ var _FarmDataCache = class _FarmDataCache {
|
|
|
477
503
|
}
|
|
478
504
|
async revalidateTagAsync(tag, options = {}) {
|
|
479
505
|
const normalized = normalizeCacheTag(tag);
|
|
480
|
-
const count = this.invalidateTag(normalized);
|
|
506
|
+
const count = this.invalidateTag(normalized) + (this.shells?.invalidateTag(normalized) ?? 0);
|
|
481
507
|
await this.adapter?.invalidateTags?.([this.createAdapterTag(normalized)]);
|
|
482
508
|
emitFarmEvent(
|
|
483
509
|
options.source === "updateTag" ? { type: "cache.updateTag", tag: normalized, count } : { type: "cache.revalidateTag", tag: normalized, profile: options.profile, count }
|
|
@@ -487,8 +513,8 @@ var _FarmDataCache = class _FarmDataCache {
|
|
|
487
513
|
revalidatePath(routePath) {
|
|
488
514
|
const normalizedPath = normalizeRevalidatePath(routePath);
|
|
489
515
|
const pathTag = createPathCacheTag(normalizedPath);
|
|
490
|
-
const pprCount = this.countEntriesForTags([pathTag, "ppr"]);
|
|
491
|
-
const count = this.invalidateTag(pathTag);
|
|
516
|
+
const pprCount = this.countEntriesForTags([pathTag, "ppr"]) + (this.shells?.countEntriesForTags([pathTag, "ppr"]) ?? 0);
|
|
517
|
+
const count = this.invalidateTag(pathTag) + (this.shells?.invalidateTag(pathTag) ?? 0);
|
|
492
518
|
emitFarmEvent({ type: "cache.revalidatePath", path: normalizedPath, count });
|
|
493
519
|
if (pprCount > 0) {
|
|
494
520
|
emitFarmEvent({
|
|
@@ -503,8 +529,8 @@ var _FarmDataCache = class _FarmDataCache {
|
|
|
503
529
|
async revalidatePathAsync(routePath) {
|
|
504
530
|
const normalizedPath = normalizeRevalidatePath(routePath);
|
|
505
531
|
const pathTag = createPathCacheTag(normalizedPath);
|
|
506
|
-
const pprCount = this.countEntriesForTags([pathTag, "ppr"]);
|
|
507
|
-
const count = this.invalidateTag(pathTag);
|
|
532
|
+
const pprCount = this.countEntriesForTags([pathTag, "ppr"]) + (this.shells?.countEntriesForTags([pathTag, "ppr"]) ?? 0);
|
|
533
|
+
const count = this.invalidateTag(pathTag) + (this.shells?.invalidateTag(pathTag) ?? 0);
|
|
508
534
|
await this.adapter?.invalidateTags?.([this.createAdapterTag(pathTag)]);
|
|
509
535
|
emitFarmEvent({ type: "cache.revalidatePath", path: normalizedPath, count });
|
|
510
536
|
if (pprCount > 0) {
|
|
@@ -785,7 +811,11 @@ function unstable_cache(fn, keyParts = [], options = {}) {
|
|
|
785
811
|
keyParts,
|
|
786
812
|
args
|
|
787
813
|
]);
|
|
788
|
-
return getFarmDataCache().getOrSet(
|
|
814
|
+
return getFarmDataCache().getOrSet(
|
|
815
|
+
key,
|
|
816
|
+
() => _runInSharedCacheScope("unstable_cache()", () => fn(...args)),
|
|
817
|
+
options
|
|
818
|
+
);
|
|
789
819
|
};
|
|
790
820
|
}
|
|
791
821
|
__name(unstable_cache, "unstable_cache");
|
|
@@ -986,6 +1016,7 @@ export {
|
|
|
986
1016
|
createFarmCacheInvalidationStream,
|
|
987
1017
|
defineCacheKey,
|
|
988
1018
|
storageCacheAdapter,
|
|
1019
|
+
PPR_SHELL_ADAPTER_TTL_SECONDS,
|
|
989
1020
|
FarmDataCache,
|
|
990
1021
|
getFarmDataCache,
|
|
991
1022
|
configureFarmCache,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
parseMiddlewareCookieHeader,
|
|
4
4
|
serializeMiddlewareCookie,
|
|
5
5
|
serializeMiddlewareCookieDeletion
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TFX4RTH2.mjs";
|
|
7
7
|
import {
|
|
8
8
|
compileMiddlewareConfig,
|
|
9
9
|
compileMiddlewareRoute,
|
|
@@ -11,13 +11,16 @@ import {
|
|
|
11
11
|
matchesMiddlewareConfigAt,
|
|
12
12
|
matchesMiddlewareRouteAt,
|
|
13
13
|
toMiddlewareRoutePathname
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-HKFBMHCD.mjs";
|
|
15
15
|
import {
|
|
16
16
|
emitFarmEvent
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-4GP3XZ4Z.mjs";
|
|
18
18
|
import {
|
|
19
19
|
createFarmAPIMiddlewarePathnames
|
|
20
20
|
} from "./chunk-BTHHUD7Q.mjs";
|
|
21
|
+
import {
|
|
22
|
+
withFarmRequestClientAddress
|
|
23
|
+
} from "./chunk-ZZGQD7A4.mjs";
|
|
21
24
|
import {
|
|
22
25
|
_withFarmResponseHeaders
|
|
23
26
|
} from "./chunk-Z3HATSKO.mjs";
|
|
@@ -234,18 +237,6 @@ function createResponseShim(headers) {
|
|
|
234
237
|
};
|
|
235
238
|
}
|
|
236
239
|
__name(createResponseShim, "createResponseShim");
|
|
237
|
-
function withNodeRequestShape(request, trustProxy, clientAddress) {
|
|
238
|
-
const requestWithShape = request;
|
|
239
|
-
if (!requestWithShape.socket) {
|
|
240
|
-
const forwardedFor = trustProxy ? request.headers.get("x-forwarded-for")?.split(",")[0]?.trim() : void 0;
|
|
241
|
-
try {
|
|
242
|
-
requestWithShape.socket = { remoteAddress: forwardedFor || clientAddress || void 0 };
|
|
243
|
-
} catch {
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
return requestWithShape;
|
|
247
|
-
}
|
|
248
|
-
__name(withNodeRequestShape, "withNodeRequestShape");
|
|
249
240
|
function createHandledResponse(body, init, headers) {
|
|
250
241
|
const responseHeaders = new Headers();
|
|
251
242
|
for (const [key, value] of headers) {
|
|
@@ -262,7 +253,7 @@ function createHandledResponse(body, init, headers) {
|
|
|
262
253
|
}
|
|
263
254
|
__name(createHandledResponse, "createHandledResponse");
|
|
264
255
|
function createWebMiddlewareContext(request, parent, trustProxy = false, clientAddress, toRoutePathname) {
|
|
265
|
-
let currentRequest =
|
|
256
|
+
let currentRequest = withFarmRequestClientAddress(request, trustProxy, clientAddress);
|
|
266
257
|
let handledResponse = null;
|
|
267
258
|
const url = new URL(currentRequest.url);
|
|
268
259
|
const data = parent?.data ? new Map(parent.data) : /* @__PURE__ */ new Map();
|
|
@@ -317,7 +308,7 @@ function createWebMiddlewareContext(request, parent, trustProxy = false, clientA
|
|
|
317
308
|
rewrite(rewriteUrl) {
|
|
318
309
|
ctx._rewriteUrl = rewriteUrl;
|
|
319
310
|
const nextUrl = new URL(rewriteUrl, currentRequest.url);
|
|
320
|
-
currentRequest =
|
|
311
|
+
currentRequest = withFarmRequestClientAddress(
|
|
321
312
|
new Request(nextUrl, currentRequest),
|
|
322
313
|
trustProxy,
|
|
323
314
|
clientAddress
|
|
@@ -393,8 +384,8 @@ function getConfigHandlers(entry) {
|
|
|
393
384
|
}
|
|
394
385
|
__name(getConfigHandlers, "getConfigHandlers");
|
|
395
386
|
function toMiddlewareConfig(entry) {
|
|
396
|
-
const { matcher, exclude, runtime } = entry;
|
|
397
|
-
return { matcher, exclude, runtime };
|
|
387
|
+
const { matcher, exclude, runtime, cache } = entry;
|
|
388
|
+
return { matcher, exclude, runtime, cache };
|
|
398
389
|
}
|
|
399
390
|
__name(toMiddlewareConfig, "toMiddlewareConfig");
|
|
400
391
|
function normalizeConfigMiddleware(config) {
|
|
@@ -467,7 +458,8 @@ function emptyResult(request) {
|
|
|
467
458
|
data: /* @__PURE__ */ new Map(),
|
|
468
459
|
context: /* @__PURE__ */ new Map(),
|
|
469
460
|
headers: new Headers(),
|
|
470
|
-
handled: false
|
|
461
|
+
handled: false,
|
|
462
|
+
guarded: false
|
|
471
463
|
};
|
|
472
464
|
}
|
|
473
465
|
__name(emptyResult, "emptyResult");
|
|
@@ -516,6 +508,7 @@ function createProductionMiddlewareRunner(options = {}) {
|
|
|
516
508
|
}
|
|
517
509
|
}
|
|
518
510
|
const ran = /* @__PURE__ */ new Set();
|
|
511
|
+
let guarded = false;
|
|
519
512
|
function* applicableMiddleware() {
|
|
520
513
|
for (let pathname = initialPathname, requestPathname = initialRequestPathname, pass = 0; ; pass++) {
|
|
521
514
|
const pathnames = matchPathnames(pathname, requestPathname);
|
|
@@ -541,6 +534,7 @@ function createProductionMiddlewareRunner(options = {}) {
|
|
|
541
534
|
continue;
|
|
542
535
|
}
|
|
543
536
|
ran.add(entry);
|
|
537
|
+
if (entry.config?.cache !== "public") guarded = true;
|
|
544
538
|
if (parentData) {
|
|
545
539
|
contextState = createWebMiddlewareContext(
|
|
546
540
|
currentRequest,
|
|
@@ -583,7 +577,8 @@ function createProductionMiddlewareRunner(options = {}) {
|
|
|
583
577
|
data: new Map(ctx.data),
|
|
584
578
|
context: new Map(ctx.locals),
|
|
585
579
|
headers: mapToHeaders(contextState.headers),
|
|
586
|
-
handled: true
|
|
580
|
+
handled: true,
|
|
581
|
+
guarded
|
|
587
582
|
};
|
|
588
583
|
}
|
|
589
584
|
if (ctx._handled || ctx.response.headersSent || ctx.response.writableEnded) {
|
|
@@ -599,7 +594,8 @@ function createProductionMiddlewareRunner(options = {}) {
|
|
|
599
594
|
data: new Map(ctx.data),
|
|
600
595
|
context: new Map(ctx.locals),
|
|
601
596
|
headers: mapToHeaders(contextState.headers),
|
|
602
|
-
handled: true
|
|
597
|
+
handled: true,
|
|
598
|
+
guarded
|
|
603
599
|
};
|
|
604
600
|
}
|
|
605
601
|
emitFarmEvent({
|
|
@@ -626,7 +622,8 @@ function createProductionMiddlewareRunner(options = {}) {
|
|
|
626
622
|
data: new Map(ctx.data),
|
|
627
623
|
context: new Map(ctx.locals),
|
|
628
624
|
headers: mapToHeaders(contextState.headers),
|
|
629
|
-
handled: true
|
|
625
|
+
handled: true,
|
|
626
|
+
guarded
|
|
630
627
|
};
|
|
631
628
|
}
|
|
632
629
|
if (isFarmNotFoundError(error)) {
|
|
@@ -638,6 +635,7 @@ function createProductionMiddlewareRunner(options = {}) {
|
|
|
638
635
|
context: new Map(ctx.locals),
|
|
639
636
|
headers: mapToHeaders(contextState.headers),
|
|
640
637
|
handled: true,
|
|
638
|
+
guarded,
|
|
641
639
|
notFound: true
|
|
642
640
|
};
|
|
643
641
|
}
|
|
@@ -661,7 +659,8 @@ function createProductionMiddlewareRunner(options = {}) {
|
|
|
661
659
|
data: new Map(ctx.data),
|
|
662
660
|
context: new Map(ctx.locals),
|
|
663
661
|
headers: mapToHeaders(contextState.headers),
|
|
664
|
-
handled: false
|
|
662
|
+
handled: false,
|
|
663
|
+
guarded
|
|
665
664
|
};
|
|
666
665
|
}, "runProductionMiddleware");
|
|
667
666
|
}
|
|
@@ -684,9 +683,28 @@ function applyProductionMiddlewareHeaders(response, middlewareHeaders) {
|
|
|
684
683
|
});
|
|
685
684
|
}
|
|
686
685
|
__name(applyProductionMiddlewareHeaders, "applyProductionMiddlewareHeaders");
|
|
686
|
+
var PRIVATE_CACHE_DIRECTIVE = /(?:^|,)\s*(?:private|no-store)\s*(?:[,=]|$)/i;
|
|
687
|
+
var CDN_CACHE_CONTROL_HEADERS = [
|
|
688
|
+
"cdn-cache-control",
|
|
689
|
+
"vercel-cdn-cache-control",
|
|
690
|
+
"netlify-cdn-cache-control",
|
|
691
|
+
"cloudflare-cdn-cache-control"
|
|
692
|
+
];
|
|
693
|
+
function _withFarmGuardedResponseCache(response) {
|
|
694
|
+
const shareable = !PRIVATE_CACHE_DIRECTIVE.test(response.headers.get("cache-control") ?? "");
|
|
695
|
+
if (!shareable && !CDN_CACHE_CONTROL_HEADERS.some((name) => response.headers.has(name))) {
|
|
696
|
+
return response;
|
|
697
|
+
}
|
|
698
|
+
return _withFarmResponseHeaders(response, (headers) => {
|
|
699
|
+
if (shareable) headers.set("Cache-Control", "private, no-store");
|
|
700
|
+
for (const name of CDN_CACHE_CONTROL_HEADERS) headers.delete(name);
|
|
701
|
+
});
|
|
702
|
+
}
|
|
703
|
+
__name(_withFarmGuardedResponseCache, "_withFarmGuardedResponseCache");
|
|
687
704
|
|
|
688
705
|
export {
|
|
689
706
|
matchesMiddlewareConfig2 as matchesMiddlewareConfig,
|
|
690
707
|
createProductionMiddlewareRunner,
|
|
691
|
-
applyProductionMiddlewareHeaders
|
|
708
|
+
applyProductionMiddlewareHeaders,
|
|
709
|
+
_withFarmGuardedResponseCache
|
|
692
710
|
};
|
|
@@ -12,7 +12,7 @@ var _chunkDVM4FKZLcjs = require('./chunk-DVM4FKZL.cjs');
|
|
|
12
12
|
var _chunkOX6O6WVAcjs = require('./chunk-OX6O6WVA.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkXVIEGKTTcjs = require('./chunk-XVIEGKTT.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
@@ -41,7 +41,7 @@ function createRedirectsPlugin(redirects, {
|
|
|
41
41
|
if (overrideBeforeRequest) {
|
|
42
42
|
await overrideBeforeRequest(req, res, context);
|
|
43
43
|
}
|
|
44
|
-
const url =
|
|
44
|
+
const url = _chunkXVIEGKTTcjs.resolveFarmRequestURL.call(void 0, req);
|
|
45
45
|
const routePath = _chunkDVM4FKZLcjs.resolveConfigRoutePathname.call(void 0, url.pathname, i18n);
|
|
46
46
|
const pathname = routePath.pathname;
|
|
47
47
|
for (const { redirect, pattern } of compiledRedirects) {
|
|
@@ -153,7 +153,7 @@ function createHeadersPlugin(headers, {
|
|
|
153
153
|
if (overrideBeforeRequest) {
|
|
154
154
|
await overrideBeforeRequest(req, res, context);
|
|
155
155
|
}
|
|
156
|
-
const url =
|
|
156
|
+
const url = _chunkXVIEGKTTcjs.resolveFarmRequestURL.call(void 0, req);
|
|
157
157
|
const pathname = _chunkDVM4FKZLcjs.resolveConfigRoutePathname.call(void 0, url.pathname, i18n).pathname;
|
|
158
158
|
const matchedHeaders = compiledHeaders.filter(({ pattern }) => pattern.regex.test(pathname)).map(({ config }) => config.headers);
|
|
159
159
|
applyResponseHeaders(res, matchedHeaders);
|
|
@@ -66,6 +66,37 @@ function parseColonParam(segment) {
|
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
_chunkS3JO3N4Hcjs.__name.call(void 0, parseColonParam, "parseColonParam");
|
|
69
|
+
var MATCHER_PARAM_NAME = /^[\p{L}\p{N}_$-]+$/u;
|
|
70
|
+
var MATCHER_UNSUPPORTED_LITERAL = /[()[\]|\\{}^$?:]|\.[*+]/;
|
|
71
|
+
var MATCHER_BRACKET_PARAM = /^\[\[\.\.\.(.+)\]\]$|^\[\.\.\.(.+)\]$|^\[(.+)\]$/;
|
|
72
|
+
function isSupportedMatcherSegment(segment) {
|
|
73
|
+
if (segment === "*" || segment === "**") return true;
|
|
74
|
+
if (segment.startsWith(":")) return MATCHER_PARAM_NAME.test(parseColonParam(segment).name);
|
|
75
|
+
const bracket = MATCHER_BRACKET_PARAM.exec(segment);
|
|
76
|
+
if (bracket) return MATCHER_PARAM_NAME.test(_nullishCoalesce(_nullishCoalesce(bracket[1], () => ( bracket[2])), () => ( bracket[3])));
|
|
77
|
+
return !MATCHER_UNSUPPORTED_LITERAL.test(segment);
|
|
78
|
+
}
|
|
79
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, isSupportedMatcherSegment, "isSupportedMatcherSegment");
|
|
80
|
+
function isLiteralMatcherSegment(segment) {
|
|
81
|
+
return !MATCHER_UNSUPPORTED_LITERAL.test(segment) && !segment.includes("*");
|
|
82
|
+
}
|
|
83
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, isLiteralMatcherSegment, "isLiteralMatcherSegment");
|
|
84
|
+
function assertSupportedMiddlewareMatcher(pattern) {
|
|
85
|
+
if (pattern === "*" || pattern === "/(.*)") return;
|
|
86
|
+
const subtree = pattern.endsWith("(.*)");
|
|
87
|
+
const path = subtree ? pattern.slice(0, -4) : pattern;
|
|
88
|
+
const segments = path.split("/").filter(Boolean);
|
|
89
|
+
if (segments.every(subtree ? isLiteralMatcherSegment : isSupportedMatcherSegment)) return;
|
|
90
|
+
throw new Error(
|
|
91
|
+
`Middleware matcher "${pattern}" is not a supported string pattern, so it would never match a request and the middleware would not run. String matchers do not accept regular-expression syntax such as groups, alternation, character classes, lookaheads, or \`.*\`, or a param after literal text such as \`/user-:id\`. Pass a RegExp instead, for example \`matcher: /^\\/(?!api|_next).*/\`, or use the supported forms: /path/:param, /path/:param*, /path/[param], /path/[...param], /path/*, /path/**, or a trailing (.*) such as /path(.*).`
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, assertSupportedMiddlewareMatcher, "assertSupportedMiddlewareMatcher");
|
|
95
|
+
function compileConfigPattern(pattern, compile) {
|
|
96
|
+
if (typeof pattern === "string") assertSupportedMiddlewareMatcher(pattern);
|
|
97
|
+
return compile(pattern);
|
|
98
|
+
}
|
|
99
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, compileConfigPattern, "compileConfigPattern");
|
|
69
100
|
function compilePathPattern(pattern, trailingSlash = false) {
|
|
70
101
|
const params = [];
|
|
71
102
|
const segments = pattern.split("/").filter(Boolean);
|
|
@@ -140,9 +171,9 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, compilePattern, "compilePattern");
|
|
|
140
171
|
function compileMiddlewareConfig(config) {
|
|
141
172
|
const compiled = {
|
|
142
173
|
matcher: config.matcher ? toMatcherList(config.matcher).map(
|
|
143
|
-
(matcher) => typeof matcher === "function" ? matcher :
|
|
174
|
+
(matcher) => typeof matcher === "function" ? matcher : compileConfigPattern(matcher, compileMatcherPattern)
|
|
144
175
|
) : void 0,
|
|
145
|
-
exclude: _optionalChain([config, 'access', _2 => _2.exclude, 'optionalAccess', _3 => _3.map, 'call', _4 => _4(compilePattern)])
|
|
176
|
+
exclude: _optionalChain([config, 'access', _2 => _2.exclude, 'optionalAccess', _3 => _3.map, 'call', _4 => _4((pattern) => compileConfigPattern(pattern, compilePattern))])
|
|
146
177
|
};
|
|
147
178
|
compiledConfigCache.set(config, {
|
|
148
179
|
compiled,
|
|
@@ -256,4 +287,5 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, matchesMiddlewareConfigAt, "matchesMiddlew
|
|
|
256
287
|
|
|
257
288
|
|
|
258
289
|
|
|
259
|
-
|
|
290
|
+
|
|
291
|
+
exports.compileMiddlewareRoute = compileMiddlewareRoute; exports.matchesMiddlewareRoute = matchesMiddlewareRoute; exports.matchesMiddlewareRouteAt = matchesMiddlewareRouteAt; exports.assertSupportedMiddlewareMatcher = assertSupportedMiddlewareMatcher; exports.compileMiddlewareConfig = compileMiddlewareConfig; exports.matchesMiddlewarePredicate = matchesMiddlewarePredicate; exports.toMiddlewareRoutePathname = toMiddlewareRoutePathname; exports.matchesCompiledMiddlewareConfig = matchesCompiledMiddlewareConfig; exports.matchesMiddlewareConfig = matchesMiddlewareConfig; exports.matchesMiddlewareConfigAt = matchesMiddlewareConfigAt;
|
|
@@ -1,22 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
setFarmPluginIntegrationContext
|
|
3
|
+
} from "./chunk-H3EGVQE5.mjs";
|
|
1
4
|
import {
|
|
2
5
|
defineSchema
|
|
3
6
|
} from "./chunk-44SYJEG3.mjs";
|
|
4
7
|
import {
|
|
8
|
+
assertSupportedMiddlewareMatcher,
|
|
5
9
|
compileMiddlewareConfig,
|
|
6
10
|
matchesCompiledMiddlewareConfig
|
|
7
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HKFBMHCD.mjs";
|
|
8
12
|
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
createFarmRequestBodyErrorResponse,
|
|
12
|
-
deleteRequestContext,
|
|
13
|
-
getRequestContext,
|
|
14
|
-
getRequestContextSnapshot,
|
|
15
|
-
hasRequestContext,
|
|
16
|
-
readNodeRequestBody,
|
|
17
|
-
resolveFarmServerConfig,
|
|
18
|
-
setRequestContext
|
|
19
|
-
} from "./chunk-ZMMBIVQM.mjs";
|
|
13
|
+
toPublicValidationIssues
|
|
14
|
+
} from "./chunk-MGMF4VP7.mjs";
|
|
20
15
|
import {
|
|
21
16
|
applyWebResponseHeaders,
|
|
22
17
|
sendWebResponse
|
|
@@ -25,6 +20,21 @@ import {
|
|
|
25
20
|
createFarmAPIMiddlewarePathnames,
|
|
26
21
|
resolveFarmAPIServerBasePath
|
|
27
22
|
} from "./chunk-BTHHUD7Q.mjs";
|
|
23
|
+
import {
|
|
24
|
+
bufferFarmRequestBody,
|
|
25
|
+
createFarmRequestBodyErrorResponse,
|
|
26
|
+
readNodeRequestBody,
|
|
27
|
+
resolveFarmServerConfig,
|
|
28
|
+
withFarmRequestClientAddress
|
|
29
|
+
} from "./chunk-ZZGQD7A4.mjs";
|
|
30
|
+
import {
|
|
31
|
+
clearRequestContext,
|
|
32
|
+
deleteRequestContext,
|
|
33
|
+
getRequestContext,
|
|
34
|
+
getRequestContextSnapshot,
|
|
35
|
+
hasRequestContext,
|
|
36
|
+
setRequestContext
|
|
37
|
+
} from "./chunk-P7XDC7UJ.mjs";
|
|
28
38
|
import {
|
|
29
39
|
api,
|
|
30
40
|
defineIntegrationAPIOperation
|
|
@@ -52,20 +62,6 @@ import {
|
|
|
52
62
|
__name
|
|
53
63
|
} from "./chunk-LPEX4YW6.mjs";
|
|
54
64
|
|
|
55
|
-
// src/plugin-integration-context.ts
|
|
56
|
-
var FARM_PLUGIN_INTEGRATION_CONTEXT = /* @__PURE__ */ Symbol.for("@farm.js/core/plugin-integration-context");
|
|
57
|
-
function setFarmPluginIntegrationContext(plugin, integration) {
|
|
58
|
-
Object.defineProperty(plugin, FARM_PLUGIN_INTEGRATION_CONTEXT, {
|
|
59
|
-
value: integration
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
__name(setFarmPluginIntegrationContext, "setFarmPluginIntegrationContext");
|
|
63
|
-
function getFarmPluginIntegrationContext(plugin) {
|
|
64
|
-
const value = plugin[FARM_PLUGIN_INTEGRATION_CONTEXT];
|
|
65
|
-
return value && typeof value === "object" ? value : void 0;
|
|
66
|
-
}
|
|
67
|
-
__name(getFarmPluginIntegrationContext, "getFarmPluginIntegrationContext");
|
|
68
|
-
|
|
69
65
|
// src/integrations.ts
|
|
70
66
|
var FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY = "farm.integration.internalDispatch";
|
|
71
67
|
var FARM_INTEGRATION_SET_COOKIES_KEY = "farm:integration:set-cookies";
|
|
@@ -285,6 +281,15 @@ function resolveIntegrationPlugins(integrations) {
|
|
|
285
281
|
if (!integration || !isFarmIntegration(integration)) {
|
|
286
282
|
continue;
|
|
287
283
|
}
|
|
284
|
+
for (const entry of integration.middleware || []) {
|
|
285
|
+
if (!entry.matcher) continue;
|
|
286
|
+
const matchers = Array.isArray(entry.matcher) ? entry.matcher : [entry.matcher];
|
|
287
|
+
try {
|
|
288
|
+
matchers.forEach(assertSupportedMiddlewareMatcher);
|
|
289
|
+
} catch (error) {
|
|
290
|
+
throw new Error(`Integration "${key}": ${error.message}`);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
288
293
|
const owner = createIntegrationPluginOwner(key, integration, "lifecycle");
|
|
289
294
|
plugins.push(withIntegrationPluginOwner(createIntegrationPlugin(key, integration), owner));
|
|
290
295
|
plugins.push(...resolveIntegrationPluginContributions(key, integration));
|
|
@@ -853,7 +858,11 @@ function createIntegrationPlugin(integrationKey, integration) {
|
|
|
853
858
|
}, "getRequestBody");
|
|
854
859
|
const createHandlerRequest = /* @__PURE__ */ __name(async () => {
|
|
855
860
|
try {
|
|
856
|
-
return
|
|
861
|
+
return withFarmRequestClientAddress(
|
|
862
|
+
createWebRequest(req, fullUrl, await getRequestBody()),
|
|
863
|
+
resolveFarmServerConfig(context.config.server).trustProxy,
|
|
864
|
+
req.socket?.remoteAddress
|
|
865
|
+
);
|
|
857
866
|
} catch (error) {
|
|
858
867
|
const response = createFarmRequestBodyErrorResponse(error);
|
|
859
868
|
if (!response) throw error;
|
|
@@ -1343,18 +1352,13 @@ function createIntegrationValidationResponse(issues) {
|
|
|
1343
1352
|
__name(createIntegrationValidationResponse, "createIntegrationValidationResponse");
|
|
1344
1353
|
function normalizeIntegrationValidationIssues(source, error) {
|
|
1345
1354
|
if (Array.isArray(error.issues) && error.issues.length > 0) {
|
|
1346
|
-
return error.
|
|
1347
|
-
source,
|
|
1348
|
-
path: normalizeIntegrationValidationPath(issue.path),
|
|
1349
|
-
code: issue.code,
|
|
1350
|
-
message: issue.message || "Invalid input"
|
|
1351
|
-
}));
|
|
1355
|
+
return toPublicValidationIssues(error).map((issue) => ({ source, ...issue }));
|
|
1352
1356
|
}
|
|
1353
1357
|
return [
|
|
1354
1358
|
{
|
|
1355
1359
|
source,
|
|
1356
1360
|
path: [],
|
|
1357
|
-
message:
|
|
1361
|
+
message: "Invalid input"
|
|
1358
1362
|
}
|
|
1359
1363
|
];
|
|
1360
1364
|
}
|
|
@@ -1431,7 +1435,7 @@ function createIntegrationRouteArgs(input) {
|
|
|
1431
1435
|
`Integration "${input.integration.type}" does not define a schema for ctx.args.db.`
|
|
1432
1436
|
);
|
|
1433
1437
|
}
|
|
1434
|
-
ormPromise ?? (ormPromise = import("./integration-orm-
|
|
1438
|
+
ormPromise ?? (ormPromise = import("./integration-orm-RBKCIQYZ.mjs").then(
|
|
1435
1439
|
({ createIntegrationOrm }) => createIntegrationOrm({
|
|
1436
1440
|
schema: input.integration.schema,
|
|
1437
1441
|
config: input.config
|
|
@@ -1561,16 +1565,15 @@ function createFormInput(formData) {
|
|
|
1561
1565
|
}
|
|
1562
1566
|
__name(createFormInput, "createFormInput");
|
|
1563
1567
|
async function dispatchIntegrationRequest(runtime, request, options = {}) {
|
|
1568
|
+
const serverConfig = resolveFarmServerConfig(runtime.config.server);
|
|
1564
1569
|
try {
|
|
1565
|
-
request = await bufferFarmRequestBody(
|
|
1566
|
-
request,
|
|
1567
|
-
resolveFarmServerConfig(runtime.config.server).bodySizeLimit
|
|
1568
|
-
);
|
|
1570
|
+
request = await bufferFarmRequestBody(request, serverConfig.bodySizeLimit);
|
|
1569
1571
|
} catch (error) {
|
|
1570
1572
|
const response = createFarmRequestBodyErrorResponse(error);
|
|
1571
1573
|
if (response) return response;
|
|
1572
1574
|
throw error;
|
|
1573
1575
|
}
|
|
1576
|
+
request = withFarmRequestClientAddress(request, serverConfig.trustProxy, options.clientAddress);
|
|
1574
1577
|
const integration = runtime.integration;
|
|
1575
1578
|
const url = new URL(request.url);
|
|
1576
1579
|
const pathname = url.pathname;
|
|
@@ -1852,6 +1855,7 @@ async function dispatchIntegrationRequests(integrations, runtime, request, optio
|
|
|
1852
1855
|
{
|
|
1853
1856
|
currentRequest: options.currentRequest,
|
|
1854
1857
|
ranMiddleware: options.ranMiddleware,
|
|
1858
|
+
clientAddress: options.clientAddress,
|
|
1855
1859
|
onForwardedCookies: /* @__PURE__ */ __name((cookies) => setCookies.push(...cookies), "onForwardedCookies")
|
|
1856
1860
|
}
|
|
1857
1861
|
);
|
|
@@ -2174,7 +2178,6 @@ function normalizeMatcher(matcher) {
|
|
|
2174
2178
|
__name(normalizeMatcher, "normalizeMatcher");
|
|
2175
2179
|
|
|
2176
2180
|
export {
|
|
2177
|
-
getFarmPluginIntegrationContext,
|
|
2178
2181
|
FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY,
|
|
2179
2182
|
FARM_INTEGRATION_SET_COOKIES_KEY,
|
|
2180
2183
|
forwardIntegrationSetCookies,
|