@farm.js/core 0.1.68 → 0.1.70
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-FER4MQDF.cjs → agent-mcp-handler-6T2Z7TB6.cjs} +8 -5
- package/dist/{agent-mcp-handler-AZ7QW4UP.mjs → agent-mcp-handler-CPU354QQ.mjs} +7 -4
- package/dist/{agent-mcp.d-Uh5xr7aX.d.ts → agent-mcp.d-DulgFLBt.d.ts} +13 -4
- package/dist/{agent-mcp.d-wkVPK1GA.d.mts → agent-mcp.d-TAs1ES2F.d.mts} +13 -4
- package/dist/agent-runtime.cjs +3 -3
- package/dist/agent-runtime.d.mts +3 -2
- package/dist/agent-runtime.d.ts +3 -2
- package/dist/agent-runtime.mjs +2 -2
- package/dist/analyzer-GUIRJWZH.cjs +16 -0
- package/dist/{analyzer-CQDU7E3Y.mjs → analyzer-QGRBLETM.mjs} +2 -2
- package/dist/api/node.d.mts +5 -4
- package/dist/api/node.d.ts +5 -4
- package/dist/api/route-manager.cjs +4 -4
- package/dist/api/route-manager.d.mts +16 -7
- package/dist/api/route-manager.d.ts +16 -7
- package/dist/api/route-manager.mjs +3 -3
- package/dist/api/runtime.d.mts +4 -3
- package/dist/api/runtime.d.ts +4 -3
- package/dist/api.cjs +6 -6
- package/dist/api.d.mts +8 -24
- package/dist/api.d.ts +8 -24
- package/dist/api.mjs +5 -5
- package/dist/{app-manifest.d-Dd4q5CFx.d.mts → app-manifest.d-6zXb90o6.d.mts} +1 -1
- package/dist/{app-manifest.d-BT5i2F-o.d.ts → app-manifest.d-C-nf3Vmm.d.ts} +1 -1
- package/dist/app-markdown.cjs +5 -4
- package/dist/app-markdown.d.mts +4 -3
- package/dist/app-markdown.d.ts +4 -3
- package/dist/app-markdown.mjs +4 -3
- package/dist/{app.d-BVOpL_f2.d.ts → app.d-C2xeMIYT.d.ts} +18 -8
- package/dist/{app.d-BhiDXex_.d.mts → app.d-DF0aundc.d.mts} +18 -8
- package/dist/{base-path.d-BOUV5ozD.d.mts → base-path.d-BJ3SYpB8.d.mts} +7 -1
- package/dist/{base-path.d-BOUV5ozD.d.ts → base-path.d-BJ3SYpB8.d.ts} +7 -1
- package/dist/{chunk-4ZXKYCYK.mjs → chunk-255J7K4X.mjs} +1 -1
- package/dist/{chunk-RVGLYMJM.cjs → chunk-2AM26UGI.cjs} +2 -2
- package/dist/{chunk-UPOYKX4S.cjs → chunk-2MR4MABG.cjs} +4 -4
- package/dist/chunk-2RCCFB2Y.cjs +129 -0
- package/dist/{chunk-K6VFYFOY.cjs → chunk-2W4GNXGX.cjs} +2 -2
- package/dist/{chunk-URN7VFO7.cjs → chunk-32SYRIQ7.cjs} +21 -22
- package/dist/{chunk-CV6MFQ4Y.mjs → chunk-3AUINHFG.mjs} +1 -1
- package/dist/{chunk-KDO6T6OB.mjs → chunk-3EXCZJEN.mjs} +2 -2
- package/dist/{chunk-MMDKYJ5V.cjs → chunk-3GNVIYPO.cjs} +7 -7
- package/dist/{chunk-65Y5SIBH.cjs → chunk-3QM74STY.cjs} +1 -1
- package/dist/{chunk-NT4W4H52.mjs → chunk-3WS5AZ3R.mjs} +23 -18
- package/dist/{chunk-FJMC24KG.cjs → chunk-42KMUIWZ.cjs} +0 -3
- package/dist/{chunk-LR4KP3I7.cjs → chunk-4AC4PXZO.cjs} +2 -2
- package/dist/{chunk-YVPX5PI5.mjs → chunk-4O26BPUY.mjs} +8 -0
- package/dist/{chunk-LENKRGBV.mjs → chunk-5CFHQ7HM.mjs} +1 -1
- package/dist/{chunk-G7NBPP7H.mjs → chunk-5IJRJWJS.mjs} +1 -1
- package/dist/{chunk-MV7NWU23.mjs → chunk-5R3JQPWD.mjs} +1 -1
- package/dist/{chunk-3Y52TWYU.mjs → chunk-62ZRA7XU.mjs} +0 -3
- package/dist/{chunk-5JKDFRTK.cjs → chunk-65FPDDT4.cjs} +2 -2
- package/dist/{chunk-K6SXMVXO.mjs → chunk-75E5FDX2.mjs} +22 -7
- package/dist/{chunk-K76CBYQM.mjs → chunk-7A3URI2F.mjs} +20 -0
- package/dist/{chunk-VFNAK6A5.mjs → chunk-A2TH5MKE.mjs} +9 -5
- package/dist/{chunk-225APHKC.cjs → chunk-A7HCBHMC.cjs} +3 -3
- package/dist/{chunk-VX2HZGC7.cjs → chunk-ACGBXN3U.cjs} +2 -2
- package/dist/{chunk-Z3PW3DIR.cjs → chunk-BPUVDCGG.cjs} +5 -5
- package/dist/{chunk-FT6KJHS3.cjs → chunk-C2JOS77Z.cjs} +4 -1
- package/dist/{chunk-DIXFKAPM.mjs → chunk-CCHJWJGP.mjs} +297 -148
- package/dist/{chunk-CRVSYDHV.mjs → chunk-CKQAQFF6.mjs} +2 -2
- package/dist/chunk-DC2AXGNZ.mjs +129 -0
- package/dist/{chunk-TNK2TVRS.cjs → chunk-DIHBWZDZ.cjs} +449 -352
- package/dist/{chunk-JSOCDYER.cjs → chunk-DMXMIE2C.cjs} +15 -1
- package/dist/{chunk-23VJEGKC.cjs → chunk-DVJM55D2.cjs} +9 -1
- package/dist/{chunk-QSUYB3RH.cjs → chunk-DZHTNSQ5.cjs} +14 -14
- package/dist/{chunk-OIOPQ25L.mjs → chunk-E77IA5IF.mjs} +46 -33
- package/dist/{chunk-VRGY3X2I.mjs → chunk-EDZU7YRK.mjs} +8 -9
- package/dist/{chunk-EZTKXD6P.cjs → chunk-FDGYDQGL.cjs} +8 -1
- package/dist/{chunk-PLJKJJ2H.mjs → chunk-FETMUBIA.mjs} +27 -82
- package/dist/{chunk-HJZZSBVK.cjs → chunk-FILXOEWD.cjs} +2 -2
- package/dist/{chunk-KWCZKJYU.cjs → chunk-FJ5YCERM.cjs} +581 -432
- package/dist/{chunk-PDFFYZAT.cjs → chunk-GF22VGMS.cjs} +2 -2
- package/dist/{chunk-OOJBBHYW.cjs → chunk-GVYZCJZH.cjs} +30 -1
- package/dist/{chunk-MNJDNTGO.mjs → chunk-HAXFV2CD.mjs} +1 -1
- package/dist/{chunk-DXZ57EPE.mjs → chunk-I4KPA2C6.mjs} +14 -0
- package/dist/{chunk-LDEXTX4I.cjs → chunk-I7NUT24Z.cjs} +29 -22
- package/dist/{chunk-MZ4CRSY7.cjs → chunk-IEN2EFE5.cjs} +4 -4
- package/dist/{chunk-NVOMQLI2.mjs → chunk-IWJONXPF.mjs} +11 -0
- package/dist/{chunk-RLH5AH2M.mjs → chunk-JDO346NV.mjs} +1 -1
- package/dist/{chunk-WUTFJOV7.cjs → chunk-JFPKARWM.cjs} +16 -8
- package/dist/{chunk-A3T445WK.mjs → chunk-JFVT5ZZV.mjs} +9 -2
- package/dist/{chunk-WPB67LE5.mjs → chunk-JRF2SKCD.mjs} +1 -1
- package/dist/{chunk-YIHRZBD7.cjs → chunk-JRGR5Z4K.cjs} +1 -1
- package/dist/{chunk-UKZ6AWKZ.cjs → chunk-JWY66PID.cjs} +44 -1
- package/dist/{chunk-BDYM2TN3.cjs → chunk-JX5VOLAV.cjs} +8 -8
- package/dist/{chunk-WMLSZAKN.mjs → chunk-JZQS3ZOI.mjs} +1 -1
- package/dist/{chunk-YTNBCXCW.cjs → chunk-K4UGCUXX.cjs} +17 -13
- package/dist/{chunk-OFBLGH6V.cjs → chunk-K66JILV3.cjs} +47 -34
- package/dist/{chunk-QOGIZKSO.cjs → chunk-K7JMTAFH.cjs} +5 -5
- package/dist/{chunk-IFR74W6S.mjs → chunk-KPJYBSHL.mjs} +4 -1
- package/dist/{chunk-Z6SOXHAD.mjs → chunk-KPMLDT3B.mjs} +208 -111
- package/dist/{chunk-KI3MU7B5.mjs → chunk-LDVJIBGN.mjs} +1 -1
- package/dist/{chunk-IGDYL2IA.cjs → chunk-LECZ5DPZ.cjs} +2 -2
- package/dist/{chunk-5FBZJJGA.mjs → chunk-LXEJNWF5.mjs} +2 -2
- package/dist/{chunk-F36LS2C7.cjs → chunk-M6U6E4F7.cjs} +335 -285
- package/dist/{chunk-AKIQ54FK.cjs → chunk-MBCRWU3P.cjs} +26 -81
- package/dist/{chunk-P2NBQ5JI.mjs → chunk-MWUDEYBI.mjs} +1 -1
- package/dist/{chunk-SQ6IWJ3H.cjs → chunk-MZLJFNMH.cjs} +1 -1
- package/dist/{chunk-6OFOIMNS.mjs → chunk-N62IYXYD.mjs} +1 -1
- package/dist/{chunk-ZPKJPM7K.mjs → chunk-NA77GEIU.mjs} +2 -2
- package/dist/{chunk-FVYBEMOD.cjs → chunk-NAXKOTPP.cjs} +6 -6
- package/dist/{chunk-I7J5RLGO.cjs → chunk-NLBHLPEO.cjs} +12 -1
- package/dist/{chunk-3EEINK7G.cjs → chunk-NSZY3EWG.cjs} +10 -7
- package/dist/{chunk-F6CMGWAL.mjs → chunk-NYF7A4UW.mjs} +1 -1
- package/dist/{chunk-QO43L7Z4.cjs → chunk-O32QPFVV.cjs} +25 -7
- package/dist/{chunk-5IQ2ERQA.cjs → chunk-O47W53D3.cjs} +1 -1
- package/dist/{chunk-CO6UYM2D.mjs → chunk-O5QUJEWT.mjs} +1 -1
- package/dist/{chunk-JL2YW5KX.mjs → chunk-OAEDVXVE.mjs} +44 -1
- package/dist/{chunk-3TXKFRSO.mjs → chunk-OEL5EPOJ.mjs} +1 -1
- package/dist/{chunk-KSZK34HU.mjs → chunk-PJQ5W356.mjs} +16 -8
- package/dist/{chunk-BZWTBELF.cjs → chunk-Q5HMVGR5.cjs} +87 -17
- package/dist/{chunk-5NFQ6AZI.cjs → chunk-QEWWKYDL.cjs} +25 -10
- package/dist/{chunk-QOSDWGKT.mjs → chunk-QVBXTSIZ.mjs} +1 -1
- package/dist/{chunk-T5XFZQCL.mjs → chunk-QZHTDVH4.mjs} +1 -1
- package/dist/{chunk-HEJM46HQ.mjs → chunk-R7254L3R.mjs} +5 -2
- package/dist/{chunk-OGVTUGMU.mjs → chunk-REP6HWJN.mjs} +13 -3
- package/dist/{chunk-4UAQB5LB.mjs → chunk-RMOU3PR4.mjs} +112 -62
- package/dist/{chunk-WYL4ODZ4.mjs → chunk-SE7HPBYK.mjs} +30 -1
- package/dist/{chunk-2ZOYOYEE.mjs → chunk-THG2TVDH.mjs} +73 -3
- package/dist/{chunk-TEJ67GD2.mjs → chunk-TLSSIYAL.mjs} +20 -5
- package/dist/{chunk-DWLNLU55.cjs → chunk-TPYAYFMF.cjs} +2 -2
- package/dist/{chunk-Y6KHPJDB.cjs → chunk-U7VH3Q5E.cjs} +2 -2
- package/dist/{chunk-X3MHKLCO.cjs → chunk-VG6HYT5K.cjs} +26 -11
- package/dist/{chunk-437QZIC2.cjs → chunk-VNBDN5W2.cjs} +5 -5
- package/dist/{chunk-AJNBTOVQ.mjs → chunk-WW3LRNQV.mjs} +1 -1
- package/dist/{chunk-GFPS7MNE.mjs → chunk-WX63N6C5.mjs} +4 -4
- package/dist/{chunk-7LK5CTUM.cjs → chunk-XYVPTTUT.cjs} +31 -26
- package/dist/{chunk-VOQ7XZZT.cjs → chunk-Y2SZVIVH.cjs} +20 -0
- package/dist/{chunk-XCAQTCGK.mjs → chunk-YBY34UHB.mjs} +1 -1
- package/dist/{chunk-YGJ5P3TJ.mjs → chunk-Z3GPAFIA.mjs} +21 -3
- package/dist/{chunk-4E57QHPW.cjs → chunk-ZUVAGMQ5.cjs} +17 -7
- package/dist/{chunk-23LVFSID.mjs → chunk-ZXDX7VYZ.mjs} +7 -0
- package/dist/{client-component.d-BvQOxSqh.d.mts → client-component.d-Bk5qKJM-.d.mts} +2 -2
- package/dist/{client-component.d-DNVSLEPi.d.ts → client-component.d-DNbC4oWI.d.ts} +2 -2
- package/dist/{client-plugins.d-CNDqcAuf.d.ts → client-plugins.d-DwUqh4gp.d.ts} +50 -5
- package/dist/{client-plugins.d-CE1lVK2R.d.mts → client-plugins.d-Pi9nG0W0.d.mts} +50 -5
- package/dist/client-plugins.d.mts +3 -2
- package/dist/client-plugins.d.ts +3 -2
- package/dist/client.cjs +6 -6
- package/dist/client.d.mts +8 -7
- package/dist/client.d.ts +8 -7
- package/dist/client.mjs +5 -5
- package/dist/config.d.mts +3 -2
- package/dist/config.d.ts +3 -2
- package/dist/deployment.cjs +4 -2
- package/dist/deployment.d.mts +7 -1
- package/dist/deployment.d.ts +7 -1
- package/dist/deployment.mjs +5 -3
- package/dist/desktop.d.mts +4 -3
- package/dist/desktop.d.ts +4 -3
- package/dist/{dev-guard-ONNMVQUN.mjs → dev-guard-ZDIELV6Q.mjs} +1 -1
- package/dist/{dev-guard-2UW2KERP.cjs → dev-guard-ZLLKVO5T.cjs} +2 -2
- package/dist/{devtools-2A2GPC7B.mjs → devtools-CB43AHEP.mjs} +8 -7
- package/dist/{devtools-R27T3BRY.cjs → devtools-L5DUNDF3.cjs} +9 -8
- package/dist/docs.cjs +14 -11
- package/dist/docs.d.mts +17 -4
- package/dist/docs.d.ts +17 -4
- package/dist/docs.mjs +14 -11
- package/dist/environment/vite.cjs +3 -3
- package/dist/environment/vite.mjs +2 -2
- package/dist/headers.d-CE6OWB-n.d.ts +18 -0
- package/dist/headers.d-DED1hHh4.d.mts +18 -0
- package/dist/i18n/client.cjs +2 -2
- package/dist/i18n/client.d.mts +2 -2
- package/dist/i18n/client.d.ts +2 -2
- package/dist/i18n/client.mjs +1 -1
- package/dist/i18n/index.cjs +2 -2
- package/dist/i18n/index.d.mts +3 -3
- package/dist/i18n/index.d.ts +3 -3
- package/dist/i18n/index.mjs +1 -1
- package/dist/i18n/server.cjs +3 -3
- package/dist/i18n/server.d.mts +5 -5
- package/dist/i18n/server.d.ts +5 -5
- package/dist/i18n/server.mjs +2 -2
- package/dist/image/server.cjs +2 -2
- package/dist/image/server.mjs +1 -1
- package/dist/image/sharp.cjs +9 -9
- package/dist/image/sharp.mjs +1 -1
- package/dist/index.cjs +49 -45
- package/dist/{index.d-Bt3kl19W.d.mts → index.d-CbvOjJcp.d.mts} +1 -1
- package/dist/{index.d-Cx_-DaKV.d.ts → index.d-c9UwIqDy.d.ts} +1 -1
- package/dist/index.d.mts +26 -24
- package/dist/index.d.ts +26 -24
- package/dist/index.mjs +63 -59
- package/dist/integrations/orm.d.mts +3 -2
- package/dist/integrations/orm.d.ts +3 -2
- package/dist/integrations.cjs +3 -3
- package/dist/integrations.d.mts +3 -2
- package/dist/integrations.d.ts +3 -2
- package/dist/integrations.mjs +2 -2
- package/dist/internal/app-markdown-runtime.cjs +4 -3
- package/dist/internal/app-markdown-runtime.d.mts +4 -3
- package/dist/internal/app-markdown-runtime.d.ts +4 -3
- package/dist/internal/app-markdown-runtime.mjs +3 -2
- package/dist/internal/build-runtime.cjs +36 -37
- package/dist/internal/build-runtime.d.mts +5 -4
- package/dist/internal/build-runtime.d.ts +5 -4
- package/dist/internal/build-runtime.mjs +35 -36
- package/dist/internal/cli-runtime.cjs +15 -14
- package/dist/internal/cli-runtime.mjs +14 -13
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +5 -3
- package/dist/internal/client-runtime.d.mts +17 -7
- package/dist/internal/client-runtime.d.ts +17 -7
- package/dist/internal/client-runtime.mjs +4 -2
- package/dist/internal/compression-runtime.d.mts +3 -2
- package/dist/internal/compression-runtime.d.ts +3 -2
- package/dist/internal/config-runtime.cjs +10 -9
- package/dist/internal/config-runtime.d.mts +6 -5
- package/dist/internal/config-runtime.d.ts +6 -5
- package/dist/internal/config-runtime.mjs +9 -8
- package/dist/internal/infra-analytics-runtime.cjs +12 -9
- package/dist/internal/infra-analytics-runtime.mjs +10 -7
- package/dist/internal/native-server-fns.cjs +4 -4
- package/dist/internal/native-server-fns.mjs +3 -3
- package/dist/internal/product-telemetry-runtime.cjs +3 -3
- package/dist/internal/product-telemetry-runtime.mjs +2 -2
- package/dist/internal/production-runtime.cjs +52 -17
- package/dist/internal/production-runtime.d.mts +57 -20
- package/dist/internal/production-runtime.d.ts +57 -20
- package/dist/internal/production-runtime.mjs +55 -20
- package/dist/internal/vercel-edge-middleware.cjs +3 -2
- package/dist/internal/vercel-edge-middleware.d.mts +2 -2
- package/dist/internal/vercel-edge-middleware.d.ts +2 -2
- package/dist/internal/vercel-edge-middleware.mjs +2 -1
- package/dist/markdown.cjs +3 -2
- package/dist/markdown.d.mts +3 -2
- package/dist/markdown.d.ts +3 -2
- package/dist/markdown.mjs +2 -1
- package/dist/middleware.cjs +6 -5
- package/dist/middleware.d.mts +4 -3
- package/dist/middleware.d.ts +4 -3
- package/dist/middleware.mjs +5 -4
- package/dist/mobile.d.mts +3 -3
- package/dist/mobile.d.ts +3 -3
- package/dist/{mount.d-Bki4pOaJ.d.mts → mount.d-BvWxf8ZE.d.mts} +1 -1
- package/dist/{mount.d-DjR5aerM.d.ts → mount.d-DngLY7NL.d.ts} +1 -1
- package/dist/{native-tree-W2SSJB3Y.cjs → native-tree-GF4BH33L.cjs} +4 -3
- package/dist/{native-tree-Y5YQANW7.mjs → native-tree-L2IIEBXH.mjs} +3 -2
- package/dist/{navigation-delegate.d-VDkziXTK.d.mts → navigation-delegate.d-CMyl1h2l.d.mts} +1 -1
- package/dist/{navigation-delegate.d-CtghaSP3.d.ts → navigation-delegate.d-zZogiDfa.d.ts} +1 -1
- package/dist/navigation.cjs +5 -5
- package/dist/navigation.d.mts +6 -5
- package/dist/navigation.d.ts +6 -5
- package/dist/navigation.mjs +4 -4
- package/dist/{plugin-WIU4GDD4.cjs → plugin-F2O4BFTK.cjs} +2 -2
- package/dist/{plugin-SAS22JL7.mjs → plugin-VEBRN7A3.mjs} +1 -1
- package/dist/plugin.cjs +30 -29
- package/dist/plugin.d.mts +6 -4
- package/dist/plugin.d.ts +6 -4
- package/dist/plugin.mjs +29 -28
- package/dist/{production-runtime.d-DMZY3OgV.d.mts → production-runtime.d-B0IeWWyO.d.mts} +23 -2
- package/dist/{production-runtime.d-BMyyLGBB.d.ts → production-runtime.d-q3aHIv5Y.d.ts} +23 -2
- package/dist/query/client.cjs +6 -6
- package/dist/query/client.mjs +2 -2
- package/dist/{render-plan.d-i9sI4tc9.d.ts → render-plan.d-DQj2bzd2.d.ts} +1 -1
- package/dist/{render-plan.d-BSwV8PE4.d.mts → render-plan.d-Di1znBDW.d.mts} +1 -1
- package/dist/renderer-client.cjs +7 -7
- package/dist/renderer-client.d.mts +6 -5
- package/dist/renderer-client.d.ts +6 -5
- package/dist/renderer-client.mjs +3 -3
- package/dist/{request.d-Dgln8tuI.d.ts → request.d-C5vyoYeL.d.ts} +1 -1
- package/dist/{request.d-C24FNQ_7.d.mts → request.d-CJWzfDYJ.d.mts} +1 -1
- package/dist/request.d.mts +4 -3
- package/dist/request.d.ts +4 -3
- package/dist/{resolver.d-JnZKKsc5.d.mts → resolver.d-9iKC79CU.d.mts} +1 -1
- package/dist/{resolver.d-BHyZgpa7.d.ts → resolver.d-CY6mEa_F.d.ts} +1 -1
- package/dist/response.d-B_MtBCnF.d.mts +12 -0
- package/dist/response.d-B_MtBCnF.d.ts +12 -0
- package/dist/{route-rendering.d-Ds0BfwQi.d.mts → route-rendering.d-C-et2TZ1.d.mts} +9 -2
- package/dist/{route-rendering.d-CUylZKJA.d.ts → route-rendering.d-DhsY5M2I.d.ts} +9 -2
- package/dist/{router.d-CFPcbqzc.d.mts → router.d-BMDS5s5X.d.mts} +1 -1
- package/dist/{router.d-B56rMOFm.d.ts → router.d-CJB-Ntni.d.ts} +1 -1
- package/dist/{routes.d-CrEy0lJS.d.mts → routes.d-D3aJw1H5.d.mts} +1 -1
- package/dist/{routes.d-9GFFNioh.d.ts → routes.d-K-Qg79AA.d.ts} +1 -1
- package/dist/routes.d.mts +3 -2
- package/dist/routes.d.ts +3 -2
- package/dist/{index.d-BNNDpql4.d.ts → routing.d-BxOZ2YWc.d.ts} +1 -2
- package/dist/{index.d-BqcfqJvt.d.mts → routing.d-DwSUVZbF.d.mts} +1 -2
- package/dist/{rsc-pipeline-GA4AQWZI.mjs → rsc-pipeline-AXQJCCHI.mjs} +12 -12
- package/dist/{rsc-pipeline-3T7V6OUT.cjs → rsc-pipeline-NJKLZ3YE.cjs} +13 -13
- package/dist/{runtime-REUTNTI5.cjs → runtime-DMW6DDOI.cjs} +19 -18
- package/dist/{runtime-ZYCKKY7L.mjs → runtime-JXNEKOSE.mjs} +11 -10
- package/dist/{runtime.d-BtL3PCL3.d.ts → runtime.d-B_uPfMjA.d.ts} +2 -2
- package/dist/{runtime.d-DLRO-ExG.d.mts → runtime.d-BonodRI9.d.mts} +1 -1
- package/dist/{runtime.d-3iJAKptR.d.mts → runtime.d-nUz0HAL4.d.mts} +2 -2
- package/dist/{runtime.d-H7k9hOQE.d.ts → runtime.d-uw4123iI.d.ts} +1 -1
- package/dist/server-plugins.cjs +3 -2
- package/dist/server-plugins.d.mts +6 -12
- package/dist/server-plugins.d.ts +6 -12
- package/dist/server-plugins.mjs +2 -1
- package/dist/server.cjs +64 -56
- package/dist/server.d.mts +23 -14
- package/dist/server.d.ts +23 -14
- package/dist/server.mjs +40 -32
- package/dist/{spa-router.d-Dr7oanhl.d.ts → spa-router.d-l0d9pPZj.d.ts} +3 -3
- package/dist/{spa-router.d-g4CzhEH1.d.mts → spa-router.d-rha3M95y.d.mts} +3 -3
- package/dist/testing.cjs +3 -3
- package/dist/testing.d.mts +3 -2
- package/dist/testing.d.ts +3 -2
- package/dist/testing.mjs +3 -3
- package/dist/{types.d-C41ePjvP.d.ts → types.d-wVRlLtBf.d.mts} +1 -1
- package/dist/{types.d-C41ePjvP.d.mts → types.d-wVRlLtBf.d.ts} +1 -1
- package/dist/{utils.d-BxxyDEb8.d.ts → utils.d-BK-PTOF8.d.ts} +1 -1
- package/dist/{utils.d-HIla3pD_.d.mts → utils.d-BzuTobEc.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +37 -29
- package/dist/vite.d.mts +26 -6
- package/dist/vite.d.ts +26 -6
- package/dist/vite.mjs +36 -28
- package/package.json +3 -3
- package/dist/analyzer-PPAHM4AW.cjs +0 -16
- package/dist/chunk-HHLEYA4B.cjs +0 -17
- package/dist/chunk-QYNZ3CTI.mjs +0 -17
- package/dist/response.d-BolW0Vx_.d.mts +0 -10
- package/dist/response.d-BolW0Vx_.d.ts +0 -10
|
@@ -10,7 +10,7 @@ var _chunkCCAUIBIScjs = require('./chunk-CCAUIBIS.cjs');
|
|
|
10
10
|
var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkC2JOS77Zcjs = require('./chunk-C2JOS77Z.cjs');
|
|
14
14
|
|
|
15
15
|
// src/mobile/native-tree.ts
|
|
16
16
|
var URLENCODED = "application/x-www-form-urlencoded";
|
|
@@ -639,7 +639,7 @@ function parsedStylesheet(css) {
|
|
|
639
639
|
}
|
|
640
640
|
function createFarmNativeTree(html, pageUrl, stylesheets) {
|
|
641
641
|
const title = _optionalChain([/<title\b[^>]*>([\s\S]*?)<\/title>/i, 'access', _25 => _25.exec, 'call', _26 => _26(html), 'optionalAccess', _27 => _27[1]]);
|
|
642
|
-
const document = parseHtml(
|
|
642
|
+
const document = parseHtml(_chunkC2JOS77Zcjs._readFarmRenderedHtml.call(void 0, html, { keepAriaHidden: true }));
|
|
643
643
|
const page = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(find(document, (element) => element.attributes.id === "__farm_page__"), () => ( find(document, (element) => element.attributes.id === "root"))), () => ( find(document, (element) => element.tag === "body"))), () => ( document));
|
|
644
644
|
const labels = /* @__PURE__ */ new Map();
|
|
645
645
|
const collectLabels = (element) => {
|
|
@@ -31,8 +31,37 @@ function reconcileFarmDocumentHead(nextDocument) {
|
|
|
31
31
|
document.head.querySelectorAll(FARM_NAVIGATION_HEAD_SELECTOR).forEach((node) => node.remove());
|
|
32
32
|
nextDocument.head.querySelectorAll(FARM_NAVIGATION_HEAD_SELECTOR).forEach((node) => document.head.appendChild(document.importNode(node, true)));
|
|
33
33
|
}
|
|
34
|
+
function createFarmMetadataHeadReconciler(initialMarkup) {
|
|
35
|
+
const candidates = Array.from(
|
|
36
|
+
document.head.querySelectorAll(FARM_NAVIGATION_HEAD_SELECTOR)
|
|
37
|
+
).reverse();
|
|
38
|
+
const claimed = /* @__PURE__ */ new Set();
|
|
39
|
+
for (const node of parseFarmHeadMarkup(initialMarkup)) {
|
|
40
|
+
const match = candidates.find(
|
|
41
|
+
(candidate) => !claimed.has(candidate) && candidate.isEqualNode(node)
|
|
42
|
+
);
|
|
43
|
+
if (match) claimed.add(match);
|
|
44
|
+
}
|
|
45
|
+
let current = initialMarkup;
|
|
46
|
+
let owned = Array.from(claimed);
|
|
47
|
+
return (markup) => {
|
|
48
|
+
if (markup === current) return;
|
|
49
|
+
current = markup;
|
|
50
|
+
for (const node of owned) node.remove();
|
|
51
|
+
owned = parseFarmHeadMarkup(markup).map(
|
|
52
|
+
(node) => document.head.appendChild(document.importNode(node, true))
|
|
53
|
+
);
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function parseFarmHeadMarkup(markup) {
|
|
57
|
+
if (!markup) return [];
|
|
58
|
+
const template = document.createElement("template");
|
|
59
|
+
template.innerHTML = markup;
|
|
60
|
+
return Array.from(template.content.querySelectorAll(FARM_NAVIGATION_HEAD_SELECTOR));
|
|
61
|
+
}
|
|
62
|
+
|
|
34
63
|
|
|
35
64
|
|
|
36
65
|
|
|
37
66
|
|
|
38
|
-
exports.FARM_NAVIGATION_HEAD_SELECTOR = FARM_NAVIGATION_HEAD_SELECTOR; exports.reconcileFarmDocumentHead = reconcileFarmDocumentHead;
|
|
67
|
+
exports.FARM_NAVIGATION_HEAD_SELECTOR = FARM_NAVIGATION_HEAD_SELECTOR; exports.reconcileFarmDocumentHead = reconcileFarmDocumentHead; exports.createFarmMetadataHeadReconciler = createFarmMetadataHeadReconciler;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveFarmPlatform
|
|
3
3
|
} from "./chunk-SMUW7UST.mjs";
|
|
4
|
+
import {
|
|
5
|
+
getFarmIntegrationPluginServerRuntime
|
|
6
|
+
} from "./chunk-WW3LRNQV.mjs";
|
|
4
7
|
import {
|
|
5
8
|
formatOptionalPeerInstallHint,
|
|
6
9
|
isMissingPackageError
|
|
@@ -278,6 +281,16 @@ function isArrayIndex(key) {
|
|
|
278
281
|
return Number.isInteger(value) && value >= 0 && value < 4294967295 && String(value) === key;
|
|
279
282
|
}
|
|
280
283
|
|
|
284
|
+
// src/plugin-server-runtime.ts
|
|
285
|
+
function hasFarmServerRuntimePlugins(plugins) {
|
|
286
|
+
return (plugins || []).some((plugin) => {
|
|
287
|
+
if (getFarmIntegrationPluginServerRuntime(plugin) === false) return false;
|
|
288
|
+
return Boolean(
|
|
289
|
+
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
|
|
290
|
+
);
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
|
|
281
294
|
// src/build/tailwind.ts
|
|
282
295
|
import path2 from "path";
|
|
283
296
|
|
|
@@ -371,5 +384,6 @@ export {
|
|
|
371
384
|
resolveFarmAppClientEntry,
|
|
372
385
|
resolveFarmClientPlugins,
|
|
373
386
|
generateFarmClientPluginEntryCode,
|
|
387
|
+
hasFarmServerRuntimePlugins,
|
|
374
388
|
loadTailwindVitePlugin
|
|
375
389
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _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; }
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkNAXKOTPPcjs = require('./chunk-NAXKOTPP.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
var _chunkV3UOEWCBcjs = require('./chunk-V3UOEWCB.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkXYVPTTUTcjs = require('./chunk-XYVPTTUT.cjs');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
@@ -46,7 +46,7 @@ function assertFarmDocsAdapterServesNoGuardedPages(docs, options, isPathGuarded,
|
|
|
46
46
|
if (!isPathGuarded || !hasFarmDocsRuntimeAdapter(docs)) return;
|
|
47
47
|
const servesGuardedPages = farmDocsAdapterServesGuardedPages(docs);
|
|
48
48
|
if (servesGuardedPages && runtime !== "edge") return;
|
|
49
|
-
const guarded =
|
|
49
|
+
const guarded = _chunkNAXKOTPPcjs.getFarmDocsRoots.call(void 0, docs).flatMap((root) => _chunkNAXKOTPPcjs.discoverFarmDocsPages.call(void 0, _chunkNAXKOTPPcjs.resolveFarmDocsContentDir.call(void 0, root, options), root)).filter((page) => isPathGuarded(page.href) || isPathGuarded(_chunkNAXKOTPPcjs.getFarmDocsMarkdownPath.call(void 0, page.href))).map((page) => page.href);
|
|
50
50
|
if (guarded.length === 0) return;
|
|
51
51
|
if (servesGuardedPages) {
|
|
52
52
|
throw new Error(
|
|
@@ -77,7 +77,7 @@ function createFarmDocsAdapterRuntimeConfig(docs, options, moduleConfig) {
|
|
|
77
77
|
...moduleConfig ? { ...getFarmDocsConfigModuleRoot(moduleConfig, docs.entry), ...docs.configOverrides } : _nullishCoalesce(docs.runtimeConfig, () => ( docs.config)),
|
|
78
78
|
entry: docs.config.entry || docs.entry.replace(/^\/+|\/+$/g, "") || "docs",
|
|
79
79
|
docsPath: docs.entry,
|
|
80
|
-
contentDir:
|
|
80
|
+
contentDir: _chunkNAXKOTPPcjs.resolveFarmDocsContentDir.call(void 0, docs, options)
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
function getFarmDocsAdapterStylesheets(options) {
|
|
@@ -144,7 +144,7 @@ async function listFarmDocsAdapterPages(docs, options) {
|
|
|
144
144
|
if (typeof serverModule.listFarmDocsPages !== "function") return null;
|
|
145
145
|
const listPages = serverModule.listFarmDocsPages;
|
|
146
146
|
const pages = (await Promise.all(
|
|
147
|
-
|
|
147
|
+
_chunkNAXKOTPPcjs.getFarmDocsRoots.call(void 0, docs).map(
|
|
148
148
|
(root) => listPages(createFarmDocsAdapterRuntimeConfig(root, options), { rootDir: options.root })
|
|
149
149
|
)
|
|
150
150
|
)).flat();
|
|
@@ -155,6 +155,12 @@ async function listFarmDocsAdapterPages(docs, options) {
|
|
|
155
155
|
}
|
|
156
156
|
return [...new Set(pages)];
|
|
157
157
|
}
|
|
158
|
+
async function listFarmDocsPagePaths(docs, options) {
|
|
159
|
+
if (options.adapter) return await _asyncNullishCoalesce(await listFarmDocsAdapterPages(docs, options), async () => ( []));
|
|
160
|
+
return _chunkNAXKOTPPcjs.getFarmDocsRoots.call(void 0, docs).flatMap(
|
|
161
|
+
(root) => _chunkNAXKOTPPcjs.discoverFarmDocsPages.call(void 0, _chunkNAXKOTPPcjs.resolveFarmDocsContentDir.call(void 0, root, options), root).map(({ href }) => href)
|
|
162
|
+
);
|
|
163
|
+
}
|
|
158
164
|
async function createFarmDocsAdapterHandler(docs, options) {
|
|
159
165
|
if (!hasFarmDocsRuntimeAdapter(docs)) {
|
|
160
166
|
throw new Error("Farm docs adapter requires server and react runtime entrypoints.");
|
|
@@ -184,7 +190,7 @@ async function createFarmDocsAdapterHandler(docs, options) {
|
|
|
184
190
|
};
|
|
185
191
|
if (multiRoot) {
|
|
186
192
|
return serverModule.createFarmDocsMultiRuntimeHandler(
|
|
187
|
-
|
|
193
|
+
_chunkNAXKOTPPcjs.getFarmDocsRoots.call(void 0, docs).map(
|
|
188
194
|
(root) => createFarmDocsAdapterRuntimeConfig(root, options, moduleConfig)
|
|
189
195
|
),
|
|
190
196
|
handlerOptions
|
|
@@ -330,22 +336,22 @@ function getDocsDescription(docs) {
|
|
|
330
336
|
return _optionalChain([docs, 'access', _19 => _19.config, 'access', _20 => _20.metadata, 'optionalAccess', _21 => _21.description]);
|
|
331
337
|
}
|
|
332
338
|
function getLoadedDocsPages(context) {
|
|
333
|
-
return
|
|
339
|
+
return _chunkNAXKOTPPcjs.discoverFarmDocsPages.call(void 0, context.contentDir, context.docs).filter((page) => !context.isPathGuarded(page.href)).map((page) => _chunkNAXKOTPPcjs.loadFarmDocsPage.call(void 0, context.contentDir, context.docs, page.slug)).filter((page) => Boolean(page));
|
|
334
340
|
}
|
|
335
341
|
function toDocsSourcePage(page, basePath) {
|
|
336
342
|
return {
|
|
337
|
-
...
|
|
343
|
+
..._chunkNAXKOTPPcjs.toFarmDocsMarkdownPage.call(void 0, page, basePath),
|
|
338
344
|
sourcePath: page.sourcePath
|
|
339
345
|
};
|
|
340
346
|
}
|
|
341
347
|
function toDocsLlmsPage(page) {
|
|
342
|
-
return
|
|
348
|
+
return _chunkNAXKOTPPcjs.toFarmDocsMarkdownPage.call(void 0, page);
|
|
343
349
|
}
|
|
344
350
|
function getDocsLlmsOptions(context, request) {
|
|
345
351
|
const configured = isRecord(context.docs.config.llmsTxt) ? context.docs.config.llmsTxt : {};
|
|
346
352
|
return {
|
|
347
353
|
enabled: true,
|
|
348
|
-
baseUrl:
|
|
354
|
+
baseUrl: _chunkNAXKOTPPcjs.getFarmDocsSiteUrl.call(void 0, request, context.basePath),
|
|
349
355
|
siteTitle: getDocsTitle(context.docs),
|
|
350
356
|
siteDescription: getDocsDescription(context.docs),
|
|
351
357
|
...configured
|
|
@@ -386,7 +392,7 @@ function getDocsDiscoveryOptions(context, request) {
|
|
|
386
392
|
};
|
|
387
393
|
}
|
|
388
394
|
function buildSitemapManifest(context, request) {
|
|
389
|
-
return
|
|
395
|
+
return _chunkNAXKOTPPcjs.buildFarmDocsSitemapManifest.call(void 0,
|
|
390
396
|
getLoadedDocsPages(context),
|
|
391
397
|
context.docs,
|
|
392
398
|
new URL(request.url).origin,
|
|
@@ -425,7 +431,7 @@ function renderAgentsDocument(context, request) {
|
|
|
425
431
|
function buildAgentSpec(context, request) {
|
|
426
432
|
const url = new URL(request.url);
|
|
427
433
|
const origin = url.origin;
|
|
428
|
-
const pages =
|
|
434
|
+
const pages = _chunkNAXKOTPPcjs.discoverFarmDocsPages.call(void 0, context.contentDir, context.docs).filter(
|
|
429
435
|
(page) => !context.isPathGuarded(page.href)
|
|
430
436
|
);
|
|
431
437
|
const spec = _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).buildDocsAgentDiscoverySpec(getDocsDiscoveryOptions(context, request));
|
|
@@ -441,7 +447,7 @@ function buildAgentSpec(context, request) {
|
|
|
441
447
|
},
|
|
442
448
|
entry: context.docs.entry,
|
|
443
449
|
routes: {
|
|
444
|
-
docs: `${origin}${
|
|
450
|
+
docs: `${origin}${_chunkNAXKOTPPcjs.getFarmDocsPublicEntry.call(void 0, context.docs, context.basePath)}`,
|
|
445
451
|
config: `${origin}/api/docs?format=config`,
|
|
446
452
|
search: `${origin}/api/docs?query=<term>`,
|
|
447
453
|
markdown: `${origin}/api/docs/<slug>.md`,
|
|
@@ -514,7 +520,7 @@ function buildPublicConfig(context) {
|
|
|
514
520
|
};
|
|
515
521
|
}
|
|
516
522
|
function buildDiagnostics(context) {
|
|
517
|
-
const pages =
|
|
523
|
+
const pages = _chunkNAXKOTPPcjs.discoverFarmDocsPages.call(void 0, context.contentDir, context.docs);
|
|
518
524
|
const diagnostics = _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).buildDocsDiagnostics(context.docs.config, {
|
|
519
525
|
entry: context.docs.entry,
|
|
520
526
|
mcp: {
|
|
@@ -584,13 +590,13 @@ async function resolveAPIContext(options) {
|
|
|
584
590
|
config: options.config,
|
|
585
591
|
configPath: options.configPath
|
|
586
592
|
}));
|
|
587
|
-
const docs = isResolvedDocsConfig(docsInput) ? docsInput : await
|
|
593
|
+
const docs = isResolvedDocsConfig(docsInput) ? docsInput : await _chunkXYVPTTUTcjs.resolveDocsConfig.call(void 0, docsInput, { root, srcDir });
|
|
588
594
|
const guardedPaths = new Set(_nullishCoalesce(_optionalChain([runtimeConfig, 'optionalAccess', _28 => _28.guardedPaths]), () => ( [])));
|
|
589
595
|
return {
|
|
590
596
|
root,
|
|
591
597
|
srcDir,
|
|
592
598
|
docs,
|
|
593
|
-
contentDir:
|
|
599
|
+
contentDir: _chunkNAXKOTPPcjs.resolveFarmDocsContentDir.call(void 0, docs, { root, srcDir }),
|
|
594
600
|
diagnostics: options.diagnostics === true,
|
|
595
601
|
isPathGuarded: _nullishCoalesce(options.isPathGuarded, () => ( ((pathname) => guardedPaths.has(pathname)))),
|
|
596
602
|
basePath: _chunkD22BUQKWcjs.normalizeFarmBasePath.call(void 0, _nullishCoalesce(options.basePath, () => ( _optionalChain([runtimeConfig, 'optionalAccess', _29 => _29.basePath]))))
|
|
@@ -638,22 +644,22 @@ async function handleDocsAPIGet(request, context) {
|
|
|
638
644
|
}
|
|
639
645
|
if (format === "robots") {
|
|
640
646
|
return text(
|
|
641
|
-
|
|
647
|
+
_chunkNAXKOTPPcjs.renderFarmDocsRobotsTxt.call(void 0, context.docs, new URL(request.url).origin, context.basePath),
|
|
642
648
|
"text/plain; charset=utf-8"
|
|
643
649
|
);
|
|
644
650
|
}
|
|
645
651
|
if (format === "markdown" || url.pathname.endsWith(".md")) {
|
|
646
652
|
const pathParam = url.searchParams.get("path") || url.searchParams.get("slug");
|
|
647
653
|
const slug = normalizeDocsApiSlug(_nullishCoalesce(_nullishCoalesce(pathParam, () => ( pathTarget.slug)), () => ( "")), context.docs);
|
|
648
|
-
const page =
|
|
654
|
+
const page = _chunkNAXKOTPPcjs.loadFarmDocsPage.call(void 0, context.contentDir, context.docs, slug);
|
|
649
655
|
if (!page || context.isPathGuarded(page.href)) {
|
|
650
656
|
return text("Docs page not found\n", "text/plain; charset=utf-8", { status: 404 });
|
|
651
657
|
}
|
|
652
658
|
return text(
|
|
653
|
-
_chunkV3UOEWCBcjs.docsEngine.call(void 0, ).renderDocsMarkdownDocument(
|
|
659
|
+
_chunkV3UOEWCBcjs.docsEngine.call(void 0, ).renderDocsMarkdownDocument(_chunkNAXKOTPPcjs.toFarmDocsMarkdownPage.call(void 0, page, context.basePath), {
|
|
654
660
|
origin: new URL(request.url).origin,
|
|
655
661
|
llms: getDocsLlmsOptions(context, request),
|
|
656
|
-
sitemap:
|
|
662
|
+
sitemap: _chunkNAXKOTPPcjs.toFarmDocsPublicSitemapConfig.call(void 0, context.docs.config.sitemap, context.basePath)
|
|
657
663
|
}),
|
|
658
664
|
"text/markdown; charset=utf-8"
|
|
659
665
|
);
|
|
@@ -726,4 +732,5 @@ function createFarmDocsAPIHandler(options = {}, cloudIntegration) {
|
|
|
726
732
|
|
|
727
733
|
|
|
728
734
|
|
|
729
|
-
|
|
735
|
+
|
|
736
|
+
exports.hasFarmDocsRuntimeAdapter = hasFarmDocsRuntimeAdapter; exports.farmDocsAdapterServesGuardedPages = farmDocsAdapterServesGuardedPages; exports.assertFarmDocsAdapterServesNoGuardedPages = assertFarmDocsAdapterServesNoGuardedPages; exports.getFarmDocsConfigModuleRoot = getFarmDocsConfigModuleRoot; exports.compileFarmDocsAdapterEdgeManifest = compileFarmDocsAdapterEdgeManifest; exports.listFarmDocsAdapterPages = listFarmDocsAdapterPages; exports.listFarmDocsPagePaths = listFarmDocsPagePaths; exports.createFarmDocsAdapterHandler = createFarmDocsAdapterHandler; exports.isFarmDocsAPIRequest = isFarmDocsAPIRequest; exports.createDocsAPI = createDocsAPI; exports.createFarmDocsAPIHandler = createFarmDocsAPIHandler;
|
|
@@ -21,7 +21,7 @@ var _chunkE7QOEV5Zcjs = require('./chunk-E7QOEV5Z.cjs');
|
|
|
21
21
|
var _chunkQMNWKQL4cjs = require('./chunk-QMNWKQL4.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunkMZLJFNMHcjs = require('./chunk-MZLJFNMH.cjs');
|
|
25
25
|
|
|
26
26
|
// src/environment-vite.ts
|
|
27
27
|
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
@@ -1667,7 +1667,7 @@ var PackageClientBoundaryCache = class {
|
|
|
1667
1667
|
}
|
|
1668
1668
|
const contents = JSON.stringify({
|
|
1669
1669
|
schema: SCHEMA_VERSION,
|
|
1670
|
-
farm:
|
|
1670
|
+
farm: _chunkMZLJFNMHcjs.FARM_VERSION,
|
|
1671
1671
|
paths,
|
|
1672
1672
|
entries
|
|
1673
1673
|
});
|
|
@@ -1707,7 +1707,7 @@ function readStoredCache(file) {
|
|
|
1707
1707
|
} catch (e26) {
|
|
1708
1708
|
return null;
|
|
1709
1709
|
}
|
|
1710
|
-
if (!isRecord(value) || value.schema !== SCHEMA_VERSION || value.farm !==
|
|
1710
|
+
if (!isRecord(value) || value.schema !== SCHEMA_VERSION || value.farm !== _chunkMZLJFNMHcjs.FARM_VERSION) {
|
|
1711
1711
|
return null;
|
|
1712
1712
|
}
|
|
1713
1713
|
const { paths, entries } = value;
|
|
@@ -1718,7 +1718,7 @@ function readStoredCache(file) {
|
|
|
1718
1718
|
const usable = variants.filter((entry) => isStoredEntry(entry, paths.length));
|
|
1719
1719
|
if (usable.length > 0) valid[key] = usable;
|
|
1720
1720
|
}
|
|
1721
|
-
return { schema: SCHEMA_VERSION, farm:
|
|
1721
|
+
return { schema: SCHEMA_VERSION, farm: _chunkMZLJFNMHcjs.FARM_VERSION, paths, entries: valid };
|
|
1722
1722
|
}
|
|
1723
1723
|
function isRecord(value) {
|
|
1724
1724
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -115,6 +115,16 @@ function createFarmDeploymentCookie(deploymentId, path = "/", secure = false) {
|
|
|
115
115
|
secure ? "Secure" : ""
|
|
116
116
|
].filter(Boolean).join("; ");
|
|
117
117
|
}
|
|
118
|
+
function withoutFarmDeploymentCookie(cookieHeader) {
|
|
119
|
+
if (!cookieHeader) return void 0;
|
|
120
|
+
if (!cookieHeader.includes(FARM_DEPLOYMENT_COOKIE)) return cookieHeader;
|
|
121
|
+
const remaining = cookieHeader.split(";").filter((part) => {
|
|
122
|
+
const separator = part.indexOf("=");
|
|
123
|
+
const name = (separator === -1 ? part : part.slice(0, separator)).trim();
|
|
124
|
+
return name !== FARM_DEPLOYMENT_COOKIE && part.trim() !== "";
|
|
125
|
+
}).join(";").trim();
|
|
126
|
+
return remaining || void 0;
|
|
127
|
+
}
|
|
118
128
|
function readCookie(cookieHeader, name) {
|
|
119
129
|
if (!cookieHeader) return void 0;
|
|
120
130
|
for (const part of cookieHeader.split(";")) {
|
|
@@ -164,5 +174,6 @@ export {
|
|
|
164
174
|
isFarmDeploymentMismatchResponse,
|
|
165
175
|
createFarmDeploymentMismatchError,
|
|
166
176
|
createFarmDeploymentCookie,
|
|
177
|
+
withoutFarmDeploymentCookie,
|
|
167
178
|
resolveCloudflareProcessEnvFlags
|
|
168
179
|
};
|
|
@@ -809,6 +809,21 @@ var PluginManager = class {
|
|
|
809
809
|
session.waitUntil
|
|
810
810
|
);
|
|
811
811
|
}
|
|
812
|
+
/**
|
|
813
|
+
* @internal Reports an error the handler answered to `runtime.error` and `onError`, as the
|
|
814
|
+
* runtime scope's `reportError` does, without failing the session: `after` still runs, and a
|
|
815
|
+
* later throw in it is reported too.
|
|
816
|
+
*/
|
|
817
|
+
async reportRuntimeRequestError(session, error) {
|
|
818
|
+
await this.runRuntimeErrorHooks(
|
|
819
|
+
session.request,
|
|
820
|
+
error,
|
|
821
|
+
session.ctx,
|
|
822
|
+
Date.now() - session.startedAt,
|
|
823
|
+
session.options,
|
|
824
|
+
session.waitUntil
|
|
825
|
+
);
|
|
826
|
+
}
|
|
812
827
|
async runRuntimeRequest(request, handler, options = {}) {
|
|
813
828
|
return this.completeRuntimeRequest(await this.beginRuntimeRequest(request, options), handler);
|
|
814
829
|
}
|
|
@@ -822,14 +837,7 @@ var PluginManager = class {
|
|
|
822
837
|
const response = await _asyncNullishCoalesce(session.response, async () => ( await handler(session.request, {
|
|
823
838
|
// Not a failed session: the handler answers, so `after` runs and a later throw in it
|
|
824
839
|
// is still reported.
|
|
825
|
-
reportError: (error) => this.
|
|
826
|
-
session.request,
|
|
827
|
-
error,
|
|
828
|
-
session.ctx,
|
|
829
|
-
Date.now() - session.startedAt,
|
|
830
|
-
session.options,
|
|
831
|
-
session.waitUntil
|
|
832
|
-
)
|
|
840
|
+
reportError: (error) => this.reportRuntimeRequestError(session, error)
|
|
833
841
|
})));
|
|
834
842
|
if (!(response instanceof Response)) {
|
|
835
843
|
throw new TypeError("Farm plugin runtime handlers must return a Response");
|
|
@@ -10,14 +10,14 @@ import {
|
|
|
10
10
|
resolveFarmDocsContentDir,
|
|
11
11
|
toFarmDocsMarkdownPage,
|
|
12
12
|
toFarmDocsPublicSitemapConfig
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-LXEJNWF5.mjs";
|
|
14
14
|
import {
|
|
15
15
|
docsEngine,
|
|
16
16
|
loadFarmDocsEngine
|
|
17
17
|
} from "./chunk-VE3FWJBO.mjs";
|
|
18
18
|
import {
|
|
19
19
|
resolveDocsConfig
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-3WS5AZ3R.mjs";
|
|
21
21
|
import {
|
|
22
22
|
getFarmDocsAdapterConfigModule,
|
|
23
23
|
isSecretDocsConfigKey
|
|
@@ -155,6 +155,12 @@ async function listFarmDocsAdapterPages(docs, options) {
|
|
|
155
155
|
}
|
|
156
156
|
return [...new Set(pages)];
|
|
157
157
|
}
|
|
158
|
+
async function listFarmDocsPagePaths(docs, options) {
|
|
159
|
+
if (options.adapter) return await listFarmDocsAdapterPages(docs, options) ?? [];
|
|
160
|
+
return getFarmDocsRoots(docs).flatMap(
|
|
161
|
+
(root) => discoverFarmDocsPages(resolveFarmDocsContentDir(root, options), root).map(({ href }) => href)
|
|
162
|
+
);
|
|
163
|
+
}
|
|
158
164
|
async function createFarmDocsAdapterHandler(docs, options) {
|
|
159
165
|
if (!hasFarmDocsRuntimeAdapter(docs)) {
|
|
160
166
|
throw new Error("Farm docs adapter requires server and react runtime entrypoints.");
|
|
@@ -722,6 +728,7 @@ export {
|
|
|
722
728
|
getFarmDocsConfigModuleRoot,
|
|
723
729
|
compileFarmDocsAdapterEdgeManifest,
|
|
724
730
|
listFarmDocsAdapterPages,
|
|
731
|
+
listFarmDocsPagePaths,
|
|
725
732
|
createFarmDocsAdapterHandler,
|
|
726
733
|
isFarmDocsAPIRequest,
|
|
727
734
|
createDocsAPI,
|
|
@@ -153,7 +153,7 @@ async function sendWebResponse(res, response) {
|
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
async function fetchFarmExternalRewrite(request) {
|
|
156
|
-
const response = await fetch(request);
|
|
156
|
+
const response = await fetch(request, { redirect: "manual" });
|
|
157
157
|
if (!response.headers.has("content-encoding")) return response;
|
|
158
158
|
const headers = new Headers(response.headers);
|
|
159
159
|
headers.delete("content-encoding");
|
|
@@ -23,6 +23,12 @@ var _chunkCFG4QERRcjs = require('./chunk-CFG4QERR.cjs');
|
|
|
23
23
|
var _chunkEVIWKPJVcjs = require('./chunk-EVIWKPJV.cjs');
|
|
24
24
|
|
|
25
25
|
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
var _chunkNLBHLPEOcjs = require('./chunk-NLBHLPEO.cjs');
|
|
30
|
+
|
|
31
|
+
|
|
26
32
|
var _chunkA25FXJ7Dcjs = require('./chunk-A25FXJ7D.cjs');
|
|
27
33
|
|
|
28
34
|
|
|
@@ -678,6 +684,24 @@ var CDN_CACHE_CONTROL_HEADERS = [
|
|
|
678
684
|
"netlify-cdn-cache-control",
|
|
679
685
|
"cloudflare-cdn-cache-control"
|
|
680
686
|
];
|
|
687
|
+
function _hasPrivateFarmRequestHeaders(request, localeCookie) {
|
|
688
|
+
if (request.headers.get("authorization")) return true;
|
|
689
|
+
const cookieHeader = _chunkNLBHLPEOcjs.withoutFarmDeploymentCookie.call(void 0, request.headers.get("cookie"));
|
|
690
|
+
if (!cookieHeader) return false;
|
|
691
|
+
return !(localeCookie && isOnlyFarmLocaleCookie(cookieHeader, localeCookie));
|
|
692
|
+
}
|
|
693
|
+
function isOnlyFarmLocaleCookie(cookieHeader, localeCookie) {
|
|
694
|
+
const parts = cookieHeader.split(";");
|
|
695
|
+
if (parts.length !== 1) return false;
|
|
696
|
+
const cookie = parts[0].trim();
|
|
697
|
+
const separator = cookie.indexOf("=");
|
|
698
|
+
if (separator <= 0) return false;
|
|
699
|
+
try {
|
|
700
|
+
return decodeURIComponent(cookie.slice(0, separator).trim()) === localeCookie.name && localeCookie.locales.includes(decodeURIComponent(cookie.slice(separator + 1).trim()));
|
|
701
|
+
} catch (e) {
|
|
702
|
+
return false;
|
|
703
|
+
}
|
|
704
|
+
}
|
|
681
705
|
function _withFarmGuardedResponseCache(response) {
|
|
682
706
|
const shareable = !PRIVATE_CACHE_DIRECTIVE.test(_nullishCoalesce(response.headers.get("cache-control"), () => ( "")));
|
|
683
707
|
if (!shareable && !CDN_CACHE_CONTROL_HEADERS.some((name) => response.headers.has(name))) {
|
|
@@ -688,6 +712,25 @@ function _withFarmGuardedResponseCache(response) {
|
|
|
688
712
|
for (const name of CDN_CACHE_CONTROL_HEADERS) headers.delete(name);
|
|
689
713
|
});
|
|
690
714
|
}
|
|
715
|
+
function _withFarmDeploymentCookie(request, response, deploymentId, cookiePath) {
|
|
716
|
+
if (request.method.toUpperCase() !== "GET") return response;
|
|
717
|
+
if (response.headers.get(_chunkNLBHLPEOcjs.FARM_DEPLOYMENT_ID_HEADER) !== deploymentId) return response;
|
|
718
|
+
if (!PRIVATE_CACHE_DIRECTIVE.test(_nullishCoalesce(response.headers.get("cache-control"), () => ( "")))) return response;
|
|
719
|
+
if (CDN_CACHE_CONTROL_HEADERS.some((name) => response.headers.has(name))) return response;
|
|
720
|
+
if (_chunkNLBHLPEOcjs.getFarmDeploymentMismatch.call(void 0, request, deploymentId)) return response;
|
|
721
|
+
return _chunkA25FXJ7Dcjs._withFarmResponseHeaders.call(void 0, response, (headers) => {
|
|
722
|
+
headers.append(
|
|
723
|
+
"Set-Cookie",
|
|
724
|
+
_chunkNLBHLPEOcjs.createFarmDeploymentCookie.call(void 0,
|
|
725
|
+
deploymentId,
|
|
726
|
+
cookiePath,
|
|
727
|
+
new URL(request.url).protocol === "https:"
|
|
728
|
+
)
|
|
729
|
+
);
|
|
730
|
+
});
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
|
|
691
734
|
|
|
692
735
|
|
|
693
736
|
|
|
@@ -695,4 +738,4 @@ function _withFarmGuardedResponseCache(response) {
|
|
|
695
738
|
|
|
696
739
|
|
|
697
740
|
|
|
698
|
-
exports.matchesMiddlewareConfig = matchesMiddlewareConfig2; exports.createProductionMiddlewareRunner = createProductionMiddlewareRunner; exports.applyProductionMiddlewareHeaders = applyProductionMiddlewareHeaders; exports.CDN_CACHE_CONTROL_HEADERS = CDN_CACHE_CONTROL_HEADERS; exports._withFarmGuardedResponseCache = _withFarmGuardedResponseCache;
|
|
741
|
+
exports.matchesMiddlewareConfig = matchesMiddlewareConfig2; exports.createProductionMiddlewareRunner = createProductionMiddlewareRunner; exports.applyProductionMiddlewareHeaders = applyProductionMiddlewareHeaders; exports.CDN_CACHE_CONTROL_HEADERS = CDN_CACHE_CONTROL_HEADERS; exports._hasPrivateFarmRequestHeaders = _hasPrivateFarmRequestHeaders; exports._withFarmGuardedResponseCache = _withFarmGuardedResponseCache; exports._withFarmDeploymentCookie = _withFarmDeploymentCookie;
|
|
@@ -21,7 +21,7 @@ var _chunkC6CUUBY5cjs = require('./chunk-C6CUUBY5.cjs');
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunkJRGR5Z4Kcjs = require('./chunk-JRGR5Z4K.cjs');
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
@@ -810,7 +810,7 @@ function createIntegrationPlugin(integrationKey, integration) {
|
|
|
810
810
|
} catch (error) {
|
|
811
811
|
const response = _chunkCFG4QERRcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
812
812
|
if (!response) throw error;
|
|
813
|
-
await
|
|
813
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
|
|
814
814
|
return null;
|
|
815
815
|
}
|
|
816
816
|
};
|
|
@@ -858,10 +858,10 @@ function createIntegrationPlugin(integrationKey, integration) {
|
|
|
858
858
|
for (const cookie of forwardedCookies) {
|
|
859
859
|
setCookieHeaders.append("set-cookie", cookie);
|
|
860
860
|
}
|
|
861
|
-
|
|
861
|
+
_chunkJRGR5Z4Kcjs.applyWebResponseHeaders.call(void 0, res, setCookieHeaders, { appendSetCookie: true });
|
|
862
862
|
}
|
|
863
863
|
if (response) {
|
|
864
|
-
await
|
|
864
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
|
|
865
865
|
await emitIntegrationLog(integration, {
|
|
866
866
|
category: integration.category,
|
|
867
867
|
slot: integration.category,
|
|
@@ -954,7 +954,7 @@ function createIntegrationPlugin(integrationKey, integration) {
|
|
|
954
954
|
try {
|
|
955
955
|
const validation = await validateIntegrationRouteInput(route, request, url);
|
|
956
956
|
if (!validation.success) {
|
|
957
|
-
await
|
|
957
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, validation.response);
|
|
958
958
|
await emitIntegrationLog(integration, {
|
|
959
959
|
category: integration.category,
|
|
960
960
|
slot: integration.category,
|
|
@@ -977,7 +977,7 @@ function createIntegrationPlugin(integrationKey, integration) {
|
|
|
977
977
|
for (const middlewareEntry of route.middleware || []) {
|
|
978
978
|
const middlewareResponse = await middlewareEntry.handler(request, handlerContext);
|
|
979
979
|
if (middlewareResponse) {
|
|
980
|
-
await
|
|
980
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, middlewareResponse);
|
|
981
981
|
await emitIntegrationLog(integration, {
|
|
982
982
|
category: integration.category,
|
|
983
983
|
slot: integration.category,
|
|
@@ -1009,7 +1009,7 @@ function createIntegrationPlugin(integrationKey, integration) {
|
|
|
1009
1009
|
handlerContext,
|
|
1010
1010
|
beforeResponse
|
|
1011
1011
|
);
|
|
1012
|
-
await
|
|
1012
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response2);
|
|
1013
1013
|
await emitIntegrationLog(integration, {
|
|
1014
1014
|
category: integration.category,
|
|
1015
1015
|
slot: integration.category,
|
|
@@ -1035,7 +1035,7 @@ function createIntegrationPlugin(integrationKey, integration) {
|
|
|
1035
1035
|
handlerContext,
|
|
1036
1036
|
handlerResponse
|
|
1037
1037
|
);
|
|
1038
|
-
await
|
|
1038
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
|
|
1039
1039
|
await emitIntegrationLog(integration, {
|
|
1040
1040
|
category: integration.category,
|
|
1041
1041
|
slot: integration.category,
|