Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
alexmobo opened this issue Apr 19, 2023 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed released on @alpha

Comments

@alexmobo
Copy link

alexmobo commented Apr 19, 2023

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.

@keonik
Copy link
Owner

keonik commented May 3, 2023

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 keonik added enhancement New feature or request help wanted Extra attention is needed labels May 25, 2023
keonik added a commit that referenced this issue Aug 11, 2023
close issue #202 by adding an environment variable friendly approach to disabling the generator
@github-actions
Copy link

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

The release is available on:

Your semantic-release bot 📦🚀

keonik added a commit that referenced this issue Aug 22, 2023
* feat: Configuration of Mermaid via .js file (#232)

* feat: Enable override of mermaid configuration via a .js file

* fix: Move theme to mermaid config and out of cli extensions

* remove mermaid types stub

* fix theme for readme erd

* fix: Documentation for mermaid configuration and note about theme setting via env variable

* feat: Add disable flag to prisma config options  (#233)

close issue #202 by adding an environment variable friendly approach to disabling the generator

* fix: Default puppeteer-config to not set executable path unless OS is… (#235)

* fix: Default puppeteer-config to not set executable path unless OS is anything but Windows

* attempt to remove setting default executable path to troubleshoot mac os test failure in github actions

* .

* cross-env use for windows

* fix: Move puppeteer args to arm64 darwin only
@github-actions
Copy link

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

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed released on @alpha
Projects
None yet
Development

No branches or pull requests

2 participants