@vitnode/resend 1.2.0-canary.74 → 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 +7 -4
- 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 +7 -10
- package/tsconfig.build.json +5 -0
package/dist/src/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { EmailApiPlugin } from "@vitnode/core/api/models/email";
|
|
2
|
+
//#region src/index.d.ts
|
|
3
|
+
declare const ResendEmailAdapter: ({ apiKey, from }: {
|
|
4
|
+
apiKey: string | undefined;
|
|
5
|
+
from: string | undefined;
|
|
5
6
|
}) => EmailApiPlugin;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { ResendEmailAdapter };
|
|
6
9
|
//# 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,uBAAsB,QAAA;EAIjC;EACA;MACE"}
|
package/dist/src/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{Resend}from"resend";
|
|
1
|
+
import{Resend as e}from"resend";const t=({apiKey:t,from:n})=>({sendEmail:async({to:r,subject:i,replyTo:a,metadata:o,html:s})=>{if(!(t&&n))throw Error(`Missing Resend configuration`);let{error:c}=await new e(t).emails.send({from:`${o.shortTitle??o.title} <${n}>`,to:r,subject:i,replyTo:a,html:s});if(c)throw Error(`[${c.name}]: ${c.message}`)}});export{t as ResendEmailAdapter};
|
|
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 { Resend } from \"resend\";\n\nexport const ResendEmailAdapter = ({\n apiKey,\n from,\n}: {\n apiKey: string | undefined;\n from: string | undefined;\n}): EmailApiPlugin => {\n return {\n sendEmail: async ({ to, subject, replyTo, metadata, html }) => {\n if (!(apiKey && from)) {\n throw new Error(\"Missing Resend configuration\");\n }\n\n const resend = new Resend(apiKey);\n const { error } = await resend.emails.send({\n from: `${metadata.shortTitle ?? metadata.title} <${from}>`,\n to,\n subject,\n replyTo,\n html,\n });\n\n if (error) {\n throw new Error(`[${error.name}]: ${error.message}`);\n }\n },\n };\n};\n"],"mappings":"gCAIA,MAAa,GAAsB,CACjC,SACA,WAKO,CACL,UAAW,MAAO,CAAE,KAAI,UAAS,UAAS,WAAU,UAAW,CAC7D,GAAI,EAAE,GAAU,GACd,MAAU,MAAM,8BAA8B,EAIhD,GAAM,CAAE,SAAU,MAAM,IADL,EAAO,CACG,CAAC,CAAC,OAAO,KAAK,CACzC,KAAM,GAAG,EAAS,YAAc,EAAS,MAAM,IAAI,EAAK,GACxD,KACA,UACA,UACA,MACF,CAAC,EAED,GAAI,EACF,MAAU,MAAM,IAAI,EAAM,KAAK,KAAK,EAAM,SAAS,CAEvD,CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitnode/resend",
|
|
3
|
-
"version": "1.2.0-canary.
|
|
3
|
+
"version": "1.2.0-canary.76",
|
|
4
4
|
"description": "Resend adapter for VitNode, enabling email sending capabilities through the Resend service.",
|
|
5
5
|
"author": "VitNode Team",
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,21 +23,18 @@
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"resend": "^6.
|
|
26
|
+
"resend": "^6.14.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@swc/cli": "^0.8.1",
|
|
30
|
-
"@swc/core": "^1.15.41",
|
|
31
|
-
"concurrently": "^10.0.3",
|
|
32
29
|
"eslint": "^10.5.0",
|
|
33
|
-
"
|
|
30
|
+
"tsdown": "^0.22.4",
|
|
34
31
|
"typescript": "^6.0.3",
|
|
35
|
-
"@vitnode/
|
|
36
|
-
"@vitnode/
|
|
32
|
+
"@vitnode/config": "1.2.0-canary.76",
|
|
33
|
+
"@vitnode/core": "1.2.0-canary.76"
|
|
37
34
|
},
|
|
38
35
|
"scripts": {
|
|
39
|
-
"build:plugins": "
|
|
40
|
-
"dev:plugins": "
|
|
36
|
+
"build:plugins": "tsdown",
|
|
37
|
+
"dev:plugins": "tsdown --watch",
|
|
41
38
|
"lint": "eslint .",
|
|
42
39
|
"lint:fix": "eslint . --fix"
|
|
43
40
|
}
|