@strapi/provider-email-nodemailer 4.14.2 → 4.14.4
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.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +33 -33
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +36 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +10 -8
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
const
|
|
6
|
-
const
|
|
2
|
+
const _ = require("lodash");
|
|
3
|
+
const nodemailer = require("nodemailer");
|
|
4
|
+
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
5
|
+
const ___default = /* @__PURE__ */ _interopDefault(_);
|
|
6
|
+
const nodemailer__default = /* @__PURE__ */ _interopDefault(nodemailer);
|
|
7
7
|
const emailFields = [
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
"from",
|
|
9
|
+
"replyTo",
|
|
10
|
+
"to",
|
|
11
|
+
"cc",
|
|
12
|
+
"bcc",
|
|
13
|
+
"subject",
|
|
14
|
+
"text",
|
|
15
|
+
"html",
|
|
16
|
+
"attachments"
|
|
17
17
|
];
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
html: options.html || options.text,
|
|
32
|
-
};
|
|
33
|
-
return transporter.sendMail(emailOptions);
|
|
34
|
-
},
|
|
18
|
+
const index = {
|
|
19
|
+
provider: "nodemailer",
|
|
20
|
+
name: "Nodemailer",
|
|
21
|
+
init(providerOptions, settings) {
|
|
22
|
+
const transporter = nodemailer__default.default.createTransport(providerOptions);
|
|
23
|
+
return {
|
|
24
|
+
send(options) {
|
|
25
|
+
const emailOptions = {
|
|
26
|
+
...___default.default.pick(options, emailFields),
|
|
27
|
+
from: options.from || settings.defaultFrom,
|
|
28
|
+
replyTo: options.replyTo || settings.defaultReplyTo,
|
|
29
|
+
text: options.text || options.html,
|
|
30
|
+
html: options.html || options.text
|
|
35
31
|
};
|
|
36
|
-
|
|
32
|
+
return transporter.sendMail(emailOptions);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
37
36
|
};
|
|
38
|
-
|
|
37
|
+
module.exports = index;
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import _ from 'lodash';\nimport nodemailer, { SendMailOptions } from 'nodemailer';\n\ninterface Settings {\n defaultFrom: string;\n defaultReplyTo: string;\n}\n\ninterface SendOptions {\n from?: string;\n to: string;\n cc: string;\n bcc: string;\n replyTo?: string;\n subject: string;\n text: string;\n html: string;\n [key: string]: unknown;\n}\n\ntype ProviderOptions = Parameters<typeof nodemailer.createTransport>[0];\n\nconst emailFields = [\n 'from',\n 'replyTo',\n 'to',\n 'cc',\n 'bcc',\n 'subject',\n 'text',\n 'html',\n 'attachments',\n];\n\nexport default {\n provider: 'nodemailer',\n name: 'Nodemailer',\n\n init(providerOptions: ProviderOptions, settings: Settings) {\n const transporter = nodemailer.createTransport(providerOptions);\n\n return {\n send(options: SendOptions) {\n // Default values.\n const emailOptions: SendMailOptions = {\n ..._.pick(options, emailFields),\n from: options.from || settings.defaultFrom,\n replyTo: options.replyTo || settings.defaultReplyTo,\n text: options.text || options.html,\n html: options.html || options.text,\n };\n\n return transporter.sendMail(emailOptions);\n },\n };\n },\n};\n"],"names":["nodemailer","_"],"mappings":";;;;;;AAsBA,MAAM,cAAc;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,MAAe,QAAA;AAAA,EACb,UAAU;AAAA,EACV,MAAM;AAAA,EAEN,KAAK,iBAAkC,UAAoB;AACnD,UAAA,cAAcA,oBAAAA,QAAW,gBAAgB,eAAe;AAEvD,WAAA;AAAA,MACL,KAAK,SAAsB;AAEzB,cAAM,eAAgC;AAAA,UACpC,GAAGC,mBAAE,KAAK,SAAS,WAAW;AAAA,UAC9B,MAAM,QAAQ,QAAQ,SAAS;AAAA,UAC/B,SAAS,QAAQ,WAAW,SAAS;AAAA,UACrC,MAAM,QAAQ,QAAQ,QAAQ;AAAA,UAC9B,MAAM,QAAQ,QAAQ,QAAQ;AAAA,QAAA;AAGzB,eAAA,YAAY,SAAS,YAAY;AAAA,MAC1C;AAAA,IAAA;AAAA,EAEJ;AACF;;"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import _ from "lodash";
|
|
2
|
+
import nodemailer from "nodemailer";
|
|
3
|
+
const emailFields = [
|
|
4
|
+
"from",
|
|
5
|
+
"replyTo",
|
|
6
|
+
"to",
|
|
7
|
+
"cc",
|
|
8
|
+
"bcc",
|
|
9
|
+
"subject",
|
|
10
|
+
"text",
|
|
11
|
+
"html",
|
|
12
|
+
"attachments"
|
|
13
|
+
];
|
|
14
|
+
const index = {
|
|
15
|
+
provider: "nodemailer",
|
|
16
|
+
name: "Nodemailer",
|
|
17
|
+
init(providerOptions, settings) {
|
|
18
|
+
const transporter = nodemailer.createTransport(providerOptions);
|
|
19
|
+
return {
|
|
20
|
+
send(options) {
|
|
21
|
+
const emailOptions = {
|
|
22
|
+
..._.pick(options, emailFields),
|
|
23
|
+
from: options.from || settings.defaultFrom,
|
|
24
|
+
replyTo: options.replyTo || settings.defaultReplyTo,
|
|
25
|
+
text: options.text || options.html,
|
|
26
|
+
html: options.html || options.text
|
|
27
|
+
};
|
|
28
|
+
return transporter.sendMail(emailOptions);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
index as default
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../src/index.ts"],"sourcesContent":["import _ from 'lodash';\nimport nodemailer, { SendMailOptions } from 'nodemailer';\n\ninterface Settings {\n defaultFrom: string;\n defaultReplyTo: string;\n}\n\ninterface SendOptions {\n from?: string;\n to: string;\n cc: string;\n bcc: string;\n replyTo?: string;\n subject: string;\n text: string;\n html: string;\n [key: string]: unknown;\n}\n\ntype ProviderOptions = Parameters<typeof nodemailer.createTransport>[0];\n\nconst emailFields = [\n 'from',\n 'replyTo',\n 'to',\n 'cc',\n 'bcc',\n 'subject',\n 'text',\n 'html',\n 'attachments',\n];\n\nexport default {\n provider: 'nodemailer',\n name: 'Nodemailer',\n\n init(providerOptions: ProviderOptions, settings: Settings) {\n const transporter = nodemailer.createTransport(providerOptions);\n\n return {\n send(options: SendOptions) {\n // Default values.\n const emailOptions: SendMailOptions = {\n ..._.pick(options, emailFields),\n from: options.from || settings.defaultFrom,\n replyTo: options.replyTo || settings.defaultReplyTo,\n text: options.text || options.html,\n html: options.html || options.text,\n };\n\n return transporter.sendMail(emailOptions);\n },\n };\n },\n};\n"],"names":[],"mappings":";;AAsBA,MAAM,cAAc;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,MAAe,QAAA;AAAA,EACb,UAAU;AAAA,EACV,MAAM;AAAA,EAEN,KAAK,iBAAkC,UAAoB;AACnD,UAAA,cAAc,WAAW,gBAAgB,eAAe;AAEvD,WAAA;AAAA,MACL,KAAK,SAAsB;AAEzB,cAAM,eAAgC;AAAA,UACpC,GAAG,EAAE,KAAK,SAAS,WAAW;AAAA,UAC9B,MAAM,QAAQ,QAAQ,SAAS;AAAA,UAC/B,SAAS,QAAQ,WAAW,SAAS;AAAA,UACrC,MAAM,QAAQ,QAAQ,QAAQ;AAAA,UAC9B,MAAM,QAAQ,QAAQ,QAAQ;AAAA,QAAA;AAGzB,eAAA,YAAY,SAAS,YAAY;AAAA,MAC1C;AAAA,IAAA;AAAA,EAEJ;AACF;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/provider-email-nodemailer",
|
|
3
|
-
"version": "4.14.
|
|
3
|
+
"version": "4.14.4",
|
|
4
4
|
"description": "Nodemailer provider for Strapi 3",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"strapi",
|
|
@@ -42,30 +42,32 @@
|
|
|
42
42
|
}
|
|
43
43
|
],
|
|
44
44
|
"main": "./dist/index.js",
|
|
45
|
+
"module": "./dist/index.mjs",
|
|
46
|
+
"source": "./src/index.ts",
|
|
45
47
|
"types": "./dist/index.d.ts",
|
|
46
48
|
"files": [
|
|
47
49
|
"./dist"
|
|
48
50
|
],
|
|
49
51
|
"scripts": {
|
|
50
|
-
"build": "
|
|
51
|
-
"build:ts": "run -T tsc",
|
|
52
|
-
"watch": "run -T tsc -w --preserveWatchOutput",
|
|
52
|
+
"build": "pack-up build",
|
|
53
53
|
"clean": "run -T rimraf ./dist",
|
|
54
|
+
"lint": "run -T eslint .",
|
|
54
55
|
"prepublishOnly": "yarn clean && yarn build",
|
|
55
|
-
"
|
|
56
|
+
"watch": "pack-up watch"
|
|
56
57
|
},
|
|
57
58
|
"dependencies": {
|
|
58
59
|
"lodash": "4.17.21",
|
|
59
60
|
"nodemailer": "6.9.1"
|
|
60
61
|
},
|
|
61
62
|
"devDependencies": {
|
|
63
|
+
"@strapi/pack-up": "4.14.4",
|
|
62
64
|
"@types/nodemailer": "6.4.7",
|
|
63
|
-
"eslint-config-custom": "4.14.
|
|
64
|
-
"tsconfig": "4.14.
|
|
65
|
+
"eslint-config-custom": "4.14.4",
|
|
66
|
+
"tsconfig": "4.14.4"
|
|
65
67
|
},
|
|
66
68
|
"engines": {
|
|
67
69
|
"node": ">=16.0.0 <=20.x.x",
|
|
68
70
|
"npm": ">=6.0.0"
|
|
69
71
|
},
|
|
70
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "fbd6e3e3014b1c5eee1d7bb8d65e273318662656"
|
|
71
73
|
}
|