Rocky_Mountain_Vending/.pnpm-store/v10/files/27/081cb594dd68b251f404c246625599fb53c5d9d7bd5b8fce90f945630824edc9668faff5ef5106d9040866a0ed45e414d59364250e86e02a24b48640450cae
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

1 line
No EOL
84 KiB
Text

{"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 =\n (output.pathname === '/' ? '/index' : 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 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 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:\n (output.pathname === '/' ? '/index' : output.pathname) + '.rsc',\n id: (output.id === '/' ? '/index' : 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 segmentsDir = path.join(\n appDistDir,\n `${route}${prefetchSegmentDirSuffix}`\n )\n\n for (const segmentPath of meta.segmentPaths) {\n const outputSegmentPath =\n path.join(route + prefetchSegmentDirSuffix, 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 meta: AppRouteMeta = isAppPage\n ? JSON.parse(\n await fs\n .readFile(path.join(appDistDir, `${route}.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 `${route === '/' ? 'index' : 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 `${route === '/' ? 'index' : 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 (\n appPageKeys &&\n appPageKeys.length > 0 &&\n (config.experimental.cacheComponents ||\n config.experimental.clientSegmentCache)\n ) {\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 destination = path.posix.join(\n '/',\n config.basePath,\n ...(dataRoutePages.has(page) ? [`_next/data`, buildId] : ''),\n ...(page === '/'\n ? [shouldLocalize ? '$nextLocale.json' : 'index.json']\n : [\n shouldLocalize ? '$nextLocale' : '',\n page +\n '.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","edgeFunctionHandlers","isMiddlewareFilename","functions","pagesDistDir","pageOutputMap","rscFallbackPath","length","writeFile","hasOwnProperty","normalizePagePath","pageFile","i18n","locale","locales","localePage","localeOutput","staticOutput","pageTraceFile","catch","err","code","Log","warn","functionConfig","maxDuration","preferredRegion","regions","dataPathname","middlewareFile","middlewareTrace","appOutputMap","appDistDir","normalizedPage","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","segmentsDir","segmentPath","outputSegmentPath","fallbackPathname","PRERENDER","parentOutputId","groupId","initialExpiration","initialRevalidate","initialHeaders","vary","prerenderGroupId","getAppRouteMeta","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","clientSegmentCache","shouldSkipSuffixes","RegExp","escapeStringRegexp","segmentRoute","prefetchSegmentDataRoutes","needsMiddlewareResolveRoutes","dataRoutePages","Set","dataRoutes","sortedDataPages","sortSortableRoutes","includeSuffix","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,OAAO,EACPC,YAAY,EACZC,OAAO,EACPC,QAAQ,EACRC,WAAW,EACXC,WAAW,EACXC,WA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