chore: adds payload script for migrations and type gen

This commit is contained in:
James 2024-03-08 15:23:52 -05:00
parent 40d360127a
commit 5be260a8e8
2 changed files with 9 additions and 8 deletions

View File

@ -5,7 +5,7 @@
"scripts": {
"dev": "next dev",
"build": "next build",
"generate:types": "payload generate:types",
"payload": "payload",
"start": "next start",
"lint": "next lint"
},

View File

@ -11,8 +11,8 @@ export interface Config {
pages: Page;
media: Media;
users: User;
"payload-preferences": PayloadPreference;
"payload-migrations": PayloadMigration;
'payload-preferences': PayloadPreference;
'payload-migrations': PayloadMigration;
};
globals: {};
}
@ -31,8 +31,8 @@ export interface Page {
version: number;
[k: string]: unknown;
}[];
direction: ("ltr" | "rtl") | null;
format: "left" | "start" | "center" | "right" | "end" | "justify" | "";
direction: ('ltr' | 'rtl') | null;
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
indent: number;
version: number;
};
@ -81,7 +81,7 @@ export interface User {
export interface PayloadPreference {
id: string;
user: {
relationTo: "users";
relationTo: 'users';
value: string | User;
};
key?: string | null;
@ -109,6 +109,7 @@ export interface PayloadMigration {
createdAt: string;
}
declare module "payload" {
declare module 'payload' {
export interface GeneratedTypes extends Config {}
}