@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
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__name
|
|
3
|
+
} from "./chunk-LPEX4YW6.mjs";
|
|
4
|
+
|
|
5
|
+
// src/middleware/server.ts
|
|
6
|
+
import { AsyncLocalStorage } from "async_hooks";
|
|
7
|
+
var MIDDLEWARE_DATA_STORE_KEY = /* @__PURE__ */ Symbol.for("farm.middlewareDataStore");
|
|
8
|
+
var MIDDLEWARE_CONTEXT_STORE_KEY = /* @__PURE__ */ Symbol.for("farm.middlewareContextStore");
|
|
9
|
+
function getGlobalMiddlewareStore(key) {
|
|
10
|
+
const state = globalThis;
|
|
11
|
+
const existing = state[key];
|
|
12
|
+
if (existing instanceof AsyncLocalStorage) {
|
|
13
|
+
return existing;
|
|
14
|
+
}
|
|
15
|
+
const store = new AsyncLocalStorage();
|
|
16
|
+
state[key] = store;
|
|
17
|
+
return store;
|
|
18
|
+
}
|
|
19
|
+
__name(getGlobalMiddlewareStore, "getGlobalMiddlewareStore");
|
|
20
|
+
var middlewareStore = getGlobalMiddlewareStore(MIDDLEWARE_DATA_STORE_KEY);
|
|
21
|
+
var middlewareContextStore = getGlobalMiddlewareStore(MIDDLEWARE_CONTEXT_STORE_KEY);
|
|
22
|
+
function toMiddlewareMap(data) {
|
|
23
|
+
if (data instanceof Map) {
|
|
24
|
+
return new Map(data);
|
|
25
|
+
}
|
|
26
|
+
return new Map(Object.entries(data));
|
|
27
|
+
}
|
|
28
|
+
__name(toMiddlewareMap, "toMiddlewareMap");
|
|
29
|
+
function _clearCurrentMiddlewareData() {
|
|
30
|
+
middlewareStore.enterWith(/* @__PURE__ */ new Map());
|
|
31
|
+
}
|
|
32
|
+
__name(_clearCurrentMiddlewareData, "_clearCurrentMiddlewareData");
|
|
33
|
+
function _clearCurrentMiddlewareContext() {
|
|
34
|
+
middlewareContextStore.enterWith(/* @__PURE__ */ new Map());
|
|
35
|
+
}
|
|
36
|
+
__name(_clearCurrentMiddlewareContext, "_clearCurrentMiddlewareContext");
|
|
37
|
+
async function _runWithMiddlewareData(data, fn) {
|
|
38
|
+
return middlewareStore.run(toMiddlewareMap(data), fn);
|
|
39
|
+
}
|
|
40
|
+
__name(_runWithMiddlewareData, "_runWithMiddlewareData");
|
|
41
|
+
async function _runWithMiddlewareContext(context, fn) {
|
|
42
|
+
return middlewareContextStore.run(toMiddlewareMap(context), fn);
|
|
43
|
+
}
|
|
44
|
+
__name(_runWithMiddlewareContext, "_runWithMiddlewareContext");
|
|
45
|
+
function getMiddlewareData() {
|
|
46
|
+
return middlewareStore.getStore() || /* @__PURE__ */ new Map();
|
|
47
|
+
}
|
|
48
|
+
__name(getMiddlewareData, "getMiddlewareData");
|
|
49
|
+
function getMiddlewareValue(key) {
|
|
50
|
+
const data = getMiddlewareData();
|
|
51
|
+
return data.get(key);
|
|
52
|
+
}
|
|
53
|
+
__name(getMiddlewareValue, "getMiddlewareValue");
|
|
54
|
+
function getMiddlewareContext() {
|
|
55
|
+
return middlewareContextStore.getStore() || /* @__PURE__ */ new Map();
|
|
56
|
+
}
|
|
57
|
+
__name(getMiddlewareContext, "getMiddlewareContext");
|
|
58
|
+
|
|
59
|
+
export {
|
|
60
|
+
_clearCurrentMiddlewareData,
|
|
61
|
+
_clearCurrentMiddlewareContext,
|
|
62
|
+
_runWithMiddlewareData,
|
|
63
|
+
_runWithMiddlewareContext,
|
|
64
|
+
getMiddlewareData,
|
|
65
|
+
getMiddlewareValue,
|
|
66
|
+
getMiddlewareContext
|
|
67
|
+
};
|
|
@@ -15,13 +15,13 @@ import {
|
|
|
15
15
|
} from "./chunk-TVGP4BBZ.mjs";
|
|
16
16
|
import {
|
|
17
17
|
stampFarmCspNonce
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-PNCM5MFD.mjs";
|
|
19
19
|
import {
|
|
20
20
|
farmAcceptQuality
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-I6UVKUYK.mjs";
|
|
22
22
|
import {
|
|
23
23
|
matchesFarmIfNoneMatch
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-ZZGQD7A4.mjs";
|
|
25
25
|
import {
|
|
26
26
|
__name
|
|
27
27
|
} from "./chunk-LPEX4YW6.mjs";
|
|
@@ -304,61 +304,6 @@ if (import.meta.hot) {
|
|
|
304
304
|
}
|
|
305
305
|
__name(generateFarmDevIndicatorsClientRuntime, "generateFarmDevIndicatorsClientRuntime");
|
|
306
306
|
|
|
307
|
-
// src/plugin-dependencies.ts
|
|
308
|
-
function pluginShortName(name) {
|
|
309
|
-
return name.slice(Math.max(name.lastIndexOf(":"), name.lastIndexOf("/")) + 1);
|
|
310
|
-
}
|
|
311
|
-
__name(pluginShortName, "pluginShortName");
|
|
312
|
-
function assertPluginDependencies(plugins, integrations) {
|
|
313
|
-
const integrationKeys = integrations && !Array.isArray(integrations) ? Object.keys(integrations) : [];
|
|
314
|
-
const matches = /* @__PURE__ */ __name((plugin, dependency) => plugin.name === dependency || pluginShortName(plugin.name) === dependency, "matches");
|
|
315
|
-
for (const plugin of plugins) {
|
|
316
|
-
if (plugin.dependsOn === void 0) continue;
|
|
317
|
-
if (!Array.isArray(plugin.dependsOn) || plugin.dependsOn.some((entry) => typeof entry !== "string" || entry.trim() === "")) {
|
|
318
|
-
throw new TypeError(
|
|
319
|
-
`Plugin "${plugin.name}" has an invalid \`dependsOn\`: list plugin names, such as ["teams"].`
|
|
320
|
-
);
|
|
321
|
-
}
|
|
322
|
-
for (const dependency of plugin.dependsOn) {
|
|
323
|
-
if (matches(plugin, dependency)) {
|
|
324
|
-
throw new Error(`Plugin "${plugin.name}" lists itself in \`dependsOn\`.`);
|
|
325
|
-
}
|
|
326
|
-
const found = plugins.some((candidate) => candidate !== plugin && matches(candidate, dependency)) || integrationKeys.includes(dependency);
|
|
327
|
-
if (!found) {
|
|
328
|
-
const configured = [
|
|
329
|
-
...plugins.map((candidate) => candidate.name),
|
|
330
|
-
...integrationKeys
|
|
331
|
-
].filter((name) => name !== plugin.name);
|
|
332
|
-
throw new Error(
|
|
333
|
-
`Plugin "${plugin.name}" depends on "${dependency}", which is not configured. Add it to \`plugins\` (or \`integrations\`) in farm.config.${configured.length > 0 ? ` Configured: ${configured.join(", ")}.` : ""}`
|
|
334
|
-
);
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
const state = /* @__PURE__ */ new Map();
|
|
339
|
-
const path3 = [];
|
|
340
|
-
const visit = /* @__PURE__ */ __name((plugin) => {
|
|
341
|
-
if (state.get(plugin) === "done") return;
|
|
342
|
-
if (state.get(plugin) === "visiting") {
|
|
343
|
-
const cycle = [...path3.slice(path3.indexOf(plugin)), plugin].map(
|
|
344
|
-
(entry) => pluginShortName(entry.name)
|
|
345
|
-
);
|
|
346
|
-
throw new Error(`Plugins depend on each other in a cycle: ${cycle.join(" \u2192 ")}.`);
|
|
347
|
-
}
|
|
348
|
-
state.set(plugin, "visiting");
|
|
349
|
-
path3.push(plugin);
|
|
350
|
-
for (const dependency of plugin.dependsOn ?? []) {
|
|
351
|
-
for (const candidate of plugins) {
|
|
352
|
-
if (candidate !== plugin && matches(candidate, dependency)) visit(candidate);
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
path3.pop();
|
|
356
|
-
state.set(plugin, "done");
|
|
357
|
-
}, "visit");
|
|
358
|
-
for (const plugin of plugins) visit(plugin);
|
|
359
|
-
}
|
|
360
|
-
__name(assertPluginDependencies, "assertPluginDependencies");
|
|
361
|
-
|
|
362
307
|
// src/utils/source-dir.ts
|
|
363
308
|
import path from "path";
|
|
364
309
|
var FARM_PROJECT_SOURCE_DIRS = /* @__PURE__ */ Symbol.for("farm.projectSourceDirs");
|
|
@@ -500,7 +445,5 @@ export {
|
|
|
500
445
|
resolveFarmDevIndicatorsConfig,
|
|
501
446
|
generateFarmDevIndicatorsClientRuntime,
|
|
502
447
|
resolveFarmAuthConfig,
|
|
503
|
-
resolveFarmAuthIntegration
|
|
504
|
-
pluginShortName,
|
|
505
|
-
assertPluginDependencies
|
|
448
|
+
resolveFarmAuthIntegration
|
|
506
449
|
};
|
|
@@ -66,6 +66,37 @@ function parseColonParam(segment) {
|
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
__name(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(bracket[1] ?? bracket[2] ?? bracket[3]);
|
|
77
|
+
return !MATCHER_UNSUPPORTED_LITERAL.test(segment);
|
|
78
|
+
}
|
|
79
|
+
__name(isSupportedMatcherSegment, "isSupportedMatcherSegment");
|
|
80
|
+
function isLiteralMatcherSegment(segment) {
|
|
81
|
+
return !MATCHER_UNSUPPORTED_LITERAL.test(segment) && !segment.includes("*");
|
|
82
|
+
}
|
|
83
|
+
__name(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
|
+
__name(assertSupportedMiddlewareMatcher, "assertSupportedMiddlewareMatcher");
|
|
95
|
+
function compileConfigPattern(pattern, compile) {
|
|
96
|
+
if (typeof pattern === "string") assertSupportedMiddlewareMatcher(pattern);
|
|
97
|
+
return compile(pattern);
|
|
98
|
+
}
|
|
99
|
+
__name(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 @@ __name(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: config.exclude?.map(compilePattern)
|
|
176
|
+
exclude: config.exclude?.map((pattern) => compileConfigPattern(pattern, compilePattern))
|
|
146
177
|
};
|
|
147
178
|
compiledConfigCache.set(config, {
|
|
148
179
|
compiled,
|
|
@@ -250,6 +281,7 @@ export {
|
|
|
250
281
|
compileMiddlewareRoute,
|
|
251
282
|
matchesMiddlewareRoute,
|
|
252
283
|
matchesMiddlewareRouteAt,
|
|
284
|
+
assertSupportedMiddlewareMatcher,
|
|
253
285
|
compileMiddlewareConfig,
|
|
254
286
|
matchesMiddlewarePredicate,
|
|
255
287
|
toMiddlewareRoutePathname,
|
|
@@ -2,21 +2,24 @@ import {
|
|
|
2
2
|
parseRequestCookieHeader
|
|
3
3
|
} from "./chunk-JM5XPKWH.mjs";
|
|
4
4
|
import {
|
|
5
|
+
_assertRequestReadAllowed,
|
|
5
6
|
getCurrentRequest
|
|
6
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZOABCQGT.mjs";
|
|
7
8
|
import {
|
|
8
9
|
_resolveCurrentCspNonce
|
|
9
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-Y6LRPO2K.mjs";
|
|
10
11
|
import {
|
|
11
12
|
__name
|
|
12
13
|
} from "./chunk-LPEX4YW6.mjs";
|
|
13
14
|
|
|
14
15
|
// src/headers.ts
|
|
15
16
|
function headers() {
|
|
17
|
+
_assertRequestReadAllowed("headers()");
|
|
16
18
|
return new Headers(getCurrentRequest().headers);
|
|
17
19
|
}
|
|
18
20
|
__name(headers, "headers");
|
|
19
21
|
function cookies() {
|
|
22
|
+
_assertRequestReadAllowed("cookies()");
|
|
20
23
|
const cookieHeader = getCurrentRequest().headers.get("cookie") || "";
|
|
21
24
|
const parsed = parseRequestCookieHeader(cookieHeader);
|
|
22
25
|
return {
|
|
@@ -39,6 +42,7 @@ function cookies() {
|
|
|
39
42
|
}
|
|
40
43
|
__name(cookies, "cookies");
|
|
41
44
|
function getCspNonce() {
|
|
45
|
+
_assertRequestReadAllowed("getCspNonce()");
|
|
42
46
|
return _resolveCurrentCspNonce();
|
|
43
47
|
}
|
|
44
48
|
__name(getCspNonce, "getCspNonce");
|
|
@@ -4,14 +4,17 @@ var _chunk6QQDAAAZcjs = require('./chunk-6QQDAAAZ.cjs');
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunkCGVPXIRNcjs = require('./chunk-CGVPXIRN.cjs');
|
|
8
11
|
|
|
9
12
|
|
|
10
13
|
var _chunkSOR334EBcjs = require('./chunk-SOR334EB.cjs');
|
|
11
14
|
|
|
12
15
|
|
|
13
16
|
|
|
14
|
-
var
|
|
17
|
+
var _chunkUMQAK3KPcjs = require('./chunk-UMQAK3KP.cjs');
|
|
15
18
|
|
|
16
19
|
|
|
17
20
|
var _chunkNYJMY3JAcjs = require('./chunk-NYJMY3JA.cjs');
|
|
@@ -39,7 +42,9 @@ function defineRoutes(input) {
|
|
|
39
42
|
const routes = typeof input === "function" ? input(routesBuilder) : input;
|
|
40
43
|
const manifest = {
|
|
41
44
|
__farmRoutes: true,
|
|
42
|
-
routes: routes.map(
|
|
45
|
+
routes: routes.map(
|
|
46
|
+
(route) => stampProgrammaticRouteSource(normalizeProgrammaticRoute(route), route, false)
|
|
47
|
+
)
|
|
43
48
|
};
|
|
44
49
|
Object.defineProperty(manifest, FARM_ROUTES_BRAND, {
|
|
45
50
|
value: true,
|
|
@@ -50,14 +55,14 @@ function defineRoutes(input) {
|
|
|
50
55
|
_chunkS3JO3N4Hcjs.__name.call(void 0, defineRoutes, "defineRoutes");
|
|
51
56
|
var routesBuilder = {
|
|
52
57
|
page(path, options) {
|
|
53
|
-
return
|
|
58
|
+
return createProgrammaticRoute({
|
|
54
59
|
kind: "page",
|
|
55
60
|
path,
|
|
56
61
|
...options
|
|
57
62
|
});
|
|
58
63
|
},
|
|
59
64
|
layout(path, options) {
|
|
60
|
-
return
|
|
65
|
+
return createProgrammaticRoute({
|
|
61
66
|
kind: "layout",
|
|
62
67
|
path,
|
|
63
68
|
...options
|
|
@@ -65,7 +70,7 @@ var routesBuilder = {
|
|
|
65
70
|
},
|
|
66
71
|
api(path, options) {
|
|
67
72
|
const { render, runtime, regions, maxDuration, ...methods } = options;
|
|
68
|
-
return
|
|
73
|
+
return createProgrammaticRoute({
|
|
69
74
|
kind: "api",
|
|
70
75
|
path,
|
|
71
76
|
render,
|
|
@@ -76,7 +81,7 @@ var routesBuilder = {
|
|
|
76
81
|
});
|
|
77
82
|
},
|
|
78
83
|
redirect(source, destination, options = {}) {
|
|
79
|
-
return
|
|
84
|
+
return createProgrammaticRoute({
|
|
80
85
|
kind: "redirect",
|
|
81
86
|
source,
|
|
82
87
|
destination,
|
|
@@ -84,6 +89,41 @@ var routesBuilder = {
|
|
|
84
89
|
});
|
|
85
90
|
}
|
|
86
91
|
};
|
|
92
|
+
function createProgrammaticRoute(route) {
|
|
93
|
+
return stampProgrammaticRouteSource(normalizeProgrammaticRoute(route), route, true);
|
|
94
|
+
}
|
|
95
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, createProgrammaticRoute, "createProgrammaticRoute");
|
|
96
|
+
function stampProgrammaticRouteSource(route, input, created) {
|
|
97
|
+
if (!globalThis[_chunkCGVPXIRNcjs.TRACK_PROGRAMMATIC_ROUTE_SOURCES]) return route;
|
|
98
|
+
const previous = _chunkCGVPXIRNcjs.getProgrammaticRouteDefinitionSource.call(void 0, input);
|
|
99
|
+
const source = {
|
|
100
|
+
stacks: [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess', _ => _.stacks]), () => ( [])), captureRouteSourceStack()],
|
|
101
|
+
raw: created ? false : _nullishCoalesce(_optionalChain([previous, 'optionalAccess', _2 => _2.raw]), () => ( true))
|
|
102
|
+
};
|
|
103
|
+
Object.defineProperty(route, _chunkCGVPXIRNcjs.PROGRAMMATIC_ROUTE_SOURCE, {
|
|
104
|
+
value: source,
|
|
105
|
+
enumerable: true,
|
|
106
|
+
configurable: true,
|
|
107
|
+
writable: true
|
|
108
|
+
});
|
|
109
|
+
return route;
|
|
110
|
+
}
|
|
111
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, stampProgrammaticRouteSource, "stampProgrammaticRouteSource");
|
|
112
|
+
function captureRouteSourceStack() {
|
|
113
|
+
const limit = Error.stackTraceLimit;
|
|
114
|
+
try {
|
|
115
|
+
Error.stackTraceLimit = 200;
|
|
116
|
+
return _nullishCoalesce(new Error().stack, () => ( ""));
|
|
117
|
+
} catch (e) {
|
|
118
|
+
return "";
|
|
119
|
+
} finally {
|
|
120
|
+
try {
|
|
121
|
+
Error.stackTraceLimit = limit;
|
|
122
|
+
} catch (e2) {
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, captureRouteSourceStack, "captureRouteSourceStack");
|
|
87
127
|
var page = routesBuilder.page;
|
|
88
128
|
var layout = routesBuilder.layout;
|
|
89
129
|
var api = routesBuilder.api;
|
|
@@ -98,8 +138,8 @@ function getProgrammaticRouteSearchClientOptions(search) {
|
|
|
98
138
|
if (!search || isProgrammaticRouteSchema(search)) return void 0;
|
|
99
139
|
const options = {};
|
|
100
140
|
if (typeof search.stripDefaults !== "undefined") options.stripDefaults = search.stripDefaults;
|
|
101
|
-
if (_optionalChain([search, 'access',
|
|
102
|
-
if (_optionalChain([search, 'access',
|
|
141
|
+
if (_optionalChain([search, 'access', _3 => _3.preserve, 'optionalAccess', _4 => _4.length])) options.preserve = [...search.preserve];
|
|
142
|
+
if (_optionalChain([search, 'access', _5 => _5.temporary, 'optionalAccess', _6 => _6.length])) options.temporary = [...search.temporary];
|
|
103
143
|
return Object.keys(options).length > 0 ? options : void 0;
|
|
104
144
|
}
|
|
105
145
|
_chunkS3JO3N4Hcjs.__name.call(void 0, getProgrammaticRouteSearchClientOptions, "getProgrammaticRouteSearchClientOptions");
|
|
@@ -128,7 +168,7 @@ function isProgrammaticRouteSchema(value) {
|
|
|
128
168
|
_chunkS3JO3N4Hcjs.__name.call(void 0, isProgrammaticRouteSchema, "isProgrammaticRouteSchema");
|
|
129
169
|
function resolveProgrammaticRouteCanonicalPath(input) {
|
|
130
170
|
const options = input.options;
|
|
131
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
171
|
+
if (!_optionalChain([options, 'optionalAccess', _7 => _7.temporary, 'optionalAccess', _8 => _8.length]) && !_optionalChain([options, 'optionalAccess', _9 => _9.stripDefaults])) {
|
|
132
172
|
return void 0;
|
|
133
173
|
}
|
|
134
174
|
const params = createSearchParams(input.rawSearch);
|
|
@@ -174,7 +214,7 @@ function parseDefaultSearch(schema) {
|
|
|
174
214
|
try {
|
|
175
215
|
const value = schema.parse({});
|
|
176
216
|
return value && typeof value === "object" ? value : void 0;
|
|
177
|
-
} catch (
|
|
217
|
+
} catch (e3) {
|
|
178
218
|
return void 0;
|
|
179
219
|
}
|
|
180
220
|
}
|
|
@@ -274,7 +314,7 @@ function parseProgrammaticRouteModuleId(moduleId) {
|
|
|
274
314
|
}
|
|
275
315
|
_chunkS3JO3N4Hcjs.__name.call(void 0, parseProgrammaticRouteModuleId, "parseProgrammaticRouteModuleId");
|
|
276
316
|
function parseProgrammaticRoutePath2(routePath, type = "page") {
|
|
277
|
-
return
|
|
317
|
+
return _chunkCGVPXIRNcjs.parseProgrammaticRoutePath.call(void 0, routePath, type);
|
|
278
318
|
}
|
|
279
319
|
_chunkS3JO3N4Hcjs.__name.call(void 0, parseProgrammaticRoutePath2, "parseProgrammaticRoutePath");
|
|
280
320
|
function createRouteModuleFromProgrammaticPage(route, rendererRuntime) {
|
|
@@ -337,7 +377,7 @@ function createLayoutModuleFromProgrammaticLayout(route) {
|
|
|
337
377
|
_chunkS3JO3N4Hcjs.__name.call(void 0, createLayoutModuleFromProgrammaticLayout, "createLayoutModuleFromProgrammaticLayout");
|
|
338
378
|
function scanProgrammaticPagePaths(source) {
|
|
339
379
|
const paths = /* @__PURE__ */ new Set();
|
|
340
|
-
for (const routePath of
|
|
380
|
+
for (const routePath of _chunkCGVPXIRNcjs.extractProgrammaticPageCallPathLiterals.call(void 0, source)) {
|
|
341
381
|
if (routePath) {
|
|
342
382
|
paths.add(normalizeRoutePath(routePath));
|
|
343
383
|
}
|
|
@@ -357,7 +397,7 @@ function createProgrammaticPageComponent(route, rendererRuntime) {
|
|
|
357
397
|
}
|
|
358
398
|
return rendererRuntime.createElement(...args);
|
|
359
399
|
}, "createElement");
|
|
360
|
-
const markFunctionComponent = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (component) => _nullishCoalesce(_optionalChain([rendererRuntime, 'optionalAccess',
|
|
400
|
+
const markFunctionComponent = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (component) => _nullishCoalesce(_optionalChain([rendererRuntime, 'optionalAccess', _10 => _10.markFunctionComponent, 'optionalCall', _11 => _11(component)]), () => ( component)), "markFunctionComponent");
|
|
361
401
|
const Component = route.component;
|
|
362
402
|
if (route.pending) {
|
|
363
403
|
const PendingComponent = route.pending;
|
|
@@ -562,7 +602,7 @@ async function resolveProgrammaticRouteProps(route, props) {
|
|
|
562
602
|
}
|
|
563
603
|
_chunkS3JO3N4Hcjs.__name.call(void 0, resolveProgrammaticRouteProps, "resolveProgrammaticRouteProps");
|
|
564
604
|
async function resolveProgrammaticRouteData(route, dataHooks, context) {
|
|
565
|
-
if (!_optionalChain([dataHooks, 'optionalAccess',
|
|
605
|
+
if (!_optionalChain([dataHooks, 'optionalAccess', _12 => _12.key])) {
|
|
566
606
|
return dataHooks.main(context);
|
|
567
607
|
}
|
|
568
608
|
const routeDataKey = await dataHooks.key(context);
|
|
@@ -576,7 +616,7 @@ async function resolveProgrammaticRouteData(route, dataHooks, context) {
|
|
|
576
616
|
const cacheKey = _chunkNYJMY3JAcjs.createFarmCacheKey.call(void 0, ["route-data", routeDataKey]);
|
|
577
617
|
const cacheOptions = {
|
|
578
618
|
tags: [
|
|
579
|
-
|
|
619
|
+
_chunkUMQAK3KPcjs.createRouteDataCacheTag.call(void 0, routeDataKey),
|
|
580
620
|
...await resolveProgrammaticRouteDataKeys(dataHooks.tags, context)
|
|
581
621
|
],
|
|
582
622
|
paths: [
|
|
@@ -585,7 +625,7 @@ async function resolveProgrammaticRouteData(route, dataHooks, context) {
|
|
|
585
625
|
],
|
|
586
626
|
revalidate
|
|
587
627
|
};
|
|
588
|
-
return
|
|
628
|
+
return _chunkUMQAK3KPcjs.getFarmDataCache.call(void 0, ).getOrSet(cacheKey, () => dataHooks.main(context), cacheOptions);
|
|
589
629
|
}
|
|
590
630
|
_chunkS3JO3N4Hcjs.__name.call(void 0, resolveProgrammaticRouteData, "resolveProgrammaticRouteData");
|
|
591
631
|
async function resolveProgrammaticRouteDataKeys(input, context) {
|
|
@@ -672,7 +712,7 @@ function normalizeProgrammaticRoute(route) {
|
|
|
672
712
|
};
|
|
673
713
|
}
|
|
674
714
|
const routeActions = route.kind === "page" ? normalizeProgrammaticRouteActions(route) : void 0;
|
|
675
|
-
normalizeProgrammaticRouteStaleTime(_optionalChain([route, 'access',
|
|
715
|
+
normalizeProgrammaticRouteStaleTime(_optionalChain([route, 'access', _13 => _13.data, 'optionalAccess', _14 => _14.staleTime]), route.path);
|
|
676
716
|
return {
|
|
677
717
|
...route,
|
|
678
718
|
...routeActions,
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
loadFarmDocsPage,
|
|
5
5
|
resolveFarmDocsContentDir,
|
|
6
6
|
toFarmDocsMarkdownPage
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HBEBV7OZ.mjs";
|
|
8
8
|
import {
|
|
9
9
|
docsEngine,
|
|
10
10
|
loadFarmDocsEngine
|
|
11
11
|
} from "./chunk-2VQKKQ6D.mjs";
|
|
12
12
|
import {
|
|
13
13
|
resolveDocsConfig
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-Y4QVEU67.mjs";
|
|
15
15
|
import {
|
|
16
16
|
getFarmDocsAdapterConfigModule,
|
|
17
17
|
isSecretDocsConfigKey
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FARM_ANONYMOUS_CLIENT_ADDRESS
|
|
3
|
+
} from "./chunk-BRYPZIMB.mjs";
|
|
1
4
|
import {
|
|
2
5
|
matchesFarmIfNoneMatch
|
|
3
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZZGQD7A4.mjs";
|
|
4
7
|
import {
|
|
5
8
|
__name
|
|
6
9
|
} from "./chunk-LPEX4YW6.mjs";
|
|
@@ -122,7 +125,7 @@ ${negotiatedFormat}`;
|
|
|
122
125
|
return entry;
|
|
123
126
|
});
|
|
124
127
|
}
|
|
125
|
-
return createOptimizedImageResponse(request, optimized
|
|
128
|
+
return createOptimizedImageResponse(request, optimized);
|
|
126
129
|
} catch (error) {
|
|
127
130
|
if (!(error instanceof FarmImageRequestError) && !isAbortError(error)) {
|
|
128
131
|
try {
|
|
@@ -352,14 +355,18 @@ async function fetchImageSource(initialUrl, requestOrigin, trustedLocalOrigin, c
|
|
|
352
355
|
let currentUrl = initialUrl;
|
|
353
356
|
for (let redirectCount = 0; ; redirectCount += 1) {
|
|
354
357
|
throwIfAborted(signal);
|
|
355
|
-
const
|
|
358
|
+
const isTrustedLocal = currentUrl.origin === trustedLocalOrigin;
|
|
359
|
+
const sourceFetcher = isTrustedLocal ? fetcher : fetchRemote ?? fetcher;
|
|
356
360
|
const response = await sourceFetcher(currentUrl, {
|
|
357
361
|
method: "GET",
|
|
358
362
|
redirect: "manual",
|
|
359
363
|
signal,
|
|
360
364
|
headers: {
|
|
361
365
|
accept: "image/avif,image/webp,image/*,*/*;q=0.8",
|
|
362
|
-
"user-agent": "Farm.js Image Optimizer"
|
|
366
|
+
"user-agent": "Farm.js Image Optimizer",
|
|
367
|
+
// This server fetching from itself arrives from a loopback address.
|
|
368
|
+
// Mark it so the app sees an anonymous visitor, not a trusted local one.
|
|
369
|
+
...isTrustedLocal ? { [FARM_IMAGE_SOURCE_HEADER]: getFarmImageSourceToken() } : {}
|
|
363
370
|
}
|
|
364
371
|
});
|
|
365
372
|
if (![301, 302, 303, 307, 308].includes(response.status)) {
|
|
@@ -398,6 +405,19 @@ async function fetchImageSource(initialUrl, requestOrigin, trustedLocalOrigin, c
|
|
|
398
405
|
}
|
|
399
406
|
}
|
|
400
407
|
__name(fetchImageSource, "fetchImageSource");
|
|
408
|
+
var FARM_IMAGE_SOURCE_HEADER = "x-farm-image-source";
|
|
409
|
+
var FARM_IMAGE_SOURCE_TOKEN = /* @__PURE__ */ Symbol.for("farm.image.sourceToken");
|
|
410
|
+
function getFarmImageSourceToken() {
|
|
411
|
+
const state = globalThis;
|
|
412
|
+
return state[FARM_IMAGE_SOURCE_TOKEN] ?? (state[FARM_IMAGE_SOURCE_TOKEN] = globalThis.crypto.randomUUID());
|
|
413
|
+
}
|
|
414
|
+
__name(getFarmImageSourceToken, "getFarmImageSourceToken");
|
|
415
|
+
function _withFarmImageSourceClientAddress(request, context) {
|
|
416
|
+
const token = globalThis[FARM_IMAGE_SOURCE_TOKEN];
|
|
417
|
+
if (!token || request.headers.get(FARM_IMAGE_SOURCE_HEADER) !== token) return context;
|
|
418
|
+
return { ...context, clientAddress: FARM_ANONYMOUS_CLIENT_ADDRESS };
|
|
419
|
+
}
|
|
420
|
+
__name(_withFarmImageSourceClientAddress, "_withFarmImageSourceClientAddress");
|
|
401
421
|
function resolveTrustedLocalOrigin(configured) {
|
|
402
422
|
const value = typeof configured === "function" ? configured() : configured;
|
|
403
423
|
if (!value) return void 0;
|
|
@@ -532,12 +552,23 @@ function validateTransformedResult(result, config) {
|
|
|
532
552
|
if (!contentType || contentType === "image/svg+xml" && !config.dangerouslyAllowSVG) {
|
|
533
553
|
throw new Error("The image transformer returned an unsupported content type");
|
|
534
554
|
}
|
|
555
|
+
if (detectImageContentType(result.body) !== contentType) {
|
|
556
|
+
throw new Error("The image transformer returned bytes that do not match their content type");
|
|
557
|
+
}
|
|
535
558
|
result.contentType = contentType;
|
|
536
559
|
}
|
|
537
560
|
__name(validateTransformedResult, "validateTransformedResult");
|
|
561
|
+
var OPTIMIZED_IMAGE_TYPES = /* @__PURE__ */ new Set([
|
|
562
|
+
"image/png",
|
|
563
|
+
"image/jpeg",
|
|
564
|
+
"image/gif",
|
|
565
|
+
"image/webp",
|
|
566
|
+
"image/avif",
|
|
567
|
+
"image/svg+xml"
|
|
568
|
+
]);
|
|
538
569
|
function normalizeImageContentType(value) {
|
|
539
570
|
const type = value?.split(";", 1)[0].trim().toLowerCase() ?? "";
|
|
540
|
-
return
|
|
571
|
+
return OPTIMIZED_IMAGE_TYPES.has(type) ? type : "";
|
|
541
572
|
}
|
|
542
573
|
__name(normalizeImageContentType, "normalizeImageContentType");
|
|
543
574
|
function matchesRemoteSource(url, config) {
|
|
@@ -570,7 +601,7 @@ function matchesHostname(hostname, pattern) {
|
|
|
570
601
|
return normalizedHostname === normalizedPattern;
|
|
571
602
|
}
|
|
572
603
|
__name(matchesHostname, "matchesHostname");
|
|
573
|
-
function createOptimizedImageResponse(request, image
|
|
604
|
+
function createOptimizedImageResponse(request, image) {
|
|
574
605
|
const headers = new Headers({
|
|
575
606
|
"cache-control": image.cacheControl,
|
|
576
607
|
"content-type": image.contentType,
|
|
@@ -578,11 +609,11 @@ function createOptimizedImageResponse(request, image, config) {
|
|
|
578
609
|
"content-disposition": "inline",
|
|
579
610
|
etag: image.etag,
|
|
580
611
|
vary: "Accept",
|
|
581
|
-
"x-content-type-options": "nosniff"
|
|
612
|
+
"x-content-type-options": "nosniff",
|
|
613
|
+
// Every optimized image, not only SVG: if a response is ever rendered as a
|
|
614
|
+
// document, it still cannot run script or load anything.
|
|
615
|
+
"content-security-policy": "default-src 'none'; sandbox"
|
|
582
616
|
});
|
|
583
|
-
if (image.contentType === "image/svg+xml" && config.dangerouslyAllowSVG) {
|
|
584
|
-
headers.set("content-security-policy", "default-src 'none'; sandbox");
|
|
585
|
-
}
|
|
586
617
|
if (matchesFarmIfNoneMatch(request.headers.get("if-none-match"), image.etag)) {
|
|
587
618
|
headers.delete("content-length");
|
|
588
619
|
return new Response(null, { status: 304, headers });
|
|
@@ -660,5 +691,6 @@ export {
|
|
|
660
691
|
createFarmImageHandler,
|
|
661
692
|
createCloudflareImageTransformer,
|
|
662
693
|
selectOutputFormat,
|
|
663
|
-
isPrivateImageAddress
|
|
694
|
+
isPrivateImageAddress,
|
|
695
|
+
_withFarmImageSourceClientAddress
|
|
664
696
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
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 _chunkH44XGLFUcjs = require('./chunk-H44XGLFU.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkALPWLT27cjs = require('./chunk-ALPWLT27.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkHLJ6MBUZcjs = require('./chunk-HLJ6MBUZ.cjs');
|
|
@@ -213,7 +213,7 @@ var _MiddlewareChainImpl = class _MiddlewareChainImpl {
|
|
|
213
213
|
*/
|
|
214
214
|
when(condition, fn) {
|
|
215
215
|
const conditionalMiddleware = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, async (ctx, next) => {
|
|
216
|
-
const shouldRun = typeof condition === "function" ?
|
|
216
|
+
const shouldRun = typeof condition === "function" ? _chunkALPWLT27cjs.matchesMiddlewarePredicate.call(void 0, condition, ctx) : condition;
|
|
217
217
|
if (!shouldRun) {
|
|
218
218
|
return next();
|
|
219
219
|
}
|
|
@@ -418,7 +418,7 @@ function farmMiddlewarePlugin(options = {}) {
|
|
|
418
418
|
mode: server.config.mode === "production" ? "production" : "development",
|
|
419
419
|
basePath: _nullishCoalesce(options.basePath, () => ( "/"))
|
|
420
420
|
});
|
|
421
|
-
manager = new (0,
|
|
421
|
+
manager = new (0, _chunkH44XGLFUcjs.MiddlewareManager)(
|
|
422
422
|
getMiddlewareAppDirectory(server.config.root, srcDir),
|
|
423
423
|
server,
|
|
424
424
|
options.middleware,
|