feat!: prebundle payload, ui, richtext-lexical (#6579)

# Breaking Changes

### New file import locations

Exports from the `payload` package have been _significantly_ cleaned up.
Now, just about everything is able to be imported from `payload`
directly, rather than an assortment of subpath exports. This means that
things like `import { buildConfig } from 'payload/config'` are now just
imported via `import { buildConfig } from 'payload'`. The mental model
is significantly simpler for developers, but you might need to update
some of your imports.

Payload now exposes only three exports:

1. `payload` - all types and server-only Payload code
2. `payload/shared` - utilities that can be used in either the browser
or in Node environments
3. `payload/node` - heavy utilities that should only be imported in Node
scripts and never be imported into bundled code like Next.js

### UI library pre-bundling

With this release, we've dramatically sped up the compile time for
Payload by pre-bundling our entire UI package for use inside of the
Payload admin itself. There are new exports that should be used within
Payload custom components:

1. `@payloadcms/ui/client` - all client components 
2. `@payloadcms/ui/server` - all server components

For all of your custom Payload admin UI components, you should be
importing from one of these two pre-compiled barrel files rather than
importing from the more deeply nested exports directly. That will keep
compile times nice and speedy, and will also make sure that the bundled
JS for your admin UI is kept small.

For example, whereas before, if you imported the Payload `Button`, you
would have imported it like this:

```ts
import { Button } from '@payloadcms/ui/elements/Button'
```

Now, you would import it like this:

```ts
import { Button } from '@payloadcms/ui/client'
```

This is a significant DX / performance optimization that we're pretty
pumped about.

However, if you are importing or re-using Payload UI components
_outside_ of the Payload admin UI, for example in your own frontend
apps, you can import from the individual component exports which will
make sure that the bundled JS is kept to a minimum in your frontend
apps. So in your own frontend, you can continue to import directly to
the components that you want to consume rather than importing from the
pre-compiled barrel files.

Individual component exports will now come with their corresponding CSS
and everything will work perfectly as-expected.

### Specific exports have changed

- `'@payloadcms/ui/templates/Default'` and
`'@payloadcms/ui/templates/Minimal`' are now exported from
`'@payloadcms/next/templates'`
- Old: `import { LogOut } from '@payloadcms/ui/icons/LogOut'` new:
`import { LogOutIcon } from '@payloadcms/ui/icons/LogOut'`

## Background info

In effort to make local dev as fast as possible, we need to import as
few files as possible so that the compiler has less to process. One way
we've achieved this in the Admin Panel was to _remove_ all .scss imports
from all components in the `@payloadcms/ui` module using a build
process. This stripped all `import './index.scss'` statements out of
each component before injecting them into `dist`. Instead, it bundles
all of the CSS into a single `main.css` file, and we import _that_ at
the root of the app.

While this concept is _still_ the right solution to the problem, this
particular approach is not viable when using these components outside
the Admin Panel, where not only does this root stylesheet not exist, but
where it would also bloat your app with unused styles. Instead, we need
to _keep_ these .scss imports in place so they are imported directly
alongside your components, as expected. Then, we need create a _new_
build step that _separately_ compiles the components _without_ their
stylesheets—this way your app can consume either as needed from the new
`client` and `server` barrel files within `@payloadcms/ui`, i.e. from
within `@payloadcms/next` and all other admin-specific packages and
plugins.

This way, all other applications will simply import using the direct
file paths, just as they did before. Except now they come with
stylesheets.

And we've gotten a pretty awesome initial compilation performance boost.

---------

Co-authored-by: James <james@trbl.design>
Co-authored-by: Alessio Gravili <alessio@gravili.de>
This commit is contained in:
Jacob Fletcher
2024-06-17 14:25:36 -04:00
committed by GitHub
parent 3b3b1cecc5
commit 9e76c8f4e3
1297 changed files with 9146 additions and 9612 deletions

View File

@@ -1,4 +1,4 @@
import type { CollectionConfig } from 'payload/types'
import type { CollectionConfig } from 'payload'
export const mediaSlug = 'media'

View File

@@ -0,0 +1,16 @@
import React from 'react'
import type { Post } from '../../payload-types.js'
export const MyComponent: React.FC = () => {
const test: Post = {
id: 'string',
createdAt: 'string',
text: 'string',
updatedAt: 'string',
}
console.log({ test })
return <p>hi</p>
}

View File

@@ -1,4 +1,4 @@
import type { CollectionConfig } from 'payload/types'
import type { CollectionConfig } from 'payload'
import { BlocksFeature, lexicalEditor } from '@payloadcms/richtext-lexical'

View File

@@ -1,4 +1,4 @@
import type { GlobalConfig } from 'payload/types'
import type { GlobalConfig } from 'payload'
export const menuSlug = 'menu'

View File

@@ -10,7 +10,7 @@ const { sql } = require('@payloadcms/db-postgres')
// loadTransformers()
async function up({ payload }) {
await payload.db.drizzle.execute(sql`
await payload.db.drizzle.execute(sql`
DO $$ BEGIN
CREATE TYPE "enum_posts_status" AS ENUM('draft', 'published');
@@ -138,12 +138,11 @@ DO $$ BEGIN
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
`);
};
`)
}
async function down({ payload }) {
await payload.db.drizzle.execute(sql`
await payload.db.drizzle.execute(sql`
DROP TABLE "posts";
DROP TABLE "_posts_v";
@@ -152,6 +151,5 @@ DROP TABLE "users";
DROP TABLE "payload_preferences";
DROP TABLE "payload_preferences_rels";
DROP TABLE "payload_migrations";
DROP TABLE "menu";`);
};
DROP TABLE "menu";`)
}

View File

@@ -56,9 +56,7 @@
"indexes": {
"posts_created_at_idx": {
"name": "posts_created_at_idx",
"columns": [
"created_at"
],
"columns": ["created_at"],
"isUnique": false
}
},
@@ -136,30 +134,22 @@
"indexes": {
"_posts_v_version_version_created_at_idx": {
"name": "_posts_v_version_version_created_at_idx",
"columns": [
"version_created_at"
],
"columns": ["version_created_at"],
"isUnique": false
},
"_posts_v_created_at_idx": {
"name": "_posts_v_created_at_idx",
"columns": [
"created_at"
],
"columns": ["created_at"],
"isUnique": false
},
"_posts_v_updated_at_idx": {
"name": "_posts_v_updated_at_idx",
"columns": [
"updated_at"
],
"columns": ["updated_at"],
"isUnique": false
},
"_posts_v_latest_idx": {
"name": "_posts_v_latest_idx",
"columns": [
"latest"
],
"columns": ["latest"],
"isUnique": false
}
},
@@ -205,23 +195,17 @@
"indexes": {
"_posts_v_rels_order_idx": {
"name": "_posts_v_rels_order_idx",
"columns": [
"order"
],
"columns": ["order"],
"isUnique": false
},
"_posts_v_rels_parent_idx": {
"name": "_posts_v_rels_parent_idx",
"columns": [
"parent_id"
],
"columns": ["parent_id"],
"isUnique": false
},
"_posts_v_rels_path_idx": {
"name": "_posts_v_rels_path_idx",
"columns": [
"path"
],
"columns": ["path"],
"isUnique": false
}
},
@@ -230,12 +214,8 @@
"name": "_posts_v_rels_parent_fk",
"tableFrom": "_posts_v_rels",
"tableTo": "_posts_v",
"columnsFrom": [
"parent_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["parent_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -243,12 +223,8 @@
"name": "_posts_v_rels_posts_fk",
"tableFrom": "_posts_v_rels",
"tableTo": "posts",
"columnsFrom": [
"posts_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["posts_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -326,16 +302,12 @@
"indexes": {
"users_created_at_idx": {
"name": "users_created_at_idx",
"columns": [
"created_at"
],
"columns": ["created_at"],
"isUnique": false
},
"users_email_idx": {
"name": "users_email_idx",
"columns": [
"email"
],
"columns": ["email"],
"isUnique": true
}
},
@@ -383,16 +355,12 @@
"indexes": {
"payload_preferences_key_idx": {
"name": "payload_preferences_key_idx",
"columns": [
"key"
],
"columns": ["key"],
"isUnique": false
},
"payload_preferences_created_at_idx": {
"name": "payload_preferences_created_at_idx",
"columns": [
"created_at"
],
"columns": ["created_at"],
"isUnique": false
}
},
@@ -438,23 +406,17 @@
"indexes": {
"payload_preferences_rels_order_idx": {
"name": "payload_preferences_rels_order_idx",
"columns": [
"order"
],
"columns": ["order"],
"isUnique": false
},
"payload_preferences_rels_parent_idx": {
"name": "payload_preferences_rels_parent_idx",
"columns": [
"parent_id"
],
"columns": ["parent_id"],
"isUnique": false
},
"payload_preferences_rels_path_idx": {
"name": "payload_preferences_rels_path_idx",
"columns": [
"path"
],
"columns": ["path"],
"isUnique": false
}
},
@@ -463,12 +425,8 @@
"name": "payload_preferences_rels_parent_fk",
"tableFrom": "payload_preferences_rels",
"tableTo": "payload_preferences",
"columnsFrom": [
"parent_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["parent_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -476,12 +434,8 @@
"name": "payload_preferences_rels_users_fk",
"tableFrom": "payload_preferences_rels",
"tableTo": "users",
"columnsFrom": [
"users_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["users_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -529,9 +483,7 @@
"indexes": {
"payload_migrations_created_at_idx": {
"name": "payload_migrations_created_at_idx",
"columns": [
"created_at"
],
"columns": ["created_at"],
"isUnique": false
}
},

View File

@@ -8,124 +8,123 @@
export interface Config {
collections: {
posts: Post;
users: User;
'payload-preferences': PayloadPreference;
'payload-migrations': PayloadMigration;
};
posts: Post
users: User
'payload-preferences': PayloadPreference
'payload-migrations': PayloadMigration
}
globals: {
menu: Menu;
};
locale: null;
menu: Menu
}
locale: null
user: User & {
collection: 'users';
};
collection: 'users'
}
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "posts".
*/
export interface Post {
id: string;
text?: string | null;
id: string
text?: string | null
richText?: {
root: {
type: string;
type: string
children: {
type: string;
version: number;
[k: string]: unknown;
}[];
direction: ('ltr' | 'rtl') | null;
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
indent: number;
version: number;
};
[k: string]: unknown;
} | null;
type: string
version: number
[k: string]: unknown
}[]
direction: ('ltr' | 'rtl') | null
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | ''
indent: number
version: number
}
[k: string]: unknown
} | null
richText2?: {
root: {
type: string;
type: string
children: {
type: string;
version: number;
[k: string]: unknown;
}[];
direction: ('ltr' | 'rtl') | null;
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
indent: number;
version: number;
};
[k: string]: unknown;
} | null;
updatedAt: string;
createdAt: string;
_status?: ('draft' | 'published') | null;
type: string
version: number
[k: string]: unknown
}[]
direction: ('ltr' | 'rtl') | null
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | ''
indent: number
version: number
}
[k: string]: unknown
} | null
updatedAt: string
createdAt: string
_status?: ('draft' | 'published') | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "users".
*/
export interface User {
id: string;
updatedAt: string;
createdAt: string;
email: string;
resetPasswordToken?: string | null;
resetPasswordExpiration?: string | null;
salt?: string | null;
hash?: string | null;
loginAttempts?: number | null;
lockUntil?: string | null;
password?: string | null;
id: string
updatedAt: string
createdAt: string
email: string
resetPasswordToken?: string | null
resetPasswordExpiration?: string | null
salt?: string | null
hash?: string | null
loginAttempts?: number | null
lockUntil?: string | null
password?: string | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-preferences".
*/
export interface PayloadPreference {
id: string;
id: string
user: {
relationTo: 'users';
value: string | User;
};
key?: string | null;
relationTo: 'users'
value: string | User
}
key?: string | null
value?:
| {
[k: string]: unknown;
[k: string]: unknown
}
| unknown[]
| string
| number
| boolean
| null;
updatedAt: string;
createdAt: string;
| null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-migrations".
*/
export interface PayloadMigration {
id: string;
name?: string | null;
batch?: number | null;
updatedAt: string;
createdAt: string;
id: string
name?: string | null
batch?: number | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "menu".
*/
export interface Menu {
id: string;
globalText?: string | null;
updatedAt?: string | null;
createdAt?: string | null;
id: string
globalText?: string | null
updatedAt?: string | null
createdAt?: string | null
}
declare module 'payload' {
// @ts-ignore
// @ts-ignore
export interface GeneratedTypes extends Config {}
}
}

View File

@@ -12,7 +12,13 @@ type Query {
meUser: usersMe
initializedUser: Boolean
PayloadPreference(id: String!, draft: Boolean): PayloadPreference
PayloadPreferences(draft: Boolean, where: PayloadPreference_where, limit: Int, page: Int, sort: String): PayloadPreferences
PayloadPreferences(
draft: Boolean
where: PayloadPreference_where
limit: Int
page: Int
sort: String
): PayloadPreferences
countPayloadPreferences(draft: Boolean, where: PayloadPreference_where): countPayloadPreferences
docAccessPayloadPreference(id: String!): payload_preferencesDocAccess
Menu(draft: Boolean): Menu
@@ -33,7 +39,8 @@ type Post {
"""
The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).
"""
scalar JSON @specifiedBy(url: "http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf")
scalar JSON
@specifiedBy(url: "http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf")
"""
A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.
@@ -337,7 +344,8 @@ type PostsCreateDocAccess {
"""
The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).
"""
scalar JSONObject @specifiedBy(url: "http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf")
scalar JSONObject
@specifiedBy(url: "http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf")
type PostsReadDocAccess {
permission: Boolean!
@@ -572,7 +580,8 @@ type User {
"""
A field whose value conforms to the standard internet email address format as specified in HTML Spec: https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address.
"""
scalar EmailAddress @specifiedBy(url: "https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address")
scalar EmailAddress
@specifiedBy(url: "https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address")
type Users {
docs: [User]
@@ -1765,7 +1774,12 @@ type Mutation {
resetPasswordUser(password: String, token: String): usersResetPassword
verifyEmailUser(token: String): Boolean
createPayloadPreference(data: mutationPayloadPreferenceInput!, draft: Boolean): PayloadPreference
updatePayloadPreference(id: String!, autosave: Boolean, data: mutationPayloadPreferenceUpdateInput!, draft: Boolean): PayloadPreference
updatePayloadPreference(
id: String!
autosave: Boolean
data: mutationPayloadPreferenceUpdateInput!
draft: Boolean
): PayloadPreference
deletePayloadPreference(id: String!): PayloadPreference
duplicatePayloadPreference(id: String!): PayloadPreference
updateMenu(data: mutationMenuInput!, draft: Boolean): Menu

View File

@@ -1,3 +1,3 @@
{
"extends": "../tsconfig.json",
"extends": "../tsconfig.json"
}

View File

@@ -2,7 +2,7 @@ import { fileURLToPath } from 'node:url'
import path from 'path'
const filename = fileURLToPath(import.meta.url)
const dirname = path.dirname(filename)
import type { FieldAccess } from 'payload/types'
import type { FieldAccess } from 'payload'
import { buildConfigWithDefaults } from '../buildConfigWithDefaults.js'
import { devUser } from '../credentials.js'

View File

@@ -1,5 +1,5 @@
import type { BrowserContext, Page } from '@playwright/test'
import type { TypeWithID } from 'payload/types'
import type { TypeWithID } from 'payload'
import { expect, test } from '@playwright/test'
import { devUser } from 'credentials.js'

View File

@@ -1,6 +1,6 @@
import type { Payload, PayloadRequestWithData } from 'payload/types'
import type { Payload, PayloadRequestWithData } from 'payload'
import { Forbidden } from 'payload/errors'
import { Forbidden } from 'payload'
import type { Post, RelyOnRequestHeader, Restricted } from './payload-types.js'

View File

@@ -8,326 +8,325 @@
export interface Config {
collections: {
users: User;
'non-admin-user': NonAdminUser;
posts: Post;
unrestricted: Unrestricted;
'fully-restricted': FullyRestricted;
'read-only-collection': ReadOnlyCollection;
'user-restricted-collection': UserRestrictedCollection;
'create-not-update-collection': CreateNotUpdateCollection;
'restricted-versions': RestrictedVersion;
'sibling-data': SiblingDatum;
'rely-on-request-headers': RelyOnRequestHeader;
'doc-level-access': DocLevelAccess;
'hidden-fields': HiddenField;
'hidden-access': HiddenAccess;
'hidden-access-count': HiddenAccessCount;
'payload-preferences': PayloadPreference;
'payload-migrations': PayloadMigration;
};
users: User
'non-admin-user': NonAdminUser
posts: Post
unrestricted: Unrestricted
'fully-restricted': FullyRestricted
'read-only-collection': ReadOnlyCollection
'user-restricted-collection': UserRestrictedCollection
'create-not-update-collection': CreateNotUpdateCollection
'restricted-versions': RestrictedVersion
'sibling-data': SiblingDatum
'rely-on-request-headers': RelyOnRequestHeader
'doc-level-access': DocLevelAccess
'hidden-fields': HiddenField
'hidden-access': HiddenAccess
'hidden-access-count': HiddenAccessCount
'payload-preferences': PayloadPreference
'payload-migrations': PayloadMigration
}
globals: {
settings: Setting;
test: Test;
'read-only-global': ReadOnlyGlobal;
'user-restricted-global': UserRestrictedGlobal;
'read-not-update-global': ReadNotUpdateGlobal;
};
locale: null;
settings: Setting
test: Test
'read-only-global': ReadOnlyGlobal
'user-restricted-global': UserRestrictedGlobal
'read-not-update-global': ReadNotUpdateGlobal
}
locale: null
user:
| (User & {
collection: 'users';
collection: 'users'
})
| (NonAdminUser & {
collection: 'non-admin-user';
});
collection: 'non-admin-user'
})
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "users".
*/
export interface User {
id: string;
roles?: ('admin' | 'user')[] | null;
updatedAt: string;
createdAt: string;
email: string;
resetPasswordToken?: string | null;
resetPasswordExpiration?: string | null;
salt?: string | null;
hash?: string | null;
loginAttempts?: number | null;
lockUntil?: string | null;
password?: string | null;
id: string
roles?: ('admin' | 'user')[] | null
updatedAt: string
createdAt: string
email: string
resetPasswordToken?: string | null
resetPasswordExpiration?: string | null
salt?: string | null
hash?: string | null
loginAttempts?: number | null
lockUntil?: string | null
password?: string | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "non-admin-user".
*/
export interface NonAdminUser {
id: string;
updatedAt: string;
createdAt: string;
email: string;
resetPasswordToken?: string | null;
resetPasswordExpiration?: string | null;
salt?: string | null;
hash?: string | null;
loginAttempts?: number | null;
lockUntil?: string | null;
password?: string | null;
id: string
updatedAt: string
createdAt: string
email: string
resetPasswordToken?: string | null
resetPasswordExpiration?: string | null
salt?: string | null
hash?: string | null
loginAttempts?: number | null
lockUntil?: string | null
password?: string | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "posts".
*/
export interface Post {
id: string;
restrictedField?: string | null;
id: string
restrictedField?: string | null
group?: {
restrictedGroupText?: string | null;
};
restrictedRowText?: string | null;
restrictedCollapsibleText?: string | null;
updatedAt: string;
createdAt: string;
restrictedGroupText?: string | null
}
restrictedRowText?: string | null
restrictedCollapsibleText?: string | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "unrestricted".
*/
export interface Unrestricted {
id: string;
name?: string | null;
userRestrictedDocs?: (string | UserRestrictedCollection)[] | null;
createNotUpdateDocs?: (string | CreateNotUpdateCollection)[] | null;
updatedAt: string;
createdAt: string;
id: string
name?: string | null
userRestrictedDocs?: (string | UserRestrictedCollection)[] | null
createNotUpdateDocs?: (string | CreateNotUpdateCollection)[] | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "user-restricted-collection".
*/
export interface UserRestrictedCollection {
id: string;
name?: string | null;
updatedAt: string;
createdAt: string;
id: string
name?: string | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "create-not-update-collection".
*/
export interface CreateNotUpdateCollection {
id: string;
name?: string | null;
updatedAt: string;
createdAt: string;
id: string
name?: string | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "fully-restricted".
*/
export interface FullyRestricted {
id: string;
name?: string | null;
updatedAt: string;
createdAt: string;
id: string
name?: string | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "read-only-collection".
*/
export interface ReadOnlyCollection {
id: string;
name?: string | null;
updatedAt: string;
createdAt: string;
id: string
name?: string | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "restricted-versions".
*/
export interface RestrictedVersion {
id: string;
name?: string | null;
hidden?: boolean | null;
updatedAt: string;
createdAt: string;
id: string
name?: string | null
hidden?: boolean | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "sibling-data".
*/
export interface SiblingDatum {
id: string;
id: string
array?:
| {
allowPublicReadability?: boolean | null;
text?: string | null;
id?: string | null;
allowPublicReadability?: boolean | null
text?: string | null
id?: string | null
}[]
| null;
updatedAt: string;
createdAt: string;
| null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "rely-on-request-headers".
*/
export interface RelyOnRequestHeader {
id: string;
name?: string | null;
updatedAt: string;
createdAt: string;
id: string
name?: string | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "doc-level-access".
*/
export interface DocLevelAccess {
id: string;
approvedForRemoval?: boolean | null;
approvedTitle?: string | null;
lockTitle?: boolean | null;
updatedAt: string;
createdAt: string;
id: string
approvedForRemoval?: boolean | null
approvedTitle?: string | null
lockTitle?: boolean | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "hidden-fields".
*/
export interface HiddenField {
id: string;
title?: string | null;
id: string
title?: string | null
partiallyHiddenGroup?: {
name?: string | null;
value?: string | null;
};
name?: string | null
value?: string | null
}
partiallyHiddenArray?:
| {
name?: string | null;
value?: string | null;
id?: string | null;
name?: string | null
value?: string | null
id?: string | null
}[]
| null;
hidden?: boolean | null;
updatedAt: string;
createdAt: string;
| null
hidden?: boolean | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "hidden-access".
*/
export interface HiddenAccess {
id: string;
title: string;
hidden?: boolean | null;
updatedAt: string;
createdAt: string;
id: string
title: string
hidden?: boolean | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "hidden-access-count".
*/
export interface HiddenAccessCount {
id: string;
title: string;
hidden?: boolean | null;
updatedAt: string;
createdAt: string;
id: string
title: string
hidden?: boolean | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-preferences".
*/
export interface PayloadPreference {
id: string;
id: string
user:
| {
relationTo: 'users';
value: string | User;
relationTo: 'users'
value: string | User
}
| {
relationTo: 'non-admin-user';
value: string | NonAdminUser;
};
key?: string | null;
relationTo: 'non-admin-user'
value: string | NonAdminUser
}
key?: string | null
value?:
| {
[k: string]: unknown;
[k: string]: unknown
}
| unknown[]
| string
| number
| boolean
| null;
updatedAt: string;
createdAt: string;
| null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-migrations".
*/
export interface PayloadMigration {
id: string;
name?: string | null;
batch?: number | null;
updatedAt: string;
createdAt: string;
id: string
name?: string | null
batch?: number | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "settings".
*/
export interface Setting {
id: string;
test?: boolean | null;
updatedAt?: string | null;
createdAt?: string | null;
id: string
test?: boolean | null
updatedAt?: string | null
createdAt?: string | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "test".
*/
export interface Test {
id: string;
updatedAt?: string | null;
createdAt?: string | null;
id: string
updatedAt?: string | null
createdAt?: string | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "read-only-global".
*/
export interface ReadOnlyGlobal {
id: string;
name?: string | null;
updatedAt?: string | null;
createdAt?: string | null;
id: string
name?: string | null
updatedAt?: string | null
createdAt?: string | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "user-restricted-global".
*/
export interface UserRestrictedGlobal {
id: string;
name?: string | null;
updatedAt?: string | null;
createdAt?: string | null;
id: string
name?: string | null
updatedAt?: string | null
createdAt?: string | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "read-not-update-global".
*/
export interface ReadNotUpdateGlobal {
id: string;
name?: string | null;
updatedAt?: string | null;
createdAt?: string | null;
id: string
name?: string | null
updatedAt?: string | null
createdAt?: string | null
}
declare module 'payload' {
// @ts-ignore
// @ts-ignore
export interface GeneratedTypes extends Config {}
}
}

View File

@@ -1,3 +1,3 @@
{
"extends": "../tsconfig.json",
"extends": "../tsconfig.json"
}

View File

@@ -1,4 +1,4 @@
import type { CollectionConfig } from 'payload/types'
import type { CollectionConfig } from 'payload'
export const CustomIdRow: CollectionConfig = {
slug: 'customIdRow',

View File

@@ -1,4 +1,4 @@
import type { CollectionConfig } from 'payload/types'
import type { CollectionConfig } from 'payload'
export const CustomIdTab: CollectionConfig = {
slug: 'customIdTab',

View File

@@ -1,4 +1,4 @@
import type { CollectionConfig } from 'payload/types'
import type { CollectionConfig } from 'payload'
import { CustomEditView } from '../components/views/CustomEdit/index.js'
import { customViews1CollectionSlug } from '../slugs.js'

View File

@@ -1,4 +1,4 @@
import type { CollectionConfig } from 'payload/types'
import type { CollectionConfig } from 'payload'
import { CustomTabComponent } from '../components/CustomTabComponent/index.js'
import { CustomTabComponentView } from '../components/views/CustomTabComponent/index.js'

View File

@@ -1,4 +1,4 @@
import type { CollectionConfig } from 'payload/types'
import type { CollectionConfig } from 'payload'
import { disableDuplicateSlug } from '../slugs.js'

View File

@@ -1,4 +1,4 @@
import type { CollectionConfig } from 'payload/types'
import type { CollectionConfig } from 'payload'
import { CollectionAPIButton } from '../components/CollectionAPIButton/index.js'
import { CollectionEditButton } from '../components/CollectionEditButton/index.js'

View File

@@ -1,4 +1,4 @@
import type { CollectionConfig } from 'payload/types'
import type { CollectionConfig } from 'payload'
import { group1Collection1Slug } from '../slugs.js'

View File

@@ -1,4 +1,4 @@
import type { CollectionConfig } from 'payload/types'
import type { CollectionConfig } from 'payload'
import { group1Collection2Slug } from '../slugs.js'

View File

@@ -1,4 +1,4 @@
import type { CollectionConfig } from 'payload/types'
import type { CollectionConfig } from 'payload'
import { group2Collection1Slug } from '../slugs.js'

View File

@@ -1,4 +1,4 @@
import type { CollectionConfig } from 'payload/types'
import type { CollectionConfig } from 'payload'
import { group2Collection2Slug } from '../slugs.js'

View File

@@ -1,4 +1,4 @@
import type { CollectionConfig } from 'payload/types'
import type { CollectionConfig } from 'payload'
import { hiddenCollectionSlug } from '../slugs.js'

View File

@@ -1,4 +1,4 @@
import type { CollectionConfig } from 'payload/types'
import type { CollectionConfig } from 'payload'
import { noApiViewCollectionSlug } from '../slugs.js'

View File

@@ -1,4 +1,4 @@
import type { CollectionConfig } from 'payload/types'
import type { CollectionConfig } from 'payload'
import { slateEditor } from '@payloadcms/richtext-slate'

View File

@@ -1,4 +1,4 @@
import type { CollectionConfig } from 'payload/types'
import type { CollectionConfig } from 'payload'
import { uploadCollectionSlug } from '../slugs.js'

View File

@@ -1,4 +1,4 @@
import type { CollectionConfig } from 'payload/types'
import type { CollectionConfig } from 'payload'
import { usersCollectionSlug } from '../slugs.js'

View File

@@ -1,4 +1,4 @@
import type { SanitizedConfig } from 'payload/types'
import type { SanitizedConfig } from 'payload'
import React from 'react'

View File

@@ -1,4 +1,4 @@
import type { SanitizedConfig } from 'payload/types'
import type { SanitizedConfig } from 'payload'
import React from 'react'

View File

@@ -1,6 +1,6 @@
'use client'
import type { SanitizedConfig } from 'payload/types'
import type { SanitizedConfig } from 'payload'
import { useConfig } from '@payloadcms/ui/providers/Config'
import LinkImport from 'next/link.js'

View File

@@ -1,6 +1,6 @@
'use client'
import type { SanitizedConfig } from 'payload/types'
import type { SanitizedConfig } from 'payload'
import { useTranslation } from '@payloadcms/ui/providers/Translation'
import React from 'react'

View File

@@ -1,4 +1,4 @@
import type { CustomComponent } from 'payload/config'
import type { CustomComponent } from 'payload'
import React from 'react'

View File

@@ -1,4 +1,4 @@
import type { CustomComponent } from 'payload/config'
import type { CustomComponent } from 'payload'
import React from 'react'

View File

@@ -1,4 +1,4 @@
import type { CustomComponent } from 'payload/config'
import type { CustomComponent } from 'payload'
import React from 'react'

View File

@@ -1,5 +1,5 @@
'use client'
import type { CellComponentProps } from 'payload/types'
import type { CellComponentProps } from 'payload'
import { useTableCell } from '@payloadcms/ui/elements/Table'
import React from 'react'

View File

@@ -1,4 +1,4 @@
import type { DocumentTabComponent } from 'payload/types'
import type { DocumentTabComponent } from 'payload'
import React from 'react'

View File

@@ -1,5 +1,5 @@
'use client'
import type { DescriptionComponent } from 'payload/types'
import type { DescriptionComponent } from 'payload'
import { useFieldProps } from '@payloadcms/ui/forms/FieldPropsProvider'
import { useFormFields } from '@payloadcms/ui/forms/Form'

View File

@@ -1,6 +1,6 @@
'use client'
import { LogOut } from '@payloadcms/ui/icons/LogOut'
import { LogOutIcon } from '@payloadcms/ui/icons/LogOut'
import { useConfig } from '@payloadcms/ui/providers/Config'
import React from 'react'
@@ -15,7 +15,7 @@ export const Logout: React.FC = () => {
return (
<a href={`${admin}${logoutRoute}#custom`}>
<LogOut />
<LogOutIcon />
</a>
)
}

View File

@@ -1,4 +1,4 @@
import type { AdminViewComponent } from 'payload/types'
import type { AdminViewComponent } from 'payload'
import React, { Fragment } from 'react'

View File

@@ -1,4 +1,4 @@
import type { AdminViewComponent } from 'payload/types'
import type { AdminViewComponent } from 'payload'
import React, { Fragment } from 'react'

View File

@@ -1,11 +1,11 @@
import { DefaultTemplate } from '@payloadcms/ui/templates/Default'
import { DefaultTemplate } from '@payloadcms/next/templates'
import LinkImport from 'next/link.js'
import { redirect } from 'next/navigation.js'
import React from 'react'
const Link = (LinkImport.default || LinkImport) as unknown as typeof LinkImport.default
import type { AdminViewProps } from 'payload/types'
import type { AdminViewProps } from 'payload'
import { Button } from '@payloadcms/ui/elements/Button'
import { SetStepNav } from '@payloadcms/ui/elements/StepNav'

View File

@@ -1,4 +1,4 @@
import type { EditViewComponent } from 'payload/types'
import type { EditViewComponent } from 'payload'
import { SetStepNav } from '@payloadcms/ui/elements/StepNav'
import { notFound, redirect } from 'next/navigation.js'

View File

@@ -10,10 +10,10 @@ const Link = (LinkImport.default || LinkImport) as unknown as typeof LinkImport.
// import { Button } from 'payload/components/elements';
// import { useConfig } from 'payload/components/utilities';
import { Button } from '@payloadcms/ui/elements/Button'
import { MinimalTemplate } from '@payloadcms/ui/templates/Minimal'
import type { AdminViewProps } from 'payload'
import type { AdminViewProps } from '../../../../../packages/payload/types.js'
import { MinimalTemplate } from '@payloadcms/next/templates'
import { Button } from '@payloadcms/ui/elements/Button'
import { customViewPath } from '../../../shared.js'
import './index.scss'

View File

@@ -1,4 +1,4 @@
import type { EditViewComponent } from 'payload/types'
import type { EditViewComponent } from 'payload'
import { SetStepNav } from '@payloadcms/ui/elements/StepNav'
import { notFound } from 'next/navigation.js'

View File

@@ -1,4 +1,4 @@
import type { EditViewComponent } from 'payload/types'
import type { EditViewComponent } from 'payload'
import { SetStepNav } from '@payloadcms/ui/elements/StepNav'
import { notFound } from 'next/navigation.js'

View File

@@ -1,4 +1,4 @@
import type { AdminViewProps } from 'payload/types'
import type { AdminViewProps } from 'payload'
import React from 'react'

View File

@@ -1,4 +1,4 @@
import type { EditViewComponent } from 'payload/types'
import type { EditViewComponent } from 'payload'
import { SetStepNav } from '@payloadcms/ui/elements/StepNav'
import { notFound, redirect } from 'next/navigation.js'

View File

@@ -1,4 +1,4 @@
import type { AdminViewProps } from 'payload/types'
import type { AdminViewProps } from 'payload'
import LinkImport from 'next/link.js'
import React from 'react'

View File

@@ -1,10 +1,9 @@
import type { Page } from '@playwright/test'
import { expect, test } from '@playwright/test'
import { wait } from 'payload/utilities'
import { wait } from 'payload/shared'
import type { Geo, Post } from '../../payload-types.js'
import type { Config } from '../../payload-types.js'
import type { Config, Geo, Post } from '../../payload-types.js'
import {
checkBreadcrumb,

View File

@@ -1,12 +1,11 @@
import type { Page } from '@playwright/test'
import { expect, test } from '@playwright/test'
import { wait } from 'payload/utilities'
import { mapAsync } from 'payload/utilities'
import { mapAsync } from 'payload'
import { wait } from 'payload/shared'
import qs from 'qs'
import type { Geo, Post } from '../../payload-types.js'
import type { Config } from '../../payload-types.js'
import type { Config, Geo, Post } from '../../payload-types.js'
import {
ensureAutoLoginAndCompilationIsDone,

View File

@@ -1,4 +1,4 @@
import type { GlobalConfig } from 'payload/types'
import type { GlobalConfig } from 'payload'
import { CustomEditView } from '../components/views/CustomEdit/index.js'
import { customGlobalViews1GlobalSlug } from '../slugs.js'

View File

@@ -1,4 +1,4 @@
import type { GlobalConfig } from 'payload/types'
import type { GlobalConfig } from 'payload'
import { CustomTabComponent } from '../components/CustomTabComponent/index.js'
import { CustomDefaultEditView } from '../components/views/CustomEditDefault/index.js'

View File

@@ -1,4 +1,4 @@
import type { GlobalConfig } from 'payload/types'
import type { GlobalConfig } from 'payload'
import { GlobalAPIButton } from '../components/GlobalAPIButton/index.js'
import { GlobalEditButton } from '../components/GlobalEditButton/index.js'

View File

@@ -1,4 +1,4 @@
import type { GlobalConfig } from 'payload/types'
import type { GlobalConfig } from 'payload'
import { group1GlobalSlug } from '../slugs.js'

View File

@@ -1,4 +1,4 @@
import type { GlobalConfig } from 'payload/types'
import type { GlobalConfig } from 'payload'
import { group2GlobalSlug } from '../slugs.js'

View File

@@ -1,4 +1,4 @@
import type { GlobalConfig } from 'payload/types'
import type { GlobalConfig } from 'payload'
import { hiddenGlobalSlug } from '../slugs.js'

View File

@@ -1,4 +1,4 @@
import type { GlobalConfig } from 'payload/types'
import type { GlobalConfig } from 'payload'
import { noApiViewGlobalSlug } from '../slugs.js'

View File

@@ -8,338 +8,337 @@
export interface Config {
collections: {
uploads: Upload;
posts: Post;
users: User;
'hidden-collection': HiddenCollection;
'collection-no-api-view': CollectionNoApiView;
'custom-views-one': CustomViewsOne;
'custom-views-two': CustomViewsTwo;
'group-one-collection-ones': GroupOneCollectionOne;
'group-one-collection-twos': GroupOneCollectionTwo;
'group-two-collection-ones': GroupTwoCollectionOne;
'group-two-collection-twos': GroupTwoCollectionTwo;
geo: Geo;
customIdTab: CustomIdTab;
customIdRow: CustomIdRow;
'disable-duplicate': DisableDuplicate;
'payload-preferences': PayloadPreference;
'payload-migrations': PayloadMigration;
};
uploads: Upload
posts: Post
users: User
'hidden-collection': HiddenCollection
'collection-no-api-view': CollectionNoApiView
'custom-views-one': CustomViewsOne
'custom-views-two': CustomViewsTwo
'group-one-collection-ones': GroupOneCollectionOne
'group-one-collection-twos': GroupOneCollectionTwo
'group-two-collection-ones': GroupTwoCollectionOne
'group-two-collection-twos': GroupTwoCollectionTwo
geo: Geo
customIdTab: CustomIdTab
customIdRow: CustomIdRow
'disable-duplicate': DisableDuplicate
'payload-preferences': PayloadPreference
'payload-migrations': PayloadMigration
}
globals: {
'hidden-global': HiddenGlobal;
'global-no-api-view': GlobalNoApiView;
global: Global;
'custom-global-views-one': CustomGlobalViewsOne;
'custom-global-views-two': CustomGlobalViewsTwo;
'group-globals-one': GroupGlobalsOne;
'group-globals-two': GroupGlobalsTwo;
};
locale: 'es' | 'en';
'hidden-global': HiddenGlobal
'global-no-api-view': GlobalNoApiView
global: Global
'custom-global-views-one': CustomGlobalViewsOne
'custom-global-views-two': CustomGlobalViewsTwo
'group-globals-one': GroupGlobalsOne
'group-globals-two': GroupGlobalsTwo
}
locale: 'es' | 'en'
user: User & {
collection: 'users';
};
collection: 'users'
}
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "uploads".
*/
export interface Upload {
id: string;
title?: string | null;
updatedAt: string;
createdAt: string;
url?: string | null;
thumbnailURL?: string | null;
filename?: string | null;
mimeType?: string | null;
filesize?: number | null;
width?: number | null;
height?: number | null;
focalX?: number | null;
focalY?: number | null;
id: string
title?: string | null
updatedAt: string
createdAt: string
url?: string | null
thumbnailURL?: string | null
filename?: string | null
mimeType?: string | null
filesize?: number | null
width?: number | null
height?: number | null
focalX?: number | null
focalY?: number | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "posts".
*/
export interface Post {
id: string;
title?: string | null;
description?: string | null;
number?: number | null;
id: string
title?: string | null
description?: string | null
number?: number | null
richText?:
| {
[k: string]: unknown;
[k: string]: unknown
}[]
| null;
| null
group?: {
title?: string | null;
};
relationship?: (string | null) | Post;
customCell?: string | null;
sidebarField?: string | null;
descriptionAsString?: string | null;
descriptionAsFunction?: string | null;
descriptionAsComponent?: string | null;
updatedAt: string;
createdAt: string;
_status?: ('draft' | 'published') | null;
title?: string | null
}
relationship?: (string | null) | Post
customCell?: string | null
sidebarField?: string | null
descriptionAsString?: string | null
descriptionAsFunction?: string | null
descriptionAsComponent?: string | null
updatedAt: string
createdAt: string
_status?: ('draft' | 'published') | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "users".
*/
export interface User {
id: string;
textField?: string | null;
sidebarField?: string | null;
updatedAt: string;
createdAt: string;
email: string;
resetPasswordToken?: string | null;
resetPasswordExpiration?: string | null;
salt?: string | null;
hash?: string | null;
loginAttempts?: number | null;
lockUntil?: string | null;
password?: string | null;
id: string
textField?: string | null
sidebarField?: string | null
updatedAt: string
createdAt: string
email: string
resetPasswordToken?: string | null
resetPasswordExpiration?: string | null
salt?: string | null
hash?: string | null
loginAttempts?: number | null
lockUntil?: string | null
password?: string | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "hidden-collection".
*/
export interface HiddenCollection {
id: string;
title?: string | null;
updatedAt: string;
createdAt: string;
id: string
title?: string | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "collection-no-api-view".
*/
export interface CollectionNoApiView {
id: string;
updatedAt: string;
createdAt: string;
id: string
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "custom-views-one".
*/
export interface CustomViewsOne {
id: string;
title?: string | null;
updatedAt: string;
createdAt: string;
id: string
title?: string | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "custom-views-two".
*/
export interface CustomViewsTwo {
id: string;
title?: string | null;
updatedAt: string;
createdAt: string;
id: string
title?: string | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "group-one-collection-ones".
*/
export interface GroupOneCollectionOne {
id: string;
title?: string | null;
updatedAt: string;
createdAt: string;
id: string
title?: string | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "group-one-collection-twos".
*/
export interface GroupOneCollectionTwo {
id: string;
title?: string | null;
updatedAt: string;
createdAt: string;
id: string
title?: string | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "group-two-collection-ones".
*/
export interface GroupTwoCollectionOne {
id: string;
title?: string | null;
updatedAt: string;
createdAt: string;
id: string
title?: string | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "group-two-collection-twos".
*/
export interface GroupTwoCollectionTwo {
id: string;
title?: string | null;
updatedAt: string;
createdAt: string;
id: string
title?: string | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "geo".
*/
export interface Geo {
id: string;
id: string
/**
* @minItems 2
* @maxItems 2
*/
point?: [number, number] | null;
updatedAt: string;
createdAt: string;
point?: [number, number] | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "customIdTab".
*/
export interface CustomIdTab {
id: string | null;
title?: string | null;
description?: string | null;
number?: number | null;
updatedAt: string;
createdAt: string;
id: string | null
title?: string | null
description?: string | null
number?: number | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "customIdRow".
*/
export interface CustomIdRow {
id: string | null;
title?: string | null;
description?: string | null;
number?: number | null;
updatedAt: string;
createdAt: string;
id: string | null
title?: string | null
description?: string | null
number?: number | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "disable-duplicate".
*/
export interface DisableDuplicate {
id: string;
title?: string | null;
updatedAt: string;
createdAt: string;
id: string
title?: string | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-preferences".
*/
export interface PayloadPreference {
id: string;
id: string
user: {
relationTo: 'users';
value: string | User;
};
key?: string | null;
relationTo: 'users'
value: string | User
}
key?: string | null
value?:
| {
[k: string]: unknown;
[k: string]: unknown
}
| unknown[]
| string
| number
| boolean
| null;
updatedAt: string;
createdAt: string;
| null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-migrations".
*/
export interface PayloadMigration {
id: string;
name?: string | null;
batch?: number | null;
updatedAt: string;
createdAt: string;
id: string
name?: string | null
batch?: number | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "hidden-global".
*/
export interface HiddenGlobal {
id: string;
title?: string | null;
updatedAt?: string | null;
createdAt?: string | null;
id: string
title?: string | null
updatedAt?: string | null
createdAt?: string | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "global-no-api-view".
*/
export interface GlobalNoApiView {
id: string;
updatedAt?: string | null;
createdAt?: string | null;
id: string
updatedAt?: string | null
createdAt?: string | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "global".
*/
export interface Global {
id: string;
title?: string | null;
sidebarField?: string | null;
_status?: ('draft' | 'published') | null;
updatedAt?: string | null;
createdAt?: string | null;
id: string
title?: string | null
sidebarField?: string | null
_status?: ('draft' | 'published') | null
updatedAt?: string | null
createdAt?: string | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "custom-global-views-one".
*/
export interface CustomGlobalViewsOne {
id: string;
title?: string | null;
updatedAt?: string | null;
createdAt?: string | null;
id: string
title?: string | null
updatedAt?: string | null
createdAt?: string | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "custom-global-views-two".
*/
export interface CustomGlobalViewsTwo {
id: string;
title?: string | null;
updatedAt?: string | null;
createdAt?: string | null;
id: string
title?: string | null
updatedAt?: string | null
createdAt?: string | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "group-globals-one".
*/
export interface GroupGlobalsOne {
id: string;
title?: string | null;
updatedAt?: string | null;
createdAt?: string | null;
id: string
title?: string | null
updatedAt?: string | null
createdAt?: string | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "group-globals-two".
*/
export interface GroupGlobalsTwo {
id: string;
title?: string | null;
updatedAt?: string | null;
createdAt?: string | null;
id: string
title?: string | null
updatedAt?: string | null
createdAt?: string | null
}
declare module 'payload' {
// @ts-ignore
// @ts-ignore
export interface GeneratedTypes extends Config {}
}
}

View File

@@ -1,3 +1,3 @@
{
"extends": "../tsconfig.json",
"extends": "../tsconfig.json"
}

View File

@@ -90,7 +90,7 @@ describe('array-update', () => {
},
{
id: doc.arrayOfFields?.[1].id,
required: doc.arrayOfFields?.[1].required as string,
required: doc.arrayOfFields?.[1].required,
// NOTE - not passing optional field. It should persist
// because we're passing ID
},

View File

@@ -8,94 +8,93 @@
export interface Config {
collections: {
arrays: Array;
users: User;
'payload-preferences': PayloadPreference;
'payload-migrations': PayloadMigration;
};
globals: {};
locale: null;
arrays: Array
users: User
'payload-preferences': PayloadPreference
'payload-migrations': PayloadMigration
}
globals: {}
locale: null
user: User & {
collection: 'users';
};
collection: 'users'
}
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "arrays".
*/
export interface Array {
id: string;
id: string
arrayOfFields?:
| {
required: string;
optional?: string | null;
required: string
optional?: string | null
innerArrayOfFields?:
| {
required: string;
optional?: string | null;
id?: string | null;
required: string
optional?: string | null
id?: string | null
}[]
| null;
id?: string | null;
| null
id?: string | null
}[]
| null;
updatedAt: string;
createdAt: string;
| null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "users".
*/
export interface User {
id: string;
updatedAt: string;
createdAt: string;
email: string;
resetPasswordToken?: string | null;
resetPasswordExpiration?: string | null;
salt?: string | null;
hash?: string | null;
loginAttempts?: number | null;
lockUntil?: string | null;
password?: string | null;
id: string
updatedAt: string
createdAt: string
email: string
resetPasswordToken?: string | null
resetPasswordExpiration?: string | null
salt?: string | null
hash?: string | null
loginAttempts?: number | null
lockUntil?: string | null
password?: string | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-preferences".
*/
export interface PayloadPreference {
id: string;
id: string
user: {
relationTo: 'users';
value: string | User;
};
key?: string | null;
relationTo: 'users'
value: string | User
}
key?: string | null
value?:
| {
[k: string]: unknown;
[k: string]: unknown
}
| unknown[]
| string
| number
| boolean
| null;
updatedAt: string;
createdAt: string;
| null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-migrations".
*/
export interface PayloadMigration {
id: string;
name?: string | null;
batch?: number | null;
updatedAt: string;
createdAt: string;
id: string
name?: string | null
batch?: number | null
updatedAt: string
createdAt: string
}
declare module 'payload' {
// @ts-ignore
// @ts-ignore
export interface GeneratedTypes extends Config {}
}
}

View File

@@ -1,3 +1,3 @@
{
"extends": "../tsconfig.json",
"extends": "../tsconfig.json"
}

View File

@@ -1,7 +1,6 @@
'use client'
import type { User } from 'payload/auth'
import type { UIField } from 'payload/types'
import type { UIField, User } from 'payload'
import { useAuth } from '@payloadcms/ui/providers/Auth'
import React, { useEffect, useState } from 'react'

View File

@@ -4,7 +4,7 @@ import path from 'path'
const filename = fileURLToPath(import.meta.url)
const dirname = path.dirname(filename)
import type { AuthStrategyFunction } from 'payload/auth'
import type { AuthStrategyFunction } from 'payload'
import { buildConfigWithDefaults } from '../../buildConfigWithDefaults.js'
import { usersSlug } from './shared.js'

View File

@@ -1,10 +1,10 @@
import type { Page } from '@playwright/test'
import type { SanitizedConfig } from 'payload/types'
import type { SanitizedConfig } from 'payload'
import { expect, test } from '@playwright/test'
import { devUser } from 'credentials.js'
import path from 'path'
import { wait } from 'payload/utilities'
import { wait } from 'payload/shared'
import { fileURLToPath } from 'url'
import { v4 as uuid } from 'uuid'

View File

@@ -1,5 +1,4 @@
import type { Payload } from 'payload'
import type { User } from 'payload/auth'
import type { Payload, User } from 'payload'
import { jwtDecode } from 'jwt-decode'
import { v4 as uuid } from 'uuid'

View File

@@ -8,154 +8,153 @@
export interface Config {
collections: {
users: User;
'api-keys': ApiKey;
'public-users': PublicUser;
relationsCollection: RelationsCollection;
'payload-preferences': PayloadPreference;
'payload-migrations': PayloadMigration;
};
globals: {};
locale: null;
users: User
'api-keys': ApiKey
'public-users': PublicUser
relationsCollection: RelationsCollection
'payload-preferences': PayloadPreference
'payload-migrations': PayloadMigration
}
globals: {}
locale: null
user:
| (User & {
collection: 'users';
collection: 'users'
})
| (ApiKey & {
collection: 'api-keys';
collection: 'api-keys'
})
| (PublicUser & {
collection: 'public-users';
});
collection: 'public-users'
})
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "users".
*/
export interface User {
id: string;
adminOnlyField?: string | null;
roles: ('admin' | 'editor' | 'moderator' | 'user' | 'viewer')[];
namedSaveToJWT?: string | null;
id: string
adminOnlyField?: string | null
roles: ('admin' | 'editor' | 'moderator' | 'user' | 'viewer')[]
namedSaveToJWT?: string | null
group?: {
liftedSaveToJWT?: string | null;
};
liftedSaveToJWT?: string | null
}
groupSaveToJWT?: {
saveToJWTString?: string | null;
saveToJWTFalse?: string | null;
};
saveToJWTString?: string | null
saveToJWTFalse?: string | null
}
saveToJWTTab?: {
test?: string | null;
};
test?: string | null
}
tabSaveToJWTString?: {
includedByDefault?: string | null;
};
tabLiftedSaveToJWT?: string | null;
unnamedTabSaveToJWTString?: string | null;
unnamedTabSaveToJWTFalse?: string | null;
custom?: string | null;
updatedAt: string;
createdAt: string;
enableAPIKey?: boolean | null;
apiKey?: string | null;
apiKeyIndex?: string | null;
email: string;
resetPasswordToken?: string | null;
resetPasswordExpiration?: string | null;
salt?: string | null;
hash?: string | null;
loginAttempts?: number | null;
lockUntil?: string | null;
password?: string | null;
includedByDefault?: string | null
}
tabLiftedSaveToJWT?: string | null
unnamedTabSaveToJWTString?: string | null
unnamedTabSaveToJWTFalse?: string | null
custom?: string | null
updatedAt: string
createdAt: string
enableAPIKey?: boolean | null
apiKey?: string | null
apiKeyIndex?: string | null
email: string
resetPasswordToken?: string | null
resetPasswordExpiration?: string | null
salt?: string | null
hash?: string | null
loginAttempts?: number | null
lockUntil?: string | null
password?: string | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "api-keys".
*/
export interface ApiKey {
id: string;
updatedAt: string;
createdAt: string;
enableAPIKey?: boolean | null;
apiKey?: string | null;
apiKeyIndex?: string | null;
id: string
updatedAt: string
createdAt: string
enableAPIKey?: boolean | null
apiKey?: string | null
apiKeyIndex?: string | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "public-users".
*/
export interface PublicUser {
id: string;
updatedAt: string;
createdAt: string;
email: string;
resetPasswordToken?: string | null;
resetPasswordExpiration?: string | null;
salt?: string | null;
hash?: string | null;
_verified?: boolean | null;
_verificationToken?: string | null;
loginAttempts?: number | null;
lockUntil?: string | null;
password?: string | null;
id: string
updatedAt: string
createdAt: string
email: string
resetPasswordToken?: string | null
resetPasswordExpiration?: string | null
salt?: string | null
hash?: string | null
_verified?: boolean | null
_verificationToken?: string | null
loginAttempts?: number | null
lockUntil?: string | null
password?: string | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "relationsCollection".
*/
export interface RelationsCollection {
id: string;
rel?: (string | null) | User;
text?: string | null;
updatedAt: string;
createdAt: string;
id: string
rel?: (string | null) | User
text?: string | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-preferences".
*/
export interface PayloadPreference {
id: string;
id: string
user:
| {
relationTo: 'users';
value: string | User;
relationTo: 'users'
value: string | User
}
| {
relationTo: 'api-keys';
value: string | ApiKey;
relationTo: 'api-keys'
value: string | ApiKey
}
| {
relationTo: 'public-users';
value: string | PublicUser;
};
key?: string | null;
relationTo: 'public-users'
value: string | PublicUser
}
key?: string | null
value?:
| {
[k: string]: unknown;
[k: string]: unknown
}
| unknown[]
| string
| number
| boolean
| null;
updatedAt: string;
createdAt: string;
| null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-migrations".
*/
export interface PayloadMigration {
id: string;
name?: string | null;
batch?: number | null;
updatedAt: string;
createdAt: string;
id: string
name?: string | null
batch?: number | null
updatedAt: string
createdAt: string
}
declare module 'payload' {
// @ts-ignore
// @ts-ignore
export interface GeneratedTypes extends Config {}
}
}

View File

@@ -1,3 +1,3 @@
{
"extends": "../tsconfig.json",
"extends": "../tsconfig.json"
}

View File

@@ -1,5 +1,4 @@
import type { User } from 'payload/auth'
import type { UIField } from 'payload/types'
import type { UIField, User } from 'payload'
import { useAuth } from '@payloadcms/ui/providers/Auth'
import React, { useEffect, useState } from 'react'

View File

@@ -1,4 +1,4 @@
import type { SanitizedConfig } from 'payload/types'
import type { SanitizedConfig } from 'payload'
import { mongooseAdapter } from '@payloadcms/db-mongodb'
import { postgresAdapter } from '@payloadcms/db-postgres'
@@ -26,7 +26,7 @@ import {
lexicalEditor,
} from '@payloadcms/richtext-lexical'
// import { slateEditor } from '@payloadcms/richtext-slate'
import { type Config, buildConfig } from 'payload/config'
import { type Config, buildConfig } from 'payload'
import { de } from 'payload/i18n/de'
import { en } from 'payload/i18n/en'
import { es } from 'payload/i18n/es'

View File

@@ -2,7 +2,7 @@ import { fileURLToPath } from 'node:url'
import path from 'path'
const filename = fileURLToPath(import.meta.url)
const dirname = path.dirname(filename)
import type { CollectionConfig } from 'payload/types'
import type { CollectionConfig } from 'payload'
import { buildConfigWithDefaults } from '../buildConfigWithDefaults.js'
import { devUser } from '../credentials.js'

View File

@@ -2,8 +2,7 @@ import type { Payload } from 'payload'
import { fileURLToPath } from 'node:url'
import path from 'path'
import { getFileByPath } from 'payload/uploads'
import { mapAsync } from 'payload/utilities'
import { getFileByPath, mapAsync } from 'payload'
import type { NextRESTClient } from '../helpers/NextRESTClient.js'
import type { Post } from './payload-types.js'

View File

@@ -8,255 +8,254 @@
export interface Config {
collections: {
users: User;
point: Point;
posts: Post;
'custom-ids': CustomId;
relation: Relation;
dummy: Dummy;
'error-on-hooks': ErrorOnHook;
'payload-api-test-ones': PayloadApiTestOne;
'payload-api-test-twos': PayloadApiTestTwo;
'content-type': ContentType;
'cyclical-relationship': CyclicalRelationship;
media: Media;
'payload-preferences': PayloadPreference;
'payload-migrations': PayloadMigration;
};
globals: {};
locale: 'en' | 'es';
users: User
point: Point
posts: Post
'custom-ids': CustomId
relation: Relation
dummy: Dummy
'error-on-hooks': ErrorOnHook
'payload-api-test-ones': PayloadApiTestOne
'payload-api-test-twos': PayloadApiTestTwo
'content-type': ContentType
'cyclical-relationship': CyclicalRelationship
media: Media
'payload-preferences': PayloadPreference
'payload-migrations': PayloadMigration
}
globals: {}
locale: 'en' | 'es'
user: User & {
collection: 'users';
};
collection: 'users'
}
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "users".
*/
export interface User {
id: string;
updatedAt: string;
createdAt: string;
email: string;
resetPasswordToken?: string | null;
resetPasswordExpiration?: string | null;
salt?: string | null;
hash?: string | null;
loginAttempts?: number | null;
lockUntil?: string | null;
password?: string | null;
id: string
updatedAt: string
createdAt: string
email: string
resetPasswordToken?: string | null
resetPasswordExpiration?: string | null
salt?: string | null
hash?: string | null
loginAttempts?: number | null
lockUntil?: string | null
password?: string | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "point".
*/
export interface Point {
id: string;
id: string
/**
* @minItems 2
* @maxItems 2
*/
point?: [number, number] | null;
updatedAt: string;
createdAt: string;
point?: [number, number] | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "posts".
*/
export interface Post {
id: string;
title?: string | null;
description?: string | null;
number?: number | null;
min?: number | null;
relationField?: (string | null) | Relation;
relationToCustomID?: (number | null) | CustomId;
relationHasManyField?: (string | Relation)[] | null;
id: string
title?: string | null
description?: string | null
number?: number | null
min?: number | null
relationField?: (string | null) | Relation
relationToCustomID?: (number | null) | CustomId
relationHasManyField?: (string | Relation)[] | null
relationMultiRelationTo?:
| ({
relationTo: 'relation';
value: string | Relation;
relationTo: 'relation'
value: string | Relation
} | null)
| ({
relationTo: 'dummy';
value: string | Dummy;
} | null);
relationTo: 'dummy'
value: string | Dummy
} | null)
relationMultiRelationToHasMany?:
| (
| {
relationTo: 'relation';
value: string | Relation;
relationTo: 'relation'
value: string | Relation
}
| {
relationTo: 'dummy';
value: string | Dummy;
relationTo: 'dummy'
value: string | Dummy
}
)[]
| null;
| null
A1?: {
A2?: string | null;
};
A2?: string | null
}
B1?: {
B2?: string | null;
};
B2?: string | null
}
C1?: {
C2Text?: string | null;
C2Text?: string | null
C2?: {
C3?: string | null;
};
};
C3?: string | null
}
}
D1?: {
D2?: {
D3?: {
D4?: string | null;
};
};
};
updatedAt: string;
createdAt: string;
D4?: string | null
}
}
}
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "relation".
*/
export interface Relation {
id: string;
name?: string | null;
updatedAt: string;
createdAt: string;
id: string
name?: string | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "custom-ids".
*/
export interface CustomId {
id: number;
title?: string | null;
updatedAt: string;
createdAt: string;
id: number
title?: string | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "dummy".
*/
export interface Dummy {
id: string;
name?: string | null;
updatedAt: string;
createdAt: string;
id: string
name?: string | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "error-on-hooks".
*/
export interface ErrorOnHook {
id: string;
title?: string | null;
errorBeforeChange?: boolean | null;
updatedAt: string;
createdAt: string;
id: string
title?: string | null
errorBeforeChange?: boolean | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-api-test-ones".
*/
export interface PayloadApiTestOne {
id: string;
payloadAPI?: string | null;
updatedAt: string;
createdAt: string;
id: string
payloadAPI?: string | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-api-test-twos".
*/
export interface PayloadApiTestTwo {
id: string;
payloadAPI?: string | null;
relation?: (string | null) | PayloadApiTestOne;
updatedAt: string;
createdAt: string;
id: string
payloadAPI?: string | null
relation?: (string | null) | PayloadApiTestOne
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "content-type".
*/
export interface ContentType {
id: string;
contentType?: string | null;
updatedAt: string;
createdAt: string;
id: string
contentType?: string | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "cyclical-relationship".
*/
export interface CyclicalRelationship {
id: string;
title?: string | null;
relationToSelf?: (string | null) | CyclicalRelationship;
media?: string | Media | null;
updatedAt: string;
createdAt: string;
_status?: ('draft' | 'published') | null;
id: string
title?: string | null
relationToSelf?: (string | null) | CyclicalRelationship
media?: string | Media | null
updatedAt: string
createdAt: string
_status?: ('draft' | 'published') | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "media".
*/
export interface Media {
id: string;
title?: string | null;
updatedAt: string;
createdAt: string;
url?: string | null;
thumbnailURL?: string | null;
filename?: string | null;
mimeType?: string | null;
filesize?: number | null;
width?: number | null;
height?: number | null;
focalX?: number | null;
focalY?: number | null;
id: string
title?: string | null
updatedAt: string
createdAt: string
url?: string | null
thumbnailURL?: string | null
filename?: string | null
mimeType?: string | null
filesize?: number | null
width?: number | null
height?: number | null
focalX?: number | null
focalY?: number | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-preferences".
*/
export interface PayloadPreference {
id: string;
id: string
user: {
relationTo: 'users';
value: string | User;
};
key?: string | null;
relationTo: 'users'
value: string | User
}
key?: string | null
value?:
| {
[k: string]: unknown;
[k: string]: unknown
}
| unknown[]
| string
| number
| boolean
| null;
updatedAt: string;
createdAt: string;
| null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-migrations".
*/
export interface PayloadMigration {
id: string;
name?: string | null;
batch?: number | null;
updatedAt: string;
createdAt: string;
id: string
name?: string | null
batch?: number | null
updatedAt: string
createdAt: string
}
declare module 'payload' {
// @ts-ignore
// @ts-ignore
export interface GeneratedTypes extends Config {}
}
}

View File

@@ -1,3 +1,3 @@
{
"extends": "../tsconfig.json",
"extends": "../tsconfig.json"
}

View File

@@ -2,7 +2,7 @@ import { fileURLToPath } from 'node:url'
import path from 'path'
const filename = fileURLToPath(import.meta.url)
const dirname = path.dirname(filename)
import type { CollectionConfig } from 'payload/types'
import type { CollectionConfig } from 'payload'
import { buildConfigWithDefaults } from '../buildConfigWithDefaults.js'
import { devUser } from '../credentials.js'

View File

@@ -1,7 +1,7 @@
import type { Payload } from 'payload'
import { randomBytes } from 'crypto'
import { mapAsync } from 'payload/utilities'
import { mapAsync } from 'payload'
import type { NextRESTClient } from '../helpers/NextRESTClient.js'
import type { Relation } from './config.js'

View File

@@ -8,188 +8,187 @@
export interface Config {
collections: {
posts: Post;
point: Point;
relation: Relation;
dummy: Dummy;
'custom-id': CustomId;
'custom-id-number': CustomIdNumber;
'error-on-hooks': ErrorOnHook;
users: User;
'payload-preferences': PayloadPreference;
'payload-migrations': PayloadMigration;
};
globals: {};
locale: null;
posts: Post
point: Point
relation: Relation
dummy: Dummy
'custom-id': CustomId
'custom-id-number': CustomIdNumber
'error-on-hooks': ErrorOnHook
users: User
'payload-preferences': PayloadPreference
'payload-migrations': PayloadMigration
}
globals: {}
locale: null
user: User & {
collection: 'users';
};
collection: 'users'
}
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "posts".
*/
export interface Post {
id: string;
title?: string | null;
description?: string | null;
number?: number | null;
fakeLocalization?: string | null;
relationField?: (string | null) | Relation;
relationHasManyField?: (string | Relation)[] | null;
id: string
title?: string | null
description?: string | null
number?: number | null
fakeLocalization?: string | null
relationField?: (string | null) | Relation
relationHasManyField?: (string | Relation)[] | null
relationMultiRelationTo?:
| ({
relationTo: 'relation';
value: string | Relation;
relationTo: 'relation'
value: string | Relation
} | null)
| ({
relationTo: 'dummy';
value: string | Dummy;
} | null);
relationTo: 'dummy'
value: string | Dummy
} | null)
relationMultiRelationToHasMany?:
| (
| {
relationTo: 'relation';
value: string | Relation;
relationTo: 'relation'
value: string | Relation
}
| {
relationTo: 'dummy';
value: string | Dummy;
relationTo: 'dummy'
value: string | Dummy
}
)[]
| null;
restrictedField?: string | null;
| null
restrictedField?: string | null
D1?: {
D2?: {
D3?: {
D4?: string | null;
};
};
};
updatedAt: string;
createdAt: string;
D4?: string | null
}
}
}
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "relation".
*/
export interface Relation {
id: string;
name?: string | null;
updatedAt: string;
createdAt: string;
id: string
name?: string | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "dummy".
*/
export interface Dummy {
id: string;
title?: string | null;
name?: string | null;
updatedAt: string;
createdAt: string;
id: string
title?: string | null
name?: string | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "point".
*/
export interface Point {
id: string;
id: string
/**
* @minItems 2
* @maxItems 2
*/
point?: [number, number] | null;
updatedAt: string;
createdAt: string;
point?: [number, number] | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "custom-id".
*/
export interface CustomId {
id: string;
name?: string | null;
updatedAt: string;
createdAt: string;
id: string
name?: string | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "custom-id-number".
*/
export interface CustomIdNumber {
id: number;
name?: string | null;
updatedAt: string;
createdAt: string;
id: number
name?: string | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "error-on-hooks".
*/
export interface ErrorOnHook {
id: string;
text?: string | null;
errorBeforeChange?: boolean | null;
errorAfterDelete?: boolean | null;
updatedAt: string;
createdAt: string;
id: string
text?: string | null
errorBeforeChange?: boolean | null
errorAfterDelete?: boolean | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "users".
*/
export interface User {
id: string;
updatedAt: string;
createdAt: string;
email: string;
resetPasswordToken?: string | null;
resetPasswordExpiration?: string | null;
salt?: string | null;
hash?: string | null;
loginAttempts?: number | null;
lockUntil?: string | null;
password?: string | null;
id: string
updatedAt: string
createdAt: string
email: string
resetPasswordToken?: string | null
resetPasswordExpiration?: string | null
salt?: string | null
hash?: string | null
loginAttempts?: number | null
lockUntil?: string | null
password?: string | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-preferences".
*/
export interface PayloadPreference {
id: string;
id: string
user: {
relationTo: 'users';
value: string | User;
};
key?: string | null;
relationTo: 'users'
value: string | User
}
key?: string | null
value?:
| {
[k: string]: unknown;
[k: string]: unknown
}
| unknown[]
| string
| number
| boolean
| null;
updatedAt: string;
createdAt: string;
| null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-migrations".
*/
export interface PayloadMigration {
id: string;
name?: string | null;
batch?: number | null;
updatedAt: string;
createdAt: string;
id: string
name?: string | null
batch?: number | null
updatedAt: string
createdAt: string
}
declare module 'payload' {
// @ts-ignore
// @ts-ignore
export interface GeneratedTypes extends Config {}
}
}

View File

@@ -1,3 +1,3 @@
{
"extends": "../tsconfig.json",
"extends": "../tsconfig.json"
}

View File

@@ -1,5 +1,4 @@
import type { Payload } from 'payload'
import type { BlockField } from 'payload/types'
import type { BlockField, Payload } from 'payload'
import { initPayloadInt } from '../helpers/initPayloadInt.js'
import configPromise from './config.js'

View File

@@ -8,102 +8,101 @@
export interface Config {
collections: {
pages: Page;
users: User;
'payload-preferences': PayloadPreference;
'payload-migrations': PayloadMigration;
};
pages: Page
users: User
'payload-preferences': PayloadPreference
'payload-migrations': PayloadMigration
}
globals: {
'my-global': MyGlobal;
};
locale: null;
'my-global': MyGlobal
}
locale: null
user: User & {
collection: 'users';
};
collection: 'users'
}
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "pages".
*/
export interface Page {
id: string;
title?: string | null;
id: string
title?: string | null
myBlocks?:
| {
blockOneField?: string | null;
blockTwoField?: string | null;
id?: string | null;
blockName?: string | null;
blockType: 'blockOne';
blockOneField?: string | null
blockTwoField?: string | null
id?: string | null
blockName?: string | null
blockType: 'blockOne'
}[]
| null;
updatedAt: string;
createdAt: string;
| null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "users".
*/
export interface User {
id: string;
updatedAt: string;
createdAt: string;
email: string;
resetPasswordToken?: string | null;
resetPasswordExpiration?: string | null;
salt?: string | null;
hash?: string | null;
loginAttempts?: number | null;
lockUntil?: string | null;
password?: string | null;
id: string
updatedAt: string
createdAt: string
email: string
resetPasswordToken?: string | null
resetPasswordExpiration?: string | null
salt?: string | null
hash?: string | null
loginAttempts?: number | null
lockUntil?: string | null
password?: string | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-preferences".
*/
export interface PayloadPreference {
id: string;
id: string
user: {
relationTo: 'users';
value: string | User;
};
key?: string | null;
relationTo: 'users'
value: string | User
}
key?: string | null
value?:
| {
[k: string]: unknown;
[k: string]: unknown
}
| unknown[]
| string
| number
| boolean
| null;
updatedAt: string;
createdAt: string;
| null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-migrations".
*/
export interface PayloadMigration {
id: string;
name?: string | null;
batch?: number | null;
updatedAt: string;
createdAt: string;
id: string
name?: string | null
batch?: number | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "my-global".
*/
export interface MyGlobal {
id: string;
title?: string | null;
updatedAt?: string | null;
createdAt?: string | null;
id: string
title?: string | null
updatedAt?: string | null
createdAt?: string | null
}
declare module 'payload' {
// @ts-ignore
// @ts-ignore
export interface GeneratedTypes extends Config {}
}
}

View File

@@ -1,3 +1,3 @@
{
"extends": "../tsconfig.json",
"extends": "../tsconfig.json"
}

View File

@@ -1,3 +1,3 @@
{
"extends": "../tsconfig.json",
"extends": "../tsconfig.json"
}

View File

@@ -3,7 +3,7 @@ import { fileURLToPath } from 'node:url'
import path from 'path'
const filename = fileURLToPath(import.meta.url)
const dirname = path.dirname(filename)
import { commitTransaction, initTransaction, killTransaction } from 'payload/database'
import { commitTransaction, initTransaction, killTransaction } from 'payload'
import { buildConfigWithDefaults } from '../buildConfigWithDefaults.js'
import { devUser } from '../credentials.js'

View File

@@ -8,70 +8,69 @@
export interface Config {
collections: {
users: User;
'payload-preferences': PayloadPreference;
'payload-migrations': PayloadMigration;
};
globals: {};
locale: null;
users: User
'payload-preferences': PayloadPreference
'payload-migrations': PayloadMigration
}
globals: {}
locale: null
user: User & {
collection: 'users';
};
collection: 'users'
}
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "users".
*/
export interface User {
id: string;
updatedAt: string;
createdAt: string;
email: string;
resetPasswordToken?: string | null;
resetPasswordExpiration?: string | null;
salt?: string | null;
hash?: string | null;
loginAttempts?: number | null;
lockUntil?: string | null;
password?: string | null;
id: string
updatedAt: string
createdAt: string
email: string
resetPasswordToken?: string | null
resetPasswordExpiration?: string | null
salt?: string | null
hash?: string | null
loginAttempts?: number | null
lockUntil?: string | null
password?: string | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-preferences".
*/
export interface PayloadPreference {
id: string;
id: string
user: {
relationTo: 'users';
value: string | User;
};
key?: string | null;
relationTo: 'users'
value: string | User
}
key?: string | null
value?:
| {
[k: string]: unknown;
[k: string]: unknown
}
| unknown[]
| string
| number
| boolean
| null;
updatedAt: string;
createdAt: string;
| null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-migrations".
*/
export interface PayloadMigration {
id: string;
name?: string | null;
batch?: number | null;
updatedAt: string;
createdAt: string;
id: string
name?: string | null
batch?: number | null
updatedAt: string
createdAt: string
}
declare module 'payload' {
// @ts-ignore
// @ts-ignore
export interface GeneratedTypes extends Config {}
}
}

View File

@@ -1,3 +1,3 @@
{
"extends": "../tsconfig.json",
"extends": "../tsconfig.json"
}

View File

@@ -1,13 +1,12 @@
import type { PostgresAdapter } from '@payloadcms/db-postgres/types'
import type { NextRESTClient } from 'helpers/NextRESTClient.js'
import type { Payload } from 'payload'
import type { PayloadRequestWithData, TypeWithID } from 'payload/types'
import type { Payload, PayloadRequestWithData, TypeWithID } from 'payload'
import { migratePostgresV2toV3 } from '@payloadcms/db-postgres/migration-utils'
import { sql } from 'drizzle-orm'
import fs from 'fs'
import path from 'path'
import { commitTransaction, initTransaction } from 'payload/database'
import { commitTransaction, initTransaction } from 'payload'
import { fileURLToPath } from 'url'
import { devUser } from '../credentials.js'

View File

@@ -8,215 +8,214 @@
export interface Config {
collections: {
posts: Post;
'relation-a': RelationA;
'relation-b': RelationB;
'pg-migrations': PgMigration;
'custom-schema': CustomSchema;
users: User;
'payload-preferences': PayloadPreference;
'payload-migrations': PayloadMigration;
};
posts: Post
'relation-a': RelationA
'relation-b': RelationB
'pg-migrations': PgMigration
'custom-schema': CustomSchema
users: User
'payload-preferences': PayloadPreference
'payload-migrations': PayloadMigration
}
globals: {
global: Global;
};
locale: 'en' | 'es';
global: Global
}
locale: 'en' | 'es'
user: User & {
collection: 'users';
};
collection: 'users'
}
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "posts".
*/
export interface Post {
id: string;
title: string;
throwAfterChange?: boolean | null;
updatedAt: string;
createdAt: string;
id: string
title: string
throwAfterChange?: boolean | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "relation-a".
*/
export interface RelationA {
id: string;
title?: string | null;
relationship?: (string | null) | RelationB;
id: string
title?: string | null
relationship?: (string | null) | RelationB
richText?: {
root: {
type: string;
type: string
children: {
type: string;
version: number;
[k: string]: unknown;
}[];
direction: ('ltr' | 'rtl') | null;
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
indent: number;
version: number;
};
[k: string]: unknown;
} | null;
updatedAt: string;
createdAt: string;
type: string
version: number
[k: string]: unknown
}[]
direction: ('ltr' | 'rtl') | null
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | ''
indent: number
version: number
}
[k: string]: unknown
} | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "relation-b".
*/
export interface RelationB {
id: string;
title?: string | null;
relationship?: (string | null) | RelationA;
id: string
title?: string | null
relationship?: (string | null) | RelationA
richText?: {
root: {
type: string;
type: string
children: {
type: string;
version: number;
[k: string]: unknown;
}[];
direction: ('ltr' | 'rtl') | null;
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
indent: number;
version: number;
};
[k: string]: unknown;
} | null;
updatedAt: string;
createdAt: string;
type: string
version: number
[k: string]: unknown
}[]
direction: ('ltr' | 'rtl') | null
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | ''
indent: number
version: number
}
[k: string]: unknown
} | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "pg-migrations".
*/
export interface PgMigration {
id: string;
relation1?: (string | null) | RelationA;
id: string
relation1?: (string | null) | RelationA
myArray?:
| {
relation2?: (string | null) | RelationB;
relation2?: (string | null) | RelationB
mySubArray?:
| {
relation3?: (string | null) | RelationB;
id?: string | null;
relation3?: (string | null) | RelationB
id?: string | null
}[]
| null;
id?: string | null;
| null
id?: string | null
}[]
| null;
| null
myGroup?: {
relation4?: (string | null) | RelationB;
};
relation4?: (string | null) | RelationB
}
myBlocks?:
| {
relation5?: (string | null) | RelationA;
relation6?: (string | null) | RelationB;
id?: string | null;
blockName?: string | null;
blockType: 'myBlock';
relation5?: (string | null) | RelationA
relation6?: (string | null) | RelationB
id?: string | null
blockName?: string | null
blockType: 'myBlock'
}[]
| null;
updatedAt: string;
createdAt: string;
| null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "custom-schema".
*/
export interface CustomSchema {
id: string;
text?: string | null;
localizedText?: string | null;
relationship?: (string | RelationA)[] | null;
select?: ('a' | 'b' | 'c')[] | null;
radio?: ('a' | 'b' | 'c') | null;
id: string
text?: string | null
localizedText?: string | null
relationship?: (string | RelationA)[] | null
select?: ('a' | 'b' | 'c')[] | null
radio?: ('a' | 'b' | 'c') | null
array?:
| {
text?: string | null;
localizedText?: string | null;
id?: string | null;
text?: string | null
localizedText?: string | null
id?: string | null
}[]
| null;
| null
blocks?:
| {
text?: string | null;
localizedText?: string | null;
id?: string | null;
blockName?: string | null;
blockType: 'block';
text?: string | null
localizedText?: string | null
id?: string | null
blockName?: string | null
blockType: 'block'
}[]
| null;
updatedAt: string;
createdAt: string;
_status?: ('draft' | 'published') | null;
| null
updatedAt: string
createdAt: string
_status?: ('draft' | 'published') | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "users".
*/
export interface User {
id: string;
updatedAt: string;
createdAt: string;
email: string;
resetPasswordToken?: string | null;
resetPasswordExpiration?: string | null;
salt?: string | null;
hash?: string | null;
loginAttempts?: number | null;
lockUntil?: string | null;
password?: string | null;
id: string
updatedAt: string
createdAt: string
email: string
resetPasswordToken?: string | null
resetPasswordExpiration?: string | null
salt?: string | null
hash?: string | null
loginAttempts?: number | null
lockUntil?: string | null
password?: string | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-preferences".
*/
export interface PayloadPreference {
id: string;
id: string
user: {
relationTo: 'users';
value: string | User;
};
key?: string | null;
relationTo: 'users'
value: string | User
}
key?: string | null
value?:
| {
[k: string]: unknown;
[k: string]: unknown
}
| unknown[]
| string
| number
| boolean
| null;
updatedAt: string;
createdAt: string;
| null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-migrations".
*/
export interface PayloadMigration {
id: string;
name?: string | null;
batch?: number | null;
updatedAt: string;
createdAt: string;
id: string
name?: string | null
batch?: number | null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "global".
*/
export interface Global {
id: string;
text?: string | null;
updatedAt?: string | null;
createdAt?: string | null;
id: string
text?: string | null
updatedAt?: string | null
createdAt?: string | null
}
declare module 'payload' {
// @ts-ignore
// @ts-ignore
export interface GeneratedTypes extends Config {}
}
}

View File

@@ -1,3 +1,3 @@
{
"extends": "../tsconfig.json",
"extends": "../tsconfig.json"
}

View File

@@ -8,114 +8,113 @@
export interface Config {
collections: {
posts: Post;
'relation-a': RelationA;
'relation-b': RelationB;
users: User;
'payload-preferences': PayloadPreference;
'payload-migrations': PayloadMigration;
};
globals: {};
locale: null;
posts: Post
'relation-a': RelationA
'relation-b': RelationB
users: User
'payload-preferences': PayloadPreference
'payload-migrations': PayloadMigration
}
globals: {}
locale: null
user: User & {
collection: 'users';
};
collection: 'users'
}
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "posts".
*/
export interface Post {
id: string;
title: string;
owner?: (string | null) | User;
updatedAt: string;
createdAt: string;
id: string
title: string
owner?: (string | null) | User
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "users".
*/
export interface User {
id: string;
updatedAt: string;
createdAt: string;
email: string;
resetPasswordToken?: string | null;
resetPasswordExpiration?: string | null;
salt?: string | null;
hash?: string | null;
loginAttempts?: number | null;
lockUntil?: string | null;
password?: string | null;
id: string
updatedAt: string
createdAt: string
email: string
resetPasswordToken?: string | null
resetPasswordExpiration?: string | null
salt?: string | null
hash?: string | null
loginAttempts?: number | null
lockUntil?: string | null
password?: string | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "relation-a".
*/
export interface RelationA {
id: string;
relationship?: (string | null) | RelationB;
id: string
relationship?: (string | null) | RelationB
richText?:
| {
[k: string]: unknown;
[k: string]: unknown
}[]
| null;
updatedAt: string;
createdAt: string;
| null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "relation-b".
*/
export interface RelationB {
id: string;
relationship?: (string | null) | RelationA;
id: string
relationship?: (string | null) | RelationA
richText?:
| {
[k: string]: unknown;
[k: string]: unknown
}[]
| null;
updatedAt: string;
createdAt: string;
| null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-preferences".
*/
export interface PayloadPreference {
id: string;
id: string
user: {
relationTo: 'users';
value: string | User;
};
key?: string | null;
relationTo: 'users'
value: string | User
}
key?: string | null
value?:
| {
[k: string]: unknown;
[k: string]: unknown
}
| unknown[]
| string
| number
| boolean
| null;
updatedAt: string;
createdAt: string;
| null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-migrations".
*/
export interface PayloadMigration {
id: string;
name?: string | null;
batch?: number | null;
updatedAt: string;
createdAt: string;
id: string
name?: string | null
batch?: number | null
updatedAt: string
createdAt: string
}
declare module 'payload' {
// @ts-ignore
// @ts-ignore
export interface GeneratedTypes extends Config {}
}
}

View File

@@ -1,3 +1,3 @@
{
"extends": "../tsconfig.json",
"extends": "../tsconfig.json"
}

View File

@@ -8,70 +8,69 @@
export interface Config {
collections: {
users: User;
'payload-preferences': PayloadPreference;
'payload-migrations': PayloadMigration;
};
globals: {};
locale: null;
users: User
'payload-preferences': PayloadPreference
'payload-migrations': PayloadMigration
}
globals: {}
locale: null
user: User & {
collection: 'users';
};
collection: 'users'
}
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "users".
*/
export interface User {
id: string;
updatedAt: string;
createdAt: string;
email: string;
resetPasswordToken?: string | null;
resetPasswordExpiration?: string | null;
salt?: string | null;
hash?: string | null;
loginAttempts?: number | null;
lockUntil?: string | null;
password?: string | null;
id: string
updatedAt: string
createdAt: string
email: string
resetPasswordToken?: string | null
resetPasswordExpiration?: string | null
salt?: string | null
hash?: string | null
loginAttempts?: number | null
lockUntil?: string | null
password?: string | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-preferences".
*/
export interface PayloadPreference {
id: string;
id: string
user: {
relationTo: 'users';
value: string | User;
};
key?: string | null;
relationTo: 'users'
value: string | User
}
key?: string | null
value?:
| {
[k: string]: unknown;
[k: string]: unknown
}
| unknown[]
| string
| number
| boolean
| null;
updatedAt: string;
createdAt: string;
| null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-migrations".
*/
export interface PayloadMigration {
id: string;
name?: string | null;
batch?: number | null;
updatedAt: string;
createdAt: string;
id: string
name?: string | null
batch?: number | null
updatedAt: string
createdAt: string
}
declare module 'payload' {
// @ts-ignore
// @ts-ignore
export interface GeneratedTypes extends Config {}
}
}

View File

@@ -1,3 +1,3 @@
{
"extends": "../tsconfig.json",
"extends": "../tsconfig.json"
}

View File

@@ -8,70 +8,69 @@
export interface Config {
collections: {
users: User;
'payload-preferences': PayloadPreference;
'payload-migrations': PayloadMigration;
};
globals: {};
locale: null;
users: User
'payload-preferences': PayloadPreference
'payload-migrations': PayloadMigration
}
globals: {}
locale: null
user: User & {
collection: 'users';
};
collection: 'users'
}
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "users".
*/
export interface User {
id: string;
updatedAt: string;
createdAt: string;
email: string;
resetPasswordToken?: string | null;
resetPasswordExpiration?: string | null;
salt?: string | null;
hash?: string | null;
loginAttempts?: number | null;
lockUntil?: string | null;
password?: string | null;
id: string
updatedAt: string
createdAt: string
email: string
resetPasswordToken?: string | null
resetPasswordExpiration?: string | null
salt?: string | null
hash?: string | null
loginAttempts?: number | null
lockUntil?: string | null
password?: string | null
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-preferences".
*/
export interface PayloadPreference {
id: string;
id: string
user: {
relationTo: 'users';
value: string | User;
};
key?: string | null;
relationTo: 'users'
value: string | User
}
key?: string | null
value?:
| {
[k: string]: unknown;
[k: string]: unknown
}
| unknown[]
| string
| number
| boolean
| null;
updatedAt: string;
createdAt: string;
| null
updatedAt: string
createdAt: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-migrations".
*/
export interface PayloadMigration {
id: string;
name?: string | null;
batch?: number | null;
updatedAt: string;
createdAt: string;
id: string
name?: string | null
batch?: number | null
updatedAt: string
createdAt: string
}
declare module 'payload' {
// @ts-ignore
// @ts-ignore
export interface GeneratedTypes extends Config {}
}
}

View File

@@ -1,3 +1,3 @@
{
"extends": "../tsconfig.json",
"extends": "../tsconfig.json"
}

View File

@@ -1,4 +1,4 @@
import type { CollectionConfig } from 'payload/types'
import type { CollectionConfig } from 'payload'
import { getPayload } from 'payload'

View File

@@ -1,4 +1,4 @@
import type { CollectionConfig } from 'payload/types'
import type { CollectionConfig } from 'payload'
import { mediaSlug } from '../Media/index.js'

View File

@@ -1,6 +1,6 @@
import { nodemailerAdapter } from '@payloadcms/email-nodemailer'
import path from 'path'
import { getFileByPath } from 'payload/uploads'
import { getFileByPath } from 'payload'
import { fileURLToPath } from 'url'
import { buildConfigWithDefaults } from '../buildConfigWithDefaults.js'

View File

@@ -1,4 +1,4 @@
import type { GlobalConfig } from 'payload/types'
import type { GlobalConfig } from 'payload'
export const menuSlug = 'menu'

Some files were not shown because too many files have changed in this diff Show More