feat(core-api): compose @repo/auth/api into appRouter under 'auth' namespace
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@repo/auth": "workspace:*",
|
||||
"@repo/blog": "workspace:*",
|
||||
"@repo/core-shared": "workspace:*",
|
||||
"@trpc/server": "^11.0.0"
|
||||
|
||||
@@ -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
3
pnpm-lock.yaml
generated
@@ -361,6 +361,9 @@ importers:
|
||||
|
||||
packages/core-api:
|
||||
dependencies:
|
||||
'@repo/auth':
|
||||
specifier: workspace:*
|
||||
version: link:../auth
|
||||
'@repo/blog':
|
||||
specifier: workspace:*
|
||||
version: link:../blog
|
||||
|
||||
Reference in New Issue
Block a user