payload 3.0.0-beta.68 → 3.0.0-beta.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/baseFields/email.js +1 -1
- package/dist/auth/baseFields/email.js.map +1 -1
- package/dist/collections/config/client.d.ts.map +1 -1
- package/dist/collections/config/client.js +1 -0
- package/dist/collections/config/client.js.map +1 -1
- package/dist/collections/dataloader.js.map +1 -1
- package/dist/config/sanitize.d.ts.map +1 -1
- package/dist/config/sanitize.js +2 -0
- package/dist/config/sanitize.js.map +1 -1
- package/dist/config/types.d.ts +4 -1
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js.map +1 -1
- package/dist/database/migrations/getPredefinedMigration.d.ts.map +1 -1
- package/dist/database/migrations/getPredefinedMigration.js +5 -2
- package/dist/database/migrations/getPredefinedMigration.js.map +1 -1
- package/dist/exports/components/utilities.d.ts +2 -0
- package/dist/exports/components/utilities.d.ts.map +1 -0
- package/dist/exports/components/utilities.js +2 -0
- package/dist/exports/components/utilities.js.map +1 -0
- package/dist/fields/config/client.d.ts.map +1 -1
- package/dist/fields/config/types.d.ts +1 -0
- package/dist/fields/config/types.d.ts.map +1 -1
- package/dist/fields/config/types.js.map +1 -1
- package/dist/fields/validations.d.ts.map +1 -1
- package/dist/uploads/cropImage.d.ts +4 -1
- package/dist/uploads/cropImage.d.ts.map +1 -1
- package/dist/uploads/cropImage.js +8 -2
- package/dist/uploads/cropImage.js.map +1 -1
- package/dist/uploads/generateFileData.d.ts.map +1 -1
- package/dist/uploads/generateFileData.js +12 -3
- package/dist/uploads/generateFileData.js.map +1 -1
- package/dist/uploads/imageResizer.d.ts +3 -1
- package/dist/uploads/imageResizer.d.ts.map +1 -1
- package/dist/uploads/imageResizer.js +15 -4
- package/dist/uploads/imageResizer.js.map +1 -1
- package/dist/uploads/optionallyAppendMetadata.d.ts +12 -0
- package/dist/uploads/optionallyAppendMetadata.d.ts.map +1 -0
- package/dist/uploads/optionallyAppendMetadata.js +15 -0
- package/dist/uploads/optionallyAppendMetadata.js.map +1 -0
- package/dist/uploads/types.d.ts +12 -0
- package/dist/uploads/types.d.ts.map +1 -1
- package/dist/uploads/types.js.map +1 -1
- package/dist/utilities/configToJSONSchema.d.ts.map +1 -1
- package/dist/utilities/configToJSONSchema.js +105 -72
- package/dist/utilities/configToJSONSchema.js.map +1 -1
- package/dist/utilities/createLocalReq.d.ts.map +1 -1
- package/dist/utilities/createLocalReq.js +2 -1
- package/dist/utilities/createLocalReq.js.map +1 -1
- package/dist/versions/enforceMaxVersions.d.ts.map +1 -1
- package/dist/versions/enforceMaxVersions.js +2 -0
- package/dist/versions/enforceMaxVersions.js.map +1 -1
- package/dist/versions/saveVersion.d.ts.map +1 -1
- package/dist/versions/saveVersion.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/auth/baseFields/email.ts"],"sourcesContent":["import type { Field } from '../../fields/config/types.js'\n\nimport { email } from '../../fields/validations.js'\n\nexport const emailField = ({ required = true }: { required?: boolean }): Field => ({\n name: 'email',\n type: 'email',\n admin: {\n components: {\n Field:
|
|
1
|
+
{"version":3,"sources":["../../../src/auth/baseFields/email.ts"],"sourcesContent":["import type { Field } from '../../fields/config/types.js'\n\nimport { email } from '../../fields/validations.js'\n\nexport const emailField = ({ required = true }: { required?: boolean }): Field => ({\n name: 'email',\n type: 'email',\n admin: {\n components: {\n Field: () => null,\n },\n },\n hooks: {\n beforeChange: [\n ({ value }) => {\n if (value) {\n return value.toLowerCase().trim()\n }\n },\n ],\n },\n label: ({ t }) => t('general:email'),\n required,\n unique: true,\n validate: email,\n})\n"],"names":["email","emailField","required","name","type","admin","components","Field","hooks","beforeChange","value","toLowerCase","trim","label","t","unique","validate"],"mappings":"AAEA,SAASA,KAAK,QAAQ,8BAA6B;AAEnD,OAAO,MAAMC,aAAa,CAAC,EAAEC,WAAW,IAAI,EAA0B,GAAa,CAAA;QACjFC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GAAG,QAAQ,GAAG,8BAA8B,CAAC,CAAA;AAExF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAEzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AACtE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAA;AAI3D,eAAO,MAAM,4BAA4B,uBAGtC;IACD,UAAU,EAAE,yBAAyB,CAAA;IACrC,CAAC,EAAE,SAAS,CAAA;CACb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAV4C,MAAO,aAEhD;;;;;;kCAMiC,CAAC;;;;;;;;;;;;;;;;;;;;wCARc,aAEhD;;;;;;kCAMiC,CAAC;;;;;;;;;;;;;;;;;;;;wCARc,aAEhD;;;;;;kCAMiC,CAAC;;;;;;;;;;;;;;;;;;;;wCARc,aAEhD;;;;;;kCAMiC,CAAC;;;;;;;;;;;;;;;;;;;;wCARc,aAEhD;;;;;;kCAMiC,CAAC;;;;;;;;;;;;;;;;;;;;;wCARc,aAEhD;;;;;;kCAMiC,CAAC;;;;;;;;;;;;;;;;;;;;+BA8E0/J,MAAO,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAjCtiK,CAAA;;4BAGM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoBpB,CAAA;AAED,eAAO,MAAM,6BAA6B,wBAGvC;IACD,WAAW,EAAE,yBAAyB,EAAE,CAAA;IACxC,CAAC,EAAE,SAAS,CAAA;CACb,KAAG,sBAAsB,EACwD,CAAA"}
|
|
@@ -25,6 +25,7 @@ export const createClientCollectionConfig = ({ collection, t })=>{
|
|
|
25
25
|
delete sanitized.upload.handlers;
|
|
26
26
|
delete sanitized.upload.adminThumbnail;
|
|
27
27
|
delete sanitized.upload.externalFileHeaderFilter;
|
|
28
|
+
delete sanitized.upload.withMetadata;
|
|
28
29
|
}
|
|
29
30
|
if ('auth' in sanitized && typeof sanitized.auth === 'object') {
|
|
30
31
|
sanitized.auth = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/collections/config/client.ts"],"sourcesContent":["import type { LivePreviewConfig, ServerOnlyLivePreviewProperties } from '../../config/types.js'\n\nexport type ServerOnlyCollectionProperties = keyof Pick<\n SanitizedCollectionConfig,\n 'access' | 'custom' | 'endpoints' | 'hooks'\n>\n\nexport type ServerOnlyCollectionAdminProperties = keyof Pick<\n SanitizedCollectionConfig['admin'],\n 'components' | 'hidden' | 'preview'\n>\n\nexport type ClientCollectionConfig = {\n admin: {\n livePreview?: Omit<LivePreviewConfig, ServerOnlyLivePreviewProperties>\n } & Omit<\n SanitizedCollectionConfig['admin'],\n 'fields' | 'livePreview' | ServerOnlyCollectionAdminProperties\n >\n fields: ClientFieldConfig[]\n} & Omit<SanitizedCollectionConfig, 'admin' | 'fields' | ServerOnlyCollectionProperties>\n\nimport type { TFunction } from '@payloadcms/translations'\n\nimport type { ClientFieldConfig } from '../../fields/config/client.js'\nimport type { SanitizedCollectionConfig } from './types.js'\n\nimport { createClientFieldConfigs } from '../../fields/config/client.js'\n\nexport const createClientCollectionConfig = ({\n collection,\n t,\n}: {\n collection: SanitizedCollectionConfig\n t: TFunction\n}) => {\n const sanitized = { ...collection }\n sanitized.fields = createClientFieldConfigs({ fields: sanitized.fields, t })\n\n const serverOnlyCollectionProperties: Partial<ServerOnlyCollectionProperties>[] = [\n 'hooks',\n 'access',\n 'endpoints',\n 'custom',\n // `upload`\n // `admin`\n // are all handled separately\n ]\n\n serverOnlyCollectionProperties.forEach((key) => {\n if (key in sanitized) {\n delete sanitized[key]\n }\n })\n\n if ('upload' in sanitized && typeof sanitized.upload === 'object') {\n sanitized.upload = { ...sanitized.upload }\n delete sanitized.upload.handlers\n delete sanitized.upload.adminThumbnail\n delete sanitized.upload.externalFileHeaderFilter\n }\n\n if ('auth' in sanitized && typeof sanitized.auth === 'object') {\n sanitized.auth = { ...sanitized.auth }\n delete sanitized.auth.strategies\n delete sanitized.auth.forgotPassword\n delete sanitized.auth.verify\n }\n\n if (sanitized.labels) {\n Object.entries(sanitized.labels).forEach(([labelType, collectionLabel]) => {\n if (typeof collectionLabel === 'function') {\n sanitized.labels[labelType] = collectionLabel({ t })\n }\n })\n }\n\n if ('admin' in sanitized) {\n sanitized.admin = { ...sanitized.admin }\n\n const serverOnlyCollectionAdminProperties: Partial<ServerOnlyCollectionAdminProperties>[] = [\n 'components',\n 'hidden',\n 'preview',\n // `livePreview` is handled separately\n ]\n\n serverOnlyCollectionAdminProperties.forEach((key) => {\n if (key in sanitized.admin) {\n delete sanitized.admin[key]\n }\n })\n\n if ('livePreview' in sanitized.admin) {\n sanitized.admin.livePreview = { ...sanitized.admin.livePreview }\n delete sanitized.admin.livePreview.url\n }\n }\n\n return sanitized\n}\n\nexport const createClientCollectionConfigs = ({\n collections,\n t,\n}: {\n collections: SanitizedCollectionConfig[]\n t: TFunction\n}): ClientCollectionConfig[] =>\n collections.map((collection) => createClientCollectionConfig({ collection, t }))\n"],"names":["createClientFieldConfigs","createClientCollectionConfig","collection","t","sanitized","fields","serverOnlyCollectionProperties","forEach","key","upload","handlers","adminThumbnail","externalFileHeaderFilter","auth","strategies","forgotPassword","verify","labels","Object","entries","labelType","collectionLabel","admin","serverOnlyCollectionAdminProperties","livePreview","url","createClientCollectionConfigs","collections","map"],"mappings":"AA2BA,SAASA,wBAAwB,QAAQ,gCAA+B;AAExE,OAAO,MAAMC,+BAA+B,CAAC,EAC3CC,UAAU,EACVC,CAAC,EAIF;IACC,MAAMC,YAAY;QAAE,GAAGF,UAAU;IAAC;IAClCE,UAAUC,MAAM,GAAGL,yBAAyB;QAAEK,QAAQD,UAAUC,MAAM;QAAEF;IAAE;IAE1E,MAAMG,iCAA4E;QAChF;QACA;QACA;QACA;KAID;IAEDA,+BAA+BC,OAAO,CAAC,CAACC;QACtC,IAAIA,OAAOJ,WAAW;YACpB,OAAOA,SAAS,CAACI,IAAI;QACvB;IACF;IAEA,IAAI,YAAYJ,aAAa,OAAOA,UAAUK,MAAM,KAAK,UAAU;QACjEL,UAAUK,MAAM,GAAG;YAAE,GAAGL,UAAUK,MAAM;QAAC;QACzC,OAAOL,UAAUK,MAAM,CAACC,QAAQ;QAChC,OAAON,UAAUK,MAAM,CAACE,cAAc;QACtC,OAAOP,UAAUK,MAAM,CAACG,wBAAwB;
|
|
1
|
+
{"version":3,"sources":["../../../src/collections/config/client.ts"],"sourcesContent":["import type { LivePreviewConfig, ServerOnlyLivePreviewProperties } from '../../config/types.js'\n\nexport type ServerOnlyCollectionProperties = keyof Pick<\n SanitizedCollectionConfig,\n 'access' | 'custom' | 'endpoints' | 'hooks'\n>\n\nexport type ServerOnlyCollectionAdminProperties = keyof Pick<\n SanitizedCollectionConfig['admin'],\n 'components' | 'hidden' | 'preview'\n>\n\nexport type ClientCollectionConfig = {\n admin: {\n livePreview?: Omit<LivePreviewConfig, ServerOnlyLivePreviewProperties>\n } & Omit<\n SanitizedCollectionConfig['admin'],\n 'fields' | 'livePreview' | ServerOnlyCollectionAdminProperties\n >\n fields: ClientFieldConfig[]\n} & Omit<SanitizedCollectionConfig, 'admin' | 'fields' | ServerOnlyCollectionProperties>\n\nimport type { TFunction } from '@payloadcms/translations'\n\nimport type { ClientFieldConfig } from '../../fields/config/client.js'\nimport type { SanitizedCollectionConfig } from './types.js'\n\nimport { createClientFieldConfigs } from '../../fields/config/client.js'\n\nexport const createClientCollectionConfig = ({\n collection,\n t,\n}: {\n collection: SanitizedCollectionConfig\n t: TFunction\n}) => {\n const sanitized = { ...collection }\n sanitized.fields = createClientFieldConfigs({ fields: sanitized.fields, t })\n\n const serverOnlyCollectionProperties: Partial<ServerOnlyCollectionProperties>[] = [\n 'hooks',\n 'access',\n 'endpoints',\n 'custom',\n // `upload`\n // `admin`\n // are all handled separately\n ]\n\n serverOnlyCollectionProperties.forEach((key) => {\n if (key in sanitized) {\n delete sanitized[key]\n }\n })\n\n if ('upload' in sanitized && typeof sanitized.upload === 'object') {\n sanitized.upload = { ...sanitized.upload }\n delete sanitized.upload.handlers\n delete sanitized.upload.adminThumbnail\n delete sanitized.upload.externalFileHeaderFilter\n delete sanitized.upload.withMetadata\n }\n\n if ('auth' in sanitized && typeof sanitized.auth === 'object') {\n sanitized.auth = { ...sanitized.auth }\n delete sanitized.auth.strategies\n delete sanitized.auth.forgotPassword\n delete sanitized.auth.verify\n }\n\n if (sanitized.labels) {\n Object.entries(sanitized.labels).forEach(([labelType, collectionLabel]) => {\n if (typeof collectionLabel === 'function') {\n sanitized.labels[labelType] = collectionLabel({ t })\n }\n })\n }\n\n if ('admin' in sanitized) {\n sanitized.admin = { ...sanitized.admin }\n\n const serverOnlyCollectionAdminProperties: Partial<ServerOnlyCollectionAdminProperties>[] = [\n 'components',\n 'hidden',\n 'preview',\n // `livePreview` is handled separately\n ]\n\n serverOnlyCollectionAdminProperties.forEach((key) => {\n if (key in sanitized.admin) {\n delete sanitized.admin[key]\n }\n })\n\n if ('livePreview' in sanitized.admin) {\n sanitized.admin.livePreview = { ...sanitized.admin.livePreview }\n delete sanitized.admin.livePreview.url\n }\n }\n\n return sanitized\n}\n\nexport const createClientCollectionConfigs = ({\n collections,\n t,\n}: {\n collections: SanitizedCollectionConfig[]\n t: TFunction\n}): ClientCollectionConfig[] =>\n collections.map((collection) => createClientCollectionConfig({ collection, t }))\n"],"names":["createClientFieldConfigs","createClientCollectionConfig","collection","t","sanitized","fields","serverOnlyCollectionProperties","forEach","key","upload","handlers","adminThumbnail","externalFileHeaderFilter","withMetadata","auth","strategies","forgotPassword","verify","labels","Object","entries","labelType","collectionLabel","admin","serverOnlyCollectionAdminProperties","livePreview","url","createClientCollectionConfigs","collections","map"],"mappings":"AA2BA,SAASA,wBAAwB,QAAQ,gCAA+B;AAExE,OAAO,MAAMC,+BAA+B,CAAC,EAC3CC,UAAU,EACVC,CAAC,EAIF;IACC,MAAMC,YAAY;Q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OAAOnB,UAAUmB,KAAK,CAACf,IAAI;YAC7B;QACF;QAEA,IAAI,iBAAiBJ,UAAUmB,KAAK,EAAE;YACpCnB,UAAUmB,KAAK,CAACE,WAAW,GAAG;gBAAE,GAAGrB,UAAUmB,KAAK,CAACE,WAAW;YAAC;YAC/D,OAAOrB,UAAUmB,KAAK,CAACE,WAAW,CAACC,GAAG;QACxC;IACF;IAEA,OAAOtB;AACT,EAAC;AAED,OAAO,MAAMuB,gCAAgC,CAAC,EAC5CC,WAAW,EACXzB,CAAC,EAIF,GACCyB,YAAYC,GAAG,CAAC,CAAC3B,aAAeD,6BAA6B;YAAEC;YAAYC;QAAE,IAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/dataloader.ts"],"sourcesContent":["import type { BatchLoadFn } from 'dataloader'\n\nimport DataLoader from 'dataloader'\n\nimport type { JsonValue, PayloadRequest } from '../types/index.js'\nimport type { TypeWithID } from './config/types.js'\n\nimport { isValidID } from '../utilities/isValidID.js'\n\n// Payload uses `dataloader` to solve the classic GraphQL N+1 problem.\n\n// We keep a list of all documents requested to be populated for any given request\n// and then batch together documents within the same collection,\n// making only 1 find per each collection, rather than `findByID` per each requested doc.\n\n// This dramatically improves performance for REST and Local API `depth` populations,\n// and also ensures complex GraphQL queries perform lightning-fast.\n\nconst batchAndLoadDocs =\n (req: PayloadRequest): BatchLoadFn<string, TypeWithID> =>\n async (keys: string[]): Promise<TypeWithID[]> => {\n const { payload } = req\n\n // Create docs array of same length as keys, using null as value\n // We will replace nulls with injected docs as they are retrieved\n const docs: (TypeWithID | null)[] = keys.map(() => null)\n\n /**\n * Batch IDs by their `find` args\n * so we can make one find query per combination of collection, depth, locale, and fallbackLocale.\n *\n * Resulting shape will be as follows:\n {\n // key is stringified set of find args\n '[null,\"pages\",2,0,\"es\",\"en\",false,false]': [\n // value is array of IDs to find with these args\n 'q34tl23462346234524',\n '435523540194324280',\n '2346245j35l3j5234532li',\n ],\n // etc\n };\n *\n **/\n\n const batchByFindArgs = keys.reduce((batches, key) => {\n const [\n transactionID,\n collection,\n id,\n depth,\n currentDepth,\n locale,\n fallbackLocale,\n overrideAccess,\n showHiddenFields,\n draft,\n ] = JSON.parse(key)\n\n const batchKeyArray = [\n transactionID,\n collection,\n depth,\n currentDepth,\n locale,\n fallbackLocale,\n overrideAccess,\n showHiddenFields,\n draft,\n ]\n\n const batchKey = JSON.stringify(batchKeyArray)\n\n const idType = payload.collections?.[collection].customIDType || payload.db.defaultIDType\n\n let sanitizedID: number | string = id\n\n if (idType === 'number') sanitizedID = parseFloat(id)\n\n if (isValidID(sanitizedID, idType)) {\n return {\n ...batches,\n [batchKey]: [...(batches[batchKey] || []), sanitizedID],\n }\n }\n return batches\n }, {})\n\n // Run find requests one after another, so as to not hang transactions\n\n await Object.entries(batchByFindArgs).reduce(async (priorFind, [batchKey, ids]) => {\n await priorFind\n\n const [\n transactionID,\n collection,\n depth,\n currentDepth,\n locale,\n fallbackLocale,\n overrideAccess,\n showHiddenFields,\n draft,\n ] = JSON.parse(batchKey)\n\n req.transactionID = transactionID\n\n const result = await payload.find({\n collection,\n currentDepth,\n depth,\n disableErrors: true,\n draft,\n fallbackLocale,\n locale,\n overrideAccess: Boolean(overrideAccess),\n pagination: false,\n req,\n showHiddenFields: Boolean(showHiddenFields),\n where: {\n id: {\n in: ids
|
|
1
|
+
{"version":3,"sources":["../../src/collections/dataloader.ts"],"sourcesContent":["import type { BatchLoadFn } from 'dataloader'\n\nimport DataLoader from 'dataloader'\n\nimport type { JsonValue, PayloadRequest } from '../types/index.js'\nimport type { TypeWithID } from './config/types.js'\n\nimport { isValidID } from '../utilities/isValidID.js'\n\n// Payload uses `dataloader` to solve the classic GraphQL N+1 problem.\n\n// We keep a list of all documents requested to be populated for any given request\n// and then batch together documents within the same collection,\n// making only 1 find per each collection, rather than `findByID` per each requested doc.\n\n// This dramatically improves performance for REST and Local API `depth` populations,\n// and also ensures complex GraphQL queries perform lightning-fast.\n\nconst batchAndLoadDocs =\n (req: PayloadRequest): BatchLoadFn<string, TypeWithID> =>\n async (keys: string[]): Promise<TypeWithID[]> => {\n const { payload } = req\n\n // Create docs array of same length as keys, using null as value\n // We will replace nulls with injected docs as they are retrieved\n const docs: (TypeWithID | null)[] = keys.map(() => null)\n\n /**\n * Batch IDs by their `find` args\n * so we can make one find query per combination of collection, depth, locale, and fallbackLocale.\n *\n * Resulting shape will be as follows:\n {\n // key is stringified set of find args\n '[null,\"pages\",2,0,\"es\",\"en\",false,false]': [\n // value is array of IDs to find with these args\n 'q34tl23462346234524',\n '435523540194324280',\n '2346245j35l3j5234532li',\n ],\n // etc\n };\n *\n **/\n\n const batchByFindArgs = keys.reduce((batches, key) => {\n const [\n transactionID,\n collection,\n id,\n depth,\n currentDepth,\n locale,\n fallbackLocale,\n overrideAccess,\n showHiddenFields,\n draft,\n ] = JSON.parse(key)\n\n const batchKeyArray = [\n transactionID,\n collection,\n depth,\n currentDepth,\n locale,\n fallbackLocale,\n overrideAccess,\n showHiddenFields,\n draft,\n ]\n\n const batchKey = JSON.stringify(batchKeyArray)\n\n const idType = payload.collections?.[collection].customIDType || payload.db.defaultIDType\n\n let sanitizedID: number | string = id\n\n if (idType === 'number') sanitizedID = parseFloat(id)\n\n if (isValidID(sanitizedID, idType)) {\n return {\n ...batches,\n [batchKey]: [...(batches[batchKey] || []), sanitizedID],\n }\n }\n return batches\n }, {})\n\n // Run find requests one after another, so as to not hang transactions\n\n await Object.entries(batchByFindArgs).reduce(async (priorFind, [batchKey, ids]) => {\n await priorFind\n\n const [\n transactionID,\n collection,\n depth,\n currentDepth,\n locale,\n fallbackLocale,\n overrideAccess,\n showHiddenFields,\n draft,\n ] = JSON.parse(batchKey)\n\n req.transactionID = transactionID\n\n const result = await payload.find({\n collection,\n currentDepth,\n depth,\n disableErrors: true,\n draft,\n fallbackLocale,\n locale,\n overrideAccess: Boolean(overrideAccess),\n pagination: false,\n req,\n showHiddenFields: Boolean(showHiddenFields),\n where: {\n id: {\n in: ids,\n },\n },\n })\n\n // For each returned doc, find index in original keys\n // Inject doc within docs array if index exists\n\n result.docs.forEach((doc) => {\n const docKey = createDataloaderCacheKey({\n collectionSlug: collection,\n currentDepth,\n depth,\n docID: doc.id,\n draft,\n fallbackLocale: req.fallbackLocale,\n locale: req.locale,\n overrideAccess,\n showHiddenFields,\n transactionID: req.transactionID,\n })\n const docsIndex = keys.findIndex((key) => key === docKey)\n\n if (docsIndex > -1) {\n docs[docsIndex] = doc\n }\n })\n }, Promise.resolve())\n\n // Return docs array,\n // which has now been injected with all fetched docs\n // and should match the length of the incoming keys arg\n return docs\n }\n\nexport const getDataLoader = (req: PayloadRequest) => new DataLoader(batchAndLoadDocs(req))\n\ntype CreateCacheKeyArgs = {\n collectionSlug: string\n currentDepth: number\n depth: number\n docID: number | string\n draft: boolean\n fallbackLocale: string\n locale: string\n overrideAccess: boolean\n showHiddenFields: boolean\n transactionID: Promise<number | string> | number | string\n}\nexport const createDataloaderCacheKey = ({\n collectionSlug,\n currentDepth,\n depth,\n docID,\n draft,\n fallbackLocale,\n locale,\n overrideAccess,\n showHiddenFields,\n transactionID,\n}: CreateCacheKeyArgs): string =>\n JSON.stringify([\n transactionID,\n collectionSlug,\n docID,\n depth,\n currentDepth,\n locale,\n fallbackLocale,\n overrideAccess,\n showHiddenFields,\n draft,\n ])\n"],"names":["DataLoader","isValidID","batchAndLoadDocs","req","keys","payload","docs","map","batchByFindArgs","reduce","batches","key","transactionID","collection","id","depth","currentDepth","locale","fallbackLocale","overrideAccess","showHiddenFields","draft","JSON","parse","batchKeyArray","batchKey","stringify","idType","collections","customIDType","db","defaultIDType","sanitizedID","parseFloat","Object","entries","priorFind","ids","result","find","disableErrors","Boolean","pagination","where","in","forEach","doc","docKey","createDataloaderCacheKey","collectionSlug","docID","docsIndex","findIndex","Promise","resolve","getDataLoader"],"mappings":"AAEA,OAAOA,gBAAgB,aAAY;AAKnC,SAASC,SAAS,QAAQ,4BAA2B;AAErD,sEAA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AG;gBACAD;gBACAyB,eAAe;gBACfnB;gBACAH;gBACAD;gBACAE,gBAAgBsB,QAAQtB;gBACxBuB,YAAY;gBACZvC;gBACAiB,kBAAkBqB,QAAQrB;gBAC1BuB,OAAO;oBACL7B,IAAI;wBACF8B,IAAIP;oBACN;gBACF;YACF;YAEA,qDAAqD;YACrD,+CAA+C;YAE/CC,OAAOhC,IAAI,CAACuC,OAAO,CAAC,CAACC;gBACnB,MAAMC,SAASC,yBAAyB;oBACtCC,gBAAgBpC;oBAChBG;oBACAD;oBACAmC,OAAOJ,IAAIhC,EAAE;oBACbO;oBACAH,gBAAgBf,IAAIe,cAAc;oBAClCD,QAAQd,IAAIc,MAAM;oBAClBE;oBACAC;oBACAR,eAAeT,IAAIS,aAAa;gBAClC;gBACA,MAAMuC,YAAY/C,KAAKgD,SAAS,CAAC,CAACzC,MAAQA,QAAQoC;gBAElD,IAAII,YAAY,CAAC,GAAG;oBAClB7C,IAAI,CAAC6C,UAAU,GAAGL;gBACpB;YACF;QACF,GAAGO,QAAQC,OAAO;QAElB,qBAAqB;QACrB,oDAAoD;QACpD,uDAAuD;QACvD,OAAOhD;IACT;AAEF,OAAO,MAAMiD,gBAAgB,CAACpD,MAAwB,IAAIH,WAAWE,iBAAiBC,MAAK;AAc3F,OAAO,MAAM6C,2BAA2B,CAAC,EACvCC,cAAc,EACdjC,YAAY,EACZD,KAAK,EACLmC,KAAK,EACL7B,KAAK,EACLH,cAAc,EACdD,MAAM,EACNE,cAAc,EACdC,gBAAgB,EAChBR,aAAa,EACM,GACnBU,KAAKI,SAAS,CAAC;QACbd;QACAqC;QACAC;QACAnC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;KACD,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../src/config/sanitize.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,MAAM,EAGN,eAAe,EAChB,MAAM,YAAY,CAAA;AAsCnB,eAAO,MAAM,cAAc,mBAA0B,MAAM,KAAG,OAAO,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../src/config/sanitize.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,MAAM,EAGN,eAAe,EAChB,MAAM,YAAY,CAAA;AAsCnB,eAAO,MAAM,cAAc,mBAA0B,MAAM,KAAG,OAAO,CAAC,eAAe,CAgIpF,CAAA"}
|
package/dist/config/sanitize.js
CHANGED
|
@@ -100,6 +100,8 @@ export const sanitizeConfig = async (incomingConfig)=>{
|
|
|
100
100
|
adapters: []
|
|
101
101
|
};
|
|
102
102
|
config.upload.adapters = Array.from(new Set(config.collections.map((c)=>c.upload?.adapter).filter(Boolean)));
|
|
103
|
+
// Pass through the email config as is so adapters don't break
|
|
104
|
+
if (incomingConfig.email) config.email = incomingConfig.email;
|
|
103
105
|
/*
|
|
104
106
|
Execute richText sanitization
|
|
105
107
|
*/ if (typeof incomingConfig.editor === 'function') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/config/sanitize.ts"],"sourcesContent":["import type { AcceptedLanguages } from '@payloadcms/translations'\n\nimport { en } from '@payloadcms/translations/languages/en'\nimport { deepMergeSimple } from '@payloadcms/translations/utilities'\n\nimport type {\n Config,\n LocalizationConfigWithLabels,\n LocalizationConfigWithNoLabels,\n SanitizedConfig,\n} from './types.js'\n\nimport { defaultUserCollection } from '../auth/defaultUser.js'\nimport { sanitizeCollection } from '../collections/config/sanitize.js'\nimport { migrationsCollection } from '../database/migrations/migrationsCollection.js'\nimport { InvalidConfiguration } from '../errors/index.js'\nimport { sanitizeGlobals } from '../globals/config/sanitize.js'\nimport getPreferencesCollection from '../preferences/preferencesCollection.js'\nimport checkDuplicateCollections from '../utilities/checkDuplicateCollections.js'\nimport { deepMergeWithReactComponents } from '../utilities/deepMerge.js'\nimport { defaults } from './defaults.js'\n\nconst sanitizeAdminConfig = (configToSanitize: Config): Partial<SanitizedConfig> => {\n const sanitizedConfig = { ...configToSanitize }\n\n // add default user collection if none provided\n if (!sanitizedConfig?.admin?.user) {\n const firstCollectionWithAuth = sanitizedConfig.collections.find(({ auth }) => Boolean(auth))\n if (firstCollectionWithAuth) {\n sanitizedConfig.admin.user = firstCollectionWithAuth.slug\n } else {\n sanitizedConfig.admin.user = defaultUserCollection.slug\n sanitizedConfig.collections.push(defaultUserCollection)\n }\n }\n\n const userCollection = sanitizedConfig.collections.find(\n ({ slug }) => slug === sanitizedConfig.admin.user,\n )\n if (!userCollection || !userCollection.auth) {\n throw new InvalidConfiguration(\n `${sanitizedConfig.admin.user} is not a valid admin user collection`,\n )\n }\n\n return sanitizedConfig as unknown as Partial<SanitizedConfig>\n}\n\nexport const sanitizeConfig = async (incomingConfig: Config): Promise<SanitizedConfig> => {\n const configWithDefaults: Config = deepMergeWithReactComponents(defaults, incomingConfig)\n\n if (!configWithDefaults?.serverURL) {\n configWithDefaults.serverURL = ''\n }\n\n if (process.env.NEXT_BASE_PATH) {\n if (!incomingConfig?.routes?.api) {\n // check for incomingConfig, as configWithDefaults will always have a default value for routes.api\n configWithDefaults.routes.api = process.env.NEXT_BASE_PATH + '/api'\n }\n }\n\n const config: Partial<SanitizedConfig> = sanitizeAdminConfig(configWithDefaults)\n\n if (config.localization && config.localization.locales?.length > 0) {\n // clone localization config so to not break everything\n const firstLocale = config.localization.locales[0]\n if (typeof firstLocale === 'string') {\n config.localization.localeCodes = [\n ...(config.localization as unknown as LocalizationConfigWithNoLabels).locales,\n ]\n\n // is string[], so convert to Locale[]\n config.localization.locales = (\n config.localization as unknown as LocalizationConfigWithNoLabels\n ).locales.map((locale) => ({\n code: locale,\n label: locale,\n rtl: false,\n toString: () => locale,\n }))\n } else {\n // is Locale[], so convert to string[] for localeCodes\n config.localization.localeCodes = config.localization.locales.reduce((locales, locale) => {\n locales.push(locale.code)\n return locales\n }, [] as string[])\n\n config.localization.locales = (\n config.localization as LocalizationConfigWithLabels\n ).locales.map((locale) => ({\n ...locale,\n toString: () => locale.code,\n }))\n }\n }\n\n const i18nConfig: SanitizedConfig['i18n'] = {\n fallbackLanguage: 'en',\n supportedLanguages: {\n en,\n },\n translations: {},\n }\n\n if (incomingConfig?.i18n) {\n i18nConfig.supportedLanguages =\n incomingConfig.i18n?.supportedLanguages || i18nConfig.supportedLanguages\n\n const supportedLangKeys = <AcceptedLanguages[]>Object.keys(i18nConfig.supportedLanguages)\n const fallbackLang = incomingConfig.i18n?.fallbackLanguage || i18nConfig.fallbackLanguage\n\n i18nConfig.fallbackLanguage = supportedLangKeys.includes(fallbackLang)\n ? fallbackLang\n : supportedLangKeys[0]\n i18nConfig.translations =\n (incomingConfig.i18n?.translations as SanitizedConfig['i18n']['translations']) ||\n i18nConfig.translations\n }\n\n config.i18n = i18nConfig\n\n configWithDefaults.collections.push(getPreferencesCollection(config as unknown as Config))\n configWithDefaults.collections.push(migrationsCollection)\n\n const richTextSanitizationPromises: Array<(config: SanitizedConfig) => Promise<void>> = []\n for (let i = 0; i < config.collections.length; i++) {\n config.collections[i] = await sanitizeCollection(\n config as unknown as Config,\n config.collections[i],\n richTextSanitizationPromises,\n )\n }\n\n checkDuplicateCollections(config.collections)\n\n if (config.globals.length > 0) {\n config.globals = await sanitizeGlobals(\n config as unknown as Config,\n richTextSanitizationPromises,\n )\n }\n\n if (config.serverURL !== '') {\n config.csrf.push(config.serverURL)\n }\n\n // Get deduped list of upload adapters\n if (!config.upload) config.upload = { adapters: [] }\n config.upload.adapters = Array.from(\n new Set(config.collections.map((c) => c.upload?.adapter).filter(Boolean)),\n )\n\n /*\n Execute richText sanitization\n */\n if (typeof incomingConfig.editor === 'function') {\n config.editor = await incomingConfig.editor({\n config: config as SanitizedConfig,\n isRoot: true,\n })\n if (config.editor.i18n && Object.keys(config.editor.i18n).length >= 0) {\n config.i18n.translations = deepMergeSimple(config.i18n.translations, config.editor.i18n)\n }\n }\n\n const promises: Promise<void>[] = []\n for (const sanitizeFunction of richTextSanitizationPromises) {\n promises.push(sanitizeFunction(config as SanitizedConfig))\n }\n await Promise.all(promises)\n\n return config as SanitizedConfig\n}\n"],"names":["en","deepMergeSimple","defaultUserCollection","sanitizeCollection","migrationsCollection","InvalidConfiguration","sanitizeGlobals","getPreferencesCollection","checkDuplicateCollections","deepMergeWithReactComponents","defaults","sanitizeAdminConfig","configToSanitize","sanitizedConfig","admin","user","firstCollectionWithAuth","collections","find","auth","Boolean","slug","push","userCollection","sanitizeConfig","incomingConfig","configWithDefaults","serverURL","process","env","NEXT_BASE_PATH","routes","api","config","localization","locales","length","firstLocale","localeCodes","map","locale","code","label","rtl","toString","reduce","i18nConfig","fallbackLanguage","supportedLanguages","translations","i18n","supportedLangKeys","Object","keys","fallbackLang","includes","richTextSanitizationPromises","i","globals","csrf","upload","adapters","Array","from","Set","c","adapter","filter","editor","isRoot","promises","sanitizeFunction","Promise","all"],"mappings":"AAEA,SAASA,EAAE,QAAQ,wCAAuC;AAC1D,SAASC,eAAe,QAAQ,qCAAoC;AASpE,SAASC,qBAAqB,QAAQ,yBAAwB;AAC9D,SAASC,kBAAkB,QAAQ,oCAAmC;AACtE,SAASC,oBAAoB,QAAQ,iDAAgD;AACrF,SAASC,oBAAoB,QAAQ,qBAAoB;AACzD,SAASC,eAAe,QAAQ,gCAA+B;AAC/D,OAAOC,8BAA8B,0CAAyC;AAC9E,OAAOC,+BAA+B,4CAA2C;AACjF,SAASC,4BAA4B,QAAQ,4BAA2B;AACxE,SAASC,QAAQ,QAAQ,gBAAe;AAExC,MAAMC,sBAAsB,CAACC;IAC3B,MAAMC,kBAAkB;QAAE,GAAGD,gBAAgB;IAAC;IAE9C,+CAA+C;IAC/C,IAAI,CAACC,iBAAiBC,OAAOC,MAAM;QACjC,MAAMC,0BAA0BH,gBAAgBI,WAAW,CAACC,IAAI,CAAC,CAAC,EAAEC,IAAI,EAAE,GAAKC,QAAQD;QACvF,IAAIH,yBAAyB;YAC3BH,gBAAgBC,KAAK,CAACC,IAA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B,QACAA,OAAOhB,WAAW,CAACwC,EAAE,EACrBD;IAEJ;IAEAhD,0BAA0ByB,OAAOhB,WAAW;IAE5C,IAAIgB,OAAOyB,OAAO,CAACtB,MAAM,GAAG,GAAG;QAC7BH,OAAOyB,OAAO,GAAG,MAAMpD,gBACrB2B,QACAuB;IAEJ;IAEA,IAAIvB,OAAON,SAAS,KAAK,IAAI;QAC3BM,OAAO0B,IAAI,CAACrC,IAAI,CAACW,OAAON,SAAS;IACnC;IAEA,sCAAsC;IACtC,IAAI,CAACM,OAAO2B,MAAM,EAAE3B,OAAO2B,MAAM,GAAG;QAAEC,UAAU,EAAE;IAAC;IACnD5B,OAAO2B,MAAM,CAACC,QAAQ,GAAGC,MAAMC,IAAI,CACjC,IAAIC,IAAI/B,OAAOhB,WAAW,CAACsB,GAAG,CAAC,CAAC0B,IAAMA,EAAEL,MAAM,EAAEM,SAASC,MAAM,CAAC/C;IAGlE;;GAEC,GACD,IAAI,OAAOK,eAAe2C,MAAM,KAAK,YAAY;QAC/CnC,OAAOmC,MAAM,GAAG,MAAM3C,eAAe2C,MAAM,CAAC;YAC1CnC,QAAQA;YACRoC,QAAQ;QACV;QACA,IAAIpC,OAAOmC,MAAM,CAAClB,IAAI,IAAIE,OAAOC,IAAI,CAACpB,OAAOmC,MAAM,CAAClB,IAAI,EAAEd,MAAM,IAAI,GAAG;YACrEH,OAAOiB,IAAI,CAACD,YAAY,GAAGhD,gBAAgBgC,OAAOiB,IAAI,CAACD,YAAY,EAAEhB,OAAOmC,MAAM,CAAClB,IAAI;QACzF;IACF;IAEA,MAAMoB,WAA4B,EAAE;IACpC,KAAK,MAAMC,oBAAoBf,6BAA8B;QAC3Dc,SAAShD,IAAI,CAACiD,iBAAiBtC;IACjC;IACA,MAAMuC,QAAQC,GAAG,CAACH;IAElB,OAAOrC;AACT,EAAC"}
|
|
1
|
+
{"version":3,"sources":["../../src/config/sanitize.ts"],"sourcesContent":["import type { AcceptedLanguages } from '@payloadcms/translations'\n\nimport { en } from '@payloadcms/translations/languages/en'\nimport { deepMergeSimple } from '@payloadcms/translations/utilities'\n\nimport type {\n Config,\n LocalizationConfigWithLabels,\n LocalizationConfigWithNoLabels,\n SanitizedConfig,\n} from './types.js'\n\nimport { defaultUserCollection } from '../auth/defaultUser.js'\nimport { sanitizeCollection } from '../collections/config/sanitize.js'\nimport { migrationsCollection } from '../database/migrations/migrationsCollection.js'\nimport { InvalidConfiguration } from '../errors/index.js'\nimport { sanitizeGlobals } from '../globals/config/sanitize.js'\nimport getPreferencesCollection from '../preferences/preferencesCollection.js'\nimport checkDuplicateCollections from '../utilities/checkDuplicateCollections.js'\nimport { deepMergeWithReactComponents } from '../utilities/deepMerge.js'\nimport { defaults } from './defaults.js'\n\nconst sanitizeAdminConfig = (configToSanitize: Config): Partial<SanitizedConfig> => {\n const sanitizedConfig = { ...configToSanitize }\n\n // add default user collection if none provided\n if (!sanitizedConfig?.admin?.user) {\n const firstCollectionWithAuth = sanitizedConfig.collections.find(({ auth }) => Boolean(auth))\n if (firstCollectionWithAuth) {\n sanitizedConfig.admin.user = firstCollectionWithAuth.slug\n } else {\n sanitizedConfig.admin.user = defaultUserCollection.slug\n sanitizedConfig.collections.push(defaultUserCollection)\n }\n }\n\n const userCollection = sanitizedConfig.collections.find(\n ({ slug }) => slug === sanitizedConfig.admin.user,\n )\n if (!userCollection || !userCollection.auth) {\n throw new InvalidConfiguration(\n `${sanitizedConfig.admin.user} is not a valid admin user collection`,\n )\n }\n\n return sanitizedConfig as unknown as Partial<SanitizedConfig>\n}\n\nexport const sanitizeConfig = async (incomingConfig: Config): Promise<SanitizedConfig> => {\n const configWithDefaults: Config = deepMergeWithReactComponents(defaults, incomingConfig)\n\n if (!configWithDefaults?.serverURL) {\n configWithDefaults.serverURL = ''\n }\n\n if (process.env.NEXT_BASE_PATH) {\n if (!incomingConfig?.routes?.api) {\n // check for incomingConfig, as configWithDefaults will always have a default value for routes.api\n configWithDefaults.routes.api = process.env.NEXT_BASE_PATH + '/api'\n }\n }\n\n const config: Partial<SanitizedConfig> = sanitizeAdminConfig(configWithDefaults)\n\n if (config.localization && config.localization.locales?.length > 0) {\n // clone localization config so to not break everything\n const firstLocale = config.localization.locales[0]\n if (typeof firstLocale === 'string') {\n config.localization.localeCodes = [\n ...(config.localization as unknown as LocalizationConfigWithNoLabels).locales,\n ]\n\n // is string[], so convert to Locale[]\n config.localization.locales = (\n config.localization as unknown as LocalizationConfigWithNoLabels\n ).locales.map((locale) => ({\n code: locale,\n label: locale,\n rtl: false,\n toString: () => locale,\n }))\n } else {\n // is Locale[], so convert to string[] for localeCodes\n config.localization.localeCodes = config.localization.locales.reduce((locales, locale) => {\n locales.push(locale.code)\n return locales\n }, [] as string[])\n\n config.localization.locales = (\n config.localization as LocalizationConfigWithLabels\n ).locales.map((locale) => ({\n ...locale,\n toString: () => locale.code,\n }))\n }\n }\n\n const i18nConfig: SanitizedConfig['i18n'] = {\n fallbackLanguage: 'en',\n supportedLanguages: {\n en,\n },\n translations: {},\n }\n\n if (incomingConfig?.i18n) {\n i18nConfig.supportedLanguages =\n incomingConfig.i18n?.supportedLanguages || i18nConfig.supportedLanguages\n\n const supportedLangKeys = <AcceptedLanguages[]>Object.keys(i18nConfig.supportedLanguages)\n const fallbackLang = incomingConfig.i18n?.fallbackLanguage || i18nConfig.fallbackLanguage\n\n i18nConfig.fallbackLanguage = supportedLangKeys.includes(fallbackLang)\n ? fallbackLang\n : supportedLangKeys[0]\n i18nConfig.translations =\n (incomingConfig.i18n?.translations as SanitizedConfig['i18n']['translations']) ||\n i18nConfig.translations\n }\n\n config.i18n = i18nConfig\n\n configWithDefaults.collections.push(getPreferencesCollection(config as unknown as Config))\n configWithDefaults.collections.push(migrationsCollection)\n\n const richTextSanitizationPromises: Array<(config: SanitizedConfig) => Promise<void>> = []\n for (let i = 0; i < config.collections.length; i++) {\n config.collections[i] = await sanitizeCollection(\n config as unknown as Config,\n config.collections[i],\n richTextSanitizationPromises,\n )\n }\n\n checkDuplicateCollections(config.collections)\n\n if (config.globals.length > 0) {\n config.globals = await sanitizeGlobals(\n config as unknown as Config,\n richTextSanitizationPromises,\n )\n }\n\n if (config.serverURL !== '') {\n config.csrf.push(config.serverURL)\n }\n\n // Get deduped list of upload adapters\n if (!config.upload) config.upload = { adapters: [] }\n config.upload.adapters = Array.from(\n new Set(config.collections.map((c) => c.upload?.adapter).filter(Boolean)),\n )\n\n // Pass through the email config as is so adapters don't break\n if (incomingConfig.email) config.email = incomingConfig.email\n\n /*\n Execute richText sanitization\n */\n if (typeof incomingConfig.editor === 'function') {\n config.editor = await incomingConfig.editor({\n config: config as SanitizedConfig,\n isRoot: true,\n })\n if (config.editor.i18n && Object.keys(config.editor.i18n).length >= 0) {\n config.i18n.translations = deepMergeSimple(config.i18n.translations, config.editor.i18n)\n }\n }\n\n const promises: Promise<void>[] = []\n for (const sanitizeFunction of richTextSanitizationPromises) {\n promises.push(sanitizeFunction(config as SanitizedConfig))\n }\n await Promise.all(promises)\n\n return config as SanitizedConfig\n}\n"],"names":["en","deepMergeSimple","defaultUserCollection","sanitizeCollection","migrationsCollection","InvalidConfiguration","sanitizeGlobals","getPreferencesCollection","checkDuplicateCollections","deepMergeWithReactComponents","defaults","sanitizeAdminConfig","configToSanitize","sanitizedConfig","admin","user","firstCollectionWithAuth","collections","find","auth","Boolean","slug","push","userCollection","sanitizeConfig","incomingConfig","configWithDefaults","serverURL","process","env","NEXT_BASE_PATH","routes","api","config","localization","locales","length","firstLocale","localeCodes","map","locale","code","label","rtl","toString","reduce","i18nConfig","fallbackLanguage","supportedLanguages","translations","i18n","supportedLangKeys","Object","keys","fallbackLang","includes","richTextSanitizationPromises","i","globals","csrf","upload","adapters","Array","from","Set","c","adapter","filter","email","editor","isRoot","promises","sanitizeFunction","Promise","all"],"mappings":"AAEA,SAASA,EAAE,QAAQ,wCAAuC;AAC1D,SAASC,eAAe,QAAQ,qCAAoC;AASpE,SAASC,qBAAqB,QAAQ,yBAAwB;AAC9D,SAASC,kBA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AAO3C,eAAe4C,MAAM,KAAK,YAAY;QAC/CpC,OAAOoC,MAAM,GAAG,MAAM5C,eAAe4C,MAAM,CAAC;YAC1CpC,QAAQA;YACRqC,QAAQ;QACV;QACA,IAAIrC,OAAOoC,MAAM,CAACnB,IAAI,IAAIE,OAAOC,IAAI,CAACpB,OAAOoC,MAAM,CAACnB,IAAI,EAAEd,MAAM,IAAI,GAAG;YACrEH,OAAOiB,IAAI,CAACD,YAAY,GAAGhD,gBAAgBgC,OAAOiB,IAAI,CAACD,YAAY,EAAEhB,OAAOoC,MAAM,CAACnB,IAAI;QACzF;IACF;IAEA,MAAMqB,WAA4B,EAAE;IACpC,KAAK,MAAMC,oBAAoBhB,6BAA8B;QAC3De,SAASjD,IAAI,CAACkD,iBAAiBvC;IACjC;IACA,MAAMwC,QAAQC,GAAG,CAACH;IAElB,OAAOtC;AACT,EAAC"}
|
package/dist/config/types.d.ts
CHANGED
|
@@ -609,7 +609,10 @@ export type Config = {
|
|
|
609
609
|
plugins?: Plugin[];
|
|
610
610
|
/** Control the routing structure that Payload binds itself to. */
|
|
611
611
|
routes?: {
|
|
612
|
-
/**
|
|
612
|
+
/** The route for the admin panel.
|
|
613
|
+
* @example "/my-admin"
|
|
614
|
+
* @default "/admin"
|
|
615
|
+
*/
|
|
613
616
|
admin?: string;
|
|
614
617
|
/** @default "/api" */
|
|
615
618
|
api?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/config/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EACzB,UAAU,EACV,WAAW,EACX,SAAS,EACV,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AAC7E,OAAO,KAAK,OAAO,MAAM,SAAS,CAAA;AAClC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,KAA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iBAAiB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA;IACrD,QAAQ,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA;CAIvD,GACD;IACE,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAAA;CAC9B,CACJ,GACD,iBAAiB,CAAA;AAErB,MAAM,MAAM,0BAA0B,GAAG,eAAe,CAAA;AAExD,MAAM,MAAM,yBAAyB,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;IAAE,CAAC,EAAE,SAAS,CAAA;CAAE,KAAK,MAAM,CAAA;AAE3E,MAAM,MAAM,iBAAiB,GAAG,yBAAyB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAA;AAE3F,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,CAAA"}
|
package/dist/config/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/config/types.ts"],"sourcesContent":["import type {\n DefaultTranslationsObject,\n I18nClient,\n I18nOptions,\n TFunction,\n} from '@payloadcms/translations'\nimport type { Options as ExpressFileUploadOptions } from 'express-fileupload'\nimport type GraphQL from 'graphql'\nimport type { JSONSchema4 } from 'json-schema'\nimport type { DestinationStream, LoggerOptions } from 'pino'\nimport type React from 'react'\nimport type { JSX } from 'react'\nimport type { default as sharp } from 'sharp'\nimport type { DeepRequired } from 'ts-essentials'\n\nimport type { RichTextAdapterProvider } from '../admin/RichText.js'\nimport type { DocumentTab, RichTextAdapter } from '../admin/types.js'\nimport type { AdminView, ServerSideEditViewProps } from '../admin/views/types.js'\nimport type { Permissions } from '../auth/index.js'\nimport type {\n AfterErrorHook,\n Collection,\n CollectionConfig,\n SanitizedCollectionConfig,\n} from '../collections/config/types.js'\nimport type { DatabaseAdapterResult } from '../database/types.js'\nimport type { EmailAdapter, SendEmailOptions } from '../email/types.js'\nimport type { GlobalConfig, Globals, SanitizedGlobalConfig } from '../globals/config/types.js'\nimport type { Payload, TypedUser } from '../index.js'\nimport type { PayloadRequest, Where } from '../types/index.js'\nimport type { PayloadLogger } from '../utilities/logger.js'\n\nexport type BinScriptConfig = {\n key: string\n scriptPath: string\n}\n\nexport type BinScript = (config: SanitizedConfig) => Promise<void> | void\n\ntype Prettify<T> = {\n [K in keyof T]: T[K]\n} & NonNullable<unknown>\n\nexport type Plugin = (config: Config) => Config | Promise<Config>\n\nexport type LivePreviewConfig = {\n /**\n Device breakpoints to use for the `iframe` of the Live Preview window.\n Options are displayed in the Live Preview toolbar.\n The `responsive` breakpoint is included by default.\n */\n breakpoints?: {\n height: number | string\n label: string\n name: string\n width: number | string\n }[]\n /**\n The URL of the frontend application. This will be rendered within an `iframe` as its `src`.\n Payload will send a `window.postMessage()` to this URL with the document data in real-time.\n The frontend application is responsible for receiving the message and updating the UI accordingly.\n Use the `useLivePreview` hook to get started in React applications.\n */\n url?:\n | ((args: {\n collectionConfig?: SanitizedCollectionConfig\n data: Record<string, any>\n globalConfig?: SanitizedGlobalConfig\n locale: Locale\n payload: Payload\n }) => Promise<string> | string)\n | string\n}\n\nexport type OGImageConfig = {\n alt?: string\n height?: number | string\n type?: string\n url: string\n width?: number | string\n}\n\nexport type OpenGraphConfig = {\n description?: string\n images?: OGImageConfig | OGImageConfig[]\n siteName?: string\n title?: string\n}\n\nexport type IconConfig = {\n color?: string\n /**\n * @see https://developer.mozilla.org/docs/Web/API/HTMLImageElement/fetchPriority\n */\n fetchPriority?: 'auto' | 'high' | 'low'\n media?: string\n /** defaults to rel=\"icon\" */\n rel?: string\n sizes?: string\n type?: string\n url: string\n}\n\nexport type MetaConfig = {\n /**\n * When `static`, a pre-made image will be used for all pages.\n * When `dynamic`, a unique image will be generated for each page based on page content and given overrides.\n * When `off`, no Open Graph images will be generated and the `/api/og` endpoint will be disabled. You can still provide custom images using the `openGraph.images` property.\n * @default 'dynamic'\n */\n defaultOGImageType?: 'dynamic' | 'off' | 'static'\n /**\n * Overrides the auto-generated <meta name=\"description\"> of admin pages\n * @example `\"This is my custom CMS built with Payload.\"`\n */\n description?: string\n /**\n * Icons to be rendered by devices and browsers.\n *\n * For example browser tabs, phone home screens, and search engine results.\n */\n icons?: IconConfig[]\n /**\n * Overrides the auto-generated <meta name=\"keywords\"> of admin pages\n * @example `\"CMS, Payload, Custom\"`\n */\n keywords?: string\n /**\n * Metadata to be rendered as `og` meta tags in the head of the Admin Panel.\n *\n * For example when sharing the Admin Panel on social media or through messaging services.\n */\n openGraph?: OpenGraphConfig\n /**\n * Overrides the auto-generated <title> of admin pages\n * @example `\"My Admin Panel\"`\n */\n title?: string\n /**\n * String to append to the auto-generated <title> of admin pages\n * @example `\" - Custom CMS\"`\n */\n titleSuffix?: string\n}\n\nexport type ServerOnlyLivePreviewProperties = keyof Pick<LivePreviewConfig, 'url'>\n\ntype GeneratePreviewURLOptions = {\n locale: string\n req: PayloadRequest\n token: null | string\n}\n\nexport type GeneratePreviewURL = (\n doc: Record<string, unknown>,\n options: GeneratePreviewURLOptions,\n) => Promise<null | string> | null | string\n\nexport type GraphQLInfo = {\n Mutation: {\n fields: Record<string, any>\n name: string\n }\n Query: {\n fields: Record<string, any>\n name: string\n }\n collections: {\n [slug: number | string | symbol]: Collection\n }\n globals: Globals\n types: {\n arrayTypes: Record<string, GraphQL.GraphQLType>\n blockInputTypes: Record<string, GraphQL.GraphQLInputObjectType>\n blockTypes: Record<string, GraphQL.GraphQLObjectType>\n fallbackLocaleInputType?: GraphQL.GraphQLEnumType | GraphQL.GraphQLScalarType\n groupTypes: Record<string, GraphQL.GraphQLObjectType>\n localeInputType?: GraphQL.GraphQLEnumType | GraphQL.GraphQLScalarType\n tabTypes: Record<string, GraphQL.GraphQLObjectType>\n }\n}\nexport type GraphQLExtension = (\n graphQL: typeof GraphQL,\n context: {\n config: SanitizedConfig\n } & GraphQLInfo,\n) => Record<string, unknown>\n\nexport type InitOptions = {\n /**\n * Sometimes, with the local API, you might need to pass a config file directly, for example, serverless on Vercel\n * The passed config should match the config file, and if it doesn't, there could be mismatches between the admin UI\n * and the backend functionality\n */\n config: Promise<SanitizedConfig> | SanitizedConfig\n /**\n * Disable connect to the database on init\n */\n disableDBConnect?: boolean\n\n /**\n * Disable running of the `onInit` function\n */\n disableOnInit?: boolean\n\n /**\n * A previously instantiated logger instance. Must conform to the PayloadLogger interface which uses Pino\n * This allows you to bring your own logger instance and let payload use it\n */\n logger?: PayloadLogger\n\n loggerDestination?: DestinationStream\n\n /**\n * Specify options for the built-in Pino logger that Payload uses for internal logging.\n *\n * See Pino Docs for options: https://getpino.io/#/docs/api?id=options\n */\n loggerOptions?: LoggerOptions\n /**\n * A function that is called immediately following startup that receives the Payload instance as it's only argument.\n */\n onInit?: (payload: Payload) => Promise<void> | void\n}\n\n/**\n * This result is calculated on the server\n * and then sent to the client allowing the dashboard to show accessible data and actions.\n *\n * If the result is `true`, the user has access.\n * If the result is an object, it is interpreted as a MongoDB query.\n *\n * @example `{ createdBy: { equals: id } }`\n *\n * @example `{ tenant: { in: tenantIds } }`\n *\n * @see https://payloadcms.com/docs/access-control/overview\n */\nexport type AccessResult = Where | boolean\n\nexport type AccessArgs<TData = any> = {\n /**\n * The relevant resource that is being accessed.\n *\n * `data` is null when a list is requested\n */\n data?: TData\n /** ID of the resource being accessed */\n id?: number | string\n /** If true, the request is for a static file */\n isReadingStaticFile?: boolean\n /** The original request that requires an access check */\n req: PayloadRequest\n}\n\n/**\n * Access function runs on the server\n * and is sent to the client allowing the dashboard to show accessible data and actions.\n *\n * @see https://payloadcms.com/docs/access-control/overview\n */\nexport type Access<TData = any> = (args: AccessArgs<TData>) => AccessResult | Promise<AccessResult>\n\n/** Web Request/Response model, but the req has more payload specific properties added to it. */\nexport type PayloadHandler = (req: PayloadRequest) => Promise<Response> | Response\n\n/**\n * Docs: https://payloadcms.com/docs/rest-api/overview#custom-endpoints\n */\nexport type Endpoint = {\n /** Extension point to add your custom data. */\n custom?: Record<string, any>\n\n /**\n * Middleware that will be called when the path/method matches\n *\n * Compatible with Web Request/Response Model\n */\n handler: PayloadHandler\n /** HTTP method (or \"all\") */\n method: 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put'\n /**\n * Pattern that should match the path of the incoming request\n *\n * Compatible with the Express router\n */\n path: string\n /**\n * Please add \"root\" routes under the /api folder in the Payload Project.\n * https://nextjs.org/docs/app/api-reference/file-conventions/route\n *\n * @deprecated in 3.0\n */\n root?: never\n}\n\nexport type EditViewComponent = React.ComponentType<ServerSideEditViewProps>\n\nexport type EditViewConfig =\n | {\n /**\n * Add a new Edit view to the admin panel\n * i.e. you can render a custom view that has no tab, if desired\n * Or override a specific properties of an existing one\n * i.e. you can customize the `Default` view tab label, if desired\n */\n Tab?: DocumentTab\n path?: string\n }\n | {\n Component: EditViewComponent\n path: string\n }\n | {\n actions?: CustomComponent[]\n }\n\n/**\n * Override existing views\n * i.e. Dashboard, Account, API, LivePreview, etc.\n * Path is not available here\n * All Tab properties become optional\n * i.e. you can change just the label, if desired\n */\nexport type EditView = EditViewComponent | EditViewConfig\n\nexport type ServerProps = {\n [key: string]: unknown\n i18n: I18nClient\n locale?: Locale\n params?: { [key: string]: string | string[] | undefined }\n payload: Payload\n permissions?: Permissions\n searchParams?: { [key: string]: string | string[] | undefined }\n user?: TypedUser\n}\n\nexport const serverProps: (keyof ServerProps)[] = [\n 'payload',\n 'i18n',\n 'locale',\n 'params',\n 'permissions',\n 'searchParams',\n 'permissions',\n]\n\nexport type CustomComponent<TAdditionalProps extends any = any> = React.ComponentType<\n Partial<ServerProps> & TAdditionalProps\n>\n\nexport type Locale = {\n /**\n * value of supported locale\n * @example \"en\"\n */\n code: string\n /**\n * Code of another locale to use when reading documents with fallback, if not specified defaultLocale is used\n */\n fallbackLocale?: string\n /**\n * label of supported locale\n * @example \"English\"\n */\n label: Record<string, string> | string\n /**\n * if true, defaults textAligmnent on text fields to RTL\n */\n rtl?: boolean\n}\n\nexport type BaseLocalizationConfig = {\n /**\n * Locale for users that have not expressed their preference for a specific locale\n * @example `\"en\"`\n */\n defaultLocale: string\n /** Set to `true` to let missing values in localised fields fall back to the values in `defaultLocale` */\n fallback?: boolean\n}\n\nexport type LocalizationConfigWithNoLabels = Prettify<\n {\n /**\n * List of supported locales\n * @example `[\"en\", \"es\", \"fr\", \"nl\", \"de\", \"jp\"]`\n */\n locales: string[]\n } & BaseLocalizationConfig\n>\n\nexport type LocalizationConfigWithLabels = Prettify<\n {\n /**\n * List of supported locales with labels\n * @example {\n * label: 'English',\n * value: 'en',\n * rtl: false\n * }\n */\n locales: Locale[]\n } & BaseLocalizationConfig\n>\n\nexport type SanitizedLocalizationConfig = Prettify<\n {\n /**\n * List of supported locales\n * @example `[\"en\", \"es\", \"fr\", \"nl\", \"de\", \"jp\"]`\n */\n localeCodes: string[]\n } & LocalizationConfigWithLabels\n>\n\n/**\n * @see https://payloadcms.com/docs/configuration/localization#localization\n */\nexport type LocalizationConfig = Prettify<\n LocalizationConfigWithLabels | LocalizationConfigWithNoLabels\n>\n\nexport type LabelFunction = ({ t }: { t: TFunction }) => string\n\nexport type SharpDependency = (\n input?:\n | ArrayBuffer\n | Buffer\n | Float32Array\n | Float64Array\n | Int8Array\n | Int16Array\n | Int32Array\n | Uint8Array\n | Uint8ClampedArray\n | Uint16Array\n | Uint32Array\n | string,\n options?: sharp.SharpOptions,\n) => sharp.Sharp\n\nexport type CORSConfig = {\n headers?: string[]\n origins: '*' | string[]\n}\n\n/**\n * This is the central configuration\n *\n * @see https://payloadcms.com/docs/configuration/overview\n */\nexport type Config = {\n /** Configure admin dashboard */\n admin?: {\n /** Automatically log in as a user */\n autoLogin?:\n | {\n /**\n * The email address of the user to login as\n */\n email?: string\n /** The password of the user to login as. This is only needed if `prefillOnly` is set to true */\n password?: string\n /**\n * If set to true, the login credentials will be prefilled but the user will still need to click the login button.\n *\n * @default false\n */\n prefillOnly?: boolean\n /** The username of the user to login as */\n username?: string\n }\n | false\n\n /** Set account profile picture. Options: gravatar, default or a custom React component. */\n avatar?: 'default' | 'gravatar' | React.ComponentType<any>\n /**\n * Add extra and/or replace built-in components with custom components\n *\n * @see https://payloadcms.com/docs/admin/components\n */\n components?: {\n /**\n * Replace the navigation with a custom component\n */\n Nav?: CustomComponent\n /**\n * Add custom components to the top right of the Admin Panel\n */\n actions?: CustomComponent[]\n /**\n * Add custom components after the collection overview\n */\n afterDashboard?: CustomComponent[]\n /**\n * Add custom components after the email/password field\n */\n afterLogin?: CustomComponent[]\n /**\n * Add custom components after the navigation links\n */\n afterNavLinks?: CustomComponent[]\n /**\n * Add custom components before the collection overview\n */\n beforeDashboard?: CustomComponent[]\n /**\n * Add custom components before the email/password field\n */\n beforeLogin?: CustomComponent[]\n /**\n * Add custom components before the navigation links\n */\n beforeNavLinks?: CustomComponent[]\n /** Replace graphical components */\n graphics?: {\n /** Replace the icon in the navigation */\n Icon?: CustomComponent\n /** Replace the logo on the login page */\n Logo?: CustomComponent\n }\n /** Replace logout related components */\n logout?: {\n /** Replace the logout button */\n Button?: CustomComponent\n }\n /**\n * Wrap the admin dashboard in custom context providers\n */\n providers?: React.ComponentType<{ children?: React.ReactNode }>[]\n /**\n * Replace or modify top-level admin routes, or add new ones:\n * + `Account` - `/admin/account`\n * + `Dashboard` - `/admin`\n * + `:path` - `/admin/:path`\n */\n views?: {\n /** Add custom admin views */\n [key: string]: AdminView\n /** Replace the account screen */\n Account?: AdminView\n /** Replace the admin homepage */\n Dashboard?: AdminView\n }\n }\n /** Extension point to add your custom data. Available in server and client. */\n custom?: Record<string, any>\n /** Global date format that will be used for all dates in the Admin panel. Any valid date-fns format pattern can be used. */\n dateFormat?: string\n /** If set to true, the entire Admin panel will be disabled. */\n disable?: boolean\n livePreview?: {\n collections?: string[]\n globals?: string[]\n } & LivePreviewConfig\n /** Base meta data to use for the Admin Panel. Included properties are titleSuffix, ogImage, and favicon. */\n meta?: MetaConfig\n routes?: {\n /** The route for the account page. */\n account?: string\n /** The route for the create first user page. */\n createFirstUser?: string\n /** The route for the forgot password page. */\n forgot?: string\n /** The route the user will be redirected to after being inactive for too long. */\n inactivity?: string\n /** The route for the login page. */\n login?: string\n /** The route for the logout page. */\n logout?: string\n /** The route for the reset password page. */\n reset?: string\n /** The route for the unauthorized page. */\n unauthorized?: string\n }\n /** The slug of a Collection that you want to be used to log in to the Admin dashboard. */\n user?: string\n }\n /** Custom Payload bin scripts can be injected via the config. */\n bin?: BinScriptConfig[]\n /**\n * Manage the datamodel of your application\n *\n * @see https://payloadcms.com/docs/configuration/collections#collection-configs\n */\n collections?: CollectionConfig[]\n /**\n * Replace the built-in components with custom ones\n */\n components?: { [key: string]: (() => JSX.Element) | JSX.Element }\n /**\n * Prefix a string to all cookies that Payload sets.\n *\n * @default \"payload\"\n */\n cookiePrefix?: string\n /** Either a whitelist array of URLS to allow CORS requests from, or a wildcard string ('*') to accept incoming requests from any domain. */\n cors?: '*' | CORSConfig | string[]\n /** A whitelist array of URLs to allow Payload cookies to be accepted from as a form of CSRF protection. */\n csrf?: string[]\n\n /** Extension point to add your custom data. Server only. */\n custom?: Record<string, any>\n\n /** Pass in a database adapter for use on this project. */\n db: DatabaseAdapterResult\n /** Enable to expose more detailed error information. */\n debug?: boolean\n /**\n * If a user does not specify `depth` while requesting a resource, this depth will be used.\n *\n * @see https://payloadcms.com/docs/getting-started/concepts#depth\n *\n * @default 2\n */\n defaultDepth?: number\n /**\n * The maximum allowed depth to be permitted application-wide. This setting helps prevent against malicious queries.\n *\n * @default 40000\n */\n defaultMaxTextLength?: number\n /** Default richtext editor to use for richText fields */\n editor?: RichTextAdapterProvider<any, any, any>\n /**\n * Email Adapter\n *\n * @see https://payloadcms.com/docs/email/overview\n */\n email?: EmailAdapter | Promise<EmailAdapter>\n /** Custom REST endpoints */\n endpoints?: Endpoint[]\n /**\n * @see https://payloadcms.com/docs/configuration/globals#global-configs\n */\n globals?: GlobalConfig[]\n /**\n * Manage the GraphQL API\n *\n * You can add your own GraphQL queries and mutations to Payload, making use of all the types that Payload has defined for you.\n *\n * @see https://payloadcms.com/docs/graphql/overview\n */\n graphQL?: {\n disable?: boolean\n disablePlaygroundInProduction?: boolean\n maxComplexity?: number\n /**\n * Function that returns an object containing keys to custom GraphQL mutations\n *\n * @see https://payloadcms.com/docs/graphql/extending\n */\n mutations?: GraphQLExtension\n /**\n * Function that returns an object containing keys to custom GraphQL queries\n *\n * @see https://payloadcms.com/docs/graphql/extending\n */\n queries?: GraphQLExtension\n /**\n * Filepath to write the generated schema to\n */\n schemaOutputFile?: string\n }\n /**\n * Tap into Payload-wide hooks.\n *\n * @see https://payloadcms.com/docs/hooks/overview\n */\n hooks?: {\n afterError?: AfterErrorHook\n }\n /** i18n config settings */\n i18n?: I18nOptions<{} | DefaultTranslationsObject> // loosen the type here to allow for custom translations\n /** Automatically index all sortable top-level fields in the database to improve sort performance and add database compatibility for Azure Cosmos and similar. */\n indexSortableFields?: boolean\n /**\n * Translate your content to different languages/locales.\n *\n * @default false // disable localization\n */\n localization?: LocalizationConfig | false\n /**\n * The maximum allowed depth to be permitted application-wide. This setting helps prevent against malicious queries.\n *\n * @see https://payloadcms.com/docs/getting-started/concepts#depth\n *\n * @default 10\n */\n maxDepth?: number\n /** A function that is called immediately following startup that receives the Payload instance as its only argument. */\n onInit?: (payload: Payload) => Promise<void> | void\n /**\n * An array of Payload plugins.\n *\n * @see https://payloadcms.com/docs/plugins/overview\n */\n plugins?: Plugin[]\n /** Control the routing structure that Payload binds itself to. */\n routes?: {\n /** @default \"/admin\" */\n admin?: string\n /** @default \"/api\" */\n api?: string\n /** @default \"/graphql\" */\n graphQL?: string\n /** @default \"/graphql-playground\" */\n graphQLPlayground?: string\n }\n /** Secure string that Payload will use for any encryption workflows */\n secret: string\n /**\n * Define the absolute URL of your app including the protocol, for example `https://example.org`.\n * No paths allowed, only protocol, domain and (optionally) port.\n *\n * @see https://payloadcms.com/docs/configuration/overview#options\n */\n serverURL?: string\n /**\n * Pass in a local copy of Sharp if you'd like to use it.\n *\n */\n sharp?: SharpDependency\n /** Send anonymous telemetry data about general usage. */\n telemetry?: boolean\n /** Control how typescript interfaces are generated from your collections. */\n typescript?: {\n /**\n * Automatically generate types during development\n * @default true\n */\n autoGenerate?: boolean\n\n /** Disable declare block in generated types file */\n declare?:\n | {\n /**\n * @internal internal use only to allow for multiple declarations within a monorepo and suppress the \"Duplicate identifier GeneratedTypes\" error\n *\n * Adds a @ts-ignore flag above the GeneratedTypes interface declaration\n *\n * @default false\n */\n ignoreTSError?: boolean\n }\n | false\n\n /** Filename to write the generated types to */\n outputFile?: string\n\n /**\n * Allows you to modify the base JSON schema that is generated during generate:types. This JSON schema will be used\n * to generate the TypeScript interfaces.\n */\n schema?: Array<(args: { jsonSchema: JSONSchema4 }) => JSONSchema4>\n }\n /**\n * Customize the handling of incoming file uploads for collections that have uploads enabled.\n */\n upload?: ExpressFileUploadOptions\n}\n\nexport type SanitizedConfig = {\n collections: SanitizedCollectionConfig[]\n /** Default richtext editor to use for richText fields */\n editor?: RichTextAdapter<any, any, any>\n endpoints: Endpoint[]\n globals: SanitizedGlobalConfig[]\n i18n: Required<I18nOptions>\n localization: SanitizedLocalizationConfig | false\n paths: {\n config: string\n configDir: string\n rawConfig: string\n }\n upload: {\n /**\n * Deduped list of adapters used in the project\n */\n adapters: string[]\n } & ExpressFileUploadOptions\n} & Omit<\n DeepRequired<Config>,\n 'collections' | 'editor' | 'endpoint' | 'globals' | 'i18n' | 'localization' | 'upload'\n>\n\nexport type EditConfig =\n | (\n | {\n /**\n * Replace or modify individual nested routes, or add new ones:\n * + `Default` - `/admin/collections/:collection/:id`\n * + `API` - `/admin/collections/:collection/:id/api`\n * + `LivePreview` - `/admin/collections/:collection/:id/preview`\n * + `References` - `/admin/collections/:collection/:id/references`\n * + `Relationships` - `/admin/collections/:collection/:id/relationships`\n * + `Versions` - `/admin/collections/:collection/:id/versions`\n * + `Version` - `/admin/collections/:collection/:id/versions/:version`\n * + `CustomView` - `/admin/collections/:collection/:id/:path`\n */\n API?: EditViewComponent | Partial<EditViewConfig>\n Default?: EditViewComponent | Partial<EditViewConfig>\n LivePreview?: EditViewComponent | Partial<EditViewConfig>\n Version?: EditViewComponent | Partial<EditViewConfig>\n Versions?: EditViewComponent | Partial<EditViewConfig>\n // TODO: uncomment these as they are built\n // References?: EditView\n // Relationships?: EditView\n }\n | {\n [key: string]: EditViewConfig\n }\n )\n | EditViewComponent\n\nexport type EntityDescriptionComponent = CustomComponent\n\nexport type EntityDescriptionFunction = ({ t }: { t: TFunction }) => string\n\nexport type EntityDescription = EntityDescriptionFunction | Record<string, string> | string\n\nexport type { EmailAdapter, SendEmailOptions }\n"],"names":["serverProps"],"mappings":"AAiVA,OAAO,MAAMA,cAAqC;IAChD;IACA;IACA;IACA;IACA;IACA;IACA;CACD,CAAA"}
|
|
1
|
+
{"version":3,"sources":["../../src/config/types.ts"],"sourcesContent":["import type {\n DefaultTranslationsObject,\n I18nClient,\n I18nOptions,\n TFunction,\n} from '@payloadcms/translations'\nimport type { Options as ExpressFileUploadOptions } from 'express-fileupload'\nimport type GraphQL from 'graphql'\nimport type { JSONSchema4 } from 'json-schema'\nimport type { DestinationStream, LoggerOptions } from 'pino'\nimport type React from 'react'\nimport type { JSX } from 'react'\nimport type { default as sharp } from 'sharp'\nimport type { DeepRequired } from 'ts-essentials'\n\nimport type { RichTextAdapterProvider } from '../admin/RichText.js'\nimport type { DocumentTab, RichTextAdapter } from '../admin/types.js'\nimport type { AdminView, ServerSideEditViewProps } from '../admin/views/types.js'\nimport type { Permissions } from '../auth/index.js'\nimport type {\n AfterErrorHook,\n Collection,\n CollectionConfig,\n SanitizedCollectionConfig,\n} from '../collections/config/types.js'\nimport type { DatabaseAdapterResult } from '../database/types.js'\nimport type { EmailAdapter, SendEmailOptions } from '../email/types.js'\nimport type { GlobalConfig, Globals, SanitizedGlobalConfig } from '../globals/config/types.js'\nimport type { Payload, TypedUser } from '../index.js'\nimport type { PayloadRequest, Where } from '../types/index.js'\nimport type { PayloadLogger } from '../utilities/logger.js'\n\nexport type BinScriptConfig = {\n key: string\n scriptPath: string\n}\n\nexport type BinScript = (config: SanitizedConfig) => Promise<void> | void\n\ntype Prettify<T> = {\n [K in keyof T]: T[K]\n} & NonNullable<unknown>\n\nexport type Plugin = (config: Config) => Config | Promise<Config>\n\nexport type LivePreviewConfig = {\n /**\n Device breakpoints to use for the `iframe` of the Live Preview window.\n Options are displayed in the Live Preview toolbar.\n The `responsive` breakpoint is included by default.\n */\n breakpoints?: {\n height: number | string\n label: string\n name: string\n width: number | string\n }[]\n /**\n The URL of the frontend application. This will be rendered within an `iframe` as its `src`.\n Payload will send a `window.postMessage()` to this URL with the document data in real-time.\n The frontend application is responsible for receiving the message and updating the UI accordingly.\n Use the `useLivePreview` hook to get started in React applications.\n */\n url?:\n | ((args: {\n collectionConfig?: SanitizedCollectionConfig\n data: Record<string, any>\n globalConfig?: SanitizedGlobalConfig\n locale: Locale\n payload: Payload\n }) => Promise<string> | string)\n | string\n}\n\nexport type OGImageConfig = {\n alt?: string\n height?: number | string\n type?: string\n url: string\n width?: number | string\n}\n\nexport type OpenGraphConfig = {\n description?: string\n images?: OGImageConfig | OGImageConfig[]\n siteName?: string\n title?: string\n}\n\nexport type IconConfig = {\n color?: string\n /**\n * @see https://developer.mozilla.org/docs/Web/API/HTMLImageElement/fetchPriority\n */\n fetchPriority?: 'auto' | 'high' | 'low'\n media?: string\n /** defaults to rel=\"icon\" */\n rel?: string\n sizes?: string\n type?: string\n url: string\n}\n\nexport type MetaConfig = {\n /**\n * When `static`, a pre-made image will be used for all pages.\n * When `dynamic`, a unique image will be generated for each page based on page content and given overrides.\n * When `off`, no Open Graph images will be generated and the `/api/og` endpoint will be disabled. You can still provide custom images using the `openGraph.images` property.\n * @default 'dynamic'\n */\n defaultOGImageType?: 'dynamic' | 'off' | 'static'\n /**\n * Overrides the auto-generated <meta name=\"description\"> of admin pages\n * @example `\"This is my custom CMS built with Payload.\"`\n */\n description?: string\n /**\n * Icons to be rendered by devices and browsers.\n *\n * For example browser tabs, phone home screens, and search engine results.\n */\n icons?: IconConfig[]\n /**\n * Overrides the auto-generated <meta name=\"keywords\"> of admin pages\n * @example `\"CMS, Payload, Custom\"`\n */\n keywords?: string\n /**\n * Metadata to be rendered as `og` meta tags in the head of the Admin Panel.\n *\n * For example when sharing the Admin Panel on social media or through messaging services.\n */\n openGraph?: OpenGraphConfig\n /**\n * Overrides the auto-generated <title> of admin pages\n * @example `\"My Admin Panel\"`\n */\n title?: string\n /**\n * String to append to the auto-generated <title> of admin pages\n * @example `\" - Custom CMS\"`\n */\n titleSuffix?: string\n}\n\nexport type ServerOnlyLivePreviewProperties = keyof Pick<LivePreviewConfig, 'url'>\n\ntype GeneratePreviewURLOptions = {\n locale: string\n req: PayloadRequest\n token: null | string\n}\n\nexport type GeneratePreviewURL = (\n doc: Record<string, unknown>,\n options: GeneratePreviewURLOptions,\n) => Promise<null | string> | null | string\n\nexport type GraphQLInfo = {\n Mutation: {\n fields: Record<string, any>\n name: string\n }\n Query: {\n fields: Record<string, any>\n name: string\n }\n collections: {\n [slug: number | string | symbol]: Collection\n }\n globals: Globals\n types: {\n arrayTypes: Record<string, GraphQL.GraphQLType>\n blockInputTypes: Record<string, GraphQL.GraphQLInputObjectType>\n blockTypes: Record<string, GraphQL.GraphQLObjectType>\n fallbackLocaleInputType?: GraphQL.GraphQLEnumType | GraphQL.GraphQLScalarType\n groupTypes: Record<string, GraphQL.GraphQLObjectType>\n localeInputType?: GraphQL.GraphQLEnumType | GraphQL.GraphQLScalarType\n tabTypes: Record<string, GraphQL.GraphQLObjectType>\n }\n}\nexport type GraphQLExtension = (\n graphQL: typeof GraphQL,\n context: {\n config: SanitizedConfig\n } & GraphQLInfo,\n) => Record<string, unknown>\n\nexport type InitOptions = {\n /**\n * Sometimes, with the local API, you might need to pass a config file directly, for example, serverless on Vercel\n * The passed config should match the config file, and if it doesn't, there could be mismatches between the admin UI\n * and the backend functionality\n */\n config: Promise<SanitizedConfig> | SanitizedConfig\n /**\n * Disable connect to the database on init\n */\n disableDBConnect?: boolean\n\n /**\n * Disable running of the `onInit` function\n */\n disableOnInit?: boolean\n\n /**\n * A previously instantiated logger instance. Must conform to the PayloadLogger interface which uses Pino\n * This allows you to bring your own logger instance and let payload use it\n */\n logger?: PayloadLogger\n\n loggerDestination?: DestinationStream\n\n /**\n * Specify options for the built-in Pino logger that Payload uses for internal logging.\n *\n * See Pino Docs for options: https://getpino.io/#/docs/api?id=options\n */\n loggerOptions?: LoggerOptions\n /**\n * A function that is called immediately following startup that receives the Payload instance as it's only argument.\n */\n onInit?: (payload: Payload) => Promise<void> | void\n}\n\n/**\n * This result is calculated on the server\n * and then sent to the client allowing the dashboard to show accessible data and actions.\n *\n * If the result is `true`, the user has access.\n * If the result is an object, it is interpreted as a MongoDB query.\n *\n * @example `{ createdBy: { equals: id } }`\n *\n * @example `{ tenant: { in: tenantIds } }`\n *\n * @see https://payloadcms.com/docs/access-control/overview\n */\nexport type AccessResult = Where | boolean\n\nexport type AccessArgs<TData = any> = {\n /**\n * The relevant resource that is being accessed.\n *\n * `data` is null when a list is requested\n */\n data?: TData\n /** ID of the resource being accessed */\n id?: number | string\n /** If true, the request is for a static file */\n isReadingStaticFile?: boolean\n /** The original request that requires an access check */\n req: PayloadRequest\n}\n\n/**\n * Access function runs on the server\n * and is sent to the client allowing the dashboard to show accessible data and actions.\n *\n * @see https://payloadcms.com/docs/access-control/overview\n */\nexport type Access<TData = any> = (args: AccessArgs<TData>) => AccessResult | Promise<AccessResult>\n\n/** Web Request/Response model, but the req has more payload specific properties added to it. */\nexport type PayloadHandler = (req: PayloadRequest) => Promise<Response> | Response\n\n/**\n * Docs: https://payloadcms.com/docs/rest-api/overview#custom-endpoints\n */\nexport type Endpoint = {\n /** Extension point to add your custom data. */\n custom?: Record<string, any>\n\n /**\n * Middleware that will be called when the path/method matches\n *\n * Compatible with Web Request/Response Model\n */\n handler: PayloadHandler\n /** HTTP method (or \"all\") */\n method: 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put'\n /**\n * Pattern that should match the path of the incoming request\n *\n * Compatible with the Express router\n */\n path: string\n /**\n * Please add \"root\" routes under the /api folder in the Payload Project.\n * https://nextjs.org/docs/app/api-reference/file-conventions/route\n *\n * @deprecated in 3.0\n */\n root?: never\n}\n\nexport type EditViewComponent = React.ComponentType<ServerSideEditViewProps>\n\nexport type EditViewConfig =\n | {\n /**\n * Add a new Edit view to the admin panel\n * i.e. you can render a custom view that has no tab, if desired\n * Or override a specific properties of an existing one\n * i.e. you can customize the `Default` view tab label, if desired\n */\n Tab?: DocumentTab\n path?: string\n }\n | {\n Component: EditViewComponent\n path: string\n }\n | {\n actions?: CustomComponent[]\n }\n\n/**\n * Override existing views\n * i.e. Dashboard, Account, API, LivePreview, etc.\n * Path is not available here\n * All Tab properties become optional\n * i.e. you can change just the label, if desired\n */\nexport type EditView = EditViewComponent | EditViewConfig\n\nexport type ServerProps = {\n [key: string]: unknown\n i18n: I18nClient\n locale?: Locale\n params?: { [key: string]: string | string[] | undefined }\n payload: Payload\n permissions?: Permissions\n searchParams?: { [key: string]: string | string[] | undefined }\n user?: TypedUser\n}\n\nexport const serverProps: (keyof ServerProps)[] = [\n 'payload',\n 'i18n',\n 'locale',\n 'params',\n 'permissions',\n 'searchParams',\n 'permissions',\n]\n\nexport type CustomComponent<TAdditionalProps extends any = any> = React.ComponentType<\n Partial<ServerProps> & TAdditionalProps\n>\n\nexport type Locale = {\n /**\n * value of supported locale\n * @example \"en\"\n */\n code: string\n /**\n * Code of another locale to use when reading documents with fallback, if not specified defaultLocale is used\n */\n fallbackLocale?: string\n /**\n * label of supported locale\n * @example \"English\"\n */\n label: Record<string, string> | string\n /**\n * if true, defaults textAligmnent on text fields to RTL\n */\n rtl?: boolean\n}\n\nexport type BaseLocalizationConfig = {\n /**\n * Locale for users that have not expressed their preference for a specific locale\n * @example `\"en\"`\n */\n defaultLocale: string\n /** Set to `true` to let missing values in localised fields fall back to the values in `defaultLocale` */\n fallback?: boolean\n}\n\nexport type LocalizationConfigWithNoLabels = Prettify<\n {\n /**\n * List of supported locales\n * @example `[\"en\", \"es\", \"fr\", \"nl\", \"de\", \"jp\"]`\n */\n locales: string[]\n } & BaseLocalizationConfig\n>\n\nexport type LocalizationConfigWithLabels = Prettify<\n {\n /**\n * List of supported locales with labels\n * @example {\n * label: 'English',\n * value: 'en',\n * rtl: false\n * }\n */\n locales: Locale[]\n } & BaseLocalizationConfig\n>\n\nexport type SanitizedLocalizationConfig = Prettify<\n {\n /**\n * List of supported locales\n * @example `[\"en\", \"es\", \"fr\", \"nl\", \"de\", \"jp\"]`\n */\n localeCodes: string[]\n } & LocalizationConfigWithLabels\n>\n\n/**\n * @see https://payloadcms.com/docs/configuration/localization#localization\n */\nexport type LocalizationConfig = Prettify<\n LocalizationConfigWithLabels | LocalizationConfigWithNoLabels\n>\n\nexport type LabelFunction = ({ t }: { t: TFunction }) => string\n\nexport type SharpDependency = (\n input?:\n | ArrayBuffer\n | Buffer\n | Float32Array\n | Float64Array\n | Int8Array\n | Int16Array\n | Int32Array\n | Uint8Array\n | Uint8ClampedArray\n | Uint16Array\n | Uint32Array\n | string,\n options?: sharp.SharpOptions,\n) => sharp.Sharp\n\nexport type CORSConfig = {\n headers?: string[]\n origins: '*' | string[]\n}\n\n/**\n * This is the central configuration\n *\n * @see https://payloadcms.com/docs/configuration/overview\n */\nexport type Config = {\n /** Configure admin dashboard */\n admin?: {\n /** Automatically log in as a user */\n autoLogin?:\n | {\n /**\n * The email address of the user to login as\n */\n email?: string\n /** The password of the user to login as. This is only needed if `prefillOnly` is set to true */\n password?: string\n /**\n * If set to true, the login credentials will be prefilled but the user will still need to click the login button.\n *\n * @default false\n */\n prefillOnly?: boolean\n /** The username of the user to login as */\n username?: string\n }\n | false\n\n /** Set account profile picture. Options: gravatar, default or a custom React component. */\n avatar?: 'default' | 'gravatar' | React.ComponentType<any>\n /**\n * Add extra and/or replace built-in components with custom components\n *\n * @see https://payloadcms.com/docs/admin/components\n */\n components?: {\n /**\n * Replace the navigation with a custom component\n */\n Nav?: CustomComponent\n /**\n * Add custom components to the top right of the Admin Panel\n */\n actions?: CustomComponent[]\n /**\n * Add custom components after the collection overview\n */\n afterDashboard?: CustomComponent[]\n /**\n * Add custom components after the email/password field\n */\n afterLogin?: CustomComponent[]\n /**\n * Add custom components after the navigation links\n */\n afterNavLinks?: CustomComponent[]\n /**\n * Add custom components before the collection overview\n */\n beforeDashboard?: CustomComponent[]\n /**\n * Add custom components before the email/password field\n */\n beforeLogin?: CustomComponent[]\n /**\n * Add custom components before the navigation links\n */\n beforeNavLinks?: CustomComponent[]\n /** Replace graphical components */\n graphics?: {\n /** Replace the icon in the navigation */\n Icon?: CustomComponent\n /** Replace the logo on the login page */\n Logo?: CustomComponent\n }\n /** Replace logout related components */\n logout?: {\n /** Replace the logout button */\n Button?: CustomComponent\n }\n /**\n * Wrap the admin dashboard in custom context providers\n */\n providers?: React.ComponentType<{ children?: React.ReactNode }>[]\n /**\n * Replace or modify top-level admin routes, or add new ones:\n * + `Account` - `/admin/account`\n * + `Dashboard` - `/admin`\n * + `:path` - `/admin/:path`\n */\n views?: {\n /** Add custom admin views */\n [key: string]: AdminView\n /** Replace the account screen */\n Account?: AdminView\n /** Replace the admin homepage */\n Dashboard?: AdminView\n }\n }\n /** Extension point to add your custom data. Available in server and client. */\n custom?: Record<string, any>\n /** Global date format that will be used for all dates in the Admin panel. Any valid date-fns format pattern can be used. */\n dateFormat?: string\n /** If set to true, the entire Admin panel will be disabled. */\n disable?: boolean\n livePreview?: {\n collections?: string[]\n globals?: string[]\n } & LivePreviewConfig\n /** Base meta data to use for the Admin Panel. Included properties are titleSuffix, ogImage, and favicon. */\n meta?: MetaConfig\n routes?: {\n /** The route for the account page. */\n account?: string\n /** The route for the create first user page. */\n createFirstUser?: string\n /** The route for the forgot password page. */\n forgot?: string\n /** The route the user will be redirected to after being inactive for too long. */\n inactivity?: string\n /** The route for the login page. */\n login?: string\n /** The route for the logout page. */\n logout?: string\n /** The route for the reset password page. */\n reset?: string\n /** The route for the unauthorized page. */\n unauthorized?: string\n }\n /** The slug of a Collection that you want to be used to log in to the Admin dashboard. */\n user?: string\n }\n /** Custom Payload bin scripts can be injected via the config. */\n bin?: BinScriptConfig[]\n /**\n * Manage the datamodel of your application\n *\n * @see https://payloadcms.com/docs/configuration/collections#collection-configs\n */\n collections?: CollectionConfig[]\n /**\n * Replace the built-in components with custom ones\n */\n components?: { [key: string]: (() => JSX.Element) | JSX.Element }\n /**\n * Prefix a string to all cookies that Payload sets.\n *\n * @default \"payload\"\n */\n cookiePrefix?: string\n /** Either a whitelist array of URLS to allow CORS requests from, or a wildcard string ('*') to accept incoming requests from any domain. */\n cors?: '*' | CORSConfig | string[]\n /** A whitelist array of URLs to allow Payload cookies to be accepted from as a form of CSRF protection. */\n csrf?: string[]\n\n /** Extension point to add your custom data. Server only. */\n custom?: Record<string, any>\n\n /** Pass in a database adapter for use on this project. */\n db: DatabaseAdapterResult\n /** Enable to expose more detailed error information. */\n debug?: boolean\n /**\n * If a user does not specify `depth` while requesting a resource, this depth will be used.\n *\n * @see https://payloadcms.com/docs/getting-started/concepts#depth\n *\n * @default 2\n */\n defaultDepth?: number\n /**\n * The maximum allowed depth to be permitted application-wide. This setting helps prevent against malicious queries.\n *\n * @default 40000\n */\n defaultMaxTextLength?: number\n /** Default richtext editor to use for richText fields */\n editor?: RichTextAdapterProvider<any, any, any>\n /**\n * Email Adapter\n *\n * @see https://payloadcms.com/docs/email/overview\n */\n email?: EmailAdapter | Promise<EmailAdapter>\n /** Custom REST endpoints */\n endpoints?: Endpoint[]\n /**\n * @see https://payloadcms.com/docs/configuration/globals#global-configs\n */\n globals?: GlobalConfig[]\n /**\n * Manage the GraphQL API\n *\n * You can add your own GraphQL queries and mutations to Payload, making use of all the types that Payload has defined for you.\n *\n * @see https://payloadcms.com/docs/graphql/overview\n */\n graphQL?: {\n disable?: boolean\n disablePlaygroundInProduction?: boolean\n maxComplexity?: number\n /**\n * Function that returns an object containing keys to custom GraphQL mutations\n *\n * @see https://payloadcms.com/docs/graphql/extending\n */\n mutations?: GraphQLExtension\n /**\n * Function that returns an object containing keys to custom GraphQL queries\n *\n * @see https://payloadcms.com/docs/graphql/extending\n */\n queries?: GraphQLExtension\n /**\n * Filepath to write the generated schema to\n */\n schemaOutputFile?: string\n }\n /**\n * Tap into Payload-wide hooks.\n *\n * @see https://payloadcms.com/docs/hooks/overview\n */\n hooks?: {\n afterError?: AfterErrorHook\n }\n /** i18n config settings */\n i18n?: I18nOptions<{} | DefaultTranslationsObject> // loosen the type here to allow for custom translations\n /** Automatically index all sortable top-level fields in the database to improve sort performance and add database compatibility for Azure Cosmos and similar. */\n indexSortableFields?: boolean\n /**\n * Translate your content to different languages/locales.\n *\n * @default false // disable localization\n */\n localization?: LocalizationConfig | false\n /**\n * The maximum allowed depth to be permitted application-wide. This setting helps prevent against malicious queries.\n *\n * @see https://payloadcms.com/docs/getting-started/concepts#depth\n *\n * @default 10\n */\n maxDepth?: number\n /** A function that is called immediately following startup that receives the Payload instance as its only argument. */\n onInit?: (payload: Payload) => Promise<void> | void\n /**\n * An array of Payload plugins.\n *\n * @see https://payloadcms.com/docs/plugins/overview\n */\n plugins?: Plugin[]\n /** Control the routing structure that Payload binds itself to. */\n routes?: {\n /** The route for the admin panel.\n * @example \"/my-admin\"\n * @default \"/admin\"\n */\n admin?: string\n /** @default \"/api\" */\n api?: string\n /** @default \"/graphql\" */\n graphQL?: string\n /** @default \"/graphql-playground\" */\n graphQLPlayground?: string\n }\n /** Secure string that Payload will use for any encryption workflows */\n secret: string\n /**\n * Define the absolute URL of your app including the protocol, for example `https://example.org`.\n * No paths allowed, only protocol, domain and (optionally) port.\n *\n * @see https://payloadcms.com/docs/configuration/overview#options\n */\n serverURL?: string\n /**\n * Pass in a local copy of Sharp if you'd like to use it.\n *\n */\n sharp?: SharpDependency\n /** Send anonymous telemetry data about general usage. */\n telemetry?: boolean\n /** Control how typescript interfaces are generated from your collections. */\n typescript?: {\n /**\n * Automatically generate types during development\n * @default true\n */\n autoGenerate?: boolean\n\n /** Disable declare block in generated types file */\n declare?:\n | {\n /**\n * @internal internal use only to allow for multiple declarations within a monorepo and suppress the \"Duplicate identifier GeneratedTypes\" error\n *\n * Adds a @ts-ignore flag above the GeneratedTypes interface declaration\n *\n * @default false\n */\n ignoreTSError?: boolean\n }\n | false\n\n /** Filename to write the generated types to */\n outputFile?: string\n\n /**\n * Allows you to modify the base JSON schema that is generated during generate:types. This JSON schema will be used\n * to generate the TypeScript interfaces.\n */\n schema?: Array<(args: { jsonSchema: JSONSchema4 }) => JSONSchema4>\n }\n /**\n * Customize the handling of incoming file uploads for collections that have uploads enabled.\n */\n upload?: ExpressFileUploadOptions\n}\n\nexport type SanitizedConfig = {\n collections: SanitizedCollectionConfig[]\n /** Default richtext editor to use for richText fields */\n editor?: RichTextAdapter<any, any, any>\n endpoints: Endpoint[]\n globals: SanitizedGlobalConfig[]\n i18n: Required<I18nOptions>\n localization: SanitizedLocalizationConfig | false\n paths: {\n config: string\n configDir: string\n rawConfig: string\n }\n upload: {\n /**\n * Deduped list of adapters used in the project\n */\n adapters: string[]\n } & ExpressFileUploadOptions\n} & Omit<\n DeepRequired<Config>,\n 'collections' | 'editor' | 'endpoint' | 'globals' | 'i18n' | 'localization' | 'upload'\n>\n\nexport type EditConfig =\n | (\n | {\n /**\n * Replace or modify individual nested routes, or add new ones:\n * + `Default` - `/admin/collections/:collection/:id`\n * + `API` - `/admin/collections/:collection/:id/api`\n * + `LivePreview` - `/admin/collections/:collection/:id/preview`\n * + `References` - `/admin/collections/:collection/:id/references`\n * + `Relationships` - `/admin/collections/:collection/:id/relationships`\n * + `Versions` - `/admin/collections/:collection/:id/versions`\n * + `Version` - `/admin/collections/:collection/:id/versions/:version`\n * + `CustomView` - `/admin/collections/:collection/:id/:path`\n */\n API?: EditViewComponent | Partial<EditViewConfig>\n Default?: EditViewComponent | Partial<EditViewConfig>\n LivePreview?: EditViewComponent | Partial<EditViewConfig>\n Version?: EditViewComponent | Partial<EditViewConfig>\n Versions?: EditViewComponent | Partial<EditViewConfig>\n // TODO: uncomment these as they are built\n // References?: EditView\n // Relationships?: EditView\n }\n | {\n [key: string]: EditViewConfig\n }\n )\n | EditViewComponent\n\nexport type EntityDescriptionComponent = CustomComponent\n\nexport type EntityDescriptionFunction = ({ t }: { t: TFunction }) => string\n\nexport type EntityDescription = EntityDescriptionFunction | Record<string, string> | string\n\nexport type { EmailAdapter, SendEmailOptions }\n"],"names":["serverProps"],"mappings":"AAiVA,OAAO,MAAMA,cAAqC;IAChD;IACA;IACA;IACA;IACA;IACA;IACA;CACD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPredefinedMigration.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/getPredefinedMigration.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAExD;;GAEG;AACH,eAAO,MAAM,sBAAsB,iEAKhC;IACD,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,OAAO,EAAE,OAAO,CAAA;CACjB,KAAG,OAAO,CAAC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"getPredefinedMigration.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/getPredefinedMigration.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAExD;;GAEG;AACH,eAAO,MAAM,sBAAsB,iEAKhC;IACD,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,OAAO,EAAE,OAAO,CAAA;CACjB,KAAG,OAAO,CAAC,qBAAqB,CA8BhC,CAAA"}
|
|
@@ -22,8 +22,11 @@ import { pathToFileURL } from 'url';
|
|
|
22
22
|
upSQL
|
|
23
23
|
};
|
|
24
24
|
} catch (error) {
|
|
25
|
-
payload.logger.error(
|
|
26
|
-
|
|
25
|
+
payload.logger.error({
|
|
26
|
+
error,
|
|
27
|
+
msg: `Error loading predefined migration ${migrationName}`
|
|
28
|
+
});
|
|
29
|
+
process.exit(1);
|
|
27
30
|
}
|
|
28
31
|
} else {
|
|
29
32
|
payload.logger.error({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/database/migrations/getPredefinedMigration.ts"],"sourcesContent":["import fs from 'fs'\nimport path from 'path'\nimport { pathToFileURL } from 'url'\n\nimport type { Payload } from '../../index.js'\nimport type { MigrationTemplateArgs } from '../types.js'\n\n/**\n * Get predefined migration 'up', 'down' and 'imports'\n */\nexport const getPredefinedMigration = async ({\n dirname,\n file,\n migrationName: migrationNameArg,\n payload,\n}: {\n dirname: string\n file?: string\n migrationName?: string\n payload: Payload\n}): Promise<MigrationTemplateArgs> => {\n // Check for predefined migration.\n // Either passed in via --file or prefixed with '@payloadcms/db-mongodb/' for example\n if (file || migrationNameArg?.startsWith('@payloadcms/')) {\n // removes the package name from the migrationName.\n const migrationName = (file || migrationNameArg).split('/').slice(2).join('/')\n let cleanPath = path.join(dirname, `./predefinedMigrations/${migrationName}.mjs`)\n\n // Check if predefined migration exists\n if (fs.existsSync(cleanPath)) {\n cleanPath = cleanPath.replaceAll('\\\\', '/')\n const moduleURL = pathToFileURL(cleanPath)\n try {\n const { downSQL, imports, upSQL } = await eval(`import('${moduleURL.href}')`)\n return { downSQL, imports, upSQL }\n } catch (error) {\n payload.logger.error(`Error loading predefined migration ${migrationName}
|
|
1
|
+
{"version":3,"sources":["../../../src/database/migrations/getPredefinedMigration.ts"],"sourcesContent":["import fs from 'fs'\nimport path from 'path'\nimport { pathToFileURL } from 'url'\n\nimport type { Payload } from '../../index.js'\nimport type { MigrationTemplateArgs } from '../types.js'\n\n/**\n * Get predefined migration 'up', 'down' and 'imports'\n */\nexport const getPredefinedMigration = async ({\n dirname,\n file,\n migrationName: migrationNameArg,\n payload,\n}: {\n dirname: string\n file?: string\n migrationName?: string\n payload: Payload\n}): Promise<MigrationTemplateArgs> => {\n // Check for predefined migration.\n // Either passed in via --file or prefixed with '@payloadcms/db-mongodb/' for example\n if (file || migrationNameArg?.startsWith('@payloadcms/')) {\n // removes the package name from the migrationName.\n const migrationName = (file || migrationNameArg).split('/').slice(2).join('/')\n let cleanPath = path.join(dirname, `./predefinedMigrations/${migrationName}.mjs`)\n\n // Check if predefined migration exists\n if (fs.existsSync(cleanPath)) {\n cleanPath = cleanPath.replaceAll('\\\\', '/')\n const moduleURL = pathToFileURL(cleanPath)\n try {\n const { downSQL, imports, upSQL } = await eval(`import('${moduleURL.href}')`)\n return { downSQL, imports, upSQL }\n } catch (error) {\n payload.logger.error({\n error,\n msg: `Error loading predefined migration ${migrationName}`,\n })\n process.exit(1)\n }\n } else {\n payload.logger.error({\n msg: `Canned migration ${migrationName} not found.`,\n })\n process.exit(1)\n }\n }\n return {}\n}\n"],"names":["fs","path","pathToFileURL","getPredefinedMigration","dirname","file","migrationName","migrationNameArg","payload","startsWith","split","slice","join","cleanPath","existsSync","replaceAll","moduleURL","downSQL","imports","upSQL","eval","href","error","logger","msg","process","exit"],"mappings":"AAAA,OAAOA,QAAQ,KAAI;AACnB,OAAOC,UAAU,OAAM;AACvB,SAASC,aAAa,QAAQ,MAAK;AAKnC;;CAEC,GACD,OAAO,MAAMC,yBAAyB,OAAO,EAC3CC,OAAO,EACPC,IAAI,EACJC,eAAeC,gBAAgB,EAC/BC,OAAO,EAMR;IACC,kCAAkC;IAClC,qFAAqF;IACrF,IAAIH,QAAQE,kBAAkBE,WAAW,iBAAiB;QACxD,mDAAmD;QACnD,MAAMH,gBAAgB,AAACD,CAAAA,QAAQE,gBAAe,EAAGG,KAAK,CAAC,KAAKC,KAAK,CAAC,GAAGC,IAAI,CAAC;QAC1E,IAAIC,YAAYZ,KAAKW,IAAI,CAACR,SAAS,CAAC,uBAAuB,EAAEE,cAAc,IAAI,CAAC;QAEhF,uCAAuC;QACvC,IAAIN,GAAGc,UAAU,CAACD,YAAY;YAC5BA,YAAYA,UAAUE,UAAU,CAAC,MAAM;YACvC,MAAMC,YAAYd,cAAcW;YAChC,IAAI;gBACF,MAAM,EAAEI,OAAO,EAAEC,OAAO,EAAEC,KAAK,EAAE,GAAG,MAAMC,KAAK,CAAC,QAAQ,EAAEJ,UAAUK,IAAI,CAAC,EAAE,CAAC;gBAC5E,OAAO;oBAAEJ;oBAASC;oBAASC;gBAAM;YACnC,EAAE,OAAOG,OAAO;gBACdd,QAAQe,MAAM,CAACD,KAAK,CAAC;oBACnBA;oBACAE,KAAK,CAAC,mCAAmC,EAAElB,cAAc,CAAC;gBAC5D;gBACAmB,QAAQC,IAAI,CAAC;YACf;QACF,OAAO;YACLlB,QAAQe,MAAM,CAACD,KAAK,CAAC;gBACnBE,KAAK,CAAC,iBAAiB,EAAElB,cAAc,WAAW,CAAC;YACrD;YACAmB,QAAQC,IAAI,CAAC;QACf;IACF;IACA,OAAO,CAAC;AACV,EAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../../../src/exports/components/utilities.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/exports/components/utilities.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/fields/config/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAEzD,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAEpE,MAAM,MAA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AAkE,CAAA"}
|
|
@@ -100,6 +100,7 @@ export type FilterOptionsProps<TData = any> = {
|
|
|
100
100
|
*/
|
|
101
101
|
user: Partial<PayloadRequest['user']>;
|
|
102
102
|
};
|
|
103
|
+
export type FilterOptionsFunc<TData = any> = (options: FilterOptionsProps<TData>) => Promise<Where | boolean> | Where | boolean;
|
|
103
104
|
export type FilterOptions<TData = any> = ((options: FilterOptionsProps<TData>) => Promise<Where | boolean> | Where | boolean) | Where | null;
|
|
104
105
|
type Admin = {
|
|
105
106
|
className?: string;
|