next 16.1.1-canary.23 → 16.1.1-canary.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.build-commit +1 -1
- package/dist/bin/next +2 -2
- package/dist/build/index.js +3 -3
- package/dist/build/swc/index.js +1 -1
- package/dist/build/templates/app-page.js +8 -16
- package/dist/build/templates/app-page.js.map +1 -1
- package/dist/build/templates/app-route.js +1 -1
- package/dist/build/templates/app-route.js.map +1 -1
- package/dist/build/webpack-config.js +3 -3
- package/dist/bundle-analyzer/404.html +2 -2
- package/dist/bundle-analyzer/__next.__PAGE__.txt +1 -1
- package/dist/bundle-analyzer/__next._full.txt +1 -1
- package/dist/bundle-analyzer/__next._head.txt +1 -1
- package/dist/bundle-analyzer/__next._index.txt +1 -1
- package/dist/bundle-analyzer/__next._tree.txt +1 -1
- package/dist/bundle-analyzer/_not-found/__next._full.txt +1 -1
- package/dist/bundle-analyzer/_not-found/__next._head.txt +1 -1
- package/dist/bundle-analyzer/_not-found/__next._index.txt +1 -1
- package/dist/bundle-analyzer/_not-found/__next._not-found.__PAGE__.txt +1 -1
- package/dist/bundle-analyzer/_not-found/__next._not-found.txt +1 -1
- package/dist/bundle-analyzer/_not-found/__next._tree.txt +1 -1
- package/dist/bundle-analyzer/_not-found.html +2 -2
- package/dist/bundle-analyzer/_not-found.txt +1 -1
- package/dist/bundle-analyzer/index.html +2 -2
- package/dist/bundle-analyzer/index.txt +1 -1
- package/dist/client/app-bootstrap.js +1 -1
- package/dist/client/index.js +1 -1
- package/dist/compiled/next-server/pages-api-turbo.runtime.dev.js.map +1 -1
- package/dist/compiled/next-server/pages-api-turbo.runtime.prod.js.map +1 -1
- package/dist/compiled/next-server/pages-api.runtime.dev.js.map +1 -1
- package/dist/compiled/next-server/pages-api.runtime.prod.js.map +1 -1
- package/dist/compiled/next-server/pages-turbo.runtime.dev.js +2 -2
- package/dist/compiled/next-server/pages-turbo.runtime.dev.js.map +1 -1
- package/dist/compiled/next-server/pages-turbo.runtime.prod.js +8 -8
- package/dist/compiled/next-server/pages-turbo.runtime.prod.js.map +1 -1
- package/dist/compiled/next-server/pages.runtime.dev.js +2 -2
- package/dist/compiled/next-server/pages.runtime.dev.js.map +1 -1
- package/dist/compiled/next-server/pages.runtime.prod.js +8 -8
- package/dist/compiled/next-server/pages.runtime.prod.js.map +1 -1
- package/dist/compiled/next-server/server.runtime.prod.js +4 -4
- package/dist/compiled/next-server/server.runtime.prod.js.map +1 -1
- package/dist/esm/build/index.js +3 -3
- package/dist/esm/build/swc/index.js +1 -1
- package/dist/esm/build/templates/app-page.js +8 -16
- package/dist/esm/build/templates/app-page.js.map +1 -1
- package/dist/esm/build/templates/app-route.js +2 -2
- package/dist/esm/build/templates/app-route.js.map +1 -1
- package/dist/esm/build/webpack-config.js +3 -3
- package/dist/esm/client/app-bootstrap.js +1 -1
- package/dist/esm/client/index.js +1 -1
- package/dist/esm/server/base-server.js +1 -3
- package/dist/esm/server/base-server.js.map +1 -1
- package/dist/esm/server/config-schema.js +0 -1
- package/dist/esm/server/config-schema.js.map +1 -1
- package/dist/esm/server/config-shared.js +0 -2
- package/dist/esm/server/config-shared.js.map +1 -1
- package/dist/esm/server/dev/hot-reloader-turbopack.js +1 -1
- package/dist/esm/server/dev/hot-reloader-webpack.js +1 -1
- package/dist/esm/server/lib/app-info-log.js +1 -1
- package/dist/esm/server/lib/cache-control.js +4 -45
- package/dist/esm/server/lib/cache-control.js.map +1 -1
- package/dist/esm/server/lib/start-server.js +1 -1
- package/dist/esm/server/next-server.js +1 -2
- package/dist/esm/server/next-server.js.map +1 -1
- package/dist/esm/server/render.js +3 -3
- package/dist/esm/server/render.js.map +1 -1
- package/dist/esm/server/route-modules/pages/pages-handler.js +3 -4
- package/dist/esm/server/route-modules/pages/pages-handler.js.map +1 -1
- package/dist/esm/server/send-payload.js +3 -3
- package/dist/esm/server/send-payload.js.map +1 -1
- package/dist/esm/shared/lib/errors/canary-only-config-error.js +1 -1
- package/dist/server/base-server.d.ts +0 -1
- package/dist/server/base-server.js +1 -3
- package/dist/server/base-server.js.map +1 -1
- package/dist/server/config-schema.d.ts +0 -1
- package/dist/server/config-schema.js +0 -1
- package/dist/server/config-schema.js.map +1 -1
- package/dist/server/config-shared.d.ts +1 -8
- package/dist/server/config-shared.js +0 -2
- package/dist/server/config-shared.js.map +1 -1
- package/dist/server/dev/hot-reloader-turbopack.js +1 -1
- package/dist/server/dev/hot-reloader-webpack.js +1 -1
- package/dist/server/lib/app-info-log.js +1 -1
- package/dist/server/lib/cache-control.d.ts +1 -28
- package/dist/server/lib/cache-control.js +7 -52
- package/dist/server/lib/cache-control.js.map +1 -1
- package/dist/server/lib/start-server.js +1 -1
- package/dist/server/next-server.d.ts +0 -1
- package/dist/server/next-server.js +1 -2
- package/dist/server/next-server.js.map +1 -1
- package/dist/server/render.d.ts +0 -1
- package/dist/server/render.js +2 -2
- package/dist/server/render.js.map +1 -1
- package/dist/server/route-modules/pages/pages-handler.js +2 -3
- package/dist/server/route-modules/pages/pages-handler.js.map +1 -1
- package/dist/server/send-payload.d.ts +1 -2
- package/dist/server/send-payload.js +2 -2
- package/dist/server/send-payload.js.map +1 -1
- package/dist/shared/lib/errors/canary-only-config-error.js +1 -1
- package/dist/telemetry/anonymous-meta.js +1 -1
- package/dist/telemetry/events/session-stopped.js +2 -2
- package/dist/telemetry/events/version.js +2 -2
- package/package.json +15 -15
- /package/dist/bundle-analyzer/_next/static/{nbQP50dTiki8WHJ2QEq8j → TRyTnzVJfQWPDn0Frxod5}/_buildManifest.js +0 -0
- /package/dist/bundle-analyzer/_next/static/{nbQP50dTiki8WHJ2QEq8j → TRyTnzVJfQWPDn0Frxod5}/_clientMiddlewareManifest.json +0 -0
- /package/dist/bundle-analyzer/_next/static/{nbQP50dTiki8WHJ2QEq8j → TRyTnzVJfQWPDn0Frxod5}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/build/templates/app-route.ts"],"sourcesContent":["import {\n AppRouteRouteModule,\n type AppRouteRouteHandlerContext,\n type AppRouteRouteModuleOptions,\n} from '../../server/route-modules/app-route/module.compiled'\nimport { RouteKind } from '../../server/route-kind'\nimport { patchFetch as _patchFetch } from '../../server/lib/patch-fetch'\nimport type { IncomingMessage, ServerResponse } from 'node:http'\nimport {\n addRequestMeta,\n getRequestMeta,\n setRequestMeta,\n type RequestMeta,\n} from '../../server/request-meta'\nimport { getTracer, type Span, SpanKind } from '../../server/lib/trace/tracer'\nimport { setManifestsSingleton } from '../../server/app-render/manifests-singleton'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport { NodeNextRequest, NodeNextResponse } from '../../server/base-http/node'\nimport {\n NextRequestAdapter,\n signalFromNodeResponse,\n} from '../../server/web/spec-extension/adapters/next-request'\nimport { BaseServerSpan } from '../../server/lib/trace/constants'\nimport { getRevalidateReason } from '../../server/instrumentation/utils'\nimport { sendResponse } from '../../server/send-response'\nimport {\n fromNodeOutgoingHttpHeaders,\n toNodeOutgoingHttpHeaders,\n} from '../../server/web/utils'\nimport { setCacheControlHeaders } from '../../server/lib/cache-control'\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from '../../lib/constants'\nimport { NoFallbackError } from '../../shared/lib/no-fallback-error.external'\nimport {\n CachedRouteKind,\n type ResponseCacheEntry,\n type ResponseGenerator,\n} from '../../server/response-cache'\n\nimport * as userland from 'VAR_USERLAND'\n\n// These are injected by the loader afterwards. This is injected as a variable\n// instead of a replacement because this could also be `undefined` instead of\n// an empty string.\ndeclare const nextConfigOutput: AppRouteRouteModuleOptions['nextConfigOutput']\n\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\n// INJECT:nextConfigOutput\n\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: 'VAR_DEFINITION_PAGE',\n pathname: 'VAR_DEFINITION_PATHNAME',\n filename: 'VAR_DEFINITION_FILENAME',\n bundlePath: 'VAR_DEFINITION_BUNDLE_PATH',\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: 'VAR_RESOLVED_PAGE_PATH',\n nextConfigOutput,\n userland,\n})\n\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule\n\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage,\n })\n}\n\nexport {\n routeModule,\n workAsyncStorage,\n workUnitAsyncStorage,\n serverHooks,\n patchFetch,\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 if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint())\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 params,\n nextConfig,\n parsedUrl,\n isDraftMode,\n prerenderManifest,\n routerServerContext,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n resolvedPathname,\n clientReferenceManifest,\n serverActionsManifest,\n } = prepareResult\n\n const normalizedSrcPage = normalizeAppPath(srcPage)\n\n let isIsr = Boolean(\n prerenderManifest.dynamicRoutes[normalizedSrcPage] ||\n prerenderManifest.routes[resolvedPathname]\n )\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 if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname])\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage]\n\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.experimental.adapterPath) {\n return await render404()\n }\n throw new NoFallbackError()\n }\n }\n }\n\n let cacheKey: string | null = null\n\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey\n }\n\n const supportsDynamicResponse: boolean =\n // If we're in development, we always support dynamic HTML\n routeModule.isDev === true ||\n // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr\n\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse\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 context: AppRouteRouteHandlerContext = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts),\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb) => {\n res.on('close', cb)\n },\n onAfterTaskError: undefined,\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 },\n sharedContext: {\n buildId,\n },\n }\n const nodeNextReq = new NodeNextRequest(req)\n const nodeNextRes = new NodeNextResponse(res)\n\n const nextReq = NextRequestAdapter.fromNodeNextRequest(\n nodeNextReq,\n signalFromNodeResponse(res)\n )\n\n try {\n const invokeRouteModule = async (span?: Span) => {\n return routeModule.handle(nextReq, 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 const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'))\n\n const handleResponse = async (currentSpan?: Span) => {\n const responseGenerator: ResponseGenerator = async ({\n previousCacheEntry,\n }) => {\n try {\n if (\n !isMinimalMode &&\n isOnDemandRevalidate &&\n revalidateOnlyGenerated &&\n !previousCacheEntry\n ) {\n res.statusCode = 404\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED')\n res.end('This page could not be found')\n return null\n }\n\n const response = await invokeRouteModule(currentSpan)\n\n ;(req as any).fetchMetrics = (context.renderOpts as any).fetchMetrics\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil\n\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil)\n pendingWaitUntil = undefined\n }\n }\n const cacheTags = context.renderOpts.collectedTags\n\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob()\n\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers)\n\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags\n }\n\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type\n }\n\n const revalidate =\n typeof context.renderOpts.collectedRevalidate === 'undefined' ||\n context.renderOpts.collectedRevalidate >= INFINITE_CACHE\n ? false\n : context.renderOpts.collectedRevalidate\n\n const expire =\n typeof context.renderOpts.collectedExpire === 'undefined' ||\n context.renderOpts.collectedExpire >= INFINITE_CACHE\n ? undefined\n : context.renderOpts.collectedExpire\n\n // Create the cache entry for the response.\n const cacheEntry: ResponseCacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers,\n },\n cacheControl: { revalidate, expire },\n }\n\n return cacheEntry\n } else {\n // send response without caching if not ISR\n await sendResponse(\n nodeNextReq,\n nodeNextRes,\n response,\n context.renderOpts.pendingWaitUntil\n )\n return null\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry?.isStale) {\n const silenceLog = false\n await routeModule.onRequestError(\n req,\n err,\n {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate,\n }),\n },\n silenceLog,\n routerServerContext\n )\n }\n throw err\n }\n }\n\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode,\n })\n\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null\n }\n\n if (cacheEntry?.value?.kind !== CachedRouteKind.APP_ROUTE) {\n throw new Error(\n `Invariant: app-route received invalid cache entry ${cacheEntry?.value?.kind}`\n )\n }\n\n if (!isMinimalMode) {\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\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader(\n 'Cache-Control',\n 'private, no-cache, no-store, max-age=0, must-revalidate'\n )\n }\n\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers)\n\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER)\n }\n\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (\n cacheEntry.cacheControl &&\n !res.getHeader('Cache-Control') &&\n !headers.get('Cache-Control')\n ) {\n setCacheControlHeaders(\n headers,\n cacheEntry.cacheControl,\n nextConfig.experimental.cdnCacheControlHeader\n )\n }\n\n await sendResponse(\n nodeNextReq,\n nodeNextRes,\n // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200,\n })\n )\n return null\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 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: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate,\n }),\n },\n silenceLog,\n routerServerContext\n )\n }\n\n // rethrow so that we can handle serving error page\n\n // If this is during static generation, throw the error again.\n if (isIsr) throw err\n\n // Otherwise, send a 500 response.\n await sendResponse(\n nodeNextReq,\n nodeNextRes,\n new Response(null, { status: 500 })\n )\n return null\n }\n}\n"],"names":["AppRouteRouteModule","RouteKind","patchFetch","_patchFetch","addRequestMeta","getRequestMeta","setRequestMeta","getTracer","SpanKind","setManifestsSingleton","normalizeAppPath","NodeNextRequest","NodeNextResponse","NextRequestAdapter","signalFromNodeResponse","BaseServerSpan","getRevalidateReason","sendResponse","fromNodeOutgoingHttpHeaders","toNodeOutgoingHttpHeaders","setCacheControlHeaders","INFINITE_CACHE","NEXT_CACHE_TAGS_HEADER","NoFallbackError","CachedRouteKind","userland","routeModule","definition","kind","APP_ROUTE","page","pathname","filename","bundlePath","distDir","process","env","__NEXT_RELATIVE_DIST_DIR","relativeProjectDir","__NEXT_RELATIVE_PROJECT_DIR","resolvedPagePath","nextConfigOutput","workAsyncStorage","workUnitAsyncStorage","serverHooks","handler","req","res","ctx","requestMeta","isDev","hrtime","bigint","srcPage","TURBOPACK","replace","multiZoneDraftMode","__NEXT_MULTI_ZONE_DRAFT_MODE","prepareResult","prepare","statusCode","end","waitUntil","Promise","resolve","buildId","params","nextConfig","parsedUrl","isDraftMode","prerenderManifest","routerServerContext","isOnDemandRevalidate","revalidateOnlyGenerated","resolvedPathname","clientReferenceManifest","serverActionsManifest","normalizedSrcPage","isIsr","Boolean","dynamicRoutes","routes","render404","isPrerendered","prerenderInfo","fallback","experimental","adapterPath","cacheKey","supportsDynamicResponse","isStaticGeneration","method","tracer","activeSpan","getActiveScopeSpan","context","renderOpts","authInterrupts","cacheComponents","incrementalCache","cacheLifeProfiles","cacheLife","onClose","cb","on","onAfterTaskError","undefined","onInstrumentationRequestError","error","_request","errorContext","silenceLog","onRequestError","sharedContext","nodeNextReq","nodeNextRes","nextReq","fromNodeNextRequest","invokeRouteModule","span","handle","finally","setAttributes","rootSpanAttributes","getRootSpanAttributes","get","handleRequest","console","warn","route","name","updateName","isMinimalMode","handleResponse","currentSpan","cacheEntry","responseGenerator","previousCacheEntry","setHeader","response","fetchMetrics","pendingWaitUntil","cacheTags","collectedTags","blob","headers","type","revalidate","collectedRevalidate","expire","collectedExpire","value","status","body","Buffer","from","arrayBuffer","cacheControl","err","isStale","routerKind","routePath","routeType","revalidateReason","routeKind","isFallback","isRoutePPREnabled","Error","isMiss","delete","getHeader","cdnCacheControlHeader","Response","withPropagatedContext","trace","spanName","SERVER","attributes","url"],"mappings":"AAAA,SACEA,mBAAmB,QAGd,uDAAsD;AAC7D,SAASC,SAAS,QAAQ,0BAAyB;AACnD,SAASC,cAAcC,WAAW,QAAQ,+BAA8B;AAExE,SACEC,cAAc,EACdC,cAAc,EACdC,cAAc,QAET,4BAA2B;AAClC,SAASC,SAAS,EAAaC,QAAQ,QAAQ,gCAA+B;AAC9E,SAASC,qBAAqB,QAAQ,8CAA6C;AACnF,SAASC,gBAAgB,QAAQ,0CAAyC;AAC1E,SAASC,eAAe,EAAEC,gBAAgB,QAAQ,8BAA6B;AAC/E,SACEC,kBAAkB,EAClBC,sBAAsB,QACjB,wDAAuD;AAC9D,SAASC,cAAc,QAAQ,mCAAkC;AACjE,SAASC,mBAAmB,QAAQ,qCAAoC;AACxE,SAASC,YAAY,QAAQ,6BAA4B;AACzD,SACEC,2BAA2B,EAC3BC,yBAAyB,QACpB,yBAAwB;AAC/B,SAASC,sBAAsB,QAAQ,iCAAgC;AACvE,SAASC,cAAc,EAAEC,sBAAsB,QAAQ,s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E6H,SACAV,WAAWsB,YAAY,EACvB1F,WAAWmB,YAAY,CAACqF,qBAAqB;YAEjD;YAEA,MAAM1J,aACJiG,aACAC,aACA,sIAAsI;YACtI,IAAIyD,SAASrC,WAAWgB,KAAK,CAACE,IAAI,EAAE;gBAClCR;gBACAO,QAAQjB,WAAWgB,KAAK,CAACC,MAAM,IAAI;YACrC;YAEF,OAAO;QACT;QAEA,oDAAoD;QACpD,yDAAyD;QACzD,IAAI3D,YAAY;YACd,MAAMwC,eAAexC;QACvB,OAAO;YACL,MAAMD,OAAOiF,qBAAqB,CAAC/H,IAAImG,OAAO,EAAE,IAC9CrD,OAAOkF,KAAK,CACV/J,eAAe+G,aAAa,EAC5B;oBACEiD,UAAU,GAAGpF,OAAO,CAAC,EAAEtC,SAAS;oBAChCzB,MAAMpB,SAASwK,MAAM;oBACrBC,YAAY;wBACV,eAAetF;wBACf,eAAe7C,IAAIoI,GAAG;oBACxB;gBACF,GACA7C;QAGN;IACF,EAAE,OAAOyB,KAAK;QACZ,IAAI,CAAEA,CAAAA,eAAevI,eAAc,GAAI;YACrC,MAAMwF,aAAa;YACnB,MAAMrF,YAAYsF,cAAc,CAC9BlE,KACAgH,KACA;gBACEE,YAAY;gBACZC,WAAWpF;gBACXqF,WAAW;gBACXC,kBAAkBnJ,oBAAoB;oBACpC0E;oBACAlB;gBACF;YACF,GACAuC,YACAxC;QAEJ;QAEA,mDAAmD;QAEnD,8DAA8D;QAC9D,IAAIO,OAAO,MAAMgF;QAEjB,kCAAkC;QAClC,MAAM7I,aACJiG,aACAC,aACA,IAAIyD,SAAS,MAAM;YAAEpB,QAAQ;QAAI;QAEnC,OAAO;IACT;AACF","ignoreList":[0]}
|
|
1
|
+
{"version":3,"sources":["../../../../src/build/templates/app-route.ts"],"sourcesContent":["import {\n AppRouteRouteModule,\n type AppRouteRouteHandlerContext,\n type AppRouteRouteModuleOptions,\n} from '../../server/route-modules/app-route/module.compiled'\nimport { RouteKind } from '../../server/route-kind'\nimport { patchFetch as _patchFetch } from '../../server/lib/patch-fetch'\nimport type { IncomingMessage, ServerResponse } from 'node:http'\nimport {\n addRequestMeta,\n getRequestMeta,\n setRequestMeta,\n type RequestMeta,\n} from '../../server/request-meta'\nimport { getTracer, type Span, SpanKind } from '../../server/lib/trace/tracer'\nimport { setManifestsSingleton } from '../../server/app-render/manifests-singleton'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport { NodeNextRequest, NodeNextResponse } from '../../server/base-http/node'\nimport {\n NextRequestAdapter,\n signalFromNodeResponse,\n} from '../../server/web/spec-extension/adapters/next-request'\nimport { BaseServerSpan } from '../../server/lib/trace/constants'\nimport { getRevalidateReason } from '../../server/instrumentation/utils'\nimport { sendResponse } from '../../server/send-response'\nimport {\n fromNodeOutgoingHttpHeaders,\n toNodeOutgoingHttpHeaders,\n} from '../../server/web/utils'\nimport { getCacheControlHeader } from '../../server/lib/cache-control'\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from '../../lib/constants'\nimport { NoFallbackError } from '../../shared/lib/no-fallback-error.external'\nimport {\n CachedRouteKind,\n type ResponseCacheEntry,\n type ResponseGenerator,\n} from '../../server/response-cache'\n\nimport * as userland from 'VAR_USERLAND'\n\n// These are injected by the loader afterwards. This is injected as a variable\n// instead of a replacement because this could also be `undefined` instead of\n// an empty string.\ndeclare const nextConfigOutput: AppRouteRouteModuleOptions['nextConfigOutput']\n\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\n// INJECT:nextConfigOutput\n\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: 'VAR_DEFINITION_PAGE',\n pathname: 'VAR_DEFINITION_PATHNAME',\n filename: 'VAR_DEFINITION_FILENAME',\n bundlePath: 'VAR_DEFINITION_BUNDLE_PATH',\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: 'VAR_RESOLVED_PAGE_PATH',\n nextConfigOutput,\n userland,\n})\n\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule\n\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage,\n })\n}\n\nexport {\n routeModule,\n workAsyncStorage,\n workUnitAsyncStorage,\n serverHooks,\n patchFetch,\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 if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint())\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 params,\n nextConfig,\n parsedUrl,\n isDraftMode,\n prerenderManifest,\n routerServerContext,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n resolvedPathname,\n clientReferenceManifest,\n serverActionsManifest,\n } = prepareResult\n\n const normalizedSrcPage = normalizeAppPath(srcPage)\n\n let isIsr = Boolean(\n prerenderManifest.dynamicRoutes[normalizedSrcPage] ||\n prerenderManifest.routes[resolvedPathname]\n )\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 if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname])\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage]\n\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.experimental.adapterPath) {\n return await render404()\n }\n throw new NoFallbackError()\n }\n }\n }\n\n let cacheKey: string | null = null\n\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey\n }\n\n const supportsDynamicResponse: boolean =\n // If we're in development, we always support dynamic HTML\n routeModule.isDev === true ||\n // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr\n\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse\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 context: AppRouteRouteHandlerContext = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts),\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb) => {\n res.on('close', cb)\n },\n onAfterTaskError: undefined,\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 },\n sharedContext: {\n buildId,\n },\n }\n const nodeNextReq = new NodeNextRequest(req)\n const nodeNextRes = new NodeNextResponse(res)\n\n const nextReq = NextRequestAdapter.fromNodeNextRequest(\n nodeNextReq,\n signalFromNodeResponse(res)\n )\n\n try {\n const invokeRouteModule = async (span?: Span) => {\n return routeModule.handle(nextReq, 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 const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'))\n\n const handleResponse = async (currentSpan?: Span) => {\n const responseGenerator: ResponseGenerator = async ({\n previousCacheEntry,\n }) => {\n try {\n if (\n !isMinimalMode &&\n isOnDemandRevalidate &&\n revalidateOnlyGenerated &&\n !previousCacheEntry\n ) {\n res.statusCode = 404\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED')\n res.end('This page could not be found')\n return null\n }\n\n const response = await invokeRouteModule(currentSpan)\n\n ;(req as any).fetchMetrics = (context.renderOpts as any).fetchMetrics\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil\n\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil)\n pendingWaitUntil = undefined\n }\n }\n const cacheTags = context.renderOpts.collectedTags\n\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob()\n\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers)\n\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags\n }\n\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type\n }\n\n const revalidate =\n typeof context.renderOpts.collectedRevalidate === 'undefined' ||\n context.renderOpts.collectedRevalidate >= INFINITE_CACHE\n ? false\n : context.renderOpts.collectedRevalidate\n\n const expire =\n typeof context.renderOpts.collectedExpire === 'undefined' ||\n context.renderOpts.collectedExpire >= INFINITE_CACHE\n ? undefined\n : context.renderOpts.collectedExpire\n\n // Create the cache entry for the response.\n const cacheEntry: ResponseCacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers,\n },\n cacheControl: { revalidate, expire },\n }\n\n return cacheEntry\n } else {\n // send response without caching if not ISR\n await sendResponse(\n nodeNextReq,\n nodeNextRes,\n response,\n context.renderOpts.pendingWaitUntil\n )\n return null\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry?.isStale) {\n const silenceLog = false\n await routeModule.onRequestError(\n req,\n err,\n {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate,\n }),\n },\n silenceLog,\n routerServerContext\n )\n }\n throw err\n }\n }\n\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode,\n })\n\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null\n }\n\n if (cacheEntry?.value?.kind !== CachedRouteKind.APP_ROUTE) {\n throw new Error(\n `Invariant: app-route received invalid cache entry ${cacheEntry?.value?.kind}`\n )\n }\n\n if (!isMinimalMode) {\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\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader(\n 'Cache-Control',\n 'private, no-cache, no-store, max-age=0, must-revalidate'\n )\n }\n\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers)\n\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER)\n }\n\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (\n cacheEntry.cacheControl &&\n !res.getHeader('Cache-Control') &&\n !headers.get('Cache-Control')\n ) {\n headers.set(\n 'Cache-Control',\n getCacheControlHeader(cacheEntry.cacheControl)\n )\n }\n\n await sendResponse(\n nodeNextReq,\n nodeNextRes,\n // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200,\n })\n )\n return null\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 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: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate,\n }),\n },\n silenceLog,\n routerServerContext\n )\n }\n\n // rethrow so that we can handle serving error page\n\n // If this is during static generation, throw the error again.\n if (isIsr) throw err\n\n // Otherwise, send a 500 response.\n await sendResponse(\n nodeNextReq,\n nodeNextRes,\n new Response(null, { status: 500 })\n )\n return null\n }\n}\n"],"names":["AppRouteRouteModule","RouteKind","patchFetch","_patchFetch","addRequestMeta","getRequestMeta","setRequestMeta","getTracer","SpanKind","setManifestsSingleton","normalizeAppPath","NodeNextRequest","NodeNextResponse","NextRequestAdapter","signalFromNodeResponse","BaseServerSpan","getRevalidateReason","sendResponse","fromNodeOutgoingHttpHeaders","toNodeOutgoingHttpHeaders","getCacheControlHeader","INFINITE_CACHE","NEXT_CACHE_TAGS_HEADER","NoFallbackError","CachedRouteKind","userland","routeModule","definition","kind","APP_ROUTE","page","pathname","filename","bundlePath","distDir","process","env","__NEXT_RELATIVE_DIST_DIR","relativeProjectDir","__NEXT_RELATIVE_PROJECT_DIR","resolvedPagePath","nextConfigOutput","workAsyncStorage","workUnitAsyncStorage","serverHooks","handler","req","res","ctx","requestMeta","isDev","hrtime","bigint","srcPage","TURBOPACK","replace","multiZoneDraftMode","__NEXT_MULTI_ZONE_DRAFT_MODE","prepareResult","prepare","statusCode","end","waitUntil","Promise","resolve","buildId","params","nextConfig","parsedUrl","isDraftMode","prerenderManifest","routerServerContext","isOnDemandRevalidate","revalidateOnlyGenerated","resolvedPathname","clientReferenceManifest","serverActionsManifest","normalizedSrcPage","isIsr","Boolean","dynamicRoutes","routes","render404","isPrerendered","prerenderInfo","fallback","experimental","adapterPath","cacheKey","supportsDynamicResponse","isStaticGeneration","method","tracer","activeSpan","getActiveScopeSpan","context","renderOpts","authInterrupts","cacheComponents","incrementalCache","cacheLifeProfiles","cacheLife","onClose","cb","on","onAfterTaskError","undefined","onInstrumentationRequestError","error","_request","errorContext","silenceLog","onRequestError","sharedContext","nodeNextReq","nodeNextRes","nextReq","fromNodeNextRequest","invokeRouteModule","span","handle","finally","setAttributes","rootSpanAttributes","getRootSpanAttributes","get","handleRequest","console","warn","route","name","updateName","isMinimalMode","handleResponse","currentSpan","cacheEntry","responseGenerator","previousCacheEntry","setHeader","response","fetchMetrics","pendingWaitUntil","cacheTags","collectedTags","blob","headers","type","revalidate","collectedRevalidate","expire","collectedExpire","value","status","body","Buffer","from","arrayBuffer","cacheControl","err","isStale","routerKind","routePath","routeType","revalidateReason","routeKind","isFallback","isRoutePPREnabled","Error","isMiss","delete","getHeader","set","Response","withPropagatedContext","trace","spanName","SERVER","attributes","url"],"mappings":"AAAA,SACEA,mBAAmB,QAGd,uDAAsD;AAC7D,SAASC,SAAS,QAAQ,0BAAyB;AACnD,SAASC,cAAcC,WAAW,QAAQ,+BAA8B;AAExE,SACEC,cAAc,EACdC,cAAc,EACdC,cAAc,QAET,4BAA2B;AAClC,SAASC,SAAS,EAAaC,QAAQ,QAAQ,gCAA+B;AAC9E,SAASC,qBAAqB,QAAQ,8CAA6C;AACnF,SAASC,gBAAgB,QAAQ,0CAAyC;AAC1E,SAASC,eAAe,EAAEC,gBAAgB,QAAQ,8BAA6B;AAC/E,SACEC,kBAAkB,EAClBC,sBAAsB,QACjB,wDAAuD;AAC9D,SAASC,cAAc,QAAQ,mCAAkC;AACjE,SAASC,mBAAmB,QAAQ,qCAAoC;AACxE,SAASC,YAAY,QAAQ,6BAA4B;AACzD,SACEC,2BAA2B,EAC3BC,yBAAyB,QACpB,yBAAwB;AAC/B,SAASC,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,cAAc,EAAEC,sBAAsB,QAAQ,sBAAqB;AAC5E,SAASC,eAAe,QAAQ,8CAA6C;AAC7E,SACEC,eAAe,QAGV,8BAA6B;AAEpC,YAAYC,cAAc,eAAc;AAOxC,2EAA2E;AAC3E,UAAU;AACV,0BAA0B;AAE1B,MAAMC,cAAc,IAAI1B,oB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B,WAAWgB,KAAK,CAACC,MAAM,IAAI;YACrC;YAEF,OAAO;QACT;QAEA,oDAAoD;QACpD,yDAAyD;QACzD,IAAI3D,YAAY;YACd,MAAMwC,eAAexC;QACvB,OAAO;YACL,MAAMD,OAAOiF,qBAAqB,CAAC/H,IAAImG,OAAO,EAAE,IAC9CrD,OAAOkF,KAAK,CACV/J,eAAe+G,aAAa,EAC5B;oBACEiD,UAAU,GAAGpF,OAAO,CAAC,EAAEtC,SAAS;oBAChCzB,MAAMpB,SAASwK,MAAM;oBACrBC,YAAY;wBACV,eAAetF;wBACf,eAAe7C,IAAIoI,GAAG;oBACxB;gBACF,GACA7C;QAGN;IACF,EAAE,OAAOyB,KAAK;QACZ,IAAI,CAAEA,CAAAA,eAAevI,eAAc,GAAI;YACrC,MAAMwF,aAAa;YACnB,MAAMrF,YAAYsF,cAAc,CAC9BlE,KACAgH,KACA;gBACEE,YAAY;gBACZC,WAAWpF;gBACXqF,WAAW;gBACXC,kBAAkBnJ,oBAAoB;oBACpC0E;oBACAlB;gBACF;YACF,GACAuC,YACAxC;QAEJ;QAEA,mDAAmD;QAEnD,8DAA8D;QAC9D,IAAIO,OAAO,MAAMgF;QAEjB,kCAAkC;QAClC,MAAM7I,aACJiG,aACAC,aACA,IAAIyD,SAAS,MAAM;YAAEpB,QAAQ;QAAI;QAEnC,OAAO;IACT;AACF","ignoreList":[0]}
|
|
@@ -1622,7 +1622,7 @@ export default async function getBaseWebpackConfig(dir, { buildId, encryptionKey
|
|
|
1622
1622
|
isClient && new CopyFilePlugin({
|
|
1623
1623
|
// file path to build output of `@next/polyfill-nomodule`
|
|
1624
1624
|
filePath: require.resolve('./polyfills/polyfill-nomodule'),
|
|
1625
|
-
cacheKey: "16.1.1-canary.
|
|
1625
|
+
cacheKey: "16.1.1-canary.25",
|
|
1626
1626
|
name: `static/chunks/polyfills${dev ? '' : '-[hash]'}.js`,
|
|
1627
1627
|
minimize: false,
|
|
1628
1628
|
info: {
|
|
@@ -1816,7 +1816,7 @@ export default async function getBaseWebpackConfig(dir, { buildId, encryptionKey
|
|
|
1816
1816
|
// - Next.js location on disk (some loaders use absolute paths and some resolve options depend on absolute paths)
|
|
1817
1817
|
// - Next.js version
|
|
1818
1818
|
// - next.config.js keys that affect compilation
|
|
1819
|
-
version: `${__dirname}|${"16.1.1-canary.
|
|
1819
|
+
version: `${__dirname}|${"16.1.1-canary.25"}|${configVars}`,
|
|
1820
1820
|
cacheDirectory: path.join(distDir, 'cache', 'webpack'),
|
|
1821
1821
|
// For production builds, it's more efficient to compress all cache files together instead of compression each one individually.
|
|
1822
1822
|
// So we disable compression here and allow the build runner to take care of compressing the cache as a whole.
|
|
@@ -1872,7 +1872,7 @@ export default async function getBaseWebpackConfig(dir, { buildId, encryptionKey
|
|
|
1872
1872
|
type: 'filesystem',
|
|
1873
1873
|
directory: cache.cacheDirectory
|
|
1874
1874
|
},
|
|
1875
|
-
version: `${__dirname}|${"16.1.1-canary.
|
|
1875
|
+
version: `${__dirname}|${"16.1.1-canary.25"}|${configVars}`
|
|
1876
1876
|
};
|
|
1877
1877
|
}
|
|
1878
1878
|
if (process.env.NEXT_WEBPACK_LOGGING) {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* - next/script with `beforeInteractive` strategy
|
|
6
6
|
*/ import { getAssetPrefix } from './asset-prefix';
|
|
7
7
|
import { setAttributesFromProps } from './set-attributes-from-props';
|
|
8
|
-
const version = "16.1.1-canary.
|
|
8
|
+
const version = "16.1.1-canary.25";
|
|
9
9
|
window.next = {
|
|
10
10
|
version,
|
|
11
11
|
appDir: true
|
package/dist/esm/client/index.js
CHANGED
|
@@ -25,7 +25,7 @@ import { SearchParamsContext, PathParamsContext } from '../shared/lib/hooks-clie
|
|
|
25
25
|
import { onRecoverableError } from './react-client-callbacks/on-recoverable-error';
|
|
26
26
|
import tracer from './tracing/tracer';
|
|
27
27
|
import { isNextRouterError } from './components/is-next-router-error';
|
|
28
|
-
export const version = "16.1.1-canary.
|
|
28
|
+
export const version = "16.1.1-canary.25";
|
|
29
29
|
export let router;
|
|
30
30
|
export const emitter = mitt();
|
|
31
31
|
const looseToArray = (input)=>[].slice.call(input);
|
|
@@ -324,7 +324,6 @@ export default class Server {
|
|
|
324
324
|
dynamicOnHover: this.nextConfig.experimental.dynamicOnHover ?? false,
|
|
325
325
|
inlineCss: this.nextConfig.experimental.inlineCss ?? false,
|
|
326
326
|
authInterrupts: !!this.nextConfig.experimental.authInterrupts,
|
|
327
|
-
cdnCacheControlHeader: this.nextConfig.experimental.cdnCacheControlHeader,
|
|
328
327
|
maxPostponedStateSizeBytes: parseMaxPostponedStateSize(this.nextConfig.experimental.maxPostponedStateSize)
|
|
329
328
|
},
|
|
330
329
|
onInstrumentationRequestError: this.instrumentationOnRequestError.bind(this),
|
|
@@ -993,8 +992,7 @@ export default class Server {
|
|
|
993
992
|
result: body,
|
|
994
993
|
generateEtags,
|
|
995
994
|
poweredByHeader,
|
|
996
|
-
cacheControl
|
|
997
|
-
cdnCacheControlHeader: this.nextConfig.experimental.cdnCacheControlHeader
|
|
995
|
+
cacheControl
|
|
998
996
|
});
|
|
999
997
|
res.statusCode = originalStatus;
|
|
1000
998
|
}
|