@farm.js/core 0.1.65 → 0.1.67
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-BFu9xHAi.d.ts} +1 -1
- package/dist/{agent-mcp.d-CO_ABmNK.d.mts → agent-mcp.d-DWyWkTSy.d.mts} +1 -1
- package/dist/agent-runtime.cjs +6 -5
- package/dist/agent-runtime.d.mts +6 -6
- package/dist/agent-runtime.d.ts +6 -6
- package/dist/agent-runtime.mjs +5 -4
- package/dist/analyzer-KVZGVY5Q.cjs +16 -0
- package/dist/{analyzer-PE33SK5W.mjs → analyzer-TTIIXXMQ.mjs} +3 -3
- 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 +59 -0
- package/dist/api/node.d.ts +59 -0
- package/dist/api/node.mjs +223 -0
- package/dist/api/route-manager.cjs +11 -11
- package/dist/api/route-manager.d.mts +10 -9
- package/dist/api/route-manager.d.ts +10 -9
- package/dist/api/route-manager.mjs +10 -10
- package/dist/api/runtime.cjs +11 -7
- package/dist/api/runtime.d.mts +7 -7
- package/dist/api/runtime.d.ts +7 -7
- 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 +11 -10
- package/dist/api.d.ts +11 -10
- package/dist/api.mjs +16 -12
- package/dist/{app-manifest.d-BpKxiU_E.d.mts → app-manifest.d-CRmjN5j9.d.mts} +1 -1
- package/dist/{app-manifest.d-DDmNkYQQ.d.ts → app-manifest.d-CwfhGrVR.d.ts} +1 -1
- package/dist/app-markdown.cjs +5 -5
- package/dist/app-markdown.d.mts +7 -7
- package/dist/app-markdown.d.ts +7 -7
- package/dist/app-markdown.mjs +4 -4
- package/dist/{app.d-x68Cwr0_.d.ts → app.d-BX9LVTiP.d.ts} +50 -9
- package/dist/{app.d-kuoVWhWM.d.mts → app.d-uBBUxwyV.d.mts} +50 -9
- package/dist/{chunk-V56632LA.cjs → chunk-22IWL4YD.cjs} +19 -5
- package/dist/{chunk-CZF4XIRZ.cjs → chunk-23PVOIPT.cjs} +3 -3
- 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-RVGSVQWT.mjs → chunk-3T5TLFCQ.mjs} +10 -5
- package/dist/{chunk-XBSKPLHF.cjs → chunk-3T7ALZJF.cjs} +2 -2
- package/dist/{chunk-JCEFKP5M.mjs → chunk-423SSBYQ.mjs} +6 -0
- package/dist/{chunk-7QVRWGBL.cjs → chunk-4DRINDGN.cjs} +319 -138
- package/dist/{chunk-O6L3YYPM.cjs → chunk-4E57QHPW.cjs} +8 -16
- package/dist/{chunk-WKPBIT5Q.cjs → chunk-4HGLJOXZ.cjs} +6 -6
- package/dist/{chunk-JGAE5XPL.cjs → chunk-4JX3M4C6.cjs} +2 -1
- package/dist/{chunk-CJNAUEVC.mjs → chunk-4QENVMG7.mjs} +1 -1
- package/dist/{chunk-IMK32ERL.cjs → chunk-556H7JCE.cjs} +65 -48
- package/dist/{chunk-OLIGNTWU.cjs → chunk-5NFQ6AZI.cjs} +7 -7
- package/dist/{chunk-6HRAK7I5.mjs → chunk-5OFNUETM.mjs} +8 -2
- package/dist/{chunk-TZVUF5JJ.mjs → chunk-5TA63JD3.mjs} +4 -4
- package/dist/{chunk-RD623KW4.cjs → chunk-67MZTLTF.cjs} +21 -3
- package/dist/chunk-6I4BFRE7.cjs +51 -0
- package/dist/{chunk-OSFIUSYK.cjs → chunk-6R53ZWX2.cjs} +7 -7
- package/dist/{chunk-MGKW5XZE.cjs → chunk-6SQZXRJ2.cjs} +7 -7
- package/dist/{chunk-WNXVWXG3.cjs → chunk-6V5YWI4W.cjs} +2 -2
- package/dist/{chunk-BM2LH2JM.mjs → chunk-6YBYX4K4.mjs} +13 -12
- package/dist/{chunk-X3XUZWRB.mjs → chunk-724MGMIL.mjs} +17 -3
- package/dist/{chunk-K5EW7GUU.mjs → chunk-7BIW7VCW.mjs} +13 -5
- package/dist/{chunk-HPP2II4Z.mjs → chunk-7PJARAQQ.mjs} +1 -1
- package/dist/{chunk-LEJDW34D.cjs → chunk-7PPLTD3P.cjs} +3 -3
- 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-ZEXE4TGY.mjs → chunk-AQDLVHNF.mjs} +230 -110
- package/dist/{chunk-NKRZLQUK.mjs → chunk-AQIO3RNL.mjs} +1 -1
- package/dist/chunk-AQIRXBBY.cjs +26 -0
- 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-V727H3RI.cjs → chunk-CCAUIBIS.cjs} +6 -0
- package/dist/{chunk-YN6BHOYY.cjs → chunk-CL52PD6D.cjs} +10 -3
- package/dist/{chunk-ZX2JHEWW.mjs → chunk-CO3YMZFD.mjs} +20 -9
- package/dist/{chunk-XURDCXNH.cjs → chunk-CSLHNBPS.cjs} +6 -6
- package/dist/{chunk-CNNBFGL5.cjs → chunk-DB2HSHQA.cjs} +14 -14
- package/dist/{chunk-XQSYOVCW.cjs → chunk-DBYNZIIQ.cjs} +13 -5
- package/dist/{chunk-32RPJAAS.cjs → chunk-DCXSIEFE.cjs} +40 -41
- package/dist/{chunk-D4MRNBVF.cjs → chunk-DGOFR7D5.cjs} +2 -2
- package/dist/{chunk-QTD6EMN2.mjs → chunk-DQ2DI3Y7.mjs} +11 -4
- package/dist/chunk-DXZ57EPE.mjs +375 -0
- package/dist/{chunk-SA7MLSP4.mjs → chunk-E3HDJCWF.mjs} +3 -3
- package/dist/{chunk-EFZGB7JC.cjs → chunk-E5UN4OWX.cjs} +1 -0
- package/dist/{chunk-HKNYNSOK.mjs → chunk-E6CD45JK.mjs} +30 -31
- 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-E552H232.cjs → chunk-F43OG25P.cjs} +1 -1
- package/dist/{chunk-UAQD67HM.mjs → chunk-F7JKVHU2.mjs} +1 -1
- package/dist/{chunk-QISW423S.cjs → chunk-FPBOAG6N.cjs} +2 -2
- package/dist/{chunk-2C5L5RPM.cjs → chunk-FT6KJHS3.cjs} +71 -38
- package/dist/{chunk-ES2LD2YD.mjs → chunk-GCRT6GJG.mjs} +18 -0
- package/dist/{chunk-5OJVKXFV.cjs → chunk-GDM3ZD2O.cjs} +10 -8
- package/dist/{chunk-EMDGXYUD.mjs → chunk-GJ7QVFAG.mjs} +16 -7
- package/dist/{chunk-TGSEVBPO.mjs → chunk-GJEC5S4V.mjs} +11 -0
- package/dist/{chunk-ZAUOOGER.mjs → chunk-GTV2ABO7.mjs} +218 -37
- package/dist/{chunk-72JSHQQQ.mjs → chunk-H37MDCPR.mjs} +1 -1
- package/dist/{chunk-HNAISJFD.cjs → chunk-HDPT6OYE.cjs} +9 -3
- package/dist/{chunk-25T5VXOE.mjs → chunk-HFHJJXSV.mjs} +106 -19
- package/dist/{chunk-ZNH6NR3H.cjs → chunk-HJZZSBVK.cjs} +2 -2
- package/dist/{chunk-A3G5IY2W.cjs → chunk-HM7AGSKU.cjs} +1 -1
- package/dist/{chunk-GL7N5UHF.cjs → chunk-HNVAZGQD.cjs} +20 -9
- package/dist/{chunk-GRBJ7VKH.mjs → chunk-HP2DQGQH.mjs} +1 -1
- package/dist/{chunk-E2TSYUHV.mjs → chunk-HRPTMX5C.mjs} +4 -4
- package/dist/{chunk-K7OZAVOI.mjs → chunk-IFR74W6S.mjs} +46 -13
- package/dist/{chunk-5A77OEIG.cjs → chunk-IHTDLCDJ.cjs} +5 -5
- package/dist/{chunk-VQJHT2ND.mjs → chunk-IRA2CZAY.mjs} +2 -2
- package/dist/{chunk-OYZXVBZP.cjs → chunk-IUKBPBM7.cjs} +2 -1
- package/dist/chunk-J6TZRYCO.cjs +22 -0
- package/dist/{chunk-WYAXRIYP.cjs → chunk-J7JHVCWA.cjs} +8 -8
- package/dist/chunk-JSOCDYER.cjs +375 -0
- package/dist/{chunk-YUW7F6SK.mjs → chunk-JVM3DKZE.mjs} +3 -3
- package/dist/{chunk-UPYIFH2H.cjs → chunk-JWLRBDDC.cjs} +2 -2
- package/dist/{chunk-BQWBHWEW.mjs → chunk-JWSI5WO4.mjs} +1 -1
- 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-3CCAICF7.cjs → chunk-KCY52OUQ.cjs} +4 -4
- package/dist/{chunk-EZ34EHQP.mjs → chunk-KI3MU7B5.mjs} +1 -1
- package/dist/{chunk-GHNW564E.mjs → chunk-KSZK34HU.mjs} +30 -10
- package/dist/{chunk-RFKTJTWZ.mjs → chunk-KWFNUODD.mjs} +2 -1
- package/dist/{chunk-ECKQFEX2.mjs → chunk-LENKRGBV.mjs} +8 -6
- package/dist/{chunk-C7DCMGC4.cjs → chunk-LPIZMU7D.cjs} +12 -12
- package/dist/{chunk-HEPJIKKQ.cjs → chunk-MCSRMEQV.cjs} +2 -2
- package/dist/{chunk-DQF3QLOH.mjs → chunk-ME7RVELR.mjs} +3 -2
- package/dist/{chunk-3KJPIO5D.cjs → chunk-N5DQMOAG.cjs} +589 -678
- package/dist/{chunk-O4F3JUST.mjs → chunk-NDDRTFN4.mjs} +4 -0
- package/dist/{chunk-CBOEJ5Z4.cjs → chunk-OB3IFUK6.cjs} +133 -46
- package/dist/{chunk-R62SF5R4.mjs → chunk-OB45EAQL.mjs} +6 -1
- 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-IP2KHSGF.mjs → chunk-P2NBQ5JI.mjs} +57 -4
- package/dist/{chunk-ZQQK4U66.cjs → chunk-PDFFYZAT.cjs} +72 -19
- package/dist/{chunk-GSVJ3IIF.cjs → chunk-PHCJJJZV.cjs} +2 -2
- package/dist/{chunk-EVMXPJCB.mjs → chunk-PKMUQ7LM.mjs} +2 -1
- package/dist/{chunk-YD4J37RN.cjs → chunk-PL6RTBDE.cjs} +30 -19
- package/dist/{chunk-OAJOQU5J.mjs → chunk-PLJKJJ2H.mjs} +82 -63
- package/dist/{chunk-WMTBBQHY.cjs → chunk-PPX7UOFY.cjs} +271 -151
- package/dist/{chunk-6XQSPIN6.cjs → chunk-PWKAX5MS.cjs} +13 -3
- package/dist/{chunk-7XGWBPQQ.cjs → chunk-Q37INCXG.cjs} +13 -8
- package/dist/{chunk-T4M52BA5.cjs → chunk-Q5UX55YA.cjs} +1457 -612
- package/dist/{chunk-53ZCZ46B.cjs → chunk-QGQP6QKO.cjs} +4 -3
- package/dist/{chunk-TZOGZKI7.cjs → chunk-QITSS4TD.cjs} +1381 -626
- package/dist/{chunk-4ZJ5C7UJ.cjs → chunk-QIXEU2WV.cjs} +19 -10
- package/dist/{chunk-HCGWDRZO.mjs → chunk-QJVW76JG.mjs} +17 -6
- package/dist/{chunk-FJWN7RV4.cjs → chunk-QO43L7Z4.cjs} +38 -8
- package/dist/{chunk-ZIHWAN55.cjs → chunk-RE5E2G5S.cjs} +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-E4RDMG3K.mjs → chunk-TEG6HJVF.mjs} +4 -4
- package/dist/{chunk-WAY6LOQH.mjs → chunk-TEJ67GD2.mjs} +1 -1
- package/dist/{chunk-ZNXTU4YH.mjs → chunk-TM2E623I.mjs} +1 -0
- package/dist/{chunk-IFTGERT3.mjs → chunk-TTXIITYA.mjs} +49 -0
- package/dist/{chunk-ZFWYCVKS.mjs → chunk-TY5KCYDE.mjs} +22 -4
- package/dist/{chunk-W2ZXMMHA.mjs → chunk-UHE5JUKB.mjs} +1 -1
- package/dist/{chunk-6X5NKNBE.mjs → chunk-UHNSY2PQ.mjs} +1304 -459
- package/dist/{chunk-UJ3R2AH2.cjs → chunk-UPOYKX4S.cjs} +5 -5
- package/dist/{chunk-2DLGV2ZG.mjs → chunk-UTUS6JUH.mjs} +1 -21
- package/dist/{chunk-Q75QPLBA.mjs → chunk-V5MQMQ2P.mjs} +1 -1
- package/dist/{chunk-TRIDJQ6A.cjs → chunk-V5RTHYJB.cjs} +30 -10
- package/dist/{chunk-QHRCR44V.mjs → chunk-VK54PDQ6.mjs} +25 -5
- package/dist/{chunk-LQNW3ABP.cjs → chunk-VX2HZGC7.cjs} +14 -14
- package/dist/{chunk-2L54YV25.mjs → chunk-WDD5CTZW.mjs} +49 -32
- package/dist/{chunk-7GYCZRTH.mjs → chunk-WGHY3OL5.mjs} +355 -444
- package/dist/{chunk-A2MN5PQJ.mjs → chunk-WMLSZAKN.mjs} +9 -9
- 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-Z7P2BTZ3.cjs → chunk-XGTFLG73.cjs} +30 -12
- package/dist/{chunk-VHHLKIDZ.mjs → chunk-XNZWMXCF.mjs} +1090 -335
- package/dist/{chunk-FIR62CR3.mjs → chunk-XUES6OET.mjs} +1 -1
- package/dist/{chunk-XCXHQBMM.mjs → chunk-Y2LU4LE5.mjs} +1 -1
- package/dist/{chunk-5J45H65F.mjs → chunk-Y5LEPEVH.mjs} +1 -1
- 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-UYRI6U3P.mjs → chunk-YQYTQJZN.mjs} +3 -2
- package/dist/{chunk-X4K7TYN6.cjs → chunk-YVTS3S3F.cjs} +24 -23
- package/dist/{chunk-72KABRWN.mjs → chunk-ZJGFAW5U.mjs} +5 -3
- package/dist/{chunk-TNBJ4LZG.mjs → chunk-ZPKJPM7K.mjs} +4 -4
- 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-CDRvRmbU.d.mts} +2 -2
- package/dist/{client-component.d-D8VcypQA.d.ts → client-component.d-DWRKyAp5.d.ts} +2 -2
- package/dist/client-plugins.cjs +2 -2
- package/dist/{client-plugins.d-D4-6hNx7.d.mts → client-plugins.d-BNILjfX3.d.mts} +94 -140
- package/dist/{client-plugins.d-CXElzotB.d.ts → client-plugins.d-CrKZiNSN.d.ts} +94 -140
- package/dist/client-plugins.d.mts +6 -6
- package/dist/client-plugins.d.ts +6 -6
- package/dist/client-plugins.mjs +1 -1
- package/dist/client.cjs +11 -9
- package/dist/client.d.mts +13 -13
- package/dist/client.d.ts +13 -13
- 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 +6 -6
- package/dist/config.d.ts +6 -6
- 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 +2 -2
- package/dist/deployment.mjs +1 -1
- package/dist/desktop.d.mts +7 -7
- package/dist/desktop.d.ts +7 -7
- package/dist/{devtools-SGYOG36E.cjs → devtools-RZVT4JVN.cjs} +36 -32
- package/dist/{devtools-PUVZB3F2.mjs → devtools-UFQYT3VA.mjs} +31 -27
- package/dist/docs.cjs +26 -25
- package/dist/docs.d.mts +20 -8
- package/dist/docs.d.ts +20 -8
- package/dist/docs.mjs +25 -24
- package/dist/env-types.cjs +3 -3
- package/dist/env-types.mjs +2 -2
- package/dist/environment/vite.cjs +5 -5
- package/dist/environment/vite.mjs +4 -4
- 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 +143 -128
- package/dist/{index.d-SSgYDv4D.d.mts → index.d-Bdm6866n.d.mts} +1 -1
- package/dist/{index.d-A_x10zGS.d.ts → index.d-Dey5T14f.d.ts} +1 -1
- package/dist/index.d.mts +31 -82
- package/dist/index.d.ts +31 -82
- package/dist/index.mjs +214 -199
- package/dist/{integration-orm-52GPGTHO.cjs → integrations/orm.cjs} +5 -5
- package/dist/integrations/orm.d.mts +33 -0
- package/dist/integrations/orm.d.ts +33 -0
- package/dist/{integration-orm-CO23MSFE.mjs → integrations/orm.mjs} +5 -5
- package/dist/integrations.cjs +6 -5
- package/dist/integrations.d.mts +6 -6
- package/dist/integrations.d.ts +6 -6
- package/dist/integrations.mjs +5 -4
- package/dist/internal/app-markdown-runtime.cjs +4 -4
- package/dist/internal/app-markdown-runtime.d.mts +17 -8
- package/dist/internal/app-markdown-runtime.d.ts +17 -8
- package/dist/internal/app-markdown-runtime.mjs +3 -3
- package/dist/internal/build-runtime.cjs +70 -68
- package/dist/internal/build-runtime.d.mts +8 -8
- package/dist/internal/build-runtime.d.ts +8 -8
- package/dist/internal/build-runtime.mjs +69 -67
- package/dist/internal/cli-runtime.cjs +45 -44
- package/dist/internal/cli-runtime.mjs +44 -43
- package/dist/internal/client-error-overlay.cjs +6 -6
- package/dist/internal/client-error-overlay.mjs +2 -2
- package/dist/internal/client-runtime.cjs +60 -6
- package/dist/internal/client-runtime.d.mts +40 -11
- package/dist/internal/client-runtime.d.ts +40 -11
- package/dist/internal/client-runtime.mjs +58 -4
- package/dist/internal/compression-runtime.d.mts +6 -6
- package/dist/internal/compression-runtime.d.ts +6 -6
- package/dist/internal/config-runtime.cjs +25 -24
- package/dist/internal/config-runtime.d.mts +9 -9
- package/dist/internal/config-runtime.d.ts +9 -9
- package/dist/internal/config-runtime.mjs +24 -23
- 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/infra-analytics-runtime.cjs +11 -11
- package/dist/internal/infra-analytics-runtime.mjs +9 -9
- 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 +6 -6
- package/dist/internal/native-server-fns.mjs +5 -5
- package/dist/internal/product-telemetry-runtime.cjs +3 -3
- package/dist/internal/product-telemetry-runtime.mjs +2 -2
- package/dist/internal/production-runtime.cjs +54 -40
- package/dist/internal/production-runtime.d.mts +23 -15
- package/dist/internal/production-runtime.d.ts +23 -15
- package/dist/internal/production-runtime.mjs +69 -55
- package/dist/internal/react-cache.cjs +3 -3
- package/dist/internal/react-cache.mjs +1 -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 +6 -6
- package/dist/markdown.d.ts +6 -6
- package/dist/markdown.mjs +6 -2
- package/dist/middleware.cjs +10 -10
- package/dist/middleware.d.mts +8 -8
- package/dist/middleware.d.ts +8 -8
- package/dist/middleware.mjs +9 -9
- package/dist/mobile.d.mts +4 -4
- package/dist/mobile.d.ts +4 -4
- package/dist/mount.d-BP0nLYQO.d.mts +38 -0
- package/dist/mount.d-CkiPky_F.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-HE2FLS72.cjs → native-tree-W2SSJB3Y.cjs} +5 -5
- package/dist/{native-tree-YF2DSPKM.mjs → native-tree-Y5YQANW7.mjs} +4 -4
- package/dist/{navigation-delegate.d-DQVYKoaZ.d.mts → navigation-delegate.d-CdBP-hkZ.d.mts} +1 -1
- package/dist/{navigation-delegate.d-GghbHJuK.d.ts → navigation-delegate.d-DchcGzAQ.d.ts} +1 -1
- package/dist/navigation.cjs +8 -7
- package/dist/navigation.d.mts +9 -9
- package/dist/navigation.d.ts +9 -9
- package/dist/navigation.mjs +7 -6
- package/dist/{nitro-DD4QCA66.mjs → nitro-55YOZWRA.mjs} +11 -11
- package/dist/{nitro-VRDX2H4M.cjs → nitro-EEX2J3KB.cjs} +13 -13
- package/dist/{plugin-53SY5YBS.mjs → plugin-SAS22JL7.mjs} +4 -3
- package/dist/{plugin-HZIBL3DW.cjs → plugin-WIU4GDD4.cjs} +5 -4
- package/dist/plugin.cjs +61 -59
- package/dist/plugin.d.mts +8 -8
- package/dist/plugin.d.ts +8 -8
- package/dist/plugin.mjs +60 -58
- package/dist/{port-UFUZL6RI.mjs → port-CLL4BC4O.mjs} +1 -1
- package/dist/{port-VTLHPZOI.cjs → port-HASZTQGY.cjs} +9 -9
- package/dist/{production-runtime.d-Bzns3NW9.d.ts → production-runtime.d-Dou_Htas.d.ts} +1 -1
- package/dist/{production-runtime.d-DiFa5vHW.d.mts → production-runtime.d-VwsBzIee.d.mts} +1 -1
- package/dist/query/client.cjs +9 -7
- package/dist/query/client.mjs +5 -3
- package/dist/{render-plan.d-CL_Ikfg_.d.ts → render-plan.d-D8UakAIk.d.ts} +1 -1
- package/dist/{render-plan.d-CcF0MeCf.d.mts → render-plan.d-LKymStDJ.d.mts} +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 +2 -2
- package/dist/renderer/react/server.mjs +3 -3
- package/dist/renderer-client.cjs +8 -6
- package/dist/renderer-client.d.mts +9 -9
- package/dist/renderer-client.d.ts +9 -9
- package/dist/renderer-client.mjs +5 -3
- package/dist/renderer.cjs +6 -2
- package/dist/renderer.d.mts +20 -2
- package/dist/renderer.d.ts +20 -2
- package/dist/renderer.mjs +5 -1
- package/dist/request.cjs +2 -2
- package/dist/{request.d-B1RnTLri.d.ts → request.d-B928QjWy.d.ts} +1 -1
- package/dist/{request.d-DarDOCk9.d.mts → request.d-KG-4d2eG.d.mts} +1 -1
- package/dist/request.d.mts +7 -7
- package/dist/request.d.ts +7 -7
- package/dist/request.mjs +1 -1
- package/dist/{route-rendering.d-BTUYCIj4.d.ts → route-rendering.d-DoEe_w9t.d.ts} +1 -1
- package/dist/{route-rendering.d-D_2Ual0-.d.mts → route-rendering.d-NIHQeb4m.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-Cuv1jntg.d.mts → router.d-B8PkJSGp.d.mts} +1 -1
- package/dist/{router.d-CMANF6da.d.ts → router.d-DYnRHQwz.d.ts} +1 -1
- package/dist/routes.cjs +3 -3
- package/dist/{routes.d-c2HKfrfL.d.mts → routes.d-DgZ_jgGG.d.mts} +1 -1
- package/dist/{routes.d-B6yFe6jm.d.ts → routes.d-uUBZyWoK.d.ts} +1 -1
- package/dist/routes.d.mts +6 -6
- package/dist/routes.d.ts +6 -6
- package/dist/routes.mjs +2 -2
- package/dist/{rsc-pipeline-T3PWURLJ.mjs → rsc-pipeline-4OJ5ZQNZ.mjs} +26 -25
- package/dist/{rsc-pipeline-V4ANLRAA.cjs → rsc-pipeline-7K5H2RPH.cjs} +27 -26
- package/dist/{runtime-LRIQ3XH7.mjs → runtime-U7O3HZOZ.mjs} +62 -36
- package/dist/{runtime-5AROV2C3.cjs → runtime-X52Q7JFR.cjs} +72 -46
- package/dist/{runtime.d-wvh4ngU0.d.mts → runtime.d-BxQIzwfy.d.mts} +11 -3
- package/dist/{runtime.d-C3RQUj6_.d.ts → runtime.d-DP7mEkEF.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-plugins.cjs +7 -7
- package/dist/server-plugins.d.mts +16 -10
- package/dist/server-plugins.d.ts +16 -10
- 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 +160 -120
- package/dist/server.d.mts +20 -14
- package/dist/server.d.ts +20 -14
- package/dist/server.mjs +138 -98
- package/dist/{spa-router.d-WU_qS5gJ.d.mts → spa-router.d-BgHPVMhz.d.mts} +15 -5
- package/dist/{spa-router.d-m8H_Kl_B.d.ts → spa-router.d-DsFDHTsv.d.ts} +15 -5
- package/dist/testing.cjs +17 -17
- package/dist/testing.d.mts +6 -6
- package/dist/testing.d.ts +6 -6
- package/dist/testing.mjs +13 -13
- package/dist/theme/server.cjs +3 -3
- package/dist/theme/server.mjs +2 -2
- package/dist/{utils.d-W9IiEqmW.d.mts → utils.d-BKyKDBR1.d.mts} +1 -1
- package/dist/{utils.d-C9dQD5Zg.d.ts → utils.d-zxAVcf_V.d.ts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +63 -61
- package/dist/vite.d.mts +32 -12
- package/dist/vite.d.ts +32 -12
- package/dist/vite.mjs +62 -60
- package/dist/workflows.cjs +4 -4
- package/dist/workflows.mjs +3 -3
- package/package.json +31 -1
- package/dist/analyzer-GHWK46LX.cjs +0 -16
- package/dist/chunk-5YPBFMBN.cjs +0 -19
- 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/manager-2LUKNX2N.cjs +0 -14
- /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,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkAQIRXBBYcjs = require('./chunk-AQIRXBBY.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkSBDWCDS6cjs = require('./chunk-SBDWCDS6.cjs');
|
|
@@ -325,7 +325,7 @@ export const apiRoutes = ${manifestSource} as const;
|
|
|
325
325
|
const routes = this.scanAPIRoutes();
|
|
326
326
|
const content = this.generateAPIRouter(routes, { outFile: outputPath });
|
|
327
327
|
_fs.mkdirSync.call(void 0, _path.dirname.call(void 0, outputPath), { recursive: true });
|
|
328
|
-
|
|
328
|
+
_chunkAQIRXBBYcjs.writeFileIfChanged.call(void 0, outputPath, content);
|
|
329
329
|
console.log(`\u2705 Generated API types for ${routes.length} routes`);
|
|
330
330
|
}
|
|
331
331
|
};
|
|
@@ -62,6 +62,9 @@ function emitFarmAgentRead(request, surface, status, view) {
|
|
|
62
62
|
// src/markdown-view.ts
|
|
63
63
|
var FENCE = /^\s{0,3}(`{3,}|~{3,})/;
|
|
64
64
|
var ATX_HEADING = /^\s{0,3}(#{1,6})[ \t]+(.+?)[ \t]*#*[ \t]*$/;
|
|
65
|
+
function normalizeMarkdownLineEndings(markdown) {
|
|
66
|
+
return markdown.includes("\r") ? markdown.replace(/\r\n?/g, "\n") : markdown;
|
|
67
|
+
}
|
|
65
68
|
function parseMarkdownHeadingsFromLines(lines) {
|
|
66
69
|
const headings = [];
|
|
67
70
|
const used = /* @__PURE__ */ new Map();
|
|
@@ -124,6 +127,7 @@ function selectFarmMarkdownView(markdown, searchParams, markdownPath) {
|
|
|
124
127
|
const budget = searchParams.get("max_tokens");
|
|
125
128
|
if (!wantsOutline && sectionId === null && budget === null)
|
|
126
129
|
return { status: 200, body: markdown };
|
|
130
|
+
markdown = normalizeMarkdownLineEndings(markdown);
|
|
127
131
|
const viewUrl = (view) => {
|
|
128
132
|
const query = new URLSearchParams(searchParams);
|
|
129
133
|
for (const name of FARM_MARKDOWN_VIEW_PARAMS) query.delete(name);
|
|
@@ -193,9 +197,9 @@ function markdownCodeSpan(value) {
|
|
|
193
197
|
const pad = text.startsWith("`") || text.endsWith("`") ? " " : "";
|
|
194
198
|
return `${fence}${pad}${text}${pad}${fence}`;
|
|
195
199
|
}
|
|
196
|
-
function selectFarmPageActionsView(markdownPath, actions, headers) {
|
|
200
|
+
function selectFarmPageActionsView(markdownPath, pagePath, actions, headers) {
|
|
197
201
|
headers.set("Content-Type", "application/json; charset=utf-8");
|
|
198
|
-
const page = markdownPath === "/index.md" ? "/" : markdownPath.replace(/\.md$/, "");
|
|
202
|
+
const page = _nullishCoalesce(pagePath, () => ( (markdownPath === "/index.md" ? "/" : markdownPath.replace(/\.md$/, ""))));
|
|
199
203
|
return {
|
|
200
204
|
status: 200,
|
|
201
205
|
body: `${JSON.stringify({ page, markdown: markdownPath, actions }, null, 2)}
|
|
@@ -328,7 +332,12 @@ function ifNoneMatchIncludes(header, etag) {
|
|
|
328
332
|
}
|
|
329
333
|
function createFarmMarkdownViewResponse(options) {
|
|
330
334
|
const url = _nullishCoalesce(options.requestUrl, () => ( new URL(options.request.url)));
|
|
331
|
-
const view = options.status >= 400 ? { status: options.status, body: options.markdown } : url.searchParams.has("actions") ? selectFarmPageActionsView(
|
|
335
|
+
const view = options.status >= 400 ? { status: options.status, body: options.markdown } : url.searchParams.has("actions") ? selectFarmPageActionsView(
|
|
336
|
+
options.markdownPath,
|
|
337
|
+
options.pagePath,
|
|
338
|
+
_nullishCoalesce(options.actions, () => ( [])),
|
|
339
|
+
options.headers
|
|
340
|
+
) : selectFarmMarkdownView(options.markdown, url.searchParams, options.markdownPath);
|
|
332
341
|
let status = view.status === 200 ? options.status : view.status;
|
|
333
342
|
const ifMatch = options.request.headers.get("if-match");
|
|
334
343
|
const preconditionFailed = status >= 200 && status < 300 && ifMatch !== null && ifMatch.trim() !== "*";
|
|
@@ -406,26 +415,32 @@ function resolveMarkdownMirrorTarget(config, pathname, options = {}) {
|
|
|
406
415
|
if (!_optionalChain([config, 'optionalAccess', _8 => _8.enabled]) || !hasMarkdownExtension && !requestAcceptsMarkdown(options.accept)) {
|
|
407
416
|
return null;
|
|
408
417
|
}
|
|
409
|
-
const targetPathname =
|
|
410
|
-
|
|
418
|
+
const targetPathname = _resolveFarmMarkdownIndexAlias(
|
|
419
|
+
normalizeMarkdownRoute(
|
|
420
|
+
hasMarkdownExtension ? pathname.slice(0, -".md".length) || "/" : pathname
|
|
421
|
+
),
|
|
422
|
+
options.routePathname
|
|
411
423
|
);
|
|
412
|
-
const
|
|
424
|
+
const routePathname = _nullishCoalesce(_optionalChain([options, 'access', _9 => _9.routePathname, 'optionalCall', _10 => _10(targetPathname)]), () => ( targetPathname));
|
|
425
|
+
const route = findExposedMarkdownRoute(config, routePathname);
|
|
413
426
|
if (!route && config.expose !== true) {
|
|
414
427
|
return null;
|
|
415
428
|
}
|
|
416
429
|
return {
|
|
417
430
|
pathname: targetPathname,
|
|
418
|
-
route
|
|
431
|
+
route,
|
|
432
|
+
markdownPath: _getFarmMarkdownPath(targetPathname, routePathname)
|
|
419
433
|
};
|
|
420
434
|
}
|
|
421
435
|
async function createMarkdownMirrorResponse(options) {
|
|
422
436
|
if (options.request.method !== "GET" && options.request.method !== "HEAD") {
|
|
423
437
|
return null;
|
|
424
438
|
}
|
|
425
|
-
const requestUrl = _optionalChain([options, 'access',
|
|
439
|
+
const requestUrl = _optionalChain([options, 'access', _11 => _11.requestUrl, 'optionalAccess', _12 => _12.href]) === options.request.url ? options.requestUrl : new URL(options.request.url);
|
|
426
440
|
const hasMarkdownExtension = requestUrl.pathname.toLowerCase().endsWith(".md");
|
|
427
441
|
const target = resolveMarkdownMirrorTarget(options.config, requestUrl.pathname, {
|
|
428
|
-
accept: options.request.headers.get("accept")
|
|
442
|
+
accept: options.request.headers.get("accept"),
|
|
443
|
+
routePathname: options.routePathname
|
|
429
444
|
});
|
|
430
445
|
if (!target) {
|
|
431
446
|
return null;
|
|
@@ -463,7 +478,7 @@ async function createMarkdownMirrorResponse(options) {
|
|
|
463
478
|
options.request.method === "HEAD"
|
|
464
479
|
);
|
|
465
480
|
if (accessResponse || options.request.method === "HEAD") {
|
|
466
|
-
void _optionalChain([pageResponse, 'access',
|
|
481
|
+
void _optionalChain([pageResponse, 'access', _13 => _13.body, 'optionalAccess', _14 => _14.cancel, 'call', _15 => _15(), 'access', _16 => _16.catch, 'call', _17 => _17(() => {
|
|
467
482
|
})]);
|
|
468
483
|
return _nullishCoalesce(accessResponse, () => ( new Response(null, {
|
|
469
484
|
status: pageResponse.status,
|
|
@@ -474,11 +489,11 @@ async function createMarkdownMirrorResponse(options) {
|
|
|
474
489
|
return pageResponse;
|
|
475
490
|
}
|
|
476
491
|
const html = await pageResponse.text();
|
|
477
|
-
const markdownPath = target.
|
|
492
|
+
const markdownPath = target.markdownPath;
|
|
478
493
|
const region = pageResponse.status < 400 && /<form\b/i.test(html) ? readHtmlContentRegion(html) : void 0;
|
|
479
494
|
const actions = region === void 0 ? [] : extractPageActionsFromRegion(region, pageUrl);
|
|
480
495
|
for (const form of actions) {
|
|
481
|
-
if (!_optionalChain([form, 'access',
|
|
496
|
+
if (!_optionalChain([form, 'access', _18 => _18.action, 'optionalAccess', _19 => _19.startsWith, 'call', _20 => _20("/")])) continue;
|
|
482
497
|
const pathname = new URL(form.action, pageUrl.origin).pathname;
|
|
483
498
|
const tool = _nullishCoalesce(_chunkLRB5OVRTcjs._findFarmMCPEndpointTool.call(void 0, form.method, pathname, options.apiServerBasePath), () => ( _chunkLRB5OVRTcjs._findFarmMCPEndpointTool.call(void 0, form.method, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname), options.apiServerBasePath)));
|
|
484
499
|
if (tool) form.tool = tool;
|
|
@@ -486,8 +501,8 @@ async function createMarkdownMirrorResponse(options) {
|
|
|
486
501
|
const markdown = pageResponse.status < 400 && requestUrl.searchParams.has("actions") ? "" : convertHtmlToMarkdown(
|
|
487
502
|
html,
|
|
488
503
|
{
|
|
489
|
-
title: _optionalChain([target, 'access',
|
|
490
|
-
includeMetadata: _nullishCoalesce(_optionalChain([options, 'access',
|
|
504
|
+
title: _optionalChain([target, 'access', _21 => _21.route, 'optionalAccess', _22 => _22.title]),
|
|
505
|
+
includeMetadata: _nullishCoalesce(_optionalChain([options, 'access', _23 => _23.config, 'optionalAccess', _24 => _24.includeMetadata]), () => ( true)),
|
|
491
506
|
sourcePath: target.pathname,
|
|
492
507
|
actionsPath: actions.length > 0 ? `${markdownPath}?actions` : void 0
|
|
493
508
|
},
|
|
@@ -501,12 +516,12 @@ async function createMarkdownMirrorResponse(options) {
|
|
|
501
516
|
if (!hasMarkdownExtension) {
|
|
502
517
|
headersOut.set("Vary", "Accept");
|
|
503
518
|
}
|
|
504
|
-
for (const token of _nullishCoalesce(_optionalChain([pageResponse, 'access',
|
|
519
|
+
for (const token of _nullishCoalesce(_optionalChain([pageResponse, 'access', _25 => _25.headers, 'access', _26 => _26.get, 'call', _27 => _27("vary"), 'optionalAccess', _28 => _28.split, 'call', _29 => _29(",")]), () => ( []))) {
|
|
505
520
|
const name = token.trim();
|
|
506
521
|
if (name && name.toLowerCase() !== "accept") appendHeaderToken(headersOut, "Vary", name);
|
|
507
522
|
}
|
|
508
523
|
const pageCacheControl = pageResponse.headers.get("cache-control");
|
|
509
|
-
const cache = _nullishCoalesce(_nullishCoalesce(_optionalChain([target, 'access',
|
|
524
|
+
const cache = _nullishCoalesce(_nullishCoalesce(_optionalChain([target, 'access', _30 => _30.route, 'optionalAccess', _31 => _31.cache]), () => ( _optionalChain([options, 'access', _32 => _32.config, 'optionalAccess', _33 => _33.cache]))), () => ( false));
|
|
510
525
|
headersOut.set(
|
|
511
526
|
"Cache-Control",
|
|
512
527
|
pageCacheControl && isPrivateCacheControl(pageCacheControl) ? pageCacheControl : headers.has("cookie") || headers.has("authorization") ? "private, no-store" : createMarkdownCacheHeader(cache)
|
|
@@ -515,7 +530,7 @@ async function createMarkdownMirrorResponse(options) {
|
|
|
515
530
|
if (pageResponse.status >= 400) {
|
|
516
531
|
preserveMarkdownResponseControlHeaders(pageResponse.headers, headersOut);
|
|
517
532
|
}
|
|
518
|
-
const robots = [pageResponse.headers.get("x-robots-tag"), readHtmlMetaContent(html, "robots")].filter((value) => Boolean(_optionalChain([value, 'optionalAccess',
|
|
533
|
+
const robots = [pageResponse.headers.get("x-robots-tag"), readHtmlMetaContent(html, "robots")].filter((value) => Boolean(_optionalChain([value, 'optionalAccess', _34 => _34.trim, 'call', _35 => _35()]))).join(", ");
|
|
519
534
|
if (robots) headersOut.set("X-Robots-Tag", robots);
|
|
520
535
|
const canonical = readHtmlCanonicalHref(html);
|
|
521
536
|
if (canonical) {
|
|
@@ -531,6 +546,7 @@ async function createMarkdownMirrorResponse(options) {
|
|
|
531
546
|
status: pageResponse.status,
|
|
532
547
|
headers: headersOut,
|
|
533
548
|
markdownPath,
|
|
549
|
+
pagePath: target.pathname,
|
|
534
550
|
actions
|
|
535
551
|
});
|
|
536
552
|
}
|
|
@@ -586,7 +602,9 @@ function applyMarkdownNegotiationHeaders(response, options) {
|
|
|
586
602
|
if (!isHtmlResponse(response)) {
|
|
587
603
|
return response;
|
|
588
604
|
}
|
|
589
|
-
const alternatePath = getFarmMarkdownAlternatePath(options.config, options.pathname
|
|
605
|
+
const alternatePath = getFarmMarkdownAlternatePath(options.config, options.pathname, {
|
|
606
|
+
routePathname: options.routePathname
|
|
607
|
+
});
|
|
590
608
|
if (!alternatePath) {
|
|
591
609
|
return response;
|
|
592
610
|
}
|
|
@@ -777,6 +795,16 @@ function normalizeMarkdownRouteInput(input) {
|
|
|
777
795
|
route: normalizeMarkdownRoute(input.route)
|
|
778
796
|
};
|
|
779
797
|
}
|
|
798
|
+
function _resolveFarmMarkdownIndexAlias(pathname, routePathname) {
|
|
799
|
+
if (pathname === "/index") return "/";
|
|
800
|
+
if (!routePathname || !pathname.endsWith("/index")) return pathname;
|
|
801
|
+
const prefix = pathname.slice(0, -"/index".length);
|
|
802
|
+
return routePathname(prefix) === "/" ? prefix : pathname;
|
|
803
|
+
}
|
|
804
|
+
function _getFarmMarkdownPath(pathname, routePathname = pathname) {
|
|
805
|
+
if (routePathname !== "/") return `${pathname}.md`;
|
|
806
|
+
return pathname === "/" ? "/index.md" : `${pathname.replace(/\/+$/, "")}/index.md`;
|
|
807
|
+
}
|
|
780
808
|
function normalizeMarkdownRoute(route) {
|
|
781
809
|
const withoutMarkdownExtension = route.toLowerCase().endsWith(".md") ? route.slice(0, -3) : route;
|
|
782
810
|
const withSlash = withoutMarkdownExtension.startsWith("/") ? withoutMarkdownExtension : `/${withoutMarkdownExtension}`;
|
|
@@ -819,12 +847,15 @@ function getMarkdownAlternatePath(pathname) {
|
|
|
819
847
|
function getFarmMarkdownMirrorPath(pathname) {
|
|
820
848
|
return getMarkdownAlternatePath(pathname);
|
|
821
849
|
}
|
|
822
|
-
function getFarmMarkdownAlternatePath(config, pathname) {
|
|
823
|
-
const target = resolveMarkdownMirrorTarget(config, pathname, {
|
|
824
|
-
|
|
850
|
+
function getFarmMarkdownAlternatePath(config, pathname, options = {}) {
|
|
851
|
+
const target = resolveMarkdownMirrorTarget(config, pathname, {
|
|
852
|
+
accept: "text/markdown",
|
|
853
|
+
routePathname: options.routePathname
|
|
854
|
+
});
|
|
855
|
+
return target ? target.markdownPath : null;
|
|
825
856
|
}
|
|
826
857
|
function isFarmMarkdownMirrorExposed(config, pathname) {
|
|
827
|
-
if (!_optionalChain([config, 'optionalAccess',
|
|
858
|
+
if (!_optionalChain([config, 'optionalAccess', _36 => _36.enabled])) return false;
|
|
828
859
|
return config.expose === true || findExposedMarkdownRoute(config, pathname) !== null;
|
|
829
860
|
}
|
|
830
861
|
function matchesFarmMarkdownRoutePattern(pattern, pathname) {
|
|
@@ -910,7 +941,7 @@ function extractHtmlBody(html) {
|
|
|
910
941
|
const body = rootMatch ? rootMatch[1] : bodyMatch ? bodyMatch[1] : html;
|
|
911
942
|
const main = extractFirstElementContent(body, ["main"]);
|
|
912
943
|
if (main !== void 0) return main;
|
|
913
|
-
const articles = _nullishCoalesce(_optionalChain([body, 'access',
|
|
944
|
+
const articles = _nullishCoalesce(_optionalChain([body, 'access', _37 => _37.match, 'call', _38 => _38(/<article\b/gi), 'optionalAccess', _39 => _39.length]), () => ( 0));
|
|
914
945
|
return articles === 1 ? _nullishCoalesce(extractFirstElementContent(body, ["article"]), () => ( body)) : body;
|
|
915
946
|
}
|
|
916
947
|
function extractFirstElementContent(html, tagNames) {
|
|
@@ -924,7 +955,7 @@ function extractFirstElementContent(html, tagNames) {
|
|
|
924
955
|
}
|
|
925
956
|
function readHtmlMetaContent(html, name) {
|
|
926
957
|
for (const match of html.matchAll(/<meta\b([^>]*)>/gi)) {
|
|
927
|
-
if (_optionalChain([readHtmlAttribute, 'call',
|
|
958
|
+
if (_optionalChain([readHtmlAttribute, 'call', _40 => _40(match[1], "name"), 'optionalAccess', _41 => _41.toLowerCase, 'call', _42 => _42()]) === name) {
|
|
928
959
|
return readHtmlAttribute(match[1], "content");
|
|
929
960
|
}
|
|
930
961
|
}
|
|
@@ -932,8 +963,8 @@ function readHtmlMetaContent(html, name) {
|
|
|
932
963
|
}
|
|
933
964
|
function readHtmlCanonicalHref(html) {
|
|
934
965
|
for (const match of html.matchAll(/<link\b([^>]*)>/gi)) {
|
|
935
|
-
const rel = _optionalChain([readHtmlAttribute, 'call',
|
|
936
|
-
if (_optionalChain([rel, 'optionalAccess',
|
|
966
|
+
const rel = _optionalChain([readHtmlAttribute, 'call', _43 => _43(match[1], "rel"), 'optionalAccess', _44 => _44.toLowerCase, 'call', _45 => _45(), 'access', _46 => _46.split, 'call', _47 => _47(/\s+/)]);
|
|
967
|
+
if (_optionalChain([rel, 'optionalAccess', _48 => _48.includes, 'call', _49 => _49("canonical")])) return readHtmlAttribute(match[1], "href");
|
|
937
968
|
}
|
|
938
969
|
return void 0;
|
|
939
970
|
}
|
|
@@ -960,7 +991,7 @@ function extractPageActionsFromRegion(region, pageUrl) {
|
|
|
960
991
|
return actions;
|
|
961
992
|
}
|
|
962
993
|
function readPageForm(attributes, content, pageUrl, labelsFor) {
|
|
963
|
-
const method = _optionalChain([readDecodedAttribute, 'call',
|
|
994
|
+
const method = _optionalChain([readDecodedAttribute, 'call', _50 => _50(attributes, "method"), 'optionalAccess', _51 => _51.trim, 'call', _52 => _52(), 'access', _53 => _53.toLowerCase, 'call', _54 => _54()]);
|
|
964
995
|
if (method === "dialog") return void 0;
|
|
965
996
|
const target = resolveFormTarget(readDecodedAttribute(attributes, "action"), pageUrl);
|
|
966
997
|
const form = {
|
|
@@ -970,11 +1001,11 @@ function readPageForm(attributes, content, pageUrl, labelsFor) {
|
|
|
970
1001
|
submit: []
|
|
971
1002
|
};
|
|
972
1003
|
const name = _nullishCoalesce(_nullishCoalesce(readDecodedAttribute(attributes, "aria-label"), () => ( readDecodedAttribute(attributes, "name"))), () => ( readDecodedAttribute(attributes, "id")));
|
|
973
|
-
if (_optionalChain([name, 'optionalAccess',
|
|
1004
|
+
if (_optionalChain([name, 'optionalAccess', _55 => _55.trim, 'call', _56 => _56()])) form.name = name.trim();
|
|
974
1005
|
if (target) form.action = target;
|
|
975
1006
|
else form.requiresJavaScript = true;
|
|
976
1007
|
if (form.method === "POST") {
|
|
977
|
-
const enctype = _optionalChain([readDecodedAttribute, 'call',
|
|
1008
|
+
const enctype = _optionalChain([readDecodedAttribute, 'call', _57 => _57(attributes, "enctype"), 'optionalAccess', _58 => _58.trim, 'call', _59 => _59(), 'access', _60 => _60.toLowerCase, 'call', _61 => _61()]);
|
|
978
1009
|
form.enctype = enctype && FORM_ENCTYPES.has(enctype) ? enctype : "application/x-www-form-urlencoded";
|
|
979
1010
|
}
|
|
980
1011
|
const wrappingLabels = [...content.matchAll(/<label\b[^>]*>([\s\S]*?)<\/label>/gi)].map(
|
|
@@ -985,13 +1016,13 @@ function readPageForm(attributes, content, pageUrl, labelsFor) {
|
|
|
985
1016
|
})
|
|
986
1017
|
);
|
|
987
1018
|
const labelOf = (controlAttributes, index) => {
|
|
988
|
-
const aria = _optionalChain([readDecodedAttribute, 'call',
|
|
1019
|
+
const aria = _optionalChain([readDecodedAttribute, 'call', _62 => _62(controlAttributes, "aria-label"), 'optionalAccess', _63 => _63.trim, 'call', _64 => _64()]);
|
|
989
1020
|
if (aria) return aria;
|
|
990
1021
|
const id = readDecodedAttribute(controlAttributes, "id");
|
|
991
1022
|
const forLabel = id ? labelsFor.get(id) : void 0;
|
|
992
1023
|
if (forLabel) return forLabel;
|
|
993
1024
|
const wrapping = wrappingLabels.find((label) => label.start < index && index < label.end);
|
|
994
|
-
return _optionalChain([wrapping, 'optionalAccess',
|
|
1025
|
+
return _optionalChain([wrapping, 'optionalAccess', _65 => _65.text]) || void 0;
|
|
995
1026
|
};
|
|
996
1027
|
const groups = /* @__PURE__ */ new Map();
|
|
997
1028
|
const controls = /<(input)\b([^>]*)>|<(select|textarea|button)\b([^>]*)>([\s\S]*?)<\/\3>/gi;
|
|
@@ -1002,7 +1033,7 @@ function readPageForm(attributes, content, pageUrl, labelsFor) {
|
|
|
1002
1033
|
if (hasHtmlAttribute(controlAttributes, "disabled")) continue;
|
|
1003
1034
|
const label = labelOf(controlAttributes, match.index);
|
|
1004
1035
|
const fieldName = readDecodedAttribute(controlAttributes, "name");
|
|
1005
|
-
const typeAttribute = _optionalChain([readDecodedAttribute, 'call',
|
|
1036
|
+
const typeAttribute = _optionalChain([readDecodedAttribute, 'call', _66 => _66(controlAttributes, "type"), 'optionalAccess', _67 => _67.trim, 'call', _68 => _68(), 'access', _69 => _69.toLowerCase, 'call', _70 => _70()]);
|
|
1006
1037
|
const type = tag === "input" ? _nullishCoalesce(typeAttribute, () => ( "text")) : tag === "button" ? _nullishCoalesce(typeAttribute, () => ( "submit")) : tag;
|
|
1007
1038
|
if (tag === "button" && !["button", "reset"].includes(type) || tag === "input" && (type === "submit" || type === "image")) {
|
|
1008
1039
|
const submit = {
|
|
@@ -1016,7 +1047,7 @@ function readPageForm(attributes, content, pageUrl, labelsFor) {
|
|
|
1016
1047
|
const resolved = resolveFormTarget(formAction, pageUrl);
|
|
1017
1048
|
if (resolved) submit.action = resolved;
|
|
1018
1049
|
}
|
|
1019
|
-
const formMethod = _optionalChain([readDecodedAttribute, 'call',
|
|
1050
|
+
const formMethod = _optionalChain([readDecodedAttribute, 'call', _71 => _71(controlAttributes, "formmethod"), 'optionalAccess', _72 => _72.toLowerCase, 'call', _73 => _73()]);
|
|
1020
1051
|
if (formMethod === "get" || formMethod === "post") submit.method = formMethod.toUpperCase();
|
|
1021
1052
|
form.submit.push(submit);
|
|
1022
1053
|
continue;
|
|
@@ -1094,7 +1125,7 @@ function readPageForm(attributes, content, pageUrl, labelsFor) {
|
|
|
1094
1125
|
function resolveFormTarget(action, pageUrl) {
|
|
1095
1126
|
let target;
|
|
1096
1127
|
try {
|
|
1097
|
-
target = new URL(_optionalChain([action, 'optionalAccess',
|
|
1128
|
+
target = new URL(_optionalChain([action, 'optionalAccess', _74 => _74.trim, 'call', _75 => _75()]) || pageUrl.href, pageUrl);
|
|
1098
1129
|
} catch (e5) {
|
|
1099
1130
|
return void 0;
|
|
1100
1131
|
}
|
|
@@ -1121,7 +1152,7 @@ function readHtmlAttribute(attributes, name) {
|
|
|
1121
1152
|
}
|
|
1122
1153
|
function readCodeLanguage(attributesList) {
|
|
1123
1154
|
for (const attributes of attributesList) {
|
|
1124
|
-
const language = _nullishCoalesce(_nullishCoalesce(readHtmlAttribute(attributes, "data-language"), () => ( readHtmlAttribute(attributes, "data-lang"))), () => ( _optionalChain([readHtmlAttribute, 'call',
|
|
1155
|
+
const language = _nullishCoalesce(_nullishCoalesce(readHtmlAttribute(attributes, "data-language"), () => ( readHtmlAttribute(attributes, "data-lang"))), () => ( _optionalChain([readHtmlAttribute, 'call', _76 => _76(attributes, "class"), 'optionalAccess', _77 => _77.match, 'call', _78 => _78(/(?:^|\s)lang(?:uage)?-(\S+)/), 'optionalAccess', _79 => _79[1]])));
|
|
1125
1156
|
if (language && /^[\w#+.-]+$/.test(language)) return language;
|
|
1126
1157
|
}
|
|
1127
1158
|
return void 0;
|
|
@@ -1229,7 +1260,7 @@ function matchClosingTags(html) {
|
|
|
1229
1260
|
while (match = tags.exec(html)) {
|
|
1230
1261
|
const name = match[2].toLowerCase();
|
|
1231
1262
|
if (match[1]) {
|
|
1232
|
-
const start = _optionalChain([open, 'access',
|
|
1263
|
+
const start = _optionalChain([open, 'access', _80 => _80.get, 'call', _81 => _81(name), 'optionalAccess', _82 => _82.pop, 'call', _83 => _83()]);
|
|
1233
1264
|
if (start !== void 0) closes.set(start, match.index + match[0].length);
|
|
1234
1265
|
} else if (!VOID_TAGS.has(name) && !isSelfClosingTag(match[0])) {
|
|
1235
1266
|
let starts = open.get(name);
|
|
@@ -1262,7 +1293,7 @@ function resolveStreamedBoundaries(html, { boundaries, placeholders }) {
|
|
|
1262
1293
|
let cursor = 0;
|
|
1263
1294
|
let match;
|
|
1264
1295
|
while (match = openingTag.exec(html)) {
|
|
1265
|
-
const id = _optionalChain([/\sid="([^"]*)"/, 'access',
|
|
1296
|
+
const id = _optionalChain([/\sid="([^"]*)"/, 'access', _84 => _84.exec, 'call', _85 => _85(match[2]), 'optionalAccess', _86 => _86[1]]);
|
|
1266
1297
|
if (!id || !wanted.has(id) || segments.has(id)) continue;
|
|
1267
1298
|
const close = closingTags.get(match.index);
|
|
1268
1299
|
if (close === void 0) continue;
|
|
@@ -1357,4 +1388,6 @@ function decodeHtml(input) {
|
|
|
1357
1388
|
|
|
1358
1389
|
|
|
1359
1390
|
|
|
1360
|
-
|
|
1391
|
+
|
|
1392
|
+
|
|
1393
|
+
exports.classifyFarmAgent = classifyFarmAgent; exports.FARM_INTERNAL_READ_HEADER = FARM_INTERNAL_READ_HEADER; exports.emitFarmAgentRead = emitFarmAgentRead; exports.createFarmMarkdownViewResponse = createFarmMarkdownViewResponse; exports.FARM_MARKDOWN_CONTENT_TYPE = FARM_MARKDOWN_CONTENT_TYPE; exports.FARM_MARKDOWN_PAGE_CHECK_HEADER = FARM_MARKDOWN_PAGE_CHECK_HEADER; exports._getFarmMarkdownPageCheckToken = _getFarmMarkdownPageCheckToken; exports._isFarmMarkdownPageCheck = _isFarmMarkdownPageCheck; exports.farmRequestWantsMarkdown = farmRequestWantsMarkdown; exports.createFarmMarkdownErrorBody = createFarmMarkdownErrorBody; exports.resolveMarkdownConfig = resolveMarkdownConfig; exports.resolveMarkdownMirrorTarget = resolveMarkdownMirrorTarget; exports.createMarkdownMirrorResponse = createMarkdownMirrorResponse; exports.applyMarkdownNegotiationHeaders = applyMarkdownNegotiationHeaders; exports.htmlToMarkdown = htmlToMarkdown; exports._resolveFarmMarkdownIndexAlias = _resolveFarmMarkdownIndexAlias; exports._getFarmMarkdownPath = _getFarmMarkdownPath; exports.farmAcceptQuality = farmAcceptQuality; exports.requestAcceptsMarkdown = requestAcceptsMarkdown; exports.getFarmMarkdownMirrorPath = getFarmMarkdownMirrorPath; exports.getFarmMarkdownAlternatePath = getFarmMarkdownAlternatePath; exports.isFarmMarkdownMirrorExposed = isFarmMarkdownMirrorExposed; exports.matchesFarmMarkdownRoutePattern = matchesFarmMarkdownRoutePattern; exports._readFarmRenderedHtml = _readFarmRenderedHtml; exports.extractFarmPageActions = extractFarmPageActions;
|
|
@@ -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(
|
|
@@ -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
|