mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-25 08:31:37 -05:00
feat(utils): move generateEmail to user-accessible utils
- Moved generateEmail from test-utils to utils folder - Added './utils' export to package.json for public access - Users can now import from 'better-auth/utils' - Test-utils re-exports from the new location for backwards compat This allows users to use generateEmail when they need to generate temporary emails (e.g., similar to anonymous plugin's needs). Co-authored-by: taesu <taesu@better-auth.com>
This commit is contained in:
@@ -115,6 +115,11 @@
|
||||
"types": "./dist/db/index.d.mts",
|
||||
"default": "./dist/db/index.mjs"
|
||||
},
|
||||
"./utils": {
|
||||
"dev-source": "./src/utils/index.ts",
|
||||
"types": "./dist/utils/index.d.mts",
|
||||
"default": "./dist/utils/index.mjs"
|
||||
},
|
||||
"./vue": {
|
||||
"dev-source": "./src/client/vue/index.ts",
|
||||
"types": "./dist/client/vue/index.d.mts",
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export { type GenerateEmailOptions, generateEmail } from "./email";
|
||||
export { type GenerateEmailOptions, generateEmail } from "../utils/email";
|
||||
export { convertSetCookieToCookie } from "./headers";
|
||||
export { getTestInstance } from "./test-instance";
|
||||
|
||||
@@ -16,7 +16,7 @@ import { bearer } from "../plugins";
|
||||
import type { Session, User } from "../types";
|
||||
import { getBaseURL } from "../utils/url";
|
||||
|
||||
export { type GenerateEmailOptions, generateEmail } from "./email";
|
||||
export { type GenerateEmailOptions, generateEmail } from "../utils/email";
|
||||
|
||||
const cleanupSet = new Set<Function>();
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
export * from "../oauth2/state";
|
||||
export type { StateData } from "../state";
|
||||
export { generateGenericState, parseGenericState } from "../state";
|
||||
export * from "./email";
|
||||
export * from "./hide-metadata";
|
||||
|
||||
Reference in New Issue
Block a user