auth0-deploy-cli
auth0-deploy-cli copied to clipboard
Disabled `emailTemplates` fail without a body.
Thank you in advance for helping us to improve this library! Please read through the template below and answer all relevant questions. Your additional work here is greatly appreciated and will help us respond as quickly as possible. For general support or usage questions, use the Auth0 Community or Auth0 Support. Finally, to avoid duplicates, please search existing Issues before submitting one here.
By submitting an Issue to this repository, you agree to the terms within the Auth0 Code of Conduct.
Description
The following configuration should be processed without any issues:
emailTemplates:
- template: "verify_email"
enabled: false
Probably because the parsing logic always tries to load a template from a .html
file without checking if it's enabled or not.
Reproduction
Can easily be reproduced by adding the above code snippet in the tenant-config
Environment
Please provide the following:
- Version of this library used: 7.14.2
Appreciate the feedback! This type of request is quite common, see: #384, #293, #417. While I absolutely see your point of view here, it's a delicate balancing act of enabling developer flexibility and providing basic safeguard. At some point in time (before me), a decision was made to ensure the existence of a template files. I can understand why too, in general, it's better to prevent destructive changes from lack of HTML than it is to enable some developer convenience. Especially so when there is no consequence to passing an HTML value when disabling.
We're rethinking the way we import files, the hoping is that we'll enable both safety and DX. But that'll be down the line in the next major version. While this is excellent feedback, I'd rather dedicate work to a more holistic solution rather than temporarily sacrificing safety for a little convenience. I hope you can understand this pragmatic stance.
As a workaround, I'd advise to include a template, empty or otherwise.