@strapi/provider-email-mailgun 4.3.2 → 4.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.js +4 -4
  2. package/package.json +4 -4
package/lib/index.js CHANGED
@@ -5,15 +5,15 @@ const Mailgun = require('mailgun.js');
5
5
  const { removeUndefined } = require('@strapi/utils');
6
6
 
7
7
  const optionsMap = {
8
- apiKey: { field: 'key', fn: value => value },
9
- host: { field: 'url', fn: value => `https://${value || 'api.mailgun.net'}` },
8
+ apiKey: { field: 'key', fn: (value) => value },
9
+ host: { field: 'url', fn: (value) => `https://${value || 'api.mailgun.net'}` },
10
10
  };
11
11
 
12
12
  module.exports = {
13
13
  convertProviderOptions(providerOptions = {}) {
14
14
  const newOptions = {};
15
15
  if (typeof providerOptions === 'object') {
16
- Object.keys(providerOptions).forEach(key => {
16
+ Object.keys(providerOptions).forEach((key) => {
17
17
  if (Object.keys(optionsMap).includes(key)) {
18
18
  newOptions[optionsMap[key].field] = optionsMap[key].fn(providerOptions[key]);
19
19
  } else {
@@ -35,7 +35,7 @@ module.exports = {
35
35
  send(options) {
36
36
  const { from, to, cc, bcc, replyTo, subject, text, html, ...rest } = options;
37
37
 
38
- let data = {
38
+ const data = {
39
39
  from: from || settings.defaultFrom,
40
40
  to,
41
41
  cc,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/provider-email-mailgun",
3
- "version": "4.3.2",
3
+ "version": "4.3.5",
4
4
  "description": "Mailgun provider for strapi email plugin",
5
5
  "keywords": [
6
6
  "email",
@@ -36,13 +36,13 @@
36
36
  "test": "echo \"no tests yet\""
37
37
  },
38
38
  "dependencies": {
39
- "@strapi/utils": "4.3.2",
39
+ "@strapi/utils": "4.3.5",
40
40
  "form-data": "^4.0.0",
41
- "mailgun.js": "5.0.2"
41
+ "mailgun.js": "5.2.2"
42
42
  },
43
43
  "engines": {
44
44
  "node": ">=14.19.1 <=16.x.x",
45
45
  "npm": ">=6.0.0"
46
46
  },
47
- "gitHead": "7039c0d22836c94457130515b3a55eb93d2411f8"
47
+ "gitHead": "a52b0535513ff35b4ef46c9daf7be48f2ba71737"
48
48
  }