Adds new plugin-import-export initial version.
Allows for direct download and creation of downloadable collection data
stored to a json or csv uses the access control of the user creating the
request to make the file.
config options:
```ts
/**
* Collections to include the Import/Export controls in
* Defaults to all collections
*/
collections?: string[]
/**
* Enable to force the export to run synchronously
*/
disableJobsQueue?: boolean
/**
* This function takes the default export collection configured in the plugin and allows you to override it by modifying and returning it
* @param collection
* @returns collection
*/
overrideExportCollection?: (collection: CollectionOverride) => CollectionOverride
// payload.config.ts:
plugins: [
importExportPlugin({
collections: ['pages', 'users'],
overrideExportCollection: (collection) => {
collection.admin.group = 'System'
collection.upload.staticDir = path.resolve(dirname, 'uploads')
return collection
},
disableJobsQueue: true,
}),
],
```
---------
Co-authored-by: Jessica Chowdhury <jessica@trbl.design>
Co-authored-by: Kendell Joseph <kendelljoseph@gmail.com>
34 lines
1020 B
TypeScript
34 lines
1020 B
TypeScript
export const PAYLOAD_PACKAGE_LIST = [
|
|
'payload',
|
|
'@payloadcms/bundler-vite',
|
|
'@payloadcms/bundler-webpack',
|
|
'@payloadcms/db-mongodb',
|
|
'@payloadcms/db-postgres',
|
|
'@payloadcms/email-nodemailer',
|
|
'@payloadcms/email-resend',
|
|
'@payloadcms/graphql',
|
|
'@payloadcms/live-preview-react',
|
|
'@payloadcms/live-preview',
|
|
'@payloadcms/next/utilities',
|
|
'@payloadcms/plugin-cloud-storage',
|
|
'@payloadcms/payload-cloud',
|
|
'@payloadcms/plugin-form-builder',
|
|
'@payloadcms/plugin-import-export',
|
|
// '@payloadcms/plugin-multi-tenant',
|
|
'@payloadcms/plugin-nested-docs',
|
|
'@payloadcms/plugin-redirects',
|
|
'@payloadcms/plugin-search',
|
|
'@payloadcms/plugin-seo',
|
|
'@payloadcms/plugin-stripe',
|
|
'@payloadcms/plugin-zapier',
|
|
'@payloadcms/richtext-lexical',
|
|
'@payloadcms/richtext-slate',
|
|
'@payloadcms/storage-azure',
|
|
'@payloadcms/storage-gcs',
|
|
'@payloadcms/storage-s3',
|
|
'@payloadcms/storage-uploadthing',
|
|
'@payloadcms/storage-vercel-blob',
|
|
'@payloadcms/translations',
|
|
'@payloadcms/ui/shared',
|
|
]
|