@farm.js/core 0.1.80 → 0.1.81
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.d-BPa5n0ld.d.ts → agent-mcp.d-Cxi3214_.d.ts} +1 -1
- package/dist/{agent-mcp.d-DOP95Jxm.d.mts → agent-mcp.d-DMqOqnOA.d.mts} +1 -1
- package/dist/agent-runtime.d.mts +2 -1
- package/dist/agent-runtime.d.ts +2 -1
- package/dist/analyzer-435DCIQ6.cjs +17 -0
- package/dist/{analyzer-F7CWE5VA.mjs → analyzer-IC66UJCU.mjs} +3 -2
- package/dist/api/client.cjs +1 -1
- package/dist/api/client.mjs +1 -1
- package/dist/api/client.native.cjs +1 -1
- package/dist/api/client.native.mjs +1 -1
- package/dist/api/node.cjs +1 -1
- package/dist/api/node.d.mts +4 -3
- package/dist/api/node.d.ts +4 -3
- package/dist/api/node.mjs +1 -1
- package/dist/api/route-manager.cjs +4 -4
- package/dist/api/route-manager.d.mts +4 -3
- package/dist/api/route-manager.d.ts +4 -3
- package/dist/api/route-manager.mjs +3 -3
- package/dist/api/runtime.cjs +1 -1
- package/dist/api/runtime.d.mts +3 -2
- package/dist/api/runtime.d.ts +3 -2
- package/dist/api/runtime.mjs +1 -1
- package/dist/api.cjs +5 -5
- package/dist/api.d.mts +5 -4
- package/dist/api.d.ts +5 -4
- package/dist/api.mjs +4 -4
- package/dist/{app-manifest.d-9UD6BznX.d.mts → app-manifest.d-Bbxp5kes.d.mts} +1 -1
- package/dist/{app-manifest.d-CO6Iu0Hx.d.ts → app-manifest.d-C8Cswd31.d.ts} +1 -1
- package/dist/app-markdown.cjs +3 -3
- package/dist/app-markdown.d.mts +5 -4
- package/dist/app-markdown.d.ts +5 -4
- package/dist/app-markdown.mjs +2 -2
- package/dist/{app.d-DXeRWZK7.d.mts → app.d-BJuSurgy.d.mts} +13 -4
- package/dist/{app.d-DwX1ePhs.d.ts → app.d-DGIoFt5D.d.ts} +13 -4
- package/dist/{chunk-Q4TRGTO7.cjs → chunk-26WP75W5.cjs} +32 -16
- package/dist/{chunk-GCRT6GJG.mjs → chunk-2HMSSPCZ.mjs} +26 -0
- package/dist/{chunk-7KDCVSTR.mjs → chunk-2PFGA6PB.mjs} +2 -2
- package/dist/chunk-2UYYXSUS.mjs +401 -0
- package/dist/{chunk-G4SZC2WH.cjs → chunk-2Y2HRZQY.cjs} +431 -332
- package/dist/{chunk-PL7MCYYD.mjs → chunk-3AV4DCXY.mjs} +58 -358
- package/dist/{chunk-3GNHJ3RN.cjs → chunk-3BTN3NP7.cjs} +2 -2
- package/dist/{chunk-ZVSQN7NC.cjs → chunk-46UV2E7I.cjs} +40 -43
- package/dist/{chunk-QMR2TUVZ.cjs → chunk-52Q4OB4A.cjs} +4 -4
- package/dist/chunk-5MMKNW7Q.cjs +54 -0
- package/dist/{chunk-XZBBKZGW.mjs → chunk-5N526T7Q.mjs} +64 -33
- package/dist/{chunk-XY5OZQF6.cjs → chunk-ADQ2LATR.cjs} +2 -2
- package/dist/{chunk-7DD5TNPS.cjs → chunk-AHVF5GI2.cjs} +2 -2
- package/dist/{chunk-MGKWYPE3.mjs → chunk-AYDVUCXD.mjs} +1 -0
- package/dist/chunk-B7L24VPX.cjs +401 -0
- package/dist/{chunk-5VDJEKGK.cjs → chunk-BBVLOEND.cjs} +1 -1
- package/dist/{chunk-XF7MJSUS.mjs → chunk-BCQIXH7L.mjs} +1 -1
- package/dist/{chunk-44G4XHEL.mjs → chunk-BJWJP5A4.mjs} +9 -9
- package/dist/{chunk-GBESKA76.cjs → chunk-BSX5OGSD.cjs} +1 -1
- package/dist/{chunk-CNDBLUKI.mjs → chunk-BVJUFVCU.mjs} +1 -1
- package/dist/chunk-C5QHZ626.cjs +85 -0
- package/dist/{chunk-X4TSMQWF.cjs → chunk-CL7BUGVB.cjs} +465 -360
- package/dist/{chunk-RLCOWWE5.cjs → chunk-CN2JOTRO.cjs} +7 -7
- package/dist/{chunk-AXA2BSX3.cjs → chunk-CPZZBCPO.cjs} +22 -21
- package/dist/chunk-D2VAANBS.mjs +48 -0
- package/dist/{chunk-JGEN2FIT.mjs → chunk-D77OGI6X.mjs} +1 -1
- package/dist/{chunk-4H4ZXUNB.cjs → chunk-DJ3PVHTW.cjs} +3 -3
- package/dist/{chunk-ZPEZXQTM.cjs → chunk-E3HBD2K3.cjs} +2 -2
- package/dist/{chunk-Q4YEAWUK.mjs → chunk-ECVSRE4Y.mjs} +3 -2
- package/dist/chunk-EZYKV24V.mjs +385 -0
- package/dist/{chunk-TVCFY3KK.cjs → chunk-FB4CWSC2.cjs} +12 -12
- package/dist/{chunk-IYFBLWXU.cjs → chunk-FULX5RYX.cjs} +61 -361
- package/dist/{chunk-5OAN7BG5.cjs → chunk-FYZD7DUS.cjs} +4 -4
- package/dist/{chunk-RQBGHHOQ.mjs → chunk-GY63XD6K.mjs} +1 -1
- package/dist/{chunk-HNUBRUFQ.cjs → chunk-HQEYZSF3.cjs} +4 -3
- package/dist/{chunk-MDEFTF63.mjs → chunk-HTNJ7A4D.mjs} +25 -28
- package/dist/chunk-I4WZRG73.mjs +54 -0
- package/dist/{chunk-MUZHULW2.mjs → chunk-ICOJ2BC6.mjs} +23 -7
- package/dist/{chunk-V73Y4UBL.mjs → chunk-IM3UINTZ.mjs} +1 -1
- package/dist/{chunk-MNIR7I7B.mjs → chunk-INKVDO42.mjs} +1 -1
- package/dist/{chunk-ZDYYZX73.mjs → chunk-IPG6B25T.mjs} +194 -89
- package/dist/{chunk-HEDGTXXB.cjs → chunk-JB4BHRFK.cjs} +17 -17
- package/dist/{chunk-XKUKWMGX.cjs → chunk-JCYDWJVO.cjs} +3 -3
- package/dist/{chunk-SVCUSOEF.mjs → chunk-KR5DF7WK.mjs} +1 -1
- package/dist/{chunk-COTFX4GT.mjs → chunk-LTOT5KVJ.mjs} +1 -1
- package/dist/{chunk-67MZTLTF.cjs → chunk-M6DAIE4T.cjs} +27 -1
- package/dist/{chunk-LVGB5PYK.cjs → chunk-MOGRRZMW.cjs} +17 -17
- package/dist/{chunk-MZ5QGWRW.mjs → chunk-N3VMHPIY.mjs} +2 -2
- package/dist/{chunk-GBW5DU7V.mjs → chunk-NOYKBGUK.mjs} +376 -277
- package/dist/{chunk-CCMP4JD2.cjs → chunk-NSLRK5DK.cjs} +1 -1
- package/dist/{chunk-WJ2O2MPP.cjs → chunk-OIWDEDUO.cjs} +394 -363
- package/dist/{chunk-K3XKEZR6.mjs → chunk-ONSZP5JK.mjs} +1 -1
- package/dist/{chunk-SDICLSQU.cjs → chunk-OUDNUFVR.cjs} +10 -10
- package/dist/{chunk-3XTRT3MB.mjs → chunk-PO5MZIWK.mjs} +1 -1
- package/dist/{chunk-EG5YBYHO.mjs → chunk-POL5RCVU.mjs} +1 -1
- package/dist/{chunk-ASYOWPSR.cjs → chunk-PWDBWXQI.cjs} +2 -1
- package/dist/{chunk-7YLDUB4R.cjs → chunk-QCKSYYXK.cjs} +7 -7
- package/dist/{chunk-57QAQU4F.mjs → chunk-QRNYSISP.mjs} +1 -1
- package/dist/{chunk-PRL7FXG4.cjs → chunk-RDNKQ5MK.cjs} +12 -13
- package/dist/{chunk-3JQBQG7K.mjs → chunk-RZ6XUEQS.mjs} +2 -2
- package/dist/{chunk-QHAISITM.mjs → chunk-S3IWDDQ3.mjs} +1 -1
- package/dist/{chunk-EGHPFXPZ.cjs → chunk-SAPG45RA.cjs} +23 -23
- package/dist/{chunk-YN3YMSKD.mjs → chunk-TLSGRK7E.mjs} +3 -3
- package/dist/chunk-UDMBUTJD.mjs +85 -0
- package/dist/{chunk-NJ4OASLP.mjs → chunk-UF4BNKKJ.mjs} +1 -1
- package/dist/{chunk-WHEQJN4G.cjs → chunk-UGD53SNO.cjs} +2 -2
- package/dist/{chunk-WBPVLCNE.mjs → chunk-VPGEYX5Y.mjs} +4 -4
- package/dist/chunk-VS7HLH4S.cjs +385 -0
- package/dist/{chunk-ANZLZNNX.cjs → chunk-W6C3LEXX.cjs} +3 -3
- package/dist/chunk-WMRGIQTA.cjs +48 -0
- package/dist/{chunk-52LTENRE.cjs → chunk-WOAXQ5MZ.cjs} +9 -9
- package/dist/{chunk-C6HGUTXB.mjs → chunk-XBSIGZ4J.mjs} +2 -3
- package/dist/{chunk-TS3ZHJN5.cjs → chunk-XOGCNKB7.cjs} +3 -3
- package/dist/{chunk-KEU55O2D.mjs → chunk-XOXCQGAF.mjs} +7 -6
- package/dist/{chunk-4MIDUSIX.mjs → chunk-YH7ENV3K.mjs} +14 -14
- package/dist/{chunk-2RRTOKRZ.mjs → chunk-YHM4PXJY.mjs} +1 -1
- package/dist/{chunk-A5D3UMLJ.mjs → chunk-YSU3WCW6.mjs} +1 -1
- package/dist/{chunk-4STJ6LGR.mjs → chunk-Z3RM3VA2.mjs} +1 -1
- package/dist/{chunk-DVHFIETW.cjs → chunk-ZIYJWJV2.cjs} +13 -13
- package/dist/{chunk-Z4SMFUZ7.cjs → chunk-ZKNXCRUQ.cjs} +7 -7
- package/dist/{cli-runtime.d-DPNTN-JV.d.mts → cli-runtime.d-D8O1v2_X.d.mts} +5 -5
- package/dist/{cli-runtime.d-8BhZy_wr.d.ts → cli-runtime.d-hf4L1MNP.d.ts} +5 -5
- package/dist/{client-component.d-CkDcob6D.d.ts → client-component.d-CX8UCQh-.d.ts} +1 -1
- package/dist/{client-component.d-CMCdyAr8.d.mts → client-component.d-DFwUHlOz.d.mts} +1 -1
- package/dist/{client-plugins.d-WcMwOZGZ.d.mts → client-plugins.d-BflSNO-b.d.mts} +2 -13
- package/dist/{client-plugins.d-BYIovYqX.d.ts → client-plugins.d-qWp8hNwd.d.ts} +2 -13
- package/dist/client-plugins.d.mts +2 -1
- package/dist/client-plugins.d.ts +2 -1
- package/dist/client.cjs +9 -8
- package/dist/client.d.mts +20 -151
- package/dist/client.d.ts +20 -151
- package/dist/client.mjs +8 -7
- package/dist/config.d.mts +2 -1
- package/dist/config.d.ts +2 -1
- package/dist/desktop.d.mts +3 -2
- package/dist/desktop.d.ts +3 -2
- package/dist/{devtools-JJOYTIMS.cjs → devtools-EI5N366Z.cjs} +9 -9
- package/dist/{devtools-F3FDFV26.mjs → devtools-XJHODO5H.mjs} +7 -7
- package/dist/docs.cjs +9 -9
- package/dist/docs.d.mts +4 -3
- package/dist/docs.d.ts +4 -3
- package/dist/docs.mjs +8 -8
- package/dist/environment/vite.cjs +7 -6
- package/dist/environment/vite.mjs +6 -5
- package/dist/{handler.d-BwdOyc9x.d.ts → handler.d-C2oRihfa.d.ts} +1 -1
- package/dist/{handler.d-s3IM6pbJ.d.mts → handler.d-DoH5Krkq.d.mts} +1 -1
- package/dist/{headers.d-BR-OXrqQ.d.mts → headers.d-BrX53wFQ.d.mts} +1 -1
- package/dist/{headers.d-CAW4wPey.d.ts → headers.d-Dj0mfYpb.d.ts} +1 -1
- package/dist/index.cjs +58 -56
- package/dist/{index.d-ah2c89Wu.d.ts → index.d-Dhc2scRl.d.ts} +1 -1
- package/dist/{index.d-BEVK61zS.d.mts → index.d-DzDHOttz.d.mts} +1 -1
- package/dist/index.d.mts +25 -23
- package/dist/index.d.ts +25 -23
- package/dist/index.mjs +62 -60
- package/dist/instrumentation.cjs +3 -3
- package/dist/instrumentation.mjs +2 -2
- package/dist/integrations/orm.d.mts +2 -1
- package/dist/integrations/orm.d.ts +2 -1
- package/dist/integrations.d.mts +2 -1
- package/dist/integrations.d.ts +2 -1
- package/dist/internal/app-markdown-runtime.cjs +2 -2
- package/dist/internal/app-markdown-runtime.d.mts +12 -5
- package/dist/internal/app-markdown-runtime.d.ts +12 -5
- package/dist/internal/app-markdown-runtime.mjs +1 -1
- package/dist/internal/build-runtime.cjs +41 -40
- package/dist/internal/build-runtime.d.mts +5 -4
- package/dist/internal/build-runtime.d.ts +5 -4
- package/dist/internal/build-runtime.mjs +40 -39
- package/dist/internal/cli-runtime.cjs +19 -19
- package/dist/internal/cli-runtime.d.mts +8 -7
- package/dist/internal/cli-runtime.d.ts +8 -7
- package/dist/internal/cli-runtime.mjs +20 -20
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +76 -15
- package/dist/internal/client-runtime.d.mts +18 -7
- package/dist/internal/client-runtime.d.ts +18 -7
- package/dist/internal/client-runtime.mjs +67 -6
- package/dist/internal/compression-runtime.d.mts +2 -1
- package/dist/internal/compression-runtime.d.ts +2 -1
- package/dist/internal/config-runtime.cjs +9 -9
- package/dist/internal/config-runtime.d.mts +4 -3
- package/dist/internal/config-runtime.d.ts +4 -3
- package/dist/internal/config-runtime.mjs +8 -8
- package/dist/internal/docs-precompiled-runtime.cjs +1 -1
- package/dist/internal/docs-precompiled-runtime.mjs +1 -1
- package/dist/internal/form-actions.cjs +3 -3
- package/dist/internal/form-actions.mjs +2 -2
- package/dist/internal/infra-analytics-runtime.cjs +7 -7
- package/dist/internal/infra-analytics-runtime.mjs +5 -5
- package/dist/internal/island-codec.cjs +3 -3
- package/dist/internal/island-codec.mjs +2 -2
- package/dist/internal/island-value-store.d.mts +1 -1
- package/dist/internal/island-value-store.d.ts +1 -1
- package/dist/internal/islands-boot.cjs +9 -3
- package/dist/internal/islands-boot.mjs +9 -3
- package/dist/internal/islands-runtime.cjs +10 -56
- package/dist/internal/islands-runtime.mjs +6 -52
- package/dist/internal/islands-server.cjs +4 -4
- package/dist/internal/islands-server.mjs +3 -3
- package/dist/internal/islx-actions-client.cjs +36 -0
- package/dist/internal/islx-actions-client.d.mts +13 -0
- package/dist/internal/islx-actions-client.d.ts +13 -0
- package/dist/internal/islx-actions-client.mjs +36 -0
- package/dist/internal/islx-actions-server.cjs +8 -0
- package/dist/internal/islx-actions-server.d.mts +6 -0
- package/dist/internal/islx-actions-server.d.ts +6 -0
- package/dist/internal/islx-actions-server.mjs +8 -0
- package/dist/internal/islx-client.d.mts +0 -4
- package/dist/internal/islx-client.d.ts +0 -4
- package/dist/internal/isolated-boundary.cjs +3 -3
- package/dist/internal/isolated-boundary.d.mts +1 -1
- package/dist/internal/isolated-boundary.d.ts +1 -1
- package/dist/internal/isolated-boundary.mjs +2 -2
- package/dist/internal/metadata-image-runtime.cjs +4 -2
- package/dist/internal/metadata-image-runtime.d.mts +18 -2
- package/dist/internal/metadata-image-runtime.d.ts +18 -2
- package/dist/internal/metadata-image-runtime.mjs +5 -3
- package/dist/internal/native-server-fns.cjs +5 -4
- package/dist/internal/native-server-fns.mjs +4 -3
- package/dist/internal/navigation-neutral.cjs +36 -0
- package/dist/internal/navigation-neutral.d.mts +14 -0
- package/dist/internal/navigation-neutral.d.ts +14 -0
- package/dist/internal/navigation-neutral.mjs +36 -0
- package/dist/internal/product-telemetry-runtime.cjs +3 -3
- package/dist/internal/product-telemetry-runtime.mjs +2 -2
- package/dist/internal/production-runtime.cjs +24 -24
- package/dist/internal/production-runtime.d.mts +11 -10
- package/dist/internal/production-runtime.d.ts +11 -10
- package/dist/internal/production-runtime.mjs +29 -29
- package/dist/internal/server-tree.cjs +5 -4
- package/dist/internal/server-tree.d.mts +3 -4
- package/dist/internal/server-tree.d.ts +3 -4
- package/dist/internal/server-tree.mjs +4 -3
- package/dist/internal/spa-router.cjs +3 -3
- package/dist/internal/spa-router.d.mts +4 -3
- package/dist/internal/spa-router.d.ts +4 -3
- package/dist/internal/spa-router.mjs +2 -2
- package/dist/internal/start-manifest.d.mts +2 -1
- package/dist/internal/start-manifest.d.ts +2 -1
- package/dist/internal/vercel-edge-middleware.cjs +1 -1
- package/dist/internal/vercel-edge-middleware.mjs +1 -1
- package/dist/island-value-protocol.d-fEoc1m8e.d.mts +27 -0
- package/dist/island-value-protocol.d-fEoc1m8e.d.ts +27 -0
- package/dist/{layers-5ZD4764G.mjs → layers-744BBUY5.mjs} +2 -2
- package/dist/layers-XLOMMQP7.cjs +21 -0
- package/dist/markdown.d.mts +2 -1
- package/dist/markdown.d.ts +2 -1
- package/dist/middleware.cjs +5 -5
- package/dist/middleware.d.mts +2 -1
- package/dist/middleware.d.ts +2 -1
- package/dist/middleware.mjs +4 -4
- package/dist/{mount.d-Ylo-CmzK.d.mts → mount.d-DOaeUoWq.d.mts} +1 -1
- package/dist/{mount.d-DcoPFqv5.d.ts → mount.d-DwXjaOHY.d.ts} +1 -1
- package/dist/{native-server-fn-handler-TNVFEQW3.cjs → native-server-fn-handler-57TCQPSM.cjs} +4 -4
- package/dist/{native-server-fn-handler-OXFTI6V5.mjs → native-server-fn-handler-PYK65A46.mjs} +3 -3
- package/dist/{navigation-delegate.d-BA5h0fbE.d.mts → navigation-delegate.d-BElGUMgt.d.mts} +1 -1
- package/dist/{navigation-delegate.d-2MK4YSlL.d.ts → navigation-delegate.d-o3pPd9VI.d.ts} +1 -1
- package/dist/navigation-errors.d-DwHtoMyR.d.mts +13 -0
- package/dist/navigation-errors.d-DwHtoMyR.d.ts +13 -0
- package/dist/navigation.cjs +6 -6
- package/dist/navigation.d.mts +7 -6
- package/dist/navigation.d.ts +7 -6
- package/dist/navigation.mjs +5 -5
- package/dist/{nitro-6UOJXJZ6.cjs → nitro-XGIO6EQN.cjs} +2 -2
- package/dist/{nitro-C3MYDX7V.mjs → nitro-YLTGVGK4.mjs} +1 -1
- package/dist/node-module-bundle-TNSY5PAC.cjs +15 -0
- package/dist/{node-module-bundle-XPLBMXRD.mjs → node-module-bundle-ZWCQJCKA.mjs} +3 -1
- package/dist/plugin.cjs +32 -30
- package/dist/plugin.d.mts +6 -5
- package/dist/plugin.d.ts +6 -5
- package/dist/plugin.mjs +31 -29
- package/dist/query/client.cjs +10 -10
- package/dist/query/client.mjs +5 -5
- package/dist/{render-plan.d-2o-AG-ot.d.ts → render-plan.d-BD06tqFA.d.ts} +1 -1
- package/dist/{render-plan.d-ChYBMhLu.d.mts → render-plan.d-xWCRAJeR.d.mts} +1 -1
- package/dist/renderer/none/server.cjs +5 -1
- package/dist/renderer/none/server.d.mts +3 -1
- package/dist/renderer/none/server.d.ts +3 -1
- package/dist/renderer/none/server.mjs +4 -0
- package/dist/renderer/react/server.cjs +6 -6
- package/dist/renderer/react/server.mjs +3 -3
- package/dist/renderer-client.cjs +34 -15
- package/dist/renderer-client.d.mts +13 -97
- package/dist/renderer-client.d.ts +13 -97
- package/dist/renderer-client.mjs +23 -4
- package/dist/renderer.cjs +4 -2
- package/dist/renderer.d.mts +33 -5
- package/dist/renderer.d.ts +33 -5
- package/dist/renderer.mjs +3 -1
- package/dist/{request.d-CE0FIkiM.d.ts → request.d-DUMuWxSN.d.ts} +1 -1
- package/dist/{request.d-RCnCBuWq.d.mts → request.d-Dx82V8bz.d.mts} +1 -1
- package/dist/request.d.mts +3 -2
- package/dist/request.d.ts +3 -2
- package/dist/{route-rendering.d-BTPOM2nU.d.ts → route-rendering.d-BwBVpLtD.d.ts} +1 -1
- package/dist/{route-rendering.d-BZJnfKsp.d.mts → route-rendering.d-DJh6GauM.d.mts} +1 -1
- package/dist/{router.d-D8Vvwl4i.d.mts → router.d-BtkKDxUB.d.mts} +1 -1
- package/dist/{router.d-BU_WE6Ol.d.ts → router.d-CJBSG5jr.d.ts} +1 -1
- package/dist/routes.cjs +1 -1
- package/dist/routes.d.mts +2 -1
- package/dist/routes.d.ts +2 -1
- package/dist/routes.mjs +1 -1
- package/dist/{rsc-pipeline-JZWVSHOR.mjs → rsc-pipeline-GD6KLOIG.mjs} +13 -13
- package/dist/{rsc-pipeline-A3R4U26C.cjs → rsc-pipeline-H5AXQA7A.cjs} +14 -14
- package/dist/{runtime-SQFRHRGJ.mjs → runtime-OJ7FXFUI.mjs} +13 -13
- package/dist/{runtime-WZ3CHHGJ.cjs → runtime-YWQVBC3V.cjs} +15 -15
- package/dist/{runtime.d-DJ6IIKcF.d.ts → runtime.d-BQnD0cfC.d.ts} +1 -1
- package/dist/{runtime.d-BnmuOXVD.d.mts → runtime.d-C4SuZXf6.d.mts} +1 -1
- package/dist/server-action-security.cjs +1 -1
- package/dist/server-action-security.mjs +1 -1
- package/dist/{server-components-status.d-BzOg9M8g.d.mts → server-components-status.d-9rH7ZoEq.d.mts} +1 -1
- package/dist/{server-components-status.d-BeqSXcjM.d.ts → server-components-status.d-rfKOcE0N.d.ts} +1 -1
- package/dist/server-fn.cjs +3 -3
- package/dist/server-fn.mjs +2 -2
- package/dist/server-plugins.cjs +1 -1
- package/dist/server-plugins.d.mts +4 -3
- package/dist/server-plugins.d.ts +4 -3
- package/dist/server-plugins.mjs +1 -1
- package/dist/server-query.cjs +4 -4
- package/dist/server-query.mjs +3 -3
- package/dist/server.cjs +64 -59
- package/dist/server.d.mts +12 -11
- package/dist/server.d.ts +12 -11
- package/dist/server.mjs +45 -40
- package/dist/{spa-router.d-BOwuVkMl.d.ts → spa-router.d-DMKiBsHH.d.ts} +3 -3
- package/dist/{spa-router.d-CDpftSsk.d.mts → spa-router.d-V6XLSTCy.d.mts} +3 -3
- package/dist/{ssg.d-Bx_WFuwg.d.mts → ssg.d-BnCKPQL0.d.mts} +2 -2
- package/dist/{ssg.d-BTVqyq8T.d.ts → ssg.d-MNedvvMB.d.ts} +2 -2
- package/dist/store-core.d-Ad5biajo.d.ts +301 -0
- package/dist/store-core.d-BqJI1-ix.d.mts +301 -0
- package/dist/testing.cjs +3 -3
- package/dist/testing.d.mts +2 -1
- package/dist/testing.d.ts +2 -1
- package/dist/testing.mjs +3 -3
- package/dist/{utils.d-JkrpS-NJ.d.mts → utils.d-BEKLWa0Z.d.mts} +1 -1
- package/dist/{utils.d-_dvevm5s.d.ts → utils.d-BdjHKDuT.d.ts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +34 -30
- package/dist/vite.d.mts +18 -7
- package/dist/vite.d.ts +18 -7
- package/dist/vite.mjs +33 -29
- package/dist/workflows.cjs +2 -2
- package/dist/workflows.mjs +1 -1
- package/package.json +17 -2
- package/dist/analyzer-I7RBBQ65.cjs +0 -16
- package/dist/chunk-CQL5ZGFU.cjs +0 -50
- package/dist/chunk-HONTCUK6.mjs +0 -203
- package/dist/chunk-K6PGK7DC.cjs +0 -203
- package/dist/chunk-NBIVGHAT.mjs +0 -50
- package/dist/island-value-protocol.d-BRayRghM.d.mts +0 -12
- package/dist/island-value-protocol.d-BRayRghM.d.ts +0 -12
- package/dist/layers-HMEGUEXM.cjs +0 -21
- package/dist/node-module-bundle-M6BISE2P.cjs +0 -13
- package/dist/{chunk-EY7ED5UW.mjs → chunk-3RVLJTFZ.mjs} +3 -3
- package/dist/{chunk-KKVRWNDH.mjs → chunk-6WVRVGKC.mjs} +3 -3
- package/dist/{chunk-UJPE75GF.mjs → chunk-J2VUPCCR.mjs} +3 -3
- package/dist/{chunk-MQOHYV6L.cjs → chunk-LKIG5SM6.cjs} +2 -2
- package/dist/{chunk-UWOCYINY.cjs → chunk-OFVCWV2D.cjs} +2 -2
- package/dist/{chunk-3K2E55BJ.mjs → chunk-OO4GVGM3.mjs} +3 -3
- package/dist/{chunk-PBJ7MEOV.cjs → chunk-OZUINP2P.cjs} +2 -2
- package/dist/{chunk-7FQFK3OA.mjs → chunk-V7HNYR76.mjs} +3 -3
- package/dist/{chunk-2FK47RRZ.cjs → chunk-VGHDPEPQ.cjs} +2 -2
- package/dist/{chunk-CGIVCGH5.cjs → chunk-XOFJUSWC.cjs} +2 -2
package/dist/vite.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Plugin, UserConfig, Connect } from 'vite';
|
|
2
|
-
import {
|
|
2
|
+
import { aK as FarmConfig, x as FarmUserConfig, au as PluginManager } from './client-plugins.d-BflSNO-b.mjs';
|
|
3
3
|
import { FarmCacheUserConfig } from './cache.mjs';
|
|
4
|
-
import { P as ProgrammaticClientRoutes, F as FarmSourceSnapshotStore } from './client-component.d-
|
|
5
|
-
export { c as collectFarmClientPackageImports, r as resolveFarmClientOptimizeDeps } from './client-component.d-
|
|
4
|
+
import { P as ProgrammaticClientRoutes, F as FarmSourceSnapshotStore } from './client-component.d-DFwUHlOz.mjs';
|
|
5
|
+
export { c as collectFarmClientPackageImports, r as resolveFarmClientOptimizeDeps } from './client-component.d-DFwUHlOz.mjs';
|
|
6
6
|
import { FarmPlatform } from './platform.mjs';
|
|
7
7
|
import { _withAfterNodeMiddleware } from './after.mjs';
|
|
8
8
|
import { A as APIRequestRuntime } from './server-client-bridge.d-DKWDl5NB.mjs';
|
|
@@ -11,8 +11,8 @@ import { F as FarmIslandStrategy } from './island.d-CfGru1MO.mjs';
|
|
|
11
11
|
export { c as createFarmNodeRequestAbortSignal } from './server-http.d-rAe7lAQc.mjs';
|
|
12
12
|
import { a as FarmImageConfig } from './image-config.d-ByhQ0TT7.mjs';
|
|
13
13
|
export { g as getPublicFarmImageConfig, r as resolveFarmImageConfig } from './image-config.d-ByhQ0TT7.mjs';
|
|
14
|
-
export { r as readRouteRenderingDirectiveFromFile } from './ssg.d-
|
|
15
|
-
export { i as installConfigResponseHeaders } from './headers.d-
|
|
14
|
+
export { r as readRouteRenderingDirectiveFromFile } from './ssg.d-BnCKPQL0.mjs';
|
|
15
|
+
export { i as installConfigResponseHeaders } from './headers.d-BrX53wFQ.mjs';
|
|
16
16
|
import './lifecycle.d-OtGWAvJT.mjs';
|
|
17
17
|
import './route.d-ShmtqqVQ.mjs';
|
|
18
18
|
import './endpoint.d-BXbBpKoh.mjs';
|
|
@@ -37,6 +37,7 @@ import './types.d-xCIhyjOq.mjs';
|
|
|
37
37
|
import './workflows.mjs';
|
|
38
38
|
import './cron.mjs';
|
|
39
39
|
import './env.mjs';
|
|
40
|
+
import './navigation-errors.d-DwHtoMyR.mjs';
|
|
40
41
|
import './server-action-security.mjs';
|
|
41
42
|
import './layers.d-CH0bC4QL.mjs';
|
|
42
43
|
import 'rolldown/utils';
|
|
@@ -46,7 +47,7 @@ import './types.d-DQnyD3VD.mjs';
|
|
|
46
47
|
import './font.mjs';
|
|
47
48
|
import 'node:http';
|
|
48
49
|
import './deployment.mjs';
|
|
49
|
-
import './route-rendering.d-
|
|
50
|
+
import './route-rendering.d-DJh6GauM.mjs';
|
|
50
51
|
|
|
51
52
|
interface ResolvedClientCacheAdapterEntry {
|
|
52
53
|
/** Absolute adapter module path with forward slashes, ready for codegen. */
|
|
@@ -173,6 +174,16 @@ interface FarmVitePluginOptions extends FarmConfig {
|
|
|
173
174
|
sourceSnapshot?: FarmSourceSnapshotStore;
|
|
174
175
|
}
|
|
175
176
|
declare function farmI18nClientBridgePlugin(): Plugin;
|
|
177
|
+
/**
|
|
178
|
+
* `@farm.js/core/navigation` exports React's router hooks next to `notFound()` and `redirect()`, so
|
|
179
|
+
* loading it loads React. An app on another renderer doesn't install React, so the entry is an
|
|
180
|
+
* alias there for the same functions without the hooks, on the server and in the browser, in
|
|
181
|
+
* development and in builds. It is an alias, not a resolveId hook, because the development server
|
|
182
|
+
* leaves a package import it externalizes for Node to resolve, unless the import matches an alias.
|
|
183
|
+
* `renderer: false` has no pages for these to act on and is left alone, and so is Preact, whose
|
|
184
|
+
* plugin maps React's API to `preact/compat`, so the hooks run on Preact.
|
|
185
|
+
*/
|
|
186
|
+
declare function farmNavigationPlugin(renderer: FarmRenderer | false | undefined): Plugin;
|
|
176
187
|
/**
|
|
177
188
|
* Islands mode (RFC 0006): a client component in a position that cannot hold `<f-island>` (a row in
|
|
178
189
|
* a table, an option in a select, a shape in an svg, an item in a list) makes the element around it
|
|
@@ -254,4 +265,4 @@ declare function shouldEmitFarmClientRootHmr(renderer?: FarmRenderer | false): b
|
|
|
254
265
|
declare function farmPlugin(options?: FarmVitePluginOptions, initialPluginManager?: PluginManager, deferredSetup?: FarmDeferredDevSetup): Plugin;
|
|
255
266
|
declare function defineConfig(config?: FarmVitePluginOptions): Promise<UserConfig>;
|
|
256
267
|
|
|
257
|
-
export { type ClientCachePersistenceEntryCode, collectDevStylesheetUrls, defineConfig, farmFontImportsPlugin, farmI18nClientBridgePlugin, farmImageImportsPlugin, farmIslandContainersPlugin, farmPlugin, farmServerOnlyEntriesPlugin, generateClientCachePersistenceCode, isFarmAppRuntimeFile, isViteDevClientRequest, isViteModuleRequest, resolveFarmClientCacheAdapterEntry, resolveFarmImageProviderForRuntime, resolveFarmImageServerRuntime, rewriteEarlySsrRelativeImports, shouldEmitFarmClientRootHmr, transformIsolatedClientBoundaryModule, withFarmRequestTracing };
|
|
268
|
+
export { type ClientCachePersistenceEntryCode, collectDevStylesheetUrls, defineConfig, farmFontImportsPlugin, farmI18nClientBridgePlugin, farmImageImportsPlugin, farmIslandContainersPlugin, farmNavigationPlugin, farmPlugin, farmServerOnlyEntriesPlugin, generateClientCachePersistenceCode, isFarmAppRuntimeFile, isViteDevClientRequest, isViteModuleRequest, resolveFarmClientCacheAdapterEntry, resolveFarmImageProviderForRuntime, resolveFarmImageServerRuntime, rewriteEarlySsrRelativeImports, shouldEmitFarmClientRootHmr, transformIsolatedClientBoundaryModule, withFarmRequestTracing };
|
package/dist/vite.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Plugin, UserConfig, Connect } from 'vite';
|
|
2
|
-
import {
|
|
2
|
+
import { aK as FarmConfig, x as FarmUserConfig, au as PluginManager } from './client-plugins.d-qWp8hNwd.js';
|
|
3
3
|
import { FarmCacheUserConfig } from './cache.js';
|
|
4
|
-
import { P as ProgrammaticClientRoutes, F as FarmSourceSnapshotStore } from './client-component.d-
|
|
5
|
-
export { c as collectFarmClientPackageImports, r as resolveFarmClientOptimizeDeps } from './client-component.d-
|
|
4
|
+
import { P as ProgrammaticClientRoutes, F as FarmSourceSnapshotStore } from './client-component.d-CX8UCQh-.js';
|
|
5
|
+
export { c as collectFarmClientPackageImports, r as resolveFarmClientOptimizeDeps } from './client-component.d-CX8UCQh-.js';
|
|
6
6
|
import { FarmPlatform } from './platform.js';
|
|
7
7
|
import { _withAfterNodeMiddleware } from './after.js';
|
|
8
8
|
import { A as APIRequestRuntime } from './server-client-bridge.d-DKWDl5NB.js';
|
|
@@ -11,8 +11,8 @@ import { F as FarmIslandStrategy } from './island.d-CfGru1MO.js';
|
|
|
11
11
|
export { c as createFarmNodeRequestAbortSignal } from './server-http.d-rAe7lAQc.js';
|
|
12
12
|
import { a as FarmImageConfig } from './image-config.d-ByhQ0TT7.js';
|
|
13
13
|
export { g as getPublicFarmImageConfig, r as resolveFarmImageConfig } from './image-config.d-ByhQ0TT7.js';
|
|
14
|
-
export { r as readRouteRenderingDirectiveFromFile } from './ssg.d-
|
|
15
|
-
export { i as installConfigResponseHeaders } from './headers.d-
|
|
14
|
+
export { r as readRouteRenderingDirectiveFromFile } from './ssg.d-MNedvvMB.js';
|
|
15
|
+
export { i as installConfigResponseHeaders } from './headers.d-Dj0mfYpb.js';
|
|
16
16
|
import './lifecycle.d-OtGWAvJT.js';
|
|
17
17
|
import './route.d-Cd4Fi6BA.js';
|
|
18
18
|
import './endpoint.d-Dx_1k6Du.js';
|
|
@@ -37,6 +37,7 @@ import './types.d-xCIhyjOq.js';
|
|
|
37
37
|
import './workflows.js';
|
|
38
38
|
import './cron.js';
|
|
39
39
|
import './env.js';
|
|
40
|
+
import './navigation-errors.d-DwHtoMyR.js';
|
|
40
41
|
import './server-action-security.js';
|
|
41
42
|
import './layers.d-CH0bC4QL.js';
|
|
42
43
|
import 'rolldown/utils';
|
|
@@ -46,7 +47,7 @@ import './types.d-DQnyD3VD.js';
|
|
|
46
47
|
import './font.js';
|
|
47
48
|
import 'node:http';
|
|
48
49
|
import './deployment.js';
|
|
49
|
-
import './route-rendering.d-
|
|
50
|
+
import './route-rendering.d-BwBVpLtD.js';
|
|
50
51
|
|
|
51
52
|
interface ResolvedClientCacheAdapterEntry {
|
|
52
53
|
/** Absolute adapter module path with forward slashes, ready for codegen. */
|
|
@@ -173,6 +174,16 @@ interface FarmVitePluginOptions extends FarmConfig {
|
|
|
173
174
|
sourceSnapshot?: FarmSourceSnapshotStore;
|
|
174
175
|
}
|
|
175
176
|
declare function farmI18nClientBridgePlugin(): Plugin;
|
|
177
|
+
/**
|
|
178
|
+
* `@farm.js/core/navigation` exports React's router hooks next to `notFound()` and `redirect()`, so
|
|
179
|
+
* loading it loads React. An app on another renderer doesn't install React, so the entry is an
|
|
180
|
+
* alias there for the same functions without the hooks, on the server and in the browser, in
|
|
181
|
+
* development and in builds. It is an alias, not a resolveId hook, because the development server
|
|
182
|
+
* leaves a package import it externalizes for Node to resolve, unless the import matches an alias.
|
|
183
|
+
* `renderer: false` has no pages for these to act on and is left alone, and so is Preact, whose
|
|
184
|
+
* plugin maps React's API to `preact/compat`, so the hooks run on Preact.
|
|
185
|
+
*/
|
|
186
|
+
declare function farmNavigationPlugin(renderer: FarmRenderer | false | undefined): Plugin;
|
|
176
187
|
/**
|
|
177
188
|
* Islands mode (RFC 0006): a client component in a position that cannot hold `<f-island>` (a row in
|
|
178
189
|
* a table, an option in a select, a shape in an svg, an item in a list) makes the element around it
|
|
@@ -254,4 +265,4 @@ declare function shouldEmitFarmClientRootHmr(renderer?: FarmRenderer | false): b
|
|
|
254
265
|
declare function farmPlugin(options?: FarmVitePluginOptions, initialPluginManager?: PluginManager, deferredSetup?: FarmDeferredDevSetup): Plugin;
|
|
255
266
|
declare function defineConfig(config?: FarmVitePluginOptions): Promise<UserConfig>;
|
|
256
267
|
|
|
257
|
-
export { type ClientCachePersistenceEntryCode, collectDevStylesheetUrls, defineConfig, farmFontImportsPlugin, farmI18nClientBridgePlugin, farmImageImportsPlugin, farmIslandContainersPlugin, farmPlugin, farmServerOnlyEntriesPlugin, generateClientCachePersistenceCode, isFarmAppRuntimeFile, isViteDevClientRequest, isViteModuleRequest, resolveFarmClientCacheAdapterEntry, resolveFarmImageProviderForRuntime, resolveFarmImageServerRuntime, rewriteEarlySsrRelativeImports, shouldEmitFarmClientRootHmr, transformIsolatedClientBoundaryModule, withFarmRequestTracing };
|
|
268
|
+
export { type ClientCachePersistenceEntryCode, collectDevStylesheetUrls, defineConfig, farmFontImportsPlugin, farmI18nClientBridgePlugin, farmImageImportsPlugin, farmIslandContainersPlugin, farmNavigationPlugin, farmPlugin, farmServerOnlyEntriesPlugin, generateClientCachePersistenceCode, isFarmAppRuntimeFile, isViteDevClientRequest, isViteModuleRequest, resolveFarmClientCacheAdapterEntry, resolveFarmImageProviderForRuntime, resolveFarmImageServerRuntime, rewriteEarlySsrRelativeImports, shouldEmitFarmClientRootHmr, transformIsolatedClientBoundaryModule, withFarmRequestTracing };
|
package/dist/vite.mjs
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
farmI18nClientBridgePlugin,
|
|
4
4
|
farmImageImportsPlugin,
|
|
5
5
|
farmIslandContainersPlugin,
|
|
6
|
+
farmNavigationPlugin,
|
|
6
7
|
farmPlugin,
|
|
7
8
|
farmServerOnlyEntriesPlugin,
|
|
8
9
|
isFarmAppRuntimeFile,
|
|
@@ -12,7 +13,7 @@ import {
|
|
|
12
13
|
shouldEmitFarmClientRootHmr,
|
|
13
14
|
transformIsolatedClientBoundaryModule,
|
|
14
15
|
withFarmRequestTracing
|
|
15
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-5N526T7Q.mjs";
|
|
16
17
|
import "./chunk-7V5M43ND.mjs";
|
|
17
18
|
import "./chunk-ZIEO3DQ3.mjs";
|
|
18
19
|
import "./chunk-UD6KTSJS.mjs";
|
|
@@ -24,32 +25,33 @@ import {
|
|
|
24
25
|
resolveFarmClientCacheAdapterEntry,
|
|
25
26
|
resolveFarmImageProviderForRuntime,
|
|
26
27
|
resolveFarmImageServerRuntime
|
|
27
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-IPG6B25T.mjs";
|
|
28
29
|
import "./chunk-RPA45OQS.mjs";
|
|
29
30
|
import "./chunk-C2OLXVUC.mjs";
|
|
30
|
-
import "./chunk-SMUW7UST.mjs";
|
|
31
|
-
import "./chunk-UB7RVEMX.mjs";
|
|
32
31
|
import {
|
|
33
32
|
readRouteRenderingDirectiveFromFile
|
|
34
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-TLSGRK7E.mjs";
|
|
34
|
+
import "./chunk-YSU3WCW6.mjs";
|
|
35
35
|
import "./chunk-YHHOTKUT.mjs";
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-UTUS6JUH.mjs";
|
|
36
|
+
import "./chunk-ONSZP5JK.mjs";
|
|
38
37
|
import "./chunk-HQ2VAJLW.mjs";
|
|
39
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-UTUS6JUH.mjs";
|
|
39
|
+
import "./chunk-SMUW7UST.mjs";
|
|
40
|
+
import "./chunk-UB7RVEMX.mjs";
|
|
41
|
+
import "./chunk-OO4GVGM3.mjs";
|
|
40
42
|
import "./chunk-LLZSYFOM.mjs";
|
|
41
43
|
import "./chunk-UUMKLGUU.mjs";
|
|
42
44
|
import "./chunk-ZXDX7VYZ.mjs";
|
|
43
|
-
import "./chunk-
|
|
45
|
+
import "./chunk-V7HNYR76.mjs";
|
|
46
|
+
import "./chunk-RZ6XUEQS.mjs";
|
|
44
47
|
import "./chunk-HR4N2K4V.mjs";
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
+
import "./chunk-GY63XD6K.mjs";
|
|
49
|
+
import "./chunk-EZYKV24V.mjs";
|
|
50
|
+
import "./chunk-2PFGA6PB.mjs";
|
|
48
51
|
import "./chunk-L4RTTTVE.mjs";
|
|
49
52
|
import "./chunk-GNZIAJGB.mjs";
|
|
50
|
-
import "./chunk-7FQFK3OA.mjs";
|
|
51
53
|
import "./chunk-XAXTTBUT.mjs";
|
|
52
|
-
import "./chunk-
|
|
54
|
+
import "./chunk-INKVDO42.mjs";
|
|
53
55
|
import "./chunk-X3EFRVXY.mjs";
|
|
54
56
|
import "./chunk-K6HIIWUB.mjs";
|
|
55
57
|
import "./chunk-YFTGIHNC.mjs";
|
|
@@ -57,7 +59,8 @@ import "./chunk-HZOMT5DY.mjs";
|
|
|
57
59
|
import {
|
|
58
60
|
collectFarmClientPackageImports,
|
|
59
61
|
resolveFarmClientOptimizeDeps
|
|
60
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-HTNJ7A4D.mjs";
|
|
63
|
+
import "./chunk-D2VAANBS.mjs";
|
|
61
64
|
import "./chunk-S32PDOLO.mjs";
|
|
62
65
|
import "./chunk-ZEWWZJPZ.mjs";
|
|
63
66
|
import "./chunk-EJCVG25Z.mjs";
|
|
@@ -67,12 +70,12 @@ import "./chunk-YVVY276M.mjs";
|
|
|
67
70
|
import "./chunk-XR2ZIBQK.mjs";
|
|
68
71
|
import "./chunk-CU5SYTJG.mjs";
|
|
69
72
|
import "./chunk-SLEHAGGV.mjs";
|
|
73
|
+
import "./chunk-22W4FNTG.mjs";
|
|
70
74
|
import "./chunk-SQ5O7I3L.mjs";
|
|
71
75
|
import "./chunk-XGL42MQ7.mjs";
|
|
72
|
-
import "./chunk-22W4FNTG.mjs";
|
|
73
76
|
import "./chunk-4QENVMG7.mjs";
|
|
74
|
-
import "./chunk-
|
|
75
|
-
import "./chunk-
|
|
77
|
+
import "./chunk-Z3RM3VA2.mjs";
|
|
78
|
+
import "./chunk-2HMSSPCZ.mjs";
|
|
76
79
|
import {
|
|
77
80
|
getPublicFarmImageConfig,
|
|
78
81
|
resolveFarmImageConfig
|
|
@@ -80,13 +83,13 @@ import {
|
|
|
80
83
|
import "./chunk-ATISIC6G.mjs";
|
|
81
84
|
import "./chunk-NLATR3T3.mjs";
|
|
82
85
|
import "./chunk-N33DLJBC.mjs";
|
|
83
|
-
import "./chunk-
|
|
84
|
-
import "./chunk-
|
|
86
|
+
import "./chunk-ECVSRE4Y.mjs";
|
|
87
|
+
import "./chunk-ICOJ2BC6.mjs";
|
|
85
88
|
import "./chunk-BRYPZIMB.mjs";
|
|
86
89
|
import "./chunk-UIJOLBUL.mjs";
|
|
87
90
|
import "./chunk-YU2MNIIY.mjs";
|
|
88
|
-
import "./chunk-
|
|
89
|
-
import "./chunk-
|
|
91
|
+
import "./chunk-AYDVUCXD.mjs";
|
|
92
|
+
import "./chunk-LTOT5KVJ.mjs";
|
|
90
93
|
import "./chunk-WXFY5JIY.mjs";
|
|
91
94
|
import "./chunk-YP7YO3S3.mjs";
|
|
92
95
|
import "./chunk-YWPNIYUP.mjs";
|
|
@@ -100,7 +103,7 @@ import "./chunk-K63OWRY2.mjs";
|
|
|
100
103
|
import "./chunk-QBJ6N5MT.mjs";
|
|
101
104
|
import "./chunk-DS2KZ5BT.mjs";
|
|
102
105
|
import "./chunk-BMQAPZXD.mjs";
|
|
103
|
-
import "./chunk-
|
|
106
|
+
import "./chunk-3RVLJTFZ.mjs";
|
|
104
107
|
import "./chunk-QD34VE4N.mjs";
|
|
105
108
|
import "./chunk-CYRO3WP4.mjs";
|
|
106
109
|
import "./chunk-6ZFRWRHO.mjs";
|
|
@@ -109,7 +112,7 @@ import "./chunk-EDPENAVO.mjs";
|
|
|
109
112
|
import "./chunk-OJO2GOM3.mjs";
|
|
110
113
|
import "./chunk-5PZJ63PK.mjs";
|
|
111
114
|
import "./chunk-IYEY3JWJ.mjs";
|
|
112
|
-
import "./chunk-
|
|
115
|
+
import "./chunk-6WVRVGKC.mjs";
|
|
113
116
|
import "./chunk-NRWEY2CM.mjs";
|
|
114
117
|
import "./chunk-URBP6DLH.mjs";
|
|
115
118
|
import "./chunk-YX6AFPXC.mjs";
|
|
@@ -129,8 +132,8 @@ import "./chunk-PKMUQ7LM.mjs";
|
|
|
129
132
|
import "./chunk-FS55CNTC.mjs";
|
|
130
133
|
import "./chunk-IGL6CO6M.mjs";
|
|
131
134
|
import "./chunk-O5QUJEWT.mjs";
|
|
132
|
-
import "./chunk-7H2TXT2K.mjs";
|
|
133
135
|
import "./chunk-VHIXGZYH.mjs";
|
|
136
|
+
import "./chunk-7H2TXT2K.mjs";
|
|
134
137
|
import "./chunk-VJSXPN3W.mjs";
|
|
135
138
|
import "./chunk-U6GMCDRS.mjs";
|
|
136
139
|
import "./chunk-2I6PUKWJ.mjs";
|
|
@@ -140,18 +143,18 @@ import {
|
|
|
140
143
|
import "./chunk-D2LCAV6L.mjs";
|
|
141
144
|
import "./chunk-H3ASZDT7.mjs";
|
|
142
145
|
import "./chunk-EILUVBKS.mjs";
|
|
143
|
-
import "./chunk-
|
|
144
|
-
import "./chunk-VDQZV6BX.mjs";
|
|
146
|
+
import "./chunk-D77OGI6X.mjs";
|
|
145
147
|
import "./chunk-QPNVDSFZ.mjs";
|
|
146
148
|
import "./chunk-GYMGK467.mjs";
|
|
147
149
|
import "./chunk-5Y4GYKKH.mjs";
|
|
148
150
|
import "./chunk-YT3SLLZK.mjs";
|
|
149
151
|
import "./chunk-GLVDXRG2.mjs";
|
|
150
152
|
import "./chunk-W6QLRQ3V.mjs";
|
|
153
|
+
import "./chunk-VDQZV6BX.mjs";
|
|
151
154
|
import "./chunk-PWHF2C6A.mjs";
|
|
152
155
|
import "./chunk-SD6JGJOM.mjs";
|
|
153
156
|
import "./chunk-AG27TI6Q.mjs";
|
|
154
|
-
import "./chunk-
|
|
157
|
+
import "./chunk-UDMBUTJD.mjs";
|
|
155
158
|
import "./chunk-WCLLPR6H.mjs";
|
|
156
159
|
import "./chunk-7BIW7VCW.mjs";
|
|
157
160
|
import "./chunk-IWJONXPF.mjs";
|
|
@@ -170,11 +173,11 @@ import "./chunk-CDT7CGQT.mjs";
|
|
|
170
173
|
import "./chunk-LM55GS4R.mjs";
|
|
171
174
|
import "./chunk-OHWM2VI4.mjs";
|
|
172
175
|
import "./chunk-FCAYYLAE.mjs";
|
|
173
|
-
import "./chunk-VIXTAVEA.mjs";
|
|
174
176
|
import "./chunk-JNYFXL7X.mjs";
|
|
175
177
|
import "./chunk-4QBFYEDC.mjs";
|
|
176
178
|
import "./chunk-SF3JB56B.mjs";
|
|
177
179
|
import "./chunk-5KAEGBIL.mjs";
|
|
180
|
+
import "./chunk-VIXTAVEA.mjs";
|
|
178
181
|
import "./chunk-TIZJYHB7.mjs";
|
|
179
182
|
export {
|
|
180
183
|
collectDevStylesheetUrls,
|
|
@@ -185,6 +188,7 @@ export {
|
|
|
185
188
|
farmI18nClientBridgePlugin,
|
|
186
189
|
farmImageImportsPlugin,
|
|
187
190
|
farmIslandContainersPlugin,
|
|
191
|
+
farmNavigationPlugin,
|
|
188
192
|
farmPlugin,
|
|
189
193
|
farmServerOnlyEntriesPlugin,
|
|
190
194
|
generateClientCachePersistenceCode,
|
package/dist/workflows.cjs
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkBSX5OGSDcjs = require('./chunk-BSX5OGSD.cjs');
|
|
16
16
|
require('./chunk-2KMIJDY6.cjs');
|
|
17
17
|
require('./chunk-SHIWRBFI.cjs');
|
|
18
18
|
require('./chunk-7U4XF76R.cjs');
|
|
@@ -39,4 +39,4 @@ require('./chunk-UZM3PDKK.cjs');
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
exports.DEFAULT_FARM_WORKFLOW_DIRS =
|
|
42
|
+
exports.DEFAULT_FARM_WORKFLOW_DIRS = _chunkBSX5OGSDcjs.DEFAULT_FARM_WORKFLOW_DIRS; exports.DEFAULT_FARM_WORKFLOW_ROUTE = _chunkBSX5OGSDcjs.DEFAULT_FARM_WORKFLOW_ROUTE; exports.DEFAULT_FARM_WORKFLOW_SECRET_ENV = _chunkBSX5OGSDcjs.DEFAULT_FARM_WORKFLOW_SECRET_ENV; exports.applyFarmWorkflowVercelCrons = _chunkBSX5OGSDcjs.applyFarmWorkflowVercelCrons; exports.createFarmWorkflowRequestHandler = _chunkBSX5OGSDcjs.createFarmWorkflowRequestHandler; exports.createFarmWorkflowVercelCrons = _chunkBSX5OGSDcjs.createFarmWorkflowVercelCrons; exports.defineCron = _chunkBSX5OGSDcjs.defineCron; exports.defineTask = _chunkBSX5OGSDcjs.defineTask; exports.defineWorkflow = _chunkBSX5OGSDcjs.defineWorkflow; exports.discoverFarmWorkflows = _chunkBSX5OGSDcjs.discoverFarmWorkflows; exports.prepareFarmWorkflowsForNitro = _chunkBSX5OGSDcjs.prepareFarmWorkflowsForNitro; exports.resolveWorkflowsConfig = _chunkBSX5OGSDcjs.resolveWorkflowsConfig; exports.runFarmWorkflowModule = _chunkBSX5OGSDcjs.runFarmWorkflowModule;
|
package/dist/workflows.mjs
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
prepareFarmWorkflowsForNitro,
|
|
13
13
|
resolveWorkflowsConfig,
|
|
14
14
|
runFarmWorkflowModule
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-LTOT5KVJ.mjs";
|
|
16
16
|
import "./chunk-WXFY5JIY.mjs";
|
|
17
17
|
import "./chunk-YP7YO3S3.mjs";
|
|
18
18
|
import "./chunk-U6GMCDRS.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farm.js/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.81",
|
|
4
4
|
"description": "The core of Farm.js, the framework for the web and agents",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"@farm.js/core",
|
|
@@ -724,6 +724,11 @@
|
|
|
724
724
|
"import": "./dist/internal/spa-router.mjs",
|
|
725
725
|
"require": "./dist/internal/spa-router.cjs"
|
|
726
726
|
},
|
|
727
|
+
"./internal/navigation-neutral": {
|
|
728
|
+
"types": "./dist/internal/navigation-neutral.d.ts",
|
|
729
|
+
"import": "./dist/internal/navigation-neutral.mjs",
|
|
730
|
+
"require": "./dist/internal/navigation-neutral.cjs"
|
|
731
|
+
},
|
|
727
732
|
"./internal/client-error-overlay": {
|
|
728
733
|
"types": "./dist/internal/client-error-overlay.d.ts",
|
|
729
734
|
"import": "./dist/internal/client-error-overlay.mjs",
|
|
@@ -784,6 +789,16 @@
|
|
|
784
789
|
"import": "./dist/internal/islx-server.mjs",
|
|
785
790
|
"require": "./dist/internal/islx-server.cjs"
|
|
786
791
|
},
|
|
792
|
+
"./internal/islx-actions-client": {
|
|
793
|
+
"types": "./dist/internal/islx-actions-client.d.ts",
|
|
794
|
+
"import": "./dist/internal/islx-actions-client.mjs",
|
|
795
|
+
"require": "./dist/internal/islx-actions-client.cjs"
|
|
796
|
+
},
|
|
797
|
+
"./internal/islx-actions-server": {
|
|
798
|
+
"types": "./dist/internal/islx-actions-server.d.ts",
|
|
799
|
+
"import": "./dist/internal/islx-actions-server.mjs",
|
|
800
|
+
"require": "./dist/internal/islx-actions-server.cjs"
|
|
801
|
+
},
|
|
787
802
|
"./internal/islx-react": {
|
|
788
803
|
"types": "./dist/internal/islx-react.d.ts",
|
|
789
804
|
"import": "./dist/internal/islx-react.mjs",
|
|
@@ -904,7 +919,7 @@
|
|
|
904
919
|
"tsup": "^8.3.5",
|
|
905
920
|
"typescript": "^5.3.3",
|
|
906
921
|
"vitest": "5.0.5",
|
|
907
|
-
"@farm.js/renderer-tests": "0.0.
|
|
922
|
+
"@farm.js/renderer-tests": "0.1.0-beta.1"
|
|
908
923
|
},
|
|
909
924
|
"peerDependencies": {
|
|
910
925
|
"@farming-labs/docs": "^0.2.118",
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var _chunkAXA2BSX3cjs = require('./chunk-AXA2BSX3.cjs');
|
|
7
|
-
require('./chunk-WBTHHTBO.cjs');
|
|
8
|
-
require('./chunk-CCAUIBIS.cjs');
|
|
9
|
-
require('./chunk-CCMP4JD2.cjs');
|
|
10
|
-
require('./chunk-UZM3PDKK.cjs');
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
exports.CORE_PORTABLE = _chunkAXA2BSX3cjs.CORE_PORTABLE; exports.analyzeFarmMobileRoutes = _chunkAXA2BSX3cjs.analyzeFarmMobileRoutes; exports.readAliases = _chunkAXA2BSX3cjs.readAliases; exports.resolveFile = _chunkAXA2BSX3cjs.resolveFile;
|
package/dist/chunk-CQL5ZGFU.cjs
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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/island-value-protocol.ts
|
|
2
|
-
var FARM_ISLAND_ELEMENT = "f-island";
|
|
3
|
-
var FARM_PROPS_SCRIPT_TYPE = "f/props";
|
|
4
|
-
var FARM_VALUE_SCRIPT_TYPE = "f/value";
|
|
5
|
-
var FARM_SLOT_ELEMENT = "f-slot";
|
|
6
|
-
var FARM_TAG = "$";
|
|
7
|
-
var FARM_TAG_VALUE = "v";
|
|
8
|
-
var FARM_REFERENCE_TAG = "r";
|
|
9
|
-
var FARM_SLOT_TAG = "s";
|
|
10
|
-
var FARM_ACTION_TAG = "a";
|
|
11
|
-
var FARM_OBJECT_TAG = "o";
|
|
12
|
-
var FARM_VALUES_HEADER = "F-Values";
|
|
13
|
-
function getFarmTag(value) {
|
|
14
|
-
if (!value || typeof value !== "object" || Array.isArray(value)) return void 0;
|
|
15
|
-
const tag = value[FARM_TAG];
|
|
16
|
-
if (typeof tag !== "string") return void 0;
|
|
17
|
-
const keys = Object.keys(value);
|
|
18
|
-
return keys.length === 1 || keys.length === 2 && FARM_TAG_VALUE in value ? tag : void 0;
|
|
19
|
-
}
|
|
20
|
-
var FARM_VALUE_KEY_PATTERN = /^[0-9a-z]{14}$/;
|
|
21
|
-
var FARM_MAX_HELD_VALUES = 128;
|
|
22
|
-
var FARM_ISLAND_VALUE_STORE_KEY = /* @__PURE__ */ Symbol.for("islx.values");
|
|
23
|
-
var ISLAND_VALUES_SERVER_KEY = /* @__PURE__ */ Symbol.for("farm.island-values.server");
|
|
24
|
-
function getFarmIslandValuesServer() {
|
|
25
|
-
return globalThis[ISLAND_VALUES_SERVER_KEY];
|
|
26
|
-
}
|
|
27
|
-
function getFarmIslandValueHeaders() {
|
|
28
|
-
const scope = globalThis;
|
|
29
|
-
const held = _optionalChain([scope, 'access', _ => _[FARM_ISLAND_VALUE_STORE_KEY], 'optionalAccess', _2 => _2.heldHeader, 'call', _3 => _3()]);
|
|
30
|
-
return held ? { [FARM_VALUES_HEADER]: held } : {};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
exports.FARM_ISLAND_ELEMENT = FARM_ISLAND_ELEMENT; exports.FARM_PROPS_SCRIPT_TYPE = FARM_PROPS_SCRIPT_TYPE; exports.FARM_VALUE_SCRIPT_TYPE = FARM_VALUE_SCRIPT_TYPE; exports.FARM_SLOT_ELEMENT = FARM_SLOT_ELEMENT; exports.FARM_TAG = FARM_TAG; exports.FARM_TAG_VALUE = FARM_TAG_VALUE; exports.FARM_REFERENCE_TAG = FARM_REFERENCE_TAG; exports.FARM_SLOT_TAG = FARM_SLOT_TAG; exports.FARM_ACTION_TAG = FARM_ACTION_TAG; exports.FARM_OBJECT_TAG = FARM_OBJECT_TAG; exports.FARM_VALUES_HEADER = FARM_VALUES_HEADER; exports.getFarmTag = getFarmTag; exports.FARM_VALUE_KEY_PATTERN = FARM_VALUE_KEY_PATTERN; exports.FARM_MAX_HELD_VALUES = FARM_MAX_HELD_VALUES; exports.getFarmIslandValuesServer = getFarmIslandValuesServer; exports.getFarmIslandValueHeaders = getFarmIslandValueHeaders;
|
package/dist/chunk-HONTCUK6.mjs
DELETED
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
VERCEL_OG_INSTALL_HINT,
|
|
3
|
-
isMissingPackageError,
|
|
4
|
-
withOptionalPeerCause
|
|
5
|
-
} from "./chunk-NR63PD3P.mjs";
|
|
6
|
-
import {
|
|
7
|
-
omitFarmResponseBody
|
|
8
|
-
} from "./chunk-D7Y63SOY.mjs";
|
|
9
|
-
import {
|
|
10
|
-
matchesFarmIfNoneMatch
|
|
11
|
-
} from "./chunk-YT2ZMLXK.mjs";
|
|
12
|
-
|
|
13
|
-
// src/metadata-image.ts
|
|
14
|
-
var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element");
|
|
15
|
-
var REACT_TRANSITIONAL_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element");
|
|
16
|
-
var REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref");
|
|
17
|
-
var REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo");
|
|
18
|
-
var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
|
|
19
|
-
function isResponse(value) {
|
|
20
|
-
return typeof Response !== "undefined" && (value instanceof Response || Boolean(
|
|
21
|
-
value && typeof value === "object" && typeof value.arrayBuffer === "function" && value.headers
|
|
22
|
-
));
|
|
23
|
-
}
|
|
24
|
-
function isThenable(value) {
|
|
25
|
-
return Boolean(
|
|
26
|
-
value && (typeof value === "object" || typeof value === "function") && typeof value.then === "function"
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
function isReactElement(value) {
|
|
30
|
-
if (!value || typeof value !== "object") return false;
|
|
31
|
-
const marker = value.$$typeof;
|
|
32
|
-
return marker === REACT_ELEMENT_TYPE || marker === REACT_TRANSITIONAL_ELEMENT_TYPE;
|
|
33
|
-
}
|
|
34
|
-
function isMetadataImageElement(value, renderer) {
|
|
35
|
-
return renderer ? renderer.isValidElement(value) : isReactElement(value);
|
|
36
|
-
}
|
|
37
|
-
async function prepareMetadataImageNode(node, renderer) {
|
|
38
|
-
if (isThenable(node)) {
|
|
39
|
-
return prepareMetadataImageNode(await node, renderer);
|
|
40
|
-
}
|
|
41
|
-
if (Array.isArray(node)) {
|
|
42
|
-
return Promise.all(node.map((child) => prepareMetadataImageNode(child, renderer)));
|
|
43
|
-
}
|
|
44
|
-
if (!isMetadataImageElement(node, renderer)) {
|
|
45
|
-
return node;
|
|
46
|
-
}
|
|
47
|
-
const element = node;
|
|
48
|
-
const type = element.type;
|
|
49
|
-
const props = element.props || {};
|
|
50
|
-
if (typeof type === "function") {
|
|
51
|
-
if (type.prototype?.isReactComponent) {
|
|
52
|
-
throw new Error(
|
|
53
|
-
"Metadata image components must be stateless function components; React class components are not supported."
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
return prepareMetadataImageNode(await type(props), renderer);
|
|
57
|
-
}
|
|
58
|
-
if (type && typeof type === "object") {
|
|
59
|
-
if (type.$$typeof === REACT_MEMO_TYPE) {
|
|
60
|
-
const { createElement: createElement2 } = await import("react");
|
|
61
|
-
return prepareMetadataImageNode(createElement2(type.type, props), renderer);
|
|
62
|
-
}
|
|
63
|
-
if (type.$$typeof === REACT_FORWARD_REF_TYPE) {
|
|
64
|
-
return prepareMetadataImageNode(await type.render(props, null), renderer);
|
|
65
|
-
}
|
|
66
|
-
if (type.$$typeof === REACT_LAZY_TYPE) {
|
|
67
|
-
const { createElement: createElement2 } = await import("react");
|
|
68
|
-
let resolvedType;
|
|
69
|
-
try {
|
|
70
|
-
resolvedType = type._init(type._payload);
|
|
71
|
-
} catch (suspension) {
|
|
72
|
-
if (suspension && typeof suspension.then === "function") {
|
|
73
|
-
await suspension;
|
|
74
|
-
resolvedType = type._init(type._payload);
|
|
75
|
-
} else {
|
|
76
|
-
throw suspension;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return prepareMetadataImageNode(createElement2(resolvedType, props), renderer);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
const preparedChildren = await prepareMetadataImageNode(props.children, renderer);
|
|
83
|
-
const preparedProps = { ...props };
|
|
84
|
-
if (typeof preparedProps.className === "string") {
|
|
85
|
-
preparedProps.tw = [preparedProps.tw, preparedProps.className].filter(Boolean).join(" ");
|
|
86
|
-
delete preparedProps.className;
|
|
87
|
-
}
|
|
88
|
-
delete preparedProps.children;
|
|
89
|
-
const createElement = renderer?.createElement ?? (await import("react")).createElement;
|
|
90
|
-
return createElement(type, {
|
|
91
|
-
...preparedProps,
|
|
92
|
-
key: element.key,
|
|
93
|
-
children: preparedChildren
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
async function normalizeFonts(fonts) {
|
|
97
|
-
if (!fonts?.length) return void 0;
|
|
98
|
-
return Promise.all(
|
|
99
|
-
fonts.map(async (font) => {
|
|
100
|
-
const data = await font.data;
|
|
101
|
-
const arrayBuffer = ArrayBuffer.isView(data) ? toArrayBuffer(data) : data;
|
|
102
|
-
return { ...font, data: arrayBuffer };
|
|
103
|
-
})
|
|
104
|
-
);
|
|
105
|
-
}
|
|
106
|
-
function resolveCacheControl(revalidate) {
|
|
107
|
-
if (revalidate === false) {
|
|
108
|
-
return "public, max-age=31536000, immutable";
|
|
109
|
-
}
|
|
110
|
-
if (typeof revalidate === "number" && Number.isFinite(revalidate) && revalidate > 0) {
|
|
111
|
-
return `public, s-maxage=${Math.floor(revalidate)}, stale-while-revalidate=300`;
|
|
112
|
-
}
|
|
113
|
-
return "public, max-age=0, must-revalidate";
|
|
114
|
-
}
|
|
115
|
-
function toArrayBuffer(value) {
|
|
116
|
-
if (value instanceof ArrayBuffer) return value;
|
|
117
|
-
const bytes = new Uint8Array(value.byteLength);
|
|
118
|
-
bytes.set(new Uint8Array(value.buffer, value.byteOffset, value.byteLength));
|
|
119
|
-
return bytes.buffer;
|
|
120
|
-
}
|
|
121
|
-
async function createEntityTag(body) {
|
|
122
|
-
const digest = await globalThis.crypto.subtle.digest("SHA-256", body);
|
|
123
|
-
const hash = Array.from(new Uint8Array(digest), (byte) => byte.toString(16).padStart(2, "0")).join("").slice(0, 32);
|
|
124
|
-
return `"${hash}"`;
|
|
125
|
-
}
|
|
126
|
-
async function finalizeMetadataImageResponse(body, headers, options) {
|
|
127
|
-
const responseHeaders = new Headers(headers);
|
|
128
|
-
const etag = await createEntityTag(body);
|
|
129
|
-
responseHeaders.set("ETag", etag);
|
|
130
|
-
responseHeaders.set("Content-Length", String(body.byteLength));
|
|
131
|
-
responseHeaders.set("X-Content-Type-Options", "nosniff");
|
|
132
|
-
if (matchesFarmIfNoneMatch(options.ifNoneMatch, etag)) {
|
|
133
|
-
return new Response(null, { status: 304, headers: responseHeaders });
|
|
134
|
-
}
|
|
135
|
-
return new Response(options.method?.toUpperCase() === "HEAD" ? null : body, {
|
|
136
|
-
status: 200,
|
|
137
|
-
headers: responseHeaders
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
async function loadVercelOg() {
|
|
141
|
-
try {
|
|
142
|
-
return await import("@vercel/og");
|
|
143
|
-
} catch (error) {
|
|
144
|
-
if (!isMissingPackageError(error, "@vercel/og")) throw error;
|
|
145
|
-
throw withOptionalPeerCause(
|
|
146
|
-
new Error(
|
|
147
|
-
`Rendering a metadata image from JSX needs @vercel/og, which is not installed. ${VERCEL_OG_INSTALL_HINT}`
|
|
148
|
-
),
|
|
149
|
-
error
|
|
150
|
-
);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
async function createFarmMetadataImageResponse(value, imageModule, options = {}) {
|
|
154
|
-
const method = (options.method || "GET").toUpperCase();
|
|
155
|
-
if (method !== "GET" && method !== "HEAD") {
|
|
156
|
-
return new Response(null, { status: 405, headers: { Allow: "GET, HEAD" } });
|
|
157
|
-
}
|
|
158
|
-
if (isResponse(value)) {
|
|
159
|
-
return method === "HEAD" ? omitFarmResponseBody(value) : value;
|
|
160
|
-
}
|
|
161
|
-
const cacheControl = resolveCacheControl(imageModule.revalidate);
|
|
162
|
-
const explicitContentType = imageModule.contentType?.split(";", 1)[0]?.trim().toLowerCase();
|
|
163
|
-
const { renderer } = options;
|
|
164
|
-
const isElement = isMetadataImageElement(value, renderer);
|
|
165
|
-
if (isElement && explicitContentType !== "image/svg+xml") {
|
|
166
|
-
const { ImageResponse } = await loadVercelOg();
|
|
167
|
-
const element = await prepareMetadataImageNode(value, renderer);
|
|
168
|
-
const response = new ImageResponse(element, {
|
|
169
|
-
width: imageModule.size?.width || 1200,
|
|
170
|
-
height: imageModule.size?.height || 630,
|
|
171
|
-
fonts: await normalizeFonts(imageModule.fonts),
|
|
172
|
-
emoji: imageModule.emoji,
|
|
173
|
-
debug: imageModule.debug,
|
|
174
|
-
headers: { "cache-control": cacheControl }
|
|
175
|
-
});
|
|
176
|
-
const headers = new Headers(response.headers);
|
|
177
|
-
headers.set("Cache-Control", cacheControl);
|
|
178
|
-
return finalizeMetadataImageResponse(await response.arrayBuffer(), headers, options);
|
|
179
|
-
}
|
|
180
|
-
let body;
|
|
181
|
-
if (typeof value === "string") {
|
|
182
|
-
body = toArrayBuffer(new TextEncoder().encode(value));
|
|
183
|
-
} else if (value instanceof ArrayBuffer || ArrayBuffer.isView(value)) {
|
|
184
|
-
body = toArrayBuffer(value);
|
|
185
|
-
} else if (isElement) {
|
|
186
|
-
const markup = renderer ? await renderer.renderToString(value) : (await import("react-dom/server")).renderToStaticMarkup(value);
|
|
187
|
-
body = toArrayBuffer(new TextEncoder().encode(markup));
|
|
188
|
-
} else {
|
|
189
|
-
throw new Error("Metadata image must return a Response, string, bytes, or React element");
|
|
190
|
-
}
|
|
191
|
-
return finalizeMetadataImageResponse(
|
|
192
|
-
body,
|
|
193
|
-
{
|
|
194
|
-
"Content-Type": imageModule.contentType || "image/svg+xml; charset=utf-8",
|
|
195
|
-
"Cache-Control": cacheControl
|
|
196
|
-
},
|
|
197
|
-
options
|
|
198
|
-
);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
export {
|
|
202
|
-
createFarmMetadataImageResponse
|
|
203
|
-
};
|