@better-auth/electron 1.5.5 → 1.5.7-beta.1
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-DVs5eLfi.d.mts → client-D8BB_eSV.d.mts} +1 -8
- package/dist/client.d.mts +1 -1
- package/dist/client.mjs +21 -12
- package/dist/index.d.mts +124 -140
- package/dist/index.mjs +1 -5
- package/dist/preload.d.mts +3162 -3239
- package/dist/preload.mjs +5 -15
- package/dist/proxy.d.mts +1 -1
- package/dist/proxy.mjs +2 -4
- package/dist/storage.d.mts +1 -1
- package/dist/storage.mjs +1 -3
- package/dist/{utils-DecLU66o.mjs → utils-CRzg_SlK.mjs} +1 -2
- package/package.json +7 -7
package/dist/preload.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import electron, { contextBridge } from "electron";
|
|
2
|
-
|
|
3
2
|
//#region ../core/dist/utils/error-codes.mjs
|
|
4
3
|
function defineErrorCodes(codes) {
|
|
5
4
|
return Object.fromEntries(Object.entries(codes).map(([key, value]) => [key, {
|
|
@@ -8,10 +7,7 @@ function defineErrorCodes(codes) {
|
|
|
8
7
|
toString: () => key
|
|
9
8
|
}]));
|
|
10
9
|
}
|
|
11
|
-
|
|
12
|
-
//#endregion
|
|
13
|
-
//#region ../core/dist/error/codes.mjs
|
|
14
|
-
const BASE_ERROR_CODES = defineErrorCodes({
|
|
10
|
+
defineErrorCodes({
|
|
15
11
|
USER_NOT_FOUND: "User not found",
|
|
16
12
|
FAILED_TO_CREATE_USER: "Failed to create user",
|
|
17
13
|
FAILED_TO_CREATE_SESSION: "Failed to create session",
|
|
@@ -61,13 +57,12 @@ const BASE_ERROR_CODES = defineErrorCodes({
|
|
|
61
57
|
BODY_MUST_BE_AN_OBJECT: "Body must be an object",
|
|
62
58
|
PASSWORD_ALREADY_SET: "User already has a password set"
|
|
63
59
|
});
|
|
64
|
-
|
|
65
60
|
//#endregion
|
|
66
|
-
//#region ../../node_modules/.pnpm/better-call@
|
|
61
|
+
//#region ../../node_modules/.pnpm/better-call@2.0.2_zod@4.3.6/node_modules/better-call/dist/error.mjs
|
|
67
62
|
function isErrorStackTraceLimitWritable() {
|
|
68
63
|
const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
|
|
69
64
|
if (desc === void 0) return Object.isExtensible(Error);
|
|
70
|
-
return Object.
|
|
65
|
+
return Object.hasOwn(desc, "writable") ? desc.writable : desc.set !== void 0;
|
|
71
66
|
}
|
|
72
67
|
/**
|
|
73
68
|
* Hide internal stack frames from the error stack trace.
|
|
@@ -173,9 +168,7 @@ var InternalAPIError = class extends Error {
|
|
|
173
168
|
this.body = body;
|
|
174
169
|
}
|
|
175
170
|
};
|
|
176
|
-
|
|
177
|
-
const APIError = makeErrorForHideStackFrame(InternalAPIError, Error);
|
|
178
|
-
|
|
171
|
+
makeErrorForHideStackFrame(InternalAPIError, Error);
|
|
179
172
|
//#endregion
|
|
180
173
|
//#region ../core/dist/error/index.mjs
|
|
181
174
|
var BetterAuthError = class extends Error {
|
|
@@ -186,7 +179,6 @@ var BetterAuthError = class extends Error {
|
|
|
186
179
|
this.stack = "";
|
|
187
180
|
}
|
|
188
181
|
};
|
|
189
|
-
|
|
190
182
|
//#endregion
|
|
191
183
|
//#region src/utils.ts
|
|
192
184
|
function isProcessType(type) {
|
|
@@ -195,7 +187,6 @@ function isProcessType(type) {
|
|
|
195
187
|
function getChannelPrefixWithDelimiter(ns = "better-auth") {
|
|
196
188
|
return ns.length > 0 ? ns + ":" : ns;
|
|
197
189
|
}
|
|
198
|
-
|
|
199
190
|
//#endregion
|
|
200
191
|
//#region src/preload.ts
|
|
201
192
|
const { ipcRenderer } = electron;
|
|
@@ -252,6 +243,5 @@ function setupRenderer(options = {}) {
|
|
|
252
243
|
if (!isProcessType("renderer")) throw new BetterAuthError("setupRenderer can only be called in the renderer process.");
|
|
253
244
|
exposeBridges(options);
|
|
254
245
|
}
|
|
255
|
-
|
|
256
246
|
//#endregion
|
|
257
|
-
export { setupRenderer };
|
|
247
|
+
export { setupRenderer };
|
package/dist/proxy.d.mts
CHANGED
package/dist/proxy.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { r as parseProtocolScheme } from "./utils-
|
|
1
|
+
import { r as parseProtocolScheme } from "./utils-CRzg_SlK.mjs";
|
|
2
2
|
import { parseCookies } from "better-auth/cookies";
|
|
3
|
-
|
|
4
3
|
//#region src/proxy.ts
|
|
5
4
|
const electronProxyClient = (options) => {
|
|
6
5
|
const opts = {
|
|
@@ -42,6 +41,5 @@ const electronProxyClient = (options) => {
|
|
|
42
41
|
$InferServerPlugin: {}
|
|
43
42
|
};
|
|
44
43
|
};
|
|
45
|
-
|
|
46
44
|
//#endregion
|
|
47
|
-
export { electronProxyClient };
|
|
45
|
+
export { electronProxyClient };
|
package/dist/storage.d.mts
CHANGED
package/dist/storage.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import electron from "electron";
|
|
2
2
|
import Conf from "conf";
|
|
3
|
-
|
|
4
3
|
//#region src/storage.ts
|
|
5
4
|
const { app } = electron;
|
|
6
5
|
const storage = (opts) => {
|
|
@@ -23,6 +22,5 @@ const storage = (opts) => {
|
|
|
23
22
|
}
|
|
24
23
|
};
|
|
25
24
|
};
|
|
26
|
-
|
|
27
25
|
//#endregion
|
|
28
|
-
export { storage };
|
|
26
|
+
export { storage };
|
|
@@ -15,6 +15,5 @@ function parseProtocolScheme(protocolOption) {
|
|
|
15
15
|
function getChannelPrefixWithDelimiter(ns = "better-auth") {
|
|
16
16
|
return ns.length > 0 ? ns + ":" : ns;
|
|
17
17
|
}
|
|
18
|
-
|
|
19
18
|
//#endregion
|
|
20
|
-
export { isProcessType as n, parseProtocolScheme as r, getChannelPrefixWithDelimiter as t };
|
|
19
|
+
export { isProcessType as n, parseProtocolScheme as r, getChannelPrefixWithDelimiter as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-auth/electron",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.7-beta.1",
|
|
4
4
|
"description": "Better Auth integration for Electron applications.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -78,18 +78,18 @@
|
|
|
78
78
|
"@types/better-sqlite3": "^7.6.13",
|
|
79
79
|
"better-sqlite3": "^12.6.2",
|
|
80
80
|
"electron": "^38.8.4",
|
|
81
|
-
"tsdown": "0.21.
|
|
82
|
-
"@better-auth/core": "1.5.
|
|
83
|
-
"better-auth": "1.5.
|
|
81
|
+
"tsdown": "0.21.1",
|
|
82
|
+
"@better-auth/core": "1.5.7-beta.1",
|
|
83
|
+
"better-auth": "1.5.7-beta.1"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
86
|
"@better-auth/utils": "0.3.1",
|
|
87
87
|
"@better-fetch/fetch": "1.1.21",
|
|
88
|
-
"better-call": "
|
|
88
|
+
"better-call": "2.0.2",
|
|
89
89
|
"conf": "^15.0.2",
|
|
90
90
|
"electron": ">=36.0.0",
|
|
91
|
-
"@better-auth/core": "1.5.
|
|
92
|
-
"better-auth": "1.5.
|
|
91
|
+
"@better-auth/core": "1.5.7-beta.1",
|
|
92
|
+
"better-auth": "1.5.7-beta.1"
|
|
93
93
|
},
|
|
94
94
|
"peerDependenciesMeta": {
|
|
95
95
|
"electron": {
|