payload 3.0.0-beta.30 → 3.0.0-beta.32

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.
Files changed (77) hide show
  1. package/dist/admin/RichText.d.ts +6 -5
  2. package/dist/admin/RichText.d.ts.map +1 -1
  3. package/dist/admin/RichText.js.map +1 -1
  4. package/dist/admin/elements/Cell.d.ts +1 -0
  5. package/dist/admin/elements/Cell.d.ts.map +1 -1
  6. package/dist/admin/elements/Tab.d.ts +1 -0
  7. package/dist/admin/elements/Tab.d.ts.map +1 -1
  8. package/dist/admin/elements/WithServerSideProps.d.ts +6 -2
  9. package/dist/admin/elements/WithServerSideProps.d.ts.map +1 -1
  10. package/dist/admin/elements/WithServerSideProps.js.map +1 -1
  11. package/dist/admin/forms/Error.d.ts +1 -0
  12. package/dist/admin/forms/Error.d.ts.map +1 -1
  13. package/dist/admin/forms/FieldTypes.d.ts +1 -0
  14. package/dist/admin/forms/FieldTypes.d.ts.map +1 -1
  15. package/dist/admin/forms/Label.d.ts +1 -0
  16. package/dist/admin/forms/Label.d.ts.map +1 -1
  17. package/dist/admin/types.d.ts +1 -1
  18. package/dist/admin/types.d.ts.map +1 -1
  19. package/dist/admin/types.js.map +1 -1
  20. package/dist/admin/views/types.d.ts +3 -2
  21. package/dist/admin/views/types.d.ts.map +1 -1
  22. package/dist/admin/views/types.js.map +1 -1
  23. package/dist/auth/types.d.ts +1 -1
  24. package/dist/auth/types.d.ts.map +1 -1
  25. package/dist/auth/types.js.map +1 -1
  26. package/dist/bin/loader/index.d.ts.map +1 -1
  27. package/dist/bin/loader/index.js +1 -8
  28. package/dist/bin/loader/index.js.map +1 -1
  29. package/dist/bin/loader/read-default-tsconfig.d.ts +25 -0
  30. package/dist/bin/loader/read-default-tsconfig.d.ts.map +1 -1
  31. package/dist/bin/loader/read-default-tsconfig.js +25 -1
  32. package/dist/bin/loader/read-default-tsconfig.js.map +1 -1
  33. package/dist/collections/config/client.d.ts +1 -0
  34. package/dist/collections/config/client.d.ts.map +1 -1
  35. package/dist/collections/config/types.d.ts +1 -0
  36. package/dist/collections/config/types.d.ts.map +1 -1
  37. package/dist/config/defaults.d.ts.map +1 -1
  38. package/dist/config/defaults.js +11 -3
  39. package/dist/config/defaults.js.map +1 -1
  40. package/dist/config/sanitize.d.ts.map +1 -1
  41. package/dist/config/sanitize.js.map +1 -1
  42. package/dist/config/schema.d.ts.map +1 -1
  43. package/dist/config/schema.js +12 -4
  44. package/dist/config/schema.js.map +1 -1
  45. package/dist/config/types.d.ts +48 -20
  46. package/dist/config/types.d.ts.map +1 -1
  47. package/dist/config/types.js +7 -1
  48. package/dist/config/types.js.map +1 -1
  49. package/dist/exports/node.d.ts +2 -0
  50. package/dist/exports/node.d.ts.map +1 -1
  51. package/dist/exports/node.js +2 -0
  52. package/dist/exports/node.js.map +1 -1
  53. package/dist/exports/types.d.ts.map +1 -1
  54. package/dist/exports/types.js.map +1 -1
  55. package/dist/fields/config/client.d.ts +79 -78
  56. package/dist/fields/config/client.d.ts.map +1 -1
  57. package/dist/fields/config/types.d.ts +30 -24
  58. package/dist/fields/config/types.d.ts.map +1 -1
  59. package/dist/fields/config/types.js.map +1 -1
  60. package/dist/fields/validations.d.ts +1 -0
  61. package/dist/fields/validations.d.ts.map +1 -1
  62. package/dist/fields/validations.js +2 -2
  63. package/dist/fields/validations.js.map +1 -1
  64. package/dist/index.d.ts +2 -4
  65. package/dist/index.d.ts.map +1 -1
  66. package/dist/index.js.map +1 -1
  67. package/dist/types/index.d.ts +5 -5
  68. package/dist/types/index.d.ts.map +1 -1
  69. package/dist/types/index.js.map +1 -1
  70. package/dist/uploads/getBaseFields.js +1 -1
  71. package/dist/uploads/getBaseFields.js.map +1 -1
  72. package/dist/utilities/configToJSONSchema.d.ts.map +1 -1
  73. package/dist/utilities/configToJSONSchema.js +5 -1
  74. package/dist/utilities/configToJSONSchema.js.map +1 -1
  75. package/dist/utilities/configToJSONSchema.spec.js +96 -0
  76. package/dist/utilities/configToJSONSchema.spec.js.map +1 -1
  77. package/package.json +3 -2
@@ -5,10 +5,17 @@ export const defaults = {
5
5
  custom: {},
6
6
  dateFormat: 'MMMM do yyyy, h:mm a',
7
7
  disable: false,
8
- inactivityRoute: '/logout-inactivity',
9
- logoutRoute: '/logout',
10
8
  meta: {
11
9
  titleSuffix: '- Payload'
10
+ },
11
+ routes: {
12
+ account: '/account',
13
+ createFirstUser: '/create-first-user',
14
+ forgot: '/forgot',
15
+ inactivity: '/logout-inactivity',
16
+ login: '/login',
17
+ logout: '/logout',
18
+ unauthorized: '/unauthorized'
12
19
  }
13
20
  },
14
21
  bin: [],
