@farm.js/core 0.1.16 → 0.1.18
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/after.cjs +12 -225
- package/dist/agent-runtime.cjs +83 -2800
- package/dist/agent-runtime.d.mts +3 -3
- package/dist/agent-runtime.d.ts +3 -3
- package/dist/api/client.cjs +17 -4026
- package/dist/api/client.d.mts +3 -3
- package/dist/api/client.d.ts +3 -3
- package/dist/api/client.mjs +3 -3
- package/dist/api/route-manager.cjs +34 -4317
- package/dist/api/route-manager.d.mts +3 -3
- package/dist/api/route-manager.d.ts +3 -3
- package/dist/api/route-manager.mjs +5 -5
- package/dist/api/runtime.cjs +29 -2660
- package/dist/api/runtime.d.mts +3 -3
- package/dist/api/runtime.d.ts +3 -3
- package/dist/api/runtime.mjs +6 -3
- package/dist/{api-client-B-n3pm_Q.d.mts → api-client-Cx54IR5g.d.mts} +2 -2
- package/dist/{api-client-C0_NZEBl.d.ts → api-client-DykpaKcY.d.ts} +2 -2
- package/dist/api.cjs +88 -8361
- package/dist/api.d.mts +5 -5
- package/dist/api.d.ts +5 -5
- package/dist/api.mjs +8 -8
- package/dist/{app-AyjEsCBq.d.ts → app-BHY_10Lm.d.ts} +3 -3
- package/dist/{app-CYPHeOo_.d.mts → app-BMk0do23.d.mts} +3 -3
- package/dist/app-markdown.cjs +39 -280
- package/dist/app-markdown.d.mts +4 -4
- package/dist/app-markdown.d.ts +4 -4
- package/dist/app-markdown.mjs +3 -3
- package/dist/cache.cjs +38 -1526
- package/dist/cache.d.mts +11 -1
- package/dist/cache.d.ts +11 -1
- package/dist/cache.mjs +1 -1
- package/dist/chunk-22GUSVNJ.cjs +351 -0
- package/dist/chunk-2CQ74SP6.cjs +13 -0
- package/dist/chunk-2SJ4RQ6P.cjs +57 -0
- package/dist/chunk-3376ZTRC.cjs +1 -0
- package/dist/{chunk-IL5RWYK7.mjs → chunk-3XG26Z3J.mjs} +1 -1
- package/dist/{chunk-7HDZYYS4.mjs → chunk-4OOBRCJX.mjs} +27 -5
- package/dist/chunk-4PNUXIVU.cjs +472 -0
- package/dist/chunk-4PPEPOZZ.cjs +21 -0
- package/dist/chunk-4ZFL5GFN.cjs +520 -0
- package/dist/{chunk-B76DT5Y6.mjs → chunk-57J3Y7Y3.mjs} +1 -1
- package/dist/chunk-5OVTOKGH.cjs +65 -0
- package/dist/chunk-5QIKR7RR.cjs +224 -0
- package/dist/{chunk-MOQNHLTS.mjs → chunk-5QOEPUYE.mjs} +5 -2
- package/dist/{chunk-HKLRP3BN.mjs → chunk-5SPPCN5J.mjs} +1 -1
- package/dist/chunk-5ZSWG4UX.cjs +127 -0
- package/dist/chunk-62YJ2IEB.cjs +238 -0
- package/dist/chunk-6EODJYCX.cjs +183 -0
- package/dist/chunk-6EXBPJ24.cjs +434 -0
- package/dist/chunk-6QQDAAAZ.cjs +38 -0
- package/dist/chunk-6V4TDWEC.cjs +455 -0
- package/dist/{chunk-LUC2FAGW.mjs → chunk-6VQIKZZO.mjs} +1 -1
- package/dist/chunk-72ADZ6GQ.cjs +19 -0
- package/dist/chunk-75BRBIFP.cjs +172 -0
- package/dist/{chunk-7ZWL7XOU.mjs → chunk-76DG3LF3.mjs} +1 -1
- package/dist/chunk-7W3CPVXS.cjs +24 -0
- package/dist/chunk-A6WIQH5Z.cjs +31 -0
- package/dist/{chunk-EWDK36MM.mjs → chunk-A72YEUZ3.mjs} +1 -1
- package/dist/chunk-AFOD3LYZ.cjs +377 -0
- package/dist/chunk-AMDMVWMI.cjs +39 -0
- package/dist/chunk-AORPIPNB.cjs +552 -0
- package/dist/chunk-ARJWXNQL.cjs +256 -0
- package/dist/{chunk-ZHOIQC6U.mjs → chunk-ATERBVHQ.mjs} +2 -2
- package/dist/chunk-AWRISO2H.cjs +2199 -0
- package/dist/chunk-AYJR42WX.cjs +711 -0
- package/dist/chunk-B4CH33IG.cjs +644 -0
- package/dist/chunk-BIDYX3SL.cjs +91 -0
- package/dist/chunk-BSTRERPP.cjs +40 -0
- package/dist/chunk-BYODCJD6.cjs +663 -0
- package/dist/chunk-C3VRMB6H.cjs +85 -0
- package/dist/chunk-C5GUTBZK.cjs +173 -0
- package/dist/chunk-CIAGU2X4.cjs +337 -0
- package/dist/chunk-CMGMGHUZ.cjs +27 -0
- package/dist/chunk-CXP5U3RW.cjs +54 -0
- package/dist/chunk-D2ULAULS.cjs +166 -0
- package/dist/chunk-D7JTOLFK.cjs +285 -0
- package/dist/chunk-DVM4FKZL.cjs +169 -0
- package/dist/chunk-DYEJQTDN.cjs +49 -0
- package/dist/chunk-E2BMSZ2W.cjs +151 -0
- package/dist/chunk-E3UK5IIB.cjs +593 -0
- package/dist/chunk-EM6SBQKM.cjs +470 -0
- package/dist/{chunk-27JNCYEK.mjs → chunk-EN7WTEAY.mjs} +2 -2
- package/dist/{chunk-IGO2HEV7.mjs → chunk-F6SJAKFJ.mjs} +62 -28
- package/dist/{chunk-GSDIZACQ.mjs → chunk-FG5H2VCJ.mjs} +2 -2
- package/dist/chunk-FJSWYIR7.cjs +482 -0
- package/dist/chunk-FK6GO24V.cjs +54 -0
- package/dist/chunk-FXUUWYAX.cjs +654 -0
- package/dist/chunk-G3HRIVEY.cjs +395 -0
- package/dist/chunk-G643DQCH.cjs +13 -0
- package/dist/chunk-G7HXGLEC.cjs +175 -0
- package/dist/chunk-GDSHDTJ4.cjs +152 -0
- package/dist/chunk-GNEO2XOF.cjs +2040 -0
- package/dist/{chunk-NHHKW2T6.mjs → chunk-GYKJCFTS.mjs} +170 -52
- package/dist/chunk-H6G5INWM.cjs +1094 -0
- package/dist/chunk-HBTUGXHS.cjs +180 -0
- package/dist/chunk-HREOKQWT.cjs +45 -0
- package/dist/chunk-I4J452B7.cjs +435 -0
- package/dist/chunk-I57LW5VZ.cjs +94 -0
- package/dist/chunk-I7PUUDGY.cjs +389 -0
- package/dist/chunk-IAMRBF3Z.cjs +86 -0
- package/dist/chunk-IKNRN4VS.cjs +14214 -0
- package/dist/chunk-IQXFRNY2.cjs +169 -0
- package/dist/chunk-IXTFU4PL.cjs +2355 -0
- package/dist/chunk-J2OP5GG3.cjs +725 -0
- package/dist/chunk-J3LOGE4T.cjs +42 -0
- package/dist/chunk-J7FSKED3.cjs +93 -0
- package/dist/chunk-JDNHKPTD.cjs +22 -0
- package/dist/chunk-JSROZYYO.cjs +164 -0
- package/dist/chunk-K6FNHVDR.cjs +696 -0
- package/dist/chunk-KGZIORNL.cjs +43 -0
- package/dist/{chunk-LZK5CXDW.mjs → chunk-KLSSO6YD.mjs} +2 -2
- package/dist/{chunk-TYVVIQ5M.mjs → chunk-KPNVGRBL.mjs} +32 -25
- package/dist/chunk-KR6CKSXT.cjs +15 -0
- package/dist/chunk-KROWKCUH.cjs +185 -0
- package/dist/chunk-KVFPGF2M.cjs +46 -0
- package/dist/{chunk-KUO3GBPK.mjs → chunk-L6V3P73N.mjs} +1 -1
- package/dist/chunk-LCCBO7PJ.cjs +46 -0
- package/dist/chunk-LIUGYUX3.cjs +22 -0
- package/dist/chunk-LTNGXMQ6.cjs +55 -0
- package/dist/chunk-M2L4MYDQ.cjs +14 -0
- package/dist/chunk-MCJLA63J.cjs +1 -0
- package/dist/chunk-MKB2EGIR.cjs +148 -0
- package/dist/chunk-MQ3H6LT5.cjs +202 -0
- package/dist/chunk-MT763TDW.cjs +43 -0
- package/dist/chunk-MWSK6C4J.cjs +18 -0
- package/dist/chunk-MWWVKDW3.cjs +169 -0
- package/dist/{chunk-KTGFMHET.mjs → chunk-N6UROPT7.mjs} +1 -1
- package/dist/chunk-NO3WWW3N.cjs +192 -0
- package/dist/{chunk-NDD2YVGU.mjs → chunk-NRVGEI5I.mjs} +10 -3
- package/dist/chunk-NV3A5DXM.cjs +862 -0
- package/dist/chunk-NWOD6NIT.cjs +9 -0
- package/dist/chunk-NZKJGRB3.cjs +230 -0
- package/dist/chunk-OAVTUMJP.cjs +1496 -0
- package/dist/chunk-OHY2ZWUG.cjs +25 -0
- package/dist/chunk-OI6CMLWX.cjs +47 -0
- package/dist/chunk-OIEOCXKG.cjs +453 -0
- package/dist/chunk-OWOUTKIJ.cjs +558 -0
- package/dist/chunk-OX6O6WVA.cjs +74 -0
- package/dist/chunk-OXSIH4D6.cjs +476 -0
- package/dist/chunk-OYEUREB6.cjs +35 -0
- package/dist/chunk-PCOTGFSM.cjs +139 -0
- package/dist/chunk-PZYCPSCC.cjs +35 -0
- package/dist/chunk-QBK2AA4U.cjs +445 -0
- package/dist/chunk-QBPXNZGV.cjs +487 -0
- package/dist/{chunk-IXTEENRS.mjs → chunk-QGVJVSNX.mjs} +5 -5
- package/dist/chunk-QNPEUFHQ.cjs +27 -0
- package/dist/chunk-QZRVZSPN.cjs +236 -0
- package/dist/chunk-R5A5KNVX.cjs +20 -0
- package/dist/chunk-R5JIFR6B.cjs +42 -0
- package/dist/chunk-R6AIILII.cjs +193 -0
- package/dist/chunk-RG3ZOTG5.cjs +34 -0
- package/dist/chunk-ROUTX2E5.cjs +390 -0
- package/dist/chunk-RTHIVJ2G.cjs +54 -0
- package/dist/chunk-S3A45T7F.cjs +166 -0
- package/dist/chunk-S3JO3N4H.cjs +17 -0
- package/dist/chunk-SK35NQKK.cjs +27 -0
- package/dist/chunk-SU7MH53P.cjs +180 -0
- package/dist/chunk-SVRTJOUF.cjs +113 -0
- package/dist/chunk-SWN467MP.cjs +18 -0
- package/dist/{chunk-6SCB2MXB.mjs → chunk-SXHV42UQ.mjs} +16 -1
- package/dist/{chunk-OWTIOHON.mjs → chunk-SYGGPS4A.mjs} +2 -2
- package/dist/chunk-SYQ3MOWW.cjs +73 -0
- package/dist/chunk-T5CERMEH.cjs +417 -0
- package/dist/chunk-TFAXUHWX.cjs +206 -0
- package/dist/chunk-TIWHTW3Q.cjs +24 -0
- package/dist/chunk-TKJZFIML.cjs +20 -0
- package/dist/chunk-TKNSDBBN.cjs +193 -0
- package/dist/{chunk-NC333MFA.mjs → chunk-TSWW5BVH.mjs} +7 -4
- package/dist/chunk-TWGMSEHX.cjs +525 -0
- package/dist/chunk-TYQUSXUG.cjs +1357 -0
- package/dist/chunk-U4KT7QP3.cjs +23 -0
- package/dist/{chunk-LK6FGAQR.mjs → chunk-UDBJCUPA.mjs} +7 -4
- package/dist/chunk-UJ2C4ICS.cjs +277 -0
- package/dist/chunk-UN5GHC5V.cjs +10244 -0
- package/dist/chunk-UQZ4AYTH.cjs +168 -0
- package/dist/chunk-US2QVW3E.cjs +36 -0
- package/dist/{chunk-NUD6XBMO.mjs → chunk-UTBVHYS3.mjs} +2 -2
- package/dist/{chunk-76MNRHTS.mjs → chunk-UUYF3CHN.mjs} +2 -2
- package/dist/chunk-VB6UCX3V.cjs +421 -0
- package/dist/chunk-VEKFLAQM.cjs +300 -0
- package/dist/chunk-VQDBNVOO.cjs +14 -0
- package/dist/chunk-W4E7WMXE.cjs +71 -0
- package/dist/{chunk-VVTREAG5.mjs → chunk-WD4YXVLV.mjs} +11 -3
- package/dist/{chunk-UQZPTIML.mjs → chunk-WD5PNSOB.mjs} +2 -2
- package/dist/chunk-WJ3HK3LJ.cjs +1102 -0
- package/dist/chunk-WMAPPDMM.cjs +28 -0
- package/dist/chunk-WMOGFOUJ.cjs +223 -0
- package/dist/chunk-WPYFSQKK.cjs +37 -0
- package/dist/chunk-WZMNW2IW.cjs +1415 -0
- package/dist/chunk-XGC343EY.cjs +443 -0
- package/dist/{chunk-DPZUDPVJ.mjs → chunk-XP777LRD.mjs} +1 -1
- package/dist/chunk-XSKZORAS.cjs +727 -0
- package/dist/chunk-XWAWFQFS.cjs +82 -0
- package/dist/{chunk-KATQ6I56.mjs → chunk-XWAYMDLB.mjs} +1 -1
- package/dist/chunk-Y4YMF2NQ.cjs +460 -0
- package/dist/chunk-Y4YWHNKU.cjs +250 -0
- package/dist/chunk-Y53ZSFN6.cjs +504 -0
- package/dist/chunk-YA6LLTIJ.cjs +411 -0
- package/dist/chunk-YFPGHF5F.cjs +202 -0
- package/dist/chunk-YJRZR7VU.cjs +28 -0
- package/dist/chunk-YTAABQEV.cjs +1 -0
- package/dist/chunk-YX3DBN4M.cjs +18 -0
- package/dist/chunk-YZTASLPQ.cjs +64 -0
- package/dist/chunk-Z5HIWVDP.cjs +2173 -0
- package/dist/{chunk-Q3MDL7TM.mjs → chunk-ZCNJKLA2.mjs} +30 -11
- package/dist/chunk-ZEG3OPIB.cjs +93 -0
- package/dist/chunk-ZMN3H73H.cjs +155 -0
- package/dist/client/lifecycle.cjs +6 -35
- package/dist/{client-plugins-CqVtZi5X.d.ts → client-plugins-C089bQhN.d.ts} +2 -2
- package/dist/{client-plugins-CIPRtSsW.d.mts → client-plugins-JXXmZliS.d.mts} +2 -2
- package/dist/client-plugins.cjs +7 -448
- package/dist/client-plugins.d.mts +3 -3
- package/dist/client-plugins.d.ts +3 -3
- package/dist/client.cjs +171 -9774
- package/dist/client.d.mts +8 -8
- package/dist/client.d.ts +8 -8
- package/dist/client.mjs +6 -6
- package/dist/config.cjs +8 -36
- package/dist/config.d.mts +3 -3
- package/dist/config.d.ts +3 -3
- package/dist/cron.cjs +24 -491
- package/dist/cron.mjs +2 -2
- package/dist/deferred.cjs +26 -475
- package/dist/deployment.cjs +39 -210
- package/dist/devtools-OUIPHVV6.cjs +388 -0
- package/dist/{devtools-IU7LKZOH.mjs → devtools-UFVTMQX5.mjs} +7 -7
- package/dist/devtools-client-4WAPJY5L.cjs +254 -0
- package/dist/devtools-ui-5GBDIGMK.cjs +1296 -0
- package/dist/docs.cjs +46 -5649
- package/dist/docs.mjs +9 -9
- package/dist/{endpoint-kSAxE52R.d.ts → endpoint-1zA994xL.d.ts} +1 -1
- package/dist/{endpoint-Bu3XgeMK.d.mts → endpoint-DAc96i93.d.mts} +1 -1
- package/dist/env-types.cjs +5 -226
- package/dist/env.cjs +23 -306
- package/dist/env.d.mts +5 -3
- package/dist/env.d.ts +5 -3
- package/dist/env.mjs +2 -1
- package/dist/environment/vite.cjs +8 -372
- package/dist/environment.cjs +12 -94
- package/dist/font.cjs +13 -63
- package/dist/headers.cjs +7 -123
- package/dist/i18n/client.cjs +55 -294
- package/dist/i18n/index.cjs +22 -209
- package/dist/i18n/server.cjs +22 -745
- package/dist/image/server.cjs +13 -729
- package/dist/image/sharp.cjs +33 -171
- package/dist/image.cjs +41 -85
- package/dist/index.cjs +1151 -67862
- package/dist/index.d.mts +14 -14
- package/dist/index.d.ts +14 -14
- package/dist/index.mjs +34 -34
- package/dist/instrumentation.cjs +12 -138
- package/dist/integration-orm-55F7CII5.cjs +13 -0
- package/dist/integrations.cjs +55 -4090
- package/dist/integrations.d.mts +3 -3
- package/dist/integrations.d.ts +3 -3
- package/dist/internal/app-markdown-runtime.cjs +27 -224
- package/dist/internal/app-markdown-runtime.d.mts +3 -3
- package/dist/internal/app-markdown-runtime.d.ts +3 -3
- package/dist/internal/app-markdown-runtime.mjs +2 -2
- package/dist/internal/build-runtime.cjs +120 -52038
- package/dist/internal/build-runtime.d.mts +5 -5
- package/dist/internal/build-runtime.d.ts +5 -5
- package/dist/internal/build-runtime.mjs +23 -23
- package/dist/internal/cli-runtime.cjs +67 -13765
- package/dist/internal/cli-runtime.mjs +13 -13
- package/dist/internal/client-error-overlay.cjs +80 -733
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +81 -913
- package/dist/internal/compression-runtime.cjs +8 -214
- package/dist/internal/compression-runtime.d.mts +3 -3
- package/dist/internal/compression-runtime.d.ts +3 -3
- package/dist/internal/config-runtime.cjs +42 -6535
- package/dist/internal/config-runtime.d.mts +4 -4
- package/dist/internal/config-runtime.d.ts +4 -4
- package/dist/internal/config-runtime.mjs +7 -7
- package/dist/internal/docs-precompiled-runtime.cjs +26 -46
- package/dist/internal/infra-analytics-runtime.cjs +10 -536
- package/dist/internal/isolated-boundary.cjs +14 -414
- package/dist/internal/metadata-image-runtime.cjs +7 -285
- package/dist/internal/product-telemetry-runtime.cjs +42 -97
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-node-env.cjs +6 -63
- package/dist/internal/production-runtime.cjs +418 -7073
- package/dist/internal/production-runtime.d.mts +9 -9
- package/dist/internal/production-runtime.d.ts +9 -9
- package/dist/internal/production-runtime.mjs +6 -6
- package/dist/internal/request-cookies.cjs +6 -54
- package/dist/json-ld.cjs +24 -50
- package/dist/layers-E4WPJNY5.cjs +17 -0
- package/dist/manager-G4B2IPYE.cjs +14 -0
- package/dist/markdown.cjs +21 -532
- package/dist/markdown.mjs +1 -1
- package/dist/{metadata-8g__AMPM.d.ts → metadata-BcNJP4fq.d.ts} +1 -1
- package/dist/{metadata-OMX6wFNf.d.mts → metadata-C1Z9vLbb.d.mts} +1 -1
- package/dist/middleware.cjs +36 -2988
- package/dist/middleware.d.mts +5 -5
- package/dist/middleware.d.ts +5 -5
- package/dist/middleware.mjs +4 -4
- package/dist/navigation.cjs +22 -2588
- package/dist/nitro-4I2MYLY2.cjs +652 -0
- package/dist/{nitro-3N4ZXRYM.mjs → nitro-CVZ36JM5.mjs} +4 -4
- package/dist/observability.cjs +22 -614
- package/dist/og.cjs +5 -28
- package/dist/plugin.cjs +106 -37291
- package/dist/plugin.d.mts +3 -3
- package/dist/plugin.d.ts +3 -3
- package/dist/plugin.mjs +19 -19
- package/dist/{production-runtime-W3M0eNDV.d.mts → production-runtime-jcrTlRTb.d.mts} +1 -1
- package/dist/{production-runtime-BJh7o6Cr.d.ts → production-runtime-oKmC0WU-.d.ts} +1 -1
- package/dist/query/client.cjs +113 -449
- package/dist/query/index.cjs +26 -288
- package/dist/query/parsers.cjs +23 -247
- package/dist/query/server.cjs +36 -298
- package/dist/{render-plan-io7pvDNc.d.mts → render-plan-BLIfc4jt.d.mts} +1 -1
- package/dist/{render-plan-Be4ZGTJP.d.ts → render-plan-DOB9cV-h.d.ts} +1 -1
- package/dist/renderer/react/client.cjs +9 -43
- package/dist/renderer/react/server.cjs +40 -103
- package/dist/renderer/react/vite.cjs +7 -29
- package/dist/renderer-client.cjs +126 -4261
- package/dist/renderer-client.d.mts +5 -5
- package/dist/renderer-client.d.ts +5 -5
- package/dist/renderer-client.mjs +3 -3
- package/dist/renderer.cjs +31 -249
- package/dist/{request-DZkHYQ89.d.mts → request-Cr53NRHr.d.mts} +1 -1
- package/dist/{request-G8JhKr4F.d.ts → request-Dt2gNuQD.d.ts} +1 -1
- package/dist/request.cjs +5 -68
- package/dist/request.d.mts +4 -4
- package/dist/request.d.ts +4 -4
- package/dist/{route-C_eLaFTZ.d.mts → route-B0XrsrFk.d.mts} +1 -1
- package/dist/{route-BxNJT447.d.ts → route-DOEpbyWZ.d.ts} +1 -1
- package/dist/{route-rendering-BcLLPJgN.d.ts → route-rendering-CWYd8Mv1.d.ts} +1 -1
- package/dist/{route-rendering-CbAKr1TY.d.mts → route-rendering-CeFBEAoZ.d.mts} +1 -1
- package/dist/router.cjs +11 -474
- package/dist/routes.cjs +42 -2424
- package/dist/routes.d.mts +4 -4
- package/dist/routes.d.ts +4 -4
- package/dist/routes.mjs +2 -2
- package/dist/schema-dev-notice-MXSZMVDG.cjs +56 -0
- package/dist/schema.cjs +6 -33
- package/dist/search-client-G3RICOFU.cjs +13 -0
- package/dist/server-action-security.cjs +25 -541
- package/dist/server-fn-client.cjs +6 -337
- package/dist/server-fn-client.d.mts +3 -3
- package/dist/server-fn-client.d.ts +3 -3
- package/dist/server-fn.cjs +32 -1799
- package/dist/server-fn.d.mts +1 -1
- package/dist/server-fn.d.ts +1 -1
- package/dist/server-fn.mjs +2 -2
- package/dist/server-plugins.cjs +15 -884
- package/dist/server-plugins.d.mts +4 -4
- package/dist/server-plugins.d.ts +4 -4
- package/dist/server-query-client.cjs +15 -1849
- package/dist/server-query-client.d.mts +1 -1
- package/dist/server-query-client.d.ts +1 -1
- package/dist/server-query-client.mjs +4 -4
- package/dist/server-query.cjs +16 -1796
- package/dist/server-query.d.mts +1 -1
- package/dist/server-query.d.ts +1 -1
- package/dist/server-query.mjs +3 -3
- package/dist/server.cjs +296 -44522
- package/dist/server.d.mts +9 -9
- package/dist/server.d.ts +9 -9
- package/dist/server.mjs +22 -22
- package/dist/{spa-router-BcS_4nqm.d.mts → spa-router-CQWiYGxS.d.mts} +2 -2
- package/dist/{spa-router-BzFBUJkn.d.ts → spa-router-Wjiw-8hB.d.ts} +2 -2
- package/dist/storage.cjs +57 -576
- package/dist/testing.cjs +92 -3148
- package/dist/testing.d.mts +3 -3
- package/dist/testing.d.ts +3 -3
- package/dist/testing.mjs +11 -7
- package/dist/theme/client.cjs +13 -108
- package/dist/theme/index.cjs +6 -68
- package/dist/theme/runtime.cjs +13 -78
- package/dist/theme/server.cjs +10 -179
- package/dist/{utils-C4yrAhNc.d.ts → utils-B0XJmG_b.d.ts} +1 -1
- package/dist/{utils-5kQP1mFR.d.mts → utils-uUxF0K0P.d.mts} +1 -1
- package/dist/version.cjs +4 -32
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +119 -37622
- package/dist/vite.d.mts +3 -3
- package/dist/vite.d.ts +3 -3
- package/dist/vite.mjs +19 -19
- package/dist/workflows.cjs +19 -1040
- package/dist/workflows.mjs +2 -2
- package/package.json +2 -2
- package/dist/{chunk-VO5SCWF5.mjs → chunk-BNGS6KJ6.mjs} +0 -0
- package/dist/{chunk-MUUZJLCI.mjs → chunk-EGJDUF4Q.mjs} +3 -3
- package/dist/{chunk-4L7SZOHZ.mjs → chunk-YHOCRI4H.mjs} +3 -3
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkR5JIFR6Bcjs = require('./chunk-R5JIFR6B.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
8
|
+
|
|
9
|
+
// src/metadata.ts
|
|
10
|
+
var FARM_METADATA_ATTRIBUTE = "data-farm-metadata";
|
|
11
|
+
var FARM_NOT_FOUND_TITLE = "404 - Page Not Found";
|
|
12
|
+
async function resolveFarmNotFoundMetadata(layoutModules, notFoundModule) {
|
|
13
|
+
let metadata = {};
|
|
14
|
+
for (const layout of layoutModules) {
|
|
15
|
+
if (!layout) continue;
|
|
16
|
+
metadata = mergeMetadata(metadata, layout.metadata);
|
|
17
|
+
if (typeof layout.generateMetadata === "function") {
|
|
18
|
+
metadata = mergeMetadata(metadata, await layout.generateMetadata({ params: {} }));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
let own = {};
|
|
22
|
+
if (notFoundModule) {
|
|
23
|
+
own = mergeMetadata(own, notFoundModule.metadata);
|
|
24
|
+
if (typeof notFoundModule.generateMetadata === "function") {
|
|
25
|
+
own = mergeMetadata(
|
|
26
|
+
own,
|
|
27
|
+
await notFoundModule.generateMetadata({ params: {}, searchParams: {} })
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return mergeMetadata(metadata, { ...own, title: _nullishCoalesce(own.title, () => ( FARM_NOT_FOUND_TITLE)) });
|
|
32
|
+
}
|
|
33
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, resolveFarmNotFoundMetadata, "resolveFarmNotFoundMetadata");
|
|
34
|
+
function mergeMetadata(base, next) {
|
|
35
|
+
if (!base) return next ? { ...next } : {};
|
|
36
|
+
if (!next) return { ...base };
|
|
37
|
+
return {
|
|
38
|
+
...base,
|
|
39
|
+
...next,
|
|
40
|
+
jsonLd: mergeMetadataJsonLd(base.jsonLd, next.jsonLd),
|
|
41
|
+
title: mergeMetadataTitle(base.title, next.title),
|
|
42
|
+
other: mergeNestedMetadata(base.other, next.other),
|
|
43
|
+
openGraph: mergeNestedMetadata(base.openGraph, next.openGraph),
|
|
44
|
+
twitter: mergeNestedMetadata(base.twitter, next.twitter),
|
|
45
|
+
alternates: mergeNestedMetadata(base.alternates, next.alternates),
|
|
46
|
+
icons: mergeNestedMetadata(base.icons, next.icons),
|
|
47
|
+
verification: mergeNestedMetadata(base.verification, next.verification)
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, mergeMetadata, "mergeMetadata");
|
|
51
|
+
function mergeMetadataTitle(base, next) {
|
|
52
|
+
if (next === void 0) return base;
|
|
53
|
+
const parentTemplate = isRecord(base) ? normalizeContent(base.template) : void 0;
|
|
54
|
+
if (typeof next === "string") {
|
|
55
|
+
return parentTemplate ? applyTitleTemplate(parentTemplate, next) : next;
|
|
56
|
+
}
|
|
57
|
+
if (!isRecord(next)) return next;
|
|
58
|
+
const defaultTitle = _nullishCoalesce(normalizeContent(next.default), () => ( resolveMetadataTitle(base)));
|
|
59
|
+
return {
|
|
60
|
+
...next,
|
|
61
|
+
default: defaultTitle && parentTemplate ? applyTitleTemplate(parentTemplate, defaultTitle) : defaultTitle
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, mergeMetadataTitle, "mergeMetadataTitle");
|
|
65
|
+
function applyTitleTemplate(template, title) {
|
|
66
|
+
return template.split("%s").join(title);
|
|
67
|
+
}
|
|
68
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, applyTitleTemplate, "applyTitleTemplate");
|
|
69
|
+
function mergeMetadataJsonLd(base, next) {
|
|
70
|
+
if (base === void 0) return next;
|
|
71
|
+
if (next === void 0) return base;
|
|
72
|
+
return [...normalizeArray(base), ...normalizeArray(next)];
|
|
73
|
+
}
|
|
74
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, mergeMetadataJsonLd, "mergeMetadataJsonLd");
|
|
75
|
+
function addMetadataImageReference(metadata, reference) {
|
|
76
|
+
if (reference.kind === "opengraph") {
|
|
77
|
+
const openGraph = { ...metadata.openGraph };
|
|
78
|
+
if (!hasMetadataImages(openGraph.images) && !hasMetadataImages(openGraph.image)) {
|
|
79
|
+
openGraph.images = [
|
|
80
|
+
{
|
|
81
|
+
url: reference.href,
|
|
82
|
+
width: reference.width,
|
|
83
|
+
height: reference.height,
|
|
84
|
+
alt: reference.alt,
|
|
85
|
+
type: reference.contentType
|
|
86
|
+
}
|
|
87
|
+
];
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
...metadata,
|
|
91
|
+
openGraph
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
const twitter = { ...metadata.twitter };
|
|
95
|
+
if (!hasMetadataImages(twitter.images)) {
|
|
96
|
+
twitter.images = [reference.href];
|
|
97
|
+
twitter.card = twitter.card || "summary_large_image";
|
|
98
|
+
}
|
|
99
|
+
return {
|
|
100
|
+
...metadata,
|
|
101
|
+
twitter
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, addMetadataImageReference, "addMetadataImageReference");
|
|
105
|
+
var MARKDOWN_MIME_TYPE = "text/markdown";
|
|
106
|
+
function addMetadataMarkdownAlternate(metadata, href) {
|
|
107
|
+
if (!href) return metadata;
|
|
108
|
+
const alternates = isRecord(metadata.alternates) ? metadata.alternates : {};
|
|
109
|
+
const types = isRecord(alternates.types) ? alternates.types : {};
|
|
110
|
+
if (Object.keys(types).some((type) => type.toLowerCase() === MARKDOWN_MIME_TYPE)) {
|
|
111
|
+
return metadata;
|
|
112
|
+
}
|
|
113
|
+
return {
|
|
114
|
+
...metadata,
|
|
115
|
+
alternates: {
|
|
116
|
+
...alternates,
|
|
117
|
+
types: { ...types, [MARKDOWN_MIME_TYPE]: sanitizeSelfCanonicalPathname(href) }
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, addMetadataMarkdownAlternate, "addMetadataMarkdownAlternate");
|
|
122
|
+
function renderMetadataHead(metadata, options = {}) {
|
|
123
|
+
const resolvedMetadata = metadata || {};
|
|
124
|
+
const metadataBase = resolveMetadataBase(resolvedMetadata);
|
|
125
|
+
const explicitTitle = resolveMetadataTitle(resolvedMetadata.title);
|
|
126
|
+
const title = explicitTitle || "Farm.js App";
|
|
127
|
+
const tags = [];
|
|
128
|
+
appendMetaName(tags, "description", resolvedMetadata.description);
|
|
129
|
+
appendMetaName(tags, "keywords", normalizeKeywords(resolvedMetadata.keywords));
|
|
130
|
+
appendMetaName(tags, "author", resolvedMetadata.author);
|
|
131
|
+
if (Array.isArray(resolvedMetadata.authors)) {
|
|
132
|
+
for (const author of resolvedMetadata.authors) {
|
|
133
|
+
appendMetaName(tags, "author", _optionalChain([author, 'optionalAccess', _ => _.name]));
|
|
134
|
+
if (_optionalChain([author, 'optionalAccess', _2 => _2.url])) {
|
|
135
|
+
appendLink(tags, "author", resolveMetadataUrl(author.url, metadataBase));
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
appendMetaName(tags, "creator", resolvedMetadata.creator);
|
|
140
|
+
appendMetaName(tags, "publisher", resolvedMetadata.publisher);
|
|
141
|
+
appendMetaName(tags, "robots", normalizeRobots(resolvedMetadata.robots));
|
|
142
|
+
if (isRecord(resolvedMetadata.robots)) {
|
|
143
|
+
appendMetaName(tags, "googlebot", normalizeRobots(resolvedMetadata.robots.googleBot));
|
|
144
|
+
}
|
|
145
|
+
const alternates = resolvedMetadata.alternates;
|
|
146
|
+
const explicitCanonical = isRecord(alternates) ? alternates.canonical : void 0;
|
|
147
|
+
const canonicalHref = explicitCanonical != null ? resolveMetadataUrl(explicitCanonical, metadataBase) : options.pathname ? resolveMetadataUrl(sanitizeSelfCanonicalPathname(options.pathname), metadataBase) : void 0;
|
|
148
|
+
if (canonicalHref) {
|
|
149
|
+
appendLink(tags, "canonical", canonicalHref);
|
|
150
|
+
}
|
|
151
|
+
if (isRecord(alternates) && isRecord(alternates.languages)) {
|
|
152
|
+
for (const [language, href] of Object.entries(alternates.languages)) {
|
|
153
|
+
appendLink(tags, "alternate", resolveMetadataUrl(href, metadataBase), {
|
|
154
|
+
hreflang: language
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
if (isRecord(alternates) && isRecord(alternates.types)) {
|
|
159
|
+
for (const [type, value] of Object.entries(alternates.types)) {
|
|
160
|
+
for (const entry of normalizeArray(value)) {
|
|
161
|
+
const link = isRecord(entry) ? entry : { url: entry };
|
|
162
|
+
appendLink(tags, "alternate", resolveMetadataUrl(link.url, metadataBase), {
|
|
163
|
+
type,
|
|
164
|
+
title: link.title
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
const hasFavicon = appendIcons(tags, resolvedMetadata.icons, metadataBase);
|
|
170
|
+
if (resolvedMetadata.manifest) {
|
|
171
|
+
appendLink(
|
|
172
|
+
tags,
|
|
173
|
+
"manifest",
|
|
174
|
+
resolveMetadataUrl(resolvedMetadata.manifest, metadataBase)
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
appendNamedMetaRecord(tags, resolvedMetadata.other);
|
|
178
|
+
appendOpenGraph(tags, resolvedMetadata.openGraph, metadataBase);
|
|
179
|
+
appendTwitter(tags, resolvedMetadata.twitter, metadataBase);
|
|
180
|
+
appendVerification(tags, resolvedMetadata.verification);
|
|
181
|
+
if (options.jsonLd) {
|
|
182
|
+
const jsonLdConfig = options.jsonLd === true ? {} : options.jsonLd;
|
|
183
|
+
const jsonLdScript = _chunkR5JIFR6Bcjs.renderFarmAgentJsonLd.call(void 0, jsonLdConfig, {
|
|
184
|
+
metadataBase,
|
|
185
|
+
siteName: isRecord(resolvedMetadata.openGraph) ? normalizeContent(resolvedMetadata.openGraph.siteName) : void 0,
|
|
186
|
+
title: explicitTitle,
|
|
187
|
+
description: normalizeContent(resolvedMetadata.description)
|
|
188
|
+
});
|
|
189
|
+
if (jsonLdScript) tags.push(jsonLdScript);
|
|
190
|
+
}
|
|
191
|
+
for (const entry of normalizeArray(resolvedMetadata.jsonLd)) {
|
|
192
|
+
if (!isRecord(entry)) continue;
|
|
193
|
+
tags.push(
|
|
194
|
+
`<script type="application/ld+json" ${FARM_METADATA_ATTRIBUTE}>${_chunkR5JIFR6Bcjs.serializeJsonLd.call(void 0, entry)}</script>`
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
return {
|
|
198
|
+
title: escapeText(title),
|
|
199
|
+
tags: tags.length > 0 ? `
|
|
200
|
+
${tags.join("\n ")}` : "",
|
|
201
|
+
hasFavicon,
|
|
202
|
+
hasExplicitTitle: Boolean(explicitTitle)
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, renderMetadataHead, "renderMetadataHead");
|
|
206
|
+
function mergeNestedMetadata(base, next) {
|
|
207
|
+
if (isRecord(base) && isRecord(next)) {
|
|
208
|
+
return {
|
|
209
|
+
...base,
|
|
210
|
+
...next
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
return _nullishCoalesce(next, () => ( base));
|
|
214
|
+
}
|
|
215
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, mergeNestedMetadata, "mergeNestedMetadata");
|
|
216
|
+
function appendOpenGraph(tags, openGraph, metadataBase) {
|
|
217
|
+
if (!isRecord(openGraph)) return;
|
|
218
|
+
appendMetaProperty(tags, "og:title", openGraph.title);
|
|
219
|
+
appendMetaProperty(tags, "og:description", openGraph.description);
|
|
220
|
+
appendMetaProperty(tags, "og:url", resolveMetadataUrl(openGraph.url, metadataBase));
|
|
221
|
+
appendMetaProperty(tags, "og:site_name", openGraph.siteName);
|
|
222
|
+
appendMetaProperty(tags, "og:type", _nullishCoalesce(openGraph.type, () => ( "website")));
|
|
223
|
+
appendMetaProperty(tags, "og:locale", openGraph.locale);
|
|
224
|
+
const images = normalizeMetadataImages(
|
|
225
|
+
_nullishCoalesce(openGraph.images, () => ( openGraph.image)),
|
|
226
|
+
metadataBase
|
|
227
|
+
);
|
|
228
|
+
for (const image of images) {
|
|
229
|
+
appendMetaProperty(tags, "og:image", image.url);
|
|
230
|
+
appendMetaProperty(tags, "og:image:width", image.width);
|
|
231
|
+
appendMetaProperty(tags, "og:image:height", image.height);
|
|
232
|
+
appendMetaProperty(tags, "og:image:alt", image.alt);
|
|
233
|
+
appendMetaProperty(tags, "og:image:type", image.type);
|
|
234
|
+
}
|
|
235
|
+
if (openGraph.type === "article") {
|
|
236
|
+
appendMetaProperty(tags, "article:published_time", normalizeDate(openGraph.publishedTime));
|
|
237
|
+
appendMetaProperty(tags, "article:modified_time", normalizeDate(openGraph.modifiedTime));
|
|
238
|
+
for (const author of normalizeArray(openGraph.authors)) {
|
|
239
|
+
appendMetaProperty(tags, "article:author", author);
|
|
240
|
+
}
|
|
241
|
+
appendMetaProperty(tags, "article:section", openGraph.section);
|
|
242
|
+
for (const tag of normalizeArray(openGraph.tags)) {
|
|
243
|
+
appendMetaProperty(tags, "article:tag", tag);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, appendOpenGraph, "appendOpenGraph");
|
|
248
|
+
function appendTwitter(tags, twitter, metadataBase) {
|
|
249
|
+
if (!isRecord(twitter)) return;
|
|
250
|
+
appendMetaName(tags, "twitter:card", twitter.card);
|
|
251
|
+
appendMetaName(tags, "twitter:site", twitter.site);
|
|
252
|
+
appendMetaName(tags, "twitter:creator", twitter.creator);
|
|
253
|
+
appendMetaName(tags, "twitter:title", twitter.title);
|
|
254
|
+
appendMetaName(tags, "twitter:description", twitter.description);
|
|
255
|
+
for (const image of normalizeMetadataImages(twitter.images, metadataBase)) {
|
|
256
|
+
appendMetaName(tags, "twitter:image", image.url);
|
|
257
|
+
appendMetaName(tags, "twitter:image:alt", image.alt);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, appendTwitter, "appendTwitter");
|
|
261
|
+
function appendNamedMetaRecord(tags, record) {
|
|
262
|
+
if (!isRecord(record)) return;
|
|
263
|
+
for (const [name, value] of Object.entries(record)) {
|
|
264
|
+
for (const content of normalizeArray(value)) {
|
|
265
|
+
appendMetaName(tags, name, content, true);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, appendNamedMetaRecord, "appendNamedMetaRecord");
|
|
270
|
+
function appendIcons(tags, icons, metadataBase) {
|
|
271
|
+
if (!icons) return false;
|
|
272
|
+
if (typeof icons === "string") {
|
|
273
|
+
const initialTagCount2 = tags.length;
|
|
274
|
+
appendLink(tags, "icon", resolveMetadataUrl(icons, metadataBase));
|
|
275
|
+
return tags.length > initialTagCount2;
|
|
276
|
+
}
|
|
277
|
+
if (!isRecord(icons)) return false;
|
|
278
|
+
const initialTagCount = tags.length;
|
|
279
|
+
appendIconList(tags, "icon", icons.icon, metadataBase);
|
|
280
|
+
appendIconList(tags, "shortcut icon", icons.shortcut, metadataBase);
|
|
281
|
+
const hasFavicon = tags.length > initialTagCount;
|
|
282
|
+
appendIconList(tags, "apple-touch-icon", icons.apple, metadataBase);
|
|
283
|
+
return hasFavicon;
|
|
284
|
+
}
|
|
285
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, appendIcons, "appendIcons");
|
|
286
|
+
function appendIconList(tags, rel, value, metadataBase) {
|
|
287
|
+
for (const icon of normalizeArray(value)) {
|
|
288
|
+
if (typeof icon === "string") {
|
|
289
|
+
appendLink(tags, rel, resolveMetadataUrl(icon, metadataBase));
|
|
290
|
+
continue;
|
|
291
|
+
}
|
|
292
|
+
if (!isRecord(icon)) continue;
|
|
293
|
+
appendLink(tags, rel, resolveMetadataUrl(icon.url, metadataBase), {
|
|
294
|
+
sizes: icon.sizes,
|
|
295
|
+
type: icon.type
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, appendIconList, "appendIconList");
|
|
300
|
+
function appendMetaName(tags, name, content, marked = false) {
|
|
301
|
+
const normalized = normalizeContent(content);
|
|
302
|
+
if (!normalized || !name) return;
|
|
303
|
+
const marker = marked ? ` ${FARM_METADATA_ATTRIBUTE}` : "";
|
|
304
|
+
tags.push(
|
|
305
|
+
`<meta name="${escapeAttribute(name)}" content="${escapeAttribute(normalized)}"${marker}>`
|
|
306
|
+
);
|
|
307
|
+
}
|
|
308
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, appendMetaName, "appendMetaName");
|
|
309
|
+
function appendMetaProperty(tags, property, content) {
|
|
310
|
+
const normalized = normalizeContent(content);
|
|
311
|
+
if (!normalized) return;
|
|
312
|
+
tags.push(
|
|
313
|
+
`<meta property="${escapeAttribute(property)}" content="${escapeAttribute(normalized)}">`
|
|
314
|
+
);
|
|
315
|
+
}
|
|
316
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, appendMetaProperty, "appendMetaProperty");
|
|
317
|
+
var VERIFICATION_META_NAMES = [
|
|
318
|
+
["google", "google-site-verification"],
|
|
319
|
+
["bing", "msvalidate.01"],
|
|
320
|
+
["yandex", "yandex-verification"]
|
|
321
|
+
];
|
|
322
|
+
function appendVerification(tags, verification) {
|
|
323
|
+
if (!isRecord(verification)) return;
|
|
324
|
+
for (const [key, name] of VERIFICATION_META_NAMES) {
|
|
325
|
+
for (const token of normalizeArray(verification[key])) {
|
|
326
|
+
appendMetaName(tags, name, token);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
appendNamedMetaRecord(tags, verification.other);
|
|
330
|
+
}
|
|
331
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, appendVerification, "appendVerification");
|
|
332
|
+
function appendLink(tags, rel, href, attrs = {}) {
|
|
333
|
+
const normalizedHref = normalizeContent(href);
|
|
334
|
+
if (!normalizedHref) return;
|
|
335
|
+
const attrText = Object.entries(attrs).map(([key, value]) => {
|
|
336
|
+
const normalized = normalizeContent(value);
|
|
337
|
+
return normalized ? ` ${key}="${escapeAttribute(normalized)}"` : "";
|
|
338
|
+
}).join("");
|
|
339
|
+
tags.push(
|
|
340
|
+
`<link rel="${escapeAttribute(rel)}" href="${escapeAttribute(normalizedHref)}"${attrText}>`
|
|
341
|
+
);
|
|
342
|
+
}
|
|
343
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, appendLink, "appendLink");
|
|
344
|
+
function normalizeMetadataImages(value, metadataBase) {
|
|
345
|
+
return normalizeArray(value).map((item) => {
|
|
346
|
+
if (typeof item === "string") {
|
|
347
|
+
return { url: resolveMetadataUrl(item, metadataBase) || item };
|
|
348
|
+
}
|
|
349
|
+
if (!isRecord(item)) return null;
|
|
350
|
+
const rawUrl = item.url || item.src;
|
|
351
|
+
const url = resolveMetadataUrl(rawUrl, metadataBase);
|
|
352
|
+
if (!url) return null;
|
|
353
|
+
return {
|
|
354
|
+
url,
|
|
355
|
+
width: normalizeNumber(item.width),
|
|
356
|
+
height: normalizeNumber(item.height),
|
|
357
|
+
alt: typeof item.alt === "string" ? item.alt : void 0,
|
|
358
|
+
type: typeof item.type === "string" ? item.type : void 0
|
|
359
|
+
};
|
|
360
|
+
}).filter((item) => item !== null);
|
|
361
|
+
}
|
|
362
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, normalizeMetadataImages, "normalizeMetadataImages");
|
|
363
|
+
function normalizeArray(value) {
|
|
364
|
+
if (value == null) return [];
|
|
365
|
+
return Array.isArray(value) ? value : [value];
|
|
366
|
+
}
|
|
367
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, normalizeArray, "normalizeArray");
|
|
368
|
+
function hasMetadataImages(value) {
|
|
369
|
+
return normalizeMetadataImages(value).length > 0;
|
|
370
|
+
}
|
|
371
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, hasMetadataImages, "hasMetadataImages");
|
|
372
|
+
function resolveMetadataTitle(title) {
|
|
373
|
+
if (typeof title === "string") return title;
|
|
374
|
+
if (isRecord(title)) {
|
|
375
|
+
return normalizeContent(title.default);
|
|
376
|
+
}
|
|
377
|
+
return void 0;
|
|
378
|
+
}
|
|
379
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, resolveMetadataTitle, "resolveMetadataTitle");
|
|
380
|
+
function normalizeKeywords(keywords) {
|
|
381
|
+
if (Array.isArray(keywords)) return keywords.filter(Boolean).join(", ");
|
|
382
|
+
return keywords;
|
|
383
|
+
}
|
|
384
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, normalizeKeywords, "normalizeKeywords");
|
|
385
|
+
var ROBOTS_FLAGS = ["noarchive", "nosnippet", "noimageindex"];
|
|
386
|
+
var ROBOTS_VALUES = [
|
|
387
|
+
"max-snippet",
|
|
388
|
+
"max-image-preview",
|
|
389
|
+
"max-video-preview",
|
|
390
|
+
"unavailable_after"
|
|
391
|
+
];
|
|
392
|
+
function normalizeRobots(robots) {
|
|
393
|
+
if (typeof robots === "string") return robots;
|
|
394
|
+
if (!isRecord(robots)) return void 0;
|
|
395
|
+
const values = [];
|
|
396
|
+
if (typeof robots.index === "boolean") values.push(robots.index ? "index" : "noindex");
|
|
397
|
+
if (typeof robots.follow === "boolean") values.push(robots.follow ? "follow" : "nofollow");
|
|
398
|
+
for (const flag of ROBOTS_FLAGS) {
|
|
399
|
+
if (robots[flag] === true) values.push(flag);
|
|
400
|
+
}
|
|
401
|
+
for (const directive of ROBOTS_VALUES) {
|
|
402
|
+
const value = normalizeContent(robots[directive]);
|
|
403
|
+
if (value) values.push(`${directive}:${value}`);
|
|
404
|
+
}
|
|
405
|
+
return values.join(", ") || void 0;
|
|
406
|
+
}
|
|
407
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, normalizeRobots, "normalizeRobots");
|
|
408
|
+
function resolveMetadataBase(metadata) {
|
|
409
|
+
const base = metadata.metadataBase;
|
|
410
|
+
if (!base) return void 0;
|
|
411
|
+
return String(base);
|
|
412
|
+
}
|
|
413
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, resolveMetadataBase, "resolveMetadataBase");
|
|
414
|
+
function sanitizeSelfCanonicalPathname(pathname) {
|
|
415
|
+
if (typeof pathname !== "string" || pathname.length === 0) return "/";
|
|
416
|
+
const collapsed = pathname.replace(/^[/\\]+/, "/");
|
|
417
|
+
return collapsed.startsWith("/") ? collapsed : `/${collapsed}`;
|
|
418
|
+
}
|
|
419
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, sanitizeSelfCanonicalPathname, "sanitizeSelfCanonicalPathname");
|
|
420
|
+
function resolveMetadataUrl(value, metadataBase) {
|
|
421
|
+
const normalized = normalizeContent(value);
|
|
422
|
+
if (!normalized) return void 0;
|
|
423
|
+
if (!metadataBase) return normalized;
|
|
424
|
+
try {
|
|
425
|
+
return new URL(normalized, metadataBase).toString();
|
|
426
|
+
} catch (e) {
|
|
427
|
+
return normalized;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, resolveMetadataUrl, "resolveMetadataUrl");
|
|
431
|
+
function normalizeNumber(value) {
|
|
432
|
+
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
433
|
+
if (typeof value === "string") {
|
|
434
|
+
const parsed = Number(value);
|
|
435
|
+
return Number.isFinite(parsed) ? parsed : void 0;
|
|
436
|
+
}
|
|
437
|
+
return void 0;
|
|
438
|
+
}
|
|
439
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, normalizeNumber, "normalizeNumber");
|
|
440
|
+
function normalizeDate(value) {
|
|
441
|
+
if (value instanceof Date) {
|
|
442
|
+
return Number.isNaN(value.getTime()) ? void 0 : value.toISOString();
|
|
443
|
+
}
|
|
444
|
+
return normalizeContent(value);
|
|
445
|
+
}
|
|
446
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, normalizeDate, "normalizeDate");
|
|
447
|
+
function normalizeContent(value) {
|
|
448
|
+
if (value == null) return void 0;
|
|
449
|
+
if (typeof value === "string") return value;
|
|
450
|
+
if (typeof value === "number" || typeof value === "boolean") return String(value);
|
|
451
|
+
if (value instanceof URL) return value.toString();
|
|
452
|
+
return void 0;
|
|
453
|
+
}
|
|
454
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, normalizeContent, "normalizeContent");
|
|
455
|
+
function isRecord(value) {
|
|
456
|
+
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
457
|
+
}
|
|
458
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, isRecord, "isRecord");
|
|
459
|
+
function escapeText(value) {
|
|
460
|
+
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
461
|
+
}
|
|
462
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, escapeText, "escapeText");
|
|
463
|
+
function escapeAttribute(value) {
|
|
464
|
+
return escapeText(value).replace(/"/g, """);
|
|
465
|
+
}
|
|
466
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, escapeAttribute, "escapeAttribute");
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
exports.FARM_METADATA_ATTRIBUTE = FARM_METADATA_ATTRIBUTE; exports.resolveFarmNotFoundMetadata = resolveFarmNotFoundMetadata; exports.mergeMetadata = mergeMetadata; exports.addMetadataImageReference = addMetadataImageReference; exports.addMetadataMarkdownAlternate = addMetadataMarkdownAlternate; exports.renderMetadataHead = renderMetadataHead; exports.resolveMetadataTitle = resolveMetadataTitle;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
4
|
+
|
|
5
|
+
// src/trailing-slash.ts
|
|
6
|
+
var FARM_TRAILING_SLASH_PREFERENCE = /* @__PURE__ */ Symbol.for("farm.trailingSlashPreference");
|
|
7
|
+
function getFarmGlobalState() {
|
|
8
|
+
return globalThis;
|
|
9
|
+
}
|
|
10
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, getFarmGlobalState, "getFarmGlobalState");
|
|
11
|
+
function setFarmTrailingSlashPreference(enabled) {
|
|
12
|
+
getFarmGlobalState()[FARM_TRAILING_SLASH_PREFERENCE] = enabled === true;
|
|
13
|
+
}
|
|
14
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, setFarmTrailingSlashPreference, "setFarmTrailingSlashPreference");
|
|
15
|
+
function getFarmTrailingSlashPreference() {
|
|
16
|
+
return getFarmGlobalState()[FARM_TRAILING_SLASH_PREFERENCE] === true;
|
|
17
|
+
}
|
|
18
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, getFarmTrailingSlashPreference, "getFarmTrailingSlashPreference");
|
|
19
|
+
function normalizeFarmTrailingSlashPathname(pathname, enabled) {
|
|
20
|
+
if (pathname === "/") return pathname;
|
|
21
|
+
if (enabled) return pathname.endsWith("/") ? pathname : `${pathname}/`;
|
|
22
|
+
return pathname.replace(/\/+$/, "") || "/";
|
|
23
|
+
}
|
|
24
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, normalizeFarmTrailingSlashPathname, "normalizeFarmTrailingSlashPathname");
|
|
25
|
+
function resolveFarmTrailingSlashRedirect(url, enabled) {
|
|
26
|
+
const pathname = normalizeFarmTrailingSlashPathname(url.pathname, enabled);
|
|
27
|
+
return pathname === url.pathname ? null : `${pathname}${url.search}`;
|
|
28
|
+
}
|
|
29
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, resolveFarmTrailingSlashRedirect, "resolveFarmTrailingSlashRedirect");
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
exports.setFarmTrailingSlashPreference = setFarmTrailingSlashPreference; exports.getFarmTrailingSlashPreference = getFarmTrailingSlashPreference; exports.resolveFarmTrailingSlashRedirect = resolveFarmTrailingSlashRedirect;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunkNO3WWW3Ncjs = require('./chunk-NO3WWW3N.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
9
|
+
|
|
10
|
+
// src/routing/matcher.ts
|
|
11
|
+
function parseRoutePattern(pattern) {
|
|
12
|
+
_chunkNO3WWW3Ncjs.assertBrowserStableRoutePath.call(void 0, pattern);
|
|
13
|
+
_chunkNO3WWW3Ncjs.assertTerminalCatchAll.call(void 0, pattern, "router");
|
|
14
|
+
_chunkNO3WWW3Ncjs.assertUniqueRouteParameters.call(void 0, pattern, "router");
|
|
15
|
+
return splitRoutePattern(pattern).filter((part) => !isRouteGroup(part)).map((part) => {
|
|
16
|
+
const optionalCatchAll = part.match(/^\[\[\.\.\.([A-Za-z0-9_$-]+)\]\]$/);
|
|
17
|
+
if (optionalCatchAll) {
|
|
18
|
+
return {
|
|
19
|
+
type: "dynamic",
|
|
20
|
+
name: optionalCatchAll[1],
|
|
21
|
+
catchAll: true,
|
|
22
|
+
optional: true
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
const catchAll = part.match(/^\[\.\.\.([A-Za-z0-9_$-]+)\]$/);
|
|
26
|
+
if (catchAll) {
|
|
27
|
+
return {
|
|
28
|
+
type: "dynamic",
|
|
29
|
+
name: catchAll[1],
|
|
30
|
+
catchAll: true,
|
|
31
|
+
optional: false
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
const dynamic = part.match(/^\[([A-Za-z0-9_$-]+)\]$/) || part.match(/^:([A-Za-z0-9_$-]+)$/);
|
|
35
|
+
if (dynamic) {
|
|
36
|
+
return {
|
|
37
|
+
type: "dynamic",
|
|
38
|
+
name: dynamic[1],
|
|
39
|
+
catchAll: false,
|
|
40
|
+
optional: false
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
const star = part.match(/^\*([A-Za-z0-9_$-]+)(\?)?$/);
|
|
44
|
+
if (star) {
|
|
45
|
+
return {
|
|
46
|
+
type: "dynamic",
|
|
47
|
+
name: star[1],
|
|
48
|
+
catchAll: true,
|
|
49
|
+
optional: !!star[2]
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
type: "static",
|
|
54
|
+
value: decodePathSegment(part)
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, parseRoutePattern, "parseRoutePattern");
|
|
59
|
+
function matchSegmentParts(segments, parts, allowTrailingSegments = false) {
|
|
60
|
+
const params = {};
|
|
61
|
+
if (segments.length === 0) {
|
|
62
|
+
return parts.length === 0 ? params : null;
|
|
63
|
+
}
|
|
64
|
+
let pathIndex = 0;
|
|
65
|
+
for (const segment of segments) {
|
|
66
|
+
if (segment.type === "static") {
|
|
67
|
+
if (decodePathSegment(parts[pathIndex] || "") !== segment.value) return null;
|
|
68
|
+
pathIndex++;
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
if (segment.catchAll) {
|
|
72
|
+
const remaining = parts.slice(pathIndex).map(decodePathSegment);
|
|
73
|
+
if (remaining.length === 0 && !segment.optional) return null;
|
|
74
|
+
params[segment.name] = remaining.join("/");
|
|
75
|
+
pathIndex = parts.length;
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
const value = parts[pathIndex];
|
|
79
|
+
if (!value) return null;
|
|
80
|
+
params[segment.name] = decodePathSegment(value);
|
|
81
|
+
pathIndex++;
|
|
82
|
+
}
|
|
83
|
+
return allowTrailingSegments || pathIndex === parts.length ? params : null;
|
|
84
|
+
}
|
|
85
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, matchSegmentParts, "matchSegmentParts");
|
|
86
|
+
function normalizePathname(value) {
|
|
87
|
+
const raw = value || "/";
|
|
88
|
+
let pathname = raw;
|
|
89
|
+
try {
|
|
90
|
+
pathname = new URL(raw, "http://farm.local").pathname;
|
|
91
|
+
} catch (e) {
|
|
92
|
+
pathname = raw.split(/[?#]/, 1)[0] || "/";
|
|
93
|
+
}
|
|
94
|
+
pathname = pathname.replace(/\\/g, "/").replace(/\/+/g, "/");
|
|
95
|
+
if (!pathname.startsWith("/")) pathname = `/${pathname}`;
|
|
96
|
+
if (pathname.length > 1) pathname = pathname.replace(/\/+$/, "");
|
|
97
|
+
return pathname || "/";
|
|
98
|
+
}
|
|
99
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, normalizePathname, "normalizePathname");
|
|
100
|
+
function splitPathname(pathname) {
|
|
101
|
+
return splitNormalizedPathname(normalizePathname(pathname));
|
|
102
|
+
}
|
|
103
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, splitPathname, "splitPathname");
|
|
104
|
+
function splitNormalizedPathname(pathname) {
|
|
105
|
+
return pathname.split("/").filter(Boolean);
|
|
106
|
+
}
|
|
107
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, splitNormalizedPathname, "splitNormalizedPathname");
|
|
108
|
+
function normalizeRoutePattern(value) {
|
|
109
|
+
let pathname = (value || "/").replace(/\\/g, "/").replace(/\/+/g, "/");
|
|
110
|
+
if (!pathname.startsWith("/")) pathname = `/${pathname}`;
|
|
111
|
+
if (pathname.length > 1) pathname = pathname.replace(/\/+$/, "");
|
|
112
|
+
return pathname || "/";
|
|
113
|
+
}
|
|
114
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, normalizeRoutePattern, "normalizeRoutePattern");
|
|
115
|
+
function splitRoutePattern(pattern) {
|
|
116
|
+
return normalizeRoutePattern(pattern).split("/").filter(Boolean);
|
|
117
|
+
}
|
|
118
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, splitRoutePattern, "splitRoutePattern");
|
|
119
|
+
function isRouteGroup(part) {
|
|
120
|
+
return part.startsWith("(") && part.endsWith(")");
|
|
121
|
+
}
|
|
122
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, isRouteGroup, "isRouteGroup");
|
|
123
|
+
function decodePathSegment(value) {
|
|
124
|
+
try {
|
|
125
|
+
return decodeURIComponent(value);
|
|
126
|
+
} catch (e2) {
|
|
127
|
+
return value;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, decodePathSegment, "decodePathSegment");
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
exports.parseRoutePattern = parseRoutePattern; exports.matchSegmentParts = matchSegmentParts; exports.normalizePathname = normalizePathname; exports.splitPathname = splitPathname; exports.splitNormalizedPathname = splitNormalizedPathname; exports.normalizeRoutePattern = normalizeRoutePattern;
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkFK6GO24Vcjs = require('./chunk-FK6GO24V.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunk7W3CPVXScjs = require('./chunk-7W3CPVXS.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
13
|
+
|
|
14
|
+
// src/theme/client.tsx
|
|
15
|
+
var _react = require('react');
|
|
16
|
+
function getHydrationSnapshot() {
|
|
17
|
+
if (typeof window !== "undefined" && _optionalChain([window, 'access', _ => _.__FARM_THEME__, 'optionalAccess', _2 => _2.serverSnapshot])) {
|
|
18
|
+
return window.__FARM_THEME__.serverSnapshot;
|
|
19
|
+
}
|
|
20
|
+
return _chunk7W3CPVXScjs.getFarmThemeServerSnapshot.call(void 0, );
|
|
21
|
+
}
|
|
22
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, getHydrationSnapshot, "getHydrationSnapshot");
|
|
23
|
+
function useTheme() {
|
|
24
|
+
const snapshot = _react.useSyncExternalStore.call(void 0, _chunkFK6GO24Vcjs.subscribeTheme, _chunkFK6GO24Vcjs.getTheme, getHydrationSnapshot);
|
|
25
|
+
return {
|
|
26
|
+
...snapshot,
|
|
27
|
+
setTheme: _chunkFK6GO24Vcjs.setTheme,
|
|
28
|
+
toggleTheme: _chunkFK6GO24Vcjs.toggleTheme
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, useTheme, "useTheme");
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
exports.useTheme = useTheme;
|