@vitnode/nodemailer 1.2.0-canary.75 → 1.2.0-canary.76
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/src/index.d.ts +11 -8
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +2 -1
- package/dist/src/index.js.map +1 -0
- package/package.json +6 -9
- package/tsconfig.build.json +5 -0
package/dist/src/index.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { EmailApiPlugin } from "@vitnode/core/api/models/email";
|
|
2
|
+
//#region src/index.d.ts
|
|
3
|
+
declare const NodemailerEmailAdapter: ({ host, port, secure, user, password, from }: {
|
|
4
|
+
from: string | undefined;
|
|
5
|
+
host: string | undefined;
|
|
6
|
+
password: string | undefined;
|
|
7
|
+
port?: number;
|
|
8
|
+
secure?: boolean;
|
|
9
|
+
user: string | undefined;
|
|
9
10
|
}) => EmailApiPlugin;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { NodemailerEmailAdapter };
|
|
10
13
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"mappings":";;cAIa,2BAA0B,MAAA,MAAA,QAAA,MAAA,UAAA;EAQrC;EACA;EACA;EACA;EACA;EACA;MACE"}
|
package/dist/src/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{createTransport}from"nodemailer";
|
|
1
|
+
import{createTransport as e}from"nodemailer";const t=({host:t=``,port:n=587,secure:r=!1,user:i=``,password:a=``,from:o=``})=>({sendEmail:async({metadata:s,to:c,subject:l,html:u,replyTo:d})=>{if(!(t&&i&&a&&o))throw Error(`Missing nodemailer configuration`);await e({host:t,port:n,secure:r,auth:{user:i,pass:a}},{from:{name:s.shortTitle??s.title,address:o},replyTo:d}).sendMail({to:c,subject:l,html:u})}});export{t as NodemailerEmailAdapter};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["import type { EmailApiPlugin } from \"@vitnode/core/api/models/email\";\n\nimport { createTransport } from \"nodemailer\";\n\nexport const NodemailerEmailAdapter = ({\n host = \"\",\n port = 587,\n secure = false,\n user = \"\",\n password = \"\",\n from = \"\",\n}: {\n from: string | undefined;\n host: string | undefined;\n password: string | undefined;\n port?: number;\n secure?: boolean;\n user: string | undefined;\n}): EmailApiPlugin => {\n return {\n sendEmail: async ({ metadata, to, subject, html, replyTo }) => {\n if (!(host && user && password && from)) {\n throw new Error(\"Missing nodemailer configuration\");\n }\n\n const transporter = createTransport(\n {\n host,\n port,\n secure,\n auth: {\n user,\n pass: password,\n },\n },\n {\n from: {\n name: metadata.shortTitle ?? metadata.title,\n address: from,\n },\n replyTo,\n },\n );\n\n await transporter.sendMail({\n to,\n subject,\n html,\n });\n },\n };\n};\n"],"mappings":"6CAIA,MAAa,GAA0B,CACrC,OAAO,GACP,OAAO,IACP,SAAS,GACT,OAAO,GACP,WAAW,GACX,OAAO,OASA,CACL,UAAW,MAAO,CAAE,WAAU,KAAI,UAAS,OAAM,aAAc,CAC7D,GAAI,EAAE,GAAQ,GAAQ,GAAY,GAChC,MAAU,MAAM,kCAAkC,EAsBpD,MAnBoB,EAClB,CACE,OACA,OACA,SACA,KAAM,CACJ,OACA,KAAM,CACR,CACF,EACA,CACE,KAAM,CACJ,KAAM,EAAS,YAAc,EAAS,MACtC,QAAS,CACX,EACA,SACF,CAGc,CAAC,CAAC,SAAS,CACzB,KACA,UACA,MACF,CAAC,CACH,CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitnode/nodemailer",
|
|
3
|
-
"version": "1.2.0-canary.
|
|
3
|
+
"version": "1.2.0-canary.76",
|
|
4
4
|
"description": "Nodemailer integration package for VitNode, enabling email functionalities.",
|
|
5
5
|
"author": "VitNode Team",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,19 +27,16 @@
|
|
|
27
27
|
"nodemailer": "^9.0.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@swc/cli": "^0.8.1",
|
|
31
|
-
"@swc/core": "^1.15.43",
|
|
32
30
|
"@types/nodemailer": "^8.0.1",
|
|
33
|
-
"concurrently": "^10.0.3",
|
|
34
31
|
"eslint": "^10.5.0",
|
|
35
|
-
"
|
|
32
|
+
"tsdown": "^0.22.4",
|
|
36
33
|
"typescript": "^6.0.3",
|
|
37
|
-
"@vitnode/config": "1.2.0-canary.
|
|
38
|
-
"@vitnode/core": "1.2.0-canary.
|
|
34
|
+
"@vitnode/config": "1.2.0-canary.76",
|
|
35
|
+
"@vitnode/core": "1.2.0-canary.76"
|
|
39
36
|
},
|
|
40
37
|
"scripts": {
|
|
41
|
-
"build:plugins": "
|
|
42
|
-
"dev:plugins": "
|
|
38
|
+
"build:plugins": "tsdown",
|
|
39
|
+
"dev:plugins": "tsdown --watch",
|
|
43
40
|
"lint": "eslint .",
|
|
44
41
|
"lint:fix": "eslint . --fix"
|
|
45
42
|
}
|