@better-auth/electron 1.7.0-rc.5 → 1.7.0

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.
@@ -1,9 +1,12 @@
1
+ import * as _$better_auth0 from "better-auth";
1
2
  import { ClientStore } from "better-auth";
2
3
  import * as z from "zod";
4
+ import * as _$_better_fetch_fetch0 from "@better-fetch/fetch";
3
5
  import { BetterFetch, BetterFetchError, CreateFetchOption } from "@better-fetch/fetch";
4
6
  import electron from "electron";
5
7
  import { Awaitable, BetterAuthClientOptions } from "@better-auth/core";
6
8
  import { User } from "@better-auth/core/db";
9
+
7
10
  //#region src/types/options.d.ts
8
11
  interface ElectronSharedOptions {
9
12
  /**
@@ -253,7 +256,13 @@ interface ElectronAuthenticateOptions {
253
256
  /**
254
257
  * Exchanges the authorization code for a session.
255
258
  */
256
- declare function authenticate({ $fetch, options, token, getWindow, fetchOptions }: ElectronAuthenticateOptions & {
259
+ declare function authenticate({
260
+ $fetch,
261
+ options,
262
+ token,
263
+ getWindow,
264
+ fetchOptions
265
+ }: ElectronAuthenticateOptions & {
257
266
  $fetch: BetterFetch;
258
267
  options: ElectronClientOptions;
259
268
  getWindow: () => Electron.BrowserWindow | null | undefined;
@@ -282,7 +291,13 @@ type SetupMainConfig = {
282
291
  /**
283
292
  * Handles the deep link URL for authentication.
284
293
  */
285
- declare function handleDeepLink({ $fetch, options, url, getWindow, clientOptions }: {
294
+ declare function handleDeepLink({
295
+ $fetch,
296
+ options,
297
+ url,
298
+ getWindow,
299
+ clientOptions
300
+ }: {
286
301
  $fetch: BetterFetch;
287
302
  options: ElectronClientOptions;
288
303
  url: string;
@@ -310,17 +325,17 @@ declare const electronClient: <O extends ElectronClientOptions>(options: O) => {
310
325
  referrerPolicy?: ReferrerPolicy | undefined;
311
326
  signal?: (AbortSignal | null) | undefined;
312
327
  window?: null | undefined;
313
- onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
314
- onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
315
- onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
316
- onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
317
- onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
328
+ onRequest?: (<T extends Record<string, any>>(context: _$_better_fetch_fetch0.RequestContext<T>) => Promise<_$_better_fetch_fetch0.RequestContext | void> | _$_better_fetch_fetch0.RequestContext | void) | undefined;
329
+ onResponse?: ((context: _$_better_fetch_fetch0.ResponseContext) => Promise<Response | void | _$_better_fetch_fetch0.ResponseContext> | Response | _$_better_fetch_fetch0.ResponseContext | void) | undefined;
330
+ onSuccess?: ((context: _$_better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
331
+ onError?: ((context: _$_better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
332
+ onRetry?: ((response: _$_better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
318
333
  hookOptions?: {
319
334
  cloneResponse?: boolean;
320
335
  } | undefined;
321
336
  timeout?: number | undefined;
322
- customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
323
- plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
337
+ customFetchImpl?: _$_better_fetch_fetch0.FetchEsque | undefined;
338
+ plugins?: _$_better_fetch_fetch0.BetterFetchPlugin[] | undefined;
324
339
  baseURL?: string | undefined;
325
340
  throw?: boolean | undefined;
326
341
  auth?: ({
@@ -346,10 +361,10 @@ declare const electronClient: <O extends ElectronClientOptions>(options: O) => {
346
361
  params?: any;
347
362
  duplex?: "full" | "half" | undefined;
348
363
  jsonParser?: ((text: string) => Promise<any> | any) | undefined;
349
- retry?: import("@better-fetch/fetch").RetryOptions | undefined;
364
+ retry?: _$_better_fetch_fetch0.RetryOptions | undefined;
350
365
  retryAttempt?: number | undefined;
351
- output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
352
- errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
366
+ output?: (_$_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
367
+ errorSchema?: _$_better_fetch_fetch0.StandardSchemaV1 | undefined;
353
368
  disableValidation?: boolean | undefined;
354
369
  } & Record<string, any>) | undefined): Promise<{
355
370
  url: string;
@@ -366,17 +381,17 @@ declare const electronClient: <O extends ElectronClientOptions>(options: O) => {
366
381
  referrerPolicy?: ReferrerPolicy | undefined;
367
382
  signal?: (AbortSignal | null) | undefined;
368
383
  window?: null | undefined;
369
- onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
370
- onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
371
- onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
372
- onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
373
- onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
384
+ onRequest?: (<T extends Record<string, any>>(context: _$_better_fetch_fetch0.RequestContext<T>) => Promise<_$_better_fetch_fetch0.RequestContext | void> | _$_better_fetch_fetch0.RequestContext | void) | undefined;
385
+ onResponse?: ((context: _$_better_fetch_fetch0.ResponseContext) => Promise<Response | void | _$_better_fetch_fetch0.ResponseContext> | Response | _$_better_fetch_fetch0.ResponseContext | void) | undefined;
386
+ onSuccess?: ((context: _$_better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
387
+ onError?: ((context: _$_better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
388
+ onRetry?: ((response: _$_better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
374
389
  hookOptions?: {
375
390
  cloneResponse?: boolean;
376
391
  } | undefined;
377
392
  timeout?: number | undefined;
378
- customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
379
- plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
393
+ customFetchImpl?: _$_better_fetch_fetch0.FetchEsque | undefined;
394
+ plugins?: _$_better_fetch_fetch0.BetterFetchPlugin[] | undefined;
380
395
  baseURL?: string | undefined;
381
396
  throw?: boolean | undefined;
382
397
  auth?: ({
@@ -402,19 +417,19 @@ declare const electronClient: <O extends ElectronClientOptions>(options: O) => {
402
417
  params?: any;
403
418
  duplex?: "full" | "half" | undefined;
404
419
  jsonParser?: ((text: string) => Promise<any> | any) | undefined;
405
- retry?: import("@better-fetch/fetch").RetryOptions | undefined;
420
+ retry?: _$_better_fetch_fetch0.RetryOptions | undefined;
406
421
  retryAttempt?: number | undefined;
407
- output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
408
- errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
422
+ output?: (_$_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
423
+ errorSchema?: _$_better_fetch_fetch0.StandardSchemaV1 | undefined;
409
424
  disableValidation?: boolean | undefined;
410
425
  } & Record<string, any>;
411
426
  }>;
412
427
  hooks: {
413
- onSuccess: (context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void>;
414
- onError: (context: import("@better-fetch/fetch").ErrorContext) => Promise<void>;
428
+ onSuccess: (context: _$_better_fetch_fetch0.SuccessContext<any>) => Promise<void>;
429
+ onError: (context: _$_better_fetch_fetch0.ErrorContext) => Promise<void>;
415
430
  };
416
431
  }[];
417
- getActions: ($fetch: BetterFetch, $store: ClientStore, clientOptions: import("better-auth").BetterAuthClientOptions | undefined) => {
432
+ getActions: ($fetch: BetterFetch, $store: ClientStore, clientOptions: _$better_auth0.BetterAuthClientOptions | undefined) => {
418
433
  /**
419
434
  * Gets the stored cookie.
420
435
  *
@@ -452,7 +467,7 @@ declare const electronClient: <O extends ElectronClientOptions>(options: O) => {
452
467
  } | {
453
468
  data: {
454
469
  token: string;
455
- user: import("better-auth").User & Record<string, any>;
470
+ user: _$better_auth0.User & Record<string, any>;
456
471
  };
457
472
  error: null;
458
473
  }>;
package/dist/client.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { _ as setupRenderer, a as authenticate, c as ElectronClientOptions, d as Storage, f as FetchUserImageResult, g as SetupRendererConfig, h as ExposedBridges, i as ElectronRequestAuthOptions, l as ElectronProxyClientOptions, m as normalizeUserOutput, n as handleDeepLink, o as kElectron, p as fetchUserImage, r as ElectronAuthenticateOptions, s as requestAuth, t as electronClient, u as ElectronSharedClientOptions, y as ElectronSharedOptions } from "./client-Cw8Yl2yP.mjs";
2
- export { type ElectronAuthenticateOptions, type ElectronClientOptions, type ElectronProxyClientOptions, type ElectronRequestAuthOptions, type ElectronSharedClientOptions, type ElectronSharedOptions, type ExposedBridges, type FetchUserImageResult, type SetupRendererConfig, type Storage, type authenticate, electronClient, type fetchUserImage, handleDeepLink, type kElectron, normalizeUserOutput, type requestAuth, type setupRenderer };
1
+ import { _ as setupRenderer, a as authenticate, c as ElectronClientOptions, d as Storage, f as FetchUserImageResult, g as SetupRendererConfig, h as ExposedBridges, i as ElectronRequestAuthOptions, l as ElectronProxyClientOptions, m as normalizeUserOutput, n as handleDeepLink, o as kElectron, p as fetchUserImage, r as ElectronAuthenticateOptions, s as requestAuth, t as electronClient, u as ElectronSharedClientOptions, y as ElectronSharedOptions } from "./client-BLUnuwWr.mjs";
2
+ export { ElectronAuthenticateOptions, ElectronClientOptions, ElectronProxyClientOptions, ElectronRequestAuthOptions, ElectronSharedClientOptions, ElectronSharedOptions, ExposedBridges, FetchUserImageResult, SetupRendererConfig, Storage, authenticate, electronClient, fetchUserImage, handleDeepLink, kElectron, normalizeUserOutput, requestAuth, setupRenderer };
package/dist/client.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { t as PACKAGE_VERSION } from "./version-CwxXc1Y6.mjs";
2
- import { n as isProcessType, r as parseProtocolScheme, t as getChannelPrefixWithDelimiter } from "./utils-C5XBRvIU.mjs";
1
+ import { t as PACKAGE_VERSION } from "./version-wuvBMIO8.mjs";
2
+ import { n as isProcessType, r as parseProtocolScheme, t as getChannelPrefixWithDelimiter } from "./utils-DxDKRT6e.mjs";
3
3
  import { BetterAuthError } from "@better-auth/core/error";
4
4
  import { base64, base64Url } from "@better-auth/utils/base64";
5
5
  import { APIError as APIError$1, getBaseURL, isDevelopment, isTest, safeJSONParse } from "better-auth";
@@ -577,7 +577,7 @@ const electronClient = (options) => {
577
577
  let store = null;
578
578
  const cookieName = `${opts.storagePrefix}.cookie`;
579
579
  const localCacheName = `${opts.storagePrefix}.local_cache`;
580
- const { getDecrypted, setEncrypted } = storageAdapter(opts.storage, /* @__PURE__ */ new Set([cookieName, localCacheName]));
580
+ const { getDecrypted, setEncrypted } = storageAdapter(opts.storage, new Set([cookieName, localCacheName]));
581
581
  const clearSessionCache = () => {
582
582
  setEncrypted(cookieName, "{}");
583
583
  store?.atoms.session?.set({
package/dist/index.d.mts CHANGED
@@ -1,6 +1,10 @@
1
- import { f as FetchUserImageResult, m as normalizeUserOutput, p as fetchUserImage, v as ElectronOptions, y as ElectronSharedOptions } from "./client-Cw8Yl2yP.mjs";
1
+ import { f as FetchUserImageResult, m as normalizeUserOutput, p as fetchUserImage, v as ElectronOptions, y as ElectronSharedOptions } from "./client-BLUnuwWr.mjs";
2
+ import * as _$better_auth0 from "better-auth";
2
3
  import * as z from "zod";
4
+ import * as _$_better_auth_core0 from "@better-auth/core";
3
5
  import { HookEndpointContext } from "@better-auth/core";
6
+ import * as _$better_call0 from "better-call";
7
+
4
8
  //#region src/index.d.ts
5
9
  declare module "@better-auth/core" {
6
10
  interface BetterAuthPluginRegistry<AuthOptions, Options> {
@@ -15,11 +19,11 @@ declare const electron: (options?: ElectronOptions | undefined) => {
15
19
  hooks: {
16
20
  after: ({
17
21
  matcher: (ctx: HookEndpointContext) => boolean;
18
- handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
22
+ handler: _$better_call0.Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<void>>;
19
23
  } | {
20
24
  matcher: (ctx: HookEndpointContext) => boolean;
21
- handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<import("better-call").MiddlewareContext<import("better-call").MiddlewareOptions, import("better-auth").PluginContext<import("better-auth").BetterAuthOptions> & import("better-auth").InfoContext & {
22
- options: import("better-auth").BetterAuthOptions;
25
+ handler: _$better_call0.Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<_$better_call0.MiddlewareContext<_$better_call0.MiddlewareOptions, _$better_auth0.PluginContext<_$better_auth0.BetterAuthOptions> & _$better_auth0.InfoContext & {
26
+ options: _$better_auth0.BetterAuthOptions;
23
27
  trustedOrigins: string[];
24
28
  trustedProviders: string[];
25
29
  isTrustedOrigin: (url: string, settings?: {
@@ -92,35 +96,35 @@ declare const electron: (options?: ElectronOptions | undefined) => {
92
96
  image?: string | null | undefined;
93
97
  } & Record<string, any>;
94
98
  } | null) => void;
95
- socialProviders: import("better-auth").OAuthProvider[];
96
- authCookies: import("better-auth").BetterAuthCookies;
97
- logger: ReturnType<typeof import("better-auth").createLogger>;
99
+ socialProviders: _$better_auth0.OAuthProvider[];
100
+ authCookies: _$better_auth0.BetterAuthCookies;
101
+ logger: ReturnType<typeof _$better_auth0.createLogger>;
98
102
  rateLimit: {
99
103
  enabled: boolean;
100
104
  window: number;
101
105
  max: number;
102
106
  storage: "memory" | "database" | "secondary-storage";
103
- } & Omit<import("better-auth").BetterAuthRateLimitOptions, "enabled" | "window" | "max" | "storage">;
104
- adapter: import("better-auth").DBAdapter<import("better-auth").BetterAuthOptions>;
105
- internalAdapter: import("better-auth").InternalAdapter<import("better-auth").BetterAuthOptions>;
106
- createAuthCookie: (cookieName: string, overrideAttributes?: Partial<import("better-call").CookieOptions> | undefined) => import("better-auth").BetterAuthCookie;
107
+ } & Omit<_$better_auth0.BetterAuthRateLimitOptions, "enabled" | "window" | "max" | "storage">;
108
+ adapter: _$better_auth0.DBAdapter<_$better_auth0.BetterAuthOptions>;
109
+ internalAdapter: _$better_auth0.InternalAdapter<_$better_auth0.BetterAuthOptions>;
110
+ createAuthCookie: (cookieName: string, overrideAttributes?: Partial<_$better_call0.CookieOptions> | undefined) => _$better_auth0.BetterAuthCookie;
107
111
  secret: string;
108
- secretConfig: string | import("better-auth").SecretConfig;
112
+ secretConfig: string | _$better_auth0.SecretConfig;
109
113
  sessionConfig: {
110
114
  updateAge: number;
111
115
  expiresIn: number;
112
116
  freshAge: number;
113
- cookieCacheSigner?: import("better-auth").CookieCacheSigner | undefined;
117
+ cookieCacheSigner?: _$better_auth0.CookieCacheSigner | undefined;
114
118
  cookieRefreshCache: false | {
115
119
  enabled: true;
116
120
  updateAge: number;
117
121
  };
118
122
  };
119
123
  generateId: (options: {
120
- model: import("better-auth").ModelNames;
124
+ model: _$better_auth0.ModelNames;
121
125
  size?: number | undefined;
122
126
  }) => string | false;
123
- secondaryStorage: import("better-auth").SecondaryStorage | undefined;
127
+ secondaryStorage: _$better_auth0.SecondaryStorage | undefined;
124
128
  password: {
125
129
  hash: (password: string) => Promise<string>;
126
130
  verify: (data: {
@@ -131,9 +135,9 @@ declare const electron: (options?: ElectronOptions | undefined) => {
131
135
  minPasswordLength: number;
132
136
  maxPasswordLength: number;
133
137
  };
134
- checkPassword: (userId: string, ctx: import("@better-auth/core").GenericEndpointContext<import("better-auth").BetterAuthOptions>) => Promise<boolean>;
138
+ checkPassword: (userId: string, ctx: _$_better_auth_core0.GenericEndpointContext<_$better_auth0.BetterAuthOptions>) => Promise<boolean>;
135
139
  };
136
- tables: import("better-auth").BetterAuthDBSchema;
140
+ tables: _$better_auth0.BetterAuthDBSchema;
137
141
  runMigrations: () => Promise<void>;
138
142
  publishTelemetry: (event: {
139
143
  type: string;
@@ -143,7 +147,7 @@ declare const electron: (options?: ElectronOptions | undefined) => {
143
147
  skipOriginCheck: boolean | string[];
144
148
  skipCSRFCheck: boolean;
145
149
  runInBackground: (promise: Promise<unknown>) => void;
146
- runInBackgroundOrAwait: (promise: Promise<unknown> | void) => import("better-auth").Awaitable<unknown>;
150
+ runInBackgroundOrAwait: (promise: Promise<unknown> | void) => _$better_auth0.Awaitable<unknown>;
147
151
  } & {
148
152
  returned?: unknown | undefined;
149
153
  responseHeaders?: Headers | undefined;
@@ -153,7 +157,7 @@ declare const electron: (options?: ElectronOptions | undefined) => {
153
157
  })[];
154
158
  };
155
159
  endpoints: {
156
- electronToken: import("better-call").StrictEndpoint<"/electron/token", {
160
+ electronToken: _$better_call0.StrictEndpoint<"/electron/token", {
157
161
  method: "POST";
158
162
  body: z.ZodObject<{
159
163
  token: z.ZodString;
@@ -191,9 +195,9 @@ declare const electron: (options?: ElectronOptions | undefined) => {
191
195
  };
192
196
  }, {
193
197
  token: string;
194
- user: import("better-auth").User & Record<string, any>;
198
+ user: _$better_auth0.User & Record<string, any>;
195
199
  }>;
196
- electronInitOAuthProxy: import("better-call").StrictEndpoint<"/electron/init-oauth-proxy", {
200
+ electronInitOAuthProxy: _$better_call0.StrictEndpoint<"/electron/init-oauth-proxy", {
197
201
  method: "GET";
198
202
  query: z.ZodObject<{
199
203
  provider: z.ZodString;
@@ -239,10 +243,10 @@ declare const electron: (options?: ElectronOptions | undefined) => {
239
243
  }, {
240
244
  url: string | undefined;
241
245
  redirect: boolean;
242
- user?: import("better-auth").User & Record<string, any>;
246
+ user?: _$better_auth0.User & Record<string, any>;
243
247
  token?: string;
244
248
  } | undefined>;
245
- electronTransferUser: import("better-call").StrictEndpoint<"/electron/transfer-user", {
249
+ electronTransferUser: _$better_call0.StrictEndpoint<"/electron/transfer-user", {
246
250
  method: "POST";
247
251
  query: z.ZodObject<{
248
252
  client_id: z.ZodString;
@@ -252,7 +256,7 @@ declare const electron: (options?: ElectronOptions | undefined) => {
252
256
  body: z.ZodObject<{
253
257
  callbackURL: z.ZodOptional<z.ZodString>;
254
258
  }, z.core.$strip>;
255
- use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
259
+ use: _$better_call0.Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
256
260
  session: {
257
261
  session: Record<string, any> & {
258
262
  id: string;
@@ -320,14 +324,14 @@ declare const electron: (options?: ElectronOptions | undefined) => {
320
324
  clientID: string;
321
325
  };
322
326
  $ERROR_CODES: {
323
- INVALID_TOKEN: import("better-auth").RawError<"INVALID_TOKEN">;
324
- INVALID_CLIENT_ID: import("better-auth").RawError<"INVALID_CLIENT_ID">;
325
- STATE_MISMATCH: import("better-auth").RawError<"STATE_MISMATCH">;
326
- MISSING_CODE_CHALLENGE: import("better-auth").RawError<"MISSING_CODE_CHALLENGE">;
327
- INVALID_CODE_VERIFIER: import("better-auth").RawError<"INVALID_CODE_VERIFIER">;
328
- MISSING_STATE: import("better-auth").RawError<"MISSING_STATE">;
329
- MISSING_PKCE: import("better-auth").RawError<"MISSING_PKCE">;
327
+ INVALID_TOKEN: _$better_auth0.RawError<"INVALID_TOKEN">;
328
+ INVALID_CLIENT_ID: _$better_auth0.RawError<"INVALID_CLIENT_ID">;
329
+ STATE_MISMATCH: _$better_auth0.RawError<"STATE_MISMATCH">;
330
+ MISSING_CODE_CHALLENGE: _$better_auth0.RawError<"MISSING_CODE_CHALLENGE">;
331
+ INVALID_CODE_VERIFIER: _$better_auth0.RawError<"INVALID_CODE_VERIFIER">;
332
+ MISSING_STATE: _$better_auth0.RawError<"MISSING_STATE">;
333
+ MISSING_PKCE: _$better_auth0.RawError<"MISSING_PKCE">;
330
334
  };
331
335
  };
332
336
  //#endregion
333
- export { type ElectronOptions, type ElectronSharedOptions, type FetchUserImageResult, electron, type fetchUserImage, type normalizeUserOutput };
337
+ export { ElectronOptions, ElectronSharedOptions, FetchUserImageResult, electron, fetchUserImage, normalizeUserOutput };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as PACKAGE_VERSION } from "./version-CwxXc1Y6.mjs";
1
+ import { t as PACKAGE_VERSION } from "./version-wuvBMIO8.mjs";
2
2
  import { createAuthMiddleware } from "@better-auth/core/api";
3
3
  import { APIError, BASE_ERROR_CODES } from "@better-auth/core/error";
4
4
  import { base64Url } from "@better-auth/utils/base64";
@@ -1,9 +1,7 @@
1
- import electron from "electron";
2
1
  import { Awaitable } from "@better-auth/core";
3
2
  import { User } from "@better-auth/core/db";
4
3
  import { BetterFetchError } from "@better-fetch/fetch";
5
4
  import * as z from "zod";
6
- import "better-auth";
7
5
  //#region src/types/options.d.ts
8
6
  interface ElectronSharedOptions {
9
7
  /**
package/dist/proxy.d.mts CHANGED
@@ -1,5 +1,6 @@
1
- import { l as ElectronProxyClientOptions } from "./client-Cw8Yl2yP.mjs";
1
+ import { l as ElectronProxyClientOptions } from "./client-BLUnuwWr.mjs";
2
2
  import { electron } from "./index.mjs";
3
+
3
4
  //#region src/proxy.d.ts
4
5
  declare const electronProxyClient: (options: ElectronProxyClientOptions) => {
5
6
  id: "electron-proxy";
package/dist/proxy.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { t as PACKAGE_VERSION } from "./version-CwxXc1Y6.mjs";
2
- import { r as parseProtocolScheme } from "./utils-C5XBRvIU.mjs";
1
+ import { t as PACKAGE_VERSION } from "./version-wuvBMIO8.mjs";
2
+ import { r as parseProtocolScheme } from "./utils-DxDKRT6e.mjs";
3
3
  import { parseCookies } from "better-auth/cookies";
4
4
  //#region src/proxy.ts
5
5
  const electronProxyClient = (options) => {
@@ -1,5 +1,6 @@
1
- import { d as Storage } from "./client-Cw8Yl2yP.mjs";
1
+ import { d as Storage } from "./client-BLUnuwWr.mjs";
2
2
  import { Options } from "conf";
3
+
3
4
  //#region src/storage.d.ts
4
5
  declare const storage: (opts?: Options<Record<string, any>> | undefined) => Storage;
5
6
  //#endregion
@@ -1,5 +1,5 @@
1
1
  //#endregion
2
2
  //#region src/version.ts
3
- const PACKAGE_VERSION = "1.7.0-rc.5";
3
+ const PACKAGE_VERSION = "1.7.0";
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/electron",
3
- "version": "1.7.0-rc.5",
3
+ "version": "1.7.0",
4
4
  "description": "Better Auth integration for Electron applications.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -79,9 +79,9 @@
79
79
  "@types/better-sqlite3": "^7.6.13",
80
80
  "better-sqlite3": "^12.11.1",
81
81
  "electron": "^43.1.1",
82
- "tsdown": "0.22.7",
83
- "@better-auth/core": "1.7.0-rc.5",
84
- "better-auth": "1.7.0-rc.5"
82
+ "tsdown": "0.21.10",
83
+ "@better-auth/core": "1.7.0",
84
+ "better-auth": "1.7.0"
85
85
  },
86
86
  "peerDependencies": {
87
87
  "@better-auth/utils": "0.4.2",
@@ -89,8 +89,8 @@
89
89
  "better-call": "1.4.0",
90
90
  "conf": "^15.0.2",
91
91
  "electron": ">=36.0.0",
92
- "@better-auth/core": "^1.7.0-rc.5",
93
- "better-auth": "^1.7.0-rc.5"
92
+ "@better-auth/core": "^1.7.0",
93
+ "better-auth": "^1.7.0"
94
94
  },
95
95
  "peerDependenciesMeta": {
96
96
  "electron": {
File without changes