Skip to content

Commit faebb61

Browse files
authored
build: Release (#74)
2 parents 9b575a7 + fb342fb commit faebb61

File tree

9 files changed

+13908
-1658
lines changed

9 files changed

+13908
-1658
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
check-circular:
1313
name: Circular Dependencies
1414
timeout-minutes: 5
15-
runs-on: ubuntu-18.04
15+
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v2
1818
- name: Use Node.js ${{ matrix.NODE_VERSION }}
@@ -32,7 +32,7 @@ jobs:
3232
check-lint:
3333
name: Lint
3434
timeout-minutes: 5
35-
runs-on: ubuntu-18.04
35+
runs-on: ubuntu-latest
3636
steps:
3737
- uses: actions/checkout@v2
3838
- name: Use Node.js ${{ matrix.NODE_VERSION }}
@@ -50,9 +50,21 @@ jobs:
5050
run: npm ci
5151
- run: npm run lint
5252
check-tests:
53+
strategy:
54+
matrix:
55+
include:
56+
- name: Node 12
57+
NODE_VERSION: 12
58+
- name: Node 14
59+
NODE_VERSION: 14
60+
- name: Node 16
61+
NODE_VERSION: 16
62+
- name: Node 18
63+
NODE_VERSION: 18
64+
fail-fast: false
5365
name: Tests
5466
timeout-minutes: 5
55-
runs-on: ubuntu-18.04
67+
runs-on: ubuntu-latest
5668
steps:
5769
- uses: actions/checkout@v2
5870
- name: Use Node.js

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
- uses: actions/checkout@v2
1010
- uses: actions/setup-node@v1
1111
with:
12-
node-version: 14
12+
node-version: 18
1313
registry-url: https://registry.npmjs.org/
1414
- name: Cache Node.js modules
1515
uses: actions/cache@v2

README.md

Lines changed: 66 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,29 @@
1-
# parse-server-api-mail-adapter <!-- omit in toc -->
1+
# Parse Server API Mail Adapter <!-- omit in toc -->
2+
3+
[![Build Status](https://github.com/parse-community/parse-server-api-mail-adapter/workflows/ci/badge.svg?branch=main)](https://github.com/parse-community/parse-server-api-mail-adapter/actions?query=workflow%3Aci+branch%3Amain)
4+
[![Snyk Badge](https://snyk.io/test/github/parse-community/parse-server-api-mail-adapter/badge.svg)](https://snyk.io/test/github/parse-community/parse-server-api-mail-adapter)
5+
[![Coverage](https://codecov.io/gh/parse-community/parse-server-api-mail-adapter/branch/alpha/graph/badge.svg)](https://codecov.io/gh/parse-community/parse-server-api-mail-adapter)
6+
[![auto-release](https://img.shields.io/badge/%F0%9F%9A%80-auto--release-9e34eb.svg)](https://github.com/parse-community/parse-dashboard/releases)
7+
8+
[![Node Version](https://img.shields.io/badge/nodejs-12,_14,_16,_18-green.svg?logo=node.js&style=flat)](https://nodejs.org)
29

3-
[![npm version](https://badge.fury.io/js/parse-server-api-mail-adapter.svg)](https://badge.fury.io/js/parse-server-api-mail-adapter)
4-
[![build status](https://github.com/mtrezza/parse-server-api-mail-adapter/workflows/ci/badge.svg?branch=main)](https://github.com/mtrezza/parse-server-api-mail-adapter/actions?query=workflow%3Aci+branch%3Amain)
5-
[![codecov](https://codecov.io/gh/mtrezza/parse-server-api-mail-adapter/branch/main/graph/badge.svg)](https://codecov.io/gh/mtrezza/parse-server-api-mail-adapter)
6-
[![vulnerabilities](https://snyk.io/test/github/mtrezza/parse-server-api-mail-adapter/badge.svg)](https://snyk.io/test/github/mtrezza/parse-server-api-mail-adapter)
710
[![dependency up-to-date](https://img.shields.io/librariesio/release/npm/parse-server-api-mail-adapter)](https://libraries.io/npm/parse-server-api-mail-adapter)
811
[![weekly downloads](https://img.shields.io/npm/dw/parse-server-api-mail-adapter)](https://www.npmjs.com/package/parse-server-api-mail-adapter)
912

13+
[![npm latest version](https://img.shields.io/npm/v/parse-server-api-mail-adapter/latest.svg)](https://www.npmjs.com/package/parse-server-api-mail-adapter)
14+
[![npm beta version](https://img.shields.io/npm/v/parse-server-api-mail-adapter/beta.svg)](https://www.npmjs.com/package/parse-server-api-mail-adapter)
15+
[![npm alpha version](https://img.shields.io/npm/v/parse-server-api-mail-adapter/alpha.svg)](https://www.npmjs.com/package/parse-server-api-mail-adapter)
16+
17+
---
18+
1019
The Parse Server API Mail Adapter enables Parse Server to send emails using any 3rd party API with built-in dynamic templates and localization.
1120

21+
## Transfer <!-- omit in toc -->
22+
23+
ℹ️ This repository has been tranferred to the Parse Platform Organization on May 15, 2022. Please update any links that you may have to this repository, for example if you cloned or forked this repository and maintain a remote link to this orginal repository, or if you are referencing a GitHub commit directly as your dependency.
24+
25+
---
26+
1227
# Content <!-- omit in toc -->
1328

1429
- [Installation](#installation)
@@ -24,6 +39,7 @@ The Parse Server API Mail Adapter enables Parse Server to send emails using any
2439
- [Supported APIs](#supported-apis)
2540
- [Providers](#providers)
2641
- [Example for Mailgun](#example-for-mailgun)
42+
- [Example for AWS Simple Email Service](#example-for-aws-simple-email-service)
2743
- [Custom API](#custom-api)
2844
- [Need help?](#need-help)
2945

@@ -160,7 +176,7 @@ There are different files for different parts of the email:
160176
- plain-text content (`textPath`)
161177
- HTML content (`htmlPath`)
162178

163-
See the [templates](https://github.com/mtrezza/parse-server-api-mail-adapter/tree/main/spec/templates) for examples how placeholders can be used.
179+
See the [templates](https://github.com/parse-community/parse-server-api-mail-adapter/tree/main/spec/templates) for examples how placeholders can be used.
164180

165181
# Placeholders
166182
Placeholders allow to dynamically insert text into the template content. The placeholder values are filled in according to the key-value definitions returned by the placeholder callback in the adapter configuration.
@@ -238,6 +254,7 @@ This adapter supports any REST API by adapting the API payload in the adapter co
238254
For convenience, support for common APIs is already built into this adapter and available via the `ApiPayloadConverter`. The following is a list of currently supported API providers:
239255

240256
- [Mailgun](https://www.mailgun.com)
257+
- [AWS Simple Email Service (AWS JavaScript SDK v3)](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ses/index.html)
241258

242259
If the provider you are using is not already supported, please feel free to open a PR.
243260

@@ -269,6 +286,48 @@ const server = new ParseServer({
269286
});
270287
```
271288

289+
### Example for AWS Simple Email Service
290+
291+
This is an example for the AWS Simple Email Service client using the AWS JavaScript SDK v3:
292+
293+
```js
294+
// Configure mail client
295+
const { SES, SendEmailCommand } = require('@aws-sdk/client-ses');
296+
297+
const {
298+
fromInstanceMetadata, // Get credentials via IMDS from the AWS instance (when deployed on AWS instance)
299+
fromEnv, // Get AWS credentials from environment variables (when testing locally)
300+
} = require('@aws-sdk/credential-providers');
301+
302+
// Get AWS credentials depending on environment
303+
const credentialProvider= process.env.NODE_ENV == 'production' ? fromInstanceMetadata() : fromEnv();
304+
const credentials = await credentialProvider();
305+
306+
const sesClient = new SES({
307+
credentials,
308+
region: 'eu-west-1',
309+
apiVersion: '2010-12-01'
310+
});
311+
312+
// Configure Parse Server
313+
const server = new ParseServer({
314+
...otherServerOptions,
315+
316+
emailAdapter: {
317+
module: 'parse-server-api-mail-adapter',
318+
options: {
319+
... otherAdapterOptions,
320+
321+
apiCallback: async ({ payload, locale }) => {
322+
const awsSesPayload = ApiPayloadConverter.awsSes(payload);
323+
const command = new SendEmailCommand(awsSesPayload);
324+
await sesClient.send(command);
325+
}
326+
}
327+
}
328+
});
329+
```
330+
272331
## Custom API
273332

274333
This is an example of how the API payload can be adapted in the adapter configuration `apiCallback` according to a custom email provider's API specification.
@@ -304,4 +363,4 @@ const server = new ParseServer({
304363
# Need help?
305364

306365
- Ask on StackOverflow using the [parse-server](https://stackoverflow.com/questions/tagged/parse-server) tag.
307-
- Search through existing [issues](https://github.com/mtrezza/parse-server-api-mail-adapter/issues) or open a new issue.
366+
- Search through existing [issues](https://github.com/parse-community/parse-server-api-mail-adapter/issues) or open a new issue.

changelogs/CHANGELOG_alpha.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,45 @@
1+
# [2.1.0-alpha.9](https://github.com/parse-community/parse-server-api-mail-adapter/compare/2.1.0-alpha.8...2.1.0-alpha.9) (2022-09-15)
2+
3+
4+
### Features
5+
6+
* add AWS SES payload adapter ([#65](https://github.com/parse-community/parse-server-api-mail-adapter/issues/65)) ([4ecc4c9](https://github.com/parse-community/parse-server-api-mail-adapter/commit/4ecc4c9a119fbfcfd658dc7b73e28acaceba9c67))
7+
8+
# [2.1.0-alpha.8](https://github.com/parse-community/parse-server-api-mail-adapter/compare/2.1.0-alpha.7...2.1.0-alpha.8) (2022-06-04)
9+
10+
11+
### Bug Fixes
12+
13+
* security upgrade semver-regex from 3.1.3 to 3.1.4 ([#62](https://github.com/parse-community/parse-server-api-mail-adapter/issues/62)) ([4db06d2](https://github.com/parse-community/parse-server-api-mail-adapter/commit/4db06d218f5b4358701c8f8601a271f2da650ca1))
14+
15+
# [2.1.0-alpha.7](https://github.com/mtrezza/parse-server-api-mail-adapter/compare/2.1.0-alpha.6...2.1.0-alpha.7) (2022-04-10)
16+
17+
18+
### Bug Fixes
19+
20+
* security upgrade node-fetch from 2.6.1 to 2.6.7 ([#60](https://github.com/mtrezza/parse-server-api-mail-adapter/issues/60)) ([576d336](https://github.com/mtrezza/parse-server-api-mail-adapter/commit/576d3365c296adfb0ccd5706d56fae6477f1946c))
21+
22+
# [2.1.0-alpha.6](https://github.com/mtrezza/parse-server-api-mail-adapter/compare/2.1.0-alpha.5...2.1.0-alpha.6) (2022-04-09)
23+
24+
25+
### Bug Fixes
26+
27+
* security upgrade minimist from 1.2.5 to 1.2.6 ([#59](https://github.com/mtrezza/parse-server-api-mail-adapter/issues/59)) ([1a5253f](https://github.com/mtrezza/parse-server-api-mail-adapter/commit/1a5253fd81d763c7f123fa14d788edbc83e04027))
28+
29+
# [2.1.0-alpha.5](https://github.com/mtrezza/parse-server-api-mail-adapter/compare/2.1.0-alpha.4...2.1.0-alpha.5) (2022-01-22)
30+
31+
32+
### Bug Fixes
33+
34+
* bump trim-off-newlines from 1.0.1 to 1.0.3 ([#57](https://github.com/mtrezza/parse-server-api-mail-adapter/issues/57)) ([794cfb6](https://github.com/mtrezza/parse-server-api-mail-adapter/commit/794cfb642678ac83b22c2c666eb9e109cc84e0df))
35+
36+
# [2.1.0-alpha.4](https://github.com/mtrezza/parse-server-api-mail-adapter/compare/2.1.0-alpha.3...2.1.0-alpha.4) (2022-01-22)
37+
38+
39+
### Bug Fixes
40+
41+
* bump nanoid from 3.1.29 to 3.2.0 ([#56](https://github.com/mtrezza/parse-server-api-mail-adapter/issues/56)) ([76a374b](https://github.com/mtrezza/parse-server-api-mail-adapter/commit/76a374b52100e1ce05823300da8a2df21d64ac6c))
42+
143
# [2.1.0-alpha.3](https://github.com/mtrezza/parse-server-api-mail-adapter/compare/2.1.0-alpha.2...2.1.0-alpha.3) (2021-10-08)
244

345

changelogs/CHANGELOG_beta.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# [2.1.0-beta.2](https://github.com/parse-community/parse-server-api-mail-adapter/compare/2.1.0-beta.1...2.1.0-beta.2) (2023-01-24)
2+
3+
4+
### Bug Fixes
5+
6+
* bump nanoid from 3.1.29 to 3.2.0 ([#56](https://github.com/parse-community/parse-server-api-mail-adapter/issues/56)) ([76a374b](https://github.com/parse-community/parse-server-api-mail-adapter/commit/76a374b52100e1ce05823300da8a2df21d64ac6c))
7+
* bump trim-off-newlines from 1.0.1 to 1.0.3 ([#57](https://github.com/parse-community/parse-server-api-mail-adapter/issues/57)) ([794cfb6](https://github.com/parse-community/parse-server-api-mail-adapter/commit/794cfb642678ac83b22c2c666eb9e109cc84e0df))
8+
* security upgrade minimist from 1.2.5 to 1.2.6 ([#59](https://github.com/parse-community/parse-server-api-mail-adapter/issues/59)) ([1a5253f](https://github.com/parse-community/parse-server-api-mail-adapter/commit/1a5253fd81d763c7f123fa14d788edbc83e04027))
9+
* security upgrade node-fetch from 2.6.1 to 2.6.7 ([#60](https://github.com/parse-community/parse-server-api-mail-adapter/issues/60)) ([576d336](https://github.com/parse-community/parse-server-api-mail-adapter/commit/576d3365c296adfb0ccd5706d56fae6477f1946c))
10+
* security upgrade semver-regex from 3.1.3 to 3.1.4 ([#62](https://github.com/parse-community/parse-server-api-mail-adapter/issues/62)) ([4db06d2](https://github.com/parse-community/parse-server-api-mail-adapter/commit/4db06d218f5b4358701c8f8601a271f2da650ca1))
11+
12+
### Features
13+
14+
* add AWS SES payload adapter ([#65](https://github.com/parse-community/parse-server-api-mail-adapter/issues/65)) ([4ecc4c9](https://github.com/parse-community/parse-server-api-mail-adapter/commit/4ecc4c9a119fbfcfd658dc7b73e28acaceba9c67))
15+
116
# [2.1.0-beta.1](https://github.com/mtrezza/parse-server-api-mail-adapter/compare/2.0.0...2.1.0-beta.1) (2021-10-08)
217

318

0 commit comments

Comments
 (0)