@vitnode/resend 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.
@@ -1,9 +1,6 @@
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;
1
+ import type { EmailApiPlugin } from "@vitnode/core/api/models/email";
2
+ export declare const ResendEmailAdapter: ({ apiKey, from, }: {
3
+ apiKey: string | undefined;
4
+ from: string | undefined;
6
5
  }) => EmailApiPlugin;
7
- //#endregion
8
- export { ResendEmailAdapter };
9
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"mappings":";;cAIa,uBAAsB,QAAA;EAIjC;EACA;MACE"}
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,kBAAkB,GAAI,mBAGhC;IACD,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B,KAAG,cAqBH,CAAC"}
package/dist/src/index.js CHANGED
@@ -1,2 +1 @@
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
1
+ import{Resend}from"resend";export const ResendEmailAdapter=({apiKey,from})=>{return{sendEmail:async({to,subject,replyTo,metadata,html})=>{if(!(apiKey&&from)){throw new Error("Missing Resend configuration")}const resend=new Resend(apiKey);const{error}=await resend.emails.send({from:`${metadata.shortTitle??metadata.title} <${from}>`,to,subject,replyTo,html});if(error){throw new Error(`[${error.name}]: ${error.message}`)}}}};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitnode/resend",
3
- "version": "1.2.0-canary.76",
3
+ "version": "1.2.0-canary.77",
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,18 +23,20 @@
23
23
  }
24
24
  },
25
25
  "dependencies": {
26
- "resend": "^6.14.0"
26
+ "resend": "^6.18.0"
27
27
  },
28
28
  "devDependencies": {
29
- "eslint": "^10.5.0",
30
- "tsdown": "^0.22.4",
29
+ "@swc/cli": "^0.8.1",
30
+ "@swc/core": "^1.15.46",
31
+ "eslint": "^10.7.0",
32
+ "tsc-alias": "^1.9.1",
31
33
  "typescript": "^6.0.3",
32
- "@vitnode/config": "1.2.0-canary.76",
33
- "@vitnode/core": "1.2.0-canary.76"
34
+ "@vitnode/config": "1.2.0-canary.77",
35
+ "@vitnode/core": "1.2.0-canary.77"
34
36
  },
35
37
  "scripts": {
36
- "build:plugins": "tsdown",
37
- "dev:plugins": "tsdown --watch",
38
+ "build:plugins": "vitnode build",
39
+ "dev:plugins": "vitnode dev",
38
40
  "lint": "eslint .",
39
41
  "lint:fix": "eslint . --fix"
40
42
  }
@@ -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 { 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"}