@farm.js/core 0.1.48 → 0.1.50
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-DAjB8Eyu.d.ts → agent-mcp-9BMbRgg_.d.ts} +1 -1
- package/dist/{agent-mcp-CXN3g0eX.d.mts → agent-mcp-CIMH324y.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-CN7C74WX.cjs +1066 -0
- package/dist/analyzer-DDW34OMC.mjs +1066 -0
- package/dist/api/client.d.mts +0 -1
- package/dist/api/client.d.ts +0 -1
- package/dist/api/route-manager.cjs +5 -5
- package/dist/api/route-manager.d.mts +10 -10
- package/dist/api/route-manager.d.ts +10 -10
- package/dist/api/route-manager.mjs +4 -4
- 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 +6 -6
- package/dist/api.d.mts +10 -10
- package/dist/api.d.ts +10 -10
- package/dist/api.mjs +5 -5
- package/dist/{app-VK9sHDn5.d.ts → app-BWibTHVT.d.ts} +7 -7
- package/dist/{app-DytgRPjJ.d.mts → app-DVJ13FPA.d.mts} +7 -7
- package/dist/{app-manifest-DPgW5ke5.d.mts → app-manifest-CQDJOKL2.d.mts} +1 -1
- package/dist/{app-manifest-BUu7YGAx.d.ts → app-manifest-D0kaXdwu.d.ts} +1 -1
- package/dist/app-markdown.d.mts +7 -7
- package/dist/app-markdown.d.ts +7 -7
- package/dist/cache.d.mts +4 -3
- package/dist/cache.d.ts +4 -3
- package/dist/{chunk-VJXLUTBM.mjs → chunk-2DEPNLXK.mjs} +7 -7
- package/dist/chunk-2G63BIRL.mjs +227 -0
- package/dist/chunk-2GLQSIZD.mjs +55 -0
- package/dist/{chunk-HRLYO2XJ.mjs → chunk-2VCC3GVC.mjs} +1 -1
- package/dist/chunk-3ATXWZPH.cjs +227 -0
- package/dist/{chunk-YSPMY4B7.cjs → chunk-474FO3UE.cjs} +233 -157
- package/dist/{chunk-QNQEK3OF.cjs → chunk-4T25YCZ5.cjs} +14 -14
- package/dist/{chunk-ATHPRVP2.mjs → chunk-5V4KZOZO.mjs} +1 -1
- package/dist/{chunk-FGJQS4EC.cjs → chunk-6QA2SXVH.cjs} +2 -2
- package/dist/{chunk-XLYXG73A.mjs → chunk-75WWOZ5C.mjs} +22 -0
- package/dist/{chunk-QFQDRJKJ.mjs → chunk-76R5GJER.mjs} +2 -2
- package/dist/{chunk-NG44F7AH.mjs → chunk-7ONZDKVY.mjs} +2 -2
- package/dist/{chunk-MZZA6ZQV.mjs → chunk-7PZVXMWG.mjs} +4 -4
- package/dist/{chunk-4IICUBQX.cjs → chunk-A5BJKSZE.cjs} +2 -2
- package/dist/{chunk-TTYXOAB7.mjs → chunk-ANHZ6SUL.mjs} +1 -1
- package/dist/{chunk-ZBS3GOQZ.cjs → chunk-AQLHD6HZ.cjs} +35 -61
- package/dist/{chunk-Q2ZKQ6GD.cjs → chunk-B5S2JS6M.cjs} +127 -125
- package/dist/{chunk-AXRNEVCS.cjs → chunk-B6PREBN6.cjs} +8 -8
- package/dist/{chunk-JOHXK4BB.mjs → chunk-BW6SCVYX.mjs} +1 -1
- package/dist/{chunk-LZBM35DH.mjs → chunk-C73RIAEF.mjs} +4 -4
- package/dist/chunk-CGCJ2TJU.cjs +55 -0
- package/dist/{chunk-UYQOIPXE.mjs → chunk-CPXDDWGL.mjs} +1 -1
- package/dist/{chunk-JPAVNDZH.cjs → chunk-CY7H5KS4.cjs} +25 -25
- package/dist/{chunk-4S7M63WX.cjs → chunk-DGOLAZLV.cjs} +22 -1
- package/dist/{chunk-73XBJRZW.cjs → chunk-E2BMCNMJ.cjs} +2 -2
- package/dist/{chunk-WUEDTW6E.cjs → chunk-F5LERVY3.cjs} +23 -5
- package/dist/{chunk-A7DK663W.cjs → chunk-FACTMUPI.cjs} +27 -27
- package/dist/chunk-G2KTRMWA.mjs +40 -0
- package/dist/{chunk-C6U66WWF.mjs → chunk-GFT5AHAT.mjs} +13 -0
- package/dist/{chunk-ZGS3ZDF7.cjs → chunk-GOOK2J2W.cjs} +7 -7
- package/dist/{chunk-NW2BKDVT.mjs → chunk-HHFMECFO.mjs} +1 -1
- package/dist/{chunk-6M3HXUBQ.mjs → chunk-HWCHIBJZ.mjs} +21 -3
- package/dist/{chunk-HUL4LTC6.cjs → chunk-HYN3LLG7.cjs} +63 -20
- package/dist/{chunk-HELQXYVI.cjs → chunk-I2DQGS56.cjs} +11 -9
- package/dist/{chunk-SSNN55Q6.cjs → chunk-IQXGHGZF.cjs} +5 -5
- package/dist/{chunk-ZSIGEHSE.cjs → chunk-IUBDMDZZ.cjs} +21 -180
- package/dist/{chunk-TQWGOQ7O.mjs → chunk-IWJKJDNW.mjs} +116 -40
- package/dist/{chunk-NRFUVDTH.mjs → chunk-JJOWY3XD.mjs} +2 -2
- package/dist/{chunk-6XFGJBYX.cjs → chunk-JYNNIGQO.cjs} +16 -7
- package/dist/{chunk-XO6WL6NL.mjs → chunk-KGP76FSV.mjs} +1 -1
- package/dist/{chunk-GXSMF7UR.mjs → chunk-KO2NWUKN.mjs} +1 -1
- package/dist/{chunk-VDLF2DJA.cjs → chunk-KZH6YLND.cjs} +375 -162
- package/dist/{chunk-5566GNEG.cjs → chunk-LIFUPCXW.cjs} +13 -0
- package/dist/{chunk-I2SWKWO7.mjs → chunk-LJDIFIJ2.mjs} +1 -1
- package/dist/{chunk-KZT2VHRQ.cjs → chunk-LYWAGXXW.cjs} +11 -11
- package/dist/{chunk-N6SIQJEJ.mjs → chunk-M7LKA632.mjs} +54 -11
- package/dist/{chunk-6LH33DLL.cjs → chunk-NJVFPJ2Y.cjs} +2 -2
- package/dist/{chunk-JWP56HCP.mjs → chunk-OD6WM3I7.mjs} +2 -2
- package/dist/{chunk-MJ6IC4K2.mjs → chunk-OTOOJIUB.mjs} +1 -1
- package/dist/{chunk-TFA6BUAE.cjs → chunk-OY5XDG24.cjs} +4 -4
- package/dist/{chunk-R2SEZEBC.cjs → chunk-OYNNA4DD.cjs} +4 -4
- package/dist/{chunk-GBPDSUFE.mjs → chunk-OZK2DS44.mjs} +1 -1
- package/dist/chunk-QXJADAQB.cjs +40 -0
- package/dist/{chunk-JLS6ZLFM.cjs → chunk-RHOR2J6V.cjs} +1 -1
- package/dist/{chunk-YQGZLCT4.cjs → chunk-RWT2BTJT.cjs} +6 -6
- package/dist/{chunk-3HBFI373.cjs → chunk-S5AQ7CAC.cjs} +14 -14
- package/dist/{chunk-HNAUK3SC.mjs → chunk-SHJJM6OG.mjs} +40 -199
- package/dist/{chunk-LL7TDMOM.mjs → chunk-SMUW7UST.mjs} +33 -59
- package/dist/{chunk-VCFBQFOV.mjs → chunk-SN5VSO3Q.mjs} +9 -7
- package/dist/{chunk-DM3TFCC2.cjs → chunk-SUV6YO4Q.cjs} +5 -5
- 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-UY6HS5PF.cjs} +2 -2
- package/dist/{chunk-HAH4FBTA.mjs → chunk-VAHBCI6X.mjs} +1 -1
- package/dist/{chunk-C2R5RVLA.cjs → chunk-VCKGOXFI.cjs} +73 -1
- package/dist/{chunk-N25RPPO5.cjs → chunk-WAPQWAE6.cjs} +10 -10
- package/dist/{chunk-NE33FRQ5.mjs → chunk-WVBUXNBX.mjs} +274 -61
- package/dist/{chunk-ALD2WMLA.mjs → chunk-WXHDVXJE.mjs} +2 -2
- package/dist/{chunk-EVCQX243.cjs → chunk-X2EL3BLH.cjs} +2 -2
- package/dist/{chunk-EA5PMJDU.mjs → chunk-X3HOVNHI.mjs} +1 -1
- package/dist/{chunk-XXB37YET.cjs → chunk-XLRLSTJ6.cjs} +7 -7
- package/dist/{chunk-DRFADSKY.mjs → chunk-XXXRRVY6.mjs} +4 -4
- package/dist/{chunk-EXHEPWFJ.cjs → chunk-YAXOEAND.cjs} +10 -10
- package/dist/{chunk-PEHL3IZL.cjs → chunk-YB44NKC2.cjs} +2 -2
- package/dist/chunk-YKHRCY4T.cjs +73 -0
- package/dist/{chunk-NIPKC4DA.mjs → chunk-ZIBIE7AH.mjs} +72 -0
- package/dist/{chunk-N7SPZJLY.mjs → chunk-ZLOQQ2UF.mjs} +33 -31
- package/dist/client/lifecycle.d.mts +1 -1
- package/dist/client/lifecycle.d.ts +1 -1
- package/dist/{client-plugins-DqjCsKMN.d.ts → client-plugins-BPfltM5m.d.ts} +19 -10
- package/dist/{client-plugins-BlEzV5FO.d.mts → client-plugins-D4RO59f0.d.mts} +19 -10
- package/dist/client-plugins.d.mts +6 -6
- package/dist/client-plugins.d.ts +6 -6
- package/dist/client.cjs +11 -8
- package/dist/client.d.mts +11 -10
- package/dist/client.d.ts +11 -10
- package/dist/client.mjs +12 -9
- 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/desktop.d.mts +7 -7
- package/dist/desktop.d.ts +7 -7
- package/dist/{dev-guard-MPZUJFIV.mjs → dev-guard-4PFQNXQX.mjs} +4 -2
- package/dist/{dev-guard-4NQ3LFO5.cjs → dev-guard-YLO5DE3H.cjs} +7 -5
- package/dist/{devtools-A37WWJZL.cjs → devtools-N5XTOECL.cjs} +8 -8
- package/dist/{devtools-BLKHPY3C.mjs → devtools-STG7HPRV.mjs} +7 -7
- package/dist/docs.cjs +10 -10
- package/dist/docs.d.mts +7 -7
- package/dist/docs.d.ts +7 -7
- package/dist/docs.mjs +9 -9
- 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-CMigAr9f.d.mts → index-C-N3Pwg-.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-n3hjOvVC.d.ts → index-k8o8eUOd.d.mts} +2 -2
- package/dist/index.cjs +73 -66
- package/dist/index.d.mts +29 -45
- package/dist/index.d.ts +29 -45
- package/dist/index.mjs +78 -71
- 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 +36 -32
- package/dist/internal/build-runtime.d.mts +9 -9
- package/dist/internal/build-runtime.d.ts +9 -9
- package/dist/internal/build-runtime.mjs +35 -31
- package/dist/internal/cli-runtime.cjs +16 -15
- package/dist/internal/cli-runtime.mjs +16 -15
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +19 -2
- package/dist/internal/client-runtime.d.mts +45 -3
- package/dist/internal/client-runtime.d.ts +45 -3
- package/dist/internal/client-runtime.mjs +19 -2
- package/dist/internal/compression-runtime.d.mts +6 -6
- package/dist/internal/compression-runtime.d.ts +6 -6
- package/dist/internal/config-runtime.cjs +17 -10
- package/dist/internal/config-runtime.d.mts +259 -18
- package/dist/internal/config-runtime.d.ts +259 -18
- package/dist/internal/config-runtime.mjs +15 -8
- package/dist/internal/desktop-guard.cjs +2 -2
- package/dist/internal/desktop-guard.d.mts +7 -0
- package/dist/internal/desktop-guard.d.ts +7 -0
- package/dist/internal/desktop-guard.mjs +1 -1
- package/dist/internal/form-actions.cjs +4 -4
- package/dist/internal/form-actions.mjs +3 -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 +4 -1
- package/dist/internal/islands-runtime.d.mts +9 -12
- package/dist/internal/islands-runtime.d.ts +9 -12
- package/dist/internal/islands-runtime.mjs +5 -2
- 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 +13 -13
- package/dist/internal/production-runtime.d.mts +19 -19
- package/dist/internal/production-runtime.d.ts +19 -19
- package/dist/internal/production-runtime.mjs +15 -15
- 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 +7 -7
- package/dist/middleware.d.mts +8 -8
- package/dist/middleware.d.ts +8 -8
- package/dist/middleware.mjs +6 -6
- package/dist/mobile.cjs +9 -0
- package/dist/mobile.d.mts +67 -0
- package/dist/mobile.d.ts +67 -0
- package/dist/mobile.mjs +9 -0
- package/dist/navigation-delegate-8xg3Zvp4.d.ts +29 -0
- package/dist/navigation-delegate-ji6elCKy.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-UT2J5A5D.mjs → nitro-2Q5NVY7L.mjs} +2 -2
- package/dist/{nitro-BIXIKJZS.cjs → nitro-YPSZBYDK.cjs} +3 -3
- 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 +31 -29
- package/dist/plugin.d.mts +13 -8
- package/dist/plugin.d.ts +13 -8
- package/dist/plugin.mjs +30 -28
- package/dist/{production-runtime-bWZJMcQb.d.mts → production-runtime-DXnQQkQf.d.mts} +3 -3
- package/dist/{production-runtime-YVDGYWBG.d.ts → production-runtime-TdKaYRj0.d.ts} +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-DviwGeAv.d.ts → programmatic-routes-client-BwiTndEC.d.ts} +2 -2
- package/dist/{programmatic-routes-client-BFKOTEXN.d.mts → programmatic-routes-client-Dh1SDLSM.d.mts} +2 -2
- package/dist/query/client.cjs +6 -6
- package/dist/query/client.mjs +2 -2
- package/dist/{render-plan-DqWXo3-B.d.ts → render-plan-BPbwRbuN.d.ts} +1 -1
- package/dist/{render-plan-CS8l0zaK.d.mts → render-plan-BvCGXF6K.d.mts} +1 -1
- package/dist/renderer-client.cjs +9 -6
- package/dist/renderer-client.d.mts +9 -8
- package/dist/renderer-client.d.ts +9 -8
- package/dist/renderer-client.mjs +6 -3
- package/dist/{request-CBrHpaCC.d.ts → request-B8PGTZNR.d.ts} +1 -1
- package/dist/{request-D4XqmnJF.d.mts → request-C_xTkJib.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-3pRPtyO2.d.mts → route-rendering-DlddURL1.d.mts} +1 -1
- package/dist/{route-rendering-Bltnu8a3.d.ts → route-rendering-RNtcj607.d.ts} +1 -1
- package/dist/{router-BFSmKGtI.d.mts → router-B97eB0Mq.d.mts} +1 -1
- package/dist/{router-DDT7bkg7.d.ts → router-qUVaoEN8.d.ts} +1 -1
- package/dist/routes-8PT9cl60.d.ts +121 -0
- package/dist/routes-kEUsXHx3.d.mts +121 -0
- package/dist/routes.d.mts +6 -6
- package/dist/routes.d.ts +6 -6
- package/dist/{rsc-pipeline-4KOITP64.cjs → rsc-pipeline-L4XOZ2TE.cjs} +13 -10
- package/dist/{rsc-pipeline-ULFIB3UT.mjs → rsc-pipeline-T3775JUA.mjs} +12 -9
- package/dist/runtime-BIBGJO7V.cjs +1005 -0
- package/dist/{runtime-B9HmxiZc.d.ts → runtime-C4CmlOOh.d.ts} +2 -2
- package/dist/{runtime-C6yG64je.d.ts → runtime-C8GUnNeP.d.ts} +1 -1
- package/dist/{runtime-Cpylaypt.d.mts → runtime-CaDswfWi.d.mts} +1 -1
- package/dist/{runtime-CCxTmGuf.d.mts → runtime-CihDZ2Rn.d.mts} +2 -2
- package/dist/runtime-HRSFC4ZC.mjs +1005 -0
- package/dist/{schema-dev-notice-O3I5HLXK.mjs → schema-dev-notice-LZ5NXGLN.mjs} +2 -2
- package/dist/{schema-dev-notice-Z73J3NJ6.cjs → schema-dev-notice-XV7GZ3QJ.cjs} +4 -4
- 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.d.mts +0 -1
- package/dist/server-query-client.d.ts +0 -1
- 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 +89 -66
- package/dist/server.d.mts +22 -17
- package/dist/server.d.ts +22 -17
- package/dist/server.mjs +64 -41
- package/dist/{spa-router-CkTPnA4L.d.mts → spa-router-Dlv5ofg0.d.mts} +4 -4
- package/dist/{spa-router-CKuS81mi.d.ts → spa-router-qapSboKz.d.ts} +4 -4
- package/dist/testing.cjs +7 -7
- package/dist/testing.d.mts +6 -6
- package/dist/testing.d.ts +6 -6
- package/dist/testing.mjs +5 -5
- 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-C0ORLYXc.d.ts → utils-A-cYF81u.d.ts} +1 -1
- package/dist/{utils-IA9wVkef.d.mts → utils-DyvlSxFk.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +31 -29
- package/dist/vite.d.mts +9 -9
- package/dist/vite.d.ts +9 -9
- package/dist/vite.mjs +30 -28
- 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 +3 -3
- package/dist/workflows.d.mts +1 -1
- package/dist/workflows.d.ts +1 -1
- package/dist/workflows.mjs +2 -2
- package/package.json +10 -2
- 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-V7KTQR4C.cjs +0 -15
- package/dist/{chunk-BR5FSKZ5.cjs → chunk-EQWWOQTK.cjs} +0 -0
- package/dist/{chunk-5OJVKXFV.cjs → chunk-N7JQXQAV.cjs} +2 -2
- package/dist/{chunk-VR4SEDEM.mjs → chunk-VOZ5DI7D.mjs} +0 -0
- package/dist/{chunk-72KABRWN.mjs → chunk-WSDKXV4E.mjs} +4 -4
|
@@ -15,7 +15,7 @@ var _chunkJHXJBNLYcjs = require('./chunk-JHXJBNLY.cjs');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkLIFUPCXWcjs = require('./chunk-LIFUPCXW.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
var _chunk6XQSPIN6cjs = require('./chunk-6XQSPIN6.cjs');
|
|
@@ -128,10 +128,10 @@ function createFarmWorkflowRequestHandler(options) {
|
|
|
128
128
|
try {
|
|
129
129
|
payload = await readWorkflowPayload(
|
|
130
130
|
request,
|
|
131
|
-
|
|
131
|
+
_chunkLIFUPCXWcjs.resolveFarmServerConfig.call(void 0, options.server).bodySizeLimit
|
|
132
132
|
);
|
|
133
133
|
} catch (error) {
|
|
134
|
-
const response =
|
|
134
|
+
const response = _chunkLIFUPCXWcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
135
135
|
if (response) return response;
|
|
136
136
|
if (error instanceof SyntaxError) {
|
|
137
137
|
return Response.json({ error: "Invalid workflow request body." }, { status: 400 });
|
|
@@ -210,7 +210,7 @@ async function prepareFarmWorkflowsForNitro(config) {
|
|
|
210
210
|
createNitroWorkflowHTTPHandler(
|
|
211
211
|
workflowConfig,
|
|
212
212
|
workflows,
|
|
213
|
-
|
|
213
|
+
_chunkLIFUPCXWcjs.resolveFarmServerConfig.call(void 0, config.server)
|
|
214
214
|
),
|
|
215
215
|
"utf8"
|
|
216
216
|
);
|
|
@@ -561,7 +561,7 @@ async function readWorkflowPayload(request, bodySizeLimit) {
|
|
|
561
561
|
if (request.method === "GET" || request.method === "HEAD") {
|
|
562
562
|
return _chunkJHXJBNLYcjs.searchParamsToObject.call(void 0, url.searchParams);
|
|
563
563
|
}
|
|
564
|
-
const bytes = await
|
|
564
|
+
const bytes = await _chunkLIFUPCXWcjs.readFarmRequestBody.call(void 0, request, bodySizeLimit);
|
|
565
565
|
const text = new TextDecoder().decode(bytes);
|
|
566
566
|
if (!text) return {};
|
|
567
567
|
const contentType = (request.headers.get("content-type") || "").split(";", 1)[0].trim().toLowerCase();
|
|
@@ -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 _chunk3ATXWZPHcjs = require('./chunk-3ATXWZPH.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 _chunk3ATXWZPHcjs.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 _chunk3ATXWZPHcjs.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 _chunk3ATXWZPHcjs.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;
|
|
@@ -2,16 +2,20 @@ import {
|
|
|
2
2
|
collectSSGPages,
|
|
3
3
|
matchSSGPage,
|
|
4
4
|
resolveRouteRenderingConfigFromFile
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-SHJJM6OG.mjs";
|
|
6
6
|
import {
|
|
7
7
|
createFarmMetadataImageResponse
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-OZK2DS44.mjs";
|
|
9
|
+
import {
|
|
10
|
+
resolveFarmPlatform
|
|
11
|
+
} from "./chunk-SMUW7UST.mjs";
|
|
9
12
|
import {
|
|
10
13
|
classifyFarmDocumentPrefix,
|
|
11
14
|
composeFarmFullDocument,
|
|
12
15
|
createDefaultErrorMarkup,
|
|
13
16
|
createFarmMetadataRouteResponse,
|
|
14
17
|
createFarmRouteRenderPlan,
|
|
18
|
+
createFarmStreamedDocumentTransform,
|
|
15
19
|
createFarmThemeDocumentParts,
|
|
16
20
|
createLateNotFoundRecovery,
|
|
17
21
|
createLateRedirectRecovery,
|
|
@@ -24,14 +28,15 @@ import {
|
|
|
24
28
|
getRouteDirectoryDepth,
|
|
25
29
|
getRouteGroupScope,
|
|
26
30
|
isInRouteGroupScope,
|
|
31
|
+
openFarmStreamedDocument,
|
|
27
32
|
removeFarmDocumentTitles,
|
|
28
33
|
renderFarmLocaleAlternateLinks,
|
|
29
34
|
resolveDefaultErrorStatus,
|
|
30
35
|
routeBoundaryCoversDirectory
|
|
31
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-ZIBIE7AH.mjs";
|
|
32
37
|
import {
|
|
33
38
|
listFarmMCPLlmsTxtLinks
|
|
34
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-JJOWY3XD.mjs";
|
|
35
40
|
import {
|
|
36
41
|
FARM_DEFAULT_MCP_PATH,
|
|
37
42
|
collectFarmDefaultMCPPages,
|
|
@@ -46,7 +51,7 @@ import {
|
|
|
46
51
|
} from "./chunk-A4PWGL46.mjs";
|
|
47
52
|
import {
|
|
48
53
|
handleFarmFormActionRequest
|
|
49
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-OTOOJIUB.mjs";
|
|
50
55
|
import {
|
|
51
56
|
FARM_ISLAND_REPLAYABLE_SELECTOR,
|
|
52
57
|
isFarmIslandStrategy
|
|
@@ -56,6 +61,13 @@ import {
|
|
|
56
61
|
mergeProgrammaticClientRoutes,
|
|
57
62
|
resolveProgrammaticClientRoutes
|
|
58
63
|
} from "./chunk-C5JXCUKR.mjs";
|
|
64
|
+
import {
|
|
65
|
+
createFarmMarkdownRouteModuleFromFile,
|
|
66
|
+
loadFarmMdxComponents
|
|
67
|
+
} from "./chunk-YVJV7Q2X.mjs";
|
|
68
|
+
import {
|
|
69
|
+
isFarmMarkdownPageFile
|
|
70
|
+
} from "./chunk-GW4YUIHW.mjs";
|
|
59
71
|
import {
|
|
60
72
|
_setDefaultFarmThemeConfig,
|
|
61
73
|
getTheme
|
|
@@ -116,29 +128,22 @@ import {
|
|
|
116
128
|
getFarmAppDirectories,
|
|
117
129
|
getFarmSourceRoots
|
|
118
130
|
} from "./chunk-52Y3C3HG.mjs";
|
|
131
|
+
import {
|
|
132
|
+
resolveFarmMdxComponentsModulePath,
|
|
133
|
+
resolveMdxConfig
|
|
134
|
+
} from "./chunk-UIJOLBUL.mjs";
|
|
119
135
|
import {
|
|
120
136
|
resolveWorkflowsConfig
|
|
121
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-5V4KZOZO.mjs";
|
|
122
138
|
import {
|
|
123
139
|
resolveCronConfig
|
|
124
140
|
} from "./chunk-UCQ52TJY.mjs";
|
|
125
141
|
import {
|
|
126
142
|
resolveServerActionsConfig
|
|
127
|
-
} from "./chunk-
|
|
143
|
+
} from "./chunk-BW6SCVYX.mjs";
|
|
128
144
|
import {
|
|
129
145
|
resolveFarmThemeConfig
|
|
130
146
|
} from "./chunk-YWPNIYUP.mjs";
|
|
131
|
-
import {
|
|
132
|
-
createFarmMarkdownRouteModuleFromFile,
|
|
133
|
-
loadFarmMdxComponents
|
|
134
|
-
} from "./chunk-YVJV7Q2X.mjs";
|
|
135
|
-
import {
|
|
136
|
-
isFarmMarkdownPageFile
|
|
137
|
-
} from "./chunk-GW4YUIHW.mjs";
|
|
138
|
-
import {
|
|
139
|
-
resolveFarmMdxComponentsModulePath,
|
|
140
|
-
resolveMdxConfig
|
|
141
|
-
} from "./chunk-UIJOLBUL.mjs";
|
|
142
147
|
import {
|
|
143
148
|
FARM_MARKDOWN_CONTENT_TYPE,
|
|
144
149
|
FARM_MARKDOWN_PAGE_CHECK_HEADER,
|
|
@@ -159,7 +164,7 @@ import {
|
|
|
159
164
|
getIntegrationProviders,
|
|
160
165
|
getRegisteredIntegrationAPIManifest,
|
|
161
166
|
isFarmIntegrationProviderComponentReference
|
|
162
|
-
} from "./chunk-
|
|
167
|
+
} from "./chunk-HHFMECFO.mjs";
|
|
163
168
|
import {
|
|
164
169
|
createRouteSlotContainerId,
|
|
165
170
|
parseRouteSlotFile
|
|
@@ -208,7 +213,7 @@ import {
|
|
|
208
213
|
} from "./chunk-VHIXGZYH.mjs";
|
|
209
214
|
import {
|
|
210
215
|
loadFarmDevModule
|
|
211
|
-
} from "./chunk-
|
|
216
|
+
} from "./chunk-TUOO6IK3.mjs";
|
|
212
217
|
import {
|
|
213
218
|
resolveFarmI18nConfig
|
|
214
219
|
} from "./chunk-MU5V7XHL.mjs";
|
|
@@ -239,7 +244,7 @@ import {
|
|
|
239
244
|
import {
|
|
240
245
|
matchesFarmIfNoneMatch,
|
|
241
246
|
resolveFarmServerConfig
|
|
242
|
-
} from "./chunk-
|
|
247
|
+
} from "./chunk-GFT5AHAT.mjs";
|
|
243
248
|
import {
|
|
244
249
|
getRequestContextSnapshot
|
|
245
250
|
} from "./chunk-D2LCAV6L.mjs";
|
|
@@ -248,7 +253,7 @@ import {
|
|
|
248
253
|
} from "./chunk-LM2YOGDK.mjs";
|
|
249
254
|
import {
|
|
250
255
|
FARM_VERSION
|
|
251
|
-
} from "./chunk-
|
|
256
|
+
} from "./chunk-2VCC3GVC.mjs";
|
|
252
257
|
import {
|
|
253
258
|
resolveFarmTrailingSlashRedirect,
|
|
254
259
|
setFarmTrailingSlashPreference
|
|
@@ -4565,7 +4570,7 @@ function rendererRenderOptions() {
|
|
|
4565
4570
|
}
|
|
4566
4571
|
var FARM_DEV_EARLY_CLIENT_SCRIPT = `<script type="module" async src="/@farm/client.js"></script>`;
|
|
4567
4572
|
function createDocumentFooter(options) {
|
|
4568
|
-
return
|
|
4573
|
+
return `${options.closeRoot === false ? "" : "</div>"}
|
|
4569
4574
|
${options.suspenseRevealFallback}
|
|
4570
4575
|
${options.refreshPPR ? createPPRRefreshScript() : ""}
|
|
4571
4576
|
${options.deferredHydrationScript || ""}
|
|
@@ -6767,7 +6772,8 @@ window.__FARM_I18N__ = ${getFarmI18nClientSnapshot() ? serializeInlineValue(getF
|
|
|
6767
6772
|
async renderWithSSR(element, req, res, clearMiddlewareData, options = {}) {
|
|
6768
6773
|
const renderToPipeableStream = this.rendererRuntime.renderToPipeableStream;
|
|
6769
6774
|
const fullDocumentRouteKey = options.observabilityRoute || req.__FARM_ROUTE__ || req.url || "/";
|
|
6770
|
-
|
|
6775
|
+
const streamDocument = fullDocumentRoutes.has(fullDocumentRouteKey) || await this.rootLayoutRendersDocument();
|
|
6776
|
+
if (!renderToPipeableStream || _isFarmMarkdownPageCheck(req.headers?.[FARM_MARKDOWN_PAGE_CHECK_HEADER]) || streamDocument && (options.captureStaticShell || !isReactRenderer(this.config.renderer))) {
|
|
6771
6777
|
return this.renderBufferedSSR(element, req, res, clearMiddlewareData, options);
|
|
6772
6778
|
}
|
|
6773
6779
|
return new Promise((resolve3, reject) => {
|
|
@@ -6879,6 +6885,7 @@ window.__FARM_I18N__ = ${getFarmI18nClientSnapshot() ? serializeInlineValue(getF
|
|
|
6879
6885
|
title,
|
|
6880
6886
|
tags: metaTags,
|
|
6881
6887
|
hasFavicon,
|
|
6888
|
+
hasExplicitTitle,
|
|
6882
6889
|
viewport: viewportTags
|
|
6883
6890
|
} = renderMetadataHead(req.__FARM_METADATA__, {
|
|
6884
6891
|
pathname: getFarmMetadataPathname(req),
|
|
@@ -6944,25 +6951,70 @@ window.__FARM_I18N__ = ${getFarmI18nClientSnapshot() ? serializeInlineValue(getF
|
|
|
6944
6951
|
<body class="">${earlyClient ? `
|
|
6945
6952
|
${FARM_DEV_EARLY_CLIENT_SCRIPT}` : ""}
|
|
6946
6953
|
<div id="root">`;
|
|
6947
|
-
const securedShell = stampDocumentHTML(shell);
|
|
6948
|
-
|
|
6949
|
-
|
|
6954
|
+
const securedShell = streamDocument ? "" : stampDocumentHTML(shell);
|
|
6955
|
+
if (securedShell) {
|
|
6956
|
+
htmlParts.push(securedShell);
|
|
6957
|
+
staticShellParts?.push(securedShell);
|
|
6958
|
+
}
|
|
6959
|
+
const withEarlyClient = (document) => earlyClient ? {
|
|
6960
|
+
...document,
|
|
6961
|
+
html: document.html.replace(
|
|
6962
|
+
/<body\b[^>]*>/i,
|
|
6963
|
+
(open) => `${open}
|
|
6964
|
+
${stampDocumentHTML(FARM_DEV_EARLY_CLIENT_SCRIPT)}`
|
|
6965
|
+
)
|
|
6966
|
+
} : document;
|
|
6967
|
+
const documentTransform = streamDocument ? createFarmStreamedDocumentTransform(
|
|
6968
|
+
(opening) => withEarlyClient(
|
|
6969
|
+
openFarmStreamedDocument(
|
|
6970
|
+
hasExplicitTitle ? removeFarmDocumentTitles(opening) : opening,
|
|
6971
|
+
{
|
|
6972
|
+
fallbackIcon: !hasFavicon,
|
|
6973
|
+
viewport: viewportTags,
|
|
6974
|
+
htmlAttributes: `${i18nSnapshot ? ` lang="${escapeHtmlAttribute2(i18nSnapshot.locale)}" dir="${escapeHtmlAttribute2(i18nSnapshot.direction)}"` : ""}${themeDocument.attributes}`,
|
|
6975
|
+
replaceHtmlAttributes: [
|
|
6976
|
+
...i18nSnapshot ? ["lang", "dir"] : [],
|
|
6977
|
+
...themeDocument.attributes ? ["data-theme"] : []
|
|
6978
|
+
],
|
|
6979
|
+
headAssets: stampDocumentHTML(
|
|
6980
|
+
[
|
|
6981
|
+
themeDocument.head,
|
|
6982
|
+
`<meta name="farm-deployment-id" content="${escapeHtmlAttribute2(deploymentId)}">`,
|
|
6983
|
+
hasExplicitTitle ? `<title>${title}</title>` : "",
|
|
6984
|
+
metaTags,
|
|
6985
|
+
i18nAlternateTags,
|
|
6986
|
+
fontHead,
|
|
6987
|
+
globalStylesheetLink,
|
|
6988
|
+
...devStyleLinks,
|
|
6989
|
+
`<script type="module" src="/@vite/client"></script>`,
|
|
6990
|
+
propsScript,
|
|
6991
|
+
hydrationClickQueueScript
|
|
6992
|
+
].filter(Boolean).join("\n ")
|
|
6993
|
+
),
|
|
6994
|
+
// The footer follows the streamed body.
|
|
6995
|
+
bodyFooter: ""
|
|
6996
|
+
}
|
|
6997
|
+
)
|
|
6998
|
+
),
|
|
6999
|
+
stampDocumentHTML(shell)
|
|
7000
|
+
) : void 0;
|
|
6950
7001
|
let firstChunk = true;
|
|
6951
7002
|
let checkedFullDocument = false;
|
|
6952
7003
|
let documentPrefix = "";
|
|
6953
7004
|
const cspNonceRewriter = cspNonce ? createFarmCspNonceRewriter(cspNonce) : void 0;
|
|
6954
7005
|
const cspStreamDecoder = cspNonceRewriter ? new TextDecoder() : void 0;
|
|
6955
|
-
const recordRenderedChunk = (chunkText) => {
|
|
6956
|
-
if (!
|
|
6957
|
-
|
|
6958
|
-
documentPrefix += chunkText;
|
|
7006
|
+
const recordRenderedChunk = (chunkText, renderedText = chunkText) => {
|
|
7007
|
+
if (!checkedFullDocument && renderedText) {
|
|
7008
|
+
documentPrefix += renderedText;
|
|
6959
7009
|
const prefix = classifyFarmDocumentPrefix(documentPrefix);
|
|
6960
7010
|
if (prefix !== "pending") {
|
|
6961
7011
|
checkedFullDocument = true;
|
|
6962
7012
|
documentPrefix = "";
|
|
6963
7013
|
if (prefix === "document") fullDocumentRoutes.add(fullDocumentRouteKey);
|
|
7014
|
+
else fullDocumentRoutes.delete(fullDocumentRouteKey);
|
|
6964
7015
|
}
|
|
6965
7016
|
}
|
|
7017
|
+
if (!chunkText) return;
|
|
6966
7018
|
htmlParts.push(chunkText);
|
|
6967
7019
|
if (staticShellParts && findStaticShellBoundary && !staticShellClosed) {
|
|
6968
7020
|
const dynamicIndex = findStaticShellBoundary(chunkText);
|
|
@@ -6988,12 +7040,16 @@ window.__FARM_I18N__ = ${getFarmI18nClientSnapshot() ? serializeInlineValue(getF
|
|
|
6988
7040
|
}
|
|
6989
7041
|
const chunkText = Buffer.isBuffer(chunk) ? cspStreamDecoder ? cspStreamDecoder.decode(chunk, { stream: true }) : chunk.toString() : String(chunk);
|
|
6990
7042
|
const securedChunkText = cspNonceRewriter ? cspNonceRewriter.write(chunkText) : chunkText;
|
|
6991
|
-
|
|
7043
|
+
const outputText = documentTransform ? documentTransform.write(securedChunkText) : securedChunkText;
|
|
7044
|
+
recordRenderedChunk(outputText, securedChunkText);
|
|
6992
7045
|
const onWrite = () => {
|
|
6993
7046
|
if (typeof res.flush === "function") res.flush();
|
|
6994
7047
|
callback();
|
|
6995
7048
|
};
|
|
6996
|
-
if (
|
|
7049
|
+
if (documentTransform) {
|
|
7050
|
+
if (outputText) res.write(outputText, onWrite);
|
|
7051
|
+
else callback();
|
|
7052
|
+
} else if (cspNonceRewriter) res.write(securedChunkText, onWrite);
|
|
6997
7053
|
else res.write(chunk, encoding, onWrite);
|
|
6998
7054
|
},
|
|
6999
7055
|
final: (callback) => {
|
|
@@ -7002,7 +7058,8 @@ window.__FARM_I18N__ = ${getFarmI18nClientSnapshot() ? serializeInlineValue(getF
|
|
|
7002
7058
|
lateNavigationError = null;
|
|
7003
7059
|
createLateNavigationRecovery(navigationError).then(
|
|
7004
7060
|
(recovery) => {
|
|
7005
|
-
const
|
|
7061
|
+
const filtered = filterDocumentHTML(recovery);
|
|
7062
|
+
const secured = documentTransform ? documentTransform.write(filtered) : filtered;
|
|
7006
7063
|
htmlParts.push(secured);
|
|
7007
7064
|
res.write(secured);
|
|
7008
7065
|
finishStream(callback);
|
|
@@ -7019,16 +7076,24 @@ window.__FARM_I18N__ = ${getFarmI18nClientSnapshot() ? serializeInlineValue(getF
|
|
|
7019
7076
|
});
|
|
7020
7077
|
const finishStream = (callback) => {
|
|
7021
7078
|
if (cspNonceRewriter) {
|
|
7022
|
-
const
|
|
7023
|
-
|
|
7079
|
+
const rewritten = cspNonceRewriter.write(cspStreamDecoder.decode(), true);
|
|
7080
|
+
const tail = documentTransform ? documentTransform.write(rewritten) : rewritten;
|
|
7081
|
+
recordRenderedChunk(tail, rewritten);
|
|
7024
7082
|
if (tail) res.write(tail);
|
|
7025
7083
|
}
|
|
7084
|
+
const documentEnd = documentTransform?.end();
|
|
7085
|
+
if (documentEnd?.text) {
|
|
7086
|
+
recordRenderedChunk(documentEnd.text, "");
|
|
7087
|
+
res.write(documentEnd.text);
|
|
7088
|
+
}
|
|
7026
7089
|
const suspenseRevealFallback = `<script>(function(){function moveFragment(srcId,placeholderId){var src=document.getElementById(srcId),ph=document.getElementById(placeholderId);if(!src||!ph||!ph.parentNode)return false;while(src.firstChild)ph.parentNode.insertBefore(src.firstChild,ph);ph.parentNode.removeChild(ph);if(src.parentNode)src.parentNode.removeChild(src);return true}function revealBoundary(boundaryId,sectionId){var boundary=document.getElementById(boundaryId),section=document.getElementById(sectionId);if(!boundary||!section||!boundary.parentNode)return false;var start=boundary.previousSibling;if(!start||start.nodeType!==8)return false;var parent=boundary.parentNode;var node=boundary;var depth=0;while(node){if(node.nodeType===8){var data=node.data;if(data==="/$"||data==="/&"){if(depth===0)break;depth--;}else if(data==="$"||data==="$?"||data==="$~"||data==="$!"||data==="&"){depth++;}}var next=node.nextSibling;parent.removeChild(node);node=next;}while(section.firstChild)parent.insertBefore(section.firstChild,node);if(section.parentNode)section.parentNode.removeChild(section);start.data="$";return true}var tries=0;var timer=setInterval(function(){var changed=false;document.querySelectorAll('div[id^="S:"]').forEach(function(section){var suffix=section.id.slice(2);changed=moveFragment('S:'+suffix,'P:'+suffix)||changed;});document.querySelectorAll('template[id^="B:"]').forEach(function(boundary){var suffix=boundary.id.slice(2);changed=revealBoundary('B:'+suffix,'S:'+suffix)||changed;});tries++;if(tries>80||(!document.querySelector('template[id^="B:"]')&&!document.querySelector('template[id^="P:"]'))){clearInterval(timer);}},50);})();</script>`;
|
|
7027
7090
|
const footer = stampDocumentHTML(
|
|
7028
7091
|
createDocumentFooter({
|
|
7029
7092
|
suspenseRevealFallback,
|
|
7030
7093
|
deferredHydrationScript: createDeferredHydrationScript(deferredProps.records),
|
|
7031
|
-
earlyClient
|
|
7094
|
+
earlyClient,
|
|
7095
|
+
// A full document: Farm's #root closes only where Farm opened it.
|
|
7096
|
+
...documentEnd?.document ? { closeRoot: documentEnd.rootOpened } : {}
|
|
7032
7097
|
})
|
|
7033
7098
|
);
|
|
7034
7099
|
htmlParts.push(footer);
|
|
@@ -7850,6 +7915,12 @@ var CLIENT_KEYS = [
|
|
|
7850
7915
|
];
|
|
7851
7916
|
var HYDRATION_KEYS = ["before", "after"];
|
|
7852
7917
|
var NAVIGATION_KEYS = ["before", "loaded", "resolved", "rendered", "error"];
|
|
7918
|
+
var MOBILE_SHELL_CLIENT_IMPORT = 'import { farmMobileShellClient as __farmMobileShellClient } from "@farm.js/core/internal/client-runtime";';
|
|
7919
|
+
var MOBILE_SHELL_CLIENT_REGISTRATION = ` {
|
|
7920
|
+
name: "farm:mobile-shell",
|
|
7921
|
+
enforce: "pre",
|
|
7922
|
+
definition: __farmMobileShellClient,
|
|
7923
|
+
}`;
|
|
7853
7924
|
var APP_CLIENT_EXTENSIONS = ["ts", "tsx", "js", "jsx", "mts", "mjs"];
|
|
7854
7925
|
function resolveFarmAppClientEntry(root = process.cwd(), srcDir = "src") {
|
|
7855
7926
|
const sourceRoot = path13.resolve(root, srcDir);
|
|
@@ -7879,15 +7950,20 @@ function resolveFarmClientPlugins(plugins, _root) {
|
|
|
7879
7950
|
function generateFarmClientPluginEntryCode(plugins, root, srcDir = "src", appPublicData) {
|
|
7880
7951
|
const resolved = resolveFarmClientPlugins(plugins, root);
|
|
7881
7952
|
const appClientEntry = root ? resolveFarmAppClientEntry(root, srcDir) : void 0;
|
|
7882
|
-
const
|
|
7883
|
-
const
|
|
7884
|
-
|
|
7953
|
+
const appImport = appClientEntry ? `import farmAppClientDefinition from ${JSON.stringify(appClientEntry.replace(/\\/g, "/"))};` : "";
|
|
7954
|
+
const mobileShell = resolveFarmPlatform() === "mobile";
|
|
7955
|
+
const imports = mobileShell ? [MOBILE_SHELL_CLIENT_IMPORT, appImport].filter(Boolean).join("\n") : appImport;
|
|
7956
|
+
const serializedPlugins = mobileShell ? [MOBILE_SHELL_CLIENT_REGISTRATION] : [];
|
|
7957
|
+
serializedPlugins.push(
|
|
7958
|
+
...resolved.map(
|
|
7959
|
+
(plugin) => ` {
|
|
7885
7960
|
name: ${JSON.stringify(plugin.name)},
|
|
7886
7961
|
version: ${serializeOptionalString(plugin.version)},
|
|
7887
7962
|
enforce: ${serializeOptionalString(plugin.enforce)},
|
|
7888
7963
|
definition: ${serializeClientLifecycle(plugin.definition, plugin.name)},
|
|
7889
7964
|
public: ${serializePublicData(plugin.publicData)},
|
|
7890
7965
|
}`
|
|
7966
|
+
)
|
|
7891
7967
|
);
|
|
7892
7968
|
if (appClientEntry) {
|
|
7893
7969
|
assertPublicData(appPublicData, "farm:app-client");
|