keonik/prisma-erd-generator

log message indicating that erd is generated when the generator is disabled.

hakandilek opened this issue · 4 comments

I disable the generator using the ENV variable DISABLE_ERD=true

I see that it is disabled with the log message ERD generator is disabled.

2 log messages later it says that an SVG is being generated:

prisma generate
Prisma schema loaded from prisma/schema.prisma
ERD generator is disabled
✔ Generated Prisma Client (4.4.0 | library) to ./node_modules/@prisma/client in 334ms
✔ Generated Entity-relationship-diagram to ./prisma/schema.svg in 19ms
You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client

I now that, it does not really generate anything but it is confusing to see this message in the logs.

I haven’t found a fix for this other than what is there currently. If it’s in your schema it will run and generate a completed message even if we add logic not to in the generator.

I went ahead and threw in a way to override the default message. Its a little better but there isn't a way to disable the ✔ Generated __pretty_name__ to __output_name__.

Should look like this

✔ Generated No ERD (1.2.2) to ./prisma/N/A in 7ms

Looks a lot better, Thanks!

Are you planning a new release soon?

Latest realize should include it