auth 1.6.11 → 1.6.13

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 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
- if (camelCase) return str;
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
- if (camelCase) return str;
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);
@@ -6680,7 +6679,7 @@ const initActionOptionsSchema = z.object({
6680
6679
  //#region src/commands/login.ts
6681
6680
  async function loginAction() {
6682
6681
  try {
6683
- await spawnCommand("npx @better-auth/cli@latest login");
6682
+ await spawnCommand("npx auth@latest login");
6684
6683
  } catch (error) {
6685
6684
  log.error(error.message || "An unknown error occurred");
6686
6685
  process.exit(1);
@@ -6690,7 +6689,7 @@ async function loginAction() {
6690
6689
  const login = new Command("login").description("Login to Better Auth Infrastructure").action(loginAction);
6691
6690
  async function logoutAction() {
6692
6691
  try {
6693
- await spawnCommand("npx @better-auth/cli@latest logout");
6692
+ await spawnCommand("npx auth@latest logout");
6694
6693
  } catch (error) {
6695
6694
  log.error(error.message || "An unknown error occurred");
6696
6695
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auth",
3
- "version": "1.6.11",
3
+ "version": "1.6.13",
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.0",
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.11",
64
- "@better-auth/telemetry": "1.6.11",
65
- "better-auth": "1.6.11"
63
+ "@better-auth/core": "1.6.13",
64
+ "@better-auth/telemetry": "1.6.13",
65
+ "better-auth": "1.6.13"
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.11"
78
+ "@better-auth/passkey": "1.6.13"
79
79
  },
80
80
  "scripts": {
81
81
  "build": "tsdown",