perf: Use built types for appRouter (#20083)
* perf: Use built types for appRouter * Got it working just for server * Added dependency to turbo.json
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { AppRouter } from "@calcom/trpc/server/routers/_app";
|
||||
import type { AppRouter } from "@calcom/trpc/types/server/routers/_app";
|
||||
|
||||
import { createTRPCReact } from "@trpc/react-query";
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import { useState } from "react";
|
||||
import superjson from "superjson";
|
||||
|
||||
import { ENDPOINTS } from "@calcom/trpc/react/shared";
|
||||
import type { AppRouter } from "@calcom/trpc/server/routers/_app";
|
||||
import type { AppRouter } from "@calcom/trpc/types/server/routers/_app";
|
||||
|
||||
import { httpBatchLink, httpLink, loggerLink, splitLink, TRPCClientError } from "@trpc/client";
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useState } from "react";
|
||||
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import type { AppRouter } from "@calcom/trpc/server/routers/_app";
|
||||
import type { AppRouter } from "@calcom/trpc/types/server/routers/_app";
|
||||
import {
|
||||
Button,
|
||||
Dropdown,
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Schedule } from "@calcom/features/schedules";
|
||||
import { DEFAULT_SCHEDULE } from "@calcom/lib/availability";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import type { AppRouter } from "@calcom/trpc/server/routers/_app";
|
||||
import type { AppRouter } from "@calcom/trpc/types/server/routers/_app";
|
||||
import { Button, Form } from "@calcom/ui";
|
||||
|
||||
import type { TRPCClientErrorLike } from "@trpc/client";
|
||||
|
||||
@@ -14,7 +14,7 @@ import { useDebounce } from "@calcom/lib/hooks/useDebounce";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import type { RouterOutputs } from "@calcom/trpc/react";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import type { AppRouter } from "@calcom/trpc/server/routers/_app";
|
||||
import type { AppRouter } from "@calcom/trpc/types/server/routers/_app";
|
||||
import { Button, Dialog, DialogClose, DialogContent, DialogFooter, Input, Label } from "@calcom/ui";
|
||||
import { Icon } from "@calcom/ui";
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import { fetchUsername } from "@calcom/lib/fetchUsername";
|
||||
import { useDebounce } from "@calcom/lib/hooks/useDebounce";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import type { AppRouter } from "@calcom/trpc/server/routers/_app";
|
||||
import type { AppRouter } from "@calcom/trpc/types/server/routers/_app";
|
||||
import { Button, Dialog, DialogClose, DialogContent, TextField, DialogFooter, Tooltip } from "@calcom/ui";
|
||||
import { Icon } from "@calcom/ui";
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import { Controller, useForm } from "react-hook-form";
|
||||
import { useOrgBranding } from "@calcom/features/ee/organizations/context/provider";
|
||||
import { WEBSITE_URL, IS_SELF_HOSTED } from "@calcom/lib/constants";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import type { AppRouter } from "@calcom/trpc/server/routers/_app";
|
||||
import type { AppRouter } from "@calcom/trpc/types/server/routers/_app";
|
||||
|
||||
import useRouterQuery from "@lib/hooks/useRouterQuery";
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import turndown from "@calcom/lib/turndownService";
|
||||
import { IdentityProvider } from "@calcom/prisma/enums";
|
||||
import type { RouterOutputs } from "@calcom/trpc/react";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import type { AppRouter } from "@calcom/trpc/server/routers/_app";
|
||||
import type { AppRouter } from "@calcom/trpc/types/server/routers/_app";
|
||||
import {
|
||||
Alert,
|
||||
Button,
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
"../types/tanstack-table.d.ts",
|
||||
"../types/next.d.ts",
|
||||
"../types/window.d.ts",
|
||||
"react"
|
||||
"./server"
|
||||
],
|
||||
"exclude": ["**/node_modules/**", "types/router.d.ts"],
|
||||
"exclude": ["**/node_modules/**", "./react", "./server/**/*.test.ts", "./server/**/*.spec.ts"],
|
||||
"compilerOptions": {
|
||||
"isolatedModules": false,
|
||||
"noEmit": false,
|
||||
@@ -32,6 +32,7 @@
|
||||
"experimentalDecorators": true,
|
||||
"declarationMap": false,
|
||||
"resolveJsonModule": true,
|
||||
"outFile": "types/router.d.ts"
|
||||
"declarationDir": "types/server",
|
||||
"moduleResolution": "node"
|
||||
}
|
||||
}
|
||||
|
||||
+4
-2
@@ -183,10 +183,12 @@
|
||||
"outputs": ["dist/**", "build/**"]
|
||||
},
|
||||
"type-check": {
|
||||
"cache": false
|
||||
"cache": false,
|
||||
"dependsOn": ["@calcom/trpc#build"]
|
||||
},
|
||||
"type-check:ci": {
|
||||
"cache": false
|
||||
"cache": false,
|
||||
"dependsOn": ["@calcom/trpc#build"]
|
||||
},
|
||||
"@calcom/prisma#db-reset": {
|
||||
"cache": false,
|
||||
|
||||
Reference in New Issue
Block a user