@payloadcms/email-nodemailer 3.0.0-beta.18 → 3.0.0-beta.20

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/README.md CHANGED
@@ -1 +1,72 @@
1
- # Nodemailer Email Adapter
1
+ # Nodemailer Email Adapter for Payload
2
+
3
+ This adapter allows you to send emails using the [Nodemailer](https://nodemailer.com/) library.
4
+
5
+ It abstracts all of the email functionality that was in Payload by default in 2.x into a separate package.
6
+
7
+ **NOTE:** Configuring email in Payload 3.0 is now completely optional. However, you will receive a startup warning that email is not configured and also a message if you attempt to send an email.
8
+
9
+ ## Installation
10
+
11
+ ```sh
12
+ pnpm add @payloadcms/email-nodemailer` nodemailer
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ### Using nodemailer.createTransport
18
+
19
+ ```ts
20
+ import { nodemailerAdapter } from '@payloadcms/email-nodemailer'
21
+ import nodemailer from 'nodemailer'
22
+
23
+ export default buildConfig({
24
+ email: nodemailerAdapter({
25
+ defaultFromAddress: 'info@payloadcms.com',
26
+ defaultFromName: 'Payload',
27
+ // Any Nodemailer transport
28
+ transport: await nodemailer.createTransport({
29
+ host: process.env.SMTP_HOST,
30
+ port: 587,
31
+ auth: {
32
+ user: process.env.SMTP_USER,
33
+ pass: process.env.SMTP_PASS,
34
+ },
35
+ }),
36
+ }),
37
+ })
38
+ ```
39
+
40
+ ### Using transportOptions
41
+
42
+ ```ts
43
+ import { nodemailerAdapter } from '@payloadcms/email-nodemailer'
44
+
45
+ export default buildConfig({
46
+ email: nodemailerAdapter({
47
+ defaultFromAddress: 'info@payloadcms.com',
48
+ defaultFromName: 'Payload',
49
+ // Nodemailer transportOptions
50
+ transportOptions: {
51
+ host: process.env.SMTP_HOST,
52
+ port: 587,
53
+ auth: {
54
+ user: process.env.SMTP_USER,
55
+ pass: process.env.SMTP_PASS,
56
+ },
57
+ },
58
+ }),
59
+ })
60
+ ```
61
+
62
+ During development, if you pass nothing to `nodemailerAdapter`, it will use the [ethereal.email](https://ethereal.email) service.
63
+
64
+ This will log the ethereal.email details to console on startup.
65
+
66
+ ```ts
67
+ import { nodemailerAdapter } from '@payloadcms/email-nodemailer'
68
+
69
+ export default buildConfig({
70
+ email: nodemailerAdapter(), // This will be the old ethereal.email functionality
71
+ })
72
+ ```
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,KAAK,cAAc,MAAM,gCAAgC,CAAA;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAKlD,MAAM,MAAM,qBAAqB,GAAG;IAClC,kBAAkB,EAAE,MAAM,CAAA;IAC1B,eAAe,EAAE,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,WAAW,CAAA;IACvB,gBAAgB,CAAC,EAAE,cAAc,CAAC,OAAO,CAAA;CAC1C,CAAA;AAED,KAAK,iBAAiB,GAAG,YAAY,CAAC,OAAO,CAAC,CAAA;AAE9C;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,UACrB,qBAAqB,KAC3B,QAAQ,iBAAiB,CAc3B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,KAAK,cAAc,MAAM,gCAAgC,CAAA;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAKlD,MAAM,MAAM,qBAAqB,GAAG;IAClC,kBAAkB,EAAE,MAAM,CAAA;IAC1B,eAAe,EAAE,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,WAAW,CAAA;IACvB,gBAAgB,CAAC,EAAE,cAAc,CAAC,OAAO,CAAA;CAC1C,CAAA;AAED,KAAK,iBAAiB,GAAG,YAAY,CAAC,OAAO,CAAC,CAAA;AAE9C;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,UACrB,qBAAqB,KAC3B,QAAQ,iBAAiB,CAe3B,CAAA"}
package/dist/index.js CHANGED
@@ -7,6 +7,7 @@ import { InvalidConfiguration } from 'payload/errors';
7
7
  */ export const nodemailerAdapter = async (args)=>{
8
8
  const { defaultFromAddress, defaultFromName, transport } = await buildEmail(args);
9
9
  const adapter = ()=>({
10
+ name: 'nodemailer',
10
11
  defaultFromAddress,
11
12
  defaultFromName,
12
13
  sendEmail: async (message)=>{
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\nimport type { Transporter } from 'nodemailer'\nimport type SMTPConnection from 'nodemailer/lib/smtp-connection'\nimport type { EmailAdapter } from 'payload/config'\n\nimport nodemailer from 'nodemailer'\nimport { InvalidConfiguration } from 'payload/errors'\n\nexport type NodemailerAdapterArgs = {\n defaultFromAddress: string\n defaultFromName: string\n skipVerify?: boolean\n transport?: Transporter\n transportOptions?: SMTPConnection.Options\n}\n\ntype NodemailerAdapter = EmailAdapter<unknown>\n\n/**\n * Creates an email adapter using nodemailer\n *\n * If no email configuration is provided, an ethereal email test account is returned\n */\nexport const nodemailerAdapter = async (\n args?: NodemailerAdapterArgs,\n): Promise<NodemailerAdapter> => {\n const { defaultFromAddress, defaultFromName, transport } = await buildEmail(args)\n\n const adapter: NodemailerAdapter = () => ({\n defaultFromAddress,\n defaultFromName,\n sendEmail: async (message) => {\n return await transport.sendMail({\n from: `${defaultFromName} <${defaultFromAddress}>`,\n ...message,\n })\n },\n })\n return adapter\n}\n\nasync function buildEmail(emailConfig?: NodemailerAdapterArgs): Promise<{\n defaultFromAddress: string\n defaultFromName: string\n transport: Transporter\n}> {\n if (!emailConfig) {\n const transport = await createMockAccount(emailConfig)\n if (!transport) throw new InvalidConfiguration('Unable to create Nodemailer test account.')\n\n return {\n defaultFromAddress: 'info@payloadcms.com',\n defaultFromName: 'Payload',\n transport,\n }\n }\n\n // Create or extract transport\n let transport: Transporter\n if ('transport' in emailConfig && emailConfig.transport) {\n ;({ transport } = emailConfig)\n } else if ('transportOptions' in emailConfig && emailConfig.transportOptions) {\n transport = nodemailer.createTransport(emailConfig.transportOptions)\n } else {\n transport = await createMockAccount(emailConfig)\n }\n\n if (emailConfig.skipVerify !== false) {\n await verifyTransport(transport)\n }\n\n return {\n defaultFromAddress: emailConfig.defaultFromAddress,\n defaultFromName: emailConfig.defaultFromName,\n transport,\n }\n}\n\nasync function verifyTransport(transport: Transporter) {\n try {\n await transport.verify()\n } catch (err: unknown) {\n console.error({ err, msg: 'Error verifying Nodemailer transport.' })\n }\n}\n\n/**\n * Use ethereal.email to create a mock email account\n */\nasync function createMockAccount(emailConfig?: NodemailerAdapterArgs) {\n try {\n const etherealAccount = await nodemailer.createTestAccount()\n\n const smtpOptions = {\n ...(emailConfig || {}),\n auth: {\n pass: etherealAccount.pass,\n user: etherealAccount.user,\n },\n fromAddress: emailConfig?.defaultFromAddress,\n fromName: emailConfig?.defaultFromName,\n host: 'smtp.ethereal.email',\n port: 587,\n secure: false,\n }\n const transport = nodemailer.createTransport(smtpOptions)\n const { pass, user, web } = etherealAccount\n\n console.info('E-mail configured with ethereal.email test account. ')\n console.info(`Log into mock email provider at ${web}`)\n console.info(`Mock email account username: ${user}`)\n console.info(`Mock email account password: ${pass}`)\n return transport\n } catch (err: unknown) {\n if (err instanceof Error) {\n console.error({ err, msg: 'There was a problem setting up the mock email handler' })\n throw new InvalidConfiguration(\n `Unable to create Nodemailer test account. Error: ${err.message}`,\n )\n }\n throw new InvalidConfiguration('Unable to create Nodemailer test account.')\n }\n}\n"],"names":["nodemailer","InvalidConfiguration","nodemailerAdapter","args","defaultFromAddress","defaultFromName","transport","buildEmail","adapter","sendEmail","message","sendMail","from","emailConfig","createMockAccount","transportOptions","createTransport","skipVerify","verifyTransport","verify","err","console","error","msg","etherealAccount","createTestAccount","smtpOptions","auth","pass","user","fromAddress","fromName","host","port","secure","web","info","Error"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,6BAA6B,GAK7B,OAAOA,gBAAgB,aAAY;AACnC,SAASC,oBAAoB,QAAQ,iBAAgB;AAYrD;;;;CAIC,GACD,OAAO,MAAMC,oBAAoB,OAC/BC;IAEA,MAAM,EAAEC,kBAAkB,EAAEC,eAAe,EAAEC,SAAS,EAAE,GAAG,MAAMC,WAAWJ;IAE5E,MAAMK,UAA6B,IAAO,CAAA;YACxCJ;YACAC;YACAI,WAAW,OAAOC;gBAChB,OAAO,MAAMJ,UAAUK,QAAQ,CAAC;oBAC9BC,MAAM,CAAC,EAAEP,gBAAgB,EAAE,EAAED,mBAAmB,CAAC,CAAC;oBAClD,GAAGM,OAAO;gBACZ;YACF;QACF,CAAA;IACA,OAAOF;AACT,EAAC;AAED,eAAeD,WAAWM,WAAmC;IAK3D,IAAI,CAACA,aAAa;QAChB,MAAMP,YAAY,MAAMQ,kBAAkBD;QAC1C,IAAI,CAACP,WAAW,MAAM,IAAIL,qBAAqB;QAE/C,OAAO;YACLG,oBAAoB;YACpBC,iBAAiB;YACjBC;QACF;IACF;IAEA,8BAA8B;IAC9B,IAAIA;IACJ,IAAI,eAAeO,eAAeA,YAAYP,SAAS,EAAE;QACrD,CAAA,EAAEA,SAAS,EAAE,GAAGO,WAAU;IAC9B,OAAO,IAAI,sBAAsBA,eAAeA,YAAYE,gBAAgB,EAAE;QAC5ET,YAAYN,WAAWgB,eAAe,CAACH,YAAYE,gBAAgB;IACrE,OAAO;QACLT,YAAY,MAAMQ,kBAAkBD;IACtC;IAEA,IAAIA,YAAYI,UAAU,KAAK,OAAO;QACpC,MAAMC,gBAAgBZ;IACxB;IAEA,OAAO;QACLF,oBAAoBS,YAAYT,kBAAkB;QAClDC,iBAAiBQ,YAAYR,eAAe;QAC5CC;IACF;AACF;AAEA,eAAeY,gBAAgBZ,SAAsB;IACnD,IAAI;QACF,MAAMA,UAAUa,MAAM;IACxB,EAAE,OAAOC,KAAc;QACrBC,QAAQC,KAAK,CAAC;YAAEF;YAAKG,KAAK;QAAwC;IACpE;AACF;AAEA;;CAEC,GACD,eAAeT,kBAAkBD,WAAmC;IAClE,IAAI;QACF,MAAMW,kBAAkB,MAAMxB,WAAWyB,iBAAiB;QAE1D,MAAMC,cAAc;YAClB,GAAIb,eAAe,CAAC,CAAC;YACrBc,MAAM;gBACJC,MAAMJ,gBAAgBI,IAAI;gBAC1BC,MAAML,gBAAgBK,IAAI;YAC5B;YACAC,aAAajB,aAAaT;YAC1B2B,UAAUlB,aAAaR;YACvB2B,MAAM;YACNC,MAAM;YACNC,QAAQ;QACV;QACA,MAAM5B,YAAYN,WAAWgB,eAAe,CAACU;QAC7C,MAAM,EAAEE,IAAI,EAAEC,IAAI,EAAEM,GAAG,EAAE,GAAGX;QAE5BH,QAAQe,IAAI,CAAC;QACbf,QAAQe,IAAI,CAAC,CAAC,gCAAgC,EAAED,IAAI,CAAC;QACrDd,QAAQe,IAAI,CAAC,CAAC,6BAA6B,EAAEP,KAAK,CAAC;QACnDR,QAAQe,IAAI,CAAC,CAAC,6BAA6B,EAAER,KAAK,CAAC;QACnD,OAAOtB;IACT,EAAE,OAAOc,KAAc;QACrB,IAAIA,eAAeiB,OAAO;YACxBhB,QAAQC,KAAK,CAAC;gBAAEF;gBAAKG,KAAK;YAAwD;YAClF,MAAM,IAAItB,qBACR,CAAC,iDAAiD,EAAEmB,IAAIV,OAAO,CAAC,CAAC;QAErE;QACA,MAAM,IAAIT,qBAAqB;IACjC;AACF"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\nimport type { Transporter } from 'nodemailer'\nimport type SMTPConnection from 'nodemailer/lib/smtp-connection'\nimport type { EmailAdapter } from 'payload/config'\n\nimport nodemailer from 'nodemailer'\nimport { InvalidConfiguration } from 'payload/errors'\n\nexport type NodemailerAdapterArgs = {\n defaultFromAddress: string\n defaultFromName: string\n skipVerify?: boolean\n transport?: Transporter\n transportOptions?: SMTPConnection.Options\n}\n\ntype NodemailerAdapter = EmailAdapter<unknown>\n\n/**\n * Creates an email adapter using nodemailer\n *\n * If no email configuration is provided, an ethereal email test account is returned\n */\nexport const nodemailerAdapter = async (\n args?: NodemailerAdapterArgs,\n): Promise<NodemailerAdapter> => {\n const { defaultFromAddress, defaultFromName, transport } = await buildEmail(args)\n\n const adapter: NodemailerAdapter = () => ({\n name: 'nodemailer',\n defaultFromAddress,\n defaultFromName,\n sendEmail: async (message) => {\n return await transport.sendMail({\n from: `${defaultFromName} <${defaultFromAddress}>`,\n ...message,\n })\n },\n })\n return adapter\n}\n\nasync function buildEmail(emailConfig?: NodemailerAdapterArgs): Promise<{\n defaultFromAddress: string\n defaultFromName: string\n transport: Transporter\n}> {\n if (!emailConfig) {\n const transport = await createMockAccount(emailConfig)\n if (!transport) throw new InvalidConfiguration('Unable to create Nodemailer test account.')\n\n return {\n defaultFromAddress: 'info@payloadcms.com',\n defaultFromName: 'Payload',\n transport,\n }\n }\n\n // Create or extract transport\n let transport: Transporter\n if ('transport' in emailConfig && emailConfig.transport) {\n ;({ transport } = emailConfig)\n } else if ('transportOptions' in emailConfig && emailConfig.transportOptions) {\n transport = nodemailer.createTransport(emailConfig.transportOptions)\n } else {\n transport = await createMockAccount(emailConfig)\n }\n\n if (emailConfig.skipVerify !== false) {\n await verifyTransport(transport)\n }\n\n return {\n defaultFromAddress: emailConfig.defaultFromAddress,\n defaultFromName: emailConfig.defaultFromName,\n transport,\n }\n}\n\nasync function verifyTransport(transport: Transporter) {\n try {\n await transport.verify()\n } catch (err: unknown) {\n console.error({ err, msg: 'Error verifying Nodemailer transport.' })\n }\n}\n\n/**\n * Use ethereal.email to create a mock email account\n */\nasync function createMockAccount(emailConfig?: NodemailerAdapterArgs) {\n try {\n const etherealAccount = await nodemailer.createTestAccount()\n\n const smtpOptions = {\n ...(emailConfig || {}),\n auth: {\n pass: etherealAccount.pass,\n user: etherealAccount.user,\n },\n fromAddress: emailConfig?.defaultFromAddress,\n fromName: emailConfig?.defaultFromName,\n host: 'smtp.ethereal.email',\n port: 587,\n secure: false,\n }\n const transport = nodemailer.createTransport(smtpOptions)\n const { pass, user, web } = etherealAccount\n\n console.info('E-mail configured with ethereal.email test account. ')\n console.info(`Log into mock email provider at ${web}`)\n console.info(`Mock email account username: ${user}`)\n console.info(`Mock email account password: ${pass}`)\n return transport\n } catch (err: unknown) {\n if (err instanceof Error) {\n console.error({ err, msg: 'There was a problem setting up the mock email handler' })\n throw new InvalidConfiguration(\n `Unable to create Nodemailer test account. Error: ${err.message}`,\n )\n }\n throw new InvalidConfiguration('Unable to create Nodemailer test account.')\n }\n}\n"],"names":["nodemailer","InvalidConfiguration","nodemailerAdapter","args","defaultFromAddress","defaultFromName","transport","buildEmail","adapter","name","sendEmail","message","sendMail","from","emailConfig","createMockAccount","transportOptions","createTransport","skipVerify","verifyTransport","verify","err","console","error","msg","etherealAccount","createTestAccount","smtpOptions","auth","pass","user","fromAddress","fromName","host","port","secure","web","info","Error"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,6BAA6B,GAK7B,OAAOA,gBAAgB,aAAY;AACnC,SAASC,oBAAoB,QAAQ,iBAAgB;AAYrD;;;;CAIC,GACD,OAAO,MAAMC,oBAAoB,OAC/BC;IAEA,MAAM,EAAEC,kBAAkB,EAAEC,eAAe,EAAEC,SAAS,EAAE,GAAG,MAAMC,WAAWJ;IAE5E,MAAMK,UAA6B,IAAO,CAAA;YACxCC,MAAM;YACNL;YACAC;YACAK,WAAW,OAAOC;gBAChB,OAAO,MAAML,UAAUM,QAAQ,CAAC;oBAC9BC,MAAM,CAAC,EAAER,gBAAgB,EAAE,EAAED,mBAAmB,CAAC,CAAC;oBAClD,GAAGO,OAAO;gBACZ;YACF;QACF,CAAA;IACA,OAAOH;AACT,EAAC;AAED,eAAeD,WAAWO,WAAmC;IAK3D,IAAI,CAACA,aAAa;QAChB,MAAMR,YAAY,MAAMS,kBAAkBD;QAC1C,IAAI,CAACR,WAAW,MAAM,IAAIL,qBAAqB;QAE/C,OAAO;YACLG,oBAAoB;YACpBC,iBAAiB;YACjBC;QACF;IACF;IAEA,8BAA8B;IAC9B,IAAIA;IACJ,IAAI,eAAeQ,eAAeA,YAAYR,SAAS,EAAE;QACrD,CAAA,EAAEA,SAAS,EAAE,GAAGQ,WAAU;IAC9B,OAAO,IAAI,sBAAsBA,eAAeA,YAAYE,gBAAgB,EAAE;QAC5EV,YAAYN,WAAWiB,eAAe,CAACH,YAAYE,gBAAgB;IACrE,OAAO;QACLV,YAAY,MAAMS,kBAAkBD;IACtC;IAEA,IAAIA,YAAYI,UAAU,KAAK,OAAO;QACpC,MAAMC,gBAAgBb;IACxB;IAEA,OAAO;QACLF,oBAAoBU,YAAYV,kBAAkB;QAClDC,iBAAiBS,YAAYT,eAAe;QAC5CC;IACF;AACF;AAEA,eAAea,gBAAgBb,SAAsB;IACnD,IAAI;QACF,MAAMA,UAAUc,MAAM;IACxB,EAAE,OAAOC,KAAc;QACrBC,QAAQC,KAAK,CAAC;YAAEF;YAAKG,KAAK;QAAwC;IACpE;AACF;AAEA;;CAEC,GACD,eAAeT,kBAAkBD,WAAmC;IAClE,IAAI;QACF,MAAMW,kBAAkB,MAAMzB,WAAW0B,iBAAiB;QAE1D,MAAMC,cAAc;YAClB,GAAIb,eAAe,CAAC,CAAC;YACrBc,MAAM;gBACJC,MAAMJ,gBAAgBI,IAAI;gBAC1BC,MAAML,gBAAgBK,IAAI;YAC5B;YACAC,aAAajB,aAAaV;YAC1B4B,UAAUlB,aAAaT;YACvB4B,MAAM;YACNC,MAAM;YACNC,QAAQ;QACV;QACA,MAAM7B,YAAYN,WAAWiB,eAAe,CAACU;QAC7C,MAAM,EAAEE,IAAI,EAAEC,IAAI,EAAEM,GAAG,EAAE,GAAGX;QAE5BH,QAAQe,IAAI,CAAC;QACbf,QAAQe,IAAI,CAAC,CAAC,gCAAgC,EAAED,IAAI,CAAC;QACrDd,QAAQe,IAAI,CAAC,CAAC,6BAA6B,EAAEP,KAAK,CAAC;QACnDR,QAAQe,IAAI,CAAC,CAAC,6BAA6B,EAAER,KAAK,CAAC;QACnD,OAAOvB;IACT,EAAE,OAAOe,KAAc;QACrB,IAAIA,eAAeiB,OAAO;YACxBhB,QAAQC,KAAK,CAAC;gBAAEF;gBAAKG,KAAK;YAAwD;YAClF,MAAM,IAAIvB,qBACR,CAAC,iDAAiD,EAAEoB,IAAIV,OAAO,CAAC,CAAC;QAErE;QACA,MAAM,IAAIV,qBAAqB;IACjC;AACF"}
package/package.json CHANGED
@@ -1,24 +1,16 @@
1
1
  {
2
2
  "name": "@payloadcms/email-nodemailer",
3
- "version": "3.0.0-beta.18",
3
+ "version": "3.0.0-beta.20",
4
4
  "description": "Payload Nodemailer Email Adapter",
5
+ "homepage": "https://payloadcms.com",
5
6
  "repository": {
6
7
  "type": "git",
7
8
  "url": "https://github.com/payloadcms/payload.git",
8
9
  "directory": "packages/email-nodemailer"
9
10
  },
10
11
  "license": "MIT",
11
- "homepage": "https://payloadcms.com",
12
12
  "author": "Payload CMS, Inc.",
13
- "main": "./dist/index.js",
14
- "types": "./dist/index.d.ts",
15
13
  "type": "module",
16
- "dependencies": {
17
- "nodemailer": "6.9.10"
18
- },
19
- "peerDependencies": {
20
- "payload": "3.0.0-beta.18"
21
- },
22
14
  "exports": {
23
15
  ".": {
24
16
  "import": "./dist/index.js",
@@ -26,24 +18,32 @@
26
18
  "types": "./dist/index.d.ts"
27
19
  }
28
20
  },
29
- "publishConfig": {
30
- "registry": "https://registry.npmjs.org/"
31
- },
32
- "engines": {
33
- "node": ">=18.20.2"
34
- },
21
+ "main": "./dist/index.js",
22
+ "types": "./dist/index.d.ts",
35
23
  "files": [
36
24
  "dist"
37
25
  ],
26
+ "dependencies": {
27
+ "nodemailer": "6.9.10"
28
+ },
38
29
  "devDependencies": {
39
30
  "@types/nodemailer": "6.4.14",
40
- "payload": "3.0.0-beta.18"
31
+ "payload": "3.0.0-beta.20"
32
+ },
33
+ "peerDependencies": {
34
+ "payload": "3.0.0-beta.20"
35
+ },
36
+ "engines": {
37
+ "node": ">=18.20.2"
38
+ },
39
+ "publishConfig": {
40
+ "registry": "https://registry.npmjs.org/"
41
41
  },
42
42
  "scripts": {
43
43
  "build": "pnpm build:swc && pnpm build:types",
44
+ "build:clean": "find . \\( -type d \\( -name build -o -name dist -o -name .cache \\) -o -type f -name tsconfig.tsbuildinfo \\) -exec rm -rf {} + && pnpm build",
44
45
  "build:swc": "swc ./src -d ./dist --config-file .swcrc",
45
46
  "build:types": "tsc --emitDeclarationOnly --outDir dist",
46
- "build:clean": "find . \\( -type d \\( -name build -o -name dist -o -name .cache \\) -o -type f -name tsconfig.tsbuildinfo \\) -exec rm -rf {} + && pnpm build",
47
47
  "clean": "rimraf {dist,*.tsbuildinfo}"
48
48
  }
49
49
  }