@strapi/provider-email-sendmail 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 +36 -35
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +35 -35
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -7
package/dist/index.js
CHANGED
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
});
|
|
11
|
-
return {
|
|
12
|
-
send(options) {
|
|
13
|
-
return new Promise((resolve, reject) => {
|
|
14
|
-
const { from, to, cc, bcc, replyTo, subject, text, html, ...rest } = options;
|
|
15
|
-
const msg = {
|
|
16
|
-
from: from || settings.defaultFrom,
|
|
17
|
-
to,
|
|
18
|
-
cc,
|
|
19
|
-
bcc,
|
|
20
|
-
replyTo: replyTo || settings.defaultReplyTo,
|
|
21
|
-
subject,
|
|
22
|
-
text,
|
|
23
|
-
html,
|
|
24
|
-
...rest
|
|
25
|
-
};
|
|
26
|
-
sendmail(msg, (err) => {
|
|
27
|
-
if (err) {
|
|
28
|
-
reject(err);
|
|
29
|
-
} else {
|
|
30
|
-
resolve();
|
|
31
|
-
}
|
|
32
|
-
});
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var sendmailFactory = require('sendmail');
|
|
4
|
+
|
|
5
|
+
var index = {
|
|
6
|
+
init (providerOptions, settings) {
|
|
7
|
+
const sendmail = sendmailFactory({
|
|
8
|
+
silent: true,
|
|
9
|
+
...providerOptions
|
|
33
10
|
});
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
11
|
+
return {
|
|
12
|
+
send (options) {
|
|
13
|
+
return new Promise((resolve, reject)=>{
|
|
14
|
+
const { from, to, cc, bcc, replyTo, subject, text, html, ...rest } = options;
|
|
15
|
+
const msg = {
|
|
16
|
+
from: from || settings.defaultFrom,
|
|
17
|
+
to,
|
|
18
|
+
cc,
|
|
19
|
+
bcc,
|
|
20
|
+
replyTo: replyTo || settings.defaultReplyTo,
|
|
21
|
+
subject,
|
|
22
|
+
text,
|
|
23
|
+
html,
|
|
24
|
+
...rest
|
|
25
|
+
};
|
|
26
|
+
sendmail(msg, (err)=>{
|
|
27
|
+
if (err) {
|
|
28
|
+
reject(err);
|
|
29
|
+
} else {
|
|
30
|
+
resolve();
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
37
|
};
|
|
38
|
+
|
|
38
39
|
module.exports = index;
|
|
39
40
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import sendmailFactory, { Options, MailInput } from 'sendmail';\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 = Options;\n\nexport default {\n init(providerOptions: ProviderOptions, settings: Settings) {\n const sendmail = sendmailFactory({\n silent: true,\n ...providerOptions,\n });\n\n return {\n send(options: SendOptions): Promise<void> {\n return new Promise((resolve, reject) => {\n const { from, to, cc, bcc, replyTo, subject, text, html, ...rest } = options;\n\n const msg: MailInput = {\n from: from || settings.defaultFrom,\n to,\n cc,\n bcc,\n replyTo: replyTo || settings.defaultReplyTo,\n subject,\n text,\n html,\n ...rest,\n };\n\n sendmail(msg, (err) => {\n if (err) {\n reject(err);\n } else {\n resolve();\n }\n });\n });\n },\n };\n },\n};\n"],"names":["sendmailFactory"],"mappings":";;;;AAqBA,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import sendmailFactory, { Options, MailInput } from 'sendmail';\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 = Options;\n\nexport default {\n init(providerOptions: ProviderOptions, settings: Settings) {\n const sendmail = sendmailFactory({\n silent: true,\n ...providerOptions,\n });\n\n return {\n send(options: SendOptions): Promise<void> {\n return new Promise((resolve, reject) => {\n const { from, to, cc, bcc, replyTo, subject, text, html, ...rest } = options;\n\n const msg: MailInput = {\n from: from || settings.defaultFrom,\n to,\n cc,\n bcc,\n replyTo: replyTo || settings.defaultReplyTo,\n subject,\n text,\n html,\n ...rest,\n };\n\n sendmail(msg, (err) => {\n if (err) {\n reject(err);\n } else {\n resolve();\n }\n });\n });\n },\n };\n },\n};\n"],"names":["init","providerOptions","settings","sendmail","sendmailFactory","silent","send","options","Promise","resolve","reject","from","to","cc","bcc","replyTo","subject","text","html","rest","msg","defaultFrom","defaultReplyTo","err"],"mappings":";;;;AAqBA,YAAe;IACbA,IAAKC,CAAAA,CAAAA,eAAgC,EAAEC,QAAkB,EAAA;AACvD,QAAA,MAAMC,WAAWC,eAAgB,CAAA;YAC/BC,MAAQ,EAAA,IAAA;AACR,YAAA,GAAGJ;AACL,SAAA,CAAA;QAEA,OAAO;AACLK,YAAAA,IAAAA,CAAAA,CAAKC,OAAoB,EAAA;gBACvB,OAAO,IAAIC,OAAQ,CAAA,CAACC,OAASC,EAAAA,MAAAA,GAAAA;AAC3B,oBAAA,MAAM,EAAEC,IAAI,EAAEC,EAAE,EAAEC,EAAE,EAAEC,GAAG,EAAEC,OAAO,EAAEC,OAAO,EAAEC,IAAI,EAAEC,IAAI,EAAE,GAAGC,MAAM,GAAGZ,OAAAA;AAErE,oBAAA,MAAMa,GAAiB,GAAA;wBACrBT,IAAMA,EAAAA,IAAAA,IAAQT,SAASmB,WAAW;AAClCT,wBAAAA,EAAAA;AACAC,wBAAAA,EAAAA;AACAC,wBAAAA,GAAAA;wBACAC,OAASA,EAAAA,OAAAA,IAAWb,SAASoB,cAAc;AAC3CN,wBAAAA,OAAAA;AACAC,wBAAAA,IAAAA;AACAC,wBAAAA,IAAAA;AACA,wBAAA,GAAGC;AACL,qBAAA;AAEAhB,oBAAAA,QAAAA,CAASiB,KAAK,CAACG,GAAAA,GAAAA;AACb,wBAAA,IAAIA,GAAK,EAAA;4BACPb,MAAOa,CAAAA,GAAAA,CAAAA;yBACF,MAAA;AACLd,4BAAAA,OAAAA,EAAAA;AACF;AACF,qBAAA,CAAA;AACF,iBAAA,CAAA;AACF;AACF,SAAA;AACF;AACF,CAAE;;;;"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import sendmailFactory from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return {
|
|
9
|
-
send(options) {
|
|
10
|
-
return new Promise((resolve, reject) => {
|
|
11
|
-
const { from, to, cc, bcc, replyTo, subject, text, html, ...rest } = options;
|
|
12
|
-
const msg = {
|
|
13
|
-
from: from || settings.defaultFrom,
|
|
14
|
-
to,
|
|
15
|
-
cc,
|
|
16
|
-
bcc,
|
|
17
|
-
replyTo: replyTo || settings.defaultReplyTo,
|
|
18
|
-
subject,
|
|
19
|
-
text,
|
|
20
|
-
html,
|
|
21
|
-
...rest
|
|
22
|
-
};
|
|
23
|
-
sendmail(msg, (err) => {
|
|
24
|
-
if (err) {
|
|
25
|
-
reject(err);
|
|
26
|
-
} else {
|
|
27
|
-
resolve();
|
|
28
|
-
}
|
|
29
|
-
});
|
|
1
|
+
import sendmailFactory from 'sendmail';
|
|
2
|
+
|
|
3
|
+
var index = {
|
|
4
|
+
init (providerOptions, settings) {
|
|
5
|
+
const sendmail = sendmailFactory({
|
|
6
|
+
silent: true,
|
|
7
|
+
...providerOptions
|
|
30
8
|
});
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
|
|
9
|
+
return {
|
|
10
|
+
send (options) {
|
|
11
|
+
return new Promise((resolve, reject)=>{
|
|
12
|
+
const { from, to, cc, bcc, replyTo, subject, text, html, ...rest } = options;
|
|
13
|
+
const msg = {
|
|
14
|
+
from: from || settings.defaultFrom,
|
|
15
|
+
to,
|
|
16
|
+
cc,
|
|
17
|
+
bcc,
|
|
18
|
+
replyTo: replyTo || settings.defaultReplyTo,
|
|
19
|
+
subject,
|
|
20
|
+
text,
|
|
21
|
+
html,
|
|
22
|
+
...rest
|
|
23
|
+
};
|
|
24
|
+
sendmail(msg, (err)=>{
|
|
25
|
+
if (err) {
|
|
26
|
+
reject(err);
|
|
27
|
+
} else {
|
|
28
|
+
resolve();
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
37
35
|
};
|
|
36
|
+
|
|
37
|
+
export { index as default };
|
|
38
38
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../src/index.ts"],"sourcesContent":["import sendmailFactory, { Options, MailInput } from 'sendmail';\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 = Options;\n\nexport default {\n init(providerOptions: ProviderOptions, settings: Settings) {\n const sendmail = sendmailFactory({\n silent: true,\n ...providerOptions,\n });\n\n return {\n send(options: SendOptions): Promise<void> {\n return new Promise((resolve, reject) => {\n const { from, to, cc, bcc, replyTo, subject, text, html, ...rest } = options;\n\n const msg: MailInput = {\n from: from || settings.defaultFrom,\n to,\n cc,\n bcc,\n replyTo: replyTo || settings.defaultReplyTo,\n subject,\n text,\n html,\n ...rest,\n };\n\n sendmail(msg, (err) => {\n if (err) {\n reject(err);\n } else {\n resolve();\n }\n });\n });\n },\n };\n },\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../src/index.ts"],"sourcesContent":["import sendmailFactory, { Options, MailInput } from 'sendmail';\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 = Options;\n\nexport default {\n init(providerOptions: ProviderOptions, settings: Settings) {\n const sendmail = sendmailFactory({\n silent: true,\n ...providerOptions,\n });\n\n return {\n send(options: SendOptions): Promise<void> {\n return new Promise((resolve, reject) => {\n const { from, to, cc, bcc, replyTo, subject, text, html, ...rest } = options;\n\n const msg: MailInput = {\n from: from || settings.defaultFrom,\n to,\n cc,\n bcc,\n replyTo: replyTo || settings.defaultReplyTo,\n subject,\n text,\n html,\n ...rest,\n };\n\n sendmail(msg, (err) => {\n if (err) {\n reject(err);\n } else {\n resolve();\n }\n });\n });\n },\n };\n },\n};\n"],"names":["init","providerOptions","settings","sendmail","sendmailFactory","silent","send","options","Promise","resolve","reject","from","to","cc","bcc","replyTo","subject","text","html","rest","msg","defaultFrom","defaultReplyTo","err"],"mappings":";;AAqBA,YAAe;IACbA,IAAKC,CAAAA,CAAAA,eAAgC,EAAEC,QAAkB,EAAA;AACvD,QAAA,MAAMC,WAAWC,eAAgB,CAAA;YAC/BC,MAAQ,EAAA,IAAA;AACR,YAAA,GAAGJ;AACL,SAAA,CAAA;QAEA,OAAO;AACLK,YAAAA,IAAAA,CAAAA,CAAKC,OAAoB,EAAA;gBACvB,OAAO,IAAIC,OAAQ,CAAA,CAACC,OAASC,EAAAA,MAAAA,GAAAA;AAC3B,oBAAA,MAAM,EAAEC,IAAI,EAAEC,EAAE,EAAEC,EAAE,EAAEC,GAAG,EAAEC,OAAO,EAAEC,OAAO,EAAEC,IAAI,EAAEC,IAAI,EAAE,GAAGC,MAAM,GAAGZ,OAAAA;AAErE,oBAAA,MAAMa,GAAiB,GAAA;wBACrBT,IAAMA,EAAAA,IAAAA,IAAQT,SAASmB,WAAW;AAClCT,wBAAAA,EAAAA;AACAC,wBAAAA,EAAAA;AACAC,wBAAAA,GAAAA;wBACAC,OAASA,EAAAA,OAAAA,IAAWb,SAASoB,cAAc;AAC3CN,wBAAAA,OAAAA;AACAC,wBAAAA,IAAAA;AACAC,wBAAAA,IAAAA;AACA,wBAAA,GAAGC;AACL,qBAAA;AAEAhB,oBAAAA,QAAAA,CAASiB,KAAK,CAACG,GAAAA,GAAAA;AACb,wBAAA,IAAIA,GAAK,EAAA;4BACPb,MAAOa,CAAAA,GAAAA,CAAAA;yBACF,MAAA;AACLd,4BAAAA,OAAAA,EAAAA;AACF;AACF,qBAAA,CAAA;AACF,iBAAA,CAAA;AACF;AACF,SAAA;AACF;AACF,CAAE;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/provider-email-sendmail",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.10.0",
|
|
4
4
|
"description": "Sendmail provider for strapi email",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"email",
|
|
@@ -35,20 +35,21 @@
|
|
|
35
35
|
"dist/"
|
|
36
36
|
],
|
|
37
37
|
"scripts": {
|
|
38
|
-
"build": "
|
|
38
|
+
"build": "run -T npm-run-all clean --parallel build:code build:types",
|
|
39
|
+
"build:code": "run -T rollup -c",
|
|
40
|
+
"build:types": "run -T tsc -p tsconfig.build.json --emitDeclarationOnly",
|
|
39
41
|
"clean": "run -T rimraf ./dist",
|
|
40
42
|
"lint": "run -T eslint .",
|
|
41
|
-
"watch": "
|
|
43
|
+
"watch": "run -T rollup -c -w"
|
|
42
44
|
},
|
|
43
45
|
"dependencies": {
|
|
44
|
-
"@strapi/utils": "5.
|
|
46
|
+
"@strapi/utils": "5.10.0",
|
|
45
47
|
"sendmail": "^1.6.1"
|
|
46
48
|
},
|
|
47
49
|
"devDependencies": {
|
|
48
|
-
"@strapi/pack-up": "5.0.2",
|
|
49
50
|
"@types/sendmail": "1.4.4",
|
|
50
|
-
"eslint-config-custom": "5.
|
|
51
|
-
"tsconfig": "5.
|
|
51
|
+
"eslint-config-custom": "5.10.0",
|
|
52
|
+
"tsconfig": "5.10.0"
|
|
52
53
|
},
|
|
53
54
|
"engines": {
|
|
54
55
|
"node": ">=18.0.0 <=22.x.x",
|