@farm.js/core 0.1.31 → 0.1.35
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/README.md +1 -1
- package/dist/agent-runtime.cjs +70 -15
- package/dist/agent-runtime.d.mts +4 -5
- package/dist/agent-runtime.d.ts +4 -5
- package/dist/agent-runtime.mjs +59 -4
- package/dist/api/route-manager.cjs +17 -14
- package/dist/api/route-manager.d.mts +6 -7
- package/dist/api/route-manager.d.ts +6 -7
- package/dist/api/route-manager.mjs +16 -13
- package/dist/api/runtime.cjs +12 -8
- package/dist/api/runtime.d.mts +4 -5
- package/dist/api/runtime.d.ts +4 -5
- package/dist/api/runtime.mjs +12 -8
- package/dist/api.cjs +20 -17
- package/dist/api.d.mts +7 -8
- package/dist/api.d.ts +7 -8
- package/dist/api.mjs +19 -16
- package/dist/{app-sUJ3jnTZ.d.ts → app-BXB3JZYc.d.ts} +38 -12
- package/dist/{app-DAuUTIZf.d.mts → app-D_j9AAVL.d.mts} +38 -12
- package/dist/app-markdown.cjs +8 -6
- package/dist/app-markdown.d.mts +6 -7
- package/dist/app-markdown.d.ts +6 -7
- package/dist/app-markdown.mjs +7 -5
- package/dist/cache.cjs +2 -2
- package/dist/cache.d.mts +10 -1
- package/dist/cache.d.ts +10 -1
- package/dist/cache.mjs +1 -1
- package/dist/{chunk-BXFWA23T.mjs → chunk-22LTEMGQ.mjs} +3 -3
- package/dist/{chunk-YZTASLPQ.cjs → chunk-27ZWSI3W.cjs} +2 -2
- package/dist/{chunk-WBIH66JK.mjs → chunk-2ELDTQRN.mjs} +5 -2
- package/dist/{chunk-K7CELQLK.cjs → chunk-2F2ER724.cjs} +54 -29
- package/dist/{chunk-O3DTUAX2.mjs → chunk-2G2NNLE2.mjs} +6 -77
- package/dist/{chunk-NRVGEI5I.mjs → chunk-2NNMOPDN.mjs} +4 -210
- package/dist/{chunk-CTV2TTNP.cjs → chunk-3BHT4WMP.cjs} +16 -87
- package/dist/chunk-3BU22U3M.cjs +237 -0
- package/dist/{chunk-MM5D6VLP.mjs → chunk-3KZS4SUS.mjs} +33 -14
- package/dist/{chunk-VA62MHFV.mjs → chunk-3PXS2MHU.mjs} +1 -1
- package/dist/chunk-3SDFA7UF.cjs +701 -0
- package/dist/{chunk-4IEPYMHF.mjs → chunk-3UEVPCGW.mjs} +1 -1
- package/dist/{chunk-MXDTKXO6.cjs → chunk-3UH7MRCP.cjs} +73 -26
- package/dist/{chunk-7QOCTYBS.mjs → chunk-4JHOT46A.mjs} +37 -1
- package/dist/{chunk-6L6DQR5W.mjs → chunk-4KU5Q7C2.mjs} +917 -305
- package/dist/{chunk-3FCFQP5V.cjs → chunk-4MMGO7YW.cjs} +25 -25
- package/dist/{chunk-5HGR3W6O.mjs → chunk-5SJWVY6R.mjs} +8 -0
- package/dist/{chunk-KZLND3D2.cjs → chunk-62XKI4Z3.cjs} +7 -5
- package/dist/{chunk-FJZ3DQLK.mjs → chunk-6DU6UFUE.mjs} +13 -12
- package/dist/{chunk-TEN4FIZU.mjs → chunk-6ETPZTJI.mjs} +513 -3
- package/dist/{chunk-VUMAE7NC.mjs → chunk-6TJOML4E.mjs} +92 -31
- package/dist/{chunk-3ATMYLLJ.mjs → chunk-6WCPV6G2.mjs} +1 -1
- package/dist/{chunk-FYRBX5IY.cjs → chunk-73MC7ZL6.cjs} +2 -2
- package/dist/chunk-75RZHGLS.cjs +135 -0
- package/dist/{chunk-QZRVZSPN.cjs → chunk-77GNHH2Z.cjs} +3 -3
- package/dist/{chunk-FXUUWYAX.cjs → chunk-7GLPRTTF.cjs} +12 -2
- package/dist/{chunk-A777V5WU.cjs → chunk-7L5V3KQO.cjs} +2 -2
- package/dist/{chunk-4ZQQL4IU.mjs → chunk-AHGECQEW.mjs} +1 -1
- package/dist/{chunk-RG3ZOTG5.cjs → chunk-AI7QMY7O.cjs} +10 -3
- package/dist/{chunk-YMCXWPWK.mjs → chunk-BCMSYSN2.mjs} +4 -1
- package/dist/{chunk-I6XDAKWQ.mjs → chunk-BTHHUD7Q.mjs} +14 -0
- package/dist/{chunk-LI2LMOLR.mjs → chunk-C35ZBVRD.mjs} +12 -3
- package/dist/chunk-C4SPBWFM.cjs +26 -0
- package/dist/{chunk-YQVSHTMR.mjs → chunk-CP6X4AEU.mjs} +1 -1
- package/dist/{chunk-QZCT2CQ4.mjs → chunk-CXEN47J3.mjs} +64 -2
- package/dist/{chunk-WNLBF77X.cjs → chunk-D227TIEN.cjs} +28 -16
- package/dist/{chunk-ROUTX2E5.cjs → chunk-DBNKI4NF.cjs} +12 -3
- package/dist/{chunk-J3LOGE4T.cjs → chunk-DQQOKWYA.cjs} +5 -5
- package/dist/chunk-E5GNDG5F.mjs +701 -0
- package/dist/{chunk-X7KZBF63.cjs → chunk-EFCQPQMG.cjs} +40 -4
- package/dist/{chunk-K3F2E6GS.cjs → chunk-EJQT6KZN.cjs} +2 -2
- package/dist/{chunk-3LUF2PE2.cjs → chunk-EK4QAEFZ.cjs} +67 -5
- package/dist/{chunk-VVBO3QH7.mjs → chunk-ENLZ4R3Y.mjs} +10 -1
- package/dist/{chunk-KJ2TIHZZ.cjs → chunk-EUV4YR3V.cjs} +3 -2
- package/dist/{chunk-E76XC6ZG.mjs → chunk-EZDQRNQ7.mjs} +2 -2
- package/dist/{chunk-TOVMYGYW.mjs → chunk-F2SE2VDO.mjs} +1 -1
- package/dist/{chunk-MNUGPHLN.mjs → chunk-F6Z3Y5KL.mjs} +5 -3
- package/dist/{chunk-DFLLARUK.cjs → chunk-F7JZENPF.cjs} +35 -34
- package/dist/{chunk-BSPQVJ4A.mjs → chunk-FDR64H6B.mjs} +13 -0
- package/dist/{chunk-5OVTOKGH.cjs → chunk-FFFW3OQ7.cjs} +2 -2
- package/dist/{chunk-D4JE5NNV.cjs → chunk-FNO7A7CM.cjs} +5 -5
- package/dist/{chunk-Z5HIWVDP.cjs → chunk-FTFYRMQQ.cjs} +80 -91
- package/dist/chunk-FZ6YYU2W.mjs +65 -0
- package/dist/{chunk-X7WVQMIB.mjs → chunk-G5RT7EXW.mjs} +11 -5
- package/dist/{chunk-IXUY2F5U.mjs → chunk-GCXWJJKH.mjs} +4 -7
- package/dist/{chunk-ES4B2IXW.cjs → chunk-GFHLGIYC.cjs} +8 -8
- package/dist/{chunk-SORB3MAR.cjs → chunk-GQ3Z3IZI.cjs} +17 -17
- package/dist/{chunk-75WGQVQA.cjs → chunk-HITLGIAO.cjs} +10 -1
- package/dist/{chunk-HBTUGXHS.cjs → chunk-HLJ6MBUZ.cjs} +7 -4
- package/dist/{chunk-JLCQGPXE.mjs → chunk-HMIJDL7S.mjs} +51 -62
- package/dist/{chunk-F6XEGFHO.mjs → chunk-HUMR6LSU.mjs} +11 -1
- package/dist/{chunk-IMB4PIAR.cjs → chunk-ICUQICNC.cjs} +1441 -828
- package/dist/{chunk-ZCU4NZ3M.cjs → chunk-IE7XCHH3.cjs} +4 -4
- package/dist/{chunk-I26CZYPV.cjs → chunk-IHNIDL6H.cjs} +50 -7
- package/dist/{chunk-2FQHH5SC.mjs → chunk-IHNMMXHV.mjs} +49 -24
- package/dist/{chunk-YVGAEAA5.cjs → chunk-IPXLADVO.cjs} +522 -12
- package/dist/{chunk-VHJGDMCG.cjs → chunk-IWZKTWHZ.cjs} +2 -2
- package/dist/chunk-JG6DJF5A.mjs +238 -0
- package/dist/{chunk-KROWKCUH.cjs → chunk-JGLC4TO3.cjs} +8 -1
- package/dist/{chunk-5TISYEQF.mjs → chunk-JM5XPKWH.mjs} +10 -3
- package/dist/{chunk-BJJATPEC.mjs → chunk-KN7K4VQN.mjs} +1 -1
- package/dist/{chunk-WPYFSQKK.cjs → chunk-KNBBQHO2.cjs} +15 -1
- package/dist/{chunk-XWAWFQFS.cjs → chunk-KXWRO25S.cjs} +7 -4
- package/dist/chunk-LSKZMJMP.cjs +65 -0
- package/dist/{chunk-2N5PX3LS.mjs → chunk-LYV44OIR.mjs} +7 -1
- package/dist/chunk-M7MKQXAF.cjs +87 -0
- package/dist/{chunk-IV6CQY7O.mjs → chunk-MSSFIQGM.mjs} +63 -13
- package/dist/{chunk-KH7BN726.cjs → chunk-N4UOK6ZI.cjs} +8 -2
- package/dist/{chunk-JNGIWIY6.mjs → chunk-NPC7VWJE.mjs} +2 -2
- package/dist/chunk-NRDBW4MP.mjs +45 -0
- package/dist/{chunk-ILWLPEVO.mjs → chunk-NRSN7G7E.mjs} +2 -2
- package/dist/chunk-OFZUJMCU.mjs +601 -0
- package/dist/{chunk-L4DVIHOC.mjs → chunk-OKZUAXHF.mjs} +1 -1
- package/dist/{chunk-EM6SBQKM.cjs → chunk-OMVAU7NT.cjs} +27 -2
- package/dist/{chunk-AHAJGAYD.mjs → chunk-PDOCJ6RY.mjs} +2 -2
- package/dist/{chunk-IFI5FXEZ.cjs → chunk-PFQKNERH.cjs} +562 -251
- package/dist/{chunk-S5GDHOE4.mjs → chunk-PZNL3WEG.mjs} +48 -5
- package/dist/{chunk-GZYH4OER.mjs → chunk-Q3VLETLE.mjs} +2 -2
- package/dist/{chunk-WG2KHOMN.mjs → chunk-QAU5JD57.mjs} +571 -260
- package/dist/{chunk-FV45CKBC.mjs → chunk-QCFBDFRS.mjs} +1 -1
- package/dist/{chunk-75BRBIFP.cjs → chunk-QCVE2OCI.cjs} +5 -8
- package/dist/{chunk-6ZCMSZ5U.mjs → chunk-QE6VAKLT.mjs} +1 -1
- package/dist/{chunk-QG5HNS7P.mjs → chunk-QORUJDIV.mjs} +2 -2
- package/dist/chunk-RHAZ22ZN.mjs +87 -0
- package/dist/{chunk-CUMINO7Z.cjs → chunk-RU3M2FIK.cjs} +18 -14
- package/dist/{chunk-DGXN3L4D.mjs → chunk-SAZVVAJH.mjs} +5 -5
- package/dist/{chunk-MKMBQSNQ.mjs → chunk-SC2WYWPF.mjs} +3 -3
- package/dist/{chunk-QCFFHV5H.mjs → chunk-SMHH4VDG.mjs} +1 -1
- package/dist/{chunk-UAFSBWNT.mjs → chunk-SOMHP6GF.mjs} +63 -16
- package/dist/{chunk-ND224OE2.cjs → chunk-TKSCR644.cjs} +34 -15
- package/dist/{chunk-4V7GIE2U.mjs → chunk-UAORZ7QA.mjs} +3 -3
- package/dist/{chunk-IQXFRNY2.cjs → chunk-UFDAAQFX.cjs} +2 -2
- package/dist/{chunk-6VYZOPOT.mjs → chunk-UJD4PHYB.mjs} +15 -11
- package/dist/{chunk-ZHVYQL3H.cjs → chunk-ULAWS2PA.cjs} +97 -36
- package/dist/{chunk-5ZSWG4UX.cjs → chunk-UXFQ3UDA.cjs} +14 -1
- package/dist/{chunk-MPEYMSCF.cjs → chunk-VFQT3LAO.cjs} +5 -5
- package/dist/{chunk-2FXWWUE5.cjs → chunk-VZJR7UTG.cjs} +6 -6
- package/dist/{chunk-2AKFKCHA.mjs → chunk-W7LF2J2S.mjs} +1 -1
- package/dist/chunk-WWFTAUFG.cjs +45 -0
- package/dist/{chunk-JBC2FKRW.mjs → chunk-WWIKMBRN.mjs} +2 -1
- package/dist/{chunk-75DYEVXI.cjs → chunk-X6W5FFH6.cjs} +11 -11
- package/dist/{chunk-EXLKRR4U.cjs → chunk-XBML5KMG.cjs} +12 -12
- package/dist/{chunk-PZNCMPJF.cjs → chunk-XCACDAZZ.cjs} +18 -12
- package/dist/{chunk-JATSG2ZO.mjs → chunk-XCMCS4DA.mjs} +15 -3
- package/dist/{chunk-UJ2C4ICS.cjs → chunk-XJXBIP67.cjs} +4 -4
- package/dist/{chunk-XF7Q24PF.mjs → chunk-Y7RKTKYI.mjs} +25 -0
- package/dist/{chunk-VYZSOYR4.cjs → chunk-YC6V7PWE.cjs} +1 -1
- package/dist/{chunk-F6OHXPWR.mjs → chunk-YFILVET3.mjs} +8 -1
- package/dist/{chunk-JLRDISQL.cjs → chunk-YKX5BK66.cjs} +7 -7
- package/dist/{chunk-DYEJQTDN.cjs → chunk-YSCV4SJF.cjs} +4 -4
- package/dist/chunk-YSLWRWWP.cjs +601 -0
- package/dist/{chunk-5LJCOSKT.mjs → chunk-YULD7ICZ.mjs} +1 -1
- package/dist/{chunk-2SDO73HK.cjs → chunk-YWN746US.cjs} +64 -14
- package/dist/chunk-Z2HLU4IX.cjs +238 -0
- package/dist/chunk-ZLAT2CWY.mjs +135 -0
- package/dist/{chunk-T5CERMEH.cjs → chunk-ZXGAFZDO.cjs} +2 -2
- package/dist/{client-plugins-BX2ptm4H.d.mts → client-plugins-CvIslxWi.d.mts} +232 -8
- package/dist/{client-plugins-BmxM5KW_.d.ts → client-plugins-HIyulDym.d.ts} +232 -8
- package/dist/client-plugins.d.mts +4 -5
- package/dist/client-plugins.d.ts +4 -5
- package/dist/client.cjs +10 -10
- package/dist/client.d.mts +8 -9
- package/dist/client.d.ts +8 -9
- package/dist/client.mjs +9 -9
- package/dist/config.d.mts +4 -5
- package/dist/config.d.ts +4 -5
- package/dist/{devtools-EWRDHCD5.cjs → devtools-EAUY43BS.cjs} +14 -12
- package/dist/{devtools-BPBCYOU6.mjs → devtools-EE5RIBTH.mjs} +13 -11
- package/dist/docs.cjs +17 -15
- package/dist/docs.d.mts +46 -4
- package/dist/docs.d.ts +46 -4
- package/dist/docs.mjs +16 -14
- package/dist/environment/vite.cjs +2 -2
- package/dist/environment/vite.mjs +1 -1
- package/dist/headers.cjs +4 -4
- package/dist/headers.mjs +3 -3
- package/dist/i18n/client.cjs +14 -13
- package/dist/i18n/client.d.mts +2 -2
- package/dist/i18n/client.d.ts +2 -2
- package/dist/i18n/client.mjs +5 -4
- package/dist/i18n/index.cjs +3 -2
- package/dist/i18n/index.d.mts +3 -3
- package/dist/i18n/index.d.ts +3 -3
- package/dist/i18n/index.mjs +2 -1
- package/dist/i18n/server.cjs +6 -5
- package/dist/i18n/server.d.mts +5 -5
- package/dist/i18n/server.d.ts +5 -5
- package/dist/i18n/server.mjs +5 -4
- package/dist/image/server.cjs +3 -3
- package/dist/image/server.mjs +2 -2
- package/dist/image/sharp.cjs +10 -10
- package/dist/image/sharp.mjs +2 -2
- package/dist/{index-a-8Z5kZU.d.mts → index-BJJfLxJo.d.mts} +2 -2
- package/dist/{index-BWVfxIsO.d.ts → index-CwoOP-MW.d.ts} +2 -2
- package/dist/index.cjs +75 -60
- package/dist/index.d.mts +21 -22
- package/dist/index.d.ts +21 -22
- package/dist/index.mjs +79 -64
- package/dist/integrations.cjs +7 -4
- package/dist/integrations.d.mts +4 -5
- package/dist/integrations.d.ts +4 -5
- package/dist/integrations.mjs +8 -5
- package/dist/internal/app-markdown-runtime.cjs +7 -5
- package/dist/internal/app-markdown-runtime.d.mts +17 -7
- package/dist/internal/app-markdown-runtime.d.ts +17 -7
- package/dist/internal/app-markdown-runtime.mjs +6 -4
- package/dist/internal/build-runtime.cjs +44 -41
- package/dist/internal/build-runtime.d.mts +6 -7
- package/dist/internal/build-runtime.d.ts +6 -7
- package/dist/internal/build-runtime.mjs +43 -40
- package/dist/internal/cli-runtime.cjs +23 -20
- package/dist/internal/cli-runtime.mjs +22 -19
- package/dist/internal/client-error-overlay.cjs +6 -6
- package/dist/internal/client-error-overlay.mjs +2 -2
- package/dist/internal/client-runtime.cjs +5 -3
- package/dist/internal/client-runtime.d.mts +9 -1
- package/dist/internal/client-runtime.d.ts +9 -1
- package/dist/internal/client-runtime.mjs +4 -2
- package/dist/internal/compression-runtime.d.mts +4 -5
- package/dist/internal/compression-runtime.d.ts +4 -5
- package/dist/internal/config-runtime.cjs +14 -12
- package/dist/internal/config-runtime.d.mts +5 -6
- package/dist/internal/config-runtime.d.ts +5 -6
- package/dist/internal/config-runtime.mjs +13 -11
- package/dist/internal/infra-analytics-runtime.cjs +4 -4
- package/dist/internal/infra-analytics-runtime.mjs +2 -2
- package/dist/internal/isolated-boundary.cjs +3 -2
- package/dist/internal/isolated-boundary.d.mts +1 -0
- package/dist/internal/isolated-boundary.d.ts +1 -0
- package/dist/internal/isolated-boundary.mjs +2 -1
- package/dist/internal/metadata-image-runtime.cjs +3 -3
- package/dist/internal/metadata-image-runtime.mjs +2 -2
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +61 -31
- package/dist/internal/production-runtime.d.mts +165 -18
- package/dist/internal/production-runtime.d.ts +165 -18
- package/dist/internal/production-runtime.mjs +57 -27
- package/dist/internal/request-cookies.cjs +4 -2
- package/dist/internal/request-cookies.d.mts +9 -1
- package/dist/internal/request-cookies.d.ts +9 -1
- package/dist/internal/request-cookies.mjs +3 -1
- package/dist/internal/server-tree.cjs +12 -0
- package/dist/internal/server-tree.d.mts +27 -0
- package/dist/internal/server-tree.d.ts +27 -0
- package/dist/internal/server-tree.mjs +12 -0
- package/dist/markdown.cjs +4 -4
- package/dist/markdown.d.mts +4 -5
- package/dist/markdown.d.ts +4 -5
- package/dist/markdown.mjs +3 -3
- package/dist/{metadata-DsEaK7mQ.d.mts → metadata-BnLDsUOS.d.ts} +16 -2
- package/dist/{metadata-fwZ3gfG6.d.ts → metadata-WGpBYcGn.d.mts} +16 -2
- package/dist/middleware.cjs +18 -8
- package/dist/middleware.d.mts +27 -9
- package/dist/middleware.d.ts +27 -9
- package/dist/middleware.mjs +18 -8
- package/dist/navigation.cjs +7 -7
- package/dist/navigation.d.mts +7 -8
- package/dist/navigation.d.ts +7 -8
- package/dist/navigation.mjs +6 -6
- package/dist/{nitro-NAKCRVHX.mjs → nitro-MXRDCXWZ.mjs} +5 -5
- package/dist/{nitro-VYDZGYFY.cjs → nitro-OVPLKPE2.cjs} +7 -7
- package/dist/{observability-BupkiN0m.d.mts → observability-CoXunYhS.d.mts} +4 -3
- package/dist/{observability-BupkiN0m.d.ts → observability-CoXunYhS.d.ts} +4 -3
- package/dist/observability.d.mts +1 -1
- package/dist/observability.d.ts +1 -1
- package/dist/plugin.cjs +39 -36
- package/dist/plugin.d.mts +4 -5
- package/dist/plugin.d.ts +4 -5
- package/dist/plugin.mjs +38 -35
- package/dist/{production-runtime-Baqgwtvc.d.mts → production-runtime-0sRnuYc-.d.mts} +11 -4
- package/dist/{production-runtime-DNkpFnmg.d.ts → production-runtime-Crq6CJ-2.d.ts} +11 -4
- package/dist/query/client.cjs +8 -8
- package/dist/query/client.mjs +4 -4
- package/dist/{render-plan-rkIK9wd9.d.ts → render-plan-8ozZh2Qv.d.ts} +1 -1
- package/dist/{render-plan-DhwQnmmX.d.mts → render-plan-gs9GGPzw.d.mts} +1 -1
- package/dist/renderer/react/server.cjs +10 -4
- package/dist/renderer/react/server.d.mts +2 -1
- package/dist/renderer/react/server.d.ts +2 -1
- package/dist/renderer/react/server.mjs +7 -1
- package/dist/renderer-client.cjs +40 -20
- package/dist/renderer-client.d.mts +6 -7
- package/dist/renderer-client.d.ts +6 -7
- package/dist/renderer-client.mjs +29 -9
- package/dist/renderer.d.mts +2 -0
- package/dist/renderer.d.ts +2 -0
- package/dist/{request-BcY4RYPC.d.ts → request-B5G8rLBH.d.ts} +7 -2
- package/dist/{request-CFy1BltJ.d.mts → request-fkhiynXe.d.mts} +7 -2
- package/dist/request.cjs +2 -2
- package/dist/request.d.mts +5 -6
- package/dist/request.d.ts +5 -6
- package/dist/request.mjs +1 -1
- package/dist/{resolver-PPEeiJ6M.d.ts → resolver-DadfRL6F.d.ts} +1 -1
- package/dist/{resolver-DhW0CqZN.d.mts → resolver-khasx3fU.d.mts} +1 -1
- package/dist/{route-rendering-BkS0TBlB.d.mts → route-rendering-CLnS7AZj.d.mts} +1 -1
- package/dist/{route-rendering-D4XpMjam.d.ts → route-rendering-lS5nUMua.d.ts} +1 -1
- package/dist/{router-Cq7BcZxg.d.ts → router-4iuiYnOW.d.ts} +1 -1
- package/dist/{router-C4zPlC3V.d.mts → router-ifU8Dui1.d.mts} +1 -1
- package/dist/routes.cjs +3 -3
- package/dist/routes.d.mts +4 -5
- package/dist/routes.d.ts +4 -5
- package/dist/routes.mjs +2 -2
- package/dist/{runtime-BirxPwbZ.d.ts → runtime-BgDQzBiu.d.ts} +2 -2
- package/dist/{runtime-AOJge4vQ.d.mts → runtime-CV2UCV-5.d.mts} +2 -2
- package/dist/server-action-security.cjs +3 -3
- package/dist/server-action-security.mjs +2 -2
- package/dist/server-fn.cjs +5 -5
- package/dist/server-fn.mjs +4 -4
- package/dist/server-plugins.cjs +4 -4
- package/dist/server-plugins.d.mts +5 -6
- package/dist/server-plugins.d.ts +5 -6
- package/dist/server-plugins.mjs +3 -3
- package/dist/server-query-client.cjs +3 -3
- package/dist/server-query-client.mjs +2 -2
- package/dist/server-query.cjs +6 -6
- package/dist/server-query.mjs +5 -5
- package/dist/server.cjs +66 -63
- package/dist/server.d.mts +13 -14
- package/dist/server.d.ts +13 -14
- package/dist/server.mjs +43 -40
- package/dist/{spa-router-DzPZH-AO.d.mts → spa-router-Bq7VCOwx.d.mts} +3 -3
- package/dist/{spa-router-B1HI3X9k.d.ts → spa-router-DaJk5Re4.d.ts} +3 -3
- package/dist/testing.cjs +22 -20
- package/dist/testing.d.mts +4 -5
- package/dist/testing.d.ts +4 -5
- package/dist/testing.mjs +18 -16
- package/dist/theme/server.cjs +4 -3
- package/dist/theme/server.mjs +3 -2
- package/dist/{types-Z0aotQ8w.d.mts → types-CnH8DOqo.d.mts} +1 -1
- package/dist/{types-Z0aotQ8w.d.ts → types-CnH8DOqo.d.ts} +1 -1
- package/dist/{utils-DMD1Hzta.d.ts → utils-BXLmFsVR.d.ts} +1 -1
- package/dist/{utils-CEBktlBG.d.mts → utils-XJn0c9bj.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +39 -36
- package/dist/vite.d.mts +4 -5
- package/dist/vite.d.ts +4 -5
- package/dist/vite.mjs +38 -35
- package/dist/{workflows-CR9ex-gz.d.ts → workflows-jZ4BcdoZ.d.mts} +1 -1
- package/dist/{workflows-CR9ex-gz.d.mts → workflows-jZ4BcdoZ.d.ts} +1 -1
- package/dist/workflows.cjs +3 -3
- package/dist/workflows.d.mts +1 -1
- package/dist/workflows.d.ts +1 -1
- package/dist/workflows.mjs +2 -2
- package/package.json +10 -2
- package/dist/chunk-22GUSVNJ.cjs +0 -351
- package/dist/chunk-5MKEDGLD.cjs +0 -53
- package/dist/chunk-O6XNAMBV.mjs +0 -53
- package/dist/chunk-SWN467MP.cjs +0 -18
- package/dist/chunk-XGC343EY.cjs +0 -443
- package/dist/chunk-ZSH2Y4LN.mjs +0 -351
- package/dist/types-DFbjpjXX.d.mts +0 -105
- package/dist/types-DFbjpjXX.d.ts +0 -105
- /package/dist/{chunk-SUIBNSNO.cjs → chunk-SJNMVDDF.cjs} +0 -0
- /package/dist/{chunk-LNZ7JZUS.mjs → chunk-UDNPLXW7.mjs} +0 -0
package/dist/chunk-ZSH2Y4LN.mjs
DELETED
|
@@ -1,351 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__name
|
|
3
|
-
} from "./chunk-LPEX4YW6.mjs";
|
|
4
|
-
|
|
5
|
-
// src/environment-vite.ts
|
|
6
|
-
var ENVIRONMENT_IMPORTS = /* @__PURE__ */ new Set([
|
|
7
|
-
"@farm.js/core",
|
|
8
|
-
"@farm.js/core/environment",
|
|
9
|
-
"@farm.js/core/server"
|
|
10
|
-
]);
|
|
11
|
-
var ENVIRONMENT_FUNCTIONS = /* @__PURE__ */ new Set([
|
|
12
|
-
"createServerOnlyFn",
|
|
13
|
-
"createClientOnlyFn",
|
|
14
|
-
"createIsomorphicFn"
|
|
15
|
-
]);
|
|
16
|
-
var MODULE_EXTENSION_RE = /\.[cm]?[jt]sx?$/;
|
|
17
|
-
function transformEnvironmentFunctions(options) {
|
|
18
|
-
if (!isTransformableModule(options.id) || !containsEnvironmentFunction(options.code)) {
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
let output = options.code;
|
|
22
|
-
let transformed = false;
|
|
23
|
-
for (let pass = 0; pass < 20; pass++) {
|
|
24
|
-
const ast = options.parse(output);
|
|
25
|
-
const bindings = findEnvironmentFunctionBindings(ast);
|
|
26
|
-
if (bindings.named.size === 0 && bindings.namespaces.size === 0) break;
|
|
27
|
-
const calls = findEnvironmentCalls(ast, bindings);
|
|
28
|
-
if (calls.length === 0) break;
|
|
29
|
-
const innermostCalls = calls.filter(
|
|
30
|
-
(call) => !calls.some(
|
|
31
|
-
(candidate) => candidate !== call && candidate.node.start > call.node.start && candidate.node.end < call.node.end
|
|
32
|
-
)
|
|
33
|
-
);
|
|
34
|
-
const replacements = innermostCalls.map(
|
|
35
|
-
(call) => createReplacement(output, options.id, options.environment, call)
|
|
36
|
-
);
|
|
37
|
-
output = applyReplacements(output, replacements);
|
|
38
|
-
transformed = true;
|
|
39
|
-
}
|
|
40
|
-
if (!transformed) return null;
|
|
41
|
-
const remainingAst = options.parse(output);
|
|
42
|
-
const remainingBindings = findEnvironmentFunctionBindings(remainingAst);
|
|
43
|
-
if (findEnvironmentCalls(remainingAst, remainingBindings).length > 0) {
|
|
44
|
-
throw transformError(options.id, "environment functions are nested too deeply");
|
|
45
|
-
}
|
|
46
|
-
return { code: output };
|
|
47
|
-
}
|
|
48
|
-
__name(transformEnvironmentFunctions, "transformEnvironmentFunctions");
|
|
49
|
-
function farmEnvironmentFunctionsPlugin() {
|
|
50
|
-
return {
|
|
51
|
-
name: "farm:environment-functions",
|
|
52
|
-
enforce: "post",
|
|
53
|
-
transform(code, id, transformOptions) {
|
|
54
|
-
const result = transformEnvironmentFunctions({
|
|
55
|
-
code,
|
|
56
|
-
id,
|
|
57
|
-
environment: resolveBuildEnvironment(
|
|
58
|
-
this,
|
|
59
|
-
transformOptions?.ssr
|
|
60
|
-
),
|
|
61
|
-
parse: /* @__PURE__ */ __name((source) => this.parse(source), "parse")
|
|
62
|
-
});
|
|
63
|
-
return result ? { code: result.code, map: null } : null;
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
__name(farmEnvironmentFunctionsPlugin, "farmEnvironmentFunctionsPlugin");
|
|
68
|
-
function resolveBuildEnvironment(context, ssr) {
|
|
69
|
-
if (context.environment?.name === "client") return "client";
|
|
70
|
-
if (context.environment?.name === "rsc" || context.environment?.name === "ssr") {
|
|
71
|
-
return "server";
|
|
72
|
-
}
|
|
73
|
-
return ssr ? "server" : "client";
|
|
74
|
-
}
|
|
75
|
-
__name(resolveBuildEnvironment, "resolveBuildEnvironment");
|
|
76
|
-
function findEnvironmentFunctionBindings(ast) {
|
|
77
|
-
const named = /* @__PURE__ */ new Map();
|
|
78
|
-
const namespaces = /* @__PURE__ */ new Set();
|
|
79
|
-
const body = Array.isArray(ast.body) ? ast.body : [];
|
|
80
|
-
for (const statement of body) {
|
|
81
|
-
if (!isAstNode(statement) || statement.type !== "ImportDeclaration") continue;
|
|
82
|
-
const source = isAstNode(statement.source) ? statement.source.value : void 0;
|
|
83
|
-
if (typeof source !== "string" || !ENVIRONMENT_IMPORTS.has(source)) continue;
|
|
84
|
-
const specifiers = Array.isArray(statement.specifiers) ? statement.specifiers : [];
|
|
85
|
-
for (const specifier of specifiers) {
|
|
86
|
-
if (!isAstNode(specifier) || !isAstNode(specifier.local)) continue;
|
|
87
|
-
const localName = specifier.local.name;
|
|
88
|
-
if (typeof localName !== "string") continue;
|
|
89
|
-
if (specifier.type === "ImportNamespaceSpecifier") {
|
|
90
|
-
namespaces.add(localName);
|
|
91
|
-
continue;
|
|
92
|
-
}
|
|
93
|
-
if (specifier.type !== "ImportSpecifier" || !isAstNode(specifier.imported)) continue;
|
|
94
|
-
const importedName = specifier.imported.name ?? specifier.imported.value;
|
|
95
|
-
if (isEnvironmentFunctionKind(importedName)) {
|
|
96
|
-
named.set(localName, importedName);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
return { named, namespaces };
|
|
101
|
-
}
|
|
102
|
-
__name(findEnvironmentFunctionBindings, "findEnvironmentFunctionBindings");
|
|
103
|
-
function findEnvironmentCalls(ast, bindings) {
|
|
104
|
-
const calls = [];
|
|
105
|
-
walkAst(ast, (node, ancestors) => {
|
|
106
|
-
if (node.type !== "CallExpression" || !isAstNode(node.callee)) return;
|
|
107
|
-
if (node.callee.type === "Identifier" && typeof node.callee.name === "string") {
|
|
108
|
-
const kind = bindings.named.get(node.callee.name);
|
|
109
|
-
if (kind && !isNameShadowed(node.callee.name, ancestors)) calls.push({ node, kind });
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
if (node.callee.type !== "MemberExpression" || node.callee.computed === true || !isAstNode(node.callee.object) || !isAstNode(node.callee.property) || node.callee.object.type !== "Identifier" || node.callee.property.type !== "Identifier" || typeof node.callee.object.name !== "string" || typeof node.callee.property.name !== "string" || !bindings.namespaces.has(node.callee.object.name) || isNameShadowed(node.callee.object.name, ancestors) || !isEnvironmentFunctionKind(node.callee.property.name)) {
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
calls.push({ node, kind: node.callee.property.name });
|
|
116
|
-
});
|
|
117
|
-
return calls;
|
|
118
|
-
}
|
|
119
|
-
__name(findEnvironmentCalls, "findEnvironmentCalls");
|
|
120
|
-
function createReplacement(code, id, environment, call) {
|
|
121
|
-
const args = Array.isArray(call.node.arguments) ? call.node.arguments : [];
|
|
122
|
-
if (args.length !== 1 || !isAstNode(args[0]) || args[0].type === "SpreadElement") {
|
|
123
|
-
throw transformError(id, `${call.kind}() requires exactly one static argument`);
|
|
124
|
-
}
|
|
125
|
-
let replacement;
|
|
126
|
-
if (call.kind === "createIsomorphicFn") {
|
|
127
|
-
replacement = selectIsomorphicImplementation(code, id, environment, args[0]);
|
|
128
|
-
} else {
|
|
129
|
-
const expected = call.kind === "createServerOnlyFn" ? "server" : "client";
|
|
130
|
-
replacement = environment === expected ? readNode(code, args[0]) : `(0, ${readNode(code, call.node.callee)})(undefined, ${JSON.stringify(environment)})`;
|
|
131
|
-
}
|
|
132
|
-
return {
|
|
133
|
-
start: call.node.start,
|
|
134
|
-
end: call.node.end,
|
|
135
|
-
code: `(${replacement})`
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
__name(createReplacement, "createReplacement");
|
|
139
|
-
function selectIsomorphicImplementation(code, id, environment, optionsNode) {
|
|
140
|
-
if (optionsNode.type !== "ObjectExpression") {
|
|
141
|
-
throw transformError(id, "createIsomorphicFn() requires an inline options object");
|
|
142
|
-
}
|
|
143
|
-
const properties = Array.isArray(optionsNode.properties) ? optionsNode.properties : [];
|
|
144
|
-
if (properties.some((property) => isAstNode(property) && property.type === "SpreadElement")) {
|
|
145
|
-
throw transformError(id, "createIsomorphicFn() does not support spread properties");
|
|
146
|
-
}
|
|
147
|
-
let selectedProperty;
|
|
148
|
-
for (const property of properties) {
|
|
149
|
-
if (!isAstNode(property) || property.type !== "Property" || property.computed === true) {
|
|
150
|
-
continue;
|
|
151
|
-
}
|
|
152
|
-
const key = readPropertyName(property.key);
|
|
153
|
-
if (key === environment) selectedProperty = property;
|
|
154
|
-
}
|
|
155
|
-
if (!selectedProperty || !isAstNode(selectedProperty.value)) {
|
|
156
|
-
throw transformError(id, `createIsomorphicFn() requires a ${environment} implementation`);
|
|
157
|
-
}
|
|
158
|
-
if (selectedProperty.kind !== void 0 && selectedProperty.kind !== "init") {
|
|
159
|
-
throw transformError(id, "createIsomorphicFn() does not support getters or setters");
|
|
160
|
-
}
|
|
161
|
-
return selectedProperty.method === true ? renderObjectMethod(code, id, selectedProperty.value) : readNode(code, selectedProperty.value);
|
|
162
|
-
}
|
|
163
|
-
__name(selectIsomorphicImplementation, "selectIsomorphicImplementation");
|
|
164
|
-
function renderObjectMethod(code, id, functionNode) {
|
|
165
|
-
if (!isAstNode(functionNode.body) || !Array.isArray(functionNode.params)) {
|
|
166
|
-
throw transformError(id, "createIsomorphicFn() received an unsupported method");
|
|
167
|
-
}
|
|
168
|
-
const params = functionNode.params.map((param) => {
|
|
169
|
-
if (!isAstNode(param)) {
|
|
170
|
-
throw transformError(id, "createIsomorphicFn() received an unsupported parameter");
|
|
171
|
-
}
|
|
172
|
-
return readNode(code, param);
|
|
173
|
-
});
|
|
174
|
-
const asyncPrefix = functionNode.async === true ? "async " : "";
|
|
175
|
-
const generatorMarker = functionNode.generator === true ? "*" : "";
|
|
176
|
-
return `${asyncPrefix}function${generatorMarker}(${params.join(", ")}) ${readNode(code, functionNode.body)}`;
|
|
177
|
-
}
|
|
178
|
-
__name(renderObjectMethod, "renderObjectMethod");
|
|
179
|
-
function applyReplacements(code, replacements) {
|
|
180
|
-
let output = code;
|
|
181
|
-
for (const replacement of replacements.sort((left, right) => right.start - left.start)) {
|
|
182
|
-
output = output.slice(0, replacement.start) + replacement.code + output.slice(replacement.end);
|
|
183
|
-
}
|
|
184
|
-
return output;
|
|
185
|
-
}
|
|
186
|
-
__name(applyReplacements, "applyReplacements");
|
|
187
|
-
function walkAst(node, visit, ancestors = []) {
|
|
188
|
-
visit(node, ancestors);
|
|
189
|
-
const childAncestors = [...ancestors, node];
|
|
190
|
-
for (const [key, value] of Object.entries(node)) {
|
|
191
|
-
if (key === "start" || key === "end" || key === "loc" || key === "range") continue;
|
|
192
|
-
if (isAstNode(value)) {
|
|
193
|
-
walkAst(value, visit, childAncestors);
|
|
194
|
-
} else if (Array.isArray(value)) {
|
|
195
|
-
for (const item of value) {
|
|
196
|
-
if (isAstNode(item)) walkAst(item, visit, childAncestors);
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
__name(walkAst, "walkAst");
|
|
202
|
-
function isNameShadowed(name, ancestors) {
|
|
203
|
-
for (const [index, ancestor] of ancestors.entries()) {
|
|
204
|
-
if (isFunctionNode(ancestor)) {
|
|
205
|
-
const params = Array.isArray(ancestor.params) ? ancestor.params : [];
|
|
206
|
-
if (params.some((param) => patternContainsName(param, name))) return true;
|
|
207
|
-
if (patternContainsName(ancestor.id, name)) return true;
|
|
208
|
-
if (isAstNode(ancestor.body) && ancestors.slice(index + 1).includes(ancestor.body) && functionBodyDeclaresVarName(ancestor.body, name)) {
|
|
209
|
-
return true;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
if (ancestor.type === "CatchClause" && patternContainsName(ancestor.param, name)) {
|
|
213
|
-
return true;
|
|
214
|
-
}
|
|
215
|
-
if ((ancestor.type === "BlockStatement" || ancestor.type === "StaticBlock") && blockDeclaresName(ancestor, name)) {
|
|
216
|
-
return true;
|
|
217
|
-
}
|
|
218
|
-
if (loopDeclaresName(ancestor, name)) return true;
|
|
219
|
-
if (ancestor.type === "SwitchStatement" && ancestors.slice(index + 1).some((candidate) => candidate.type === "SwitchCase") && switchDeclaresName(ancestor, name)) {
|
|
220
|
-
return true;
|
|
221
|
-
}
|
|
222
|
-
if (ancestor.type === "ClassExpression" && patternContainsName(ancestor.id, name) && ancestors.slice(index + 1).some((candidate) => candidate.type === "ClassBody")) {
|
|
223
|
-
return true;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
return false;
|
|
227
|
-
}
|
|
228
|
-
__name(isNameShadowed, "isNameShadowed");
|
|
229
|
-
function functionBodyDeclaresVarName(body, name) {
|
|
230
|
-
if (body.type === "VariableDeclaration" && body.kind === "var") {
|
|
231
|
-
const declarations = Array.isArray(body.declarations) ? body.declarations : [];
|
|
232
|
-
if (declarations.some(
|
|
233
|
-
(declaration) => isAstNode(declaration) && patternContainsName(declaration.id, name)
|
|
234
|
-
)) {
|
|
235
|
-
return true;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
for (const [key, value] of Object.entries(body)) {
|
|
239
|
-
if (key === "start" || key === "end" || key === "loc" || key === "range") continue;
|
|
240
|
-
if (isAstNode(value)) {
|
|
241
|
-
if (isNestedVarScope(value)) continue;
|
|
242
|
-
if (functionBodyDeclaresVarName(value, name)) return true;
|
|
243
|
-
} else if (Array.isArray(value)) {
|
|
244
|
-
for (const item of value) {
|
|
245
|
-
if (!isAstNode(item) || isNestedVarScope(item)) continue;
|
|
246
|
-
if (functionBodyDeclaresVarName(item, name)) return true;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
return false;
|
|
251
|
-
}
|
|
252
|
-
__name(functionBodyDeclaresVarName, "functionBodyDeclaresVarName");
|
|
253
|
-
function isNestedVarScope(node) {
|
|
254
|
-
return isFunctionNode(node) || node.type === "ClassDeclaration" || node.type === "ClassExpression";
|
|
255
|
-
}
|
|
256
|
-
__name(isNestedVarScope, "isNestedVarScope");
|
|
257
|
-
function loopDeclaresName(node, name) {
|
|
258
|
-
const declaration = node.type === "ForStatement" ? node.init : node.type === "ForInStatement" || node.type === "ForOfStatement" ? node.left : void 0;
|
|
259
|
-
if (!isAstNode(declaration) || declaration.type !== "VariableDeclaration") return false;
|
|
260
|
-
const declarations = Array.isArray(declaration.declarations) ? declaration.declarations : [];
|
|
261
|
-
return declarations.some((item) => isAstNode(item) && patternContainsName(item.id, name));
|
|
262
|
-
}
|
|
263
|
-
__name(loopDeclaresName, "loopDeclaresName");
|
|
264
|
-
function switchDeclaresName(node, name) {
|
|
265
|
-
const cases = Array.isArray(node.cases) ? node.cases : [];
|
|
266
|
-
return cases.some((switchCase) => {
|
|
267
|
-
if (!isAstNode(switchCase) || !Array.isArray(switchCase.consequent)) return false;
|
|
268
|
-
return switchCase.consequent.some((statement) => {
|
|
269
|
-
if (!isAstNode(statement)) return false;
|
|
270
|
-
if ((statement.type === "FunctionDeclaration" || statement.type === "ClassDeclaration") && patternContainsName(statement.id, name)) {
|
|
271
|
-
return true;
|
|
272
|
-
}
|
|
273
|
-
if (statement.type !== "VariableDeclaration" || statement.kind === "var") return false;
|
|
274
|
-
const declarations = Array.isArray(statement.declarations) ? statement.declarations : [];
|
|
275
|
-
return declarations.some(
|
|
276
|
-
(declaration) => isAstNode(declaration) && patternContainsName(declaration.id, name)
|
|
277
|
-
);
|
|
278
|
-
});
|
|
279
|
-
});
|
|
280
|
-
}
|
|
281
|
-
__name(switchDeclaresName, "switchDeclaresName");
|
|
282
|
-
function blockDeclaresName(block, name) {
|
|
283
|
-
const statements = Array.isArray(block.body) ? block.body : [];
|
|
284
|
-
for (const statement of statements) {
|
|
285
|
-
if (!isAstNode(statement)) continue;
|
|
286
|
-
if ((statement.type === "FunctionDeclaration" || statement.type === "ClassDeclaration") && patternContainsName(statement.id, name)) {
|
|
287
|
-
return true;
|
|
288
|
-
}
|
|
289
|
-
if (statement.type !== "VariableDeclaration" || !Array.isArray(statement.declarations)) {
|
|
290
|
-
continue;
|
|
291
|
-
}
|
|
292
|
-
if (statement.declarations.some(
|
|
293
|
-
(declaration) => isAstNode(declaration) && patternContainsName(declaration.id, name)
|
|
294
|
-
)) {
|
|
295
|
-
return true;
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
return false;
|
|
299
|
-
}
|
|
300
|
-
__name(blockDeclaresName, "blockDeclaresName");
|
|
301
|
-
function patternContainsName(value, name) {
|
|
302
|
-
if (!isAstNode(value)) return false;
|
|
303
|
-
if (value.type === "Identifier") return value.name === name;
|
|
304
|
-
if (value.type === "RestElement") return patternContainsName(value.argument, name);
|
|
305
|
-
if (value.type === "AssignmentPattern") return patternContainsName(value.left, name);
|
|
306
|
-
if (value.type === "Property") return patternContainsName(value.value, name);
|
|
307
|
-
const elements = Array.isArray(value.elements) ? value.elements : Array.isArray(value.properties) ? value.properties : [];
|
|
308
|
-
return elements.some((element) => patternContainsName(element, name));
|
|
309
|
-
}
|
|
310
|
-
__name(patternContainsName, "patternContainsName");
|
|
311
|
-
function isFunctionNode(node) {
|
|
312
|
-
return node.type === "FunctionDeclaration" || node.type === "FunctionExpression" || node.type === "ArrowFunctionExpression";
|
|
313
|
-
}
|
|
314
|
-
__name(isFunctionNode, "isFunctionNode");
|
|
315
|
-
function readPropertyName(value) {
|
|
316
|
-
if (!isAstNode(value)) return void 0;
|
|
317
|
-
if (value.type === "Identifier" && typeof value.name === "string") return value.name;
|
|
318
|
-
if (value.type === "Literal" && typeof value.value === "string") return value.value;
|
|
319
|
-
return void 0;
|
|
320
|
-
}
|
|
321
|
-
__name(readPropertyName, "readPropertyName");
|
|
322
|
-
function readNode(code, node) {
|
|
323
|
-
return code.slice(node.start, node.end);
|
|
324
|
-
}
|
|
325
|
-
__name(readNode, "readNode");
|
|
326
|
-
function isAstNode(value) {
|
|
327
|
-
return !!value && typeof value === "object" && typeof value.type === "string" && typeof value.start === "number" && typeof value.end === "number";
|
|
328
|
-
}
|
|
329
|
-
__name(isAstNode, "isAstNode");
|
|
330
|
-
function isEnvironmentFunctionKind(value) {
|
|
331
|
-
return typeof value === "string" && ENVIRONMENT_FUNCTIONS.has(value);
|
|
332
|
-
}
|
|
333
|
-
__name(isEnvironmentFunctionKind, "isEnvironmentFunctionKind");
|
|
334
|
-
function containsEnvironmentFunction(code) {
|
|
335
|
-
return Array.from(ENVIRONMENT_FUNCTIONS).some((name) => code.includes(name));
|
|
336
|
-
}
|
|
337
|
-
__name(containsEnvironmentFunction, "containsEnvironmentFunction");
|
|
338
|
-
function isTransformableModule(id) {
|
|
339
|
-
const cleanId = id.split("?", 1)[0];
|
|
340
|
-
return MODULE_EXTENSION_RE.test(cleanId) && !/\.d\.[cm]?ts$/.test(cleanId);
|
|
341
|
-
}
|
|
342
|
-
__name(isTransformableModule, "isTransformableModule");
|
|
343
|
-
function transformError(id, message) {
|
|
344
|
-
return new Error(`[Farm environment functions] ${message} in ${id.split("?", 1)[0]}`);
|
|
345
|
-
}
|
|
346
|
-
__name(transformError, "transformError");
|
|
347
|
-
|
|
348
|
-
export {
|
|
349
|
-
transformEnvironmentFunctions,
|
|
350
|
-
farmEnvironmentFunctionsPlugin
|
|
351
|
-
};
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { DocsConfig } from '@farming-labs/docs';
|
|
2
|
-
|
|
3
|
-
interface FarmDocsAdapterDescriptor {
|
|
4
|
-
id: string;
|
|
5
|
-
protocol: number;
|
|
6
|
-
server: string;
|
|
7
|
-
react?: string;
|
|
8
|
-
vite?: string;
|
|
9
|
-
/**
|
|
10
|
-
* Build-time entry that compiles the adapter's docs runtime into Farm's
|
|
11
|
-
* serializable edge manifest. Older Farm releases safely ignore it.
|
|
12
|
-
*/
|
|
13
|
-
edgeCompiler?: string;
|
|
14
|
-
}
|
|
15
|
-
interface FarmDocsSidebarItem {
|
|
16
|
-
label?: string;
|
|
17
|
-
title?: string;
|
|
18
|
-
slug?: string;
|
|
19
|
-
href?: string;
|
|
20
|
-
icon?: string;
|
|
21
|
-
children?: FarmDocsSidebarItem[];
|
|
22
|
-
items?: FarmDocsSidebarItem[];
|
|
23
|
-
}
|
|
24
|
-
interface FarmDocsNavigationConfig {
|
|
25
|
-
sidebar?: FarmDocsSidebarItem[];
|
|
26
|
-
}
|
|
27
|
-
interface FarmDocsSocialImageConfig {
|
|
28
|
-
/** Generate a page-specific 1200×630 social image. Defaults to true. */
|
|
29
|
-
enabled?: boolean;
|
|
30
|
-
/** Absolute public origin used in social metadata, e.g. https://example.com. */
|
|
31
|
-
baseUrl?: string;
|
|
32
|
-
/** Site name shown in Open Graph metadata. Defaults to the docs navigation title. */
|
|
33
|
-
siteName?: string;
|
|
34
|
-
/** Short brand label drawn in the image header. Defaults to siteName. */
|
|
35
|
-
brand?: string;
|
|
36
|
-
/** Optional WOFF2 URLs or data URLs embedded into the generated SVG. */
|
|
37
|
-
fonts?: FarmDocsSocialImageFonts;
|
|
38
|
-
}
|
|
39
|
-
interface FarmDocsSocialImageFonts {
|
|
40
|
-
/** Display face used for page titles. */
|
|
41
|
-
display?: string;
|
|
42
|
-
/** Sans-serif face used for descriptions. */
|
|
43
|
-
sans?: string;
|
|
44
|
-
/** Monospace face used for labels, routes, and diagrams. */
|
|
45
|
-
mono?: string;
|
|
46
|
-
}
|
|
47
|
-
type FarmDocsRuntimeConfig = Partial<DocsConfig> & {
|
|
48
|
-
/**
|
|
49
|
-
* Public favicon URL used by the standalone docs renderer.
|
|
50
|
-
* Set this explicitly when docs should share the host application's icon.
|
|
51
|
-
*/
|
|
52
|
-
favicon?: string;
|
|
53
|
-
/**
|
|
54
|
-
* Optional serializable navigation tree used by Farm's docs runtime.
|
|
55
|
-
* Icon values reference keys from `icons`.
|
|
56
|
-
*/
|
|
57
|
-
navigation?: FarmDocsNavigationConfig;
|
|
58
|
-
/**
|
|
59
|
-
* Automatic page-specific Open Graph and X images for Markdown docs.
|
|
60
|
-
* Enabled by default. Set false to opt out for the complete docs tree.
|
|
61
|
-
*/
|
|
62
|
-
socialImage?: boolean | FarmDocsSocialImageConfig;
|
|
63
|
-
};
|
|
64
|
-
type FarmDocsConfigInput = FarmDocsRuntimeConfig & {
|
|
65
|
-
/**
|
|
66
|
-
* Versioned runtime descriptor supplied by an external docs adapter.
|
|
67
|
-
* Set false to pin the embedded renderer and disable framework
|
|
68
|
-
* auto-detection.
|
|
69
|
-
*/
|
|
70
|
-
adapter?: FarmDocsAdapterDescriptor | false;
|
|
71
|
-
/**
|
|
72
|
-
* Farm public route for docs, e.g. "/docs". When passed through
|
|
73
|
-
* `config`, this is converted to the docs package's folder-style `entry`.
|
|
74
|
-
*/
|
|
75
|
-
entry?: string;
|
|
76
|
-
/** Explicit public route prefix. Defaults to `entry`. */
|
|
77
|
-
docsPath?: string;
|
|
78
|
-
/** Source content directory, relative to the project root. */
|
|
79
|
-
contentDir?: string;
|
|
80
|
-
/** Set to false to opt out even when a docs config file exists. */
|
|
81
|
-
enabled?: boolean;
|
|
82
|
-
/** Inline @farming-labs/docs config object. */
|
|
83
|
-
config?: FarmDocsRuntimeConfig;
|
|
84
|
-
/** Path to docs.config.* or docs.json. */
|
|
85
|
-
configPath?: string;
|
|
86
|
-
};
|
|
87
|
-
type FarmDocsUserConfig = boolean | FarmDocsConfigInput;
|
|
88
|
-
interface FarmDocsResolvedConfig {
|
|
89
|
-
enabled: boolean;
|
|
90
|
-
entry: string;
|
|
91
|
-
adapter?: FarmDocsAdapterDescriptor;
|
|
92
|
-
contentDir?: string;
|
|
93
|
-
configPath?: string;
|
|
94
|
-
config: FarmDocsRuntimeConfig & Pick<DocsConfig, "entry">;
|
|
95
|
-
/**
|
|
96
|
-
* `config` before it was made serializable: icons and other React elements, MDX
|
|
97
|
-
* components, and callbacks intact. Only the in-process adapter runtime reads it;
|
|
98
|
-
* whatever Farm serializes uses `config`.
|
|
99
|
-
*/
|
|
100
|
-
runtimeConfig?: FarmDocsRuntimeConfig & Pick<DocsConfig, "entry">;
|
|
101
|
-
/** The serializable docs settings from `farm.config.ts`, applied over the config file. */
|
|
102
|
-
configOverrides?: Partial<DocsConfig>;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export type { FarmDocsResolvedConfig as F, FarmDocsUserConfig as a, FarmDocsConfigInput as b, FarmDocsNavigationConfig as c, FarmDocsSocialImageConfig as d, FarmDocsSocialImageFonts as e, FarmDocsSidebarItem as f };
|
package/dist/types-DFbjpjXX.d.ts
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { DocsConfig } from '@farming-labs/docs';
|
|
2
|
-
|
|
3
|
-
interface FarmDocsAdapterDescriptor {
|
|
4
|
-
id: string;
|
|
5
|
-
protocol: number;
|
|
6
|
-
server: string;
|
|
7
|
-
react?: string;
|
|
8
|
-
vite?: string;
|
|
9
|
-
/**
|
|
10
|
-
* Build-time entry that compiles the adapter's docs runtime into Farm's
|
|
11
|
-
* serializable edge manifest. Older Farm releases safely ignore it.
|
|
12
|
-
*/
|
|
13
|
-
edgeCompiler?: string;
|
|
14
|
-
}
|
|
15
|
-
interface FarmDocsSidebarItem {
|
|
16
|
-
label?: string;
|
|
17
|
-
title?: string;
|
|
18
|
-
slug?: string;
|
|
19
|
-
href?: string;
|
|
20
|
-
icon?: string;
|
|
21
|
-
children?: FarmDocsSidebarItem[];
|
|
22
|
-
items?: FarmDocsSidebarItem[];
|
|
23
|
-
}
|
|
24
|
-
interface FarmDocsNavigationConfig {
|
|
25
|
-
sidebar?: FarmDocsSidebarItem[];
|
|
26
|
-
}
|
|
27
|
-
interface FarmDocsSocialImageConfig {
|
|
28
|
-
/** Generate a page-specific 1200×630 social image. Defaults to true. */
|
|
29
|
-
enabled?: boolean;
|
|
30
|
-
/** Absolute public origin used in social metadata, e.g. https://example.com. */
|
|
31
|
-
baseUrl?: string;
|
|
32
|
-
/** Site name shown in Open Graph metadata. Defaults to the docs navigation title. */
|
|
33
|
-
siteName?: string;
|
|
34
|
-
/** Short brand label drawn in the image header. Defaults to siteName. */
|
|
35
|
-
brand?: string;
|
|
36
|
-
/** Optional WOFF2 URLs or data URLs embedded into the generated SVG. */
|
|
37
|
-
fonts?: FarmDocsSocialImageFonts;
|
|
38
|
-
}
|
|
39
|
-
interface FarmDocsSocialImageFonts {
|
|
40
|
-
/** Display face used for page titles. */
|
|
41
|
-
display?: string;
|
|
42
|
-
/** Sans-serif face used for descriptions. */
|
|
43
|
-
sans?: string;
|
|
44
|
-
/** Monospace face used for labels, routes, and diagrams. */
|
|
45
|
-
mono?: string;
|
|
46
|
-
}
|
|
47
|
-
type FarmDocsRuntimeConfig = Partial<DocsConfig> & {
|
|
48
|
-
/**
|
|
49
|
-
* Public favicon URL used by the standalone docs renderer.
|
|
50
|
-
* Set this explicitly when docs should share the host application's icon.
|
|
51
|
-
*/
|
|
52
|
-
favicon?: string;
|
|
53
|
-
/**
|
|
54
|
-
* Optional serializable navigation tree used by Farm's docs runtime.
|
|
55
|
-
* Icon values reference keys from `icons`.
|
|
56
|
-
*/
|
|
57
|
-
navigation?: FarmDocsNavigationConfig;
|
|
58
|
-
/**
|
|
59
|
-
* Automatic page-specific Open Graph and X images for Markdown docs.
|
|
60
|
-
* Enabled by default. Set false to opt out for the complete docs tree.
|
|
61
|
-
*/
|
|
62
|
-
socialImage?: boolean | FarmDocsSocialImageConfig;
|
|
63
|
-
};
|
|
64
|
-
type FarmDocsConfigInput = FarmDocsRuntimeConfig & {
|
|
65
|
-
/**
|
|
66
|
-
* Versioned runtime descriptor supplied by an external docs adapter.
|
|
67
|
-
* Set false to pin the embedded renderer and disable framework
|
|
68
|
-
* auto-detection.
|
|
69
|
-
*/
|
|
70
|
-
adapter?: FarmDocsAdapterDescriptor | false;
|
|
71
|
-
/**
|
|
72
|
-
* Farm public route for docs, e.g. "/docs". When passed through
|
|
73
|
-
* `config`, this is converted to the docs package's folder-style `entry`.
|
|
74
|
-
*/
|
|
75
|
-
entry?: string;
|
|
76
|
-
/** Explicit public route prefix. Defaults to `entry`. */
|
|
77
|
-
docsPath?: string;
|
|
78
|
-
/** Source content directory, relative to the project root. */
|
|
79
|
-
contentDir?: string;
|
|
80
|
-
/** Set to false to opt out even when a docs config file exists. */
|
|
81
|
-
enabled?: boolean;
|
|
82
|
-
/** Inline @farming-labs/docs config object. */
|
|
83
|
-
config?: FarmDocsRuntimeConfig;
|
|
84
|
-
/** Path to docs.config.* or docs.json. */
|
|
85
|
-
configPath?: string;
|
|
86
|
-
};
|
|
87
|
-
type FarmDocsUserConfig = boolean | FarmDocsConfigInput;
|
|
88
|
-
interface FarmDocsResolvedConfig {
|
|
89
|
-
enabled: boolean;
|
|
90
|
-
entry: string;
|
|
91
|
-
adapter?: FarmDocsAdapterDescriptor;
|
|
92
|
-
contentDir?: string;
|
|
93
|
-
configPath?: string;
|
|
94
|
-
config: FarmDocsRuntimeConfig & Pick<DocsConfig, "entry">;
|
|
95
|
-
/**
|
|
96
|
-
* `config` before it was made serializable: icons and other React elements, MDX
|
|
97
|
-
* components, and callbacks intact. Only the in-process adapter runtime reads it;
|
|
98
|
-
* whatever Farm serializes uses `config`.
|
|
99
|
-
*/
|
|
100
|
-
runtimeConfig?: FarmDocsRuntimeConfig & Pick<DocsConfig, "entry">;
|
|
101
|
-
/** The serializable docs settings from `farm.config.ts`, applied over the config file. */
|
|
102
|
-
configOverrides?: Partial<DocsConfig>;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export type { FarmDocsResolvedConfig as F, FarmDocsUserConfig as a, FarmDocsConfigInput as b, FarmDocsNavigationConfig as c, FarmDocsSocialImageConfig as d, FarmDocsSocialImageFonts as e, FarmDocsSidebarItem as f };
|
|
File without changes
|
|
File without changes
|