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 { User } from "./entities/user";
|
||||||
export type { Session } from "./entities/session";
|
export type { Session } from "./entities/session";
|
||||||
export type { Cookie } from "./entities/cookie";
|
export type { Cookie } from "./entities/cookie";
|
||||||
|
export type { AuthRouter } from "./integrations/api/router";
|
||||||
export {
|
export {
|
||||||
AuthenticationError,
|
AuthenticationError,
|
||||||
UnauthenticatedError,
|
UnauthenticatedError,
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
export type { Article, ArticleStatus } from "./entities/article";
|
export type { Article, ArticleStatus } from "./entities/article";
|
||||||
|
export type { BlogRouter } from "./integrations/api/router";
|
||||||
export { ArticleNotFoundError, InputParseError } from "./entities/errors";
|
export { ArticleNotFoundError, InputParseError } from "./entities/errors";
|
||||||
export { articleBySlugQuery, listArticlesQuery } from "./ui/query";
|
export { articleBySlugQuery, listArticlesQuery } from "./ui/query";
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
"typecheck": "tsc --noEmit"
|
"typecheck": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@repo/auth": "workspace:*",
|
||||||
"@repo/blog": "workspace:*",
|
"@repo/blog": "workspace:*",
|
||||||
"@repo/core-shared": "workspace:*",
|
"@repo/core-shared": "workspace:*",
|
||||||
"@trpc/server": "^11.0.0"
|
"@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 { router } from "@repo/core-shared/trpc/init";
|
||||||
|
import { authRouter } from "@repo/auth/api";
|
||||||
import { blogRouter } from "@repo/blog/api";
|
import { blogRouter } from "@repo/blog/api";
|
||||||
|
|
||||||
export const appRouter = router({
|
export const appRouter = router({
|
||||||
|
auth: authRouter,
|
||||||
blog: blogRouter,
|
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:
|
packages/core-api:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
'@repo/auth':
|
||||||
|
specifier: workspace:*
|
||||||
|
version: link:../auth
|
||||||
'@repo/blog':
|
'@repo/blog':
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../blog
|
version: link:../blog
|
||||||
|
|||||||
Reference in New Issue
Block a user