prisma-erd-generator icon indicating copy to clipboard operation
prisma-erd-generator copied to clipboard

Feature Request: Add disable config option and override with environment variable

Open alexmobo opened this issue 1 year ago • 3 comments

Hi,

it would be nice to have a config setting to disable the generator.

Something like the existing config setting for debug:

generator erd {
  provider = "prisma-erd-generator"
  erdDisable = true
}

It would also be awesome if the environment variable DISABLE_ERD overrode completely the config value as in:

const disabled = process.env.DISABLE_ERD !== undefined ? Boolean(process.env.DISABLE_ERD) : config.erdDisabled === 'true';

The reason for that behaviour is that I would like to have it completely disabled and only generate the ERD on demand.

Would you be open to making such changes? I could take care of it.

alexmobo avatar Apr 19 '23 10:04 alexmobo

I'm open to it. #208 is related to difficulties with using the env("ERD_DISABLED")which may be part of this issue as well.

keonik avatar May 03 '23 03:05 keonik

:tada: This issue has been resolved in version 1.10.0-alpha.5 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Aug 11 '23 15:08 github-actions[bot]

:tada: This issue has been resolved in version 1.12.0-alpha.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Aug 22 '23 02:08 github-actions[bot]