feat!: rename @payloadcms/plugin-cloud (#8828)
BREAKING CHANGE: Rename `@payloadcms/plugin-cloud` to `@payloadcms/payload-cloud`. Anyone using the existing plugin will need to switch to using the new package. ## Why? Since v3 will be using _fixed versioning_, all versions of `^3` must be available. Unfortunately, the `@payloadcms/plugin-cloud` version has already breached that version number. Renaming will allow it to be on the same version as other monorepo packages. Additionally, the name `plugin-cloud` is quite ambiguous and sometimes is confused with `plugin-cloud-storage`, so using `payload-cloud` feels like a good move to make this more evident.
This commit is contained in:
@@ -101,11 +101,11 @@ Projects generated from a template will come pre-configured with the official Cl
|
|||||||
`yarn add @payloadcms/plugin-cloud`
|
`yarn add @payloadcms/plugin-cloud`
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import { payloadCloud } from '@payloadcms/plugin-cloud'
|
import { payloadCloudPlugin } from '@payloadcms/payload-cloud'
|
||||||
import { buildConfig } from 'payload'
|
import { buildConfig } from 'payload'
|
||||||
|
|
||||||
export default buildConfig({
|
export default buildConfig({
|
||||||
plugins: [payloadCloud()],
|
plugins: [payloadCloudPlugin()],
|
||||||
// rest of config
|
// rest of config
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
"build:live-preview-vue": "turbo build --filter \"@payloadcms/live-preview-vue\"",
|
"build:live-preview-vue": "turbo build --filter \"@payloadcms/live-preview-vue\"",
|
||||||
"build:next": "turbo build --filter \"@payloadcms/next\"",
|
"build:next": "turbo build --filter \"@payloadcms/next\"",
|
||||||
"build:payload": "turbo build --filter payload",
|
"build:payload": "turbo build --filter payload",
|
||||||
"build:plugin-cloud": "turbo build --filter \"@payloadcms/plugin-cloud\"",
|
"build:payload-cloud": "turbo build --filter \"@payloadcms/payload-cloud\"",
|
||||||
"build:plugin-cloud-storage": "turbo build --filter \"@payloadcms/plugin-cloud-storage\"",
|
"build:plugin-cloud-storage": "turbo build --filter \"@payloadcms/plugin-cloud-storage\"",
|
||||||
"build:plugin-form-builder": "turbo build --filter \"@payloadcms/plugin-form-builder\"",
|
"build:plugin-form-builder": "turbo build --filter \"@payloadcms/plugin-form-builder\"",
|
||||||
"build:plugin-nested-docs": "turbo build --filter \"@payloadcms/plugin-nested-docs\"",
|
"build:plugin-nested-docs": "turbo build --filter \"@payloadcms/plugin-nested-docs\"",
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ async function installDeps(projectDir: string, packageManager: PackageManager, d
|
|||||||
'payload',
|
'payload',
|
||||||
'@payloadcms/next',
|
'@payloadcms/next',
|
||||||
'@payloadcms/richtext-lexical',
|
'@payloadcms/richtext-lexical',
|
||||||
'@payloadcms/plugin-cloud',
|
'@payloadcms/payload-cloud',
|
||||||
].map((pkg) => `${pkg}@beta`)
|
].map((pkg) => `${pkg}@beta`)
|
||||||
|
|
||||||
packagesToInstall.push(`@payloadcms/db-${dbType}@beta`)
|
packagesToInstall.push(`@payloadcms/db-${dbType}@beta`)
|
||||||
|
|||||||
@@ -82,8 +82,8 @@ const vercelBlobStorageReplacement: StorageAdapterReplacement = {
|
|||||||
|
|
||||||
const payloadCloudReplacement: StorageAdapterReplacement = {
|
const payloadCloudReplacement: StorageAdapterReplacement = {
|
||||||
configReplacement: [' payloadCloudPlugin(),'],
|
configReplacement: [' payloadCloudPlugin(),'],
|
||||||
importReplacement: "import { payloadCloudPlugin } from '@payloadcms/plugin-cloud'",
|
importReplacement: "import { payloadCloudPlugin } from '@payloadcms/payload-cloud'",
|
||||||
packageName: '@payloadcms/plugin-cloud',
|
packageName: '@payloadcms/payload-cloud',
|
||||||
}
|
}
|
||||||
|
|
||||||
// Removes placeholders
|
// Removes placeholders
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"lint:fix": "eslint . --fix",
|
"lint:fix": "eslint . --fix",
|
||||||
"prepack": "pnpm clean && pnpm turbo build",
|
"prepack": "pnpm clean && pnpm turbo build",
|
||||||
"prepublishOnly": "pnpm clean && pnpm turbo build",
|
"prepublishOnly": "pnpm clean && pnpm turbo build --filter=./",
|
||||||
"renamePredefinedMigrations": "node --no-deprecation --import @swc-node/register/esm-register ./scripts/renamePredefinedMigrations.ts"
|
"renamePredefinedMigrations": "node --no-deprecation --import @swc-node/register/esm-register ./scripts/renamePredefinedMigrations.ts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ Payload Cloud provides a caching for all upload collections by default through C
|
|||||||
|
|
||||||
Add the plugin to your Payload config
|
Add the plugin to your Payload config
|
||||||
|
|
||||||
`yarn add @payloadcms/plugin-cloud`
|
`yarn add @payloadcms/payload-cloud`
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import { payloadCloud } from '@payloadcms/plugin-cloud'
|
import { payloadCloud } from '@payloadcms/payload-cloud'
|
||||||
import { buildConfig } from 'payload'
|
import { buildConfig } from 'payload'
|
||||||
|
|
||||||
export default buildConfig({
|
export default buildConfig({
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@payloadcms/plugin-cloud",
|
"name": "@payloadcms/payload-cloud",
|
||||||
"version": "3.0.0-beta.118",
|
"version": "3.0.0-beta.118",
|
||||||
"description": "The official Payload Cloud plugin",
|
"description": "The official Payload Cloud plugin",
|
||||||
"homepage": "https://payloadcms.com",
|
"homepage": "https://payloadcms.com",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/payloadcms/payload.git",
|
"url": "https://github.com/payloadcms/payload.git",
|
||||||
"directory": "packages/plugin-cloud"
|
"directory": "packages/payload-cloud"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@@ -22,6 +22,7 @@ export const payloadCloudEmail = async (
|
|||||||
// Check if already has email configuration
|
// Check if already has email configuration
|
||||||
|
|
||||||
if (args.config.email) {
|
if (args.config.email) {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.log(
|
console.log(
|
||||||
'Payload Cloud Email is enabled but email configuration is already provided in Payload config. If this is intentional, set `email: false` in the Payload Cloud plugin options.',
|
'Payload Cloud Email is enabled but email configuration is already provided in Payload config. If this is intentional, set `email: false` in the Payload Cloud plugin options.',
|
||||||
)
|
)
|
||||||
@@ -37,6 +38,7 @@ export const payloadCloudEmail = async (
|
|||||||
const customDomains = customDomainEnvs.map((e) => process.env[e]).filter(Boolean)
|
const customDomains = customDomainEnvs.map((e) => process.env[e]).filter(Boolean)
|
||||||
|
|
||||||
if (customDomains.length) {
|
if (customDomains.length) {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.log(
|
console.log(
|
||||||
`Configuring Payload Cloud Email for ${[defaultDomain, ...(customDomains || [])].join(', ')}`,
|
`Configuring Payload Cloud Email for ${[defaultDomain, ...(customDomains || [])].join(', ')}`,
|
||||||
)
|
)
|
||||||
@@ -30,7 +30,7 @@ export const authAsCognitoUser = async (
|
|||||||
|
|
||||||
const result: CognitoUserSession = await new Promise((resolve, reject) => {
|
const result: CognitoUserSession = await new Promise((resolve, reject) => {
|
||||||
cognitoUser.authenticateUser(authenticationDetails, {
|
cognitoUser.authenticateUser(authenticationDetails, {
|
||||||
onFailure: (err) => {
|
onFailure: (err: Error) => {
|
||||||
reject(err)
|
reject(err)
|
||||||
},
|
},
|
||||||
onSuccess: (res) => {
|
onSuccess: (res) => {
|
||||||
@@ -43,7 +43,7 @@ export const getStorageClient: GetStorageClient = async () => {
|
|||||||
|
|
||||||
const credentials = await cognitoIdentity.config.credentials()
|
const credentials = await cognitoIdentity.config.credentials()
|
||||||
|
|
||||||
// @ts-expect-error
|
// @ts-expect-error - Incorrect AWS types
|
||||||
identityID = credentials.identityId
|
identityID = credentials.identityId
|
||||||
|
|
||||||
storageClient = new AWS.S3({
|
storageClient = new AWS.S3({
|
||||||
@@ -11,7 +11,7 @@ export const PAYLOAD_PACKAGE_LIST = [
|
|||||||
'@payloadcms/live-preview',
|
'@payloadcms/live-preview',
|
||||||
'@payloadcms/next/utilities',
|
'@payloadcms/next/utilities',
|
||||||
'@payloadcms/plugin-cloud-storage',
|
'@payloadcms/plugin-cloud-storage',
|
||||||
'@payloadcms/plugin-cloud',
|
'@payloadcms/payload-cloud',
|
||||||
'@payloadcms/plugin-form-builder',
|
'@payloadcms/plugin-form-builder',
|
||||||
'@payloadcms/plugin-nested-docs',
|
'@payloadcms/plugin-nested-docs',
|
||||||
'@payloadcms/plugin-redirects',
|
'@payloadcms/plugin-redirects',
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
export const payloadCloud = () => (config) => config
|
|
||||||
6
pnpm-lock.yaml
generated
6
pnpm-lock.yaml
generated
@@ -925,7 +925,7 @@ importers:
|
|||||||
specifier: 0.32.6
|
specifier: 0.32.6
|
||||||
version: 0.32.6
|
version: 0.32.6
|
||||||
|
|
||||||
packages/plugin-cloud:
|
packages/payload-cloud:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@aws-sdk/client-cognito-identity':
|
'@aws-sdk/client-cognito-identity':
|
||||||
specifier: ^3.614.0
|
specifier: ^3.614.0
|
||||||
@@ -1645,9 +1645,9 @@ importers:
|
|||||||
'@payloadcms/next':
|
'@payloadcms/next':
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../packages/next
|
version: link:../packages/next
|
||||||
'@payloadcms/plugin-cloud':
|
'@payloadcms/payload-cloud':
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../packages/plugin-cloud
|
version: link:../packages/payload-cloud
|
||||||
'@payloadcms/plugin-cloud-storage':
|
'@payloadcms/plugin-cloud-storage':
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../packages/plugin-cloud-storage
|
version: link:../packages/plugin-cloud-storage
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ export const packagePublishList = [
|
|||||||
'storage-uploadthing',
|
'storage-uploadthing',
|
||||||
|
|
||||||
// Plugins
|
// Plugins
|
||||||
|
'payload-cloud',
|
||||||
'plugin-cloud',
|
'plugin-cloud',
|
||||||
'plugin-cloud-storage',
|
'plugin-cloud-storage',
|
||||||
'plugin-form-builder',
|
'plugin-form-builder',
|
||||||
|
|||||||
@@ -342,7 +342,7 @@ import {
|
|||||||
} from '@payloadcms/db-postgres'
|
} from '@payloadcms/db-postgres'
|
||||||
import { handleMessage, mergeData, ready, subscribe, unsubscribe } from '@payloadcms/live-preview'
|
import { handleMessage, mergeData, ready, subscribe, unsubscribe } from '@payloadcms/live-preview'
|
||||||
import { useLivePreview } from '@payloadcms/live-preview-react'
|
import { useLivePreview } from '@payloadcms/live-preview-react'
|
||||||
import { createKey, getStorageClient, payloadCloud } from '@payloadcms/plugin-cloud'
|
import { createKey, getStorageClient, payloadCloud } from '@payloadcms/payload-cloud'
|
||||||
import { cloudStorage } from '@payloadcms/plugin-cloud-storage'
|
import { cloudStorage } from '@payloadcms/plugin-cloud-storage'
|
||||||
import { fields, getPaymentTotal } from '@payloadcms/plugin-form-builder'
|
import { fields, getPaymentTotal } from '@payloadcms/plugin-form-builder'
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
"@payloadcms/live-preview": "workspace:*",
|
"@payloadcms/live-preview": "workspace:*",
|
||||||
"@payloadcms/live-preview-react": "workspace:*",
|
"@payloadcms/live-preview-react": "workspace:*",
|
||||||
"@payloadcms/next": "workspace:*",
|
"@payloadcms/next": "workspace:*",
|
||||||
"@payloadcms/plugin-cloud": "workspace:*",
|
"@payloadcms/payload-cloud": "workspace:*",
|
||||||
"@payloadcms/plugin-cloud-storage": "workspace:*",
|
"@payloadcms/plugin-cloud-storage": "workspace:*",
|
||||||
"@payloadcms/plugin-form-builder": "workspace:*",
|
"@payloadcms/plugin-form-builder": "workspace:*",
|
||||||
"@payloadcms/plugin-nested-docs": "workspace:*",
|
"@payloadcms/plugin-nested-docs": "workspace:*",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { fileURLToPath } from 'node:url'
|
import { fileURLToPath } from 'node:url'
|
||||||
const filename = fileURLToPath(import.meta.url)
|
const filename = fileURLToPath(import.meta.url)
|
||||||
const dirname = path.dirname(filename)
|
const dirname = path.dirname(filename)
|
||||||
import { payloadCloudPlugin } from '@payloadcms/plugin-cloud'
|
import { payloadCloudPlugin } from '@payloadcms/payload-cloud'
|
||||||
import dotenv from 'dotenv'
|
import dotenv from 'dotenv'
|
||||||
import path from 'path'
|
import path from 'path'
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@ export const tgzToPkgNameMap = {
|
|||||||
'@payloadcms/live-preview': 'payloadcms-live-preview-*',
|
'@payloadcms/live-preview': 'payloadcms-live-preview-*',
|
||||||
'@payloadcms/live-preview-react': 'payloadcms-live-preview-react-*',
|
'@payloadcms/live-preview-react': 'payloadcms-live-preview-react-*',
|
||||||
'@payloadcms/next': 'payloadcms-next-*',
|
'@payloadcms/next': 'payloadcms-next-*',
|
||||||
'@payloadcms/plugin-cloud': 'payloadcms-plugin-cloud-*',
|
'@payloadcms/payload-cloud': 'payloadcms-payload-cloud-*',
|
||||||
'@payloadcms/plugin-cloud-storage': 'payloadcms-plugin-cloud-storage-*',
|
'@payloadcms/plugin-cloud-storage': 'payloadcms-plugin-cloud-storage-*',
|
||||||
'@payloadcms/plugin-form-builder': 'payloadcms-plugin-form-builder-*',
|
'@payloadcms/plugin-form-builder': 'payloadcms-plugin-form-builder-*',
|
||||||
'@payloadcms/plugin-nested-docs': 'payloadcms-plugin-nested-docs-*',
|
'@payloadcms/plugin-nested-docs': 'payloadcms-plugin-nested-docs-*',
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
"path": "../packages/plugin-cloud-storage"
|
"path": "../packages/plugin-cloud-storage"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "../packages/plugin-cloud"
|
"path": "../packages/payload-cloud"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "../packages/plugin-form-builder"
|
"path": "../packages/plugin-form-builder"
|
||||||
|
|||||||
@@ -137,7 +137,7 @@
|
|||||||
"path": "./packages/plugin-cloud-storage"
|
"path": "./packages/plugin-cloud-storage"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "./packages/plugin-cloud"
|
"path": "./packages/payload-cloud"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "./packages/plugin-form-builder"
|
"path": "./packages/plugin-form-builder"
|
||||||
|
|||||||
Reference in New Issue
Block a user