Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(cms): Redirect Payload CMS generated types to CMS #157

Merged
merged 2 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
/packages/schemas/lib/cms.graphql @jack-thant
/packages/tsconfig/** @chanbakjsd
/packages/types/** @chanbakjsd
/packages/types/lib/cms.ts @jack-thant
/packages/types/lib/merch.ts @chanbakjsd
/packages/ui/** @chanbakjsd

2 changes: 1 addition & 1 deletion apps/cms/src/payload.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
5 changes: 2 additions & 3 deletions packages/types/src/lib/cms.ts → apps/cms/src/types.ts
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down Expand Up @@ -90,7 +89,7 @@ export interface User {
name?: string;
updatedAt: string;
createdAt: string;
email: string;
email?: string;
resetPasswordToken?: string;
resetPasswordExpiration?: string;
salt?: string;
Expand Down
2 changes: 1 addition & 1 deletion apps/cms/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"allowSyntheticDefaultImports": true,
"paths": {
"payload/generated-types": [
"../../packages/types/lib/cms.ts" // Ensure this matches the path to your typescript outputFile
"./src/types.ts" // Ensure this matches the path to your typescript outputFile
]
}
},
Expand Down
Loading