From b2bc6500a3e145e71cef10078184c2986d0740d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Omar=20L=C3=B3pez?= Date: Thu, 17 Feb 2022 18:11:33 -0700 Subject: [PATCH] Revert "Tweak/gitignore prisma zod (#1905)" (#1906) This reverts commit 15bfeb30d7ce22a44f6dce9a74803a97ef43e2e6. --- apps/web/server/routers/viewer/eventTypes.tsx | 2 +- package.json | 1 - packages/prisma/zod-utils.ts | 18 ------------------ turbo.json | 3 --- 4 files changed, 1 insertion(+), 23 deletions(-) diff --git a/apps/web/server/routers/viewer/eventTypes.tsx b/apps/web/server/routers/viewer/eventTypes.tsx index 53c0dd7508..b6519406d2 100644 --- a/apps/web/server/routers/viewer/eventTypes.tsx +++ b/apps/web/server/routers/viewer/eventTypes.tsx @@ -8,7 +8,7 @@ import { _EventTypeModel, } from "@calcom/prisma/zod"; import { stringOrNumber } from "@calcom/prisma/zod-utils"; -import { createEventTypeInput } from "@calcom/prisma/zod-utils"; +import { createEventTypeInput } from "@calcom/prisma/zod/eventtypeCustom"; import { createProtectedRouter } from "@server/createRouter"; import { viewerRouter } from "@server/routers/viewer"; diff --git a/package.json b/package.json index 604e84734a..6dad566a7e 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,6 @@ "lint": "turbo run lint", "pre-commit": "lint-staged", "prepare": "husky install", - "postinstall": "yarn workspace @calcom/prisma generate-schemas", "start": "turbo run start --scope=\"@calcom/web\"", "test": "turbo run test", "test-playwright": "yarn playwright test", diff --git a/packages/prisma/zod-utils.ts b/packages/prisma/zod-utils.ts index a5cd9f009f..7fb41fb191 100644 --- a/packages/prisma/zod-utils.ts +++ b/packages/prisma/zod-utils.ts @@ -3,8 +3,6 @@ import { z } from "zod"; import { LocationType } from "@calcom/lib/location"; import { slugify } from "@calcom/lib/slugify"; -import { _EventTypeModel } from "./zod/eventtype"; - export const eventTypeLocations = z.array( z.object({ type: z.nativeEnum(LocationType), address: z.string().optional() }) ); @@ -12,19 +10,3 @@ export const eventTypeLocations = z.array( export const eventTypeSlug = z.string().transform((val) => slugify(val.trim())); export const stringToDate = z.string().transform((a) => new Date(a)); export const stringOrNumber = z.union([z.string().transform((v) => parseInt(v, 10)), z.number().int()]); - -const createEventTypeBaseInput = _EventTypeModel - .pick({ - title: true, - slug: true, - description: true, - length: true, - teamId: true, - schedulingType: true, - }) - .refine((data) => (data.teamId ? data.teamId && data.schedulingType : true), { - path: ["schedulingType"], - message: "You must select a scheduling type for team events", - }); - -export const createEventTypeInput = createEventTypeBaseInput; diff --git a/turbo.json b/turbo.json index cfb7b89f25..7b1121aa19 100644 --- a/turbo.json +++ b/turbo.json @@ -54,9 +54,6 @@ ], "outputs": [".next/**"] }, - "@calcom/web#dev": { - "dependsOn": ["@calcom/prisma#build"] - }, "@calcom/web#dx": { "dependsOn": ["@calcom/prisma#dx"] },