configs are reachable now i hope

allow-secret-creation
pegasust 2022-12-18 06:35:39 +00:00
parent 1acfede68f
commit d005885a50
8 changed files with 1038 additions and 138 deletions

View File

@ -11,10 +11,10 @@
"type-check": "tsc --noEmit" "type-check": "tsc --noEmit"
}, },
"dependencies": { "dependencies": {
"@acme/api": "*", "@acme/api": "workspace:*",
"@acme/auth": "*", "@acme/auth": "workspace:*",
"@acme/db": "*", "@acme/db": "workspace:*",
"@acme/tailwind-config": "*", "@acme/tailwind-config": "workspace:*",
"@tanstack/react-query": "^4.16.1", "@tanstack/react-query": "^4.16.1",
"@trpc/client": "^10.1.0", "@trpc/client": "^10.1.0",
"@trpc/next": "^10.1.0", "@trpc/next": "^10.1.0",

View File

@ -4,7 +4,7 @@
"private": true, "private": true,
"workspaces": [ "workspaces": [
"apps/*", "apps/*",
"packages/*" "packages/**/*"
], ],
"scripts": { "scripts": {
"build": "turbo build", "build": "turbo build",

View File

@ -5,6 +5,7 @@ import { authRouter } from "./auth";
export const appRouter = router({ export const appRouter = router({
post: postRouter, post: postRouter,
auth: authRouter, auth: authRouter,
namegen: nameGenRouter,
}); });
// export type definition of API // export type definition of API

View File

@ -0,0 +1,11 @@
import { protectedProcedure, publicProcedure, router } from "../../trpc";
export const authRouter = router({
getSession: publicProcedure.query(({ ctx }) => {
return ctx.session;
}),
getSecretMessage: protectedProcedure.query(() => {
// testing type validation of overridden next-auth Session in @acme/auth package
return "you can see this secret message!";
}),
});

View File

@ -1,5 +1,5 @@
{ {
"name": "config", "name": "@acme/eslint-config",
"version": "1.0.0", "version": "1.0.0",
"main": "index.js", "main": "index.js",
"license": "MIT", "license": "MIT",

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,3 @@
packages: packages:
- "apps/*" - "apps/*"
- "packages/*" - "packages/**/*"