Various SDK related fixes (#1743)

This commit is contained in:
Mihovil Ilakovac 2024-02-12 11:52:51 +01:00 committed by GitHub
parent a9b4011d6f
commit 576f15a52d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 9 additions and 9 deletions

View File

@ -1,2 +1,2 @@
// PUBLIC API
export { signInUrl as githubSignInUrl } from '../../auth/helpers/Github'
export { signInUrl as githubSignInUrl } from '../../auth/helpers/GitHub'

View File

@ -12,7 +12,7 @@ export type { CustomizationOptions } from '../../auth/forms/types'
export { SignInButton as GoogleSignInButton } from '../../auth/helpers/Google'
{=/ isGoogleAuthEnabled =}
{=# isGithubAuthEnabled =}
export { SignInButton as GithubSignInButton } from '../../auth/helpers/Github'
export { SignInButton as GithubSignInButton } from '../../auth/helpers/GitHub'
{=/ isGithubAuthEnabled =}
export {
FormError,

View File

@ -1,6 +1,6 @@
import SendGrid from "@sendgrid/mail";
import { getDefaultFromField } from "../helpers.js";
import type { SendGridProvider, EmailSender } from from "../types";
import type { SendGridProvider, EmailSender } from "../types";
// PRIVATE API
export function initSendGridEmailSender(

View File

@ -37,7 +37,7 @@ export type EmailSender = {
// PRIVATE API
export type SentMessageInfo = any;
// PRIVATE API
// PUBLIC API
export type Email = {
{=# isDefaultFromFieldDefined =}
from?: EmailFromField;
@ -51,7 +51,7 @@ export type Email = {
html: string;
};
// PRIVATE API
// PUBLIC API
export type EmailFromField = {
name?: string;
email: string;

View File

@ -31,3 +31,6 @@ const emailProvider = {
// PUBLIC API
export const emailSender = initEmailSender(emailProvider);
// PUBLIC API
export type { Email, EmailFromField } from "./core/types.js";

View File

@ -115,10 +115,7 @@ genUtils auth = return $ C.mkTmplFdWithData relUtilsFilePath tmplData
genIndexTs :: AS.Auth.Auth -> Generator [FileDraft]
genIndexTs auth =
return $
if isEmailAuthEnabled || isLocalAuthEnabled
then [C.mkTmplFdWithData [relfile|auth/index.ts|] tmplData]
else []
return [C.mkTmplFdWithData [relfile|auth/index.ts|] tmplData]
where
tmplData =
object