better-auth-studio 1.0.72 → 1.0.74-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/README.md +32 -24
- package/dist/cli.js +0 -0
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +8 -2
- package/dist/routes.js.map +1 -1
- package/package.json +26 -27
- package/public/assets/{main-Cp6rbsZT.js → main-aKKBakSP.js} +4 -4
- package/public/index.html +1 -1
- package/frontend/package.json +0 -64
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ A sneak peek of the studio dashboard and management interface.
|
|
|
14
14
|
<table>
|
|
15
15
|
<tr>
|
|
16
16
|
<td width="50%">
|
|
17
|
-
<img src="https://gk6bju9ndq.ufs.sh/f/
|
|
17
|
+
<img src="https://gk6bju9ndq.ufs.sh/f/M5pOhOFFvHQJI57TKc4BY9GjOlTtSmoRXCZJ2D50IWsLq6vd" alt="Better Auth Studio Preview 0" width="100%" />
|
|
18
18
|
</td>
|
|
19
19
|
<td width="50%">
|
|
20
20
|
<img src="https://gk6bju9ndq.ufs.sh/f/M5pOhOFFvHQJ4L7IilBo7ItO3420CBLpvnPJlA6j5zaFYZbG" alt="Better Auth Studio Preview 4" width="100%" />
|
|
@@ -227,6 +227,7 @@ pnpx better-auth-studio start [options]
|
|
|
227
227
|
- `--host <string>` - Specify host (default: localhost)
|
|
228
228
|
- `--no-open` - Don't automatically open browser
|
|
229
229
|
- `--config <path>` - Path to auth config file (default: auto-detect)
|
|
230
|
+
- `--watch` - Watch for changes in auth config file and reload server automatically
|
|
230
231
|
|
|
231
232
|
**Examples:**
|
|
232
233
|
```bash
|
|
@@ -241,33 +242,40 @@ pnpm better-auth-studio start --no-open
|
|
|
241
242
|
|
|
242
243
|
# Use custom config file
|
|
243
244
|
pnpm better-auth-studio start --config ./custom-auth.ts
|
|
245
|
+
|
|
246
|
+
# Enable watch mode for auto-reload on config changes
|
|
247
|
+
pnpm better-auth-studio start --watch
|
|
248
|
+
|
|
249
|
+
# Combine multiple options
|
|
250
|
+
pnpx better-auth-studio start --port 3001 --watch --config ./src/auth.ts
|
|
244
251
|
```
|
|
245
252
|
|
|
246
253
|
### Using `--config` Option
|
|
247
254
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
255
|
+
Specify a custom path to your auth config file when it's in a non-standard location or auto-detection fails.
|
|
256
|
+
|
|
257
|
+
**Example:**
|
|
258
|
+
```bash
|
|
259
|
+
# With relative path
|
|
260
|
+
pnpm better-auth-studio start --config ./src/lib/auth.ts
|
|
261
|
+
|
|
262
|
+
# With absolute path
|
|
263
|
+
pnpm better-auth-studio start --config /path/to/project/auth.ts
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
**How it works:** Studio automatically searches for config files in common locations (`auth.ts`, `src/auth.ts`, `lib/auth.ts`, etc.). Use `--config` to specify a custom path when needed.
|
|
267
|
+
|
|
268
|
+
### Using `--watch` Option
|
|
269
|
+
|
|
270
|
+
Automatically reload the server when your `auth.ts` file changes. Perfect for development when iterating on your auth configuration.
|
|
271
|
+
|
|
272
|
+
**Example:**
|
|
273
|
+
```bash
|
|
274
|
+
# Start with watch mode enabled
|
|
275
|
+
pnpx better-auth-studio start --watch
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
**How it works:** Monitors your auth config file for changes, automatically restarts the server, and updates the browser UI via WebSocket - no manual refresh needed.
|
|
271
279
|
|
|
272
280
|
### Other Commands
|
|
273
281
|
```bash
|
package/dist/cli.js
CHANGED
|
File without changes
|
package/dist/routes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAeA,OAAO,EAA+B,MAAM,EAAE,MAAM,SAAS,CAAC;AAS9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AA+D9C,wBAAsB,oBAAoB,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,UAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,CAqLhG;AAeD,wBAAgB,YAAY,CAC1B,UAAU,EAAE,UAAU,EACtB,UAAU,CAAC,EAAE,MAAM,EACnB,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAeA,OAAO,EAA+B,MAAM,EAAE,MAAM,SAAS,CAAC;AAS9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AA+D9C,wBAAsB,oBAAoB,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,UAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,CAqLhG;AAeD,wBAAgB,YAAY,CAC1B,UAAU,EAAE,UAAU,EACtB,UAAU,CAAC,EAAE,MAAM,EACnB,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CAs1KR"}
|
package/dist/routes.js
CHANGED
|
@@ -1219,10 +1219,16 @@ export function createRoutes(authConfig, configPath, geoDbPath) {
|
|
|
1219
1219
|
}
|
|
1220
1220
|
if (script) {
|
|
1221
1221
|
// TODO: use more of sandbox environment to execute the script for security reasons
|
|
1222
|
-
|
|
1222
|
+
try {
|
|
1223
|
+
const result = eval(script);
|
|
1224
|
+
}
|
|
1225
|
+
catch (error) {
|
|
1226
|
+
return res
|
|
1227
|
+
.status(500)
|
|
1228
|
+
.json({ success: false, error: 'Failed to execute migration script' });
|
|
1229
|
+
}
|
|
1223
1230
|
return res.json({
|
|
1224
1231
|
success: true,
|
|
1225
|
-
result: result,
|
|
1226
1232
|
});
|
|
1227
1233
|
}
|
|
1228
1234
|
else {
|