{"version":3,"sources":["../../../src/build/analysis/get-page-static-info.ts"],"sourcesContent":["import type { NextConfig } from '../../server/config-shared'\nimport type { RouteHas } from '../../lib/load-custom-routes'\n\nimport { promises as fs } from 'fs'\nimport { relative } from 'path'\nimport { LRUCache } from '../../server/lib/lru-cache'\nimport {\n extractExportedConstValue,\n UnsupportedValueError,\n} from './extract-const-value'\nimport { parseModule } from './parse-module'\nimport * as Log from '../output/log'\nimport {\n SERVER_RUNTIME,\n MIDDLEWARE_FILENAME,\n PROXY_FILENAME,\n} from '../../lib/constants'\nimport { tryToParsePath } from '../../lib/try-to-parse-path'\nimport { isAPIRoute } from '../../lib/is-api-route'\nimport { isEdgeRuntime } from '../../lib/is-edge-runtime'\nimport { RSC_MODULE_TYPES } from '../../shared/lib/constants'\nimport type { RSCMeta } from '../webpack/loaders/get-module-build-info'\nimport { PAGE_TYPES } from '../../lib/page-types'\nimport {\n AppSegmentConfigSchemaKeys,\n parseAppSegmentConfig,\n type AppSegmentConfig,\n} from '../segment-config/app/app-segment-config'\nimport { reportZodError } from '../../shared/lib/zod'\nimport {\n PagesSegmentConfigSchemaKeys,\n parsePagesSegmentConfig,\n type PagesSegmentConfig,\n type PagesSegmentConfigConfig,\n} from '../segment-config/pages/pages-segment-config'\nimport {\n MiddlewareConfigInputSchema,\n SourceSchema,\n type MiddlewareConfigMatcherInput,\n} from '../segment-config/middleware/middleware-config'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport { normalizePagePath } from '../../shared/lib/page-path/normalize-page-path'\nimport { isProxyFile } from '../utils'\n\nconst PARSE_PATTERN =\n /(? | undefined\n runtime: AppSegmentConfig['runtime'] | undefined\n preferredRegion: AppSegmentConfig['preferredRegion'] | undefined\n maxDuration: number | undefined\n hadUnsupportedValue: boolean\n}\n\nexport interface PagesPageStaticInfo {\n type: PAGE_TYPES.PAGES\n getStaticProps?: boolean\n getServerSideProps?: boolean\n rsc?: RSCModuleType\n generateStaticParams?: boolean\n generateSitemaps?: boolean\n generateImageMetadata?: boolean\n middleware?: ProxyConfig\n config:\n | (Omit & {\n config?: Omit\n })\n | undefined\n runtime: PagesSegmentConfig['runtime'] | undefined\n preferredRegion: PagesSegmentConfigConfig['regions'] | undefined\n maxDuration: number | undefined\n hadUnsupportedValue: boolean\n}\n\nexport type PageStaticInfo = AppPageStaticInfo | PagesPageStaticInfo\n\nconst CLIENT_MODULE_LABEL =\n /\\/\\* __next_internal_client_entry_do_not_use__ ([^ ]*) (cjs|auto) \\*\\//\n\nconst ACTION_MODULE_LABEL =\n /\\/\\* __next_internal_action_entry_do_not_use__ (\\{[^}]+\\}) \\*\\//\n\nconst CLIENT_DIRECTIVE = 'use client'\nconst SERVER_ACTION_DIRECTIVE = 'use server'\n\nexport type RSCModuleType = 'server' | 'client'\nexport function getRSCModuleInformation(\n source: string,\n isReactServerLayer: boolean\n): RSCMeta {\n const actionsJson = source.match(ACTION_MODULE_LABEL)\n const parsedActionsMeta = actionsJson\n ? (JSON.parse(actionsJson[1]) as Record)\n : undefined\n const clientInfoMatch = source.match(CLIENT_MODULE_LABEL)\n const isClientRef = !!clientInfoMatch\n\n if (!isReactServerLayer) {\n return {\n type: RSC_MODULE_TYPES.client,\n actionIds: parsedActionsMeta,\n isClientRef,\n }\n }\n\n const clientRefsString = clientInfoMatch?.[1]\n const clientRefs = clientRefsString ? clientRefsString.split(',') : []\n const clientEntryType = clientInfoMatch?.[2] as 'cjs' | 'auto' | undefined\n\n const type = clientInfoMatch\n ? RSC_MODULE_TYPES.client\n : RSC_MODULE_TYPES.server\n\n return {\n type,\n actionIds: parsedActionsMeta,\n clientRefs,\n clientEntryType,\n isClientRef,\n }\n}\n\n/**\n * Receives a parsed AST from SWC and checks if it belongs to a module that\n * requires a runtime to be specified. Those are:\n * - Modules with `export function getStaticProps | getServerSideProps`\n * - Modules with `export { getStaticProps | getServerSideProps } `\n * - Modules with `export const runtime = ...`\n */\nfunction checkExports(\n ast: any,\n expectedExports: string[],\n page: string\n): {\n getStaticProps?: boolean\n getServerSideProps?: boolean\n generateImageMetadata?: boolean\n generateSitemaps?: boolean\n generateStaticParams?: boolean\n directives?: Set\n exports?: Set\n} {\n const exportsSet = new Set([\n 'getStaticProps',\n 'getServerSideProps',\n 'generateImageMetadata',\n 'generateSitemaps',\n 'generateStaticParams',\n ])\n if (!Array.isArray(ast?.body)) {\n return {}\n }\n\n try {\n let getStaticProps: boolean = false\n let getServerSideProps: boolean = false\n let generateImageMetadata: boolean = false\n let generateSitemaps: boolean = false\n let generateStaticParams = false\n let exports = new Set()\n let directives = new Set()\n let hasLeadingNonDirectiveNode = false\n\n for (const node of ast.body) {\n // There should be no non-string literals nodes before directives\n if (\n node.type === 'ExpressionStatement' &&\n node.expression.type === 'StringLiteral'\n ) {\n if (!hasLeadingNonDirectiveNode) {\n const directive = node.expression.value\n if (CLIENT_DIRECTIVE === directive) {\n directives.add('client')\n }\n if (SERVER_ACTION_DIRECTIVE === directive) {\n directives.add('server')\n }\n }\n } else {\n hasLeadingNonDirectiveNode = true\n }\n if (\n node.type === 'ExportDeclaration' &&\n node.declaration?.type === 'VariableDeclaration'\n ) {\n for (const declaration of node.declaration?.declarations) {\n if (expectedExports.includes(declaration.id.value)) {\n exports.add(declaration.id.value)\n }\n }\n }\n\n if (\n node.type === 'ExportDeclaration' &&\n node.declaration?.type === 'FunctionDeclaration' &&\n exportsSet.has(node.declaration.identifier?.value)\n ) {\n const id = node.declaration.identifier.value\n getServerSideProps = id === 'getServerSideProps'\n getStaticProps = id === 'getStaticProps'\n generateImageMetadata = id === 'generateImageMetadata'\n generateSitemaps = id === 'generateSitemaps'\n generateStaticParams = id === 'generateStaticParams'\n }\n\n if (\n node.type === 'ExportDeclaration' &&\n node.declaration?.type === 'VariableDeclaration'\n ) {\n const id = node.declaration?.declarations[0]?.id.value\n if (exportsSet.has(id)) {\n getServerSideProps = id === 'getServerSideProps'\n getStaticProps = id === 'getStaticProps'\n generateImageMetadata = id === 'generateImageMetadata'\n generateSitemaps = id === 'generateSitemaps'\n generateStaticParams = id === 'generateStaticParams'\n }\n }\n\n if (node.type === 'ExportNamedDeclaration') {\n for (const specifier of node.specifiers) {\n if (\n specifier.type === 'ExportSpecifier' &&\n specifier.orig?.type === 'Identifier'\n ) {\n const value = specifier.orig.value\n\n if (!getServerSideProps && value === 'getServerSideProps') {\n getServerSideProps = true\n }\n if (!getStaticProps && value === 'getStaticProps') {\n getStaticProps = true\n }\n if (!generateImageMetadata && value === 'generateImageMetadata') {\n generateImageMetadata = true\n }\n if (!generateSitemaps && value === 'generateSitemaps') {\n generateSitemaps = true\n }\n if (!generateStaticParams && value === 'generateStaticParams') {\n generateStaticParams = true\n }\n if (expectedExports.includes(value) && !exports.has(value)) {\n // An export was found that was actually a re-export, and not a\n // literal value. We should warn here.\n Log.warn(\n `Next.js can't recognize the exported \\`${value}\\` field in \"${page}\", it may be re-exported from another file. The default config will be used instead.`\n )\n }\n }\n }\n }\n }\n\n return {\n getStaticProps,\n getServerSideProps,\n generateImageMetadata,\n generateSitemaps,\n generateStaticParams,\n directives,\n exports,\n }\n } catch {}\n\n return {}\n}\n\nfunction validateMiddlewareProxyExports({\n ast,\n page,\n pageFilePath,\n isDev,\n}: {\n ast: any\n page: string\n pageFilePath: string\n isDev: boolean\n}): void {\n // Check if this is middleware/proxy\n const isMiddleware =\n page === `/${MIDDLEWARE_FILENAME}` || page === `/src/${MIDDLEWARE_FILENAME}`\n const isProxy =\n page === `/${PROXY_FILENAME}` || page === `/src/${PROXY_FILENAME}`\n\n if (!isMiddleware && !isProxy) {\n return\n }\n\n if (!ast || !Array.isArray(ast.body)) {\n return\n }\n\n const fileName = isProxy ? PROXY_FILENAME : MIDDLEWARE_FILENAME\n\n // Parse AST to get export info (since checkExports doesn't return middleware/proxy info)\n let hasDefaultExport = false\n let hasMiddlewareExport = false\n let hasProxyExport = false\n\n for (const node of ast.body) {\n if (\n node.type === 'ExportDefaultDeclaration' ||\n node.type === 'ExportDefaultExpression'\n ) {\n hasDefaultExport = true\n }\n\n if (\n node.type === 'ExportDeclaration' &&\n node.declaration?.type === 'FunctionDeclaration'\n ) {\n const id = node.declaration.identifier?.value\n if (id === 'middleware') {\n hasMiddlewareExport = true\n }\n if (id === 'proxy') {\n hasProxyExport = true\n }\n }\n\n if (\n node.type === 'ExportDeclaration' &&\n node.declaration?.type === 'VariableDeclaration'\n ) {\n const id = node.declaration?.declarations[0]?.id.value\n if (id === 'middleware') {\n hasMiddlewareExport = true\n }\n if (id === 'proxy') {\n hasProxyExport = true\n }\n }\n\n if (node.type === 'ExportNamedDeclaration') {\n for (const specifier of node.specifiers) {\n if (\n specifier.type === 'ExportSpecifier' &&\n specifier.orig?.type === 'Identifier'\n ) {\n // Use the exported name if it exists (for aliased exports like `export { foo as proxy }`),\n // otherwise fall back to the original name (for simple re-exports like `export { proxy }`)\n const exportedIdentifier = specifier.exported || specifier.orig\n const value = exportedIdentifier.value\n if (value === 'middleware') {\n hasMiddlewareExport = true\n }\n if (value === 'proxy') {\n hasProxyExport = true\n }\n }\n }\n }\n }\n\n const hasValidExport =\n hasDefaultExport ||\n (isMiddleware && hasMiddlewareExport) ||\n (isProxy && hasProxyExport)\n\n const relativePath = relative(process.cwd(), pageFilePath)\n const resolvedPath = relativePath.startsWith('.')\n ? relativePath\n : `./${relativePath}`\n\n if (!hasValidExport) {\n const message =\n `The file \"${resolvedPath}\" must export a function, either as a default export or as a named \"${fileName}\" export.\\n` +\n `This function is what Next.js runs for every request handled by this ${fileName === 'proxy' ? 'proxy (previously called middleware)' : 'middleware'}.\\n\\n` +\n `Why this happens:\\n` +\n (isProxy\n ? \"- You are migrating from `middleware` to `proxy`, but haven't updated the exported function.\\n\"\n : '') +\n `- The file exists but doesn't export a function.\\n` +\n `- The export is not a function (e.g., an object or constant).\\n` +\n `- There's a syntax error preventing the export from being recognized.\\n\\n` +\n `To fix it:\\n` +\n `- Ensure this file has either a default or \"${fileName}\" function export.\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/middleware-to-proxy`\n\n if (isDev) {\n // errorOnce as proxy/middleware runs per request including multiple\n // internal _next/ routes and spams logs.\n Log.errorOnce(message)\n } else {\n throw new Error(message)\n }\n }\n}\n\nasync function tryToReadFile(filePath: string, shouldThrow: boolean) {\n try {\n return await fs.readFile(filePath, {\n encoding: 'utf8',\n })\n } catch (error: any) {\n if (shouldThrow) {\n error.message = `Next.js ERROR: Failed to read file ${filePath}:\\n${error.message}`\n throw error\n }\n }\n}\n\n/**\n * @internal - required to exclude zod types from the build\n */\nexport function getMiddlewareMatchers(\n matcherOrMatchers: MiddlewareConfigMatcherInput,\n nextConfig: Pick\n): ProxyMatcher[] {\n const matchers = Array.isArray(matcherOrMatchers)\n ? matcherOrMatchers\n : [matcherOrMatchers]\n\n const { i18n } = nextConfig\n\n return matchers.map((matcher) => {\n matcher = typeof matcher === 'string' ? { source: matcher } : matcher\n\n const originalSource = matcher.source\n\n let { source, ...rest } = matcher\n\n const isRoot = source === '/'\n\n if (i18n?.locales && matcher.locale !== false) {\n source = `/:nextInternalLocale((?!_next/)[^/.]{1,})${\n isRoot ? '' : source\n }`\n }\n\n source = `/:nextData(_next/data/[^/]{1,})?${source}${\n isRoot\n ? `(${nextConfig.i18n ? '|\\\\.json|' : ''}/?index|/?index\\\\.json)?`\n : '{(\\\\.json)}?'\n }`\n\n if (nextConfig.basePath) {\n source = `${nextConfig.basePath}${source}`\n }\n\n // Validate that the source is still.\n const result = SourceSchema.safeParse(source)\n if (!result.success) {\n reportZodError('Failed to parse middleware source', result.error)\n\n // We need to exit here because middleware being built occurs before we\n // finish setting up the server. Exiting here is the only way to ensure\n // that we don't hang.\n process.exit(1)\n }\n\n return {\n ...rest,\n // We know that parsed.regexStr is not undefined because we already\n // checked that the source is valid.\n regexp: tryToParsePath(result.data).regexStr!,\n originalSource: originalSource || source,\n }\n })\n}\n\nfunction parseMiddlewareConfig(\n page: string,\n rawConfig: unknown,\n nextConfig: NextConfig\n): ProxyConfig {\n // If there's no config to parse, then return nothing.\n if (typeof rawConfig !== 'object' || !rawConfig) return {}\n\n const input = MiddlewareConfigInputSchema.safeParse(rawConfig)\n if (!input.success) {\n reportZodError(`${page} contains invalid middleware config`, input.error)\n\n // We need to exit here because middleware being built occurs before we\n // finish setting up the server. Exiting here is the only way to ensure\n // that we don't hang.\n process.exit(1)\n }\n\n const config: ProxyConfig = {}\n\n if (input.data.matcher) {\n config.matchers = getMiddlewareMatchers(input.data.matcher, nextConfig)\n }\n\n if (input.data.unstable_allowDynamic) {\n config.unstable_allowDynamic = Array.isArray(\n input.data.unstable_allowDynamic\n )\n ? input.data.unstable_allowDynamic\n : [input.data.unstable_allowDynamic]\n }\n\n if (input.data.regions) {\n config.regions = input.data.regions\n }\n\n return config\n}\n\nconst apiRouteWarnings = new LRUCache(250)\nfunction warnAboutExperimentalEdge(apiRoute: string | null) {\n if (\n process.env.NODE_ENV === 'production' &&\n process.env.NEXT_PRIVATE_BUILD_WORKER === '1'\n ) {\n return\n }\n\n if (apiRoute && apiRouteWarnings.has(apiRoute)) {\n return\n }\n\n Log.warn(\n apiRoute\n ? `${apiRoute} provided runtime 'experimental-edge'. It can be updated to 'edge' instead.`\n : `You are using an experimental edge runtime, the API might change.`\n )\n\n if (apiRoute) {\n apiRouteWarnings.set(apiRoute, 1)\n }\n}\n\nlet hadUnsupportedValue = false\nconst warnedUnsupportedValueMap = new LRUCache(250, () => 1)\n\nfunction warnAboutUnsupportedValue(\n pageFilePath: string,\n page: string | undefined,\n error: UnsupportedValueError\n) {\n hadUnsupportedValue = true\n const isProductionBuild = process.env.NODE_ENV === 'production'\n if (\n // we only log for the server compilation so it's not\n // duplicated due to webpack build worker having fresh\n // module scope for each compiler\n process.env.NEXT_COMPILER_NAME !== 'server' ||\n (isProductionBuild && warnedUnsupportedValueMap.has(pageFilePath))\n ) {\n return\n }\n warnedUnsupportedValueMap.set(pageFilePath, true)\n\n const message =\n `Next.js can't recognize the exported \\`config\\` field in ` +\n (page ? `route \"${page}\"` : `\"${pageFilePath}\"`) +\n ':\\n' +\n error.message +\n (error.path ? ` at \"${error.path}\"` : '') +\n '.\\n' +\n 'Read More - https://nextjs.org/docs/messages/invalid-page-config'\n\n // for a build we use `Log.error` instead of throwing\n // so that all errors can be logged before exiting the process\n if (isProductionBuild) {\n Log.error(message)\n } else {\n throw new Error(message)\n }\n}\n\ntype GetPageStaticInfoParams = {\n pageFilePath: string\n nextConfig: Partial\n isDev: boolean\n page: string\n pageType: PAGE_TYPES\n}\n\nexport async function getAppPageStaticInfo({\n pageFilePath,\n nextConfig,\n isDev,\n page,\n}: GetPageStaticInfoParams): Promise {\n const content = await tryToReadFile(pageFilePath, !isDev)\n if (!content || !PARSE_PATTERN.test(content)) {\n return {\n type: PAGE_TYPES.APP,\n config: undefined,\n runtime: undefined,\n preferredRegion: undefined,\n maxDuration: undefined,\n hadUnsupportedValue: false,\n }\n }\n\n const ast = await parseModule(pageFilePath, content)\n validateMiddlewareProxyExports({\n ast,\n page,\n pageFilePath,\n isDev,\n })\n\n const {\n generateStaticParams,\n generateImageMetadata,\n generateSitemaps,\n exports,\n directives,\n } = checkExports(ast, AppSegmentConfigSchemaKeys, page)\n\n const { type: rsc } = getRSCModuleInformation(content, true)\n\n const exportedConfig: Record = {}\n if (exports) {\n for (const property of exports) {\n try {\n exportedConfig[property] = extractExportedConstValue(ast, property)\n } catch (e) {\n if (e instanceof UnsupportedValueError) {\n warnAboutUnsupportedValue(pageFilePath, page, e)\n }\n }\n }\n }\n\n try {\n exportedConfig.config = extractExportedConstValue(ast, 'config')\n } catch (e) {\n if (e instanceof UnsupportedValueError) {\n warnAboutUnsupportedValue(pageFilePath, page, e)\n }\n // `export config` doesn't exist, or other unknown error thrown by swc, silence them\n }\n\n const route = normalizeAppPath(page)\n const config = parseAppSegmentConfig(exportedConfig, route)\n\n // Prevent edge runtime and generateStaticParams in the same file.\n if (isEdgeRuntime(config.runtime) && generateStaticParams) {\n throw new Error(\n `Page \"${page}\" cannot use both \\`export const runtime = 'edge'\\` and export \\`generateStaticParams\\`.`\n )\n }\n\n // Prevent use client and generateStaticParams in the same file.\n if (directives?.has('client') && generateStaticParams) {\n throw new Error(\n `Page \"${page}\" cannot use both \"use client\" and export function \"generateStaticParams()\".`\n )\n }\n\n if (\n 'unstable_prefetch' in config &&\n (!nextConfig.cacheComponents ||\n // don't allow in `clientSegmentCache: 'client-only'` mode\n nextConfig.experimental?.clientSegmentCache !== true)\n ) {\n throw new Error(\n `Page \"${page}\" cannot use \\`export const unstable_prefetch = ...\\` without enabling \\`cacheComponents\\` and \\`experimental.clientSegmentCache\\`.`\n )\n }\n\n return {\n type: PAGE_TYPES.APP,\n rsc,\n generateImageMetadata,\n generateSitemaps,\n generateStaticParams,\n config,\n middleware: parseMiddlewareConfig(page, exportedConfig.config, nextConfig),\n runtime: config.runtime,\n preferredRegion: config.preferredRegion,\n maxDuration: config.maxDuration,\n hadUnsupportedValue,\n }\n}\n\nexport async function getPagesPageStaticInfo({\n pageFilePath,\n nextConfig,\n isDev,\n page,\n}: GetPageStaticInfoParams): Promise {\n const content = await tryToReadFile(pageFilePath, !isDev)\n if (!content || !PARSE_PATTERN.test(content)) {\n return {\n type: PAGE_TYPES.PAGES,\n config: undefined,\n runtime: undefined,\n preferredRegion: undefined,\n maxDuration: undefined,\n hadUnsupportedValue: false,\n }\n }\n\n const ast = await parseModule(pageFilePath, content)\n validateMiddlewareProxyExports({\n ast,\n page,\n pageFilePath,\n isDev,\n })\n\n const { getServerSideProps, getStaticProps, exports } = checkExports(\n ast,\n PagesSegmentConfigSchemaKeys,\n page\n )\n\n const { type: rsc } = getRSCModuleInformation(content, true)\n\n const exportedConfig: Record = {}\n if (exports) {\n for (const property of exports) {\n try {\n exportedConfig[property] = extractExportedConstValue(ast, property)\n } catch (e) {\n if (e instanceof UnsupportedValueError) {\n warnAboutUnsupportedValue(pageFilePath, page, e)\n }\n }\n }\n }\n\n try {\n exportedConfig.config = extractExportedConstValue(ast, 'config')\n } catch (e) {\n if (e instanceof UnsupportedValueError) {\n warnAboutUnsupportedValue(pageFilePath, page, e)\n }\n // `export config` doesn't exist, or other unknown error thrown by swc, silence them\n }\n\n // Validate the config.\n const route = normalizePagePath(page)\n const config = parsePagesSegmentConfig(exportedConfig, route)\n const isAnAPIRoute = isAPIRoute(route)\n\n let resolvedRuntime = config.runtime ?? config.config?.runtime\n\n if (isProxyFile(page) && resolvedRuntime) {\n const relativePath = relative(process.cwd(), pageFilePath)\n const resolvedPath = relativePath.startsWith('.')\n ? relativePath\n : `./${relativePath}`\n const message = `Route segment config is not allowed in Proxy file at \"${resolvedPath}\". Proxy always runs on Node.js runtime. Learn more: https://nextjs.org/docs/messages/middleware-to-proxy`\n\n if (isDev) {\n // errorOnce as proxy/middleware runs per request including multiple\n // internal _next/ routes and spams logs.\n Log.errorOnce(message)\n resolvedRuntime = SERVER_RUNTIME.nodejs\n } else {\n throw new Error(message)\n }\n }\n\n if (resolvedRuntime === SERVER_RUNTIME.experimentalEdge) {\n warnAboutExperimentalEdge(isAnAPIRoute ? page! : null)\n }\n\n if (\n !isProxyFile(page) &&\n resolvedRuntime === SERVER_RUNTIME.edge &&\n page &&\n !isAnAPIRoute\n ) {\n const message = `Page ${page} provided runtime 'edge', the edge runtime for rendering is currently experimental. Use runtime 'experimental-edge' instead.`\n if (isDev) {\n Log.error(message)\n } else {\n throw new Error(message)\n }\n }\n\n return {\n type: PAGE_TYPES.PAGES,\n getStaticProps,\n getServerSideProps,\n rsc,\n config,\n middleware: parseMiddlewareConfig(page, exportedConfig.config, nextConfig),\n runtime: resolvedRuntime,\n preferredRegion: config.config?.regions,\n maxDuration: config.maxDuration ?? config.config?.maxDuration,\n hadUnsupportedValue,\n }\n}\n\n/**\n * For a given pageFilePath and nextConfig, if the config supports it, this\n * function will read the file and return the runtime that should be used.\n * It will look into the file content only if the page *requires* a runtime\n * to be specified, that is, when gSSP or gSP is used.\n * Related discussion: https://github.com/vercel/next.js/discussions/34179\n */\nexport async function getPageStaticInfo(\n params: GetPageStaticInfoParams\n): Promise {\n if (params.pageType === PAGE_TYPES.APP) {\n return getAppPageStaticInfo(params)\n }\n\n return getPagesPageStaticInfo(params)\n}\n"],"names":["getAppPageStaticInfo","getMiddlewareMatchers","getPageStaticInfo","getPagesPageStaticInfo","getRSCModuleInformation","PARSE_PATTERN","CLIENT_MODULE_LABEL","ACTION_MODULE_LABEL","CLIENT_DIRECTIVE","SERVER_ACTION_DIRECTIVE","source","isReactServerLayer","actionsJson","match","parsedActionsMeta","JSON","parse","undefined","clientInfoMatch","isClientRef","type","RSC_MODULE_TYPES","client","actionIds","clientRefsString","clientRefs","split","clientEntryType","server","checkExports","ast","expectedExports","page","exportsSet","Set","Array","isArray","body","getStaticProps","getServerSideProps","generateImageMetadata","generateSitemaps","generateStaticParams","exports","directives","hasLeadingNonDirectiveNode","node","expression","directive","value","add","declaration","declarations","includes","id","has","identifier","specifier","specifiers","orig","Log","warn","validateMiddlewareProxyExports","pageFilePath","isDev","isMiddleware","MIDDLEWARE_FILENAME","isProxy","PROXY_FILENAME","fileName","hasDefaultExport","hasMiddlewareExport","hasProxyExport","exportedIdentifier","exported","hasValidExport","relativePath","relative","process","cwd","resolvedPath","startsWith","message","errorOnce","Error","tryToReadFile","filePath","shouldThrow","fs","readFile","encoding","error","matcherOrMatchers","nextConfig","matchers","i18n","map","matcher","originalSource","rest","isRoot","locales","locale","basePath","result","SourceSchema","safeParse","success","reportZodError","exit","regexp","tryToParsePath","data","regexStr","parseMiddlewareConfig","rawConfig","input","MiddlewareConfigInputSchema","config","unstable_allowDynamic","regions","apiRouteWarnings","LRUCache","warnAboutExperimentalEdge","apiRoute","env","NODE_ENV","NEXT_PRIVATE_BUILD_WORKER","set","hadUnsupportedValue","warnedUnsupportedValueMap","warnAboutUnsupportedValue","isProductionBuild","NEXT_COMPILER_NAME","path","content","test","PAGE_TYPES","APP","runtime","preferredRegion","maxDuration","parseModule","AppSegmentConfigSchemaKeys","rsc","exportedConfig","property","extractExportedConstValue","e","UnsupportedValueError","route","normalizeAppPath","parseAppSegmentConfig","isEdgeRuntime","cacheComponents","experimental","clientSegmentCache","middleware","PAGES","PagesSegmentConfigSchemaKeys","normalizePagePath","parsePagesSegmentConfig","isAnAPIRoute","isAPIRoute","resolvedRuntime","isProxyFile","SERVER_RUNTIME","nodejs","experimentalEdge","edge","params","pageType"],"mappings":";;;;;;;;;;;;;;;;;;IAgmBsBA,oBAAoB;eAApBA;;IAtKNC,qBAAqB;eAArBA;;IAkYMC,iBAAiB;eAAjBA;;IAvHAC,sBAAsB;eAAtBA;;IA3kBNC,uBAAuB;eAAvBA;;;oBAvHe;sBACN;0BACA;mCAIlB;6BACqB;6DACP;2BAKd;gCACwB;4BACJ;+BACG;4BACG;2BAEN;kCAKpB;qBACwB;oCAMxB;kCAKA;0BAC0B;mCACC;uBACN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE5B,MAAMC,gBACJ;AAmEF,MAAMC,sBACJ;AAEF,MAAMC,sBACJ;AAEF,MAAMC,mBAAmB;AACzB,MAAMC,0BAA0B;AAGzB,SAASL,wBACdM,MAAc,EACdC,kBAA2B;IAE3B,MAAMC,cAAcF,OAAOG,KAAK,CAACN;IACjC,MAAMO,oBAAoBF,cACrBG,KAAKC,KAAK,CAACJ,WAAW,CAAC,EAAE,IAC1BK;IACJ,MAAMC,kBAAkBR,OAAOG,KAAK,CAACP;IACrC,MAAMa,cAAc,CAAC,CAACD;IAEtB,IAAI,CAACP,oBAAoB;QACvB,OAAO;YACLS,MAAMC,4BAAgB,CAACC,MAAM;YAC7BC,WAAWT;YACXK;QACF;IACF;IAEA,MAAMK,mBAAmBN,mCAAAA,eAAiB,CAAC,EAAE;IAC7C,MAAMO,aAAaD,mBAAmBA,iBAAiBE,KAAK,CAAC,OAAO,EAAE;IACtE,MAAMC,kBAAkBT,mCAAAA,eAAiB,CAAC,EAAE;IAE5C,MAAME,OAAOF,kBACTG,4BAAgB,CAACC,MAAM,GACvBD,4BAAgB,CAACO,MAAM;IA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