@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
|
@@ -297,7 +297,20 @@ async function readFarmRequestBody(request, limit) {
|
|
|
297
297
|
}
|
|
298
298
|
return body;
|
|
299
299
|
}
|
|
300
|
+
var nodeRequestBodies = /* @__PURE__ */ new WeakMap();
|
|
300
301
|
async function readNodeRequestBody(request, limit) {
|
|
302
|
+
let body = nodeRequestBodies.get(request);
|
|
303
|
+
if (!body) {
|
|
304
|
+
body = readNodeRequestBodyOnce(request, limit);
|
|
305
|
+
nodeRequestBodies.set(request, body);
|
|
306
|
+
}
|
|
307
|
+
const bytes = await body;
|
|
308
|
+
if (bytes.byteLength > limit) {
|
|
309
|
+
throw new FarmRequestBodyError("BODY_TOO_LARGE", 413, "Request body is too large");
|
|
310
|
+
}
|
|
311
|
+
return bytes;
|
|
312
|
+
}
|
|
313
|
+
async function readNodeRequestBodyOnce(request, limit) {
|
|
301
314
|
const rawContentLength = request.headers["content-length"];
|
|
302
315
|
const contentLength = Array.isArray(rawContentLength) ? rawContentLength[0] : rawContentLength;
|
|
303
316
|
try {
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
DEFAULT_FARM_SERVER_BODY_SIZE_LIMIT,
|
|
18
18
|
bufferFarmRequestBody,
|
|
19
19
|
createFarmRequestBodyErrorResponse
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-GFT5AHAT.mjs";
|
|
21
21
|
import {
|
|
22
22
|
resolveFarmAPICanonicalPathname
|
|
23
23
|
} from "./chunk-LM2YOGDK.mjs";
|
|
@@ -50,28 +50,28 @@ var _chunk3EIPOTZVcjs = require('./chunk-3EIPOTZV.cjs');
|
|
|
50
50
|
var _chunk5Y2P454Ocjs = require('./chunk-5Y2P454O.cjs');
|
|
51
51
|
|
|
52
52
|
|
|
53
|
+
var _chunk2HW5LWAHcjs = require('./chunk-2HW5LWAH.cjs');
|
|
54
|
+
|
|
55
|
+
|
|
53
56
|
var _chunkDQJ2CIH7cjs = require('./chunk-DQJ2CIH7.cjs');
|
|
54
57
|
|
|
55
58
|
|
|
56
|
-
var
|
|
59
|
+
var _chunkIQXGHGZFcjs = require('./chunk-IQXGHGZF.cjs');
|
|
57
60
|
|
|
58
61
|
|
|
59
62
|
var _chunkC7425KDGcjs = require('./chunk-C7425KDG.cjs');
|
|
60
63
|
|
|
61
64
|
|
|
62
|
-
var
|
|
65
|
+
var _chunk6QA2SXVHcjs = require('./chunk-6QA2SXVH.cjs');
|
|
63
66
|
|
|
64
67
|
|
|
65
68
|
var _chunkWT6RAN2Icjs = require('./chunk-WT6RAN2I.cjs');
|
|
66
69
|
|
|
67
70
|
|
|
68
|
-
var _chunk2HW5LWAHcjs = require('./chunk-2HW5LWAH.cjs');
|
|
69
|
-
|
|
70
|
-
|
|
71
71
|
var _chunkWJFFPXCVcjs = require('./chunk-WJFFPXCV.cjs');
|
|
72
72
|
|
|
73
73
|
|
|
74
|
-
var
|
|
74
|
+
var _chunkWAPQWAE6cjs = require('./chunk-WAPQWAE6.cjs');
|
|
75
75
|
|
|
76
76
|
|
|
77
77
|
var _chunk5DX3O6TTcjs = require('./chunk-5DX3O6TT.cjs');
|
|
@@ -83,7 +83,7 @@ var _chunkLNVGXUL3cjs = require('./chunk-LNVGXUL3.cjs');
|
|
|
83
83
|
var _chunkXN2MB4QZcjs = require('./chunk-XN2MB4QZ.cjs');
|
|
84
84
|
|
|
85
85
|
|
|
86
|
-
var
|
|
86
|
+
var _chunkLIFUPCXWcjs = require('./chunk-LIFUPCXW.cjs');
|
|
87
87
|
|
|
88
88
|
|
|
89
89
|
var _chunkIWFV5ZEDcjs = require('./chunk-IWFV5ZED.cjs');
|
|
@@ -748,7 +748,7 @@ async function resolveConfig(userConfig, mode) {
|
|
|
748
748
|
mdx,
|
|
749
749
|
migrations: resolveMigrationsConfig(userConfig.migrations),
|
|
750
750
|
cron: _chunkC7425KDGcjs.resolveCronConfig.call(void 0, userConfig.cron),
|
|
751
|
-
workflows:
|
|
751
|
+
workflows: _chunkIQXGHGZFcjs.resolveWorkflowsConfig.call(void 0, userConfig.workflows),
|
|
752
752
|
api,
|
|
753
753
|
observability: _nullishCoalesce(userConfig.observability, () => ( false)),
|
|
754
754
|
telemetry: userConfig.telemetry !== false,
|
|
@@ -772,7 +772,7 @@ async function resolveConfig(userConfig, mode) {
|
|
|
772
772
|
agent: resolveFarmAgentConfig(userConfig.agent, { docs: docs.enabled }),
|
|
773
773
|
desktop: _nullishCoalesce(_optionalChain([desktopSetup, 'optionalAccess', _40 => _40.desktop]), () => ( null)),
|
|
774
774
|
plugins: [
|
|
775
|
-
...
|
|
775
|
+
..._chunkWAPQWAE6cjs.resolveIntegrationPlugins.call(void 0, integrations),
|
|
776
776
|
...nativeMCPPlugin ? [nativeMCPPlugin] : [],
|
|
777
777
|
...userConfig.plugins || []
|
|
778
778
|
],
|
|
@@ -795,8 +795,8 @@ async function resolveConfig(userConfig, mode) {
|
|
|
795
795
|
middleware: validateMiddlewareConfig(userConfig.middleware) || {},
|
|
796
796
|
notFound: userConfig.notFound || {},
|
|
797
797
|
context: userConfig.context || (() => void 0),
|
|
798
|
-
server:
|
|
799
|
-
serverActions:
|
|
798
|
+
server: _chunkLIFUPCXWcjs.resolveFarmServerConfig.call(void 0, userConfig.server),
|
|
799
|
+
serverActions: _chunk6QA2SXVHcjs.resolveServerActionsConfig.call(void 0, userConfig.serverActions),
|
|
800
800
|
security,
|
|
801
801
|
deploymentId,
|
|
802
802
|
distDir: userConfig.distDir || ".farm",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getFarmRouteLabel
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JJOWY3XD.mjs";
|
|
4
4
|
import {
|
|
5
5
|
classifyFarmAgent
|
|
6
6
|
} from "./chunk-N77JBPLC.mjs";
|
|
@@ -45,13 +45,12 @@ function resolveFarmInfraAnalytics(env = processEnv()) {
|
|
|
45
45
|
if (!key || env[FARM_PRERENDER_ENV] === "1") return { off: null };
|
|
46
46
|
const ingestionKey = INGESTION_KEY.test(key);
|
|
47
47
|
const projectId = env.FARMJS_PROJECT_ID?.trim() || void 0;
|
|
48
|
-
if (!ingestionKey && !projectId) return { off: null };
|
|
49
48
|
if (!ingestionKey && !API_KEY.test(key)) {
|
|
50
49
|
return {
|
|
51
50
|
off: "FARMJS_API_KEY isn't a Farm Infra API key (farmjs_\u2026) or write-only key (fti_\u2026)"
|
|
52
51
|
};
|
|
53
52
|
}
|
|
54
|
-
if (!ingestionKey && !PROJECT.test(projectId)) {
|
|
53
|
+
if (!ingestionKey && projectId && !PROJECT.test(projectId)) {
|
|
55
54
|
return { off: "FARMJS_PROJECT_ID isn't a Farm Infra project ID (proj_\u2026)" };
|
|
56
55
|
}
|
|
57
56
|
if (env.FARMJS_ENVIRONMENT && !ENVIRONMENTS.includes(env.FARMJS_ENVIRONMENT)) {
|
|
@@ -71,7 +70,7 @@ function resolveFarmInfraAnalytics(env = processEnv()) {
|
|
|
71
70
|
options: {
|
|
72
71
|
endpoint: endpoint.href,
|
|
73
72
|
key,
|
|
74
|
-
...ingestionKey ? {} : { projectId, environment: defaultFarmInfraEnvironment(env) }
|
|
73
|
+
...ingestionKey ? {} : { ...projectId ? { projectId } : {}, environment: defaultFarmInfraEnvironment(env) }
|
|
75
74
|
}
|
|
76
75
|
};
|
|
77
76
|
}
|
|
@@ -95,13 +94,45 @@ function retryAt(value, now) {
|
|
|
95
94
|
const date = Date.parse(value);
|
|
96
95
|
return Number.isFinite(date) ? Math.max(now, Math.min(date, now + 864e5)) : now;
|
|
97
96
|
}
|
|
97
|
+
var REFUSALS = {
|
|
98
|
+
project: "project",
|
|
99
|
+
api_key_permission: "permission",
|
|
100
|
+
api_key_environment: "environment"
|
|
101
|
+
};
|
|
102
|
+
async function refusal(response) {
|
|
103
|
+
const reader = response.body?.getReader();
|
|
104
|
+
if (!reader) return void 0;
|
|
105
|
+
let text = "";
|
|
106
|
+
const decoder = new TextDecoder();
|
|
107
|
+
const deadline = Date.now() + 500;
|
|
108
|
+
try {
|
|
109
|
+
while (text.length < 1024 && Date.now() < deadline) {
|
|
110
|
+
let timer;
|
|
111
|
+
const chunk = await Promise.race([
|
|
112
|
+
reader.read(),
|
|
113
|
+
new Promise((resolve) => {
|
|
114
|
+
timer = setTimeout(() => resolve({ done: true }), deadline - Date.now());
|
|
115
|
+
})
|
|
116
|
+
]).finally(() => clearTimeout(timer));
|
|
117
|
+
if (chunk.done) break;
|
|
118
|
+
text += decoder.decode(chunk.value, { stream: true });
|
|
119
|
+
}
|
|
120
|
+
const code = JSON.parse(text).error;
|
|
121
|
+
return typeof code === "string" && Object.prototype.hasOwnProperty.call(REFUSALS, code) ? REFUSALS[code] : void 0;
|
|
122
|
+
} catch {
|
|
123
|
+
return void 0;
|
|
124
|
+
} finally {
|
|
125
|
+
void reader.cancel().catch(() => {
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
}
|
|
98
129
|
function createFarmInfraAnalyticsExporter(options, send = (input, init) => fetch(input, init)) {
|
|
99
130
|
const requestHeaders = {
|
|
100
131
|
"content-type": "application/json",
|
|
101
132
|
authorization: `Bearer ${options.key}`
|
|
102
133
|
};
|
|
103
134
|
if (!INGESTION_KEY.test(options.key)) {
|
|
104
|
-
requestHeaders["x-farm-project"] = options.projectId;
|
|
135
|
+
if (options.projectId) requestHeaders["x-farm-project"] = options.projectId;
|
|
105
136
|
requestHeaders["x-farm-environment"] = options.environment ?? defaultFarmInfraEnvironment();
|
|
106
137
|
}
|
|
107
138
|
const queue = [];
|
|
@@ -172,6 +203,7 @@ function createFarmInfraAnalyticsExporter(options, send = (input, init) => fetch
|
|
|
172
203
|
body
|
|
173
204
|
});
|
|
174
205
|
status = response.status;
|
|
206
|
+
const reason = status === 400 || status === 403 ? await refusal(response) : void 0;
|
|
175
207
|
void response.body?.cancel().catch(() => {
|
|
176
208
|
});
|
|
177
209
|
if (response.ok) {
|
|
@@ -181,7 +213,7 @@ function createFarmInfraAnalyticsExporter(options, send = (input, init) => fetch
|
|
|
181
213
|
if ([400, 401, 403, 404, 413, 415].includes(status) || status >= 300 && status < 400) {
|
|
182
214
|
stopped = true;
|
|
183
215
|
queue.length = 0;
|
|
184
|
-
diagnostic({ code: "disabled", status });
|
|
216
|
+
diagnostic({ code: "disabled", status, ...reason ? { reason } : {} });
|
|
185
217
|
break;
|
|
186
218
|
}
|
|
187
219
|
if (status !== 408 && status !== 429 && status < 500) {
|
|
@@ -366,14 +398,25 @@ function linkedOptions(env, warn) {
|
|
|
366
398
|
return {
|
|
367
399
|
...resolved.options,
|
|
368
400
|
onDiagnostic(event) {
|
|
369
|
-
if (event.code
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
);
|
|
373
|
-
}
|
|
401
|
+
if (event.code !== "disabled") return;
|
|
402
|
+
if (event.reason === "environment") return;
|
|
403
|
+
warn(`[Farm] Farm Infra analytics stopped: ${stopReason(event)}`);
|
|
374
404
|
}
|
|
375
405
|
};
|
|
376
406
|
}
|
|
407
|
+
var KEYS_PAGE = "the API keys page (https://app.farmjs.dev/dashboard/settings)";
|
|
408
|
+
function stopReason(event) {
|
|
409
|
+
if (event.reason === "project") {
|
|
410
|
+
return "FARMJS_API_KEY reaches more than one project. Set FARMJS_PROJECT_ID or use a key scoped to one project, then restart the server.";
|
|
411
|
+
}
|
|
412
|
+
if (event.reason === "permission") {
|
|
413
|
+
return `this key can't send analytics. Create a Site analytics key on ${KEYS_PAGE}, set it as FARMJS_API_KEY, then restart the server.`;
|
|
414
|
+
}
|
|
415
|
+
if (event.status === 401) {
|
|
416
|
+
return `Farm Infra answered 401: FARMJS_API_KEY was revoked or has expired. Create a new Site analytics key on ${KEYS_PAGE}, then restart the server.`;
|
|
417
|
+
}
|
|
418
|
+
return `Farm Infra answered ${event.status}. Check FARMJS_API_KEY and FARMJS_PROJECT_ID, then restart the server.`;
|
|
419
|
+
}
|
|
377
420
|
function createFarmInfraAnalyticsPlugin(env = processEnv(), warn = console.warn) {
|
|
378
421
|
const options = linkedOptions(env, warn);
|
|
379
422
|
return options ? farmInfraAnalyticsPlugin(options) : null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk6QA2SXVHcjs = require('./chunk-6QA2SXVH.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -16,7 +16,7 @@ function handleFarmFormActionRequest(request, config) {
|
|
|
16
16
|
return _server.handleAction.call(void 0, request, {
|
|
17
17
|
allowedOrigins: config.allowedOrigins,
|
|
18
18
|
bodySizeLimit: config.bodySizeLimit,
|
|
19
|
-
run: (actionRequest, action) =>
|
|
19
|
+
run: (actionRequest, action) => _chunk6QA2SXVHcjs.runWithServerActionRequest.call(void 0, actionRequest, action),
|
|
20
20
|
mapError(error) {
|
|
21
21
|
const redirect = _chunk7JUIK547cjs.getFarmRedirectError.call(void 0, error);
|
|
22
22
|
if (redirect) return { redirect: redirect.url };
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
planSchemaMigration,
|
|
18
18
|
readSchemaState,
|
|
19
19
|
withoutRenameTargets
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-WSDKXV4E.mjs";
|
|
21
21
|
import {
|
|
22
22
|
collectSchemaExtensions,
|
|
23
23
|
describeSchemaExtensionApproval,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
} from "./chunk-F3N52U7S.mjs";
|
|
30
30
|
import {
|
|
31
31
|
getIntegrationSchemas
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-HHFMECFO.mjs";
|
|
33
33
|
|
|
34
34
|
// src/schema-dependencies.ts
|
|
35
35
|
function collectSchemaDependencies(owners) {
|
|
@@ -56,8 +56,8 @@ function createFarmDesktopGuard(options) {
|
|
|
56
56
|
if (options.secret === options.handshakeToken) {
|
|
57
57
|
throw new TypeError("[Farm] The desktop secret and handshake token must be different values.");
|
|
58
58
|
}
|
|
59
|
-
const { secret } = options;
|
|
60
|
-
|
|
59
|
+
const { secret, handshakeToken } = options;
|
|
60
|
+
const handshakeState = _nullishCoalesce(options.handshakeState, () => ( {}));
|
|
61
61
|
const basePath = normalizeBasePath(options.basePath);
|
|
62
62
|
const handshakePath = `${basePath}${FARM_DESKTOP_HANDSHAKE_PATH}`;
|
|
63
63
|
const home = `${basePath}/`;
|
|
@@ -81,10 +81,10 @@ function createFarmDesktopGuard(options) {
|
|
|
81
81
|
if (pathname === handshakePath) {
|
|
82
82
|
if (method !== "GET") return forbidden("handshake must be a GET");
|
|
83
83
|
const token = _nullishCoalesce(new URLSearchParams(search).get(FARM_DESKTOP_HANDSHAKE_PARAM), () => ( ""));
|
|
84
|
-
if (
|
|
84
|
+
if (handshakeState.handshakeUsed || !_chunkSHIWRBFIcjs.farmSecretsMatch.call(void 0, token, handshakeToken)) {
|
|
85
85
|
return forbidden("invalid or used handshake token");
|
|
86
86
|
}
|
|
87
|
-
|
|
87
|
+
handshakeState.handshakeUsed = true;
|
|
88
88
|
return new Response(null, {
|
|
89
89
|
status: 303,
|
|
90
90
|
headers: {
|
|
@@ -17,7 +17,7 @@ var _chunkITV4QQL2cjs = require('./chunk-ITV4QQL2.cjs');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkLIFUPCXWcjs = require('./chunk-LIFUPCXW.cjs');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
var _chunkB5BBTPJQcjs = require('./chunk-B5BBTPJQ.cjs');
|
|
@@ -179,11 +179,11 @@ function isFarmAPIPathname(pathname, serverBasePath = _chunkIWFV5ZEDcjs.DEFAULT_
|
|
|
179
179
|
const basePath = _chunkIWFV5ZEDcjs.normalizeFarmAPIBasePath.call(void 0, serverBasePath);
|
|
180
180
|
return basePath !== "/" && (pathname === basePath || pathname.startsWith(`${basePath}/`));
|
|
181
181
|
}
|
|
182
|
-
async function invokeAPIRouteEndpoint(endpoint, request, params = {}, bodySizeLimit =
|
|
182
|
+
async function invokeAPIRouteEndpoint(endpoint, request, params = {}, bodySizeLimit = _chunkLIFUPCXWcjs.DEFAULT_FARM_SERVER_BODY_SIZE_LIMIT) {
|
|
183
183
|
try {
|
|
184
|
-
request = await
|
|
184
|
+
request = await _chunkLIFUPCXWcjs.bufferFarmRequestBody.call(void 0, request, bodySizeLimit);
|
|
185
185
|
} catch (error) {
|
|
186
|
-
const response2 =
|
|
186
|
+
const response2 = _chunkLIFUPCXWcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
187
187
|
if (response2) return response2;
|
|
188
188
|
throw error;
|
|
189
189
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/client/hash-target.ts
|
|
2
|
+
function getHashTargetElement(hash) {
|
|
3
|
+
const fragment = hash.startsWith("#") ? hash.slice(1) : hash;
|
|
4
|
+
if (!fragment) return null;
|
|
5
|
+
let decoded = fragment;
|
|
6
|
+
try {
|
|
7
|
+
decoded = decodeURIComponent(fragment);
|
|
8
|
+
} catch (e) {
|
|
9
|
+
}
|
|
10
|
+
return document.getElementById(decoded) || document.getElementById(fragment) || document.getElementsByName(decoded)[0] || null;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// src/client/navigation-delegate.ts
|
|
14
|
+
var DELEGATES = /* @__PURE__ */ Symbol.for("farm.navigation.delegates");
|
|
15
|
+
function delegateNavigation(delegate) {
|
|
16
|
+
const host = globalThis;
|
|
17
|
+
const delegates = _nullishCoalesce(host[DELEGATES], () => ( (host[DELEGATES] = /* @__PURE__ */ new Set())));
|
|
18
|
+
delegates.add(delegate);
|
|
19
|
+
return () => {
|
|
20
|
+
delegates.delete(delegate);
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
async function runFarmNavigationDelegates(context) {
|
|
24
|
+
const delegates = globalThis[DELEGATES];
|
|
25
|
+
if (!_optionalChain([delegates, 'optionalAccess', _ => _.size])) return false;
|
|
26
|
+
for (const delegate of delegates) {
|
|
27
|
+
try {
|
|
28
|
+
if (await delegate(context) === true) return true;
|
|
29
|
+
} catch (error) {
|
|
30
|
+
console.error("[Farm.js] A navigation delegate failed; navigating in place.", error);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
exports.getHashTargetElement = getHashTargetElement; exports.delegateNavigation = delegateNavigation; exports.runFarmNavigationDelegates = runFarmNavigationDelegates;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk6QA2SXVHcjs = require('./chunk-6QA2SXVH.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunkDMAP4RNDcjs = require('./chunk-DMAP4RND.cjs');
|
|
@@ -61,13 +61,13 @@ async function _invokeServerFunction(value, input, request) {
|
|
|
61
61
|
throw new TypeError("Expected a function created with createServerFn or createServerQuery");
|
|
62
62
|
}
|
|
63
63
|
try {
|
|
64
|
-
const data = await
|
|
64
|
+
const data = await _chunk6QA2SXVHcjs.runWithServerActionRequest.call(void 0, request, () => runner.run(input));
|
|
65
65
|
return { ok: true, data };
|
|
66
66
|
} catch (error) {
|
|
67
67
|
if (error instanceof ServerFnInputError) {
|
|
68
68
|
return { ok: false, reason: "input", error: error.cause };
|
|
69
69
|
}
|
|
70
|
-
if (
|
|
70
|
+
if (_chunk6QA2SXVHcjs.isServerFnFailure.call(void 0, error)) return { ok: false, reason: "failure", failure: error };
|
|
71
71
|
const redirect = _chunk7JUIK547cjs.getFarmRedirectError.call(void 0, error);
|
|
72
72
|
if (redirect) {
|
|
73
73
|
return { ok: false, reason: "redirect", url: redirect.url, status: redirect.status };
|
|
@@ -106,9 +106,9 @@ function createServerFn(options) {
|
|
|
106
106
|
} catch (cause) {
|
|
107
107
|
throw labelInputErrors && isSchemaValidationFailure(cause) ? new ServerFnInputError(cause) : cause;
|
|
108
108
|
}
|
|
109
|
-
const executionContext =
|
|
109
|
+
const executionContext = _chunk6QA2SXVHcjs.getServerActionExecutionContext.call(void 0, );
|
|
110
110
|
const request = executionContext ? _chunk3BIASUGRcjs._toAppRequestView.call(void 0, executionContext.request) : _chunk3BIASUGRcjs._resolveCurrentRequestForApp.call(void 0, );
|
|
111
|
-
const signal = _nullishCoalesce(_nullishCoalesce(_optionalChain([executionContext, 'optionalAccess', _ => _.signal]), () => ( _optionalChain([request, 'optionalAccess', _2 => _2.signal]))), () => (
|
|
111
|
+
const signal = _nullishCoalesce(_nullishCoalesce(_optionalChain([executionContext, 'optionalAccess', _ => _.signal]), () => ( _optionalChain([request, 'optionalAccess', _2 => _2.signal]))), () => ( _chunk6QA2SXVHcjs.getServerActionSignal.call(void 0, )));
|
|
112
112
|
const handlerContext = {
|
|
113
113
|
input,
|
|
114
114
|
rawInput,
|
|
@@ -231,7 +231,7 @@ function createServerFnErrorHandler(definitions) {
|
|
|
231
231
|
throw new TypeError(`Server function error "${code}" is not declared`);
|
|
232
232
|
}
|
|
233
233
|
const parsed = parseServerFnFailureData(code, definition.data, data);
|
|
234
|
-
throw new (0,
|
|
234
|
+
throw new (0, _chunk6QA2SXVHcjs.ServerFnFailure)(code, parsed, {
|
|
235
235
|
status: definition.status,
|
|
236
236
|
message: _nullishCoalesce(definition.message, () => ( "Server function failed"))
|
|
237
237
|
});
|
|
@@ -7,7 +7,7 @@ var _chunk53EHWHT2cjs = require('./chunk-53EHWHT2.cjs');
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkI2DQGS56cjs = require('./chunk-I2DQGS56.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
var _chunkRI3EVPKDcjs = require('./chunk-RI3EVPKD.cjs');
|
|
@@ -48,7 +48,7 @@ function shouldBlockUnload(options) {
|
|
|
48
48
|
function navigateViaRouter(href, basePath, replace, options = {}) {
|
|
49
49
|
if (typeof window === "undefined") return;
|
|
50
50
|
const url = _chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, href, basePath);
|
|
51
|
-
const spaRouter =
|
|
51
|
+
const spaRouter = _chunkI2DQGS56cjs.getInstalledFarmSPARouter.call(void 0, );
|
|
52
52
|
if (spaRouter) {
|
|
53
53
|
void spaRouter.navigate(url, {
|
|
54
54
|
replace,
|
|
@@ -61,7 +61,7 @@ function navigateViaRouter(href, basePath, replace, options = {}) {
|
|
|
61
61
|
} else {
|
|
62
62
|
window.history.pushState(null, "", url);
|
|
63
63
|
}
|
|
64
|
-
|
|
64
|
+
_chunkI2DQGS56cjs.notifyHistoryChange.call(void 0, "url-search");
|
|
65
65
|
}
|
|
66
66
|
function useRouter(options = {}) {
|
|
67
67
|
const basePath = options.basePath === void 0 ? _chunkD22BUQKWcjs.getFarmBasePath.call(void 0, ) : _chunkD22BUQKWcjs.normalizeFarmBasePath.call(void 0, options.basePath);
|
|
@@ -80,7 +80,7 @@ function useRouter(options = {}) {
|
|
|
80
80
|
setState(readRouterState(basePath, routeMatcher));
|
|
81
81
|
};
|
|
82
82
|
handlePopState();
|
|
83
|
-
const unsubscribe =
|
|
83
|
+
const unsubscribe = _chunkI2DQGS56cjs.subscribeHistoryChange.call(void 0, handlePopState);
|
|
84
84
|
return unsubscribe;
|
|
85
85
|
}, [basePath, routeMatcher]);
|
|
86
86
|
const push = (href, navigateOptions) => {
|
|
@@ -91,11 +91,11 @@ function useRouter(options = {}) {
|
|
|
91
91
|
};
|
|
92
92
|
const pushState = (pageState, href) => {
|
|
93
93
|
if (typeof window === "undefined") return;
|
|
94
|
-
|
|
94
|
+
_chunkI2DQGS56cjs.getRouter.call(void 0, ).pushState(pageState, resolveClientHref(href, basePath));
|
|
95
95
|
};
|
|
96
96
|
const replaceState = (pageState, href) => {
|
|
97
97
|
if (typeof window === "undefined") return;
|
|
98
|
-
|
|
98
|
+
_chunkI2DQGS56cjs.getRouter.call(void 0, ).replaceState(pageState, resolveClientHref(href, basePath));
|
|
99
99
|
};
|
|
100
100
|
const back = () => {
|
|
101
101
|
if (typeof window !== "undefined") {
|
|
@@ -118,24 +118,24 @@ function useRouter(options = {}) {
|
|
|
118
118
|
};
|
|
119
119
|
}
|
|
120
120
|
function usePageState() {
|
|
121
|
-
const [state, setState] = _react.useState.call(void 0, () =>
|
|
121
|
+
const [state, setState] = _react.useState.call(void 0, () => _chunkI2DQGS56cjs.readPageState.call(void 0, ));
|
|
122
122
|
_react.useEffect.call(void 0, () => {
|
|
123
123
|
if (typeof window === "undefined") return;
|
|
124
124
|
const handlePopState = () => {
|
|
125
|
-
setState(
|
|
125
|
+
setState(_chunkI2DQGS56cjs.readPageState.call(void 0, ));
|
|
126
126
|
};
|
|
127
127
|
handlePopState();
|
|
128
|
-
return
|
|
128
|
+
return _chunkI2DQGS56cjs.subscribeHistoryChange.call(void 0, handlePopState);
|
|
129
129
|
}, []);
|
|
130
130
|
return state;
|
|
131
131
|
}
|
|
132
132
|
function useNavigation() {
|
|
133
133
|
const [state, setState] = _react.useState.call(void 0,
|
|
134
|
-
() =>
|
|
134
|
+
() => _chunkI2DQGS56cjs.getRouter.call(void 0, ).getNavigationState()
|
|
135
135
|
);
|
|
136
136
|
_react.useEffect.call(void 0, () => {
|
|
137
137
|
if (typeof window === "undefined") return;
|
|
138
|
-
return
|
|
138
|
+
return _chunkI2DQGS56cjs.getRouter.call(void 0, ).subscribeNavigation(setState);
|
|
139
139
|
}, []);
|
|
140
140
|
return state;
|
|
141
141
|
}
|
|
@@ -147,7 +147,7 @@ function useBlocker(options) {
|
|
|
147
147
|
if (typeof window === "undefined" || !active) {
|
|
148
148
|
return;
|
|
149
149
|
}
|
|
150
|
-
return
|
|
150
|
+
return _chunkI2DQGS56cjs.getRouter.call(void 0, ).addBlocker(
|
|
151
151
|
async (context) => {
|
|
152
152
|
const current = optionsRef.current;
|
|
153
153
|
const when = typeof current.when === "function" ? current.when(context) : current.when;
|
|
@@ -170,7 +170,7 @@ function useScrollRestoration(key) {
|
|
|
170
170
|
_react.useEffect.call(void 0, () => {
|
|
171
171
|
const element = ref.current;
|
|
172
172
|
if (!element) return;
|
|
173
|
-
return
|
|
173
|
+
return _chunkI2DQGS56cjs.getRouter.call(void 0, ).registerScrollElement(key, element);
|
|
174
174
|
}, [key]);
|
|
175
175
|
return ref;
|
|
176
176
|
}
|
|
@@ -191,7 +191,7 @@ function readRouterState(basePath, routeMatcher) {
|
|
|
191
191
|
pathname,
|
|
192
192
|
searchParams: url.searchParams,
|
|
193
193
|
params: _optionalChain([routeMatcher, 'optionalAccess', _5 => _5.match, 'call', _6 => _6(routePathname), 'optionalAccess', _7 => _7.params]) || {},
|
|
194
|
-
pageState: typeof window === "undefined" ? null :
|
|
194
|
+
pageState: typeof window === "undefined" ? null : _chunkI2DQGS56cjs.readPageState.call(void 0, )
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
197
|
function readCurrentUrl() {
|