@vitnode/nodemailer 1.2.0-canary.76 → 1.2.0-canary.77
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 +8 -11
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -2
- package/package.json +10 -8
- package/dist/src/index.js.map +0 -1
package/dist/src/index.d.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import { EmailApiPlugin } from "@vitnode/core/api/models/email";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
user: string | undefined;
|
|
1
|
+
import type { EmailApiPlugin } from "@vitnode/core/api/models/email";
|
|
2
|
+
export declare const NodemailerEmailAdapter: ({ host, port, secure, user, password, from, }: {
|
|
3
|
+
from: string | undefined;
|
|
4
|
+
host: string | undefined;
|
|
5
|
+
password: string | undefined;
|
|
6
|
+
port?: number;
|
|
7
|
+
secure?: boolean;
|
|
8
|
+
user: string | undefined;
|
|
10
9
|
}) => EmailApiPlugin;
|
|
11
|
-
//#endregion
|
|
12
|
-
export { NodemailerEmailAdapter };
|
|
13
10
|
//# 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","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAIrE,eAAO,MAAM,sBAAsB,GAAI,+CAOpC;IACD,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B,KAAG,cAiCH,CAAC"}
|
package/dist/src/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{createTransport
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import{createTransport}from"nodemailer";export const NodemailerEmailAdapter=({host="",port=587,secure=false,user="",password="",from=""})=>{return{sendEmail:async({metadata,to,subject,html,replyTo})=>{if(!(host&&user&&password&&from)){throw new Error("Missing nodemailer configuration")}const transporter=createTransport({host,port,secure,auth:{user,pass:password}},{from:{name:metadata.shortTitle??metadata.title,address:from},replyTo});await transporter.sendMail({to,subject,html})}}};
|
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.77",
|
|
4
4
|
"description": "Nodemailer integration package for VitNode, enabling email functionalities.",
|
|
5
5
|
"author": "VitNode Team",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,19 +24,21 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"nodemailer": "^9.0.
|
|
27
|
+
"nodemailer": "^9.0.3"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
+
"@swc/cli": "^0.8.1",
|
|
31
|
+
"@swc/core": "^1.15.46",
|
|
30
32
|
"@types/nodemailer": "^8.0.1",
|
|
31
|
-
"eslint": "^10.
|
|
32
|
-
"
|
|
33
|
+
"eslint": "^10.7.0",
|
|
34
|
+
"tsc-alias": "^1.9.1",
|
|
33
35
|
"typescript": "^6.0.3",
|
|
34
|
-
"@vitnode/
|
|
35
|
-
"@vitnode/
|
|
36
|
+
"@vitnode/core": "1.2.0-canary.77",
|
|
37
|
+
"@vitnode/config": "1.2.0-canary.77"
|
|
36
38
|
},
|
|
37
39
|
"scripts": {
|
|
38
|
-
"build:plugins": "
|
|
39
|
-
"dev:plugins": "
|
|
40
|
+
"build:plugins": "vitnode build",
|
|
41
|
+
"dev:plugins": "vitnode dev",
|
|
40
42
|
"lint": "eslint .",
|
|
41
43
|
"lint:fix": "eslint . --fix"
|
|
42
44
|
}
|
package/dist/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"}
|