Skip to content

build: Release #74

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

Merged
merged 28 commits into from
Jan 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
76a374b
fix: bump nanoid from 3.1.29 to 3.2.0 (#56)
dependabot[bot] Jan 22, 2022
75987ce
chore(release): 2.1.0-alpha.4 [skip ci]
semantic-release-bot Jan 22, 2022
794cfb6
fix: bump trim-off-newlines from 1.0.1 to 1.0.3 (#57)
dependabot[bot] Jan 22, 2022
05f7694
chore(release): 2.1.0-alpha.5 [skip ci]
semantic-release-bot Jan 22, 2022
1a5253f
fix: security upgrade minimist from 1.2.5 to 1.2.6 (#59)
dependabot[bot] Apr 9, 2022
349d320
chore(release): 2.1.0-alpha.6 [skip ci]
semantic-release-bot Apr 9, 2022
576d336
fix: security upgrade node-fetch from 2.6.1 to 2.6.7 (#60)
dependabot[bot] Apr 10, 2022
c6a1359
chore(release): 2.1.0-alpha.7 [skip ci]
semantic-release-bot Apr 10, 2022
4715fe9
docs: add transfer info to README
mtrezza May 15, 2022
23f439e
refactor: update repo references in package.json
mtrezza May 15, 2022
fb0b0a4
docs: fix typo in README
mtrezza May 15, 2022
e82ee30
docs: update repo links in README
mtrezza May 15, 2022
4db06d2
fix: security upgrade semver-regex from 3.1.3 to 3.1.4 (#62)
dependabot[bot] Jun 4, 2022
572bc34
chore(release): 2.1.0-alpha.8 [skip ci]
semantic-release-bot Jun 4, 2022
4ecc4c9
feat: add AWS SES payload adapter (#65)
woutercouvaras Sep 15, 2022
addb8be
chore(release): 2.1.0-alpha.9 [skip ci]
semantic-release-bot Sep 15, 2022
3e1d6ad
docs: update README
mtrezza Sep 15, 2022
2975fcb
docs: remove node version from README badge
mtrezza Sep 15, 2022
a1321b0
ci: add node versions tests (#67)
mtrezza Sep 15, 2022
14c8eab
refactor: bump marked, @semantic-release/changelog, @semantic-release…
dependabot[bot] Sep 15, 2022
d71917f
docs: fix coverage badge and missing index in README
mtrezza Sep 16, 2022
be9cad7
refactor: bump minimatch from 3.0.4 to 3.1.2 (#68)
dependabot[bot] Nov 10, 2022
a6c1881
refactor: Bump ansi-regex from 5.0.0 to 5.0.1 (#69)
dependabot[bot] Nov 10, 2022
89feba0
refactor: Bump json5 from 2.2.0 to 2.2.3 (#70)
dependabot[bot] Jan 7, 2023
622fdea
Merge branch 'beta' into build-alpha
mtrezza Jan 24, 2023
d753ff8
build: Release beta (#73)
mtrezza Jan 24, 2023
fc070da
chore(release): 2.1.0-beta.2 [skip ci]
semantic-release-bot Jan 24, 2023
fb342fb
Merge branch 'release' into build-release
mtrezza Jan 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
check-circular:
name: Circular Dependencies
timeout-minutes: 5
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.NODE_VERSION }}
Expand All @@ -32,7 +32,7 @@ jobs:
check-lint:
name: Lint
timeout-minutes: 5
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.NODE_VERSION }}
Expand All @@ -50,9 +50,21 @@ jobs:
run: npm ci
- run: npm run lint
check-tests:
strategy:
matrix:
include:
- name: Node 12
NODE_VERSION: 12
- name: Node 14
NODE_VERSION: 14
- name: Node 16
NODE_VERSION: 16
- name: Node 18
NODE_VERSION: 18
fail-fast: false
name: Tests
timeout-minutes: 5
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
node-version: 18
registry-url: https://registry.npmjs.org/
- name: Cache Node.js modules
uses: actions/cache@v2
Expand Down
73 changes: 66 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
# parse-server-api-mail-adapter <!-- omit in toc -->
# Parse Server API Mail Adapter <!-- omit in toc -->

[![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)
[![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)
[![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)
[![auto-release](https://img.shields.io/badge/%F0%9F%9A%80-auto--release-9e34eb.svg)](https://github.com/parse-community/parse-dashboard/releases)

[![Node Version](https://img.shields.io/badge/nodejs-12,_14,_16,_18-green.svg?logo=node.js&style=flat)](https://nodejs.org)

[![npm version](https://badge.fury.io/js/parse-server-api-mail-adapter.svg)](https://badge.fury.io/js/parse-server-api-mail-adapter)
[![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)
[![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)
[![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)
[![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)
[![weekly downloads](https://img.shields.io/npm/dw/parse-server-api-mail-adapter)](https://www.npmjs.com/package/parse-server-api-mail-adapter)

[![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)
[![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)
[![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)

---

The Parse Server API Mail Adapter enables Parse Server to send emails using any 3rd party API with built-in dynamic templates and localization.

## Transfer <!-- omit in toc -->

ℹ️ 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.

---

# Content <!-- omit in toc -->

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

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

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

# Placeholders
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.
Expand Down Expand Up @@ -238,6 +254,7 @@ This adapter supports any REST API by adapting the API payload in the adapter co
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:

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

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

Expand Down Expand Up @@ -269,6 +286,48 @@ const server = new ParseServer({
});
```

### Example for AWS Simple Email Service

This is an example for the AWS Simple Email Service client using the AWS JavaScript SDK v3:

```js
// Configure mail client
const { SES, SendEmailCommand } = require('@aws-sdk/client-ses');

const {
fromInstanceMetadata, // Get credentials via IMDS from the AWS instance (when deployed on AWS instance)
fromEnv, // Get AWS credentials from environment variables (when testing locally)
} = require('@aws-sdk/credential-providers');

// Get AWS credentials depending on environment
const credentialProvider= process.env.NODE_ENV == 'production' ? fromInstanceMetadata() : fromEnv();
const credentials = await credentialProvider();

const sesClient = new SES({
credentials,
region: 'eu-west-1',
apiVersion: '2010-12-01'
});

// Configure Parse Server
const server = new ParseServer({
...otherServerOptions,

emailAdapter: {
module: 'parse-server-api-mail-adapter',
options: {
... otherAdapterOptions,

apiCallback: async ({ payload, locale }) => {
const awsSesPayload = ApiPayloadConverter.awsSes(payload);
const command = new SendEmailCommand(awsSesPayload);
await sesClient.send(command);
}
}
}
});
```

## Custom API

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.
Expand Down Expand Up @@ -304,4 +363,4 @@ const server = new ParseServer({
# Need help?

- Ask on StackOverflow using the [parse-server](https://stackoverflow.com/questions/tagged/parse-server) tag.
- Search through existing [issues](https://github.com/mtrezza/parse-server-api-mail-adapter/issues) or open a new issue.
- Search through existing [issues](https://github.com/parse-community/parse-server-api-mail-adapter/issues) or open a new issue.
42 changes: 42 additions & 0 deletions changelogs/CHANGELOG_alpha.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,45 @@
# [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)


### Features

* 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))

# [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)


### Bug Fixes

* 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))

# [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)


### Bug Fixes

* 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))

# [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)


### Bug Fixes

* 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))

# [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)


### Bug Fixes

* 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))

# [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)


### Bug Fixes

* 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))

# [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)


Expand Down
15 changes: 15 additions & 0 deletions changelogs/CHANGELOG_beta.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# [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)


### Bug Fixes

* 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))
* 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))
* 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))
* 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))
* 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))

### Features

* 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))

# [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)


Expand Down
Loading