Files
payloadcms/tsconfig.json
Dan Ribbens 4f822a439b feat: plugin-import-export initial work (#10795)
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>
2025-03-05 01:06:43 +00:00

92 lines
1.6 KiB
JSON

{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"composite": false,
"noEmit": true,
"baseUrl": ".",
},
"references": [
{
"path": "./packages/create-payload-app"
},
{
"path": "./packages/db-mongodb"
},
{
"path": "./packages/db-postgres"
},
{
"path": "./packages/drizzle"
},
{
"path": "./packages/graphql"
},
{
"path": "./packages/live-preview"
},
{
"path": "./packages/live-preview-react"
},
{
"path": "./packages/live-preview-vue"
},
{
"path": "./packages/next"
},
{
"path": "./packages/payload"
},
{
"path": "./packages/plugin-cloud-storage"
},
{
"path": "./packages/storage-s3"
},
{
"path": "./packages/payload-cloud"
},
{
"path": "./packages/plugin-form-builder"
},
{
"path": "./packages/plugin-nested-docs"
},
{
"path": "./packages/plugin-redirects"
},
{
"path": "./packages/plugin-search"
},
{
"path": "./packages/plugin-seo"
},
{
"path": "./packages/plugin-import-export"
},
{
"path": "./packages/plugin-stripe"
},
{
"path": "./packages/plugin-multi-tenant"
},
{
"path": "./packages/richtext-slate"
},
{
"path": "./packages/richtext-lexical"
},
{
"path": "./packages/translations"
},
{
"path": "./packages/ui"
},
],
"include": [
"${configDir}/src",
".next/types/**/*.ts",
"./scripts/**/*.ts",
]
}