event-catalog / eventcatalog

An open source documentation tool to bring discoverability to your event-driven architectures
https://eventcatalog.dev
MIT License
1.73k stars 148 forks source link

Add type support for generators in the eventcatalog.config.js files #840

Open boyney123 opened 2 weeks ago

boyney123 commented 2 weeks ago

Use Case

when using generators it would be nice to support types for each generator. The types should come from the generator itself, as they can be anything in theory. But when using a generator we should add type support to help people configure there generators better.

Proposed Solution

No response

Implementation Notes

No response

Community Notes

carlosallexandre commented 1 week ago

Generators need the config at node environment only. Using node packages within eventcatalog.config.js, users face issues running the EC at browsers (like #847). So how should EC handle this?

~~1. Should EventCatalog remove the generators from the eventcatalog.config.js before import into astro.config.mjs? (This option is retrocompatible)

  1. Should generators config be into a different file, such as eventcatalog.generators.js??~~

Edit: Desconsider this. I found the root cause of #847 and i'm working on it.