Skip to content

Releases: ActiveCampaign/postmark-cli

v1.6.19

02 Feb 00:57
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.6.18...v1.6.19

v1.6.18

17 Aug 21:47
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.6.17...v1.6.18

v1.6.17

21 Jun 03:03
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.6.15...v1.6.17

v1.6.15

02 Jan 18:12
Compare
Choose a tag to compare

What's Changed

1.5.8 - Template command improvements and more

15 Dec 17:58
d401ecb
Compare
Choose a tag to compare

Template push improvements

The templates push command now only pushes local templates to Postmark if they were modified or newly added. Prior to v1.5.8, all local templates were pushed regardless of whether they were modified or not. This made it tough to see what templates actually changed in the review output.

If you prefer to force push all templates, regardless of their state, include the --all argument. The review output will also tell you whether a template was unmodified, modified, or added.

101831335-ff9e6780-3af2-11eb-84d8-30fbd4d27d20

Template preview subject line rendering

The subject line in the template preview tool now renders your mustachio syntax with the values in your test template model. Subject lines that previously looked like this:

101830049-2e1b4300-3af1-11eb-8f57-ad0a4f930c14

Now look like this:

101830074-38d5d800-3af1-11eb-8010-2394b7c402db

The template preview tool will also show validation errors if there was an issue compiling the subject line:

101830170-56a33d00-3af1-11eb-8ca0-2cb6db3eed78

Template preview external links

The preview tool now opens all external links in your templates in a new window. This prevents buggy behavior whenever selecting a link.

Security fixes

A few automated security vulnerability fixes were included with this release.

Template test model storage

28 Jan 21:06
967140b
Compare
Choose a tag to compare

You can now test your templates using a custom model! Pulling your templates will store each template's model inside the TestRenderModel key in the metadata JSON file:

{
  "Name": "Receipt",
  "Alias": "receipt",
  "Subject": "Receipt for XYZ Widgets",
  "TemplateType": "Standard",
  "LayoutTemplate": "basic",
  "TestRenderModel": {
    "name": "name_Value",
    "credit_card_brand": "credit_card_brand_Value",
    "credit_card_last_four": "credit_card_last_four_Value",
    "billing_url": "billing_url_Value",
    "receipt_id": "receipt_id_Value",
    "date": "date_Value",
    "receipt_details": [
      {
        "description": "description_Value",
        "amount": "amount_Value"
      }
    ],
    "total": "total_Value",
    "support_url": "support_url_Value",
    "action_url": "action_url_Value",
    "expiration_date": "expiration_date_Value",
    "product_name": "product_name_Value"
  }
}

You can then enter your own test data and use the preview command to see how your templates look:

2020-01-22 16-51-02 2020-01-22 16_52_40

πŸ–Ό Template preview command

05 Dec 17:02
ba2d67d
Compare
Choose a tag to compare

CLI template preview

We've added a new command that spins up a local web server so that you can easily preview your compiled templates.

  • Standard templates are compiled with their layout
  • Mustachio syntax rendering
  • HTML and text version previews
  • Small and large screen previews
  • Hot reloading - Your browser will automatically reload each time you change your template

Getting started

After pulling your templates, pass the templates folder to the templates preview command:

postmark templates preview ~/templates-folder

You will also need to authenticate using your server token so that API requests can be made to Postmark's template validation endpoint. A development server will be available at https://localhost:3005. By default, the server will start on port 3005. You can specify your own port using the --port argument.

preview

Preview list

πŸ–₯πŸ“±Toggle between large and small screen sizes

preview-mobile

πŸ”₯Hot reloading

preview-reload

Template layouts support

27 Jun 16:47
0e81a68
Compare
Choose a tag to compare

We've added layout support to the templates pull and templates push commands.

templates pull

Running the pull command now adds layouts to the _layouts folder in the project root. Here's an example of the folder structure:

pm-templates
β”œβ”€β”€ _layouts
β”‚   └── plain
β”‚       β”œβ”€β”€ content.html
β”‚       β”œβ”€β”€ content.txt
β”‚       └── meta.json
└── password-reset
β”‚   β”œβ”€β”€ content.html
β”‚   β”œβ”€β”€ content.txt
β”‚   └── meta.json
└── welcome
    β”œβ”€β”€ content.html
    └── meta.json

The meta.json format for templates and layouts also differ a bit. Be sure to check out the wiki for more details.

templates push

Pushing now displays which layouts are being pushed, as well as which layout is being used on a standard template:
push-confirm

1.0.0 is here! πŸš€

27 May 21:06
Compare
Choose a tag to compare

We’re super excited to announce that Postmark now has an official command-line interface πŸŽ‰. Version 1.0.0 supports pushing and pulling templates, sending emails, and fetching server lists. This makes Postmark and your CI/CD pipeline go together like peas and carrots.

Check out our blog post for more details.

CLI Latest updates