Rocky_Mountain_Vending/.pnpm-store/v10/files/0a/5582133c2f86664178bfc3220fcf45be935a555925da4bde76093f8bc1f27cc6b1959da7efa97b2faccc9bc4cd3983b33a1670dc7f226610027f8200de22a9
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":["path","fs","pathToFileURL","Log","isMiddlewareFilename","RenderingMode","interopDefault","recursiveReadDir","isDynamicRoute","normalizeAppPath","AdapterOutputType","normalizePagePath","convertRedirects","convertRewrites","convertHeaders","HTML_CONTENT_TYPE_HEADER","JSON_CONTENT_TYPE_HEADER","NEXT_RESUME_HEADER","normalizeLocalePath","addPathPrefix","getRedirectStatus","modifyRouteRegex","getNamedRouteRegex","escapeStringRegexp","sortSortableRoutes","nodeFileTrace","defaultOverrides","makeIgnoreFn","normalizePathnames","config","outputs","basePath","output","pages","pagesApi","appPages","appRoutes","prerenders","staticFiles","pathname","replace","handleBuildComplete","dir","buildId","configOutDir","distDir","pageKeys","tracingRoot","adapterPath","appPageKeys","staticPages","nextVersion","hasStatic404","hasStatic500","routesManifest","serverPropsPages","hasNodeMiddleware","prerenderManifest","middlewareManifest","requiredServerFiles","hasInstrumentationHook","functionsConfigManifest","adapterMod","require","resolve","href","onBuildComplete","exportFiles","file","endsWith","startsWith","push","id","filePath","join","type","STATIC_FILE","posix","sharedNodeAssets","pagesSharedNodeAssets","appPagesSharedNodeAssets","sharedTraceIgnores","sharedIgnoreFn","fileOutputPath","relative","moduleTypes","currentDependencies","modulePath","contextDir","dirname","item","readdir","match","fileList","esmFileList","base","ignore","forEach","add","rootRelativeFilePath","necessaryNodeDependencies","Object","values","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","find","wasmAssets","env","handleFile","originalPath","wasm","matchers","map","source","originalSource","sourceRegex","regexp","has","missing","key","value","preview","previewModeId","middleware","rscPathname","edgeFunctionHandlers","functions","pagesDistDir","pageOutputMap","rscFallbackPath","length","writeFile","hasOwnProperty","pageFile","i18n","locale","locales","localePage","localeOutput","staticOutput","pageTraceFile","catch","err","code","warn","functionConfig","maxDuration","preferredRegion","regions","dataPathname","middlewareFile","middlewareTrace","appOutputMap","appDistDir","normalizedPage","getParentOutput","srcRoute","childRoute","allowMissing","normalizedSrcRoute","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","detectedLocale","currentFilePath","pprChain","experimental","ppr","undefined","parentFallbackMode","bypassFor","bypassToken","dataFilePath","PARTIALLY_STATIC","dynamicRoute","fallbackExpire","fallbackRevalidate","fallbackHeaders","fallbackStatus","currentOutput","staticErrorDocs","errorDoc","errorDocPath","defaultLocale","currentDocPath","dynamicDataRoutes","dynamicSegmentRoutes","getDestinationQuery","items","entries","fallbackFalseHasCondition","shouldLocalize","routeRegex","prefixRouteKeys","isFallbackFalse","hasFallbackRootParams","namedRegex","destination","cacheComponents","clientSegmentCache","shouldSkipSuffixes","RegExp","segmentRoute","prefetchSegmentDataRoutes","needsMiddlewareResolveRoutes","dataRoutePages","Set","dataRoutes","sortedDataPages","includeSuffix","buildRewriteItem","converted","regex","src","internal","dest","info","rewrites","beforeFiles","afterFiles","redirects","Location","statusCode","status","priority","projectDir","repoRoot"],"mappings":"AAAA,OAAOA,UAAU,OAAM;AACvB,OAAOC,QAAQ,cAAa;AAC5B,SAASC,aAAa,QAAQ,MAAK;AACnC,YAAYC,SAAS,gBAAe;AACpC,SAASC,oBAAoB,QAAQ,WAAU;AAC/C,SAASC,aAAa,QAAQ,oBAAmB;AACjD,SAASC,cAAc,QAAQ,4BAA2B;AAE1D,SAASC,gBAAgB,QAAQ,8BAA6B;AAC9D,SAASC,cAAc,QAAQ,gCAA+B;AAG9D,SAASC,gBAAgB,QAAQ,0CAAyC;AAC1E,SAASC,iBAAiB,QAAyB,6BAA4B;AAC/E,SAASC,iBAAiB,QAAQ,iDAAgD;AAClF,SACEC,gBAAgB,EAChBC,eAAe,EACfC,cAAc,QACT,2CAA0C;AAejD,SACEC,wBAAwB,EACxBC,wBAAwB,EACxBC,kBAAkB,QACb,sBAAqB;AAC5B,SAASC,mBAAmB,QAAQ,8CAA6C;AACjF,SAASC,aAAa,QAAQ,gDAA+C;AAC7E,SAASC,iBAAiB,EAAEC,gBAAgB,QAAQ,4BAA2B;AAC/E,SAASC,kBAAkB,QAAQ,4CAA2C;AAC9E,SAASC,kBAAkB,QAAQ,iCAAgC;AACnE,SAASC,kBAAkB,QAAQ,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