@strapi/provider-email-nodemailer 5.9.0 → 5.10.0
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.js +33 -32
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +32 -31
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -6
package/dist/index.js
CHANGED
|
@@ -1,38 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const nodemailer__default = /* @__PURE__ */ _interopDefault(nodemailer);
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _ = require('lodash');
|
|
4
|
+
var nodemailer = require('nodemailer');
|
|
5
|
+
|
|
7
6
|
const emailFields = [
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
'from',
|
|
8
|
+
'replyTo',
|
|
9
|
+
'to',
|
|
10
|
+
'cc',
|
|
11
|
+
'bcc',
|
|
12
|
+
'subject',
|
|
13
|
+
'text',
|
|
14
|
+
'html',
|
|
15
|
+
'attachments'
|
|
17
16
|
];
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
17
|
+
var index = {
|
|
18
|
+
provider: 'nodemailer',
|
|
19
|
+
name: 'Nodemailer',
|
|
20
|
+
init (providerOptions, settings) {
|
|
21
|
+
const transporter = nodemailer.createTransport(providerOptions);
|
|
22
|
+
return {
|
|
23
|
+
send (options) {
|
|
24
|
+
// Default values.
|
|
25
|
+
const emailOptions = {
|
|
26
|
+
..._.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
|
|
31
|
+
};
|
|
32
|
+
return transporter.sendMail(emailOptions);
|
|
33
|
+
}
|
|
31
34
|
};
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
}
|
|
35
|
+
}
|
|
36
36
|
};
|
|
37
|
+
|
|
37
38
|
module.exports = index;
|
|
38
39
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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":"
|
|
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":["emailFields","provider","name","init","providerOptions","settings","transporter","nodemailer","createTransport","send","options","emailOptions","_","pick","from","defaultFrom","replyTo","defaultReplyTo","text","html","sendMail"],"mappings":";;;;;AAsBA,MAAMA,WAAc,GAAA;AAClB,IAAA,MAAA;AACA,IAAA,SAAA;AACA,IAAA,IAAA;AACA,IAAA,IAAA;AACA,IAAA,KAAA;AACA,IAAA,SAAA;AACA,IAAA,MAAA;AACA,IAAA,MAAA;AACA,IAAA;AACD,CAAA;AAED,YAAe;IACbC,QAAU,EAAA,YAAA;IACVC,IAAM,EAAA,YAAA;IAENC,IAAKC,CAAAA,CAAAA,eAAgC,EAAEC,QAAkB,EAAA;QACvD,MAAMC,WAAAA,GAAcC,UAAWC,CAAAA,eAAe,CAACJ,eAAAA,CAAAA;QAE/C,OAAO;AACLK,YAAAA,IAAAA,CAAAA,CAAKC,OAAoB,EAAA;;AAEvB,gBAAA,MAAMC,YAAgC,GAAA;AACpC,oBAAA,GAAGC,CAAEC,CAAAA,IAAI,CAACH,OAAAA,EAASV,WAAY,CAAA;AAC/Bc,oBAAAA,IAAAA,EAAMJ,OAAQI,CAAAA,IAAI,IAAIT,QAAAA,CAASU,WAAW;AAC1CC,oBAAAA,OAAAA,EAASN,OAAQM,CAAAA,OAAO,IAAIX,QAAAA,CAASY,cAAc;AACnDC,oBAAAA,IAAAA,EAAMR,OAAQQ,CAAAA,IAAI,IAAIR,OAAAA,CAAQS,IAAI;AAClCA,oBAAAA,IAAAA,EAAMT,OAAQS,CAAAA,IAAI,IAAIT,OAAAA,CAAQQ;AAChC,iBAAA;gBAEA,OAAOZ,WAAAA,CAAYc,QAAQ,CAACT,YAAAA,CAAAA;AAC9B;AACF,SAAA;AACF;AACF,CAAE;;;;"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,36 +1,37 @@
|
|
|
1
|
-
import _ from
|
|
2
|
-
import nodemailer from
|
|
1
|
+
import _ from 'lodash';
|
|
2
|
+
import nodemailer from 'nodemailer';
|
|
3
|
+
|
|
3
4
|
const emailFields = [
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
'from',
|
|
6
|
+
'replyTo',
|
|
7
|
+
'to',
|
|
8
|
+
'cc',
|
|
9
|
+
'bcc',
|
|
10
|
+
'subject',
|
|
11
|
+
'text',
|
|
12
|
+
'html',
|
|
13
|
+
'attachments'
|
|
13
14
|
];
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
15
|
+
var index = {
|
|
16
|
+
provider: 'nodemailer',
|
|
17
|
+
name: 'Nodemailer',
|
|
18
|
+
init (providerOptions, settings) {
|
|
19
|
+
const transporter = nodemailer.createTransport(providerOptions);
|
|
20
|
+
return {
|
|
21
|
+
send (options) {
|
|
22
|
+
// Default values.
|
|
23
|
+
const emailOptions = {
|
|
24
|
+
..._.pick(options, emailFields),
|
|
25
|
+
from: options.from || settings.defaultFrom,
|
|
26
|
+
replyTo: options.replyTo || settings.defaultReplyTo,
|
|
27
|
+
text: options.text || options.html,
|
|
28
|
+
html: options.html || options.text
|
|
29
|
+
};
|
|
30
|
+
return transporter.sendMail(emailOptions);
|
|
31
|
+
}
|
|
27
32
|
};
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
export {
|
|
34
|
-
index as default
|
|
33
|
+
}
|
|
35
34
|
};
|
|
35
|
+
|
|
36
|
+
export { index as default };
|
|
36
37
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +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":"
|
|
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":["emailFields","provider","name","init","providerOptions","settings","transporter","nodemailer","createTransport","send","options","emailOptions","_","pick","from","defaultFrom","replyTo","defaultReplyTo","text","html","sendMail"],"mappings":";;;AAsBA,MAAMA,WAAc,GAAA;AAClB,IAAA,MAAA;AACA,IAAA,SAAA;AACA,IAAA,IAAA;AACA,IAAA,IAAA;AACA,IAAA,KAAA;AACA,IAAA,SAAA;AACA,IAAA,MAAA;AACA,IAAA,MAAA;AACA,IAAA;AACD,CAAA;AAED,YAAe;IACbC,QAAU,EAAA,YAAA;IACVC,IAAM,EAAA,YAAA;IAENC,IAAKC,CAAAA,CAAAA,eAAgC,EAAEC,QAAkB,EAAA;QACvD,MAAMC,WAAAA,GAAcC,UAAWC,CAAAA,eAAe,CAACJ,eAAAA,CAAAA;QAE/C,OAAO;AACLK,YAAAA,IAAAA,CAAAA,CAAKC,OAAoB,EAAA;;AAEvB,gBAAA,MAAMC,YAAgC,GAAA;AACpC,oBAAA,GAAGC,CAAEC,CAAAA,IAAI,CAACH,OAAAA,EAASV,WAAY,CAAA;AAC/Bc,oBAAAA,IAAAA,EAAMJ,OAAQI,CAAAA,IAAI,IAAIT,QAAAA,CAASU,WAAW;AAC1CC,oBAAAA,OAAAA,EAASN,OAAQM,CAAAA,OAAO,IAAIX,QAAAA,CAASY,cAAc;AACnDC,oBAAAA,IAAAA,EAAMR,OAAQQ,CAAAA,IAAI,IAAIR,OAAAA,CAAQS,IAAI;AAClCA,oBAAAA,IAAAA,EAAMT,OAAQS,CAAAA,IAAI,IAAIT,OAAAA,CAAQQ;AAChC,iBAAA;gBAEA,OAAOZ,WAAAA,CAAYc,QAAQ,CAACT,YAAAA,CAAAA;AAC9B;AACF,SAAA;AACF;AACF,CAAE;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/provider-email-nodemailer",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.10.0",
|
|
4
4
|
"description": "Nodemailer provider for Strapi 3",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"strapi",
|
|
@@ -49,20 +49,21 @@
|
|
|
49
49
|
"dist/"
|
|
50
50
|
],
|
|
51
51
|
"scripts": {
|
|
52
|
-
"build": "
|
|
52
|
+
"build": "run -T npm-run-all clean --parallel build:code build:types",
|
|
53
|
+
"build:code": "run -T rollup -c",
|
|
54
|
+
"build:types": "run -T tsc -p tsconfig.build.json --emitDeclarationOnly",
|
|
53
55
|
"clean": "run -T rimraf ./dist",
|
|
54
56
|
"lint": "run -T eslint .",
|
|
55
|
-
"watch": "
|
|
57
|
+
"watch": "run -T rollup -c -w"
|
|
56
58
|
},
|
|
57
59
|
"dependencies": {
|
|
58
60
|
"lodash": "4.17.21",
|
|
59
61
|
"nodemailer": "6.9.1"
|
|
60
62
|
},
|
|
61
63
|
"devDependencies": {
|
|
62
|
-
"@strapi/pack-up": "5.0.2",
|
|
63
64
|
"@types/nodemailer": "6.4.7",
|
|
64
|
-
"eslint-config-custom": "5.
|
|
65
|
-
"tsconfig": "5.
|
|
65
|
+
"eslint-config-custom": "5.10.0",
|
|
66
|
+
"tsconfig": "5.10.0"
|
|
66
67
|
},
|
|
67
68
|
"engines": {
|
|
68
69
|
"node": ">=18.0.0 <=22.x.x",
|