@farm.js/core 0.1.49 → 0.1.51-beta.0
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/README.md +163 -3
- package/dist/{agent-mcp-Bb8hnnqd.d.ts → agent-mcp-BBMfNpsC.d.ts} +1 -1
- package/dist/{agent-mcp-ir3v4fHf.d.mts → agent-mcp-D44ip11f.d.mts} +1 -1
- package/dist/agent-runtime.cjs +3 -3
- package/dist/agent-runtime.d.mts +6 -6
- package/dist/agent-runtime.d.ts +6 -6
- package/dist/agent-runtime.mjs +2 -2
- package/dist/analyzer-HOUCQR3K.mjs +1066 -0
- package/dist/analyzer-VKUDHNDF.cjs +1066 -0
- package/dist/api/client.d.mts +0 -1
- package/dist/api/client.d.ts +0 -1
- package/dist/api/route-manager.cjs +8 -8
- package/dist/api/route-manager.d.mts +10 -10
- package/dist/api/route-manager.d.ts +10 -10
- package/dist/api/route-manager.mjs +7 -7
- package/dist/api/runtime.cjs +3 -3
- package/dist/api/runtime.d.mts +7 -7
- package/dist/api/runtime.d.ts +7 -7
- package/dist/api/runtime.mjs +2 -2
- package/dist/api.cjs +9 -9
- package/dist/api.d.mts +10 -10
- package/dist/api.d.ts +10 -10
- package/dist/api.mjs +8 -8
- package/dist/{app-y649szYm.d.ts → app-CourU3rQ.d.ts} +7 -7
- package/dist/{app-DLzz02du.d.mts → app-aeD4s_mg.d.mts} +7 -7
- package/dist/{app-manifest-Crn8Qd3U.d.mts → app-manifest-BC6mFn5A.d.mts} +1 -1
- package/dist/{app-manifest-DNeTKMRL.d.ts → app-manifest-LzjoNPeq.d.ts} +1 -1
- package/dist/app-markdown.d.mts +7 -7
- package/dist/app-markdown.d.ts +7 -7
- package/dist/base-path-BOUV5ozD.d.mts +10 -0
- package/dist/base-path-BOUV5ozD.d.ts +10 -0
- package/dist/cache.d.mts +4 -3
- package/dist/cache.d.ts +4 -3
- package/dist/{chunk-YQGZLCT4.cjs → chunk-2IAPKPEB.cjs} +6 -6
- package/dist/chunk-2KVDHNQS.mjs +224 -0
- package/dist/{chunk-QFQDRJKJ.mjs → chunk-3HA7PP72.mjs} +2 -2
- package/dist/{chunk-6LH33DLL.cjs → chunk-3OWVWZ6R.cjs} +28 -2
- package/dist/{chunk-GXSMF7UR.mjs → chunk-4GJJ65RB.mjs} +10 -2
- package/dist/{chunk-GERUXONA.cjs → chunk-5A77OEIG.cjs} +4 -1
- package/dist/{chunk-4HBKBHVP.mjs → chunk-5ENW27SL.mjs} +1 -1
- package/dist/{chunk-MTB57GOK.mjs → chunk-724WT3NI.mjs} +4 -2
- package/dist/{chunk-XLYXG73A.mjs → chunk-75WWOZ5C.mjs} +22 -0
- package/dist/{chunk-VCKGOXFI.cjs → chunk-76GHW3WI.cjs} +7 -1
- package/dist/{chunk-ZIBIE7AH.mjs → chunk-7UPCJDB5.mjs} +7 -1
- package/dist/{chunk-4IICUBQX.cjs → chunk-A5BJKSZE.cjs} +2 -2
- package/dist/{chunk-UYQOIPXE.mjs → chunk-AER5I65K.mjs} +1 -1
- package/dist/{chunk-WB6XES4V.mjs → chunk-ALEUMLJN.mjs} +34 -5
- package/dist/{chunk-Z4LTSH7D.mjs → chunk-AMRK3P6W.mjs} +175 -71
- package/dist/{chunk-TTYXOAB7.mjs → chunk-ANHZ6SUL.mjs} +1 -1
- package/dist/{chunk-ZBS3GOQZ.cjs → chunk-AQLHD6HZ.cjs} +35 -61
- package/dist/{chunk-L6QDME5Z.cjs → chunk-B3GZAQSC.cjs} +3 -3
- package/dist/chunk-CKPTIEDX.cjs +12 -0
- package/dist/{chunk-JPAVNDZH.cjs → chunk-CY7H5KS4.cjs} +25 -25
- package/dist/{chunk-4S7M63WX.cjs → chunk-DGOLAZLV.cjs} +22 -1
- package/dist/{chunk-4HM5B5RR.cjs → chunk-DWW3AMJX.cjs} +343 -308
- package/dist/{chunk-EQMTJBB7.cjs → chunk-DZZHTMWM.cjs} +35 -6
- package/dist/chunk-E36C43IX.cjs +224 -0
- package/dist/{chunk-J2ZEVDEK.cjs → chunk-EHB77D5U.cjs} +3 -3
- package/dist/{chunk-WQGRD5BJ.cjs → chunk-EX6ZSN5P.cjs} +1 -16
- package/dist/{chunk-C5S457CK.cjs → chunk-F42U3R4F.cjs} +214 -193
- package/dist/{chunk-FGJQS4EC.cjs → chunk-FK25QSVC.cjs} +4 -3
- package/dist/{chunk-JOHXK4BB.mjs → chunk-FSQMN2MQ.mjs} +2 -1
- package/dist/{chunk-2H3FJYY6.mjs → chunk-FSXSQQTV.mjs} +3 -2
- package/dist/chunk-G2KTRMWA.mjs +40 -0
- package/dist/{chunk-C6U66WWF.mjs → chunk-GFT5AHAT.mjs} +13 -0
- package/dist/chunk-GNZIAJGB.mjs +358 -0
- package/dist/{chunk-TXK4D46O.mjs → chunk-H3ASZDT7.mjs} +21 -1
- package/dist/{chunk-AXRNEVCS.cjs → chunk-HASX6DC7.cjs} +8 -8
- package/dist/{chunk-NW2BKDVT.mjs → chunk-HHFMECFO.mjs} +1 -1
- package/dist/{chunk-HELQXYVI.cjs → chunk-I2DQGS56.cjs} +11 -9
- package/dist/{chunk-IVHPRF4W.mjs → chunk-I2ZA5SXS.mjs} +81 -46
- package/dist/{chunk-EVCQX243.cjs → chunk-IOUOGRDX.cjs} +13 -5
- package/dist/{chunk-CBJKDB6F.mjs → chunk-IRSS4HS4.mjs} +1 -1
- package/dist/{chunk-NPPT4RWF.cjs → chunk-J22JD5YJ.cjs} +7 -7
- package/dist/{chunk-VJXLUTBM.mjs → chunk-JF5CNHHF.mjs} +9 -9
- package/dist/{chunk-VR4SEDEM.mjs → chunk-JWI5PUO2.mjs} +6 -2
- package/dist/{chunk-6XFGJBYX.cjs → chunk-JYNNIGQO.cjs} +16 -7
- package/dist/{chunk-EXHEPWFJ.cjs → chunk-KHXAJ2KA.cjs} +16 -16
- package/dist/{chunk-ALD2WMLA.mjs → chunk-KY32FWK7.mjs} +4 -4
- package/dist/{chunk-BR5FSKZ5.cjs → chunk-LEIXUFJN.cjs} +6 -2
- package/dist/{chunk-5566GNEG.cjs → chunk-LIFUPCXW.cjs} +13 -0
- package/dist/{chunk-I2SWKWO7.mjs → chunk-LJDIFIJ2.mjs} +1 -1
- package/dist/chunk-LMFJCXDD.mjs +55 -0
- package/dist/{chunk-IXSMFKZ2.cjs → chunk-LNM57D3H.cjs} +4 -4
- package/dist/{chunk-ATHPRVP2.mjs → chunk-LZ4SB57H.mjs} +3 -3
- package/dist/{chunk-73XBJRZW.cjs → chunk-MMEEXMUQ.cjs} +2 -2
- package/dist/chunk-N4AQNEXR.cjs +17 -0
- package/dist/{chunk-JZMZKABS.cjs → chunk-NWUHS6GV.cjs} +3 -2
- package/dist/{chunk-KZT2VHRQ.cjs → chunk-O3MMJPC2.cjs} +19 -19
- package/dist/{chunk-JWP56HCP.mjs → chunk-OD6WM3I7.mjs} +2 -2
- package/dist/{chunk-R2SEZEBC.cjs → chunk-OYNNA4DD.cjs} +4 -4
- package/dist/{chunk-GBPDSUFE.mjs → chunk-OZK2DS44.mjs} +1 -1
- package/dist/{chunk-A7DK663W.cjs → chunk-PDJSL7PL.cjs} +50 -39
- package/dist/{chunk-XLLVWLWO.mjs → chunk-PIHKO25G.mjs} +1 -1
- package/dist/chunk-PIUTGRDI.cjs +358 -0
- package/dist/{chunk-XO6WL6NL.mjs → chunk-PPDHCRTC.mjs} +1 -1
- package/dist/{chunk-LZBM35DH.mjs → chunk-QI5AQMEE.mjs} +20 -9
- package/dist/{chunk-FR4HJDI6.cjs → chunk-QK3HBOTG.cjs} +27 -30
- package/dist/{chunk-Q3UU2KXC.mjs → chunk-QMDU6QHN.mjs} +4 -1
- package/dist/chunk-QXJADAQB.cjs +40 -0
- package/dist/{chunk-DGVVVYKD.mjs → chunk-R5P4KFPM.mjs} +2 -2
- package/dist/{chunk-3HBFI373.cjs → chunk-S5AQ7CAC.cjs} +14 -14
- package/dist/{chunk-Z3BXMMFF.mjs → chunk-S5ZA2T2W.mjs} +63 -42
- package/dist/{chunk-PXEXOQ5R.mjs → chunk-SHS6KXOZ.mjs} +1 -1
- package/dist/{chunk-ETF5C6HR.cjs → chunk-SJ23LJ3N.cjs} +3 -3
- package/dist/{chunk-LL7TDMOM.mjs → chunk-SMUW7UST.mjs} +33 -59
- package/dist/{chunk-VCFBQFOV.mjs → chunk-SN5VSO3Q.mjs} +9 -7
- package/dist/{chunk-AIHD6VME.cjs → chunk-SO3T6T4I.cjs} +482 -378
- package/dist/{chunk-JHXJBNLY.cjs → chunk-SUCDVKUB.cjs} +21 -1
- package/dist/{chunk-DM3TFCC2.cjs → chunk-SUV6YO4Q.cjs} +5 -5
- package/dist/{chunk-NG44F7AH.mjs → chunk-T4EW7AAD.mjs} +2 -2
- package/dist/{chunk-JUMPFVMK.mjs → chunk-TUOO6IK3.mjs} +9 -0
- package/dist/chunk-UB7RVEMX.mjs +73 -0
- package/dist/{chunk-CDTIXBKN.mjs → chunk-UN6N623E.mjs} +2 -2
- package/dist/{chunk-BEXYFR2R.cjs → chunk-USL2ANCB.cjs} +10 -10
- package/dist/{chunk-HAH4FBTA.mjs → chunk-VAHBCI6X.mjs} +1 -1
- package/dist/{chunk-QNQEK3OF.cjs → chunk-VIFPE5RG.cjs} +14 -14
- package/dist/{chunk-HTLCLOXQ.cjs → chunk-VO6NLTV4.cjs} +3 -3
- package/dist/{chunk-XN2MB4QZ.cjs → chunk-VQJYGZNX.cjs} +4 -4
- package/dist/{chunk-N25RPPO5.cjs → chunk-WAPQWAE6.cjs} +10 -10
- package/dist/{chunk-5PKDHKQP.cjs → chunk-WFVSAT7Y.cjs} +6 -4
- package/dist/{chunk-EA5PMJDU.mjs → chunk-WSY2JD7O.mjs} +7 -7
- package/dist/{chunk-HNAUK3SC.mjs → chunk-WVX3BUNJ.mjs} +40 -199
- package/dist/chunk-X3EFRVXY.mjs +12 -0
- package/dist/{chunk-UCQ52TJY.mjs → chunk-X3JNB2TB.mjs} +1 -1
- package/dist/{chunk-J5VCA45K.cjs → chunk-X5BCMLGP.cjs} +1 -1
- package/dist/{chunk-SSNN55Q6.cjs → chunk-XB24LZWI.cjs} +10 -10
- package/dist/{chunk-XXB37YET.cjs → chunk-XLRLSTJ6.cjs} +7 -7
- package/dist/{chunk-BNMHXVLL.mjs → chunk-XMHERKSE.mjs} +0 -15
- package/dist/chunk-XPMC4E2G.cjs +55 -0
- package/dist/{chunk-J27BZO67.mjs → chunk-XWC5NAHV.mjs} +23 -26
- package/dist/{chunk-DRFADSKY.mjs → chunk-XXXRRVY6.mjs} +4 -4
- package/dist/{chunk-C7425KDG.cjs → chunk-XYL4HSVC.cjs} +2 -2
- package/dist/{chunk-2SVJGOAX.mjs → chunk-Y3N5BFRJ.mjs} +3 -3
- package/dist/{chunk-ZSIGEHSE.cjs → chunk-Y7TLL65B.cjs} +21 -180
- package/dist/{chunk-PEHL3IZL.cjs → chunk-YB44NKC2.cjs} +2 -2
- package/dist/chunk-YKHRCY4T.cjs +73 -0
- package/dist/{chunk-RYDDUCNJ.mjs → chunk-YLNBWUVS.mjs} +1 -1
- package/dist/chunk-Z5A6CNV2.mjs +60 -0
- package/dist/chunk-Z64V4WZI.mjs +17 -0
- package/dist/{chunk-ACI52TCN.mjs → chunk-ZF3GX4O7.mjs} +1 -1
- package/dist/client/lifecycle.d.mts +1 -1
- package/dist/client/lifecycle.d.ts +1 -1
- package/dist/{client-plugins-DFDQUI9Q.d.ts → client-plugins-CFBEfVPO.d.ts} +34 -10
- package/dist/{client-plugins-BNBeyLMi.d.mts → client-plugins-cqy_dQd0.d.mts} +34 -10
- package/dist/client-plugins.d.mts +6 -6
- package/dist/client-plugins.d.ts +6 -6
- package/dist/client.cjs +13 -9
- package/dist/client.d.mts +11 -10
- package/dist/client.d.ts +11 -10
- package/dist/client.mjs +15 -11
- package/dist/client.react-server.mjs +1 -1
- package/dist/config-CnhyvvmT.d.mts +188 -0
- package/dist/config-CnhyvvmT.d.ts +188 -0
- package/dist/config.d.mts +6 -6
- package/dist/config.d.ts +6 -6
- package/dist/cron.cjs +4 -4
- package/dist/cron.mjs +3 -3
- package/dist/desktop.d.mts +7 -7
- package/dist/desktop.d.ts +7 -7
- package/dist/{dev-guard-YO6KPIOQ.mjs → dev-guard-4PFQNXQX.mjs} +2 -1
- package/dist/{dev-guard-PLHL6OTJ.cjs → dev-guard-YLO5DE3H.cjs} +4 -3
- package/dist/{devtools-BLKHPY3C.mjs → devtools-4MLL3RAL.mjs} +10 -10
- package/dist/{devtools-A37WWJZL.cjs → devtools-4ZLMD454.cjs} +12 -12
- package/dist/docs.cjs +14 -14
- package/dist/docs.d.mts +7 -7
- package/dist/docs.d.ts +7 -7
- package/dist/docs.mjs +13 -13
- package/dist/environment/vite.d.mts +1 -1
- package/dist/environment/vite.d.ts +1 -1
- package/dist/generate-route-types-DQP0cUzk.d.ts +33 -0
- package/dist/generate-route-types-TF5Wwtvz.d.mts +33 -0
- package/dist/i18n/client.d.mts +2 -2
- package/dist/i18n/client.d.ts +2 -2
- package/dist/i18n/index.d.mts +3 -3
- package/dist/i18n/index.d.ts +3 -3
- package/dist/i18n/server.d.mts +5 -5
- package/dist/i18n/server.d.ts +5 -5
- package/dist/image/server.cjs +3 -3
- package/dist/image/server.mjs +2 -2
- package/dist/image/sharp.cjs +10 -10
- package/dist/image/sharp.mjs +2 -2
- package/dist/{index-DBdiTkNc.d.ts → index-BYkNbeQV.d.mts} +2 -2
- package/dist/{index-CeJ9_s9p.d.mts → index-BxjN_UDZ.d.ts} +2 -2
- package/dist/{index-MocnSP3a.d.ts → index-D3l4tREW.d.ts} +2 -2
- package/dist/{index-Cl3akY5U.d.mts → index-DPUAPho_.d.mts} +2 -2
- package/dist/index.cjs +88 -79
- package/dist/index.d.mts +29 -45
- package/dist/index.d.ts +29 -45
- package/dist/index.mjs +92 -83
- package/dist/integrations.cjs +3 -3
- package/dist/integrations.d.mts +6 -6
- package/dist/integrations.d.ts +6 -6
- package/dist/integrations.mjs +2 -2
- package/dist/internal/app-markdown-runtime.d.mts +7 -7
- package/dist/internal/app-markdown-runtime.d.ts +7 -7
- package/dist/internal/build-runtime.cjs +47 -43
- package/dist/internal/build-runtime.d.mts +9 -9
- package/dist/internal/build-runtime.d.ts +9 -9
- package/dist/internal/build-runtime.mjs +46 -42
- package/dist/internal/cli-runtime.cjs +24 -23
- package/dist/internal/cli-runtime.mjs +24 -23
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +22 -3
- package/dist/internal/client-runtime.d.mts +46 -4
- package/dist/internal/client-runtime.d.ts +46 -4
- package/dist/internal/client-runtime.mjs +22 -3
- package/dist/internal/compression-runtime.d.mts +6 -6
- package/dist/internal/compression-runtime.d.ts +6 -6
- package/dist/internal/config-runtime.cjs +20 -13
- package/dist/internal/config-runtime.d.mts +259 -18
- package/dist/internal/config-runtime.d.ts +259 -18
- package/dist/internal/config-runtime.mjs +18 -11
- package/dist/internal/form-actions.cjs +5 -4
- package/dist/internal/form-actions.mjs +4 -3
- package/dist/internal/infra-analytics-runtime.cjs +6 -6
- package/dist/internal/infra-analytics-runtime.mjs +4 -4
- package/dist/internal/islands-runtime.cjs +56 -0
- package/dist/internal/islands-runtime.mjs +57 -1
- package/dist/internal/metadata-image-runtime.cjs +3 -3
- package/dist/internal/metadata-image-runtime.mjs +2 -2
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +18 -15
- package/dist/internal/production-runtime.d.mts +33 -20
- package/dist/internal/production-runtime.d.ts +33 -20
- package/dist/internal/production-runtime.mjs +20 -17
- package/dist/internal/server-fn-transform.cjs +13 -0
- package/dist/internal/server-fn-transform.d.mts +24 -0
- package/dist/internal/server-fn-transform.d.ts +24 -0
- package/dist/internal/server-fn-transform.mjs +13 -0
- package/dist/{layers-D9fbe-rz.d.ts → layers-CcS42OGR.d.mts} +1 -1
- package/dist/{layers-D9fbe-rz.d.mts → layers-CcS42OGR.d.ts} +1 -1
- package/dist/{lifecycle-DK06VuKP.d.ts → lifecycle-C2aLBOwu.d.mts} +1 -1
- package/dist/{lifecycle-DK06VuKP.d.mts → lifecycle-C2aLBOwu.d.ts} +1 -1
- package/dist/markdown.d.mts +6 -6
- package/dist/markdown.d.ts +6 -6
- package/dist/middleware.cjs +11 -11
- package/dist/middleware.d.mts +8 -8
- package/dist/middleware.d.ts +8 -8
- package/dist/middleware.mjs +10 -10
- package/dist/mobile.cjs +9 -0
- package/dist/mobile.d.mts +94 -0
- package/dist/mobile.d.ts +94 -0
- package/dist/mobile.mjs +9 -0
- package/dist/navigation-delegate-BU4xqdnw.d.ts +29 -0
- package/dist/navigation-delegate-DLhbfEN4.d.mts +29 -0
- package/dist/navigation.cjs +5 -5
- package/dist/navigation.d.mts +9 -9
- package/dist/navigation.d.ts +9 -9
- package/dist/navigation.mjs +4 -4
- package/dist/{nitro-BIXIKJZS.cjs → nitro-CK7M4RMY.cjs} +12 -12
- package/dist/{nitro-UT2J5A5D.mjs → nitro-R444AF3O.mjs} +8 -8
- package/dist/platform.cjs +2 -1
- package/dist/platform.d.mts +4 -3
- package/dist/platform.d.ts +4 -3
- package/dist/platform.mjs +2 -1
- package/dist/{plugin-4KYXV7BB.mjs → plugin-53SY5YBS.mjs} +1 -1
- package/dist/{plugin-WBANOZQM.cjs → plugin-HZIBL3DW.cjs} +2 -2
- package/dist/plugin.cjs +40 -36
- package/dist/plugin.d.mts +13 -8
- package/dist/plugin.d.ts +13 -8
- package/dist/plugin.mjs +39 -35
- package/dist/{production-runtime-B3qFFtKF.d.ts → production-runtime-C78A8YgK.d.ts} +3 -3
- package/dist/{production-runtime-DcD-GRAv.d.mts → production-runtime-DLA4J5WG.d.mts} +3 -3
- package/dist/production-vite-BQFAlG7n.d.mts +13 -0
- package/dist/production-vite-BQFAlG7n.d.ts +13 -0
- package/dist/{programmatic-routes-client-fD9f4XqU.d.ts → programmatic-routes-client-CBqkNhBy.d.ts} +2 -2
- package/dist/{programmatic-routes-client-DzbYGiZQ.d.mts → programmatic-routes-client-NpqGBn-i.d.mts} +2 -2
- package/dist/query/client.cjs +6 -6
- package/dist/query/client.mjs +2 -2
- package/dist/{render-plan-DqJ51ufr.d.mts → render-plan-C9sWvDTv.d.mts} +1 -1
- package/dist/{render-plan-B6cfssrr.d.ts → render-plan-CrqcBbnV.d.ts} +1 -1
- package/dist/renderer-client.cjs +17 -12
- package/dist/renderer-client.d.mts +9 -8
- package/dist/renderer-client.d.ts +9 -8
- package/dist/renderer-client.mjs +10 -5
- package/dist/{request-jhvUMXRx.d.ts → request-BizeuqD7.d.ts} +1 -1
- package/dist/{request-UuAxHn8h.d.mts → request-WwB1-Uim.d.mts} +1 -1
- package/dist/request.d.mts +7 -7
- package/dist/request.d.ts +7 -7
- package/dist/{resolver-DC57A4vz.d.ts → resolver-CJ-D9nP-.d.ts} +1 -1
- package/dist/{resolver-C2G-3Tm6.d.mts → resolver-TDyZKgKI.d.mts} +1 -1
- package/dist/{route-rendering-Sn50cYZf.d.ts → route-rendering-BGhJN64l.d.ts} +1 -1
- package/dist/{route-rendering-Cou00t1X.d.mts → route-rendering-S6NFjnx4.d.mts} +1 -1
- package/dist/{router-0X9DCTcm.d.mts → router-BIheIy9G.d.mts} +1 -1
- package/dist/{router-xwLvi48p.d.ts → router-BUD_j2EL.d.ts} +1 -1
- package/dist/routes-8PT9cl60.d.ts +121 -0
- package/dist/routes-kEUsXHx3.d.mts +121 -0
- package/dist/routes.cjs +3 -2
- package/dist/routes.d.mts +7 -7
- package/dist/routes.d.ts +7 -7
- package/dist/routes.mjs +2 -1
- package/dist/{rsc-pipeline-VKHMABDJ.cjs → rsc-pipeline-JRGUZBYM.cjs} +18 -16
- package/dist/{rsc-pipeline-F6ZPH5MU.mjs → rsc-pipeline-OLAVIKI3.mjs} +17 -15
- package/dist/{runtime-B9HmxiZc.d.ts → runtime-C4CmlOOh.d.ts} +2 -2
- package/dist/{runtime-tkSXZiqO.d.ts → runtime-CWP-21hP.d.ts} +1 -1
- package/dist/{runtime-CMrsyChI.d.mts → runtime-CgJwe6H_.d.mts} +1 -1
- package/dist/{runtime-CCxTmGuf.d.mts → runtime-CihDZ2Rn.d.mts} +2 -2
- package/dist/runtime-G23RSLEK.cjs +1005 -0
- package/dist/runtime-OGCHDACZ.mjs +1005 -0
- package/dist/{schema-dev-notice-O3I5HLXK.mjs → schema-dev-notice-F6QYSOAI.mjs} +4 -4
- package/dist/{schema-dev-notice-Z73J3NJ6.cjs → schema-dev-notice-UU7DMZEU.cjs} +7 -7
- package/dist/{search-client-BTXL5XWD.mjs → search-client-OXH6GBNO.mjs} +5 -3
- package/dist/search-client-ZZLKVO5R.cjs +15 -0
- package/dist/server-action-security.cjs +3 -3
- package/dist/server-action-security.mjs +2 -2
- package/dist/server-fn-client.d.mts +0 -1
- package/dist/server-fn-client.d.ts +0 -1
- package/dist/server-fn.cjs +4 -4
- package/dist/server-fn.d.mts +0 -1
- package/dist/server-fn.d.ts +0 -1
- package/dist/server-fn.mjs +3 -3
- package/dist/server-plugins.cjs +1 -1
- package/dist/server-plugins.d.mts +7 -7
- package/dist/server-plugins.d.ts +7 -7
- package/dist/server-plugins.mjs +1 -1
- package/dist/server-query-client.cjs +4 -3
- package/dist/server-query-client.d.mts +0 -1
- package/dist/server-query-client.d.ts +0 -1
- package/dist/server-query-client.mjs +3 -2
- package/dist/server-query.cjs +5 -5
- package/dist/server-query.d.mts +0 -1
- package/dist/server-query.d.ts +0 -1
- package/dist/server-query.mjs +4 -4
- package/dist/server.cjs +104 -79
- package/dist/server.d.mts +22 -17
- package/dist/server.d.ts +22 -17
- package/dist/server.mjs +73 -48
- package/dist/{spa-router-B48EjsS1.d.mts → spa-router-CVOL0Vrq.d.mts} +4 -4
- package/dist/{spa-router-B06APnGK.d.ts → spa-router-Kytv4jSB.d.ts} +4 -4
- package/dist/testing.cjs +16 -15
- package/dist/testing.d.mts +6 -6
- package/dist/testing.d.ts +6 -6
- package/dist/testing.mjs +12 -11
- package/dist/{types--Wh02r5_.d.mts → types-C41ePjvP.d.mts} +1 -1
- package/dist/{types--Wh02r5_.d.ts → types-C41ePjvP.d.ts} +1 -1
- package/dist/{utils-C5fyK2tE.d.ts → utils-DbyXlzaj.d.ts} +1 -1
- package/dist/{utils-hyAwmcN6.d.mts → utils-Dsa1HZ7X.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +40 -36
- package/dist/vite.d.mts +9 -9
- package/dist/vite.d.ts +9 -9
- package/dist/vite.mjs +39 -35
- package/dist/{workflows-Df1C_7OG.d.mts → workflows-CRMzQZ3k.d.mts} +2 -1
- package/dist/{workflows-Df1C_7OG.d.ts → workflows-CRMzQZ3k.d.ts} +2 -1
- package/dist/workflows.cjs +5 -5
- package/dist/workflows.d.mts +1 -1
- package/dist/workflows.d.ts +1 -1
- package/dist/workflows.mjs +4 -4
- package/package.json +16 -3
- package/dist/base-path-leyrqXbX.d.mts +0 -19
- package/dist/base-path-leyrqXbX.d.ts +0 -19
- package/dist/cache-invalidation-BD0z_lfu.d.mts +0 -4
- package/dist/cache-invalidation-BD0z_lfu.d.ts +0 -4
- package/dist/chunk-45EUIICW.mjs +0 -15
- package/dist/chunk-MJ6IC4K2.mjs +0 -34
- package/dist/chunk-V7KTQR4C.cjs +0 -15
- package/dist/search-client-QCYAL6AY.cjs +0 -13
- package/dist/{chunk-5OJVKXFV.cjs → chunk-N7JQXQAV.cjs} +2 -2
- package/dist/{chunk-72KABRWN.mjs → chunk-WSDKXV4E.mjs} +4 -4
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FARM_RSC_INSTALL_HINT,
|
|
3
3
|
findFarmAppPackageDir
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SHS6KXOZ.mjs";
|
|
5
|
+
import {
|
|
6
|
+
createFarmDevLoopbackPlugin
|
|
7
|
+
} from "./chunk-LMFJCXDD.mjs";
|
|
5
8
|
import {
|
|
6
9
|
resolveDeployOutputPath
|
|
7
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JF5CNHHF.mjs";
|
|
8
11
|
import {
|
|
12
|
+
farmDesktopDevGuardPlugin,
|
|
9
13
|
loadFarmReactPlugin
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import {
|
|
12
|
-
resolveFarmPlatform
|
|
13
|
-
} from "./chunk-LL7TDMOM.mjs";
|
|
14
|
+
} from "./chunk-75WWOZ5C.mjs";
|
|
14
15
|
import {
|
|
15
16
|
loadTailwindVitePlugin
|
|
16
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-PIHKO25G.mjs";
|
|
18
|
+
import {
|
|
19
|
+
resolveFarmPlatform
|
|
20
|
+
} from "./chunk-SMUW7UST.mjs";
|
|
17
21
|
|
|
18
22
|
// src/rsc-pipeline.ts
|
|
19
23
|
import { readFileSync } from "fs";
|
|
@@ -94,7 +98,11 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
94
98
|
experimental: { ...userConfig.experimental, serverComponents: true },
|
|
95
99
|
port: options.port ?? userConfig.server?.port,
|
|
96
100
|
plugins: [
|
|
97
|
-
...options.command === "serve" && resolveFarmPlatform() === "desktop" ? [
|
|
101
|
+
...options.command === "serve" && resolveFarmPlatform() === "desktop" ? [
|
|
102
|
+
farmDesktopDevGuardPlugin(
|
|
103
|
+
typeof userConfig.basePath === "string" ? userConfig.basePath : void 0
|
|
104
|
+
)
|
|
105
|
+
] : [],
|
|
98
106
|
...tailwind ? [tailwind] : [],
|
|
99
107
|
...vitePlugins,
|
|
100
108
|
viteRsc.default({ serverHandler: false, entries: FARM_RSC_ENTRIES }),
|
|
@@ -120,26 +128,15 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
120
128
|
mode: options.command === "build" ? "production" : "development"
|
|
121
129
|
};
|
|
122
130
|
}
|
|
123
|
-
function farmRscDesktopDevGuardPlugin(basePath) {
|
|
124
|
-
return {
|
|
125
|
-
name: "farm:desktop-dev-guard",
|
|
126
|
-
enforce: "pre",
|
|
127
|
-
configureServer: {
|
|
128
|
-
order: "pre",
|
|
129
|
-
async handler(server) {
|
|
130
|
-
const { createFarmDesktopDevGuard } = await import("./dev-guard-YO6KPIOQ.mjs");
|
|
131
|
-
server.middlewares.use(
|
|
132
|
-
createFarmDesktopDevGuard(server, {
|
|
133
|
-
basePath: typeof basePath === "string" ? basePath : ""
|
|
134
|
-
})
|
|
135
|
-
);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
131
|
async function createFarmRscDevServer(userConfig, options) {
|
|
141
132
|
const { createServer } = await import("vite");
|
|
142
|
-
|
|
133
|
+
const { host, ...configOptions } = options;
|
|
134
|
+
const config = await createFarmRscViteConfig(userConfig, { ...configOptions, command: "serve" });
|
|
135
|
+
return createServer({
|
|
136
|
+
...config,
|
|
137
|
+
plugins: [...config.plugins ?? [], createFarmDevLoopbackPlugin()],
|
|
138
|
+
...host === void 0 ? {} : { server: { ...config.server, host } }
|
|
139
|
+
});
|
|
143
140
|
}
|
|
144
141
|
async function buildFarmRsc(userConfig, options) {
|
|
145
142
|
const { createBuilder } = await import("vite");
|
|
@@ -17,18 +17,18 @@ import {
|
|
|
17
17
|
} from "./chunk-2DA7CLY7.mjs";
|
|
18
18
|
import {
|
|
19
19
|
withFarmRequestClientAddress
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-GFT5AHAT.mjs";
|
|
21
21
|
import {
|
|
22
22
|
createFarmAPIMiddlewarePathnames
|
|
23
23
|
} from "./chunk-LM2YOGDK.mjs";
|
|
24
|
-
import {
|
|
25
|
-
_withFarmResponseHeaders
|
|
26
|
-
} from "./chunk-LM55GS4R.mjs";
|
|
27
24
|
import {
|
|
28
25
|
getFarmRedirectError,
|
|
29
26
|
isFarmNotFoundError,
|
|
30
27
|
isFarmRedirectError
|
|
31
28
|
} from "./chunk-JNYFXL7X.mjs";
|
|
29
|
+
import {
|
|
30
|
+
_withFarmResponseHeaders
|
|
31
|
+
} from "./chunk-LM55GS4R.mjs";
|
|
32
32
|
import {
|
|
33
33
|
stripFarmLocaleFromPathname
|
|
34
34
|
} from "./chunk-7S7AAK2D.mjs";
|
|
@@ -7,7 +7,7 @@ var _chunk2KMIJDY6cjs = require('./chunk-2KMIJDY6.cjs');
|
|
|
7
7
|
var _chunkSHIWRBFIcjs = require('./chunk-SHIWRBFI.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkVQJYGZNXcjs = require('./chunk-VQJYGZNX.cjs');
|
|
11
11
|
|
|
12
12
|
// src/cron.ts
|
|
13
13
|
var DEFAULT_FARM_CRON_SECRET_ENV = "CRON_SECRET";
|
|
@@ -67,7 +67,7 @@ async function prepareFarmCronForNitro(config) {
|
|
|
67
67
|
const wrapperNames = resolveCronWrapperFileNames(cron.jobs.map((job) => job.name));
|
|
68
68
|
for (const job of cron.jobs) {
|
|
69
69
|
const taskName = getFarmCronTaskName(job.name);
|
|
70
|
-
const wrapperPath =
|
|
70
|
+
const wrapperPath = _chunkVQJYGZNXcjs.toPosixPath.call(void 0, path.join(generatedDir, `${wrapperNames.get(job.name)}.mjs`));
|
|
71
71
|
await fs.writeFile(wrapperPath, createNitroCronTaskWrapper(job, cron.secretEnv), "utf8");
|
|
72
72
|
tasks[taskName] = {
|
|
73
73
|
handler: wrapperPath,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
searchParamsToObject
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-H3ASZDT7.mjs";
|
|
4
4
|
import {
|
|
5
5
|
decodeRouteSegment
|
|
6
6
|
} from "./chunk-OHWM2VI4.mjs";
|
|
@@ -172,8 +172,8 @@ async function fileExists(filePath) {
|
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
async function globFiles(pattern, cwd) {
|
|
175
|
-
const glob = await import("
|
|
176
|
-
return glob
|
|
175
|
+
const { glob } = await import("tinyglobby");
|
|
176
|
+
return glob(pattern, { cwd, expandDirectories: false });
|
|
177
177
|
}
|
|
178
178
|
function parseSearchParams(searchParams) {
|
|
179
179
|
return searchParamsToObject(searchParams);
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _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 _chunkSYW346ZNcjs = require('./chunk-SYW346ZN.cjs');
|
|
4
3
|
|
|
4
|
+
var _chunkE36C43IXcjs = require('./chunk-E36C43IX.cjs');
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
var _chunkSYW346ZNcjs = require('./chunk-SYW346ZN.cjs');
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
var _chunkGBMWLDCCcjs = require('./chunk-GBMWLDCC.cjs');
|
|
10
11
|
|
|
11
12
|
|
|
13
|
+
var _chunkQISW423Scjs = require('./chunk-QISW423S.cjs');
|
|
14
|
+
|
|
15
|
+
|
|
12
16
|
|
|
13
17
|
|
|
14
18
|
|
|
@@ -22,29 +26,17 @@ var _chunkGSVJ3IIFcjs = require('./chunk-GSVJ3IIF.cjs');
|
|
|
22
26
|
var _chunk5YPBFMBNcjs = require('./chunk-5YPBFMBN.cjs');
|
|
23
27
|
|
|
24
28
|
|
|
25
|
-
var _chunkRD623KW4cjs = require('./chunk-RD623KW4.cjs');
|
|
26
|
-
|
|
27
|
-
|
|
28
29
|
|
|
29
30
|
var _chunk5Y2P454Ocjs = require('./chunk-5Y2P454O.cjs');
|
|
30
31
|
|
|
31
32
|
|
|
32
|
-
var _chunkJ2ZEVDEKcjs = require('./chunk-J2ZEVDEK.cjs');
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
var _chunkJZMZKABScjs = require('./chunk-JZMZKABS.cjs');
|
|
36
|
-
|
|
37
|
-
|
|
38
33
|
var _chunkBBPDJGCUcjs = require('./chunk-BBPDJGCU.cjs');
|
|
39
34
|
|
|
40
35
|
|
|
41
36
|
var _chunk5C7XMKQ4cjs = require('./chunk-5C7XMKQ4.cjs');
|
|
42
37
|
|
|
43
|
-
|
|
44
|
-
var _chunkXN2MB4QZcjs = require('./chunk-XN2MB4QZ.cjs');
|
|
45
|
-
|
|
46
38
|
// src/ssg.ts
|
|
47
|
-
var _fs = require('fs'); var fs = _interopRequireWildcard(_fs);
|
|
39
|
+
var _fs = require('fs'); var fs = _interopRequireWildcard(_fs);
|
|
48
40
|
var _promises = require('fs/promises');
|
|
49
41
|
var REQUEST_API_LABELS = /* @__PURE__ */ new Map([
|
|
50
42
|
["cookies", "request cookies"],
|
|
@@ -511,163 +503,13 @@ function matchSSGPage(urlPath, ssgPages) {
|
|
|
511
503
|
return ssgPages.find((page) => page.urlPath === normalizedPath);
|
|
512
504
|
}
|
|
513
505
|
|
|
514
|
-
// src/routing/generate-route-types.ts
|
|
515
|
-
var _path = require('path'); var path = _interopRequireWildcard(_path); var path3 = _interopRequireWildcard(_path);
|
|
516
|
-
|
|
517
|
-
function routeSegmentsToTsTypeLiteral(segments) {
|
|
518
|
-
if (segments.length === 0) return '"/"';
|
|
519
|
-
const hasDynamic = segments.some((s) => s.startsWith("["));
|
|
520
|
-
if (!hasDynamic) return JSON.stringify("/" + segments.join("/"));
|
|
521
|
-
const parts = segments.map((s) => {
|
|
522
|
-
if (s.startsWith("[[...") || s.startsWith("[...")) return "${string}";
|
|
523
|
-
if (s.startsWith("[")) return "${string}";
|
|
524
|
-
return s;
|
|
525
|
-
});
|
|
526
|
-
return "`/" + parts.join("/") + "`";
|
|
527
|
-
}
|
|
528
|
-
function routePatternToTsTypeLiterals(pattern) {
|
|
529
|
-
if (pattern === "/") return ['"/"'];
|
|
530
|
-
let variants = [[]];
|
|
531
|
-
for (const segment of pattern.slice(1).split("/").filter(Boolean)) {
|
|
532
|
-
if (segment.startsWith("[[...") && segment.endsWith("]]")) {
|
|
533
|
-
variants = variants.flatMap((parts) => [parts, [...parts, segment]]);
|
|
534
|
-
} else {
|
|
535
|
-
variants = variants.map((parts) => [...parts, segment]);
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
return variants.map(routeSegmentsToTsTypeLiteral);
|
|
539
|
-
}
|
|
540
|
-
function routePatternToRouteLiteral(pattern) {
|
|
541
|
-
return JSON.stringify(pattern);
|
|
542
|
-
}
|
|
543
|
-
function renderTypeUnion(values) {
|
|
544
|
-
return values.length <= 1 ? values[0] || "never" : `
|
|
545
|
-
| ${values.join("\n | ")}`;
|
|
546
|
-
}
|
|
547
|
-
function renderTypeAlias(name, value) {
|
|
548
|
-
return `export type ${name} =${value.startsWith("\n") ? "" : " "}${value};`;
|
|
549
|
-
}
|
|
550
|
-
function createRoutePattern(route) {
|
|
551
|
-
if (route.segments.length === 0) return "/";
|
|
552
|
-
return "/" + route.segments.map((seg) => {
|
|
553
|
-
if (!seg.isDynamic) return seg.segment;
|
|
554
|
-
if (seg.isCatchAll) return seg.isOptional ? `[[...${seg.segment}]]` : `[...${seg.segment}]`;
|
|
555
|
-
return `[${seg.segment}]`;
|
|
556
|
-
}).join("/");
|
|
557
|
-
}
|
|
558
|
-
var DEFAULT_OUT_FILE = "farm-routes.d.ts";
|
|
559
|
-
async function generateRouteTypes(options) {
|
|
560
|
-
const root = path.resolve(options.root);
|
|
561
|
-
const srcDir = options.srcDir || "src";
|
|
562
|
-
const outFile = options.outFile || DEFAULT_OUT_FILE;
|
|
563
|
-
const outPath = path.isAbsolute(outFile) ? outFile : path.join(root, srcDir, outFile);
|
|
564
|
-
const content = await createRouteTypeDeclarations(options, outPath);
|
|
565
|
-
fs.mkdirSync(path.dirname(outPath), { recursive: true });
|
|
566
|
-
_chunk5YPBFMBNcjs.writeFileIfChanged.call(void 0, outPath, content);
|
|
567
|
-
return outPath;
|
|
568
|
-
}
|
|
569
|
-
async function createRouteTypeDeclarations(options, outPath) {
|
|
570
|
-
const { root, srcDir = "src", extraRoutes = [], suppressLintOnLink = false } = options;
|
|
571
|
-
const sourceRoots = _nullishCoalesce(options.sourceRoots, () => ( [{ name: "project", root, srcDir, layer: false }]));
|
|
572
|
-
const componentExtensions = _chunkRD623KW4cjs.resolveFarmComponentExtensions.call(void 0, options.componentExtensions).map(
|
|
573
|
-
(extension) => extension.slice(1)
|
|
574
|
-
);
|
|
575
|
-
const patterns = /* @__PURE__ */ new Set();
|
|
576
|
-
const routeModulePatterns = /* @__PURE__ */ new Set();
|
|
577
|
-
const glob = await import("fast-glob");
|
|
578
|
-
for (const source of sourceRoots) {
|
|
579
|
-
const appDir = path.join(source.root, source.srcDir, "app");
|
|
580
|
-
if (fs.existsSync(appDir)) {
|
|
581
|
-
const routeModuleFiles = await glob.default(
|
|
582
|
-
`**/{page,layout,loading,error}.{${componentExtensions.join(",")},md,mdx}`,
|
|
583
|
-
{
|
|
584
|
-
cwd: appDir,
|
|
585
|
-
absolute: false
|
|
586
|
-
}
|
|
587
|
-
);
|
|
588
|
-
for (const file of routeModuleFiles) {
|
|
589
|
-
if (_chunkJ2ZEVDEKcjs.parseRouteSlotFile.call(void 0, file)) continue;
|
|
590
|
-
const route = _chunkXN2MB4QZcjs.parseRoutePath.call(void 0, file);
|
|
591
|
-
const pattern = createRoutePattern(route);
|
|
592
|
-
routeModulePatterns.add(pattern);
|
|
593
|
-
if (route.type === "page") {
|
|
594
|
-
patterns.add(pattern);
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
for (const route of await _chunkJZMZKABScjs.discoverProgrammaticRoutePaths.call(void 0, source.root, source.srcDir)) {
|
|
599
|
-
patterns.add(route);
|
|
600
|
-
routeModulePatterns.add(route);
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
for (const route of extraRoutes) {
|
|
604
|
-
if (route.startsWith("/")) {
|
|
605
|
-
patterns.add(route);
|
|
606
|
-
routeModulePatterns.add(route);
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
const sortedPatterns = Array.from(patterns).sort();
|
|
610
|
-
const typeLiterals = Array.from(new Set(sortedPatterns.flatMap(routePatternToTsTypeLiterals)));
|
|
611
|
-
const patternLiterals = sortedPatterns.map(routePatternToRouteLiteral);
|
|
612
|
-
const routeModulePatternLiterals = Array.from(routeModulePatterns).sort().map(routePatternToRouteLiteral);
|
|
613
|
-
const routePathType = suppressLintOnLink ? "string" : renderTypeUnion(typeLiterals);
|
|
614
|
-
const routePatternType = suppressLintOnLink ? "string" : renderTypeUnion(patternLiterals);
|
|
615
|
-
const routeModulePatternType = renderTypeUnion(routeModulePatternLiterals);
|
|
616
|
-
const routeTypesImportPath = `./${path.basename(outPath).replace(/\.d\.ts$/, "")}`;
|
|
617
|
-
const linkAugmentationBlock = suppressLintOnLink ? "" : `
|
|
618
|
-
declare module "@farm.js/core/client" {
|
|
619
|
-
interface LinkDefaultRoute {
|
|
620
|
-
_: import(${JSON.stringify(routeTypesImportPath)}).RoutePath;
|
|
621
|
-
pattern: import(${JSON.stringify(routeTypesImportPath)}).RoutePattern;
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
declare module "@farm.js/core" {
|
|
626
|
-
interface LinkDefaultRoute {
|
|
627
|
-
_: import(${JSON.stringify(routeTypesImportPath)}).RoutePath;
|
|
628
|
-
pattern: import(${JSON.stringify(routeTypesImportPath)}).RoutePattern;
|
|
629
|
-
}
|
|
630
|
-
// Ensure root import ("@farm.js/core") uses the same typed Link signature as client entry.
|
|
631
|
-
const Link: typeof import("@farm.js/core/client").Link;
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
// Internal declaration path used by @farm.js/core root type re-exports.
|
|
635
|
-
declare module "@farm.js/core/dist/client.js" {
|
|
636
|
-
interface LinkDefaultRoute {
|
|
637
|
-
_: import(${JSON.stringify(routeTypesImportPath)}).RoutePath;
|
|
638
|
-
pattern: import(${JSON.stringify(routeTypesImportPath)}).RoutePattern;
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
`;
|
|
642
|
-
const routeModuleAugmentationBlock = `
|
|
643
|
-
declare global {
|
|
644
|
-
namespace FarmJS {
|
|
645
|
-
interface RouteRegistry {
|
|
646
|
-
pattern: import(${JSON.stringify(routeTypesImportPath)}).RouteModulePattern;
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
}
|
|
650
|
-
`;
|
|
651
|
-
const content = `/**
|
|
652
|
-
* Auto-generated route types from src/app.
|
|
653
|
-
* Link href and route component props are typed automatically from generated declarations.
|
|
654
|
-
* Regenerated on dev start and when routes change.
|
|
655
|
-
* Set suppressLintOnLink: true in farm.config.ts to accept any string on Link href.
|
|
656
|
-
*/
|
|
657
|
-
${renderTypeAlias("RoutePath", routePathType)}
|
|
658
|
-
${renderTypeAlias("RoutePattern", routePatternType)}
|
|
659
|
-
${renderTypeAlias("RouteModulePattern", routeModulePatternType)}${linkAugmentationBlock}${routeModuleAugmentationBlock}
|
|
660
|
-
`;
|
|
661
|
-
return content;
|
|
662
|
-
}
|
|
663
|
-
|
|
664
506
|
// src/image-types.ts
|
|
665
507
|
|
|
666
|
-
|
|
508
|
+
var _path = require('path'); var path2 = _interopRequireWildcard(_path);
|
|
667
509
|
var FARM_STATIC_IMAGE_EXTENSIONS = ["avif", "gif", "jpeg", "jpg", "png", "webp"];
|
|
668
510
|
function generateFarmImageTypes(options) {
|
|
669
|
-
const outputPath = options.outFile ?
|
|
670
|
-
_fs.mkdirSync.call(void 0,
|
|
511
|
+
const outputPath = options.outFile ? path2.default.resolve(options.root, options.outFile) : path2.default.join(options.root, options.srcDir || "src", "farm-images.d.ts");
|
|
512
|
+
_fs.mkdirSync.call(void 0, path2.default.dirname(outputPath), { recursive: true });
|
|
671
513
|
_chunk5YPBFMBNcjs.writeFileIfChanged.call(void 0, outputPath, createFarmImageTypeDeclarations());
|
|
672
514
|
return outputPath;
|
|
673
515
|
}
|
|
@@ -768,10 +610,10 @@ var CONFIG_FILENAMES = [
|
|
|
768
610
|
"config.cjs"
|
|
769
611
|
];
|
|
770
612
|
function createContentTypeDeclarations(options, outPath) {
|
|
771
|
-
const root =
|
|
613
|
+
const root = path2.resolve(options.root);
|
|
772
614
|
const projectConfig = findConfigPath(root, options.configPath);
|
|
773
615
|
const configPaths = [
|
|
774
|
-
...(_nullishCoalesce(options.layerConfigPaths, () => ( []))).filter((value) =>
|
|
616
|
+
...(_nullishCoalesce(options.layerConfigPaths, () => ( []))).filter((value) => fs.existsSync(value)),
|
|
775
617
|
...projectConfig ? [projectConfig] : []
|
|
776
618
|
];
|
|
777
619
|
if (configPaths.length === 0) return createEmptyContentTypes();
|
|
@@ -839,17 +681,17 @@ export {};
|
|
|
839
681
|
}
|
|
840
682
|
function findConfigPath(root, configPath) {
|
|
841
683
|
if (configPath) {
|
|
842
|
-
const resolvedPath =
|
|
843
|
-
return
|
|
684
|
+
const resolvedPath = path2.isAbsolute(configPath) ? configPath : path2.join(root, configPath);
|
|
685
|
+
return fs.existsSync(resolvedPath) ? resolvedPath : null;
|
|
844
686
|
}
|
|
845
687
|
for (const filename of CONFIG_FILENAMES) {
|
|
846
|
-
const resolvedPath =
|
|
847
|
-
if (
|
|
688
|
+
const resolvedPath = path2.join(root, filename);
|
|
689
|
+
if (fs.existsSync(resolvedPath)) return resolvedPath;
|
|
848
690
|
}
|
|
849
691
|
return null;
|
|
850
692
|
}
|
|
851
693
|
function toTypeImportPath(outPath, targetPath) {
|
|
852
|
-
const relativePath =
|
|
694
|
+
const relativePath = path2.relative(path2.dirname(outPath), targetPath).replace(/\\/g, "/").replace(/\.(tsx?|jsx?|mjs|cjs|mts|cts)$/, "");
|
|
853
695
|
return relativePath.startsWith(".") ? relativePath : `./${relativePath}`;
|
|
854
696
|
}
|
|
855
697
|
|
|
@@ -950,7 +792,7 @@ async function generateFarmTypeArtifacts(options) {
|
|
|
950
792
|
componentExtensions: options.componentExtensions,
|
|
951
793
|
sourceRoots
|
|
952
794
|
};
|
|
953
|
-
unifiedSections.push(await createRouteTypeDeclarations(routeOptions, unifiedTypesPath));
|
|
795
|
+
unifiedSections.push(await _chunkE36C43IXcjs.createRouteTypeDeclarations.call(void 0, routeOptions, unifiedTypesPath));
|
|
954
796
|
result.routeTypesPath = unifiedTypesPath;
|
|
955
797
|
} else if (shouldGenerateRoutes) {
|
|
956
798
|
const routeOptions = {
|
|
@@ -964,11 +806,11 @@ async function generateFarmTypeArtifacts(options) {
|
|
|
964
806
|
};
|
|
965
807
|
if (options.check) {
|
|
966
808
|
const routeTypesPath = resolveGeneratedPath(root, srcDir, options.routeTypesOutFile);
|
|
967
|
-
const content = await createRouteTypeDeclarations(routeOptions, routeTypesPath);
|
|
809
|
+
const content = await _chunkE36C43IXcjs.createRouteTypeDeclarations.call(void 0, routeOptions, routeTypesPath);
|
|
968
810
|
checkGeneratedFile(routeTypesPath, content, result.stalePaths);
|
|
969
811
|
result.routeTypesPath = routeTypesPath;
|
|
970
812
|
} else {
|
|
971
|
-
result.routeTypesPath = await generateRouteTypes(routeOptions);
|
|
813
|
+
result.routeTypesPath = await _chunkE36C43IXcjs.generateRouteTypes.call(void 0, routeOptions);
|
|
972
814
|
}
|
|
973
815
|
}
|
|
974
816
|
if (shouldGenerateApi) {
|
|
@@ -1177,5 +1019,4 @@ function collectLegacyTypeArtifacts(root, srcDir, stalePaths) {
|
|
|
1177
1019
|
|
|
1178
1020
|
|
|
1179
1021
|
|
|
1180
|
-
|
|
1181
|
-
exports.resolveRouteRenderingConfig = resolveRouteRenderingConfig; exports.resolveRouteRenderingConfigFromFile = resolveRouteRenderingConfigFromFile; exports.analyzeStaticRouteCandidate = analyzeStaticRouteCandidate; exports.findRequestBoundSourceBlockers = findRequestBoundSourceBlockers; exports.parseRouteRenderingDirective = parseRouteRenderingDirective; exports.readRouteRenderingDirectiveFromFile = readRouteRenderingDirectiveFromFile; exports.collectSSGPages = collectSSGPages; exports.isSSGModule = isSSGModule; exports.hasISR = hasISR; exports.getRevalidateInterval = getRevalidateInterval; exports.hasPPR = hasPPR; exports.generateSSGManifest = generateSSGManifest; exports.matchSSGPage = matchSSGPage; exports.generateRouteTypes = generateRouteTypes; exports.generateFarmImageTypes = generateFarmImageTypes; exports.createFarmImageTypeDeclarations = createFarmImageTypeDeclarations; exports.generateFarmI18nTypes = generateFarmI18nTypes; exports.generateFarmTypeArtifacts = generateFarmTypeArtifacts;
|
|
1022
|
+
exports.resolveRouteRenderingConfig = resolveRouteRenderingConfig; exports.resolveRouteRenderingConfigFromFile = resolveRouteRenderingConfigFromFile; exports.analyzeStaticRouteCandidate = analyzeStaticRouteCandidate; exports.findRequestBoundSourceBlockers = findRequestBoundSourceBlockers; exports.parseRouteRenderingDirective = parseRouteRenderingDirective; exports.readRouteRenderingDirectiveFromFile = readRouteRenderingDirectiveFromFile; exports.collectSSGPages = collectSSGPages; exports.isSSGModule = isSSGModule; exports.hasISR = hasISR; exports.getRevalidateInterval = getRevalidateInterval; exports.hasPPR = hasPPR; exports.generateSSGManifest = generateSSGManifest; exports.matchSSGPage = matchSSGPage; exports.generateFarmImageTypes = generateFarmImageTypes; exports.createFarmImageTypeDeclarations = createFarmImageTypeDeclarations; exports.generateFarmI18nTypes = generateFarmI18nTypes; exports.generateFarmTypeArtifacts = generateFarmTypeArtifacts;
|
|
@@ -8,7 +8,7 @@ var _chunkKORZ6PREcjs = require('./chunk-KORZ6PRE.cjs');
|
|
|
8
8
|
var _chunk4DCWVSL2cjs = require('./chunk-4DCWVSL2.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkLIFUPCXWcjs = require('./chunk-LIFUPCXW.cjs');
|
|
12
12
|
|
|
13
13
|
// src/metadata-image.ts
|
|
14
14
|
var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element");
|
|
@@ -129,7 +129,7 @@ async function finalizeMetadataImageResponse(body, headers, options) {
|
|
|
129
129
|
responseHeaders.set("ETag", etag);
|
|
130
130
|
responseHeaders.set("Content-Length", String(body.byteLength));
|
|
131
131
|
responseHeaders.set("X-Content-Type-Options", "nosniff");
|
|
132
|
-
if (
|
|
132
|
+
if (_chunkLIFUPCXWcjs.matchesFarmIfNoneMatch.call(void 0, options.ifNoneMatch, etag)) {
|
|
133
133
|
return new Response(null, { status: 304, headers: responseHeaders });
|
|
134
134
|
}
|
|
135
135
|
return new Response(_optionalChain([options, 'access', _5 => _5.method, 'optionalAccess', _6 => _6.toUpperCase, 'call', _7 => _7()]) === "HEAD" ? null : body, {
|
|
@@ -0,0 +1,73 @@
|
|
|
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; } }// src/platform-blocks.ts
|
|
2
|
+
var _fs = require('fs');
|
|
3
|
+
var _path = require('path'); var path = _interopRequireWildcard(_path);
|
|
4
|
+
function isPlainObject(value) {
|
|
5
|
+
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
6
|
+
}
|
|
7
|
+
function createPlatformBlockChecker(prefix) {
|
|
8
|
+
const fail = (message) => {
|
|
9
|
+
throw new TypeError(`${prefix}: ${message}`);
|
|
10
|
+
};
|
|
11
|
+
return {
|
|
12
|
+
fail,
|
|
13
|
+
checkKeys(value, allowed, where) {
|
|
14
|
+
for (const key of Object.keys(value)) {
|
|
15
|
+
if (!allowed.has(key)) {
|
|
16
|
+
fail(`unknown option ${where}${key}. Supported: ${[...allowed].join(", ")}.`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
optionalString(value, key) {
|
|
21
|
+
if (value === void 0) return void 0;
|
|
22
|
+
if (typeof value !== "string" || !value.trim()) fail(`${key} must be a non-empty string.`);
|
|
23
|
+
return value.trim();
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function readAppPackageJson(root) {
|
|
28
|
+
try {
|
|
29
|
+
const parsed = JSON.parse(_fs.readFileSync.call(void 0, path.join(root, "package.json"), "utf8"));
|
|
30
|
+
return isPlainObject(parsed) ? parsed : {};
|
|
31
|
+
} catch (e) {
|
|
32
|
+
return {};
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function resolveAppPackageName(root, pkg) {
|
|
36
|
+
return typeof pkg.productName === "string" && pkg.productName.trim() || typeof pkg.name === "string" && pkg.name.replace(/^@[^/]+\//, "").trim() || path.basename(root);
|
|
37
|
+
}
|
|
38
|
+
function resolvePlatformProfile(profile = "production") {
|
|
39
|
+
if (typeof profile !== "string" || !/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(profile)) {
|
|
40
|
+
throw new TypeError(`--profile must be a name such as "beta", got "${String(profile)}".`);
|
|
41
|
+
}
|
|
42
|
+
return profile;
|
|
43
|
+
}
|
|
44
|
+
async function resolvePlatformBlock(input, context, validate, cache) {
|
|
45
|
+
if (typeof input !== "function") return validate(input, context);
|
|
46
|
+
const fn = input;
|
|
47
|
+
const call = () => Promise.resolve().then(() => fn(context)).then((value) => validate(value, context));
|
|
48
|
+
if (!cache) return call();
|
|
49
|
+
const key = [
|
|
50
|
+
context.os,
|
|
51
|
+
context.mode,
|
|
52
|
+
context.command,
|
|
53
|
+
context.profile,
|
|
54
|
+
context.root,
|
|
55
|
+
String(fn)
|
|
56
|
+
].join("\0");
|
|
57
|
+
let resolved = cache.get(key);
|
|
58
|
+
if (!resolved) {
|
|
59
|
+
resolved = call();
|
|
60
|
+
cache.set(key, resolved);
|
|
61
|
+
resolved.catch(() => cache.delete(key));
|
|
62
|
+
}
|
|
63
|
+
return resolved;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
exports.isPlainObject = isPlainObject; exports.createPlatformBlockChecker = createPlatformBlockChecker; exports.readAppPackageJson = readAppPackageJson; exports.resolveAppPackageName = resolveAppPackageName; exports.resolvePlatformProfile = resolvePlatformProfile; exports.resolvePlatformBlock = resolvePlatformBlock;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FARM_ACTION_RESULT_KEY
|
|
3
|
+
} from "./chunk-X3EFRVXY.mjs";
|
|
4
|
+
import {
|
|
5
|
+
getServerActionInvalidations,
|
|
6
|
+
runWithServerActionRequest,
|
|
7
|
+
sanitizeServerActionError,
|
|
8
|
+
serializeServerFnFailure
|
|
9
|
+
} from "./chunk-FSQMN2MQ.mjs";
|
|
10
|
+
import {
|
|
11
|
+
getFarmRedirectError,
|
|
12
|
+
isFarmNotFoundError
|
|
13
|
+
} from "./chunk-JNYFXL7X.mjs";
|
|
14
|
+
|
|
15
|
+
// src/form-actions.ts
|
|
16
|
+
import { handleAction, registerServerReference } from "@farm.js/islx/server";
|
|
17
|
+
var FARM_FORM_ACTION_HEADER = "F-Action";
|
|
18
|
+
function registerFarmFormAction(action, id) {
|
|
19
|
+
return registerServerReference(action, id);
|
|
20
|
+
}
|
|
21
|
+
function handleFarmFormActionRequest(request, config) {
|
|
22
|
+
return handleAction(request, {
|
|
23
|
+
allowedOrigins: config.allowedOrigins,
|
|
24
|
+
bodySizeLimit: config.bodySizeLimit,
|
|
25
|
+
// The result islx sends is the envelope, not the action's own type.
|
|
26
|
+
run: (actionRequest, action) => runFarmFormAction(actionRequest, action),
|
|
27
|
+
mapError(error) {
|
|
28
|
+
const redirect = getFarmRedirectError(error);
|
|
29
|
+
if (redirect) return { redirect: redirect.url };
|
|
30
|
+
if (isFarmNotFoundError(error)) return { status: 404 };
|
|
31
|
+
return void 0;
|
|
32
|
+
},
|
|
33
|
+
onError: (error) => console.error("[Farm.js] Server action failed:", error)
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
async function runFarmFormAction(request, action) {
|
|
37
|
+
if (!request.headers.has(FARM_FORM_ACTION_HEADER)) {
|
|
38
|
+
return runWithServerActionRequest(request, action);
|
|
39
|
+
}
|
|
40
|
+
try {
|
|
41
|
+
return await runWithServerActionRequest(request, async () => {
|
|
42
|
+
const value = await action();
|
|
43
|
+
return {
|
|
44
|
+
[FARM_ACTION_RESULT_KEY]: { invalidations: [...getServerActionInvalidations()] },
|
|
45
|
+
value
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
} catch (error) {
|
|
49
|
+
if (!serializeServerFnFailure(error)) throw error;
|
|
50
|
+
return {
|
|
51
|
+
[FARM_ACTION_RESULT_KEY]: { invalidations: [], error: sanitizeServerActionError(error) }
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export {
|
|
57
|
+
FARM_FORM_ACTION_HEADER,
|
|
58
|
+
registerFarmFormAction,
|
|
59
|
+
handleFarmFormActionRequest
|
|
60
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// src/client-revalidation.ts
|
|
2
|
+
function attachRevalidationListeners(refresh, options = {}) {
|
|
3
|
+
if (typeof window === "undefined") return () => {
|
|
4
|
+
};
|
|
5
|
+
const onFocus = options.refetchOnWindowFocus === false ? void 0 : refresh;
|
|
6
|
+
const onOnline = options.refetchOnReconnect === false ? void 0 : refresh;
|
|
7
|
+
if (onFocus) window.addEventListener("focus", onFocus);
|
|
8
|
+
if (onOnline) window.addEventListener("online", onOnline);
|
|
9
|
+
return () => {
|
|
10
|
+
if (onFocus) window.removeEventListener("focus", onFocus);
|
|
11
|
+
if (onOnline) window.removeEventListener("online", onOnline);
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export {
|
|
16
|
+
attachRevalidationListeners
|
|
17
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { h as FarmClientNavigationAction, i as FarmClientNavigationErrorEvent, j as FarmClientNavigationEvent, k as FarmClientNavigationLoadedEvent, l as FarmClientNavigationResolvedEvent, m as FarmClientNavigationSession, a as FarmClientPlugin, o as FarmClientPluginCloseEvent, v as FarmClientPluginRouter, w as FarmClientPluginSetupEvent, x as FarmClientPluginStateEvent, y as defineClient } from '../lifecycle-C2aLBOwu.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { h as FarmClientNavigationAction, i as FarmClientNavigationErrorEvent, j as FarmClientNavigationEvent, k as FarmClientNavigationLoadedEvent, l as FarmClientNavigationResolvedEvent, m as FarmClientNavigationSession, a as FarmClientPlugin, o as FarmClientPluginCloseEvent, v as FarmClientPluginRouter, w as FarmClientPluginSetupEvent, x as FarmClientPluginStateEvent, y as defineClient } from '../lifecycle-C2aLBOwu.js';
|