feat(core-api): compose @repo/auth/api into appRouter under 'auth' namespace

This commit is contained in:
2026-05-05 08:16:25 +02:00
parent 8667232c22
commit aed8c9a6ad
5 changed files with 14 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
export type { User } from "./entities/user";
export type { Session } from "./entities/session";
export type { Cookie } from "./entities/cookie";
export type { AuthRouter } from "./integrations/api/router";
export {
AuthenticationError,
UnauthenticatedError,

View File

@@ -1,3 +1,4 @@
export type { Article, ArticleStatus } from "./entities/article";
export type { BlogRouter } from "./integrations/api/router";
export { ArticleNotFoundError, InputParseError } from "./entities/errors";
export { articleBySlugQuery, listArticlesQuery } from "./ui/query";

View File

@@ -12,6 +12,7 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@repo/auth": "workspace:*",
"@repo/blog": "workspace:*",
"@repo/core-shared": "workspace:*",
"@trpc/server": "^11.0.0"

View File

@@ -1,8 +1,15 @@
import type { AuthRouter } from "@repo/auth";
import type { BlogRouter } from "@repo/blog";
import { router } from "@repo/core-shared/trpc/init";
import { authRouter } from "@repo/auth/api";
import { blogRouter } from "@repo/blog/api";
export const appRouter = router({
auth: authRouter,
blog: blogRouter,
});
export type AppRouter = typeof appRouter;
export type AppRouter = {
auth: AuthRouter;
blog: BlogRouter;
};

3
pnpm-lock.yaml generated
View File

@@ -361,6 +361,9 @@ importers:
packages/core-api:
dependencies:
'@repo/auth':
specifier: workspace:*
version: link:../auth
'@repo/blog':
specifier: workspace:*
version: link:../blog