Merge branch 'alpha' of github.com:payloadcms/payload into alpha

This commit is contained in:
James
2024-03-10 18:18:32 -04:00
19 changed files with 32 additions and 20 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "payload-monorepo",
"version": "3.0.0-alpha.41",
"version": "3.0.0-alpha.42",
"private": true,
"type": "module",
"workspaces:": [

View File

@@ -1,6 +1,6 @@
{
"name": "@payloadcms/db-mongodb",
"version": "3.0.0-alpha.41",
"version": "3.0.0-alpha.42",
"description": "The officially supported MongoDB database adapter for Payload - Update 2",
"repository": "https://github.com/payloadcms/payload",
"license": "MIT",

View File

@@ -1,6 +1,6 @@
{
"name": "@payloadcms/db-postgres",
"version": "3.0.0-alpha.41",
"version": "3.0.0-alpha.42",
"description": "The officially supported Postgres database adapter for Payload",
"repository": "https://github.com/payloadcms/payload",
"license": "MIT",

View File

@@ -1,6 +1,6 @@
{
"name": "@payloadcms/graphql",
"version": "3.0.0-alpha.41",
"version": "3.0.0-alpha.42",
"main": "./src/index.ts",
"types": "./src/index.d.ts",
"type": "module",

View File

@@ -1,6 +1,6 @@
{
"name": "@payloadcms/next",
"version": "3.0.0-alpha.41",
"version": "3.0.0-alpha.42",
"main": "./src/index.ts",
"types": "./src/index.d.ts",
"type": "module",

View File

@@ -12,6 +12,10 @@ if (!cached) {
}
export const getPayload = async (options: InitOptions): Promise<Payload> => {
if (!options?.config) {
throw new Error('Error: the payload config is required for getPayload to work.')
}
if (cached.payload) {
const config = await options.config

View File

@@ -1,6 +1,6 @@
{
"name": "payload",
"version": "3.0.0-alpha.41",
"version": "3.0.0-alpha.42",
"description": "Node, React and MongoDB Headless CMS and Application Framework",
"license": "MIT",
"main": "./src/index.js",

View File

@@ -298,6 +298,10 @@ export class BasePayload<TGeneratedTypes extends GeneratedTypes> {
* @param options
*/
async init(options: InitOptions): Promise<Payload> {
if (!options?.config) {
throw new Error('Error: the payload config is required to initialize payload.')
}
this.logger = Logger('payload', options.loggerOptions, options.loggerDestination)
this.config = await options.config
@@ -420,7 +424,11 @@ if (!cached) {
cached = global._payload = { payload: null, promise: null }
}
export const getPayload = async (options?: InitOptions): Promise<BasePayload<GeneratedTypes>> => {
export const getPayload = async (options: InitOptions): Promise<BasePayload<GeneratedTypes>> => {
if (!options?.config) {
throw new Error('Error: the payload config is required for getPayload to work.')
}
if (cached.payload) {
return cached.payload
}

View File

@@ -1,7 +1,7 @@
{
"name": "@payloadcms/plugin-cloud-storage",
"description": "The official cloud storage plugin for Payload CMS",
"version": "3.0.0-alpha.41",
"version": "3.0.0-alpha.42",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",

View File

@@ -1,7 +1,7 @@
{
"name": "@payloadcms/plugin-cloud",
"description": "The official Payload Cloud plugin",
"version": "3.0.0-alpha.41",
"version": "3.0.0-alpha.42",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"license": "MIT",

View File

@@ -1,6 +1,6 @@
{
"name": "@payloadcms/plugin-nested-docs",
"version": "1.0.12",
"version": "3.0.0-alpha.42",
"description": "The official Nested Docs plugin for Payload",
"repository": "https://github.com/payloadcms/payload",
"license": "MIT",

View File

@@ -1,6 +1,6 @@
{
"name": "@payloadcms/plugin-redirects",
"version": "1.0.1",
"version": "3.0.0-alpha.42",
"homepage:": "https://payloadcms.com",
"repository": "git@github.com:payloadcms/plugin-redirects.git",
"description": "Redirects plugin for Payload",

View File

@@ -1,6 +1,6 @@
{
"name": "@payloadcms/plugin-search",
"version": "1.1.0",
"version": "3.0.0-alpha.42",
"homepage:": "https://payloadcms.com",
"repository": "git@github.com:payloadcms/plugin-search.git",
"description": "Search plugin for Payload",

View File

@@ -1,6 +1,6 @@
{
"name": "@payloadcms/plugin-seo",
"version": "3.0.0-alpha.41",
"version": "3.0.0-alpha.42",
"homepage:": "https://payloadcms.com",
"repository": "git@github.com:payloadcms/plugin-seo.git",
"description": "SEO plugin for Payload",

View File

@@ -1,6 +1,6 @@
{
"name": "@payloadcms/richtext-lexical",
"version": "3.0.0-alpha.41",
"version": "3.0.0-alpha.42",
"description": "The officially supported Lexical richtext adapter for Payload",
"repository": "https://github.com/payloadcms/payload",
"license": "MIT",

View File

@@ -1,6 +1,6 @@
{
"name": "@payloadcms/richtext-slate",
"version": "3.0.0-alpha.41",
"version": "3.0.0-alpha.42",
"description": "The officially supported Slate richtext adapter for Payload",
"repository": "https://github.com/payloadcms/payload",
"license": "MIT",

View File

@@ -1,6 +1,6 @@
{
"name": "@payloadcms/translations",
"version": "3.0.0-alpha.41",
"version": "3.0.0-alpha.42",
"main": "./dist/exports/index.ts",
"types": "./dist/types.d.ts",
"type": "module",

View File

@@ -1,6 +1,6 @@
{
"name": "@payloadcms/ui",
"version": "3.0.0-alpha.41",
"version": "3.0.0-alpha.42",
"main": "./src/index.ts",
"types": "./dist/index.d.ts",
"type": "module",

View File

@@ -28,9 +28,9 @@ const packageWhitelist = [
'plugin-cloud',
'plugin-cloud-storage',
// 'plugin-form-builder',
// 'plugin-nested-docs',
// 'plugin-redirects',
// 'plugin-search',
'plugin-nested-docs',
'plugin-redirects',
'plugin-search',
// 'plugin-sentry',
'plugin-seo',
// 'plugin-stripe',