From 1c2fab253767818679d05771dbe5295057bf87aa Mon Sep 17 00:00:00 2001 From: pegasust Date: Wed, 21 Dec 2022 00:12:55 +0000 Subject: [PATCH] wip before nuking nixos@Felia --- apps/about-me/package.json | 2 +- apps/docs/package.json | 2 +- apps/name-generator/package.json | 3 +- apps/name-generator/tsconfig.json | 35 ++++++++++++++++++++---- apps/web/package.json | 2 +- packages/api/src/router/namegen/index.ts | 9 +----- packages/tsconfig/package.json | 2 +- packages/ui/package.json | 2 +- pnpm-lock.yaml | 18 ++++++------ 9 files changed, 48 insertions(+), 27 deletions(-) diff --git a/apps/about-me/package.json b/apps/about-me/package.json index 8e254f8..07d48a5 100644 --- a/apps/about-me/package.json +++ b/apps/about-me/package.json @@ -41,7 +41,7 @@ "prisma": "^4.5.0", "tailwind-scrollbar": "^2.0.1", "tailwindcss": "^3.2.0", - "tsconfig": "workspace:*", + "@acme/tsconfig": "workspace:*", "typescript": "^4.8.4" }, "ct3aMetadata": { diff --git a/apps/docs/package.json b/apps/docs/package.json index 3442289..040e107 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -18,7 +18,7 @@ "@babel/core": "^7.0.0", "eslint-config-custom": "workspace:*", "eslint": "7.32.0", - "tsconfig": "workspace:*", + "@acme/tsconfig": "workspace:*", "@types/node": "^17.0.12", "@types/react": "^18.0.22", "@types/react-dom": "^18.0.7", diff --git a/apps/name-generator/package.json b/apps/name-generator/package.json index d6bf009..4a2104c 100644 --- a/apps/name-generator/package.json +++ b/apps/name-generator/package.json @@ -35,6 +35,7 @@ "eslint-config-next": "13.0.4", "postcss": "^8.4.19", "tailwindcss": "^3.2.4", - "typescript": "^4.9.3" + "typescript": "^4.9.3", + "@acme/tsconfig": "workspace:*" } } diff --git a/apps/name-generator/tsconfig.json b/apps/name-generator/tsconfig.json index a97687e..3baae7f 100644 --- a/apps/name-generator/tsconfig.json +++ b/apps/name-generator/tsconfig.json @@ -1,12 +1,37 @@ { - "extends": "../../tsconfig.json", - "exclude": [], + "extends": "@acme/tsconfig/t3.json", "include": [ "next-env.d.ts", - "node_modules/@acme/auth/next-auth.d.ts", "**/*.ts", "**/*.tsx", "**/*.cjs", - "**/*.mjs" - ] + "**/*.mjs", + "node_modules/@acme/auth/next-auth.d.ts" + ], + "exclude": [ + "node_modules" + ], + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@env/*": [ + "src/env/*" + ], + "@pages/*": [ + "src/pages/*" + ], + "@styles/*": [ + "src/styles/*" + ], + "@api/*": [ + "@acme/api/*" + ], + "@public/*": [ + "public/*" + ], + "@components/*": [ + "src/components/*" + ] + } + } } diff --git a/apps/web/package.json b/apps/web/package.json index 77b78ca..c079d16 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -18,7 +18,7 @@ "@babel/core": "^7.0.0", "eslint-config-custom": "workspace:*", "eslint": "7.32.0", - "tsconfig": "workspace:*", + "@acme/tsconfig": "workspace:*", "@types/node": "^17.0.12", "@types/react": "^18.0.22", "@types/react-dom": "^18.0.7", diff --git a/packages/api/src/router/namegen/index.ts b/packages/api/src/router/namegen/index.ts index 53d8e48..af12f53 100644 --- a/packages/api/src/router/namegen/index.ts +++ b/packages/api/src/router/namegen/index.ts @@ -1,11 +1,4 @@ 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!"; - }), +export const nameGenRouter = router ({ }); diff --git a/packages/tsconfig/package.json b/packages/tsconfig/package.json index f4810fc..13be3cf 100644 --- a/packages/tsconfig/package.json +++ b/packages/tsconfig/package.json @@ -1,5 +1,5 @@ { - "name": "tsconfig", + "name": "@acme/tsconfig", "version": "0.0.0", "private": true, "files": [ diff --git a/packages/ui/package.json b/packages/ui/package.json index 17b3a32..25e3604 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -13,7 +13,7 @@ "eslint": "^7.32.0", "eslint-config-custom": "workspace:*", "react": "^18.2.0", - "tsconfig": "workspace:*", + "@acme/tsconfig": "workspace:*", "typescript": "^4.5.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cf60f9e..b0b5e04 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,6 +27,7 @@ importers: apps/about-me: specifiers: + '@acme/tsconfig': workspace:* '@babel/core': ^7.0.0 '@prisma/client': ^4.5.0 '@tanstack/react-query': ^4.10.0 @@ -54,7 +55,6 @@ importers: superjson: 1.9.1 tailwind-scrollbar: ^2.0.1 tailwindcss: ^3.2.0 - tsconfig: workspace:* typescript: ^4.8.4 ui: workspace:* zod: ^3.18.0 @@ -73,6 +73,7 @@ importers: ui: link:../../packages/ui zod: 3.19.1 devDependencies: + '@acme/tsconfig': link:../../packages/tsconfig '@babel/core': 7.20.2 '@types/node': 18.11.9 '@types/react': 18.0.25 @@ -89,11 +90,11 @@ importers: prisma: 4.6.1 tailwind-scrollbar: 2.0.1_tailwindcss@3.2.4 tailwindcss: 3.2.4_postcss@8.4.14 - tsconfig: link:../../packages/tsconfig typescript: 4.8.4 apps/docs: specifiers: + '@acme/tsconfig': workspace:* '@babel/core': ^7.0.0 '@types/node': ^17.0.12 '@types/react': ^18.0.22 @@ -103,7 +104,6 @@ importers: next: 13.0.0 react: 18.2.0 react-dom: 18.2.0 - tsconfig: workspace:* typescript: ^4.5.3 ui: workspace:* dependencies: @@ -112,13 +112,13 @@ importers: react-dom: 18.2.0_react@18.2.0 ui: link:../../packages/ui devDependencies: + '@acme/tsconfig': link:../../packages/tsconfig '@babel/core': 7.20.2 '@types/node': 17.0.45 '@types/react': 18.0.25 '@types/react-dom': 18.0.9 eslint: 7.32.0 eslint-config-custom: link:../../packages/eslint-config-custom - tsconfig: link:../../packages/tsconfig typescript: 4.8.4 apps/name-generator: @@ -127,6 +127,7 @@ importers: '@acme/auth': workspace:* '@acme/db': workspace:* '@acme/tailwind-config': workspace:* + '@acme/tsconfig': workspace:* '@tanstack/react-query': ^4.16.1 '@trpc/client': ^10.1.0 '@trpc/next': ^10.1.0 @@ -162,6 +163,7 @@ importers: react-dom: 18.2.0_react@18.2.0 zod: 3.19.1 devDependencies: + '@acme/tsconfig': link:../../packages/tsconfig '@types/node': 18.11.9 '@types/react': 18.0.25 '@types/react-dom': 18.0.9 @@ -174,6 +176,7 @@ importers: apps/web: specifiers: + '@acme/tsconfig': workspace:* '@babel/core': ^7.0.0 '@types/node': ^17.0.12 '@types/react': ^18.0.22 @@ -183,7 +186,6 @@ importers: next: 13.0.0 react: 18.2.0 react-dom: 18.2.0 - tsconfig: workspace:* typescript: ^4.5.3 ui: workspace:* dependencies: @@ -192,13 +194,13 @@ importers: react-dom: 18.2.0_react@18.2.0 ui: link:../../packages/ui devDependencies: + '@acme/tsconfig': link:../../packages/tsconfig '@babel/core': 7.20.2 '@types/node': 17.0.45 '@types/react': 18.0.25 '@types/react-dom': 18.0.9 eslint: 7.32.0 eslint-config-custom: link:../../packages/eslint-config-custom - tsconfig: link:../../packages/tsconfig typescript: 4.8.4 packages/api: @@ -300,20 +302,20 @@ importers: packages/ui: specifiers: + '@acme/tsconfig': workspace:* '@types/react': ^18.0.17 '@types/react-dom': ^18.0.6 eslint: ^7.32.0 eslint-config-custom: workspace:* react: ^18.2.0 - tsconfig: workspace:* typescript: ^4.5.2 devDependencies: + '@acme/tsconfig': link:../tsconfig '@types/react': 18.0.25 '@types/react-dom': 18.0.9 eslint: 7.32.0 eslint-config-custom: link:../eslint-config-custom react: 18.2.0 - tsconfig: link:../tsconfig typescript: 4.8.4 packages: