@farm.js/core 0.1.80 → 0.1.82
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-C2Su3x4D.d.ts} +1 -1
- package/dist/{agent-mcp.d-DOP95Jxm.d.mts → agent-mcp.d-Yak-LqRd.d.mts} +1 -1
- package/dist/agent-runtime.cjs +4 -3
- package/dist/agent-runtime.d.mts +2 -1
- package/dist/agent-runtime.d.ts +2 -1
- package/dist/agent-runtime.mjs +3 -2
- package/dist/analyzer-LV23T6QN.cjs +17 -0
- package/dist/{analyzer-F7CWE5VA.mjs → analyzer-RPU2KG4J.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 +6 -5
- package/dist/api/node.d.mts +4 -3
- package/dist/api/node.d.ts +4 -3
- package/dist/api/node.mjs +5 -4
- package/dist/api/route-manager.cjs +7 -6
- package/dist/api/route-manager.d.mts +4 -3
- package/dist/api/route-manager.d.ts +4 -3
- package/dist/api/route-manager.mjs +6 -5
- package/dist/api/runtime.cjs +5 -4
- package/dist/api/runtime.d.mts +3 -2
- package/dist/api/runtime.d.ts +3 -2
- package/dist/api/runtime.mjs +4 -3
- package/dist/api.cjs +9 -8
- package/dist/api.d.mts +5 -4
- package/dist/api.d.ts +5 -4
- package/dist/api.mjs +8 -7
- package/dist/{app-manifest.d-9UD6BznX.d.mts → app-manifest.d-BcyOFMrg.d.mts} +1 -1
- package/dist/{app-manifest.d-CO6Iu0Hx.d.ts → app-manifest.d-DZyXaICz.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-C0ePpuaG.d.mts} +30 -4
- package/dist/{app.d-DwX1ePhs.d.ts → app.d-CIoXsAbN.d.ts} +30 -4
- package/dist/{chunk-Q4TRGTO7.cjs → chunk-26WP75W5.cjs} +32 -16
- package/dist/{chunk-7KDCVSTR.mjs → chunk-2PFGA6PB.mjs} +2 -2
- package/dist/chunk-2UYYXSUS.mjs +401 -0
- package/dist/{chunk-PL7MCYYD.mjs → chunk-3AV4DCXY.mjs} +58 -358
- package/dist/{chunk-3GNHJ3RN.cjs → chunk-3BTN3NP7.cjs} +2 -2
- package/dist/chunk-3DE6RK7K.cjs +36 -0
- package/dist/{chunk-GBW5DU7V.mjs → chunk-47I2MYIR.mjs} +487 -304
- package/dist/{chunk-RQBGHHOQ.mjs → chunk-4X7LSGM6.mjs} +1 -1
- package/dist/{chunk-QMR2TUVZ.cjs → chunk-52Q4OB4A.cjs} +4 -4
- package/dist/{chunk-BPWTSPK6.mjs → chunk-5AL2GXAU.mjs} +1 -1
- package/dist/{chunk-GAWSWJJ2.cjs → chunk-5GFTMTX3.cjs} +2 -2
- package/dist/chunk-5MMKNW7Q.cjs +54 -0
- package/dist/{chunk-AXA2BSX3.cjs → chunk-5MUFW5UU.cjs} +22 -21
- package/dist/{chunk-MQOHYV6L.cjs → chunk-5P65LXGU.cjs} +11 -11
- package/dist/{chunk-KEU55O2D.mjs → chunk-63ZE6B6M.mjs} +7 -6
- package/dist/{chunk-TS3ZHJN5.cjs → chunk-6BPFIYGY.cjs} +3 -3
- package/dist/{chunk-NJ4OASLP.mjs → chunk-6QYPP5KC.mjs} +2 -2
- package/dist/{chunk-ATISIC6G.mjs → chunk-7VJXYB6S.mjs} +7 -1
- package/dist/{chunk-G4SZC2WH.cjs → chunk-AIPZDBP6.cjs} +557 -374
- package/dist/{chunk-X4TSMQWF.cjs → chunk-ARORZ3MH.cjs} +548 -397
- package/dist/{chunk-K3XKEZR6.mjs → chunk-AUFEM3FB.mjs} +1 -1
- package/dist/{chunk-MGKWYPE3.mjs → chunk-AYDVUCXD.mjs} +1 -0
- package/dist/{chunk-5OAN7BG5.cjs → chunk-B2PGVHBG.cjs} +4 -4
- package/dist/{chunk-WGWWRV2M.cjs → chunk-B3HQTGXS.cjs} +6 -4
- 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-67MZTLTF.cjs → chunk-BCTHOQPP.cjs} +37 -9
- package/dist/{chunk-GBESKA76.cjs → chunk-BSX5OGSD.cjs} +1 -1
- package/dist/{chunk-CNDBLUKI.mjs → chunk-BVJUFVCU.mjs} +1 -1
- package/dist/{chunk-QHAISITM.mjs → chunk-C3VCYOU4.mjs} +1 -1
- package/dist/chunk-C5QHZ626.cjs +85 -0
- package/dist/{chunk-3K2E55BJ.mjs → chunk-CA2HBLXP.mjs} +13 -3
- package/dist/{chunk-ANZLZNNX.cjs → chunk-CD5Z7RR5.cjs} +155 -20
- package/dist/{chunk-4MIDUSIX.mjs → chunk-CJDBTTLB.mjs} +17 -17
- package/dist/{chunk-RLCOWWE5.cjs → chunk-CN2JOTRO.cjs} +7 -7
- package/dist/chunk-D2VAANBS.mjs +48 -0
- package/dist/{chunk-XZBBKZGW.mjs → chunk-DAXU2NBE.mjs} +128 -41
- package/dist/{chunk-4H4ZXUNB.cjs → chunk-DJ3PVHTW.cjs} +3 -3
- package/dist/{chunk-Z5BANEQD.cjs → chunk-DMSXZNQR.cjs} +2 -2
- package/dist/{chunk-ZVSQN7NC.cjs → chunk-DRO3NXA3.cjs} +40 -43
- package/dist/{chunk-4OFWG4IK.cjs → chunk-EACD6ND7.cjs} +8 -2
- package/dist/{chunk-Q4YEAWUK.mjs → chunk-ECVSRE4Y.mjs} +3 -2
- package/dist/{chunk-MDEFTF63.mjs → chunk-EL2Z6YFZ.mjs} +25 -28
- 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-V73Y4UBL.mjs → chunk-GXLNARPO.mjs} +151 -16
- package/dist/{chunk-ZPEZXQTM.cjs → chunk-HHQEKLZL.cjs} +2 -2
- package/dist/{chunk-HNUBRUFQ.cjs → chunk-HQEYZSF3.cjs} +4 -3
- package/dist/{chunk-5ZHC6QGD.cjs → chunk-HQKCSJEH.cjs} +8 -2
- package/dist/{chunk-RHI67C2V.cjs → chunk-HUGPJFOC.cjs} +1 -35
- package/dist/{chunk-44G4XHEL.mjs → chunk-I4DR3HCH.mjs} +11 -11
- package/dist/chunk-I4WZRG73.mjs +54 -0
- package/dist/{chunk-MUZHULW2.mjs → chunk-ICOJ2BC6.mjs} +23 -7
- package/dist/{chunk-MNIR7I7B.mjs → chunk-INKVDO42.mjs} +1 -1
- package/dist/{chunk-C2OLXVUC.mjs → chunk-IVP5Q4BX.mjs} +10 -3
- package/dist/{chunk-HEDGTXXB.cjs → chunk-JB4BHRFK.cjs} +17 -17
- package/dist/{chunk-XKUKWMGX.cjs → chunk-JCYDWJVO.cjs} +3 -3
- package/dist/{chunk-CCMP4JD2.cjs → chunk-JK26IMT7.cjs} +1 -1
- package/dist/{chunk-WIZRYFB2.cjs → chunk-JYQ6DGPW.cjs} +8 -6
- package/dist/{chunk-SVCUSOEF.mjs → chunk-KR5DF7WK.mjs} +1 -1
- package/dist/{chunk-TYHWZOA2.mjs → chunk-KWI3SQFX.mjs} +4 -2
- package/dist/{chunk-POVHO46S.mjs → chunk-L3RDECA5.mjs} +1 -1
- package/dist/{chunk-LVGB5PYK.cjs → chunk-LM2ZDNDD.cjs} +28 -28
- package/dist/{chunk-COTFX4GT.mjs → chunk-LTOT5KVJ.mjs} +1 -1
- package/dist/{chunk-RPA45OQS.mjs → chunk-MO4UTDQ6.mjs} +1 -1
- package/dist/{chunk-DVHFIETW.cjs → chunk-N2EFMN2K.cjs} +18 -18
- package/dist/{chunk-MZ5QGWRW.mjs → chunk-N3VMHPIY.mjs} +2 -2
- package/dist/{chunk-KKVRWNDH.mjs → chunk-NAHDG6UX.mjs} +4 -4
- package/dist/{chunk-UWOCYINY.cjs → chunk-NEKO3HM2.cjs} +12 -2
- package/dist/{chunk-SLEHAGGV.mjs → chunk-NQ3Y6E2T.mjs} +7 -1
- package/dist/{chunk-ZDYYZX73.mjs → chunk-NRCKBDYP.mjs} +266 -115
- package/dist/{chunk-EG5YBYHO.mjs → chunk-OMB7UGVW.mjs} +1 -1
- package/dist/{chunk-JGEN2FIT.mjs → chunk-OP5VI4TP.mjs} +1 -1
- package/dist/{chunk-7VCLTNED.mjs → chunk-PNMAD3OS.mjs} +1 -35
- package/dist/{chunk-3XTRT3MB.mjs → chunk-PO5MZIWK.mjs} +1 -1
- package/dist/{chunk-ASYOWPSR.cjs → chunk-PWDBWXQI.cjs} +2 -1
- package/dist/{chunk-WJ2O2MPP.cjs → chunk-Q2VOT3K2.cjs} +494 -407
- package/dist/{chunk-7YLDUB4R.cjs → chunk-QCKSYYXK.cjs} +7 -7
- package/dist/{chunk-57QAQU4F.mjs → chunk-QRNYSISP.mjs} +1 -1
- package/dist/{chunk-3JQBQG7K.mjs → chunk-QSMUMK7Y.mjs} +2 -2
- package/dist/{chunk-PRL7FXG4.cjs → chunk-RDNKQ5MK.cjs} +12 -13
- package/dist/{chunk-GCRT6GJG.mjs → chunk-RMLR5RMH.mjs} +30 -2
- package/dist/{chunk-XY5OZQF6.cjs → chunk-RMPUEH5T.cjs} +2 -2
- package/dist/{chunk-7DD5TNPS.cjs → chunk-S7WZUK3B.cjs} +2 -2
- package/dist/{chunk-EGHPFXPZ.cjs → chunk-SAPG45RA.cjs} +23 -23
- package/dist/{chunk-Z4SMFUZ7.cjs → chunk-U54REWMJ.cjs} +23 -23
- package/dist/chunk-U6XYBTUT.mjs +36 -0
- package/dist/chunk-UDMBUTJD.mjs +85 -0
- package/dist/{chunk-WHEQJN4G.cjs → chunk-UGD53SNO.cjs} +2 -2
- package/dist/{chunk-TCMRLW3K.cjs → chunk-VACYUMXW.cjs} +10 -3
- package/dist/{chunk-SDICLSQU.cjs → chunk-VMBIKDKW.cjs} +10 -10
- package/dist/{chunk-WBPVLCNE.mjs → chunk-VPGEYX5Y.mjs} +4 -4
- package/dist/chunk-VS7HLH4S.cjs +385 -0
- package/dist/{chunk-UGLTOLTJ.cjs → chunk-W76C7TCW.cjs} +2 -2
- 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-6JWXHPVR.mjs → chunk-XRSNW4IU.mjs} +4 -2
- 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-YN3YMSKD.mjs → chunk-ZIZRIZLP.mjs} +3 -3
- package/dist/{cli-runtime.d-DPNTN-JV.d.mts → cli-runtime.d-Hnvvadz7.d.mts} +5 -5
- package/dist/{cli-runtime.d-8BhZy_wr.d.ts → cli-runtime.d-I0MphTbc.d.ts} +5 -5
- package/dist/{client-component.d-CkDcob6D.d.ts → client-component.d-5QEvtJsg.d.ts} +1 -1
- package/dist/{client-component.d-CMCdyAr8.d.mts → client-component.d-DapRqtSC.d.mts} +1 -1
- package/dist/{client-plugins.d-WcMwOZGZ.d.mts → client-plugins.d-C1WM3ieD.d.mts} +7 -13
- package/dist/{client-plugins.d-BYIovYqX.d.ts → client-plugins.d-DcmDzcSC.d.ts} +7 -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/cron.cjs +2 -2
- package/dist/cron.mjs +1 -1
- package/dist/desktop.d.mts +3 -2
- package/dist/desktop.d.ts +3 -2
- package/dist/{devtools-JJOYTIMS.cjs → devtools-5B7NZE6F.cjs} +15 -14
- package/dist/{devtools-F3FDFV26.mjs → devtools-C5GXZZ7E.mjs} +12 -11
- package/dist/docs.cjs +14 -13
- package/dist/docs.d.mts +4 -3
- package/dist/docs.d.ts +4 -3
- package/dist/docs.mjs +13 -12
- package/dist/environment/vite.cjs +7 -6
- package/dist/environment/vite.mjs +6 -5
- package/dist/{handler.d-s3IM6pbJ.d.mts → handler.d-B8bPCBzl.d.mts} +1 -1
- package/dist/{handler.d-BwdOyc9x.d.ts → handler.d-Cliwo6Nu.d.ts} +1 -1
- package/dist/{headers.d-BR-OXrqQ.d.mts → headers.d-CVwSpSGX.d.mts} +1 -1
- package/dist/{headers.d-CAW4wPey.d.ts → headers.d-C_btqjV6.d.ts} +1 -1
- package/dist/index.cjs +68 -65
- package/dist/{index.d-BEVK61zS.d.mts → index.d-DFuMZk9-.d.mts} +1 -1
- package/dist/{index.d-ah2c89Wu.d.ts → index.d-hOEbMcLk.d.ts} +1 -1
- package/dist/index.d.mts +25 -23
- package/dist/index.d.ts +25 -23
- package/dist/index.mjs +72 -69
- 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.cjs +4 -3
- package/dist/integrations.d.mts +2 -1
- package/dist/integrations.d.ts +2 -1
- package/dist/integrations.mjs +3 -2
- 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 +49 -47
- package/dist/internal/build-runtime.d.mts +5 -4
- package/dist/internal/build-runtime.d.ts +5 -4
- package/dist/internal/build-runtime.mjs +48 -46
- package/dist/internal/cli-runtime.cjs +25 -24
- package/dist/internal/cli-runtime.d.mts +8 -7
- package/dist/internal/cli-runtime.d.ts +8 -7
- package/dist/internal/cli-runtime.mjs +26 -25
- 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 +14 -13
- package/dist/internal/config-runtime.d.mts +4 -3
- package/dist/internal/config-runtime.d.ts +4 -3
- package/dist/internal/config-runtime.mjs +13 -12
- 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 +9 -7
- package/dist/internal/infra-analytics-runtime.d.mts +8 -2
- package/dist/internal/infra-analytics-runtime.d.ts +8 -2
- package/dist/internal/infra-analytics-runtime.mjs +9 -7
- 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 +63 -23
- package/dist/internal/islands-boot.d.mts +5 -3
- package/dist/internal/islands-boot.d.ts +5 -3
- package/dist/internal/islands-boot.mjs +58 -18
- 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 +30 -25
- package/dist/internal/production-runtime.d.mts +14 -11
- package/dist/internal/production-runtime.d.ts +14 -11
- package/dist/internal/production-runtime.mjs +35 -30
- 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-DcoPFqv5.d.ts → mount.d-CAovYKfs.d.ts} +1 -1
- package/dist/{mount.d-Ylo-CmzK.d.mts → mount.d-DLeYxeRR.d.mts} +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-2MK4YSlL.d.ts → navigation-delegate.d-BLM-8Q3Z.d.ts} +1 -1
- package/dist/{navigation-delegate.d-BA5h0fbE.d.mts → navigation-delegate.d-Chv93QS6.d.mts} +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-C3MYDX7V.mjs → nitro-FK3SZM4H.mjs} +2 -2
- package/dist/{nitro-6UOJXJZ6.cjs → nitro-YDFMH5PY.cjs} +6 -6
- 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-LN3JBZRR.cjs → plugin-3PT7I26P.cjs} +2 -2
- package/dist/{plugin-33I3V42N.mjs → plugin-QOTAPTVV.mjs} +1 -1
- package/dist/plugin.cjs +41 -37
- package/dist/plugin.d.mts +6 -5
- package/dist/plugin.d.ts +6 -5
- package/dist/plugin.mjs +40 -36
- 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-BSTjTH8h.d.ts} +1 -1
- package/dist/{render-plan.d-ChYBMhLu.d.mts → render-plan.d-CK5Lggyb.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 +79 -17
- package/dist/renderer-client.d.mts +13 -97
- package/dist/renderer-client.d.ts +13 -97
- package/dist/renderer-client.mjs +69 -7
- package/dist/renderer.cjs +4 -2
- package/dist/renderer.d.mts +43 -5
- package/dist/renderer.d.ts +43 -5
- package/dist/renderer.mjs +3 -1
- package/dist/{request.d-RCnCBuWq.d.mts → request.d-BhggxQf3.d.mts} +1 -1
- package/dist/{request.d-CE0FIkiM.d.ts → request.d-CyJS9bjm.d.ts} +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-BLPPmI5I.d.ts} +1 -1
- package/dist/{route-rendering.d-BZJnfKsp.d.mts → route-rendering.d-CUpG2mZJ.d.mts} +1 -1
- package/dist/{router.d-BU_WE6Ol.d.ts → router.d-0X2Ki6rf.d.ts} +1 -1
- package/dist/{router.d-D8Vvwl4i.d.mts → router.d-2NQM1Kgw.d.mts} +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-A3R4U26C.cjs → rsc-pipeline-5AOF64FL.cjs} +19 -18
- package/dist/{rsc-pipeline-JZWVSHOR.mjs → rsc-pipeline-DNRLYOJ7.mjs} +18 -17
- package/dist/{runtime-SQFRHRGJ.mjs → runtime-EHG2FRXZ.mjs} +18 -17
- package/dist/{runtime-WZ3CHHGJ.cjs → runtime-ZVHG5SRB.cjs} +20 -19
- package/dist/{runtime.d-DJ6IIKcF.d.ts → runtime.d-CXuwkUgr.d.ts} +1 -1
- package/dist/{runtime.d-BnmuOXVD.d.mts → runtime.d-CaFXcu_Q.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-BeqSXcjM.d.ts → server-components-status.d-BdeFD8ZH.d.ts} +1 -1
- package/dist/{server-components-status.d-BzOg9M8g.d.mts → server-components-status.d-Cp7zvBm5.d.mts} +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 +82 -71
- package/dist/server.d.mts +12 -11
- package/dist/server.d.ts +12 -11
- package/dist/server.mjs +61 -50
- package/dist/{spa-router.d-BOwuVkMl.d.ts → spa-router.d-Bjgl-Osi.d.ts} +3 -3
- package/dist/{spa-router.d-CDpftSsk.d.mts → spa-router.d-l3G38xHa.d.mts} +3 -3
- package/dist/{ssg.d-BTVqyq8T.d.ts → ssg.d-DDca17Lc.d.ts} +2 -2
- package/dist/{ssg.d-Bx_WFuwg.d.mts → ssg.d-RnlHOqUL.d.mts} +2 -2
- package/dist/store-core.d-BZjuC6Zc.d.mts +309 -0
- package/dist/store-core.d-BaOUOPf7.d.ts +309 -0
- package/dist/testing.cjs +7 -6
- package/dist/testing.d.mts +2 -1
- package/dist/testing.d.ts +2 -1
- package/dist/testing.mjs +6 -5
- package/dist/{utils.d-_dvevm5s.d.ts → utils.d-D8TWmpWo.d.ts} +1 -1
- package/dist/{utils.d-JkrpS-NJ.d.mts → utils.d-tdzw0_zQ.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +43 -37
- package/dist/vite.d.mts +18 -7
- package/dist/vite.d.ts +18 -7
- package/dist/vite.mjs +42 -36
- 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-UJPE75GF.mjs → chunk-J2VUPCCR.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
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// 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_SERVER_TREE_SCRIPT_TYPE = "f/tree";
|
|
6
|
+
var FARM_SLOT_ELEMENT = "f-slot";
|
|
7
|
+
var FARM_TAG = "$";
|
|
8
|
+
var FARM_TAG_VALUE = "v";
|
|
9
|
+
var FARM_REFERENCE_TAG = "r";
|
|
10
|
+
var FARM_SLOT_TAG = "s";
|
|
11
|
+
var FARM_ACTION_TAG = "a";
|
|
12
|
+
var FARM_OBJECT_TAG = "o";
|
|
13
|
+
var FARM_VALUES_HEADER = "F-Values";
|
|
14
|
+
function getFarmTag(value) {
|
|
15
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return void 0;
|
|
16
|
+
const tag = value[FARM_TAG];
|
|
17
|
+
if (typeof tag !== "string") return void 0;
|
|
18
|
+
const keys = Object.keys(value);
|
|
19
|
+
return keys.length === 1 || keys.length === 2 && FARM_TAG_VALUE in value ? tag : void 0;
|
|
20
|
+
}
|
|
21
|
+
var FARM_VALUE_KEY_PATTERN = /^[0-9a-z]{14}$/;
|
|
22
|
+
var FARM_MAX_HELD_VALUES = 128;
|
|
23
|
+
var FARM_ISLAND_VALUE_STORE_KEY = /* @__PURE__ */ Symbol.for("islx.values");
|
|
24
|
+
var ISLAND_VALUES_SERVER_KEY = /* @__PURE__ */ Symbol.for("farm.island-values.server");
|
|
25
|
+
function getFarmIslandValuesServer() {
|
|
26
|
+
return globalThis[ISLAND_VALUES_SERVER_KEY];
|
|
27
|
+
}
|
|
28
|
+
function getValueStore() {
|
|
29
|
+
return globalThis[FARM_ISLAND_VALUE_STORE_KEY];
|
|
30
|
+
}
|
|
31
|
+
function readValueScripts(root) {
|
|
32
|
+
const scripts = /* @__PURE__ */ new Map();
|
|
33
|
+
for (const script of root.querySelectorAll(`script[type="${FARM_VALUE_SCRIPT_TYPE}"]`)) {
|
|
34
|
+
const key = script.getAttribute("name") ?? "";
|
|
35
|
+
if (FARM_VALUE_KEY_PATTERN.test(key) && !scripts.has(key)) scripts.set(key, script);
|
|
36
|
+
}
|
|
37
|
+
return new Map([...scripts].slice(-FARM_MAX_HELD_VALUES));
|
|
38
|
+
}
|
|
39
|
+
function getFarmIslandValueHeaders(root) {
|
|
40
|
+
const held = getValueStore()?.heldHeader() ?? (root ? [...readValueScripts(root).keys()].join(",") || void 0 : void 0);
|
|
41
|
+
return held ? { [FARM_VALUES_HEADER]: held } : {};
|
|
42
|
+
}
|
|
43
|
+
function keepFarmIslandValues(root) {
|
|
44
|
+
const store = getValueStore();
|
|
45
|
+
if (store) {
|
|
46
|
+
store.ingest(root);
|
|
47
|
+
return () => {
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
const held = readValueScripts(root);
|
|
51
|
+
return () => {
|
|
52
|
+
for (const script of root.querySelectorAll(`script[type="${FARM_VALUE_SCRIPT_TYPE}"]`)) {
|
|
53
|
+
held.delete(script.getAttribute("name") ?? "");
|
|
54
|
+
}
|
|
55
|
+
if (held.size === 0) return;
|
|
56
|
+
const trees = root.querySelectorAll(`script[type="${FARM_SERVER_TREE_SCRIPT_TYPE}"]`);
|
|
57
|
+
const tree = trees[trees.length - 1];
|
|
58
|
+
if (tree) return tree.before(...held.values());
|
|
59
|
+
const page = root.querySelector("#__farm_page__");
|
|
60
|
+
(page && page.getAttribute("data-farm-client") !== "true" ? page : document.body).append(
|
|
61
|
+
...held.values()
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export {
|
|
67
|
+
FARM_ISLAND_ELEMENT,
|
|
68
|
+
FARM_PROPS_SCRIPT_TYPE,
|
|
69
|
+
FARM_VALUE_SCRIPT_TYPE,
|
|
70
|
+
FARM_SERVER_TREE_SCRIPT_TYPE,
|
|
71
|
+
FARM_SLOT_ELEMENT,
|
|
72
|
+
FARM_TAG,
|
|
73
|
+
FARM_TAG_VALUE,
|
|
74
|
+
FARM_REFERENCE_TAG,
|
|
75
|
+
FARM_SLOT_TAG,
|
|
76
|
+
FARM_ACTION_TAG,
|
|
77
|
+
FARM_OBJECT_TAG,
|
|
78
|
+
FARM_VALUES_HEADER,
|
|
79
|
+
getFarmTag,
|
|
80
|
+
FARM_VALUE_KEY_PATTERN,
|
|
81
|
+
FARM_MAX_HELD_VALUES,
|
|
82
|
+
getFarmIslandValuesServer,
|
|
83
|
+
getFarmIslandValueHeaders,
|
|
84
|
+
keepFarmIslandValues
|
|
85
|
+
};
|
|
@@ -22,7 +22,7 @@ var _chunkRWR7SMD7cjs = require('./chunk-RWR7SMD7.cjs');
|
|
|
22
22
|
var _chunkY3DO7BIJcjs = require('./chunk-Y3DO7BIJ.cjs');
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkC5QHZ626cjs = require('./chunk-C5QHZ626.cjs');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
var _chunkDBYNZIIQcjs = require('./chunk-DBYNZIIQ.cjs');
|
|
@@ -776,7 +776,7 @@ var SPARouter = class {
|
|
|
776
776
|
...activeLayoutChain ? { "X-Farm-Layout-Chain": activeLayoutChain } : {},
|
|
777
777
|
...interceptFrom ? { "X-Farm-Intercept-From": interceptFrom } : {},
|
|
778
778
|
// Islands mode: the server leaves out island values this browser holds.
|
|
779
|
-
...
|
|
779
|
+
..._chunkC5QHZ626cjs.getFarmIslandValueHeaders.call(void 0, )
|
|
780
780
|
})
|
|
781
781
|
});
|
|
782
782
|
if (_chunkNLBHLPEOcjs.isFarmDeploymentMismatchResponse.call(void 0, response, this.options.deploymentId)) {
|
|
@@ -322,10 +322,9 @@ var PluginManager = class {
|
|
|
322
322
|
this.runtimeEndpoints = endpoints;
|
|
323
323
|
return endpoints;
|
|
324
324
|
}
|
|
325
|
-
|
|
325
|
+
matchRuntimeEndpoint(requestPathname) {
|
|
326
326
|
const endpoints = this.getRuntimeEndpoints();
|
|
327
327
|
if (endpoints.length === 0) return void 0;
|
|
328
|
-
const requestPathname = new URL(request.url).pathname;
|
|
329
328
|
const basePath = _chunkD22BUQKWcjs.normalizeFarmBasePath.call(void 0, this.context.config.basePath);
|
|
330
329
|
if (basePath && requestPathname !== basePath && !requestPathname.startsWith(`${basePath}/`)) {
|
|
331
330
|
return void 0;
|
|
@@ -333,7 +332,15 @@ var PluginManager = class {
|
|
|
333
332
|
const pathname = _chunk47JV57DAcjs.normalizeRuntimeEndpointRequestPath.call(void 0,
|
|
334
333
|
_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, basePath)
|
|
335
334
|
);
|
|
336
|
-
|
|
335
|
+
return endpoints.find((entry) => entry.path === pathname);
|
|
336
|
+
}
|
|
337
|
+
/** @internal Whether a plugin runtime endpoint answers this request path (with the base path). */
|
|
338
|
+
_hasRuntimeEndpoint(requestPathname) {
|
|
339
|
+
return this.matchRuntimeEndpoint(requestPathname) !== void 0;
|
|
340
|
+
}
|
|
341
|
+
async runRuntimeEndpoint(request, options, waitUntil, onMatch) {
|
|
342
|
+
const requestPathname = new URL(request.url).pathname;
|
|
343
|
+
const match = this.matchRuntimeEndpoint(requestPathname);
|
|
337
344
|
if (!match) return void 0;
|
|
338
345
|
const endpointOptions = {
|
|
339
346
|
...options,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkS7WZUK3Bcjs = require('./chunk-S7WZUK3B.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkA4WWKG2Bcjs = require('./chunk-A4WWKG2B.cjs');
|
|
@@ -26,10 +26,10 @@ var _chunkAQIRXBBYcjs = require('./chunk-AQIRXBBY.cjs');
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunk26WP75W5cjs = require('./chunk-26WP75W5.cjs');
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
var _chunkGBMWLDCCcjs = require('./chunk-GBMWLDCC.cjs');
|
|
@@ -424,7 +424,7 @@ async function collectSSGPages(routes, loadModule, options = {}) {
|
|
|
424
424
|
continue;
|
|
425
425
|
}
|
|
426
426
|
const source = await _promises.readFile.call(void 0, route.filePath, "utf8").catch(() => void 0);
|
|
427
|
-
if (_optionalChain([options, 'access', _41 => _41.docsAdapterRoutes, 'optionalAccess', _42 => _42.owns, 'call', _43 => _43(route.path)]) &&
|
|
427
|
+
if (_optionalChain([options, 'access', _41 => _41.docsAdapterRoutes, 'optionalAccess', _42 => _42.owns, 'call', _43 => _43(route.path)]) && _chunk26WP75W5cjs.isFarmMarkdownPageFile.call(void 0, route.filePath)) {
|
|
428
428
|
ssrRoutes.push(route.path);
|
|
429
429
|
if (options.suggestStaticRendering !== false && analyzeStaticRouteCandidate(null, source, { isDynamic: route.isDynamic }).candidate) {
|
|
430
430
|
staticCandidateDocsPages += 1;
|
|
@@ -796,8 +796,8 @@ async function generateFarmTypeArtifacts(options) {
|
|
|
796
796
|
const shouldGenerateEnv = options.env !== false;
|
|
797
797
|
const shouldGenerateImages = options.images !== false;
|
|
798
798
|
const shouldGenerateI18n = options.i18n !== false && _optionalChain([options, 'access', _51 => _51.i18nConfig, 'optionalAccess', _52 => _52.enabled]);
|
|
799
|
-
const sourceRoots =
|
|
800
|
-
const appDirs =
|
|
799
|
+
const sourceRoots = _chunk52Q4OB4Acjs.getFarmSourceRoots.call(void 0, { root, srcDir, layers: options.layers });
|
|
800
|
+
const appDirs = _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, { root, srcDir, layers: options.layers });
|
|
801
801
|
const result = {
|
|
802
802
|
apiRoutes: [],
|
|
803
803
|
stalePaths: []
|
|
@@ -814,7 +814,7 @@ async function generateFarmTypeArtifacts(options) {
|
|
|
814
814
|
componentExtensions: options.componentExtensions,
|
|
815
815
|
sourceRoots
|
|
816
816
|
};
|
|
817
|
-
unifiedSections.push(await
|
|
817
|
+
unifiedSections.push(await _chunkS7WZUK3Bcjs.createRouteTypeDeclarations.call(void 0, routeOptions, unifiedTypesPath));
|
|
818
818
|
result.routeTypesPath = unifiedTypesPath;
|
|
819
819
|
} else if (shouldGenerateRoutes) {
|
|
820
820
|
const routeOptions = {
|
|
@@ -828,11 +828,11 @@ async function generateFarmTypeArtifacts(options) {
|
|
|
828
828
|
};
|
|
829
829
|
if (options.check) {
|
|
830
830
|
const routeTypesPath = resolveGeneratedPath(root, srcDir, options.routeTypesOutFile);
|
|
831
|
-
const content = await
|
|
831
|
+
const content = await _chunkS7WZUK3Bcjs.createRouteTypeDeclarations.call(void 0, routeOptions, routeTypesPath);
|
|
832
832
|
checkGeneratedFile(routeTypesPath, content, result.stalePaths);
|
|
833
833
|
result.routeTypesPath = routeTypesPath;
|
|
834
834
|
} else {
|
|
835
|
-
result.routeTypesPath = await
|
|
835
|
+
result.routeTypesPath = await _chunkS7WZUK3Bcjs.generateRouteTypes.call(void 0, routeOptions);
|
|
836
836
|
}
|
|
837
837
|
}
|
|
838
838
|
if (shouldGenerateApi) {
|
|
@@ -993,7 +993,7 @@ function createStorageMountDeclarations(options, outPath) {
|
|
|
993
993
|
const storage = options.storage;
|
|
994
994
|
if (!storage || !("mounts" in storage) || !Object.values(_nullishCoalesce(storage.mounts, () => ( {}))).some(_chunkXRRHPBG2cjs.isManagedMount))
|
|
995
995
|
return;
|
|
996
|
-
const project =
|
|
996
|
+
const project = _chunk52Q4OB4Acjs.findFarmConfigFile.call(void 0,
|
|
997
997
|
options.root,
|
|
998
998
|
options.configPath && _path.resolve.call(void 0, options.root, options.configPath)
|
|
999
999
|
);
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
notifyHistoryChange,
|
|
8
8
|
readPageState,
|
|
9
9
|
subscribeHistoryChange
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PO5MZIWK.mjs";
|
|
11
11
|
import {
|
|
12
12
|
hasFarmNavigationDelegates,
|
|
13
13
|
runFarmNavigationDelegates
|
|
@@ -15,9 +15,6 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
getFarmI18nClientState
|
|
17
17
|
} from "./chunk-FLMALEY2.mjs";
|
|
18
|
-
import {
|
|
19
|
-
_peekCurrentRequest
|
|
20
|
-
} from "./chunk-VIXTAVEA.mjs";
|
|
21
18
|
import {
|
|
22
19
|
stripFarmLocaleFromPathname
|
|
23
20
|
} from "./chunk-4QBFYEDC.mjs";
|
|
@@ -27,6 +24,9 @@ import {
|
|
|
27
24
|
normalizeFarmBasePath,
|
|
28
25
|
stripFarmBasePath
|
|
29
26
|
} from "./chunk-SF3JB56B.mjs";
|
|
27
|
+
import {
|
|
28
|
+
_peekCurrentRequest
|
|
29
|
+
} from "./chunk-VIXTAVEA.mjs";
|
|
30
30
|
|
|
31
31
|
// src/client/router.ts
|
|
32
32
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunkKORZ6PREcjs = require('./chunk-KORZ6PRE.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _chunk4DCWVSL2cjs = require('./chunk-4DCWVSL2.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
var _chunk7Q7UB4TLcjs = require('./chunk-7Q7UB4TL.cjs');
|
|
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
|
+
if (!value || typeof value !== "object") return false;
|
|
36
|
+
if (value instanceof ArrayBuffer || ArrayBuffer.isView(value)) return false;
|
|
37
|
+
return isReactElement(value) || _optionalChain([renderer, 'optionalAccess', _2 => _2.isValidElement, 'call', _3 => _3(value)]) === true;
|
|
38
|
+
}
|
|
39
|
+
function rendersWithAppRenderer(value, renderer) {
|
|
40
|
+
if (!_optionalChain([renderer, 'optionalAccess', _4 => _4.isValidElement, 'call', _5 => _5(value)])) return false;
|
|
41
|
+
return !isReactElement(value) || !renderer.isValidElement({});
|
|
42
|
+
}
|
|
43
|
+
async function prepareMetadataImageNode(node) {
|
|
44
|
+
if (isThenable(node)) {
|
|
45
|
+
return prepareMetadataImageNode(await node);
|
|
46
|
+
}
|
|
47
|
+
if (Array.isArray(node)) {
|
|
48
|
+
return Promise.all(node.map((child) => prepareMetadataImageNode(child)));
|
|
49
|
+
}
|
|
50
|
+
if (!isReactElement(node)) {
|
|
51
|
+
return node;
|
|
52
|
+
}
|
|
53
|
+
const element = node;
|
|
54
|
+
const type = element.type;
|
|
55
|
+
const props = element.props || {};
|
|
56
|
+
if (typeof type === "function") {
|
|
57
|
+
if (_optionalChain([type, 'access', _6 => _6.prototype, 'optionalAccess', _7 => _7.isReactComponent])) {
|
|
58
|
+
throw new Error(
|
|
59
|
+
"Metadata image components must be stateless function components; React class components are not supported."
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
return prepareMetadataImageNode(await type(props));
|
|
63
|
+
}
|
|
64
|
+
const { createElement } = await import("react");
|
|
65
|
+
if (type && typeof type === "object") {
|
|
66
|
+
if (type.$$typeof === REACT_MEMO_TYPE) {
|
|
67
|
+
return prepareMetadataImageNode(createElement(type.type, props));
|
|
68
|
+
}
|
|
69
|
+
if (type.$$typeof === REACT_FORWARD_REF_TYPE) {
|
|
70
|
+
return prepareMetadataImageNode(await type.render(props, null));
|
|
71
|
+
}
|
|
72
|
+
if (type.$$typeof === REACT_LAZY_TYPE) {
|
|
73
|
+
let resolvedType;
|
|
74
|
+
try {
|
|
75
|
+
resolvedType = type._init(type._payload);
|
|
76
|
+
} catch (suspension) {
|
|
77
|
+
if (suspension && typeof suspension.then === "function") {
|
|
78
|
+
await suspension;
|
|
79
|
+
resolvedType = type._init(type._payload);
|
|
80
|
+
} else {
|
|
81
|
+
throw suspension;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return prepareMetadataImageNode(createElement(resolvedType, props));
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
const preparedChildren = await prepareMetadataImageNode(props.children);
|
|
88
|
+
const preparedProps = { ...props };
|
|
89
|
+
if (typeof preparedProps.className === "string") {
|
|
90
|
+
preparedProps.tw = [preparedProps.tw, preparedProps.className].filter(Boolean).join(" ");
|
|
91
|
+
delete preparedProps.className;
|
|
92
|
+
}
|
|
93
|
+
delete preparedProps.children;
|
|
94
|
+
return createElement(type, {
|
|
95
|
+
...preparedProps,
|
|
96
|
+
key: element.key,
|
|
97
|
+
children: preparedChildren
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
var VOID_ELEMENTS = /* @__PURE__ */ new Set([
|
|
101
|
+
"area",
|
|
102
|
+
"base",
|
|
103
|
+
"br",
|
|
104
|
+
"col",
|
|
105
|
+
"embed",
|
|
106
|
+
"hr",
|
|
107
|
+
"img",
|
|
108
|
+
"input",
|
|
109
|
+
"link",
|
|
110
|
+
"meta",
|
|
111
|
+
"source",
|
|
112
|
+
"track",
|
|
113
|
+
"wbr"
|
|
114
|
+
]);
|
|
115
|
+
var RAW_TEXT_ELEMENTS = /* @__PURE__ */ new Set(["script", "style", "template"]);
|
|
116
|
+
var MARKUP_ATTRIBUTE = /\s*([^\s"'<>/=]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/y;
|
|
117
|
+
var MARKUP_ENTITY = /&(#[0-9]+|#x[0-9a-f]+|amp|lt|gt|quot|apos|nbsp);/gi;
|
|
118
|
+
var NAMED_ENTITIES = {
|
|
119
|
+
amp: "&",
|
|
120
|
+
lt: "<",
|
|
121
|
+
gt: ">",
|
|
122
|
+
quot: '"',
|
|
123
|
+
apos: "'",
|
|
124
|
+
nbsp: "\xA0"
|
|
125
|
+
};
|
|
126
|
+
var NUMERIC_VALUE = /^-?(?:\d+|\d*\.\d+)$/;
|
|
127
|
+
function decodeMarkupEntities(value) {
|
|
128
|
+
return value.replace(MARKUP_ENTITY, (entity, name) => {
|
|
129
|
+
if (name[0] !== "#") return _nullishCoalesce(NAMED_ENTITIES[name.toLowerCase()], () => ( entity));
|
|
130
|
+
const code = name[1] === "x" || name[1] === "X" ? Number.parseInt(name.slice(2), 16) : Number.parseInt(name.slice(1), 10);
|
|
131
|
+
return Number.isFinite(code) && code <= 1114111 ? String.fromCodePoint(code) : entity;
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
function splitStyleDeclarations(css) {
|
|
135
|
+
const declarations = [];
|
|
136
|
+
let depth = 0;
|
|
137
|
+
let quote = "";
|
|
138
|
+
let start = 0;
|
|
139
|
+
for (let index = 0; index < css.length; index++) {
|
|
140
|
+
const char = css[index];
|
|
141
|
+
if (quote) {
|
|
142
|
+
if (char === "\\") index++;
|
|
143
|
+
else if (char === quote) quote = "";
|
|
144
|
+
} else if (char === '"' || char === "'") quote = char;
|
|
145
|
+
else if (char === "(") depth++;
|
|
146
|
+
else if (char === ")") depth = Math.max(0, depth - 1);
|
|
147
|
+
else if (char === ";" && depth === 0) {
|
|
148
|
+
declarations.push(css.slice(start, index));
|
|
149
|
+
start = index + 1;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
declarations.push(css.slice(start));
|
|
153
|
+
return declarations;
|
|
154
|
+
}
|
|
155
|
+
function parseInlineStyle(css) {
|
|
156
|
+
const style = {};
|
|
157
|
+
for (const declaration of splitStyleDeclarations(css)) {
|
|
158
|
+
const colon = declaration.indexOf(":");
|
|
159
|
+
if (colon === -1) continue;
|
|
160
|
+
const property = declaration.slice(0, colon).trim();
|
|
161
|
+
const value = declaration.slice(colon + 1).replace(/!important\s*$/i, "").trim();
|
|
162
|
+
if (!property || !value) continue;
|
|
163
|
+
const name = property.startsWith("--") ? property : property.toLowerCase().replace(/^-ms-/, "ms-").replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
164
|
+
style[name] = NUMERIC_VALUE.test(value) ? Number(value) : value;
|
|
165
|
+
}
|
|
166
|
+
return style;
|
|
167
|
+
}
|
|
168
|
+
function toMarkupProps(attributes) {
|
|
169
|
+
const props = {};
|
|
170
|
+
for (const [name, value] of Object.entries(attributes)) {
|
|
171
|
+
if (name === "style") props.style = parseInlineStyle(value);
|
|
172
|
+
else if (name === "class") props.tw = [attributes.tw, value].filter(Boolean).join(" ");
|
|
173
|
+
else if ((name === "width" || name === "height") && NUMERIC_VALUE.test(value)) {
|
|
174
|
+
props[name] = Number(value);
|
|
175
|
+
} else if (name !== "tw" || !("class" in attributes)) props[name] = value;
|
|
176
|
+
}
|
|
177
|
+
return props;
|
|
178
|
+
}
|
|
179
|
+
function readMetadataImageMarkup(markup) {
|
|
180
|
+
const root = { type: "", props: {}, children: [] };
|
|
181
|
+
const open = [root];
|
|
182
|
+
const appendText = (text) => {
|
|
183
|
+
if (!text) return;
|
|
184
|
+
const { children } = open[open.length - 1];
|
|
185
|
+
const last = children.length - 1;
|
|
186
|
+
if (typeof children[last] === "string") children[last] += decodeMarkupEntities(text);
|
|
187
|
+
else children.push(decodeMarkupEntities(text));
|
|
188
|
+
};
|
|
189
|
+
let index = 0;
|
|
190
|
+
while (index < markup.length) {
|
|
191
|
+
const tagStart = markup.indexOf("<", index);
|
|
192
|
+
if (tagStart === -1) {
|
|
193
|
+
appendText(markup.slice(index));
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
appendText(markup.slice(index, tagStart));
|
|
197
|
+
if (markup.startsWith("<!--", tagStart)) {
|
|
198
|
+
const end = markup.indexOf("-->", tagStart + 4);
|
|
199
|
+
index = end === -1 ? markup.length : end + 3;
|
|
200
|
+
continue;
|
|
201
|
+
}
|
|
202
|
+
if (markup[tagStart + 1] === "!" || markup[tagStart + 1] === "?") {
|
|
203
|
+
const end = markup.indexOf(">", tagStart);
|
|
204
|
+
index = end === -1 ? markup.length : end + 1;
|
|
205
|
+
continue;
|
|
206
|
+
}
|
|
207
|
+
if (markup[tagStart + 1] === "/") {
|
|
208
|
+
const end = markup.indexOf(">", tagStart);
|
|
209
|
+
const name2 = markup.slice(tagStart + 2, end === -1 ? void 0 : end).trim().toLowerCase();
|
|
210
|
+
for (let depth = open.length - 1; depth > 0; depth--) {
|
|
211
|
+
if (open[depth].type.toLowerCase() !== name2) continue;
|
|
212
|
+
open.length = depth;
|
|
213
|
+
break;
|
|
214
|
+
}
|
|
215
|
+
index = end === -1 ? markup.length : end + 1;
|
|
216
|
+
continue;
|
|
217
|
+
}
|
|
218
|
+
const name = _optionalChain([/^[a-zA-Z][^\s/>]*/, 'access', _8 => _8.exec, 'call', _9 => _9(markup.slice(tagStart + 1)), 'optionalAccess', _10 => _10[0]]);
|
|
219
|
+
if (!name) {
|
|
220
|
+
appendText("<");
|
|
221
|
+
index = tagStart + 1;
|
|
222
|
+
continue;
|
|
223
|
+
}
|
|
224
|
+
const attributes = {};
|
|
225
|
+
let cursor = tagStart + 1 + name.length;
|
|
226
|
+
MARKUP_ATTRIBUTE.lastIndex = cursor;
|
|
227
|
+
for (let match = MARKUP_ATTRIBUTE.exec(markup); match; match = MARKUP_ATTRIBUTE.exec(markup)) {
|
|
228
|
+
attributes[match[1]] = decodeMarkupEntities(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(match[2], () => ( match[3])), () => ( match[4])), () => ( "")));
|
|
229
|
+
cursor = MARKUP_ATTRIBUTE.lastIndex;
|
|
230
|
+
}
|
|
231
|
+
const tagEnd = markup.indexOf(">", cursor);
|
|
232
|
+
const selfClosing = markup.slice(cursor, tagEnd).trim() === "/";
|
|
233
|
+
index = tagEnd === -1 ? markup.length : tagEnd + 1;
|
|
234
|
+
const lowered = name.toLowerCase();
|
|
235
|
+
if (RAW_TEXT_ELEMENTS.has(lowered)) {
|
|
236
|
+
const close = markup.toLowerCase().indexOf(`</${lowered}`, index);
|
|
237
|
+
const closeEnd = close === -1 ? -1 : markup.indexOf(">", close);
|
|
238
|
+
index = closeEnd === -1 ? markup.length : closeEnd + 1;
|
|
239
|
+
continue;
|
|
240
|
+
}
|
|
241
|
+
const element = {
|
|
242
|
+
type: name,
|
|
243
|
+
props: toMarkupProps(attributes),
|
|
244
|
+
children: []
|
|
245
|
+
};
|
|
246
|
+
open[open.length - 1].children.push(element);
|
|
247
|
+
if (!selfClosing && !VOID_ELEMENTS.has(lowered)) open.push(element);
|
|
248
|
+
}
|
|
249
|
+
const toNode = (element) => {
|
|
250
|
+
const hasElements = element.children.some((child) => typeof child !== "string");
|
|
251
|
+
const children = element.children.filter((child) => !hasElements || typeof child !== "string" || child.trim() !== "").map(
|
|
252
|
+
(child) => typeof child === "string" ? child : toNode(child)
|
|
253
|
+
);
|
|
254
|
+
const props = { ...element.props };
|
|
255
|
+
if (children.length === 1) props.children = children[0];
|
|
256
|
+
else if (children.length > 1) props.children = children;
|
|
257
|
+
return { type: element.type, props };
|
|
258
|
+
};
|
|
259
|
+
const rootElements = root.children.filter(
|
|
260
|
+
(child) => typeof child !== "string"
|
|
261
|
+
);
|
|
262
|
+
const rootText = root.children.some((child) => typeof child === "string" && child.trim() !== "");
|
|
263
|
+
if (rootElements.length !== 1 || rootText) {
|
|
264
|
+
throw new Error(
|
|
265
|
+
`A metadata image must render one root element, but the app renderer rendered ${rootElements.length} elements${rootText ? " and text" : ""} at the top level. Wrap the image in a single element.`
|
|
266
|
+
);
|
|
267
|
+
}
|
|
268
|
+
return toNode(rootElements[0]);
|
|
269
|
+
}
|
|
270
|
+
async function normalizeFonts(fonts) {
|
|
271
|
+
if (!_optionalChain([fonts, 'optionalAccess', _11 => _11.length])) return void 0;
|
|
272
|
+
return Promise.all(
|
|
273
|
+
fonts.map(async (font) => {
|
|
274
|
+
const data = await font.data;
|
|
275
|
+
const arrayBuffer = ArrayBuffer.isView(data) ? toArrayBuffer(data) : data;
|
|
276
|
+
return { ...font, data: arrayBuffer };
|
|
277
|
+
})
|
|
278
|
+
);
|
|
279
|
+
}
|
|
280
|
+
function resolveCacheControl(revalidate) {
|
|
281
|
+
if (revalidate === false) {
|
|
282
|
+
return "public, max-age=31536000, immutable";
|
|
283
|
+
}
|
|
284
|
+
if (typeof revalidate === "number" && Number.isFinite(revalidate) && revalidate > 0) {
|
|
285
|
+
return `public, s-maxage=${Math.floor(revalidate)}, stale-while-revalidate=300`;
|
|
286
|
+
}
|
|
287
|
+
return "public, max-age=0, must-revalidate";
|
|
288
|
+
}
|
|
289
|
+
function toArrayBuffer(value) {
|
|
290
|
+
if (value instanceof ArrayBuffer) return value;
|
|
291
|
+
const bytes = new Uint8Array(value.byteLength);
|
|
292
|
+
bytes.set(new Uint8Array(value.buffer, value.byteOffset, value.byteLength));
|
|
293
|
+
return bytes.buffer;
|
|
294
|
+
}
|
|
295
|
+
async function createEntityTag(body) {
|
|
296
|
+
const digest = await globalThis.crypto.subtle.digest("SHA-256", body);
|
|
297
|
+
const hash = Array.from(new Uint8Array(digest), (byte) => byte.toString(16).padStart(2, "0")).join("").slice(0, 32);
|
|
298
|
+
return `"${hash}"`;
|
|
299
|
+
}
|
|
300
|
+
async function finalizeMetadataImageResponse(body, headers, options) {
|
|
301
|
+
const responseHeaders = new Headers(headers);
|
|
302
|
+
const etag = await createEntityTag(body);
|
|
303
|
+
responseHeaders.set("ETag", etag);
|
|
304
|
+
responseHeaders.set("Content-Length", String(body.byteLength));
|
|
305
|
+
responseHeaders.set("X-Content-Type-Options", "nosniff");
|
|
306
|
+
if (_chunk7Q7UB4TLcjs.matchesFarmIfNoneMatch.call(void 0, options.ifNoneMatch, etag)) {
|
|
307
|
+
return new Response(null, { status: 304, headers: responseHeaders });
|
|
308
|
+
}
|
|
309
|
+
return new Response(_optionalChain([options, 'access', _12 => _12.method, 'optionalAccess', _13 => _13.toUpperCase, 'call', _14 => _14()]) === "HEAD" ? null : body, {
|
|
310
|
+
status: 200,
|
|
311
|
+
headers: responseHeaders
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
async function loadVercelOg() {
|
|
315
|
+
try {
|
|
316
|
+
return await import("@vercel/og");
|
|
317
|
+
} catch (error) {
|
|
318
|
+
if (!_chunkKORZ6PREcjs.isMissingPackageError.call(void 0, error, "@vercel/og")) throw error;
|
|
319
|
+
throw _chunkKORZ6PREcjs.withOptionalPeerCause.call(void 0,
|
|
320
|
+
new Error(
|
|
321
|
+
`Rendering a metadata image from JSX needs @vercel/og, which is not installed. ${_chunkKORZ6PREcjs.VERCEL_OG_INSTALL_HINT}`
|
|
322
|
+
),
|
|
323
|
+
error
|
|
324
|
+
);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
async function createFarmMetadataImageResponse(value, imageModule, options = {}) {
|
|
328
|
+
const method = (options.method || "GET").toUpperCase();
|
|
329
|
+
if (method !== "GET" && method !== "HEAD") {
|
|
330
|
+
return new Response(null, { status: 405, headers: { Allow: "GET, HEAD" } });
|
|
331
|
+
}
|
|
332
|
+
if (isResponse(value)) {
|
|
333
|
+
return method === "HEAD" ? _chunk4DCWVSL2cjs.omitFarmResponseBody.call(void 0, value) : value;
|
|
334
|
+
}
|
|
335
|
+
const cacheControl = resolveCacheControl(imageModule.revalidate);
|
|
336
|
+
const explicitContentType = _optionalChain([imageModule, 'access', _15 => _15.contentType, 'optionalAccess', _16 => _16.split, 'call', _17 => _17(";", 1), 'access', _18 => _18[0], 'optionalAccess', _19 => _19.trim, 'call', _20 => _20(), 'access', _21 => _21.toLowerCase, 'call', _22 => _22()]);
|
|
337
|
+
const { renderer } = options;
|
|
338
|
+
const isElement = isMetadataImageElement(value, renderer);
|
|
339
|
+
if (isElement && explicitContentType !== "image/svg+xml") {
|
|
340
|
+
const { ImageResponse } = await loadVercelOg();
|
|
341
|
+
const element = rendersWithAppRenderer(value, renderer) ? readMetadataImageMarkup(await renderer.renderToString(value)) : await prepareMetadataImageNode(value);
|
|
342
|
+
const response = new ImageResponse(element, {
|
|
343
|
+
width: _optionalChain([imageModule, 'access', _23 => _23.size, 'optionalAccess', _24 => _24.width]) || 1200,
|
|
344
|
+
height: _optionalChain([imageModule, 'access', _25 => _25.size, 'optionalAccess', _26 => _26.height]) || 630,
|
|
345
|
+
fonts: await normalizeFonts(imageModule.fonts),
|
|
346
|
+
emoji: imageModule.emoji,
|
|
347
|
+
debug: imageModule.debug,
|
|
348
|
+
headers: { "cache-control": cacheControl }
|
|
349
|
+
});
|
|
350
|
+
const headers = new Headers(response.headers);
|
|
351
|
+
headers.set("Cache-Control", cacheControl);
|
|
352
|
+
return finalizeMetadataImageResponse(await response.arrayBuffer(), headers, options);
|
|
353
|
+
}
|
|
354
|
+
let body;
|
|
355
|
+
if (typeof value === "string") {
|
|
356
|
+
body = toArrayBuffer(new TextEncoder().encode(value));
|
|
357
|
+
} else if (value instanceof ArrayBuffer || ArrayBuffer.isView(value)) {
|
|
358
|
+
body = toArrayBuffer(value);
|
|
359
|
+
} else if (isElement) {
|
|
360
|
+
const markup = rendersWithAppRenderer(value, renderer) ? await renderer.renderToString(value) : (await import("react-dom/server")).renderToStaticMarkup(value);
|
|
361
|
+
body = toArrayBuffer(new TextEncoder().encode(markup));
|
|
362
|
+
} else {
|
|
363
|
+
throw new Error(
|
|
364
|
+
"Metadata image must return a Response, string, bytes, or an element: JSX, or one the app renderer created."
|
|
365
|
+
);
|
|
366
|
+
}
|
|
367
|
+
return finalizeMetadataImageResponse(
|
|
368
|
+
body,
|
|
369
|
+
{
|
|
370
|
+
"Content-Type": imageModule.contentType || "image/svg+xml; charset=utf-8",
|
|
371
|
+
"Cache-Control": cacheControl
|
|
372
|
+
},
|
|
373
|
+
options
|
|
374
|
+
);
|
|
375
|
+
}
|
|
376
|
+
async function resolveFarmMetadataImageValue(imageModule, props, options = {}) {
|
|
377
|
+
const image = imageModule.default;
|
|
378
|
+
if (options.component && options.renderer) return options.renderer.createElement(image, props);
|
|
379
|
+
return typeof image === "function" ? await image(props) : image;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
exports.createFarmMetadataImageResponse = createFarmMetadataImageResponse; exports.resolveFarmMetadataImageValue = resolveFarmMetadataImageValue;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJYQ6DGPWcjs = require('./chunk-JYQ6DGPW.cjs');
|
|
4
4
|
|
|
5
5
|
// src/api/mount.ts
|
|
6
6
|
function mountFetchHandler(app, options = {}) {
|
|
@@ -9,7 +9,7 @@ function mountFetchHandler(app, options = {}) {
|
|
|
9
9
|
options.stripMountPath ? await stripMountPath(request, await _optionalChain([context, 'optionalAccess', _ => _.params])) : request
|
|
10
10
|
);
|
|
11
11
|
return Object.fromEntries(
|
|
12
|
-
|
|
12
|
+
_chunkJYQ6DGPWcjs.API_ROUTE_METHODS.map((method) => [method, handle])
|
|
13
13
|
);
|
|
14
14
|
}
|
|
15
15
|
async function stripMountPath(request, params) {
|