@better-auth/electron 1.5.0-beta.17 → 1.5.0-beta.19
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/index.mjs +1 -4
- package/dist/preload.d.mts +3 -78
- package/package.json +38 -38
package/dist/index.mjs
CHANGED
|
@@ -131,10 +131,7 @@ const electronInitOAuthProxy = (opts) => createAuthEndpoint("/electron/init-oaut
|
|
|
131
131
|
const res = await betterFetch(`${isSocialProvider ? "/sign-in/social" : "/sign-in/oauth2"}?${searchParams.toString()}`, {
|
|
132
132
|
baseURL: ctx.context.baseURL,
|
|
133
133
|
method: "POST",
|
|
134
|
-
body: {
|
|
135
|
-
provider: ctx.query.provider,
|
|
136
|
-
disableRedirect: true
|
|
137
|
-
},
|
|
134
|
+
body: { provider: ctx.query.provider },
|
|
138
135
|
onResponse: (ctx) => {
|
|
139
136
|
setCookie = ctx.response.headers.get("set-cookie") ?? null;
|
|
140
137
|
},
|
package/dist/preload.d.mts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import electron from "electron";
|
|
2
2
|
import * as z from "zod";
|
|
3
|
+
import "jose";
|
|
3
4
|
import { BetterFetchError } from "@better-fetch/fetch";
|
|
5
|
+
import "nanostores";
|
|
6
|
+
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
4
7
|
import { Database } from "bun:sqlite";
|
|
5
8
|
import { DatabaseSync } from "node:sqlite";
|
|
6
9
|
import { Dialect, Kysely, Migration, MysqlPool, PostgresPool, SqliteDatabase } from "kysely";
|
|
@@ -1360,84 +1363,6 @@ type AuthContext<Options extends BetterAuthOptions = BetterAuthOptions> = Plugin
|
|
|
1360
1363
|
runInBackgroundOrAwait: (promise: Promise<unknown> | void) => Awaitable<unknown>;
|
|
1361
1364
|
}; //#endregion
|
|
1362
1365
|
//#endregion
|
|
1363
|
-
//#region ../../node_modules/.pnpm/@standard-schema+spec@1.1.0/node_modules/@standard-schema/spec/dist/index.d.ts
|
|
1364
|
-
/** The Standard Typed interface. This is a base type extended by other specs. */
|
|
1365
|
-
interface StandardTypedV1<Input = unknown, Output = Input> {
|
|
1366
|
-
/** The Standard properties. */
|
|
1367
|
-
readonly "~standard": StandardTypedV1.Props<Input, Output>;
|
|
1368
|
-
}
|
|
1369
|
-
declare namespace StandardTypedV1 {
|
|
1370
|
-
/** The Standard Typed properties interface. */
|
|
1371
|
-
interface Props<Input = unknown, Output = Input> {
|
|
1372
|
-
/** The version number of the standard. */
|
|
1373
|
-
readonly version: 1;
|
|
1374
|
-
/** The vendor name of the schema library. */
|
|
1375
|
-
readonly vendor: string;
|
|
1376
|
-
/** Inferred types associated with the schema. */
|
|
1377
|
-
readonly types?: Types<Input, Output> | undefined;
|
|
1378
|
-
}
|
|
1379
|
-
/** The Standard Typed types interface. */
|
|
1380
|
-
interface Types<Input = unknown, Output = Input> {
|
|
1381
|
-
/** The input type of the schema. */
|
|
1382
|
-
readonly input: Input;
|
|
1383
|
-
/** The output type of the schema. */
|
|
1384
|
-
readonly output: Output;
|
|
1385
|
-
}
|
|
1386
|
-
/** Infers the input type of a Standard Typed. */
|
|
1387
|
-
type InferInput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["input"];
|
|
1388
|
-
/** Infers the output type of a Standard Typed. */
|
|
1389
|
-
type InferOutput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["output"];
|
|
1390
|
-
}
|
|
1391
|
-
/** The Standard Schema interface. */
|
|
1392
|
-
interface StandardSchemaV1<Input = unknown, Output = Input> {
|
|
1393
|
-
/** The Standard Schema properties. */
|
|
1394
|
-
readonly "~standard": StandardSchemaV1.Props<Input, Output>;
|
|
1395
|
-
}
|
|
1396
|
-
declare namespace StandardSchemaV1 {
|
|
1397
|
-
/** The Standard Schema properties interface. */
|
|
1398
|
-
interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
|
|
1399
|
-
/** Validates unknown input values. */
|
|
1400
|
-
readonly validate: (value: unknown, options?: StandardSchemaV1.Options | undefined) => Result<Output> | Promise<Result<Output>>;
|
|
1401
|
-
}
|
|
1402
|
-
/** The result interface of the validate function. */
|
|
1403
|
-
type Result<Output> = SuccessResult<Output> | FailureResult;
|
|
1404
|
-
/** The result interface if validation succeeds. */
|
|
1405
|
-
interface SuccessResult<Output> {
|
|
1406
|
-
/** The typed output value. */
|
|
1407
|
-
readonly value: Output;
|
|
1408
|
-
/** A falsy value for `issues` indicates success. */
|
|
1409
|
-
readonly issues?: undefined;
|
|
1410
|
-
}
|
|
1411
|
-
interface Options {
|
|
1412
|
-
/** Explicit support for additional vendor-specific parameters, if needed. */
|
|
1413
|
-
readonly libraryOptions?: Record<string, unknown> | undefined;
|
|
1414
|
-
}
|
|
1415
|
-
/** The result interface if validation fails. */
|
|
1416
|
-
interface FailureResult {
|
|
1417
|
-
/** The issues of failed validation. */
|
|
1418
|
-
readonly issues: ReadonlyArray<Issue>;
|
|
1419
|
-
}
|
|
1420
|
-
/** The issue interface of the failure output. */
|
|
1421
|
-
interface Issue {
|
|
1422
|
-
/** The error message of the issue. */
|
|
1423
|
-
readonly message: string;
|
|
1424
|
-
/** The path of the issue, if any. */
|
|
1425
|
-
readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
|
|
1426
|
-
}
|
|
1427
|
-
/** The path segment interface of the issue. */
|
|
1428
|
-
interface PathSegment {
|
|
1429
|
-
/** The key representing a path segment. */
|
|
1430
|
-
readonly key: PropertyKey;
|
|
1431
|
-
}
|
|
1432
|
-
/** The Standard types interface. */
|
|
1433
|
-
interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {}
|
|
1434
|
-
/** Infers the input type of a Standard. */
|
|
1435
|
-
type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
|
|
1436
|
-
/** Infers the output type of a Standard. */
|
|
1437
|
-
type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
|
|
1438
|
-
}
|
|
1439
|
-
/** The Standard JSON Schema interface. */
|
|
1440
|
-
//#endregion
|
|
1441
1366
|
//#region ../core/dist/db/schema/rate-limit.d.mts
|
|
1442
1367
|
//#region src/db/schema/rate-limit.d.ts
|
|
1443
1368
|
declare const rateLimitSchema: z.ZodObject<{
|
package/package.json
CHANGED
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-auth/electron",
|
|
3
|
-
"version": "1.5.0-beta.
|
|
4
|
-
"type": "module",
|
|
3
|
+
"version": "1.5.0-beta.19",
|
|
5
4
|
"description": "Better Auth integration for Electron applications.",
|
|
6
|
-
"
|
|
7
|
-
"module": "dist/index.mjs",
|
|
8
|
-
"types": "dist/index.d.mts",
|
|
9
|
-
"publishConfig": {
|
|
10
|
-
"access": "public"
|
|
11
|
-
},
|
|
5
|
+
"type": "module",
|
|
12
6
|
"license": "MIT",
|
|
7
|
+
"homepage": "https://www.better-auth.com/docs/integrations/electron",
|
|
13
8
|
"repository": {
|
|
14
9
|
"type": "git",
|
|
15
|
-
"url": "https://github.com/better-auth/better-auth",
|
|
10
|
+
"url": "git+https://github.com/better-auth/better-auth.git",
|
|
16
11
|
"directory": "packages/electron"
|
|
17
12
|
},
|
|
18
|
-
"homepage": "https://www.better-auth.com/docs/integrations/electron",
|
|
19
13
|
"keywords": [
|
|
20
14
|
"electron",
|
|
21
15
|
"auth",
|
|
22
16
|
"better-auth",
|
|
23
17
|
"typescript"
|
|
24
18
|
],
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist"
|
|
24
|
+
],
|
|
25
|
+
"main": "./dist/index.mjs",
|
|
26
|
+
"module": "./dist/index.mjs",
|
|
27
|
+
"types": "./dist/index.d.mts",
|
|
25
28
|
"exports": {
|
|
26
29
|
".": {
|
|
27
30
|
"dev-source": "./src/index.ts",
|
|
@@ -68,47 +71,44 @@
|
|
|
68
71
|
]
|
|
69
72
|
}
|
|
70
73
|
},
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
"
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
"dependencies": {
|
|
75
|
+
"zod": "^4.3.6"
|
|
76
|
+
},
|
|
77
|
+
"devDependencies": {
|
|
78
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
79
|
+
"better-sqlite3": "^12.6.2",
|
|
80
|
+
"electron": "^38.8.0",
|
|
81
|
+
"tsdown": "^0.20.3",
|
|
82
|
+
"better-auth": "1.5.0-beta.19",
|
|
83
|
+
"@better-auth/core": "1.5.0-beta.19"
|
|
78
84
|
},
|
|
79
85
|
"peerDependencies": {
|
|
80
86
|
"@better-auth/utils": "0.3.1",
|
|
81
87
|
"@better-fetch/fetch": "1.1.21",
|
|
82
88
|
"better-call": "1.3.2",
|
|
83
|
-
"electron": ">=36.0.0",
|
|
84
89
|
"conf": "^15.0.2",
|
|
85
|
-
"
|
|
86
|
-
"@better-auth/core": "1.5.0-beta.
|
|
87
|
-
|
|
88
|
-
"dependencies": {
|
|
89
|
-
"zod": "^4.3.5"
|
|
90
|
+
"electron": ">=36.0.0",
|
|
91
|
+
"@better-auth/core": "1.5.0-beta.19",
|
|
92
|
+
"better-auth": "1.5.0-beta.19"
|
|
90
93
|
},
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
"
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
"peerDependenciesMeta": {
|
|
95
|
+
"electron": {
|
|
96
|
+
"optional": true
|
|
97
|
+
},
|
|
98
|
+
"conf": {
|
|
99
|
+
"optional": true
|
|
100
|
+
}
|
|
98
101
|
},
|
|
99
102
|
"engines": {
|
|
100
103
|
"node": ">=22.0.0"
|
|
101
104
|
},
|
|
102
|
-
"files": [
|
|
103
|
-
"dist"
|
|
104
|
-
],
|
|
105
105
|
"scripts": {
|
|
106
|
-
"test": "vitest",
|
|
107
|
-
"coverage": "vitest run --coverage --coverage.provider=istanbul",
|
|
108
|
-
"lint:package": "publint run --strict",
|
|
109
|
-
"lint:types": "attw --profile esm-only --pack .",
|
|
110
106
|
"build": "tsdown",
|
|
111
107
|
"dev": "tsdown --watch",
|
|
112
|
-
"
|
|
108
|
+
"lint:package": "publint run --strict",
|
|
109
|
+
"lint:types": "attw --profile esm-only --pack .",
|
|
110
|
+
"typecheck": "tsc --project tsconfig.json",
|
|
111
|
+
"test": "vitest",
|
|
112
|
+
"coverage": "vitest run --coverage --coverage.provider=istanbul"
|
|
113
113
|
}
|
|
114
114
|
}
|