@payloadcms/next 3.71.0-internal.ef75fa0 → 3.71.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"getIsLocked.d.ts","sourceRoot":"","sources":["../../../src/views/Document/getIsLocked.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,yBAAyB,EACzB,qBAAqB,EACrB,SAAS,EAEV,MAAM,SAAS,CAAA;AAKhB,KAAK,IAAI,GAAG;IACV,gBAAgB,CAAC,EAAE,yBAAyB,CAAA;IAC5C,YAAY,CAAC,EAAE,qBAAqB,CAAA;IACpC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,SAAS,EAAE,OAAO,CAAA;IAClB,GAAG,EAAE,cAAc,CAAA;CACpB,CAAA;AAED,KAAK,MAAM,GAAG,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,SAAS,CAAA;IACzB,QAAQ,EAAE,OAAO,CAAA;IACjB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAC,CAAA;AAEF,eAAO,MAAM,WAAW,4DAMrB,IAAI,KAAG,MAgFT,CAAA"}
1
+ {"version":3,"file":"getIsLocked.d.ts","sourceRoot":"","sources":["../../../src/views/Document/getIsLocked.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,yBAAyB,EACzB,qBAAqB,EACrB,SAAS,EAEV,MAAM,SAAS,CAAA;AAKhB,KAAK,IAAI,GAAG;IACV,gBAAgB,CAAC,EAAE,yBAAyB,CAAA;IAC5C,YAAY,CAAC,EAAE,qBAAqB,CAAA;IACpC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,SAAS,EAAE,OAAO,CAAA;IAClB,GAAG,EAAE,cAAc,CAAA;CACpB,CAAA;AAED,KAAK,MAAM,GAAG,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,SAAS,CAAA;IACzB,QAAQ,EAAE,OAAO,CAAA;IACjB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAC,CAAA;AAEF,eAAO,MAAM,WAAW,4DAMrB,IAAI,KAAG,MAwFT,CAAA"}
@@ -9,6 +9,13 @@ export const getIsLocked = async ({
9
9
  }) => {
10
10
  const entityConfig = collectionConfig || globalConfig;
11
11
  const entityHasLockingEnabled = entityConfig?.lockDocuments !== undefined ? entityConfig?.lockDocuments : true;
12
+ // Check if the locked-documents collection exists
13
+ if (!req.payload.collections?.['payload-locked-documents']) {
14
+ // If the collection doesn't exist, locking is not available
15
+ return {
16
+ isLocked: false
17
+ };
18
+ }
12
19
  if (!entityHasLockingEnabled || !isEditing) {
13
20
  return {
14
21
  isLocked: false
@@ -1 +1 @@
1
- {"version":3,"file":"getIsLocked.js","names":["sanitizeID","extractID","getIsLocked","id","collectionConfig","globalConfig","isEditing","req","entityConfig","entityHasLockingEnabled","lockDocuments","undefined","isLocked","where","lockDurationDefault","lockDuration","duration","lockDurationInMilliseconds","now","Date","getTime","and","globalSlug","equals","slug","updatedAt","greater_than","docs","payload","find","collection","depth","overrideAccess","length","currentEditor","user","value","lastUpdateTime"],"sources":["../../../src/views/Document/getIsLocked.ts"],"sourcesContent":["import type {\n PayloadRequest,\n SanitizedCollectionConfig,\n SanitizedGlobalConfig,\n TypedUser,\n Where,\n} from 'payload'\n\nimport { sanitizeID } from '@payloadcms/ui/shared'\nimport { extractID } from 'payload/shared'\n\ntype Args = {\n collectionConfig?: SanitizedCollectionConfig\n globalConfig?: SanitizedGlobalConfig\n id?: number | string\n isEditing: boolean\n req: PayloadRequest\n}\n\ntype Result = Promise<{\n currentEditor?: TypedUser\n isLocked: boolean\n lastUpdateTime?: number\n}>\n\nexport const getIsLocked = async ({\n id,\n collectionConfig,\n globalConfig,\n isEditing,\n req,\n}: Args): Result => {\n const entityConfig = collectionConfig || globalConfig\n\n const entityHasLockingEnabled =\n entityConfig?.lockDocuments !== undefined ? entityConfig?.lockDocuments : true\n\n if (!entityHasLockingEnabled || !isEditing) {\n return {\n isLocked: false,\n }\n }\n\n const where: Where = {}\n\n const lockDurationDefault = 300 // Default 5 minutes in seconds\n const lockDuration =\n typeof entityConfig.lockDocuments === 'object'\n ? entityConfig.lockDocuments.duration\n : lockDurationDefault\n const lockDurationInMilliseconds = lockDuration * 1000\n\n const now = new Date().getTime()\n\n if (globalConfig) {\n where.and = [\n {\n globalSlug: {\n equals: globalConfig.slug,\n },\n },\n {\n updatedAt: {\n greater_than: new Date(now - lockDurationInMilliseconds),\n },\n },\n ]\n } else {\n where.and = [\n {\n 'document.value': {\n equals: sanitizeID(id),\n },\n },\n {\n 'document.relationTo': {\n equals: collectionConfig.slug,\n },\n },\n {\n updatedAt: {\n greater_than: new Date(now - lockDurationInMilliseconds),\n },\n },\n ]\n }\n\n const { docs } = await req.payload.find({\n collection: 'payload-locked-documents',\n depth: 1,\n overrideAccess: false,\n req,\n where,\n })\n\n if (docs.length > 0) {\n const currentEditor = docs[0].user?.value\n const lastUpdateTime = new Date(docs[0].updatedAt).getTime()\n\n if (extractID(currentEditor) !== req.user.id) {\n return {\n currentEditor,\n isLocked: true,\n lastUpdateTime,\n }\n }\n }\n\n return {\n isLocked: false,\n }\n}\n"],"mappings":"AAQA,SAASA,UAAU,QAAQ;AAC3B,SAASC,SAAS,QAAQ;AAgB1B,OAAO,MAAMC,WAAA,GAAc,MAAAA,CAAO;EAChCC,EAAE;EACFC,gBAAgB;EAChBC,YAAY;EACZC,SAAS;EACTC;AAAG,CACE;EACL,MAAMC,YAAA,GAAeJ,gBAAA,IAAoBC,YAAA;EAEzC,MAAMI,uBAAA,GACJD,YAAA,EAAcE,aAAA,KAAkBC,SAAA,GAAYH,YAAA,EAAcE,aAAA,GAAgB;EAE5E,IAAI,CAACD,uBAAA,IAA2B,CAACH,SAAA,EAAW;IAC1C,OAAO;MACLM,QAAA,EAAU;IACZ;EACF;EAEA,MAAMC,KAAA,GAAe,CAAC;EAEtB,MAAMC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QACAtB,QAAA,EAAU;QACVyB;MACF;IACF;EACF;EAEA,OAAO;IACLzB,QAAA,EAAU;EACZ;AACF","ignoreList":[]}
1
+ {"version":3,"file":"getIsLocked.js","names":["sanitizeID","extractID","getIsLocked","id","collectionConfig","globalConfig","isEditing","req","entityConfig","entityHasLockingEnabled","lockDocuments","undefined","payload","collections","isLocked","where","lockDurationDefault","lockDuration","duration","lockDurationInMilliseconds","now","Date","getTime","and","globalSlug","equals","slug","updatedAt","greater_than","docs","find","collection","depth","overrideAccess","length","currentEditor","user","value","lastUpdateTime"],"sources":["../../../src/views/Document/getIsLocked.ts"],"sourcesContent":["import type {\n PayloadRequest,\n SanitizedCollectionConfig,\n SanitizedGlobalConfig,\n TypedUser,\n Where,\n} from 'payload'\n\nimport { sanitizeID } from '@payloadcms/ui/shared'\nimport { extractID } from 'payload/shared'\n\ntype Args = {\n collectionConfig?: SanitizedCollectionConfig\n globalConfig?: SanitizedGlobalConfig\n id?: number | string\n isEditing: boolean\n req: PayloadRequest\n}\n\ntype Result = Promise<{\n currentEditor?: TypedUser\n isLocked: boolean\n lastUpdateTime?: number\n}>\n\nexport const getIsLocked = async ({\n id,\n collectionConfig,\n globalConfig,\n isEditing,\n req,\n}: Args): Result => {\n const entityConfig = collectionConfig || globalConfig\n\n const entityHasLockingEnabled =\n entityConfig?.lockDocuments !== undefined ? entityConfig?.lockDocuments : true\n\n // Check if the locked-documents collection exists\n if (!req.payload.collections?.['payload-locked-documents']) {\n // If the collection doesn't exist, locking is not available\n return {\n isLocked: false,\n }\n }\n\n if (!entityHasLockingEnabled || !isEditing) {\n return {\n isLocked: false,\n }\n }\n\n const where: Where = {}\n\n const lockDurationDefault = 300 // Default 5 minutes in seconds\n const lockDuration =\n typeof entityConfig.lockDocuments === 'object'\n ? entityConfig.lockDocuments.duration\n : lockDurationDefault\n const lockDurationInMilliseconds = lockDuration * 1000\n\n const now = new Date().getTime()\n\n if (globalConfig) {\n where.and = [\n {\n globalSlug: {\n equals: globalConfig.slug,\n },\n },\n {\n updatedAt: {\n greater_than: new Date(now - lockDurationInMilliseconds),\n },\n },\n ]\n } else {\n where.and = [\n {\n 'document.value': {\n equals: sanitizeID(id),\n },\n },\n {\n 'document.relationTo': {\n equals: collectionConfig.slug,\n },\n },\n {\n updatedAt: {\n greater_than: new Date(now - lockDurationInMilliseconds),\n },\n },\n ]\n }\n\n const { docs } = await req.payload.find({\n collection: 'payload-locked-documents',\n depth: 1,\n overrideAccess: false,\n req,\n where,\n })\n\n if (docs.length > 0) {\n const currentEditor = docs[0].user?.value\n const lastUpdateTime = new Date(docs[0].updatedAt).getTime()\n\n if (extractID(currentEditor) !== req.user.id) {\n return {\n currentEditor,\n isLocked: true,\n lastUpdateTime,\n }\n }\n }\n\n return {\n isLocked: false,\n }\n}\n"],"mappings":"AAQA,SAASA,UAAU,QAAQ;AAC3B,SAASC,SAAS,QAAQ;AAgB1B,OAAO,MAAMC,WAAA,GAAc,MAAAA,CAAO;EAChCC,EAAE;EACFC,gBAAgB;EAChBC,YAAY;EACZC,SAAS;EACTC;AAAG,CACE;EACL,MAAMC,YAAA,GAAeJ,gBAAA,IAAoBC,YAAA;EAEzC,MAAMI,uBAAA,GACJD,YAAA,EAAcE,aAAA,KAAkBC,SAAA,GAAYH,YAAA,EAAcE,aAAA,GAAgB;EAE5E;EACA,IAAI,CAACH,GAAA,CAAIK,OAAO,CAACC,WAAW,GAAG,2BAA2B,EAAE;IAC1D;IACA,OAAO;MACLC,QAAA,EAAU;IACZ;EACF;EAEA,IAAI,CAACL,uBAAA,IAA2B,CAACH,SAAA,EAAW;IAC1C,OAAO;MACLQ,QAAA,EAAU;IACZ;EACF;EAEA,MAAMC,KAAA,GAAe,CAAC;EAEtB,MAAMC,mBAAA,GAAsB,IAAI;EAAA;EAChC,MAAMC,YAAA,GACJ,OAAOT,YAAA,CAAaE,aAAa,KAAK,WAClCF,YAAA,CAAaE,aAAa,CAACQ,QAAQ,GACnCF,mBAAA;EACN,MAAMG,0BAAA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":["../../../src/views/Document/renderDocumentSlots.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,aAAa,EAEb,cAAc,EAGd,yBAAyB,EACzB,4BAA4B,EAC5B,qBAAqB,EAGrB,cAAc,EAKf,MAAM,SAAS,CAAA;AAQhB,eAAO,MAAM,mBAAmB,EAAE,CAAC,IAAI,EAAE;IACvC,gBAAgB,CAAC,EAAE,yBAAyB,CAAA;IAC5C,YAAY,CAAC,EAAE,qBAAqB,CAAA;IACpC,iBAAiB,EAAE,OAAO,CAAA;IAC1B,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,WAAW,EAAE,4BAA4B,CAAA;IACzC,GAAG,EAAE,cAAc,CAAA;CACpB,KAAK,aAqJL,CAAA;AAED,eAAO,MAAM,0BAA0B,EAAE,cAAc,CAAC;IACtD,cAAc,EAAE,MAAM,CAAA;IACtB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACrB,CAsBA,CAAA"}
1
+ {"version":3,"file":"renderDocumentSlots.d.ts","sourceRoot":"","sources":["../../../src/views/Document/renderDocumentSlots.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,aAAa,EAEb,cAAc,EAGd,yBAAyB,EACzB,4BAA4B,EAC5B,qBAAqB,EAGrB,cAAc,EAKf,MAAM,SAAS,CAAA;AAQhB,eAAO,MAAM,mBAAmB,EAAE,CAAC,IAAI,EAAE;IACvC,gBAAgB,CAAC,EAAE,yBAAyB,CAAA;IAC5C,YAAY,CAAC,EAAE,qBAAqB,CAAA;IACpC,iBAAiB,EAAE,OAAO,CAAA;IAC1B,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,WAAW,EAAE,4BAA4B,CAAA;IACzC,GAAG,EAAE,cAAc,CAAA;CACpB,KAAK,aAmKL,CAAA;AAED,eAAO,MAAM,0BAA0B,EAAE,cAAc,CAAC;IACtD,cAAc,EAAE,MAAM,CAAA;IACtB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACrB,CAsBA,CAAA"}
@@ -69,6 +69,16 @@ export const renderDocumentSlots = args => {
69
69
  serverProps: serverProps
70
70
  });
71
71
  }
72
+ if (collectionConfig?.versions?.drafts || globalConfig?.versions?.drafts) {
73
+ const CustomStatus = collectionConfig?.admin?.components?.edit?.Status || globalConfig?.admin?.components?.elements?.Status;
74
+ if (CustomStatus) {
75
+ components.Status = RenderServerComponent({
76
+ Component: CustomStatus,
77
+ importMap: req.payload.importMap,
78
+ serverProps
79
+ });
80
+ }
81
+ }
72
82
  if (hasSavePermission) {
73
83
  if (hasDraftsEnabled(collectionConfig || globalConfig)) {
74
84
  const CustomPublishButton = collectionConfig?.admin?.components?.edit?.PublishButton || globalConfig?.admin?.components?.elements?.PublishButton;
@@ -1 +1 @@
1
- {"version":3,"file":"renderDocumentSlots.js","names":["ViewDescription","RenderServerComponent","hasDraftsEnabled","getDocumentPermissions","renderDocumentSlots","args","id","collectionConfig","globalConfig","hasSavePermission","req","components","unsavedDraftWithValidations","undefined","isPreviewEnabled","admin","preview","serverProps","i18n","payload","user","BeforeDocumentControls","edit","beforeDocumentControls","elements","Component","importMap","EditMenuItems","editMenuItems","CustomPreviewButton","PreviewButton","LivePreview","views","livePreview","descriptionFromConfig","description","staticDescription","t","CustomDescription","Description","hasDescription","clientProps","collectionSlug","slug","Fallback","CustomPublishButton","PublishButton","CustomSaveDraftButton","SaveDraftButton","draftsEnabled","CustomSaveButton","SaveButton","upload","Upload","controls","UploadControls","renderDocumentSlotsHandler","collections","config","Error","docPermissions","data","permissions"],"sources":["../../../src/views/Document/renderDocumentSlots.tsx"],"sourcesContent":["import type {\n BeforeDocumentControlsServerPropsOnly,\n DocumentSlots,\n EditMenuItemsServerPropsOnly,\n PayloadRequest,\n PreviewButtonServerPropsOnly,\n PublishButtonServerPropsOnly,\n SanitizedCollectionConfig,\n SanitizedDocumentPermissions,\n SanitizedGlobalConfig,\n SaveButtonServerPropsOnly,\n SaveDraftButtonServerPropsOnly,\n ServerFunction,\n ServerProps,\n StaticDescription,\n ViewDescriptionClientProps,\n ViewDescriptionServerPropsOnly,\n} from 'payload'\n\nimport { ViewDescription } from '@payloadcms/ui'\nimport { RenderServerComponent } from '@payloadcms/ui/elements/RenderServerComponent'\nimport { hasDraftsEnabled } from 'payload/shared'\n\nimport { getDocumentPermissions } from './getDocumentPermissions.js'\n\nexport const renderDocumentSlots: (args: {\n collectionConfig?: SanitizedCollectionConfig\n globalConfig?: SanitizedGlobalConfig\n hasSavePermission: boolean\n id?: number | string\n permissions: SanitizedDocumentPermissions\n req: PayloadRequest\n}) => DocumentSlots = (args) => {\n const { id, collectionConfig, globalConfig, hasSavePermission, req } = args\n\n const components: DocumentSlots = {} as DocumentSlots\n\n const unsavedDraftWithValidations = undefined\n\n const isPreviewEnabled = collectionConfig?.admin?.preview || globalConfig?.admin?.preview\n\n const serverProps: ServerProps = {\n id,\n i18n: req.i18n,\n payload: req.payload,\n user: req.user,\n // TODO: Add remaining serverProps\n }\n\n const BeforeDocumentControls =\n collectionConfig?.admin?.components?.edit?.beforeDocumentControls ||\n globalConfig?.admin?.components?.elements?.beforeDocumentControls\n\n if (BeforeDocumentControls) {\n components.BeforeDocumentControls = RenderServerComponent({\n Component: BeforeDocumentControls,\n importMap: req.payload.importMap,\n serverProps: serverProps satisfies BeforeDocumentControlsServerPropsOnly,\n })\n }\n\n const EditMenuItems = collectionConfig?.admin?.components?.edit?.editMenuItems\n\n if (EditMenuItems) {\n components.EditMenuItems = RenderServerComponent({\n Component: EditMenuItems,\n importMap: req.payload.importMap,\n serverProps: serverProps satisfies EditMenuItemsServerPropsOnly,\n })\n }\n\n const CustomPreviewButton =\n collectionConfig?.admin?.components?.edit?.PreviewButton ||\n globalConfig?.admin?.components?.elements?.PreviewButton\n\n if (isPreviewEnabled && CustomPreviewButton) {\n components.PreviewButton = RenderServerComponent({\n Component: CustomPreviewButton,\n importMap: req.payload.importMap,\n serverProps: serverProps satisfies PreviewButtonServerPropsOnly,\n })\n }\n\n const LivePreview =\n collectionConfig?.admin?.components?.views?.edit?.livePreview ||\n globalConfig?.admin?.components?.views?.edit?.livePreview\n\n if (LivePreview?.Component) {\n components.LivePreview = RenderServerComponent({\n Component: LivePreview.Component,\n importMap: req.payload.importMap,\n serverProps,\n })\n }\n\n const descriptionFromConfig =\n collectionConfig?.admin?.description || globalConfig?.admin?.description\n\n const staticDescription: StaticDescription =\n typeof descriptionFromConfig === 'function'\n ? descriptionFromConfig({ t: req.i18n.t })\n : descriptionFromConfig\n\n const CustomDescription =\n collectionConfig?.admin?.components?.Description ||\n globalConfig?.admin?.components?.elements?.Description\n\n const hasDescription = CustomDescription || staticDescription\n\n if (hasDescription) {\n components.Description = RenderServerComponent({\n clientProps: {\n collectionSlug: collectionConfig?.slug,\n description: staticDescription,\n } satisfies ViewDescriptionClientProps,\n Component: CustomDescription,\n Fallback: ViewDescription,\n importMap: req.payload.importMap,\n serverProps: serverProps satisfies ViewDescriptionServerPropsOnly,\n })\n }\n\n if (hasSavePermission) {\n if (hasDraftsEnabled(collectionConfig || globalConfig)) {\n const CustomPublishButton =\n collectionConfig?.admin?.components?.edit?.PublishButton ||\n globalConfig?.admin?.components?.elements?.PublishButton\n\n if (CustomPublishButton) {\n components.PublishButton = RenderServerComponent({\n Component: CustomPublishButton,\n importMap: req.payload.importMap,\n serverProps: serverProps satisfies PublishButtonServerPropsOnly,\n })\n }\n\n const CustomSaveDraftButton =\n collectionConfig?.admin?.components?.edit?.SaveDraftButton ||\n globalConfig?.admin?.components?.elements?.SaveDraftButton\n\n const draftsEnabled = hasDraftsEnabled(collectionConfig || globalConfig)\n\n if ((draftsEnabled || unsavedDraftWithValidations) && CustomSaveDraftButton) {\n components.SaveDraftButton = RenderServerComponent({\n Component: CustomSaveDraftButton,\n importMap: req.payload.importMap,\n serverProps: serverProps satisfies SaveDraftButtonServerPropsOnly,\n })\n }\n } else {\n const CustomSaveButton =\n collectionConfig?.admin?.components?.edit?.SaveButton ||\n globalConfig?.admin?.components?.elements?.SaveButton\n\n if (CustomSaveButton) {\n components.SaveButton = RenderServerComponent({\n Component: CustomSaveButton,\n importMap: req.payload.importMap,\n serverProps: serverProps satisfies SaveButtonServerPropsOnly,\n })\n }\n }\n }\n\n if (collectionConfig?.upload && collectionConfig?.admin?.components?.edit?.Upload) {\n components.Upload = RenderServerComponent({\n Component: collectionConfig.admin.components.edit.Upload,\n importMap: req.payload.importMap,\n serverProps,\n })\n }\n\n if (collectionConfig?.upload && collectionConfig.upload.admin?.components?.controls) {\n components.UploadControls = RenderServerComponent({\n Component: collectionConfig.upload.admin.components.controls,\n importMap: req.payload.importMap,\n serverProps,\n })\n }\n\n return components\n}\n\nexport const renderDocumentSlotsHandler: ServerFunction<{\n collectionSlug: string\n id?: number | string\n}> = async (args) => {\n const { id, collectionSlug, req } = args\n\n const collectionConfig = req.payload.collections[collectionSlug]?.config\n\n if (!collectionConfig) {\n throw new Error(req.t('error:incorrectCollection'))\n }\n\n const { docPermissions, hasSavePermission } = await getDocumentPermissions({\n collectionConfig,\n data: {},\n req,\n })\n\n return renderDocumentSlots({\n id,\n collectionConfig,\n hasSavePermission,\n permissions: docPermissions,\n req,\n })\n}\n"],"mappings":"AAmBA,SAASA,eAAe,QAAQ;AAChC,SAASC,qBAAqB,QAAQ;AACtC,SAASC,gBAAgB,QAAQ;AAEjC,SAASC,sBAAsB,QAAQ;AAEvC,OAAO,MAAMC,mBAAA,GAOUC,IAAA;EACrB,MAAM;IAAEC,EAAE;IAAEC,gBAAgB;IAAEC,YAAY;IAAEC,iBAAiB;IAAEC;EAAG,CAAE,GAAGL,IAAA;EAEvE,MAAMM,UAAA,GAA4B,CAAC;EAEnC,MAAMC,2BAAA,GAA8BC,SAAA;EAEpC,MAAMC,gBAAA,GAAmBP,gBAAA,EAAkBQ,KAAA,EAAOC,OAAA,IAAWR,YAAA,EAAcO,KAAA,EAAOC,OAAA;EAElF,MAAMC,WAAA,GAA2B;IAC/BX,EAAA;IACAY,IA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MAAM,GAAGpD,qBAAA,CAAsB;MACxCwB,SAAA,EAAWlB,gBAAA,CAAiBQ,KAAK,CAACJ,UAAU,CAACW,IAAI,CAAC+B,MAAM;MACxD3B,SAAA,EAAWhB,GAAA,CAAIS,OAAO,CAACO,SAAS;MAChCT;IACF;EACF;EAEA,IAAIV,gBAAA,EAAkB6C,MAAA,IAAU7C,gBAAA,CAAiB6C,MAAM,CAACrC,KAAK,EAAEJ,UAAA,EAAY2C,QAAA,EAAU;IACnF3C,UAAA,CAAW4C,cAAc,GAAGtD,qBAAA,CAAsB;MAChDwB,SAAA,EAAWlB,gBAAA,CAAiB6C,MAAM,CAACrC,KAAK,CAACJ,UAAU,CAAC2C,QAAQ;MAC5D5B,SAAA,EAAWhB,GAAA,CAAIS,OAAO,CAACO,SAAS;MAChCT;IACF;EACF;EAEA,OAAON,UAAA;AACT;AAEA,OAAO,MAAM6C,0BAAA,GAGR,MAAOnD,IAAA;EACV,MAAM;IAAEC,EAAE;IAAEoC,cAAc;IAAEhC;EAAG,CAAE,GAAGL,IAAA;EAEpC,MAAME,gBAAA,GAAmBG,GAAA,CAAIS,OAAO,CAACsC,WAAW,CAACf,cAAA,CAAe,EAAEgB,MAAA;EAElE,IAAI,CAACnD,gBAAA,EAAkB;IACrB,MAAM,IAAIoD,KAAA,CAAMjD,GAAA,CAAI2B,CAAC,CAAC;EACxB;EAEA,MAAM;IAAEuB,cAAc;IAAEnD;EAAiB,CAAE,GAAG,MAAMN,sBAAA,CAAuB;IACzEI,gBAAA;IACAsD,IAAA,EAAM,CAAC;IACPnD;EACF;EAEA,OAAON,mBAAA,CAAoB;IACzBE,EAAA;IACAC,gBAAA;IACAE,iBAAA;IACAqD,WAAA,EAAaF,cAAA;IACblD;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"file":"renderDocumentSlots.js","names":["ViewDescription","RenderServerComponent","hasDraftsEnabled","getDocumentPermissions","renderDocumentSlots","args","id","collectionConfig","globalConfig","hasSavePermission","req","components","unsavedDraftWithValidations","undefined","isPreviewEnabled","admin","preview","serverProps","i18n","payload","user","BeforeDocumentControls","edit","beforeDocumentControls","elements","Component","importMap","EditMenuItems","editMenuItems","CustomPreviewButton","PreviewButton","LivePreview","views","livePreview","descriptionFromConfig","description","staticDescription","t","CustomDescription","Description","hasDescription","clientProps","collectionSlug","slug","Fallback","versions","drafts","CustomStatus","Status","CustomPublishButton","PublishButton","CustomSaveDraftButton","SaveDraftButton","draftsEnabled","CustomSaveButton","SaveButton","upload","Upload","controls","UploadControls","renderDocumentSlotsHandler","collections","config","Error","docPermissions","data","permissions"],"sources":["../../../src/views/Document/renderDocumentSlots.tsx"],"sourcesContent":["import type {\n BeforeDocumentControlsServerPropsOnly,\n DocumentSlots,\n EditMenuItemsServerPropsOnly,\n PayloadRequest,\n PreviewButtonServerPropsOnly,\n PublishButtonServerPropsOnly,\n SanitizedCollectionConfig,\n SanitizedDocumentPermissions,\n SanitizedGlobalConfig,\n SaveButtonServerPropsOnly,\n SaveDraftButtonServerPropsOnly,\n ServerFunction,\n ServerProps,\n StaticDescription,\n ViewDescriptionClientProps,\n ViewDescriptionServerPropsOnly,\n} from 'payload'\n\nimport { ViewDescription } from '@payloadcms/ui'\nimport { RenderServerComponent } from '@payloadcms/ui/elements/RenderServerComponent'\nimport { hasDraftsEnabled } from 'payload/shared'\n\nimport { getDocumentPermissions } from './getDocumentPermissions.js'\n\nexport const renderDocumentSlots: (args: {\n collectionConfig?: SanitizedCollectionConfig\n globalConfig?: SanitizedGlobalConfig\n hasSavePermission: boolean\n id?: number | string\n permissions: SanitizedDocumentPermissions\n req: PayloadRequest\n}) => DocumentSlots = (args) => {\n const { id, collectionConfig, globalConfig, hasSavePermission, req } = args\n\n const components: DocumentSlots = {} as DocumentSlots\n\n const unsavedDraftWithValidations = undefined\n\n const isPreviewEnabled = collectionConfig?.admin?.preview || globalConfig?.admin?.preview\n\n const serverProps: ServerProps = {\n id,\n i18n: req.i18n,\n payload: req.payload,\n user: req.user,\n // TODO: Add remaining serverProps\n }\n\n const BeforeDocumentControls =\n collectionConfig?.admin?.components?.edit?.beforeDocumentControls ||\n globalConfig?.admin?.components?.elements?.beforeDocumentControls\n\n if (BeforeDocumentControls) {\n components.BeforeDocumentControls = RenderServerComponent({\n Component: BeforeDocumentControls,\n importMap: req.payload.importMap,\n serverProps: serverProps satisfies BeforeDocumentControlsServerPropsOnly,\n })\n }\n\n const EditMenuItems = collectionConfig?.admin?.components?.edit?.editMenuItems\n\n if (EditMenuItems) {\n components.EditMenuItems = RenderServerComponent({\n Component: EditMenuItems,\n importMap: req.payload.importMap,\n serverProps: serverProps satisfies EditMenuItemsServerPropsOnly,\n })\n }\n\n const CustomPreviewButton =\n collectionConfig?.admin?.components?.edit?.PreviewButton ||\n globalConfig?.admin?.components?.elements?.PreviewButton\n\n if (isPreviewEnabled && CustomPreviewButton) {\n components.PreviewButton = RenderServerComponent({\n Component: CustomPreviewButton,\n importMap: req.payload.importMap,\n serverProps: serverProps satisfies PreviewButtonServerPropsOnly,\n })\n }\n\n const LivePreview =\n collectionConfig?.admin?.components?.views?.edit?.livePreview ||\n globalConfig?.admin?.components?.views?.edit?.livePreview\n\n if (LivePreview?.Component) {\n components.LivePreview = RenderServerComponent({\n Component: LivePreview.Component,\n importMap: req.payload.importMap,\n serverProps,\n })\n }\n\n const descriptionFromConfig =\n collectionConfig?.admin?.description || globalConfig?.admin?.description\n\n const staticDescription: StaticDescription =\n typeof descriptionFromConfig === 'function'\n ? descriptionFromConfig({ t: req.i18n.t })\n : descriptionFromConfig\n\n const CustomDescription =\n collectionConfig?.admin?.components?.Description ||\n globalConfig?.admin?.components?.elements?.Description\n\n const hasDescription = CustomDescription || staticDescription\n\n if (hasDescription) {\n components.Description = RenderServerComponent({\n clientProps: {\n collectionSlug: collectionConfig?.slug,\n description: staticDescription,\n } satisfies ViewDescriptionClientProps,\n Component: CustomDescription,\n Fallback: ViewDescription,\n importMap: req.payload.importMap,\n serverProps: serverProps satisfies ViewDescriptionServerPropsOnly,\n })\n }\n\n if (collectionConfig?.versions?.drafts || globalConfig?.versions?.drafts) {\n const CustomStatus =\n collectionConfig?.admin?.components?.edit?.Status ||\n globalConfig?.admin?.components?.elements?.Status\n\n if (CustomStatus) {\n components.Status = RenderServerComponent({\n Component: CustomStatus,\n importMap: req.payload.importMap,\n serverProps,\n })\n }\n }\n\n if (hasSavePermission) {\n if (hasDraftsEnabled(collectionConfig || globalConfig)) {\n const CustomPublishButton =\n collectionConfig?.admin?.components?.edit?.PublishButton ||\n globalConfig?.admin?.components?.elements?.PublishButton\n\n if (CustomPublishButton) {\n components.PublishButton = RenderServerComponent({\n Component: CustomPublishButton,\n importMap: req.payload.importMap,\n serverProps: serverProps satisfies PublishButtonServerPropsOnly,\n })\n }\n\n const CustomSaveDraftButton =\n collectionConfig?.admin?.components?.edit?.SaveDraftButton ||\n globalConfig?.admin?.components?.elements?.SaveDraftButton\n\n const draftsEnabled = hasDraftsEnabled(collectionConfig || globalConfig)\n\n if ((draftsEnabled || unsavedDraftWithValidations) && CustomSaveDraftButton) {\n components.SaveDraftButton = RenderServerComponent({\n Component: CustomSaveDraftButton,\n importMap: req.payload.importMap,\n serverProps: serverProps satisfies SaveDraftButtonServerPropsOnly,\n })\n }\n } else {\n const CustomSaveButton =\n collectionConfig?.admin?.components?.edit?.SaveButton ||\n globalConfig?.admin?.components?.elements?.SaveButton\n\n if (CustomSaveButton) {\n components.SaveButton = RenderServerComponent({\n Component: CustomSaveButton,\n importMap: req.payload.importMap,\n serverProps: serverProps satisfies SaveButtonServerPropsOnly,\n })\n }\n }\n }\n\n if (collectionConfig?.upload && collectionConfig?.admin?.components?.edit?.Upload) {\n components.Upload = RenderServerComponent({\n Component: collectionConfig.admin.components.edit.Upload,\n importMap: req.payload.importMap,\n serverProps,\n })\n }\n\n if (collectionConfig?.upload && collectionConfig.upload.admin?.components?.controls) {\n components.UploadControls = RenderServerComponent({\n Component: collectionConfig.upload.admin.components.controls,\n importMap: req.payload.importMap,\n serverProps,\n })\n }\n\n return components\n}\n\nexport const renderDocumentSlotsHandler: ServerFunction<{\n collectionSlug: string\n id?: number | string\n}> = async (args) => {\n const { id, collectionSlug, req } = args\n\n const collectionConfig = req.payload.collections[collectionSlug]?.config\n\n if (!collectionConfig) {\n throw new Error(req.t('error:incorrectCollection'))\n }\n\n const { docPermissions, hasSavePermission } = await getDocumentPermissions({\n collectionConfig,\n data: {},\n req,\n })\n\n return renderDocumentSlots({\n id,\n collectionConfig,\n hasSavePermission,\n permissions: docPermissions,\n req,\n })\n}\n"],"mappings":"AAmBA,SAASA,eAAe,QAAQ;AAChC,SAASC,qBAAqB,QAAQ;AACtC,SAASC,gBAAgB,QAAQ;AAEjC,SAASC,sBAAsB,QAAQ;AAEvC,OAAO,MAAMC,mBAAA,GAOUC,IAAA;EACrB,MAAM;IAAEC,EAAE;IAAEC,gBAAgB;IAAEC,YAAY;IAAEC,iBAAiB;IAAEC;EAAG,CAAE,GAAGL,IAAA;EAEvE,MAAMM,UAAA,GAA4B,CAAC;EAEnC,MAAMC,2BAAA,GAA8BC,SAAA;EAEpC,MAAMC,gBAAA,GAAmBP,gBAAA,EAAkBQ,KAAA,EAAOC,OAAA,IAAWR,YAAA,EAAcO,KAAA,EAAOC,OAAA;EAElF,MAAMC,WAAA,GAA2B;IAC/BX,EAAA;IACAY,IAAA,EAAMR,GAAA,CAAIQ,IAAI;IACdC,OAAA,EAAST,GAAA,CAAIS,OAAO;IACpBC,IAAA,EAAMV,GAAA,CAAIU;EAEZ;EAEA,MAAMC,sBAAA,GACJd,gBAAA,EAAkBQ,KAAA,EAAOJ,UAAA,EAAYW,IAAA,EAAMC,sBAAA,IAC3Cf,YAAA,EAAcO,KAAA,EAAOJ,UAAA,EAAYa,QAAA,EAAUD,sBAAA;EAE7C,IAAIF,sBAAA,EAAwB;IAC1BV,UAAA,CAAWU,sBAAsB,GAAGpB,qBAAA,CAAsB;MACxDwB,SAAA,EAAWJ,sBAAA;MACXK,SAAA,EAAWhB,GAAA,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AAA,EAAQ;IACjF9C,UAAA,CAAW8C,MAAM,GAAGxD,qBAAA,CAAsB;MACxCwB,SAAA,EAAWlB,gBAAA,CAAiBQ,KAAK,CAACJ,UAAU,CAACW,IAAI,CAACmC,MAAM;MACxD/B,SAAA,EAAWhB,GAAA,CAAIS,OAAO,CAACO,SAAS;MAChCT;IACF;EACF;EAEA,IAAIV,gBAAA,EAAkBiD,MAAA,IAAUjD,gBAAA,CAAiBiD,MAAM,CAACzC,KAAK,EAAEJ,UAAA,EAAY+C,QAAA,EAAU;IACnF/C,UAAA,CAAWgD,cAAc,GAAG1D,qBAAA,CAAsB;MAChDwB,SAAA,EAAWlB,gBAAA,CAAiBiD,MAAM,CAACzC,KAAK,CAACJ,UAAU,CAAC+C,QAAQ;MAC5DhC,SAAA,EAAWhB,GAAA,CAAIS,OAAO,CAACO,SAAS;MAChCT;IACF;EACF;EAEA,OAAON,UAAA;AACT;AAEA,OAAO,MAAMiD,0BAAA,GAGR,MAAOvD,IAAA;EACV,MAAM;IAAEC,EAAE;IAAEoC,cAAc;IAAEhC;EAAG,CAAE,GAAGL,IAAA;EAEpC,MAAME,gBAAA,GAAmBG,GAAA,CAAIS,OAAO,CAAC0C,WAAW,CAACnB,cAAA,CAAe,EAAEoB,MAAA;EAElE,IAAI,CAACvD,gBAAA,EAAkB;IACrB,MAAM,IAAIwD,KAAA,CAAMrD,GAAA,CAAI2B,CAAC,CAAC;EACxB;EAEA,MAAM;IAAE2B,cAAc;IAAEvD;EAAiB,CAAE,GAAG,MAAMN,sBAAA,CAAuB;IACzEI,gBAAA;IACA0D,IAAA,EAAM,CAAC;IACPvD;EACF;EAEA,OAAON,mBAAA,CAAoB;IACzBE,EAAA;IACAC,gBAAA;IACAE,iBAAA;IACAyD,WAAA,EAAaF,cAAA;IACbtD;EACF;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"withPayload.d.ts","sourceRoot":"","sources":["../../src/withPayload/withPayload.js"],"names":[],"mappings":"AAsBO,yCAJI,OAAO,MAAM,EAAE,UAAU,YAEjC;IAA0B,uBAAuB,GAAzC,OAAO;CAA6F,6BAkN9G"}
1
+ {"version":3,"file":"withPayload.d.ts","sourceRoot":"","sources":["../../src/withPayload/withPayload.js"],"names":[],"mappings":"AAsBO,yCAJI,OAAO,MAAM,EAAE,UAAU,YAEjC;IAA0B,uBAAuB,GAAzC,OAAO;CAA6F,6BAmN9G"}
@@ -144,6 +144,7 @@ export const withPayload = (nextConfig = {}, options = {}) => {
144
144
  }
145
145
  };
146
146
  if (nextConfig.basePath) {
147
+ process.env.NEXT_BASE_PATH = nextConfig.basePath;
147
148
  baseConfig.env.NEXT_BASE_PATH = nextConfig.basePath;
148
149
  }
149
150
  if (!supportsTurbopackBuild) {
@@ -1 +1 @@
1
- {"version":3,"file":"withPayload.js","names":["getNextjsVersion","supportsTurbopackExternalizeTransitiveDependencies","withPayloadLegacy","poweredByHeader","key","value","withPayload","nextConfig","options","nextjsVersion","supportsTurbopackBuild","env","experimental","staleTimes","dynamic","console","warn","NEXT_PUBLIC_ENABLE_ROUTER_CACHE_REFRESH","baseConfig","outputFileTracingExcludes","outputFileTracingIncludes","turbopack","headers","headersFromConfig","source","serverExternalPackages","process","NODE_ENV","devBundleServerPackages","webpack","webpackConfig","webpackOptions","incomingWebpackConfig","externals","plugins","IgnorePlugin","resourceRegExp","resolve","alias","fallback","aws4","basePath","NEXT_BASE_PATH"],"sources":["../../src/withPayload/withPayload.js"],"sourcesContent":["/**\n * These files must remain as plain JavaScript (.js) rather than TypeScript (.ts) because they are\n * imported directly in next.config.mjs files. Since next.config files run before the build process,\n * TypeScript compilation is not available. This ensures compatibility with all templates and\n * user projects regardless of their TypeScript setup.\n */\nimport {\n getNextjsVersion,\n supportsTurbopackExternalizeTransitiveDependencies,\n} from './withPayload.utils.js'\nimport { withPayloadLegacy } from './withPayloadLegacy.js'\n\nconst poweredByHeader = {\n key: 'X-Powered-By',\n value: 'Next.js, Payload',\n}\n\n/**\n * @param {import('next').NextConfig} nextConfig\n * @param {Object} [options] - Optional configuration options\n * @param {boolean} [options.devBundleServerPackages] - Whether to bundle server packages in development mode. @default false\n * */\nexport const withPayload = (nextConfig = {}, options = {}) => {\n const nextjsVersion = getNextjsVersion()\n\n const supportsTurbopackBuild = supportsTurbopackExternalizeTransitiveDependencies(nextjsVersion)\n\n const env = nextConfig.env || {}\n\n if (nextConfig.experimental?.staleTimes?.dynamic) {\n console.warn(\n 'Payload detected a non-zero value for the `staleTimes.dynamic` option in your Next.js config. This will slow down page transitions and may cause stale data to load within the Admin panel. To clear this warning, remove the `staleTimes.dynamic` option from your Next.js config or set it to 0. In the future, Next.js may support scoping this option to specific routes.',\n )\n env.NEXT_PUBLIC_ENABLE_ROUTER_CACHE_REFRESH = 'true'\n }\n\n /** @type {import('next').NextConfig} */\n const baseConfig = {\n ...nextConfig,\n env,\n outputFileTracingExcludes: {\n ...(nextConfig.outputFileTracingExcludes || {}),\n '**/*': [\n ...(nextConfig.outputFileTracingExcludes?.['**/*'] || []),\n 'drizzle-kit',\n 'drizzle-kit/api',\n ],\n },\n outputFileTracingIncludes: {\n ...(nextConfig.outputFileTracingIncludes || {}),\n '**/*': [...(nextConfig.outputFileTracingIncludes?.['**/*'] || []), '@libsql/client'],\n },\n turbopack: {\n ...(nextConfig.turbopack || {}),\n },\n // We disable the poweredByHeader here because we add it manually in the headers function below\n ...(nextConfig.poweredByHeader !== false ? { poweredByHeader: false } : {}),\n headers: async () => {\n const headersFromConfig = 'headers' in nextConfig ? await nextConfig.headers() : []\n\n return [\n ...(headersFromConfig || []),\n {\n headers: [\n {\n key: 'Accept-CH',\n value: 'Sec-CH-Prefers-Color-Scheme',\n },\n {\n key: 'Vary',\n value: 'Sec-CH-Prefers-Color-Scheme',\n },\n {\n key: 'Critical-CH',\n value: 'Sec-CH-Prefers-Color-Scheme',\n },\n ...(nextConfig.poweredByHeader !== false ? [poweredByHeader] : []),\n ],\n source: '/:path*',\n },\n ]\n },\n serverExternalPackages: [\n ...(nextConfig.serverExternalPackages || []),\n // WHY: without externalizing graphql, a graphql version error will be thrown\n // during runtime (\"Ensure that there is only one instance of \\\"graphql\\\" in the node_modules\\ndirectory.\")\n 'graphql',\n ...(process.env.NODE_ENV === 'development' && options.devBundleServerPackages !== true\n ? /**\n * Unless explicitly disabled by the user, by passing `devBundleServerPackages: true` to withPayload, we\n * do not bundle server-only packages during dev for two reasons:\n *\n * 1. Performance: Fewer files to compile means faster compilation speeds.\n * 2. Turbopack support: Webpack's externals are not supported by Turbopack.\n *\n * Regarding Turbopack support: Unlike webpack.externals, we cannot use serverExternalPackages to\n * externalized packages that are not resolvable from the project root. So including a package like\n * \"drizzle-kit\" in here would do nothing - Next.js will ignore the rule and still bundle the package -\n * because it detects that the package is not resolvable from the project root (= not directly installed\n * by the user in their own package.json).\n *\n * Instead, we can use serverExternalPackages for the entry-point packages that *are* installed directly\n * by the user (e.g. db-postgres, which then installs drizzle-kit as a dependency).\n *\n *\n *\n * We should only do this during development, not build, because externalizing these packages can hurt\n * the bundle size. Not only does it disable tree-shaking, it also risks installing duplicate copies of the\n * same package.\n *\n * Example:\n * - @payloadcms/richtext-lexical (in bundle) -> installs qs-esm (bundled because of importer)\n * - payload (not in bundle, external) -> installs qs-esm (external because of importer)\n * Result: we have two copies of qs-esm installed - one in the bundle, and one in node_modules.\n *\n * During development, these bundle size difference do not matter much, and development speed /\n * turbopack support are more important.\n */\n [\n 'payload',\n '@payloadcms/db-mongodb',\n '@payloadcms/db-postgres',\n '@payloadcms/db-sqlite',\n '@payloadcms/db-vercel-postgres',\n '@payloadcms/db-d1-sqlite',\n '@payloadcms/drizzle',\n '@payloadcms/email-nodemailer',\n '@payloadcms/email-resend',\n '@payloadcms/graphql',\n '@payloadcms/payload-cloud',\n '@payloadcms/plugin-redirects',\n // TODO: Add the following packages, excluding their /client subpath exports, once Next.js supports it\n // see: https://github.com/vercel/next.js/discussions/76991\n //'@payloadcms/plugin-cloud-storage',\n //'@payloadcms/plugin-sentry',\n //'@payloadcms/plugin-stripe',\n // @payloadcms/richtext-lexical\n //'@payloadcms/storage-azure',\n //'@payloadcms/storage-gcs',\n //'@payloadcms/storage-s3',\n //'@payloadcms/storage-uploadthing',\n //'@payloadcms/storage-vercel-blob',\n ]\n : []),\n ],\n webpack: (webpackConfig, webpackOptions) => {\n const incomingWebpackConfig =\n typeof nextConfig.webpack === 'function'\n ? nextConfig.webpack(webpackConfig, webpackOptions)\n : webpackConfig\n\n return {\n ...incomingWebpackConfig,\n externals: [\n ...(incomingWebpackConfig?.externals || []),\n /**\n * See the explanation in the serverExternalPackages section above.\n * We need to force Webpack to emit require() calls for these packages, even though they are not\n * resolvable from the project root. You would expect this to error during runtime, but Next.js seems to be able to require these just fine.\n *\n * This is the only way to get Webpack Build to work, without the bundle size caveats of externalizing the\n * entry point packages, as explained in the serverExternalPackages section above.\n */\n 'drizzle-kit',\n 'drizzle-kit/api',\n 'sharp',\n 'libsql',\n 'require-in-the-middle',\n ],\n plugins: [\n ...(incomingWebpackConfig?.plugins || []),\n // Fix cloudflare:sockets error: https://github.com/vercel/next.js/discussions/50177\n new webpackOptions.webpack.IgnorePlugin({\n resourceRegExp: /^pg-native$|^cloudflare:sockets$/,\n }),\n ],\n resolve: {\n ...(incomingWebpackConfig?.resolve || {}),\n alias: {\n ...(incomingWebpackConfig?.resolve?.alias || {}),\n },\n fallback: {\n ...(incomingWebpackConfig?.resolve?.fallback || {}),\n /*\n * This fixes the following warning when running next build with webpack (tested on Next.js 16.0.3 with Payload 3.64.0):\n *\n * ⚠ Compiled with warnings in 8.7s\n *\n * ./node_modules/.pnpm/mongodb@6.16.0/node_modules/mongodb/lib/deps.js\n * Module not found: Can't resolve 'aws4' in '/Users/alessio/Documents/temp/next16p/node_modules/.pnpm/mongodb@6.16.0/node_modules/mongodb/lib'\n *\n * Import trace for requested module:\n * ./node_modules/.pnpm/mongodb@6.16.0/node_modules/mongodb/lib/deps.js\n * ./node_modules/.pnpm/mongodb@6.16.0/node_modules/mongodb/lib/client-side-encryption/client_encryption.js\n * ./node_modules/.pnpm/mongodb@6.16.0/node_modules/mongodb/lib/index.js\n * ./node_modules/.pnpm/mongoose@8.15.1/node_modules/mongoose/lib/index.js\n * ./node_modules/.pnpm/mongoose@8.15.1/node_modules/mongoose/index.js\n * ./node_modules/.pnpm/@payloadcms+db-mongodb@3.64.0_payload@3.64.0_graphql@16.12.0_typescript@5.7.3_/node_modules/@payloadcms/db-mongodb/dist/index.js\n * ./src/payload.config.ts\n * ./src/app/my-route/route.ts\n *\n **/\n aws4: false,\n },\n },\n }\n },\n }\n\n if (nextConfig.basePath) {\n baseConfig.env.NEXT_BASE_PATH = nextConfig.basePath\n }\n\n if (!supportsTurbopackBuild) {\n return withPayloadLegacy(baseConfig)\n } else {\n return {\n ...baseConfig,\n serverExternalPackages: [\n ...(baseConfig.serverExternalPackages || []),\n 'drizzle-kit',\n 'drizzle-kit/api',\n 'sharp',\n 'libsql',\n 'require-in-the-middle',\n // Prevents turbopack build errors by the thread-stream package which is installed by pino\n 'pino',\n ],\n }\n }\n}\n\nexport default withPayload\n"],"mappings":"AAAA;;;;;GAMA,SACEA,gBAAgB,EAChBC,kDAAkD,QAC7C;AACP,SAASC,iBAAiB,QAAQ;AAElC,MAAMC,eAAA,GAAkB;EACtBC,GAAA,EAAK;EACLC,KAAA,EAAO;AACT;AAEA;;;;;AAKA,OAAO,MAAMC,WAAA,GAAcA,CAACC,UAAA,GAAa,CAAC,CAAC,EAAEC,OAAA,GAAU,CAAC,CAAC;EACvD,MAAMC,aAAA,GAAgBT,gBAAA;EAEtB,MAAMU,sBAAA,GAAyBT,kDAAA,CAAmDQ,aAAA;EAElF,MAAME,GAAA,GAAMJ,UAAA,CAAWI,GAAG,IAAI,CAAC;EAE/B,IAAIJ,UAAA,CAAWK,YAAY,EAAEC,UAAA,EAAYC,OAAA,EAAS;IAChDC,OAAA,CAAQC,IAAI,CACV;IAEFL,GAAA,CAAIM,uCAAuC,GAAG;EAChD;EAEA;E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ayload.js","names":["getNextjsVersion","supportsTurbopackExternalizeTransitiveDependencies","withPayloadLegacy","poweredByHeader","key","value","withPayload","nextConfig","options","nextjsVersion","supportsTurbopackBuild","env","experimental","staleTimes","dynamic","console","warn","NEXT_PUBLIC_ENABLE_ROUTER_CACHE_REFRESH","baseConfig","outputFileTracingExcludes","outputFileTracingIncludes","turbopack","headers","headersFromConfig","source","serverExternalPackages","process","NODE_ENV","devBundleServerPackages","webpack","webpackConfig","webpackOptions","incomingWebpackConfig","externals","plugins","IgnorePlugin","resourceRegExp","resolve","alias","fallback","aws4","basePath","NEXT_BASE_PATH"],"sources":["../../src/withPayload/withPayload.js"],"sourcesContent":["/**\n * These files must remain as plain JavaScript (.js) rather than TypeScript (.ts) because they are\n * imported directly in next.config.mjs files. Since next.config files run before the build process,\n * TypeScript compilation is not available. This ensures compatibility with all templates and\n * user projects regardless of their TypeScript setup.\n */\nimport {\n getNextjsVersion,\n supportsTurbopackExternalizeTransitiveDependencies,\n} from './withPayload.utils.js'\nimport { withPayloadLegacy } from './withPayloadLegacy.js'\n\nconst poweredByHeader = {\n key: 'X-Powered-By',\n value: 'Next.js, Payload',\n}\n\n/**\n * @param {import('next').NextConfig} nextConfig\n * @param {Object} [options] - Optional configuration options\n * @param {boolean} [options.devBundleServerPackages] - Whether to bundle server packages in development mode. @default false\n * */\nexport const withPayload = (nextConfig = {}, options = {}) => {\n const nextjsVersion = getNextjsVersion()\n\n const supportsTurbopackBuild = supportsTurbopackExternalizeTransitiveDependencies(nextjsVersion)\n\n const env = nextConfig.env || {}\n\n if (nextConfig.experimental?.staleTimes?.dynamic) {\n console.warn(\n 'Payload detected a non-zero value for the `staleTimes.dynamic` option in your Next.js config. This will slow down page transitions and may cause stale data to load within the Admin panel. To clear this warning, remove the `staleTimes.dynamic` option from your Next.js config or set it to 0. In the future, Next.js may support scoping this option to specific routes.',\n )\n env.NEXT_PUBLIC_ENABLE_ROUTER_CACHE_REFRESH = 'true'\n }\n\n /** @type {import('next').NextConfig} */\n const baseConfig = {\n ...nextConfig,\n env,\n outputFileTracingExcludes: {\n ...(nextConfig.outputFileTracingExcludes || {}),\n '**/*': [\n ...(nextConfig.outputFileTracingExcludes?.['**/*'] || []),\n 'drizzle-kit',\n 'drizzle-kit/api',\n ],\n },\n outputFileTracingIncludes: {\n ...(nextConfig.outputFileTracingIncludes || {}),\n '**/*': [...(nextConfig.outputFileTracingIncludes?.['**/*'] || []), '@libsql/client'],\n },\n turbopack: {\n ...(nextConfig.turbopack || {}),\n },\n // We disable the poweredByHeader here because we add it manually in the headers function below\n ...(nextConfig.poweredByHeader !== false ? { poweredByHeader: false } : {}),\n headers: async () => {\n const headersFromConfig = 'headers' in nextConfig ? await nextConfig.headers() : []\n\n return [\n ...(headersFromConfig || []),\n {\n headers: [\n {\n key: 'Accept-CH',\n value: 'Sec-CH-Prefers-Color-Scheme',\n },\n {\n key: 'Vary',\n value: 'Sec-CH-Prefers-Color-Scheme',\n },\n {\n key: 'Critical-CH',\n value: 'Sec-CH-Prefers-Color-Scheme',\n },\n ...(nextConfig.poweredByHeader !== false ? [poweredByHeader] : []),\n ],\n source: '/:path*',\n },\n ]\n },\n serverExternalPackages: [\n ...(nextConfig.serverExternalPackages || []),\n // WHY: without externalizing graphql, a graphql version error will be thrown\n // during runtime (\"Ensure that there is only one instance of \\\"graphql\\\" in the node_modules\\ndirectory.\")\n 'graphql',\n ...(process.env.NODE_ENV === 'development' && options.devBundleServerPackages !== true\n ? /**\n * Unless explicitly disabled by the user, by passing `devBundleServerPackages: true` to withPayload, we\n * do not bundle server-only packages during dev for two reasons:\n *\n * 1. Performance: Fewer files to compile means faster compilation speeds.\n * 2. Turbopack support: Webpack's externals are not supported by Turbopack.\n *\n * Regarding Turbopack support: Unlike webpack.externals, we cannot use serverExternalPackages to\n * externalized packages that are not resolvable from the project root. So including a package like\n * \"drizzle-kit\" in here would do nothing - Next.js will ignore the rule and still bundle the package -\n * because it detects that the package is not resolvable from the project root (= not directly installed\n * by the user in their own package.json).\n *\n * Instead, we can use serverExternalPackages for the entry-point packages that *are* installed directly\n * by the user (e.g. db-postgres, which then installs drizzle-kit as a dependency).\n *\n *\n *\n * We should only do this during development, not build, because externalizing these packages can hurt\n * the bundle size. Not only does it disable tree-shaking, it also risks installing duplicate copies of the\n * same package.\n *\n * Example:\n * - @payloadcms/richtext-lexical (in bundle) -> installs qs-esm (bundled because of importer)\n * - payload (not in bundle, external) -> installs qs-esm (external because of importer)\n * Result: we have two copies of qs-esm installed - one in the bundle, and one in node_modules.\n *\n * During development, these bundle size difference do not matter much, and development speed /\n * turbopack support are more important.\n */\n [\n 'payload',\n '@payloadcms/db-mongodb',\n '@payloadcms/db-postgres',\n '@payloadcms/db-sqlite',\n '@payloadcms/db-vercel-postgres',\n '@payloadcms/db-d1-sqlite',\n '@payloadcms/drizzle',\n '@payloadcms/email-nodemailer',\n '@payloadcms/email-resend',\n '@payloadcms/graphql',\n '@payloadcms/payload-cloud',\n '@payloadcms/plugin-redirects',\n // TODO: Add the following packages, excluding their /client subpath exports, once Next.js supports it\n // see: https://github.com/vercel/next.js/discussions/76991\n //'@payloadcms/plugin-cloud-storage',\n //'@payloadcms/plugin-sentry',\n //'@payloadcms/plugin-stripe',\n // @payloadcms/richtext-lexical\n //'@payloadcms/storage-azure',\n //'@payloadcms/storage-gcs',\n //'@payloadcms/storage-s3',\n //'@payloadcms/storage-uploadthing',\n //'@payloadcms/storage-vercel-blob',\n ]\n : []),\n ],\n webpack: (webpackConfig, webpackOptions) => {\n const incomingWebpackConfig =\n typeof nextConfig.webpack === 'function'\n ? nextConfig.webpack(webpackConfig, webpackOptions)\n : webpackConfig\n\n return {\n ...incomingWebpackConfig,\n externals: [\n ...(incomingWebpackConfig?.externals || []),\n /**\n * See the explanation in the serverExternalPackages section above.\n * We need to force Webpack to emit require() calls for these packages, even though they are not\n * resolvable from the project root. You would expect this to error during runtime, but Next.js seems to be able to require these just fine.\n *\n * This is the only way to get Webpack Build to work, without the bundle size caveats of externalizing the\n * entry point packages, as explained in the serverExternalPackages section above.\n */\n 'drizzle-kit',\n 'drizzle-kit/api',\n 'sharp',\n 'libsql',\n 'require-in-the-middle',\n ],\n plugins: [\n ...(incomingWebpackConfig?.plugins || []),\n // Fix cloudflare:sockets error: https://github.com/vercel/next.js/discussions/50177\n new webpackOptions.webpack.IgnorePlugin({\n resourceRegExp: /^pg-native$|^cloudflare:sockets$/,\n }),\n ],\n resolve: {\n ...(incomingWebpackConfig?.resolve || {}),\n alias: {\n ...(incomingWebpackConfig?.resolve?.alias || {}),\n },\n fallback: {\n ...(incomingWebpackConfig?.resolve?.fallback || {}),\n /*\n * This fixes the following warning when running next build with webpack (tested on Next.js 16.0.3 with Payload 3.64.0):\n *\n * ⚠ Compiled with warnings in 8.7s\n *\n * ./node_modules/.pnpm/mongodb@6.16.0/node_modules/mongodb/lib/deps.js\n * Module not found: Can't resolve 'aws4' in '/Users/alessio/Documents/temp/next16p/node_modules/.pnpm/mongodb@6.16.0/node_modules/mongodb/lib'\n *\n * Import trace for requested module:\n * ./node_modules/.pnpm/mongodb@6.16.0/node_modules/mongodb/lib/deps.js\n * ./node_modules/.pnpm/mongodb@6.16.0/node_modules/mongodb/lib/client-side-encryption/client_encryption.js\n * ./node_modules/.pnpm/mongodb@6.16.0/node_modules/mongodb/lib/index.js\n * ./node_modules/.pnpm/mongoose@8.15.1/node_modules/mongoose/lib/index.js\n * ./node_modules/.pnpm/mongoose@8.15.1/node_modules/mongoose/index.js\n * ./node_modules/.pnpm/@payloadcms+db-mongodb@3.64.0_payload@3.64.0_graphql@16.12.0_typescript@5.7.3_/node_modules/@payloadcms/db-mongodb/dist/index.js\n * ./src/payload.config.ts\n * ./src/app/my-route/route.ts\n *\n **/\n aws4: false,\n },\n },\n }\n },\n }\n\n if (nextConfig.basePath) {\n process.env.NEXT_BASE_PATH = nextConfig.basePath\n baseConfig.env.NEXT_BASE_PATH = nextConfig.basePath\n }\n\n if (!supportsTurbopackBuild) {\n return withPayloadLegacy(baseConfig)\n } else {\n return {\n ...baseConfig,\n serverExternalPackages: [\n ...(baseConfig.serverExternalPackages || []),\n 'drizzle-kit',\n 'drizzle-kit/api',\n 'sharp',\n 'libsql',\n 'require-in-the-middle',\n // Prevents turbopack build errors by the thread-stream package which is installed by pino\n 'pino',\n ],\n }\n }\n}\n\nexport default withPayload\n"],"mappings":"AAAA;;;;;GAMA,SACEA,gBAAgB,EAChBC,kDAAkD,QAC7C;AACP,SAASC,iBAAiB,QAAQ;AAElC,MAAMC,eAAA,GAAkB;EACtBC,GAAA,EAAK;EACLC,KAAA,EAAO;AACT;AAEA;;;;;AAKA,OAAO,MAAMC,WAAA,GAAcA,CAACC,UAAA,GAAa,CAAC,CAAC,EAAEC,OAAA,GAAU,CAAC,CAAC;EACvD,MAAMC,aAAA,GAAgBT,gBAAA;EAEtB,MAAMU,sBAAA,GAAyBT,kDAAA,CAAmDQ,aAAA;EAElF,MAAME,GAAA,GAAMJ,UAAA,CAAWI,GAAG,IAAI,CAAC;EAE/B,IAAIJ,UAAA,CAAWK,YAAY,EAAEC,UAAA,EAAYC,OAAA,EAAS;IAChDC,OAAA,CAAQC,IAAI,CACV;IAEFL,GAAA,CAAIM,uCAAuC,GAAG;EAChD;EAEA;EACA,MAAMC,UAAA,GAAa;IACjB,GAAGX,UAAU;IACbI,GAAA;IACAQ,yBAAA,EAA2B;MACzB,IAAIZ,UAAA,CAAWY,yBAAyB,IAAI,CAAC,CAAC;MAC9C,QAAQ,C,IACFZ,UAAA,CAAWY,yBAAyB,GAAG,OAAO,IAAI,EAAE,GACxD,eACA;IAEJ;IACAC,yBAAA,EAA2B;MACzB,IAAIb,UAAA,CAAWa,yBAAyB,IAAI,CAAC,CAAC;MAC9C,QAAQ,C,IAAKb,UAAA,CAAWa,yBAAyB,GAAG,OAAO,IAAI,EAAE,GAAG;IACtE;IACAC,SAAA,EAAW;MACT,IAAId,UAAA,CAAWc,SAAS,IAAI,CAAC,CAAC;IAChC;IACA;IACA,IAAId,UAAA,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CAACM,YAAY,CAAC;UACtCC,cAAA,EAAgB;QAClB,GACD;QACDC,OAAA,EAAS;UACP,IAAIL,qBAAA,EAAuBK,OAAA,IAAW,CAAC,CAAC;UACxCC,KAAA,EAAO;YACL,IAAIN,qBAAA,EAAuBK,OAAA,EAASC,KAAA,IAAS,CAAC,CAAC;UACjD;UACAC,QAAA,EAAU;YACR,IAAIP,qBAAA,EAAuBK,OAAA,EAASE,QAAA,IAAY,CAAC,CAAC;YAClD;;;;;;;;;;;;;;;;;;;YAmBAC,IAAA,EAAM;UACR;QACF;MACF;IACF;EACF;EAEA,IAAIjC,UAAA,CAAWkC,QAAQ,EAAE;IACvBf,OAAA,CAAQf,GAAG,CAAC+B,cAAc,GAAGnC,UAAA,CAAWkC,QAAQ;IAChDvB,UAAA,CAAWP,GAAG,CAAC+B,cAAc,GAAGnC,UAAA,CAAWkC,QAAQ;EACrD;EAEA,IAAI,CAAC/B,sBAAA,EAAwB;IAC3B,OAAOR,iBAAA,CAAkBgB,UAAA;EAC3B,OAAO;IACL,OAAO;MACL,GAAGA,UAAU;MACbO,sBAAA,EAAwB,C,IAClBP,UAAA,CAAWO,sBAAsB,IAAI,EAAE,GAC3C,eACA,mBACA,SACA,UACA;MACA;MACA;IAEJ;EACF;AACF;AAEA,eAAenB,WAAA","ignoreList":[]}
@@ -0,0 +1,40 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import { withPayload } from './withPayload.js';
3
+ describe('withPayload', () => {
4
+ it('should set process.env.NEXT_BASE_PATH when nextConfig.basePath is provided', () => {
5
+ const originalBasePath = process.env.NEXT_BASE_PATH;
6
+ delete process.env.NEXT_BASE_PATH;
7
+ try {
8
+ const mockNextConfig = {
9
+ basePath: '/test/basepath'
10
+ };
11
+ withPayload(mockNextConfig);
12
+ // Verify it set the env var so formatAdminURL can read it
13
+ expect(process.env.NEXT_BASE_PATH).toBe('/test/basepath');
14
+ } finally {
15
+ // Restore original value
16
+ if (originalBasePath === undefined) {
17
+ delete process.env.NEXT_BASE_PATH;
18
+ } else {
19
+ process.env.NEXT_BASE_PATH = originalBasePath;
20
+ }
21
+ }
22
+ });
23
+ it('should not modify process.env.NEXT_BASE_PATH when basePath is not provided', () => {
24
+ const originalBasePath = process.env.NEXT_BASE_PATH;
25
+ try {
26
+ const mockNextConfig = {};
27
+ withPayload(mockNextConfig);
28
+ // Verify it didn't set the env var
29
+ expect(process.env.NEXT_BASE_PATH).toBe(originalBasePath);
30
+ } finally {
31
+ // Restore original value
32
+ if (originalBasePath === undefined) {
33
+ delete process.env.NEXT_BASE_PATH;
34
+ } else {
35
+ process.env.NEXT_BASE_PATH = originalBasePath;
36
+ }
37
+ }
38
+ });
39
+ });
40
+ //# sourceMappingURL=withPayload.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withPayload.spec.js","names":["describe","expect","it","withPayload","originalBasePath","process","env","NEXT_BASE_PATH","mockNextConfig","basePath","toBe","undefined"],"sources":["../../src/withPayload/withPayload.spec.ts"],"sourcesContent":["import { describe, expect, it } from 'vitest'\n\nimport { withPayload } from './withPayload.js'\n\ndescribe('withPayload', () => {\n it('should set process.env.NEXT_BASE_PATH when nextConfig.basePath is provided', () => {\n const originalBasePath = process.env.NEXT_BASE_PATH\n delete process.env.NEXT_BASE_PATH\n\n try {\n const mockNextConfig = {\n basePath: '/test/basepath',\n }\n\n withPayload(mockNextConfig)\n\n // Verify it set the env var so formatAdminURL can read it\n expect(process.env.NEXT_BASE_PATH).toBe('/test/basepath')\n } finally {\n // Restore original value\n if (originalBasePath === undefined) {\n delete process.env.NEXT_BASE_PATH\n } else {\n process.env.NEXT_BASE_PATH = originalBasePath\n }\n }\n })\n\n it('should not modify process.env.NEXT_BASE_PATH when basePath is not provided', () => {\n const originalBasePath = process.env.NEXT_BASE_PATH\n\n try {\n const mockNextConfig = {}\n\n withPayload(mockNextConfig)\n\n // Verify it didn't set the env var\n expect(process.env.NEXT_BASE_PATH).toBe(originalBasePath)\n } finally {\n // Restore original value\n if (originalBasePath === undefined) {\n delete process.env.NEXT_BASE_PATH\n } else {\n process.env.NEXT_BASE_PATH = originalBasePath\n }\n }\n })\n})\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ;AAErC,SAASC,WAAW,QAAQ;AAE5BH,QAAA,CAAS,eAAe;EACtBE,EAAA,CAAG,8EAA8E;IAC/E,MAAME,gBAAA,GAAmBC,OAAA,CAAQC,GAAG,CAACC,cAAc;IACnD,OAAOF,OAAA,CAAQC,GAAG,CAACC,cAAc;IAEjC,IAAI;MACF,MAAMC,cAAA,GAAiB;QACrBC,QAAA,EAAU;MACZ;MAEAN,WAAA,CAAYK,cAAA;MAEZ;MACAP,MAAA,CAAOI,OAAA,CAAQC,GAAG,CAACC,cAAc,EAAEG,IAAI,CAAC;IAC1C,UAAU;MACR;MACA,IAAIN,gBAAA,KAAqBO,SAAA,EAAW;QAClC,OAAON,OAAA,CAAQC,GAAG,CAACC,cAAc;MACnC,OAAO;QACLF,OAAA,CAAQC,GAAG,CAACC,cAAc,GAAGH,gBAAA;MAC/B;IACF;EACF;EAEAF,EAAA,CAAG,8EAA8E;IAC/E,MAAME,gBAAA,GAAmBC,OAAA,CAAQC,GAAG,CAACC,cAAc;IAEnD,IAAI;MACF,MAAMC,cAAA,GAAiB,CAAC;MAExBL,WAAA,CAAYK,cAAA;MAEZ;MACAP,MAAA,CAAOI,OAAA,CAAQC,GAAG,CAACC,cAAc,EAAEG,IAAI,CAACN,gBAAA;IAC1C,UAAU;MACR;MACA,IAAIA,gBAAA,KAAqBO,SAAA,EAAW;QAClC,OAAON,OAAA,CAAQC,GAAG,CAACC,cAAc;MACnC,OAAO;QACLF,OAAA,CAAQC,GAAG,CAACC,cAAc,GAAGH,gBAAA;MAC/B;IACF;EACF;AACF","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/next",
3
- "version": "3.71.0-internal.ef75fa0",
3
+ "version": "3.71.0",
4
4
  "homepage": "https://payloadcms.com",
5
5
  "repository": {
6
6
  "type": "git",
@@ -99,9 +99,9 @@
99
99
  "qs-esm": "7.0.2",
100
100
  "sass": "1.77.4",
101
101
  "uuid": "10.0.0",
102
- "@payloadcms/graphql": "3.71.0-internal.ef75fa0",
103
- "@payloadcms/translations": "3.71.0-internal.ef75fa0",
104
- "@payloadcms/ui": "3.71.0-internal.ef75fa0"
102
+ "@payloadcms/graphql": "3.71.0",
103
+ "@payloadcms/translations": "3.71.0",
104
+ "@payloadcms/ui": "3.71.0"
105
105
  },
106
106
  "devDependencies": {
107
107
  "@babel/cli": "7.27.2",
@@ -119,12 +119,12 @@
119
119
  "esbuild-sass-plugin": "3.3.1",
120
120
  "swc-plugin-transform-remove-imports": "8.3.0",
121
121
  "@payloadcms/eslint-config": "3.28.0",
122
- "payload": "3.71.0-internal.ef75fa0"
122
+ "payload": "3.71.0"
123
123
  },
124
124
  "peerDependencies": {
125
125
  "graphql": "^16.8.1",
126
126
  "next": "^15.4.10",
127
- "payload": "3.71.0-internal.ef75fa0"
127
+ "payload": "3.71.0"
128
128
  },
129
129
  "engines": {
130
130
  "node": "^18.20.2 || >=20.9.0"