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": { "scripts": {
"dev": "next dev", "dev": "next dev",
"build": "next build", "build": "next build",
"generate:types": "payload generate:types", "payload": "payload",
"start": "next start", "start": "next start",
"lint": "next lint" "lint": "next lint"
}, },

View File

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