@@ -23,7 +30,8 @@ export const defaults = {
23
30
  globals: [],
24
31
  graphQL: {
25
32
  disablePlaygroundInProduction: true,
26
- maxComplexity: 1000
33
+ maxComplexity: 1000,
34
+ schemaOutputFile: `${typeof process?.cwd === 'function' ? process.cwd() : ''}/schema.graphql`
27
35
  },
28
36
  hooks: {},
29
37
  i18n: {},
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/config/defaults.ts"],"sourcesContent":["import type { Config } from './types.js'\n\nexport const defaults: Omit<Config, 'db' | 'editor' | 'secret'> = {\n admin: {\n avatar: 'default',\n components: {},\n custom: {},\n dateFormat: 'MMMM do yyyy, h:mm a',\n disable: false,\n inactivityRoute: '/logout-inactivity',\n logoutRoute: '/logout',\n meta: {\n titleSuffix: '- Payload',\n },\n },\n bin: [],\n collections: [],\n cookiePrefix: 'payload',\n cors: [],\n csrf: [],\n custom: {},\n defaultDepth: 2,\n defaultMaxTextLength: 40000,\n endpoints: [],\n globals: [],\n graphQL: {\n disablePlaygroundInProduction: true,\n maxComplexity: 1000,\n },\n hooks: {},\n i18n: {},\n localization: false,\n maxDepth: 10,\n routes: {\n admin: '/admin',\n api: '/api',\n graphQL: '/graphql',\n graphQLPlayground: '/graphql-playground',\n },\n serverURL: '',\n telemetry: true,\n typescript: {\n outputFile: `${typeof process?.cwd === 'function' ? process.cwd() : ''}/payload-types.ts`,\n },\n upload: {},\n}\n"],"names":["defaults","admin","avatar","components","custom","dateFormat","disable","inactivityRoute","logoutRoute","meta","titleSuffix","bin","collections","cookiePrefix","cors","csrf","defaultDepth","defaultMaxTextLength","endpoints","globals","graphQL","disablePlaygroundInProduction","maxComplexity","hooks","i18n","localization","maxDepth","routes","api","graphQLPlayground","serverURL","telemetry","typescript","outputFile","process","cwd","upload"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,OAAO,MAAMA,WAAqD;IAChEC,OAAO;QACLC,QAAQ;QACRC,YAAY,CAAC;QACbC,QAAQ,CAAC;QACTC,YAAY;QACZC,SAAS;QACTC,iBAAiB;QACjBC,aAAa;QACbC,MAAM;YACJC,aAAa;QACf;IACF;IACAC,KAAK,EAAE;IACPC,aAAa,EAAE;IACfC,cAAc;IACdC,MAAM,EAAE;IACRC,MAAM,EAAE;IACRX,QAAQ,CAAC;IACTY,cAAc;IACdC,sBAAsB;IACtBC,WAAW,EAAE;IACbC,SAAS,EAAE;IACXC,SAAS;QACPC,+BAA+B;QAC/BC,eAAe;IACjB;IACAC,OAAO,CAAC;IACRC,MAAM,CAAC;IACPC,cAAc;IACdC,UAAU;IACVC,QAAQ;QACN1B,OAAO;QACP2B,KAAK;QACLR,SAAS;QACTS,mBAAmB;IACrB;IACAC,WAAW;IACXC,WAAW;IACXC,YAAY;QACVC,YAAY,CAAC,EAAE,OAAOC,SAASC,QAAQ,aAAaD,QAAQC,GAAG,KAAK,GAAG,iBAAiB,CAAC;IAC3F;IACAC,QAAQ,CAAC;AACX,EAAC"}
1
+ {"version":3,"sources":["../../src/config/defaults.ts"],"sourcesContent":["import type { Config } from './types.js'\n\nexport const defaults: Omit<Config, 'db' | 'editor' | 'secret'> = {\n admin: {\n avatar: 'default',\n components: {},\n custom: {},\n dateFormat: 'MMMM do yyyy, h:mm a',\n disable: false,\n meta: {\n titleSuffix: '- Payload',\n },\n routes: {\n account: '/account',\n createFirstUser: '/create-first-user',\n forgot: '/forgot',\n inactivity: '/logout-inactivity',\n login: '/login',\n logout: '/logout',\n unauthorized: '/unauthorized',\n },\n },\n bin: [],\n collections: [],\n cookiePrefix: 'payload',\n cors: [],\n csrf: [],\n custom: {},\n defaultDepth: 2,\n defaultMaxTextLength: 40000,\n endpoints: [],\n globals: [],\n graphQL: {\n disablePlaygroundInProduction: true,\n maxComplexity: 1000,\n schemaOutputFile: `${typeof process?.cwd === 'function' ? process.cwd() : ''}/schema.graphql`,\n },\n hooks: {},\n i18n: {},\n localization: false,\n maxDepth: 10,\n routes: {\n admin: '/admin',\n api: '/api',\n graphQL: '/graphql',\n graphQLPlayground: '/graphql-playground',\n },\n serverURL: '',\n telemetry: true,\n typescript: {\n outputFile: `${typeof process?.cwd === 'function' ? process.cwd() : ''}/payload-types.ts`,\n },\n upload: {},\n}\n"],"names":["defaults","admin","avatar","components","custom","dateFormat","disable","meta","titleSuffix","routes","account","createFirstUser","forgot","inactivity","login","logout","unauthorized","bin","collections","cookiePrefix","cors","csrf","defaultDepth","defaultMaxTextLength","endpoints","globals","graphQL","disablePlaygroundInProduction","maxComplexity","schemaOutputFile","process","cwd","hooks","i18n","localization","maxDepth","api","graphQLPlayground","serverURL","telemetry","typescript","outputFile","upload"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,OAAO,MAAMA,WAAqD;IAChEC,OAAO;QACLC,QAAQ;QACRC,YAAY,CAAC;QACbC,QAAQ,CAAC;QACTC,YAAY;QACZC,SAAS;QACTC,MAAM;YACJC,aAAa;QACf;QACAC,QAAQ;YACNC,SAAS;YACTC,iBAAiB;YACjBC,QAAQ;YACRC,YAAY;YACZC,OAAO;YACPC,QAAQ;YACRC,cAAc;QAChB;IACF;IACAC,KAAK,EAAE;IACPC,aAAa,EAAE;IACfC,cAAc;IACdC,MAAM,EAAE;IACRC,MAAM,EAAE;IACRjB,QAAQ,CAAC;IACTkB,cAAc;IACdC,sBAAsB;IACtBC,WAAW,EAAE;IACbC,SAAS,EAAE;IACXC,SAAS;QACPC,+BAA+B;QAC/BC,eAAe;QACfC,kBAAkB,CAAC,EAAE,OAAOC,SAASC,QAAQ,aAAaD,QAAQC,GAAG,KAAK,GAAG,eAAe,CAAC;IAC/F;IACAC,OAAO,CAAC;IACRC,MAAM,CAAC;IACPC,cAAc;IACdC,UAAU;IACV1B,QAAQ;QACNR,OAAO;QACPmC,KAAK;QACLV,SAAS;QACTW,mBAAmB;IACrB;IACAC,WAAW;IACXC,WAAW;IACXC,YAAY;QACVC,YAAY,CAAC,EAAE,OAAOX,SAASC,QAAQ,aAAaD,QAAQC,GAAG,KAAK,GAAG,iBAAiB,CAAC;IAC3F;IACAW,QAAQ,CAAC;AACX,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,QAAQ,eAAe,CAmHpF,CAAA"}
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,QAAQ,eAAe,CAqHpF,CAAA"}
@@ -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 merge from 'deepmerge'\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 { isPlainObject } from '../utilities/isPlainObject.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 = merge(defaults, incomingConfig, {\n isMergeableObject: isPlainObject,\n }) as Config\n\n if (!configWithDefaults?.serverURL) {\n configWithDefaults.serverURL = ''\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 = incomingConfig.i18n?.translations || 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 }\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","merge","defaultUserCollection","sanitizeCollection","migrationsCollection","InvalidConfiguration","sanitizeGlobals","getPreferencesCollection","checkDuplicateCollections","isPlainObject","defaults","sanitizeAdminConfig","configToSanitize","sanitizedConfig","admin","user","firstCollectionWithAuth","collections","find","auth","Boolean","slug","push","userCollection","sanitizeConfig","incomingConfig","configWithDefaults","isMergeableObject","serverURL","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"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,SAASA,EAAE,QAAQ,wCAAuC;AAC1D,OAAOC,WAAW,YAAW;AAS7B,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,aAAa,QAAQ,gCAA+B;AAC7D,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;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,WAAW,CAACoC,EAAE,EACrBD;IAEJ;IAEA5C,0BAA0BqB,OAAOZ,WAAW;IAE5C,IAAIY,OAAOyB,OAAO,CAACtB,MAAM,GAAG,GAAG;QAC7BH,OAAOyB,OAAO,GAAG,MAAMhD,gBACrBuB,QACAuB;IAEJ;IAEA,IAAIvB,OAAOD,SAAS,KAAK,IAAI;QAC3BC,OAAO0B,IAAI,CAACjC,IAAI,CAACO,OAAOD,SAAS;IACnC;IAEA,sCAAsC;IACtC,IAAI,CAACC,OAAO2B,MAAM,EAAE3B,OAAO2B,MAAM,GAAG;QAAEC,UAAU,EAAE;IAAC;IACnD5B,OAAO2B,MAAM,CAACC,QAAQ,GAAGC,MAAMC,IAAI,CACjC,IAAIC,IAAI/B,OAAOZ,WAAW,CAACkB,GAAG,CAAC,CAAC0B,IAAMA,EAAEL,MAAM,EAAEM,SAASC,MAAM,CAAC3C;IAGlE;;GAEC,GACD,IAAI,OAAOK,eAAeuC,MAAM,KAAK,YAAY;QAC/CnC,OAAOmC,MAAM,GAAG,MAAMvC,eAAeuC,MAAM,CAAC;YAC1CnC,QAAQA;YACRoC,QAAQ;QACV;IACF;IAEA,MAAMC,WAA4B,EAAE;IACpC,KAAK,MAAMC,oBAAoBf,6BAA8B;QAC3Dc,SAAS5C,IAAI,CAAC6C,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 merge from 'deepmerge'\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 { isPlainObject } from '../utilities/isPlainObject.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 = merge(defaults, incomingConfig, {\n isMergeableObject: isPlainObject,\n }) as Config\n\n if (!configWithDefaults?.serverURL) {\n configWithDefaults.serverURL = ''\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 }\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","merge","defaultUserCollection","sanitizeCollection","migrationsCollection","InvalidConfiguration","sanitizeGlobals","getPreferencesCollection","checkDuplicateCollections","isPlainObject","defaults","sanitizeAdminConfig","configToSanitize","sanitizedConfig","admin","user","firstCollectionWithAuth","collections","find","auth","Boolean","slug","push","userCollection","sanitizeConfig","incomingConfig","configWithDefaults","isMergeableObject","serverURL","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"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,SAASA,EAAE,QAAQ,wCAAuC;AAC1D,OAAOC,WAAW,YAAW;AAS7B,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,aAAa,QAAQ,gCAA+B;AAC7D,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,CA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,OAAOZ,WAAW;IAE5C,IAAIY,OAAOyB,OAAO,CAACtB,MAAM,GAAG,GAAG;QAC7BH,OAAOyB,OAAO,GAAG,MAAMhD,gBACrBuB,QACAuB;IAEJ;IAEA,IAAIvB,OAAOD,SAAS,KAAK,IAAI;QAC3BC,OAAO0B,IAAI,CAACjC,IAAI,CAACO,OAAOD,SAAS;IACnC;IAEA,sCAAsC;IACtC,IAAI,CAACC,OAAO2B,MAAM,EAAE3B,OAAO2B,MAAM,GAAG;QAAEC,UAAU,EAAE;IAAC;IACnD5B,OAAO2B,MAAM,CAACC,QAAQ,GAAGC,MAAMC,IAAI,CACjC,IAAIC,IAAI/B,OAAOZ,WAAW,CAACkB,GAAG,CAAC,CAAC0B,IAAMA,EAAEL,MAAM,EAAEM,SAASC,MAAM,CAAC3C;IAGlE;;GAEC,GACD,IAAI,OAAOK,eAAeuC,MAAM,KAAK,YAAY;QAC/CnC,OAAOmC,MAAM,GAAG,MAAMvC,eAAeuC,MAAM,CAAC;YAC1CnC,QAAQA;YACRoC,QAAQ;QACV;IACF;IAEA,MAAMC,WAA4B,EAAE;IACpC,KAAK,MAAMC,oBAAoBf,6BAA8B;QAC3Dc,SAAS5C,IAAI,CAAC6C,iBAAiBtC;IACjC;IACA,MAAMuC,QAAQC,GAAG,CAACH;IAElB,OAAOrC;AACT,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAA;AAOrB,eAAO,MAAM,eAAe,6BAa3B,CAAA;;AAED,wBAkKE"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAA;AAOrB,eAAO,MAAM,eAAe,6BAa3B,CAAA;;AAED,wBAgLE"}
@@ -43,18 +43,25 @@ export default joi.object({
43
43
  custom: joi.object().pattern(joi.string(), joi.any()),
44
44
  dateFormat: joi.string(),
45
45
  disable: joi.bool(),
46
- inactivityRoute: joi.string(),
47
46
  livePreview: joi.object({
48
47
  ...livePreviewSchema,
49
48
  collections: joi.array().items(joi.string()),
50
49
  globals: joi.array().items(joi.string())
51
50
  }),
52
- logoutRoute: joi.string(),
53
51
  meta: joi.object().keys({
54
- favicon: joi.string(),
52
+ icons: joi.alternatives().try(joi.array().items(joi.alternatives().try(joi.string(), joi.object())), joi.object(), joi.string().allow(null)),
55
53
  ogImage: joi.string(),
56
54
  titleSuffix: joi.string()
57
55
  }),
56
+ routes: joi.object({
57
+ account: joi.string(),
58
+ createFirstUser: joi.string(),
59
+ forgot: joi.string(),
60
+ inactivity: joi.string(),
61
+ login: joi.string(),
62
+ logout: joi.string(),
63
+ unauthorized: joi.string()
64
+ }),
58
65
  user: joi.string()
59
66
  }),
60
67
  bin: joi.array().items(joi.object().keys({
@@ -89,7 +96,8 @@ export default joi.object({
89
96
  disablePlaygroundInProduction: joi.boolean(),
90
97
  maxComplexity: joi.number(),
91
98
  mutations: joi.function(),
92
- queries: joi.function()
99
+ queries: joi.function(),
100
+ schemaOutputFile: joi.string()
93
101
  }),
94
102
  hooks: joi.object().keys({
95
103
  afterError: joi.func()
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/config/schema.ts"],"sourcesContent":["import joi from 'joi'\n\nimport { adminViewSchema } from './shared/adminViewSchema.js'\nimport { componentSchema, livePreviewSchema } from './shared/componentSchema.js'\n\nconst component = joi.alternatives().try(joi.object().unknown(), joi.func())\n\nexport const endpointsSchema = joi.alternatives().try(\n joi.array().items(\n joi.object({\n custom: joi.object().pattern(joi.string(), joi.any()),\n handler: joi.alternatives().try(joi.array().items(joi.func()), joi.func()),\n method: joi\n .string()\n .valid('get', 'head', 'post', 'put', 'patch', 'delete', 'connect', 'options'),\n path: joi.string(),\n root: joi.bool(),\n }),\n ),\n joi.boolean(),\n)\n\nexport default joi.object({\n admin: joi.object({\n autoLogin: joi.alternatives().try(\n joi.object().keys({\n email: joi.string(),\n password: joi.string(),\n prefillOnly: joi.boolean(),\n }),\n joi.boolean(),\n ),\n avatar: joi.alternatives().try(joi.string(), component),\n buildPath: joi.string(),\n components: joi.object().keys({\n Nav: component,\n actions: joi.array().items(component),\n afterDashboard: joi.array().items(component),\n afterLogin: joi.array().items(component),\n afterNavLinks: joi.array().items(component),\n beforeDashboard: joi.array().items(component),\n beforeLogin: joi.array().items(component),\n beforeNavLinks: joi.array().items(component),\n graphics: joi.object({\n Icon: component,\n Logo: component,\n }),\n logout: joi.object({\n Button: component,\n }),\n providers: joi.array().items(component),\n views: joi.alternatives().try(\n joi.object({\n Account: joi.alternatives().try(component, adminViewSchema),\n Dashboard: joi.alternatives().try(component, adminViewSchema),\n }),\n joi.object().pattern(joi.string(), component),\n ),\n }),\n custom: joi.object().pattern(joi.string(), joi.any()),\n dateFormat: joi.string(),\n disable: joi.bool(),\n inactivityRoute: joi.string(),\n livePreview: joi.object({\n ...livePreviewSchema,\n collections: joi.array().items(joi.string()),\n globals: joi.array().items(joi.string()),\n }),\n logoutRoute: joi.string(),\n meta: joi.object().keys({\n favicon: joi.string(),\n ogImage: joi.string(),\n titleSuffix: joi.string(),\n }),\n user: joi.string(),\n }),\n bin: joi.array().items(\n joi.object().keys({\n key: joi.string(),\n scriptPath: joi.string(),\n }),\n ),\n collections: joi.array(),\n cookiePrefix: joi.string(),\n cors: [joi.string().valid('*'), joi.array().items(joi.string())],\n csrf: joi.array().items(joi.string().allow('')).sparse(),\n custom: joi.object().pattern(joi.string(), joi.any()),\n db: joi.any(),\n debug: joi.boolean(),\n defaultDepth: joi.number().min(0).max(30),\n defaultMaxTextLength: joi.number(),\n editor: joi\n .object()\n .required()\n .keys({\n CellComponent: componentSchema.optional(),\n FieldComponent: componentSchema.optional(),\n afterReadPromise: joi.func().optional(),\n outputSchema: joi.func().optional(),\n populationPromise: joi.func().optional(),\n validate: joi.func().required(),\n })\n .unknown(),\n email: joi.alternatives().try(joi.object(), joi.func()),\n endpoints: endpointsSchema,\n globals: joi.array(),\n graphQL: joi.object().keys({\n disable: joi.boolean(),\n disablePlaygroundInProduction: joi.boolean(),\n maxComplexity: joi.number(),\n mutations: joi.function(),\n queries: joi.function(),\n }),\n hooks: joi.object().keys({\n afterError: joi.func(),\n }),\n i18n: joi.object(),\n indexSortableFields: joi.boolean(),\n local: joi.boolean(),\n localization: joi.alternatives().try(\n joi.object().keys({\n defaultLocale: joi.string(),\n fallback: joi.boolean(),\n localeCodes: joi.array().items(joi.string()),\n locales: joi.alternatives().try(\n joi.array().items(\n joi.object().keys({\n code: joi.string(),\n fallbackLocale: joi.string(),\n label: joi\n .alternatives()\n .try(\n joi.object().pattern(joi.string(), [joi.string()]),\n joi.string(),\n joi.valid(false),\n ),\n rtl: joi.boolean(),\n toString: joi.func(),\n }),\n ),\n joi.array().items(joi.string()),\n ),\n }),\n joi.boolean(),\n ),\n maxDepth: joi.number().min(0).max(100),\n onInit: joi.func(),\n plugins: joi.array().items(joi.func()),\n routes: joi.object({\n admin: joi.string(),\n api: joi.string(),\n graphQL: joi.string(),\n graphQLPlayground: joi.string(),\n }),\n secret: joi.string(),\n serverURL: joi\n .string()\n .uri()\n .allow('')\n .custom((value, helper) => {\n const urlWithoutProtocol = value.split('//')[1]\n\n if (!urlWithoutProtocol) {\n return helper.message({\n custom: 'You need to include either \"https://\" or \"http://\" in your serverURL.',\n })\n }\n\n if (urlWithoutProtocol.indexOf('/') > -1) {\n return helper.message({\n custom:\n 'Your serverURL cannot have a path. It can only contain a protocol, a domain, and an optional port.',\n })\n }\n\n return value\n }),\n sharp: joi.any(),\n telemetry: joi.boolean(),\n typescript: joi.object({\n declare: joi.alternatives().try(joi.boolean(), joi.object({ ignoreTSError: joi.boolean() })),\n outputFile: joi.string(),\n }),\n upload: joi.object(),\n})\n"],"names":["joi","adminViewSchema","componentSchema","livePreviewSchema","component","alternatives","try","object","unknown","func","endpointsSchema","array","items","custom","pattern","string","any","handler","method","valid","path","root","bool","boolean","admin","autoLogin","keys","email","password","prefillOnly","avatar","buildPath","components","Nav","actions","afterDashboard","afterLogin","afterNavLinks","beforeDashboard","beforeLogin","beforeNavLinks","graphics","Icon","Logo","logout","Button","providers","views","Account","Dashboard","dateFormat","disable","inactivityRoute","livePreview","collections","globals","logoutRoute","meta","favicon","ogImage","titleSuffix","user","bin","key","scriptPath","cookiePrefix","cors","csrf","allow","sparse","db","debug","defaultDepth","number","min","max","defaultMaxTextLength","editor","required","CellComponent","optional","FieldComponent","afterReadPromise","outputSchema","populationPromise","validate","endpoints","graphQL","disablePlaygroundInProduction","maxComplexity","mutations","function","queries","hooks","afterError","i18n","indexSortableFields","local","localization","defaultLocale","fallback","localeCodes","locales","code","fallbackLocale","label","rtl","toString","maxDepth","onInit","plugins","routes","api","graphQLPlayground","secret","serverURL","uri","value","helper","urlWithoutProtocol","split","message","indexOf","sharp","telemetry","typescript","declare","ignoreTSError","outputFile","upload"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,OAAOA,SAAS,MAAK;AAErB,SAASC,eAAe,QAAQ,8BAA6B;AAC7D,SAASC,eAAe,EAAEC,iBAAiB,QAAQ,8BAA6B;AAEhF,MAAMC,YAAYJ,IAAIK,YAAY,GAAGC,GAAG,CAACN,IAAIO,MAAM,GAAGC,OAAO,IAAIR,IAAIS,IAAI;AAEzE,OAAO,MAAMC,kBAAkBV,IAAIK,YAAY,GAAGC,GAAG,CACnDN,IAAIW,KAAK,GAAGC,KAAK,CACfZ,IAAIO,MAAM,CAAC;IACTM,QAAQb,IAAIO,MAAM,GAAGO,OAAO,CAACd,IAAIe,MAAM,IAAIf,IAAIgB,GAAG;IAClDC,SAASjB,IAAIK,YAAY,GAAGC,GAAG,CAACN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AAG;YACxC,OAAOJ,OAAOG,OAAO,CAAC;gBACpB5G,QACE;YACJ;QACF;QAEA,OAAOwG;IACT;IACFM,OAAO3H,IAAIgB,GAAG;IACd4G,WAAW5H,IAAIuB,OAAO;IACtBsG,YAAY7H,IAAIO,MAAM,CAAC;QACrBuH,SAAS9H,IAAIK,YAAY,GAAGC,GAAG,CAACN,IAAIuB,OAAO,IAAIvB,IAAIO,MAAM,CAAC;YAAEwH,eAAe/H,IAAIuB,OAAO;QAAG;QACzFyG,YAAYhI,IAAIe,MAAM;IACxB;IACAkH,QAAQjI,IAAIO,MAAM;AACpB,GAAE"}
1
+ {"version":3,"sources":["../../src/config/schema.ts"],"sourcesContent":["import joi from 'joi'\n\nimport { adminViewSchema } from './shared/adminViewSchema.js'\nimport { componentSchema, livePreviewSchema } from './shared/componentSchema.js'\n\nconst component = joi.alternatives().try(joi.object().unknown(), joi.func())\n\nexport const endpointsSchema = joi.alternatives().try(\n joi.array().items(\n joi.object({\n custom: joi.object().pattern(joi.string(), joi.any()),\n handler: joi.alternatives().try(joi.array().items(joi.func()), joi.func()),\n method: joi\n .string()\n .valid('get', 'head', 'post', 'put', 'patch', 'delete', 'connect', 'options'),\n path: joi.string(),\n root: joi.bool(),\n }),\n ),\n joi.boolean(),\n)\n\nexport default joi.object({\n admin: joi.object({\n autoLogin: joi.alternatives().try(\n joi.object().keys({\n email: joi.string(),\n password: joi.string(),\n prefillOnly: joi.boolean(),\n }),\n joi.boolean(),\n ),\n avatar: joi.alternatives().try(joi.string(), component),\n buildPath: joi.string(),\n components: joi.object().keys({\n Nav: component,\n actions: joi.array().items(component),\n afterDashboard: joi.array().items(component),\n afterLogin: joi.array().items(component),\n afterNavLinks: joi.array().items(component),\n beforeDashboard: joi.array().items(component),\n beforeLogin: joi.array().items(component),\n beforeNavLinks: joi.array().items(component),\n graphics: joi.object({\n Icon: component,\n Logo: component,\n }),\n logout: joi.object({\n Button: component,\n }),\n providers: joi.array().items(component),\n views: joi.alternatives().try(\n joi.object({\n Account: joi.alternatives().try(component, adminViewSchema),\n Dashboard: joi.alternatives().try(component, adminViewSchema),\n }),\n joi.object().pattern(joi.string(), component),\n ),\n }),\n custom: joi.object().pattern(joi.string(), joi.any()),\n dateFormat: joi.string(),\n disable: joi.bool(),\n livePreview: joi.object({\n ...livePreviewSchema,\n collections: joi.array().items(joi.string()),\n globals: joi.array().items(joi.string()),\n }),\n meta: joi.object().keys({\n icons: joi\n .alternatives()\n .try(\n joi.array().items(joi.alternatives().try(joi.string(), joi.object())),\n joi.object(),\n joi.string().allow(null),\n ),\n ogImage: joi.string(),\n titleSuffix: joi.string(),\n }),\n routes: joi.object({\n account: joi.string(),\n createFirstUser: joi.string(),\n forgot: joi.string(),\n inactivity: joi.string(),\n login: joi.string(),\n logout: joi.string(),\n unauthorized: joi.string(),\n }),\n user: joi.string(),\n }),\n bin: joi.array().items(\n joi.object().keys({\n key: joi.string(),\n scriptPath: joi.string(),\n }),\n ),\n collections: joi.array(),\n cookiePrefix: joi.string(),\n cors: [joi.string().valid('*'), joi.array().items(joi.string())],\n csrf: joi.array().items(joi.string().allow('')).sparse(),\n custom: joi.object().pattern(joi.string(), joi.any()),\n db: joi.any(),\n debug: joi.boolean(),\n defaultDepth: joi.number().min(0).max(30),\n defaultMaxTextLength: joi.number(),\n editor: joi\n .object()\n .required()\n .keys({\n CellComponent: componentSchema.optional(),\n FieldComponent: componentSchema.optional(),\n afterReadPromise: joi.func().optional(),\n outputSchema: joi.func().optional(),\n populationPromise: joi.func().optional(),\n validate: joi.func().required(),\n })\n .unknown(),\n email: joi.alternatives().try(joi.object(), joi.func()),\n endpoints: endpointsSchema,\n globals: joi.array(),\n graphQL: joi.object().keys({\n disable: joi.boolean(),\n disablePlaygroundInProduction: joi.boolean(),\n maxComplexity: joi.number(),\n mutations: joi.function(),\n queries: joi.function(),\n schemaOutputFile: joi.string(),\n }),\n hooks: joi.object().keys({\n afterError: joi.func(),\n }),\n i18n: joi.object(),\n indexSortableFields: joi.boolean(),\n local: joi.boolean(),\n localization: joi.alternatives().try(\n joi.object().keys({\n defaultLocale: joi.string(),\n fallback: joi.boolean(),\n localeCodes: joi.array().items(joi.string()),\n locales: joi.alternatives().try(\n joi.array().items(\n joi.object().keys({\n code: joi.string(),\n fallbackLocale: joi.string(),\n label: joi\n .alternatives()\n .try(\n joi.object().pattern(joi.string(), [joi.string()]),\n joi.string(),\n joi.valid(false),\n ),\n rtl: joi.boolean(),\n toString: joi.func(),\n }),\n ),\n joi.array().items(joi.string()),\n ),\n }),\n joi.boolean(),\n ),\n maxDepth: joi.number().min(0).max(100),\n onInit: joi.func(),\n plugins: joi.array().items(joi.func()),\n routes: joi.object({\n admin: joi.string(),\n api: joi.string(),\n graphQL: joi.string(),\n graphQLPlayground: joi.string(),\n }),\n secret: joi.string(),\n serverURL: joi\n .string()\n .uri()\n .allow('')\n .custom((value, helper) => {\n const urlWithoutProtocol = value.split('//')[1]\n\n if (!urlWithoutProtocol) {\n return helper.message({\n custom: 'You need to include either \"https://\" or \"http://\" in your serverURL.',\n })\n }\n\n if (urlWithoutProtocol.indexOf('/') > -1) {\n return helper.message({\n custom:\n 'Your serverURL cannot have a path. It can only contain a protocol, a domain, and an optional port.',\n })\n }\n\n return value\n }),\n sharp: joi.any(),\n telemetry: joi.boolean(),\n typescript: joi.object({\n declare: joi.alternatives().try(joi.boolean(), joi.object({ ignoreTSError: joi.boolean() })),\n outputFile: joi.string(),\n }),\n upload: joi.object(),\n})\n"],"names":["joi","adminViewSchema","componentSchema","livePreviewSchema","component","alternatives","try","object","unknown","func","endpointsSchema","array","items","custom","pattern","string","any","handler","method","valid","path","root","bool","boolean","admin","autoLogin","keys","email","password","prefillOnly","avatar","buildPath","components","Nav","actions","afterDashboard","afterLogin","afterNavLinks","beforeDashboard","beforeLogin","beforeNavLinks","graphics","Icon","Logo","logout","Button","providers","views","Account","Dashboard","dateFormat","disable","livePreview","collections","globals","meta","icons","allow","ogImage","titleSuffix","routes","account","createFirstUser","forgot","inactivity","login","unauthorized","user","bin","key","scriptPath","cookiePrefix","cors","csrf","sparse","db","debug","defaultDepth","number","min","max","defaultMaxTextLength","editor","required","CellComponent","optional","FieldComponent","afterReadPromise","outputSchema","populationPromise","validate","endpoints","graphQL","disablePlaygroundInProduction","maxComplexity","mutations","function","queries","schemaOutputFile","hooks","afterError","i18n","indexSortableFields","local","localization","defaultLocale","fallback","localeCodes","locales","code","fallbackLocale","label","rtl","toString","maxDepth","onInit","plugins","api","graphQLPlayground","secret","serverURL","uri","value","helper","urlWithoutProtocol","split","message","indexOf","sharp","telemetry","typescript","declare","ignoreTSError","outputFile","upload"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,OAAOA,SAAS,MAAK;AAErB,SAASC,eAAe,QAAQ,8BAA6B;AAC7D,SAASC,eAAe,EAAEC,iBAAiB,QAAQ,8BAA6B;AAEhF,MAAMC,YAAYJ,IAAIK,YAAY,GAAGC,GAAG,CAACN,IAAIO,MAAM,GAAGC,OAAO,IAAIR,IAAIS,IAAI;AAEzE,OAAO,MAAMC,kBAAkBV,IAAIK,YAAY,GAAGC,GAAG,CACnDN,IAAIW,KAAK,GAAGC,KAAK,CACfZ,IAAIO,MAAM,CAAC;IACTM,QAAQb,IAAIO,MAAM,GAAGO,OAAO,CAACd,IAAIe,MAAM,IAAIf,IAAIgB,GAAG;IAClDC,SAASjB,IAAIK,YAAY,GAAGC,GAAG,CAACN,IAAIW,KAAK,GAAGC,KAAK,CAACZ,IAAIS,IAAI,KAAKT,IAAIS,IAAI;IACvES,QAAQlB,IACLe,MAAM,GACNI,KAAK,CAAC,OAAO,QAAQ,QAAQ,OAAO,SAAS,UAAU,WAAW;IACrEC,MAAMpB,IAAIe,MAAM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ACN5C,MAAM,CAAC,CAAC6G,OAAOC;QACd,MAAMC,qBAAqBF,MAAMG,KAAK,CAAC,KAAK,CAAC,EAAE;QAE/C,IAAI,CAACD,oBAAoB;YACvB,OAAOD,OAAOG,OAAO,CAAC;gBACpBjH,QAAQ;YACV;QACF;QAEA,IAAI+G,mBAAmBG,OAAO,CAAC,OAAO,CAAC,GAAG;YACxC,OAAOJ,OAAOG,OAAO,CAAC;gBACpBjH,QACE;YACJ;QACF;QAEA,OAAO6G;IACT;IACFM,OAAOhI,IAAIgB,GAAG;IACdiH,WAAWjI,IAAIuB,OAAO;IACtB2G,YAAYlI,IAAIO,MAAM,CAAC;QACrB4H,SAASnI,IAAIK,YAAY,GAAGC,GAAG,CAACN,IAAIuB,OAAO,IAAIvB,IAAIO,MAAM,CAAC;YAAE6H,eAAepI,IAAIuB,OAAO;QAAG;QACzF8G,YAAYrI,IAAIe,MAAM;IACxB;IACAuH,QAAQtI,IAAIO,MAAM;AACpB,GAAE"}
@@ -1,7 +1,8 @@
1
1
  /// <reference types="node" resolution-mode="require"/>
2
- import type { I18nOptions, TFunction } from '@payloadcms/translations';
2
+ import type { DefaultTranslationsObject, I18nClient, I18nOptions, TFunction } from '@payloadcms/translations';
3
3
  import type { Options as ExpressFileUploadOptions } from 'express-fileupload';
4
4
  import type GraphQL from 'graphql';
5
+ import type { Metadata as NextMetadata } from 'next';
5
6
  import type { DestinationStream, LoggerOptions } from 'pino';
6
7
  import type React from 'react';
7
8
  import type { default as sharp } from 'sharp';
@@ -9,12 +10,12 @@ import type { DeepRequired } from 'ts-essentials';
9
10
  import type { RichTextAdapterProvider } from '../admin/RichText.js';
10
11
  import type { DocumentTab, RichTextAdapter } from '../admin/types.js';
11
12
  import type { AdminView, ServerSideEditViewProps } from '../admin/views/types.js';
12
- import type { User } from '../auth/types.js';
13
+ import type { Permissions } from '../auth/index.js';
13
14
  import type { AfterErrorHook, Collection, CollectionConfig, SanitizedCollectionConfig } from '../collections/config/types.js';
14
15
  import type { DatabaseAdapterResult } from '../database/types.js';
15
16
  import type { EmailAdapter, SendEmailOptions } from '../email/types.js';
16
17
  import type { GlobalConfig, Globals, SanitizedGlobalConfig } from '../globals/config/types.js';
17
- import type { Payload } from '../index.js';
18
+ import type { GeneratedTypes, Payload } from '../index.js';
18
19
  import type { PayloadRequest, PayloadRequestWithData, Where } from '../types/index.js';
19
20
  import type { PayloadLogger } from '../utilities/logger.js';
20
21
  export type BinScriptConfig = {
@@ -131,19 +132,19 @@ export type InitOptions = {
131
132
  * @see https://payloadcms.com/docs/access-control/overview
132
133
  */
133
134
  export type AccessResult = Where | boolean;
134
- export type AccessArgs<T = any, U = any> = {
135
+ export type AccessArgs<TData = any> = {
135
136
  /**
136
137
  * The relevant resource that is being accessed.
137
138
  *
138
139
  * `data` is null when a list is requested
139
140
  */
140
- data?: T;
141
+ data?: TData;
141
142
  /** ID of the resource being accessed */
142
143
  id?: number | string;
143
144
  /** If true, the request is for a static file */
144
145
  isReadingStaticFile?: boolean;
145
146
  /** The original request that requires an access check */
146
- req: PayloadRequestWithData<U>;
147
+ req: PayloadRequestWithData;
147
148
  };
148
149
  /**
149
150
  * Access function runs on the server
@@ -151,13 +152,13 @@ export type AccessArgs<T = any, U = any> = {
151
152
  *
152
153
  * @see https://payloadcms.com/docs/access-control/overview
153
154
  */
154
- export type Access<T = any, U = any> = (args: AccessArgs<T, U>) => AccessResult | Promise<AccessResult>;
155
- /** Web Request/Response model, but the the req has more payload specific properties added to it. */
155
+ export type Access<TData = any> = (args: AccessArgs<TData>) => AccessResult | Promise<AccessResult>;
156
+ /** Web Request/Response model, but the req has more payload specific properties added to it. */
156
157
  export type PayloadHandler = (req: PayloadRequest) => Promise<Response> | Response;
157
158
  /**
158
159
  * Docs: https://payloadcms.com/docs/rest-api/overview#custom-endpoints
159
160
  */
160
- export type Endpoint<U = User> = {
161
+ export type Endpoint = {
161
162
  /** Extension point to add your custom data. */
162
163
  custom?: Record<string, any>;
163
164
  /**
@@ -207,10 +208,20 @@ export type EditViewConfig = {
207
208
  */
208
209
  export type EditView = EditViewComponent | EditViewConfig;
209
210
  export type ServerProps = {
211
+ i18n: I18nClient;
212
+ locale?: Locale;
213
+ params?: {
214
+ [key: string]: string | string[] | undefined;
215
+ };
210
216
  payload: Payload;
217
+ permissions?: Permissions;
218
+ searchParams?: {
219
+ [key: string]: string | string[] | undefined;
220
+ };
221
+ user?: GeneratedTypes['user'];
211
222
  };
212
223
  export declare const serverProps: (keyof ServerProps)[];
213
- export type CustomComponent<T extends any = any> = React.ComponentType<T & ServerProps>;
224
+ export type CustomComponent<TAdditionalProps extends any = any> = React.ComponentType<TAdditionalProps & Partial<ServerProps>>;
214
225
  export type Locale = {
215
226
  /**
216
227
  * value of supported locale
@@ -376,22 +387,19 @@ export type Config = {
376
387
  dateFormat?: string;
377
388
  /** If set to true, the entire Admin panel will be disabled. */
378
389
  disable?: boolean;
379
- /** The route the user will be redirected to after being inactive for too long. */
380
- inactivityRoute?: string;
381
390
  livePreview?: LivePreviewConfig & {
382
391
  collections?: string[];
383
392
  globals?: string[];
384
393
  };
385
- /** The route for the logout page. */
386
- logoutRoute?: string;
387
- /** Base meta data to use for the Admin panel. Included properties are titleSuffix, ogImage, and favicon. */
394
+ /** Base meta data to use for the Admin Panel. Included properties are titleSuffix, ogImage, and favicon. */
388
395
  meta?: {
389
396
  /**
390
- * Public path to an icon
397
+ * An array of Next.js metadata objects that represent icons to be used by devices and browsers.
391
398
  *
392
- * This image may be displayed in the browser next to the title of the page
399
+ * For example browser tabs, phone home screens, and search engine results.
400
+ * @reference https://nextjs.org/docs/app/api-reference/functions/generate-metadata#icons
393
401
  */
394
- favicon?: string;
402
+ icons?: NextMetadata['icons'];
395
403
  /**
396
404
  * Public path to an image
397
405
  *
@@ -404,7 +412,23 @@ export type Config = {
404
412
  */
405
413
  titleSuffix?: string;
406
414
  };
407
- /** The slug of a Collection that you want be used to log in to the Admin dashboard. */
415
+ routes?: {
416
+ /** The route for the account page. */
417
+ account?: string;
418
+ /** The route for the create first user page. */
419
+ createFirstUser?: string;
420
+ /** The route for the forgot password page. */
421
+ forgot?: string;
422
+ /** The route the user will be redirected to after being inactive for too long. */
423
+ inactivity?: string;
424
+ /** The route for the login page. */
425
+ login?: string;
426
+ /** The route for the logout page. */
427
+ logout?: string;
428
+ /** The route for the unauthorized page. */
429
+ unauthorized?: string;
430
+ };
431
+ /** The slug of a Collection that you want to be used to log in to the Admin dashboard. */
408
432
  user?: string;
409
433
  };
410
434
  /** Custom Payload bin scripts can be injected via the config. */
@@ -488,6 +512,10 @@ export type Config = {
488
512
  * @see https://payloadcms.com/docs/graphql/extending
489
513
  */
490
514
  queries?: GraphQLExtension;
515
+ /**
516
+ * Filepath to write the generated schema to
517
+ */
518
+ schemaOutputFile?: string;
491
519
  };
492
520
  /**
493
521
  * Tap into Payload-wide hooks.
@@ -498,7 +526,7 @@ export type Config = {
498
526
  afterError?: AfterErrorHook;
499
527
  };
500
528
  /** i18n config settings */
501
- i18n?: I18nOptions;
529
+ i18n?: I18nOptions<{} | DefaultTranslationsObject>;
502
530
  /** Automatically index all sortable top-level fields in the database to improve sort performance and add database compatibility for Azure Cosmos and similar. */
503
531
  indexSortableFields?: boolean;
504
532
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/config/types.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACtE,OAAO,KAAK,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AAC7E,OAAO,KAAK,OAAO,MAAM,SAAS,CAAA;AAClC,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAK,MAAM,MAAM,CAAA;AAC/D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7C,OAAO,KAAK,EAAE,YA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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"}
@@ -1,5 +1,11 @@
1
1
  export const serverProps = [
2
- 'payload'
2
+ 'payload',
3
+ 'i18n',
4
+ 'locale',
5
+ 'params',
6
+ 'permissions',
7
+ 'searchParams',
8
+ 'permissions'
3
9
  ];
4
10
 
5
11
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/config/types.ts"],"sourcesContent":["import type { I18nOptions, TFunction } from '@payloadcms/translations'\nimport type { Options as ExpressFileUploadOptions } from 'express-fileupload'\nimport type GraphQL from 'graphql'\nimport type { DestinationStream, LoggerOptions, P } from 'pino'\nimport type React 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 { User } from '../auth/types.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 } from '../index.js'\nimport type { PayloadRequest, PayloadRequestWithData, 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\n// eslint-disable-next-line no-use-before-define\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 ServerOnlyLivePreviewProperties = keyof Pick<LivePreviewConfig, 'url'>\n\ntype GeneratePreviewURLOptions = {\n locale: string\n req: PayloadRequestWithData\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<T = any, U = any> = {\n /**\n * The relevant resource that is being accessed.\n *\n * `data` is null when a list is requested\n */\n data?: T\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: PayloadRequestWithData<U>\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<T = any, U = any> = (\n args: AccessArgs<T, U>,\n) => AccessResult | Promise<AccessResult>\n\n/** Web Request/Response model, but the 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<U = User> = {\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 payload: Payload\n}\n\nexport const serverProps: (keyof ServerProps)[] = ['payload']\n\nexport type CustomComponent<T extends any = any> = React.ComponentType<T & ServerProps>\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 BaseLocalizationConfig & {\n /**\n * List of supported locales\n * @example `[\"en\", \"es\", \"fr\", \"nl\", \"de\", \"jp\"]`\n */\n locales: string[]\n }\n>\n\nexport type LocalizationConfigWithLabels = Prettify<\n BaseLocalizationConfig & {\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 }\n>\n\nexport type SanitizedLocalizationConfig = Prettify<\n LocalizationConfigWithLabels & {\n /**\n * List of supported locales\n * @example `[\"en\", \"es\", \"fr\", \"nl\", \"de\", \"jp\"]`\n */\n localeCodes: string[]\n }\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\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 when visiting the admin dashboard. */\n autoLogin?:\n | {\n /**\n * The email address of the user to login as\n *\n */\n email: string\n /** The password of the user to login as */\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 }\n | false\n /** Set account profile picture. Options: gravatar, default or a custom React component. */\n avatar?: 'default' | 'gravatar' | React.ComponentType<any>\n\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 /** The route the user will be redirected to after being inactive for too long. */\n inactivityRoute?: string\n livePreview?: LivePreviewConfig & {\n collections?: string[]\n globals?: string[]\n }\n /** The route for the logout page. */\n logoutRoute?: string\n /** Base meta data to use for the Admin panel. Included properties are titleSuffix, ogImage, and favicon. */\n meta?: {\n /**\n * Public path to an icon\n *\n * This image may be displayed in the browser next to the title of the page\n */\n favicon?: string\n /**\n * Public path to an image\n *\n * This image may be displayed as preview when the link is shared on social media\n */\n ogImage?: string\n /**\n * String to append to the <title> of admin pages\n * @example `\" - My Brand\"`\n */\n titleSuffix?: string\n }\n /** The slug of a Collection that you want 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?: '*' | 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 /**\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\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 /** 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 /** Filename to write the generated types to */\n outputFile?: string\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 = Omit<\n DeepRequired<Config>,\n 'collections' | 'editor' | 'endpoint' | 'globals' | 'i18n' | 'localization' | 'upload'\n> & {\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: ExpressFileUploadOptions & {\n /**\n * Deduped list of adapters used in the project\n */\n adapters: string[]\n }\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"],"rangeMappings":";;","mappings":"AA+PA,OAAO,MAAMA,cAAqC;IAAC;CAAU,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 { Metadata as NextMetadata } from 'next'\nimport type { DestinationStream, LoggerOptions } from 'pino'\nimport type React 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 { GeneratedTypes, Payload } from '../index.js'\nimport type { PayloadRequest, PayloadRequestWithData, 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\n// eslint-disable-next-line no-use-before-define\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 ServerOnlyLivePreviewProperties = keyof Pick<LivePreviewConfig, 'url'>\n\ntype GeneratePreviewURLOptions = {\n locale: string\n req: PayloadRequestWithData\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: PayloadRequestWithData\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 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?: GeneratedTypes['user']\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 TAdditionalProps & Partial<ServerProps>\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 BaseLocalizationConfig & {\n /**\n * List of supported locales\n * @example `[\"en\", \"es\", \"fr\", \"nl\", \"de\", \"jp\"]`\n */\n locales: string[]\n }\n>\n\nexport type LocalizationConfigWithLabels = Prettify<\n BaseLocalizationConfig & {\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 }\n>\n\nexport type SanitizedLocalizationConfig = Prettify<\n LocalizationConfigWithLabels & {\n /**\n * List of supported locales\n * @example `[\"en\", \"es\", \"fr\", \"nl\", \"de\", \"jp\"]`\n */\n localeCodes: string[]\n }\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\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 when visiting the admin dashboard. */\n autoLogin?:\n | {\n /**\n * The email address of the user to login as\n *\n */\n email: string\n /** The password of the user to login as */\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 }\n | false\n /** Set account profile picture. Options: gravatar, default or a custom React component. */\n avatar?: 'default' | 'gravatar' | React.ComponentType<any>\n\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?: LivePreviewConfig & {\n collections?: string[]\n globals?: string[]\n }\n /** Base meta data to use for the Admin Panel. Included properties are titleSuffix, ogImage, and favicon. */\n meta?: {\n /**\n * An array of Next.js metadata objects that represent icons to be used by devices and browsers.\n *\n * For example browser tabs, phone home screens, and search engine results.\n * @reference https://nextjs.org/docs/app/api-reference/functions/generate-metadata#icons\n */\n icons?: NextMetadata['icons']\n /**\n * Public path to an image\n *\n * This image may be displayed as preview when the link is shared on social media\n */\n ogImage?: string\n /**\n * String to append to the <title> of admin pages\n * @example `\" - My Brand\"`\n */\n titleSuffix?: string\n }\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 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?: '*' | 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 /** 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 /** Filename to write the generated types to */\n outputFile?: string\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 = Omit<\n DeepRequired<Config>,\n 'collections' | 'editor' | 'endpoint' | 'globals' | 'i18n' | 'localization' | 'upload'\n> & {\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: ExpressFileUploadOptions & {\n /**\n * Deduped list of adapters used in the project\n */\n adapters: string[]\n }\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"],"rangeMappings":";;;;;;;;","mappings":"AAyQA,OAAO,MAAMA,cAAqC;IAChD;IACA;IACA;IACA;IACA;IACA;IACA;CACD,CAAA"}
@@ -2,5 +2,7 @@
2
2
  * WARNING: This file contains exports that can only be safely used on the server.
3
3
  */
4
4
  export { generateTypes } from '../bin/generateTypes.js';
5
+ export { loadEnv } from '../bin/loadEnv.js';
6
+ export { findConfig } from '../config/find.js';
5
7
  export { importConfig, importWithoutClientFiles } from '../utilities/importWithoutClientFiles.js';
6
8
  //# sourceMappingURL=node.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/exports/node.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,YAAY,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAA"}
1
+ {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/exports/node.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAA"}
@@ -1,6 +1,8 @@
1
1
  /**
2
2
  * WARNING: This file contains exports that can only be safely used on the server.
3
3
  */ export { generateTypes } from '../bin/generateTypes.js';
4
+ export { loadEnv } from '../bin/loadEnv.js';
5
+ export { findConfig } from '../config/find.js';
4
6
  export { importConfig, importWithoutClientFiles } from '../utilities/importWithoutClientFiles.js';
5
7
 
6
8
  //# sourceMappingURL=node.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/exports/node.ts"],"sourcesContent":["/**\n * WARNING: This file contains exports that can only be safely used on the server.\n */\n\nexport { generateTypes } from '../bin/generateTypes.js'\nexport { importConfig, importWithoutClientFiles } from '../utilities/importWithoutClientFiles.js'\n"],"names":["generateTypes","importConfig","importWithoutClientFiles"],"rangeMappings":";;;","mappings":"AAAA;;CAEC,GAED,SAASA,aAAa,QAAQ,0BAAyB;AACvD,SAASC,YAAY,EAAEC,wBAAwB,QAAQ,2CAA0C"}
1
+ {"version":3,"sources":["../../src/exports/node.ts"],"sourcesContent":["/**\n * WARNING: This file contains exports that can only be safely used on the server.\n */\n\nexport { generateTypes } from '../bin/generateTypes.js'\nexport { loadEnv } from '../bin/loadEnv.js'\nexport { findConfig } from '../config/find.js'\nexport { importConfig, importWithoutClientFiles } from '../utilities/importWithoutClientFiles.js'\n"],"names":["generateTypes","loadEnv","findConfig","importConfig","importWithoutClientFiles"],"rangeMappings":";;;;;","mappings":"AAAA;;CAEC,GAED,SAASA,aAAa,QAAQ,0BAAyB;AACvD,SAASC,OAAO,QAAQ,oBAAmB;AAC3C,SAASC,UAAU,QAAQ,oBAAmB;AAC9C,SAASC,YAAY,EAAEC,wBAAwB,QAAQ,2CAA0C"}