@vitnode/resend 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.
@@ -1,6 +1,9 @@
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;
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
@@ -1 +1 @@
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"}
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";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}`)}}}};
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.75",
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",
@@ -26,18 +26,15 @@
26
26
  "resend": "^6.14.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@swc/cli": "^0.8.1",
30
- "@swc/core": "^1.15.43",
31
- "concurrently": "^10.0.3",
32
29
  "eslint": "^10.5.0",
33
- "tsc-alias": "^1.8.17",
30
+ "tsdown": "^0.22.4",
34
31
  "typescript": "^6.0.3",
35
- "@vitnode/config": "1.2.0-canary.75",
36
- "@vitnode/core": "1.2.0-canary.75"
32
+ "@vitnode/config": "1.2.0-canary.76",
33
+ "@vitnode/core": "1.2.0-canary.76"
37
34
  },
38
35
  "scripts": {
39
- "build:plugins": "tsc && swc src -d dist --config-file .swcrc && tsc-alias -p tsconfig.json",
40
- "dev:plugins": "concurrently \"tsc -w --preserveWatchOutput\" \"swc src -d dist --config-file .swcrc -w\" \"tsc-alias -w\"",
36
+ "build:plugins": "tsdown",
37
+ "dev:plugins": "tsdown --watch",
41
38
  "lint": "eslint .",
42
39
  "lint:fix": "eslint . --fix"
43
40
  }
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "./tsconfig.json",
4
+ "exclude": ["node_modules", "**/*.test.ts", "**/*.test.tsx"]
5
+ }