@strapi/provider-email-sendmail 0.0.0-next.d2d5476f07ed9436906c990779d719737e5dccd5 → 0.0.0-next.d470b4f75cf00f24f440b80300f1c833c322b871
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 +2 -1
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +36 -37
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +38 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +12 -11
package/dist/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAwB,EAAE,OAAO,EAAa,MAAM,UAAU,CAAC;AAE/D,UAAU,QAAQ;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,WAAW;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,KAAK,eAAe,GAAG,OAAO,CAAC;;0BAGP,eAAe,YAAY,QAAQ;sBAOvC,WAAW,GAAG,QAAQ,IAAI,CAAC;;;AAR/C,wBAmCE"}
|
package/dist/index.js
CHANGED
|
@@ -1,40 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
const sendmailFactory = require("sendmail");
|
|
3
|
+
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
4
|
+
const sendmailFactory__default = /* @__PURE__ */ _interopDefault(sendmailFactory);
|
|
5
|
+
const index = {
|
|
6
|
+
init(providerOptions, settings) {
|
|
7
|
+
const sendmail = sendmailFactory__default.default({
|
|
8
|
+
silent: true,
|
|
9
|
+
...providerOptions
|
|
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
|
+
});
|
|
11
33
|
});
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const { from, to, cc, bcc, replyTo, subject, text, html, ...rest } = options;
|
|
16
|
-
const msg = {
|
|
17
|
-
from: from || settings.defaultFrom,
|
|
18
|
-
to,
|
|
19
|
-
cc,
|
|
20
|
-
bcc,
|
|
21
|
-
replyTo: replyTo || settings.defaultReplyTo,
|
|
22
|
-
subject,
|
|
23
|
-
text,
|
|
24
|
-
html,
|
|
25
|
-
...rest,
|
|
26
|
-
};
|
|
27
|
-
sendmail(msg, (err) => {
|
|
28
|
-
if (err) {
|
|
29
|
-
reject(err);
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
resolve();
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
},
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
}
|
|
39
37
|
};
|
|
40
|
-
|
|
38
|
+
module.exports = index;
|
|
39
|
+
//# 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 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,MAAe,QAAA;AAAA,EACb,KAAK,iBAAkC,UAAoB;AACzD,UAAM,WAAWA,yBAAAA,QAAgB;AAAA,MAC/B,QAAQ;AAAA,MACR,GAAG;AAAA,IAAA,CACJ;AAEM,WAAA;AAAA,MACL,KAAK,SAAqC;AACxC,eAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AAChC,gBAAA,EAAE,MAAM,IAAI,IAAI,KAAK,SAAS,SAAS,MAAM,MAAM,GAAG,KAAA,IAAS;AAErE,gBAAM,MAAiB;AAAA,YACrB,MAAM,QAAQ,SAAS;AAAA,YACvB;AAAA,YACA;AAAA,YACA;AAAA,YACA,SAAS,WAAW,SAAS;AAAA,YAC7B;AAAA,YACA;AAAA,YACA;AAAA,YACA,GAAG;AAAA,UAAA;AAGI,mBAAA,KAAK,CAAC,QAAQ;AACrB,gBAAI,KAAK;AACP,qBAAO,GAAG;AAAA,YAAA,OACL;AACG;YACV;AAAA,UAAA,CACD;AAAA,QAAA,CACF;AAAA,MACH;AAAA,IAAA;AAAA,EAEJ;AACF;;"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import sendmailFactory from "sendmail";
|
|
2
|
+
const index = {
|
|
3
|
+
init(providerOptions, settings) {
|
|
4
|
+
const sendmail = sendmailFactory({
|
|
5
|
+
silent: true,
|
|
6
|
+
...providerOptions
|
|
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
|
+
});
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
index as default
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +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":";AAqBA,MAAe,QAAA;AAAA,EACb,KAAK,iBAAkC,UAAoB;AACzD,UAAM,WAAW,gBAAgB;AAAA,MAC/B,QAAQ;AAAA,MACR,GAAG;AAAA,IAAA,CACJ;AAEM,WAAA;AAAA,MACL,KAAK,SAAqC;AACxC,eAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AAChC,gBAAA,EAAE,MAAM,IAAI,IAAI,KAAK,SAAS,SAAS,MAAM,MAAM,GAAG,KAAA,IAAS;AAErE,gBAAM,MAAiB;AAAA,YACrB,MAAM,QAAQ,SAAS;AAAA,YACvB;AAAA,YACA;AAAA,YACA;AAAA,YACA,SAAS,WAAW,SAAS;AAAA,YAC7B;AAAA,YACA;AAAA,YACA;AAAA,YACA,GAAG;AAAA,UAAA;AAGI,mBAAA,KAAK,CAAC,QAAQ;AACrB,gBAAI,KAAK;AACP,qBAAO,GAAG;AAAA,YAAA,OACL;AACG;YACV;AAAA,UAAA,CACD;AAAA,QAAA,CACF;AAAA,MACH;AAAA,IAAA;AAAA,EAEJ;AACF;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/provider-email-sendmail",
|
|
3
|
-
"version": "0.0.0-next.
|
|
3
|
+
"version": "0.0.0-next.d470b4f75cf00f24f440b80300f1c833c322b871",
|
|
4
4
|
"description": "Sendmail provider for strapi email",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"email",
|
|
@@ -28,30 +28,31 @@
|
|
|
28
28
|
}
|
|
29
29
|
],
|
|
30
30
|
"main": "./dist/index.js",
|
|
31
|
+
"module": "./dist/index.mjs",
|
|
32
|
+
"source": "./src/index.ts",
|
|
31
33
|
"types": "./dist/index.d.ts",
|
|
32
34
|
"files": [
|
|
33
35
|
"./dist"
|
|
34
36
|
],
|
|
35
37
|
"scripts": {
|
|
36
|
-
"build": "
|
|
37
|
-
"build:ts": "run -T tsc",
|
|
38
|
-
"watch": "run -T tsc -w --preserveWatchOutput",
|
|
38
|
+
"build": "pack-up build",
|
|
39
39
|
"clean": "run -T rimraf ./dist",
|
|
40
|
-
"
|
|
41
|
-
"
|
|
40
|
+
"lint": "run -T eslint .",
|
|
41
|
+
"watch": "pack-up watch"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@strapi/utils": "0.0.0-next.
|
|
44
|
+
"@strapi/utils": "0.0.0-next.d470b4f75cf00f24f440b80300f1c833c322b871",
|
|
45
45
|
"sendmail": "^1.6.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
+
"@strapi/pack-up": "0.0.0-next.d470b4f75cf00f24f440b80300f1c833c322b871",
|
|
48
49
|
"@types/sendmail": "1.4.4",
|
|
49
|
-
"eslint-config-custom": "0.0.0-next.
|
|
50
|
-
"tsconfig": "0.0.0-next.
|
|
50
|
+
"eslint-config-custom": "0.0.0-next.d470b4f75cf00f24f440b80300f1c833c322b871",
|
|
51
|
+
"tsconfig": "0.0.0-next.d470b4f75cf00f24f440b80300f1c833c322b871"
|
|
51
52
|
},
|
|
52
53
|
"engines": {
|
|
53
|
-
"node": ">=
|
|
54
|
+
"node": ">=18.0.0 <=20.x.x",
|
|
54
55
|
"npm": ">=6.0.0"
|
|
55
56
|
},
|
|
56
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "d470b4f75cf00f24f440b80300f1c833c322b871"
|
|
57
58
|
}
|