@better-auth/cli 1.3.2 → 1.3.4-beta.1
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 +17 -7
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -307,7 +307,8 @@ async function migrateAction(opts) {
|
|
|
307
307
|
const options = z.object({
|
|
308
308
|
cwd: z.string(),
|
|
309
309
|
config: z.string().optional(),
|
|
310
|
-
y: z.boolean().optional()
|
|
310
|
+
y: z.boolean().optional(),
|
|
311
|
+
yes: z.boolean().optional()
|
|
311
312
|
}).parse(opts);
|
|
312
313
|
const cwd = path.resolve(options.cwd);
|
|
313
314
|
if (!existsSync(cwd)) {
|
|
@@ -365,7 +366,11 @@ async function migrateAction(opts) {
|
|
|
365
366
|
chalk.white("table.")
|
|
366
367
|
);
|
|
367
368
|
}
|
|
368
|
-
|
|
369
|
+
if (options.y) {
|
|
370
|
+
console.warn("WARNING: --y is deprecated. Consider -y or --yes");
|
|
371
|
+
options.yes = true;
|
|
372
|
+
}
|
|
373
|
+
let migrate2 = options.yes;
|
|
369
374
|
if (!migrate2) {
|
|
370
375
|
const response = await prompts({
|
|
371
376
|
type: "confirm",
|
|
@@ -393,10 +398,10 @@ const migrate = new Command("migrate").option(
|
|
|
393
398
|
"--config <config>",
|
|
394
399
|
"the path to the configuration file. defaults to the first configuration file found."
|
|
395
400
|
).option(
|
|
396
|
-
"-y, --
|
|
401
|
+
"-y, --yes",
|
|
397
402
|
"automatically accept and run migrations without prompting",
|
|
398
403
|
false
|
|
399
|
-
).action(migrateAction);
|
|
404
|
+
).option("--y", "(deprecated) same as --yes", false).action(migrateAction);
|
|
400
405
|
|
|
401
406
|
function convertToSnakeCase(str, camelCase) {
|
|
402
407
|
if (camelCase) {
|
|
@@ -759,7 +764,8 @@ async function generateAction(opts) {
|
|
|
759
764
|
cwd: z.string(),
|
|
760
765
|
config: z.string().optional(),
|
|
761
766
|
output: z.string().optional(),
|
|
762
|
-
y: z.boolean().optional()
|
|
767
|
+
y: z.boolean().optional(),
|
|
768
|
+
yes: z.boolean().optional()
|
|
763
769
|
}).parse(opts);
|
|
764
770
|
const cwd = path.resolve(options.cwd);
|
|
765
771
|
if (!existsSync(cwd)) {
|
|
@@ -824,7 +830,11 @@ async function generateAction(opts) {
|
|
|
824
830
|
process.exit(1);
|
|
825
831
|
}
|
|
826
832
|
}
|
|
827
|
-
|
|
833
|
+
if (options.y) {
|
|
834
|
+
console.warn("WARNING: --y is deprecated. Consider -y or --yes");
|
|
835
|
+
options.yes = true;
|
|
836
|
+
}
|
|
837
|
+
let confirm = options.yes;
|
|
828
838
|
if (!confirm) {
|
|
829
839
|
const response = await prompts({
|
|
830
840
|
type: "confirm",
|
|
@@ -861,7 +871,7 @@ const generate = new Command("generate").option(
|
|
|
861
871
|
).option(
|
|
862
872
|
"--config <config>",
|
|
863
873
|
"the path to the configuration file. defaults to the first configuration file found."
|
|
864
|
-
).option("--output <output>", "the file to output to the generated schema").option("-y, --
|
|
874
|
+
).option("--output <output>", "the file to output to the generated schema").option("-y, --yes", "automatically answer yes to all prompts", false).option("--y", "(deprecated) same as --yes", false).action(generateAction);
|
|
865
875
|
|
|
866
876
|
const generateSecret = new Command("secret").action(() => {
|
|
867
877
|
const secret = generateSecretHash();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-auth/cli",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4-beta.1",
|
|
4
4
|
"description": "The CLI for Better Auth",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"repository": {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"tinyexec": "^0.3.1",
|
|
56
56
|
"yocto-spinner": "^0.1.1",
|
|
57
57
|
"zod": "^3.23.8",
|
|
58
|
-
"better-auth": "1.3.
|
|
58
|
+
"better-auth": "1.3.4-beta.1"
|
|
59
59
|
},
|
|
60
60
|
"files": [
|
|
61
61
|
"dist"
|