bknd is dead long live userbase
Run Tests / test (pull_request) Successful in 4m57s

This commit is contained in:
2026-09-27 19:34:06 +05:30
parent 05e0086fcd
commit 0bfcb5ad71
529 changed files with 2385 additions and 2924 deletions
+9 -9
View File
@@ -1,7 +1,7 @@
import type { AstroBkndConfig } from "bknd/adapter/astro";
import { registerLocalMediaAdapter } from "bknd/adapter/node";
import { boolean, em, entity, text } from "bknd";
import { secureRandomString } from "bknd/utils";
import type { AstroUserbaseConfig } from "userbase/adapter/astro";
import { registerLocalMediaAdapter } from "userbase/adapter/node";
import { boolean, em, entity, text } from "userbase";
import { secureRandomString } from "userbase/utils";
// since we're running in node, we can register the local media adapter
const local = registerLocalMediaAdapter();
@@ -16,7 +16,7 @@ const schema = em({
// register your schema to get automatic type completion
type Database = (typeof schema)["DB"];
declare module "bknd" {
declare module "userbase" {
interface DB extends Database {}
}
@@ -34,7 +34,7 @@ export default {
auth: {
enabled: true,
jwt: {
issuer: "bknd-astro-example",
issuer: "userbase-astro-example",
secret: secureRandomString(64),
},
},
@@ -51,15 +51,15 @@ export default {
seed: async (ctx) => {
// create some entries
await ctx.em.mutator("todos").insertMany([
{ title: "Learn bknd", done: true },
{ title: "Learn userbase", done: true },
{ title: "Build something cool", done: false },
]);
// and create a user
await ctx.app.module.auth.createUser({
email: "test@bknd.io",
email: "test@userbase.io",
password: "12345678",
});
},
},
} as const satisfies AstroBkndConfig;
} as const satisfies AstroUserbaseConfig;