auth 1.6.27 → 1.6.29

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.d.mts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { DBAdapter, DBAdapter as DBAdapter$1 } from "@better-auth/core/db/adapter";
2
2
  import { BetterAuthOptions } from "@better-auth/core";
3
+
3
4
  //#region src/generators/types.d.ts
4
5
  interface SchemaGeneratorResult {
5
6
  code?: string;
package/dist/index.mjs CHANGED
@@ -1522,7 +1522,7 @@ function filterPublicEnv(publicPrefix, privatePrefix) {
1522
1522
  return Object.fromEntries(Object.entries(process.env).filter(([k]) => k.startsWith(publicPrefix) && (privatePrefix === "" || !k.startsWith(privatePrefix))));
1523
1523
  }
1524
1524
  const validIdentifier = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/;
1525
- const reserved = /* @__PURE__ */ new Set([
1525
+ const reserved = new Set([
1526
1526
  "do",
1527
1527
  "if",
1528
1528
  "in",
@@ -1742,7 +1742,7 @@ function resolveWithMatchers(specifier, matchers) {
1742
1742
  * a jiti-side preprocessor artifact observed in the AST; revisit on jiti
1743
1743
  * major version bumps (the regression suite catches a rename but not the why).
1744
1744
  */
1745
- const LOADER_IDENTIFIERS = /* @__PURE__ */ new Set([
1745
+ const LOADER_IDENTIFIERS = new Set([
1746
1746
  "require",
1747
1747
  "import",
1748
1748
  "jitiImport"
@@ -2698,7 +2698,7 @@ function installDependencies({ dependencies, packageManager, cwd, type = "prod",
2698
2698
  }
2699
2699
  //#endregion
2700
2700
  //#region src/version.ts
2701
- const cliVersion = "1.6.27";
2701
+ const cliVersion = "1.6.29";
2702
2702
  //#endregion
2703
2703
  //#region src/commands/init/configs/frameworks.config.ts
2704
2704
  const FRAMEWORKS = [
@@ -5167,12 +5167,11 @@ const getAuthPluginsCode = async ({ plugins, options = {}, installDependency })
5167
5167
  const getArguments = await getArgumentsPrompt(options, plugins, "auth");
5168
5168
  const pluginsCode = [];
5169
5169
  for (const plugin of plugins) {
5170
- const argumentsCode = await buildArgumentsCode(plugin.auth.arguments, getArguments, plugin.auth.function);
5171
- const args = convertArgumentsCodeToStringArray(argumentsCode);
5170
+ const args = convertArgumentsCodeToStringArray(await buildArgumentsCode(plugin.auth.arguments, getArguments, plugin.auth.function));
5172
5171
  removeTrailingUndefined(args);
5173
5172
  pluginsCode.push(`${plugin.auth.function}(${args.join(", ")})`);
5174
- const dependencies = /* @__PURE__ */ new Set([...plugin.dependencies || [], ...plugin.auth.dependencies || []]);
5175
- const devDependencies = /* @__PURE__ */ new Set([...plugin.devDependencies || [], ...plugin.auth.devDependencies || []]);
5173
+ const dependencies = new Set([...plugin.dependencies || [], ...plugin.auth.dependencies || []]);
5174
+ const devDependencies = new Set([...plugin.devDependencies || [], ...plugin.auth.devDependencies || []]);
5176
5175
  if (dependencies.size > 0) await installDependency([...dependencies]);
5177
5176
  if (devDependencies.size > 0) await installDependency([...devDependencies], "dev");
5178
5177
  }
@@ -5186,12 +5185,11 @@ const getAuthClientPluginsCode = async ({ plugins, options = {}, installDependen
5186
5185
  const pluginsCode = [];
5187
5186
  for (const plugin of pluginsWithClient) {
5188
5187
  if (!plugin.authClient) continue;
5189
- const argumentsCode = await buildArgumentsCode(plugin.authClient.arguments, getArguments, plugin.authClient.function);
5190
- const args = convertArgumentsCodeToStringArray(argumentsCode);
5188
+ const args = convertArgumentsCodeToStringArray(await buildArgumentsCode(plugin.authClient.arguments, getArguments, plugin.authClient.function));
5191
5189
  removeTrailingUndefined(args);
5192
5190
  pluginsCode.push(`${plugin.authClient.function}(${args.join(", ")})`);
5193
- const dependencies = /* @__PURE__ */ new Set([...plugin.dependencies || [], ...plugin.authClient.dependencies || []]);
5194
- const devDependencies = /* @__PURE__ */ new Set([...plugin.devDependencies || [], ...plugin.authClient.devDependencies || []]);
5191
+ const dependencies = new Set([...plugin.dependencies || [], ...plugin.authClient.dependencies || []]);
5192
+ const devDependencies = new Set([...plugin.devDependencies || [], ...plugin.authClient.devDependencies || []]);
5195
5193
  if (dependencies.size > 0) await installDependency([...dependencies]);
5196
5194
  if (devDependencies.size > 0) await installDependency([...devDependencies], "dev");
5197
5195
  }
@@ -6364,10 +6362,9 @@ export const auth = betterAuth({
6364
6362
  }
6365
6363
  databaseChoice = dbChoice || null;
6366
6364
  if (databaseChoice === "yes") {
6367
- const availableORMs = getAvailableORMs();
6368
6365
  const selectedOption = await select({
6369
6366
  message: `Select the database you want to use:`,
6370
- options: availableORMs.map((opt) => ({
6367
+ options: getAvailableORMs().map((opt) => ({
6371
6368
  value: opt.adapter || opt.value,
6372
6369
  label: opt.label
6373
6370
  }))
@@ -6401,10 +6398,9 @@ export const auth = betterAuth({
6401
6398
  database = sqliteVariants;
6402
6399
  } else if (isDirectAdapter(selectedOption)) database = selectedOption;
6403
6400
  else {
6404
- const availableDialects = getDialectsForORM(selectedOption);
6405
6401
  const selectedDialect = await select({
6406
6402
  message: `Select the database dialect:`,
6407
- options: availableDialects.map((d) => ({
6403
+ options: getDialectsForORM(selectedOption).map((d) => ({
6408
6404
  value: d.adapter,
6409
6405
  label: d.label
6410
6406
  }))
@@ -6422,7 +6418,7 @@ export const auth = betterAuth({
6422
6418
  const { shouldInstallDeps } = await prompts({
6423
6419
  type: "confirm",
6424
6420
  name: "shouldInstallDeps",
6425
- message: `Would you like to install the following dependencies: ${[.../* @__PURE__ */ new Set([...databaseConfig.dependencies, ...databaseConfig.devDependencies || []])].map((x) => chalk.cyan(x)).join(", ")}?`,
6421
+ message: `Would you like to install the following dependencies: ${[...new Set([...databaseConfig.dependencies, ...databaseConfig.devDependencies || []])].map((x) => chalk.cyan(x)).join(", ")}?`,
6426
6422
  initial: true
6427
6423
  });
6428
6424
  if (isCancel(shouldInstallDeps)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auth",
3
- "version": "1.6.27",
3
+ "version": "1.6.29",
4
4
  "description": "The CLI for Better Auth",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -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.27",
64
- "@better-auth/telemetry": "1.6.27",
65
- "better-auth": "1.6.27"
63
+ "@better-auth/core": "1.6.29",
64
+ "@better-auth/telemetry": "1.6.29",
65
+ "better-auth": "1.6.29"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@types/better-sqlite3": "^7.6.13",
@@ -71,11 +71,11 @@
71
71
  "better-sqlite3": "^12.6.2",
72
72
  "jiti": "^2.6.1",
73
73
  "memfs": "^4.56.10",
74
- "tsdown": "0.22.7",
74
+ "tsdown": "0.21.10",
75
75
  "tsx": "^4.21.0",
76
76
  "type-fest": "^5.4.4",
77
77
  "typescript": "^6.0.3",
78
- "@better-auth/passkey": "1.6.27"
78
+ "@better-auth/passkey": "1.6.29"
79
79
  },
80
80
  "scripts": {
81
81
  "build": "tsdown",
package/dist/index.d.mts DELETED
@@ -1 +0,0 @@
1
- import "dotenv/config";