@better-auth/cli 1.2.8 → 1.2.9-beta.10

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.
Files changed (2) hide show
  1. package/dist/index.mjs +3 -1
  2. package/package.json +3 -2
package/dist/index.mjs CHANGED
@@ -496,6 +496,8 @@ const generateDrizzleSchema = async ({
496
496
  if (attr.defaultValue) {
497
497
  if (typeof attr.defaultValue === "function") {
498
498
  type += `.$defaultFn(${attr.defaultValue})`;
499
+ } else if (typeof attr.defaultValue === "string") {
500
+ type += `.default("${attr.defaultValue}")`;
499
501
  } else {
500
502
  type += `.default(${attr.defaultValue})`;
501
503
  }
@@ -703,7 +705,7 @@ const generateMigrations = async ({
703
705
  const { compileMigrations } = await getMigrations(options);
704
706
  const migrations = await compileMigrations();
705
707
  return {
706
- code: migrations,
708
+ code: migrations.trim() === ";" ? "" : migrations,
707
709
  fileName: file || `./better-auth_migrations/${(/* @__PURE__ */ new Date()).toISOString().replace(/:/g, "-")}.sql`
708
710
  };
709
711
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-auth/cli",
3
- "version": "1.2.8",
3
+ "version": "1.2.9-beta.10",
4
4
  "description": "The CLI for Better Auth",
5
5
  "module": "dist/index.mjs",
6
6
  "repository": {
@@ -24,6 +24,7 @@
24
24
  "vitest": "^1.6.0"
25
25
  },
26
26
  "dependencies": {
27
+ "@babel/core": "^7.0.0",
27
28
  "@babel/preset-react": "^7.26.3",
28
29
  "@babel/preset-typescript": "^7.26.0",
29
30
  "@clack/prompts": "^0.10.0",
@@ -46,7 +47,7 @@
46
47
  "tinyexec": "^0.3.1",
47
48
  "yocto-spinner": "^0.1.1",
48
49
  "zod": "^3.23.8",
49
- "better-auth": "1.2.8"
50
+ "better-auth": "1.2.9-beta.10"
50
51
  },
51
52
  "files": [
52
53
  "dist"