@payloadcms/email-nodemailer 3.0.0-canary.ff8c8fd → 3.0.0
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/LICENSE.md +17 -17
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/plugin.spec.js +10 -9
- package/dist/plugin.spec.js.map +1 -1
- package/package.json +13 -4
package/LICENSE.md
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2018-
|
|
4
|
-
Portions Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
Copyright (c) 2018-2024 Payload CMS, Inc. <info@payloadcms.com>
|
|
5
4
|
|
|
6
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
7
|
-
of this software and associated documentation files (the
|
|
8
|
-
in the Software without restriction, including
|
|
9
|
-
to use, copy, modify, merge, publish,
|
|
10
|
-
copies of the Software, and to
|
|
11
|
-
furnished to do so, subject to
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
'Software'), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
12
|
|
|
13
|
-
The above copyright notice and this permission notice shall be
|
|
14
|
-
copies or substantial portions of the Software.
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
15
|
|
|
16
|
-
THE SOFTWARE IS PROVIDED
|
|
17
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
-
|
|
22
|
-
SOFTWARE.
|
|
16
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/dist/index.js
CHANGED
|
@@ -22,7 +22,9 @@ import { InvalidConfiguration } from 'payload';
|
|
|
22
22
|
async function buildEmail(emailConfig) {
|
|
23
23
|
if (!emailConfig) {
|
|
24
24
|
const transport = await createMockAccount(emailConfig);
|
|
25
|
-
if (!transport)
|
|
25
|
+
if (!transport) {
|
|
26
|
+
throw new InvalidConfiguration('Unable to create Nodemailer test account.');
|
|
27
|
+
}
|
|
26
28
|
return {
|
|
27
29
|
defaultFromAddress: 'info@payloadcms.com',
|
|
28
30
|
defaultFromName: 'Payload',
|
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'\n\nimport nodemailer from 'nodemailer'\nimport { InvalidConfiguration } from 'payload'\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) {\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"],"mappings":"AAAA,6BAA6B,GAK7B,OAAOA,gBAAgB,aAAY;AACnC,SAASC,oBAAoB,QAAQ,UAAS;AAY9C;;;;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;
|
|
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'\n\nimport nodemailer from 'nodemailer'\nimport { InvalidConfiguration } from 'payload'\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) {\n throw new InvalidConfiguration('Unable to create Nodemailer test account.')\n }\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) {\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"],"mappings":"AAAA,6BAA6B,GAK7B,OAAOA,gBAAgB,aAAY;AACnC,SAASC,oBAAoB,QAAQ,UAAS;AAY9C;;;;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;YACd,MAAM,IAAIL,qBAAqB;QACjC;QAEA,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,IAAI,CAACA,YAAYI,UAAU,EAAE;QAC3B,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/dist/plugin.spec.js
CHANGED
|
@@ -13,35 +13,36 @@ describe('email-nodemailer', ()=>{
|
|
|
13
13
|
mockedVerify = jest.fn();
|
|
14
14
|
mockTransport = nodemailer.createTransport({
|
|
15
15
|
name: 'existing-transport',
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/require-await
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/require-await, @typescript-eslint/no-misused-promises
|
|
17
17
|
send: async (mail)=>{
|
|
18
|
+
// eslint-disable-next-line no-console
|
|
18
19
|
console.log('mock send', mail);
|
|
19
20
|
},
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
verify: mockedVerify,
|
|
22
|
+
version: '0.0.1'
|
|
22
23
|
});
|
|
23
24
|
});
|
|
24
25
|
it('should be invoked when skipVerify = false', async ()=>{
|
|
25
26
|
await nodemailerAdapter({
|
|
26
27
|
...defaultArgs,
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
skipVerify: false,
|
|
29
|
+
transport: mockTransport
|
|
29
30
|
});
|
|
30
31
|
expect(mockedVerify.mock.calls).toHaveLength(1);
|
|
31
32
|
});
|
|
32
33
|
it('should be invoked when skipVerify is undefined', async ()=>{
|
|
33
34
|
await nodemailerAdapter({
|
|
34
35
|
...defaultArgs,
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
skipVerify: false,
|
|
37
|
+
transport: mockTransport
|
|
37
38
|
});
|
|
38
39
|
expect(mockedVerify.mock.calls).toHaveLength(1);
|
|
39
40
|
});
|
|
40
41
|
it('should not be invoked when skipVerify = true', async ()=>{
|
|
41
42
|
await nodemailerAdapter({
|
|
42
43
|
...defaultArgs,
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
skipVerify: true,
|
|
45
|
+
transport: mockTransport
|
|
45
46
|
});
|
|
46
47
|
expect(mockedVerify.mock.calls).toHaveLength(0);
|
|
47
48
|
});
|
package/dist/plugin.spec.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/plugin.spec.ts"],"sourcesContent":["import { jest } from '@jest/globals'\n\nimport
|
|
1
|
+
{"version":3,"sources":["../src/plugin.spec.ts"],"sourcesContent":["import type { Transporter } from 'nodemailer'\n\nimport { jest } from '@jest/globals'\nimport nodemailer from 'nodemailer'\n\nimport type { NodemailerAdapterArgs } from './index.js'\n\nimport { nodemailerAdapter } from './index.js'\n\nconst defaultArgs: NodemailerAdapterArgs = {\n defaultFromAddress: 'test@test.com',\n defaultFromName: 'Test',\n}\n\ndescribe('email-nodemailer', () => {\n describe('transport verification', () => {\n let mockedVerify: jest.Mock<Transporter['verify']>\n let mockTransport: Transporter\n\n beforeEach(() => {\n mockedVerify = jest.fn<Transporter['verify']>()\n mockTransport = nodemailer.createTransport({\n name: 'existing-transport',\n // eslint-disable-next-line @typescript-eslint/require-await, @typescript-eslint/no-misused-promises\n send: async (mail) => {\n // eslint-disable-next-line no-console\n console.log('mock send', mail)\n },\n verify: mockedVerify,\n version: '0.0.1',\n })\n })\n\n it('should be invoked when skipVerify = false', async () => {\n await nodemailerAdapter({\n ...defaultArgs,\n skipVerify: false,\n transport: mockTransport,\n })\n\n expect(mockedVerify.mock.calls).toHaveLength(1)\n })\n\n it('should be invoked when skipVerify is undefined', async () => {\n await nodemailerAdapter({\n ...defaultArgs,\n skipVerify: false,\n transport: mockTransport,\n })\n\n expect(mockedVerify.mock.calls).toHaveLength(1)\n })\n\n it('should not be invoked when skipVerify = true', async () => {\n await nodemailerAdapter({\n ...defaultArgs,\n skipVerify: true,\n transport: mockTransport,\n })\n\n expect(mockedVerify.mock.calls).toHaveLength(0)\n })\n })\n})\n"],"names":["jest","nodemailer","nodemailerAdapter","defaultArgs","defaultFromAddress","defaultFromName","describe","mockedVerify","mockTransport","beforeEach","fn","createTransport","name","send","mail","console","log","verify","version","it","skipVerify","transport","expect","mock","calls","toHaveLength"],"mappings":"AAEA,SAASA,IAAI,QAAQ,gBAAe;AACpC,OAAOC,gBAAgB,aAAY;AAInC,SAASC,iBAAiB,QAAQ,aAAY;AAE9C,MAAMC,cAAqC;IACzCC,oBAAoB;IACpBC,iBAAiB;AACnB;AAEAC,SAAS,oBAAoB;IAC3BA,SAAS,0BAA0B;QACjC,IAAIC;QACJ,IAAIC;QAEJC,WAAW;YACTF,eAAeP,KAAKU,EAAE;YACtBF,gBAAgBP,WAAWU,eAAe,CAAC;gBACzCC,MAAM;gBACN,oGAAoG;gBACpGC,MAAM,OAAOC;oBACX,sCAAsC;oBACtCC,QAAQC,GAAG,CAAC,aAAaF;gBAC3B;gBACAG,QAAQV;gBACRW,SAAS;YACX;QACF;QAEAC,GAAG,6CAA6C;YAC9C,MAAMjB,kBAAkB;gBACtB,GAAGC,WAAW;gBACdiB,YAAY;gBACZC,WAAWb;YACb;YAEAc,OAAOf,aAAagB,IAAI,CAACC,KAAK,EAAEC,YAAY,CAAC;QAC/C;QAEAN,GAAG,kDAAkD;YACnD,MAAMjB,kBAAkB;gBACtB,GAAGC,WAAW;gBACdiB,YAAY;gBACZC,WAAWb;YACb;YAEAc,OAAOf,aAAagB,IAAI,CAACC,KAAK,EAAEC,YAAY,CAAC;QAC/C;QAEAN,GAAG,gDAAgD;YACjD,MAAMjB,kBAAkB;gBACtB,GAAGC,WAAW;gBACdiB,YAAY;gBACZC,WAAWb;YACb;YAEAc,OAAOf,aAAagB,IAAI,CAACC,KAAK,EAAEC,YAAY,CAAC;QAC/C;IACF;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/email-nodemailer",
|
|
3
|
-
"version": "3.0.0
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Payload Nodemailer Email Adapter",
|
|
5
5
|
"homepage": "https://payloadcms.com",
|
|
6
6
|
"repository": {
|
|
@@ -10,6 +10,13 @@
|
|
|
10
10
|
},
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"author": "Payload <dev@payloadcms.com> (https://payloadcms.com)",
|
|
13
|
+
"maintainers": [
|
|
14
|
+
{
|
|
15
|
+
"name": "Payload",
|
|
16
|
+
"email": "info@payloadcms.com",
|
|
17
|
+
"url": "https://payloadcms.com"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
13
20
|
"type": "module",
|
|
14
21
|
"exports": {
|
|
15
22
|
".": {
|
|
@@ -28,10 +35,10 @@
|
|
|
28
35
|
},
|
|
29
36
|
"devDependencies": {
|
|
30
37
|
"@types/nodemailer": "6.4.14",
|
|
31
|
-
"payload": "3.0.0
|
|
38
|
+
"payload": "3.0.0"
|
|
32
39
|
},
|
|
33
40
|
"peerDependencies": {
|
|
34
|
-
"payload": "3.0.0
|
|
41
|
+
"payload": "3.0.0"
|
|
35
42
|
},
|
|
36
43
|
"engines": {
|
|
37
44
|
"node": "^18.20.2 || >=20.9.0"
|
|
@@ -44,6 +51,8 @@
|
|
|
44
51
|
"build:clean": "find . \\( -type d \\( -name build -o -name dist -o -name .cache \\) -o -type f -name tsconfig.tsbuildinfo \\) -exec rm -rf {} + && pnpm build",
|
|
45
52
|
"build:swc": "swc ./src -d ./dist --config-file .swcrc --strip-leading-paths",
|
|
46
53
|
"build:types": "tsc --emitDeclarationOnly --outDir dist",
|
|
47
|
-
"clean": "rimraf {dist,*.tsbuildinfo}"
|
|
54
|
+
"clean": "rimraf {dist,*.tsbuildinfo}",
|
|
55
|
+
"lint": "eslint .",
|
|
56
|
+
"lint:fix": "eslint . --fix"
|
|
48
57
|
}
|
|
49
58
|
}
|