chore: clean up minor typo mistakes

This commit is contained in:
Muntasir Mahmud
2025-05-14 10:27:58 -07:00
committed by GitHub
parent 81ab90865f
commit d914650289
12 changed files with 29 additions and 29 deletions
+1 -1
View File
@@ -121,7 +121,7 @@ export async function GET(req: Request) {
style={{ fontFamily: "GeistMono", fontWeight: "normal" }}
tw="relative flex mt-10 text-xl uppercase font-bold gap-2 items-center"
>
{type === "documentaiton" ? (
{type === "documentation" ? (
<svg
xmlns="http://www.w3.org/2000/svg"
width="1.2em"
+1 -1
View File
@@ -11,7 +11,7 @@ export function GithubStat({ stars }: { stars: string | null }) {
return (
<a
href="https://github.com/better-auth/better-auth"
className="flex mt-4 border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground rounded-none h-10 p-5 ml-auto z-50 overflow-hidden items-center text-sm font-medium focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 bg-transprent dark:text-white text-black px-4 py-2 max-w-[14.8rem] whitespace-pre md:flex group relative w-full justify-center gap-2 transition-all duration-300 ease-out hover:ring-black"
className="flex mt-4 border border-input shadow-sm hover:bg-accent hover:text-accent-foreground rounded-none h-10 p-5 ml-auto z-50 overflow-hidden items-center text-sm font-medium focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 bg-transparent dark:text-white text-black px-4 py-2 max-w-[14.8rem] whitespace-pre md:flex group relative w-full justify-center gap-2 transition-all duration-300 ease-out hover:ring-black"
>
<span className="absolute right-0 -mt-12 h-32 w-8 translate-x-12 rotate-12 dark:bg-white/60 bg-black/60 opacity-10 transition-all duration-1000 ease-out group-hover:-translate-x-40"></span>
<div className="flex items-center ml-2">
+1 -1
View File
@@ -505,7 +505,7 @@ There are two types of hooks you can define:
#### 1. Before Hook
- **Purpose**: This hook is called before the respective entity (user, session, or account) is created or updated.
- **Behavior**: If the hook returns `false`, the operation will be aborted. And If it returns a data object, it'll replace the orginal payload.
- **Behavior**: If the hook returns `false`, the operation will be aborted. And If it returns a data object, it'll replace the original payload.
#### 2. After Hook
+2 -2
View File
@@ -588,7 +588,7 @@ Customize the starting characters configuration.
<Accordion title="startingCharactersConfig Options">
`shouldStore` <span className="opacity-70">`boolean`</span>
Wether to store the starting characters in the database.
Whether to store the starting characters in the database.
If false, we will set `start` to `null`.
Default is `true`.
@@ -645,7 +645,7 @@ Customize the key expiration.
`disableCustomExpiresTime` <span className="opacity-70">`boolean`</span>
Wether to disable the expires time passed from the client.
Whether to disable the expires time passed from the client.
If `true`, the expires time will be based on the default values.
Default is `false`.
@@ -21,7 +21,7 @@ const props = withDefaults(
* Controls the visibility of gradient.
* @default true
*/
showGradiant?: boolean;
showGradient?: boolean;
}
>(),
{
@@ -33,7 +33,7 @@ const props = withDefaults(
showTooltip: true,
showLegend: true,
showGridLine: true,
showGradiant: true,
showGradient: true,
},
);
@@ -74,7 +74,7 @@ function handleLegendItemClick(d: BulletLegendItemInterface, i: number) {
<svg width="0" height="0">
<defs>
<linearGradient v-for="(color, i) in colors" :id="`${chartRef}-color-${i}`" :key="i" x1="0" y1="0" x2="0" y2="1">
<template v-if="showGradiant">
<template v-if="showGradient">
<stop offset="5%" :stop-color="color" stop-opacity="0.4" />
<stop offset="95%" :stop-color="color" stop-opacity="0" />
</template>
@@ -243,7 +243,7 @@ describe("Create Adapter Helper", async () => {
expect(res3).not.toHaveProperty("id");
});
test('Should recieve a generated id during the call, unless "disableIdGeneration" is set to true', async () => {
test('Should receive a generated id during the call, unless "disableIdGeneration" is set to true', async () => {
const createWithId: { id: unknown } = await new Promise(async (r) => {
const adapter = await createTestAdapter({
adapter(args_0) {
@@ -1380,7 +1380,7 @@ describe("Create Adapter Helper", async () => {
expect(parameters.where?.[0].field).toEqual("email_address");
});
test("findOne: Should recieve an integer id in where clause if the user has enabled `useNumberId`", async () => {
test("findOne: Should receive an integer id in where clause if the user has enabled `useNumberId`", async () => {
const parameters: { where: Where[]; model: string; select?: string[] } =
await new Promise(async (r) => {
const adapter = await createTestAdapter({
@@ -1417,10 +1417,10 @@ describe("Create Adapter Helper", async () => {
//@ts-ignore
expect(res?.id).toEqual("1");
});
// The where clause should conver the string id value of `"1"` to an int since `useNumberId` is true
// The where clause should convert the string id value of `"1"` to an int since `useNumberId` is true
expect(parameters.where[0].value).toEqual(1);
});
test("findMany: Should recieve an integer id in where clause if the user has enabled `useNumberId`", async () => {
test("findMany: Should receive an integer id in where clause if the user has enabled `useNumberId`", async () => {
const parameters: { where: Where[] | undefined; model: string } =
await new Promise(async (r) => {
const adapter = await createTestAdapter({
@@ -1459,7 +1459,7 @@ describe("Create Adapter Helper", async () => {
//@ts-ignore
expect(res[0].id).toEqual("1");
});
// The where clause should conver the string id value of `"1"` to an int since `useNumberId` is true
// The where clause should convert the string id value of `"1"` to an int since `useNumberId` is true
expect(parameters.where?.[0].value).toEqual(1);
});
});
+1 -1
View File
@@ -122,7 +122,7 @@ describe("init", async () => {
expect(ctx.options.emailAndPassword?.enabled).toBe(true);
});
it("should not allow plugins to set config values if theyre set in the main config", async () => {
it("should not allow plugins to set config values if they are set in the main config", async () => {
const ctx = await init({
database,
baseURL: "http://localhost:3000",
@@ -47,7 +47,7 @@ export interface ApiKeyOptions {
*/
startingCharactersConfig?: {
/**
* Wether to store the starting characters in the database. If false, we will set `start` to `null`.
* Whether to store the starting characters in the database. If false, we will set `start` to `null`.
*
* @default true
*/
@@ -115,7 +115,7 @@ export interface ApiKeyOptions {
*/
defaultExpiresIn?: number | null;
/**
* Wether to disable the expires time passed from the client.
* Whether to disable the expires time passed from the client.
*
* If `true`, the expires time will be based on the default values.
*
@@ -123,7 +123,7 @@ describe("captcha", async (it) => {
});
const headers = new Headers();
it("Should successful sign in users if they passed the CAPTCHA challenge", async () => {
it("Should successfully sign in users if they passed the CAPTCHA challenge", async () => {
mockBetterFetch.mockResolvedValue({
data: {
success: true,
@@ -196,7 +196,7 @@ describe("captcha", async (it) => {
});
const headers = new Headers();
it("Should successfuly sign in users if they passed the CAPTCHA challenge", async () => {
it("Should successfully sign in users if they passed the CAPTCHA challenge", async () => {
mockBetterFetch.mockResolvedValue({
data: {
success: true,
@@ -291,7 +291,7 @@ describe("captcha", async (it) => {
});
const headers = new Headers();
it("Should successfuly sign in users if they passed the CAPTCHA challenge", async () => {
it("Should successfully sign in users if they passed the CAPTCHA challenge", async () => {
mockBetterFetch.mockResolvedValue({
data: {
success: true,
@@ -184,7 +184,7 @@ export async function authorize(
* This means the code now needs to be treated as a
* consent request.
*
* once the user consents, teh code will be updated
* once the user consents, the code will be updated
* with the actual code. This is to prevent the
* client from using the code before the user
* consents.
@@ -7,9 +7,9 @@ export interface RobloxProfile extends Record<string, any> {
sub: string;
/** the user's username */
preferred_username: string;
/** the user's display name, will return the same value as the preffered_username if not set */
/** the user's display name, will return the same value as the preferred_username if not set */
nickname: string;
/** the user's display name, again, will return the same value as the preffered_username if not set */
/** the user's display name, again, will return the same value as the preferred_username if not set */
name: string;
/** the account creation date as a unix timestamp in seconds */
created_at: number;
+7 -7
View File
@@ -61,19 +61,19 @@ export async function generateAuthConfig({
},
} satisfies CommonIndexConfig<{}>,
};
const common_indexs = {
const common_indexes = {
START_OF_PLUGINS:
_start_of_plugins_common_index.START_OF_PLUGINS satisfies CommonIndexConfig<{}>,
END_OF_PLUGINS: {
type: "manual",
getIndex: ({ content, additionalFields }) => {
const clsoingBracketIndex = findClosingBracket(
const closingBracketIndex = findClosingBracket(
content,
additionalFields.start_of_plugins,
"[",
"]",
);
return clsoingBracketIndex;
return closingBracketIndex;
},
} satisfies CommonIndexConfig<{ start_of_plugins: number }>,
START_OF_BETTERAUTH: {
@@ -94,7 +94,7 @@ export async function generateAuthConfig({
}): Promise<{ code: string; dependencies: string[]; envs: string[] }> => {
let start_of_plugins = getGroupInfo(
opts.config,
common_indexs.START_OF_PLUGINS,
common_indexes.START_OF_PLUGINS,
{},
);
@@ -107,7 +107,7 @@ export async function generateAuthConfig({
}
let end_of_plugins = getGroupInfo(
opts.config,
common_indexs.END_OF_PLUGINS,
common_indexes.END_OF_PLUGINS,
{ start_of_plugins: start_of_plugins.index },
);
@@ -228,7 +228,7 @@ export async function generateAuthConfig({
if (code_before_betterAuth) {
let start_of_betterauth = getGroupInfo(
opts.config,
common_indexs.START_OF_BETTERAUTH,
common_indexes.START_OF_BETTERAUTH,
{},
);
if (!start_of_betterauth) {
@@ -454,7 +454,7 @@ export async function generateAuthConfig({
let start_of_betterauth = getGroupInfo(
opts.config,
common_indexs.START_OF_BETTERAUTH,
common_indexes.START_OF_BETTERAUTH,
{},
);
if (!start_of_betterauth) {