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

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.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as PACKAGE_VERSION } from "./version-Do0kTnv7.mjs";
1
+ import { t as PACKAGE_VERSION } from "./version-CwxXc1Y6.mjs";
2
2
  import { n as isProcessType, r as parseProtocolScheme, t as getChannelPrefixWithDelimiter } from "./utils-C5XBRvIU.mjs";
3
3
  import { BetterAuthError } from "@better-auth/core/error";
4
4
  import { base64, base64Url } from "@better-auth/utils/base64";
package/dist/index.d.mts CHANGED
@@ -15,13 +15,10 @@ declare const electron: (options?: ElectronOptions | undefined) => {
15
15
  hooks: {
16
16
  after: ({
17
17
  matcher: (ctx: HookEndpointContext) => boolean;
18
- handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>;
18
+ handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
19
19
  } | {
20
20
  matcher: (ctx: HookEndpointContext) => boolean;
21
- handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<import("better-call").MiddlewareContext<import("better-call").MiddlewareOptions, {
22
- returned?: unknown | undefined;
23
- responseHeaders?: Headers | undefined;
24
- } & import("better-auth").PluginContext<import("better-auth").BetterAuthOptions> & import("better-auth").InfoContext & {
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 & {
25
22
  options: import("better-auth").BetterAuthOptions;
26
23
  trustedOrigins: string[];
27
24
  trustedProviders: string[];
@@ -147,9 +144,12 @@ declare const electron: (options?: ElectronOptions | undefined) => {
147
144
  skipCSRFCheck: boolean;
148
145
  runInBackground: (promise: Promise<unknown>) => void;
149
146
  runInBackgroundOrAwait: (promise: Promise<unknown> | void) => import("better-auth").Awaitable<unknown>;
147
+ } & {
148
+ returned?: unknown | undefined;
149
+ responseHeaders?: Headers | undefined;
150
150
  }> | {
151
151
  electron_authorization_code: string;
152
- } | undefined>;
152
+ } | undefined>>;
153
153
  })[];
154
154
  };
155
155
  endpoints: {
@@ -252,7 +252,7 @@ declare const electron: (options?: ElectronOptions | undefined) => {
252
252
  body: z.ZodObject<{
253
253
  callbackURL: z.ZodOptional<z.ZodString>;
254
254
  }, z.core.$strip>;
255
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
255
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
256
256
  session: {
257
257
  session: Record<string, any> & {
258
258
  id: string;
@@ -274,7 +274,7 @@ declare const electron: (options?: ElectronOptions | undefined) => {
274
274
  image?: string | null | undefined;
275
275
  };
276
276
  };
277
- }>)[];
277
+ }>>[];
278
278
  requireHeaders: true;
279
279
  metadata: {
280
280
  openapi: {
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as PACKAGE_VERSION } from "./version-Do0kTnv7.mjs";
1
+ import { t as PACKAGE_VERSION } from "./version-CwxXc1Y6.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";
package/dist/preload.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import electron, { contextBridge } from "electron";
2
- //#region ../../node_modules/.pnpm/better-call@1.3.7_zod@4.3.6/node_modules/better-call/dist/error.mjs
2
+ //#region ../../node_modules/.pnpm/better-call@1.4.0_zod@4.3.6/node_modules/better-call/dist/error.mjs
3
3
  function isErrorStackTraceLimitWritable() {
4
4
  const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
5
5
  if (desc === void 0) return Object.isExtensible(Error);
@@ -96,6 +96,10 @@ const statusCodes = {
96
96
  NETWORK_AUTHENTICATION_REQUIRED: 511
97
97
  };
98
98
  var InternalAPIError = class extends Error {
99
+ status;
100
+ body;
101
+ headers;
102
+ statusCode;
99
103
  constructor(status = "INTERNAL_SERVER_ERROR", body = void 0, headers = {}, statusCode = typeof status === "number" ? status : statusCodes[status]) {
100
104
  super(body?.message, body?.cause ? { cause: body.cause } : void 0);
101
105
  this.status = status;
package/dist/proxy.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as PACKAGE_VERSION } from "./version-Do0kTnv7.mjs";
1
+ import { t as PACKAGE_VERSION } from "./version-CwxXc1Y6.mjs";
2
2
  import { r as parseProtocolScheme } from "./utils-C5XBRvIU.mjs";
3
3
  import { parseCookies } from "better-auth/cookies";
4
4
  //#region src/proxy.ts
@@ -1,5 +1,5 @@
1
1
  //#endregion
2
2
  //#region src/version.ts
3
- const PACKAGE_VERSION = "1.7.0-rc.4";
3
+ const PACKAGE_VERSION = "1.7.0-rc.5";
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.4",
3
+ "version": "1.7.0-rc.5",
4
4
  "description": "Better Auth integration for Electron applications.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -80,17 +80,17 @@
80
80
  "better-sqlite3": "^12.11.1",
81
81
  "electron": "^43.1.1",
82
82
  "tsdown": "0.22.7",
83
- "@better-auth/core": "1.7.0-rc.4",
84
- "better-auth": "1.7.0-rc.4"
83
+ "@better-auth/core": "1.7.0-rc.5",
84
+ "better-auth": "1.7.0-rc.5"
85
85
  },
86
86
  "peerDependencies": {
87
87
  "@better-auth/utils": "0.4.2",
88
88
  "@better-fetch/fetch": "1.3.1",
89
- "better-call": "1.3.7",
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.4",
93
- "better-auth": "^1.7.0-rc.4"
92
+ "@better-auth/core": "^1.7.0-rc.5",
93
+ "better-auth": "^1.7.0-rc.5"
94
94
  },
95
95
  "peerDependenciesMeta": {
96
96
  "electron": {