next 16.1.1-canary.25 → 16.1.1-canary.27

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 (61) hide show
  1. package/dist/.build-commit +1 -1
  2. package/dist/bin/next +2 -2
  3. package/dist/build/index.js +3 -3
  4. package/dist/build/swc/index.js +1 -1
  5. package/dist/build/templates/app-page.js.map +1 -1
  6. package/dist/build/webpack-config.js +3 -3
  7. package/dist/bundle-analyzer/404.html +2 -2
  8. package/dist/bundle-analyzer/__next.__PAGE__.txt +1 -1
  9. package/dist/bundle-analyzer/__next._full.txt +1 -1
  10. package/dist/bundle-analyzer/__next._head.txt +1 -1
  11. package/dist/bundle-analyzer/__next._index.txt +1 -1
  12. package/dist/bundle-analyzer/__next._tree.txt +1 -1
  13. package/dist/bundle-analyzer/_not-found/__next._full.txt +1 -1
  14. package/dist/bundle-analyzer/_not-found/__next._head.txt +1 -1
  15. package/dist/bundle-analyzer/_not-found/__next._index.txt +1 -1
  16. package/dist/bundle-analyzer/_not-found/__next._not-found.__PAGE__.txt +1 -1
  17. package/dist/bundle-analyzer/_not-found/__next._not-found.txt +1 -1
  18. package/dist/bundle-analyzer/_not-found/__next._tree.txt +1 -1
  19. package/dist/bundle-analyzer/_not-found.html +2 -2
  20. package/dist/bundle-analyzer/_not-found.txt +1 -1
  21. package/dist/bundle-analyzer/index.html +2 -2
  22. package/dist/bundle-analyzer/index.txt +1 -1
  23. package/dist/client/app-bootstrap.js +1 -1
  24. package/dist/client/index.js +1 -1
  25. package/dist/compiled/next-server/pages-api-turbo.runtime.dev.js +1 -1
  26. package/dist/compiled/next-server/pages-api-turbo.runtime.dev.js.map +1 -1
  27. package/dist/compiled/next-server/pages-api.runtime.dev.js +1 -1
  28. package/dist/compiled/next-server/pages-api.runtime.dev.js.map +1 -1
  29. package/dist/compiled/next-server/pages-turbo.runtime.dev.js +1 -1
  30. package/dist/compiled/next-server/pages-turbo.runtime.dev.js.map +1 -1
  31. package/dist/compiled/next-server/pages.runtime.dev.js +1 -1
  32. package/dist/compiled/next-server/pages.runtime.dev.js.map +1 -1
  33. package/dist/compiled/next-server/server.runtime.prod.js +1 -1
  34. package/dist/esm/build/index.js +3 -3
  35. package/dist/esm/build/swc/index.js +1 -1
  36. package/dist/esm/build/templates/app-page.js +5 -4
  37. package/dist/esm/build/templates/app-page.js.map +1 -1
  38. package/dist/esm/build/webpack-config.js +3 -3
  39. package/dist/esm/client/app-bootstrap.js +1 -1
  40. package/dist/esm/client/index.js +1 -1
  41. package/dist/esm/lib/metadata/resolve-metadata.js +1 -1
  42. package/dist/esm/lib/metadata/resolve-metadata.js.map +1 -1
  43. package/dist/esm/server/dev/hot-reloader-turbopack.js +1 -1
  44. package/dist/esm/server/dev/hot-reloader-webpack.js +1 -1
  45. package/dist/esm/server/lib/app-info-log.js +1 -1
  46. package/dist/esm/server/lib/start-server.js +1 -1
  47. package/dist/esm/shared/lib/errors/canary-only-config-error.js +1 -1
  48. package/dist/lib/metadata/resolve-metadata.js +1 -1
  49. package/dist/lib/metadata/resolve-metadata.js.map +1 -1
  50. package/dist/server/dev/hot-reloader-turbopack.js +1 -1
  51. package/dist/server/dev/hot-reloader-webpack.js +1 -1
  52. package/dist/server/lib/app-info-log.js +1 -1
  53. package/dist/server/lib/start-server.js +1 -1
  54. package/dist/shared/lib/errors/canary-only-config-error.js +1 -1
  55. package/dist/telemetry/anonymous-meta.js +1 -1
  56. package/dist/telemetry/events/session-stopped.js +2 -2
  57. package/dist/telemetry/events/version.js +2 -2
  58. package/package.json +15 -15
  59. /package/dist/bundle-analyzer/_next/static/{TRyTnzVJfQWPDn0Frxod5 → M3ZNTD0QJqfyqy99qDvqQ}/_buildManifest.js +0 -0
  60. /package/dist/bundle-analyzer/_next/static/{TRyTnzVJfQWPDn0Frxod5 → M3ZNTD0QJqfyqy99qDvqQ}/_clientMiddlewareManifest.json +0 -0
  61. /package/dist/bundle-analyzer/_next/static/{TRyTnzVJfQWPDn0Frxod5 → M3ZNTD0QJqfyqy99qDvqQ}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- e1c95fc2094f276eb881539d45e0f6f8e42a83e9
