better-auth-studio 1.0.49-beta.10 → 1.0.49-beta.12
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/routes.d.ts.map +1 -1
- package/dist/routes.js +23 -4
- package/dist/routes.js.map +1 -1
- package/package.json +9 -3
- package/public/assets/main-CvEhI3bC.css +1 -0
- package/public/assets/{main-Dq08BRZh.js → main-Opvi4-R9.js} +21 -21
- package/public/index.html +2 -2
- package/public/assets/main-D2JmQhDd.css +0 -1
package/dist/routes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAOA,OAAO,EAA+B,MAAM,EAAE,MAAM,SAAS,CAAC;AAS9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AA8D9C,wBAAsB,oBAAoB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CA8I/E;AAwBD,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":"AAOA,OAAO,EAA+B,MAAM,EAAE,MAAM,SAAS,CAAC;AAS9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AA8D9C,wBAAsB,oBAAoB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CA8I/E;AAwBD,wBAAgB,YAAY,CAC1B,UAAU,EAAE,UAAU,EACtB,UAAU,CAAC,EAAE,MAAM,EACnB,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CA8jKR"}
|
package/dist/routes.js
CHANGED
|
@@ -1284,15 +1284,34 @@ export function createRoutes(authConfig, configPath, geoDbPath) {
|
|
|
1284
1284
|
const basePathRaw = authConfig.basePath || '/api/auth';
|
|
1285
1285
|
const basePath = basePathRaw === '/' ? '' : basePathRaw.startsWith('/') ? basePathRaw : `/${basePathRaw}`;
|
|
1286
1286
|
const endpointChecks = [
|
|
1287
|
-
{
|
|
1288
|
-
|
|
1287
|
+
{
|
|
1288
|
+
label: 'Sign In',
|
|
1289
|
+
method: 'POST',
|
|
1290
|
+
path: '/sign-in/email',
|
|
1291
|
+
body: JSON.stringify({
|
|
1292
|
+
email: `test-${Date.now()}@example.com`,
|
|
1293
|
+
password: 'test-password-123',
|
|
1294
|
+
}),
|
|
1295
|
+
},
|
|
1296
|
+
{
|
|
1297
|
+
label: 'Get Session',
|
|
1298
|
+
method: 'GET',
|
|
1299
|
+
path: '/get-session',
|
|
1300
|
+
},
|
|
1289
1301
|
];
|
|
1290
1302
|
const checks = await Promise.all(endpointChecks.map(async (check) => {
|
|
1291
1303
|
const targetUrl = `${baseUrl}${basePath}${check.path}`;
|
|
1292
1304
|
try {
|
|
1293
|
-
const
|
|
1305
|
+
const fetchOptions = {
|
|
1294
1306
|
method: check.method,
|
|
1295
|
-
|
|
1307
|
+
headers: {
|
|
1308
|
+
'Content-Type': 'application/json',
|
|
1309
|
+
},
|
|
1310
|
+
};
|
|
1311
|
+
if (check.method === 'POST' && check.body) {
|
|
1312
|
+
fetchOptions.body = check.body;
|
|
1313
|
+
}
|
|
1314
|
+
const response = await fetch(targetUrl, fetchOptions);
|
|
1296
1315
|
const ok = response.status < 500 && response.status !== 404 && response.status !== 302;
|
|
1297
1316
|
if (!ok) {
|
|
1298
1317
|
return {
|