@better-auth/cli 1.4.6-beta.6 → 1.4.7-beta.2
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 +10 -10
- package/package.json +7 -6
package/dist/index.mjs
CHANGED
|
@@ -214,7 +214,7 @@ const generateDrizzleSchema = async ({ options, file, adapter }) => {
|
|
|
214
214
|
hasMany: hasMany$1
|
|
215
215
|
});
|
|
216
216
|
}
|
|
217
|
-
for (const { modelName: modelName$1,
|
|
217
|
+
for (const { modelName: modelName$1, hasMany: hasMany$1 } of modelRelationsMap.values()) {
|
|
218
218
|
const relationType = hasMany$1 ? "many" : "one";
|
|
219
219
|
let relationKey = getModelName(modelName$1);
|
|
220
220
|
if (!adapter.options?.adapterConfig?.usePlural && relationType === "many") relationKey = `${relationKey}s`;
|
|
@@ -235,7 +235,7 @@ const generateDrizzleSchema = async ({ options, file, adapter }) => {
|
|
|
235
235
|
}
|
|
236
236
|
const duplicateRelations = [];
|
|
237
237
|
const singleRelations = [];
|
|
238
|
-
for (const [
|
|
238
|
+
for (const [_modelKey, relations] of relationsByModel.entries()) if (relations.length > 1) duplicateRelations.push(...relations);
|
|
239
239
|
else singleRelations.push(relations[0]);
|
|
240
240
|
for (const relation of duplicateRelations) if (relation.reference) {
|
|
241
241
|
const fieldName = relation.reference.fieldName;
|
|
@@ -345,7 +345,7 @@ function getPrismaVersion(cwd) {
|
|
|
345
345
|
if (!prismaVersion) return null;
|
|
346
346
|
const match = prismaVersion.match(/(\d+)/);
|
|
347
347
|
return match ? parseInt(match[1], 10) : null;
|
|
348
|
-
} catch
|
|
348
|
+
} catch {
|
|
349
349
|
return null;
|
|
350
350
|
}
|
|
351
351
|
}
|
|
@@ -2679,7 +2679,7 @@ async function initAction(opts) {
|
|
|
2679
2679
|
}
|
|
2680
2680
|
}
|
|
2681
2681
|
}
|
|
2682
|
-
} catch
|
|
2682
|
+
} catch {}
|
|
2683
2683
|
outro(outroText);
|
|
2684
2684
|
console.log();
|
|
2685
2685
|
process.exit(0);
|
|
@@ -2881,7 +2881,7 @@ async function storeToken(token) {
|
|
|
2881
2881
|
created_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
2882
2882
|
};
|
|
2883
2883
|
await fs$1.writeFile(TOKEN_FILE, JSON.stringify(tokenData, null, 2), "utf-8");
|
|
2884
|
-
} catch
|
|
2884
|
+
} catch {
|
|
2885
2885
|
console.warn("Failed to store authentication token locally");
|
|
2886
2886
|
}
|
|
2887
2887
|
}
|
|
@@ -2928,7 +2928,7 @@ async function handleCursorAction(mcpUrl, mcpName) {
|
|
|
2928
2928
|
}
|
|
2929
2929
|
execSync(command, { stdio: "inherit" });
|
|
2930
2930
|
console.log(chalk.green("\n✓ Cursor MCP installed successfully!"));
|
|
2931
|
-
} catch
|
|
2931
|
+
} catch {
|
|
2932
2932
|
console.log(chalk.yellow("\n⚠ Could not automatically open Cursor. Please copy the deeplink URL above and open it manually."));
|
|
2933
2933
|
console.log(chalk.gray("\nYou can also manually add this configuration to your Cursor MCP settings:"));
|
|
2934
2934
|
console.log(chalk.gray(JSON.stringify(mcpConfig, null, 2)));
|
|
@@ -2943,7 +2943,7 @@ function handleClaudeCodeAction(mcpUrl) {
|
|
|
2943
2943
|
try {
|
|
2944
2944
|
execSync(command, { stdio: "inherit" });
|
|
2945
2945
|
console.log(chalk.green("\n✓ Claude Code MCP installed successfully!"));
|
|
2946
|
-
} catch
|
|
2946
|
+
} catch {
|
|
2947
2947
|
console.log(chalk.yellow("\n⚠ Could not automatically add to Claude Code. Please run this command manually:"));
|
|
2948
2948
|
console.log(chalk.cyan(command));
|
|
2949
2949
|
}
|
|
@@ -2979,7 +2979,7 @@ function handleOpenCodeAction(mcpUrl) {
|
|
|
2979
2979
|
fs$2.writeFileSync(configPath, JSON.stringify(mergedConfig, null, 2));
|
|
2980
2980
|
console.log(chalk.green(`\n✓ Open Code configuration written to ${configPath}`));
|
|
2981
2981
|
console.log(chalk.green("✓ Better Auth MCP added successfully!"));
|
|
2982
|
-
} catch
|
|
2982
|
+
} catch {
|
|
2983
2983
|
console.log(chalk.yellow("\n⚠ Could not automatically write opencode.json. Please add this configuration manually:"));
|
|
2984
2984
|
console.log(chalk.cyan(JSON.stringify(openCodeConfig, null, 2)));
|
|
2985
2985
|
}
|
|
@@ -3004,7 +3004,7 @@ function handleManualAction(mcpUrl, mcpName) {
|
|
|
3004
3004
|
fs$2.writeFileSync(configPath, JSON.stringify(mergedConfig, null, 2));
|
|
3005
3005
|
console.log(chalk.green(`\n✓ MCP configuration written to ${configPath}`));
|
|
3006
3006
|
console.log(chalk.green("✓ Better Auth MCP added successfully!"));
|
|
3007
|
-
} catch
|
|
3007
|
+
} catch {
|
|
3008
3008
|
console.log(chalk.yellow("\n⚠ Could not automatically write mcp.json. Please add this configuration manually:"));
|
|
3009
3009
|
console.log(chalk.cyan(JSON.stringify(manualConfig, null, 2)));
|
|
3010
3010
|
}
|
|
@@ -3164,7 +3164,7 @@ async function main() {
|
|
|
3164
3164
|
let packageInfo = {};
|
|
3165
3165
|
try {
|
|
3166
3166
|
packageInfo = await getPackageInfo();
|
|
3167
|
-
} catch
|
|
3167
|
+
} catch {}
|
|
3168
3168
|
program.addCommand(init).addCommand(migrate).addCommand(generate).addCommand(generateSecret).addCommand(info).addCommand(login).addCommand(mcp).version(packageInfo.version || "1.1.2").description("Better Auth CLI").action(() => program.help());
|
|
3169
3169
|
program.parse();
|
|
3170
3170
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-auth/cli",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.7-beta.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The CLI for Better Auth",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"@types/prompts": "^2.4.9",
|
|
34
34
|
"@types/semver": "^7.7.1",
|
|
35
35
|
"jiti": "^2.6.0",
|
|
36
|
-
"tsdown": "^0.17.
|
|
36
|
+
"tsdown": "^0.17.2",
|
|
37
37
|
"tsx": "^4.20.6",
|
|
38
38
|
"type-fest": "^5.2.0",
|
|
39
39
|
"typescript": "^5.9.3",
|
|
40
|
-
"@better-auth/passkey": "1.4.
|
|
40
|
+
"@better-auth/passkey": "1.4.7-beta.2"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@babel/core": "^7.28.4",
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
"semver": "^7.7.2",
|
|
62
62
|
"yocto-spinner": "^0.2.3",
|
|
63
63
|
"zod": "^4.1.12",
|
|
64
|
-
"@better-auth/
|
|
65
|
-
"@better-auth/
|
|
66
|
-
"better-auth": "^1.4.
|
|
64
|
+
"@better-auth/core": "1.4.7-beta.2",
|
|
65
|
+
"@better-auth/telemetry": "1.4.7-beta.2",
|
|
66
|
+
"better-auth": "^1.4.7-beta.2"
|
|
67
67
|
},
|
|
68
68
|
"files": [
|
|
69
69
|
"dist"
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
"build": "tsdown",
|
|
73
73
|
"start": "node ./dist/index.mjs",
|
|
74
74
|
"lint:package": "publint run --strict",
|
|
75
|
+
"lint:types": "attw --profile esm-only --pack .",
|
|
75
76
|
"dev": "tsx ./src/index.ts",
|
|
76
77
|
"test": "vitest",
|
|
77
78
|
"coverage": "vitest run --coverage",
|