@better-auth/i18n 1.7.6 → 1.7.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as i18n } from "./index-3kSGPUDn.mjs";
1
+ import { t as i18n } from "./index-ClrKZ6Oa.mjs";
2
2
 
3
3
  //#region src/client.d.ts
4
4
  /**
package/dist/client.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as PACKAGE_VERSION } from "./version-CBRFt69-.mjs";
1
+ import { t as PACKAGE_VERSION } from "./version-DcK6TfOP.mjs";
2
2
  //#region src/client.ts
3
3
  /**
4
4
  * i18n client plugin for Better Auth
@@ -1,7 +1,7 @@
1
1
  import { E as TranslationDictionary, T as LocaleDetectionStrategy, w as I18nOptions } from "./index-CYmtmQve.mjs";
2
2
  import { GenericEndpointContext } from "@better-auth/core";
3
3
 
4
- //#region ../../node_modules/.pnpm/better-call@1.4.0_zod@4.5.4/node_modules/better-call/dist/standard-schema.d.mts
4
+ //#region ../../node_modules/.pnpm/better-call@1.4.2_zod@4.5.4/node_modules/better-call/dist/standard-schema.d.mts
5
5
  //#region src/standard-schema.d.ts
6
6
  /** The Standard Schema interface. */
7
7
  interface StandardSchemaV1<Input = unknown, Output = Input> {
@@ -59,7 +59,7 @@ declare namespace StandardSchemaV1 {
59
59
  type InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["output"];
60
60
  } //#endregion
61
61
  //#endregion
62
- //#region ../../node_modules/.pnpm/better-call@1.4.0_zod@4.5.4/node_modules/better-call/dist/error.d.mts
62
+ //#region ../../node_modules/.pnpm/better-call@1.4.2_zod@4.5.4/node_modules/better-call/dist/error.d.mts
63
63
  declare const statusCodes: {
64
64
  OK: number;
65
65
  CREATED: number;
@@ -137,29 +137,29 @@ declare const APIError: new (status?: Status | "OK" | "CREATED" | "ACCEPTED" | "
137
137
  errorStack: string | undefined;
138
138
  }; //#endregion
139
139
  //#endregion
140
- //#region ../../node_modules/.pnpm/better-call@1.4.0_zod@4.5.4/node_modules/better-call/dist/openapi.d.mts
140
+ //#region ../../node_modules/.pnpm/better-call@1.4.2_zod@4.5.4/node_modules/better-call/dist/openapi.d.mts
141
141
  //#region src/openapi.d.ts
142
142
  type OpenAPISchemaType = "string" | "number" | "integer" | "boolean" | "array" | "object";
143
143
  interface OpenAPIParameter {
144
144
  in: "query" | "path" | "header" | "cookie";
145
- name?: string;
146
- description?: string;
147
- required?: boolean;
145
+ name?: string | undefined;
146
+ description?: string | undefined;
147
+ required?: boolean | undefined;
148
148
  schema?: {
149
149
  type: OpenAPISchemaType;
150
150
  format?: string | undefined;
151
151
  items?: {
152
152
  type: OpenAPISchemaType;
153
- };
154
- enum?: string[];
155
- minLength?: number;
153
+ } | undefined;
154
+ enum?: string[] | undefined;
155
+ minLength?: number | undefined;
156
156
  description?: string | undefined;
157
157
  default?: string | undefined;
158
158
  example?: string | undefined;
159
- };
159
+ } | undefined;
160
160
  }
161
161
  //#endregion
162
- //#region ../../node_modules/.pnpm/better-call@1.4.0_zod@4.5.4/node_modules/better-call/dist/endpoint.d.mts
162
+ //#region ../../node_modules/.pnpm/better-call@1.4.2_zod@4.5.4/node_modules/better-call/dist/endpoint.d.mts
163
163
  //#region src/endpoint.d.ts
164
164
  interface EndpointBaseOptions {
165
165
  /**
@@ -194,55 +194,55 @@ interface EndpointBaseOptions {
194
194
  * Open API definition
195
195
  */
196
196
  openapi?: {
197
- summary?: string;
198
- description?: string;
199
- tags?: string[];
200
- operationId?: string;
201
- parameters?: OpenAPIParameter[];
197
+ summary?: string | undefined;
198
+ description?: string | undefined;
199
+ tags?: string[] | undefined;
200
+ operationId?: string | undefined;
201
+ parameters?: OpenAPIParameter[] | undefined;
202
202
  requestBody?: {
203
203
  content: {
204
204
  "application/json": {
205
205
  schema: {
206
- type?: OpenAPISchemaType;
207
- properties?: Record<string, any>;
208
- required?: string[];
209
- $ref?: string;
206
+ type?: OpenAPISchemaType | undefined;
207
+ properties?: Record<string, any> | undefined;
208
+ required?: string[] | undefined;
209
+ $ref?: string | undefined;
210
210
  };
211
211
  };
212
212
  };
213
- };
213
+ } | undefined;
214
214
  responses?: {
215
215
  [status: string]: {
216
216
  description: string;
217
217
  content?: {
218
218
  "application/json"?: {
219
219
  schema: {
220
- type?: OpenAPISchemaType;
221
- properties?: Record<string, any>;
222
- required?: string[];
223
- $ref?: string;
220
+ type?: OpenAPISchemaType | undefined;
221
+ properties?: Record<string, any> | undefined;
222
+ required?: string[] | undefined;
223
+ $ref?: string | undefined;
224
224
  };
225
- };
225
+ } | undefined;
226
226
  "text/plain"?: {
227
227
  schema?: {
228
- type?: OpenAPISchemaType;
229
- properties?: Record<string, any>;
230
- required?: string[];
231
- $ref?: string;
232
- };
233
- };
228
+ type?: OpenAPISchemaType | undefined;
229
+ properties?: Record<string, any> | undefined;
230
+ required?: string[] | undefined;
231
+ $ref?: string | undefined;
232
+ } | undefined;
233
+ } | undefined;
234
234
  "text/html"?: {
235
235
  schema?: {
236
- type?: OpenAPISchemaType;
237
- properties?: Record<string, any>;
238
- required?: string[];
239
- $ref?: string;
240
- };
241
- };
242
- };
236
+ type?: OpenAPISchemaType | undefined;
237
+ properties?: Record<string, any> | undefined;
238
+ required?: string[] | undefined;
239
+ $ref?: string | undefined;
240
+ } | undefined;
241
+ } | undefined;
242
+ } | undefined;
243
243
  };