1
+ 0338b046395bcd3d9f761986637e203bd591a12a
package/dist/bin/next CHANGED
@@ -84,7 +84,7 @@ const program = new NextRootCommand();
84
84
  program.name('next').description('The Next.js CLI allows you to develop, build, start your application, and more.').configureHelp({
85
85
  formatHelp: (cmd, helper)=>(0, _formatclihelpoutput.formatCliHelpOutput)(cmd, helper),
86
86
  subcommandTerm: (cmd)=>`${cmd.name()} ${cmd.usage()}`
87
- }).helpCommand(false).helpOption('-h, --help', 'Displays this message.').version(`Next.js v${"16.1.1-canary.25"}`, '-v, --version', 'Outputs the Next.js version.');
87
+ }).helpCommand(false).helpOption('-h, --help', 'Displays this message.').version(`Next.js v${"16.1.1-canary.27"}`, '-v, --version', 'Outputs the Next.js version.');
88
88
  program.command('build').description('Creates an optimized production build of your application. The output displays information about each route.').argument('[directory]', `A directory on which to build the application. ${(0, _picocolors.italic)('If no directory is provided, the current directory will be used.')}`).option('--experimental-analyze', 'Analyze bundle output. Only compatible with Turbopack.').option('-d, --debug', 'Enables a more verbose build output.').option('--debug-prerender', 'Enables debug mode for prerendering. Not for production use!').option('--no-mangling', 'Disables mangling.').option('--profile', 'Enables production profiling for React.').option('--experimental-app-only', 'Builds only App Router routes.').option('--turbo', 'Builds using Turbopack.').option('--turbopack', 'Builds using Turbopack.').option('--webpack', 'Builds using webpack.').addOption(new _commander.Option('--experimental-build-mode [mode]', 'Uses an experimental build mode.').choices([
89
89
  'compile',
90
90
  'generate',
@@ -162,7 +162,7 @@ program.command('telemetry').description(`Allows you to enable or disable Next.j
162
162
  program.command('typegen').description('Generate TypeScript definitions for routes, pages, and layouts without running a full build.').argument('[directory]', `A directory on which to generate types. ${(0, _picocolors.italic)('If no directory is provided, the current directory will be used.')}`).action((directory, options)=>// ensure process exits after typegen completes so open handles/connections
163
163
  // don't cause process to hang
164
164
  import('../cli/next-typegen.js').then((mod)=>mod.nextTypegen(options, directory).then(()=>process.exit(0)))).usage('[directory] [options]');
165
- const nextVersion = "16.1.1-canary.25" || 'unknown';
165
+ const nextVersion = "16.1.1-canary.27" || 'unknown';
166
166
  program.command('upgrade').description('Upgrade Next.js apps to desired versions with a single command.').argument('[directory]', `A Next.js project directory to upgrade. ${(0, _picocolors.italic)('If no directory is provided, the current directory will be used.')}`).usage('[directory] [options]').option('--revision <revision>', 'Specify the target Next.js version using an NPM dist tag (e.g. "latest", "canary", "rc", "beta") or an exact version number (e.g. "15.0.0").', nextVersion.includes('-canary.') ? 'canary' : nextVersion.includes('-rc.') ? 'rc' : nextVersion.includes('-beta.') ? 'beta' : 'latest').option('--verbose', 'Verbose output', false).action(async (directory, options)=>{
167
167
  const mod = await import('../cli/next-upgrade.js');
168
168
  mod.spawnNextUpgrade(directory, options);
@@ -380,7 +380,7 @@ async function build(dir, experimentalAnalyze = false, reactProductionProfiling
380
380
  try {
381
381
  const nextBuildSpan = (0, _trace.trace)('next-build', undefined, {
382
382
  buildMode: experimentalBuildMode,
383
- version: "16.1.1-canary.25"
383
+ version: "16.1.1-canary.27"
384
384
  });
385
385
  _buildcontext.NextBuildContext.nextBuildSpan = nextBuildSpan;
386
386
  _buildcontext.NextBuildContext.dir = dir;
@@ -880,7 +880,7 @@ async function build(dir, experimentalAnalyze = false, reactProductionProfiling
880
880
  // Files outside of the distDir can be "type": "module"
881
881
  await writeFileUtf8(_path.default.join(distDir, 'package.json'), '{"type": "commonjs"}');
882
882
  // These are written to distDir, so they need to come after creating and cleaning distDr.
883
- await (0, _builddiagnostics.recordFrameworkVersion)("16.1.1-canary.25");
883
+ await (0, _builddiagnostics.recordFrameworkVersion)("16.1.1-canary.27");
884
884
  await (0, _builddiagnostics.updateBuildDiagnostics)({
885
885
  buildStage: 'start'
886
886
  });
@@ -2563,7 +2563,7 @@ async function build(dir, experimentalAnalyze = false, reactProductionProfiling
2563
2563
  configOutDir: _path.default.join(dir, configOutDir),
2564
2564
  staticPages,
2565
2565
  serverPropsPages,
2566
- nextVersion: "16.1.1-canary.25",
2566
+ nextVersion: "16.1.1-canary.27",
2567
2567
  tracingRoot: outputFileTracingRoot,
2568
2568
  hasNodeMiddleware,
2569
2569
  hasInstrumentationHook,
@@ -130,7 +130,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
130
130
  }
131
131
  return newObj;
132
132
  }
133
- const nextVersion = "16.1.1-canary.25";
133
+ const nextVersion = "16.1.1-canary.27";
134
134
  const ArchName = (0, _os.arch)();
135
135
  const PlatformName = (0, _os.platform)();
136
136
  function infoLog(...args) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/build/templates/app-page.ts"],"sourcesContent":["import type { LoaderTree } from '../../server/lib/app-dir-module'\nimport type { IncomingMessage, ServerResponse } from 'node:http'\n\nimport {\n AppPageRouteModule,\n type AppPageRouteHandlerContext,\n} from '../../server/route-modules/app-page/module.compiled' with { 'turbopack-transition': 'next-ssr' }\n\nimport { RouteKind } from '../../server/route-kind' with { 'turbopack-transition': 'next-server-utility' }\n\nimport { getRevalidateReason } from '../../server/instrumentation/utils'\nimport { getTracer, SpanKind, type Span } from '../../server/lib/trace/tracer'\nimport type { RequestMeta } from '../../server/request-meta'\nimport {\n addRequestMeta,\n getRequestMeta,\n setRequestMeta,\n} from '../../server/request-meta'\nimport { BaseServerSpan } from '../../server/lib/trace/constants'\nimport { interopDefault } from '../../server/app-render/interop-default'\nimport { stripFlightHeaders } from '../../server/app-render/strip-flight-headers'\nimport { NodeNextRequest, NodeNextResponse } from '../../server/base-http/node'\nimport { checkIsAppPPREnabled } from '../../server/lib/experimental/ppr'\nimport {\n getFallbackRouteParams,\n createOpaqueFallbackRouteParams,\n type OpaqueFallbackRouteParams,\n} from '../../server/request/fallback-params'\nimport { setManifestsSingleton } from '../../server/app-render/manifests-singleton'\nimport {\n isHtmlBotRequest,\n shouldServeStreamingMetadata,\n} from '../../server/lib/streaming-metadata'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport { getIsPossibleServerAction } from '../../server/lib/server-action-request-meta'\nimport {\n RSC_HEADER,\n NEXT_ROUTER_PREFETCH_HEADER,\n NEXT_IS_PRERENDER_HEADER,\n NEXT_DID_POSTPONE_HEADER,\n RSC_CONTENT_TYPE_HEADER,\n} from '../../client/components/app-router-headers'\nimport { getBotType, isBot } from '../../shared/lib/router/utils/is-bot'\nimport {\n CachedRouteKind,\n IncrementalCacheKind,\n type CachedAppPageValue,\n type CachedPageValue,\n type ResponseCacheEntry,\n type ResponseGenerator,\n} from '../../server/response-cache'\nimport { FallbackMode, parseFallbackField } from '../../lib/fallback'\nimport RenderResult from '../../server/render-result'\nimport {\n CACHE_ONE_YEAR,\n HTML_CONTENT_TYPE_HEADER,\n NEXT_CACHE_TAGS_HEADER,\n NEXT_RESUME_HEADER,\n NEXT_RESUME_STATE_LENGTH_HEADER,\n} from '../../lib/constants'\nimport type { CacheControl } from '../../server/lib/cache-control'\nimport { ENCODED_TAGS } from '../../server/stream-utils/encoded-tags'\nimport { sendRenderResult } from '../../server/send-payload'\nimport { NoFallbackError } from '../../shared/lib/no-fallback-error.external'\nimport {\n DEFAULT_MAX_POSTPONED_STATE_SIZE,\n parseMaxPostponedStateSize,\n} from '../../shared/lib/size-limit'\n\n// These are injected by the loader afterwards.\n\n/**\n * The tree created in next-app-loader that holds component segments and modules\n * and I've updated it.\n */\ndeclare const tree: LoaderTree\n\n// We inject the tree and pages here so that we can use them in the route\n// module.\n// INJECT:tree\n\nimport GlobalError from 'VAR_MODULE_GLOBAL_ERROR' with { 'turbopack-transition': 'next-server-utility' }\n\nexport { GlobalError }\n\n// These are injected by the loader afterwards.\ndeclare const __next_app_require__: (id: string | number) => unknown\ndeclare const __next_app_load_chunk__: (id: string | number) => Promise<unknown>\n\n// INJECT:__next_app_require__\n// INJECT:__next_app_load_chunk__\n\nexport const __next_app__ = {\n require: __next_app_require__,\n loadChunk: __next_app_load_chunk__,\n}\n\nimport * as entryBase from '../../server/app-render/entry-base' with { 'turbopack-transition': 'next-server-utility' }\nimport { RedirectStatusCode } from '../../client/components/redirect-status-code'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport { scheduleOnNextTick } from '../../lib/scheduler'\nimport { isInterceptionRouteAppPath } from '../../shared/lib/router/utils/interception-routes'\n\nexport * from '../../server/app-render/entry-base' with { 'turbopack-transition': 'next-server-utility' }\n\n// Create and export the route module that will be consumed.\nexport const routeModule = new AppPageRouteModule({\n definition: {\n kind: RouteKind.APP_PAGE,\n page: 'VAR_DEFINITION_PAGE',\n pathname: 'VAR_DEFINITION_PATHNAME',\n // The following aren't used in production.\n bundlePath: '',\n filename: '',\n appPaths: [],\n },\n userland: {\n loaderTree: tree,\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n})\n\nexport async function handler(\n req: IncomingMessage,\n res: ServerResponse,\n ctx: {\n waitUntil?: (prom: Promise<void>) => void\n requestMeta?: RequestMeta\n }\n) {\n if (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta)\n }\n\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint())\n }\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'))\n\n let srcPage = 'VAR_DEFINITION_PAGE'\n\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/'\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/'\n }\n const multiZoneDraftMode = process.env\n .__NEXT_MULTI_ZONE_DRAFT_MODE as any as boolean\n\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode,\n })\n\n if (!prepareResult) {\n res.statusCode = 400\n res.end('Bad Request')\n ctx.waitUntil?.(Promise.resolve())\n return null\n }\n\n const {\n buildId,\n query,\n params,\n pageIsDynamic,\n buildManifest,\n nextFontManifest,\n reactLoadableManifest,\n serverActionsManifest,\n clientReferenceManifest,\n subresourceIntegrityManifest,\n prerenderManifest,\n isDraftMode,\n resolvedPathname,\n revalidateOnlyGenerated,\n routerServerContext,\n nextConfig,\n parsedUrl,\n interceptionRoutePatterns,\n deploymentId,\n } = prepareResult\n\n const normalizedSrcPage = normalizeAppPath(srcPage)\n\n let { isOnDemandRevalidate } = prepareResult\n\n // We use the resolvedPathname instead of the parsedUrl.pathname because it\n // is not rewritten as resolvedPathname is. This will ensure that the correct\n // prerender info is used instead of using the original pathname as the\n // source. If however PPR is enabled and cacheComponents is disabled, we\n // treat the pathname as dynamic. Currently, there's a bug in the PPR\n // implementation that incorrectly leaves %%drp placeholders in the output of\n // parallel routes. This is addressed with cacheComponents.\n const prerenderInfo =\n nextConfig.experimental.ppr &&\n !nextConfig.cacheComponents &&\n isInterceptionRouteAppPath(resolvedPathname)\n ? null\n : routeModule.match(resolvedPathname, prerenderManifest)\n\n const isPrerendered = !!prerenderManifest.routes[resolvedPathname]\n\n const userAgent = req.headers['user-agent'] || ''\n const botType = getBotType(userAgent)\n const isHtmlBot = isHtmlBotRequest(req)\n\n /**\n * If true, this indicates that the request being made is for an app\n * prefetch request.\n */\n const isPrefetchRSCRequest =\n getRequestMeta(req, 'isPrefetchRSCRequest') ??\n req.headers[NEXT_ROUTER_PREFETCH_HEADER] === '1' // exclude runtime prefetches, which use '2'\n\n // NOTE: Don't delete headers[RSC] yet, it still needs to be used in renderToHTML later\n\n const isRSCRequest =\n getRequestMeta(req, 'isRSCRequest') ?? Boolean(req.headers[RSC_HEADER])\n\n const isPossibleServerAction = getIsPossibleServerAction(req)\n\n /**\n * If the route being rendered is an app page, and the ppr feature has been\n * enabled, then the given route _could_ support PPR.\n */\n const couldSupportPPR: boolean = checkIsAppPPREnabled(\n nextConfig.experimental.ppr\n )\n\n // Stash postponed state for server actions when in minimal mode.\n // We extract it here so the RDC is available for the re-render after the action completes.\n const resumeStateLengthHeader = req.headers[NEXT_RESUME_STATE_LENGTH_HEADER]\n if (\n !getRequestMeta(req, 'postponed') &&\n isMinimalMode &&\n couldSupportPPR &&\n isPossibleServerAction &&\n resumeStateLengthHeader &&\n typeof resumeStateLengthHeader === 'string'\n ) {\n const stateLength = parseInt(resumeStateLengthHeader, 10)\n const maxPostponedStateSize =\n nextConfig.experimental.maxPostponedStateSize ??\n DEFAULT_MAX_POSTPONED_STATE_SIZE\n const maxPostponedStateSizeBytes = parseMaxPostponedStateSize(\n nextConfig.experimental.maxPostponedStateSize\n )\n\n if (!isNaN(stateLength) && stateLength > 0) {\n if (\n maxPostponedStateSizeBytes === undefined ||\n stateLength > maxPostponedStateSizeBytes\n ) {\n res.statusCode = 413\n res.end(\n `Postponed state exceeded ${maxPostponedStateSize} limit. ` +\n `To configure the limit, see: https://nextjs.org/docs/app/api-reference/config/next-config-js/max-postponed-state-size`\n )\n ctx.waitUntil?.(Promise.resolve())\n return null\n }\n\n // Calculate max total body size to prevent buffering excessively large\n // payloads before the action handler checks. We use stateLength (not\n // maxPostponedStateSizeBytes) so the postponed state doesn't eat into\n // the action body budget - it's already validated above.\n const defaultActionBodySizeLimit = '1 MB'\n const actionBodySizeLimit =\n nextConfig.experimental.serverActions?.bodySizeLimit ??\n defaultActionBodySizeLimit\n const actionBodySizeLimitBytes =\n actionBodySizeLimit !== defaultActionBodySizeLimit\n ? (\n require('next/dist/compiled/bytes') as typeof import('next/dist/compiled/bytes')\n ).parse(actionBodySizeLimit)\n : 1024 * 1024 // 1 MB\n const maxTotalBodySize = stateLength + actionBodySizeLimitBytes\n\n // Read the entire body, checking size as we go.\n const bodyChunks: Array<Buffer> = []\n let size = 0\n for await (const chunk of req) {\n const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk)\n size += buffer.byteLength\n if (size > maxTotalBodySize) {\n res.statusCode = 413\n res.end(\n `Request body exceeded limit. ` +\n `To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit`\n )\n ctx.waitUntil?.(Promise.resolve())\n return null\n }\n bodyChunks.push(buffer)\n }\n const fullBody = Buffer.concat(bodyChunks)\n\n if (fullBody.length >= stateLength) {\n // Extract postponed state from the beginning\n const postponedState = fullBody\n .subarray(0, stateLength)\n .toString('utf8')\n addRequestMeta(req, 'postponed', postponedState)\n\n // Store the remaining action body for the action handler\n const actionBody = fullBody.subarray(stateLength)\n addRequestMeta(req, 'actionBody', actionBody)\n } else {\n throw new Error(\n `invariant: expected ${stateLength} bytes of postponed state but only received ${fullBody.length} bytes`\n )\n }\n }\n }\n\n if (\n !getRequestMeta(req, 'postponed') &&\n couldSupportPPR &&\n req.headers[NEXT_RESUME_HEADER] === '1' &&\n req.method === 'POST'\n ) {\n // Decode the postponed state from the request body, it will come as\n // an array of buffers, so collect them and then concat them to form\n // the string.\n\n const body: Array<Buffer> = []\n for await (const chunk of req) {\n body.push(chunk)\n }\n const postponed = Buffer.concat(body).toString('utf8')\n\n addRequestMeta(req, 'postponed', postponed)\n }\n\n // When enabled, this will allow the use of the `?__nextppronly` query to\n // enable debugging of the static shell.\n const hasDebugStaticShellQuery =\n process.env.__NEXT_EXPERIMENTAL_STATIC_SHELL_DEBUGGING === '1' &&\n typeof query.__nextppronly !== 'undefined' &&\n couldSupportPPR\n\n // When enabled, this will allow the use of the `?__nextppronly` query\n // to enable debugging of the fallback shell.\n const hasDebugFallbackShellQuery =\n hasDebugStaticShellQuery && query.__nextppronly === 'fallback'\n\n // This page supports PPR if it is marked as being `PARTIALLY_STATIC` in the\n // prerender manifest and this is an app page.\n const isRoutePPREnabled: boolean =\n couldSupportPPR &&\n ((\n prerenderManifest.routes[normalizedSrcPage] ??\n prerenderManifest.dynamicRoutes[normalizedSrcPage]\n )?.renderingMode === 'PARTIALLY_STATIC' ||\n // Ideally we'd want to check the appConfig to see if this page has PPR\n // enabled or not, but that would require plumbing the appConfig through\n // to the server during development. We assume that the page supports it\n // but only during development.\n (hasDebugStaticShellQuery &&\n (routeModule.isDev === true ||\n routerServerContext?.experimentalTestProxy === true)))\n\n const isDebugStaticShell: boolean =\n hasDebugStaticShellQuery && isRoutePPREnabled\n\n // We should enable debugging dynamic accesses when the static shell\n // debugging has been enabled and we're also in development mode.\n const isDebugDynamicAccesses =\n isDebugStaticShell && routeModule.isDev === true\n\n const isDebugFallbackShell = hasDebugFallbackShellQuery && isRoutePPREnabled\n\n // If we're in minimal mode, then try to get the postponed information from\n // the request metadata. If available, use it for resuming the postponed\n // render.\n const minimalPostponed = isRoutePPREnabled\n ? getRequestMeta(req, 'postponed')\n : undefined\n\n // If PPR is enabled, and this is a RSC request (but not a prefetch), then\n // we can use this fact to only generate the flight data for the request\n // because we can't cache the HTML (as it's also dynamic).\n let isDynamicRSCRequest =\n isRoutePPREnabled && isRSCRequest && !isPrefetchRSCRequest\n\n // During a PPR revalidation, the RSC request is not dynamic if we do not have the postponed data.\n // We only attach the postponed data during a resume. If there's no postponed data, then it must be a revalidation.\n // This is to ensure that we don't bypass the cache during a revalidation.\n if (isMinimalMode) {\n isDynamicRSCRequest = isDynamicRSCRequest && !!minimalPostponed\n }\n\n // Need to read this before it's stripped by stripFlightHeaders. We don't\n // need to transfer it to the request meta because it's only read\n // within this function; the static segment data should have already been\n // generated, so we will always either return a static response or a 404.\n const segmentPrefetchHeader = getRequestMeta(req, 'segmentPrefetchRSCRequest')\n\n // TODO: investigate existing bug with shouldServeStreamingMetadata always\n // being true for a revalidate due to modifying the base-server this.renderOpts\n // when fixing this to correct logic it causes hydration issue since we set\n // serveStreamingMetadata to true during export\n const serveStreamingMetadata =\n isHtmlBot && isRoutePPREnabled\n ? false\n : !userAgent\n ? true\n : shouldServeStreamingMetadata(userAgent, nextConfig.htmlLimitedBots)\n\n const isSSG = Boolean(\n (prerenderInfo ||\n isPrerendered ||\n prerenderManifest.routes[normalizedSrcPage]) &&\n // If this is a html bot request and PPR is enabled, then we don't want\n // to serve a static response.\n !(isHtmlBot && isRoutePPREnabled)\n )\n\n // When a page supports cacheComponents, we can support RDC for Navigations\n const supportsRDCForNavigations =\n isRoutePPREnabled && nextConfig.cacheComponents === true\n\n // In development, we always want to generate dynamic HTML.\n const supportsDynamicResponse: boolean =\n // If we're in development, we always support dynamic HTML, unless it's\n // a data request, in which case we only produce static HTML.\n routeModule.isDev === true ||\n // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isSSG ||\n // If this request has provided postponed data, it supports dynamic\n // HTML.\n typeof minimalPostponed === 'string' ||\n // If this handler supports onCacheEntryV2, then we can only support\n // dynamic responses if it's a dynamic RSC request and not in minimal mode. If it\n // doesn't support it we must fallback to the default behavior.\n (supportsRDCForNavigations && getRequestMeta(req, 'onCacheEntryV2')\n ? // In minimal mode, we'll always want to generate a static response\n // which will generate the RDC for the route. When resuming a Dynamic\n // RSC request, we'll pass the minimal postponed data to the render\n // which will trigger the `supportsDynamicResponse` to be true.\n isDynamicRSCRequest && !isMinimalMode\n : // Otherwise, we can support dynamic responses if it's a dynamic RSC request.\n isDynamicRSCRequest)\n\n // When html bots request PPR page, perform the full dynamic rendering.\n const shouldWaitOnAllReady = isHtmlBot && isRoutePPREnabled\n\n let ssgCacheKey: string | null = null\n if (\n !isDraftMode &&\n isSSG &&\n !supportsDynamicResponse &&\n !isPossibleServerAction &&\n !minimalPostponed &&\n !isDynamicRSCRequest\n ) {\n ssgCacheKey = resolvedPathname\n }\n\n // the staticPathKey differs from ssgCacheKey since\n // ssgCacheKey is null in dev since we're always in \"dynamic\"\n // mode in dev to bypass the cache, but we still need to honor\n // dynamicParams = false in dev mode\n let staticPathKey = ssgCacheKey\n if (!staticPathKey && routeModule.isDev) {\n staticPathKey = resolvedPathname\n }\n\n // If this is a request for an app path that should be statically generated\n // and we aren't in the edge runtime, strip the flight headers so it will\n // generate the static response.\n if (\n !routeModule.isDev &&\n !isDraftMode &&\n isSSG &&\n isRSCRequest &&\n !isDynamicRSCRequest\n ) {\n stripFlightHeaders(req.headers)\n }\n\n const ComponentMod = {\n ...entryBase,\n tree,\n GlobalError,\n handler,\n routeModule,\n __next_app__,\n }\n\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest,\n })\n }\n\n const method = req.method || 'GET'\n const tracer = getTracer()\n const activeSpan = tracer.getActiveScopeSpan()\n\n const render404 = async () => {\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext?.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false)\n } else {\n res.end('This page could not be found')\n }\n return null\n }\n\n try {\n const varyHeader = routeModule.getVaryHeader(\n resolvedPathname,\n interceptionRoutePatterns\n )\n res.setHeader('Vary', varyHeader)\n const invokeRouteModule = async (\n span: Span | undefined,\n context: AppPageRouteHandlerContext\n ) => {\n const nextReq = new NodeNextRequest(req)\n const nextRes = new NodeNextResponse(res)\n\n return routeModule.render(nextReq, nextRes, context).finally(() => {\n if (!span) return\n\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false,\n })\n\n const rootSpanAttributes = tracer.getRootSpanAttributes()\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return\n }\n\n if (\n rootSpanAttributes.get('next.span_type') !==\n BaseServerSpan.handleRequest\n ) {\n console.warn(\n `Unexpected root span type '${rootSpanAttributes.get(\n 'next.span_type'\n )}'. Please report this Next.js issue https://github.com/vercel/next.js`\n )\n return\n }\n\n const route = rootSpanAttributes.get('next.route')\n if (route) {\n const name = `${method} ${route}`\n\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name,\n })\n span.updateName(name)\n } else {\n span.updateName(`${method} ${srcPage}`)\n }\n })\n }\n\n const incrementalCache = getRequestMeta(req, 'incrementalCache')\n\n const doRender = async ({\n span,\n postponed,\n fallbackRouteParams,\n forceStaticRender,\n }: {\n span?: Span\n\n /**\n * The postponed data for this render. This is only provided when resuming\n * a render that has been postponed.\n */\n postponed: string | undefined\n\n /**\n * The unknown route params for this render.\n */\n fallbackRouteParams: OpaqueFallbackRouteParams | null\n\n /**\n * When true, this indicates that the response generator is being called\n * in a context where the response must be generated statically.\n *\n * CRITICAL: This should only currently be used when revalidating due to a\n * dynamic RSC request.\n */\n forceStaticRender: boolean\n }): Promise<ResponseCacheEntry> => {\n const context: AppPageRouteHandlerContext = {\n query,\n params,\n page: normalizedSrcPage,\n sharedContext: {\n buildId,\n },\n serverComponentsHmrCache: getRequestMeta(\n req,\n 'serverComponentsHmrCache'\n ),\n fallbackRouteParams,\n renderOpts: {\n App: () => null,\n Document: () => null,\n pageConfig: {},\n ComponentMod,\n Component: interopDefault(ComponentMod),\n\n params,\n routeModule,\n page: srcPage,\n postponed,\n shouldWaitOnAllReady,\n serveStreamingMetadata,\n supportsDynamicResponse:\n typeof postponed === 'string' || supportsDynamicResponse,\n buildManifest,\n nextFontManifest,\n reactLoadableManifest,\n subresourceIntegrityManifest,\n setCacheStatus: routerServerContext?.setCacheStatus,\n setIsrStatus: routerServerContext?.setIsrStatus,\n setReactDebugChannel: routerServerContext?.setReactDebugChannel,\n sendErrorsToBrowser: routerServerContext?.sendErrorsToBrowser,\n\n dir:\n process.env.NEXT_RUNTIME === 'nodejs'\n ? (require('path') as typeof import('path')).join(\n /* turbopackIgnore: true */\n process.cwd(),\n routeModule.relativeProjectDir\n )\n : `${process.cwd()}/${routeModule.relativeProjectDir}`,\n isDraftMode,\n botType,\n isOnDemandRevalidate,\n isPossibleServerAction,\n assetPrefix: nextConfig.assetPrefix,\n nextConfigOutput: nextConfig.output,\n crossOrigin: nextConfig.crossOrigin,\n trailingSlash: nextConfig.trailingSlash,\n images: nextConfig.images,\n previewProps: prerenderManifest.preview,\n deploymentId: deploymentId,\n enableTainting: nextConfig.experimental.taint,\n htmlLimitedBots: nextConfig.htmlLimitedBots,\n reactMaxHeadersLength: nextConfig.reactMaxHeadersLength,\n\n multiZoneDraftMode,\n incrementalCache,\n cacheLifeProfiles: nextConfig.cacheLife,\n basePath: nextConfig.basePath,\n serverActions: nextConfig.experimental.serverActions,\n\n ...(isDebugStaticShell ||\n isDebugDynamicAccesses ||\n isDebugFallbackShell\n ? {\n nextExport: true,\n supportsDynamicResponse: false,\n isStaticGeneration: true,\n isDebugDynamicAccesses: isDebugDynamicAccesses,\n }\n : {}),\n cacheComponents: Boolean(nextConfig.cacheComponents),\n experimental: {\n isRoutePPREnabled,\n expireTime: nextConfig.expireTime,\n staleTimes: nextConfig.experimental.staleTimes,\n dynamicOnHover: Boolean(nextConfig.experimental.dynamicOnHover),\n inlineCss: Boolean(nextConfig.experimental.inlineCss),\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts),\n clientTraceMetadata:\n nextConfig.experimental.clientTraceMetadata || ([] as any),\n clientParamParsingOrigins:\n nextConfig.experimental.clientParamParsingOrigins,\n maxPostponedStateSizeBytes: parseMaxPostponedStateSize(\n nextConfig.experimental.maxPostponedStateSize\n ),\n },\n\n waitUntil: ctx.waitUntil,\n onClose: (cb) => {\n res.on('close', cb)\n },\n onAfterTaskError: () => {},\n\n onInstrumentationRequestError: (\n error,\n _request,\n errorContext,\n silenceLog\n ) =>\n routeModule.onRequestError(\n req,\n error,\n errorContext,\n silenceLog,\n routerServerContext\n ),\n err: getRequestMeta(req, 'invokeError'),\n dev: routeModule.isDev,\n },\n }\n\n if (isDebugStaticShell || isDebugDynamicAccesses) {\n context.renderOpts.nextExport = true\n context.renderOpts.supportsDynamicResponse = false\n context.renderOpts.isDebugDynamicAccesses = isDebugDynamicAccesses\n }\n\n // When we're revalidating in the background, we should not allow dynamic\n // responses.\n if (forceStaticRender) {\n context.renderOpts.supportsDynamicResponse = false\n }\n\n const result = await invokeRouteModule(span, context)\n\n const { metadata } = result\n\n const {\n cacheControl,\n headers = {},\n // Add any fetch tags that were on the page to the response headers.\n fetchTags: cacheTags,\n fetchMetrics,\n } = metadata\n\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags\n }\n\n // Pull any fetch metrics from the render onto the request.\n ;(req as any).fetchMetrics = fetchMetrics\n\n // we don't throw static to dynamic errors in dev as isSSG\n // is a best guess in dev since we don't have the prerender pass\n // to know whether the path is actually static or not\n if (\n isSSG &&\n cacheControl?.revalidate === 0 &&\n !routeModule.isDev &&\n !isRoutePPREnabled\n ) {\n const staticBailoutInfo = metadata.staticBailoutInfo\n\n const err = new Error(\n `Page changed from static to dynamic at runtime ${resolvedPathname}${\n staticBailoutInfo?.description\n ? `, reason: ${staticBailoutInfo.description}`\n : ``\n }` +\n `\\nsee more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`\n )\n\n if (staticBailoutInfo?.stack) {\n const stack = staticBailoutInfo.stack\n err.stack = err.message + stack.substring(stack.indexOf('\\n'))\n }\n\n throw err\n }\n\n return {\n value: {\n kind: CachedRouteKind.APP_PAGE,\n html: result,\n headers,\n rscData: metadata.flightData,\n postponed: metadata.postponed,\n status: metadata.statusCode,\n segmentData: metadata.segmentData,\n } satisfies CachedAppPageValue,\n cacheControl,\n } satisfies ResponseCacheEntry\n }\n\n const responseGenerator: ResponseGenerator = async ({\n hasResolved,\n previousCacheEntry: previousIncrementalCacheEntry,\n isRevalidating,\n span,\n forceStaticRender = false,\n }) => {\n const isProduction = routeModule.isDev === false\n const didRespond = hasResolved || res.writableEnded\n\n // skip on-demand revalidate if cache is not present and\n // revalidate-if-generated is set\n if (\n isOnDemandRevalidate &&\n revalidateOnlyGenerated &&\n !previousIncrementalCacheEntry &&\n !isMinimalMode\n ) {\n if (routerServerContext?.render404) {\n await routerServerContext.render404(req, res)\n } else {\n res.statusCode = 404\n res.end('This page could not be found')\n }\n return null\n }\n\n let fallbackMode: FallbackMode | undefined\n\n if (prerenderInfo) {\n fallbackMode = parseFallbackField(prerenderInfo.fallback)\n }\n\n // When serving a HTML bot request, we want to serve a blocking render and\n // not the prerendered page. This ensures that the correct content is served\n // to the bot in the head.\n if (fallbackMode === FallbackMode.PRERENDER && isBot(userAgent)) {\n if (!isRoutePPREnabled || isHtmlBot) {\n fallbackMode = FallbackMode.BLOCKING_STATIC_RENDER\n }\n }\n\n if (previousIncrementalCacheEntry?.isStale === -1) {\n isOnDemandRevalidate = true\n }\n\n // TODO: adapt for PPR\n // only allow on-demand revalidate for fallback: true/blocking\n // or for prerendered fallback: false paths\n if (\n isOnDemandRevalidate &&\n (fallbackMode !== FallbackMode.NOT_FOUND ||\n previousIncrementalCacheEntry)\n ) {\n fallbackMode = FallbackMode.BLOCKING_STATIC_RENDER\n }\n\n if (\n !isMinimalMode &&\n fallbackMode !== FallbackMode.BLOCKING_STATIC_RENDER &&\n staticPathKey &&\n !didRespond &&\n !isDraftMode &&\n pageIsDynamic &&\n (isProduction || !isPrerendered)\n ) {\n // if the page has dynamicParams: false and this pathname wasn't\n // prerendered trigger the no fallback handling\n if (\n // In development, fall through to render to handle missing\n // getStaticPaths.\n (isProduction || prerenderInfo) &&\n // When fallback isn't present, abort this render so we 404\n fallbackMode === FallbackMode.NOT_FOUND\n ) {\n if (nextConfig.experimental.adapterPath) {\n return await render404()\n }\n throw new NoFallbackError()\n }\n\n // When cacheComponents is enabled, we can use the fallback\n // response if the request is not a dynamic RSC request because the\n // RSC data when this feature flag is enabled does not contain any\n // param references. Without this feature flag enabled, the RSC data\n // contains param references, and therefore we can't use the fallback.\n if (\n isRoutePPREnabled &&\n (nextConfig.cacheComponents ? !isDynamicRSCRequest : !isRSCRequest)\n ) {\n const cacheKey =\n isProduction && typeof prerenderInfo?.fallback === 'string'\n ? prerenderInfo.fallback\n : normalizedSrcPage\n\n const fallbackRouteParams =\n // If we're in production and we have fallback route params, then we\n // can use the manifest fallback route params.\n isProduction && prerenderInfo?.fallbackRouteParams\n ? createOpaqueFallbackRouteParams(\n prerenderInfo.fallbackRouteParams\n )\n : // Otherwise, if we're debugging the fallback shell, then we\n // have to manually generate the fallback route params.\n isDebugFallbackShell\n ? getFallbackRouteParams(normalizedSrcPage, routeModule)\n : null\n\n // We use the response cache here to handle the revalidation and\n // management of the fallback shell.\n const fallbackResponse = await routeModule.handleResponse({\n cacheKey,\n req,\n nextConfig,\n routeKind: RouteKind.APP_PAGE,\n isFallback: true,\n prerenderManifest,\n isRoutePPREnabled,\n responseGenerator: async () =>\n doRender({\n span,\n // We pass `undefined` as rendering a fallback isn't resumed\n // here.\n postponed: undefined,\n fallbackRouteParams,\n forceStaticRender: false,\n }),\n waitUntil: ctx.waitUntil,\n isMinimalMode,\n })\n\n // If the fallback response was set to null, then we should return null.\n if (fallbackResponse === null) return null\n\n // Otherwise, if we did get a fallback response, we should return it.\n if (fallbackResponse) {\n // Remove the cache control from the response to prevent it from being\n // used in the surrounding cache.\n delete fallbackResponse.cacheControl\n\n return fallbackResponse\n }\n }\n }\n\n // Only requests that aren't revalidating can be resumed. If we have the\n // minimal postponed data, then we should resume the render with it.\n let postponed =\n !isOnDemandRevalidate && !isRevalidating && minimalPostponed\n ? minimalPostponed\n : undefined\n\n // If this is a dynamic RSC request or a server action request, we should\n // use the postponed data from the static render (if available). This\n // ensures that we can utilize the resume data cache (RDC) from the static\n // render to ensure that the data is consistent between the static and\n // dynamic renders (for navigations) or when re-rendering after a server\n // action.\n if (\n // Only enable RDC for Navigations if the feature is enabled.\n supportsRDCForNavigations &&\n process.env.NEXT_RUNTIME !== 'edge' &&\n !isMinimalMode &&\n incrementalCache &&\n // Include both dynamic RSC requests (navigations) and server actions\n (isDynamicRSCRequest || isPossibleServerAction) &&\n // We don't typically trigger an on-demand revalidation for dynamic RSC\n // requests, as we're typically revalidating the page in the background\n // instead. However, if the cache entry is stale, we should trigger a\n // background revalidation on dynamic RSC requests. This prevents us\n // from entering an infinite loop of revalidations.\n !forceStaticRender\n ) {\n const incrementalCacheEntry = await incrementalCache.get(\n resolvedPathname,\n {\n kind: IncrementalCacheKind.APP_PAGE,\n isRoutePPREnabled: true,\n isFallback: false,\n }\n )\n\n // If the cache entry is found, we should use the postponed data from\n // the cache.\n if (\n incrementalCacheEntry &&\n incrementalCacheEntry.value &&\n incrementalCacheEntry.value.kind === CachedRouteKind.APP_PAGE\n ) {\n // CRITICAL: we're assigning the postponed data from the cache entry\n // here as we're using the RDC to resume the render.\n postponed = incrementalCacheEntry.value.postponed\n\n // If the cache entry is stale, we should trigger a background\n // revalidation so that subsequent requests will get a fresh response.\n if (\n incrementalCacheEntry &&\n // We want to trigger this flow if the cache entry is stale and if\n // the requested revalidation flow is either foreground or\n // background.\n (incrementalCacheEntry.isStale === -1 ||\n incrementalCacheEntry.isStale === true)\n ) {\n // We want to schedule this on the next tick to ensure that the\n // render is not blocked on it.\n scheduleOnNextTick(async () => {\n const responseCache = routeModule.getResponseCache(req)\n\n try {\n await responseCache.revalidate(\n resolvedPathname,\n incrementalCache,\n isRoutePPREnabled,\n false,\n (c) =>\n responseGenerator({\n ...c,\n // CRITICAL: we need to set this to true as we're\n // revalidating in the background and typically this dynamic\n // RSC request is not treated as static.\n forceStaticRender: true,\n }),\n // CRITICAL: we need to pass null here because passing the\n // previous cache entry here (which is stale) will switch on\n // isOnDemandRevalidate and break the prerendering.\n null,\n hasResolved,\n ctx.waitUntil\n )\n } catch (err) {\n console.error(\n 'Error revalidating the page in the background',\n err\n )\n }\n })\n }\n }\n }\n\n // When we're in minimal mode, if we're trying to debug the static shell,\n // we should just return nothing instead of resuming the dynamic render.\n if (\n (isDebugStaticShell || isDebugDynamicAccesses) &&\n typeof postponed !== 'undefined'\n ) {\n return {\n cacheControl: { revalidate: 1, expire: undefined },\n value: {\n kind: CachedRouteKind.PAGES,\n html: RenderResult.EMPTY,\n pageData: {},\n headers: undefined,\n status: undefined,\n } satisfies CachedPageValue,\n }\n }\n\n const fallbackRouteParams =\n // If we're in production and we have fallback route params, then we\n // can use the manifest fallback route params if we need to render the\n // fallback shell.\n isProduction &&\n prerenderInfo?.fallbackRouteParams &&\n getRequestMeta(req, 'renderFallbackShell')\n ? createOpaqueFallbackRouteParams(prerenderInfo.fallbackRouteParams)\n : // Otherwise, if we're debugging the fallback shell, then we have to\n // manually generate the fallback route params.\n isDebugFallbackShell\n ? getFallbackRouteParams(normalizedSrcPage, routeModule)\n : null\n\n // Perform the render.\n return doRender({\n span,\n postponed,\n fallbackRouteParams,\n forceStaticRender,\n })\n }\n\n const handleResponse = async (span?: Span): Promise<null | void> => {\n const cacheEntry = await routeModule.handleResponse({\n cacheKey: ssgCacheKey,\n responseGenerator: (c) =>\n responseGenerator({\n span,\n ...c,\n }),\n routeKind: RouteKind.APP_PAGE,\n isOnDemandRevalidate,\n isRoutePPREnabled,\n req,\n nextConfig,\n prerenderManifest,\n waitUntil: ctx.waitUntil,\n isMinimalMode,\n })\n\n if (isDraftMode) {\n res.setHeader(\n 'Cache-Control',\n 'private, no-cache, no-store, max-age=0, must-revalidate'\n )\n }\n\n // In dev, we should not cache pages for any reason.\n if (routeModule.isDev) {\n res.setHeader(\n 'Cache-Control',\n nextConfig.experimental.devCacheControlNoCache\n ? 'no-cache, must-revalidate'\n : 'no-store, must-revalidate'\n )\n }\n\n if (!cacheEntry) {\n if (ssgCacheKey) {\n // A cache entry might not be generated if a response is written\n // in `getInitialProps` or `getServerSideProps`, but those shouldn't\n // have a cache key. If we do have a cache key but we don't end up\n // with a cache entry, then either Next.js or the application has a\n // bug that needs fixing.\n throw new Error('invariant: cache entry required but not generated')\n }\n return null\n }\n\n if (cacheEntry.value?.kind !== CachedRouteKind.APP_PAGE) {\n throw new Error(\n `Invariant app-page handler received invalid cache entry ${cacheEntry.value?.kind}`\n )\n }\n\n const didPostpone = typeof cacheEntry.value.postponed === 'string'\n\n if (\n isSSG &&\n // We don't want to send a cache header for requests that contain dynamic\n // data. If this is a Dynamic RSC request or wasn't a Prefetch RSC\n // request, then we should set the cache header.\n !isDynamicRSCRequest &&\n (!didPostpone || isPrefetchRSCRequest)\n ) {\n if (!isMinimalMode) {\n // set x-nextjs-cache header to match the header\n // we set for the image-optimizer\n res.setHeader(\n 'x-nextjs-cache',\n isOnDemandRevalidate\n ? 'REVALIDATED'\n : cacheEntry.isMiss\n ? 'MISS'\n : cacheEntry.isStale\n ? 'STALE'\n : 'HIT'\n )\n }\n // Set a header used by the client router to signal the response is static\n // and should respect the `static` cache staleTime value.\n res.setHeader(NEXT_IS_PRERENDER_HEADER, '1')\n }\n const { value: cachedData } = cacheEntry\n\n // Coerce the cache control parameter from the render.\n let cacheControl: CacheControl | undefined\n\n // If this is a resume request in minimal mode it is streamed with dynamic\n // content and should not be cached.\n if (minimalPostponed) {\n cacheControl = { revalidate: 0, expire: undefined }\n }\n\n // If this is in minimal mode and this is a flight request that isn't a\n // prefetch request while PPR is enabled, it cannot be cached as it contains\n // dynamic content.\n else if (isDynamicRSCRequest) {\n cacheControl = { revalidate: 0, expire: undefined }\n } else if (!routeModule.isDev) {\n // If this is a preview mode request, we shouldn't cache it\n if (isDraftMode) {\n cacheControl = { revalidate: 0, expire: undefined }\n }\n\n // If this isn't SSG, then we should set change the header only if it is\n // not set already.\n else if (!isSSG) {\n if (!res.getHeader('Cache-Control')) {\n cacheControl = { revalidate: 0, expire: undefined }\n }\n } else if (cacheEntry.cacheControl) {\n // If the cache entry has a cache control with a revalidate value that's\n // a number, use it.\n if (typeof cacheEntry.cacheControl.revalidate === 'number') {\n if (cacheEntry.cacheControl.revalidate < 1) {\n throw new Error(\n `Invalid revalidate configuration provided: ${cacheEntry.cacheControl.revalidate} < 1`\n )\n }\n\n cacheControl = {\n revalidate: cacheEntry.cacheControl.revalidate,\n expire: cacheEntry.cacheControl?.expire ?? nextConfig.expireTime,\n }\n }\n // Otherwise if the revalidate value is false, then we should use the\n // cache time of one year.\n else {\n cacheControl = { revalidate: CACHE_ONE_YEAR, expire: undefined }\n }\n }\n }\n\n cacheEntry.cacheControl = cacheControl\n\n if (\n typeof segmentPrefetchHeader === 'string' &&\n cachedData?.kind === CachedRouteKind.APP_PAGE &&\n cachedData.segmentData\n ) {\n // This is a prefetch request issued by the client Segment Cache. These\n // should never reach the application layer (lambda). We should either\n // respond from the cache (HIT) or respond with 204 No Content (MISS).\n\n // Set a header to indicate that PPR is enabled for this route. This\n // lets the client distinguish between a regular cache miss and a cache\n // miss due to PPR being disabled. In other contexts this header is used\n // to indicate that the response contains dynamic data, but here we're\n // only using it to indicate that the feature is enabled — the segment\n // response itself contains whether the data is dynamic.\n res.setHeader(NEXT_DID_POSTPONE_HEADER, '2')\n\n // Add the cache tags header to the response if it exists and we're in\n // minimal mode while rendering a static page.\n const tags = cachedData.headers?.[NEXT_CACHE_TAGS_HEADER]\n if (isMinimalMode && isSSG && tags && typeof tags === 'string') {\n res.setHeader(NEXT_CACHE_TAGS_HEADER, tags)\n }\n\n const matchedSegment = cachedData.segmentData.get(segmentPrefetchHeader)\n if (matchedSegment !== undefined) {\n // Cache hit\n return sendRenderResult({\n req,\n res,\n generateEtags: nextConfig.generateEtags,\n poweredByHeader: nextConfig.poweredByHeader,\n result: RenderResult.fromStatic(\n matchedSegment,\n RSC_CONTENT_TYPE_HEADER\n ),\n cacheControl: cacheEntry.cacheControl,\n })\n }\n\n // Cache miss. Either a cache entry for this route has not been generated\n // (which technically should not be possible when PPR is enabled, because\n // at a minimum there should always be a fallback entry) or there's no\n // match for the requested segment. Respond with a 204 No Content. We\n // don't bother to respond with 404, because these requests are only\n // issued as part of a prefetch.\n res.statusCode = 204\n return sendRenderResult({\n req,\n res,\n generateEtags: nextConfig.generateEtags,\n poweredByHeader: nextConfig.poweredByHeader,\n result: RenderResult.EMPTY,\n cacheControl: cacheEntry.cacheControl,\n })\n }\n\n // If there's a callback for `onCacheEntry`, call it with the cache entry\n // and the revalidate options. If we support RDC for Navigations, we\n // prefer the `onCacheEntryV2` callback. Once RDC for Navigations is the\n // default, we can remove the fallback to `onCacheEntry` as\n // `onCacheEntryV2` is now fully supported.\n const onCacheEntry = supportsRDCForNavigations\n ? (getRequestMeta(req, 'onCacheEntryV2') ??\n getRequestMeta(req, 'onCacheEntry'))\n : getRequestMeta(req, 'onCacheEntry')\n if (onCacheEntry) {\n const finished = await onCacheEntry(cacheEntry, {\n url: getRequestMeta(req, 'initURL') ?? req.url,\n })\n if (finished) return null\n }\n\n if (cachedData.headers) {\n const headers = { ...cachedData.headers }\n\n if (!isMinimalMode || !isSSG) {\n delete headers[NEXT_CACHE_TAGS_HEADER]\n }\n\n for (let [key, value] of Object.entries(headers)) {\n if (typeof value === 'undefined') continue\n\n if (Array.isArray(value)) {\n for (const v of value) {\n res.appendHeader(key, v)\n }\n } else if (typeof value === 'number') {\n value = value.toString()\n res.appendHeader(key, value)\n } else {\n res.appendHeader(key, value)\n }\n }\n }\n\n // Add the cache tags header to the response if it exists and we're in\n // minimal mode while rendering a static page.\n const tags = cachedData.headers?.[NEXT_CACHE_TAGS_HEADER]\n if (isMinimalMode && isSSG && tags && typeof tags === 'string') {\n res.setHeader(NEXT_CACHE_TAGS_HEADER, tags)\n }\n\n // If the request is a data request, then we shouldn't set the status code\n // from the response because it should always be 200. This should be gated\n // behind the experimental PPR flag.\n if (cachedData.status && (!isRSCRequest || !isRoutePPREnabled)) {\n res.statusCode = cachedData.status\n }\n\n // Redirect information is encoded in RSC payload, so we don't need to use redirect status codes\n if (\n !isMinimalMode &&\n cachedData.status &&\n RedirectStatusCode[cachedData.status] &&\n isRSCRequest\n ) {\n res.statusCode = 200\n }\n\n // Mark that the request did postpone.\n if (didPostpone && !isDynamicRSCRequest) {\n res.setHeader(NEXT_DID_POSTPONE_HEADER, '1')\n }\n\n // we don't go through this block when preview mode is true\n // as preview mode is a dynamic request (bypasses cache) and doesn't\n // generate both HTML and payloads in the same request so continue to just\n // return the generated payload\n if (isRSCRequest && !isDraftMode) {\n // If this is a dynamic RSC request, then stream the response.\n if (typeof cachedData.rscData === 'undefined') {\n // If the response is not an RSC response, then we can't serve it.\n if (cachedData.html.contentType !== RSC_CONTENT_TYPE_HEADER) {\n if (nextConfig.cacheComponents) {\n res.statusCode = 404\n return sendRenderResult({\n req,\n res,\n generateEtags: nextConfig.generateEtags,\n poweredByHeader: nextConfig.poweredByHeader,\n result: RenderResult.EMPTY,\n cacheControl: cacheEntry.cacheControl,\n })\n } else {\n // Otherwise this case is not expected.\n throw new InvariantError(\n `Expected RSC response, got ${cachedData.html.contentType}`\n )\n }\n }\n\n return sendRenderResult({\n req,\n res,\n generateEtags: nextConfig.generateEtags,\n poweredByHeader: nextConfig.poweredByHeader,\n result: cachedData.html,\n cacheControl: cacheEntry.cacheControl,\n })\n }\n\n // As this isn't a prefetch request, we should serve the static flight\n // data.\n return sendRenderResult({\n req,\n res,\n generateEtags: nextConfig.generateEtags,\n poweredByHeader: nextConfig.poweredByHeader,\n result: RenderResult.fromStatic(\n cachedData.rscData,\n RSC_CONTENT_TYPE_HEADER\n ),\n cacheControl: cacheEntry.cacheControl,\n })\n }\n\n // This is a request for HTML data.\n const body = cachedData.html\n\n // If there's no postponed state, we should just serve the HTML. This\n // should also be the case for a resume request because it's completed\n // as a server render (rather than a static render).\n if (!didPostpone || isMinimalMode || isRSCRequest) {\n // If we're in test mode, we should add a sentinel chunk to the response\n // that's between the static and dynamic parts so we can compare the\n // chunks and add assertions.\n if (\n process.env.__NEXT_TEST_MODE &&\n isMinimalMode &&\n isRoutePPREnabled &&\n body.contentType === HTML_CONTENT_TYPE_HEADER\n ) {\n // As we're in minimal mode, the static part would have already been\n // streamed first. The only part that this streams is the dynamic part\n // so we should FIRST stream the sentinel and THEN the dynamic part.\n body.unshift(createPPRBoundarySentinel())\n }\n\n return sendRenderResult({\n req,\n res,\n generateEtags: nextConfig.generateEtags,\n poweredByHeader: nextConfig.poweredByHeader,\n result: body,\n cacheControl: cacheEntry.cacheControl,\n })\n }\n\n // If we're debugging the static shell or the dynamic API accesses, we\n // should just serve the HTML without resuming the render. The returned\n // HTML will be the static shell so all the Dynamic API's will be used\n // during static generation.\n if (isDebugStaticShell || isDebugDynamicAccesses) {\n // Since we're not resuming the render, we need to at least add the\n // closing body and html tags to create valid HTML.\n body.push(\n new ReadableStream({\n start(controller) {\n controller.enqueue(ENCODED_TAGS.CLOSED.BODY_AND_HTML)\n controller.close()\n },\n })\n )\n\n return sendRenderResult({\n req,\n res,\n generateEtags: nextConfig.generateEtags,\n poweredByHeader: nextConfig.poweredByHeader,\n result: body,\n cacheControl: { revalidate: 0, expire: undefined },\n })\n }\n\n // If we're in test mode, we should add a sentinel chunk to the response\n // that's between the static and dynamic parts so we can compare the\n // chunks and add assertions.\n if (process.env.__NEXT_TEST_MODE) {\n body.push(createPPRBoundarySentinel())\n }\n\n // This request has postponed, so let's create a new transformer that the\n // dynamic data can pipe to that will attach the dynamic data to the end\n // of the response.\n const transformer = new TransformStream<Uint8Array, Uint8Array>()\n body.push(transformer.readable)\n\n // Perform the render again, but this time, provide the postponed state.\n // We don't await because we want the result to start streaming now, and\n // we've already chained the transformer's readable to the render result.\n doRender({\n span,\n postponed: cachedData.postponed,\n // This is a resume render, not a fallback render, so we don't need to\n // set this.\n fallbackRouteParams: null,\n forceStaticRender: false,\n })\n .then(async (result) => {\n if (!result) {\n throw new Error('Invariant: expected a result to be returned')\n }\n\n if (result.value?.kind !== CachedRouteKind.APP_PAGE) {\n throw new Error(\n `Invariant: expected a page response, got ${result.value?.kind}`\n )\n }\n\n // Pipe the resume result to the transformer.\n await result.value.html.pipeTo(transformer.writable)\n })\n .catch((err) => {\n // An error occurred during piping or preparing the render, abort\n // the transformers writer so we can terminate the stream.\n transformer.writable.abort(err).catch((e) => {\n console.error(\"couldn't abort transformer\", e)\n })\n })\n\n return sendRenderResult({\n req,\n res,\n generateEtags: nextConfig.generateEtags,\n poweredByHeader: nextConfig.poweredByHeader,\n result: body,\n // We don't want to cache the response if it has postponed data because\n // the response being sent to the client it's dynamic parts are streamed\n // to the client on the same request.\n cacheControl: { revalidate: 0, expire: undefined },\n })\n }\n\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan)\n } else {\n return await tracer.withPropagatedContext(req.headers, () =>\n tracer.trace(\n BaseServerSpan.handleRequest,\n {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url,\n },\n },\n handleResponse\n )\n )\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false\n await routeModule.onRequestError(\n req,\n err,\n {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'render',\n revalidateReason: getRevalidateReason({\n isStaticGeneration: isSSG,\n isOnDemandRevalidate,\n }),\n },\n silenceLog,\n routerServerContext\n )\n }\n\n // rethrow so that we can handle serving error page\n throw err\n }\n}\n\n// TODO: omit this from production builds, only test builds should include it\n/**\n * Creates a readable stream that emits a PPR boundary sentinel.\n *\n * @returns A readable stream that emits a PPR boundary sentinel.\n */\nfunction createPPRBoundarySentinel() {\n return new ReadableStream({\n start(controller) {\n controller.enqueue(\n new TextEncoder().encode('<!-- PPR_BOUNDARY_SENTINEL -->')\n )\n controller.close()\n },\n })\n}\n"],"names":["GlobalError","__next_app__","handler","routeModule","require","__next_app_require__","loadChunk","__next_app_load_chunk__","AppPageRouteModule","definition","kind","RouteKind","APP_PAGE","page","pathname","bundlePath","filename","appPaths","userland","loaderTree","tree","distDir","process","env","__NEXT_RELATIVE_DIST_DIR","relativeProjectDir","__NEXT_RELATIVE_PROJECT_DIR","req","res","ctx","prerenderManifest","requestMeta","setRequestMeta","isDev","addRequestMeta","hrtime","bigint","isMinimalMode","Boolean","getRequestMeta","srcPage","TURBOPACK","replace","multiZoneDraftMode","__NEXT_MULTI_ZONE_DRAFT_MODE","prepareResult","prepare","statusCode","end","waitUntil","Promise","resolve","buildId","query","params","pageIsDynamic","buildManifest","nextFontManifest","reactLoadableManifest","serverActionsManifest","clientReferenceManifest","subresourceIntegrityManifest","isDraftMode","resolvedPathname","revalidateOnlyGenerated","routerServerContext","nextConfig","parsedUrl","interceptionRoutePatterns","deploymentId","normalizedSrcPage","normalizeAppPath","isOnDemandRevalidate","prerenderInfo","experimental","ppr","cacheComponents","isInterceptionRouteAppPath","match","isPrerendered","routes","userAgent","headers","botType","getBotType","isHtmlBot","isHtmlBotRequest","isPrefetchRSCRequest","NEXT_ROUTER_PREFETCH_HEADER","isRSCRequest","RSC_HEADER","isPossibleServerAction","getIsPossibleServerAction","couldSupportPPR","checkIsAppPPREnabled","resumeStateLengthHeader","NEXT_RESUME_STATE_LENGTH_HEADER","stateLength","parseInt","maxPostponedStateSize","DEFAULT_MAX_POSTPONED_STATE_SIZE","maxPostponedStateSizeBytes","parseMaxPostponedStateSize","isNaN","undefined","defaultActionBodySizeLimit","actionBodySizeLimit","serverActions","bodySizeLimit","actionBodySizeLimitBytes","parse","maxTotalBodySize","bodyChunks","size","chunk","buffer","Buffer","isBuffer","from","byteLength","push","fullBody","concat","length","postponedState","subarray","toString","actionBody","Error","NEXT_RESUME_HEADER","method","body","postponed","hasDebugStaticShellQuery","__NEXT_EXPERIMENTAL_STATIC_SHELL_DEBUGGING","__nextppronly","hasDebugFallbackShellQuery","isRoutePPREnabled","dynamicRoutes","renderingMode","experimentalTestProxy","isDebugStaticShell","isDebugDynamicAccesses","isDebugFallbackShell","minimalPostponed","isDynamicRSCRequest","segmentPrefetchHeader","serveStreamingMetadata","shouldServeStreamingMetadata","htmlLimitedBots","isSSG","supportsRDCForNavigations","supportsDynamicResponse","shouldWaitOnAllReady","ssgCacheKey","staticPathKey","stripFlightHeaders","ComponentMod","entryBase","setManifestsSingleton","tracer","getTracer","activeSpan","getActiveScopeSpan","render404","varyHeader","getVaryHeader","setHeader","invokeRouteModule","span","context","nextReq","NodeNextRequest","nextRes","NodeNextResponse","render","finally","setAttributes","rootSpanAttributes","getRootSpanAttributes","get","BaseServerSpan","handleRequest","console","warn","route","name","updateName","incrementalCache","doRender","fallbackRouteParams","forceStaticRender","sharedContext","serverComponentsHmrCache","renderOpts","App","Document","pageConfig","Component","interopDefault","setCacheStatus","setIsrStatus","setReactDebugChannel","sendErrorsToBrowser","dir","NEXT_RUNTIME","join","cwd","assetPrefix","nextConfigOutput","output","crossOrigin","trailingSlash","images","previewProps","preview","enableTainting","taint","reactMaxHeadersLength","cacheLifeProfiles","cacheLife","basePath","nextExport","isStaticGeneration","expireTime","staleTimes","dynamicOnHover","inlineCss","authInterrupts","clientTraceMetadata","clientParamParsingOrigins","onClose","cb","on","onAfterTaskError","onInstrumentationRequestError","error","_request","errorContext","silenceLog","onRequestError","err","dev","result","metadata","cacheControl","fetchTags","cacheTags","fetchMetrics","NEXT_CACHE_TAGS_HEADER","revalidate","staticBailoutInfo","description","stack","message","substring","indexOf","value","CachedRouteKind","html","rscData","flightData","status","segmentData","responseGenerator","hasResolved","previousCacheEntry","previousIncrementalCacheEntry","isRevalidating","isProduction","didRespond","writableEnded","fallbackMode","parseFallbackField","fallback","FallbackMode","PRERENDER","isBot","BLOCKING_STATIC_RENDER","isStale","NOT_FOUND","adapterPath","NoFallbackError","cacheKey","createOpaqueFallbackRouteParams","getFallbackRouteParams","fallbackResponse","handleResponse","routeKind","isFallback","incrementalCacheEntry","IncrementalCacheKind","scheduleOnNextTick","responseCache","getResponseCache","c","expire","PAGES","RenderResult","EMPTY","pageData","cacheEntry","cachedData","devCacheControlNoCache","didPostpone","isMiss","NEXT_IS_PRERENDER_HEADER","getHeader","CACHE_ONE_YEAR","NEXT_DID_POSTPONE_HEADER","tags","matchedSegment","sendRenderResult","generateEtags","poweredByHeader","fromStatic","RSC_CONTENT_TYPE_HEADER","onCacheEntry","finished","url","key","Object","entries","Array","isArray","v","appendHeader","RedirectStatusCode","contentType","InvariantError","__NEXT_TEST_MODE","HTML_CONTENT_TYPE_HEADER","unshift","createPPRBoundarySentinel","ReadableStream","start","controller","enqueue","ENCODED_TAGS","CLOSED","BODY_AND_HTML","close","transformer","TransformStream","readable","then","pipeTo","writable","catch","abort","e","withPropagatedContext","trace","spanName","SpanKind","SERVER","attributes","routerKind","routePath","routeType","revalidateReason","getRevalidateReason","TextEncoder","encode"],"mappings":";;;;;;;;;;;;;;;;;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ACf,eAAevG,IAAIoS,GAAG;oBACxB;gBACF,GACAhC;QAGN;IACF,EAAE,OAAO9C,KAAK;QACZ,IAAI,CAAEA,CAAAA,eAAeyC,wCAAe,AAAD,GAAI;YACrC,MAAM3C,aAAa;YACnB,MAAM5O,YAAY6O,cAAc,CAC9BrN,KACAsN,KACA;gBACEoH,YAAY;gBACZC,WAAW9T;gBACX+T,WAAW;gBACXC,kBAAkBC,IAAAA,0BAAmB,EAAC;oBACpC1I,oBAAoBzE;oBACpB9E;gBACF;YACF,GACAuK,YACA9K;QAEJ;QAEA,mDAAmD;QACnD,MAAMgL;IACR;AACF;AAEA,6EAA6E;AAC7E;;;;CAIC,GACD,SAAS4F;IACP,OAAO,IAAIC,eAAe;QACxBC,OAAMC,UAAU;YACdA,WAAWC,OAAO,CAChB,IAAIyB,cAAcC,MAAM,CAAC;YAE3B3B,WAAWK,KAAK;QAClB;IACF;AACF","ignoreList":[0]}
1
+ {"version":3,"sources":["../../../src/build/templates/app-page.ts"],"sourcesContent":["import type { LoaderTree } from '../../server/lib/app-dir-module'\nimport type { IncomingMessage, ServerResponse } from 'node:http'\n\nimport {\n AppPageRouteModule,\n type AppPageRouteHandlerContext,\n} from '../../server/route-modules/app-page/module.compiled' with { 'turbopack-transition': 'next-ssr' }\n\nimport { RouteKind } from '../../server/route-kind' with { 'turbopack-transition': 'next-server-utility' }\n\nimport { getRevalidateReason } from '../../server/instrumentation/utils'\nimport { getTracer, SpanKind, type Span } from '../../server/lib/trace/tracer'\nimport type { RequestMeta } from '../../server/request-meta'\nimport {\n addRequestMeta,\n getRequestMeta,\n setRequestMeta,\n} from '../../server/request-meta'\nimport { BaseServerSpan } from '../../server/lib/trace/constants'\nimport { interopDefault } from '../../server/app-render/interop-default'\nimport { stripFlightHeaders } from '../../server/app-render/strip-flight-headers'\nimport { NodeNextRequest, NodeNextResponse } from '../../server/base-http/node'\nimport { checkIsAppPPREnabled } from '../../server/lib/experimental/ppr'\nimport {\n getFallbackRouteParams,\n createOpaqueFallbackRouteParams,\n type OpaqueFallbackRouteParams,\n} from '../../server/request/fallback-params'\nimport { setManifestsSingleton } from '../../server/app-render/manifests-singleton'\nimport {\n isHtmlBotRequest,\n shouldServeStreamingMetadata,\n} from '../../server/lib/streaming-metadata'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport { getIsPossibleServerAction } from '../../server/lib/server-action-request-meta'\nimport {\n RSC_HEADER,\n NEXT_ROUTER_PREFETCH_HEADER,\n NEXT_IS_PRERENDER_HEADER,\n NEXT_DID_POSTPONE_HEADER,\n RSC_CONTENT_TYPE_HEADER,\n} from '../../client/components/app-router-headers'\nimport { getBotType, isBot } from '../../shared/lib/router/utils/is-bot'\nimport {\n CachedRouteKind,\n IncrementalCacheKind,\n type CachedAppPageValue,\n type CachedPageValue,\n type ResponseCacheEntry,\n type ResponseGenerator,\n} from '../../server/response-cache'\nimport { FallbackMode, parseFallbackField } from '../../lib/fallback'\nimport RenderResult from '../../server/render-result'\nimport {\n CACHE_ONE_YEAR,\n HTML_CONTENT_TYPE_HEADER,\n NEXT_CACHE_TAGS_HEADER,\n NEXT_RESUME_HEADER,\n NEXT_RESUME_STATE_LENGTH_HEADER,\n} from '../../lib/constants'\nimport type { CacheControl } from '../../server/lib/cache-control'\nimport { ENCODED_TAGS } from '../../server/stream-utils/encoded-tags'\nimport { sendRenderResult } from '../../server/send-payload'\nimport { NoFallbackError } from '../../shared/lib/no-fallback-error.external'\nimport {\n DEFAULT_MAX_POSTPONED_STATE_SIZE,\n parseMaxPostponedStateSize,\n} from '../../shared/lib/size-limit'\n\n// These are injected by the loader afterwards.\n\n/**\n * The tree created in next-app-loader that holds component segments and modules\n * and I've updated it.\n */\ndeclare const tree: LoaderTree\n\n// TODO this should ideally be read from the loader tree instead, where it's always inserted already anyway.\nimport GlobalError from 'VAR_MODULE_GLOBAL_ERROR' with { 'turbopack-transition': 'next-server-component' }\nexport { GlobalError }\n\n// These are injected by the loader afterwards.\ndeclare const __next_app_require__: (id: string | number) => unknown\ndeclare const __next_app_load_chunk__: (id: string | number) => Promise<unknown>\n\n// We inject the tree and pages here so that we can use them in the route\n// module.\n// INJECT:tree\n\n// INJECT:__next_app_require__\n// INJECT:__next_app_load_chunk__\n\nexport const __next_app__ = {\n require: __next_app_require__,\n loadChunk: __next_app_load_chunk__,\n}\n\nimport * as entryBase from '../../server/app-render/entry-base' with { 'turbopack-transition': 'next-server-utility' }\nimport { RedirectStatusCode } from '../../client/components/redirect-status-code'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport { scheduleOnNextTick } from '../../lib/scheduler'\nimport { isInterceptionRouteAppPath } from '../../shared/lib/router/utils/interception-routes'\n\nexport * from '../../server/app-render/entry-base' with { 'turbopack-transition': 'next-server-utility' }\n\n// Create and export the route module that will be consumed.\nexport const routeModule = new AppPageRouteModule({\n definition: {\n kind: RouteKind.APP_PAGE,\n page: 'VAR_DEFINITION_PAGE',\n pathname: 'VAR_DEFINITION_PATHNAME',\n // The following aren't used in production.\n bundlePath: '',\n filename: '',\n appPaths: [],\n },\n userland: {\n loaderTree: tree,\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n})\n\nexport async function handler(\n req: IncomingMessage,\n res: ServerResponse,\n ctx: {\n waitUntil?: (prom: Promise<void>) => void\n requestMeta?: RequestMeta\n }\n) {\n if (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta)\n }\n\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint())\n }\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'))\n\n let srcPage = 'VAR_DEFINITION_PAGE'\n\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/'\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/'\n }\n const multiZoneDraftMode = process.env\n .__NEXT_MULTI_ZONE_DRAFT_MODE as any as boolean\n\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode,\n })\n\n if (!prepareResult) {\n res.statusCode = 400\n res.end('Bad Request')\n ctx.waitUntil?.(Promise.resolve())\n return null\n }\n\n const {\n buildId,\n query,\n params,\n pageIsDynamic,\n buildManifest,\n nextFontManifest,\n reactLoadableManifest,\n serverActionsManifest,\n clientReferenceManifest,\n subresourceIntegrityManifest,\n prerenderManifest,\n isDraftMode,\n resolvedPathname,\n revalidateOnlyGenerated,\n routerServerContext,\n nextConfig,\n parsedUrl,\n interceptionRoutePatterns,\n deploymentId,\n } = prepareResult\n\n const normalizedSrcPage = normalizeAppPath(srcPage)\n\n let { isOnDemandRevalidate } = prepareResult\n\n // We use the resolvedPathname instead of the parsedUrl.pathname because it\n // is not rewritten as resolvedPathname is. This will ensure that the correct\n // prerender info is used instead of using the original pathname as the\n // source. If however PPR is enabled and cacheComponents is disabled, we\n // treat the pathname as dynamic. Currently, there's a bug in the PPR\n // implementation that incorrectly leaves %%drp placeholders in the output of\n // parallel routes. This is addressed with cacheComponents.\n const prerenderInfo =\n nextConfig.experimental.ppr &&\n !nextConfig.cacheComponents &&\n isInterceptionRouteAppPath(resolvedPathname)\n ? null\n : routeModule.match(resolvedPathname, prerenderManifest)\n\n const isPrerendered = !!prerenderManifest.routes[resolvedPathname]\n\n const userAgent = req.headers['user-agent'] || ''\n const botType = getBotType(userAgent)\n const isHtmlBot = isHtmlBotRequest(req)\n\n /**\n * If true, this indicates that the request being made is for an app\n * prefetch request.\n */\n const isPrefetchRSCRequest =\n getRequestMeta(req, 'isPrefetchRSCRequest') ??\n req.headers[NEXT_ROUTER_PREFETCH_HEADER] === '1' // exclude runtime prefetches, which use '2'\n\n // NOTE: Don't delete headers[RSC] yet, it still needs to be used in renderToHTML later\n\n const isRSCRequest =\n getRequestMeta(req, 'isRSCRequest') ?? Boolean(req.headers[RSC_HEADER])\n\n const isPossibleServerAction = getIsPossibleServerAction(req)\n\n /**\n * If the route being rendered is an app page, and the ppr feature has been\n * enabled, then the given route _could_ support PPR.\n */\n const couldSupportPPR: boolean = checkIsAppPPREnabled(\n nextConfig.experimental.ppr\n )\n\n // Stash postponed state for server actions when in minimal mode.\n // We extract it here so the RDC is available for the re-render after the action completes.\n const resumeStateLengthHeader = req.headers[NEXT_RESUME_STATE_LENGTH_HEADER]\n if (\n !getRequestMeta(req, 'postponed') &&\n isMinimalMode &&\n couldSupportPPR &&\n isPossibleServerAction &&\n resumeStateLengthHeader &&\n typeof resumeStateLengthHeader === 'string'\n ) {\n const stateLength = parseInt(resumeStateLengthHeader, 10)\n const maxPostponedStateSize =\n nextConfig.experimental.maxPostponedStateSize ??\n DEFAULT_MAX_POSTPONED_STATE_SIZE\n const maxPostponedStateSizeBytes = parseMaxPostponedStateSize(\n nextConfig.experimental.maxPostponedStateSize\n )\n\n if (!isNaN(stateLength) && stateLength > 0) {\n if (\n maxPostponedStateSizeBytes === undefined ||\n stateLength > maxPostponedStateSizeBytes\n ) {\n res.statusCode = 413\n res.end(\n `Postponed state exceeded ${maxPostponedStateSize} limit. ` +\n `To configure the limit, see: https://nextjs.org/docs/app/api-reference/config/next-config-js/max-postponed-state-size`\n )\n ctx.waitUntil?.(Promise.resolve())\n return null\n }\n\n // Calculate max total body size to prevent buffering excessively large\n // payloads before the action handler checks. We use stateLength (not\n // maxPostponedStateSizeBytes) so the postponed state doesn't eat into\n // the action body budget - it's already validated above.\n const defaultActionBodySizeLimit = '1 MB'\n const actionBodySizeLimit =\n nextConfig.experimental.serverActions?.bodySizeLimit ??\n defaultActionBodySizeLimit\n const actionBodySizeLimitBytes =\n actionBodySizeLimit !== defaultActionBodySizeLimit\n ? (\n require('next/dist/compiled/bytes') as typeof import('next/dist/compiled/bytes')\n ).parse(actionBodySizeLimit)\n : 1024 * 1024 // 1 MB\n const maxTotalBodySize = stateLength + actionBodySizeLimitBytes\n\n // Read the entire body, checking size as we go.\n const bodyChunks: Array<Buffer> = []\n let size = 0\n for await (const chunk of req) {\n const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk)\n size += buffer.byteLength\n if (size > maxTotalBodySize) {\n res.statusCode = 413\n res.end(\n `Request body exceeded limit. ` +\n `To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit`\n )\n ctx.waitUntil?.(Promise.resolve())\n return null\n }\n bodyChunks.push(buffer)\n }\n const fullBody = Buffer.concat(bodyChunks)\n\n if (fullBody.length >= stateLength) {\n // Extract postponed state from the beginning\n const postponedState = fullBody\n .subarray(0, stateLength)\n .toString('utf8')\n addRequestMeta(req, 'postponed', postponedState)\n\n // Store the remaining action body for the action handler\n const actionBody = fullBody.subarray(stateLength)\n addRequestMeta(req, 'actionBody', actionBody)\n } else {\n throw new Error(\n `invariant: expected ${stateLength} bytes of postponed state but only received ${fullBody.length} bytes`\n )\n }\n }\n }\n\n if (\n !getRequestMeta(req, 'postponed') &&\n couldSupportPPR &&\n req.headers[NEXT_RESUME_HEADER] === '1' &&\n req.method === 'POST'\n ) {\n // Decode the postponed state from the request body, it will come as\n // an array of buffers, so collect them and then concat them to form\n // the string.\n\n const body: Array<Buffer> = []\n for await (const chunk of req) {\n body.push(chunk)\n }\n const postponed = Buffer.concat(body).toString('utf8')\n\n addRequestMeta(req, 'postponed', postponed)\n }\n\n // When enabled, this will allow the use of the `?__nextppronly` query to\n // enable debugging of the static shell.\n const hasDebugStaticShellQuery =\n process.env.__NEXT_EXPERIMENTAL_STATIC_SHELL_DEBUGGING === '1' &&\n typeof query.__nextppronly !== 'undefined' &&\n couldSupportPPR\n\n // When enabled, this will allow the use of the `?__nextppronly` query\n // to enable debugging of the fallback shell.\n const hasDebugFallbackShellQuery =\n hasDebugStaticShellQuery && query.__nextppronly === 'fallback'\n\n // This page supports PPR if it is marked as being `PARTIALLY_STATIC` in the\n // prerender manifest and this is an app page.\n const isRoutePPREnabled: boolean =\n couldSupportPPR &&\n ((\n prerenderManifest.routes[normalizedSrcPage] ??\n prerenderManifest.dynamicRoutes[normalizedSrcPage]\n )?.renderingMode === 'PARTIALLY_STATIC' ||\n // Ideally we'd want to check the appConfig to see if this page has PPR\n // enabled or not, but that would require plumbing the appConfig through\n // to the server during development. We assume that the page supports it\n // but only during development.\n (hasDebugStaticShellQuery &&\n (routeModule.isDev === true ||\n routerServerContext?.experimentalTestProxy === true)))\n\n const isDebugStaticShell: boolean =\n hasDebugStaticShellQuery && isRoutePPREnabled\n\n // We should enable debugging dynamic accesses when the static shell\n // debugging has been enabled and we're also in development mode.\n const isDebugDynamicAccesses =\n isDebugStaticShell && routeModule.isDev === true\n\n const isDebugFallbackShell = hasDebugFallbackShellQuery && isRoutePPREnabled\n\n // If we're in minimal mode, then try to get the postponed information from\n // the request metadata. If available, use it for resuming the postponed\n // render.\n const minimalPostponed = isRoutePPREnabled\n ? getRequestMeta(req, 'postponed')\n : undefined\n\n // If PPR is enabled, and this is a RSC request (but not a prefetch), then\n // we can use this fact to only generate the flight data for the request\n // because we can't cache the HTML (as it's also dynamic).\n let isDynamicRSCRequest =\n isRoutePPREnabled && isRSCRequest && !isPrefetchRSCRequest\n\n // During a PPR revalidation, the RSC request is not dynamic if we do not have the postponed data.\n // We only attach the postponed data during a resume. If there's no postponed data, then it must be a revalidation.\n // This is to ensure that we don't bypass the cache during a revalidation.\n if (isMinimalMode) {\n isDynamicRSCRequest = isDynamicRSCRequest && !!minimalPostponed\n }\n\n // Need to read this before it's stripped by stripFlightHeaders. We don't\n // need to transfer it to the request meta because it's only read\n // within this function; the static segment data should have already been\n // generated, so we will always either return a static response or a 404.\n const segmentPrefetchHeader = getRequestMeta(req, 'segmentPrefetchRSCRequest')\n\n // TODO: investigate existing bug with shouldServeStreamingMetadata always\n // being true for a revalidate due to modifying the base-server this.renderOpts\n // when fixing this to correct logic it causes hydration issue since we set\n // serveStreamingMetadata to true during export\n const serveStreamingMetadata =\n isHtmlBot && isRoutePPREnabled\n ? false\n : !userAgent\n ? true\n : shouldServeStreamingMetadata(userAgent, nextConfig.htmlLimitedBots)\n\n const isSSG = Boolean(\n (prerenderInfo ||\n isPrerendered ||\n prerenderManifest.routes[normalizedSrcPage]) &&\n // If this is a html bot request and PPR is enabled, then we don't want\n // to serve a static response.\n !(isHtmlBot && isRoutePPREnabled)\n )\n\n // When a page supports cacheComponents, we can support RDC for Navigations\n const supportsRDCForNavigations =\n isRoutePPREnabled && nextConfig.cacheComponents === true\n\n // In development, we always want to generate dynamic HTML.\n const supportsDynamicResponse: boolean =\n // If we're in development, we always support dynamic HTML, unless it's\n // a data request, in which case we only produce static HTML.\n routeModule.isDev === true ||\n // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isSSG ||\n // If this request has provided postponed data, it supports dynamic\n // HTML.\n typeof minimalPostponed === 'string' ||\n // If this handler supports onCacheEntryV2, then we can only support\n // dynamic responses if it's a dynamic RSC request and not in minimal mode. If it\n // doesn't support it we must fallback to the default behavior.\n (supportsRDCForNavigations && getRequestMeta(req, 'onCacheEntryV2')\n ? // In minimal mode, we'll always want to generate a static response\n // which will generate the RDC for the route. When resuming a Dynamic\n // RSC request, we'll pass the minimal postponed data to the render\n // which will trigger the `supportsDynamicResponse` to be true.\n isDynamicRSCRequest && !isMinimalMode\n : // Otherwise, we can support dynamic responses if it's a dynamic RSC request.\n isDynamicRSCRequest)\n\n // When html bots request PPR page, perform the full dynamic rendering.\n const shouldWaitOnAllReady = isHtmlBot && isRoutePPREnabled\n\n let ssgCacheKey: string | null = null\n if (\n !isDraftMode &&\n isSSG &&\n !supportsDynamicResponse &&\n !isPossibleServerAction &&\n !minimalPostponed &&\n !isDynamicRSCRequest\n ) {\n ssgCacheKey = resolvedPathname\n }\n\n // the staticPathKey differs from ssgCacheKey since\n // ssgCacheKey is null in dev since we're always in \"dynamic\"\n // mode in dev to bypass the cache, but we still need to honor\n // dynamicParams = false in dev mode\n let staticPathKey = ssgCacheKey\n if (!staticPathKey && routeModule.isDev) {\n staticPathKey = resolvedPathname\n }\n\n // If this is a request for an app path that should be statically generated\n // and we aren't in the edge runtime, strip the flight headers so it will\n // generate the static response.\n if (\n !routeModule.isDev &&\n !isDraftMode &&\n isSSG &&\n isRSCRequest &&\n !isDynamicRSCRequest\n ) {\n stripFlightHeaders(req.headers)\n }\n\n const ComponentMod = {\n ...entryBase,\n tree,\n GlobalError,\n handler,\n routeModule,\n __next_app__,\n }\n\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest,\n })\n }\n\n const method = req.method || 'GET'\n const tracer = getTracer()\n const activeSpan = tracer.getActiveScopeSpan()\n\n const render404 = async () => {\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext?.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false)\n } else {\n res.end('This page could not be found')\n }\n return null\n }\n\n try {\n const varyHeader = routeModule.getVaryHeader(\n resolvedPathname,\n interceptionRoutePatterns\n )\n res.setHeader('Vary', varyHeader)\n const invokeRouteModule = async (\n span: Span | undefined,\n context: AppPageRouteHandlerContext\n ) => {\n const nextReq = new NodeNextRequest(req)\n const nextRes = new NodeNextResponse(res)\n\n return routeModule.render(nextReq, nextRes, context).finally(() => {\n if (!span) return\n\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false,\n })\n\n const rootSpanAttributes = tracer.getRootSpanAttributes()\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return\n }\n\n if (\n rootSpanAttributes.get('next.span_type') !==\n BaseServerSpan.handleRequest\n ) {\n console.warn(\n `Unexpected root span type '${rootSpanAttributes.get(\n 'next.span_type'\n )}'. Please report this Next.js issue https://github.com/vercel/next.js`\n )\n return\n }\n\n const route = rootSpanAttributes.get('next.route')\n if (route) {\n const name = `${method} ${route}`\n\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name,\n })\n span.updateName(name)\n } else {\n span.updateName(`${method} ${srcPage}`)\n }\n })\n }\n\n const incrementalCache = getRequestMeta(req, 'incrementalCache')\n\n const doRender = async ({\n span,\n postponed,\n fallbackRouteParams,\n forceStaticRender,\n }: {\n span?: Span\n\n /**\n * The postponed data for this render. This is only provided when resuming\n * a render that has been postponed.\n */\n postponed: string | undefined\n\n /**\n * The unknown route params for this render.\n */\n fallbackRouteParams: OpaqueFallbackRouteParams | null\n\n /**\n * When true, this indicates that the response generator is being called\n * in a context where the response must be generated statically.\n *\n * CRITICAL: This should only currently be used when revalidating due to a\n * dynamic RSC request.\n */\n forceStaticRender: boolean\n }): Promise<ResponseCacheEntry> => {\n const context: AppPageRouteHandlerContext = {\n query,\n params,\n page: normalizedSrcPage,\n sharedContext: {\n buildId,\n },\n serverComponentsHmrCache: getRequestMeta(\n req,\n 'serverComponentsHmrCache'\n ),\n fallbackRouteParams,\n renderOpts: {\n App: () => null,\n Document: () => null,\n pageConfig: {},\n ComponentMod,\n Component: interopDefault(ComponentMod),\n\n params,\n routeModule,\n page: srcPage,\n postponed,\n shouldWaitOnAllReady,\n serveStreamingMetadata,\n supportsDynamicResponse:\n typeof postponed === 'string' || supportsDynamicResponse,\n buildManifest,\n nextFontManifest,\n reactLoadableManifest,\n subresourceIntegrityManifest,\n setCacheStatus: routerServerContext?.setCacheStatus,\n setIsrStatus: routerServerContext?.setIsrStatus,\n setReactDebugChannel: routerServerContext?.setReactDebugChannel,\n sendErrorsToBrowser: routerServerContext?.sendErrorsToBrowser,\n\n dir:\n process.env.NEXT_RUNTIME === 'nodejs'\n ? (require('path') as typeof import('path')).join(\n /* turbopackIgnore: true */\n process.cwd(),\n routeModule.relativeProjectDir\n )\n : `${process.cwd()}/${routeModule.relativeProjectDir}`,\n isDraftMode,\n botType,\n isOnDemandRevalidate,\n isPossibleServerAction,\n assetPrefix: nextConfig.assetPrefix,\n nextConfigOutput: nextConfig.output,\n crossOrigin: nextConfig.crossOrigin,\n trailingSlash: nextConfig.trailingSlash,\n images: nextConfig.images,\n previewProps: prerenderManifest.preview,\n deploymentId: deploymentId,\n enableTainting: nextConfig.experimental.taint,\n htmlLimitedBots: nextConfig.htmlLimitedBots,\n reactMaxHeadersLength: nextConfig.reactMaxHeadersLength,\n\n multiZoneDraftMode,\n incrementalCache,\n cacheLifeProfiles: nextConfig.cacheLife,\n basePath: nextConfig.basePath,\n serverActions: nextConfig.experimental.serverActions,\n\n ...(isDebugStaticShell ||\n isDebugDynamicAccesses ||\n isDebugFallbackShell\n ? {\n nextExport: true,\n supportsDynamicResponse: false,\n isStaticGeneration: true,\n isDebugDynamicAccesses: isDebugDynamicAccesses,\n }\n : {}),\n cacheComponents: Boolean(nextConfig.cacheComponents),\n experimental: {\n isRoutePPREnabled,\n expireTime: nextConfig.expireTime,\n staleTimes: nextConfig.experimental.staleTimes,\n dynamicOnHover: Boolean(nextConfig.experimental.dynamicOnHover),\n inlineCss: Boolean(nextConfig.experimental.inlineCss),\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts),\n clientTraceMetadata:\n nextConfig.experimental.clientTraceMetadata || ([] as any),\n clientParamParsingOrigins:\n nextConfig.experimental.clientParamParsingOrigins,\n maxPostponedStateSizeBytes: parseMaxPostponedStateSize(\n nextConfig.experimental.maxPostponedStateSize\n ),\n },\n\n waitUntil: ctx.waitUntil,\n onClose: (cb) => {\n res.on('close', cb)\n },\n onAfterTaskError: () => {},\n\n onInstrumentationRequestError: (\n error,\n _request,\n errorContext,\n silenceLog\n ) =>\n routeModule.onRequestError(\n req,\n error,\n errorContext,\n silenceLog,\n routerServerContext\n ),\n err: getRequestMeta(req, 'invokeError'),\n dev: routeModule.isDev,\n },\n }\n\n if (isDebugStaticShell || isDebugDynamicAccesses) {\n context.renderOpts.nextExport = true\n context.renderOpts.supportsDynamicResponse = false\n context.renderOpts.isDebugDynamicAccesses = isDebugDynamicAccesses\n }\n\n // When we're revalidating in the background, we should not allow dynamic\n // responses.\n if (forceStaticRender) {\n context.renderOpts.supportsDynamicResponse = false\n }\n\n const result = await invokeRouteModule(span, context)\n\n const { metadata } = result\n\n const {\n cacheControl,\n headers = {},\n // Add any fetch tags that were on the page to the response headers.\n fetchTags: cacheTags,\n fetchMetrics,\n } = metadata\n\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags\n }\n\n // Pull any fetch metrics from the render onto the request.\n ;(req as any).fetchMetrics = fetchMetrics\n\n // we don't throw static to dynamic errors in dev as isSSG\n // is a best guess in dev since we don't have the prerender pass\n // to know whether the path is actually static or not\n if (\n isSSG &&\n cacheControl?.revalidate === 0 &&\n !routeModule.isDev &&\n !isRoutePPREnabled\n ) {\n const staticBailoutInfo = metadata.staticBailoutInfo\n\n const err = new Error(\n `Page changed from static to dynamic at runtime ${resolvedPathname}${\n staticBailoutInfo?.description\n ? `, reason: ${staticBailoutInfo.description}`\n : ``\n }` +\n `\\nsee more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`\n )\n\n if (staticBailoutInfo?.stack) {\n const stack = staticBailoutInfo.stack\n err.stack = err.message + stack.substring(stack.indexOf('\\n'))\n }\n\n throw err\n }\n\n return {\n value: {\n kind: CachedRouteKind.APP_PAGE,\n html: result,\n headers,\n rscData: metadata.flightData,\n postponed: metadata.postponed,\n status: metadata.statusCode,\n segmentData: metadata.segmentData,\n } satisfies CachedAppPageValue,\n cacheControl,\n } satisfies ResponseCacheEntry\n }\n\n const responseGenerator: ResponseGenerator = async ({\n hasResolved,\n previousCacheEntry: previousIncrementalCacheEntry,\n isRevalidating,\n span,\n forceStaticRender = false,\n }) => {\n const isProduction = routeModule.isDev === false\n const didRespond = hasResolved || res.writableEnded\n\n // skip on-demand revalidate if cache is not present and\n // revalidate-if-generated is set\n if (\n isOnDemandRevalidate &&\n revalidateOnlyGenerated &&\n !previousIncrementalCacheEntry &&\n !isMinimalMode\n ) {\n if (routerServerContext?.render404) {\n await routerServerContext.render404(req, res)\n } else {\n res.statusCode = 404\n res.end('This page could not be found')\n }\n return null\n }\n\n let fallbackMode: FallbackMode | undefined\n\n if (prerenderInfo) {\n fallbackMode = parseFallbackField(prerenderInfo.fallback)\n }\n\n // When serving a HTML bot request, we want to serve a blocking render and\n // not the prerendered page. This ensures that the correct content is served\n // to the bot in the head.\n if (fallbackMode === FallbackMode.PRERENDER && isBot(userAgent)) {\n if (!isRoutePPREnabled || isHtmlBot) {\n fallbackMode = FallbackMode.BLOCKING_STATIC_RENDER\n }\n }\n\n if (previousIncrementalCacheEntry?.isStale === -1) {\n isOnDemandRevalidate = true\n }\n\n // TODO: adapt for PPR\n // only allow on-demand revalidate for fallback: true/blocking\n // or for prerendered fallback: false paths\n if (\n isOnDemandRevalidate &&\n (fallbackMode !== FallbackMode.NOT_FOUND ||\n previousIncrementalCacheEntry)\n ) {\n fallbackMode = FallbackMode.BLOCKING_STATIC_RENDER\n }\n\n if (\n !isMinimalMode &&\n fallbackMode !== FallbackMode.BLOCKING_STATIC_RENDER &&\n staticPathKey &&\n !didRespond &&\n !isDraftMode &&\n pageIsDynamic &&\n (isProduction || !isPrerendered)\n ) {\n // if the page has dynamicParams: false and this pathname wasn't\n // prerendered trigger the no fallback handling\n if (\n // In development, fall through to render to handle missing\n // getStaticPaths.\n (isProduction || prerenderInfo) &&\n // When fallback isn't present, abort this render so we 404\n fallbackMode === FallbackMode.NOT_FOUND\n ) {\n if (nextConfig.experimental.adapterPath) {\n return await render404()\n }\n throw new NoFallbackError()\n }\n\n // When cacheComponents is enabled, we can use the fallback\n // response if the request is not a dynamic RSC request because the\n // RSC data when this feature flag is enabled does not contain any\n // param references. Without this feature flag enabled, the RSC data\n // contains param references, and therefore we can't use the fallback.\n if (\n isRoutePPREnabled &&\n (nextConfig.cacheComponents ? !isDynamicRSCRequest : !isRSCRequest)\n ) {\n const cacheKey =\n isProduction && typeof prerenderInfo?.fallback === 'string'\n ? prerenderInfo.fallback\n : normalizedSrcPage\n\n const fallbackRouteParams =\n // If we're in production and we have fallback route params, then we\n // can use the manifest fallback route params.\n isProduction && prerenderInfo?.fallbackRouteParams\n ? createOpaqueFallbackRouteParams(\n prerenderInfo.fallbackRouteParams\n )\n : // Otherwise, if we're debugging the fallback shell, then we\n // have to manually generate the fallback route params.\n isDebugFallbackShell\n ? getFallbackRouteParams(normalizedSrcPage, routeModule)\n : null\n\n // We use the response cache here to handle the revalidation and\n // management of the fallback shell.\n const fallbackResponse = await routeModule.handleResponse({\n cacheKey,\n req,\n nextConfig,\n routeKind: RouteKind.APP_PAGE,\n isFallback: true,\n prerenderManifest,\n isRoutePPREnabled,\n responseGenerator: async () =>\n doRender({\n span,\n // We pass `undefined` as rendering a fallback isn't resumed\n // here.\n postponed: undefined,\n fallbackRouteParams,\n forceStaticRender: false,\n }),\n waitUntil: ctx.waitUntil,\n isMinimalMode,\n })\n\n // If the fallback response was set to null, then we should return null.\n if (fallbackResponse === null) return null\n\n // Otherwise, if we did get a fallback response, we should return it.\n if (fallbackResponse) {\n // Remove the cache control from the response to prevent it from being\n // used in the surrounding cache.\n delete fallbackResponse.cacheControl\n\n return fallbackResponse\n }\n }\n }\n\n // Only requests that aren't revalidating can be resumed. If we have the\n // minimal postponed data, then we should resume the render with it.\n let postponed =\n !isOnDemandRevalidate && !isRevalidating && minimalPostponed\n ? minimalPostponed\n : undefined\n\n // If this is a dynamic RSC request or a server action request, we should\n // use the postponed data from the static render (if available). This\n // ensures that we can utilize the resume data cache (RDC) from the static\n // render to ensure that the data is consistent between the static and\n // dynamic renders (for navigations) or when re-rendering after a server\n // action.\n if (\n // Only enable RDC for Navigations if the feature is enabled.\n supportsRDCForNavigations &&\n process.env.NEXT_RUNTIME !== 'edge' &&\n !isMinimalMode &&\n incrementalCache &&\n // Include both dynamic RSC requests (navigations) and server actions\n (isDynamicRSCRequest || isPossibleServerAction) &&\n // We don't typically trigger an on-demand revalidation for dynamic RSC\n // requests, as we're typically revalidating the page in the background\n // instead. However, if the cache entry is stale, we should trigger a\n // background revalidation on dynamic RSC requests. This prevents us\n // from entering an infinite loop of revalidations.\n !forceStaticRender\n ) {\n const incrementalCacheEntry = await incrementalCache.get(\n resolvedPathname,\n {\n kind: IncrementalCacheKind.APP_PAGE,\n isRoutePPREnabled: true,\n isFallback: false,\n }\n )\n\n // If the cache entry is found, we should use the postponed data from\n // the cache.\n if (\n incrementalCacheEntry &&\n incrementalCacheEntry.value &&\n incrementalCacheEntry.value.kind === CachedRouteKind.APP_PAGE\n ) {\n // CRITICAL: we're assigning the postponed data from the cache entry\n // here as we're using the RDC to resume the render.\n postponed = incrementalCacheEntry.value.postponed\n\n // If the cache entry is stale, we should trigger a background\n // revalidation so that subsequent requests will get a fresh response.\n if (\n incrementalCacheEntry &&\n // We want to trigger this flow if the cache entry is stale and if\n // the requested revalidation flow is either foreground or\n // background.\n (incrementalCacheEntry.isStale === -1 ||\n incrementalCacheEntry.isStale === true)\n ) {\n // We want to schedule this on the next tick to ensure that the\n // render is not blocked on it.\n scheduleOnNextTick(async () => {\n const responseCache = routeModule.getResponseCache(req)\n\n try {\n await responseCache.revalidate(\n resolvedPathname,\n incrementalCache,\n isRoutePPREnabled,\n false,\n (c) =>\n responseGenerator({\n ...c,\n // CRITICAL: we need to set this to true as we're\n // revalidating in the background and typically this dynamic\n // RSC request is not treated as static.\n forceStaticRender: true,\n }),\n // CRITICAL: we need to pass null here because passing the\n // previous cache entry here (which is stale) will switch on\n // isOnDemandRevalidate and break the prerendering.\n null,\n hasResolved,\n ctx.waitUntil\n )\n } catch (err) {\n console.error(\n 'Error revalidating the page in the background',\n err\n )\n }\n })\n }\n }\n }\n\n // When we're in minimal mode, if we're trying to debug the static shell,\n // we should just return nothing instead of resuming the dynamic render.\n if (\n (isDebugStaticShell || isDebugDynamicAccesses) &&\n typeof postponed !== 'undefined'\n ) {\n return {\n cacheControl: { revalidate: 1, expire: undefined },\n value: {\n kind: CachedRouteKind.PAGES,\n html: RenderResult.EMPTY,\n pageData: {},\n headers: undefined,\n status: undefined,\n } satisfies CachedPageValue,\n }\n }\n\n const fallbackRouteParams =\n // If we're in production and we have fallback route params, then we\n // can use the manifest fallback route params if we need to render the\n // fallback shell.\n isProduction &&\n prerenderInfo?.fallbackRouteParams &&\n getRequestMeta(req, 'renderFallbackShell')\n ? createOpaqueFallbackRouteParams(prerenderInfo.fallbackRouteParams)\n : // Otherwise, if we're debugging the fallback shell, then we have to\n // manually generate the fallback route params.\n isDebugFallbackShell\n ? getFallbackRouteParams(normalizedSrcPage, routeModule)\n : null\n\n // Perform the render.\n return doRender({\n span,\n postponed,\n fallbackRouteParams,\n forceStaticRender,\n })\n }\n\n const handleResponse = async (span?: Span): Promise<null | void> => {\n const cacheEntry = await routeModule.handleResponse({\n cacheKey: ssgCacheKey,\n responseGenerator: (c) =>\n responseGenerator({\n span,\n ...c,\n }),\n routeKind: RouteKind.APP_PAGE,\n isOnDemandRevalidate,\n isRoutePPREnabled,\n req,\n nextConfig,\n prerenderManifest,\n waitUntil: ctx.waitUntil,\n isMinimalMode,\n })\n\n if (isDraftMode) {\n res.setHeader(\n 'Cache-Control',\n 'private, no-cache, no-store, max-age=0, must-revalidate'\n )\n }\n\n // In dev, we should not cache pages for any reason.\n if (routeModule.isDev) {\n res.setHeader(\n 'Cache-Control',\n nextConfig.experimental.devCacheControlNoCache\n ? 'no-cache, must-revalidate'\n : 'no-store, must-revalidate'\n )\n }\n\n if (!cacheEntry) {\n if (ssgCacheKey) {\n // A cache entry might not be generated if a response is written\n // in `getInitialProps` or `getServerSideProps`, but those shouldn't\n // have a cache key. If we do have a cache key but we don't end up\n // with a cache entry, then either Next.js or the application has a\n // bug that needs fixing.\n throw new Error('invariant: cache entry required but not generated')\n }\n return null\n }\n\n if (cacheEntry.value?.kind !== CachedRouteKind.APP_PAGE) {\n throw new Error(\n `Invariant app-page handler received invalid cache entry ${cacheEntry.value?.kind}`\n )\n }\n\n const didPostpone = typeof cacheEntry.value.postponed === 'string'\n\n if (\n isSSG &&\n // We don't want to send a cache header for requests that contain dynamic\n // data. If this is a Dynamic RSC request or wasn't a Prefetch RSC\n // request, then we should set the cache header.\n !isDynamicRSCRequest &&\n (!didPostpone || isPrefetchRSCRequest)\n ) {\n if (!isMinimalMode) {\n // set x-nextjs-cache header to match the header\n // we set for the image-optimizer\n res.setHeader(\n 'x-nextjs-cache',\n isOnDemandRevalidate\n ? 'REVALIDATED'\n : cacheEntry.isMiss\n ? 'MISS'\n : cacheEntry.isStale\n ? 'STALE'\n : 'HIT'\n )\n }\n // Set a header used by the client router to signal the response is static\n // and should respect the `static` cache staleTime value.\n res.setHeader(NEXT_IS_PRERENDER_HEADER, '1')\n }\n const { value: cachedData } = cacheEntry\n\n // Coerce the cache control parameter from the render.\n let cacheControl: CacheControl | undefined\n\n // If this is a resume request in minimal mode it is streamed with dynamic\n // content and should not be cached.\n if (minimalPostponed) {\n cacheControl = { revalidate: 0, expire: undefined }\n }\n\n // If this is in minimal mode and this is a flight request that isn't a\n // prefetch request while PPR is enabled, it cannot be cached as it contains\n // dynamic content.\n else if (isDynamicRSCRequest) {\n cacheControl = { revalidate: 0, expire: undefined }\n } else if (!routeModule.isDev) {\n // If this is a preview mode request, we shouldn't cache it\n if (isDraftMode) {\n cacheControl = { revalidate: 0, expire: undefined }\n }\n\n // If this isn't SSG, then we should set change the header only if it is\n // not set already.\n else if (!isSSG) {\n if (!res.getHeader('Cache-Control')) {\n cacheControl = { revalidate: 0, expire: undefined }\n }\n } else if (cacheEntry.cacheControl) {\n // If the cache entry has a cache control with a revalidate value that's\n // a number, use it.\n if (typeof cacheEntry.cacheControl.revalidate === 'number') {\n if (cacheEntry.cacheControl.revalidate < 1) {\n throw new Error(\n `Invalid revalidate configuration provided: ${cacheEntry.cacheControl.revalidate} < 1`\n )\n }\n\n cacheControl = {\n revalidate: cacheEntry.cacheControl.revalidate,\n expire: cacheEntry.cacheControl?.expire ?? nextConfig.expireTime,\n }\n }\n // Otherwise if the revalidate value is false, then we should use the\n // cache time of one year.\n else {\n cacheControl = { revalidate: CACHE_ONE_YEAR, expire: undefined }\n }\n }\n }\n\n cacheEntry.cacheControl = cacheControl\n\n if (\n typeof segmentPrefetchHeader === 'string' &&\n cachedData?.kind === CachedRouteKind.APP_PAGE &&\n cachedData.segmentData\n ) {\n // This is a prefetch request issued by the client Segment Cache. These\n // should never reach the application layer (lambda). We should either\n // respond from the cache (HIT) or respond with 204 No Content (MISS).\n\n // Set a header to indicate that PPR is enabled for this route. This\n // lets the client distinguish between a regular cache miss and a cache\n // miss due to PPR being disabled. In other contexts this header is used\n // to indicate that the response contains dynamic data, but here we're\n // only using it to indicate that the feature is enabled — the segment\n // response itself contains whether the data is dynamic.\n res.setHeader(NEXT_DID_POSTPONE_HEADER, '2')\n\n // Add the cache tags header to the response if it exists and we're in\n // minimal mode while rendering a static page.\n const tags = cachedData.headers?.[NEXT_CACHE_TAGS_HEADER]\n if (isMinimalMode && isSSG && tags && typeof tags === 'string') {\n res.setHeader(NEXT_CACHE_TAGS_HEADER, tags)\n }\n\n const matchedSegment = cachedData.segmentData.get(segmentPrefetchHeader)\n if (matchedSegment !== undefined) {\n // Cache hit\n return sendRenderResult({\n req,\n res,\n generateEtags: nextConfig.generateEtags,\n poweredByHeader: nextConfig.poweredByHeader,\n result: RenderResult.fromStatic(\n matchedSegment,\n RSC_CONTENT_TYPE_HEADER\n ),\n cacheControl: cacheEntry.cacheControl,\n })\n }\n\n // Cache miss. Either a cache entry for this route has not been generated\n // (which technically should not be possible when PPR is enabled, because\n // at a minimum there should always be a fallback entry) or there's no\n // match for the requested segment. Respond with a 204 No Content. We\n // don't bother to respond with 404, because these requests are only\n // issued as part of a prefetch.\n res.statusCode = 204\n return sendRenderResult({\n req,\n res,\n generateEtags: nextConfig.generateEtags,\n poweredByHeader: nextConfig.poweredByHeader,\n result: RenderResult.EMPTY,\n cacheControl: cacheEntry.cacheControl,\n })\n }\n\n // If there's a callback for `onCacheEntry`, call it with the cache entry\n // and the revalidate options. If we support RDC for Navigations, we\n // prefer the `onCacheEntryV2` callback. Once RDC for Navigations is the\n // default, we can remove the fallback to `onCacheEntry` as\n // `onCacheEntryV2` is now fully supported.\n const onCacheEntry = supportsRDCForNavigations\n ? (getRequestMeta(req, 'onCacheEntryV2') ??\n getRequestMeta(req, 'onCacheEntry'))\n : getRequestMeta(req, 'onCacheEntry')\n if (onCacheEntry) {\n const finished = await onCacheEntry(cacheEntry, {\n url: getRequestMeta(req, 'initURL') ?? req.url,\n })\n if (finished) return null\n }\n\n if (cachedData.headers) {\n const headers = { ...cachedData.headers }\n\n if (!isMinimalMode || !isSSG) {\n delete headers[NEXT_CACHE_TAGS_HEADER]\n }\n\n for (let [key, value] of Object.entries(headers)) {\n if (typeof value === 'undefined') continue\n\n if (Array.isArray(value)) {\n for (const v of value) {\n res.appendHeader(key, v)\n }\n } else if (typeof value === 'number') {\n value = value.toString()\n res.appendHeader(key, value)\n } else {\n res.appendHeader(key, value)\n }\n }\n }\n\n // Add the cache tags header to the response if it exists and we're in\n // minimal mode while rendering a static page.\n const tags = cachedData.headers?.[NEXT_CACHE_TAGS_HEADER]\n if (isMinimalMode && isSSG && tags && typeof tags === 'string') {\n res.setHeader(NEXT_CACHE_TAGS_HEADER, tags)\n }\n\n // If the request is a data request, then we shouldn't set the status code\n // from the response because it should always be 200. This should be gated\n // behind the experimental PPR flag.\n if (cachedData.status && (!isRSCRequest || !isRoutePPREnabled)) {\n res.statusCode = cachedData.status\n }\n\n // Redirect information is encoded in RSC payload, so we don't need to use redirect status codes\n if (\n !isMinimalMode &&\n cachedData.status &&\n RedirectStatusCode[cachedData.status] &&\n isRSCRequest\n ) {\n res.statusCode = 200\n }\n\n // Mark that the request did postpone.\n if (didPostpone && !isDynamicRSCRequest) {\n res.setHeader(NEXT_DID_POSTPONE_HEADER, '1')\n }\n\n // we don't go through this block when preview mode is true\n // as preview mode is a dynamic request (bypasses cache) and doesn't\n // generate both HTML and payloads in the same request so continue to just\n // return the generated payload\n if (isRSCRequest && !isDraftMode) {\n // If this is a dynamic RSC request, then stream the response.\n if (typeof cachedData.rscData === 'undefined') {\n // If the response is not an RSC response, then we can't serve it.\n if (cachedData.html.contentType !== RSC_CONTENT_TYPE_HEADER) {\n if (nextConfig.cacheComponents) {\n res.statusCode = 404\n return sendRenderResult({\n req,\n res,\n generateEtags: nextConfig.generateEtags,\n poweredByHeader: nextConfig.poweredByHeader,\n result: RenderResult.EMPTY,\n cacheControl: cacheEntry.cacheControl,\n })\n } else {\n // Otherwise this case is not expected.\n throw new InvariantError(\n `Expected RSC response, got ${cachedData.html.contentType}`\n )\n }\n }\n\n return sendRenderResult({\n req,\n res,\n generateEtags: nextConfig.generateEtags,\n poweredByHeader: nextConfig.poweredByHeader,\n result: cachedData.html,\n cacheControl: cacheEntry.cacheControl,\n })\n }\n\n // As this isn't a prefetch request, we should serve the static flight\n // data.\n return sendRenderResult({\n req,\n res,\n generateEtags: nextConfig.generateEtags,\n poweredByHeader: nextConfig.poweredByHeader,\n result: RenderResult.fromStatic(\n cachedData.rscData,\n RSC_CONTENT_TYPE_HEADER\n ),\n cacheControl: cacheEntry.cacheControl,\n })\n }\n\n // This is a request for HTML data.\n const body = cachedData.html\n\n // If there's no postponed state, we should just serve the HTML. This\n // should also be the case for a resume request because it's completed\n // as a server render (rather than a static render).\n if (!didPostpone || isMinimalMode || isRSCRequest) {\n // If we're in test mode, we should add a sentinel chunk to the response\n // that's between the static and dynamic parts so we can compare the\n // chunks and add assertions.\n if (\n process.env.__NEXT_TEST_MODE &&\n isMinimalMode &&\n isRoutePPREnabled &&\n body.contentType === HTML_CONTENT_TYPE_HEADER\n ) {\n // As we're in minimal mode, the static part would have already been\n // streamed first. The only part that this streams is the dynamic part\n // so we should FIRST stream the sentinel and THEN the dynamic part.\n body.unshift(createPPRBoundarySentinel())\n }\n\n return sendRenderResult({\n req,\n res,\n generateEtags: nextConfig.generateEtags,\n poweredByHeader: nextConfig.poweredByHeader,\n result: body,\n cacheControl: cacheEntry.cacheControl,\n })\n }\n\n // If we're debugging the static shell or the dynamic API accesses, we\n // should just serve the HTML without resuming the render. The returned\n // HTML will be the static shell so all the Dynamic API's will be used\n // during static generation.\n if (isDebugStaticShell || isDebugDynamicAccesses) {\n // Since we're not resuming the render, we need to at least add the\n // closing body and html tags to create valid HTML.\n body.push(\n new ReadableStream({\n start(controller) {\n controller.enqueue(ENCODED_TAGS.CLOSED.BODY_AND_HTML)\n controller.close()\n },\n })\n )\n\n return sendRenderResult({\n req,\n res,\n generateEtags: nextConfig.generateEtags,\n poweredByHeader: nextConfig.poweredByHeader,\n result: body,\n cacheControl: { revalidate: 0, expire: undefined },\n })\n }\n\n // If we're in test mode, we should add a sentinel chunk to the response\n // that's between the static and dynamic parts so we can compare the\n // chunks and add assertions.\n if (process.env.__NEXT_TEST_MODE) {\n body.push(createPPRBoundarySentinel())\n }\n\n // This request has postponed, so let's create a new transformer that the\n // dynamic data can pipe to that will attach the dynamic data to the end\n // of the response.\n const transformer = new TransformStream<Uint8Array, Uint8Array>()\n body.push(transformer.readable)\n\n // Perform the render again, but this time, provide the postponed state.\n // We don't await because we want the result to start streaming now, and\n // we've already chained the transformer's readable to the render result.\n doRender({\n span,\n postponed: cachedData.postponed,\n // This is a resume render, not a fallback render, so we don't need to\n // set this.\n fallbackRouteParams: null,\n forceStaticRender: false,\n })\n .then(async (result) => {\n if (!result) {\n throw new Error('Invariant: expected a result to be returned')\n }\n\n if (result.value?.kind !== CachedRouteKind.APP_PAGE) {\n throw new Error(\n `Invariant: expected a page response, got ${result.value?.kind}`\n )\n }\n\n // Pipe the resume result to the transformer.\n await result.value.html.pipeTo(transformer.writable)\n })\n .catch((err) => {\n // An error occurred during piping or preparing the render, abort\n // the transformers writer so we can terminate the stream.\n transformer.writable.abort(err).catch((e) => {\n console.error(\"couldn't abort transformer\", e)\n })\n })\n\n return sendRenderResult({\n req,\n res,\n generateEtags: nextConfig.generateEtags,\n poweredByHeader: nextConfig.poweredByHeader,\n result: body,\n // We don't want to cache the response if it has postponed data because\n // the response being sent to the client it's dynamic parts are streamed\n // to the client on the same request.\n cacheControl: { revalidate: 0, expire: undefined },\n })\n }\n\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan)\n } else {\n return await tracer.withPropagatedContext(req.headers, () =>\n tracer.trace(\n BaseServerSpan.handleRequest,\n {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url,\n },\n },\n handleResponse\n )\n )\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false\n await routeModule.onRequestError(\n req,\n err,\n {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'render',\n revalidateReason: getRevalidateReason({\n isStaticGeneration: isSSG,\n isOnDemandRevalidate,\n }),\n },\n silenceLog,\n routerServerContext\n )\n }\n\n // rethrow so that we can handle serving error page\n throw err\n }\n}\n\n// TODO: omit this from production builds, only test builds should include it\n/**\n * Creates a readable stream that emits a PPR boundary sentinel.\n *\n * @returns A readable stream that emits a PPR boundary sentinel.\n */\nfunction createPPRBoundarySentinel() {\n return new ReadableStream({\n start(controller) {\n controller.enqueue(\n new TextEncoder().encode('<!-- PPR_BOUNDARY_SENTINEL -->')\n )\n controller.close()\n },\n })\n}\n"],"names":["GlobalError","__next_app__","handler","routeModule","require","__next_app_require__","loadChunk","__next_app_load_chunk__","AppPageRouteModule","definition","kind","RouteKind","APP_PAGE","page","pathname","bundlePath","filename","appPaths","userland","loaderTree","tree","distDir","process","env","__NEXT_RELATIVE_DIST_DIR","relativeProjectDir","__NEXT_RELATIVE_PROJECT_DIR","req","res","ctx","prerenderManifest","requestMeta","setRequestMeta","isDev","addRequestMeta","hrtime","bigint","isMinimalMode","Boolean","getRequestMeta","srcPage","TURBOPACK","replace","multiZoneDraftMode","__NEXT_MULTI_ZONE_DRAFT_MODE","prepareResult","prepare","statusCode","end","waitUntil","Promise","resolve","buildId","query","params","pageIsDynamic","buildManifest","nextFontManifest","reactLoadableManifest","serverActionsManifest","clientReferenceManifest","subresourceIntegrityManifest","isDraftMode","resolvedPathname","revalidateOnlyGenerated","routerServerContext","nextConfig","parsedUrl","interceptionRoutePatterns","deploymentId","normalizedSrcPage","normalizeAppPath","isOnDemandRevalidate","prerenderInfo","experimental","ppr","cacheComponents","isInterceptionRouteAppPath","match","isPrerendered","routes","userAgent","headers","botType","getBotType","isHtmlBot","isHtmlBotRequest","isPrefetchRSCRequest","NEXT_ROUTER_PREFETCH_HEADER","isRSCRequest","RSC_HEADER","isPossibleServerAction","getIsPossibleServerAction","couldSupportPPR","checkIsAppPPREnabled","resumeStateLengthHeader","NEXT_RESUME_STATE_LENGTH_HEADER","stateLength","parseInt","maxPostponedStateSize","DEFAULT_MAX_POSTPONED_STATE_SIZE","maxPostponedStateSizeBytes","parseMaxPostponedStateSize","isNaN","undefined","defaultActionBodySizeLimit","actionBodySizeLimit","serverActions","bodySizeLimit","actionBodySizeLimitBytes","parse","maxTotalBodySize","bodyChunks","size","chunk","buffer","Buffer","isBuffer","from","byteLength","push","fullBody","concat","length","postponedState","subarray","toString","actionBody","Error","NEXT_RESUME_HEADER","method","body","postponed","hasDebugStaticShellQuery","__NEXT_EXPERIMENTAL_STATIC_SHELL_DEBUGGING","__nextppronly","hasDebugFallbackShellQuery","isRoutePPREnabled","dynamicRoutes","renderingMode","experimentalTestProxy","isDebugStaticShell","isDebugDynamicAccesses","isDebugFallbackShell","minimalPostponed","isDynamicRSCRequest","segmentPrefetchHeader","serveStreamingMetadata","shouldServeStreamingMetadata","htmlLimitedBots","isSSG","supportsRDCForNavigations","supportsDynamicResponse","shouldWaitOnAllReady","ssgCacheKey","staticPathKey","stripFlightHeaders","ComponentMod","entryBase","setManifestsSingleton","tracer","getTracer","activeSpan","getActiveScopeSpan","render404","varyHeader","getVaryHeader","setHeader","invokeRouteModule","span","context","nextReq","NodeNextRequest","nextRes","NodeNextResponse","render","finally","setAttributes","rootSpanAttributes","getRootSpanAttributes","get","BaseServerSpan","handleRequest","console","warn","route","name","updateName","incrementalCache","doRender","fallbackRouteParams","forceStaticRender","sharedContext","serverComponentsHmrCache","renderOpts","App","Document","pageConfig","Component","interopDefault","setCacheStatus","setIsrStatus","setReactDebugChannel","sendErrorsToBrowser","dir","NEXT_RUNTIME","join","cwd","assetPrefix","nextConfigOutput","output","crossOrigin","trailingSlash","images","previewProps","preview","enableTainting","taint","reactMaxHeadersLength","cacheLifeProfiles","cacheLife","basePath","nextExport","isStaticGeneration","expireTime","staleTimes","dynamicOnHover","inlineCss","authInterrupts","clientTraceMetadata","clientParamParsingOrigins","onClose","cb","on","onAfterTaskError","onInstrumentationRequestError","error","_request","errorContext","silenceLog","onRequestError","err","dev","result","metadata","cacheControl","fetchTags","cacheTags","fetchMetrics","NEXT_CACHE_TAGS_HEADER","revalidate","staticBailoutInfo","description","stack","message","substring","indexOf","value","CachedRouteKind","html","rscData","flightData","status","segmentData","responseGenerator","hasResolved","previousCacheEntry","previousIncrementalCacheEntry","isRevalidating","isProduction","didRespond","writableEnded","fallbackMode","parseFallbackField","fallback","FallbackMode","PRERENDER","isBot","BLOCKING_STATIC_RENDER","isStale","NOT_FOUND","adapterPath","NoFallbackError","cacheKey","createOpaqueFallbackRouteParams","getFallbackRouteParams","fallbackResponse","handleResponse","routeKind","isFallback","incrementalCacheEntry","IncrementalCacheKind","scheduleOnNextTick","responseCache","getResponseCache","c","expire","PAGES","RenderResult","EMPTY","pageData","cacheEntry","cachedData","devCacheControlNoCache","didPostpone","isMiss","NEXT_IS_PRERENDER_HEADER","getHeader","CACHE_ONE_YEAR","NEXT_DID_POSTPONE_HEADER","tags","matchedSegment","sendRenderResult","generateEtags","poweredByHeader","fromStatic","RSC_CONTENT_TYPE_HEADER","onCacheEntry","finished","url","key","Object","entries","Array","isArray","v","appendHeader","RedirectStatusCode","contentType","InvariantError","__NEXT_TEST_MODE","HTML_CONTENT_TYPE_HEADER","unshift","createPPRBoundarySentinel","ReadableStream","start","controller","enqueue","ENCODED_TAGS","CLOSED","BODY_AND_HTML","close","transformer","TransformStream","readable","then","pipeTo","writable","catch","abort","e","withPropagatedContext","trace","spanName","SpanKind","SERVER","attributes","routerKind","routePath","routeType","revalidateReason","getRevalidateReason","TextEncoder","encode"],"mappings":";;;;;;;;;;;;;;;;;IA+ESA,WAAW;eAAXA,gCAAW;;IAaPC,YAAY;eAAZA;;IA+BSC,OAAO;eAAPA;;IAjBTC,WAAW;eAAXA;;;;gCApGN;2BAEmB;uBAEU;wBACW;6BAMxC;2BACwB;gCACA;oCACI;sBACe;qBACb;gCAK9B;oCAC+B;mCAI/B;0BAC0B;yCACS;kCAOnC;uBAC2B;+BAQ3B;0BAC0C;qEACxB;4BAOlB;6BAEsB;6BACI;yCACD;2BAIzB;gFAWiB;gFAmBG;oCACQ;gCACJ;2BACI;oCACQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AATpC,MAAMF,eAAe;IAC1BG,SAASC;IACTC,WAAWC;AACb;AAWO,MAAMJ,cAAc,IAAIK,kCAAkB,CAAC;IAChDC,YAAY;QACVC,MAAMC,oBAAS,CAACC,QAAQ;QACxBC,MAAM;QACNC,UAAU;QACV,2CAA2C;QAC3CC,YAAY;QACZC,UAAU;QACVC,UAAU,EAAE;IACd;IACAC,UAAU;QACRC,YAAYC;IACd;IACAC,SAASC,QAAQC,GAAG,CAACC,wBAAwB,IAAI;IACjDC,oBAAoBH,QAAQC,GAAG,CAACG,2BAA2B,IAAI;AACjE;AAEO,eAAexB,QACpByB,GAAoB,EACpBC,GAAmB,EACnBC,GAGC;QAoOGC;IAlOJ,IAAID,IAAIE,WAAW,EAAE;QACnBC,IAAAA,2BAAc,EAACL,KAAKE,IAAIE,WAAW;IACrC;IAEA,IAAI5B,YAAY8B,KAAK,EAAE;QACrBC,IAAAA,2BAAc,EAACP,KAAK,gCAAgCL,QAAQa,MAA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AO,MAAMF,OAAO+L,qBAAqB,CAACpU,IAAIuD,OAAO,EAAE,IACrD8E,OAAOgM,KAAK,CACV3K,yBAAc,CAACC,aAAa,EAC5B;oBACE2K,UAAU,GAAG/N,OAAO,CAAC,EAAE1F,SAAS;oBAChC9B,MAAMwV,gBAAQ,CAACC,MAAM;oBACrBC,YAAY;wBACV,eAAelO;wBACf,eAAevG,IAAIoS,GAAG;oBACxB;gBACF,GACAhC;QAGN;IACF,EAAE,OAAO9C,KAAK;QACZ,IAAI,CAAEA,CAAAA,eAAeyC,wCAAe,AAAD,GAAI;YACrC,MAAM3C,aAAa;YACnB,MAAM5O,YAAY6O,cAAc,CAC9BrN,KACAsN,KACA;gBACEoH,YAAY;gBACZC,WAAW9T;gBACX+T,WAAW;gBACXC,kBAAkBC,IAAAA,0BAAmB,EAAC;oBACpC1I,oBAAoBzE;oBACpB9E;gBACF;YACF,GACAuK,YACA9K;QAEJ;QAEA,mDAAmD;QACnD,MAAMgL;IACR;AACF;AAEA,6EAA6E;AAC7E;;;;CAIC,GACD,SAAS4F;IACP,OAAO,IAAIC,eAAe;QACxBC,OAAMC,UAAU;YACdA,WAAWC,OAAO,CAChB,IAAIyB,cAAcC,MAAM,CAAC;YAE3B3B,WAAWK,KAAK;QAClB;IACF;AACF","ignoreList":[0]}
@@ -1725,7 +1725,7 @@ async function getBaseWebpackConfig(dir, { buildId, encryptionKey, config, compi
1725
1725
  isClient && new _copyfileplugin.CopyFilePlugin({
1726
1726
  // file path to build output of `@next/polyfill-nomodule`
1727
1727
  filePath: require.resolve('./polyfills/polyfill-nomodule'),
1728
- cacheKey: "16.1.1-canary.25",
1728
+ cacheKey: "16.1.1-canary.27",
1729
1729
  name: `static/chunks/polyfills${dev ? '' : '-[hash]'}.js`,
1730
1730
  minimize: false,
1731
1731
  info: {
@@ -1919,7 +1919,7 @@ async function getBaseWebpackConfig(dir, { buildId, encryptionKey, config, compi
1919
1919
  // - Next.js location on disk (some loaders use absolute paths and some resolve options depend on absolute paths)
1920
1920
  // - Next.js version
1921
1921
  // - next.config.js keys that affect compilation
1922
- version: `${__dirname}|${"16.1.1-canary.25"}|${configVars}`,
1922
+ version: `${__dirname}|${"16.1.1-canary.27"}|${configVars}`,
1923
1923
  cacheDirectory: _path.default.join(distDir, 'cache', 'webpack'),
1924
1924
  // For production builds, it's more efficient to compress all cache files together instead of compression each one individually.
1925
1925
  // So we disable compression here and allow the build runner to take care of compressing the cache as a whole.
@@ -1975,7 +1975,7 @@ async function getBaseWebpackConfig(dir, { buildId, encryptionKey, config, compi
1975
1975
  type: 'filesystem',
1976
1976
  directory: cache.cacheDirectory
1977
1977
  },
1978
- version: `${__dirname}|${"16.1.1-canary.25"}|${configVars}`
1978
+ version: `${__dirname}|${"16.1.1-canary.27"}|${configVars}`
1979
1979
  };
1980
1980
  }
1981
1981
  if (process.env.NEXT_WEBPACK_LOGGING) {