Merge branch 'alpha' of github.com:payloadcms/payload into alpha
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "payload-monorepo",
|
||||
"version": "3.0.0-alpha.41",
|
||||
"version": "3.0.0-alpha.42",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"workspaces:": [
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user