release: WRNexusJS 0.5.0

This commit is contained in:
Clintchiz committed 2026-07-29 12:51:10 +05:30
1 parent 76c768099d
commit 6afe32f63f
456 files changed
+40879 -8850

No files matched your search

@@ -0,0 +1,14 @@
import { authSession, requireAuth } from "@wrnexus/auth";
import type { Middleware } from "@wrnexus/core";
import { auth } from "../lib/auth.ts";
const hydrate = authSession(auth);
const accountGuard = requireAuth({ loginPath: "/sign-in" });
const middleware: Middleware = async (ctx, next) => {
return hydrate(ctx, () =>
ctx.url.pathname.startsWith("/account") ? accountGuard(ctx, next) : next(),
);
};
export default middleware;