244
- };
245
- };
244
+ } | undefined;
245
+ } | undefined;
246
246
  /**
247
247
  * Infer body and query type from ts interface
248
248
  *
@@ -317,7 +317,7 @@ interface EndpointBaseOptions {
317
317
  /**
318
318
  * List of middlewares to use
319
319
  */
320
- use?: MiddlewareHandler[];
320
+ use?: MiddlewareHandler[] | undefined;
321
321
  /**
322
322
  * A callback to run before any API error is throw or returned
323
323
  *
@@ -376,7 +376,7 @@ type EndpointBodyMethodOptions = {
376
376
  };
377
377
  type EndpointOptions = EndpointBaseOptions & EndpointBodyMethodOptions;
378
378
  //#endregion
379
- //#region ../../node_modules/.pnpm/better-call@1.4.0_zod@4.5.4/node_modules/better-call/dist/context.d.mts
379
+ //#region ../../node_modules/.pnpm/better-call@1.4.2_zod@4.5.4/node_modules/better-call/dist/context.d.mts
380
380
  type InferBodyInput<Options extends EndpointOptions | MiddlewareOptions, Body = (Options["metadata"] extends {
381
381
  $Infer: {
382
382
  body: infer B;
@@ -398,15 +398,15 @@ type InferQueryInput<Options extends EndpointOptions | MiddlewareOptions, Query
398
398
  type InferRequestInput<Option extends EndpointOptions | MiddlewareOptions> = Option["requireRequest"] extends true ? {
399
399
  request: Request;
400
400
  } : {
401
- request?: Request;
401
+ request?: Request | undefined;
402
402
  };
403
403
  type InferHeadersInput<Option extends EndpointOptions | MiddlewareOptions> = Option["requireHeaders"] extends true ? {
404
404
  headers: HeadersInit;
405
405
  } : {
406
- headers?: HeadersInit;
406
+ headers?: HeadersInit | undefined;
407
407
  };
408
408
  //#endregion
409
- //#region ../../node_modules/.pnpm/better-call@1.4.0_zod@4.5.4/node_modules/better-call/dist/middleware.d.mts
409
+ //#region ../../node_modules/.pnpm/better-call@1.4.2_zod@4.5.4/node_modules/better-call/dist/middleware.d.mts
410
410
  //#region src/middleware.d.ts
411
411
  interface MiddlewareOptions extends Omit<EndpointOptions, "method"> {}
412
412
  type MiddlewareInputContext<Options extends MiddlewareOptions> = InferBodyInput<Options> & InferQueryInput<Options> & InferRequestInput<Options> & InferHeadersInput<Options> & {
package/dist/index.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { t as i18n } from "./index-3kSGPUDn.mjs";
1
+ import { t as i18n } from "./index-ClrKZ6Oa.mjs";
2
2
  import { E as TranslationDictionary, T as LocaleDetectionStrategy, t as index_d_exports, w as I18nOptions } from "./index-CYmtmQve.mjs";
3
3
  export { I18nOptions, LocaleDetectionStrategy, TranslationDictionary, i18n, index_d_exports as locales };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as PACKAGE_VERSION } from "./version-CBRFt69-.mjs";
1
+ import { t as PACKAGE_VERSION } from "./version-DcK6TfOP.mjs";
2
2
  import { t as locales_exports } from "./locales-CSRpG5Mc.mjs";
3
3
  import { APIError, createAuthMiddleware, isAPIError } from "better-auth/api";
4
4
  import { parseCookies } from "better-auth/cookies";
@@ -1,5 +1,5 @@
1
1
  //#endregion
2
2
  //#region src/version.ts
3
- const PACKAGE_VERSION = "1.7.6";
3
+ const PACKAGE_VERSION = "1.7.8";
4
4
  //#endregion
5
5
  export { PACKAGE_VERSION as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-auth/i18n",
3
- "version": "1.7.6",
3
+ "version": "1.7.8",
4
4
  "description": "i18n plugin for Better Auth - translate error messages",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -59,12 +59,12 @@
59
59
  },
60
60
  "devDependencies": {
61
61
  "tsdown": "0.21.10",
62
- "@better-auth/core": "1.7.6",
63
- "better-auth": "1.7.6"
62
+ "@better-auth/core": "1.7.8",
63
+ "better-auth": "1.7.8"
64
64
  },
65
65
  "peerDependencies": {
66
- "@better-auth/core": "^1.7.6",
67
- "better-auth": "^1.7.6"
66
+ "@better-auth/core": "^1.7.8",
67
+ "better-auth": "^1.7.8"
68
68
  },
69
69
  "scripts": {
70
70
  "build": "tsdown",