@better-auth/cli 1.4.0-beta.11 → 1.4.0-beta.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/index.js +1 -2
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1781,7 +1781,7 @@ const generateDrizzleSchema = async ({ options, file, adapter }) => {
|
|
|
1781
1781
|
const type = field.type;
|
|
1782
1782
|
if (typeof type !== "string") if (Array.isArray(type) && type.every((x) => typeof x === "string")) return {
|
|
1783
1783
|
sqlite: `text({ enum: [${type.map((x) => `'${x}'`).join(", ")}] })`,
|
|
1784
|
-
pg: `
|
|
1784
|
+
pg: `text('${name}', { enum: [${type.map((x) => `'${x}'`).join(", ")}] })`,
|
|
1785
1785
|
mysql: `mysqlEnum([${type.map((x) => `'${x}'`).join(", ")}])`
|
|
1786
1786
|
}[databaseType];
|
|
1787
1787
|
else throw new TypeError(`Invalid field type for field ${name} in model ${modelName}`);
|
|
@@ -1880,7 +1880,6 @@ function generateImport({ databaseType, tables, options }) {
|
|
|
1880
1880
|
const hasNonBigintNumber = Object.values(tables).some((table) => Object.values(table.fields).some((field) => (field.type === "number" || field.type === "number[]") && !field.bigint));
|
|
1881
1881
|
const hasFkToId = Object.values(tables).some((table) => Object.values(table.fields).some((field) => field.references?.field === "id"));
|
|
1882
1882
|
if (hasNonBigintNumber || options.advanced?.database?.useNumberId && hasFkToId) coreImports.push("integer");
|
|
1883
|
-
if (Object.values(tables).some((table) => Object.values(table.fields).some((field) => typeof field.type !== "string" && Array.isArray(field.type) && field.type.every((x) => typeof x === "string")))) coreImports.push("pgEnum");
|
|
1884
1883
|
} else coreImports.push("integer");
|
|
1885
1884
|
coreImports.push(useNumberId ? databaseType === "pg" ? "serial" : "" : "");
|
|
1886
1885
|
if (hasJson) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-auth/cli",
|
|
3
|
-
"version": "1.4.0-beta.
|
|
3
|
+
"version": "1.4.0-beta.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The CLI for Better Auth",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"bin": "./dist/index.js",
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/semver": "^7.7.1",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
31
|
+
"tsdown": "^0.15.9",
|
|
32
|
+
"tsx": "^4.20.6",
|
|
33
|
+
"typescript": "^5.9.3"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@babel/core": "^7.28.4",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"tinyexec": "^0.3.2",
|
|
59
59
|
"yocto-spinner": "^0.2.3",
|
|
60
60
|
"zod": "^4.1.5",
|
|
61
|
-
"better-auth": "1.4.0-beta.
|
|
61
|
+
"better-auth": "1.4.0-beta.13"
|
|
62
62
|
},
|
|
63
63
|
"files": [
|
|
64
64
|
"dist"
|