payload 3.2.2-canary.451666e → 3.2.2-canary.49cfe5d

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.
@@ -7,7 +7,6 @@ export type ServerOnlyRootProperties = keyof Pick<SanitizedConfig, 'bin' | 'cors
7
7
  export type ServerOnlyRootAdminProperties = keyof Pick<SanitizedConfig['admin'], 'components'>;
8
8
  export type ClientConfig = {
9
9
  admin: {
10
- dependencies?: Record<string, React.ReactNode>;
11
10
  livePreview?: Omit<LivePreviewConfig, ServerOnlyLivePreviewProperties>;
12
11
  } & Omit<SanitizedConfig['admin'], 'components' | 'dependencies' | 'livePreview'>;
13
12
  collections: ClientCollectionConfig[];
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/config/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAG1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAA;AAClE,OAAO,KAAK,EACV,iBAAiB,EACjB,eAAe,EACf,+BAA+B,EAChC,MAAM,YAAY,CAAA;AAEnB,OAAO,EACL,KAAK,sBAAsB,EAE5B,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,KAAK,kBAAkB,EAA6B,MAAM,6BAA6B,CAAA;AAEhG,MAAM,MAAM,wBAAwB,GAAG,MAAM,IAAI,CAC/C,eAAe,EACb,KAAK,GACL,MAAM,GACN,MAAM,GACN,QAAQ,GACR,IAAI,GACJ,QAAQ,GACR,OAAO,GACP,WAAW,GACX,SAAS,GACT,OAAO,GACP,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,OAAO,GACP,YAAY,CACf,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,YAAY,CAAC,CAAA;AAE9F,MAAM,MAAM,YAAY,GAA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SAAS,EAAE,SAAS,CAAA;CACrB,KAAG,YA2FH,CAAA"}
@@ -33,7 +33,6 @@ export const createClientConfig = ({ config, i18n, importMap })=>{
33
33
  avatar: config.admin.avatar,
34
34
  custom: config.admin.custom,
35
35
  dateFormat: config.admin.dateFormat,
36
- dependencies: config.admin.dependencies,
37
36
  disable: config.admin.disable,
38
37
  importMap: config.admin.importMap,
39
38
  meta: config.admin.meta,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/config/client.ts"],"sourcesContent":["import type { I18nClient } from '@payloadcms/translations'\nimport type { DeepPartial } from 'ts-essentials'\n\nimport type { ImportMap } from '../bin/generateImportMap/index.js'\nimport type {\n LivePreviewConfig,\n SanitizedConfig,\n ServerOnlyLivePreviewProperties,\n} from './types.js'\n\nimport {\n type ClientCollectionConfig,\n createClientCollectionConfigs,\n} from '../collections/config/client.js'\nimport { type ClientGlobalConfig, createClientGlobalConfigs } from '../globals/config/client.js'\n\nexport type ServerOnlyRootProperties = keyof Pick<\n SanitizedConfig,\n | 'bin'\n | 'cors'\n | 'csrf'\n | 'custom'\n | 'db'\n | 'editor'\n | 'email'\n | 'endpoints'\n | 'graphQL'\n | 'hooks'\n | 'jobs'\n | 'logger'\n | 'onInit'\n | 'plugins'\n | 'secret'\n | 'sharp'\n | 'typescript'\n>\n\nexport type ServerOnlyRootAdminProperties = keyof Pick<SanitizedConfig['admin'], 'components'>\n\nexport type ClientConfig = {\n admin: {\n dependencies?: Record<string, React.ReactNode>\n livePreview?: Omit<LivePreviewConfig, ServerOnlyLivePreviewProperties>\n } & Omit<SanitizedConfig['admin'], 'components' | 'dependencies' | 'livePreview'>\n collections: ClientCollectionConfig[]\n custom?: Record<string, any>\n globals: ClientGlobalConfig[]\n i18n?: Omit<SanitizedConfig['i18n'], 'supportedLanguages'>\n} & Omit<SanitizedConfig, 'admin' | 'collections' | 'globals' | 'i18n' | ServerOnlyRootProperties>\n\nexport const serverOnlyAdminConfigProperties: readonly Partial<ServerOnlyRootAdminProperties>[] = []\n\nexport const serverOnlyConfigProperties: readonly Partial<ServerOnlyRootProperties>[] = [\n 'endpoints',\n 'db',\n 'editor',\n 'plugins',\n 'sharp',\n 'onInit',\n 'secret',\n 'hooks',\n 'bin',\n 'typescript',\n 'cors',\n 'csrf',\n 'email',\n 'custom',\n 'graphQL',\n 'jobs',\n 'logger',\n // `admin`, `onInit`, `localization`, `collections`, and `globals` are all handled separately\n]\n\nexport const createClientConfig = ({\n config,\n i18n,\n importMap,\n}: {\n config: SanitizedConfig\n i18n: I18nClient\n importMap: ImportMap\n}): ClientConfig => {\n const clientConfig = {} as DeepPartial<ClientConfig>\n\n for (const key in config) {\n if (serverOnlyConfigProperties.includes(key as any)) {\n continue\n }\n switch (key) {\n case 'admin':\n clientConfig.admin = {\n autoLogin: config.admin.autoLogin,\n avatar: config.admin.avatar,\n custom: config.admin.custom,\n dateFormat: config.admin.dateFormat,\n dependencies: config.admin.dependencies,\n disable: config.admin.disable,\n importMap: config.admin.importMap,\n meta: config.admin.meta,\n routes: config.admin.routes,\n theme: config.admin.theme,\n user: config.admin.user,\n }\n if (config.admin.livePreview) {\n clientConfig.admin.livePreview = {}\n\n if (config.admin.livePreview.breakpoints) {\n clientConfig.admin.livePreview.breakpoints = config.admin.livePreview.breakpoints\n }\n }\n break\n case 'collections':\n ;(clientConfig.collections as ClientCollectionConfig[]) = createClientCollectionConfigs({\n collections: config.collections,\n defaultIDType: config.db.defaultIDType,\n i18n,\n importMap,\n })\n break\n case 'globals':\n ;(clientConfig.globals as ClientGlobalConfig[]) = createClientGlobalConfigs({\n defaultIDType: config.db.defaultIDType,\n globals: config.globals,\n i18n,\n importMap,\n })\n break\n case 'i18n':\n clientConfig.i18n = {\n fallbackLanguage: config.i18n.fallbackLanguage,\n translations: config.i18n.translations,\n }\n break\n case 'localization':\n if (typeof config.localization === 'object' && config.localization) {\n clientConfig.localization = {}\n if (config.localization.defaultLocale) {\n clientConfig.localization.defaultLocale = config.localization.defaultLocale\n }\n if (config.localization.fallback) {\n clientConfig.localization.fallback = config.localization.fallback\n }\n if (config.localization.localeCodes) {\n clientConfig.localization.localeCodes = config.localization.localeCodes\n }\n if (config.localization.locales) {\n clientConfig.localization.locales = []\n for (const locale of config.localization.locales) {\n if (locale) {\n const clientLocale: Partial<(typeof config.localization.locales)[0]> = {}\n if (locale.code) {\n clientLocale.code = locale.code\n }\n if (locale.fallbackLocale) {\n clientLocale.fallbackLocale = locale.fallbackLocale\n }\n if (locale.label) {\n clientLocale.label = locale.label\n }\n if (locale.rtl) {\n clientLocale.rtl = locale.rtl\n }\n clientConfig.localization.locales.push(clientLocale)\n }\n }\n }\n }\n break\n default:\n clientConfig[key] = config[key]\n }\n }\n return clientConfig as ClientConfig\n}\n"],"names":["createClientCollectionConfigs","createClientGlobalConfigs","serverOnlyAdminConfigProperties","serverOnlyConfigProperties","createClientConfig","config","i18n","importMap","clientConfig","key","includes","admin","autoLogin","avatar","custom","dateFormat","dependencies","disable","meta","routes","theme","user","livePreview","breakpoints","collections","defaultIDType","db","globals","fallbackLanguage","translations","localization","defaultLocale","fallback","localeCodes","locales","locale","clientLocale","code","fallbackLocale","label","rtl","push"],"mappings":"AAUA,SAEEA,6BAA6B,QACxB,kCAAiC;AACxC,SAAkCC,yBAAyB,QAAQ,8BAA6B;AAoChG,OAAO,MAAMC,kCAAqF,EAAE,CAAA;AAEpG,OAAO,MAAMC,6BAA2E;IACtF;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CAED,CAAA;AAED,OAAO,MAAMC,qBAAqB,CAAC,EACjCC,MAAM,EACNC,IAAI,EACJC,SAAS,EAKV;IACC,MAAMC,eAAe,CAAC;IAEtB,IAAK,MAAMC,OAAOJ,OAAQ;QACxB,IAAIF,2BAA2BO,QAAQ,CAACD,MAAa;YACnD;QACF;QACA,OAAQA;YACN,KAAK;gBACHD,aAAaG,KAAK,GAAG;oBACnBC,WAAWP,OAAOM,KAAK,CA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ClEtB,aAAasB,YAAY,GAAG,CAAC;oBAC7B,IAAIzB,OAAOyB,YAAY,CAACC,aAAa,EAAE;wBACrCvB,aAAasB,YAAY,CAACC,aAAa,GAAG1B,OAAOyB,YAAY,CAACC,aAAa;oBAC7E;oBACA,IAAI1B,OAAOyB,YAAY,CAACE,QAAQ,EAAE;wBAChCxB,aAAasB,YAAY,CAACE,QAAQ,GAAG3B,OAAOyB,YAAY,CAACE,QAAQ;oBACnE;oBACA,IAAI3B,OAAOyB,YAAY,CAACG,WAAW,EAAE;wBACnCzB,aAAasB,YAAY,CAACG,WAAW,GAAG5B,OAAOyB,YAAY,CAACG,WAAW;oBACzE;oBACA,IAAI5B,OAAOyB,YAAY,CAACI,OAAO,EAAE;wBAC/B1B,aAAasB,YAAY,CAACI,OAAO,GAAG,EAAE;wBACtC,KAAK,MAAMC,UAAU9B,OAAOyB,YAAY,CAACI,OAAO,CAAE;4BAChD,IAAIC,QAAQ;gCACV,MAAMC,eAAiE,CAAC;gCACxE,IAAID,OAAOE,IAAI,EAAE;oCACfD,aAAaC,IAAI,GAAGF,OAAOE,IAAI;gCACjC;gCACA,IAAIF,OAAOG,cAAc,EAAE;oCACzBF,aAAaE,cAAc,GAAGH,OAAOG,cAAc;gCACrD;gCACA,IAAIH,OAAOI,KAAK,EAAE;oCAChBH,aAAaG,KAAK,GAAGJ,OAAOI,KAAK;gCACnC;gCACA,IAAIJ,OAAOK,GAAG,EAAE;oCACdJ,aAAaI,GAAG,GAAGL,OAAOK,GAAG;gCAC/B;gCACAhC,aAAasB,YAAY,CAACI,OAAO,CAACO,IAAI,CAACL;4BACzC;wBACF;oBACF;gBACF;gBACA;YACF;gBACE5B,YAAY,CAACC,IAAI,GAAGJ,MAAM,CAACI,IAAI;QACnC;IACF;IACA,OAAOD;AACT,EAAC"}
1
+ {"version":3,"sources":["../../src/config/client.ts"],"sourcesContent":["import type { I18nClient } from '@payloadcms/translations'\nimport type { DeepPartial } from 'ts-essentials'\n\nimport type { ImportMap } from '../bin/generateImportMap/index.js'\nimport type {\n LivePreviewConfig,\n SanitizedConfig,\n ServerOnlyLivePreviewProperties,\n} from './types.js'\n\nimport {\n type ClientCollectionConfig,\n createClientCollectionConfigs,\n} from '../collections/config/client.js'\nimport { type ClientGlobalConfig, createClientGlobalConfigs } from '../globals/config/client.js'\n\nexport type ServerOnlyRootProperties = keyof Pick<\n SanitizedConfig,\n | 'bin'\n | 'cors'\n | 'csrf'\n | 'custom'\n | 'db'\n | 'editor'\n | 'email'\n | 'endpoints'\n | 'graphQL'\n | 'hooks'\n | 'jobs'\n | 'logger'\n | 'onInit'\n | 'plugins'\n | 'secret'\n | 'sharp'\n | 'typescript'\n>\n\nexport type ServerOnlyRootAdminProperties = keyof Pick<SanitizedConfig['admin'], 'components'>\n\nexport type ClientConfig = {\n admin: {\n livePreview?: Omit<LivePreviewConfig, ServerOnlyLivePreviewProperties>\n } & Omit<SanitizedConfig['admin'], 'components' | 'dependencies' | 'livePreview'>\n collections: ClientCollectionConfig[]\n custom?: Record<string, any>\n globals: ClientGlobalConfig[]\n i18n?: Omit<SanitizedConfig['i18n'], 'supportedLanguages'>\n} & Omit<SanitizedConfig, 'admin' | 'collections' | 'globals' | 'i18n' | ServerOnlyRootProperties>\n\nexport const serverOnlyAdminConfigProperties: readonly Partial<ServerOnlyRootAdminProperties>[] = []\n\nexport const serverOnlyConfigProperties: readonly Partial<ServerOnlyRootProperties>[] = [\n 'endpoints',\n 'db',\n 'editor',\n 'plugins',\n 'sharp',\n 'onInit',\n 'secret',\n 'hooks',\n 'bin',\n 'typescript',\n 'cors',\n 'csrf',\n 'email',\n 'custom',\n 'graphQL',\n 'jobs',\n 'logger',\n // `admin`, `onInit`, `localization`, `collections`, and `globals` are all handled separately\n]\n\nexport const createClientConfig = ({\n config,\n i18n,\n importMap,\n}: {\n config: SanitizedConfig\n i18n: I18nClient\n importMap: ImportMap\n}): ClientConfig => {\n const clientConfig = {} as DeepPartial<ClientConfig>\n\n for (const key in config) {\n if (serverOnlyConfigProperties.includes(key as any)) {\n continue\n }\n switch (key) {\n case 'admin':\n clientConfig.admin = {\n autoLogin: config.admin.autoLogin,\n avatar: config.admin.avatar,\n custom: config.admin.custom,\n dateFormat: config.admin.dateFormat,\n disable: config.admin.disable,\n importMap: config.admin.importMap,\n meta: config.admin.meta,\n routes: config.admin.routes,\n theme: config.admin.theme,\n user: config.admin.user,\n }\n if (config.admin.livePreview) {\n clientConfig.admin.livePreview = {}\n\n if (config.admin.livePreview.breakpoints) {\n clientConfig.admin.livePreview.breakpoints = config.admin.livePreview.breakpoints\n }\n }\n break\n case 'collections':\n ;(clientConfig.collections as ClientCollectionConfig[]) = createClientCollectionConfigs({\n collections: config.collections,\n defaultIDType: config.db.defaultIDType,\n i18n,\n importMap,\n })\n break\n case 'globals':\n ;(clientConfig.globals as ClientGlobalConfig[]) = createClientGlobalConfigs({\n defaultIDType: config.db.defaultIDType,\n globals: config.globals,\n i18n,\n importMap,\n })\n break\n case 'i18n':\n clientConfig.i18n = {\n fallbackLanguage: config.i18n.fallbackLanguage,\n translations: config.i18n.translations,\n }\n break\n case 'localization':\n if (typeof config.localization === 'object' && config.localization) {\n clientConfig.localization = {}\n if (config.localization.defaultLocale) {\n clientConfig.localization.defaultLocale = config.localization.defaultLocale\n }\n if (config.localization.fallback) {\n clientConfig.localization.fallback = config.localization.fallback\n }\n if (config.localization.localeCodes) {\n clientConfig.localization.localeCodes = config.localization.localeCodes\n }\n if (config.localization.locales) {\n clientConfig.localization.locales = []\n for (const locale of config.localization.locales) {\n if (locale) {\n const clientLocale: Partial<(typeof config.localization.locales)[0]> = {}\n if (locale.code) {\n clientLocale.code = locale.code\n }\n if (locale.fallbackLocale) {\n clientLocale.fallbackLocale = locale.fallbackLocale\n }\n if (locale.label) {\n clientLocale.label = locale.label\n }\n if (locale.rtl) {\n clientLocale.rtl = locale.rtl\n }\n clientConfig.localization.locales.push(clientLocale)\n }\n }\n }\n }\n break\n default:\n clientConfig[key] = config[key]\n }\n }\n return clientConfig as ClientConfig\n}\n"],"names":["createClientCollectionConfigs","createClientGlobalConfigs","serverOnlyAdminConfigProperties","serverOnlyConfigProperties","createClientConfig","config","i18n","importMap","clientConfig","key","includes","admin","autoLogin","avatar","custom","dateFormat","disable","meta","routes","theme","user","livePreview","breakpoints","collections","defaultIDType","db","globals","fallbackLanguage","translations","localization","defaultLocale","fallback","localeCodes","locales","locale","clientLocale","code","fallbackLocale","label","rtl","push"],"mappings":"AAUA,SAEEA,6BAA6B,QACxB,kCAAiC;AACxC,SAAkCC,yBAAyB,QAAQ,8BAA6B;AAmChG,OAAO,MAAMC,kCAAqF,EAAE,CAAA;AAEpG,OAAO,MAAMC,6BAA2E;IACtF;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CAED,CAAA;AAED,OAAO,MAAMC,qBAAqB,CAAC,EACjCC,MAAM,EACNC,IAAI,EACJC,SAAS,EAKV;IACC,MAAMC,eAAe,CAAC;IAEtB,IAAK,MAAMC,OAAOJ,OAAQ;QACxB,IAAIF,2BAA2BO,QAAQ,CAACD,MAAa;YACnD;QACF;QACA,OAAQA;YACN,KAAK;gBACHD,aAAaG,KAAK,GAAG;oBACnBC,WAAWP,OAAOM,KAAK,CAACC,SAAS;oBACjCC,QAAQR,OAAOM,KAAK,CAACE,MAAM;oBAC3BC,QAAQT,OAAOM,KAAK,CAACG,MAAM;oBAC3BC,YAAYV,OAAOM,KAAK,CAACI,UAAU;oBACnCC,SAASX,OAAOM,KAAK,CAACK,OAAO;oBAC7BT,WAAWF,OAAOM,KAAK,CAACJ,SAAS;oBACjCU,MAAMZ,OAAOM,KAAK,CAACM,IAAI;oBACvBC,QAAQb,OAAOM,KAAK,CAACO,MAAM;oBAC3BC,OAAOd,OAAOM,KAAK,CAACQ,KAAK;oBACzBC,MAAMf,OAAOM,KAAK,CAACS,IAAI;gBACzB;gBACA,IAAIf,OAAOM,KAAK,CAACU,WAAW,EAAE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AAY,CAACI,OAAO,GAAG,EAAE;wBACtC,KAAK,MAAMC,UAAU7B,OAAOwB,YAAY,CAACI,OAAO,CAAE;4BAChD,IAAIC,QAAQ;gCACV,MAAMC,eAAiE,CAAC;gCACxE,IAAID,OAAOE,IAAI,EAAE;oCACfD,aAAaC,IAAI,GAAGF,OAAOE,IAAI;gCACjC;gCACA,IAAIF,OAAOG,cAAc,EAAE;oCACzBF,aAAaE,cAAc,GAAGH,OAAOG,cAAc;gCACrD;gCACA,IAAIH,OAAOI,KAAK,EAAE;oCAChBH,aAAaG,KAAK,GAAGJ,OAAOI,KAAK;gCACnC;gCACA,IAAIJ,OAAOK,GAAG,EAAE;oCACdJ,aAAaI,GAAG,GAAGL,OAAOK,GAAG;gCAC/B;gCACA/B,aAAaqB,YAAY,CAACI,OAAO,CAACO,IAAI,CAACL;4BACzC;wBACF;oBACF;gBACF;gBACA;YACF;gBACE3B,YAAY,CAACC,IAAI,GAAGJ,MAAM,CAACI,IAAI;QACnC;IACF;IACA,OAAOD;AACT,EAAC"}
@@ -1,4 +1,4 @@
1
- import type { DefaultTranslationsObject, I18nClient, I18nOptions, TFunction } from '@payloadcms/translations';
1
+ import type { DefaultTranslationKeys, DefaultTranslationsObject, I18nClient, I18nOptions, TFunction } from '@payloadcms/translations';
2
2
  import type { BusboyConfig } from 'busboy';
3
3
  import type GraphQL from 'graphql';
4
4
  import type { GraphQLFormattedError } from 'graphql';
@@ -366,8 +366,8 @@ export type SanitizedLocalizationConfig = Prettify<{
366
366
  * @see https://payloadcms.com/docs/configuration/localization#localization
367
367
  */
368
368
  export type LocalizationConfig = Prettify<LocalizationConfigWithLabels | LocalizationConfigWithNoLabels>;
369
- export type LabelFunction = ({ t }: {
370
- t: TFunction;
369
+ export type LabelFunction<TTranslationKeys = DefaultTranslationKeys> = ({ t, }: {
370
+ t: TFunction<TTranslationKeys>;
371
371
  }) => string;
372
372
  export type StaticLabel = Record<string, string> | string;
373
373
  export type SharpDependency = (input?: ArrayBuffer | Buffer | Float32Array | Float64Array | Int8Array | Int16Array | Int32Array | string | Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array, options?: sharp.SharpOptions) => sharp.Sharp;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/config/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EACzB,UAAU,EACV,WAAW,EACX,SAAS,EACV,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAC1C,OAAO,KAAK,OAAO,MAAM,SAAS,CAAA;AAClC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC1D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAC3E,OAAO,KAAK,EACV,eAAe,EACf,uBAAuB,EACvB,eAAe,EAChB,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,KAAK,EACV,cAAc,EACd,SAAS,EACT,OAAO,EACP,iBAAiB,EAClB,MAAM,mCAAmC,CAAA;AAC1C,OAAO,KAAK,EACV,UAAU,EACV,gBAAgB,EAChB,yBAAyB,EAC1B,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,M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,MAAM,MAAM,0BAA0B,GAAG,eAAe,CAAA;AAExD,MAAM,MAAM,yBAAyB,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;IAAE,CAAC,EAAE,SAAS,CAAA;CAAE,KAAK,MAAM,CAAA;AAE3E,MAAM,MAAM,iBAAiB,GAAG,yBAAyB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAA;AAE3F,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/config/types.ts"],"sourcesContent":["import type {\n DefaultTranslationsObject,\n I18nClient,\n I18nOptions,\n TFunction,\n} from '@payloadcms/translations'\nimport type { BusboyConfig } from 'busboy'\nimport type GraphQL from 'graphql'\nimport type { GraphQLFormattedError } from 'graphql'\nimport type { JSONSchema4 } from 'json-schema'\nimport type { DestinationStream, Level, pino } 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 { DocumentTabConfig, RichTextAdapter } from '../admin/types.js'\nimport type {\n AdminViewConfig,\n ServerSideEditViewProps,\n VisibleEntities,\n} from '../admin/views/types.js'\nimport type { SanitizedPermissions } from '../auth/index.js'\nimport type {\n AddToImportMap,\n ImportMap,\n Imports,\n InternalImportMap,\n} from '../bin/generateImportMap/index.js'\nimport type {\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 { ErrorName } from '../errors/types.js'\nimport type { GlobalConfig, Globals, SanitizedGlobalConfig } from '../globals/config/types.js'\nimport type { JobsConfig, Payload, RequestContext, TypedUser } from '../index.js'\nimport type { PayloadRequest, Where } from '../types/index.js'\nimport type { PayloadLogger } from '../utilities/logger.js'\n\n/**\n * The string path pointing to the React component. If one of the generics is `never`, you effectively mark it as a server-only or client-only component.\n *\n * If it is `false` an empty component will be rendered.\n */\nexport type PayloadComponent<\n TComponentServerProps extends never | object = Record<string, any>,\n TComponentClientProps extends never | object = Record<string, any>,\n> = false | RawPayloadComponent<TComponentServerProps, TComponentClientProps> | string\n\n// We need the actual object as its own type, otherwise the infers for the PayloadClientReactComponent / PayloadServerReactComponent will not work due to the string union.\n// We also NEED to actually use those generics for this to work, thus they are part of the props.\nexport type RawPayloadComponent<\n TComponentServerProps extends never | object = Record<string, any>,\n TComponentClientProps extends never | object = Record<string, any>,\n> = {\n clientProps?: object | TComponentClientProps\n exportName?: string\n path: string\n serverProps?: object | TComponentServerProps\n}\n\nexport type PayloadComponentProps<TPayloadComponent> =\n TPayloadComponent extends RawPayloadComponent<\n infer TComponentServerProps,\n infer TComponentClientProps\n >\n ? TComponentClientProps | TComponentServerProps\n : never\n\nexport type PayloadClientComponentProps<TPayloadComponent> =\n TPayloadComponent extends RawPayloadComponent<infer _, infer TComponentClientProps>\n ? TComponentClientProps\n : never\n\nexport type PayloadServerComponentProps<TPayloadComponent> =\n TPayloadComponent extends RawPayloadComponent<infer TComponentServerProps, infer _>\n ? TComponentServerProps\n : never\n\nexport type PayloadReactComponent<TPayloadComponent> = React.FC<\n PayloadComponentProps<TPayloadComponent>\n>\n\n// This also ensures that if never is passed to TComponentClientProps, this entire type will be never.\n// => TypeScript will now ensure that users cannot even define the typed Server Components if the PayloadComponent is marked as\n// Client-Only (marked as Client-Only = TComponentServerProps is never)\nexport type PayloadClientReactComponent<TPayloadComponent> =\n TPayloadComponent extends RawPayloadComponent<infer _, infer TComponentClientProps>\n ? TComponentClientProps extends never\n ? never\n : React.FC<TComponentClientProps>\n : never\n\nexport type PayloadServerReactComponent<TPayloadComponent> =\n TPayloadComponent extends RawPayloadComponent<infer TComponentServerProps, infer _>\n ? TComponentServerProps extends never\n ? never\n : React.FC<TComponentServerProps>\n : never\n\nexport type ResolvedComponent<\n TComponentServerProps extends never | object,\n TComponentClientProps extends never | object,\n> = {\n clientProps?: TComponentClientProps\n Component: React.FC<TComponentClientProps | TComponentServerProps>\n serverProps?: TComponentServerProps\n}\n\nexport type BinScriptConfig = {\n key: string\n scriptPath: string\n}\n\nexport type BinScript = (config: SanitizedConfig) => Promise<void> | void\n\ntype Prettify<T> = {\n [K in keyof T]: T[K]\n} & NonNullable<unknown>\n\nexport type Plugin = (config: Config) => Config | Promise<Config>\n\nexport type LivePreviewConfig = {\n /**\n Device breakpoints to use for the `iframe` of the Live Preview window.\n Options are displayed in the Live Preview toolbar.\n The `responsive` breakpoint is included by default.\n */\n breakpoints?: {\n height: number | string\n label: string\n name: string\n width: number | string\n }[]\n /**\n The URL of the frontend application. This will be rendered within an `iframe` as its `src`.\n Payload will send a `window.postMessage()` to this URL with the document data in real-time.\n The frontend application is responsible for receiving the message and updating the UI accordingly.\n Use the `useLivePreview` hook to get started in React applications.\n */\n url?:\n | ((args: {\n collectionConfig?: SanitizedCollectionConfig\n data: Record<string, any>\n globalConfig?: SanitizedGlobalConfig\n locale: Locale\n payload: Payload\n }) => Promise<string> | string)\n | string\n}\n\nexport type OGImageConfig = {\n alt?: string\n height?: number | string\n type?: string\n url: string\n width?: number | string\n}\n\nexport type OpenGraphConfig = {\n description?: string\n images?: OGImageConfig | OGImageConfig[]\n siteName?: string\n title?: string\n}\n\nexport type IconConfig = {\n color?: string\n /**\n * @see https://developer.mozilla.org/docs/Web/API/HTMLImageElement/fetchPriority\n */\n fetchPriority?: 'auto' | 'high' | 'low'\n media?: string\n /** defaults to rel=\"icon\" */\n rel?: string\n sizes?: string\n type?: string\n /**\n * URL of the icon to use. You can use a relative path from the public folder (see https://nextjs.org/docs/app/building-your-application/optimizing/static-assets) or an absolute URL.\n */\n url: string\n}\n\nexport type MetaConfig = {\n /**\n * When `static`, a pre-made image will be used for all pages.\n * When `dynamic`, a unique image will be generated for each page based on page content and given overrides.\n * When `off`, no Open Graph images will be generated and the `/api/og` endpoint will be disabled. You can still provide custom images using the `openGraph.images` property.\n * @default 'dynamic'\n */\n defaultOGImageType?: 'dynamic' | 'off' | 'static'\n /**\n * Overrides the auto-generated <meta name=\"description\"> of admin pages\n * @example `\"This is my custom CMS built with Payload.\"`\n */\n description?: string\n /**\n * Icons to be rendered by devices and browsers.\n *\n * For example browser tabs, phone home screens, and search engine results.\n */\n icons?: IconConfig[]\n /**\n * Overrides the auto-generated <meta name=\"keywords\"> of admin pages\n * @example `\"CMS, Payload, Custom\"`\n */\n keywords?: string\n /**\n * Metadata to be rendered as `og` meta tags in the head of the Admin Panel.\n *\n * For example when sharing the Admin Panel on social media or through messaging services.\n */\n openGraph?: OpenGraphConfig\n /**\n * Overrides the auto-generated <title> of admin pages\n * @example `\"My Admin Panel\"`\n */\n title?: string\n /**\n * String to append to the auto-generated <title> of admin pages\n * @example `\" - Custom CMS\"`\n */\n titleSuffix?: string\n}\n\nexport type ServerOnlyLivePreviewProperties = keyof Pick<LivePreviewConfig, 'url'>\n\ntype GeneratePreviewURLOptions = {\n locale: string\n req: PayloadRequest\n token: null | string\n}\n\nexport type GeneratePreviewURL = (\n doc: Record<string, unknown>,\n options: GeneratePreviewURLOptions,\n) => null | Promise<null | string> | string\n\nexport type GraphQLInfo = {\n collections: {\n [slug: string]: Collection\n }\n globals: Globals\n Mutation: {\n fields: Record<string, any>\n name: string\n }\n Query: {\n fields: Record<string, any>\n name: string\n }\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 importMap?: ImportMap\n\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 = boolean | Where\n\nexport type AccessArgs<TData = any> = {\n /**\n * The relevant resource that is being accessed.\n *\n * `data` is null when a list is requested\n */\n data?: TData\n /** ID of the resource being accessed */\n id?: number | string\n /** If true, the request is for a static file */\n isReadingStaticFile?: boolean\n /** The original request that requires an access check */\n req: PayloadRequest\n}\n\n/**\n * Access function runs on the server\n * and is sent to the client allowing the dashboard to show accessible data and actions.\n *\n * @see https://payloadcms.com/docs/access-control/overview\n */\nexport type Access<TData = any> = (args: AccessArgs<TData>) => AccessResult | Promise<AccessResult>\n\n/** Web Request/Response model, but the req has more payload specific properties added to it. */\nexport type PayloadHandler = (req: PayloadRequest) => Promise<Response> | Response\n\n/**\n * Docs: https://payloadcms.com/docs/rest-api/overview#custom-endpoints\n */\nexport type Endpoint = {\n /** Extension point to add your custom data. */\n custom?: Record<string, any>\n\n /**\n * Middleware that will be called when the path/method matches\n *\n * Compatible with Web Request/Response Model\n */\n handler: PayloadHandler\n /** HTTP method (or \"all\") */\n method: 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put'\n /**\n * Pattern that should match the path of the incoming request\n *\n * Compatible with the Express router\n */\n path: string\n /**\n * Please add \"root\" routes under the /api folder in the Payload Project.\n * https://nextjs.org/docs/app/api-reference/file-conventions/route\n *\n * @deprecated in 3.0\n */\n root?: never\n}\n\nexport type EditViewComponent = PayloadComponent<ServerSideEditViewProps>\n\nexport type EditViewConfig = {\n meta?: MetaConfig\n} & (\n | {\n actions?: CustomComponent[]\n }\n | {\n Component: EditViewComponent\n path?: string\n }\n | {\n path?: string\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?: DocumentTabConfig\n }\n)\n\ntype ClientProps = {\n readonly [key: string]: unknown\n}\n\nexport type ServerProps = {\n readonly i18n: I18nClient\n readonly locale?: Locale\n readonly params?: { [key: string]: string | string[] | undefined }\n readonly payload: Payload\n readonly permissions?: SanitizedPermissions\n readonly searchParams?: { [key: string]: string | string[] | undefined }\n readonly user?: TypedUser\n readonly visibleEntities?: VisibleEntities\n} & ClientProps\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 object = Record<string, any>> =\n PayloadComponent<ServerProps & TAdditionalProps, TAdditionalProps>\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 *\n * If false, then no requests will fallback unless a fallbackLocale is specified in the request.\n * @default true\n */\n fallback?: boolean\n}\n\nexport type LocalizationConfigWithNoLabels = Prettify<\n {\n /**\n * List of supported locales\n * @example `[\"en\", \"es\", \"fr\", \"nl\", \"de\", \"jp\"]`\n */\n locales: string[]\n } & BaseLocalizationConfig\n>\n\nexport type LocalizationConfigWithLabels = Prettify<\n {\n /**\n * List of supported locales with labels\n * @example {\n * label: 'English',\n * value: 'en',\n * rtl: false\n * }\n */\n locales: Locale[]\n } & BaseLocalizationConfig\n>\n\nexport type SanitizedLocalizationConfig = Prettify<\n {\n /**\n * List of supported locales\n * @example `[\"en\", \"es\", \"fr\", \"nl\", \"de\", \"jp\"]`\n */\n localeCodes: string[]\n } & LocalizationConfigWithLabels\n>\n\n/**\n * @see https://payloadcms.com/docs/configuration/localization#localization\n */\nexport type LocalizationConfig = Prettify<\n LocalizationConfigWithLabels | LocalizationConfigWithNoLabels\n>\n\nexport type LabelFunction = ({ t }: { t: TFunction }) => string\n\nexport type StaticLabel = Record<string, string> | string\n\nexport type SharpDependency = (\n input?:\n | ArrayBuffer\n | Buffer\n | Float32Array\n | Float64Array\n | Int8Array\n | Int16Array\n | Int32Array\n | string\n | Uint8Array\n | Uint8ClampedArray\n | Uint16Array\n | Uint32Array,\n options?: sharp.SharpOptions,\n) => sharp.Sharp\n\nexport type CORSConfig = {\n headers?: string[]\n origins: '*' | string[]\n}\n\nexport type AdminFunction = {\n args?: object\n path: string\n type: 'function'\n}\n\nexport type AdminComponent = {\n clientProps?: object\n path: string\n serverProps?: object\n type: 'component'\n}\n\nexport interface AdminDependencies {\n [key: string]: AdminComponent | AdminFunction\n}\n\nexport type FetchAPIFileUploadOptions = {\n /**\n * Returns a HTTP 413 when the file is bigger than the size limit if `true`.\n * Otherwise, it will add a `truncated = true` to the resulting file structure.\n * @default false\n */\n abortOnLimit?: boolean | undefined\n /**\n * Automatically creates the directory path specified in `.mv(filePathName)`\n * @default false\n */\n createParentPath?: boolean | undefined\n /**\n * Turn on/off upload process logging. Can be useful for troubleshooting.\n * @default false\n */\n debug?: boolean | undefined\n /**\n * User defined limit handler which will be invoked if the file is bigger than configured limits.\n * @default false\n */\n limitHandler?: ((args: { request: Request; size: number }) => void) | boolean | undefined\n /**\n * By default, `req.body` and `req.files` are flattened like this:\n * `{'name': 'John', 'hobbies[0]': 'Cinema', 'hobbies[1]': 'Bike'}\n *\n * When this option is enabled they are parsed in order to be nested like this:\n * `{'name': 'John', 'hobbies': ['Cinema', 'Bike']}`\n * @default false\n */\n parseNested?: boolean | undefined\n /**\n * Preserves filename extension when using `safeFileNames` option.\n * If set to `true`, will default to an extension length of `3`.\n * If set to `number`, this will be the max allowable extension length.\n * If an extension is smaller than the extension length, it remains untouched. If the extension is longer,\n * it is shifted.\n * @default false\n *\n * @example\n * // true\n * app.use(fileUpload({ safeFileNames: true, preserveExtension: true }));\n * // myFileName.ext --> myFileName.ext\n *\n * @example\n * // max extension length 2, extension shifted\n * app.use(fileUpload({ safeFileNames: true, preserveExtension: 2 }));\n * // myFileName.ext --> myFileNamee.xt\n */\n preserveExtension?: boolean | number | undefined\n /**\n * Response which will be send to client if file size limit exceeded when `abortOnLimit` set to `true`.\n * @default 'File size limit has been reached'\n */\n responseOnLimit?: string | undefined\n /**\n * Strips characters from the upload's filename.\n * You can use custom regex to determine what to strip.\n * If set to `true`, non-alphanumeric characters _except_ dashes and underscores will be stripped.\n * This option is off by default.\n * @default false\n *\n * @example\n * // strip slashes from file names\n * app.use(fileUpload({ safeFileNames: /\\\\/g }))\n *\n * @example\n * app.use(fileUpload({ safeFileNames: true }))\n */\n safeFileNames?: boolean | RegExp | undefined\n /**\n * Path to store temporary files.\n * Used along with the `useTempFiles` option. By default this module uses `'tmp'` folder\n * in the current working directory.\n * You can use trailing slash, but it is not necessary.\n * @default './tmp'\n */\n tempFileDir?: string | undefined\n /**\n * This defines how long to wait for data before aborting. Set to `0` if you want to turn off timeout checks.\n * @default 60_000\n */\n uploadTimeout?: number | undefined\n /**\n * Applies uri decoding to file names if set `true`.\n * @default false\n */\n uriDecodeFileNames?: boolean | undefined\n /**\n * By default this module uploads files into RAM.\n * Setting this option to `true` turns on using temporary files instead of utilising RAM.\n * This avoids memory overflow issues when uploading large files or in case of uploading\n * lots of files at same time.\n * @default false\n */\n useTempFiles?: boolean | undefined\n} & Partial<BusboyConfig>\n\nexport type ErrorResult = { data?: any; errors: unknown[]; stack?: string }\n\nexport type AfterErrorResult = {\n graphqlResult?: GraphQLFormattedError\n response?: Partial<ErrorResult> & Record<string, unknown>\n status?: number\n} | void\n\nexport type AfterErrorHookArgs = {\n /** The Collection that the hook is operating on. This will be undefined if the hook is executed from a non-collection endpoint or GraphQL. */\n collection?: SanitizedCollectionConfig\n /** \tCustom context passed between hooks */\n context: RequestContext\n /** The error that occurred. */\n error: Error\n /** The GraphQL result object, available if the hook is executed within a GraphQL context. */\n graphqlResult?: GraphQLFormattedError\n /** The Request object containing the currently authenticated user. */\n req: PayloadRequest\n /** The formatted error result object, available if the hook is executed from a REST context. */\n result?: ErrorResult\n}\n\nexport type AfterErrorHook = (\n args: AfterErrorHookArgs,\n) => AfterErrorResult | Promise<AfterErrorResult>\n\n/**\n * This is the central configuration\n *\n * @see https://payloadcms.com/docs/configuration/overview\n */\nexport type Config = {\n /** Configure admin dashboard */\n admin?: {\n /** Automatically log in as a user */\n autoLogin?:\n | {\n /**\n * The email address of the user to login as\n */\n email?: string\n /** The password of the user to login as. This is only needed if `prefillOnly` is set to true */\n password?: string\n /**\n * If set to true, the login credentials will be prefilled but the user will still need to click the login button.\n *\n * @default false\n */\n prefillOnly?: boolean\n /** The username of the user to login as */\n username?: string\n }\n | false\n\n /** Set account profile picture. Options: gravatar, default or a custom React component. */\n avatar?:\n | 'default'\n | 'gravatar'\n | {\n Component: PayloadComponent<never>\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 * 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 /**\n * Add custom header to top of page globally\n */\n header?: CustomComponent[]\n /** Replace logout related components */\n logout?: {\n /** Replace the logout button */\n Button?: CustomComponent\n }\n /**\n * Replace the navigation with a custom component\n */\n Nav?: CustomComponent\n /**\n * Wrap the admin dashboard in custom context providers\n */\n providers?: PayloadComponent<{ children?: React.ReactNode }, { 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]: AdminViewConfig\n /** Replace the account screen */\n account?: AdminViewConfig\n /** Replace the admin homepage */\n dashboard?: AdminViewConfig\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 /**\n * Each entry in this map generates an entry in the importMap,\n * as well as an entry in the componentMap if the type of the\n * dependency is 'component'\n */\n dependencies?: AdminDependencies\n /** If set to true, the entire Admin panel will be disabled. */\n disable?: boolean\n importMap?: {\n /**\n * Automatically generate component map during development\n * @default true\n */\n autoGenerate?: boolean\n\n /** The base directory for component paths starting with /.\n *\n * By default, this is process.cwd()\n **/\n baseDir?: string\n /**\n * You can use generators to add custom components to the component import map.\n * This allows you to import custom components in the admin panel.\n */\n generators?: Array<\n (props: {\n addToImportMap: AddToImportMap\n baseDir: string\n config: SanitizedConfig\n importMap: InternalImportMap\n imports: Imports\n }) => void\n >\n }\n livePreview?: {\n collections?: string[]\n globals?: string[]\n } & LivePreviewConfig\n /** Base meta data to use for the Admin Panel. Included properties are titleSuffix, ogImage, and favicon. */\n meta?: MetaConfig\n routes?: {\n /** The route for the account page. */\n account?: string\n /** The route for the create first user page. */\n createFirstUser?: string\n /** The route for the forgot password page. */\n forgot?: string\n /** The route the user will be redirected to after being inactive for too long. */\n inactivity?: string\n /** The route for the login page. */\n login?: string\n /** The route for the logout page. */\n logout?: string\n /** The route for the reset password page. */\n reset?: string\n /** The route for the unauthorized page. */\n unauthorized?: string\n }\n /**\n * Restrict the Admin Panel theme to use only one of your choice\n *\n * @default 'all' // The theme can be configured by users\n */\n theme?: 'all' | 'dark' | 'light'\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 * Compatibility flags for prior Payload versions\n */\n compatibility?: {\n /**\n * By default, Payload will remove the `localized: true` property\n * from fields if a parent field is localized. Set this property\n * to `true` only if you have an existing Payload database from pre-3.0\n * that you would like to maintain without migrating. This is only\n * relevant for MongoDB databases.\n */\n allowLocalizedWithinLocalized: true\n }\n /**\n * Prefix a string to all cookies that Payload sets.\n *\n * @default \"payload\"\n */\n cookiePrefix?: string\n /** Either a whitelist array of URLS to allow CORS requests from, or a wildcard string ('*') to accept incoming requests from any domain. */\n cors?: '*' | CORSConfig | string[]\n /** A whitelist array of URLs to allow Payload cookies to be accepted from as a form of CSRF protection. */\n csrf?: string[]\n\n /** Extension point to add your custom data. Server only. */\n custom?: Record<string, any>\n\n /** Pass in a database adapter for use on this project. */\n db: DatabaseAdapterResult\n /** Enable to expose more detailed error information. */\n debug?: boolean\n /**\n * If a user does not specify `depth` while requesting a resource, this depth will be used.\n *\n * @see https://payloadcms.com/docs/getting-started/concepts#depth\n *\n * @default 2\n */\n defaultDepth?: number\n /**\n * The maximum allowed depth to be permitted application-wide. This setting helps prevent against malicious queries.\n *\n * @default 40000\n */\n defaultMaxTextLength?: number\n /** Default richtext editor to use for richText fields */\n editor?: RichTextAdapterProvider<any, any, any>\n /**\n * Email Adapter\n *\n * @see https://payloadcms.com/docs/email/overview\n */\n email?: EmailAdapter | Promise<EmailAdapter>\n /** Custom REST endpoints */\n endpoints?: Endpoint[]\n /**\n * @see https://payloadcms.com/docs/configuration/globals#global-configs\n */\n globals?: GlobalConfig[]\n /**\n * Manage the GraphQL API\n *\n * You can add your own GraphQL queries and mutations to Payload, making use of all the types that Payload has defined for you.\n *\n * @see https://payloadcms.com/docs/graphql/overview\n */\n graphQL?: {\n disable?: boolean\n disablePlaygroundInProduction?: boolean\n maxComplexity?: number\n /**\n * Function that returns an object containing keys to custom GraphQL mutations\n *\n * @see https://payloadcms.com/docs/graphql/extending\n */\n mutations?: GraphQLExtension\n /**\n * Function that returns an object containing keys to custom GraphQL queries\n *\n * @see https://payloadcms.com/docs/graphql/extending\n */\n queries?: GraphQLExtension\n /**\n * Filepath to write the generated schema to\n */\n schemaOutputFile?: string\n }\n /**\n * Tap into Payload-wide hooks.\n *\n * @see https://payloadcms.com/docs/hooks/overview\n */\n hooks?: {\n afterError?: AfterErrorHook[]\n }\n /** i18n config settings */\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\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 * @experimental There may be frequent breaking changes to this API\n */\n jobs?: JobsConfig\n /**\n * Translate your content to different languages/locales.\n *\n * @default false // disable localization\n */\n localization?: false | LocalizationConfig\n\n /**\n * Logger options, logger options with a destination stream, or an instantiated logger instance.\n *\n * See Pino Docs for options: https://getpino.io/#/docs/api?id=options\n *\n * ```ts\n * // Logger options only\n * logger: {\n * level: 'info',\n * }\n *\n * // Logger options with destination stream\n * logger: {\n * options: {\n * level: 'info',\n * },\n * destination: process.stdout\n * },\n *\n * // Logger instance\n * logger: pino({ name: 'my-logger' })\n *\n * ```\n */\n logger?: 'sync' | { destination?: DestinationStream; options: pino.LoggerOptions } | PayloadLogger\n\n /**\n * Override the log level of errors for Payload's error handler or disable logging with `false`.\n * Levels can be any of the following: 'trace', 'debug', 'info', 'warn', 'error', 'fatal' or false.\n *\n * Default levels:\n * {\n `* APIError: 'error',\n `* AuthenticationError: 'error',\n `* ErrorDeletingFile: 'error',\n `* FileRetrievalError: 'error',\n `* FileUploadError: 'error',\n `* Forbidden: 'info',\n `* Locked: 'info',\n `* LockedAuth: 'error',\n `* MissingFile: 'info',\n `* NotFound: 'info',\n `* QueryError: 'error',\n `* ValidationError: 'info',\n * }\n */\n loggingLevels?: Partial<Record<ErrorName, false | Level>>\n\n /**\n * The maximum allowed depth to be permitted application-wide. This setting helps prevent against malicious queries.\n *\n * @see https://payloadcms.com/docs/getting-started/concepts#depth\n *\n * @default 10\n */\n maxDepth?: number\n /** A function that is called immediately following startup that receives the Payload instance as its only argument. */\n onInit?: (payload: Payload) => Promise<void> | void\n /**\n * An array of Payload plugins.\n *\n * @see https://payloadcms.com/docs/plugins/overview\n */\n plugins?: Plugin[]\n /** Control the routing structure that Payload binds itself to. */\n routes?: {\n /** The route for the admin panel.\n * @example \"/my-admin\"\n * @default \"/admin\"\n */\n admin?: string\n /** @default \"/api\" */\n api?: string\n /** @default \"/graphql\" */\n graphQL?: string\n /** @default \"/graphql-playground\" */\n graphQLPlayground?: string\n }\n /** Secure string that Payload will use for any encryption workflows */\n secret: string\n /**\n * Define the absolute URL of your app including the protocol, for example `https://example.org`.\n * No paths allowed, only protocol, domain and (optionally) port.\n *\n * @see https://payloadcms.com/docs/configuration/overview#options\n */\n serverURL?: string\n /**\n * Pass in a local copy of Sharp if you'd like to use it.\n *\n */\n sharp?: SharpDependency\n /** Send anonymous telemetry data about general usage. */\n telemetry?: boolean\n /** Control how typescript interfaces are generated from your collections. */\n typescript?: {\n /**\n * Automatically generate types during development\n * @default true\n */\n autoGenerate?: boolean\n\n /** Disable declare block in generated types file */\n declare?:\n | {\n /**\n * @internal internal use only to allow for multiple declarations within a monorepo and suppress the \"Duplicate identifier GeneratedTypes\" error\n *\n * Adds a @ts-ignore flag above the GeneratedTypes interface declaration\n *\n * @default false\n */\n ignoreTSError?: boolean\n }\n | false\n\n /** Filename to write the generated types to */\n outputFile?: string\n\n /**\n * Allows you to modify the base JSON schema that is generated during generate:types. This JSON schema will be used\n * to generate the TypeScript interfaces.\n */\n schema?: Array<(args: { jsonSchema: JSONSchema4 }) => JSONSchema4>\n }\n /**\n * Customize the handling of incoming file uploads for collections that have uploads enabled.\n */\n upload?: FetchAPIFileUploadOptions\n}\n\nexport type SanitizedConfig = {\n collections: SanitizedCollectionConfig[]\n /** Default richtext editor to use for richText fields */\n editor?: RichTextAdapter<any, any, any>\n endpoints: Endpoint[]\n globals: SanitizedGlobalConfig[]\n i18n: Required<I18nOptions>\n jobs: JobsConfig // Redefine here, as the DeepRequired<Config> can break its type\n localization: false | SanitizedLocalizationConfig\n paths: {\n config: string\n configDir: string\n rawConfig: string\n }\n upload: {\n /**\n * Deduped list of adapters used in the project\n */\n adapters: string[]\n } & FetchAPIFileUploadOptions\n} & Omit<\n // TODO: DeepRequired breaks certain, advanced TypeScript types / certain type information is lost. We should remove it when possible.\n // E.g. in packages/ui/src/graphics/Account/index.tsx in getComponent, if avatar.Component is casted to what it's supposed to be,\n // the result type is different\n DeepRequired<Config>,\n 'collections' | 'editor' | 'endpoint' | 'globals' | 'i18n' | 'localization' | 'upload'\n>\n\nexport type EditConfig = EditConfigWithoutRoot | EditConfigWithRoot\n\nexport type EditConfigWithRoot = {\n api?: never\n default?: never\n livePreview?: never\n /**\n * Replace or modify _all_ nested document views and routes, including the document header, controls, and tabs. This cannot be used in conjunction with other nested views.\n * + `root` - `/admin/collections/:collection/:id/**\\/*`\n */\n root: Partial<EditViewConfig>\n version?: never\n versions?: never\n}\n\nexport type EditConfigWithoutRoot = {\n [key: string]: EditViewConfig\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 * To override the entire Edit View including all nested views, use the `root` key.\n */\n api?: Partial<EditViewConfig>\n default?: Partial<EditViewConfig>\n livePreview?: Partial<EditViewConfig>\n root?: never\n version?: Partial<EditViewConfig>\n versions?: Partial<EditViewConfig>\n}\n\nexport type EntityDescriptionComponent = CustomComponent\n\nexport type EntityDescriptionFunction = ({ t }: { t: TFunction }) => string\n\nexport type EntityDescription = EntityDescriptionFunction | Record<string, string> | string\n\nexport type { EmailAdapter, SendEmailOptions }\n"],"names":["serverProps"],"mappings":"AAsZA,OAAO,MAAMA,cAAqC;IAChD;IACA;IACA;IACA;IACA;IACA;IACA;CACD,CAAA"}
1
+ {"version":3,"sources":["../../src/config/types.ts"],"sourcesContent":["import type {\n DefaultTranslationKeys,\n DefaultTranslationsObject,\n I18nClient,\n I18nOptions,\n TFunction,\n} from '@payloadcms/translations'\nimport type { BusboyConfig } from 'busboy'\nimport type GraphQL from 'graphql'\nimport type { GraphQLFormattedError } from 'graphql'\nimport type { JSONSchema4 } from 'json-schema'\nimport type { DestinationStream, Level, pino } 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 { DocumentTabConfig, RichTextAdapter } from '../admin/types.js'\nimport type {\n AdminViewConfig,\n ServerSideEditViewProps,\n VisibleEntities,\n} from '../admin/views/types.js'\nimport type { SanitizedPermissions } from '../auth/index.js'\nimport type {\n AddToImportMap,\n ImportMap,\n Imports,\n InternalImportMap,\n} from '../bin/generateImportMap/index.js'\nimport type {\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 { ErrorName } from '../errors/types.js'\nimport type { GlobalConfig, Globals, SanitizedGlobalConfig } from '../globals/config/types.js'\nimport type { JobsConfig, Payload, RequestContext, TypedUser } from '../index.js'\nimport type { PayloadRequest, Where } from '../types/index.js'\nimport type { PayloadLogger } from '../utilities/logger.js'\n\n/**\n * The string path pointing to the React component. If one of the generics is `never`, you effectively mark it as a server-only or client-only component.\n *\n * If it is `false` an empty component will be rendered.\n */\nexport type PayloadComponent<\n TComponentServerProps extends never | object = Record<string, any>,\n TComponentClientProps extends never | object = Record<string, any>,\n> = false | RawPayloadComponent<TComponentServerProps, TComponentClientProps> | string\n\n// We need the actual object as its own type, otherwise the infers for the PayloadClientReactComponent / PayloadServerReactComponent will not work due to the string union.\n// We also NEED to actually use those generics for this to work, thus they are part of the props.\nexport type RawPayloadComponent<\n TComponentServerProps extends never | object = Record<string, any>,\n TComponentClientProps extends never | object = Record<string, any>,\n> = {\n clientProps?: object | TComponentClientProps\n exportName?: string\n path: string\n serverProps?: object | TComponentServerProps\n}\n\nexport type PayloadComponentProps<TPayloadComponent> =\n TPayloadComponent extends RawPayloadComponent<\n infer TComponentServerProps,\n infer TComponentClientProps\n >\n ? TComponentClientProps | TComponentServerProps\n : never\n\nexport type PayloadClientComponentProps<TPayloadComponent> =\n TPayloadComponent extends RawPayloadComponent<infer _, infer TComponentClientProps>\n ? TComponentClientProps\n : never\n\nexport type PayloadServerComponentProps<TPayloadComponent> =\n TPayloadComponent extends RawPayloadComponent<infer TComponentServerProps, infer _>\n ? TComponentServerProps\n : never\n\nexport type PayloadReactComponent<TPayloadComponent> = React.FC<\n PayloadComponentProps<TPayloadComponent>\n>\n\n// This also ensures that if never is passed to TComponentClientProps, this entire type will be never.\n// => TypeScript will now ensure that users cannot even define the typed Server Components if the PayloadComponent is marked as\n// Client-Only (marked as Client-Only = TComponentServerProps is never)\nexport type PayloadClientReactComponent<TPayloadComponent> =\n TPayloadComponent extends RawPayloadComponent<infer _, infer TComponentClientProps>\n ? TComponentClientProps extends never\n ? never\n : React.FC<TComponentClientProps>\n : never\n\nexport type PayloadServerReactComponent<TPayloadComponent> =\n TPayloadComponent extends RawPayloadComponent<infer TComponentServerProps, infer _>\n ? TComponentServerProps extends never\n ? never\n : React.FC<TComponentServerProps>\n : never\n\nexport type ResolvedComponent<\n TComponentServerProps extends never | object,\n TComponentClientProps extends never | object,\n> = {\n clientProps?: TComponentClientProps\n Component: React.FC<TComponentClientProps | TComponentServerProps>\n serverProps?: TComponentServerProps\n}\n\nexport type BinScriptConfig = {\n key: string\n scriptPath: string\n}\n\nexport type BinScript = (config: SanitizedConfig) => Promise<void> | void\n\ntype Prettify<T> = {\n [K in keyof T]: T[K]\n} & NonNullable<unknown>\n\nexport type Plugin = (config: Config) => Config | Promise<Config>\n\nexport type LivePreviewConfig = {\n /**\n Device breakpoints to use for the `iframe` of the Live Preview window.\n Options are displayed in the Live Preview toolbar.\n The `responsive` breakpoint is included by default.\n */\n breakpoints?: {\n height: number | string\n label: string\n name: string\n width: number | string\n }[]\n /**\n The URL of the frontend application. This will be rendered within an `iframe` as its `src`.\n Payload will send a `window.postMessage()` to this URL with the document data in real-time.\n The frontend application is responsible for receiving the message and updating the UI accordingly.\n Use the `useLivePreview` hook to get started in React applications.\n */\n url?:\n | ((args: {\n collectionConfig?: SanitizedCollectionConfig\n data: Record<string, any>\n globalConfig?: SanitizedGlobalConfig\n locale: Locale\n payload: Payload\n }) => Promise<string> | string)\n | string\n}\n\nexport type OGImageConfig = {\n alt?: string\n height?: number | string\n type?: string\n url: string\n width?: number | string\n}\n\nexport type OpenGraphConfig = {\n description?: string\n images?: OGImageConfig | OGImageConfig[]\n siteName?: string\n title?: string\n}\n\nexport type IconConfig = {\n color?: string\n /**\n * @see https://developer.mozilla.org/docs/Web/API/HTMLImageElement/fetchPriority\n */\n fetchPriority?: 'auto' | 'high' | 'low'\n media?: string\n /** defaults to rel=\"icon\" */\n rel?: string\n sizes?: string\n type?: string\n /**\n * URL of the icon to use. You can use a relative path from the public folder (see https://nextjs.org/docs/app/building-your-application/optimizing/static-assets) or an absolute URL.\n */\n url: string\n}\n\nexport type MetaConfig = {\n /**\n * When `static`, a pre-made image will be used for all pages.\n * When `dynamic`, a unique image will be generated for each page based on page content and given overrides.\n * When `off`, no Open Graph images will be generated and the `/api/og` endpoint will be disabled. You can still provide custom images using the `openGraph.images` property.\n * @default 'dynamic'\n */\n defaultOGImageType?: 'dynamic' | 'off' | 'static'\n /**\n * Overrides the auto-generated <meta name=\"description\"> of admin pages\n * @example `\"This is my custom CMS built with Payload.\"`\n */\n description?: string\n /**\n * Icons to be rendered by devices and browsers.\n *\n * For example browser tabs, phone home screens, and search engine results.\n */\n icons?: IconConfig[]\n /**\n * Overrides the auto-generated <meta name=\"keywords\"> of admin pages\n * @example `\"CMS, Payload, Custom\"`\n */\n keywords?: string\n /**\n * Metadata to be rendered as `og` meta tags in the head of the Admin Panel.\n *\n * For example when sharing the Admin Panel on social media or through messaging services.\n */\n openGraph?: OpenGraphConfig\n /**\n * Overrides the auto-generated <title> of admin pages\n * @example `\"My Admin Panel\"`\n */\n title?: string\n /**\n * String to append to the auto-generated <title> of admin pages\n * @example `\" - Custom CMS\"`\n */\n titleSuffix?: string\n}\n\nexport type ServerOnlyLivePreviewProperties = keyof Pick<LivePreviewConfig, 'url'>\n\ntype GeneratePreviewURLOptions = {\n locale: string\n req: PayloadRequest\n token: null | string\n}\n\nexport type GeneratePreviewURL = (\n doc: Record<string, unknown>,\n options: GeneratePreviewURLOptions,\n) => null | Promise<null | string> | string\n\nexport type GraphQLInfo = {\n collections: {\n [slug: string]: Collection\n }\n globals: Globals\n Mutation: {\n fields: Record<string, any>\n name: string\n }\n Query: {\n fields: Record<string, any>\n name: string\n }\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 importMap?: ImportMap\n\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 = boolean | Where\n\nexport type AccessArgs<TData = any> = {\n /**\n * The relevant resource that is being accessed.\n *\n * `data` is null when a list is requested\n */\n data?: TData\n /** ID of the resource being accessed */\n id?: number | string\n /** If true, the request is for a static file */\n isReadingStaticFile?: boolean\n /** The original request that requires an access check */\n req: PayloadRequest\n}\n\n/**\n * Access function runs on the server\n * and is sent to the client allowing the dashboard to show accessible data and actions.\n *\n * @see https://payloadcms.com/docs/access-control/overview\n */\nexport type Access<TData = any> = (args: AccessArgs<TData>) => AccessResult | Promise<AccessResult>\n\n/** Web Request/Response model, but the req has more payload specific properties added to it. */\nexport type PayloadHandler = (req: PayloadRequest) => Promise<Response> | Response\n\n/**\n * Docs: https://payloadcms.com/docs/rest-api/overview#custom-endpoints\n */\nexport type Endpoint = {\n /** Extension point to add your custom data. */\n custom?: Record<string, any>\n\n /**\n * Middleware that will be called when the path/method matches\n *\n * Compatible with Web Request/Response Model\n */\n handler: PayloadHandler\n /** HTTP method (or \"all\") */\n method: 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put'\n /**\n * Pattern that should match the path of the incoming request\n *\n * Compatible with the Express router\n */\n path: string\n /**\n * Please add \"root\" routes under the /api folder in the Payload Project.\n * https://nextjs.org/docs/app/api-reference/file-conventions/route\n *\n * @deprecated in 3.0\n */\n root?: never\n}\n\nexport type EditViewComponent = PayloadComponent<ServerSideEditViewProps>\n\nexport type EditViewConfig = {\n meta?: MetaConfig\n} & (\n | {\n actions?: CustomComponent[]\n }\n | {\n Component: EditViewComponent\n path?: string\n }\n | {\n path?: string\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?: DocumentTabConfig\n }\n)\n\ntype ClientProps = {\n readonly [key: string]: unknown\n}\n\nexport type ServerProps = {\n readonly i18n: I18nClient\n readonly locale?: Locale\n readonly params?: { [key: string]: string | string[] | undefined }\n readonly payload: Payload\n readonly permissions?: SanitizedPermissions\n readonly searchParams?: { [key: string]: string | string[] | undefined }\n readonly user?: TypedUser\n readonly visibleEntities?: VisibleEntities\n} & ClientProps\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 object = Record<string, any>> =\n PayloadComponent<ServerProps & TAdditionalProps, TAdditionalProps>\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 *\n * If false, then no requests will fallback unless a fallbackLocale is specified in the request.\n * @default true\n */\n fallback?: boolean\n}\n\nexport type LocalizationConfigWithNoLabels = Prettify<\n {\n /**\n * List of supported locales\n * @example `[\"en\", \"es\", \"fr\", \"nl\", \"de\", \"jp\"]`\n */\n locales: string[]\n } & BaseLocalizationConfig\n>\n\nexport type LocalizationConfigWithLabels = Prettify<\n {\n /**\n * List of supported locales with labels\n * @example {\n * label: 'English',\n * value: 'en',\n * rtl: false\n * }\n */\n locales: Locale[]\n } & BaseLocalizationConfig\n>\n\nexport type SanitizedLocalizationConfig = Prettify<\n {\n /**\n * List of supported locales\n * @example `[\"en\", \"es\", \"fr\", \"nl\", \"de\", \"jp\"]`\n */\n localeCodes: string[]\n } & LocalizationConfigWithLabels\n>\n\n/**\n * @see https://payloadcms.com/docs/configuration/localization#localization\n */\nexport type LocalizationConfig = Prettify<\n LocalizationConfigWithLabels | LocalizationConfigWithNoLabels\n>\n\nexport type LabelFunction<TTranslationKeys = DefaultTranslationKeys> = ({\n t,\n}: {\n t: TFunction<TTranslationKeys>\n}) => string\n\nexport type StaticLabel = Record<string, string> | string\n\nexport type SharpDependency = (\n input?:\n | ArrayBuffer\n | Buffer\n | Float32Array\n | Float64Array\n | Int8Array\n | Int16Array\n | Int32Array\n | string\n | Uint8Array\n | Uint8ClampedArray\n | Uint16Array\n | Uint32Array,\n options?: sharp.SharpOptions,\n) => sharp.Sharp\n\nexport type CORSConfig = {\n headers?: string[]\n origins: '*' | string[]\n}\n\nexport type AdminFunction = {\n args?: object\n path: string\n type: 'function'\n}\n\nexport type AdminComponent = {\n clientProps?: object\n path: string\n serverProps?: object\n type: 'component'\n}\n\nexport interface AdminDependencies {\n [key: string]: AdminComponent | AdminFunction\n}\n\nexport type FetchAPIFileUploadOptions = {\n /**\n * Returns a HTTP 413 when the file is bigger than the size limit if `true`.\n * Otherwise, it will add a `truncated = true` to the resulting file structure.\n * @default false\n */\n abortOnLimit?: boolean | undefined\n /**\n * Automatically creates the directory path specified in `.mv(filePathName)`\n * @default false\n */\n createParentPath?: boolean | undefined\n /**\n * Turn on/off upload process logging. Can be useful for troubleshooting.\n * @default false\n */\n debug?: boolean | undefined\n /**\n * User defined limit handler which will be invoked if the file is bigger than configured limits.\n * @default false\n */\n limitHandler?: ((args: { request: Request; size: number }) => void) | boolean | undefined\n /**\n * By default, `req.body` and `req.files` are flattened like this:\n * `{'name': 'John', 'hobbies[0]': 'Cinema', 'hobbies[1]': 'Bike'}\n *\n * When this option is enabled they are parsed in order to be nested like this:\n * `{'name': 'John', 'hobbies': ['Cinema', 'Bike']}`\n * @default false\n */\n parseNested?: boolean | undefined\n /**\n * Preserves filename extension when using `safeFileNames` option.\n * If set to `true`, will default to an extension length of `3`.\n * If set to `number`, this will be the max allowable extension length.\n * If an extension is smaller than the extension length, it remains untouched. If the extension is longer,\n * it is shifted.\n * @default false\n *\n * @example\n * // true\n * app.use(fileUpload({ safeFileNames: true, preserveExtension: true }));\n * // myFileName.ext --> myFileName.ext\n *\n * @example\n * // max extension length 2, extension shifted\n * app.use(fileUpload({ safeFileNames: true, preserveExtension: 2 }));\n * // myFileName.ext --> myFileNamee.xt\n */\n preserveExtension?: boolean | number | undefined\n /**\n * Response which will be send to client if file size limit exceeded when `abortOnLimit` set to `true`.\n * @default 'File size limit has been reached'\n */\n responseOnLimit?: string | undefined\n /**\n * Strips characters from the upload's filename.\n * You can use custom regex to determine what to strip.\n * If set to `true`, non-alphanumeric characters _except_ dashes and underscores will be stripped.\n * This option is off by default.\n * @default false\n *\n * @example\n * // strip slashes from file names\n * app.use(fileUpload({ safeFileNames: /\\\\/g }))\n *\n * @example\n * app.use(fileUpload({ safeFileNames: true }))\n */\n safeFileNames?: boolean | RegExp | undefined\n /**\n * Path to store temporary files.\n * Used along with the `useTempFiles` option. By default this module uses `'tmp'` folder\n * in the current working directory.\n * You can use trailing slash, but it is not necessary.\n * @default './tmp'\n */\n tempFileDir?: string | undefined\n /**\n * This defines how long to wait for data before aborting. Set to `0` if you want to turn off timeout checks.\n * @default 60_000\n */\n uploadTimeout?: number | undefined\n /**\n * Applies uri decoding to file names if set `true`.\n * @default false\n */\n uriDecodeFileNames?: boolean | undefined\n /**\n * By default this module uploads files into RAM.\n * Setting this option to `true` turns on using temporary files instead of utilising RAM.\n * This avoids memory overflow issues when uploading large files or in case of uploading\n * lots of files at same time.\n * @default false\n */\n useTempFiles?: boolean | undefined\n} & Partial<BusboyConfig>\n\nexport type ErrorResult = { data?: any; errors: unknown[]; stack?: string }\n\nexport type AfterErrorResult = {\n graphqlResult?: GraphQLFormattedError\n response?: Partial<ErrorResult> & Record<string, unknown>\n status?: number\n} | void\n\nexport type AfterErrorHookArgs = {\n /** The Collection that the hook is operating on. This will be undefined if the hook is executed from a non-collection endpoint or GraphQL. */\n collection?: SanitizedCollectionConfig\n /** \tCustom context passed between hooks */\n context: RequestContext\n /** The error that occurred. */\n error: Error\n /** The GraphQL result object, available if the hook is executed within a GraphQL context. */\n graphqlResult?: GraphQLFormattedError\n /** The Request object containing the currently authenticated user. */\n req: PayloadRequest\n /** The formatted error result object, available if the hook is executed from a REST context. */\n result?: ErrorResult\n}\n\nexport type AfterErrorHook = (\n args: AfterErrorHookArgs,\n) => AfterErrorResult | Promise<AfterErrorResult>\n\n/**\n * This is the central configuration\n *\n * @see https://payloadcms.com/docs/configuration/overview\n */\nexport type Config = {\n /** Configure admin dashboard */\n admin?: {\n /** Automatically log in as a user */\n autoLogin?:\n | {\n /**\n * The email address of the user to login as\n */\n email?: string\n /** The password of the user to login as. This is only needed if `prefillOnly` is set to true */\n password?: string\n /**\n * If set to true, the login credentials will be prefilled but the user will still need to click the login button.\n *\n * @default false\n */\n prefillOnly?: boolean\n /** The username of the user to login as */\n username?: string\n }\n | false\n\n /** Set account profile picture. Options: gravatar, default or a custom React component. */\n avatar?:\n | 'default'\n | 'gravatar'\n | {\n Component: PayloadComponent<never>\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 * 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 /**\n * Add custom header to top of page globally\n */\n header?: CustomComponent[]\n /** Replace logout related components */\n logout?: {\n /** Replace the logout button */\n Button?: CustomComponent\n }\n /**\n * Replace the navigation with a custom component\n */\n Nav?: CustomComponent\n /**\n * Wrap the admin dashboard in custom context providers\n */\n providers?: PayloadComponent<{ children?: React.ReactNode }, { 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]: AdminViewConfig\n /** Replace the account screen */\n account?: AdminViewConfig\n /** Replace the admin homepage */\n dashboard?: AdminViewConfig\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 /**\n * Each entry in this map generates an entry in the importMap,\n * as well as an entry in the componentMap if the type of the\n * dependency is 'component'\n */\n dependencies?: AdminDependencies\n /** If set to true, the entire Admin panel will be disabled. */\n disable?: boolean\n importMap?: {\n /**\n * Automatically generate component map during development\n * @default true\n */\n autoGenerate?: boolean\n\n /** The base directory for component paths starting with /.\n *\n * By default, this is process.cwd()\n **/\n baseDir?: string\n /**\n * You can use generators to add custom components to the component import map.\n * This allows you to import custom components in the admin panel.\n */\n generators?: Array<\n (props: {\n addToImportMap: AddToImportMap\n baseDir: string\n config: SanitizedConfig\n importMap: InternalImportMap\n imports: Imports\n }) => void\n >\n }\n livePreview?: {\n collections?: string[]\n globals?: string[]\n } & LivePreviewConfig\n /** Base meta data to use for the Admin Panel. Included properties are titleSuffix, ogImage, and favicon. */\n meta?: MetaConfig\n routes?: {\n /** The route for the account page. */\n account?: string\n /** The route for the create first user page. */\n createFirstUser?: string\n /** The route for the forgot password page. */\n forgot?: string\n /** The route the user will be redirected to after being inactive for too long. */\n inactivity?: string\n /** The route for the login page. */\n login?: string\n /** The route for the logout page. */\n logout?: string\n /** The route for the reset password page. */\n reset?: string\n /** The route for the unauthorized page. */\n unauthorized?: string\n }\n /**\n * Restrict the Admin Panel theme to use only one of your choice\n *\n * @default 'all' // The theme can be configured by users\n */\n theme?: 'all' | 'dark' | 'light'\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 * Compatibility flags for prior Payload versions\n */\n compatibility?: {\n /**\n * By default, Payload will remove the `localized: true` property\n * from fields if a parent field is localized. Set this property\n * to `true` only if you have an existing Payload database from pre-3.0\n * that you would like to maintain without migrating. This is only\n * relevant for MongoDB databases.\n */\n allowLocalizedWithinLocalized: true\n }\n /**\n * Prefix a string to all cookies that Payload sets.\n *\n * @default \"payload\"\n */\n cookiePrefix?: string\n /** Either a whitelist array of URLS to allow CORS requests from, or a wildcard string ('*') to accept incoming requests from any domain. */\n cors?: '*' | CORSConfig | string[]\n /** A whitelist array of URLs to allow Payload cookies to be accepted from as a form of CSRF protection. */\n csrf?: string[]\n\n /** Extension point to add your custom data. Server only. */\n custom?: Record<string, any>\n\n /** Pass in a database adapter for use on this project. */\n db: DatabaseAdapterResult\n /** Enable to expose more detailed error information. */\n debug?: boolean\n /**\n * If a user does not specify `depth` while requesting a resource, this depth will be used.\n *\n * @see https://payloadcms.com/docs/getting-started/concepts#depth\n *\n * @default 2\n */\n defaultDepth?: number\n /**\n * The maximum allowed depth to be permitted application-wide. This setting helps prevent against malicious queries.\n *\n * @default 40000\n */\n defaultMaxTextLength?: number\n /** Default richtext editor to use for richText fields */\n editor?: RichTextAdapterProvider<any, any, any>\n /**\n * Email Adapter\n *\n * @see https://payloadcms.com/docs/email/overview\n */\n email?: EmailAdapter | Promise<EmailAdapter>\n /** Custom REST endpoints */\n endpoints?: Endpoint[]\n /**\n * @see https://payloadcms.com/docs/configuration/globals#global-configs\n */\n globals?: GlobalConfig[]\n /**\n * Manage the GraphQL API\n *\n * You can add your own GraphQL queries and mutations to Payload, making use of all the types that Payload has defined for you.\n *\n * @see https://payloadcms.com/docs/graphql/overview\n */\n graphQL?: {\n disable?: boolean\n disablePlaygroundInProduction?: boolean\n maxComplexity?: number\n /**\n * Function that returns an object containing keys to custom GraphQL mutations\n *\n * @see https://payloadcms.com/docs/graphql/extending\n */\n mutations?: GraphQLExtension\n /**\n * Function that returns an object containing keys to custom GraphQL queries\n *\n * @see https://payloadcms.com/docs/graphql/extending\n */\n queries?: GraphQLExtension\n /**\n * Filepath to write the generated schema to\n */\n schemaOutputFile?: string\n }\n /**\n * Tap into Payload-wide hooks.\n *\n * @see https://payloadcms.com/docs/hooks/overview\n */\n hooks?: {\n afterError?: AfterErrorHook[]\n }\n /** i18n config settings */\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\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 * @experimental There may be frequent breaking changes to this API\n */\n jobs?: JobsConfig\n /**\n * Translate your content to different languages/locales.\n *\n * @default false // disable localization\n */\n localization?: false | LocalizationConfig\n\n /**\n * Logger options, logger options with a destination stream, or an instantiated logger instance.\n *\n * See Pino Docs for options: https://getpino.io/#/docs/api?id=options\n *\n * ```ts\n * // Logger options only\n * logger: {\n * level: 'info',\n * }\n *\n * // Logger options with destination stream\n * logger: {\n * options: {\n * level: 'info',\n * },\n * destination: process.stdout\n * },\n *\n * // Logger instance\n * logger: pino({ name: 'my-logger' })\n *\n * ```\n */\n logger?: 'sync' | { destination?: DestinationStream; options: pino.LoggerOptions } | PayloadLogger\n\n /**\n * Override the log level of errors for Payload's error handler or disable logging with `false`.\n * Levels can be any of the following: 'trace', 'debug', 'info', 'warn', 'error', 'fatal' or false.\n *\n * Default levels:\n * {\n `* APIError: 'error',\n `* AuthenticationError: 'error',\n `* ErrorDeletingFile: 'error',\n `* FileRetrievalError: 'error',\n `* FileUploadError: 'error',\n `* Forbidden: 'info',\n `* Locked: 'info',\n `* LockedAuth: 'error',\n `* MissingFile: 'info',\n `* NotFound: 'info',\n `* QueryError: 'error',\n `* ValidationError: 'info',\n * }\n */\n loggingLevels?: Partial<Record<ErrorName, false | Level>>\n\n /**\n * The maximum allowed depth to be permitted application-wide. This setting helps prevent against malicious queries.\n *\n * @see https://payloadcms.com/docs/getting-started/concepts#depth\n *\n * @default 10\n */\n maxDepth?: number\n /** A function that is called immediately following startup that receives the Payload instance as its only argument. */\n onInit?: (payload: Payload) => Promise<void> | void\n /**\n * An array of Payload plugins.\n *\n * @see https://payloadcms.com/docs/plugins/overview\n */\n plugins?: Plugin[]\n /** Control the routing structure that Payload binds itself to. */\n routes?: {\n /** The route for the admin panel.\n * @example \"/my-admin\"\n * @default \"/admin\"\n */\n admin?: string\n /** @default \"/api\" */\n api?: string\n /** @default \"/graphql\" */\n graphQL?: string\n /** @default \"/graphql-playground\" */\n graphQLPlayground?: string\n }\n /** Secure string that Payload will use for any encryption workflows */\n secret: string\n /**\n * Define the absolute URL of your app including the protocol, for example `https://example.org`.\n * No paths allowed, only protocol, domain and (optionally) port.\n *\n * @see https://payloadcms.com/docs/configuration/overview#options\n */\n serverURL?: string\n /**\n * Pass in a local copy of Sharp if you'd like to use it.\n *\n */\n sharp?: SharpDependency\n /** Send anonymous telemetry data about general usage. */\n telemetry?: boolean\n /** Control how typescript interfaces are generated from your collections. */\n typescript?: {\n /**\n * Automatically generate types during development\n * @default true\n */\n autoGenerate?: boolean\n\n /** Disable declare block in generated types file */\n declare?:\n | {\n /**\n * @internal internal use only to allow for multiple declarations within a monorepo and suppress the \"Duplicate identifier GeneratedTypes\" error\n *\n * Adds a @ts-ignore flag above the GeneratedTypes interface declaration\n *\n * @default false\n */\n ignoreTSError?: boolean\n }\n | false\n\n /** Filename to write the generated types to */\n outputFile?: string\n\n /**\n * Allows you to modify the base JSON schema that is generated during generate:types. This JSON schema will be used\n * to generate the TypeScript interfaces.\n */\n schema?: Array<(args: { jsonSchema: JSONSchema4 }) => JSONSchema4>\n }\n /**\n * Customize the handling of incoming file uploads for collections that have uploads enabled.\n */\n upload?: FetchAPIFileUploadOptions\n}\n\nexport type SanitizedConfig = {\n collections: SanitizedCollectionConfig[]\n /** Default richtext editor to use for richText fields */\n editor?: RichTextAdapter<any, any, any>\n endpoints: Endpoint[]\n globals: SanitizedGlobalConfig[]\n i18n: Required<I18nOptions>\n jobs: JobsConfig // Redefine here, as the DeepRequired<Config> can break its type\n localization: false | SanitizedLocalizationConfig\n paths: {\n config: string\n configDir: string\n rawConfig: string\n }\n upload: {\n /**\n * Deduped list of adapters used in the project\n */\n adapters: string[]\n } & FetchAPIFileUploadOptions\n} & Omit<\n // TODO: DeepRequired breaks certain, advanced TypeScript types / certain type information is lost. We should remove it when possible.\n // E.g. in packages/ui/src/graphics/Account/index.tsx in getComponent, if avatar.Component is casted to what it's supposed to be,\n // the result type is different\n DeepRequired<Config>,\n 'collections' | 'editor' | 'endpoint' | 'globals' | 'i18n' | 'localization' | 'upload'\n>\n\nexport type EditConfig = EditConfigWithoutRoot | EditConfigWithRoot\n\nexport type EditConfigWithRoot = {\n api?: never\n default?: never\n livePreview?: never\n /**\n * Replace or modify _all_ nested document views and routes, including the document header, controls, and tabs. This cannot be used in conjunction with other nested views.\n * + `root` - `/admin/collections/:collection/:id/**\\/*`\n */\n root: Partial<EditViewConfig>\n version?: never\n versions?: never\n}\n\nexport type EditConfigWithoutRoot = {\n [key: string]: EditViewConfig\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 * To override the entire Edit View including all nested views, use the `root` key.\n */\n api?: Partial<EditViewConfig>\n default?: Partial<EditViewConfig>\n livePreview?: Partial<EditViewConfig>\n root?: never\n version?: Partial<EditViewConfig>\n versions?: Partial<EditViewConfig>\n}\n\nexport type EntityDescriptionComponent = CustomComponent\n\nexport type EntityDescriptionFunction = ({ t }: { t: TFunction }) => string\n\nexport type EntityDescription = EntityDescriptionFunction | Record<string, string> | string\n\nexport type { EmailAdapter, SendEmailOptions }\n"],"names":["serverProps"],"mappings":"AAuZA,OAAO,MAAMA,cAAqC;IAChD;IACA;IACA;IACA;IACA;IACA;IACA;CACD,CAAA"}
@@ -31,6 +31,11 @@ export type TaskHandlerResults = {
31
31
  };
32
32
  export type RunTaskFunctionArgs<TTaskSlug extends keyof TypedJobs['tasks']> = {
33
33
  input?: TaskInput<TTaskSlug>;
34
+ /**
35
+ * Specify the number of times that this task should be retried if it fails for any reason.
36
+ *
37
+ * @default By default, tasks are not retried and `retries` is `0`.
38
+ */
34
39
  retries?: number | RetryConfig;
35
40
  };
36
41
  export type RunTaskFunction<TTaskSlug extends keyof TypedJobs['tasks']> = (taskID: string, taskArgs?: RunTaskFunctionArgs<TTaskSlug>) => Promise<TaskOutput<TTaskSlug>>;
@@ -39,6 +44,11 @@ export type RunTaskFunctions = {
39
44
  };
40
45
  export type RunInlineTaskFunction = <TTaskInput extends object, TTaskOutput extends object>(taskID: string, taskArgs: {
41
46
  input?: TTaskInput;
47
+ /**
48
+ * Specify the number of times that this task should be retried if it fails for any reason.
49
+ *
50
+ * @default By default, tasks are not retried and `retries` is `0`.
51
+ */
42
52
  retries?: number | RetryConfig;
43
53
  task: (args: {
44
54
  input: TTaskInput;
@@ -124,6 +134,8 @@ export type TaskConfig<TTaskSlugOrInputOutput extends keyof TypedJobs['tasks'] |
124
134
  outputSchema?: Field[];
125
135
  /**
126
136
  * Specify the number of times that this step should be retried if it fails.
137
+ *
138
+ * @default By default, tasks are not retried and `retries` is `0`.
127
139
  */
128
140
  retries?: number | RetryConfig;
129
141
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"taskTypes.d.ts","sourceRoot":"","sources":["../../../../src/queues/config/types/taskTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AACtF,OAAO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AA;KAAE,CAAC,CAAA;CACrE,KACE,OAAO,CAAC,WAAW,CAAC,CAAA;AAEzB,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,MAAM,CAAA;IAChB;;;;OAIG;IACH,OAAO,CAAC,EAAE;QACR;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAA;QACd;;;;;;;;;;;;;;;;;;;;;WAqBG;QACH,IAAI,EAAE,aAAa,GAAG,OAAO,CAAA;KAC9B,CAAA;CACF,CAAA;AAED,MAAM,MAAM,UAAU,CACpB,sBAAsB,SAAS,MAAM,SAAS,CAAC,OAAO,CAAC,GAAG,eAAe,GAAG,QAAQ,IAClF;IACF;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,GAAG,WAAW,CAAC,sBAAsB,CAAC,CAAA;IACrD;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,EAAE,CAAA;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;IACnC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;IACtC;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,EAAE,CAAA;IACtB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAA;IAC9B;;OAEG;IACH,IAAI,EAAE,sBAAsB,SAAS,MAAM,SAAS,CAAC,OAAO,CAAC,GAAG,sBAAsB,GAAG,MAAM,CAAA;CAChG,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/queues/config/types/taskTypes.ts"],"sourcesContent":["import type { Field, PayloadRequest, StringKeyOf, TypedJobs } from '../../../index.js'\nimport type { RunningJob, RunningJobSimple } from './workflowTypes.js'\n\nexport type TaskInputOutput = {\n input: object\n output: object\n}\nexport type TaskHandlerResult<\n TTaskSlugOrInputOutput extends keyof TypedJobs['tasks'] | TaskInputOutput,\n> = {\n output: TTaskSlugOrInputOutput extends keyof TypedJobs['tasks']\n ? TypedJobs['tasks'][TTaskSlugOrInputOutput]['output']\n : TTaskSlugOrInputOutput extends TaskInputOutput // Check if it's actually TaskInputOutput type\n ? TTaskSlugOrInputOutput['output']\n : never\n state?: 'failed' | 'succeeded'\n}\n\nexport type TaskHandlerArgs<\n TTaskSlugOrInputOutput extends keyof TypedJobs['tasks'] | TaskInputOutput,\n TWorkflowSlug extends keyof TypedJobs['workflows'] = string,\n> = {\n input: TTaskSlugOrInputOutput extends keyof TypedJobs['tasks']\n ? TypedJobs['tasks'][TTaskSlugOrInputOutput]['input']\n : TTaskSlugOrInputOutput extends TaskInputOutput // Check if it's actually TaskInputOutput type\n ? TTaskSlugOrInputOutput['input']\n : never\n job: RunningJob<TWorkflowSlug>\n req: PayloadRequest\n}\n\n/**\n * Inline tasks in JSON workflows have no input, as they can just get the input from job.taskStatus\n */\nexport type TaskHandlerArgsNoInput<TWorkflowInput extends object> = {\n job: RunningJobSimple<TWorkflowInput>\n req: PayloadRequest\n}\n\nexport type TaskHandler<\n TTaskSlugOrInputOutput extends keyof TypedJobs['tasks'] | TaskInputOutput,\n TWorkflowSlug extends keyof TypedJobs['workflows'] = string,\n> = (\n args: TaskHandlerArgs<TTaskSlugOrInputOutput, TWorkflowSlug>,\n) => Promise<TaskHandlerResult<TTaskSlugOrInputOutput>> | TaskHandlerResult<TTaskSlugOrInputOutput>\n\nexport type TaskType = StringKeyOf<TypedJobs['tasks']>\n\n// Extracts the type of `input` corresponding to each task\nexport type TaskInput<T extends keyof TypedJobs['tasks']> = TypedJobs['tasks'][T]['input']\n\nexport type TaskOutput<T extends keyof TypedJobs['tasks']> = TypedJobs['tasks'][T]['output']\n\nexport type TaskHandlerResults = {\n [TTaskSlug in keyof TypedJobs['tasks']]: {\n [id: string]: TaskHandlerResult<TTaskSlug>\n }\n}\n\n// Helper type to create correct argument type for the function corresponding to each task.\nexport type RunTaskFunctionArgs<TTaskSlug extends keyof TypedJobs['tasks']> = {\n input?: TaskInput<TTaskSlug>\n retries?: number | RetryConfig\n}\n\nexport type RunTaskFunction<TTaskSlug extends keyof TypedJobs['tasks']> = (\n taskID: string,\n taskArgs?: RunTaskFunctionArgs<TTaskSlug>,\n) => Promise<TaskOutput<TTaskSlug>>\n\nexport type RunTaskFunctions = {\n [TTaskSlug in keyof TypedJobs['tasks']]: RunTaskFunction<TTaskSlug>\n}\n\nexport type RunInlineTaskFunction = <TTaskInput extends object, TTaskOutput extends object>(\n taskID: string,\n taskArgs: {\n input?: TTaskInput\n retries?: number | RetryConfig\n // This is the same as TaskHandler, but typed out explicitly in order to improve type inference\n task: (args: { input: TTaskInput; job: RunningJob<any>; req: PayloadRequest }) =>\n | {\n output: TTaskOutput\n state?: 'failed' | 'succeeded'\n }\n | Promise<{ output: TTaskOutput; state?: 'failed' | 'succeeded' }>\n },\n) => Promise<TTaskOutput>\n\nexport type RetryConfig = {\n attempts: number\n /**\n * The backoff strategy to use when retrying the task. This determines how long to wait before retrying the task.\n *\n * If this is set on a single task, the longest backoff time of a task will determine the time until the entire workflow is retried.\n */\n backoff?: {\n /**\n * Base delay between running jobs in ms\n */\n delay?: number\n /**\n * @default fixed\n *\n * The backoff strategy to use when retrying the task. This determines how long to wait before retrying the task.\n * If fixed (default) is used, the delay will be the same between each retry.\n *\n * If exponential is used, the delay will increase exponentially with each retry.\n *\n * @example\n * delay = 1000\n * attempts = 3\n * type = 'fixed'\n *\n * The task will be retried 3 times with a delay of 1000ms between each retry.\n *\n * @example\n * delay = 1000\n * attempts = 3\n * type = 'exponential'\n *\n * The task will be retried 3 times with a delay of 1000ms, 2000ms, and 4000ms between each retry.\n */\n type: 'exponential' | 'fixed'\n }\n}\n\nexport type TaskConfig<\n TTaskSlugOrInputOutput extends keyof TypedJobs['tasks'] | TaskInputOutput = TaskType,\n> = {\n /**\n * The function that should be responsible for running the job.\n * You can either pass a string-based path to the job function file, or the job function itself.\n *\n * If you are using large dependencies within your job, you might prefer to pass the string path\n * because that will avoid bundling large dependencies in your Next.js app.\n */\n handler: string | TaskHandler<TTaskSlugOrInputOutput>\n /**\n * Define the input field schema - payload will generate a type for this schema.\n */\n inputSchema?: Field[]\n /**\n * You can use interfaceName to change the name of the interface that is generated for this task. By default, this is \"Task\" + the capitalized task slug.\n */\n interfaceName?: string\n /**\n * Define a human-friendly label for this task.\n */\n label?: string\n /**\n * Function to be executed if the task fails.\n */\n onFail?: () => Promise<void> | void\n /**\n * Function to be executed if the task succeeds.\n */\n onSuccess?: () => Promise<void> | void\n /**\n * Define the output field schema - payload will generate a type for this schema.\n */\n outputSchema?: Field[]\n /**\n * Specify the number of times that this step should be retried if it fails.\n */\n retries?: number | RetryConfig\n /**\n * Define a slug-based name for this job. This slug needs to be unique among both tasks and workflows.\n */\n slug: TTaskSlugOrInputOutput extends keyof TypedJobs['tasks'] ? TTaskSlugOrInputOutput : string\n}\n"],"names":[],"mappings":"AA+HA,WA2CC"}
1
+ {"version":3,"sources":["../../../../src/queues/config/types/taskTypes.ts"],"sourcesContent":["import type { Field, PayloadRequest, StringKeyOf, TypedJobs } from '../../../index.js'\nimport type { RunningJob, RunningJobSimple } from './workflowTypes.js'\n\nexport type TaskInputOutput = {\n input: object\n output: object\n}\nexport type TaskHandlerResult<\n TTaskSlugOrInputOutput extends keyof TypedJobs['tasks'] | TaskInputOutput,\n> = {\n output: TTaskSlugOrInputOutput extends keyof TypedJobs['tasks']\n ? TypedJobs['tasks'][TTaskSlugOrInputOutput]['output']\n : TTaskSlugOrInputOutput extends TaskInputOutput // Check if it's actually TaskInputOutput type\n ? TTaskSlugOrInputOutput['output']\n : never\n state?: 'failed' | 'succeeded'\n}\n\nexport type TaskHandlerArgs<\n TTaskSlugOrInputOutput extends keyof TypedJobs['tasks'] | TaskInputOutput,\n TWorkflowSlug extends keyof TypedJobs['workflows'] = string,\n> = {\n input: TTaskSlugOrInputOutput extends keyof TypedJobs['tasks']\n ? TypedJobs['tasks'][TTaskSlugOrInputOutput]['input']\n : TTaskSlugOrInputOutput extends TaskInputOutput // Check if it's actually TaskInputOutput type\n ? TTaskSlugOrInputOutput['input']\n : never\n job: RunningJob<TWorkflowSlug>\n req: PayloadRequest\n}\n\n/**\n * Inline tasks in JSON workflows have no input, as they can just get the input from job.taskStatus\n */\nexport type TaskHandlerArgsNoInput<TWorkflowInput extends object> = {\n job: RunningJobSimple<TWorkflowInput>\n req: PayloadRequest\n}\n\nexport type TaskHandler<\n TTaskSlugOrInputOutput extends keyof TypedJobs['tasks'] | TaskInputOutput,\n TWorkflowSlug extends keyof TypedJobs['workflows'] = string,\n> = (\n args: TaskHandlerArgs<TTaskSlugOrInputOutput, TWorkflowSlug>,\n) => Promise<TaskHandlerResult<TTaskSlugOrInputOutput>> | TaskHandlerResult<TTaskSlugOrInputOutput>\n\nexport type TaskType = StringKeyOf<TypedJobs['tasks']>\n\n// Extracts the type of `input` corresponding to each task\nexport type TaskInput<T extends keyof TypedJobs['tasks']> = TypedJobs['tasks'][T]['input']\n\nexport type TaskOutput<T extends keyof TypedJobs['tasks']> = TypedJobs['tasks'][T]['output']\n\nexport type TaskHandlerResults = {\n [TTaskSlug in keyof TypedJobs['tasks']]: {\n [id: string]: TaskHandlerResult<TTaskSlug>\n }\n}\n\n// Helper type to create correct argument type for the function corresponding to each task.\nexport type RunTaskFunctionArgs<TTaskSlug extends keyof TypedJobs['tasks']> = {\n input?: TaskInput<TTaskSlug>\n /**\n * Specify the number of times that this task should be retried if it fails for any reason.\n *\n * @default By default, tasks are not retried and `retries` is `0`.\n */\n retries?: number | RetryConfig\n}\n\nexport type RunTaskFunction<TTaskSlug extends keyof TypedJobs['tasks']> = (\n taskID: string,\n taskArgs?: RunTaskFunctionArgs<TTaskSlug>,\n) => Promise<TaskOutput<TTaskSlug>>\n\nexport type RunTaskFunctions = {\n [TTaskSlug in keyof TypedJobs['tasks']]: RunTaskFunction<TTaskSlug>\n}\n\nexport type RunInlineTaskFunction = <TTaskInput extends object, TTaskOutput extends object>(\n taskID: string,\n taskArgs: {\n input?: TTaskInput\n /**\n * Specify the number of times that this task should be retried if it fails for any reason.\n *\n * @default By default, tasks are not retried and `retries` is `0`.\n */\n retries?: number | RetryConfig\n // This is the same as TaskHandler, but typed out explicitly in order to improve type inference\n task: (args: { input: TTaskInput; job: RunningJob<any>; req: PayloadRequest }) =>\n | {\n output: TTaskOutput\n state?: 'failed' | 'succeeded'\n }\n | Promise<{ output: TTaskOutput; state?: 'failed' | 'succeeded' }>\n },\n) => Promise<TTaskOutput>\n\nexport type RetryConfig = {\n attempts: number\n /**\n * The backoff strategy to use when retrying the task. This determines how long to wait before retrying the task.\n *\n * If this is set on a single task, the longest backoff time of a task will determine the time until the entire workflow is retried.\n */\n backoff?: {\n /**\n * Base delay between running jobs in ms\n */\n delay?: number\n /**\n * @default fixed\n *\n * The backoff strategy to use when retrying the task. This determines how long to wait before retrying the task.\n * If fixed (default) is used, the delay will be the same between each retry.\n *\n * If exponential is used, the delay will increase exponentially with each retry.\n *\n * @example\n * delay = 1000\n * attempts = 3\n * type = 'fixed'\n *\n * The task will be retried 3 times with a delay of 1000ms between each retry.\n *\n * @example\n * delay = 1000\n * attempts = 3\n * type = 'exponential'\n *\n * The task will be retried 3 times with a delay of 1000ms, 2000ms, and 4000ms between each retry.\n */\n type: 'exponential' | 'fixed'\n }\n}\n\nexport type TaskConfig<\n TTaskSlugOrInputOutput extends keyof TypedJobs['tasks'] | TaskInputOutput = TaskType,\n> = {\n /**\n * The function that should be responsible for running the job.\n * You can either pass a string-based path to the job function file, or the job function itself.\n *\n * If you are using large dependencies within your job, you might prefer to pass the string path\n * because that will avoid bundling large dependencies in your Next.js app.\n */\n handler: string | TaskHandler<TTaskSlugOrInputOutput>\n /**\n * Define the input field schema - payload will generate a type for this schema.\n */\n inputSchema?: Field[]\n /**\n * You can use interfaceName to change the name of the interface that is generated for this task. By default, this is \"Task\" + the capitalized task slug.\n */\n interfaceName?: string\n /**\n * Define a human-friendly label for this task.\n */\n label?: string\n /**\n * Function to be executed if the task fails.\n */\n onFail?: () => Promise<void> | void\n /**\n * Function to be executed if the task succeeds.\n */\n onSuccess?: () => Promise<void> | void\n /**\n * Define the output field schema - payload will generate a type for this schema.\n */\n outputSchema?: Field[]\n /**\n * Specify the number of times that this step should be retried if it fails.\n *\n * @default By default, tasks are not retried and `retries` is `0`.\n */\n retries?: number | RetryConfig\n /**\n * Define a slug-based name for this job. This slug needs to be unique among both tasks and workflows.\n */\n slug: TTaskSlugOrInputOutput extends keyof TypedJobs['tasks'] ? TTaskSlugOrInputOutput : string\n}\n"],"names":[],"mappings":"AAyIA,WA6CC"}
@@ -12,6 +12,11 @@ export type WorkflowStep<TTaskSlug extends keyof TypedJobs['tasks'], TWorkflowSl
12
12
  * Each task needs to have a unique ID to track its status
13
13
  */
14
14
  id: string;
15
+ /**
16
+ * Specify the number of times that this workflow should be retried if it fails for any reason.
17
+ *
18
+ * @default By default, workflows are not retried and `retries` is `0`.
19
+ */
15
20
  retries?: number | RetryConfig;
16
21
  } & ({
17
22
  inlineTask?: (args: TaskHandlerArgsNoInput<TypedJobs['workflows'][TWorkflowSlug]['input']>) => Promise<TaskHandlerResult<TTaskSlug>> | TaskHandlerResult<TTaskSlug>;
@@ -1 +1 @@
1
- {"version":3,"file":"workflowJSONTypes.d.ts","sourceRoot":"","sources":["../../../../src/queues/config/types/workflowJSONTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AACjF,OAAO,KAAK,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAEzE,MAAM,MAAM,YAAY,CACtB,SAAS,SAAS,MAAM,SAAS,CAAC,OAAO,CAAC,EAC1C,aAAa,SAAS,MAAM,SAAS,CAAC,WAAW,CAAC,IAChD;IACF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aAAa,CAAC,CAChC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/queues/config/types/workflowJSONTypes.ts"],"sourcesContent":["import type { RunningJob, TaskHandlerResult, TypedJobs } from '../../../index.js'\nimport type { RetryConfig, TaskHandlerArgsNoInput } from './taskTypes.js'\n\nexport type WorkflowStep<\n TTaskSlug extends keyof TypedJobs['tasks'],\n TWorkflowSlug extends keyof TypedJobs['workflows'],\n> = {\n /**\n * If this step is completed, the workflow will be marked as completed\n */\n completesJob?: boolean\n condition?: (args: { job: RunningJob<TWorkflowSlug> }) => boolean\n /**\n * Each task needs to have a unique ID to track its status\n */\n id: string\n retries?: number | RetryConfig\n} & (\n | {\n inlineTask?: (\n args: TaskHandlerArgsNoInput<TypedJobs['workflows'][TWorkflowSlug]['input']>,\n ) => Promise<TaskHandlerResult<TTaskSlug>> | TaskHandlerResult<TTaskSlug>\n }\n | {\n input: (args: { job: RunningJob<TWorkflowSlug> }) => TypedJobs['tasks'][TTaskSlug]['input']\n task: TTaskSlug\n }\n)\n\ntype AllWorkflowSteps<TWorkflowSlug extends keyof TypedJobs['workflows']> = {\n [TTaskSlug in keyof TypedJobs['tasks']]: WorkflowStep<TTaskSlug, TWorkflowSlug>\n}[keyof TypedJobs['tasks']]\n\nexport type WorkflowJSON<TWorkflowSlug extends keyof TypedJobs['workflows']> = Array<\n AllWorkflowSteps<TWorkflowSlug>\n>\n"],"names":[],"mappings":"AAiCA,WAEC"}
1
+ {"version":3,"sources":["../../../../src/queues/config/types/workflowJSONTypes.ts"],"sourcesContent":["import type { RunningJob, TaskHandlerResult, TypedJobs } from '../../../index.js'\nimport type { RetryConfig, TaskHandlerArgsNoInput } from './taskTypes.js'\n\nexport type WorkflowStep<\n TTaskSlug extends keyof TypedJobs['tasks'],\n TWorkflowSlug extends keyof TypedJobs['workflows'],\n> = {\n /**\n * If this step is completed, the workflow will be marked as completed\n */\n completesJob?: boolean\n condition?: (args: { job: RunningJob<TWorkflowSlug> }) => boolean\n /**\n * Each task needs to have a unique ID to track its status\n */\n id: string\n /**\n * Specify the number of times that this workflow should be retried if it fails for any reason.\n *\n * @default By default, workflows are not retried and `retries` is `0`.\n */\n retries?: number | RetryConfig\n} & (\n | {\n inlineTask?: (\n args: TaskHandlerArgsNoInput<TypedJobs['workflows'][TWorkflowSlug]['input']>,\n ) => Promise<TaskHandlerResult<TTaskSlug>> | TaskHandlerResult<TTaskSlug>\n }\n | {\n input: (args: { job: RunningJob<TWorkflowSlug> }) => TypedJobs['tasks'][TTaskSlug]['input']\n task: TTaskSlug\n }\n)\n\ntype AllWorkflowSteps<TWorkflowSlug extends keyof TypedJobs['workflows']> = {\n [TTaskSlug in keyof TypedJobs['tasks']]: WorkflowStep<TTaskSlug, TWorkflowSlug>\n}[keyof TypedJobs['tasks']]\n\nexport type WorkflowJSON<TWorkflowSlug extends keyof TypedJobs['workflows']> = Array<\n AllWorkflowSteps<TWorkflowSlug>\n>\n"],"names":[],"mappings":"AAsCA,WAEC"}
@@ -89,6 +89,8 @@ export type WorkflowConfig<TWorkflowSlugOrInput extends keyof TypedJobs['workflo
89
89
  queue?: string;
90
90
  /**
91
91
  * Specify the number of times that this workflow should be retried if it fails for any reason.
92
+ *
93
+ * @default By default, workflows are not retried and `retries` is `0`.
92
94
  */
93
95
  retries?: number | RetryConfig;
94
96
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"workflowTypes.d.ts","sourceRoot":"","sources":["../../../../src/queues/config/types/workflowTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAA;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAChG,OAAO,KAAK,EACV,WAAW,EACX,qBAAqB,EACrB,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,QAAQ,EACT,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAE,YAAY,EA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F;;;;;;;OAOG;IACH,OAAO,EACH,MAAM,GACN,eAAe,CAAC,oBAAoB,CAAC,GACrC,YAAY,CAAC,oBAAoB,SAAS,MAAM,GAAG,MAAM,GAAG,oBAAoB,CAAC,CAAA;IACrF;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,EAAE,CAAA;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAA;IAC9B;;OAEG;IACH,IAAI,EAAE,oBAAoB,SAAS,MAAM,SAAS,CAAC,WAAW,CAAC,GAAG,oBAAoB,GAAG,MAAM,CAAA;CAChG,CAAA"}
1
+ {"version":3,"file":"workflowTypes.d.ts","sourceRoot":"","sources":["../../../../src/queues/config/types/workflowTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAA;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAChG,OAAO,KAAK,EACV,WAAW,EACX,qBAAqB,EACrB,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,QAAQ,EACT,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAE1D,MAAM,MAAM,MAAM,GAAG;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,GAAG,CAAA;IACX,MAAM,CAAC,EAAE,GAAG,CAAA;IACZ,KAAK,EAAE,QAAQ,GAAG,WAAW,CAAA;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MA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AAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAA;IAC9B;;OAEG;IACH,IAAI,EAAE,oBAAoB,SAAS,MAAM,SAAS,CAAC,WAAW,CAAC,GAAG,oBAAoB,GAAG,MAAM,CAAA;CAChG,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/queues/config/types/workflowTypes.ts"],"sourcesContent":["import type { Field } from '../../../fields/config/types.js'\nimport type { PayloadRequest, StringKeyOf, TypedCollection, TypedJobs } from '../../../index.js'\nimport type {\n RetryConfig,\n RunInlineTaskFunction,\n RunTaskFunctions,\n TaskInput,\n TaskOutput,\n TaskType,\n} from './taskTypes.js'\nimport type { WorkflowJSON } from './workflowJSONTypes.js'\n\nexport type JobLog = {\n completedAt: string\n error?: unknown\n executedAt: string\n input?: any\n output?: any\n state: 'failed' | 'succeeded'\n taskID: string\n taskSlug: string\n}\n\nexport type BaseJob = {\n completedAt?: string\n error?: unknown\n hasError?: boolean\n id: number | string\n input?: any\n log: JobLog[]\n processing?: boolean\n queue: string\n taskSlug?: string\n taskStatus?: JobTaskStatus\n totalTried: number\n waitUntil?: string\n workflowSlug?: string\n}\n\nexport type WorkflowTypes = StringKeyOf<TypedJobs['workflows']>\n\n// TODO: Type job.taskStatus once available - for JSON-defined workflows\nexport type RunningJob<TWorkflowSlugOrInput extends keyof TypedJobs['workflows'] | object> = {\n input: TWorkflowSlugOrInput extends keyof TypedJobs['workflows']\n ? TypedJobs['workflows'][TWorkflowSlugOrInput]['input']\n : TWorkflowSlugOrInput\n taskStatus: JobTaskStatus\n} & Omit<TypedCollection['payload-jobs'], 'input' | 'taskStatus'>\n\nexport type RunningJobSimple<TWorkflowInput extends object> = {\n input: TWorkflowInput\n} & TypedCollection['payload-jobs']\n\n// Simplified version of RunningJob that doesn't break TypeScript (TypeScript seems to stop evaluating RunningJob when it's too complex)\nexport type RunningJobFromTask<TTaskSlug extends keyof TypedJobs['tasks']> = {\n input: TypedJobs['tasks'][TTaskSlug]['input']\n} & TypedCollection['payload-jobs']\n\nexport type WorkflowHandler<TWorkflowSlugOrInput extends keyof TypedJobs['workflows'] | object> =\n (args: {\n inlineTask: RunInlineTaskFunction\n job: RunningJob<TWorkflowSlugOrInput>\n req: PayloadRequest\n tasks: RunTaskFunctions\n }) => Promise<void>\n\nexport type SingleTaskStatus<T extends keyof TypedJobs['tasks']> = {\n complete: boolean\n input: TaskInput<T>\n output: TaskOutput<T>\n taskSlug: TaskType\n totalTried: number\n}\n\n/**\n * Task IDs mapped to their status\n */\nexport type JobTaskStatus = {\n // Wrap in taskSlug to improve typing\n [taskSlug in TaskType]: {\n [taskID: string]: SingleTaskStatus<taskSlug>\n }\n}\n\nexport type WorkflowConfig<TWorkflowSlugOrInput extends keyof TypedJobs['workflows'] | object> = {\n /**\n * You can either pass a string-based path to the workflow function file, or the workflow function itself.\n *\n * If you are using large dependencies within your workflow control flow, you might prefer to pass the string path\n * because that will avoid bundling large dependencies in your Next.js app.\n *\n *\n */\n handler:\n | string\n | WorkflowHandler<TWorkflowSlugOrInput>\n | WorkflowJSON<TWorkflowSlugOrInput extends object ? string : TWorkflowSlugOrInput>\n /**\n * Define the input field schema - payload will generate a type for this schema.\n */\n inputSchema?: Field[]\n /**\n * You can use interfaceName to change the name of the interface that is generated for this workflow. By default, this is \"Workflow\" + the capitalized workflow slug.\n */\n interfaceName?: string\n /**\n * Define a human-friendly label for this workflow.\n */\n label?: string\n /**\n * Optionally, define the default queue name that this workflow should be tied to.\n * Defaults to \"default\".\n * Can be overridden when queuing jobs via Local API.\n */\n queue?: string\n /**\n * Specify the number of times that this workflow should be retried if it fails for any reason.\n */\n retries?: number | RetryConfig\n /**\n * Define a slug-based name for this job.\n */\n slug: TWorkflowSlugOrInput extends keyof TypedJobs['workflows'] ? TWorkflowSlugOrInput : string\n}\n\ntype AllWorkflowConfigs = {\n [TWorkflowSlug in keyof TypedJobs['workflows']]: WorkflowConfig<TWorkflowSlug>\n}[keyof TypedJobs['workflows']]\n"],"names":[],"mappings":"AAoFA,WAuCC"}
1
+ {"version":3,"sources":["../../../../src/queues/config/types/workflowTypes.ts"],"sourcesContent":["import type { Field } from '../../../fields/config/types.js'\nimport type { PayloadRequest, StringKeyOf, TypedCollection, TypedJobs } from '../../../index.js'\nimport type {\n RetryConfig,\n RunInlineTaskFunction,\n RunTaskFunctions,\n TaskInput,\n TaskOutput,\n TaskType,\n} from './taskTypes.js'\nimport type { WorkflowJSON } from './workflowJSONTypes.js'\n\nexport type JobLog = {\n completedAt: string\n error?: unknown\n executedAt: string\n input?: any\n output?: any\n state: 'failed' | 'succeeded'\n taskID: string\n taskSlug: string\n}\n\nexport type BaseJob = {\n completedAt?: string\n error?: unknown\n hasError?: boolean\n id: number | string\n input?: any\n log: JobLog[]\n processing?: boolean\n queue: string\n taskSlug?: string\n taskStatus?: JobTaskStatus\n totalTried: number\n waitUntil?: string\n workflowSlug?: string\n}\n\nexport type WorkflowTypes = StringKeyOf<TypedJobs['workflows']>\n\n// TODO: Type job.taskStatus once available - for JSON-defined workflows\nexport type RunningJob<TWorkflowSlugOrInput extends keyof TypedJobs['workflows'] | object> = {\n input: TWorkflowSlugOrInput extends keyof TypedJobs['workflows']\n ? TypedJobs['workflows'][TWorkflowSlugOrInput]['input']\n : TWorkflowSlugOrInput\n taskStatus: JobTaskStatus\n} & Omit<TypedCollection['payload-jobs'], 'input' | 'taskStatus'>\n\nexport type RunningJobSimple<TWorkflowInput extends object> = {\n input: TWorkflowInput\n} & TypedCollection['payload-jobs']\n\n// Simplified version of RunningJob that doesn't break TypeScript (TypeScript seems to stop evaluating RunningJob when it's too complex)\nexport type RunningJobFromTask<TTaskSlug extends keyof TypedJobs['tasks']> = {\n input: TypedJobs['tasks'][TTaskSlug]['input']\n} & TypedCollection['payload-jobs']\n\nexport type WorkflowHandler<TWorkflowSlugOrInput extends keyof TypedJobs['workflows'] | object> =\n (args: {\n inlineTask: RunInlineTaskFunction\n job: RunningJob<TWorkflowSlugOrInput>\n req: PayloadRequest\n tasks: RunTaskFunctions\n }) => Promise<void>\n\nexport type SingleTaskStatus<T extends keyof TypedJobs['tasks']> = {\n complete: boolean\n input: TaskInput<T>\n output: TaskOutput<T>\n taskSlug: TaskType\n totalTried: number\n}\n\n/**\n * Task IDs mapped to their status\n */\nexport type JobTaskStatus = {\n // Wrap in taskSlug to improve typing\n [taskSlug in TaskType]: {\n [taskID: string]: SingleTaskStatus<taskSlug>\n }\n}\n\nexport type WorkflowConfig<TWorkflowSlugOrInput extends keyof TypedJobs['workflows'] | object> = {\n /**\n * You can either pass a string-based path to the workflow function file, or the workflow function itself.\n *\n * If you are using large dependencies within your workflow control flow, you might prefer to pass the string path\n * because that will avoid bundling large dependencies in your Next.js app.\n *\n *\n */\n handler:\n | string\n | WorkflowHandler<TWorkflowSlugOrInput>\n | WorkflowJSON<TWorkflowSlugOrInput extends object ? string : TWorkflowSlugOrInput>\n /**\n * Define the input field schema - payload will generate a type for this schema.\n */\n inputSchema?: Field[]\n /**\n * You can use interfaceName to change the name of the interface that is generated for this workflow. By default, this is \"Workflow\" + the capitalized workflow slug.\n */\n interfaceName?: string\n /**\n * Define a human-friendly label for this workflow.\n */\n label?: string\n /**\n * Optionally, define the default queue name that this workflow should be tied to.\n * Defaults to \"default\".\n * Can be overridden when queuing jobs via Local API.\n */\n queue?: string\n /**\n * Specify the number of times that this workflow should be retried if it fails for any reason.\n *\n * @default By default, workflows are not retried and `retries` is `0`.\n */\n retries?: number | RetryConfig\n /**\n * Define a slug-based name for this job.\n */\n slug: TWorkflowSlugOrInput extends keyof TypedJobs['workflows'] ? TWorkflowSlugOrInput : string\n}\n\ntype AllWorkflowConfigs = {\n [TWorkflowSlug in keyof TypedJobs['workflows']]: WorkflowConfig<TWorkflowSlug>\n}[keyof TypedJobs['workflows']]\n"],"names":[],"mappings":"AAoFA,WAyCC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/queues/operations/runJobs/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAS,MAAM,yBAAyB,CAAA;AAQpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AASrD,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,cAAc,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;IACxC;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;OAEG;IACH,wBAAwB,EAAE,MAAM,CAAA;CACjC,CAAA;AAED,eAAO,MAAM,OAAO,2CAKjB,WAAW,KAAG,OAAO,CAAC,aAAa,CAsNrC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/queues/operations/runJobs/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAS,MAAM,yBAAyB,CAAA;AAQpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AASrD,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,cAAc,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;IACxC;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;OAEG;IACH,wBAAwB,EAAE,MAAM,CAAA;CACjC,CAAA;AAED,eAAO,MAAM,OAAO,2CAKjB,WAAW,KAAG,OAAO,CAAC,aAAa,CAuNrC,CAAA"}
@@ -118,7 +118,8 @@ export const runJobs = async ({ limit = 10, overrideAccess, queue, req })=>{
118
118
  } else {
119
119
  workflowHandler = await importHandlerPath(workflowConfig.handler);
120
120
  if (!workflowHandler) {
121
- const errorMessage = `Can't find runner while importing with the path ${workflowConfig.handler} in job type ${job.workflowSlug}.`;
121
+ const jobLabel = job.workflowSlug || `Task: ${job.taskSlug}`;
122
+ const errorMessage = `Can't find runner while importing with the path ${workflowConfig.handler} in job type ${jobLabel}.`;
122
123
  req.payload.logger.error(errorMessage);
123
124
  await updateJob({
124
125
  error: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/queues/operations/runJobs/index.ts"],"sourcesContent":["import type { PaginatedDocs } from '../../../database/types.js'\nimport type { PayloadRequest, Where } from '../../../types/index.js'\nimport type { WorkflowJSON } from '../../config/types/workflowJSONTypes.js'\nimport type {\n BaseJob,\n WorkflowConfig,\n WorkflowHandler,\n WorkflowTypes,\n} from '../../config/types/workflowTypes.js'\nimport type { RunJobResult } from './runJob/index.js'\n\nimport { Forbidden } from '../../../errors/Forbidden.js'\nimport isolateObjectProperty from '../../../utilities/isolateObjectProperty.js'\nimport { getUpdateJobFunction } from './runJob/getUpdateJobFunction.js'\nimport { importHandlerPath } from './runJob/importHandlerPath.js'\nimport { runJob } from './runJob/index.js'\nimport { runJSONJob } from './runJSONJob/index.js'\n\nexport type RunJobsArgs = {\n limit?: number\n overrideAccess?: boolean\n queue?: string\n req: PayloadRequest\n}\n\nexport type RunJobsResult = {\n jobStatus?: Record<string, RunJobResult>\n /**\n * If this is false, there for sure are no jobs remaining, regardless of the limit\n */\n noJobsRemaining?: boolean\n /**\n * Out of the jobs that were queried & processed (within the set limit), how many are remaining and retryable?\n */\n remainingJobsFromQueried: number\n}\n\nexport const runJobs = async ({\n limit = 10,\n overrideAccess,\n queue,\n req,\n}: RunJobsArgs): Promise<RunJobsResult> => {\n if (!overrideAccess) {\n const hasAccess = await req.payload.config.jobs.access.run({ req })\n if (!hasAccess) {\n throw new Forbidden(req.t)\n }\n }\n const where: Where = {\n and: [\n {\n completedAt: {\n exists: false,\n },\n },\n {\n hasError: {\n not_equals: true,\n },\n },\n {\n processing: {\n equals: false,\n },\n },\n {\n or: [\n {\n waitUntil: {\n exists: false,\n },\n },\n {\n waitUntil: {\n less_than: new Date().toISOString(),\n },\n },\n ],\n },\n ],\n }\n\n if (queue) {\n where.and.push({\n queue: {\n equals: queue,\n },\n })\n }\n\n // Find all jobs and ensure we set job to processing: true as early as possible to reduce the chance of\n // the same job being picked up by another worker\n const jobsQuery = (await req.payload.update({\n collection: 'payload-jobs',\n data: {\n processing: true,\n seenByWorker: true,\n },\n depth: req.payload.config.jobs.depth,\n disableTransaction: true,\n limit,\n showHiddenFields: true,\n where,\n })) as unknown as PaginatedDocs<BaseJob>\n\n /**\n * Just for logging purposes, we want to know how many jobs are new and how many are existing (= already been tried).\n * This is only for logs - in the end we still want to run all jobs, regardless of whether they are new or existing.\n */\n const { newJobs } = jobsQuery.docs.reduce(\n (acc, job) => {\n if (job.totalTried > 0) {\n acc.existingJobs.push(job)\n } else {\n acc.newJobs.push(job)\n }\n return acc\n },\n { existingJobs: [], newJobs: [] },\n )\n\n if (!jobsQuery.docs.length) {\n return {\n noJobsRemaining: true,\n remainingJobsFromQueried: 0,\n }\n }\n\n if (jobsQuery?.docs?.length) {\n req.payload.logger.info(`Running ${jobsQuery.docs.length} jobs.`)\n }\n const jobsToDelete: (number | string)[] | undefined = req.payload.config.jobs.deleteJobOnComplete\n ? []\n : undefined\n\n const jobPromises = jobsQuery.docs.map(async (job) => {\n if (!job.workflowSlug && !job.taskSlug) {\n throw new Error('Job must have either a workflowSlug or a taskSlug')\n }\n const jobReq = isolateObjectProperty(req, 'transactionID')\n\n const workflowConfig: WorkflowConfig<WorkflowTypes> = job.workflowSlug\n ? req.payload.config.jobs?.workflows.find(({ slug }) => slug === job.workflowSlug)\n : {\n slug: 'singleTask',\n handler: async ({ job, tasks }) => {\n await tasks[job.taskSlug as string]('1', {\n input: job.input,\n })\n },\n }\n\n if (!workflowConfig) {\n return null // Skip jobs with no workflow configuration\n }\n\n const updateJob = getUpdateJobFunction(job, jobReq)\n\n // the runner will either be passed to the config\n // OR it will be a path, which we will need to import via eval to avoid\n // Next.js compiler dynamic import expression errors\n let workflowHandler: WorkflowHandler<WorkflowTypes> | WorkflowJSON<WorkflowTypes>\n\n if (\n typeof workflowConfig.handler === 'function' ||\n (typeof workflowConfig.handler === 'object' && Array.isArray(workflowConfig.handler))\n ) {\n workflowHandler = workflowConfig.handler\n } else {\n workflowHandler = await importHandlerPath<typeof workflowHandler>(workflowConfig.handler)\n\n if (!workflowHandler) {\n const errorMessage = `Can't find runner while importing with the path ${workflowConfig.handler} in job type ${job.workflowSlug}.`\n req.payload.logger.error(errorMessage)\n\n await updateJob({\n error: {\n error: errorMessage,\n },\n hasError: true,\n processing: false,\n })\n\n return\n }\n }\n\n if (typeof workflowHandler === 'function') {\n const result = await runJob({\n job,\n req: jobReq,\n updateJob,\n workflowConfig,\n workflowHandler,\n })\n\n if (result.status !== 'error' && jobsToDelete) {\n jobsToDelete.push(job.id)\n }\n\n return { id: job.id, result }\n } else {\n const result = await runJSONJob({\n job,\n req: jobReq,\n updateJob,\n workflowConfig,\n workflowHandler,\n })\n\n if (result.status !== 'error' && jobsToDelete) {\n jobsToDelete.push(job.id)\n }\n\n return { id: job.id, result }\n }\n })\n\n const resultsArray = await Promise.all(jobPromises)\n\n if (jobsToDelete && jobsToDelete.length > 0) {\n try {\n await req.payload.delete({\n collection: 'payload-jobs',\n req,\n where: { id: { in: jobsToDelete } },\n })\n } catch (err) {\n req.payload.logger.error({\n err,\n msg: `failed to delete jobs ${jobsToDelete.join(', ')} on complete`,\n })\n }\n }\n\n const resultsObject: RunJobsResult['jobStatus'] = resultsArray.reduce((acc, cur) => {\n if (cur !== null) {\n // Check if there's a valid result to include\n acc[cur.id] = cur.result\n }\n return acc\n }, {})\n\n let remainingJobsFromQueried = 0\n for (const jobID in resultsObject) {\n const jobResult = resultsObject[jobID]\n if (jobResult.status === 'error') {\n remainingJobsFromQueried++ // Can be retried\n }\n }\n\n return {\n jobStatus: resultsObject,\n remainingJobsFromQueried,\n }\n}\n"],"names":["Forbidden","isolateObjectProperty","getUpdateJobFunction","importHandlerPath","runJob","runJSONJob","runJobs","limit","overrideAccess","queue","req","hasAccess","payload","config","jobs","access","run","t","where","and","completedAt","exists","hasError","not_equals","processing","equals","or","waitUntil","less_than","Date","toISOString","push","jobsQuery","update","collection","data","seenByWorker","depth","disableTransaction","showHiddenFields","newJobs","docs","reduce","acc","job","totalTried","existingJobs","length","noJobsRemaining","remainingJobsFromQueried","logger","info","jobsToDelete","deleteJobOnComplete","undefined","jobPromises","map","workflowSlug","taskSlug","Error","jobReq","workflowConfig","workflows","find","slug","handler","tasks","input","updateJob","workflowHandler","Array","isArray","errorMessage","error","result","status","id","resultsArray","Promise","all","delete","in","err","msg","join","resultsObject","cur","jobID","jobResult","jobStatus"],"mappings":"AAWA,SAASA,SAAS,QAAQ,+BAA8B;AACxD,OAAOC,2BAA2B,8CAA6C;AAC/E,SAASC,oBAAoB,QAAQ,mCAAkC;AACvE,SAASC,iBAAiB,QAAQ,gCAA+B;AACjE,SAASC,MAAM,QAAQ,oBAAmB;AAC1C,SAASC,UAAU,QAAQ,wBAAuB;AAqBlD,OAAO,MAAMC,UAAU,OAAO,EAC5BC,QAAQ,EAAE,EACVC,cAAc,EACdC,KAAK,EACLC,GAAG,EACS;IACZ,IAAI,CAACF,gBAAgB;QACnB,MAAMG,YAAY,MAAMD,IAAIE,OAAO,CAACC,MAAM,CAACC,IAAI,CAACC,MAAM,CAACC,GAAG,CAAC;YAAEN;QAAI;QACjE,IAAI,CAACC,WAAW;YACd,MAAM,IAAIX,UAAUU,IAAIO,CAAC;QAC3B;IACF;IACA,MAAMC,QAAe;QACnBC,KAAK;YACH;gBACEC,aAAa;oBACXC,QAAQ;gBACV;YACF;YACA;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AAYH,aAAa,CAACE,MAAM;QACtC,IAAIC,UAAUb,MAAM,KAAK,SAAS;YAChC1B,2BAA2B,iBAAiB;;QAC9C;IACF;IAEA,OAAO;QACLwC,WAAWJ;QACXpC;IACF;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../src/queues/operations/runJobs/index.ts"],"sourcesContent":["import type { PaginatedDocs } from '../../../database/types.js'\nimport type { PayloadRequest, Where } from '../../../types/index.js'\nimport type { WorkflowJSON } from '../../config/types/workflowJSONTypes.js'\nimport type {\n BaseJob,\n WorkflowConfig,\n WorkflowHandler,\n WorkflowTypes,\n} from '../../config/types/workflowTypes.js'\nimport type { RunJobResult } from './runJob/index.js'\n\nimport { Forbidden } from '../../../errors/Forbidden.js'\nimport isolateObjectProperty from '../../../utilities/isolateObjectProperty.js'\nimport { getUpdateJobFunction } from './runJob/getUpdateJobFunction.js'\nimport { importHandlerPath } from './runJob/importHandlerPath.js'\nimport { runJob } from './runJob/index.js'\nimport { runJSONJob } from './runJSONJob/index.js'\n\nexport type RunJobsArgs = {\n limit?: number\n overrideAccess?: boolean\n queue?: string\n req: PayloadRequest\n}\n\nexport type RunJobsResult = {\n jobStatus?: Record<string, RunJobResult>\n /**\n * If this is false, there for sure are no jobs remaining, regardless of the limit\n */\n noJobsRemaining?: boolean\n /**\n * Out of the jobs that were queried & processed (within the set limit), how many are remaining and retryable?\n */\n remainingJobsFromQueried: number\n}\n\nexport const runJobs = async ({\n limit = 10,\n overrideAccess,\n queue,\n req,\n}: RunJobsArgs): Promise<RunJobsResult> => {\n if (!overrideAccess) {\n const hasAccess = await req.payload.config.jobs.access.run({ req })\n if (!hasAccess) {\n throw new Forbidden(req.t)\n }\n }\n const where: Where = {\n and: [\n {\n completedAt: {\n exists: false,\n },\n },\n {\n hasError: {\n not_equals: true,\n },\n },\n {\n processing: {\n equals: false,\n },\n },\n {\n or: [\n {\n waitUntil: {\n exists: false,\n },\n },\n {\n waitUntil: {\n less_than: new Date().toISOString(),\n },\n },\n ],\n },\n ],\n }\n\n if (queue) {\n where.and.push({\n queue: {\n equals: queue,\n },\n })\n }\n\n // Find all jobs and ensure we set job to processing: true as early as possible to reduce the chance of\n // the same job being picked up by another worker\n const jobsQuery = (await req.payload.update({\n collection: 'payload-jobs',\n data: {\n processing: true,\n seenByWorker: true,\n },\n depth: req.payload.config.jobs.depth,\n disableTransaction: true,\n limit,\n showHiddenFields: true,\n where,\n })) as unknown as PaginatedDocs<BaseJob>\n\n /**\n * Just for logging purposes, we want to know how many jobs are new and how many are existing (= already been tried).\n * This is only for logs - in the end we still want to run all jobs, regardless of whether they are new or existing.\n */\n const { newJobs } = jobsQuery.docs.reduce(\n (acc, job) => {\n if (job.totalTried > 0) {\n acc.existingJobs.push(job)\n } else {\n acc.newJobs.push(job)\n }\n return acc\n },\n { existingJobs: [], newJobs: [] },\n )\n\n if (!jobsQuery.docs.length) {\n return {\n noJobsRemaining: true,\n remainingJobsFromQueried: 0,\n }\n }\n\n if (jobsQuery?.docs?.length) {\n req.payload.logger.info(`Running ${jobsQuery.docs.length} jobs.`)\n }\n const jobsToDelete: (number | string)[] | undefined = req.payload.config.jobs.deleteJobOnComplete\n ? []\n : undefined\n\n const jobPromises = jobsQuery.docs.map(async (job) => {\n if (!job.workflowSlug && !job.taskSlug) {\n throw new Error('Job must have either a workflowSlug or a taskSlug')\n }\n const jobReq = isolateObjectProperty(req, 'transactionID')\n\n const workflowConfig: WorkflowConfig<WorkflowTypes> = job.workflowSlug\n ? req.payload.config.jobs?.workflows.find(({ slug }) => slug === job.workflowSlug)\n : {\n slug: 'singleTask',\n handler: async ({ job, tasks }) => {\n await tasks[job.taskSlug as string]('1', {\n input: job.input,\n })\n },\n }\n\n if (!workflowConfig) {\n return null // Skip jobs with no workflow configuration\n }\n\n const updateJob = getUpdateJobFunction(job, jobReq)\n\n // the runner will either be passed to the config\n // OR it will be a path, which we will need to import via eval to avoid\n // Next.js compiler dynamic import expression errors\n let workflowHandler: WorkflowHandler<WorkflowTypes> | WorkflowJSON<WorkflowTypes>\n\n if (\n typeof workflowConfig.handler === 'function' ||\n (typeof workflowConfig.handler === 'object' && Array.isArray(workflowConfig.handler))\n ) {\n workflowHandler = workflowConfig.handler\n } else {\n workflowHandler = await importHandlerPath<typeof workflowHandler>(workflowConfig.handler)\n\n if (!workflowHandler) {\n const jobLabel = job.workflowSlug || `Task: ${job.taskSlug}`\n const errorMessage = `Can't find runner while importing with the path ${workflowConfig.handler} in job type ${jobLabel}.`\n req.payload.logger.error(errorMessage)\n\n await updateJob({\n error: {\n error: errorMessage,\n },\n hasError: true,\n processing: false,\n })\n\n return\n }\n }\n\n if (typeof workflowHandler === 'function') {\n const result = await runJob({\n job,\n req: jobReq,\n updateJob,\n workflowConfig,\n workflowHandler,\n })\n\n if (result.status !== 'error' && jobsToDelete) {\n jobsToDelete.push(job.id)\n }\n\n return { id: job.id, result }\n } else {\n const result = await runJSONJob({\n job,\n req: jobReq,\n updateJob,\n workflowConfig,\n workflowHandler,\n })\n\n if (result.status !== 'error' && jobsToDelete) {\n jobsToDelete.push(job.id)\n }\n\n return { id: job.id, result }\n }\n })\n\n const resultsArray = await Promise.all(jobPromises)\n\n if (jobsToDelete && jobsToDelete.length > 0) {\n try {\n await req.payload.delete({\n collection: 'payload-jobs',\n req,\n where: { id: { in: jobsToDelete } },\n })\n } catch (err) {\n req.payload.logger.error({\n err,\n msg: `failed to delete jobs ${jobsToDelete.join(', ')} on complete`,\n })\n }\n }\n\n const resultsObject: RunJobsResult['jobStatus'] = resultsArray.reduce((acc, cur) => {\n if (cur !== null) {\n // Check if there's a valid result to include\n acc[cur.id] = cur.result\n }\n return acc\n }, {})\n\n let remainingJobsFromQueried = 0\n for (const jobID in resultsObject) {\n const jobResult = resultsObject[jobID]\n if (jobResult.status === 'error') {\n remainingJobsFromQueried++ // Can be retried\n }\n }\n\n return {\n jobStatus: resultsObject,\n remainingJobsFromQueried,\n }\n}\n"],"names":["Forbidden","isolateObjectProperty","getUpdateJobFunction","importHandlerPath","runJob","runJSONJob","runJobs","limit","overrideAccess","queue","req","hasAccess","payload","config","jobs","access","run","t","where","and","completedAt","exists","hasError","not_equals","processing","equals","or","waitUntil","less_than","Date","toISOString","push","jobsQuery","update","collection","data","seenByWorker","depth","disableTransaction","showHiddenFields","newJobs","docs","reduce","acc","job","totalTried","existingJobs","length","noJobsRemaining","remainingJobsFromQueried","logger","info","jobsToDelete","deleteJobOnComplete","undefined","jobPromises","map","workflowSlug","taskSlug","Error","jobReq","workflowConfig","workflows","find","slug","handler","tasks","input","updateJob","workflowHandler","Array","isArray","jobLabel","errorMessage","error","result","status","id","resultsArray","Promise","all","delete","in","err","msg","join","resultsObject","cur","jobID","jobResult","jobStatus"],"mappings":"AAWA,SAASA,SAAS,QAAQ,+BAA8B;AACxD,OAAOC,2BAA2B,8CAA6C;AAC/E,SAASC,oBAAoB,QAAQ,mCAAkC;AACvE,SAASC,iBAAiB,QAAQ,gCAA+B;AACjE,SAASC,MAAM,QAAQ,oBAAmB;AAC1C,SAASC,UAAU,QAAQ,wBAAuB;AAqBlD,OAAO,MAAMC,UAAU,OAAO,EAC5BC,QAAQ,EAAE,EACVC,cAAc,EACdC,KAAK,EACLC,GAAG,EACS;IACZ,IAAI,CAACF,gBAAgB;QACnB,MAAMG,YAAY,MAAMD,IAAIE,OAAO,CAACC,MAAM,CAACC,IAAI,CAACC,MAAM,CAACC,GAAG,CAAC;YAAEN;QAAI;QACjE,IAAI,CAACC,WAAW;YACd,MAAM,IAAIX,UAAUU,IAAIO,CAAC;QAC3B;IACF;IACA,MAAMC,QAAe;QACnBC,KAAK;YACH;gBACEC,aAAa;oBACXC,QAAQ;gBACV;YACF;YACA;gBACEC,UAAU;oBACRC,YAAY;gBACd;YACF;YACA;gBACEC,YAAY;oBACVC,QAAQ;gBACV;YACF;YACA;gBACEC,IAAI;oBACF;wBACEC,WAAW;4BACTN,QAAQ;wBACV;oBACF;oBACA;wBACEM,WAAW;4BACTC,WAAW,IAAIC,OAAOC,WAAW;w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AWJ;QACXrC;IACF;AACF,EAAC"}
@@ -86,7 +86,7 @@ export const getRunTaskFunction = (state, job, workflowConfig, req, isInline, up
86
86
  throw new Error(`Task ${taskSlug} not found in workflow ${job.workflowSlug}`);
87
87
  }
88
88
  }
89
- const maxRetries = typeof retriesConfig === 'object' ? retriesConfig?.attempts : retriesConfig;
89
+ const maxRetries = (typeof retriesConfig === 'object' ? retriesConfig?.attempts : retriesConfig) ?? 0;
90
90
  const taskStatus = job?.taskStatus?.[taskSlug] ? job.taskStatus[taskSlug][taskID] : null;
91
91
  if (taskStatus && taskStatus.complete === true) {
92
92
  return taskStatus.output;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/queues/operations/runJobs/runJob/getRunTaskFunction.ts"],"sourcesContent":["import type { PayloadRequest } from '../../../../types/index.js'\nimport type {\n RetryConfig,\n RunInlineTaskFunction,\n RunTaskFunction,\n RunTaskFunctions,\n TaskConfig,\n TaskHandler,\n TaskHandlerResult,\n TaskType,\n} from '../../../config/types/taskTypes.js'\nimport type {\n BaseJob,\n RunningJob,\n SingleTaskStatus,\n WorkflowConfig,\n WorkflowTypes,\n} from '../../../config/types/workflowTypes.js'\nimport type { UpdateJobFunction } from './getUpdateJobFunction.js'\n\nimport { calculateBackoffWaitUntil } from './calculateBackoffWaitUntil.js'\nimport { importHandlerPath } from './importHandlerPath.js'\n\n// Helper object type to force being passed by reference\nexport type RunTaskFunctionState = {\n reachedMaxRetries: boolean\n}\n\nasync function getTaskHandlerFromConfig(taskConfig: TaskConfig<string>) {\n let handler: TaskHandler<TaskType>\n\n if (typeof taskConfig.handler === 'function') {\n handler = taskConfig.handler\n } else {\n handler = await importHandlerPath<TaskHandler<TaskType>>(taskConfig.handler)\n }\n return handler\n}\n\nexport async function handleTaskFailed({\n error,\n executedAt,\n input,\n job,\n maxRetries,\n output,\n req,\n retriesConfig,\n runnerOutput,\n state,\n taskConfig,\n taskID,\n taskSlug,\n taskStatus,\n updateJob,\n}: {\n error?: Error\n executedAt: Date\n input: object\n job: BaseJob\n maxRetries: number\n output: object\n req: PayloadRequest\n retriesConfig: number | RetryConfig\n runnerOutput?: TaskHandlerResult<string>\n state: RunTaskFunctionState\n taskConfig?: TaskConfig<string>\n taskID: string\n taskSlug: string\n taskStatus: null | SingleTaskStatus<string>\n updateJob: UpdateJobFunction\n}): Promise<never> {\n req.payload.logger.error({ err: error, job, msg: 'Error running task', taskSlug })\n\n if (taskConfig?.onFail) {\n await taskConfig.onFail()\n }\n\n if (!job.log) {\n job.log = []\n }\n job.log.push({\n completedAt: new Date().toISOString(),\n error: error ?? runnerOutput.state,\n executedAt: executedAt.toISOString(),\n input,\n output,\n state: 'failed',\n taskID,\n taskSlug,\n })\n\n if (job.waitUntil) {\n // Check if waitUntil is in the past\n const waitUntil = new Date(job.waitUntil)\n if (waitUntil < new Date()) {\n // Outdated waitUntil, remove it\n delete job.waitUntil\n }\n }\n\n if (taskStatus && !taskStatus.complete && taskStatus.totalTried >= maxRetries) {\n state.reachedMaxRetries = true\n\n await updateJob({\n error,\n hasError: true,\n log: job.log,\n processing: false,\n waitUntil: job.waitUntil,\n })\n\n throw new Error(\n `Task ${taskSlug} has failed more than the allowed retries in workflow ${job.workflowSlug}${error ? `. Error: ${String(error)}` : ''}`,\n )\n } else {\n // Job will retry. Let's determine when!\n const waitUntil: Date = calculateBackoffWaitUntil({\n retriesConfig,\n totalTried: taskStatus?.totalTried ?? 0,\n })\n\n // Update job's waitUntil only if this waitUntil is later than the current one\n if (!job.waitUntil || waitUntil > new Date(job.waitUntil)) {\n job.waitUntil = waitUntil.toISOString()\n }\n\n await updateJob({\n log: job.log,\n processing: false,\n waitUntil: job.waitUntil,\n })\n throw error ?? new Error('Task failed')\n }\n}\n\nexport const getRunTaskFunction = <TIsInline extends boolean>(\n state: RunTaskFunctionState,\n job: BaseJob,\n workflowConfig: WorkflowConfig<string>,\n req: PayloadRequest,\n isInline: TIsInline,\n updateJob: UpdateJobFunction,\n): TIsInline extends true ? RunInlineTaskFunction : RunTaskFunctions => {\n const runTask: <TTaskSlug extends string>(\n taskSlug: TTaskSlug,\n ) => TTaskSlug extends 'inline' ? RunInlineTaskFunction : RunTaskFunction<TTaskSlug> = (\n taskSlug,\n ) =>\n (async (\n taskID: Parameters<RunInlineTaskFunction>[0],\n {\n input,\n retries,\n task,\n }: Parameters<RunInlineTaskFunction>[1] & Parameters<RunTaskFunction<string>>[1],\n ) => {\n const executedAt = new Date()\n\n let inlineRunner: TaskHandler<TaskType> = null\n if (isInline) {\n inlineRunner = task\n }\n\n let retriesConfig: number | RetryConfig = retries\n let taskConfig: TaskConfig<string>\n if (!isInline) {\n taskConfig = req.payload.config.jobs.tasks.find((t) => t.slug === taskSlug)\n if (!retriesConfig) {\n retriesConfig = taskConfig.retries\n }\n\n if (!taskConfig) {\n throw new Error(`Task ${taskSlug} not found in workflow ${job.workflowSlug}`)\n }\n }\n const maxRetries: number =\n typeof retriesConfig === 'object' ? retriesConfig?.attempts : retriesConfig\n\n const taskStatus: null | SingleTaskStatus<string> = job?.taskStatus?.[taskSlug]\n ? job.taskStatus[taskSlug][taskID]\n : null\n\n if (taskStatus && taskStatus.complete === true) {\n return taskStatus.output\n }\n\n let runner: TaskHandler<TaskType>\n if (isInline) {\n runner = inlineRunner\n } else {\n if (!taskConfig) {\n throw new Error(`Task ${taskSlug} not found in workflow ${job.workflowSlug}`)\n }\n runner = await getTaskHandlerFromConfig(taskConfig)\n }\n\n if (!runner || typeof runner !== 'function') {\n const errorMessage = isInline\n ? `Can't find runner for inline task with ID ${taskID}`\n : `Can't find runner while importing with the path ${typeof workflowConfig.handler === 'string' ? workflowConfig.handler : 'unknown - no string path'} in job type ${job.workflowSlug} for task ${taskSlug}.`\n req.payload.logger.error(errorMessage)\n\n await updateJob({\n error: {\n error: errorMessage,\n },\n hasError: true,\n log: [\n ...job.log,\n {\n completedAt: new Date().toISOString(),\n error: errorMessage,\n executedAt: executedAt.toISOString(),\n state: 'failed',\n taskID,\n taskSlug,\n },\n ],\n processing: false,\n })\n\n return\n }\n\n let output: object\n\n try {\n const runnerOutput = await runner({\n input,\n job: job as unknown as RunningJob<WorkflowTypes>, // TODO: Type this better\n req,\n })\n\n if (runnerOutput.state === 'failed') {\n await handleTaskFailed({\n executedAt,\n input,\n job,\n maxRetries,\n output,\n req,\n retriesConfig,\n runnerOutput,\n state,\n taskConfig,\n taskID,\n taskSlug,\n taskStatus,\n updateJob,\n })\n throw new Error('Task failed')\n } else {\n output = runnerOutput.output\n }\n } catch (err) {\n await handleTaskFailed({\n error: err,\n executedAt,\n input,\n job,\n maxRetries,\n output,\n req,\n retriesConfig,\n state,\n taskConfig,\n taskID,\n taskSlug,\n taskStatus,\n updateJob,\n })\n throw new Error('Task failed')\n }\n\n if (taskConfig?.onSuccess) {\n await taskConfig.onSuccess()\n }\n\n if (!job.log) {\n job.log = []\n }\n job.log.push({\n completedAt: new Date().toISOString(),\n executedAt: executedAt.toISOString(),\n input,\n output,\n state: 'succeeded',\n taskID,\n taskSlug,\n })\n\n await updateJob({\n log: job.log,\n })\n\n return output\n }) as any\n\n if (isInline) {\n return runTask('inline') as TIsInline extends true ? RunInlineTaskFunction : RunTaskFunctions\n } else {\n const tasks: RunTaskFunctions = {}\n for (const task of req?.payload?.config?.jobs?.tasks ?? []) {\n tasks[task.slug] = runTask(task.slug)\n }\n return tasks as TIsInline extends true ? RunInlineTaskFunction : RunTaskFunctions\n }\n}\n"],"names":["calculateBackoffWaitUntil","importHandlerPath","getTaskHandlerFromConfig","taskConfig","handler","handleTaskFailed","error","executedAt","input","job","maxRetries","output","req","retriesConfig","runnerOutput","state","taskID","taskSlug","taskStatus","updateJob","payload","logger","err","msg","onFail","log","push","completedAt","Date","toISOString","waitUntil","complete","totalTried","reachedMaxRetries","hasError","processing","Error","workflowSlug","String","getRunTaskFunction","workflowConfig","isInline","runTask","retries","task","inlineRunner","config","jobs","tasks","find","t","slug","attempts","runner","errorMessage","onSuccess"],"mappings":"AAoBA,SAASA,yBAAyB,QAAQ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,MAAMV,iBAAiB;wBACrBE;wBACAC;wBACAC;wBACAC;wBACAC;wBACAC;wBACAC;wBACAC;wBACAC;wBACAZ;wBACAa;wBACAC;wBACAC;wBACAC;oBACF;oBACA,MAAM,IAAIiB,MAAM;gBAClB,OAAO;oBACLzB,SAASG,aAAaH,MAAM;gBAC9B;YACF,EAAE,OAAOW,KAAK;gBACZ,MAAMjB,iBAAiB;oBACrBC,OAAOgB;oBACPf;oBACAC;oBACAC;oBACAC;oBACAC;oBACAC;oBACAC;oBACAE;oBACAZ;oBACAa;oBACAC;oBACAC;oBACAC;gBACF;gBACA,MAAM,IAAIiB,MAAM;YAClB;YAEA,IAAIjC,YAAYoD,WAAW;gBACzB,MAAMpD,WAAWoD,SAAS;YAC5B;YAEA,IAAI,CAAC9C,IAAIgB,GAAG,EAAE;gBACZhB,IAAIgB,GAAG,GAAG,EAAE;YACd;YACAhB,IAAIgB,GAAG,CAACC,IAAI,CAAC;gBACXC,aAAa,IAAIC,OAAOC,WAAW;gBACnCtB,YAAYA,WAAWsB,WAAW;gBAClCrB;gBACAG;gBACAI,OAAO;gBACPC;gBACAC;YACF;YAEA,MAAME,UAAU;gBACdM,KAAKhB,IAAIgB,GAAG;YACd;YAEA,OAAOd;QACT;IAEF,IAAI8B,UAAU;QACZ,OAAOC,QAAQ;IACjB,OAAO;QACL,MAAMM,QAA0B,CAAC;QACjC,KAAK,MAAMJ,QAAQhC,KAAKQ,SAAS0B,QAAQC,MAAMC,SAAS,EAAE,CAAE;YAC1DA,KAAK,CAACJ,KAAKO,IAAI,CAAC,GAAGT,QAAQE,KAAKO,IAAI;QACtC;QACA,OAAOH;IACT;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../../src/queues/operations/runJobs/runJob/getRunTaskFunction.ts"],"sourcesContent":["import type { PayloadRequest } from '../../../../types/index.js'\nimport type {\n RetryConfig,\n RunInlineTaskFunction,\n RunTaskFunction,\n RunTaskFunctions,\n TaskConfig,\n TaskHandler,\n TaskHandlerResult,\n TaskType,\n} from '../../../config/types/taskTypes.js'\nimport type {\n BaseJob,\n RunningJob,\n SingleTaskStatus,\n WorkflowConfig,\n WorkflowTypes,\n} from '../../../config/types/workflowTypes.js'\nimport type { UpdateJobFunction } from './getUpdateJobFunction.js'\n\nimport { calculateBackoffWaitUntil } from './calculateBackoffWaitUntil.js'\nimport { importHandlerPath } from './importHandlerPath.js'\n\n// Helper object type to force being passed by reference\nexport type RunTaskFunctionState = {\n reachedMaxRetries: boolean\n}\n\nasync function getTaskHandlerFromConfig(taskConfig: TaskConfig<string>) {\n let handler: TaskHandler<TaskType>\n\n if (typeof taskConfig.handler === 'function') {\n handler = taskConfig.handler\n } else {\n handler = await importHandlerPath<TaskHandler<TaskType>>(taskConfig.handler)\n }\n return handler\n}\n\nexport async function handleTaskFailed({\n error,\n executedAt,\n input,\n job,\n maxRetries,\n output,\n req,\n retriesConfig,\n runnerOutput,\n state,\n taskConfig,\n taskID,\n taskSlug,\n taskStatus,\n updateJob,\n}: {\n error?: Error\n executedAt: Date\n input: object\n job: BaseJob\n maxRetries: number\n output: object\n req: PayloadRequest\n retriesConfig: number | RetryConfig\n runnerOutput?: TaskHandlerResult<string>\n state: RunTaskFunctionState\n taskConfig?: TaskConfig<string>\n taskID: string\n taskSlug: string\n taskStatus: null | SingleTaskStatus<string>\n updateJob: UpdateJobFunction\n}): Promise<never> {\n req.payload.logger.error({ err: error, job, msg: 'Error running task', taskSlug })\n\n if (taskConfig?.onFail) {\n await taskConfig.onFail()\n }\n\n if (!job.log) {\n job.log = []\n }\n job.log.push({\n completedAt: new Date().toISOString(),\n error: error ?? runnerOutput.state,\n executedAt: executedAt.toISOString(),\n input,\n output,\n state: 'failed',\n taskID,\n taskSlug,\n })\n\n if (job.waitUntil) {\n // Check if waitUntil is in the past\n const waitUntil = new Date(job.waitUntil)\n if (waitUntil < new Date()) {\n // Outdated waitUntil, remove it\n delete job.waitUntil\n }\n }\n\n if (taskStatus && !taskStatus.complete && taskStatus.totalTried >= maxRetries) {\n state.reachedMaxRetries = true\n\n await updateJob({\n error,\n hasError: true,\n log: job.log,\n processing: false,\n waitUntil: job.waitUntil,\n })\n\n throw new Error(\n `Task ${taskSlug} has failed more than the allowed retries in workflow ${job.workflowSlug}${error ? `. Error: ${String(error)}` : ''}`,\n )\n } else {\n // Job will retry. Let's determine when!\n const waitUntil: Date = calculateBackoffWaitUntil({\n retriesConfig,\n totalTried: taskStatus?.totalTried ?? 0,\n })\n\n // Update job's waitUntil only if this waitUntil is later than the current one\n if (!job.waitUntil || waitUntil > new Date(job.waitUntil)) {\n job.waitUntil = waitUntil.toISOString()\n }\n\n await updateJob({\n log: job.log,\n processing: false,\n waitUntil: job.waitUntil,\n })\n throw error ?? new Error('Task failed')\n }\n}\n\nexport const getRunTaskFunction = <TIsInline extends boolean>(\n state: RunTaskFunctionState,\n job: BaseJob,\n workflowConfig: WorkflowConfig<string>,\n req: PayloadRequest,\n isInline: TIsInline,\n updateJob: UpdateJobFunction,\n): TIsInline extends true ? RunInlineTaskFunction : RunTaskFunctions => {\n const runTask: <TTaskSlug extends string>(\n taskSlug: TTaskSlug,\n ) => TTaskSlug extends 'inline' ? RunInlineTaskFunction : RunTaskFunction<TTaskSlug> = (\n taskSlug,\n ) =>\n (async (\n taskID: Parameters<RunInlineTaskFunction>[0],\n {\n input,\n retries,\n task,\n }: Parameters<RunInlineTaskFunction>[1] & Parameters<RunTaskFunction<string>>[1],\n ) => {\n const executedAt = new Date()\n\n let inlineRunner: TaskHandler<TaskType> = null\n if (isInline) {\n inlineRunner = task\n }\n\n let retriesConfig: number | RetryConfig = retries\n let taskConfig: TaskConfig<string>\n if (!isInline) {\n taskConfig = req.payload.config.jobs.tasks.find((t) => t.slug === taskSlug)\n if (!retriesConfig) {\n retriesConfig = taskConfig.retries\n }\n\n if (!taskConfig) {\n throw new Error(`Task ${taskSlug} not found in workflow ${job.workflowSlug}`)\n }\n }\n const maxRetries: number =\n (typeof retriesConfig === 'object' ? retriesConfig?.attempts : retriesConfig) ?? 0\n\n const taskStatus: null | SingleTaskStatus<string> = job?.taskStatus?.[taskSlug]\n ? job.taskStatus[taskSlug][taskID]\n : null\n\n if (taskStatus && taskStatus.complete === true) {\n return taskStatus.output\n }\n\n let runner: TaskHandler<TaskType>\n if (isInline) {\n runner = inlineRunner\n } else {\n if (!taskConfig) {\n throw new Error(`Task ${taskSlug} not found in workflow ${job.workflowSlug}`)\n }\n runner = await getTaskHandlerFromConfig(taskConfig)\n }\n\n if (!runner || typeof runner !== 'function') {\n const errorMessage = isInline\n ? `Can't find runner for inline task with ID ${taskID}`\n : `Can't find runner while importing with the path ${typeof workflowConfig.handler === 'string' ? workflowConfig.handler : 'unknown - no string path'} in job type ${job.workflowSlug} for task ${taskSlug}.`\n req.payload.logger.error(errorMessage)\n\n await updateJob({\n error: {\n error: errorMessage,\n },\n hasError: true,\n log: [\n ...job.log,\n {\n completedAt: new Date().toISOString(),\n error: errorMessage,\n executedAt: executedAt.toISOString(),\n state: 'failed',\n taskID,\n taskSlug,\n },\n ],\n processing: false,\n })\n\n return\n }\n\n let output: object\n\n try {\n const runnerOutput = await runner({\n input,\n job: job as unknown as RunningJob<WorkflowTypes>, // TODO: Type this better\n req,\n })\n\n if (runnerOutput.state === 'failed') {\n await handleTaskFailed({\n executedAt,\n input,\n job,\n maxRetries,\n output,\n req,\n retriesConfig,\n runnerOutput,\n state,\n taskConfig,\n taskID,\n taskSlug,\n taskStatus,\n updateJob,\n })\n throw new Error('Task failed')\n } else {\n output = runnerOutput.output\n }\n } catch (err) {\n await handleTaskFailed({\n error: err,\n executedAt,\n input,\n job,\n maxRetries,\n output,\n req,\n retriesConfig,\n state,\n taskConfig,\n taskID,\n taskSlug,\n taskStatus,\n updateJob,\n })\n throw new Error('Task failed')\n }\n\n if (taskConfig?.onSuccess) {\n await taskConfig.onSuccess()\n }\n\n if (!job.log) {\n job.log = []\n }\n job.log.push({\n completedAt: new Date().toISOString(),\n executedAt: executedAt.toISOString(),\n input,\n output,\n state: 'succeeded',\n taskID,\n taskSlug,\n })\n\n await updateJob({\n log: job.log,\n })\n\n return output\n }) as any\n\n if (isInline) {\n return runTask('inline') as TIsInline extends true ? RunInlineTaskFunction : RunTaskFunctions\n } else {\n const tasks: RunTaskFunctions = {}\n for (const task of req?.payload?.config?.jobs?.tasks ?? []) {\n tasks[task.slug] = runTask(task.slug)\n }\n return tasks as TIsInline extends true ? RunInlineTaskFunction : RunTaskFunctions\n }\n}\n"],"names":["calculateBackoffWaitUntil","importHandlerPath","getTaskHandlerFromConfig","taskConfig","handler","handleTaskFailed","error","executedAt","input","job","maxRetries","output","req","retriesConfig","runnerOutput","state","taskID","taskSlug","taskStatus","updateJob","payload","logger","err","msg","onFail","log","push","completedAt","Date","toISOString","waitUntil","complete","totalTried","reachedMaxRetries","hasError","processing","Error","workflowSlug","String","getRunTaskFunction","workflowConfig","isInline","runTask","retries","task","inlineRunner","config","jobs","tasks","find","t","slug","attempts","runner","errorMessage","onSuccess"],"mappings":"AAoBA,SAASA,yBAAyB,QAAQ,iCAAgC;AAC1E,SAASC,iBAAiB,QAAQ,yBAAwB;AAO1D,eAAeC,yBAAyBC,UAA8B;IACpE,IAAIC;IAEJ,IAAI,OAAOD,WAAWC,OAAO,KAAK,YAAY;QAC5CA,UAAUD,WAAWC,OAAO;IAC9B,OAAO;QACLA,UAAU,MAAMH,kBAAyCE,WAAWC,OAAO;IAC7E;IACA,OAAOA;AACT;AAEA,OAAO,eAAeC,iBAAiB,EACrCC,KAAK,EACLC,UAAU,EACVC,KAAK,EACLC,GAAG,EACHC,UAAU,EACVC,MAAM,EACNC,GAAG,EACHC,aAAa,EACbC,YAAY,EACZC,KAAK,EACLZ,UAAU,EACVa,MAAM,EACNC,QAAQ,EACRC,UAAU,EACVC,SAAS,EAiBV;IACCP,IAAIQ,OAAO,CAACC,MAAM,CAACf,KAAK,CAAC;QAAEgB,KAAKhB;QAAOG;QAAKc,KAAK;QAAsBN;IAAS;IAEhF,IAAId,YAAYqB,QAA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CAACC,IAAI,CAAC;gBACXC,aAAa,IAAIC,OAAOC,WAAW;gBACnCtB,YAAYA,WAAWsB,WAAW;gBAClCrB;gBACAG;gBACAI,OAAO;gBACPC;gBACAC;YACF;YAEA,MAAME,UAAU;gBACdM,KAAKhB,IAAIgB,GAAG;YACd;YAEA,OAAOd;QACT;IAEF,IAAI8B,UAAU;QACZ,OAAOC,QAAQ;IACjB,OAAO;QACL,MAAMM,QAA0B,CAAC;QACjC,KAAK,MAAMJ,QAAQhC,KAAKQ,SAAS0B,QAAQC,MAAMC,SAAS,EAAE,CAAE;YAC1DA,KAAK,CAACJ,KAAKO,IAAI,CAAC,GAAGT,QAAQE,KAAKO,IAAI;QACtC;QACA,OAAOH;IACT;AACF,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"handleWorkflowError.d.ts","sourceRoot":"","sources":["../../../../../src/queues/operations/runJobs/runJob/handleWorkflowError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;AACpG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAInE;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,GAAG,EACH,GAAG,EACH,KAAK,EACL,cAAc,GACf,EAAE;IACD,KAAK,EAAE,KAAK,CAAA;IACZ,GAAG,EAAE,OAAO,CAAA;IACZ,GAAG,EAAE,cAAc,CAAA;IACnB,KAAK,EAAE,oBAAoB,CAAA;IAC3B,cAAc,EAAE,cAAc,CAAC,aAAa,CAAC,CAAA;CAC9C,GAAG;IACF,aAAa,EAAE,OAAO,CAAA;CACvB,CAyCA"}
1
+ {"version":3,"file":"handleWorkflowError.d.ts","sourceRoot":"","sources":["../../../../../src/queues/operations/runJobs/runJob/handleWorkflowError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;AACpG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAInE;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,GAAG,EACH,GAAG,EACH,KAAK,EACL,cAAc,GACf,EAAE;IACD,KAAK,EAAE,KAAK,CAAA;IACZ,GAAG,EAAE,OAAO,CAAA;IACZ,GAAG,EAAE,cAAc,CAAA;IACnB,KAAK,EAAE,oBAAoB,CAAA;IAC3B,cAAc,EAAE,cAAc,CAAC,aAAa,CAAC,CAAA;CAC9C,GAAG;IACF,aAAa,EAAE,OAAO,CAAA;CACvB,CA6CA"}
@@ -3,11 +3,16 @@ import { calculateBackoffWaitUntil } from './calculateBackoffWaitUntil.js';
3
3
  * This is called if a workflow catches an error. It determines if it's a final error
4
4
  * or not and handles logging.
5
5
  */ export function handleWorkflowError({ error, job, req, state, workflowConfig }) {
6
+ const jobLabel = job.workflowSlug || `Task: ${job.taskSlug}`;
6
7
  let hasFinalError = state.reachedMaxRetries // If any TASK reached max retries, the job has an error
7
8
  ;
8
- const maxRetries = typeof workflowConfig.retries === 'object' ? workflowConfig.retries.attempts : workflowConfig.retries;
9
+ const maxWorkflowRetries = (typeof workflowConfig.retries === 'object' ? workflowConfig.retries.attempts : workflowConfig.retries) ?? 0;
10
+ if (job.totalTried >= maxWorkflowRetries) {
11
+ hasFinalError = true;
12
+ state.reachedMaxRetries = true;
13
+ }
9
14
  // Now let's handle workflow retries
10
- if (!hasFinalError && workflowConfig.retries) {
15
+ if (!hasFinalError) {
11
16
  if (job.waitUntil) {
12
17
  // Check if waitUntil is in the past
13
18
  const waitUntil = new Date(job.waitUntil);
@@ -16,24 +21,19 @@ import { calculateBackoffWaitUntil } from './calculateBackoffWaitUntil.js';
16
21
  delete job.waitUntil;
17
22
  }
18
23
  }
19
- if (job.totalTried >= maxRetries) {
20
- state.reachedMaxRetries = true;
21
- hasFinalError = true;
22
- } else {
23
- // Job will retry. Let's determine when!
24
- const waitUntil = calculateBackoffWaitUntil({
25
- retriesConfig: workflowConfig.retries,
26
- totalTried: job.totalTried ?? 0
27
- });
28
- // Update job's waitUntil only if this waitUntil is later than the current one
29
- if (!job.waitUntil || waitUntil > new Date(job.waitUntil)) {
30
- job.waitUntil = waitUntil.toISOString();
31
- }
24
+ // Job will retry. Let's determine when!
25
+ const waitUntil = calculateBackoffWaitUntil({
26
+ retriesConfig: workflowConfig.retries,
27
+ totalTried: job.totalTried ?? 0
28
+ });
29
+ // Update job's waitUntil only if this waitUntil is later than the current one
30
+ if (!job.waitUntil || waitUntil > new Date(job.waitUntil)) {
31
+ job.waitUntil = waitUntil.toISOString();
32
32
  }
33
33
  }
34
34
  req.payload.logger.error({
35
35
  err: error,
36
- msg: `Error running job ${job.workflowSlug} ${job.taskSlug} id: ${job.id} attempt ${job.totalTried}/${maxRetries}`
36
+ msg: `Error running job ${jobLabel} id: ${job.id} attempt ${job.totalTried + 1}/${maxWorkflowRetries + 1}`
37
37
  });
38
38
  return {
39
39
  hasFinalError
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/queues/operations/runJobs/runJob/handleWorkflowError.ts"],"sourcesContent":["import type { PayloadRequest } from '../../../../types/index.js'\nimport type { BaseJob, WorkflowConfig, WorkflowTypes } from '../../../config/types/workflowTypes.js'\nimport type { RunTaskFunctionState } from './getRunTaskFunction.js'\n\nimport { calculateBackoffWaitUntil } from './calculateBackoffWaitUntil.js'\n\n/**\n * This is called if a workflow catches an error. It determines if it's a final error\n * or not and handles logging.\n */\nexport function handleWorkflowError({\n error,\n job,\n req,\n state,\n workflowConfig,\n}: {\n error: Error\n job: BaseJob\n req: PayloadRequest\n state: RunTaskFunctionState\n workflowConfig: WorkflowConfig<WorkflowTypes>\n}): {\n hasFinalError: boolean\n} {\n let hasFinalError = state.reachedMaxRetries // If any TASK reached max retries, the job has an error\n const maxRetries =\n typeof workflowConfig.retries === 'object'\n ? workflowConfig.retries.attempts\n : workflowConfig.retries\n // Now let's handle workflow retries\n if (!hasFinalError && workflowConfig.retries) {\n if (job.waitUntil) {\n // Check if waitUntil is in the past\n const waitUntil = new Date(job.waitUntil)\n if (waitUntil < new Date()) {\n // Outdated waitUntil, remove it\n delete job.waitUntil\n }\n }\n if (job.totalTried >= maxRetries) {\n state.reachedMaxRetries = true\n hasFinalError = true\n } else {\n // Job will retry. Let's determine when!\n const waitUntil: Date = calculateBackoffWaitUntil({\n retriesConfig: workflowConfig.retries,\n totalTried: job.totalTried ?? 0,\n })\n\n // Update job's waitUntil only if this waitUntil is later than the current one\n if (!job.waitUntil || waitUntil > new Date(job.waitUntil)) {\n job.waitUntil = waitUntil.toISOString()\n }\n }\n }\n\n req.payload.logger.error({\n err: error,\n msg: `Error running job ${job.workflowSlug} ${job.taskSlug} id: ${job.id} attempt ${job.totalTried}/${maxRetries}`,\n })\n\n return {\n hasFinalError,\n }\n}\n"],"names":["calculateBackoffWaitUntil","handleWorkflowError","error","job","req","state","workflowConfig","hasFinalError","reachedMaxRetries","maxRetries","retries","attempts","waitUntil","Date","totalTried","retriesConfig","toISOString","payload","logger","err","msg","workflowSlug","taskSlug","id"],"mappings":"AAIA,SAASA,yBAAyB,QAAQ,iCAAgC;AAE1E;;;CAGC,GACD,OAAO,SAASC,oBAAoB,EAClCC,KAAK,EACLC,GAAG,EACHC,GAAG,EACHC,KAAK,EACLC,cAAc,EAOf;IAGC,IAAIC,gBAAgBF,MAAMG,iBAAiB,CAAC,wDAAwD;;IACpG,MAAMC,aACJ,OAAOH,eAAeI,OAAO,KAAK,WAC9BJ,eAAeI,OAAO,CAACC,QAAQ,GAC/BL,eAAeI,OAAO;IAC5B,oCAAoC;IACpC,IAAI,CAACH,iBAAiBD,eAAeI,OAAO,EAAE;QAC5C,IAAIP,IAAIS,SAAS,EAAE;YACjB,oCAAoC;YACpC,MAAMA,YAAY,IAAIC,KAAKV,IAAIS,SAAS;YACxC,IAAIA,YAAY,IAAIC,QAAQ;gBAC1B,gCAAgC;gBAChC,OAAOV,IAAIS,SAAS;YACtB;QACF;QACA,IAAIT,IAAIW,UAAU,IAAIL,YAAY;YAChCJ,MAAMG,iBAAiB,GAAG;YAC1BD,gBAAgB;QAClB,OAAO;YACL,wCAAwC;YACxC,MAAMK,YAAkBZ,0BAA0B;gBAChDe,eAAeT,eAAeI,OAAO;gBACrCI,YAAYX,IAAIW,UAAU,IAAI;YAChC;YAEA,8EAA8E;YAC9E,IAAI,CAACX,IAAIS,SAAS,IAAIA,YAAY,IAAIC,KAAKV,IAAIS,SAAS,GAAG;gBACzDT,IAAIS,SAAS,GAAGA,UAAUI,WAAW;YACvC;QACF;IACF;IAEAZ,IAAIa,OAAO,CAACC,MAAM,CAAChB,KAAK,CAAC;QACvBiB,KAAKjB;QACLkB,KAAK,CAAC,kBAAkB,EAAEjB,IAAIkB,YAAY,CAAC,CAAC,EAAElB,IAAImB,QAAQ,CAAC,KAAK,EAAEnB,IAAIoB,EAAE,CAAC,SAAS,EAAEpB,IAAIW,UAAU,CAAC,CAAC,EAAEL,WAAW,CAAC;IACpH;IAEA,OAAO;QACLF;IACF;AACF"}
1
+ {"version":3,"sources":["../../../../../src/queues/operations/runJobs/runJob/handleWorkflowError.ts"],"sourcesContent":["import type { PayloadRequest } from '../../../../types/index.js'\nimport type { BaseJob, WorkflowConfig, WorkflowTypes } from '../../../config/types/workflowTypes.js'\nimport type { RunTaskFunctionState } from './getRunTaskFunction.js'\n\nimport { calculateBackoffWaitUntil } from './calculateBackoffWaitUntil.js'\n\n/**\n * This is called if a workflow catches an error. It determines if it's a final error\n * or not and handles logging.\n */\nexport function handleWorkflowError({\n error,\n job,\n req,\n state,\n workflowConfig,\n}: {\n error: Error\n job: BaseJob\n req: PayloadRequest\n state: RunTaskFunctionState\n workflowConfig: WorkflowConfig<WorkflowTypes>\n}): {\n hasFinalError: boolean\n} {\n const jobLabel = job.workflowSlug || `Task: ${job.taskSlug}`\n\n let hasFinalError = state.reachedMaxRetries // If any TASK reached max retries, the job has an error\n const maxWorkflowRetries: number =\n (typeof workflowConfig.retries === 'object'\n ? workflowConfig.retries.attempts\n : workflowConfig.retries) ?? 0\n\n if (job.totalTried >= maxWorkflowRetries) {\n hasFinalError = true\n state.reachedMaxRetries = true\n }\n\n // Now let's handle workflow retries\n if (!hasFinalError) {\n if (job.waitUntil) {\n // Check if waitUntil is in the past\n const waitUntil = new Date(job.waitUntil)\n if (waitUntil < new Date()) {\n // Outdated waitUntil, remove it\n delete job.waitUntil\n }\n }\n\n // Job will retry. Let's determine when!\n const waitUntil: Date = calculateBackoffWaitUntil({\n retriesConfig: workflowConfig.retries,\n totalTried: job.totalTried ?? 0,\n })\n\n // Update job's waitUntil only if this waitUntil is later than the current one\n if (!job.waitUntil || waitUntil > new Date(job.waitUntil)) {\n job.waitUntil = waitUntil.toISOString()\n }\n }\n\n req.payload.logger.error({\n err: error,\n msg: `Error running job ${jobLabel} id: ${job.id} attempt ${job.totalTried + 1}/${maxWorkflowRetries + 1}`,\n })\n\n return {\n hasFinalError,\n }\n}\n"],"names":["calculateBackoffWaitUntil","handleWorkflowError","error","job","req","state","workflowConfig","jobLabel","workflowSlug","taskSlug","hasFinalError","reachedMaxRetries","maxWorkflowRetries","retries","attempts","totalTried","waitUntil","Date","retriesConfig","toISOString","payload","logger","err","msg","id"],"mappings":"AAIA,SAASA,yBAAyB,QAAQ,iCAAgC;AAE1E;;;CAGC,GACD,OAAO,SAASC,oBAAoB,EAClCC,KAAK,EACLC,GAAG,EACHC,GAAG,EACHC,KAAK,EACLC,cAAc,EAOf;IAGC,MAAMC,WAAWJ,IAAIK,YAAY,IAAI,CAAC,MAAM,EAAEL,IAAIM,QAAQ,CAAC,CAAC;IAE5D,IAAIC,gBAAgBL,MAAMM,iBAAiB,CAAC,wDAAwD;;IACpG,MAAMC,qBACJ,AAAC,CAAA,OAAON,eAAeO,OAAO,KAAK,WAC/BP,eAAeO,OAAO,CAACC,QAAQ,GAC/BR,eAAeO,OAAO,AAAD,KAAM;IAEjC,IAAIV,IAAIY,UAAU,IAAIH,oBAAoB;QACxCF,gBAAgB;QAChBL,MAAMM,iBAAiB,GAAG;IAC5B;IAEA,oCAAoC;IACpC,IAAI,CAACD,eAAe;QAClB,IAAIP,IAAIa,SAAS,EAAE;YACjB,oCAAoC;YACpC,MAAMA,YAAY,IAAIC,KAAKd,IAAIa,SAAS;YACxC,IAAIA,YAAY,IAAIC,QAAQ;gBAC1B,gCAAgC;gBAChC,OAAOd,IAAIa,SAAS;YACtB;QACF;QAEA,wCAAwC;QACxC,MAAMA,YAAkBhB,0BAA0B;YAChDkB,eAAeZ,eAAeO,OAAO;YACrCE,YAAYZ,IAAIY,UAAU,IAAI;QAChC;QAEA,8EAA8E;QAC9E,IAAI,CAACZ,IAAIa,SAAS,IAAIA,YAAY,IAAIC,KAAKd,IAAIa,SAAS,GAAG;YACzDb,IAAIa,SAAS,GAAGA,UAAUG,WAAW;QACvC;IACF;IAEAf,IAAIgB,OAAO,CAACC,MAAM,CAACnB,KAAK,CAAC;QACvBoB,KAAKpB;QACLqB,KAAK,CAAC,kBAAkB,EAAEhB,SAAS,KAAK,EAAEJ,IAAIqB,EAAE,CAAC,SAAS,EAAErB,IAAIY,UAAU,GAAG,EAAE,CAAC,EAAEH,qBAAqB,EAAE,CAAC;IAC5G;IAEA,OAAO;QACLF;IACF;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payload",
3
- "version": "3.2.2-canary.451666e",
3
+ "version": "3.2.2-canary.49cfe5d",
4
4
  "description": "Node, React, Headless CMS and Application Framework built on Next.js",
5
5
  "keywords": [
6
6
  "admin panel",
@@ -97,7 +97,7 @@
97
97
  "tsx": "4.19.2",
98
98
  "uuid": "10.0.0",
99
99
  "ws": "^8.16.0",
100
- "@payloadcms/translations": "3.2.2-canary.451666e"
100
+ "@payloadcms/translations": "3.2.2-canary.49cfe5d"
101
101
  },
102
102
  "devDependencies": {
103
103
  "@hyrious/esbuild-plugin-commonjs": "^0.2.4",