mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-25 16:36:34 -05:00
refactor: move capitalizeFirstLetter to core (#6506)
This commit is contained in:
committed by
github-actions[bot]
parent
717752e19a
commit
951dfdd7e7
@@ -3,6 +3,7 @@ import type {
|
||||
BetterAuthClientPlugin,
|
||||
} from "@better-auth/core";
|
||||
import type { BASE_ERROR_CODES } from "@better-auth/core/error";
|
||||
import { capitalizeFirstLetter } from "@better-auth/core/utils";
|
||||
import type {
|
||||
BetterFetchError,
|
||||
BetterFetchResponse,
|
||||
@@ -23,10 +24,6 @@ function getAtomKey(str: string) {
|
||||
return `use${capitalizeFirstLetter(str)}`;
|
||||
}
|
||||
|
||||
export function capitalizeFirstLetter(str: string) {
|
||||
return str.charAt(0).toUpperCase() + str.slice(1);
|
||||
}
|
||||
|
||||
type InferResolvedHooks<O extends BetterAuthClientOptions> = O extends {
|
||||
plugins: Array<infer Plugin>;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import type {
|
||||
BetterAuthClientPlugin,
|
||||
} from "@better-auth/core";
|
||||
import type { BASE_ERROR_CODES } from "@better-auth/core/error";
|
||||
import { capitalizeFirstLetter } from "@better-auth/core/utils";
|
||||
import type {
|
||||
BetterFetchError,
|
||||
BetterFetchResponse,
|
||||
@@ -23,10 +24,6 @@ function getAtomKey(str: string) {
|
||||
return `use${capitalizeFirstLetter(str)}`;
|
||||
}
|
||||
|
||||
export function capitalizeFirstLetter(str: string) {
|
||||
return str.charAt(0).toUpperCase() + str.slice(1);
|
||||
}
|
||||
|
||||
type InferResolvedHooks<O extends BetterAuthClientOptions> = O extends {
|
||||
plugins: Array<infer Plugin>;
|
||||
}
|
||||
|
||||
@@ -3,13 +3,13 @@ import type {
|
||||
BetterAuthClientPlugin,
|
||||
} from "@better-auth/core";
|
||||
import type { BASE_ERROR_CODES } from "@better-auth/core/error";
|
||||
import { capitalizeFirstLetter } from "@better-auth/core/utils";
|
||||
import type {
|
||||
BetterFetchError,
|
||||
BetterFetchResponse,
|
||||
} from "@better-fetch/fetch";
|
||||
import type { Accessor } from "solid-js";
|
||||
import type { PrettifyDeep, UnionToIntersection } from "../../types/helper";
|
||||
import { capitalizeFirstLetter } from "../../utils/misc";
|
||||
import { getClientConfig } from "../config";
|
||||
import { createDynamicPathProxy } from "../proxy";
|
||||
import type {
|
||||
|
||||
@@ -3,13 +3,13 @@ import type {
|
||||
BetterAuthClientPlugin,
|
||||
} from "@better-auth/core";
|
||||
import type { BASE_ERROR_CODES } from "@better-auth/core/error";
|
||||
import { capitalizeFirstLetter } from "@better-auth/core/utils";
|
||||
import type {
|
||||
BetterFetchError,
|
||||
BetterFetchResponse,
|
||||
} from "@better-fetch/fetch";
|
||||
import type { Atom } from "nanostores";
|
||||
import type { PrettifyDeep, UnionToIntersection } from "../../types/helper";
|
||||
import { capitalizeFirstLetter } from "../../utils/misc";
|
||||
import { getClientConfig } from "../config";
|
||||
import { createDynamicPathProxy } from "../proxy";
|
||||
import type {
|
||||
|
||||
@@ -3,13 +3,13 @@ import type {
|
||||
BetterAuthClientPlugin,
|
||||
} from "@better-auth/core";
|
||||
import type { BASE_ERROR_CODES } from "@better-auth/core/error";
|
||||
import { capitalizeFirstLetter } from "@better-auth/core/utils";
|
||||
import type {
|
||||
BetterFetchError,
|
||||
BetterFetchResponse,
|
||||
} from "@better-fetch/fetch";
|
||||
import type { Atom } from "nanostores";
|
||||
import type { PrettifyDeep, UnionToIntersection } from "../types/helper";
|
||||
import { capitalizeFirstLetter } from "../utils/misc";
|
||||
import { getClientConfig } from "./config";
|
||||
import { createDynamicPathProxy } from "./proxy";
|
||||
import type {
|
||||
|
||||
@@ -3,13 +3,13 @@ import type {
|
||||
BetterAuthClientPlugin,
|
||||
} from "@better-auth/core";
|
||||
import type { BASE_ERROR_CODES } from "@better-auth/core/error";
|
||||
import { capitalizeFirstLetter } from "@better-auth/core/utils";
|
||||
import type {
|
||||
BetterFetchError,
|
||||
BetterFetchResponse,
|
||||
} from "@better-fetch/fetch";
|
||||
import type { DeepReadonly, Ref } from "vue";
|
||||
import type { PrettifyDeep, UnionToIntersection } from "../../types/helper";
|
||||
import { capitalizeFirstLetter } from "../../utils/misc";
|
||||
import { getClientConfig } from "../config";
|
||||
import { createDynamicPathProxy } from "../proxy";
|
||||
import type {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
export { generateId } from "@better-auth/core/utils";
|
||||
export * from "../oauth2/state";
|
||||
export * from "./hide-metadata";
|
||||
export * from "./misc";
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { existsSync } from "node:fs";
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { capitalizeFirstLetter } from "@better-auth/core/utils";
|
||||
import { produceSchema } from "@mrleebo/prisma-ast";
|
||||
import { capitalizeFirstLetter } from "better-auth";
|
||||
import { initGetFieldName, initGetModelName } from "better-auth/adapters";
|
||||
import type { FieldType } from "better-auth/db";
|
||||
import { getAuthTables } from "better-auth/db";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
export { defineErrorCodes } from "./error-codes";
|
||||
export { generateId } from "./id";
|
||||
export { safeJSONParse } from "./json";
|
||||
export { capitalizeFirstLetter } from "./string";
|
||||
|
||||
Reference in New Issue
Block a user