@better-auth/electron 1.6.23 → 1.6.25

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/proxy.d.mts CHANGED
@@ -1,6 +1,5 @@
1
- import { l as ElectronProxyClientOptions } from "./client-hpd3q6M8.mjs";
1
+ import { l as ElectronProxyClientOptions } from "./client-Dfn6XsLf.mjs";
2
2
  import { electron } from "./index.mjs";
3
-
4
3
  //#region src/proxy.d.ts
5
4
  declare const electronProxyClient: (options: ElectronProxyClientOptions) => {
6
5
  id: "electron-proxy";
package/dist/proxy.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { t as PACKAGE_VERSION } from "./version-YIydhdrs.mjs";
2
- import { r as parseProtocolScheme } from "./utils-DxDKRT6e.mjs";
1
+ import { t as PACKAGE_VERSION } from "./version-Bbx2FRPo.mjs";
2
+ import { r as parseProtocolScheme } from "./utils-C5XBRvIU.mjs";
3
3
  import { parseCookies } from "better-auth/cookies";
4
4
  //#region src/proxy.ts
5
5
  const electronProxyClient = (options) => {
@@ -20,7 +20,18 @@ const electronProxyClient = (options) => {
20
20
  return parseCookies(document.cookie).get(redirectCookieName) ?? null;
21
21
  };
22
22
  return {
23
- electron: { getAuthorizationCode },
23
+ electron: {
24
+ /**
25
+ * Gets the current authorization code from the cookie.
26
+ */
27
+ getAuthorizationCode },
28
+ /**
29
+ * Ensures redirecting to the Electron app.
30
+ *
31
+ * Polls for a cookie set by the server to indicate that an authorization code is available.
32
+ *
33
+ * @returns The interval ID which can be used to clear the polling.
34
+ */
24
35
  ensureElectronRedirect: (cfg) => {
25
36
  const timeout = cfg?.timeout || 1e4;
26
37
  const interval = cfg?.interval || 100;
@@ -1,6 +1,5 @@
1
- import { d as Storage } from "./client-hpd3q6M8.mjs";
1
+ import { d as Storage } from "./client-Dfn6XsLf.mjs";
2
2
  import { Options } from "conf";
3
-
4
3
  //#region src/storage.d.ts
5
4
  declare const storage: (opts?: Options<Record<string, any>> | undefined) => Storage;
6
5
  //#endregion
@@ -1,5 +1,5 @@
1
1
  //#endregion
2
2
  //#region src/version.ts
3
- const PACKAGE_VERSION = "1.6.23";
3
+ const PACKAGE_VERSION = "1.6.25";
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.6.23",
3
+ "version": "1.6.25",
4
4
  "description": "Better Auth integration for Electron applications.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -78,10 +78,10 @@
78
78
  "devDependencies": {
79
79
  "@types/better-sqlite3": "^7.6.13",
80
80
  "better-sqlite3": "^12.6.2",
81
- "electron": "^41.2.2",
82
- "tsdown": "0.21.1",
83
- "@better-auth/core": "1.6.23",
84
- "better-auth": "1.6.23"
81
+ "electron": "^43.1.1",
82
+ "tsdown": "0.22.7",
83
+ "@better-auth/core": "1.6.25",
84
+ "better-auth": "1.6.25"
85
85
  },
86
86
  "peerDependencies": {
87
87
  "@better-auth/utils": "0.4.2",
@@ -89,8 +89,8 @@
89
89
  "better-call": "1.3.7",
90
90
  "conf": "^15.0.2",
91
91
  "electron": ">=36.0.0",
92
- "@better-auth/core": "^1.6.23",
93
- "better-auth": "^1.6.23"
92
+ "@better-auth/core": "^1.6.25",
93
+ "better-auth": "^1.6.25"
94
94
  },
95
95
  "peerDependenciesMeta": {
96
96
  "electron": {
File without changes