@better-auth/cli 1.2.0-beta.18 → 1.2.0-beta.19
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 +49 -53
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1098,7 +1098,7 @@ provider: "${opts.database.replace(
|
|
|
1098
1098
|
""
|
|
1099
1099
|
)}",
|
|
1100
1100
|
})`,
|
|
1101
|
-
dependencies: [],
|
|
1101
|
+
dependencies: [""],
|
|
1102
1102
|
envs: [],
|
|
1103
1103
|
imports: [
|
|
1104
1104
|
{
|
|
@@ -1590,13 +1590,11 @@ const getDefaultAuthClientConfig = async ({
|
|
|
1590
1590
|
(x) => x.path === import_.path
|
|
1591
1591
|
);
|
|
1592
1592
|
if (existingIndex !== -1) {
|
|
1593
|
-
|
|
1594
|
-
|
|
1593
|
+
const vars = result[existingIndex].variables;
|
|
1594
|
+
if (Array.isArray(vars)) {
|
|
1595
|
+
vars.push(variable);
|
|
1595
1596
|
} else {
|
|
1596
|
-
result[existingIndex].variables = [
|
|
1597
|
-
result[existingIndex].variables,
|
|
1598
|
-
variable
|
|
1599
|
-
];
|
|
1597
|
+
result[existingIndex].variables = [vars, variable];
|
|
1600
1598
|
}
|
|
1601
1599
|
} else {
|
|
1602
1600
|
result.push({
|
|
@@ -1610,13 +1608,11 @@ const getDefaultAuthClientConfig = async ({
|
|
|
1610
1608
|
(x) => x.path === import_.path
|
|
1611
1609
|
);
|
|
1612
1610
|
if (existingIndex !== -1) {
|
|
1613
|
-
|
|
1614
|
-
|
|
1611
|
+
const vars = result[existingIndex].variables;
|
|
1612
|
+
if (Array.isArray(vars)) {
|
|
1613
|
+
vars.push(import_.variables);
|
|
1615
1614
|
} else {
|
|
1616
|
-
result[existingIndex].variables = [
|
|
1617
|
-
result[existingIndex].variables,
|
|
1618
|
-
import_.variables
|
|
1619
|
-
];
|
|
1615
|
+
result[existingIndex].variables = [vars, import_.variables];
|
|
1620
1616
|
}
|
|
1621
1617
|
} else {
|
|
1622
1618
|
result.push({
|
|
@@ -2021,48 +2017,48 @@ async function initAction(opts) {
|
|
|
2021
2017
|
log.success(`\u{1F680} ENV files successfully updated!`);
|
|
2022
2018
|
}
|
|
2023
2019
|
}
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
)
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2020
|
+
}
|
|
2021
|
+
if (dependencies.length !== 0) {
|
|
2022
|
+
log.info(
|
|
2023
|
+
`There are ${dependencies.length} dependencies to install. (${dependencies.map((x) => chalk.green(x)).join(", ")})`
|
|
2024
|
+
);
|
|
2025
|
+
const shouldInstallDeps = await confirm({
|
|
2026
|
+
message: `Would you like us to install dependencies?`
|
|
2027
|
+
});
|
|
2028
|
+
if (isCancel(shouldInstallDeps)) {
|
|
2029
|
+
cancel("\u270B Operation cancelled.");
|
|
2030
|
+
process.exit(0);
|
|
2031
|
+
}
|
|
2032
|
+
if (shouldInstallDeps) {
|
|
2033
|
+
const s2 = spinner({ indicator: "dots" });
|
|
2034
|
+
if (packageManagerPreference === void 0) {
|
|
2035
|
+
packageManagerPreference = await getPackageManager();
|
|
2034
2036
|
}
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2037
|
+
s2.start(
|
|
2038
|
+
`Installing dependencies using ${chalk.bold(
|
|
2039
|
+
packageManagerPreference
|
|
2040
|
+
)}...`
|
|
2041
|
+
);
|
|
2042
|
+
try {
|
|
2043
|
+
const start = Date.now();
|
|
2044
|
+
await installDependencies({
|
|
2045
|
+
dependencies,
|
|
2046
|
+
packageManager: packageManagerPreference,
|
|
2047
|
+
cwd
|
|
2048
|
+
});
|
|
2049
|
+
s2.stop(
|
|
2050
|
+
`Dependencies installed ${chalk.greenBright(
|
|
2051
|
+
`successfully`
|
|
2052
|
+
)} ${chalk.gray(
|
|
2053
|
+
`(${formatMilliseconds(Date.now() - start)})`
|
|
2054
|
+
)}`
|
|
2044
2055
|
);
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
});
|
|
2052
|
-
s2.stop(
|
|
2053
|
-
`Dependencies installed ${chalk.greenBright(
|
|
2054
|
-
`successfully`
|
|
2055
|
-
)} ${chalk.gray(
|
|
2056
|
-
`(${formatMilliseconds(Date.now() - start)})`
|
|
2057
|
-
)}`
|
|
2058
|
-
);
|
|
2059
|
-
} catch (error) {
|
|
2060
|
-
s2.stop(
|
|
2061
|
-
`Failed to install dependencies using ${packageManagerPreference}:`
|
|
2062
|
-
);
|
|
2063
|
-
log.error(error.message);
|
|
2064
|
-
process.exit(1);
|
|
2065
|
-
}
|
|
2056
|
+
} catch (error) {
|
|
2057
|
+
s2.stop(
|
|
2058
|
+
`Failed to install dependencies using ${packageManagerPreference}:`
|
|
2059
|
+
);
|
|
2060
|
+
log.error(error.message);
|
|
2061
|
+
process.exit(1);
|
|
2066
2062
|
}
|
|
2067
2063
|
}
|
|
2068
2064
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-auth/cli",
|
|
3
|
-
"version": "1.2.0-beta.
|
|
3
|
+
"version": "1.2.0-beta.19",
|
|
4
4
|
"description": "The CLI for Better Auth",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"repository": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@types/diff": "^7.0.1",
|
|
21
21
|
"@types/fs-extra": "^11.0.4",
|
|
22
|
-
"typescript": "^5.7.
|
|
22
|
+
"typescript": "^5.7.3",
|
|
23
23
|
"unbuild": "^3.5.0",
|
|
24
24
|
"vitest": "^1.6.0"
|
|
25
25
|
},
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"tinyexec": "^0.3.1",
|
|
47
47
|
"yocto-spinner": "^0.1.1",
|
|
48
48
|
"zod": "^3.23.8",
|
|
49
|
-
"better-auth": "1.2.0-beta.
|
|
49
|
+
"better-auth": "1.2.0-beta.19"
|
|
50
50
|
},
|
|
51
51
|
"files": [
|
|
52
52
|
"dist"
|