ActiveCampaign / postmark-cli

The official CLI tool for Postmark
https://postmarkapp.com
MIT License
79 stars 9 forks source link

[Feature request] Ability to limit templates pull #87

Open tyleralbee opened 8 months ago

tyleralbee commented 8 months ago

Is your feature request related to a problem? Please describe. In cases where a single server contains templates for multiple applications, postmark templates pull can be awkward to use. This is because postmark templates pull always pulls in all of the templates within a server, and from what I understand, there is no way to specify which templates should be pulled.

This leaves the following options with regards to postmark templates pull:

  1. Use it, but add irrelevant templates to .gitignore or manually delete them before committing to version control
  2. Use it and allow the irrelevant templates to be committed to source control for an unrelated project
  3. Use it once and ensure other developers do not update templates via the Postmark GUI (to ensure synchronicity)

Of the above options, I went with 3. That said, it would be frustrating if I didn't realize someone updated the templates on remote and I overwrote them by pushing my own changes. I feel that this hampers the ability to effectively use CI/CD to manage Postmark templates, which is unfortunate.

Describe the solution you'd like Add the ability to specify the following in a postmark config file in the root of the templates directory:

The file might be called postmarkrc.json or postmarkrc.js with a default export of the config object.

Describe alternatives you've considered Alternatively, flag(s) could be added:

Additional context For the record, I found the CLI extremely simple, powerful, and a compliment to Postmark's already top-tier service in the space. A long time ago, a developer specializing in email marketing told me not to waste my time looking for an email solution because Postmark was it. I would give that same advice today.