@payloadcms/next 3.74.0-canary.5 → 3.74.0-internal-debug.1b84a48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (474) hide show
  1. package/dist/auth/login.d.ts +9 -12
  2. package/dist/auth/login.d.ts.map +1 -1
  3. package/dist/auth/login.js +52 -58
  4. package/dist/auth/login.js.map +1 -1
  5. package/dist/auth/logout.d.ts +2 -2
  6. package/dist/auth/logout.d.ts.map +1 -1
  7. package/dist/auth/logout.js +39 -44
  8. package/dist/auth/logout.js.map +1 -1
  9. package/dist/auth/refresh.d.ts +2 -1
  10. package/dist/auth/refresh.d.ts.map +1 -1
  11. package/dist/auth/refresh.js +45 -47
  12. package/dist/auth/refresh.js.map +1 -1
  13. package/dist/cjs/withPayload.cjs +65 -24
  14. package/dist/cjs/withPayload.cjs.map +2 -2
  15. package/dist/config.js +1 -0
  16. package/dist/config.js.map +1 -1
  17. package/dist/elements/DocumentHeader/Tabs/ShouldRenderTabs.js +9 -15
  18. package/dist/elements/DocumentHeader/Tabs/ShouldRenderTabs.js.map +1 -1
  19. package/dist/elements/DocumentHeader/Tabs/Tab/TabLink.js +40 -71
  20. package/dist/elements/DocumentHeader/Tabs/Tab/TabLink.js.map +1 -1
  21. package/dist/elements/DocumentHeader/Tabs/Tab/index.js +65 -59
  22. package/dist/elements/DocumentHeader/Tabs/Tab/index.js.map +1 -1
  23. package/dist/elements/DocumentHeader/Tabs/Tab/index.scss +38 -0
  24. package/dist/elements/DocumentHeader/Tabs/index.js +80 -70
  25. package/dist/elements/DocumentHeader/Tabs/index.js.map +1 -1
  26. package/dist/elements/DocumentHeader/Tabs/index.scss +54 -0
  27. package/dist/elements/DocumentHeader/Tabs/tabs/VersionsPill/index.js +16 -23
  28. package/dist/elements/DocumentHeader/Tabs/tabs/VersionsPill/index.js.map +1 -1
  29. package/dist/elements/DocumentHeader/Tabs/tabs/VersionsPill/index.scss +10 -0
  30. package/dist/elements/DocumentHeader/Tabs/tabs/index.js +61 -69
  31. package/dist/elements/DocumentHeader/Tabs/tabs/index.js.map +1 -1
  32. package/dist/elements/DocumentHeader/index.js +48 -28
  33. package/dist/elements/DocumentHeader/index.js.map +1 -1
  34. package/dist/elements/DocumentHeader/index.scss +64 -0
  35. package/dist/elements/FormHeader/index.js +30 -16
  36. package/dist/elements/FormHeader/index.js.map +1 -1
  37. package/dist/elements/FormHeader/index.scss +8 -0
  38. package/dist/elements/Logo/index.js +19 -34
  39. package/dist/elements/Logo/index.js.map +1 -1
  40. package/dist/elements/Nav/NavHamburger/index.js +23 -44
  41. package/dist/elements/Nav/NavHamburger/index.js.map +1 -1
  42. package/dist/elements/Nav/NavWrapper/index.js +28 -54
  43. package/dist/elements/Nav/NavWrapper/index.js.map +1 -1
  44. package/dist/elements/Nav/NavWrapper/index.scss +27 -0
  45. package/dist/elements/Nav/SettingsMenuButton/index.js +33 -39
  46. package/dist/elements/Nav/SettingsMenuButton/index.js.map +1 -1
  47. package/dist/elements/Nav/SettingsMenuButton/index.scss +11 -0
  48. package/dist/elements/Nav/getNavPrefs.js +27 -22
  49. package/dist/elements/Nav/getNavPrefs.js.map +1 -1
  50. package/dist/elements/Nav/index.client.js +97 -118
  51. package/dist/elements/Nav/index.client.js.map +1 -1
  52. package/dist/elements/Nav/index.js +148 -127
  53. package/dist/elements/Nav/index.js.map +1 -1
  54. package/dist/elements/Nav/index.scss +173 -0
  55. package/dist/esbuildEntry.d.ts +5 -0
  56. package/dist/esbuildEntry.d.ts.map +1 -0
  57. package/dist/esbuildEntry.js +6 -0
  58. package/dist/esbuildEntry.js.map +1 -0
  59. package/dist/exports/auth.js +1 -0
  60. package/dist/exports/auth.js.map +1 -1
  61. package/dist/exports/client.d.ts +1 -0
  62. package/dist/exports/client.d.ts.map +1 -1
  63. package/dist/exports/client.js +2 -1
  64. package/dist/exports/client.js.map +1 -1
  65. package/dist/exports/layouts.js +1 -0
  66. package/dist/exports/layouts.js.map +1 -1
  67. package/dist/exports/routes.js +1 -0
  68. package/dist/exports/routes.js.map +1 -1
  69. package/dist/exports/rsc.d.ts +1 -0
  70. package/dist/exports/rsc.d.ts.map +1 -1
  71. package/dist/exports/rsc.js +2 -0
  72. package/dist/exports/rsc.js.map +1 -1
  73. package/dist/exports/templates.js +1 -0
  74. package/dist/exports/templates.js.map +1 -1
  75. package/dist/exports/utilities.js +7 -12
  76. package/dist/exports/utilities.js.map +1 -1
  77. package/dist/exports/views.js +1 -0
  78. package/dist/exports/views.js.map +1 -1
  79. package/dist/index.js +1 -0
  80. package/dist/index.js.map +1 -1
  81. package/dist/layouts/Root/NestProviders.js +21 -20
  82. package/dist/layouts/Root/NestProviders.js.map +1 -1
  83. package/dist/layouts/Root/checkDependencies.js +49 -41
  84. package/dist/layouts/Root/checkDependencies.js.map +1 -1
  85. package/dist/layouts/Root/index.js +128 -103
  86. package/dist/layouts/Root/index.js.map +1 -1
  87. package/dist/prod/styles.css +5 -1
  88. package/dist/routes/graphql/handler.js +114 -122
  89. package/dist/routes/graphql/handler.js.map +1 -1
  90. package/dist/routes/graphql/index.js +1 -0
  91. package/dist/routes/graphql/index.js.map +1 -1
  92. package/dist/routes/graphql/playground.js +28 -27
  93. package/dist/routes/graphql/playground.js.map +1 -1
  94. package/dist/routes/index.js +1 -0
  95. package/dist/routes/index.js.map +1 -1
  96. package/dist/routes/rest/index.js +23 -22
  97. package/dist/routes/rest/index.js.map +1 -1
  98. package/dist/routes/rest/og/image.js +103 -79
  99. package/dist/routes/rest/og/image.js.map +1 -1
  100. package/dist/routes/rest/og/index.js +59 -54
  101. package/dist/routes/rest/og/index.js.map +1 -1
  102. package/dist/templates/Default/NavHamburger/index.js +12 -20
  103. package/dist/templates/Default/NavHamburger/index.js.map +1 -1
  104. package/dist/templates/Default/Wrapper/index.js +20 -44
  105. package/dist/templates/Default/Wrapper/index.js.map +1 -1
  106. package/dist/templates/Default/Wrapper/index.scss +58 -0
  107. package/dist/templates/Default/index.js +147 -116
  108. package/dist/templates/Default/index.js.map +1 -1
  109. package/dist/templates/Default/index.scss +79 -0
  110. package/dist/templates/Minimal/index.js +26 -17
  111. package/dist/templates/Minimal/index.js.map +1 -1
  112. package/dist/templates/Minimal/index.scss +30 -0
  113. package/dist/utilities/getExistingAuthToken.js +3 -2
  114. package/dist/utilities/getExistingAuthToken.js.map +1 -1
  115. package/dist/utilities/getNextRequestI18n.js +12 -13
  116. package/dist/utilities/getNextRequestI18n.js.map +1 -1
  117. package/dist/utilities/getPayloadHMR.js +5 -5
  118. package/dist/utilities/getPayloadHMR.js.map +1 -1
  119. package/dist/utilities/getPreferences.js +27 -22
  120. package/dist/utilities/getPreferences.js.map +1 -1
  121. package/dist/utilities/getRequestLocale.js +13 -14
  122. package/dist/utilities/getRequestLocale.js.map +1 -1
  123. package/dist/utilities/getRequestTheme.js +19 -19
  124. package/dist/utilities/getRequestTheme.js.map +1 -1
  125. package/dist/utilities/getRouteWithoutAdmin.js +3 -5
  126. package/dist/utilities/getRouteWithoutAdmin.js.map +1 -1
  127. package/dist/utilities/handleAuthRedirect.js +22 -36
  128. package/dist/utilities/handleAuthRedirect.js.map +1 -1
  129. package/dist/utilities/handleServerFunctions.d.ts.map +1 -1
  130. package/dist/utilities/handleServerFunctions.js +33 -41
  131. package/dist/utilities/handleServerFunctions.js.map +1 -1
  132. package/dist/utilities/initReq.d.ts +2 -13
  133. package/dist/utilities/initReq.d.ts.map +1 -1
  134. package/dist/utilities/initReq.js +78 -96
  135. package/dist/utilities/initReq.js.map +1 -1
  136. package/dist/utilities/isCustomAdminView.js +22 -26
  137. package/dist/utilities/isCustomAdminView.js.map +1 -1
  138. package/dist/utilities/isPublicAdminRoute.js +26 -20
  139. package/dist/utilities/isPublicAdminRoute.js.map +1 -1
  140. package/dist/utilities/meta.js +68 -63
  141. package/dist/utilities/meta.js.map +1 -1
  142. package/dist/utilities/selectiveCache.js +25 -26
  143. package/dist/utilities/selectiveCache.js.map +1 -1
  144. package/dist/utilities/setPayloadAuthCookie.js +19 -22
  145. package/dist/utilities/setPayloadAuthCookie.js.map +1 -1
  146. package/dist/utilities/slugify.js +24 -33
  147. package/dist/utilities/slugify.js.map +1 -1
  148. package/dist/utilities/timestamp.js +7 -6
  149. package/dist/utilities/timestamp.js.map +1 -1
  150. package/dist/views/API/LocaleSelector/index.js +17 -39
  151. package/dist/views/API/LocaleSelector/index.js.map +1 -1
  152. package/dist/views/API/RenderJSON/index.js +171 -126
  153. package/dist/views/API/RenderJSON/index.js.map +1 -1
  154. package/dist/views/API/RenderJSON/index.scss +129 -0
  155. package/dist/views/API/index.client.js +291 -199
  156. package/dist/views/API/index.client.js.map +1 -1
  157. package/dist/views/API/index.js +7 -2
  158. package/dist/views/API/index.js.map +1 -1
  159. package/dist/views/API/index.scss +119 -0
  160. package/dist/views/API/metadata.js +18 -23
  161. package/dist/views/API/metadata.js.map +1 -1
  162. package/dist/views/Account/ResetPreferences/index.js +78 -102
  163. package/dist/views/Account/ResetPreferences/index.js.map +1 -1
  164. package/dist/views/Account/Settings/LanguageSelector.js +18 -47
  165. package/dist/views/Account/Settings/LanguageSelector.js.map +1 -1
  166. package/dist/views/Account/Settings/index.js +60 -25
  167. package/dist/views/Account/Settings/index.js.map +1 -1
  168. package/dist/views/Account/Settings/index.scss +48 -0
  169. package/dist/views/Account/ToggleTheme/index.js +38 -55
  170. package/dist/views/Account/ToggleTheme/index.js.map +1 -1
  171. package/dist/views/Account/index.client.js +16 -32
  172. package/dist/views/Account/index.client.js.map +1 -1
  173. package/dist/views/Account/index.js +147 -158
  174. package/dist/views/Account/index.js.map +1 -1
  175. package/dist/views/Account/metadata.js +8 -12
  176. package/dist/views/Account/metadata.js.map +1 -1
  177. package/dist/views/BrowseByFolder/buildView.js +138 -157
  178. package/dist/views/BrowseByFolder/buildView.js.map +1 -1
  179. package/dist/views/BrowseByFolder/index.js +16 -16
  180. package/dist/views/BrowseByFolder/index.js.map +1 -1
  181. package/dist/views/BrowseByFolder/metadata.js +13 -15
  182. package/dist/views/BrowseByFolder/metadata.js.map +1 -1
  183. package/dist/views/CollectionFolders/buildView.js +122 -142
  184. package/dist/views/CollectionFolders/buildView.js.map +1 -1
  185. package/dist/views/CollectionFolders/index.js +16 -16
  186. package/dist/views/CollectionFolders/index.js.map +1 -1
  187. package/dist/views/CollectionFolders/metadata.js +18 -21
  188. package/dist/views/CollectionFolders/metadata.js.map +1 -1
  189. package/dist/views/CollectionFolders/renderFolderViewSlots.js +58 -61
  190. package/dist/views/CollectionFolders/renderFolderViewSlots.js.map +1 -1
  191. package/dist/views/CollectionTrash/index.js +17 -17
  192. package/dist/views/CollectionTrash/index.js.map +1 -1
  193. package/dist/views/CollectionTrash/metadata.js +18 -21
  194. package/dist/views/CollectionTrash/metadata.js.map +1 -1
  195. package/dist/views/CreateFirstUser/index.client.js +117 -103
  196. package/dist/views/CreateFirstUser/index.client.js.map +1 -1
  197. package/dist/views/CreateFirstUser/index.js +87 -81
  198. package/dist/views/CreateFirstUser/index.js.map +1 -1
  199. package/dist/views/CreateFirstUser/index.scss +21 -0
  200. package/dist/views/CreateFirstUser/metadata.js +8 -12
  201. package/dist/views/CreateFirstUser/metadata.js.map +1 -1
  202. package/dist/views/Dashboard/Default/ModularDashboard/DashboardStepNav.js +147 -138
  203. package/dist/views/Dashboard/Default/ModularDashboard/DashboardStepNav.js.map +1 -1
  204. package/dist/views/Dashboard/Default/ModularDashboard/index.client.js +423 -405
  205. package/dist/views/Dashboard/Default/ModularDashboard/index.client.js.map +1 -1
  206. package/dist/views/Dashboard/Default/ModularDashboard/index.d.ts.map +1 -1
  207. package/dist/views/Dashboard/Default/ModularDashboard/index.js +75 -75
  208. package/dist/views/Dashboard/Default/ModularDashboard/index.js.map +1 -1
  209. package/dist/views/Dashboard/Default/ModularDashboard/index.scss +316 -0
  210. package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/RenderWidget.js +62 -89
  211. package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/RenderWidget.js.map +1 -1
  212. package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/getDefaultLayoutServerFn.d.ts.map +1 -1
  213. package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/getDefaultLayoutServerFn.js +43 -47
  214. package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/getDefaultLayoutServerFn.js.map +1 -1
  215. package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/renderWidgetServerFn.d.ts.map +1 -1
  216. package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/renderWidgetServerFn.js +67 -65
  217. package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/renderWidgetServerFn.js.map +1 -1
  218. package/dist/views/Dashboard/Default/ModularDashboard/useDashboardLayout.js +164 -147
  219. package/dist/views/Dashboard/Default/ModularDashboard/useDashboardLayout.js.map +1 -1
  220. package/dist/views/Dashboard/Default/ModularDashboard/utils/collisionDetection.js +31 -30
  221. package/dist/views/Dashboard/Default/ModularDashboard/utils/collisionDetection.js.map +1 -1
  222. package/dist/views/Dashboard/Default/ModularDashboard/utils/sensors.js +223 -229
  223. package/dist/views/Dashboard/Default/ModularDashboard/utils/sensors.js.map +1 -1
  224. package/dist/views/Dashboard/Default/index.js +59 -45
  225. package/dist/views/Dashboard/Default/index.js.map +1 -1
  226. package/dist/views/Dashboard/index.js +46 -42
  227. package/dist/views/Dashboard/index.js.map +1 -1
  228. package/dist/views/Dashboard/metadata.js +10 -14
  229. package/dist/views/Dashboard/metadata.js.map +1 -1
  230. package/dist/views/Document/getCustomDocumentViewByKey.js +3 -2
  231. package/dist/views/Document/getCustomDocumentViewByKey.js.map +1 -1
  232. package/dist/views/Document/getCustomViewByRoute.js +27 -30
  233. package/dist/views/Document/getCustomViewByRoute.js.map +1 -1
  234. package/dist/views/Document/getDocPreferences.js +40 -41
  235. package/dist/views/Document/getDocPreferences.js.map +1 -1
  236. package/dist/views/Document/getDocumentData.js +44 -55
  237. package/dist/views/Document/getDocumentData.js.map +1 -1
  238. package/dist/views/Document/getDocumentPermissions.js +77 -80
  239. package/dist/views/Document/getDocumentPermissions.js.map +1 -1
  240. package/dist/views/Document/getDocumentView.js +313 -283
  241. package/dist/views/Document/getDocumentView.js.map +1 -1
  242. package/dist/views/Document/getIsLocked.js +73 -73
  243. package/dist/views/Document/getIsLocked.js.map +1 -1
  244. package/dist/views/Document/getMetaBySegment.js +130 -136
  245. package/dist/views/Document/getMetaBySegment.js.map +1 -1
  246. package/dist/views/Document/getVersions.js +220 -213
  247. package/dist/views/Document/getVersions.js.map +1 -1
  248. package/dist/views/Document/handleServerFunction.d.ts.map +1 -1
  249. package/dist/views/Document/handleServerFunction.js +101 -130
  250. package/dist/views/Document/handleServerFunction.js.map +1 -1
  251. package/dist/views/Document/index.js +317 -355
  252. package/dist/views/Document/index.js.map +1 -1
  253. package/dist/views/Document/metadata.js +2 -1
  254. package/dist/views/Document/metadata.js.map +1 -1
  255. package/dist/views/Document/renderDocumentSlots.d.ts +3 -2
  256. package/dist/views/Document/renderDocumentSlots.d.ts.map +1 -1
  257. package/dist/views/Document/renderDocumentSlots.js +142 -141
  258. package/dist/views/Document/renderDocumentSlots.js.map +1 -1
  259. package/dist/views/Edit/index.js +10 -6
  260. package/dist/views/Edit/index.js.map +1 -1
  261. package/dist/views/Edit/metadata.js +36 -46
  262. package/dist/views/Edit/metadata.js.map +1 -1
  263. package/dist/views/ForgotPassword/ForgotPasswordForm/index.js +130 -164
  264. package/dist/views/ForgotPassword/ForgotPasswordForm/index.js.map +1 -1
  265. package/dist/views/ForgotPassword/index.js +79 -62
  266. package/dist/views/ForgotPassword/index.js.map +1 -1
  267. package/dist/views/ForgotPassword/metadata.js +8 -12
  268. package/dist/views/ForgotPassword/metadata.js.map +1 -1
  269. package/dist/views/List/createSerializableValue.js +12 -11
  270. package/dist/views/List/createSerializableValue.js.map +1 -1
  271. package/dist/views/List/enrichDocsWithVersionStatus.js +86 -86
  272. package/dist/views/List/enrichDocsWithVersionStatus.js.map +1 -1
  273. package/dist/views/List/extractRelationshipDisplayValue.js +15 -14
  274. package/dist/views/List/extractRelationshipDisplayValue.js.map +1 -1
  275. package/dist/views/List/extractValueOrRelationshipID.js +16 -15
  276. package/dist/views/List/extractValueOrRelationshipID.js.map +1 -1
  277. package/dist/views/List/handleGroupBy.js +133 -150
  278. package/dist/views/List/handleGroupBy.js.map +1 -1
  279. package/dist/views/List/handleServerFunction.d.ts.map +1 -1
  280. package/dist/views/List/handleServerFunction.js +97 -123
  281. package/dist/views/List/handleServerFunction.js.map +1 -1
  282. package/dist/views/List/index.d.ts +1 -0
  283. package/dist/views/List/index.d.ts.map +1 -1
  284. package/dist/views/List/index.js +303 -318
  285. package/dist/views/List/index.js.map +1 -1
  286. package/dist/views/List/metadata.js +17 -20
  287. package/dist/views/List/metadata.js.map +1 -1
  288. package/dist/views/List/renderListViewSlots.js +82 -75
  289. package/dist/views/List/renderListViewSlots.js.map +1 -1
  290. package/dist/views/List/resolveAllFilterOptions.js +43 -45
  291. package/dist/views/List/resolveAllFilterOptions.js.map +1 -1
  292. package/dist/views/List/transformColumnsToSelect.js +9 -8
  293. package/dist/views/List/transformColumnsToSelect.js.map +1 -1
  294. package/dist/views/Login/LoginField/index.js +57 -89
  295. package/dist/views/Login/LoginField/index.js.map +1 -1
  296. package/dist/views/Login/LoginForm/index.js +107 -160
  297. package/dist/views/Login/LoginForm/index.js.map +1 -1
  298. package/dist/views/Login/LoginForm/index.scss +10 -0
  299. package/dist/views/Login/index.js +82 -85
  300. package/dist/views/Login/index.js.map +1 -1
  301. package/dist/views/Login/index.scss +10 -0
  302. package/dist/views/Login/metadata.js +8 -12
  303. package/dist/views/Login/metadata.js.map +1 -1
  304. package/dist/views/Logout/LogoutClient.js +84 -120
  305. package/dist/views/Logout/LogoutClient.js.map +1 -1
  306. package/dist/views/Logout/index.js +29 -29
  307. package/dist/views/Logout/index.js.map +1 -1
  308. package/dist/views/Logout/index.scss +25 -0
  309. package/dist/views/Logout/metadata.js +7 -11
  310. package/dist/views/Logout/metadata.js.map +1 -1
  311. package/dist/views/NotFound/index.client.js +71 -82
  312. package/dist/views/NotFound/index.client.js.map +1 -1
  313. package/dist/views/NotFound/index.js +72 -73
  314. package/dist/views/NotFound/index.js.map +1 -1
  315. package/dist/views/NotFound/index.scss +57 -0
  316. package/dist/views/NotFound/metadata.js +7 -9
  317. package/dist/views/NotFound/metadata.js.map +1 -1
  318. package/dist/views/ResetPassword/ResetPasswordForm/index.js +97 -108
  319. package/dist/views/ResetPassword/ResetPasswordForm/index.js.map +1 -1
  320. package/dist/views/ResetPassword/index.js +93 -73
  321. package/dist/views/ResetPassword/index.js.map +1 -1
  322. package/dist/views/ResetPassword/index.scss +11 -0
  323. package/dist/views/ResetPassword/metadata.js +8 -12
  324. package/dist/views/ResetPassword/metadata.js.map +1 -1
  325. package/dist/views/Root/attachViewActions.js +18 -23
  326. package/dist/views/Root/attachViewActions.js.map +1 -1
  327. package/dist/views/Root/generateCustomViewMetadata.js +19 -21
  328. package/dist/views/Root/generateCustomViewMetadata.js.map +1 -1
  329. package/dist/views/Root/getCustomViewByKey.js +12 -14
  330. package/dist/views/Root/getCustomViewByKey.js.map +1 -1
  331. package/dist/views/Root/getCustomViewByRoute.js +31 -42
  332. package/dist/views/Root/getCustomViewByRoute.js.map +1 -1
  333. package/dist/views/Root/getDocumentViewInfo.js +24 -23
  334. package/dist/views/Root/getDocumentViewInfo.js.map +1 -1
  335. package/dist/views/Root/getRouteData.js +333 -325
  336. package/dist/views/Root/getRouteData.js.map +1 -1
  337. package/dist/views/Root/index.js +248 -270
  338. package/dist/views/Root/index.js.map +1 -1
  339. package/dist/views/Root/isPathMatchingRoute.js +21 -26
  340. package/dist/views/Root/isPathMatchingRoute.js.map +1 -1
  341. package/dist/views/Root/metadata.js +176 -181
  342. package/dist/views/Root/metadata.js.map +1 -1
  343. package/dist/views/Unauthorized/index.js +54 -46
  344. package/dist/views/Unauthorized/index.js.map +1 -1
  345. package/dist/views/Unauthorized/index.scss +14 -0
  346. package/dist/views/Unauthorized/metadata.js +8 -12
  347. package/dist/views/Unauthorized/metadata.js.map +1 -1
  348. package/dist/views/Verify/index.client.js +25 -43
  349. package/dist/views/Verify/index.client.js.map +1 -1
  350. package/dist/views/Verify/index.js +69 -64
  351. package/dist/views/Verify/index.js.map +1 -1
  352. package/dist/views/Verify/index.scss +16 -0
  353. package/dist/views/Verify/metadata.js +8 -12
  354. package/dist/views/Verify/metadata.js.map +1 -1
  355. package/dist/views/Version/Default/SelectedLocalesContext.js +4 -4
  356. package/dist/views/Version/Default/SelectedLocalesContext.js.map +1 -1
  357. package/dist/views/Version/Default/SetStepNav.js +86 -127
  358. package/dist/views/Version/Default/SetStepNav.js.map +1 -1
  359. package/dist/views/Version/Default/index.js +380 -236
  360. package/dist/views/Version/Default/index.js.map +1 -1
  361. package/dist/views/Version/Default/index.scss +170 -0
  362. package/dist/views/Version/Default/types.js +2 -1
  363. package/dist/views/Version/Default/types.js.map +1 -1
  364. package/dist/views/Version/RenderFieldsToDiff/DiffCollapser/index.js +102 -119
  365. package/dist/views/Version/RenderFieldsToDiff/DiffCollapser/index.js.map +1 -1
  366. package/dist/views/Version/RenderFieldsToDiff/DiffCollapser/index.scss +81 -0
  367. package/dist/views/Version/RenderFieldsToDiff/RenderVersionFieldsToDiff.js +78 -73
  368. package/dist/views/Version/RenderFieldsToDiff/RenderVersionFieldsToDiff.js.map +1 -1
  369. package/dist/views/Version/RenderFieldsToDiff/buildVersionFields.js +363 -408
  370. package/dist/views/Version/RenderFieldsToDiff/buildVersionFields.js.map +1 -1
  371. package/dist/views/Version/RenderFieldsToDiff/fields/Collapsible/index.js +40 -51
  372. package/dist/views/Version/RenderFieldsToDiff/fields/Collapsible/index.js.map +1 -1
  373. package/dist/views/Version/RenderFieldsToDiff/fields/Date/index.js +35 -67
  374. package/dist/views/Version/RenderFieldsToDiff/fields/Date/index.js.map +1 -1
  375. package/dist/views/Version/RenderFieldsToDiff/fields/Date/index.scss +12 -0
  376. package/dist/views/Version/RenderFieldsToDiff/fields/Group/index.js +59 -56
  377. package/dist/views/Version/RenderFieldsToDiff/fields/Group/index.js.map +1 -1
  378. package/dist/views/Version/RenderFieldsToDiff/fields/Group/index.scss +9 -0
  379. package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.js +139 -117
  380. package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.js.map +1 -1
  381. package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.scss +59 -0
  382. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/generateLabelFromValue.js +56 -61
  383. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/generateLabelFromValue.js.map +1 -1
  384. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.js +223 -204
  385. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.js.map +1 -1
  386. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.scss +91 -0
  387. package/dist/views/Version/RenderFieldsToDiff/fields/Row/index.js +17 -11
  388. package/dist/views/Version/RenderFieldsToDiff/fields/Row/index.js.map +1 -1
  389. package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.js +48 -73
  390. package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.js.map +1 -1
  391. package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.scss +4 -0
  392. package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.js +132 -143
  393. package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.js.map +1 -1
  394. package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.scss +9 -0
  395. package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.js +56 -81
  396. package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.js.map +1 -1
  397. package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.scss +4 -0
  398. package/dist/views/Version/RenderFieldsToDiff/fields/Upload/index.js +252 -211
  399. package/dist/views/Version/RenderFieldsToDiff/fields/Upload/index.js.map +1 -1
  400. package/dist/views/Version/RenderFieldsToDiff/fields/Upload/index.scss +121 -0
  401. package/dist/views/Version/RenderFieldsToDiff/fields/index.js +23 -22
  402. package/dist/views/Version/RenderFieldsToDiff/fields/index.js.map +1 -1
  403. package/dist/views/Version/RenderFieldsToDiff/index.js +12 -9
  404. package/dist/views/Version/RenderFieldsToDiff/index.js.map +1 -1
  405. package/dist/views/Version/RenderFieldsToDiff/index.scss +24 -0
  406. package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.js +213 -228
  407. package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.js.map +1 -1
  408. package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.spec.js +1005 -826
  409. package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.spec.js.map +1 -1
  410. package/dist/views/Version/RenderFieldsToDiff/utilities/fieldHasChanges.js +2 -1
  411. package/dist/views/Version/RenderFieldsToDiff/utilities/fieldHasChanges.js.map +1 -1
  412. package/dist/views/Version/RenderFieldsToDiff/utilities/fieldHasChanges.spec.js +44 -43
  413. package/dist/views/Version/RenderFieldsToDiff/utilities/fieldHasChanges.spec.js.map +1 -1
  414. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.js +32 -36
  415. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.js.map +1 -1
  416. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.spec.js +145 -129
  417. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.spec.js.map +1 -1
  418. package/dist/views/Version/Restore/index.js +117 -93
  419. package/dist/views/Version/Restore/index.js.map +1 -1
  420. package/dist/views/Version/Restore/index.scss +84 -0
  421. package/dist/views/Version/SelectComparison/VersionDrawer/CreatedAtCell.js +33 -50
  422. package/dist/views/Version/SelectComparison/VersionDrawer/CreatedAtCell.js.map +1 -1
  423. package/dist/views/Version/SelectComparison/VersionDrawer/index.js +170 -226
  424. package/dist/views/Version/SelectComparison/VersionDrawer/index.js.map +1 -1
  425. package/dist/views/Version/SelectComparison/VersionDrawer/index.scss +18 -0
  426. package/dist/views/Version/SelectComparison/index.js +73 -50
  427. package/dist/views/Version/SelectComparison/index.js.map +1 -1
  428. package/dist/views/Version/SelectComparison/index.scss +9 -0
  429. package/dist/views/Version/SelectComparison/types.js +2 -1
  430. package/dist/views/Version/SelectComparison/types.js.map +1 -1
  431. package/dist/views/Version/SelectLocales/index.js +34 -32
  432. package/dist/views/Version/SelectLocales/index.js.map +1 -1
  433. package/dist/views/Version/VersionPillLabel/VersionPillLabel.d.ts.map +1 -1
  434. package/dist/views/Version/VersionPillLabel/VersionPillLabel.js +107 -96
  435. package/dist/views/Version/VersionPillLabel/VersionPillLabel.js.map +1 -1
  436. package/dist/views/Version/VersionPillLabel/getVersionLabel.d.ts +3 -2
  437. package/dist/views/Version/VersionPillLabel/getVersionLabel.d.ts.map +1 -1
  438. package/dist/views/Version/VersionPillLabel/getVersionLabel.js +30 -39
  439. package/dist/views/Version/VersionPillLabel/getVersionLabel.js.map +1 -1
  440. package/dist/views/Version/VersionPillLabel/index.scss +26 -0
  441. package/dist/views/Version/fetchVersions.js +113 -138
  442. package/dist/views/Version/fetchVersions.js.map +1 -1
  443. package/dist/views/Version/index.d.ts.map +1 -1
  444. package/dist/views/Version/index.js +328 -323
  445. package/dist/views/Version/index.js.map +1 -1
  446. package/dist/views/Version/metadata.js +43 -50
  447. package/dist/views/Version/metadata.js.map +1 -1
  448. package/dist/views/Versions/buildColumns.js +95 -79
  449. package/dist/views/Versions/buildColumns.js.map +1 -1
  450. package/dist/views/Versions/cells/AutosaveCell/index.js +34 -38
  451. package/dist/views/Versions/cells/AutosaveCell/index.js.map +1 -1
  452. package/dist/views/Versions/cells/AutosaveCell/index.scss +9 -0
  453. package/dist/views/Versions/cells/CreatedAt/index.js +32 -53
  454. package/dist/views/Versions/cells/CreatedAt/index.js.map +1 -1
  455. package/dist/views/Versions/cells/ID/index.js +10 -8
  456. package/dist/views/Versions/cells/ID/index.js.map +1 -1
  457. package/dist/views/Versions/index.client.js +106 -83
  458. package/dist/views/Versions/index.client.js.map +1 -1
  459. package/dist/views/Versions/index.js +164 -164
  460. package/dist/views/Versions/index.js.map +1 -1
  461. package/dist/views/Versions/index.scss +110 -0
  462. package/dist/views/Versions/metadata.js +37 -44
  463. package/dist/views/Versions/metadata.js.map +1 -1
  464. package/dist/views/Versions/types.js +2 -1
  465. package/dist/views/Versions/types.js.map +1 -1
  466. package/dist/withPayload/withPayload.js +232 -174
  467. package/dist/withPayload/withPayload.js.map +1 -1
  468. package/dist/withPayload/withPayload.spec.js +36 -35
  469. package/dist/withPayload/withPayload.spec.js.map +1 -1
  470. package/dist/withPayload/withPayload.utils.js +65 -73
  471. package/dist/withPayload/withPayload.utils.js.map +1 -1
  472. package/dist/withPayload/withPayloadLegacy.js +41 -40
  473. package/dist/withPayload/withPayloadLegacy.js.map +1 -1
  474. package/package.json +6 -6
