@farm.js/core 0.1.66 → 0.1.68
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-handler-QLFDDTYN.mjs → agent-mcp-handler-AZ7QW4UP.mjs} +5 -5
- package/dist/{agent-mcp-handler-OXT73ZBY.cjs → agent-mcp-handler-FER4MQDF.cjs} +6 -6
- package/dist/{agent-mcp.d-QD2WZ9BS.d.ts → agent-mcp.d-Uh5xr7aX.d.ts} +1 -1
- package/dist/{agent-mcp.d-CO_ABmNK.d.mts → agent-mcp.d-wkVPK1GA.d.mts} +1 -1
- package/dist/agent-runtime.cjs +6 -5
- package/dist/agent-runtime.d.mts +10 -8
- package/dist/agent-runtime.d.ts +10 -8
- package/dist/agent-runtime.mjs +5 -4
- package/dist/{analyzer-4UFP4HVP.mjs → analyzer-CQDU7E3Y.mjs} +2 -2
- package/dist/analyzer-PPAHM4AW.cjs +16 -0
- package/dist/api/client.cjs +12 -2
- package/dist/api/client.d.mts +4 -4
- package/dist/api/client.d.ts +4 -4
- package/dist/api/client.mjs +12 -2
- package/dist/api/client.native.cjs +12 -2
- package/dist/api/client.native.d.mts +5 -5
- package/dist/api/client.native.d.ts +5 -5
- package/dist/api/client.native.mjs +12 -2
- package/dist/api/node.cjs +223 -0
- package/dist/api/node.d.mts +61 -0
- package/dist/api/node.d.ts +61 -0
- package/dist/api/node.mjs +223 -0
- package/dist/api/route-manager.cjs +11 -11
- package/dist/api/route-manager.d.mts +14 -11
- package/dist/api/route-manager.d.ts +14 -11
- package/dist/api/route-manager.mjs +10 -10
- package/dist/api/runtime.cjs +11 -7
- package/dist/api/runtime.d.mts +11 -9
- package/dist/api/runtime.d.ts +11 -9
- package/dist/api/runtime.mjs +10 -6
- package/dist/{api-client.d-BNLXNCXJ.d.mts → api-client.d-Bp35zMqR.d.mts} +1 -1
- package/dist/{api-client.d-ddQBNGtu.d.ts → api-client.d-CFI_xL0V.d.ts} +1 -1
- package/dist/api.cjs +17 -13
- package/dist/api.d.mts +15 -12
- package/dist/api.d.ts +15 -12
- package/dist/api.mjs +16 -12
- package/dist/{app-manifest.d-DDmNkYQQ.d.ts → app-manifest.d-BT5i2F-o.d.ts} +1 -1
- package/dist/{app-manifest.d-BpKxiU_E.d.mts → app-manifest.d-Dd4q5CFx.d.mts} +1 -1
- package/dist/app-markdown.cjs +5 -5
- package/dist/app-markdown.d.mts +15 -15
- package/dist/app-markdown.d.ts +15 -15
- package/dist/app-markdown.mjs +4 -4
- package/dist/{app.d-x68Cwr0_.d.ts → app.d-BVOpL_f2.d.ts} +52 -11
- package/dist/{app.d-kuoVWhWM.d.mts → app.d-BhiDXex_.d.mts} +52 -11
- package/dist/{chunk-RY4ABNPE.cjs → chunk-225APHKC.cjs} +3 -3
- package/dist/{chunk-JGAE5XPL.cjs → chunk-23VJEGKC.cjs} +4 -2
- package/dist/{chunk-5C7XMKQ4.cjs → chunk-2AFW7673.cjs} +6 -1
- package/dist/{chunk-SYW346ZN.cjs → chunk-2LHZD3OP.cjs} +1 -21
- package/dist/{chunk-ZZI56IUY.mjs → chunk-2ZOYOYEE.mjs} +13 -13
- package/dist/{chunk-7XGWBPQQ.cjs → chunk-3EEINK7G.cjs} +24 -10
- package/dist/{chunk-BRWIVOV4.cjs → chunk-3GNHJ3RN.cjs} +10 -8
- package/dist/{chunk-HCGWDRZO.mjs → chunk-3Y52TWYU.mjs} +18 -7
- package/dist/{chunk-CBOEJ5Z4.cjs → chunk-437QZIC2.cjs} +133 -46
- package/dist/{chunk-O6L3YYPM.cjs → chunk-4E57QHPW.cjs} +8 -16
- package/dist/{chunk-WKPBIT5Q.cjs → chunk-4HGLJOXZ.cjs} +6 -6
- package/dist/{chunk-CJNAUEVC.mjs → chunk-4QENVMG7.mjs} +1 -1
- package/dist/{chunk-EMNKZGF4.mjs → chunk-4UAQB5LB.mjs} +556 -462
- package/dist/{chunk-BQWBHWEW.mjs → chunk-4ZXKYCYK.mjs} +1 -1
- package/dist/{chunk-N35YPV4N.mjs → chunk-57QAQU4F.mjs} +9 -7
- package/dist/{chunk-ZEXE4TGY.mjs → chunk-5FBZJJGA.mjs} +247 -110
- package/dist/{chunk-4OSOLDPL.cjs → chunk-5JKDFRTK.cjs} +2 -2
- package/dist/{chunk-OLIGNTWU.cjs → chunk-5NFQ6AZI.cjs} +7 -7
- package/dist/{chunk-6HRAK7I5.mjs → chunk-5OFNUETM.mjs} +8 -2
- package/dist/{chunk-RD623KW4.cjs → chunk-67MZTLTF.cjs} +21 -3
- package/dist/chunk-6I4BFRE7.cjs +51 -0
- package/dist/{chunk-UBMHQVWN.mjs → chunk-6OFOIMNS.mjs} +1 -1
- package/dist/{chunk-K5EW7GUU.mjs → chunk-7BIW7VCW.mjs} +13 -5
- package/dist/{chunk-CHYTADNK.cjs → chunk-7LK5CTUM.cjs} +70 -53
- package/dist/{chunk-HPP2II4Z.mjs → chunk-7PJARAQQ.mjs} +1 -1
- package/dist/{chunk-LEJDW34D.cjs → chunk-7PPLTD3P.cjs} +3 -3
- package/dist/{chunk-BYRZ5VTH.mjs → chunk-A3T445WK.mjs} +47 -34
- package/dist/{chunk-TGULJSHD.mjs → chunk-AJNBTOVQ.mjs} +20 -9
- package/dist/{chunk-FBEBSAVI.cjs → chunk-AKIQ54FK.cjs} +82 -63
- package/dist/{chunk-2NGZFOKG.mjs → chunk-AOIUYHPH.mjs} +2 -2
- package/dist/{chunk-NKRZLQUK.mjs → chunk-AQIO3RNL.mjs} +1 -1
- package/dist/chunk-AQIRXBBY.cjs +26 -0
- package/dist/{chunk-DQJ2CIH7.cjs → chunk-ASYOWPSR.cjs} +2 -1
- package/dist/chunk-AZ6IW6SF.mjs +28 -0
- package/dist/{chunk-QMDU6QHN.mjs → chunk-B6RBJJ5G.mjs} +1 -1
- package/dist/{chunk-I32V5CZL.cjs → chunk-BDYM2TN3.cjs} +28 -17
- package/dist/{chunk-JLDNXURZ.cjs → chunk-BZWTBELF.cjs} +32 -32
- package/dist/{chunk-ITV4QQL2.cjs → chunk-C6CUUBY5.cjs} +14 -3
- package/dist/{chunk-QGJ4FI2G.mjs → chunk-C6HGUTXB.mjs} +113 -29
- package/dist/{chunk-YN6BHOYY.cjs → chunk-CL52PD6D.cjs} +10 -3
- package/dist/{chunk-VQJHT2ND.mjs → chunk-CRVSYDHV.mjs} +2 -2
- package/dist/{chunk-XURDCXNH.cjs → chunk-CSLHNBPS.cjs} +6 -6
- package/dist/{chunk-XQSYOVCW.cjs → chunk-DBYNZIIQ.cjs} +13 -5
- package/dist/{chunk-AZUUKA66.mjs → chunk-DIXFKAPM.mjs} +1251 -389
- package/dist/{chunk-QTD6EMN2.mjs → chunk-DQ2DI3Y7.mjs} +11 -4
- package/dist/{chunk-NHQM2Q4I.cjs → chunk-DWLNLU55.cjs} +2 -2
- package/dist/chunk-DXZ57EPE.mjs +375 -0
- package/dist/{chunk-SA7MLSP4.mjs → chunk-E3HDJCWF.mjs} +3 -3
- package/dist/{chunk-52Y3C3HG.mjs → chunk-E7VF3LQ5.mjs} +3 -2
- package/dist/{chunk-752XUZIM.cjs → chunk-EGIY4A7V.cjs} +6 -6
- package/dist/chunk-EIVGPQN5.mjs +51 -0
- package/dist/{chunk-KPAJWD3N.mjs → chunk-EYPSKXO4.mjs} +1 -1
- package/dist/{chunk-E4UDLFWR.cjs → chunk-F36LS2C7.cjs} +796 -702
- package/dist/{chunk-MPIGW42F.mjs → chunk-F6CMGWAL.mjs} +1 -1
- package/dist/{chunk-GL7N5UHF.cjs → chunk-FJMC24KG.cjs} +21 -10
- package/dist/{chunk-QISW423S.cjs → chunk-FPBOAG6N.cjs} +2 -2
- package/dist/{chunk-3CCAICF7.cjs → chunk-FSODPZRT.cjs} +5 -5
- package/dist/{chunk-2C5L5RPM.cjs → chunk-FT6KJHS3.cjs} +71 -38
- package/dist/{chunk-WMTBBQHY.cjs → chunk-FVYBEMOD.cjs} +288 -151
- package/dist/{chunk-BM2LH2JM.mjs → chunk-G7NBPP7H.mjs} +14 -13
- package/dist/{chunk-ES2LD2YD.mjs → chunk-GCRT6GJG.mjs} +18 -0
- package/dist/{chunk-5OJVKXFV.cjs → chunk-GDM3ZD2O.cjs} +10 -8
- package/dist/{chunk-25T5VXOE.mjs → chunk-GFPS7MNE.mjs} +106 -19
- package/dist/{chunk-EMDGXYUD.mjs → chunk-GJ7QVFAG.mjs} +16 -7
- package/dist/{chunk-TGSEVBPO.mjs → chunk-GJEC5S4V.mjs} +11 -0
- package/dist/{chunk-HNAISJFD.cjs → chunk-HDPT6OYE.cjs} +9 -3
- package/dist/{chunk-RVGSVQWT.mjs → chunk-HEJM46HQ.mjs} +21 -7
- package/dist/chunk-HHLEYA4B.cjs +17 -0
- package/dist/{chunk-ZNH6NR3H.cjs → chunk-HJZZSBVK.cjs} +2 -2
- package/dist/{chunk-E552H232.cjs → chunk-I7J5RLGO.cjs} +16 -2
- package/dist/chunk-ICFPTHXM.mjs +97 -0
- package/dist/{chunk-K7OZAVOI.mjs → chunk-IFR74W6S.mjs} +46 -13
- package/dist/{chunk-MPJEIHW2.cjs → chunk-IGDYL2IA.cjs} +2 -2
- package/dist/{chunk-5A77OEIG.cjs → chunk-IHTDLCDJ.cjs} +5 -5
- package/dist/{chunk-OYZXVBZP.cjs → chunk-IUKBPBM7.cjs} +2 -1
- package/dist/chunk-J6TZRYCO.cjs +22 -0
- package/dist/{chunk-E4RDMG3K.mjs → chunk-JL2YW5KX.mjs} +5 -4
- package/dist/chunk-JSOCDYER.cjs +375 -0
- package/dist/{chunk-UPYIFH2H.cjs → chunk-JWLRBDDC.cjs} +2 -2
- package/dist/{chunk-OLGQZRW6.mjs → chunk-JZBU7V4D.mjs} +37 -17
- package/dist/{chunk-ONG4RDW3.mjs → chunk-JZGL2PIH.mjs} +13 -3
- package/dist/chunk-K63OWRY2.mjs +22 -0
- package/dist/{chunk-TUPKMMXT.mjs → chunk-K6HIIWUB.mjs} +1 -1
- package/dist/{chunk-MESQF2JC.mjs → chunk-K6SXMVXO.mjs} +2 -2
- package/dist/{chunk-L2JG337G.cjs → chunk-K6VFYFOY.cjs} +33 -31
- package/dist/{chunk-TKK5QHKZ.mjs → chunk-KDO6T6OB.mjs} +3 -3
- package/dist/{chunk-EZ34EHQP.mjs → chunk-KI3MU7B5.mjs} +1 -1
- package/dist/{chunk-GHNW564E.mjs → chunk-KSZK34HU.mjs} +30 -10
- package/dist/{chunk-IT6WRNGB.cjs → chunk-KWCZKJYU.cjs} +1541 -679
- package/dist/{chunk-DVKH2RVN.cjs → chunk-LDEXTX4I.cjs} +70 -57
- package/dist/{chunk-ECKQFEX2.mjs → chunk-LENKRGBV.mjs} +8 -6
- package/dist/{chunk-XBSKPLHF.cjs → chunk-LR4KP3I7.cjs} +2 -2
- package/dist/{chunk-HEPJIKKQ.cjs → chunk-MCSRMEQV.cjs} +2 -2
- package/dist/{chunk-DQF3QLOH.mjs → chunk-ME7RVELR.mjs} +3 -2
- package/dist/{chunk-VFXE6NWR.mjs → chunk-MGKWYPE3.mjs} +2 -1
- package/dist/{chunk-TZVUF5JJ.mjs → chunk-MGZVDX4R.mjs} +5 -5
- package/dist/{chunk-MGKW5XZE.cjs → chunk-MMDKYJ5V.cjs} +7 -7
- package/dist/{chunk-SK7QSNWE.mjs → chunk-MNJDNTGO.mjs} +1 -1
- package/dist/{chunk-5Y2P454O.cjs → chunk-MTBDJ326.cjs} +6 -5
- package/dist/{chunk-FIR62CR3.mjs → chunk-MV7NWU23.mjs} +1 -1
- package/dist/{chunk-7ONGIFYX.cjs → chunk-MZ4CRSY7.cjs} +481 -171
- package/dist/{chunk-O4F3JUST.mjs → chunk-NDDRTFN4.mjs} +4 -0
- package/dist/{chunk-4IHMHFQB.cjs → chunk-NG2EZ6QS.cjs} +28 -1
- package/dist/{chunk-XBSLKXBL.mjs → chunk-NT4W4H52.mjs} +52 -35
- package/dist/{chunk-UAQD67HM.mjs → chunk-NVOMQLI2.mjs} +16 -2
- package/dist/{chunk-R62SF5R4.mjs → chunk-OB45EAQL.mjs} +6 -1
- package/dist/{chunk-V56632LA.cjs → chunk-OCNV4CI2.cjs} +39 -6
- package/dist/{chunk-SYXPWJ7N.cjs → chunk-OFBLGH6V.cjs} +17 -18
- package/dist/{chunk-VQ4NWOWO.mjs → chunk-OGVTUGMU.mjs} +5 -13
- package/dist/{chunk-3UZVPO72.mjs → chunk-OIOPQ25L.mjs} +6 -7
- package/dist/{chunk-2XGBJSDV.cjs → chunk-OO7DYIJD.cjs} +73 -24
- package/dist/{chunk-27FPUFWR.mjs → chunk-P2NBQ5JI.mjs} +1 -1
- package/dist/{chunk-HZPKJRYA.cjs → chunk-PDFFYZAT.cjs} +2 -2
- package/dist/{chunk-GSVJ3IIF.cjs → chunk-PHCJJJZV.cjs} +2 -2
- package/dist/{chunk-EVMXPJCB.mjs → chunk-PKMUQ7LM.mjs} +2 -1
- package/dist/{chunk-OAJOQU5J.mjs → chunk-PLJKJJ2H.mjs} +82 -63
- package/dist/{chunk-72KCTHLV.cjs → chunk-PRL7FXG4.cjs} +113 -29
- package/dist/{chunk-6XQSPIN6.cjs → chunk-PWKAX5MS.cjs} +13 -3
- package/dist/{chunk-4ZJ5C7UJ.cjs → chunk-QIXEU2WV.cjs} +19 -10
- package/dist/{chunk-FJWN7RV4.cjs → chunk-QO43L7Z4.cjs} +38 -8
- package/dist/{chunk-X4K7TYN6.cjs → chunk-QOGIZKSO.cjs} +26 -25
- package/dist/{chunk-CNNBFGL5.cjs → chunk-QSUYB3RH.cjs} +14 -14
- package/dist/chunk-QYNZ3CTI.mjs +17 -0
- package/dist/{chunk-X3XUZWRB.mjs → chunk-R2ZHU37O.mjs} +36 -3
- package/dist/{chunk-ZIHWAN55.cjs → chunk-RE5E2G5S.cjs} +1 -1
- package/dist/{chunk-O75GQVUK.mjs → chunk-RLH5AH2M.mjs} +1 -1
- package/dist/chunk-RWR7SMD7.cjs +50 -0
- package/dist/{chunk-7PTISZSQ.cjs → chunk-S7MWSFFP.cjs} +4 -0
- package/dist/chunk-SD6JGJOM.mjs +50 -0
- package/dist/{chunk-7H4SVNC4.cjs → chunk-SPP3EZTJ.cjs} +46 -26
- package/dist/{chunk-BIF5MLTH.cjs → chunk-SQ6IWJ3H.cjs} +1 -1
- package/dist/{chunk-WVYRLP5E.mjs → chunk-T5XFZQCL.mjs} +1 -1
- package/dist/{chunk-WAY6LOQH.mjs → chunk-TEJ67GD2.mjs} +1 -1
- package/dist/{chunk-OP7LHY4Y.cjs → chunk-TNK2TVRS.cjs} +2005 -800
- package/dist/{chunk-IFTGERT3.mjs → chunk-TTXIITYA.mjs} +49 -0
- package/dist/{chunk-ZFWYCVKS.mjs → chunk-TY5KCYDE.mjs} +22 -4
- package/dist/{chunk-WYAXRIYP.cjs → chunk-UKZ6AWKZ.cjs} +10 -9
- package/dist/{chunk-UJ3R2AH2.cjs → chunk-UPOYKX4S.cjs} +5 -5
- package/dist/{chunk-VBCQ5WOI.cjs → chunk-URN7VFO7.cjs} +105 -16
- package/dist/{chunk-2DLGV2ZG.mjs → chunk-UTUS6JUH.mjs} +1 -21
- package/dist/{chunk-435QJNC2.mjs → chunk-VFNAK6A5.mjs} +4 -4
- package/dist/{chunk-WFWFECDW.mjs → chunk-VRGY3X2I.mjs} +100 -11
- package/dist/{chunk-LQNW3ABP.cjs → chunk-VX2HZGC7.cjs} +14 -14
- package/dist/chunk-W44X6IC2.cjs +97 -0
- package/dist/{chunk-A2MN5PQJ.mjs → chunk-WMLSZAKN.mjs} +9 -9
- package/dist/{chunk-672ISQIG.mjs → chunk-WPB67LE5.mjs} +379 -69
- package/dist/{chunk-3EEET2Q5.cjs → chunk-WUTFJOV7.cjs} +32 -12
- package/dist/chunk-WVQNXXNE.cjs +28 -0
- package/dist/{chunk-Y5TOT5F6.cjs → chunk-X3MHKLCO.cjs} +5 -5
- package/dist/{chunk-W2ZXMMHA.mjs → chunk-XCAQTCGK.mjs} +1 -1
- package/dist/{chunk-Z7P2BTZ3.cjs → chunk-XGTFLG73.cjs} +30 -12
- package/dist/{chunk-XCXHQBMM.mjs → chunk-Y2LU4LE5.mjs} +1 -1
- package/dist/{chunk-5J45H65F.mjs → chunk-Y5LEPEVH.mjs} +1 -1
- package/dist/{chunk-D4MRNBVF.cjs → chunk-Y6KHPJDB.cjs} +2 -2
- package/dist/{chunk-BT4SEFLC.cjs → chunk-YAEN3L2F.cjs} +3 -2
- package/dist/chunk-YFTGIHNC.mjs +26 -0
- package/dist/{chunk-KL7SHLQB.mjs → chunk-YGJ5P3TJ.mjs} +31 -1
- package/dist/{chunk-752IHQTD.cjs → chunk-YTNBCXCW.cjs} +12 -12
- package/dist/{chunk-RFKTJTWZ.mjs → chunk-YVPX5PI5.mjs} +3 -1
- package/dist/{chunk-4TVPYN32.cjs → chunk-Z3PW3DIR.cjs} +7 -7
- package/dist/{chunk-OB7VKCUZ.mjs → chunk-Z6SOXHAD.mjs} +1851 -646
- package/dist/{chunk-72KABRWN.mjs → chunk-ZJGFAW5U.mjs} +5 -3
- package/dist/{chunk-TNBJ4LZG.mjs → chunk-ZPKJPM7K.mjs} +4 -4
- package/dist/{chunk-5FE5YT2N.mjs → chunk-ZZGQD3LL.mjs} +28 -1
- package/dist/client/lifecycle.cjs +2 -2
- package/dist/client/lifecycle.d.mts +1 -1
- package/dist/client/lifecycle.d.ts +1 -1
- package/dist/client/lifecycle.mjs +1 -1
- package/dist/{client-component.d-D74pqdea.d.mts → client-component.d-BvQOxSqh.d.mts} +2 -2
- package/dist/{client-component.d-D8VcypQA.d.ts → client-component.d-DNVSLEPi.d.ts} +2 -2
- package/dist/client-plugins.cjs +2 -2
- package/dist/{client-plugins.d-D4-6hNx7.d.mts → client-plugins.d-CE1lVK2R.d.mts} +116 -373
- package/dist/{client-plugins.d-CXElzotB.d.ts → client-plugins.d-CNDqcAuf.d.ts} +116 -373
- package/dist/client-plugins.d.mts +10 -8
- package/dist/client-plugins.d.ts +10 -8
- package/dist/client-plugins.mjs +1 -1
- package/dist/client.cjs +11 -9
- package/dist/client.d.mts +17 -15
- package/dist/client.d.ts +17 -15
- package/dist/client.mjs +10 -8
- package/dist/{config.d-qt-mE8O5.d.mts → config.d-BKIhJtmr.d.mts} +7 -2
- package/dist/{config.d-qt-mE8O5.d.ts → config.d-BKIhJtmr.d.ts} +7 -2
- package/dist/config.d.mts +10 -8
- package/dist/config.d.ts +10 -8
- package/dist/cron.cjs +2 -2
- package/dist/cron.mjs +1 -1
- package/dist/deferred.cjs +2 -2
- package/dist/deferred.mjs +1 -1
- package/dist/deployment.cjs +4 -2
- package/dist/deployment.d.mts +15 -1
- package/dist/deployment.d.ts +15 -1
- package/dist/deployment.mjs +3 -1
- package/dist/desktop.d.mts +11 -9
- package/dist/desktop.d.ts +11 -9
- package/dist/{devtools-NZUVNUP3.mjs → devtools-2A2GPC7B.mjs} +33 -29
- package/dist/{devtools-N2JQCMXB.cjs → devtools-R27T3BRY.cjs} +38 -34
- package/dist/docs.cjs +28 -27
- package/dist/docs.d.mts +24 -10
- package/dist/docs.d.ts +24 -10
- package/dist/docs.mjs +27 -26
- package/dist/env-types.cjs +3 -3
- package/dist/env-types.mjs +2 -2
- package/dist/environment/vite.cjs +7 -7
- package/dist/environment/vite.d.mts +1 -1
- package/dist/environment/vite.d.ts +1 -1
- package/dist/environment/vite.mjs +6 -6
- package/dist/{generate-route-types.d-BL2pq6xC.d.ts → generate-route-types.d-B76M5R11.d.ts} +1 -1
- package/dist/{generate-route-types.d-BoVDU8qX.d.mts → generate-route-types.d-CaGMIaNI.d.mts} +1 -1
- package/dist/headers.cjs +3 -3
- package/dist/headers.mjs +2 -2
- package/dist/image/server.d.mts +1 -1
- package/dist/image/server.d.ts +1 -1
- package/dist/image/sharp.d.mts +1 -1
- package/dist/image/sharp.d.ts +1 -1
- package/dist/{image-config.d-CeDgNyX4.d.mts → image-config.d-ByhQ0TT7.d.mts} +3 -1
- package/dist/{image-config.d-CeDgNyX4.d.ts → image-config.d-ByhQ0TT7.d.ts} +3 -1
- package/dist/image.cjs +6 -6
- package/dist/image.d.mts +1 -1
- package/dist/image.d.ts +1 -1
- package/dist/image.mjs +1 -1
- package/dist/index.cjs +148 -128
- package/dist/{index.d-SSgYDv4D.d.mts → index.d-Bt3kl19W.d.mts} +1 -1
- package/dist/{index.d-A_x10zGS.d.ts → index.d-Cx_-DaKV.d.ts} +1 -1
- package/dist/index.d.mts +39 -87
- package/dist/index.d.ts +39 -87
- package/dist/index.mjs +224 -204
- package/dist/instrumentation.cjs +3 -3
- package/dist/instrumentation.mjs +2 -2
- package/dist/{integration-orm-52GPGTHO.cjs → integrations/orm.cjs} +5 -5
- package/dist/integrations/orm.d.mts +35 -0
- package/dist/integrations/orm.d.ts +35 -0
- package/dist/{integration-orm-CO23MSFE.mjs → integrations/orm.mjs} +5 -5
- package/dist/integrations.cjs +6 -5
- package/dist/integrations.d.mts +10 -8
- package/dist/integrations.d.ts +10 -8
- package/dist/integrations.mjs +5 -4
- package/dist/internal/app-markdown-runtime.cjs +4 -4
- package/dist/internal/app-markdown-runtime.d.mts +27 -11
- package/dist/internal/app-markdown-runtime.d.ts +27 -11
- package/dist/internal/app-markdown-runtime.mjs +3 -3
- package/dist/internal/build-runtime.cjs +76 -71
- package/dist/internal/build-runtime.d.mts +12 -10
- package/dist/internal/build-runtime.d.ts +12 -10
- package/dist/internal/build-runtime.mjs +75 -70
- package/dist/internal/cli-runtime.cjs +47 -46
- package/dist/internal/cli-runtime.mjs +46 -45
- package/dist/internal/client-error-overlay.cjs +6 -6
- package/dist/internal/client-error-overlay.mjs +2 -2
- package/dist/internal/client-runtime.cjs +85 -36
- package/dist/internal/client-runtime.d.mts +44 -13
- package/dist/internal/client-runtime.d.ts +44 -13
- package/dist/internal/client-runtime.mjs +79 -30
- package/dist/internal/compression-runtime.d.mts +10 -8
- package/dist/internal/compression-runtime.d.ts +10 -8
- package/dist/internal/config-runtime.cjs +27 -26
- package/dist/internal/config-runtime.d.mts +14 -12
- package/dist/internal/config-runtime.d.ts +14 -12
- package/dist/internal/config-runtime.mjs +26 -25
- package/dist/internal/docs-precompiled-runtime.cjs +16 -5
- package/dist/internal/docs-precompiled-runtime.d.mts +7 -0
- package/dist/internal/docs-precompiled-runtime.d.ts +7 -0
- package/dist/internal/docs-precompiled-runtime.mjs +15 -4
- package/dist/internal/form-actions.cjs +7 -2
- package/dist/internal/form-actions.d.mts +10 -3
- package/dist/internal/form-actions.d.ts +10 -3
- package/dist/internal/form-actions.mjs +8 -3
- package/dist/internal/infra-analytics-runtime.cjs +11 -11
- package/dist/internal/infra-analytics-runtime.mjs +9 -9
- package/dist/internal/islands-boot.cjs +6 -1
- package/dist/internal/islands-boot.mjs +6 -1
- package/dist/internal/islands-runtime.cjs +33 -4
- package/dist/internal/islands-runtime.d.mts +1 -1
- package/dist/internal/islands-runtime.d.ts +1 -1
- package/dist/internal/islands-runtime.mjs +31 -2
- package/dist/internal/native-server-fns.cjs +5 -5
- package/dist/internal/native-server-fns.mjs +4 -4
- package/dist/internal/product-telemetry-runtime.cjs +3 -3
- package/dist/internal/product-telemetry-runtime.mjs +2 -2
- package/dist/internal/production-node-env.cjs +4 -2
- package/dist/internal/production-node-env.d.mts +22 -1
- package/dist/internal/production-node-env.d.ts +22 -1
- package/dist/internal/production-node-env.mjs +3 -1
- package/dist/internal/production-runtime.cjs +57 -39
- package/dist/internal/production-runtime.d.mts +27 -21
- package/dist/internal/production-runtime.d.ts +27 -21
- package/dist/internal/production-runtime.mjs +72 -54
- package/dist/internal/react-cache.cjs +3 -3
- package/dist/internal/react-cache.mjs +1 -1
- package/dist/internal/server-tree.cjs +2 -2
- package/dist/internal/server-tree.d.mts +0 -5
- package/dist/internal/server-tree.d.ts +0 -5
- package/dist/internal/server-tree.mjs +1 -1
- package/dist/internal/vercel-edge-middleware.cjs +87 -0
- package/dist/internal/vercel-edge-middleware.d.mts +39 -0
- package/dist/internal/vercel-edge-middleware.d.ts +39 -0
- package/dist/internal/vercel-edge-middleware.mjs +87 -0
- package/dist/layers-7P4RLKVX.cjs +20 -0
- package/dist/{layers-T55SA47E.mjs → layers-XQ7VFMWO.mjs} +4 -2
- package/dist/{layers.d-CcS42OGR.d.mts → layers.d-CH0bC4QL.d.mts} +2 -1
- package/dist/{layers.d-CcS42OGR.d.ts → layers.d-CH0bC4QL.d.ts} +2 -1
- package/dist/{lifecycle.d-C2aLBOwu.d.ts → lifecycle.d-keQs5Swc.d.mts} +7 -1
- package/dist/{lifecycle.d-C2aLBOwu.d.mts → lifecycle.d-keQs5Swc.d.ts} +7 -1
- package/dist/{manager-H5ZM3HAM.mjs → manager-JIA66YJ2.mjs} +4 -3
- package/dist/manager-JOHU6BQI.cjs +15 -0
- package/dist/markdown.cjs +7 -3
- package/dist/markdown.d.mts +10 -8
- package/dist/markdown.d.ts +10 -8
- package/dist/markdown.mjs +6 -2
- package/dist/middleware.cjs +11 -11
- package/dist/middleware.d.mts +13 -10
- package/dist/middleware.d.ts +13 -10
- package/dist/middleware.mjs +13 -13
- package/dist/mobile.d.mts +6 -6
- package/dist/mobile.d.ts +6 -6
- package/dist/mount.d-Bki4pOaJ.d.mts +38 -0
- package/dist/mount.d-DjR5aerM.d.ts +38 -0
- package/dist/{native-server-fn-handler-GLRHAYWV.mjs → native-server-fn-handler-EP5AFJYE.mjs} +5 -5
- package/dist/{native-server-fn-handler-J5MYRXN6.cjs → native-server-fn-handler-QRTXGZA4.cjs} +6 -6
- package/dist/{native-tree-7LPH57Z4.cjs → native-tree-W2SSJB3Y.cjs} +4 -4
- package/dist/{native-tree-VV6WN3GX.mjs → native-tree-Y5YQANW7.mjs} +3 -3
- package/dist/{navigation-delegate.d-GghbHJuK.d.ts → navigation-delegate.d-CtghaSP3.d.ts} +1 -1
- package/dist/{navigation-delegate.d-DQVYKoaZ.d.mts → navigation-delegate.d-VDkziXTK.d.mts} +1 -1
- package/dist/navigation.cjs +8 -7
- package/dist/navigation.d.mts +13 -11
- package/dist/navigation.d.ts +13 -11
- package/dist/navigation.mjs +7 -6
- package/dist/{nitro-DD4QCA66.mjs → nitro-NSTXT7LB.mjs} +11 -11
- package/dist/{nitro-VRDX2H4M.cjs → nitro-Y3LGITW3.cjs} +13 -13
- package/dist/node-module-bundle-LIZ2KMVW.cjs +13 -0
- package/dist/node-module-bundle-VR6NV6AI.mjs +13 -0
- package/dist/{plugin-53SY5YBS.mjs → plugin-SAS22JL7.mjs} +4 -3
- package/dist/{plugin-HZIBL3DW.cjs → plugin-WIU4GDD4.cjs} +5 -4
- package/dist/plugin.cjs +65 -63
- package/dist/plugin.d.mts +12 -10
- package/dist/plugin.d.ts +12 -10
- package/dist/plugin.mjs +64 -62
- package/dist/{production-runtime.d-Bzns3NW9.d.ts → production-runtime.d-BMyyLGBB.d.ts} +3 -57
- package/dist/{production-runtime.d-DiFa5vHW.d.mts → production-runtime.d-DMZY3OgV.d.mts} +3 -57
- package/dist/query/client.cjs +9 -7
- package/dist/query/client.mjs +5 -3
- package/dist/{render-plan.d-CcF0MeCf.d.mts → render-plan.d-BSwV8PE4.d.mts} +1 -1
- package/dist/{render-plan.d-CL_Ikfg_.d.ts → render-plan.d-i9sI4tc9.d.ts} +1 -1
- package/dist/renderer/none/server.cjs +35 -0
- package/dist/renderer/none/server.d.mts +21 -0
- package/dist/renderer/none/server.d.ts +21 -0
- package/dist/renderer/none/server.mjs +35 -0
- package/dist/renderer/react/server.cjs +3 -3
- package/dist/renderer/react/server.mjs +3 -3
- package/dist/renderer-client.cjs +8 -6
- package/dist/renderer-client.d.mts +13 -11
- package/dist/renderer-client.d.ts +13 -11
- package/dist/renderer-client.mjs +5 -3
- package/dist/renderer.cjs +6 -2
- package/dist/renderer.d.mts +25 -2
- package/dist/renderer.d.ts +25 -2
- package/dist/renderer.mjs +5 -1
- package/dist/request.cjs +2 -2
- package/dist/{request.d-DarDOCk9.d.mts → request.d-C24FNQ_7.d.mts} +1 -1
- package/dist/{request.d-B1RnTLri.d.ts → request.d-Dgln8tuI.d.ts} +1 -1
- package/dist/request.d.mts +11 -9
- package/dist/request.d.ts +11 -9
- package/dist/request.mjs +1 -1
- package/dist/{route-rendering.d-BTUYCIj4.d.ts → route-rendering.d-CUylZKJA.d.ts} +1 -1
- package/dist/{route-rendering.d-D_2Ual0-.d.mts → route-rendering.d-Ds0BfwQi.d.mts} +1 -1
- package/dist/{route.d-BaVH3V0w.d.mts → route.d-DrXkpvcg.d.mts} +1 -1
- package/dist/{route.d-DBTEqifW.d.ts → route.d-hs-_cyHn.d.ts} +1 -1
- package/dist/{router.d-CMANF6da.d.ts → router.d-B56rMOFm.d.ts} +1 -1
- package/dist/{router.d-Cuv1jntg.d.mts → router.d-CFPcbqzc.d.mts} +1 -1
- package/dist/routes.cjs +3 -3
- package/dist/{routes.d-B6yFe6jm.d.ts → routes.d-9GFFNioh.d.ts} +2 -2
- package/dist/{routes.d-c2HKfrfL.d.mts → routes.d-CrEy0lJS.d.mts} +2 -2
- package/dist/routes.d.mts +10 -8
- package/dist/routes.d.ts +10 -8
- package/dist/routes.mjs +2 -2
- package/dist/{rsc-pipeline-Z7QBZOIJ.cjs → rsc-pipeline-3T7V6OUT.cjs} +30 -28
- package/dist/{rsc-pipeline-7PNVJSTR.mjs → rsc-pipeline-GA4AQWZI.mjs} +29 -27
- package/dist/{runtime-FKFCUHSK.cjs → runtime-REUTNTI5.cjs} +72 -46
- package/dist/{runtime-QQHX4BP3.mjs → runtime-ZYCKKY7L.mjs} +60 -34
- package/dist/{runtime.d-wvh4ngU0.d.mts → runtime.d-DLRO-ExG.d.mts} +11 -3
- package/dist/{runtime.d-C3RQUj6_.d.ts → runtime.d-H7k9hOQE.d.ts} +11 -3
- package/dist/{schema-dev-notice-JMXEQWIQ.mjs → schema-dev-notice-C2JINRZI.mjs} +3 -2
- package/dist/{schema-dev-notice-PLBFDTOF.cjs → schema-dev-notice-X7GG7QVB.cjs} +5 -4
- package/dist/schema.cjs +6 -2
- package/dist/schema.d-Dny9pnrm.d.mts +298 -0
- package/dist/schema.d-Dny9pnrm.d.ts +298 -0
- package/dist/schema.d.mts +1 -115
- package/dist/schema.d.ts +1 -115
- package/dist/schema.mjs +5 -1
- package/dist/server-fn-client.d.mts +2 -2
- package/dist/server-fn-client.d.ts +2 -2
- package/dist/server-fn.cjs +5 -5
- package/dist/server-fn.mjs +4 -4
- package/dist/server-http.d-rAe7lAQc.d.mts +70 -0
- package/dist/server-http.d-rAe7lAQc.d.ts +70 -0
- package/dist/server-plugins.cjs +7 -7
- package/dist/server-plugins.d.mts +20 -12
- package/dist/server-plugins.d.ts +20 -12
- package/dist/server-plugins.mjs +8 -8
- package/dist/server-query.cjs +6 -6
- package/dist/server-query.mjs +5 -5
- package/dist/server.cjs +168 -126
- package/dist/server.d-C5FFrZAo.d.ts +57 -0
- package/dist/server.d-DgC8xew5.d.mts +57 -0
- package/dist/server.d.mts +24 -16
- package/dist/server.d.ts +24 -16
- package/dist/server.mjs +144 -102
- package/dist/{spa-router.d-m8H_Kl_B.d.ts → spa-router.d-Dr7oanhl.d.ts} +15 -5
- package/dist/{spa-router.d-WU_qS5gJ.d.mts → spa-router.d-g4CzhEH1.d.mts} +15 -5
- package/dist/testing.cjs +17 -17
- package/dist/testing.d.mts +10 -8
- package/dist/testing.d.ts +10 -8
- package/dist/testing.mjs +13 -13
- package/dist/theme/server.cjs +3 -3
- package/dist/theme/server.mjs +2 -2
- package/dist/types.d-xCIhyjOq.d.mts +233 -0
- package/dist/types.d-xCIhyjOq.d.ts +233 -0
- package/dist/{utils.d-C9dQD5Zg.d.ts → utils.d-BxxyDEb8.d.ts} +1 -1
- package/dist/{utils.d-W9IiEqmW.d.mts → utils.d-HIla3pD_.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +65 -63
- package/dist/vite.d.mts +36 -14
- package/dist/vite.d.ts +36 -14
- package/dist/vite.mjs +64 -62
- package/dist/workflows.cjs +4 -4
- package/dist/workflows.d.mts +121 -1
- package/dist/workflows.d.ts +121 -1
- package/dist/workflows.mjs +3 -3
- package/package.json +37 -2
- package/dist/analyzer-H7SIX6BJ.cjs +0 -16
- package/dist/chunk-5YPBFMBN.cjs +0 -19
- package/dist/chunk-CLFEQGET.cjs +0 -60
- package/dist/chunk-MK5E44WP.mjs +0 -60
- package/dist/chunk-OM7WILES.mjs +0 -100
- package/dist/chunk-Q5B4LNON.mjs +0 -19
- package/dist/chunk-QPJ4MZTO.mjs +0 -60
- package/dist/chunk-R53QDV6T.cjs +0 -100
- package/dist/chunk-UYTAP4FQ.cjs +0 -60
- package/dist/layers-DMRXRL7F.cjs +0 -18
- package/dist/manager-2LUKNX2N.cjs +0 -14
- package/dist/node-module-bundle-7JHPPF6B.mjs +0 -11
- package/dist/node-module-bundle-YJGYBOGK.cjs +0 -11
- package/dist/workflows.d-CRMzQZ3k.d.mts +0 -188
- package/dist/workflows.d-CRMzQZ3k.d.ts +0 -188
- /package/dist/{chunk-QGOZLGVP.mjs → chunk-I6FIAWNT.mjs} +0 -0
- /package/dist/{chunk-XPIPMWY3.cjs → chunk-K5NI5YQR.cjs} +0 -0
- /package/dist/{chunk-NWUHS6GV.cjs → chunk-QEJWNXRI.cjs} +0 -0
- /package/dist/{chunk-FSXSQQTV.mjs → chunk-TXE4SAMV.mjs} +0 -0
- /package/dist/{chunk-ZXK2EYQW.cjs → chunk-UUQNJDGH.cjs} +0 -0
- /package/dist/{chunk-46P5KNTE.mjs → chunk-VZBAW44S.mjs} +0 -0
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRouteTypeDeclarations,
|
|
3
3
|
generateRouteTypes
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import {
|
|
6
|
-
readSchemaTables
|
|
7
|
-
} from "./chunk-2DLGV2ZG.mjs";
|
|
4
|
+
} from "./chunk-E3HDJCWF.mjs";
|
|
8
5
|
import {
|
|
9
6
|
APITypeGenerator
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import {
|
|
12
|
-
resolveSchemaModels
|
|
13
|
-
} from "./chunk-F3N52U7S.mjs";
|
|
7
|
+
} from "./chunk-7PJARAQQ.mjs";
|
|
14
8
|
import {
|
|
15
9
|
getOptionalCatchAllParameterNames,
|
|
16
10
|
materializeSSGRoutePath,
|
|
@@ -23,20 +17,27 @@ import {
|
|
|
23
17
|
import {
|
|
24
18
|
createEnvTypeDeclarations,
|
|
25
19
|
generateEnvTypes
|
|
26
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-K6HIIWUB.mjs";
|
|
27
21
|
import {
|
|
22
|
+
isGeneratedFileCurrent,
|
|
28
23
|
writeFileIfChanged
|
|
29
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-YFTGIHNC.mjs";
|
|
30
25
|
import {
|
|
31
26
|
getFarmAppDirectories,
|
|
32
27
|
getFarmSourceRoots
|
|
33
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-E7VF3LQ5.mjs";
|
|
29
|
+
import {
|
|
30
|
+
resolveSchemaModels
|
|
31
|
+
} from "./chunk-F3N52U7S.mjs";
|
|
32
|
+
import {
|
|
33
|
+
readSchemaTables
|
|
34
|
+
} from "./chunk-K63OWRY2.mjs";
|
|
34
35
|
import {
|
|
35
36
|
readFarmI18nCatalogs
|
|
36
37
|
} from "./chunk-DU4VHHPJ.mjs";
|
|
37
38
|
import {
|
|
38
39
|
resolvePluginRoutes
|
|
39
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-OB45EAQL.mjs";
|
|
40
41
|
|
|
41
42
|
// src/ssg.ts
|
|
42
43
|
import { readFileSync } from "fs";
|
|
@@ -991,7 +992,7 @@ function writeOrCheckGeneratedFile(filePath, content, check, stalePaths) {
|
|
|
991
992
|
writeFileIfChanged(filePath, content);
|
|
992
993
|
}
|
|
993
994
|
function checkGeneratedFile(filePath, content, stalePaths) {
|
|
994
|
-
if (!existsSync2(filePath) || readFileSync2(filePath, "utf8")
|
|
995
|
+
if (!existsSync2(filePath) || !isGeneratedFileCurrent(readFileSync2(filePath, "utf8"), content)) {
|
|
995
996
|
stalePaths.push(filePath);
|
|
996
997
|
}
|
|
997
998
|
}
|
|
@@ -108,10 +108,25 @@ var REACT_RENDERER = Object.freeze({
|
|
|
108
108
|
functionComponents: true
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
|
+
var NO_RENDERER = Object.freeze({
|
|
112
|
+
name: "none",
|
|
113
|
+
vite: "@farm.js/core/renderer/none/server",
|
|
114
|
+
server: "@farm.js/core/renderer/none/server",
|
|
115
|
+
client: "@farm.js/core/renderer/none/server",
|
|
116
|
+
capabilities: {
|
|
117
|
+
streaming: { node: false, web: false },
|
|
118
|
+
reconcilesRerenders: false,
|
|
119
|
+
functionComponents: false
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
function isFarmRendererDisabled(renderer) {
|
|
123
|
+
return renderer === false || renderer?.name === NO_RENDERER.name;
|
|
124
|
+
}
|
|
111
125
|
function defineRenderer(renderer) {
|
|
112
126
|
return renderer;
|
|
113
127
|
}
|
|
114
128
|
function resolveFarmRenderer(renderer) {
|
|
129
|
+
if (renderer === false || isFarmRendererDisabled(renderer)) renderer = NO_RENDERER;
|
|
115
130
|
const resolved = renderer || REACT_RENDERER;
|
|
116
131
|
const fields = ["name", "vite", "server", "client"];
|
|
117
132
|
for (const field of fields) {
|
|
@@ -170,6 +185,7 @@ function createFarmReactJsxPlugin() {
|
|
|
170
185
|
}
|
|
171
186
|
async function loadFarmRendererVitePlugins(renderer, root, options = {}) {
|
|
172
187
|
if (renderer.vite === REACT_RENDERER.vite) return [createFarmReactJsxPlugin()];
|
|
188
|
+
if (isFarmRendererDisabled(renderer)) return [];
|
|
173
189
|
const modulePath = resolveFarmRendererModule(root, renderer.vite);
|
|
174
190
|
const rendererModule = await import(pathToFileURL(modulePath).href);
|
|
175
191
|
if (typeof rendererModule.createFarmRendererPlugin !== "function") {
|
|
@@ -193,6 +209,8 @@ export {
|
|
|
193
209
|
resolveFarmComponentExtensions,
|
|
194
210
|
getFarmRendererComponentExtensions,
|
|
195
211
|
REACT_RENDERER,
|
|
212
|
+
NO_RENDERER,
|
|
213
|
+
isFarmRendererDisabled,
|
|
196
214
|
defineRenderer,
|
|
197
215
|
resolveFarmRenderer,
|
|
198
216
|
readFarmRendererWebStream,
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
var _chunkSYW346ZNcjs = require('./chunk-SYW346ZN.cjs');
|
|
5
|
+
var _chunk2LHZD3OPcjs = require('./chunk-2LHZD3OP.cjs');
|
|
7
6
|
|
|
8
7
|
|
|
9
8
|
|
|
@@ -12,6 +11,9 @@ var _chunkSHD265HWcjs = require('./chunk-SHD265HW.cjs');
|
|
|
12
11
|
|
|
13
12
|
var _chunkGBMWLDCCcjs = require('./chunk-GBMWLDCC.cjs');
|
|
14
13
|
|
|
14
|
+
|
|
15
|
+
var _chunkJ6TZRYCOcjs = require('./chunk-J6TZRYCO.cjs');
|
|
16
|
+
|
|
15
17
|
// src/schema-sql-identifiers.ts
|
|
16
18
|
var POSTGRES_IDENTIFIER_BYTES = 63;
|
|
17
19
|
function fitSqlIndexName(dialect, name) {
|
|
@@ -1583,7 +1585,7 @@ function findSchemaTableOwners(config) {
|
|
|
1583
1585
|
];
|
|
1584
1586
|
const owners = [];
|
|
1585
1587
|
for (const candidate of candidates) {
|
|
1586
|
-
const declaration =
|
|
1588
|
+
const declaration = _chunkJ6TZRYCOcjs.readSchemaTables.call(void 0, candidate);
|
|
1587
1589
|
if (declaration && !owners.some((owner) => owner.name === declaration.name)) {
|
|
1588
1590
|
owners.push(declaration);
|
|
1589
1591
|
}
|
|
@@ -1728,13 +1730,13 @@ async function migrateSchemaTables(owner, options = {}) {
|
|
|
1728
1730
|
);
|
|
1729
1731
|
const foreignKeysUnapproved = dialect === "sqlite" ? [] : addable.filter((key) => !foreignKeysAllowed.includes(key));
|
|
1730
1732
|
const extensionsPlan = await planSchemaExtensions(
|
|
1731
|
-
|
|
1733
|
+
_chunk2LHZD3OPcjs.collectSchemaExtensions.call(void 0, owner.name, owner.schema, owner.models),
|
|
1732
1734
|
dialect,
|
|
1733
1735
|
executor
|
|
1734
1736
|
);
|
|
1735
1737
|
const allowExtend = _optionalChain([schemaConfig, 'optionalAccess', _79 => _79.allowExtend]);
|
|
1736
1738
|
const approved = reportOnly ? [] : extensionsPlan.statements.filter(
|
|
1737
|
-
(statement) =>
|
|
1739
|
+
(statement) => _chunk2LHZD3OPcjs.isSchemaExtensionAllowed.call(void 0, allowExtend, statement.extension)
|
|
1738
1740
|
);
|
|
1739
1741
|
const unapproved = reportOnly ? [] : extensionsPlan.statements.filter((statement) => !approved.includes(statement));
|
|
1740
1742
|
const sql = formatSteps(stepPlan, "before", reportOnly) + formatSchemaMigration(plan, owner.name, {
|
|
@@ -1816,9 +1818,9 @@ ${describeSchemaDrift(plan.drift)}`
|
|
|
1816
1818
|
return result([]);
|
|
1817
1819
|
}
|
|
1818
1820
|
for (const approval of new Set(
|
|
1819
|
-
unapproved.map((statement) =>
|
|
1821
|
+
unapproved.map((statement) => _chunk2LHZD3OPcjs.describeSchemaExtensionApproval.call(void 0, statement.extension))
|
|
1820
1822
|
)) {
|
|
1821
|
-
const columns = unapproved.filter((statement) =>
|
|
1823
|
+
const columns = unapproved.filter((statement) => _chunk2LHZD3OPcjs.describeSchemaExtensionApproval.call(void 0, statement.extension) === approval).map((statement) => statement.target);
|
|
1822
1824
|
log(
|
|
1823
1825
|
`Not allowed yet, so not added: ${columns.join(", ")}. To allow it, add to farm.config: ${approval}`
|
|
1824
1826
|
);
|
|
@@ -1994,7 +1996,7 @@ function formatExtensions(owner, groups) {
|
|
|
1994
1996
|
if (groups.unapproved.length > 0) {
|
|
1995
1997
|
const approvals = [
|
|
1996
1998
|
...new Set(
|
|
1997
|
-
groups.unapproved.map((statement) =>
|
|
1999
|
+
groups.unapproved.map((statement) => _chunk2LHZD3OPcjs.describeSchemaExtensionApproval.call(void 0, statement.extension))
|
|
1998
2000
|
)
|
|
1999
2001
|
];
|
|
2000
2002
|
sections.push(
|
|
@@ -14,6 +14,9 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
createClientCancellation
|
|
16
16
|
} from "./chunk-H227LYHT.mjs";
|
|
17
|
+
import {
|
|
18
|
+
readFarmPageDataRedirect
|
|
19
|
+
} from "./chunk-SD6JGJOM.mjs";
|
|
17
20
|
import {
|
|
18
21
|
FARM_METADATA_ATTRIBUTE,
|
|
19
22
|
renderMetadataHead,
|
|
@@ -26,10 +29,10 @@ import {
|
|
|
26
29
|
createFarmDeploymentMismatchError,
|
|
27
30
|
createFarmDeploymentRequestHeaders,
|
|
28
31
|
isFarmDeploymentMismatchResponse
|
|
29
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-NVOMQLI2.mjs";
|
|
30
33
|
import {
|
|
31
34
|
readDeferredDataResponse
|
|
32
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-7BIW7VCW.mjs";
|
|
33
36
|
|
|
34
37
|
// src/client/metadata-reconciler.ts
|
|
35
38
|
var MANAGED_ATTRIBUTE = FARM_METADATA_ATTRIBUTE;
|
|
@@ -92,6 +95,14 @@ function applyFarmMetadataToDocument(metadata, pathname) {
|
|
|
92
95
|
|
|
93
96
|
// src/client/spa-router.ts
|
|
94
97
|
var MAX_CONCURRENT_VIEWPORT_PREFETCHES = 4;
|
|
98
|
+
var MAX_PAGE_DATA_REDIRECTS = 20;
|
|
99
|
+
var FarmPageDataRedirectSignal = class extends Error {
|
|
100
|
+
constructor(redirect) {
|
|
101
|
+
super(`Page data redirected to ${redirect.location}`);
|
|
102
|
+
this.redirect = redirect;
|
|
103
|
+
this.name = "FarmPageDataRedirect";
|
|
104
|
+
}
|
|
105
|
+
};
|
|
95
106
|
var FARM_PAGE_STATE_KEY = "__farmPageState";
|
|
96
107
|
var FARM_INTERCEPT_FROM_KEY = "__farmInterceptFrom";
|
|
97
108
|
var FARM_HISTORY_INDEX_KEY = "__farmHistoryIndex";
|
|
@@ -217,7 +228,10 @@ var SPARouter = class {
|
|
|
217
228
|
/**
|
|
218
229
|
* Navigate to a new URL
|
|
219
230
|
*/
|
|
220
|
-
|
|
231
|
+
navigate(href, options = {}) {
|
|
232
|
+
return this.runNavigation(href, options, 0);
|
|
233
|
+
}
|
|
234
|
+
async runNavigation(href, options, redirectCount) {
|
|
221
235
|
const {
|
|
222
236
|
replace = false,
|
|
223
237
|
scroll = true,
|
|
@@ -255,15 +269,17 @@ var SPARouter = class {
|
|
|
255
269
|
}
|
|
256
270
|
const from = window.location.pathname + window.location.search;
|
|
257
271
|
const action = replace ? "replace" : "push";
|
|
258
|
-
if (
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
this.
|
|
272
|
+
if (redirectCount === 0) {
|
|
273
|
+
if (await this.shouldBlockNavigation({ from, to: fullPath, action })) {
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
if (!(refresh && fullPath === from) && await runFarmNavigationDelegates({ url: url.href, from, to: fullPath, action })) {
|
|
277
|
+
this.cancelActiveNavigation();
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
if (this.options.scrollRestoration) {
|
|
281
|
+
this.saveScrollPosition(window.location.pathname + window.location.search);
|
|
282
|
+
}
|
|
267
283
|
}
|
|
268
284
|
const navigation = this.startNavigation({
|
|
269
285
|
from,
|
|
@@ -278,10 +294,14 @@ var SPARouter = class {
|
|
|
278
294
|
action: replace ? "replace" : "push"
|
|
279
295
|
});
|
|
280
296
|
if (!this.isCurrentNavigation(navigation, clientNavigation)) return;
|
|
281
|
-
const pageData = await this.
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
297
|
+
const pageData = await this.fetchPageData(
|
|
298
|
+
fullPath,
|
|
299
|
+
true,
|
|
300
|
+
from,
|
|
301
|
+
refresh,
|
|
302
|
+
navigation.controller.signal,
|
|
303
|
+
true
|
|
304
|
+
);
|
|
285
305
|
if (!this.isCurrentNavigation(navigation, clientNavigation)) return;
|
|
286
306
|
if (clientNavigation) {
|
|
287
307
|
await this.clientPlugins?.markNavigationLoaded(clientNavigation, pageData);
|
|
@@ -308,6 +328,16 @@ var SPARouter = class {
|
|
|
308
328
|
this.finishNavigation(navigation);
|
|
309
329
|
} catch (error) {
|
|
310
330
|
if (!this.isCurrentNavigation(navigation, clientNavigation)) return;
|
|
331
|
+
if (error instanceof FarmPageDataRedirectSignal) {
|
|
332
|
+
await this.followPageDataRedirect(
|
|
333
|
+
error.redirect,
|
|
334
|
+
url,
|
|
335
|
+
options,
|
|
336
|
+
redirectCount,
|
|
337
|
+
clientNavigation
|
|
338
|
+
);
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
311
341
|
if (clientNavigation) {
|
|
312
342
|
await this.clientPlugins?.failNavigation(clientNavigation, error);
|
|
313
343
|
}
|
|
@@ -316,6 +346,29 @@ var SPARouter = class {
|
|
|
316
346
|
window.location.href = href;
|
|
317
347
|
}
|
|
318
348
|
}
|
|
349
|
+
/**
|
|
350
|
+
* Continue a navigation whose page data redirected, as a document load
|
|
351
|
+
* follows a server redirect: the target takes the history entry the
|
|
352
|
+
* redirecting URL would have had, inherits its fragment when the target has
|
|
353
|
+
* none, and leaves the app when it is cross-origin.
|
|
354
|
+
*/
|
|
355
|
+
followPageDataRedirect(redirect, from, options, redirectCount, clientNavigation) {
|
|
356
|
+
if (clientNavigation) this.clientPlugins?.cancelNavigation?.(clientNavigation, "superseded");
|
|
357
|
+
const target = resolvePageDataRedirectTarget(redirect.location, from);
|
|
358
|
+
const replace = options.replace === true || target !== null && target.pathname + target.search === window.location.pathname + window.location.search;
|
|
359
|
+
if (!target || redirectCount >= MAX_PAGE_DATA_REDIRECTS) {
|
|
360
|
+
this.cancelActiveNavigation();
|
|
361
|
+
const documentURL = (target ?? from).href;
|
|
362
|
+
if (replace) window.location.replace(documentURL);
|
|
363
|
+
else window.location.assign(documentURL);
|
|
364
|
+
return Promise.resolve();
|
|
365
|
+
}
|
|
366
|
+
return this.runNavigation(
|
|
367
|
+
target.href,
|
|
368
|
+
{ ...options, replace, refresh: true },
|
|
369
|
+
redirectCount + 1
|
|
370
|
+
);
|
|
371
|
+
}
|
|
319
372
|
/**
|
|
320
373
|
* Re-render the active route from the server while preserving the document,
|
|
321
374
|
* shared layouts, client runtime, and browser history entry.
|
|
@@ -343,9 +396,11 @@ var SPARouter = class {
|
|
|
343
396
|
if (this.isCached(fullPath, interceptFrom)) return;
|
|
344
397
|
this.prefetchingUrls.add(fullPath);
|
|
345
398
|
try {
|
|
346
|
-
await this.fetchPageData(fullPath, false, interceptFrom);
|
|
399
|
+
await this.fetchPageData(fullPath, false, interceptFrom, false, void 0, true);
|
|
347
400
|
} catch (error) {
|
|
348
|
-
|
|
401
|
+
if (!(error instanceof FarmPageDataRedirectSignal)) {
|
|
402
|
+
console.warn("[Farm.js] Prefetch failed:", href, error);
|
|
403
|
+
}
|
|
349
404
|
} finally {
|
|
350
405
|
this.prefetchingUrls.delete(fullPath);
|
|
351
406
|
}
|
|
@@ -561,7 +616,7 @@ var SPARouter = class {
|
|
|
561
616
|
/**
|
|
562
617
|
* Fetch page data from cache or server
|
|
563
618
|
*/
|
|
564
|
-
async fetchPageData(path, recover = true, interceptFrom, fresh = false, signal) {
|
|
619
|
+
async fetchPageData(path, recover = true, interceptFrom, fresh = false, signal, readDocument = false) {
|
|
565
620
|
const cacheKey = getPageDataCacheKey(path, interceptFrom);
|
|
566
621
|
const cached = fresh ? void 0 : this.cache.get(cacheKey);
|
|
567
622
|
if (cached && Date.now() - cached.timestamp < this.options.cacheMaxAge) {
|
|
@@ -603,6 +658,16 @@ var SPARouter = class {
|
|
|
603
658
|
}
|
|
604
659
|
};
|
|
605
660
|
try {
|
|
661
|
+
const documentData = readDocument && this.options.fetchNavigationDocument ? await this.options.fetchNavigationDocument(path, {
|
|
662
|
+
signal,
|
|
663
|
+
refresh: fresh,
|
|
664
|
+
prefetch: !recover
|
|
665
|
+
}) : null;
|
|
666
|
+
if (documentData) {
|
|
667
|
+
if (!recover) cacheData(documentData);
|
|
668
|
+
prefetch2?.resolve(documentData);
|
|
669
|
+
return documentData;
|
|
670
|
+
}
|
|
606
671
|
return await this.requestPageData(
|
|
607
672
|
path,
|
|
608
673
|
recover,
|
|
@@ -642,6 +707,8 @@ var SPARouter = class {
|
|
|
642
707
|
}
|
|
643
708
|
throw error;
|
|
644
709
|
}
|
|
710
|
+
const redirect = await readFarmPageDataRedirect(response);
|
|
711
|
+
if (redirect) throw new FarmPageDataRedirectSignal(redirect);
|
|
645
712
|
if (!response.ok) {
|
|
646
713
|
throw new Error(`Failed to fetch page data: ${response.status}`);
|
|
647
714
|
}
|
|
@@ -781,6 +848,16 @@ var SPARouter = class {
|
|
|
781
848
|
this.finishNavigation(navigation);
|
|
782
849
|
} catch (error) {
|
|
783
850
|
if (!this.isCurrentNavigation(navigation, clientNavigation)) return;
|
|
851
|
+
if (error instanceof FarmPageDataRedirectSignal) {
|
|
852
|
+
await this.followPageDataRedirect(
|
|
853
|
+
error.redirect,
|
|
854
|
+
new URL(window.location.href),
|
|
855
|
+
{ replace: true },
|
|
856
|
+
0,
|
|
857
|
+
clientNavigation
|
|
858
|
+
);
|
|
859
|
+
return;
|
|
860
|
+
}
|
|
784
861
|
if (clientNavigation) {
|
|
785
862
|
await this.clientPlugins?.failNavigation(clientNavigation, error);
|
|
786
863
|
}
|
|
@@ -1019,6 +1096,16 @@ function createHistoryState(path, pageState, currentState, interceptFrom) {
|
|
|
1019
1096
|
}
|
|
1020
1097
|
return nextState;
|
|
1021
1098
|
}
|
|
1099
|
+
function resolvePageDataRedirectTarget(location, from) {
|
|
1100
|
+
let target;
|
|
1101
|
+
try {
|
|
1102
|
+
target = new URL(location, from);
|
|
1103
|
+
} catch {
|
|
1104
|
+
return null;
|
|
1105
|
+
}
|
|
1106
|
+
if (!target.hash && from.hash) target.hash = from.hash;
|
|
1107
|
+
return target;
|
|
1108
|
+
}
|
|
1022
1109
|
function getPageDataCacheKey(path, interceptFrom) {
|
|
1023
1110
|
return interceptFrom ? `${path}
|
|
1024
1111
|
intercept:${interceptFrom}` : path;
|
|
@@ -9,19 +9,28 @@ import {
|
|
|
9
9
|
} from "./chunk-AY2YD5ZX.mjs";
|
|
10
10
|
import {
|
|
11
11
|
getCurrentRequestOrNull
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5OFNUETM.mjs";
|
|
13
13
|
|
|
14
14
|
// src/theme/server.ts
|
|
15
|
-
var
|
|
15
|
+
var FARM_THEME_DEFAULT_CONFIG = /* @__PURE__ */ Symbol.for("farm.js.theme.default-config");
|
|
16
|
+
var DISABLED_THEME_CONFIG = resolveFarmThemeConfig(void 0);
|
|
17
|
+
function getDefaultThemeConfig() {
|
|
18
|
+
return globalThis[FARM_THEME_DEFAULT_CONFIG] ?? DISABLED_THEME_CONFIG;
|
|
19
|
+
}
|
|
16
20
|
function _setDefaultFarmThemeConfig(config, basePath = "/") {
|
|
17
|
-
|
|
21
|
+
globalThis[FARM_THEME_DEFAULT_CONFIG] = resolveFarmThemeConfig(
|
|
22
|
+
config,
|
|
23
|
+
basePath
|
|
24
|
+
);
|
|
18
25
|
}
|
|
19
26
|
function getTheme(request = getCurrentRequestOrNull()) {
|
|
20
|
-
|
|
21
|
-
|
|
27
|
+
const config = getDefaultThemeConfig();
|
|
28
|
+
if (!request) return config.default;
|
|
29
|
+
return readFarmThemePreference(request, config);
|
|
22
30
|
}
|
|
23
31
|
function getThemeSnapshot(request = getCurrentRequestOrNull()) {
|
|
24
|
-
const
|
|
32
|
+
const config = getDefaultThemeConfig();
|
|
33
|
+
const theme = request ? readFarmThemePreference(request, config) : config.default;
|
|
25
34
|
return {
|
|
26
35
|
theme,
|
|
27
36
|
resolvedTheme: theme === "system" ? void 0 : theme,
|
|
@@ -58,7 +67,7 @@ _setFarmThemeServerSnapshotResolver(() => {
|
|
|
58
67
|
try {
|
|
59
68
|
return getThemeSnapshot();
|
|
60
69
|
} catch {
|
|
61
|
-
const theme =
|
|
70
|
+
const theme = getDefaultThemeConfig().default;
|
|
62
71
|
return {
|
|
63
72
|
theme,
|
|
64
73
|
resolvedTheme: theme === "system" ? void 0 : theme,
|
|
@@ -39,6 +39,16 @@ function validateIntegrationRequestOrigin(request, policy = {}) {
|
|
|
39
39
|
}
|
|
40
40
|
return { ok: true };
|
|
41
41
|
}
|
|
42
|
+
function rejectCrossSiteNonJSONBody(request, message) {
|
|
43
|
+
const contentType = request.headers.get("content-type")?.split(";", 1)[0]?.trim().toLowerCase();
|
|
44
|
+
if (!contentType || contentType === "application/json" || contentType.endsWith("+json")) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
if (validateIntegrationRequestOrigin(request, { requireOriginMetadata: false }).ok) {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
return Response.json({ error: "Unsupported Media Type", message }, { status: 415 });
|
|
51
|
+
}
|
|
42
52
|
function describeIntegrationOriginRejection(reason) {
|
|
43
53
|
switch (reason) {
|
|
44
54
|
case "missing-origin":
|
|
@@ -87,6 +97,7 @@ function toPublicPathSegment(segment) {
|
|
|
87
97
|
export {
|
|
88
98
|
resolveIntegrationAllowedOrigins,
|
|
89
99
|
validateIntegrationRequestOrigin,
|
|
100
|
+
rejectCrossSiteNonJSONBody,
|
|
90
101
|
describeIntegrationOriginRejection,
|
|
91
102
|
parseRouteSchema,
|
|
92
103
|
toPublicValidationIssues
|
|
@@ -111,16 +111,21 @@ function _runWithFarmCspNonce(nonce, fn) {
|
|
|
111
111
|
return nonce ? cspNonceStore.run(nonce, fn) : fn();
|
|
112
112
|
}
|
|
113
113
|
_chunk3BIASUGRcjs._setAppRequestView.call(void 0, getAppRequestView);
|
|
114
|
+
function parseFarmRequestTarget(target, origin) {
|
|
115
|
+
return target.startsWith("/") ? new URL(`${new URL(origin).origin}${target}`) : new URL(target, origin);
|
|
116
|
+
}
|
|
114
117
|
function resolveFarmRequestURL(req, options = {}) {
|
|
115
118
|
if (options.origin) {
|
|
116
|
-
return
|
|
119
|
+
return parseFarmRequestTarget(req.url || "/", options.origin);
|
|
117
120
|
}
|
|
118
121
|
const forwardedHost = options.trustProxy ? firstForwardedHeaderValue(req.headers["x-forwarded-host"]) : void 0;
|
|
119
122
|
const fallbackHost = firstForwardedHeaderValue(req.headers.host) || "localhost";
|
|
120
123
|
const forwardedProto = options.trustProxy ? firstForwardedHeaderValue(req.headers["x-forwarded-proto"]) : void 0;
|
|
121
124
|
const normalizedProto = _optionalChain([forwardedProto, 'optionalAccess', _ => _.toLowerCase, 'call', _2 => _2()]);
|
|
122
125
|
const proto = normalizedProto === "https" || normalizedProto === "http" ? normalizedProto : isEncryptedFarmRequest(req) ? "https" : "http";
|
|
123
|
-
|
|
126
|
+
const origin = resolveRequestOrigin(proto, forwardedHost, fallbackHost);
|
|
127
|
+
const target = req.url || "/";
|
|
128
|
+
return target.startsWith("/") ? new URL(`${origin}${target}`) : new URL(target, origin);
|
|
124
129
|
}
|
|
125
130
|
function resolveFarmWebRequestOrigin(request, options = {}) {
|
|
126
131
|
const url = new URL(request.url);
|
|
@@ -212,4 +217,5 @@ function getCurrentRequestOrNull() {
|
|
|
212
217
|
|
|
213
218
|
|
|
214
219
|
|
|
215
|
-
|
|
220
|
+
|
|
221
|
+
exports._assertRequestReadAllowed = _assertRequestReadAllowed; exports._runWithFarmCspNonce = _runWithFarmCspNonce; exports.parseFarmRequestTarget = parseFarmRequestTarget; exports.resolveFarmRequestURL = resolveFarmRequestURL; exports.resolveFarmWebRequestOrigin = resolveFarmWebRequestOrigin; exports.createWebRequestFromFarmRequest = createWebRequestFromFarmRequest; exports._runWithCurrentRequest = _runWithCurrentRequest; exports.getCurrentRequest = getCurrentRequest; exports._getRequestReadCount = _getRequestReadCount; exports.getCurrentRequestOrNull = getCurrentRequestOrNull;
|
|
@@ -4,19 +4,21 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
FARM_MARKDOWN_PAGE_CHECK_HEADER,
|
|
6
6
|
_getFarmMarkdownPageCheckToken,
|
|
7
|
+
_getFarmMarkdownPath,
|
|
8
|
+
_resolveFarmMarkdownIndexAlias,
|
|
7
9
|
createFarmMarkdownViewResponse,
|
|
8
10
|
requestAcceptsMarkdown
|
|
9
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-IFR74W6S.mjs";
|
|
10
12
|
|
|
11
13
|
// src/app-markdown-runtime.ts
|
|
12
14
|
import { pathToFileURL } from "url";
|
|
13
15
|
function isFarmMarkdownPageFile(filePath) {
|
|
14
16
|
return /(^|[/\\])page\.mdx?$/i.test(filePath);
|
|
15
17
|
}
|
|
16
|
-
function normalizeFarmMarkdownRoutePath(pathname) {
|
|
18
|
+
function normalizeFarmMarkdownRoutePath(pathname, routePathname) {
|
|
17
19
|
const withoutExtension = pathname.replace(/\.md$/i, "");
|
|
18
20
|
const normalized = withoutExtension.startsWith("/") ? withoutExtension : `/${withoutExtension}`;
|
|
19
|
-
return normalized
|
|
21
|
+
return _resolveFarmMarkdownIndexAlias(normalized.replace(/\/+$/g, "") || "/", routePathname);
|
|
20
22
|
}
|
|
21
23
|
function parseMarkdownFrontmatter(source) {
|
|
22
24
|
if (!source.startsWith("---")) {
|
|
@@ -72,16 +74,25 @@ async function evaluateMdxSource(source, filePath) {
|
|
|
72
74
|
}
|
|
73
75
|
function createFarmMarkdownRouteModule(input) {
|
|
74
76
|
const { body } = parseMarkdownFrontmatter(input.source);
|
|
75
|
-
const components = input.components || {};
|
|
76
77
|
const className = input.config?.className || "farm-markdown";
|
|
77
78
|
let evaluatedPromise;
|
|
79
|
+
let componentsPromise;
|
|
78
80
|
const loadContent = async () => {
|
|
79
81
|
evaluatedPromise ?? (evaluatedPromise = evaluateMdxSource(body, input.filePath));
|
|
80
82
|
return evaluatedPromise;
|
|
81
83
|
};
|
|
84
|
+
const loadComponents = () => {
|
|
85
|
+
const configured = input.components;
|
|
86
|
+
if (typeof configured !== "function") return configured || {};
|
|
87
|
+
componentsPromise ?? (componentsPromise = configured().catch((error) => {
|
|
88
|
+
componentsPromise = void 0;
|
|
89
|
+
throw error;
|
|
90
|
+
}));
|
|
91
|
+
return componentsPromise;
|
|
92
|
+
};
|
|
82
93
|
async function FarmMarkdownPage(props) {
|
|
83
94
|
const { createElement } = await import("react");
|
|
84
|
-
const evaluated = await loadContent();
|
|
95
|
+
const [evaluated, components] = await Promise.all([loadContent(), loadComponents()]);
|
|
85
96
|
const MDXContent = evaluated.default;
|
|
86
97
|
return createElement(
|
|
87
98
|
"article",
|
|
@@ -195,7 +206,7 @@ async function createFarmMarkdownSourceResponse(options) {
|
|
|
195
206
|
if (!hasMarkdownExtension && !requestAcceptsMarkdown(options.request.headers.get("accept"))) {
|
|
196
207
|
return null;
|
|
197
208
|
}
|
|
198
|
-
const targetPathname = normalizeFarmMarkdownRoutePath(url.pathname);
|
|
209
|
+
const targetPathname = normalizeFarmMarkdownRoutePath(url.pathname, options.routePathname);
|
|
199
210
|
const source = await options.resolveSource(targetPathname);
|
|
200
211
|
if (!source) {
|
|
201
212
|
return null;
|
|
@@ -246,7 +257,10 @@ async function createFarmMarkdownSourceResponse(options) {
|
|
|
246
257
|
}
|
|
247
258
|
const headers = new Headers({
|
|
248
259
|
"Content-Type": "text/markdown; charset=utf-8",
|
|
249
|
-
"Content-Location":
|
|
260
|
+
"Content-Location": _getFarmMarkdownPath(
|
|
261
|
+
targetPathname,
|
|
262
|
+
options.routePathname?.(targetPathname)
|
|
263
|
+
),
|
|
250
264
|
"Cache-Control": "public, s-maxage=60, stale-while-revalidate=300",
|
|
251
265
|
"X-Farm-Markdown-Route": targetPathname,
|
|
252
266
|
"X-Farm-Markdown-Source": source.filePath
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkBDYM2TN3cjs = require('./chunk-BDYM2TN3.cjs');
|
|
4
|
+
|
|
5
|
+
// src/plugin-server-runtime.ts
|
|
6
|
+
function hasFarmServerRuntimePlugins(plugins) {
|
|
7
|
+
return (plugins || []).some((plugin) => {
|
|
8
|
+
if (_chunkBDYM2TN3cjs.getFarmIntegrationPluginServerRuntime.call(void 0, plugin) === false) return false;
|
|
9
|
+
return Boolean(
|
|
10
|
+
plugin.setup || plugin.init || plugin.ready || plugin.shutdown || plugin.runtime || plugin.router || plugin.render || plugin.beforeRouteMatch || plugin.afterRouteMatch || plugin.beforeRender || plugin.afterRender || plugin.onError || plugin.transformHTML
|
|
11
|
+
);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
exports.hasFarmServerRuntimePlugins = hasFarmServerRuntimePlugins;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkVX2HZGC7cjs = require('./chunk-VX2HZGC7.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunk5DX3O6TTcjs = require('./chunk-5DX3O6TT.cjs');
|
|
@@ -394,7 +394,7 @@ function farmMiddlewarePlugin(options = {}) {
|
|
|
394
394
|
mode: server.config.mode === "production" ? "production" : "development",
|
|
395
395
|
basePath: _nullishCoalesce(options.basePath, () => ( "/"))
|
|
396
396
|
});
|
|
397
|
-
manager = new (0,
|
|
397
|
+
manager = new (0, _chunkVX2HZGC7cjs.MiddlewareManager)(
|
|
398
398
|
getMiddlewareAppDirectory(server.config.root, srcDir),
|
|
399
399
|
server,
|
|
400
400
|
options.middleware,
|
|
@@ -5,7 +5,7 @@ var FARM_DEPLOYMENT_COOKIE = "__farm_deployment";
|
|
|
5
5
|
var FARM_DEPLOYMENT_MISMATCH_CODE = "FARM_DEPLOYMENT_MISMATCH";
|
|
6
6
|
var FARM_DEPLOYMENT_MISMATCH_STATUS = 409;
|
|
7
7
|
function getFarmPresetRuntime(preset) {
|
|
8
|
-
if (preset === "cloudflare" || preset === "cloudflare-pages" || preset === "cloudflare-module" || preset === "netlify-edge" || preset === "
|
|
8
|
+
if (preset === "cloudflare" || preset === "cloudflare-pages" || preset === "cloudflare-module" || preset === "netlify-edge" || preset === "deno") {
|
|
9
9
|
return "edge";
|
|
10
10
|
}
|
|
11
11
|
if (preset === "node-server" || preset === "vercel" || preset === "netlify" || preset === "aws-lambda" || preset === "azure" || preset === "firebase" || preset === "bun" || preset === "self-host" || preset === "farm") {
|
|
@@ -132,6 +132,20 @@ function readCookie(cookieHeader, name) {
|
|
|
132
132
|
function isSafeRequestMethod(method) {
|
|
133
133
|
return ["GET", "HEAD", "OPTIONS", "QUERY"].includes(method.toUpperCase());
|
|
134
134
|
}
|
|
135
|
+
var CLOUDFLARE_POPULATE_PROCESS_ENV_FLAG = "nodejs_compat_populate_process_env";
|
|
136
|
+
var CLOUDFLARE_DO_NOT_POPULATE_PROCESS_ENV_FLAG = "nodejs_compat_do_not_populate_process_env";
|
|
137
|
+
var CLOUDFLARE_POPULATE_PROCESS_ENV_DATE = "2025-04-01";
|
|
138
|
+
function resolveCloudflareProcessEnvFlags(wrangler) {
|
|
139
|
+
const date = wrangler.compatibility_date;
|
|
140
|
+
const flags = wrangler.compatibility_flags;
|
|
141
|
+
if (typeof date !== "string" || date >= CLOUDFLARE_POPULATE_PROCESS_ENV_DATE) return void 0;
|
|
142
|
+
if (!Array.isArray(flags) || !flags.includes("nodejs_compat")) return void 0;
|
|
143
|
+
if (flags.includes(CLOUDFLARE_POPULATE_PROCESS_ENV_FLAG) || flags.includes(CLOUDFLARE_DO_NOT_POPULATE_PROCESS_ENV_FLAG)) {
|
|
144
|
+
return void 0;
|
|
145
|
+
}
|
|
146
|
+
return [...flags, CLOUDFLARE_POPULATE_PROCESS_ENV_FLAG];
|
|
147
|
+
}
|
|
148
|
+
|
|
135
149
|
|
|
136
150
|
|
|
137
151
|
|
|
@@ -151,4 +165,4 @@ function isSafeRequestMethod(method) {
|
|
|
151
165
|
|
|
152
166
|
|
|
153
167
|
|
|
154
|
-
exports.FARM_DEPLOYMENT_ID_HEADER = FARM_DEPLOYMENT_ID_HEADER; exports.FARM_DEPLOYMENT_MISMATCH_HEADER = FARM_DEPLOYMENT_MISMATCH_HEADER; exports.FARM_DEPLOYMENT_COOKIE = FARM_DEPLOYMENT_COOKIE; exports.FARM_DEPLOYMENT_MISMATCH_CODE = FARM_DEPLOYMENT_MISMATCH_CODE; exports.FARM_DEPLOYMENT_MISMATCH_STATUS = FARM_DEPLOYMENT_MISMATCH_STATUS; exports.getFarmPresetRuntime = getFarmPresetRuntime; exports.FarmDeploymentMismatchError = FarmDeploymentMismatchError; exports.normalizeFarmDeploymentId = normalizeFarmDeploymentId; exports.createFarmDeploymentRequestHeaders = createFarmDeploymentRequestHeaders; exports.getFarmRequestDeploymentId = getFarmRequestDeploymentId; exports.getFarmDeploymentMismatch = getFarmDeploymentMismatch; exports.createFarmDeploymentMismatchResponse = createFarmDeploymentMismatchResponse; exports.withFarmDeploymentResponse = withFarmDeploymentResponse; exports.getFarmResponseDeploymentId = getFarmResponseDeploymentId; exports.isFarmDeploymentMismatchResponse = isFarmDeploymentMismatchResponse; exports.createFarmDeploymentMismatchError = createFarmDeploymentMismatchError; exports.createFarmDeploymentCookie = createFarmDeploymentCookie;
|
|
168
|
+
exports.FARM_DEPLOYMENT_ID_HEADER = FARM_DEPLOYMENT_ID_HEADER; exports.FARM_DEPLOYMENT_MISMATCH_HEADER = FARM_DEPLOYMENT_MISMATCH_HEADER; exports.FARM_DEPLOYMENT_COOKIE = FARM_DEPLOYMENT_COOKIE; exports.FARM_DEPLOYMENT_MISMATCH_CODE = FARM_DEPLOYMENT_MISMATCH_CODE; exports.FARM_DEPLOYMENT_MISMATCH_STATUS = FARM_DEPLOYMENT_MISMATCH_STATUS; exports.getFarmPresetRuntime = getFarmPresetRuntime; exports.FarmDeploymentMismatchError = FarmDeploymentMismatchError; exports.normalizeFarmDeploymentId = normalizeFarmDeploymentId; exports.createFarmDeploymentRequestHeaders = createFarmDeploymentRequestHeaders; exports.getFarmRequestDeploymentId = getFarmRequestDeploymentId; exports.getFarmDeploymentMismatch = getFarmDeploymentMismatch; exports.createFarmDeploymentMismatchResponse = createFarmDeploymentMismatchResponse; exports.withFarmDeploymentResponse = withFarmDeploymentResponse; exports.getFarmResponseDeploymentId = getFarmResponseDeploymentId; exports.isFarmDeploymentMismatchResponse = isFarmDeploymentMismatchResponse; exports.createFarmDeploymentMismatchError = createFarmDeploymentMismatchError; exports.createFarmDeploymentCookie = createFarmDeploymentCookie; exports.resolveCloudflareProcessEnvFlags = resolveCloudflareProcessEnvFlags;
|