| Linux premium331.web-hosting.com 4.18.0-553.80.1.lve.el8.x86_64 #1 SMP Wed Oct 22 19:29:36 UTC 2025 x86_64 Path : /proc/self/root/home/livedhms/lmgt/node_modules/next/dist/build/adapter/ |
| Current File : //proc/self/root/home/livedhms/lmgt/node_modules/next/dist/build/adapter/build-complete.js.map |
{"version":3,"sources":["../../../src/build/adapter/build-complete.ts"],"sourcesContent":["import path from 'path'\nimport fs from 'fs/promises'\nimport { pathToFileURL } from 'url'\nimport * as Log from '../output/log'\nimport { isMiddlewareFilename } from '../utils'\nimport { RenderingMode } from '../rendering-mode'\nimport { interopDefault } from '../../lib/interop-default'\nimport type { RouteHas } from '../../lib/load-custom-routes'\nimport { recursiveReadDir } from '../../lib/recursive-readdir'\nimport { isDynamicRoute } from '../../shared/lib/router/utils'\nimport type { Revalidate } from '../../server/lib/cache-control'\nimport type { NextConfigComplete } from '../../server/config-shared'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport { AdapterOutputType, type PHASE_TYPE } from '../../shared/lib/constants'\nimport { normalizePagePath } from '../../shared/lib/page-path/normalize-page-path'\nimport {\n convertRedirects,\n convertRewrites,\n convertHeaders,\n} from 'next/dist/compiled/@vercel/routing-utils'\n\nimport type {\n MiddlewareManifest,\n EdgeFunctionDefinition,\n} from '../webpack/plugins/middleware-plugin'\n\nimport type {\n RoutesManifest,\n PrerenderManifest,\n ManifestRewriteRoute,\n FunctionsConfigManifest,\n DynamicPrerenderManifestRoute,\n} from '..'\n\nimport {\n HTML_CONTENT_TYPE_HEADER,\n JSON_CONTENT_TYPE_HEADER,\n NEXT_RESUME_HEADER,\n} from '../../lib/constants'\nimport { normalizeLocalePath } from '../../shared/lib/i18n/normalize-locale-path'\nimport { addPathPrefix } from '../../shared/lib/router/utils/add-path-prefix'\nimport { getRedirectStatus, modifyRouteRegex } from '../../lib/redirect-status'\nimport { getNamedRouteRegex } from '../../shared/lib/router/utils/route-regex'\nimport { escapeStringRegexp } from '../../shared/lib/escape-regexp'\nimport { sortSortableRoutes } from '../../shared/lib/router/utils/sortable-routes'\nimport { nodeFileTrace } from 'next/dist/compiled/@vercel/nft'\nimport { defaultOverrides } from '../../server/require-hook'\nimport { makeIgnoreFn } from '../collect-build-traces'\n\ninterface SharedRouteFields {\n /**\n * id is the unique identifier of the output\n */\n id: string\n /**\n * filePath is the location on disk of the built entrypoint asset\n */\n filePath: string\n /**\n * pathname is the URL pathname the asset should be served at\n */\n pathname: string\n\n /**\n * sourcePage is the original source in the app or pages folder\n */\n sourcePage: string\n\n /**\n * runtime is which runtime the entrypoint is built for\n */\n runtime: 'nodejs' | 'edge'\n /**\n * assets are all necessary traced assets that could be\n * loaded by the output to handle a request e.g. traced\n * node_modules or necessary manifests for Next.js.\n * The key is the relative path from the repo root and the value\n * is the absolute path to the file\n */\n assets: Record<string, string>\n\n /**\n * wasmAssets are bundled wasm files with mapping of name\n * to filePath on disk\n */\n wasmAssets?: Record<string, string>\n\n /**\n * config related to the route\n */\n config: {\n /**\n * maxDuration is a segment config to signal the max\n * execution duration a route should be allowed before\n * it's timed out\n */\n maxDuration?: number\n /**\n * preferredRegion is a segment config to signal deployment\n * region preferences to the provider being used\n */\n preferredRegion?: string | string[]\n\n /**\n * env is the environment variables to expose, this is only\n * populated for edge runtime currently\n */\n env?: Record<string, string>\n }\n}\n\nexport interface AdapterOutput {\n /**\n * `PAGES` represents all the React pages that are under `pages/`.\n */\n PAGES: SharedRouteFields & {\n type: AdapterOutputType.PAGES\n }\n\n /**\n * `PAGES_API` represents all the API routes under `pages/api/`.\n */\n PAGES_API: SharedRouteFields & {\n type: AdapterOutputType.PAGES_API\n }\n /**\n * `APP_PAGE` represents all the React pages that are under `app/` with the\n * filename of `page.{j,t}s{,x}`.\n */\n APP_PAGE: SharedRouteFields & {\n type: AdapterOutputType.APP_PAGE\n }\n\n /**\n * `APP_ROUTE` represents all the API routes and metadata routes that are under `app/` with the\n * filename of `route.{j,t}s{,x}`.\n */\n APP_ROUTE: SharedRouteFields & {\n type: AdapterOutputType.APP_ROUTE\n }\n\n /**\n * `PRERENDER` represents an ISR enabled route that might\n * have a seeded cache entry or fallback generated during build\n */\n PRERENDER: {\n id: string\n pathname: string\n type: AdapterOutputType.PRERENDER\n\n /**\n * For prerenders the parent output is the originating\n * page that the prerender is created from\n */\n parentOutputId: string\n\n /**\n * groupId is the identifier for a group of prerenders that should be\n * revalidated together\n */\n groupId: number\n\n pprChain?: {\n headers: Record<string, string>\n }\n\n /**\n * parentFallbackMode signals whether additional routes can be generated\n * e.g. fallback: false or 'blocking' in getStaticPaths in pages router\n */\n parentFallbackMode?: DynamicPrerenderManifestRoute['fallback']\n\n /**\n * fallback is initial cache data generated during build for a prerender\n */\n fallback?: {\n /**\n * path to the fallback file can be HTML/JSON/RSC\n */\n filePath: string\n /**\n * initialStatus is the status code that should be applied\n * when serving the fallback\n */\n initialStatus?: number\n /**\n * initialHeaders are the headers that should be sent when\n * serving the fallback\n */\n initialHeaders?: Record<string, string | string[]>\n /**\n * initial expiration is how long until the fallback entry\n * is considered expired and no longer valid to serve\n */\n initialExpiration?: number\n /**\n * initial revalidate is how long until the fallback is\n * considered stale and should be revalidated\n */\n initialRevalidate?: Revalidate\n\n /**\n * postponedState is the PPR state when it postponed and is used for resuming\n */\n postponedState?: string\n }\n /**\n * config related to the route\n */\n config: {\n /**\n * allowQuery is the allowed query values to be passed\n * to an ISR function and what should be considered for the cacheKey\n * e.g. for /blog/[slug], \"slug\" is the only allowQuery\n */\n allowQuery?: string[]\n /**\n * allowHeader is the allowed headers to be passed to an\n * ISR function to prevent accidentally poisoning the cache\n * from leaking additional information that can impact the render\n */\n allowHeader?: string[]\n /**\n * bypass for is a list of has conditions the cache\n * should be bypassed and invoked directly e.g. action header\n */\n bypassFor?: RouteHas[]\n /**\n * renderingMode signals PPR or not for a prerender\n */\n renderingMode?: RenderingMode\n\n /**\n * bypassToken is the generated token that signals a prerender cache\n * should be bypassed\n */\n bypassToken?: string\n }\n }\n\n /**\n * `STATIC_FILE` represents a static file (ie /_next/static) or a purely\n * static HTML asset e.g. an automatically statically optimized page\n * that does not use ISR\n */\n STATIC_FILE: {\n id: string\n filePath: string\n pathname: string\n type: AdapterOutputType.STATIC_FILE\n }\n\n /**\n * `MIDDLEWARE` represents the middleware output if present\n */\n MIDDLEWARE: SharedRouteFields & {\n type: AdapterOutputType.MIDDLEWARE\n /**\n * config related to the route\n */\n config: SharedRouteFields['config'] & {\n /**\n * matchers are the configured matchers for middleware\n */\n matchers?: Array<{\n source: string\n sourceRegex: string\n has: RouteHas[] | undefined\n missing: RouteHas[] | undefined\n }>\n }\n }\n}\n\nexport interface AdapterOutputs {\n pages: Array<AdapterOutput['PAGES']>\n middleware?: AdapterOutput['MIDDLEWARE']\n appPages: Array<AdapterOutput['APP_PAGE']>\n pagesApi: Array<AdapterOutput['PAGES_API']>\n appRoutes: Array<AdapterOutput['APP_ROUTE']>\n prerenders: Array<AdapterOutput['PRERENDER']>\n staticFiles: Array<AdapterOutput['STATIC_FILE']>\n}\n\ntype RewriteItem = {\n source: string\n sourceRegex: string\n destination: string\n has: RouteHas[] | undefined\n missing: RouteHas[] | undefined\n}\n\ntype DynamicRouteItem = {\n source: string\n sourceRegex: string\n destination: string\n has: RouteHas[] | undefined\n missing: RouteHas[] | undefined\n}\n\nexport interface NextAdapter {\n name: string\n /**\n * modifyConfig is called for any CLI command that loads the next.config\n * to only apply for specific commands the \"phase\" should be used\n * @param config\n * @param ctx\n * @returns\n */\n modifyConfig?: (\n config: NextConfigComplete,\n ctx: {\n phase: PHASE_TYPE\n }\n ) => Promise<NextConfigComplete> | NextConfigComplete\n onBuildComplete?: (ctx: {\n routes: {\n headers: Array<{\n source: string\n sourceRegex: string\n headers: Record<string, string>\n has: RouteHas[] | undefined\n missing: RouteHas[] | undefined\n priority?: boolean\n }>\n redirects: Array<{\n source: string\n sourceRegex: string\n destination: string\n statusCode: number\n has: RouteHas[] | undefined\n missing: RouteHas[] | undefined\n priority?: boolean\n }>\n rewrites: {\n beforeFiles: RewriteItem[]\n afterFiles: RewriteItem[]\n fallback: RewriteItem[]\n }\n dynamicRoutes: Array<DynamicRouteItem>\n }\n outputs: AdapterOutputs\n /**\n * projectDir is the absolute directory the Next.js application is in\n */\n projectDir: string\n /**\n * repoRoot is the absolute path of the detected root of the repo\n */\n repoRoot: string\n /**\n * distDir is the absolute path to the dist directory\n */\n distDir: string\n /**\n * config is the loaded next.config (has modifyConfig applied)\n */\n config: NextConfigComplete\n /**\n * nextVersion is the current version of Next.js being used\n */\n nextVersion: string\n /**\n * buildId is the current unique ID for the build, this can be\n * influenced by NextConfig.generateBuildId\n */\n buildId: string\n }) => Promise<void> | void\n}\n\nfunction normalizePathnames(\n config: NextConfigComplete,\n outputs: AdapterOutputs\n) {\n // normalize pathname field with basePath\n if (config.basePath) {\n for (const output of [\n ...outputs.pages,\n ...outputs.pagesApi,\n ...outputs.appPages,\n ...outputs.appRoutes,\n ...outputs.prerenders,\n ...outputs.staticFiles,\n ]) {\n output.pathname =\n addPathPrefix(output.pathname, config.basePath).replace(/\\/$/, '') ||\n '/'\n }\n }\n}\n\nexport async function handleBuildComplete({\n dir,\n config,\n buildId,\n configOutDir,\n distDir,\n pageKeys,\n tracingRoot,\n adapterPath,\n appPageKeys,\n staticPages,\n nextVersion,\n hasStatic404,\n hasStatic500,\n routesManifest,\n serverPropsPages,\n hasNodeMiddleware,\n prerenderManifest,\n middlewareManifest,\n requiredServerFiles,\n hasInstrumentationHook,\n functionsConfigManifest,\n}: {\n dir: string\n distDir: string\n buildId: string\n configOutDir: string\n adapterPath: string\n tracingRoot: string\n nextVersion: string\n hasStatic404: boolean\n hasStatic500: boolean\n staticPages: Set<string>\n hasNodeMiddleware: boolean\n config: NextConfigComplete\n pageKeys: readonly string[]\n serverPropsPages: Set<string>\n requiredServerFiles: string[]\n routesManifest: RoutesManifest\n hasInstrumentationHook: boolean\n prerenderManifest: PrerenderManifest\n middlewareManifest: MiddlewareManifest\n appPageKeys?: readonly string[] | undefined\n functionsConfigManifest: FunctionsConfigManifest\n}) {\n const adapterMod = interopDefault(\n await import(pathToFileURL(require.resolve(adapterPath)).href)\n ) as NextAdapter\n\n if (typeof adapterMod.onBuildComplete === 'function') {\n const outputs: AdapterOutputs = {\n pages: [],\n pagesApi: [],\n appPages: [],\n appRoutes: [],\n prerenders: [],\n staticFiles: [],\n }\n\n if (config.output === 'export') {\n // collect export assets and provide as static files\n const exportFiles = await recursiveReadDir(configOutDir)\n\n for (const file of exportFiles) {\n let pathname = (\n file.endsWith('.html') ? file.replace(/\\.html$/, '') : file\n ).replace(/\\\\/g, '/')\n\n pathname = pathname.startsWith('/') ? pathname : `/${pathname}`\n\n outputs.staticFiles.push({\n id: file,\n pathname,\n filePath: path.join(configOutDir, file),\n type: AdapterOutputType.STATIC_FILE,\n } satisfies AdapterOutput['STATIC_FILE'])\n }\n } else {\n const staticFiles = await recursiveReadDir(path.join(distDir, 'static'))\n\n for (const file of staticFiles) {\n const pathname = path.posix.join('/_next/static', file)\n const filePath = path.join(distDir, 'static', file)\n outputs.staticFiles.push({\n type: AdapterOutputType.STATIC_FILE,\n id: path.join('static', file),\n pathname,\n filePath,\n })\n }\n\n const sharedNodeAssets: Record<string, string> = {}\n const pagesSharedNodeAssets: Record<string, string> = {}\n const appPagesSharedNodeAssets: Record<string, string> = {}\n\n const sharedTraceIgnores = [\n '**/next/dist/compiled/next-server/**/*.dev.js',\n '**/next/dist/compiled/webpack/*',\n '**/node_modules/webpack5/**/*',\n '**/next/dist/server/lib/route-resolver*',\n 'next/dist/compiled/semver/semver/**/*.js',\n '**/node_modules/react{,-dom,-dom-server-turbopack}/**/*.development.js',\n '**/*.d.ts',\n '**/*.map',\n '**/next/dist/pages/**/*',\n '**/node_modules/sharp/**/*',\n '**/@img/sharp-libvips*/**/*',\n '**/next/dist/compiled/edge-runtime/**/*',\n '**/next/dist/server/web/sandbox/**/*',\n '**/next/dist/server/post-process.js',\n ]\n const sharedIgnoreFn = makeIgnoreFn(tracingRoot, sharedTraceIgnores)\n\n for (const file of requiredServerFiles) {\n // add to shared node assets\n const filePath = path.join(dir, file)\n const fileOutputPath = path.relative(tracingRoot, filePath)\n sharedNodeAssets[fileOutputPath] = filePath\n }\n\n const moduleTypes = ['app-page', 'pages'] as const\n\n for (const type of moduleTypes) {\n const currentDependencies: string[] = []\n const modulePath = require.resolve(\n `next/dist/server/route-modules/${type}/module.compiled`\n )\n const contextDir = path.join(\n path.dirname(modulePath),\n 'vendored',\n 'contexts'\n )\n\n for (const item of await fs.readdir(contextDir)) {\n if (item.match(/\\.(mjs|cjs|js)$/)) {\n currentDependencies.push(path.join(contextDir, item))\n }\n }\n\n const { fileList, esmFileList } = await nodeFileTrace(\n currentDependencies,\n {\n base: tracingRoot,\n ignore: sharedIgnoreFn,\n }\n )\n esmFileList.forEach((item) => fileList.add(item))\n\n for (const rootRelativeFilePath of fileList) {\n if (type === 'pages') {\n pagesSharedNodeAssets[rootRelativeFilePath] = path.join(\n tracingRoot,\n rootRelativeFilePath\n )\n } else {\n appPagesSharedNodeAssets[rootRelativeFilePath] = path.join(\n tracingRoot,\n rootRelativeFilePath\n )\n }\n }\n }\n\n // These are modules that are necessary for bootstrapping node env\n const necessaryNodeDependencies = [\n require.resolve('next/dist/server/node-environment'),\n require.resolve('next/dist/server/require-hook'),\n require.resolve('next/dist/server/node-polyfill-crypto'),\n ...Object.values(defaultOverrides).filter((item) => path.extname(item)),\n ]\n\n const { fileList, esmFileList } = await nodeFileTrace(\n necessaryNodeDependencies,\n {\n base: tracingRoot,\n ignore: sharedIgnoreFn,\n }\n )\n esmFileList.forEach((item) => fileList.add(item))\n\n for (const rootRelativeFilePath of fileList) {\n sharedNodeAssets[rootRelativeFilePath] = path.join(\n tracingRoot,\n rootRelativeFilePath\n )\n }\n\n if (hasInstrumentationHook) {\n const assets = await handleTraceFiles(\n path.join(distDir, 'server', 'instrumentation.js.nft.json'),\n 'neutral'\n )\n const fileOutputPath = path.relative(\n tracingRoot,\n path.join(distDir, 'server', 'instrumentation.js')\n )\n sharedNodeAssets[fileOutputPath] = path.join(\n distDir,\n 'server',\n 'instrumentation.js'\n )\n Object.assign(sharedNodeAssets, assets)\n }\n\n async function handleTraceFiles(\n traceFilePath: string,\n type: 'pages' | 'app' | 'neutral'\n ): Promise<Record<string, string>> {\n const assets: Record<string, string> = Object.assign(\n {},\n sharedNodeAssets,\n type === 'pages' ? pagesSharedNodeAssets : {},\n type === 'app' ? appPagesSharedNodeAssets : {}\n )\n const traceData = JSON.parse(\n await fs.readFile(traceFilePath, 'utf8')\n ) as {\n files: string[]\n }\n const traceFileDir = path.dirname(traceFilePath)\n\n for (const relativeFile of traceData.files) {\n const tracedFilePath = path.join(traceFileDir, relativeFile)\n const fileOutputPath = path.relative(tracingRoot, tracedFilePath)\n assets[fileOutputPath] = tracedFilePath\n }\n return assets\n }\n\n async function handleEdgeFunction(\n page: EdgeFunctionDefinition,\n isMiddleware: boolean = false\n ) {\n let type: AdapterOutputType = AdapterOutputType.PAGES\n const isAppPrefix = page.name.startsWith('app/')\n const isAppPage = isAppPrefix && page.name.endsWith('/page')\n const isAppRoute = isAppPrefix && page.name.endsWith('/route')\n let currentOutputs: Array<\n | AdapterOutput['PAGES']\n | AdapterOutput['PAGES_API']\n | AdapterOutput['APP_PAGE']\n | AdapterOutput['APP_ROUTE']\n > = outputs.pages\n\n if (isMiddleware) {\n type = AdapterOutputType.MIDDLEWARE\n } else if (isAppPage) {\n currentOutputs = outputs.appPages\n type = AdapterOutputType.APP_PAGE\n } else if (isAppRoute) {\n currentOutputs = outputs.appRoutes\n type = AdapterOutputType.APP_ROUTE\n } else if (page.page.startsWith('/api')) {\n currentOutputs = outputs.pagesApi\n type = AdapterOutputType.PAGES_API\n }\n\n const route = page.page.replace(/^(app|pages)\\//, '')\n\n const output: Omit<AdapterOutput[typeof type], 'type'> & {\n type: any\n } = {\n type,\n id: page.name,\n runtime: 'edge',\n sourcePage: route,\n pathname: isAppPrefix ? normalizeAppPath(route) : route,\n filePath: path.join(\n distDir,\n page.files.find(\n (item) =>\n item.startsWith('server/app') || item.startsWith('server/pages')\n ) ||\n // TODO: turbopack build doesn't name the main entry chunk\n // identifiably so we don't know which to mark here but\n // technically edge needs all chunks to load always so\n // should this field even be provided?\n page.files[0] ||\n ''\n ),\n assets: {},\n wasmAssets: {},\n config: {\n env: page.env,\n },\n }\n\n function handleFile(file: string) {\n const originalPath = path.join(distDir, file)\n const fileOutputPath = path.join(\n path.relative(tracingRoot, distDir),\n file\n )\n if (!output.assets) {\n output.assets = {}\n }\n output.assets[fileOutputPath] = originalPath\n }\n for (const file of page.files) {\n handleFile(file)\n }\n for (const item of [...(page.assets || [])]) {\n handleFile(item.filePath)\n }\n for (const item of page.wasm || []) {\n if (!output.wasmAssets) {\n output.wasmAssets = {}\n }\n output.wasmAssets[item.name] = path.join(distDir, item.filePath)\n }\n\n if (type === AdapterOutputType.MIDDLEWARE) {\n ;(output as AdapterOutput['MIDDLEWARE']).config.matchers =\n page.matchers.map((item) => {\n return {\n source: item.originalSource,\n sourceRegex: item.regexp,\n has: item.has,\n missing: [\n ...(item.missing || []),\n // always skip middleware for on-demand revalidate\n {\n type: 'header',\n key: 'x-prerender-revalidate',\n value: prerenderManifest.preview.previewModeId,\n },\n ],\n }\n })\n output.pathname = '/_middleware'\n output.id = page.name\n outputs.middleware = output\n } else {\n currentOutputs.push(output)\n }\n\n // need to add matching .rsc output\n if (isAppPage) {\n const rscPathname = normalizePagePath(output.pathname) + '.rsc'\n outputs.appPages.push({\n ...output,\n pathname: rscPathname,\n id: page.name + '.rsc',\n })\n }\n }\n\n const edgeFunctionHandlers: Promise<any>[] = []\n\n for (const middleware of Object.values(middlewareManifest.middleware)) {\n if (isMiddlewareFilename(middleware.name)) {\n edgeFunctionHandlers.push(handleEdgeFunction(middleware, true))\n }\n }\n\n for (const page of Object.values(middlewareManifest.functions)) {\n edgeFunctionHandlers.push(handleEdgeFunction(page))\n }\n const pagesDistDir = path.join(distDir, 'server', 'pages')\n const pageOutputMap: Record<\n string,\n AdapterOutput['PAGES'] | AdapterOutput['PAGES_API']\n > = {}\n\n const rscFallbackPath = path.join(distDir, 'server', 'rsc-fallback.json')\n\n if (appPageKeys && appPageKeys.length > 0 && pageKeys.length > 0) {\n await fs.writeFile(rscFallbackPath, '{}')\n }\n\n for (const page of pageKeys) {\n if (page === '/_app' || page === '/_document') {\n continue\n }\n\n if (middlewareManifest.functions.hasOwnProperty(page)) {\n continue\n }\n\n const route = normalizePagePath(page)\n const pageFile = path.join(pagesDistDir, `${route}.js`)\n\n // if it's an auto static optimized page it's just\n // a static file\n if (staticPages.has(page)) {\n if (config.i18n) {\n for (const locale of config.i18n.locales || []) {\n const localePage =\n page === '/' ? `/${locale}` : addPathPrefix(page, `/${locale}`)\n\n const localeOutput = {\n id: localePage,\n pathname: localePage,\n type: AdapterOutputType.STATIC_FILE,\n filePath: path.join(\n pagesDistDir,\n `${normalizePagePath(localePage)}.html`\n ),\n } satisfies AdapterOutput['STATIC_FILE']\n\n outputs.staticFiles.push(localeOutput)\n\n if (appPageKeys && appPageKeys.length > 0) {\n outputs.staticFiles.push({\n id: `${localePage}.rsc`,\n pathname: `${localePage}.rsc`,\n type: AdapterOutputType.STATIC_FILE,\n filePath: rscFallbackPath,\n })\n }\n }\n } else {\n const staticOutput = {\n id: page,\n pathname: route,\n type: AdapterOutputType.STATIC_FILE,\n filePath: pageFile.replace(/\\.js$/, '.html'),\n } satisfies AdapterOutput['STATIC_FILE']\n\n outputs.staticFiles.push(staticOutput)\n\n if (appPageKeys && appPageKeys.length > 0) {\n outputs.staticFiles.push({\n id: `${page}.rsc`,\n pathname: `${route}.rsc`,\n type: AdapterOutputType.STATIC_FILE,\n filePath: rscFallbackPath,\n })\n }\n }\n // if was a static file output don't create page output as well\n continue\n }\n\n const pageTraceFile = `${pageFile}.nft.json`\n const assets = await handleTraceFiles(pageTraceFile, 'pages').catch(\n (err) => {\n if (err.code !== 'ENOENT' || (page !== '/404' && page !== '/500')) {\n Log.warn(`Failed to locate traced assets for ${pageFile}`, err)\n }\n return {} as Record<string, string>\n }\n )\n const functionConfig = functionsConfigManifest.functions[route] || {}\n let sourcePage = route.replace(/^\\//, '')\n\n sourcePage = sourcePage === 'api' ? 'api/index' : sourcePage\n\n const output: AdapterOutput['PAGES'] | AdapterOutput['PAGES_API'] = {\n id: route,\n type: page.startsWith('/api')\n ? AdapterOutputType.PAGES_API\n : AdapterOutputType.PAGES,\n filePath: pageTraceFile.replace(/\\.nft\\.json$/, ''),\n pathname: route,\n sourcePage,\n assets,\n runtime: 'nodejs',\n config: {\n maxDuration: functionConfig.maxDuration,\n preferredRegion: functionConfig.regions,\n },\n }\n pageOutputMap[page] = output\n\n if (output.type === AdapterOutputType.PAGES) {\n outputs.pages.push(output)\n\n // if page is get server side props we need to create\n // the _next/data output as well\n if (serverPropsPages.has(page)) {\n const dataPathname = path.posix.join(\n '/_next/data',\n buildId,\n normalizePagePath(page) + '.json'\n )\n outputs.pages.push({\n ...output,\n pathname: dataPathname,\n id: dataPathname,\n })\n }\n\n for (const locale of config.i18n?.locales || []) {\n const localePage =\n page === '/' ? `/${locale}` : addPathPrefix(page, `/${locale}`)\n\n outputs.pages.push({\n ...output,\n id: localePage,\n pathname: localePage,\n })\n\n if (serverPropsPages.has(page)) {\n const dataPathname = path.posix.join(\n '/_next/data',\n buildId,\n localePage + '.json'\n )\n outputs.pages.push({\n ...output,\n pathname: dataPathname,\n id: dataPathname,\n })\n }\n }\n } else {\n outputs.pagesApi.push(output)\n }\n\n if (appPageKeys && appPageKeys.length > 0) {\n outputs.staticFiles.push({\n id: `${output.id}.rsc`,\n pathname: `${output.pathname}.rsc`,\n type: AdapterOutputType.STATIC_FILE,\n filePath: rscFallbackPath,\n })\n }\n }\n\n if (hasNodeMiddleware) {\n const middlewareFile = path.join(distDir, 'server', 'middleware.js')\n const middlewareTrace = `${middlewareFile}.nft.json`\n const assets = await handleTraceFiles(middlewareTrace, 'neutral')\n const functionConfig =\n functionsConfigManifest.functions['/_middleware'] || {}\n\n outputs.middleware = {\n pathname: '/_middleware',\n id: '/_middleware',\n sourcePage: 'middleware',\n assets,\n type: AdapterOutputType.MIDDLEWARE,\n runtime: 'nodejs',\n filePath: middlewareFile,\n config: {\n matchers:\n functionConfig.matchers?.map((item) => {\n return {\n source: item.originalSource,\n sourceRegex: item.regexp,\n has: item.has,\n missing: [\n ...(item.missing || []),\n // always skip middleware for on-demand revalidate\n {\n type: 'header',\n key: 'x-prerender-revalidate',\n value: prerenderManifest.preview.previewModeId,\n },\n ],\n }\n }) || [],\n },\n } satisfies AdapterOutput['MIDDLEWARE']\n }\n const appOutputMap: Record<\n string,\n AdapterOutput['APP_PAGE'] | AdapterOutput['APP_ROUTE']\n > = {}\n const appDistDir = path.join(distDir, 'server', 'app')\n\n if (appPageKeys) {\n for (const page of appPageKeys) {\n if (middlewareManifest.functions.hasOwnProperty(page)) {\n continue\n }\n const normalizedPage = normalizeAppPath(page)\n const pageFile = path.join(appDistDir, `${page}.js`)\n const pageTraceFile = `${pageFile}.nft.json`\n const assets = await handleTraceFiles(pageTraceFile, 'app').catch(\n (err) => {\n Log.warn(`Failed to copy traced files for ${pageFile}`, err)\n return {} as Record<string, string>\n }\n )\n\n // If this is a parallel route we just need to merge\n // the assets as they share the same pathname\n const existingOutput = appOutputMap[normalizedPage]\n if (existingOutput) {\n Object.assign(existingOutput.assets, assets)\n existingOutput.assets[path.relative(tracingRoot, pageFile)] =\n pageFile\n\n continue\n }\n\n const functionConfig =\n functionsConfigManifest.functions[normalizedPage] || {}\n\n const output: AdapterOutput['APP_PAGE'] | AdapterOutput['APP_ROUTE'] =\n {\n pathname: normalizedPage,\n id: normalizedPage,\n sourcePage: page,\n assets,\n type: page.endsWith('/route')\n ? AdapterOutputType.APP_ROUTE\n : AdapterOutputType.APP_PAGE,\n runtime: 'nodejs',\n filePath: pageFile,\n config: {\n maxDuration: functionConfig.maxDuration,\n preferredRegion: functionConfig.regions,\n },\n }\n appOutputMap[normalizedPage] = output\n\n if (output.type === AdapterOutputType.APP_PAGE) {\n outputs.appPages.push({\n ...output,\n pathname: normalizePagePath(output.pathname) + '.rsc',\n id: normalizePagePath(output.pathname) + '.rsc',\n })\n outputs.appPages.push(output)\n } else {\n outputs.appRoutes.push(output)\n }\n }\n }\n\n const getParentOutput = (\n srcRoute: string,\n childRoute: string,\n allowMissing?: boolean\n ) => {\n const normalizedSrcRoute = normalizeLocalePath(\n srcRoute,\n config.i18n?.locales || []\n ).pathname\n const parentOutput =\n pageOutputMap[normalizedSrcRoute] || appOutputMap[normalizedSrcRoute]\n\n if (!parentOutput && !allowMissing) {\n console.error({\n appOutputs: Object.keys(appOutputMap),\n pageOutputs: Object.keys(pageOutputMap),\n })\n throw new Error(\n `Invariant: failed to find source route ${srcRoute} for prerender ${childRoute}`\n )\n }\n return parentOutput\n }\n\n const {\n prefetchSegmentDirSuffix,\n prefetchSegmentSuffix,\n varyHeader,\n didPostponeHeader,\n contentTypeHeader: rscContentTypeHeader,\n } = routesManifest.rsc\n\n const handleAppMeta = async (\n route: string,\n initialOutput: AdapterOutput['PRERENDER'],\n meta: {\n postponed?: string\n segmentPaths?: string[]\n }\n ) => {\n if (meta.postponed && initialOutput.fallback) {\n initialOutput.fallback.postponedState = meta.postponed\n }\n\n if (meta?.segmentPaths) {\n const normalizedRoute = normalizePagePath(route)\n const segmentsDir = path.join(\n appDistDir,\n `${normalizedRoute}${prefetchSegmentDirSuffix}`\n )\n\n for (const segmentPath of meta.segmentPaths) {\n const outputSegmentPath =\n path.join(\n normalizedRoute + prefetchSegmentDirSuffix,\n segmentPath\n ) + prefetchSegmentSuffix\n\n const fallbackPathname = path.join(\n segmentsDir,\n segmentPath + prefetchSegmentSuffix\n )\n\n outputs.prerenders.push({\n id: outputSegmentPath,\n pathname: outputSegmentPath,\n type: AdapterOutputType.PRERENDER,\n parentOutputId: initialOutput.parentOutputId,\n groupId: initialOutput.groupId,\n\n config: {\n ...initialOutput.config,\n },\n\n fallback: {\n filePath: fallbackPathname,\n initialExpiration: initialOutput.fallback?.initialExpiration,\n initialRevalidate: initialOutput.fallback?.initialRevalidate,\n\n initialHeaders: {\n ...initialOutput.fallback?.initialHeaders,\n vary: varyHeader,\n 'content-type': rscContentTypeHeader,\n [didPostponeHeader]: '2',\n },\n },\n } satisfies AdapterOutput['PRERENDER'])\n }\n }\n }\n\n let prerenderGroupId = 1\n\n type AppRouteMeta = {\n segmentPaths?: string[]\n postponed?: string\n headers?: Record<string, string>\n status?: number\n }\n\n const getAppRouteMeta = async (\n route: string,\n isAppPage: boolean\n ): Promise<AppRouteMeta> => {\n const basename = route.endsWith('/') ? `${route}index` : route\n const meta: AppRouteMeta = isAppPage\n ? JSON.parse(\n await fs\n .readFile(path.join(appDistDir, `${basename}.meta`), 'utf8')\n .catch(() => '{}')\n )\n : {}\n\n if (meta.headers) {\n // normalize these for consistency\n for (const key of Object.keys(meta.headers)) {\n const keyLower = key.toLowerCase()\n if (keyLower !== key) {\n const value = meta.headers[key]\n delete meta.headers[key]\n meta.headers[keyLower] = value\n }\n }\n }\n\n return meta\n }\n\n const filePathCache = new Map<string, Promise<boolean>>()\n const cachedFilePathCheck = async (filePath: string) => {\n if (filePathCache.has(filePath)) {\n return filePathCache.get(filePath)\n }\n const newCheck = fs\n .access(filePath)\n .then(() => true)\n .catch(() => false)\n filePathCache.set(filePath, newCheck)\n\n return newCheck\n }\n\n for (const route in prerenderManifest.routes) {\n const {\n initialExpireSeconds: initialExpiration,\n initialRevalidateSeconds: initialRevalidate,\n initialHeaders,\n initialStatus,\n prefetchDataRoute,\n dataRoute,\n renderingMode,\n allowHeader,\n experimentalBypassFor,\n } = prerenderManifest.routes[route]\n\n const srcRoute = prerenderManifest.routes[route].srcRoute || route\n const srcRouteInfo = prerenderManifest.dynamicRoutes[srcRoute]\n\n const isAppPage =\n Boolean(appOutputMap[srcRoute]) || srcRoute === '/_not-found'\n\n const isNotFoundTrue = prerenderManifest.notFoundRoutes.includes(route)\n\n let allowQuery: string[] | undefined\n const routeKeys = routesManifest.dynamicRoutes.find(\n (item) => item.page === srcRoute\n )?.routeKeys\n\n if (!isDynamicRoute(srcRoute)) {\n // for non-dynamic routes we use an empty array since\n // no query values bust the cache for non-dynamic prerenders\n // prerendered paths also do not pass allowQuery as they match\n // during handle: 'filesystem' so should not cache differently\n // by query values\n allowQuery = []\n } else if (routeKeys) {\n // if we have routeKeys in the routes-manifest we use those\n // for allowQuery for dynamic routes\n allowQuery = Object.values(routeKeys)\n }\n\n let filePath = path.join(\n isAppPage ? appDistDir : pagesDistDir,\n `${normalizePagePath(route)}.${isAppPage && !dataRoute ? 'body' : 'html'}`\n )\n\n // we use the static 404 for notFound: true if available\n // if not we do a blocking invoke on first request\n if (isNotFoundTrue && hasStatic404) {\n const locale =\n config.i18n &&\n normalizeLocalePath(route, config.i18n?.locales).detectedLocale\n\n for (const currentFilePath of [\n path.join(pagesDistDir, locale || '', '404.html'),\n path.join(pagesDistDir, '404.html'),\n ]) {\n if (await cachedFilePathCheck(currentFilePath)) {\n filePath = currentFilePath\n break\n }\n }\n }\n\n const meta = await getAppRouteMeta(route, isAppPage)\n\n const initialOutput: AdapterOutput['PRERENDER'] = {\n id: route,\n type: AdapterOutputType.PRERENDER,\n pathname: route,\n parentOutputId:\n srcRoute === '/_not-found'\n ? srcRoute\n : getParentOutput(srcRoute, route).id,\n groupId: prerenderGroupId,\n\n pprChain:\n isAppPage && config.experimental.ppr\n ? {\n headers: {\n [NEXT_RESUME_HEADER]: '1',\n },\n }\n : undefined,\n\n parentFallbackMode: srcRouteInfo?.fallback,\n\n fallback:\n !isNotFoundTrue || (isNotFoundTrue && hasStatic404)\n ? {\n filePath,\n initialStatus:\n (initialStatus ?? isNotFoundTrue) ? 404 : undefined,\n initialHeaders: {\n ...initialHeaders,\n vary: varyHeader,\n 'content-type': HTML_CONTENT_TYPE_HEADER,\n ...meta.headers,\n },\n initialExpiration,\n initialRevalidate:\n typeof initialRevalidate === 'undefined'\n ? 1\n : initialRevalidate,\n }\n : undefined,\n config: {\n allowQuery,\n allowHeader,\n renderingMode,\n bypassFor: experimentalBypassFor,\n bypassToken: prerenderManifest.preview.previewModeId,\n },\n }\n outputs.prerenders.push(initialOutput)\n\n if (dataRoute) {\n let dataFilePath = path.join(\n pagesDistDir,\n `${normalizePagePath(route)}.json`\n )\n\n if (isAppPage) {\n // When experimental PPR is enabled, we expect that the data\n // that should be served as a part of the prerender should\n // be from the prefetch data route. If this isn't enabled\n // for ppr, the only way to get the data is from the data\n // route.\n dataFilePath = path.join(\n appDistDir,\n prefetchDataRoute &&\n renderingMode === RenderingMode.PARTIALLY_STATIC\n ? prefetchDataRoute\n : dataRoute\n )\n }\n\n outputs.prerenders.push({\n ...initialOutput,\n id: dataRoute,\n pathname: dataRoute,\n fallback: isNotFoundTrue\n ? undefined\n : {\n ...initialOutput.fallback,\n initialHeaders: {\n ...initialOutput.fallback?.initialHeaders,\n 'content-type': isAppPage\n ? rscContentTypeHeader\n : JSON_CONTENT_TYPE_HEADER,\n },\n filePath: dataFilePath,\n },\n })\n }\n\n if (isAppPage) {\n await handleAppMeta(route, initialOutput, meta)\n }\n prerenderGroupId += 1\n }\n\n for (const dynamicRoute in prerenderManifest.dynamicRoutes) {\n const {\n fallback,\n fallbackExpire,\n fallbackRevalidate,\n fallbackHeaders,\n fallbackStatus,\n allowHeader,\n dataRoute,\n renderingMode,\n experimentalBypassFor,\n } = prerenderManifest.dynamicRoutes[dynamicRoute]\n\n const isAppPage = Boolean(appOutputMap[dynamicRoute])\n\n const allowQuery = Object.values(\n routesManifest.dynamicRoutes.find(\n (item) => item.page === dynamicRoute\n )?.routeKeys || {}\n )\n const meta = await getAppRouteMeta(dynamicRoute, isAppPage)\n\n const initialOutput: AdapterOutput['PRERENDER'] = {\n id: dynamicRoute,\n type: AdapterOutputType.PRERENDER,\n pathname: dynamicRoute,\n parentOutputId: getParentOutput(dynamicRoute, dynamicRoute).id,\n groupId: prerenderGroupId,\n config: {\n allowQuery,\n allowHeader,\n renderingMode,\n bypassFor: experimentalBypassFor,\n bypassToken: prerenderManifest.preview.previewModeId,\n },\n fallback:\n typeof fallback === 'string'\n ? {\n filePath: path.join(\n isAppPage ? appDistDir : pagesDistDir,\n // app router dynamic route fallbacks don't have the\n // extension so ensure it's added here\n fallback.endsWith('.html') ? fallback : `${fallback}.html`\n ),\n initialStatus: fallbackStatus,\n initialHeaders: {\n ...fallbackHeaders,\n 'content-type': HTML_CONTENT_TYPE_HEADER,\n },\n initialExpiration: fallbackExpire,\n initialRevalidate: fallbackRevalidate || 1,\n }\n : undefined,\n }\n\n if (!config.i18n || isAppPage) {\n outputs.prerenders.push(initialOutput)\n\n if (isAppPage) {\n await handleAppMeta(dynamicRoute, initialOutput, meta)\n }\n\n if (dataRoute) {\n outputs.prerenders.push({\n ...initialOutput,\n id: dataRoute,\n pathname: dataRoute,\n fallback: undefined,\n })\n }\n prerenderGroupId += 1\n } else {\n for (const locale of config.i18n.locales) {\n const currentOutput = {\n ...initialOutput,\n pathname: path.posix.join(`/${locale}`, initialOutput.pathname),\n id: path.posix.join(`/${locale}`, initialOutput.id),\n fallback:\n typeof fallback === 'string'\n ? {\n ...initialOutput.fallback,\n filePath: path.join(\n pagesDistDir,\n locale,\n // app router dynamic route fallbacks don't have the\n // extension so ensure it's added here\n fallback.endsWith('.html')\n ? fallback\n : `${fallback}.html`\n ),\n }\n : undefined,\n groupId: prerenderGroupId,\n }\n outputs.prerenders.push(currentOutput)\n\n if (dataRoute) {\n const dataPathname = path.posix.join(\n `/_next/data`,\n buildId,\n locale,\n dynamicRoute + '.json'\n )\n outputs.prerenders.push({\n ...initialOutput,\n id: dataPathname,\n pathname: dataPathname,\n // data route doesn't have skeleton fallback\n fallback: undefined,\n groupId: prerenderGroupId,\n })\n }\n prerenderGroupId += 1\n }\n }\n }\n\n // ensure 404\n const staticErrorDocs = [\n ...(hasStatic404 ? ['/404'] : []),\n ...(hasStatic500 ? ['/500'] : []),\n ]\n\n for (const errorDoc of staticErrorDocs) {\n const errorDocPath = path.posix.join(\n '/',\n config.i18n?.defaultLocale || '',\n errorDoc\n )\n\n if (!prerenderManifest.routes[errorDocPath]) {\n for (const currentDocPath of [\n errorDocPath,\n ...(config.i18n?.locales?.map((locale) =>\n path.posix.join('/', locale, errorDoc)\n ) || []),\n ]) {\n const currentFilePath = path.join(\n pagesDistDir,\n `${currentDocPath}.html`\n )\n if (await cachedFilePathCheck(currentFilePath)) {\n outputs.staticFiles.push({\n pathname: currentDocPath,\n id: currentDocPath,\n type: AdapterOutputType.STATIC_FILE,\n filePath: currentFilePath,\n })\n }\n }\n }\n }\n }\n\n normalizePathnames(config, outputs)\n\n const dynamicRoutes: DynamicRouteItem[] = []\n const dynamicDataRoutes: DynamicRouteItem[] = []\n const dynamicSegmentRoutes: DynamicRouteItem[] = []\n\n const getDestinationQuery = (routeKeys: Record<string, string>) => {\n const items = Object.entries(routeKeys ?? {})\n if (items.length === 0) return ''\n\n return '?' + items.map(([key, value]) => `${value}=$${key}`).join('&')\n }\n\n const fallbackFalseHasCondition: RouteHas[] = [\n {\n type: 'cookie',\n key: '__prerender_bypass',\n value: prerenderManifest.preview.previewModeId,\n },\n {\n type: 'cookie',\n key: '__next_preview_data',\n },\n ]\n\n for (const route of routesManifest.dynamicRoutes) {\n const shouldLocalize = config.i18n\n\n const routeRegex = getNamedRouteRegex(route.page, {\n prefixRouteKeys: true,\n })\n\n const isFallbackFalse =\n prerenderManifest.dynamicRoutes[route.page]?.fallback === false\n\n const { hasFallbackRootParams } = route\n\n const sourceRegex = routeRegex.namedRegex.replace(\n '^',\n `^${config.basePath && config.basePath !== '/' ? path.posix.join('/', config.basePath || '') : ''}[/]?${shouldLocalize ? '(?<nextLocale>[^/]{1,})?' : ''}`\n )\n const destination =\n path.posix.join(\n '/',\n config.basePath,\n shouldLocalize ? '/$nextLocale' : '',\n route.page\n ) + getDestinationQuery(route.routeKeys)\n\n if (appPageKeys && appPageKeys.length > 0 && config.cacheComponents) {\n // If we have fallback root params (implying we've already\n // emitted a rewrite for the /_tree request), or if the route\n // has PPR enabled and client param parsing is enabled, then\n // we don't need to include any other suffixes.\n const shouldSkipSuffixes = hasFallbackRootParams\n\n dynamicRoutes.push({\n source: route.page + '.rsc',\n sourceRegex: sourceRegex.replace(\n new RegExp(escapeStringRegexp('(?:/)?$')),\n // Now than the upstream issues has been resolved, we can safely\n // add the suffix back, this resolves a bug related to segment\n // rewrites not capturing the correct suffix values when\n // enabled.\n shouldSkipSuffixes\n ? '(?<rscSuffix>\\\\.rsc|\\\\.segments/.+\\\\.segment\\\\.rsc)(?:/)?$'\n : '(?<rscSuffix>\\\\.rsc|\\\\.prefetch\\\\.rsc|\\\\.segments/.+\\\\.segment\\\\.rsc)(?:/)?$'\n ),\n destination: destination?.replace(/($|\\?)/, '$rscSuffix$1'),\n has: isFallbackFalse ? fallbackFalseHasCondition : undefined,\n missing: undefined,\n })\n }\n\n // needs basePath and locale handling if pages router\n dynamicRoutes.push({\n source: route.page,\n sourceRegex,\n destination,\n has: isFallbackFalse ? fallbackFalseHasCondition : undefined,\n missing: undefined,\n })\n\n for (const segmentRoute of route.prefetchSegmentDataRoutes || []) {\n dynamicSegmentRoutes.push({\n source: route.page,\n sourceRegex: segmentRoute.source.replace(\n '^',\n `^${config.basePath && config.basePath !== '/' ? path.posix.join('/', config.basePath || '') : ''}[/]?`\n ),\n destination: path.posix.join(\n '/',\n config.basePath,\n segmentRoute.destination +\n getDestinationQuery(segmentRoute.routeKeys)\n ),\n has: undefined,\n missing: undefined,\n })\n }\n }\n\n const needsMiddlewareResolveRoutes =\n outputs.middleware && outputs.pages.length > 0\n\n const dataRoutePages = new Set([\n ...routesManifest.dataRoutes.map((item) => item.page),\n ])\n const sortedDataPages = sortSortableRoutes([\n ...(needsMiddlewareResolveRoutes\n ? [...staticPages].map((page) => ({ sourcePage: page, page }))\n : []),\n ...routesManifest.dataRoutes.map((item) => ({\n sourcePage: item.page,\n page: item.page,\n })),\n ])\n\n for (const { page } of sortedDataPages) {\n if (needsMiddlewareResolveRoutes || isDynamicRoute(page)) {\n const shouldLocalize = config.i18n\n const isFallbackFalse =\n prerenderManifest.dynamicRoutes[page]?.fallback === false\n\n const routeRegex = getNamedRouteRegex(page + '.json', {\n prefixRouteKeys: true,\n includeSuffix: true,\n })\n const isDataRoute = dataRoutePages.has(page)\n\n const destination = path.posix.join(\n '/',\n config.basePath,\n ...(isDataRoute ? [`_next/data`, buildId] : ''),\n ...(page === '/'\n ? [shouldLocalize ? '$nextLocale.json' : 'index.json']\n : [\n shouldLocalize ? '$nextLocale' : '',\n page +\n (isDataRoute ? '.json' : '') +\n getDestinationQuery(routeRegex.routeKeys || {}),\n ])\n )\n\n dynamicDataRoutes.push({\n source: page,\n sourceRegex:\n shouldLocalize && page === '/'\n ? '^' +\n path.posix.join(\n '/',\n config.basePath,\n '_next/data',\n escapeStringRegexp(buildId),\n '(?<nextLocale>[^/]{1,}).json'\n )\n : routeRegex.namedRegex.replace(\n '^',\n `^${path.posix.join(\n '/',\n config.basePath,\n `_next/data`,\n escapeStringRegexp(buildId)\n )}[/]?${shouldLocalize ? '(?<nextLocale>[^/]{1,})?' : ''}`\n ),\n destination,\n has: isFallbackFalse ? fallbackFalseHasCondition : undefined,\n missing: undefined,\n })\n }\n }\n\n const buildRewriteItem = (route: ManifestRewriteRoute): RewriteItem => {\n const converted = convertRewrites([route], ['nextInternalLocale'])[0]\n const regex = converted.src || route.regex\n\n return {\n source: route.source,\n sourceRegex: route.internal ? regex : modifyRouteRegex(regex),\n destination: converted.dest || route.destination,\n has: route.has,\n missing: route.missing,\n }\n }\n\n try {\n Log.info(`Running onBuildComplete from ${adapterMod.name}`)\n await adapterMod.onBuildComplete({\n routes: {\n dynamicRoutes: [\n ...dynamicDataRoutes,\n ...dynamicSegmentRoutes,\n ...dynamicRoutes,\n ],\n rewrites: {\n beforeFiles:\n routesManifest.rewrites.beforeFiles.map(buildRewriteItem),\n afterFiles:\n routesManifest.rewrites.afterFiles.map(buildRewriteItem),\n fallback: routesManifest.rewrites.fallback.map(buildRewriteItem),\n },\n redirects: routesManifest.redirects.map((route) => {\n const converted = convertRedirects([route], 307)[0]\n let dest = 'headers' in converted && converted.headers?.Location\n const regex = converted.src || route.regex\n\n return {\n source: route.source,\n sourceRegex: route.internal ? regex : modifyRouteRegex(regex),\n destination: dest || route.destination,\n statusCode: converted.status || getRedirectStatus(route),\n has: route.has,\n missing: route.missing,\n priority: route.internal || undefined,\n }\n }),\n headers: routesManifest.headers.map((route) => {\n const converted = convertHeaders([route])[0]\n const regex = converted.src || route.regex\n\n return {\n source: route.source,\n sourceRegex: route.internal ? regex : modifyRouteRegex(regex),\n headers: 'headers' in converted ? converted.headers || {} : {},\n has: route.has,\n missing: route.missing,\n priority: route.internal || undefined,\n }\n }),\n },\n outputs,\n\n config,\n distDir,\n buildId,\n nextVersion,\n projectDir: dir,\n repoRoot: tracingRoot,\n })\n } catch (err) {\n Log.error(`Failed to run onBuildComplete from ${adapterMod.name}`)\n throw err\n }\n }\n}\n"],"names":["handleBuildComplete","normalizePathnames","config","outputs","basePath","output","pages","pagesApi","appPages","appRoutes","prerenders","staticFiles","pathname","addPathPrefix","replace","dir","buildId","configOutDir","distDir","pageKeys","tracingRoot","adapterPath","appPageKeys","staticPages","nextVersion","hasStatic404","hasStatic500","routesManifest","serverPropsPages","hasNodeMiddleware","prerenderManifest","middlewareManifest","requiredServerFiles","hasInstrumentationHook","functionsConfigManifest","adapterMod","interopDefault","pathToFileURL","require","resolve","href","onBuildComplete","exportFiles","recursiveReadDir","file","endsWith","startsWith","push","id","filePath","path","join","type","AdapterOutputType","STATIC_FILE","posix","sharedNodeAssets","pagesSharedNodeAssets","appPagesSharedNodeAssets","sharedTraceIgnores","sharedIgnoreFn","makeIgnoreFn","fileOutputPath","relative","moduleTypes","currentDependencies","modulePath","contextDir","dirname","item","fs","readdir","match","fileList","esmFileList","nodeFileTrace","base","ignore","forEach","add","rootRelativeFilePath","necessaryNodeDependencies","Object","values","defaultOverrides","filter","extname","assets","handleTraceFiles","assign","traceFilePath","traceData","JSON","parse","readFile","traceFileDir","relativeFile","files","tracedFilePath","handleEdgeFunction","page","isMiddleware","PAGES","isAppPrefix","name","isAppPage","isAppRoute","currentOutputs","MIDDLEWARE","APP_PAGE","APP_ROUTE","PAGES_API","route","runtime","sourcePage","normalizeAppPath","find","wasmAssets","env","handleFile","originalPath","wasm","matchers","map","source","originalSource","sourceRegex","regexp","has","missing","key","value","preview","previewModeId","middleware","rscPathname","normalizePagePath","edgeFunctionHandlers","isMiddlewareFilename","functions","pagesDistDir","pageOutputMap","rscFallbackPath","length","writeFile","hasOwnProperty","pageFile","i18n","locale","locales","localePage","localeOutput","staticOutput","pageTraceFile","catch","err","code","Log","warn","functionConfig","maxDuration","preferredRegion","regions","dataPathname","middlewareFile","middlewareTrace","appOutputMap","appDistDir","normalizedPage","existingOutput","getParentOutput","srcRoute","childRoute","allowMissing","normalizedSrcRoute","normalizeLocalePath","parentOutput","console","error","appOutputs","keys","pageOutputs","Error","prefetchSegmentDirSuffix","prefetchSegmentSuffix","varyHeader","didPostponeHeader","contentTypeHeader","rscContentTypeHeader","rsc","handleAppMeta","initialOutput","meta","postponed","fallback","postponedState","segmentPaths","normalizedRoute","segmentsDir","segmentPath","outputSegmentPath","fallbackPathname","PRERENDER","parentOutputId","groupId","initialExpiration","initialRevalidate","initialHeaders","vary","prerenderGroupId","getAppRouteMeta","basename","headers","keyLower","toLowerCase","filePathCache","Map","cachedFilePathCheck","get","newCheck","access","then","set","routes","initialExpireSeconds","initialRevalidateSeconds","initialStatus","prefetchDataRoute","dataRoute","renderingMode","allowHeader","experimentalBypassFor","srcRouteInfo","dynamicRoutes","Boolean","isNotFoundTrue","notFoundRoutes","includes","allowQuery","routeKeys","isDynamicRoute","detectedLocale","currentFilePath","pprChain","experimental","ppr","NEXT_RESUME_HEADER","undefined","parentFallbackMode","HTML_CONTENT_TYPE_HEADER","bypassFor","bypassToken","dataFilePath","RenderingMode","PARTIALLY_STATIC","JSON_CONTENT_TYPE_HEADER","dynamicRoute","fallbackExpire","fallbackRevalidate","fallbackHeaders","fallbackStatus","currentOutput","staticErrorDocs","errorDoc","errorDocPath","defaultLocale","currentDocPath","dynamicDataRoutes","dynamicSegmentRoutes","getDestinationQuery","items","entries","fallbackFalseHasCondition","shouldLocalize","routeRegex","getNamedRouteRegex","prefixRouteKeys","isFallbackFalse","hasFallbackRootParams","namedRegex","destination","cacheComponents","shouldSkipSuffixes","RegExp","escapeStringRegexp","segmentRoute","prefetchSegmentDataRoutes","needsMiddlewareResolveRoutes","dataRoutePages","Set","dataRoutes","sortedDataPages","sortSortableRoutes","includeSuffix","isDataRoute","buildRewriteItem","converted","convertRewrites","regex","src","internal","modifyRouteRegex","dest","info","rewrites","beforeFiles","afterFiles","redirects","convertRedirects","Location","statusCode","status","getRedirectStatus","priority","convertHeaders","projectDir","repoRoot"],"mappings":";;;;+BAuYsBA;;;eAAAA;;;6DAvYL;iEACF;qBACe;6DACT;uBACgB;+BACP;gCACC;kCAEE;wBACF;0BAGE;2BACkB;mCACjB;8BAK3B;4BAmBA;qCAC6B;+BACN;gCACsB;4BACjB;8BACA;gCACA;qBACL;6BACG;oCACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmU7B,SAASC,mBACPC,MAA0B,EAC1BC,OAAuB;IAEvB,yCAAyC;IACzC,IAAID,OAAOE,QAAQ,EAAE;QACnB,KAAK,MAAMC,UAAU;eAChBF,QAAQG,KAAK;eACbH,QAAQI,QAAQ;eAChBJ,QAAQK,QAAQ;eAChBL,QAAQM,SAAS;eACjBN,QAAQO,UAAU;eAClBP,QAAQQ,WAAW;SACvB,CAAE;YACDN,OAAOO,QAAQ,GACbC,IAAAA,4BAAa,EAACR,OAAOO,QAAQ,EAAEV,OAAOE,QAAQ,EAAEU,OAAO,CAAC,OAAO,OAC/D;QACJ;IACF;AACF;AAEO,eAAed,oBAAoB,EACxCe,GAAG,EACHb,MAAM,EACNc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