@payloadcms/next 3.20.0-canary.75e9839 → 3.20.0-canary.9a14747
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/withPayload.cjs +3 -0
- package/dist/cjs/withPayload.cjs.map +1 -1
- package/dist/prod/styles.css +1 -1
- package/dist/views/Account/index.d.ts.map +1 -1
- package/dist/views/Account/index.js +2 -1
- package/dist/views/Account/index.js.map +1 -1
- package/dist/views/CreateFirstUser/index.client.d.ts.map +1 -1
- package/dist/views/CreateFirstUser/index.client.js +4 -2
- package/dist/views/CreateFirstUser/index.client.js.map +1 -1
- package/dist/views/CreateFirstUser/index.d.ts.map +1 -1
- package/dist/views/CreateFirstUser/index.js +2 -1
- package/dist/views/CreateFirstUser/index.js.map +1 -1
- package/dist/views/Document/getDocumentPermissions.js +2 -2
- package/dist/views/Document/getDocumentPermissions.js.map +1 -1
- package/dist/views/Document/index.d.ts.map +1 -1
- package/dist/views/Document/index.js +2 -1
- package/dist/views/Document/index.js.map +1 -1
- package/dist/views/LivePreview/index.client.d.ts.map +1 -1
- package/dist/views/LivePreview/index.client.js +5 -2
- package/dist/views/LivePreview/index.client.js.map +1 -1
- package/dist/views/Version/Default/SelectedLocalesContext.d.ts +8 -0
- package/dist/views/Version/Default/SelectedLocalesContext.d.ts.map +1 -0
- package/dist/views/Version/Default/SelectedLocalesContext.js +10 -0
- package/dist/views/Version/Default/SelectedLocalesContext.js.map +1 -0
- package/dist/views/Version/Default/index.d.ts.map +1 -1
- package/dist/views/Version/Default/index.js +107 -159
- package/dist/views/Version/Default/index.js.map +1 -1
- package/dist/views/Version/Default/index.scss +5 -0
- package/dist/views/Version/Default/types.d.ts +5 -4
- package/dist/views/Version/Default/types.d.ts.map +1 -1
- package/dist/views/Version/Default/types.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/RenderVersionFieldsToDiff.d.ts +7 -0
- package/dist/views/Version/RenderFieldsToDiff/RenderVersionFieldsToDiff.d.ts.map +1 -0
- package/dist/views/Version/RenderFieldsToDiff/RenderVersionFieldsToDiff.js +74 -0
- package/dist/views/Version/RenderFieldsToDiff/RenderVersionFieldsToDiff.js.map +1 -0
- package/dist/views/Version/RenderFieldsToDiff/buildVersionFields.d.ts +31 -0
- package/dist/views/Version/RenderFieldsToDiff/buildVersionFields.d.ts.map +1 -0
- package/dist/views/Version/RenderFieldsToDiff/buildVersionFields.js +319 -0
- package/dist/views/Version/RenderFieldsToDiff/buildVersionFields.js.map +1 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Collapsible/index.d.ts +2 -3
- package/dist/views/Version/RenderFieldsToDiff/fields/Collapsible/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Collapsible/index.js +57 -31
- package/dist/views/Version/RenderFieldsToDiff/fields/Collapsible/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Group/index.d.ts +2 -3
- package/dist/views/Version/RenderFieldsToDiff/fields/Group/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Group/index.js +59 -35
- package/dist/views/Version/RenderFieldsToDiff/fields/Group/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.d.ts +3 -3
- package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.js +97 -65
- package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.d.ts +2 -4
- package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.js +18 -17
- package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Row/index.d.ts +2 -3
- package/dist/views/Version/RenderFieldsToDiff/fields/Row/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Row/index.js +7 -24
- package/dist/views/Version/RenderFieldsToDiff/fields/Row/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/DiffViewer/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/DiffViewer/index.js +1 -2
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/DiffViewer/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.d.ts +2 -4
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.js +56 -27
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.d.ts +2 -4
- package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.js +143 -80
- package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/DiffViewer/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/DiffViewer/index.js +1 -2
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/DiffViewer/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.d.ts +2 -4
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.js +71 -36
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/index.d.ts +2 -22
- package/dist/views/Version/RenderFieldsToDiff/fields/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/index.js +2 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/styles.d.ts +3 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/styles.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/styles.js +3 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/styles.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/index.d.ts +2 -4
- package/dist/views/Version/RenderFieldsToDiff/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/index.js +8 -111
- package/dist/views/Version/RenderFieldsToDiff/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/index.scss +4 -0
- package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.js +10 -1
- package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldPathsModified.d.ts +27 -0
- package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldPathsModified.d.ts.map +1 -0
- package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldPathsModified.js +30 -0
- package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldPathsModified.js.map +1 -0
- package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.d.ts +8 -3
- package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.js +12 -3
- package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.spec.js +27 -9
- package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.spec.js.map +1 -1
- package/dist/views/Version/Restore/index.d.ts.map +1 -1
- package/dist/views/Version/Restore/index.js +2 -2
- package/dist/views/Version/Restore/index.js.map +1 -1
- package/dist/views/Version/SelectComparison/index.d.ts.map +1 -1
- package/dist/views/Version/SelectComparison/index.js +7 -3
- package/dist/views/Version/SelectComparison/index.js.map +1 -1
- package/dist/views/Version/SelectComparison/types.d.ts.map +1 -1
- package/dist/views/Version/SelectComparison/types.js.map +1 -1
- package/dist/views/Version/index.d.ts.map +1 -1
- package/dist/views/Version/index.js +120 -15
- package/dist/views/Version/index.js.map +1 -1
- package/dist/views/Versions/getLatestVersion.d.ts +4 -1
- package/dist/views/Versions/getLatestVersion.d.ts.map +1 -1
- package/dist/views/Versions/getLatestVersion.js +6 -0
- package/dist/views/Versions/getLatestVersion.js.map +1 -1
- package/dist/withPayload.d.ts.map +1 -1
- package/dist/withPayload.js +3 -0
- package/dist/withPayload.js.map +1 -1
- package/package.json +9 -8
- package/dist/views/Version/RenderFieldsToDiff/fields/types.d.ts +0 -21
- package/dist/views/Version/RenderFieldsToDiff/fields/types.d.ts.map +0 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/types.js +0 -2
- package/dist/views/Version/RenderFieldsToDiff/fields/types.js.map +0 -1
- package/dist/views/Version/RenderFieldsToDiff/types.d.ts +0 -21
- package/dist/views/Version/RenderFieldsToDiff/types.d.ts.map +0 -1
- package/dist/views/Version/RenderFieldsToDiff/types.js +0 -2
- package/dist/views/Version/RenderFieldsToDiff/types.js.map +0 -1
package/dist/cjs/withPayload.cjs
CHANGED
|
@@ -159,6 +159,9 @@ const withPayload = (nextConfig = {})=>{
|
|
|
159
159
|
if (nextConfig.basePath) {
|
|
160
160
|
toReturn.env.NEXT_BASE_PATH = nextConfig.basePath;
|
|
161
161
|
}
|
|
162
|
+
if (nextConfig.assetPrefix) {
|
|
163
|
+
toReturn.env.NEXT_ASSET_PREFIX = nextConfig.assetPrefix;
|
|
164
|
+
}
|
|
162
165
|
return toReturn;
|
|
163
166
|
};
|
|
164
167
|
const _default = withPayload;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/withPayload.js"],"names":[],"mappings":"AAAA;;;;GAIG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AE;QACvB,SAAS,GAAG,CAAC,cAAc,GAAG,WAAW,QAAQ;IACnD;IACA,IAAI,WAAW,WAAW,EAAE;QAC1B,SAAS,GAAG,CAAC,iBAAiB,GAAG,WAAW,WAAW;IACzD;IAEA,OAAO;AACT;MAEA,WAAe","file":"withPayload.cjs","sourcesContent":["/**\n * @param {import('next').NextConfig} nextConfig\n *\n * @returns {import('next').NextConfig}\n * */\nexport const withPayload = (nextConfig = {}) => {\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 if (process.env.PAYLOAD_PATCH_TURBOPACK_WARNINGS !== 'false') {\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 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 consoleWarn(...args)\n }\n }\n\n const poweredByHeader = {\n key: 'X-Powered-By',\n value: 'Next.js, Payload',\n }\n\n /**\n * @type {import('next').NextConfig}\n */\n const toReturn = {\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 experimental: {\n ...(nextConfig?.experimental || {}),\n turbo: {\n ...(nextConfig?.experimental?.turbo || {}),\n resolveAlias: {\n ...(nextConfig?.experimental?.turbo?.resolveAlias || {}),\n 'payload-mock-package': 'payload-mock-package',\n },\n },\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 source: '/:path*',\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 },\n ]\n },\n serverExternalPackages: [\n ...(nextConfig?.serverExternalPackages || []),\n 'drizzle-kit',\n 'drizzle-kit/api',\n 'pino',\n 'libsql',\n 'pino-pretty',\n 'graphql',\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 'drizzle-kit',\n 'drizzle-kit/api',\n 'sharp',\n 'libsql',\n ],\n ignoreWarnings: [\n ...(incomingWebpackConfig?.ignoreWarnings || []),\n { module: /node_modules\\/mongodb\\/lib\\/utils\\.js/ },\n { file: /node_modules\\/mongodb\\/lib\\/utils\\.js/ },\n { module: /node_modules\\/mongodb\\/lib\\/bson\\.js/ },\n { file: /node_modules\\/mongodb\\/lib\\/bson\\.js/ },\n ],\n resolve: {\n ...(incomingWebpackConfig?.resolve || {}),\n alias: {\n ...(incomingWebpackConfig?.resolve?.alias || {}),\n },\n fallback: {\n ...(incomingWebpackConfig?.resolve?.fallback || {}),\n '@aws-sdk/credential-providers': false,\n '@mongodb-js/zstd': false,\n aws4: false,\n kerberos: false,\n 'mongodb-client-encryption': false,\n snappy: false,\n 'supports-color': false,\n 'yocto-queue': false,\n },\n },\n }\n },\n }\n\n if (nextConfig.basePath) {\n toReturn.env.NEXT_BASE_PATH = nextConfig.basePath\n }\n if (nextConfig.assetPrefix) {\n toReturn.env.NEXT_ASSET_PREFIX = nextConfig.assetPrefix\n }\n\n return toReturn\n}\n\nexport default withPayload\n"]}
|