auth 1.6.10 → 1.6.12
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/api.mjs +2 -3
- package/dist/index.mjs +7 -5
- package/package.json +6 -6
package/dist/api.mjs
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
+
import { capitalizeFirstLetter, toSnakeCase } from "@better-auth/core/utils/string";
|
|
2
3
|
import { initGetFieldName, initGetModelName } from "better-auth/adapters";
|
|
3
4
|
import { getAuthTables } from "better-auth/db";
|
|
4
5
|
import prettier from "prettier";
|
|
5
6
|
import { getMigrations } from "better-auth/db/migration";
|
|
6
7
|
import fs from "node:fs/promises";
|
|
7
8
|
import path from "node:path";
|
|
8
|
-
import { capitalizeFirstLetter } from "@better-auth/core/utils/string";
|
|
9
9
|
import { produceSchema } from "@mrleebo/prisma-ast";
|
|
10
10
|
//#region src/generators/drizzle.ts
|
|
11
11
|
function convertToSnakeCase(str, camelCase) {
|
|
12
|
-
|
|
13
|
-
return str.replace(/([A-Z]+)([A-Z][a-z])/g, "$1_$2").replace(/([a-z\d])([A-Z])/g, "$1_$2").toLowerCase();
|
|
12
|
+
return camelCase ? str : toSnakeCase(str);
|
|
14
13
|
}
|
|
15
14
|
const generateDrizzleSchema = async ({ options, file, adapter }) => {
|
|
16
15
|
const tables = getAuthTables(options);
|
package/dist/index.mjs
CHANGED
|
@@ -14,11 +14,11 @@ import fs$1 from "node:fs/promises";
|
|
|
14
14
|
import { createTelemetry, getTelemetryAuthConfig } from "@better-auth/telemetry";
|
|
15
15
|
import { getAdapter } from "better-auth/db/adapter";
|
|
16
16
|
import * as z from "zod";
|
|
17
|
+
import { capitalizeFirstLetter, toSnakeCase } from "@better-auth/core/utils/string";
|
|
17
18
|
import { initGetFieldName, initGetModelName } from "better-auth/adapters";
|
|
18
19
|
import { getAuthTables } from "better-auth/db";
|
|
19
20
|
import prettier, { format } from "prettier";
|
|
20
21
|
import { getMigrations } from "better-auth/db/migration";
|
|
21
|
-
import { capitalizeFirstLetter } from "@better-auth/core/utils/string";
|
|
22
22
|
import { produceSchema } from "@mrleebo/prisma-ast";
|
|
23
23
|
import Crypto from "node:crypto";
|
|
24
24
|
import babelPresetReact from "@babel/preset-react";
|
|
@@ -579,8 +579,7 @@ const ai = new Command("ai").description("Interactive setup for Agent Auth — A
|
|
|
579
579
|
//#endregion
|
|
580
580
|
//#region src/generators/drizzle.ts
|
|
581
581
|
function convertToSnakeCase(str, camelCase) {
|
|
582
|
-
|
|
583
|
-
return str.replace(/([A-Z]+)([A-Z][a-z])/g, "$1_$2").replace(/([a-z\d])([A-Z])/g, "$1_$2").toLowerCase();
|
|
582
|
+
return camelCase ? str : toSnakeCase(str);
|
|
584
583
|
}
|
|
585
584
|
const generateDrizzleSchema = async ({ options, file, adapter }) => {
|
|
586
585
|
const tables = getAuthTables(options);
|
|
@@ -1746,6 +1745,9 @@ function createMockAdapter$1(adapterId, dialect) {
|
|
|
1746
1745
|
deleteMany: async () => {
|
|
1747
1746
|
throw new Error("Mock adapter methods should not be called");
|
|
1748
1747
|
},
|
|
1748
|
+
consumeOne: async () => {
|
|
1749
|
+
throw new Error("Mock adapter methods should not be called");
|
|
1750
|
+
},
|
|
1749
1751
|
transaction: async (callback) => {
|
|
1750
1752
|
throw new Error("Mock adapter methods should not be called");
|
|
1751
1753
|
},
|
|
@@ -6677,7 +6679,7 @@ const initActionOptionsSchema = z.object({
|
|
|
6677
6679
|
//#region src/commands/login.ts
|
|
6678
6680
|
async function loginAction() {
|
|
6679
6681
|
try {
|
|
6680
|
-
await spawnCommand("npx
|
|
6682
|
+
await spawnCommand("npx auth@latest login");
|
|
6681
6683
|
} catch (error) {
|
|
6682
6684
|
log.error(error.message || "An unknown error occurred");
|
|
6683
6685
|
process.exit(1);
|
|
@@ -6687,7 +6689,7 @@ async function loginAction() {
|
|
|
6687
6689
|
const login = new Command("login").description("Login to Better Auth Infrastructure").action(loginAction);
|
|
6688
6690
|
async function logoutAction() {
|
|
6689
6691
|
try {
|
|
6690
|
-
await spawnCommand("npx
|
|
6692
|
+
await spawnCommand("npx auth@latest logout");
|
|
6691
6693
|
} catch (error) {
|
|
6692
6694
|
log.error(error.message || "An unknown error occurred");
|
|
6693
6695
|
process.exit(1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "auth",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.12",
|
|
4
4
|
"description": "The CLI for Better Auth",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@babel/core": "^7.29.0",
|
|
47
47
|
"@babel/preset-react": "^7.28.5",
|
|
48
48
|
"@babel/preset-typescript": "^7.28.5",
|
|
49
|
-
"@better-auth/utils": "0.4.
|
|
49
|
+
"@better-auth/utils": "0.4.1",
|
|
50
50
|
"@clack/prompts": "^0.11.0",
|
|
51
51
|
"@mrleebo/prisma-ast": "^0.13.1",
|
|
52
52
|
"c12": "^3.3.3",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"semver": "^7.7.4",
|
|
61
61
|
"yocto-spinner": "^0.2.3",
|
|
62
62
|
"zod": "^4.3.6",
|
|
63
|
-
"@better-auth/core": "1.6.
|
|
64
|
-
"@better-auth/telemetry": "1.6.
|
|
65
|
-
"better-auth": "1.6.
|
|
63
|
+
"@better-auth/core": "1.6.12",
|
|
64
|
+
"@better-auth/telemetry": "1.6.12",
|
|
65
|
+
"better-auth": "1.6.12"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@types/better-sqlite3": "^7.6.13",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"tsx": "^4.21.0",
|
|
76
76
|
"type-fest": "^5.4.4",
|
|
77
77
|
"typescript": "^5.9.3",
|
|
78
|
-
"@better-auth/passkey": "1.6.
|
|
78
|
+
"@better-auth/passkey": "1.6.12"
|
|
79
79
|
},
|
|
80
80
|
"scripts": {
|
|
81
81
|
"build": "tsdown",
|