From 72d8a16ac221262a3b4c265570baf184dd109400 Mon Sep 17 00:00:00 2001 From: Zhu Zhanyan Date: Mon, 20 May 2024 10:35:01 +0800 Subject: [PATCH] refactor(cms): redirect payload to move generated types to cms directory --- apps/cms/src/payload.config.ts | 2 +- packages/types/src/lib/cms.ts => apps/cms/src/types.ts | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) rename packages/types/src/lib/cms.ts => apps/cms/src/types.ts (96%) diff --git a/apps/cms/src/payload.config.ts b/apps/cms/src/payload.config.ts index 8e628176..63a5afce 100644 --- a/apps/cms/src/payload.config.ts +++ b/apps/cms/src/payload.config.ts @@ -79,7 +79,7 @@ export default buildConfig({ // outputFile: path.resolve(__dirname, "payload-types.ts"), outputFile: path.resolve( __dirname, - "../../../packages/types/src/lib/cms.ts" + "types.ts" ), // overridden by PAYLOAD_TS_OUTPUT_PATH env var }, graphQL: { diff --git a/packages/types/src/lib/cms.ts b/apps/cms/src/types.ts similarity index 96% rename from packages/types/src/lib/cms.ts rename to apps/cms/src/types.ts index 7236123c..ece41843 100644 --- a/packages/types/src/lib/cms.ts +++ b/apps/cms/src/types.ts @@ -1,7 +1,6 @@ /* tslint:disable */ -/* eslint-disable */ /** - * This file was automatically generated by Payload. + * This file was automatically generated by Payload CMS. * DO NOT MODIFY IT BY HAND. Instead, modify your source Payload config, * and re-run `payload generate:types` to regenerate this file. */ @@ -90,7 +89,7 @@ export interface User { name?: string; updatedAt: string; createdAt: string; - email: string; + email?: string; resetPasswordToken?: string; resetPasswordExpiration?: string; salt?: string;