Skip to content

Commit fa287be

Browse files
authoredNov 28, 2023
fix(providers): correct nodemailer imports (#9261)
fix: nodemailer imports
1 parent a7ab94e commit fa287be

File tree

1 file changed

+20
-5
lines changed
  • packages/next-auth/src/providers

1 file changed

+20
-5
lines changed
 

‎packages/next-auth/src/providers/email.ts

+20-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,31 @@
11
import { Transport, TransportOptions, createTransport } from "nodemailer"
2-
import * as JSONTransport from "nodemailer/lib/json-transport.js"
2+
import * as JSONTransport from "nodemailer/lib/json-transport/index.js"
33
import * as SendmailTransport from "nodemailer/lib/sendmail-transport/index.js"
4-
import * as SESTransport from "nodemailer/lib/ses-transport.js"
4+
import * as SESTransport from "nodemailer/lib/ses-transport/index.js"
55
import * as SMTPPool from "nodemailer/lib/smtp-pool/index.js"
6-
import * as SMTPTransport from "nodemailer/lib/smtp-transport.js"
7-
import * as StreamTransport from "nodemailer/lib/stream-transport.js"
6+
import * as SMTPTransport from "nodemailer/lib/smtp-transport/index.js"
7+
import * as StreamTransport from "nodemailer/lib/stream-transport/index.js"
88
import type { Awaitable } from ".."
99
import type { CommonProviderOptions } from "."
1010
import type { Theme } from "../core/types"
1111

1212
// TODO: Make use of https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html for the string
13-
type AllTransportOptions = string | SMTPTransport | SMTPTransport.Options | SMTPPool | SMTPPool.Options | SendmailTransport | SendmailTransport.Options | StreamTransport | StreamTransport.Options | JSONTransport | JSONTransport.Options | SESTransport | SESTransport.Options | Transport<any> | TransportOptions
13+
type AllTransportOptions =
14+
| string
15+
| SMTPTransport
16+
| SMTPTransport.Options
17+
| SMTPPool
18+
| SMTPPool.Options
19+
| SendmailTransport
20+
| SendmailTransport.Options
21+
| StreamTransport
22+
| StreamTransport.Options
23+
| JSONTransport
24+
| JSONTransport.Options
25+
| SESTransport
26+
| SESTransport.Options
27+
| Transport<any>
28+
| TransportOptions
1429

1530
export interface SendVerificationRequestParams {
1631
identifier: string

1 commit comments

Comments
 (1)
Please sign in to comment.