@@ -22,14 +22,13 @@
22
22
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
- */import { readFileSync } from 'fs';
25
+ */ import { readFileSync } from 'fs';
26
26
  import { fileURLToPath } from 'url';
27
27
  /**
28
28
  * @param {string | undefined} input
29
29
  * @returns {number}
30
- */
31
- function _parseInt(input) {
32
- return parseInt(input || '', 10);
30
+ */ function _parseInt(input) {
31
+ return parseInt(input || '', 10);
33
32
  }
34
33
  /**
35
34
  * Represents Semantic Versioning object
@@ -46,88 +45,81 @@ const SEMVER_REGEXP = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\
46
45
  * Parses input into a SemVer interface
47
46
  * @param {string} input - string representation of a semver version
48
47
  * @returns {SemVer}
49
- */
50
- export function parseSemver(input) {
51
- const match = input.match(SEMVER_REGEXP) || [];
52
- const major = _parseInt(match[1]);
53
- const minor = _parseInt(match[2]);
54
- const patch = _parseInt(match[3]);
55
- const prerelease = match[4];
56
- const canaryVersion = prerelease?.startsWith('canary.') ? parseInt(prerelease.split('.')[1] || '0', 10) : undefined;
57
- return {
58
- buildmetadata: match[5],
59
- canaryVersion,
60
- major: isNaN(major) ? undefined : major,
61
- minor: isNaN(minor) ? undefined : minor,
62
- patch: isNaN(patch) ? undefined : patch,
63
- prerelease: match[4]
64
- };
48
+ */ export function parseSemver(input) {
49
+ const match = input.match(SEMVER_REGEXP) || [];
50
+ const major = _parseInt(match[1]);
51
+ const minor = _parseInt(match[2]);
52
+ const patch = _parseInt(match[3]);
53
+ const prerelease = match[4];
54
+ const canaryVersion = prerelease?.startsWith('canary.') ? parseInt(prerelease.split('.')[1] || '0', 10) : undefined;
55
+ return {
56
+ buildmetadata: match[5],
57
+ canaryVersion,
58
+ major: isNaN(major) ? undefined : major,
59
+ minor: isNaN(minor) ? undefined : minor,
60
+ patch: isNaN(patch) ? undefined : patch,
61
+ prerelease: match[4]
62
+ };
65
63
  }
66
64
  /**
67
65
  * Returns the version of Next.js installed in the project, or undefined if it cannot be determined.
68
66
  * @returns {SemVer | undefined}
69
- */
70
- export function getNextjsVersion() {
71
- try {
72
- /** @type {string} */let pkgPath;
73
- // Check if we're in ESM or CJS environment
74
- if (typeof import.meta?.resolve === 'function') {
75
- // ESM environment - use import.meta.resolve
76
- const pkgUrl = import.meta.resolve('next/package.json');
77
- // Use fileURLToPath for proper cross-platform path handling (Windows, macOS, Linux)
78
- // new URL().pathname returns '/C:/path' on Windows which causes path resolution issues
79
- pkgPath = fileURLToPath(pkgUrl);
80
- } else {
81
- // CJS environment - use require.resolve
82
- pkgPath = require.resolve('next/package.json');
67
+ */ export function getNextjsVersion() {
68
+ try {
69
+ /** @type {string} */ let pkgPath;
70
+ // Check if we're in ESM or CJS environment
71
+ if (typeof import.meta?.resolve === 'function') {
72
+ // ESM environment - use import.meta.resolve
73
+ const pkgUrl = import.meta.resolve('next/package.json');
74
+ // Use fileURLToPath for proper cross-platform path handling (Windows, macOS, Linux)
75
+ // new URL().pathname returns '/C:/path' on Windows which causes path resolution issues
76
+ pkgPath = fileURLToPath(pkgUrl);
77
+ } else {
78
+ // CJS environment - use require.resolve
79
+ pkgPath = require.resolve('next/package.json');
80
+ }
81
+ const pkgJson = JSON.parse(readFileSync(pkgPath, 'utf8'));
82
+ return parseSemver(pkgJson.version);
83
+ } catch (e) {
84
+ console.error('Payload: Error getting Next.js version', e);
85
+ return undefined;
83
86
  }
84
- const pkgJson = JSON.parse(readFileSync(pkgPath, 'utf8'));
85
- return parseSemver(pkgJson.version);
86
- } catch (e) {
87
- console.error('Payload: Error getting Next.js version', e);
88
- return undefined;
89
- }
90
87
  }
91
88
  /**
92
89
  * Checks if the current Next.js version supports Turbopack externalize transitive dependencies.
93
90
  * This was introduced in Next.js v16.1.0-canary.3
94
91
  * @param {SemVer | undefined} version
95
92
  * @returns {boolean}
96
- */
97
- export function supportsTurbopackExternalizeTransitiveDependencies(version) {
98
- if (!version) {
99
- return false;
100
- }
101
- const {
102
- canaryVersion,
103
- major,
104
- minor,
105
- patch
106
- } = version;
107
- if (major === undefined || minor === undefined) {
108
- return false;
109
- }
110
- if (major > 16) {
111
- return true;
112
- }
113
- if (major === 16) {
114
- if (minor > 1) {
115
- return true;
93
+ */ export function supportsTurbopackExternalizeTransitiveDependencies(version) {
94
+ if (!version) {
95
+ return false;
116
96
  }
117
- if (minor === 1) {
118
- // 16.1.1+ and canaries support this feature
119
- if (patch > 0) {
120
- return true;
121
- }
122
- if (canaryVersion !== undefined) {
123
- // 16.1.0-canary.3+
124
- return canaryVersion >= 3;
125
- } else {
126
- // Next.js 16.1.0
97
+ const { canaryVersion, major, minor, patch } = version;
98
+ if (major === undefined || minor === undefined) {
99
+ return false;
100
+ }
101
+ if (major > 16) {
127
102
  return true;
128
- }
129
103
  }
130
- }
131
- return false;
104
+ if (major === 16) {
105
+ if (minor > 1) {
106
+ return true;
107
+ }
108
+ if (minor === 1) {
109
+ // 16.1.1+ and canaries support this feature
110
+ if (patch > 0) {
111
+ return true;
112
+ }
113
+ if (canaryVersion !== undefined) {
114
+ // 16.1.0-canary.3+
115
+ return canaryVersion >= 3;
116
+ } else {
117
+ // Next.js 16.1.0
118
+ return true;
119
+ }
120
+ }
121
+ }
122
+ return false;
132
123
  }
124
+
133
125
  //# sourceMappingURL=withPayload.utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"withPayload.utils.js","names":["readFileSync","fileURLToPath","_parseInt","input","parseInt","SEMVER_REGEXP","parseSemver","match","major","minor","patch","prerelease","canaryVersion","startsWith","split","undefined","buildmetadata","isNaN","getNextjsVersion","pkgPath","import","meta","resolve","pkgUrl","require","pkgJson","JSON","parse","version","e","console","error","supportsTurbopackExternalizeTransitiveDependencies"],"sources":["../../src/withPayload/withPayload.utils.js"],"sourcesContent":[" \n/**\n * This was taken and modified from https://github.com/getsentry/sentry-javascript/blob/15256034ee8150a5b7dcb97d23eca1a5486f0cae/packages/nextjs/src/config/util.ts\n *\n * MIT License\n *\n * Copyright (c) 2012 Functional Software, Inc. dba Sentry\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n * of the Software, and to permit persons to whom the Software is furnished to do\n * so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { readFileSync } from 'fs'\nimport { fileURLToPath } from 'url'\n\n/**\n * @param {string | undefined} input\n * @returns {number}\n */\nfunction _parseInt(input) {\n return parseInt(input || '', 10)\n}\n\n/**\n * Represents Semantic Versioning object\n * @typedef {Object} SemVer\n * @property {string} [buildmetadata]\n * @property {number} [canaryVersion] - undefined if not a canary version\n * @property {number} [major]\n * @property {number} [minor]\n * @property {number} [patch]\n * @property {string} [prerelease]\n */\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst SEMVER_REGEXP =\n /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*))*))?(?:\\+([0-9a-z-]+(?:\\.[0-9a-z-]+)*))?$/i\n\n/**\n * Parses input into a SemVer interface\n * @param {string} input - string representation of a semver version\n * @returns {SemVer}\n */\nexport function parseSemver(input) {\n const match = input.match(SEMVER_REGEXP) || []\n const major = _parseInt(match[1])\n const minor = _parseInt(match[2])\n const patch = _parseInt(match[3])\n\n const prerelease = match[4]\n const canaryVersion = prerelease?.startsWith('canary.')\n ? parseInt(prerelease.split('.')[1] || '0', 10)\n : undefined\n\n return {\n buildmetadata: match[5],\n canaryVersion,\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n }\n}\n\n/**\n * Returns the version of Next.js installed in the project, or undefined if it cannot be determined.\n * @returns {SemVer | undefined}\n */\nexport function getNextjsVersion() {\n try {\n /** @type {string} */\n let pkgPath\n\n // Check if we're in ESM or CJS environment\n if (typeof import.meta?.resolve === 'function') {\n // ESM environment - use import.meta.resolve\n const pkgUrl = import.meta.resolve('next/package.json')\n // Use fileURLToPath for proper cross-platform path handling (Windows, macOS, Linux)\n // new URL().pathname returns '/C:/path' on Windows which causes path resolution issues\n pkgPath = fileURLToPath(pkgUrl)\n } else {\n // CJS environment - use require.resolve\n pkgPath = require.resolve('next/package.json')\n }\n\n const pkgJson = JSON.parse(readFileSync(pkgPath, 'utf8'))\n return parseSemver(pkgJson.version)\n } catch (e) {\n console.error('Payload: Error getting Next.js version', e)\n return undefined\n }\n}\n\n/**\n * Checks if the current Next.js version supports Turbopack externalize transitive dependencies.\n * This was introduced in Next.js v16.1.0-canary.3\n * @param {SemVer | undefined} version\n * @returns {boolean}\n */\nexport function supportsTurbopackExternalizeTransitiveDependencies(version) {\n if (!version) {\n return false\n }\n\n const { canaryVersion, major, minor, patch } = version\n\n if (major === undefined || minor === undefined) {\n return false\n }\n\n if (major > 16) {\n return true\n }\n\n if (major === 16) {\n if (minor > 1) {\n return true\n }\n if (minor === 1) {\n // 16.1.1+ and canaries support this feature\n if (patch > 0) {\n return true\n }\n if (canaryVersion !== undefined) {\n // 16.1.0-canary.3+\n return canaryVersion >= 3\n } else {\n // Next.js 16.1.0\n return true\n }\n }\n }\n\n return false\n}\n"],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;GA0BA,SAASA,YAAY,QAAQ;AAC7B,SAASC,aAAa,QAAQ;AAE9B;;;;AAIA,SAASC,UAAUC,KAAK;EACtB,OAAOC,QAAA,CAASD,KAAA,IAAS,IAAI;AAC/B;AAEA;;;;;;;;;GAAA,CAWA;AACA,MAAME,aAAA,GACJ;AAEF;;;;;AAKA,OAAO,SAASC,YAAYH,KAAK;EAC/B,MAAMI,KAAA,GAAQJ,KAAA,CAAMI,KAAK,CAACF,aAAA,KAAkB,EAAE;EAC9C,MAAMG,KAAA,GAAQN,SAAA,CAAUK,KAAK,CAAC,EAAE;EAChC,MAAME,KAAA,GAAQP,SAAA,CAAUK,KAAK,CAAC,EAAE;EAChC,MAAMG,KAAA,GAAQR,SAAA,CAAUK,KAAK,CAAC,EAAE;EAEhC,MAAMI,UAAA,GAAaJ,KAAK,CAAC,EAAE;EAC3B,MAAMK,aAAA,GAAgBD,UAAA,EAAYE,UAAA,CAAW,aACzCT,QAAA,CAASO,UAAA,CAAWG,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,KAAK,MAC1CC,SAAA;EAEJ,OAAO;IACLC,aAAA,EAAeT,KAAK,CAAC,EAAE;IACvBK,aAAA;IACAJ,KAAA,EAAOS,KAAA,CAAMT,KAAA,IAASO,SAAA,GAAYP,KAAA;IAClCC,KAAA,EAAOQ,KAAA,CAAMR,KAAA,IAASM,SAAA,GAAYN,KAAA;IAClCC,KAAA,EAAOO,KAAA,CAAMP,KAAA,IAASK,SAAA,GAAYL,KAAA;IAClCC,UAAA,EAAYJ,KAAK,CAAC;EACpB;AACF;AAEA;;;;AAIA,OAAO,SAASW,iBAAA;EACd,IAAI;IACF,qBACA,IAAIC,OAAA;IAEJ;IACA,IAAI,OAAOC,MAAA,CAAAC,IAAA,EAAaC,OAAA,KAAY,YAAY;MAC9C;MACA,MAAMC,MAAA,GAASH,MAAA,CAAAC,IAAA,CAAYC,OAAO,CAAC;MACnC;MACA;MACAH,OAAA,GAAUlB,aAAA,CAAcsB,MAAA;IAC1B,OAAO;MACL;MACAJ,OAAA,GAAUK,OAAA,CAAQF,OAAO,CAAC;IAC5B;IAEA,MAAMG,OAAA,GAAUC,IAAA,CAAKC,KAAK,CAAC3B,YAAA,CAAamB,OAAA,EAAS;IACjD,OAAOb,WAAA,CAAYmB,OAAA,CAAQG,OAAO;EACpC,EAAE,OAAOC,CAAA,EAAG;IACVC,OAAA,CAAQC,KAAK,CAAC,0CAA0CF,CAAA;IACxD,OAAOd,SAAA;EACT;AACF;AAEA;;;;;;AAMA,OAAO,SAASiB,mDAAmDJ,OAAO;EACxE,IAAI,CAACA,OAAA,EAAS;IACZ,OAAO;EACT;EAEA,MAAM;IAAEhB,aAAa;IAAEJ,KAAK;IAAEC,KAAK;IAAEC;EAAK,CAAE,GAAGkB,OAAA;EAE/C,IAAIpB,KAAA,KAAUO,SAAA,IAAaN,KAAA,KAAUM,SAAA,EAAW;IAC9C,OAAO;EACT;EAEA,IAAIP,KAAA,GAAQ,IAAI;IACd,OAAO;EACT;EAEA,IAAIA,KAAA,KAAU,IAAI;IAChB,IAAIC,KAAA,GAAQ,GAAG;MACb,OAAO;IACT;IACA,IAAIA,KAAA,KAAU,GAAG;MACf;MACA,IAAIC,KAAA,GAAQ,GAAG;QACb,OAAO;MACT;MACA,IAAIE,aAAA,KAAkBG,SAAA,EAAW;QAC/B;QACA,OAAOH,aAAA,IAAiB;MAC1B,OAAO;QACL;QACA,OAAO;MACT;IACF;EACF;EAEA,OAAO;AACT","ignoreList":[]}
1
+ {"version":3,"sources":["../../src/withPayload/withPayload.utils.js"],"sourcesContent":[" \n/**\n * This was taken and modified from https://github.com/getsentry/sentry-javascript/blob/15256034ee8150a5b7dcb97d23eca1a5486f0cae/packages/nextjs/src/config/util.ts\n *\n * MIT License\n *\n * Copyright (c) 2012 Functional Software, Inc. dba Sentry\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n * of the Software, and to permit persons to whom the Software is furnished to do\n * so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { readFileSync } from 'fs'\nimport { fileURLToPath } from 'url'\n\n/**\n * @param {string | undefined} input\n * @returns {number}\n */\nfunction _parseInt(input) {\n return parseInt(input || '', 10)\n}\n\n/**\n * Represents Semantic Versioning object\n * @typedef {Object} SemVer\n * @property {string} [buildmetadata]\n * @property {number} [canaryVersion] - undefined if not a canary version\n * @property {number} [major]\n * @property {number} [minor]\n * @property {number} [patch]\n * @property {string} [prerelease]\n */\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst SEMVER_REGEXP =\n /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*))*))?(?:\\+([0-9a-z-]+(?:\\.[0-9a-z-]+)*))?$/i\n\n/**\n * Parses input into a SemVer interface\n * @param {string} input - string representation of a semver version\n * @returns {SemVer}\n */\nexport function parseSemver(input) {\n const match = input.match(SEMVER_REGEXP) || []\n const major = _parseInt(match[1])\n const minor = _parseInt(match[2])\n const patch = _parseInt(match[3])\n\n const prerelease = match[4]\n const canaryVersion = prerelease?.startsWith('canary.')\n ? parseInt(prerelease.split('.')[1] || '0', 10)\n : undefined\n\n return {\n buildmetadata: match[5],\n canaryVersion,\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n }\n}\n\n/**\n * Returns the version of Next.js installed in the project, or undefined if it cannot be determined.\n * @returns {SemVer | undefined}\n */\nexport function getNextjsVersion() {\n try {\n /** @type {string} */\n let pkgPath\n\n // Check if we're in ESM or CJS environment\n if (typeof import.meta?.resolve === 'function') {\n // ESM environment - use import.meta.resolve\n const pkgUrl = import.meta.resolve('next/package.json')\n // Use fileURLToPath for proper cross-platform path handling (Windows, macOS, Linux)\n // new URL().pathname returns '/C:/path' on Windows which causes path resolution issues\n pkgPath = fileURLToPath(pkgUrl)\n } else {\n // CJS environment - use require.resolve\n pkgPath = require.resolve('next/package.json')\n }\n\n const pkgJson = JSON.parse(readFileSync(pkgPath, 'utf8'))\n return parseSemver(pkgJson.version)\n } catch (e) {\n console.error('Payload: Error getting Next.js version', e)\n return undefined\n }\n}\n\n/**\n * Checks if the current Next.js version supports Turbopack externalize transitive dependencies.\n * This was introduced in Next.js v16.1.0-canary.3\n * @param {SemVer | undefined} version\n * @returns {boolean}\n */\nexport function supportsTurbopackExternalizeTransitiveDependencies(version) {\n if (!version) {\n return false\n }\n\n const { canaryVersion, major, minor, patch } = version\n\n if (major === undefined || minor === undefined) {\n return false\n }\n\n if (major > 16) {\n return true\n }\n\n if (major === 16) {\n if (minor > 1) {\n return true\n }\n if (minor === 1) {\n // 16.1.1+ and canaries support this feature\n if (patch > 0) {\n return true\n }\n if (canaryVersion !== undefined) {\n // 16.1.0-canary.3+\n return canaryVersion >= 3\n } else {\n // Next.js 16.1.0\n return true\n }\n }\n }\n\n return false\n}\n"],"names":["readFileSync","fileURLToPath","_parseInt","input","parseInt","SEMVER_REGEXP","parseSemver","match","major","minor","patch","prerelease","canaryVersion","startsWith","split","undefined","buildmetadata","isNaN","getNextjsVersion","pkgPath","resolve","pkgUrl","require","pkgJson","JSON","parse","version","e","console","error","supportsTurbopackExternalizeTransitiveDependencies"],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;CAwBC,GAED,SAASA,YAAY,QAAQ,KAAI;AACjC,SAASC,aAAa,QAAQ,MAAK;AAEnC;;;CAGC,GACD,SAASC,UAAUC,KAAK;IACtB,OAAOC,SAASD,SAAS,IAAI;AAC/B;AAEA;;;;;;;;;CASC,GAED,6FAA6F;AAC7F,MAAME,gBACJ;AAEF;;;;CAIC,GACD,OAAO,SAASC,YAAYH,KAAK;IAC/B,MAAMI,QAAQJ,MAAMI,KAAK,CAACF,kBAAkB,EAAE;IAC9C,MAAMG,QAAQN,UAAUK,KAAK,CAAC,EAAE;IAChC,MAAME,QAAQP,UAAUK,KAAK,CAAC,EAAE;IAChC,MAAMG,QAAQR,UAAUK,KAAK,CAAC,EAAE;IAEhC,MAAMI,aAAaJ,KAAK,CAAC,EAAE;IAC3B,MAAMK,gBAAgBD,YAAYE,WAAW,aACzCT,SAASO,WAAWG,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,KAAK,MAC1CC;IAEJ,OAAO;QACLC,eAAeT,KAAK,CAAC,EAAE;QACvBK;QACAJ,OAAOS,MAAMT,SAASO,YAAYP;QAClCC,OAAOQ,MAAMR,SAASM,YAAYN;QAClCC,OAAOO,MAAMP,SAASK,YAAYL;QAClCC,YAAYJ,KAAK,CAAC,EAAE;IACtB;AACF;AAEA;;;CAGC,GACD,OAAO,SAASW;IACd,IAAI;QACF,mBAAmB,GACnB,IAAIC;QAEJ,2CAA2C;QAC3C,IAAI,OAAO,aAAaC,YAAY,YAAY;YAC9C,4CAA4C;YAC5C,MAAMC,SAAS,YAAYD,OAAO,CAAC;YACnC,oFAAoF;YACpF,uFAAuF;YACvFD,UAAUlB,cAAcoB;QAC1B,OAAO;YACL,wCAAwC;YACxCF,UAAUG,QAAQF,OAAO,CAAC;QAC5B;QAEA,MAAMG,UAAUC,KAAKC,KAAK,CAACzB,aAAamB,SAAS;QACjD,OAAOb,YAAYiB,QAAQG,OAAO;IACpC,EAAE,OAAOC,GAAG;QACVC,QAAQC,KAAK,CAAC,0CAA0CF;QACxD,OAAOZ;IACT;AACF;AAEA;;;;;CAKC,GACD,OAAO,SAASe,mDAAmDJ,OAAO;IACxE,IAAI,CAACA,SAAS;QACZ,OAAO;IACT;IAEA,MAAM,EAAEd,aAAa,EAAEJ,KAAK,EAAEC,KAAK,EAAEC,KAAK,EAAE,GAAGgB;IAE/C,IAAIlB,UAAUO,aAAaN,UAAUM,WAAW;QAC9C,OAAO;IACT;IAEA,IAAIP,QAAQ,IAAI;QACd,OAAO;IACT;IAEA,IAAIA,UAAU,IAAI;QAChB,IAAIC,QAAQ,GAAG;YACb,OAAO;QACT;QACA,IAAIA,UAAU,GAAG;YACf,4CAA4C;YAC5C,IAAIC,QAAQ,GAAG;gBACb,OAAO;YACT;YACA,IAAIE,kBAAkBG,WAAW;gBAC/B,mBAAmB;gBACnB,OAAOH,iBAAiB;YAC1B,OAAO;gBACL,iBAAiB;gBACjB,OAAO;YACT;QACF;IACF;IAEA,OAAO;AACT"}
@@ -2,46 +2,47 @@
2
2
  * Applies config options required to support Next.js versions before 16.1.0 and 16.1.0-canary.3.
3
3
  * @param {import('next').NextConfig} nextConfig
4
4
  * @returns {import('next').NextConfig}
5
- */export const withPayloadLegacy = (nextConfig = {}) => {
6
- if (process.env.PAYLOAD_PATCH_TURBOPACK_WARNINGS !== 'false') {
7
- // TODO: This warning is thrown because we cannot externalize the entry-point package for client-s3, so we patch the warning to not show it.
8
- // We can remove this once Next.js implements https://github.com/vercel/next.js/discussions/76991
9
- const turbopackWarningText = 'Packages that should be external need to be installed in the project directory, so they can be resolved from the output files.\nTry to install it into the project directory by running';
10
- // TODO 4.0: Remove this once we drop support for Next.js 15.2.x
11
- const turbopackConfigWarningText = "Unrecognized key(s) in object: 'turbopack'";
12
- const consoleWarn = console.warn;
13
- console.warn = (...args) => {
14
- // Force to disable serverExternalPackages warnings: https://github.com/vercel/next.js/issues/68805
15
- if (typeof args[1] === 'string' && args[1].includes(turbopackWarningText) || typeof args[0] === 'string' && args[0].includes(turbopackWarningText)) {
16
- return;
17
- }
18
- // Add Payload-specific message after turbopack config warning in Next.js 15.2.x or lower.
19
- // TODO 4.0: Remove this once we drop support for Next.js 15.2.x
20
- const hasTurbopackConfigWarning = typeof args[1] === 'string' && args[1].includes(turbopackConfigWarningText) || typeof args[0] === 'string' && args[0].includes(turbopackConfigWarningText);
21
- if (hasTurbopackConfigWarning) {
22
- consoleWarn(...args);
23
- consoleWarn('Payload: You can safely ignore the "Invalid next.config" warning above. This only occurs on Next.js 15.2.x or lower. We recommend upgrading to the latest supported Next.js version to resolve this warning.');
24
- return;
25
- }
26
- consoleWarn(...args);
5
+ */ export const withPayloadLegacy = (nextConfig = {})=>{
6
+ if (process.env.PAYLOAD_PATCH_TURBOPACK_WARNINGS !== 'false') {
7
+ // TODO: This warning is thrown because we cannot externalize the entry-point package for client-s3, so we patch the warning to not show it.
8
+ // We can remove this once Next.js implements https://github.com/vercel/next.js/discussions/76991
9
+ const turbopackWarningText = 'Packages that should be external need to be installed in the project directory, so they can be resolved from the output files.\nTry to install it into the project directory by running';
10
+ // TODO 4.0: Remove this once we drop support for Next.js 15.2.x
11
+ const turbopackConfigWarningText = "Unrecognized key(s) in object: 'turbopack'";
12
+ const consoleWarn = console.warn;
13
+ console.warn = (...args)=>{
14
+ // Force to disable serverExternalPackages warnings: https://github.com/vercel/next.js/issues/68805
15
+ if (typeof args[1] === 'string' && args[1].includes(turbopackWarningText) || typeof args[0] === 'string' && args[0].includes(turbopackWarningText)) {
16
+ return;
17
+ }
18
+ // Add Payload-specific message after turbopack config warning in Next.js 15.2.x or lower.
19
+ // TODO 4.0: Remove this once we drop support for Next.js 15.2.x
20
+ const hasTurbopackConfigWarning = typeof args[1] === 'string' && args[1].includes(turbopackConfigWarningText) || typeof args[0] === 'string' && args[0].includes(turbopackConfigWarningText);
21
+ if (hasTurbopackConfigWarning) {
22
+ consoleWarn(...args);
23
+ consoleWarn('Payload: You can safely ignore the "Invalid next.config" warning above. This only occurs on Next.js 15.2.x or lower. We recommend upgrading to the latest supported Next.js version to resolve this warning.');
24
+ return;
25
+ }
26
+ consoleWarn(...args);
27
+ };
28
+ }
29
+ const isBuild = process.env.NODE_ENV === 'production';
30
+ const isTurbopackNextjs15 = process.env.TURBOPACK === '1';
31
+ const isTurbopackNextjs16 = process.env.TURBOPACK === 'auto';
32
+ if (isBuild && (isTurbopackNextjs15 || isTurbopackNextjs16)) {
33
+ throw new Error('Your Next.js version does not support using Turbopack for production builds. The *minimum* Next.js version required for Turbopack Builds is 16.1.0. Please upgrade to the latest supported Next.js version to resolve this error.');
34
+ }
35
+ /** @type {import('next').NextConfig} */ const toReturn = {
36
+ ...nextConfig,
37
+ serverExternalPackages: [
38
+ // serverExternalPackages = webpack.externals, but with turbopack support and an additional check
39
+ // for whether the package is resolvable from the project root
40
+ ...nextConfig.serverExternalPackages || [],
41
+ // External, because it installs import-in-the-middle and require-in-the-middle - both in the default serverExternalPackages list.
42
+ '@sentry/nextjs'
43
+ ]
27
44
  };
28
- }
29
- const isBuild = process.env.NODE_ENV === 'production';
30
- const isTurbopackNextjs15 = process.env.TURBOPACK === '1';
31
- const isTurbopackNextjs16 = process.env.TURBOPACK === 'auto';
32
- if (isBuild && (isTurbopackNextjs15 || isTurbopackNextjs16)) {
33
- throw new Error('Your Next.js version does not support using Turbopack for production builds. The *minimum* Next.js version required for Turbopack Builds is 16.1.0. Please upgrade to the latest supported Next.js version to resolve this error.');
34
- }
35
- /** @type {import('next').NextConfig} */
36
- const toReturn = {
37
- ...nextConfig,
38
- serverExternalPackages: [
39
- // serverExternalPackages = webpack.externals, but with turbopack support and an additional check
40
- // for whether the package is resolvable from the project root
41
- ...(nextConfig.serverExternalPackages || []),
42
- // External, because it installs import-in-the-middle and require-in-the-middle - both in the default serverExternalPackages list.
43
- '@sentry/nextjs']
44
- };
45
- return toReturn;
45
+ return toReturn;
46
46
  };
47
+
47
48
  //# sourceMappingURL=withPayloadLegacy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"withPayloadLegacy.js","names":["withPayloadLegacy","nextConfig","process","env","PAYLOAD_PATCH_TURBOPACK_WARNINGS","turbopackWarningText","turbopackConfigWarningText","consoleWarn","console","warn","args","includes","hasTurbopackConfigWarning","isBuild","NODE_ENV","isTurbopackNextjs15","TURBOPACK","isTurbopackNextjs16","Error","toReturn","serverExternalPackages"],"sources":["../../src/withPayload/withPayloadLegacy.js"],"sourcesContent":["/**\n * Applies config options required to support Next.js versions before 16.1.0 and 16.1.0-canary.3.\n * @param {import('next').NextConfig} nextConfig\n * @returns {import('next').NextConfig}\n */\nexport const withPayloadLegacy = (nextConfig = {}) => {\n if (process.env.PAYLOAD_PATCH_TURBOPACK_WARNINGS !== 'false') {\n // TODO: This warning is thrown because we cannot externalize the entry-point package for client-s3, so we patch the warning to not show it.\n // We can remove this once Next.js implements https://github.com/vercel/next.js/discussions/76991\n const turbopackWarningText =\n 'Packages that should be external need to be installed in the project directory, so they can be resolved from the output files.\\nTry to install it into the project directory by running'\n\n // TODO 4.0: Remove this once we drop support for Next.js 15.2.x\n const turbopackConfigWarningText = \"Unrecognized key(s) in object: 'turbopack'\"\n\n const consoleWarn = console.warn\n console.warn = (...args) => {\n // Force to disable serverExternalPackages warnings: https://github.com/vercel/next.js/issues/68805\n if (\n (typeof args[1] === 'string' && args[1].includes(turbopackWarningText)) ||\n (typeof args[0] === 'string' && args[0].includes(turbopackWarningText))\n ) {\n return\n }\n\n // Add Payload-specific message after turbopack config warning in Next.js 15.2.x or lower.\n // TODO 4.0: Remove this once we drop support for Next.js 15.2.x\n const hasTurbopackConfigWarning =\n (typeof args[1] === 'string' && args[1].includes(turbopackConfigWarningText)) ||\n (typeof args[0] === 'string' && args[0].includes(turbopackConfigWarningText))\n\n if (hasTurbopackConfigWarning) {\n consoleWarn(...args)\n consoleWarn(\n 'Payload: You can safely ignore the \"Invalid next.config\" warning above. This only occurs on Next.js 15.2.x or lower. We recommend upgrading to the latest supported Next.js version to resolve this warning.',\n )\n return\n }\n\n consoleWarn(...args)\n }\n }\n\n const isBuild = process.env.NODE_ENV === 'production'\n const isTurbopackNextjs15 = process.env.TURBOPACK === '1'\n const isTurbopackNextjs16 = process.env.TURBOPACK === 'auto'\n\n if (isBuild && (isTurbopackNextjs15 || isTurbopackNextjs16)) {\n throw new Error(\n 'Your Next.js version does not support using Turbopack for production builds. The *minimum* Next.js version required for Turbopack Builds is 16.1.0. Please upgrade to the latest supported Next.js version to resolve this error.',\n )\n }\n\n /** @type {import('next').NextConfig} */\n const toReturn = {\n ...nextConfig,\n serverExternalPackages: [\n // serverExternalPackages = webpack.externals, but with turbopack support and an additional check\n // for whether the package is resolvable from the project root\n ...(nextConfig.serverExternalPackages || []),\n // External, because it installs import-in-the-middle and require-in-the-middle - both in the default serverExternalPackages list.\n '@sentry/nextjs',\n ],\n }\n\n return toReturn\n}\n"],"mappings":"AAAA;;;;GAKA,OAAO,MAAMA,iBAAA,GAAoBA,CAACC,UAAA,GAAa,CAAC,CAAC;EAC/C,IAAIC,OAAA,CAAQC,GAAG,CAACC,gCAAgC,KAAK,SAAS;IAC5D;IACA;IACA,MAAMC,oBAAA,GACJ;IAEF;IACA,MAAMC,0BAAA,GAA6B;IAEnC,MAAMC,WAAA,GAAcC,OAAA,CAAQC,IAAI;IAChCD,OAAA,CAAQC,IAAI,GAAG,CAAC,GAAGC,IAAA;MACjB;MACA,IACE,OAAQA,IAAI,CAAC,EAAE,KAAK,YAAYA,IAAI,CAAC,EAAE,CAACC,QAAQ,CAACN,oBAAA,KAChD,OAAOK,IAAI,CAAC,EAAE,KAAK,YAAYA,IAAI,CAAC,EAAE,CAACC,QAAQ,CAACN,oBAAA,GACjD;QACA;MACF;MAEA;MACA;MACA,MAAMO,yBAAA,GACJ,OAAQF,IAAI,CAAC,EAAE,KAAK,YAAYA,IAAI,CAAC,EAAE,CAACC,QAAQ,CAACL,0BAAA,KAChD,OAAOI,IAAI,CAAC,EAAE,KAAK,YAAYA,IAAI,CAAC,EAAE,CAACC,QAAQ,CAACL,0BAAA;MAEnD,IAAIM,yBAAA,EAA2B;QAC7BL,WAAA,IAAeG,IAAA;QACfH,WAAA,CACE;QAEF;MACF;MAEAA,WAAA,IAAeG,IAAA;IACjB;EACF;EAEA,MAAMG,OAAA,GAAUX,OAAA,CAAQC,GAAG,CAACW,QAAQ,KAAK;EACzC,MAAMC,mBAAA,GAAsBb,OAAA,CAAQC,GAAG,CAACa,SAAS,KAAK;EACtD,MAAMC,mBAAA,GAAsBf,OAAA,CAAQC,GAAG,CAACa,SAAS,KAAK;EAEtD,IAAIH,OAAA,KAAYE,mBAAA,IAAuBE,mBAAkB,GAAI;IAC3D,MAAM,IAAIC,KAAA,CACR;EAEJ;EAEA;EACA,MAAMC,QAAA,GAAW;IACf,GAAGlB,UAAU;IACbmB,sBAAA,EAAwB;IACtB;IACA;QACInB,UAAA,CAAWmB,sBAAsB,IAAI,EAAE;IAC3C;IACA;EAEJ;EAEA,OAAOD,QAAA;AACT","ignoreList":[]}
1
+ {"version":3,"sources":["../../src/withPayload/withPayloadLegacy.js"],"sourcesContent":["/**\n * Applies config options required to support Next.js versions before 16.1.0 and 16.1.0-canary.3.\n * @param {import('next').NextConfig} nextConfig\n * @returns {import('next').NextConfig}\n */\nexport const withPayloadLegacy = (nextConfig = {}) => {\n if (process.env.PAYLOAD_PATCH_TURBOPACK_WARNINGS !== 'false') {\n // TODO: This warning is thrown because we cannot externalize the entry-point package for client-s3, so we patch the warning to not show it.\n // We can remove this once Next.js implements https://github.com/vercel/next.js/discussions/76991\n const turbopackWarningText =\n 'Packages that should be external need to be installed in the project directory, so they can be resolved from the output files.\\nTry to install it into the project directory by running'\n\n // TODO 4.0: Remove this once we drop support for Next.js 15.2.x\n const turbopackConfigWarningText = \"Unrecognized key(s) in object: 'turbopack'\"\n\n const consoleWarn = console.warn\n console.warn = (...args) => {\n // Force to disable serverExternalPackages warnings: https://github.com/vercel/next.js/issues/68805\n if (\n (typeof args[1] === 'string' && args[1].includes(turbopackWarningText)) ||\n (typeof args[0] === 'string' && args[0].includes(turbopackWarningText))\n ) {\n return\n }\n\n // Add Payload-specific message after turbopack config warning in Next.js 15.2.x or lower.\n // TODO 4.0: Remove this once we drop support for Next.js 15.2.x\n const hasTurbopackConfigWarning =\n (typeof args[1] === 'string' && args[1].includes(turbopackConfigWarningText)) ||\n (typeof args[0] === 'string' && args[0].includes(turbopackConfigWarningText))\n\n if (hasTurbopackConfigWarning) {\n consoleWarn(...args)\n consoleWarn(\n 'Payload: You can safely ignore the \"Invalid next.config\" warning above. This only occurs on Next.js 15.2.x or lower. We recommend upgrading to the latest supported Next.js version to resolve this warning.',\n )\n return\n }\n\n consoleWarn(...args)\n }\n }\n\n const isBuild = process.env.NODE_ENV === 'production'\n const isTurbopackNextjs15 = process.env.TURBOPACK === '1'\n const isTurbopackNextjs16 = process.env.TURBOPACK === 'auto'\n\n if (isBuild && (isTurbopackNextjs15 || isTurbopackNextjs16)) {\n throw new Error(\n 'Your Next.js version does not support using Turbopack for production builds. The *minimum* Next.js version required for Turbopack Builds is 16.1.0. Please upgrade to the latest supported Next.js version to resolve this error.',\n )\n }\n\n /** @type {import('next').NextConfig} */\n const toReturn = {\n ...nextConfig,\n serverExternalPackages: [\n // serverExternalPackages = webpack.externals, but with turbopack support and an additional check\n // for whether the package is resolvable from the project root\n ...(nextConfig.serverExternalPackages || []),\n // External, because it installs import-in-the-middle and require-in-the-middle - both in the default serverExternalPackages list.\n '@sentry/nextjs',\n ],\n }\n\n return toReturn\n}\n"],"names":["withPayloadLegacy","nextConfig","process","env","PAYLOAD_PATCH_TURBOPACK_WARNINGS","turbopackWarningText","turbopackConfigWarningText","consoleWarn","console","warn","args","includes","hasTurbopackConfigWarning","isBuild","NODE_ENV","isTurbopackNextjs15","TURBOPACK","isTurbopackNextjs16","Error","toReturn","serverExternalPackages"],"mappings":"AAAA;;;;CAIC,GACD,OAAO,MAAMA,oBAAoB,CAACC,aAAa,CAAC,CAAC;IAC/C,IAAIC,QAAQC,GAAG,CAACC,gCAAgC,KAAK,SAAS;QAC5D,4IAA4I;QAC5I,iGAAiG;QACjG,MAAMC,uBACJ;QAEF,gEAAgE;QAChE,MAAMC,6BAA6B;QAEnC,MAAMC,cAAcC,QAAQC,IAAI;QAChCD,QAAQC,IAAI,GAAG,CAAC,GAAGC;YACjB,mGAAmG;YACnG,IACE,AAAC,OAAOA,IAAI,CAAC,EAAE,KAAK,YAAYA,IAAI,CAAC,EAAE,CAACC,QAAQ,CAACN,yBAChD,OAAOK,IAAI,CAAC,EAAE,KAAK,YAAYA,IAAI,CAAC,EAAE,CAACC,QAAQ,CAACN,uBACjD;gBACA;YACF;YAEA,0FAA0F;YAC1F,gEAAgE;YAChE,MAAMO,4BACJ,AAAC,OAAOF,IAAI,CAAC,EAAE,KAAK,YAAYA,IAAI,CAAC,EAAE,CAACC,QAAQ,CAACL,+BAChD,OAAOI,IAAI,CAAC,EAAE,KAAK,YAAYA,IAAI,CAAC,EAAE,CAACC,QAAQ,CAACL;YAEnD,IAAIM,2BAA2B;gBAC7BL,eAAeG;gBACfH,YACE;gBAEF;YACF;YAEAA,eAAeG;QACjB;IACF;IAEA,MAAMG,UAAUX,QAAQC,GAAG,CAACW,QAAQ,KAAK;IACzC,MAAMC,sBAAsBb,QAAQC,GAAG,CAACa,SAAS,KAAK;IACtD,MAAMC,sBAAsBf,QAAQC,GAAG,CAACa,SAAS,KAAK;IAEtD,IAAIH,WAAYE,CAAAA,uBAAuBE,mBAAkB,GAAI;QAC3D,MAAM,IAAIC,MACR;IAEJ;IAEA,sCAAsC,GACtC,MAAMC,WAAW;QACf,GAAGlB,UAAU;QACbmB,wBAAwB;YACtB,iGAAiG;YACjG,8DAA8D;eAC1DnB,WAAWmB,sBAAsB,IAAI,EAAE;YAC3C,kIAAkI;YAClI;SACD;IACH;IAEA,OAAOD;AACT,EAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/next",
3
- "version": "3.74.0-canary.5",
3
+ "version": "3.74.0-internal-debug.1b84a48",
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.74.0-canary.5",
103
- "@payloadcms/ui": "3.74.0-canary.5",
104
- "@payloadcms/translations": "3.74.0-canary.5"
102
+ "@payloadcms/graphql": "3.74.0-internal-debug.1b84a48",
103
+ "@payloadcms/ui": "3.74.0-internal-debug.1b84a48",
104
+ "@payloadcms/translations": "3.74.0-internal-debug.1b84a48"
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.74.0-canary.5"
122
+ "payload": "3.74.0-internal-debug.1b84a48"
123
123
  },
124
124
  "peerDependencies": {
125
125
  "graphql": "^16.8.1",
126
126
  "next": "^15.4.10 || >=16.1.1-canary.35 <16.2.0 || ^16.2.0",
127
- "payload": "3.74.0-canary.5"
127
+ "payload": "3.74.0-internal-debug.1b84a48"
128
128
  },
129
129
  "engines": {
130
130
  "node": "^18.20.2 || >=20.9.0"