From 5be260a8e85caf499f6a8afa26fa1021e419875d Mon Sep 17 00:00:00 2001 From: James Date: Fri, 8 Mar 2024 15:23:52 -0500 Subject: [PATCH] chore: adds payload script for migrations and type gen --- package.json | 2 +- payload-types.ts | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index cd22073..290cd58 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "dev": "next dev", "build": "next build", - "generate:types": "payload generate:types", + "payload": "payload", "start": "next start", "lint": "next lint" }, diff --git a/payload-types.ts b/payload-types.ts index d8a5d50..37691dc 100644 --- a/payload-types.ts +++ b/payload-types.ts @@ -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 {} -} +} \ No newline at end of file