next 15.5.1-canary.32 → 15.5.1-canary.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/next +1 -1
- package/dist/build/index.js +2 -2
- package/dist/build/next-config-ts/transpile-config.js +25 -0
- package/dist/build/next-config-ts/transpile-config.js.map +1 -1
- package/dist/build/swc/index.js +1 -1
- package/dist/build/webpack-config.js +2 -2
- package/dist/client/app-bootstrap.js +1 -1
- package/dist/client/index.js +1 -1
- package/dist/compiled/next-server/pages-api-turbo.runtime.dev.js +1 -1
- package/dist/compiled/next-server/pages-api-turbo.runtime.dev.js.map +1 -1
- package/dist/compiled/next-server/pages-api.runtime.prod.js +1 -1
- package/dist/compiled/next-server/pages-api.runtime.prod.js.map +1 -1
- package/dist/compiled/next-server/pages-turbo.runtime.dev.js +1 -1
- package/dist/compiled/next-server/pages-turbo.runtime.dev.js.map +1 -1
- package/dist/compiled/next-server/pages.runtime.prod.js +1 -1
- package/dist/compiled/next-server/pages.runtime.prod.js.map +1 -1
- package/dist/esm/build/index.js +2 -2
- package/dist/esm/build/next-config-ts/transpile-config.js +26 -1
- package/dist/esm/build/next-config-ts/transpile-config.js.map +1 -1
- package/dist/esm/build/swc/index.js +1 -1
- package/dist/esm/build/webpack-config.js +2 -2
- package/dist/esm/client/app-bootstrap.js +1 -1
- package/dist/esm/client/index.js +1 -1
- package/dist/esm/server/config-shared.js +1 -1
- package/dist/esm/server/config-shared.js.map +1 -1
- package/dist/esm/server/dev/hot-reloader-turbopack.js +1 -1
- package/dist/esm/server/dev/hot-reloader-webpack.js +1 -1
- package/dist/esm/server/lib/app-info-log.js +1 -1
- package/dist/esm/server/lib/start-server.js +1 -1
- package/dist/esm/server/lib/utils.js +1 -1
- package/dist/esm/server/lib/utils.js.map +1 -1
- package/dist/esm/shared/lib/canary-only.js +1 -1
- package/dist/server/config-shared.d.ts +1 -3
- package/dist/server/config-shared.js +1 -1
- package/dist/server/config-shared.js.map +1 -1
- package/dist/server/dev/hot-reloader-turbopack.js +1 -1
- package/dist/server/dev/hot-reloader-webpack.js +1 -1
- package/dist/server/lib/app-info-log.js +1 -1
- package/dist/server/lib/start-server.js +1 -1
- package/dist/server/lib/utils.d.ts +7 -0
- package/dist/server/lib/utils.js +5 -6
- package/dist/server/lib/utils.js.map +1 -1
- package/dist/shared/lib/canary-only.js +1 -1
- package/dist/telemetry/anonymous-meta.js +1 -1
- package/dist/telemetry/events/session-stopped.js +2 -2
- package/dist/telemetry/events/version.js +2 -2
- package/package.json +15 -15
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/server/lib/utils.ts"],"sourcesContent":["import { parseArgs } from 'node:util'\nimport { InvalidArgumentError } from 'next/dist/compiled/commander'\n\nexport function printAndExit(message: string, code = 1) {\n if (code === 0) {\n console.log(message)\n } else {\n console.error(message)\n }\n\n return process.exit(code)\n}\n\nconst parseNodeArgs = (args: string[]) => {\n const { values, tokens } = parseArgs({ args, strict: false, tokens: true })\n\n // For the `NODE_OPTIONS`, we support arguments with values without the `=`\n // sign. We need to parse them manually.\n let orphan = null\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i]\n\n if (token.kind === 'option-terminator') {\n break\n }\n\n // When we encounter an option, if it's value is undefined, we should check\n // to see if the following tokens are positional parameters. If they are,\n // then the option is orphaned, and we can assign it.\n if (token.kind === 'option') {\n orphan = typeof token.value === 'undefined' ? token : null\n continue\n }\n\n // If the token isn't a positional one, then we can't assign it to the found\n // orphaned option.\n if (token.kind !== 'positional') {\n orphan = null\n continue\n }\n\n // If we don't have an orphan, then we can skip this token.\n if (!orphan) {\n continue\n }\n\n // If the token is a positional one, and it has a value, so add it to the\n // values object. If it already exists, append it with a space.\n if (orphan.name in values && typeof values[orphan.name] === 'string') {\n values[orphan.name] += ` ${token.value}`\n } else {\n values[orphan.name] = token.value\n }\n }\n\n return values\n}\n\n/**\n * Tokenizes the arguments string into an array of strings, supporting quoted\n * values and escaped characters.\n * Converted from: https://github.com/nodejs/node/blob/c29d53c5cfc63c5a876084e788d70c9e87bed880/src/node_options.cc#L1401\n *\n * @param input The arguments string to be tokenized.\n * @returns An array of strings with the tokenized arguments.\n */\nexport const tokenizeArgs = (input: string): string[] => {\n let args: string[] = []\n let isInString = false\n let willStartNewArg = true\n\n for (let i = 0; i < input.length; i++) {\n let char = input[i]\n\n // Skip any escaped characters in strings.\n if (char === '\\\\' && isInString) {\n // Ensure we don't have an escape character at the end.\n if (input.length === i + 1) {\n throw new Error('Invalid escape character at the end.')\n }\n\n // Skip the next character.\n char = input[++i]\n }\n // If we find a space outside of a string, we should start a new argument.\n else if (char === ' ' && !isInString) {\n willStartNewArg = true\n continue\n }\n\n // If we find a quote, we should toggle the string flag.\n else if (char === '\"') {\n isInString = !isInString\n continue\n }\n\n // If we're starting a new argument, we should add it to the array.\n if (willStartNewArg) {\n args.push(char)\n willStartNewArg = false\n }\n // Otherwise, add it to the last argument.\n else {\n args[args.length - 1] += char\n }\n }\n\n if (isInString) {\n throw new Error('Unterminated string')\n }\n\n return args\n}\n\n/**\n * Get the node options from the environment variable `NODE_OPTIONS` and returns\n * them as an array of strings.\n *\n * @returns An array of strings with the node options.\n */\nconst getNodeOptionsArgs = () => {\n if (!process.env.NODE_OPTIONS) return []\n\n return tokenizeArgs(process.env.NODE_OPTIONS)\n}\n\n/**\n * The debug address is in the form of `[host:]port`. The host is optional.\n */\ntype DebugAddress = {\n host: string | undefined\n port: number\n}\n\n/**\n * Formats the debug address into a string.\n */\nexport const formatDebugAddress = ({ host, port }: DebugAddress): string => {\n if (host) return `${host}:${port}`\n return `${port}`\n}\n\n/**\n * Get's the debug address from the `NODE_OPTIONS` environment variable. If the\n * address is not found, it returns the default host (`undefined`) and port\n * (`9229`).\n *\n * @returns An object with the host and port of the debug address.\n */\nexport const getParsedDebugAddress = (): DebugAddress => {\n const args = getNodeOptionsArgs()\n if (args.length === 0) return { host: undefined, port: 9229 }\n\n const parsed = parseNodeArgs(args)\n\n // We expect to find the debug port in one of these options. The first one\n // found will be used.\n const address =\n parsed.inspect ?? parsed['inspect-brk'] ?? parsed['inspect_brk']\n\n if (!address || typeof address !== 'string') {\n return { host: undefined, port: 9229 }\n }\n\n // The address is in the form of `[host:]port`. Let's parse the address.\n if (address.includes(':')) {\n const [host, port] = address.split(':')\n return { host, port: parseInt(port, 10) }\n }\n\n return { host: undefined, port: parseInt(address, 10) }\n}\n\n/**\n * Get the debug address from the `NODE_OPTIONS` environment variable and format\n * it into a string.\n *\n * @returns A string with the formatted debug address.\n */\nexport const getFormattedDebugAddress = () =>\n formatDebugAddress(getParsedDebugAddress())\n\n/**\n * Stringify the arguments to be used in a command line. It will ignore any\n * argument that has a value of `undefined`.\n *\n * @param args The arguments to be stringified.\n * @returns A string with the arguments.\n */\nexport function formatNodeOptions(\n args: Record<string, string | boolean | undefined>\n): string {\n return Object.entries(args)\n .map(([key, value]) => {\n if (value === true) {\n return `--${key}`\n }\n\n if (value) {\n return `--${key}=${\n // Values with spaces need to be quoted. We use JSON.stringify to\n // also escape any nested quotes.\n value.includes(' ') && !value.startsWith('\"')\n ? JSON.stringify(value)\n : value\n }`\n }\n\n return null\n })\n .filter((arg) => arg !== null)\n .join(' ')\n}\n\n/**\n * Get the node options from the `NODE_OPTIONS` environment variable and parse\n * them into an object without the inspect options.\n *\n * @returns An object with the parsed node options.\n */\nexport function getParsedNodeOptionsWithoutInspect() {\n const args = getNodeOptionsArgs()\n if (args.length === 0) return {}\n\n const parsed = parseNodeArgs(args)\n\n // Remove inspect options.\n delete parsed.inspect\n delete parsed['inspect-brk']\n delete parsed['inspect_brk']\n\n return parsed\n}\n\n/**\n * Get the node options from the `NODE_OPTIONS` environment variable and format\n * them into a string without the inspect options.\n *\n * @returns A string with the formatted node options.\n */\nexport function getFormattedNodeOptionsWithoutInspect() {\n const args = getParsedNodeOptionsWithoutInspect()\n if (Object.keys(args).length === 0) return ''\n\n return formatNodeOptions(args)\n}\n\n/**\n * Check if the value is a valid positive integer and parse it. If it's not, it will throw an error.\n *\n * @param value The value to be parsed.\n */\nexport function parseValidPositiveInteger(value: string): number {\n const parsedValue = parseInt(value, 10)\n\n if (isNaN(parsedValue) || !isFinite(parsedValue) || parsedValue < 0) {\n throw new InvalidArgumentError(`'${value}' is not a non-negative number.`)\n }\n return parsedValue\n}\n\nexport const RESTART_EXIT_CODE = 77\n\nexport type NodeInspectType = 'inspect' | 'inspect-brk' | undefined\n\n/**\n * Get the debug type from the `NODE_OPTIONS` environment variable.\n */\nexport function getNodeDebugType(): NodeInspectType {\n const args = [...process.execArgv, ...getNodeOptionsArgs()]\n if (args.length === 0) return\n\n const parsed = parseNodeArgs(args)\n\n if (parsed.inspect) return 'inspect'\n if (parsed['inspect-brk'] || parsed['inspect_brk']) return 'inspect-brk'\n}\n\n/**\n * Get the `max-old-space-size` value from the `NODE_OPTIONS` environment\n * variable.\n *\n * @returns The value of the `max-old-space-size` option as a number.\n */\nexport function getMaxOldSpaceSize() {\n const args = getNodeOptionsArgs()\n if (args.length === 0) return\n\n const parsed = parseNodeArgs(args)\n\n const size = parsed['max-old-space-size'] || parsed['max_old_space_size']\n if (!size || typeof size !== 'string') return\n\n return parseInt(size, 10)\n}\n"],"names":["parseArgs","InvalidArgumentError","printAndExit","message","code","console","log","error","process","exit","parseNodeArgs","args","values","tokens","strict","orphan","i","length","token","kind","value","name","tokenizeArgs","input","isInString","willStartNewArg","char","Error","push","getNodeOptionsArgs","env","NODE_OPTIONS","formatDebugAddress","host","port","getParsedDebugAddress","undefined","parsed","address","inspect","includes","split","parseInt","getFormattedDebugAddress","formatNodeOptions","Object","entries","map","key","startsWith","JSON","stringify","filter","arg","join","getParsedNodeOptionsWithoutInspect","getFormattedNodeOptionsWithoutInspect","keys","parseValidPositiveInteger","parsedValue","isNaN","isFinite","RESTART_EXIT_CODE","getNodeDebugType","execArgv","getMaxOldSpaceSize","size"],"mappings":"AAAA,SAASA,SAAS,QAAQ,YAAW;AACrC,SAASC,oBAAoB,QAAQ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OE,OAAO;IACrB,OAAOF,MAAM,CAAC,cAAc;IAC5B,OAAOA,MAAM,CAAC,cAAc;IAE5B,OAAOA;AACT;AAEA;;;;;CAKC,GACD,OAAO,SAASmB;IACd,MAAM7C,OAAO4C;IACb,IAAIV,OAAOY,IAAI,CAAC9C,MAAMM,MAAM,KAAK,GAAG,OAAO;IAE3C,OAAO2B,kBAAkBjC;AAC3B;AAEA;;;;CAIC,GACD,OAAO,SAAS+C,0BAA0BtC,KAAa;IACrD,MAAMuC,cAAcjB,SAAStB,OAAO;IAEpC,IAAIwC,MAAMD,gBAAgB,CAACE,SAASF,gBAAgBA,cAAc,GAAG;QACnE,MAAM,IAAI1D,qBAAqB,CAAC,CAAC,EAAEmB,MAAM,+BAA+B,CAAC;IAC3E;IACA,OAAOuC;AACT;AAEA,OAAO,MAAMG,oBAAoB,GAAE;AAInC;;CAEC,GACD,OAAO,SAASC;IACd,MAAMpD,OAAO;WAAIH,QAAQwD,QAAQ;WAAKnC;KAAqB;IAC3D,IAAIlB,KAAKM,MAAM,KAAK,GAAG;IAEvB,MAAMoB,SAAS3B,cAAcC;IAE7B,IAAI0B,OAAOE,OAAO,EAAE,OAAO;IAC3B,IAAIF,MAAM,CAAC,cAAc,IAAIA,MAAM,CAAC,cAAc,EAAE,OAAO;AAC7D;AAEA;;;;;CAKC,GACD,OAAO,SAAS4B;IACd,MAAMtD,OAAOkB;IACb,IAAIlB,KAAKM,MAAM,KAAK,GAAG;IAEvB,MAAMoB,SAAS3B,cAAcC;IAE7B,MAAMuD,OAAO7B,MAAM,CAAC,qBAAqB,IAAIA,MAAM,CAAC,qBAAqB;IACzE,IAAI,CAAC6B,QAAQ,OAAOA,SAAS,UAAU;IAEvC,OAAOxB,SAASwB,MAAM;AACxB","ignoreList":[0]}
|
1
|
+
{"version":3,"sources":["../../../src/server/lib/utils.ts"],"sourcesContent":["import { parseArgs } from 'node:util'\nimport { InvalidArgumentError } from 'next/dist/compiled/commander'\n\nexport function printAndExit(message: string, code = 1) {\n if (code === 0) {\n console.log(message)\n } else {\n console.error(message)\n }\n\n return process.exit(code)\n}\n\nconst parseNodeArgs = (args: string[]) => {\n const { values, tokens } = parseArgs({ args, strict: false, tokens: true })\n\n // For the `NODE_OPTIONS`, we support arguments with values without the `=`\n // sign. We need to parse them manually.\n let orphan = null\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i]\n\n if (token.kind === 'option-terminator') {\n break\n }\n\n // When we encounter an option, if it's value is undefined, we should check\n // to see if the following tokens are positional parameters. If they are,\n // then the option is orphaned, and we can assign it.\n if (token.kind === 'option') {\n orphan = typeof token.value === 'undefined' ? token : null\n continue\n }\n\n // If the token isn't a positional one, then we can't assign it to the found\n // orphaned option.\n if (token.kind !== 'positional') {\n orphan = null\n continue\n }\n\n // If we don't have an orphan, then we can skip this token.\n if (!orphan) {\n continue\n }\n\n // If the token is a positional one, and it has a value, so add it to the\n // values object. If it already exists, append it with a space.\n if (orphan.name in values && typeof values[orphan.name] === 'string') {\n values[orphan.name] += ` ${token.value}`\n } else {\n values[orphan.name] = token.value\n }\n }\n\n return values\n}\n\n/**\n * Tokenizes the arguments string into an array of strings, supporting quoted\n * values and escaped characters.\n * Converted from: https://github.com/nodejs/node/blob/c29d53c5cfc63c5a876084e788d70c9e87bed880/src/node_options.cc#L1401\n *\n * @param input The arguments string to be tokenized.\n * @returns An array of strings with the tokenized arguments.\n */\nexport const tokenizeArgs = (input: string): string[] => {\n let args: string[] = []\n let isInString = false\n let willStartNewArg = true\n\n for (let i = 0; i < input.length; i++) {\n let char = input[i]\n\n // Skip any escaped characters in strings.\n if (char === '\\\\' && isInString) {\n // Ensure we don't have an escape character at the end.\n if (input.length === i + 1) {\n throw new Error('Invalid escape character at the end.')\n }\n\n // Skip the next character.\n char = input[++i]\n }\n // If we find a space outside of a string, we should start a new argument.\n else if (char === ' ' && !isInString) {\n willStartNewArg = true\n continue\n }\n\n // If we find a quote, we should toggle the string flag.\n else if (char === '\"') {\n isInString = !isInString\n continue\n }\n\n // If we're starting a new argument, we should add it to the array.\n if (willStartNewArg) {\n args.push(char)\n willStartNewArg = false\n }\n // Otherwise, add it to the last argument.\n else {\n args[args.length - 1] += char\n }\n }\n\n if (isInString) {\n throw new Error('Unterminated string')\n }\n\n return args\n}\n\n/**\n * Get the node options from the environment variable `NODE_OPTIONS` and returns\n * them as an array of strings.\n *\n * @returns An array of strings with the node options.\n */\nexport const getNodeOptionsArgs = () => {\n if (!process.env.NODE_OPTIONS) return []\n\n return tokenizeArgs(process.env.NODE_OPTIONS)\n}\n\n/**\n * The debug address is in the form of `[host:]port`. The host is optional.\n */\ntype DebugAddress = {\n host: string | undefined\n port: number\n}\n\n/**\n * Formats the debug address into a string.\n */\nexport const formatDebugAddress = ({ host, port }: DebugAddress): string => {\n if (host) return `${host}:${port}`\n return `${port}`\n}\n\n/**\n * Get's the debug address from the `NODE_OPTIONS` environment variable. If the\n * address is not found, it returns the default host (`undefined`) and port\n * (`9229`).\n *\n * @returns An object with the host and port of the debug address.\n */\nexport const getParsedDebugAddress = (): DebugAddress => {\n const args = getNodeOptionsArgs()\n if (args.length === 0) return { host: undefined, port: 9229 }\n\n const parsed = parseNodeArgs(args)\n\n // We expect to find the debug port in one of these options. The first one\n // found will be used.\n const address =\n parsed.inspect ?? parsed['inspect-brk'] ?? parsed['inspect_brk']\n\n if (!address || typeof address !== 'string') {\n return { host: undefined, port: 9229 }\n }\n\n // The address is in the form of `[host:]port`. Let's parse the address.\n if (address.includes(':')) {\n const [host, port] = address.split(':')\n return { host, port: parseInt(port, 10) }\n }\n\n return { host: undefined, port: parseInt(address, 10) }\n}\n\n/**\n * Get the debug address from the `NODE_OPTIONS` environment variable and format\n * it into a string.\n *\n * @returns A string with the formatted debug address.\n */\nexport const getFormattedDebugAddress = () =>\n formatDebugAddress(getParsedDebugAddress())\n\n/**\n * Stringify the arguments to be used in a command line. It will ignore any\n * argument that has a value of `undefined`.\n *\n * @param args The arguments to be stringified.\n * @returns A string with the arguments.\n */\nexport function formatNodeOptions(\n args: Record<string, string | boolean | undefined>\n): string {\n return Object.entries(args)\n .map(([key, value]) => {\n if (value === true) {\n return `--${key}`\n }\n\n if (value) {\n return `--${key}=${\n // Values with spaces need to be quoted. We use JSON.stringify to\n // also escape any nested quotes.\n value.includes(' ') && !value.startsWith('\"')\n ? JSON.stringify(value)\n : value\n }`\n }\n\n return null\n })\n .filter((arg) => arg !== null)\n .join(' ')\n}\n\n/**\n * Get the node options from the `NODE_OPTIONS` environment variable and parse\n * them into an object without the inspect options.\n *\n * @returns An object with the parsed node options.\n */\nexport function getParsedNodeOptionsWithoutInspect() {\n const args = getNodeOptionsArgs()\n if (args.length === 0) return {}\n\n const parsed = parseNodeArgs(args)\n\n // Remove inspect options.\n delete parsed.inspect\n delete parsed['inspect-brk']\n delete parsed['inspect_brk']\n\n return parsed\n}\n\n/**\n * Get the node options from the `NODE_OPTIONS` environment variable and format\n * them into a string without the inspect options.\n *\n * @returns A string with the formatted node options.\n */\nexport function getFormattedNodeOptionsWithoutInspect() {\n const args = getParsedNodeOptionsWithoutInspect()\n if (Object.keys(args).length === 0) return ''\n\n return formatNodeOptions(args)\n}\n\n/**\n * Check if the value is a valid positive integer and parse it. If it's not, it will throw an error.\n *\n * @param value The value to be parsed.\n */\nexport function parseValidPositiveInteger(value: string): number {\n const parsedValue = parseInt(value, 10)\n\n if (isNaN(parsedValue) || !isFinite(parsedValue) || parsedValue < 0) {\n throw new InvalidArgumentError(`'${value}' is not a non-negative number.`)\n }\n return parsedValue\n}\n\nexport const RESTART_EXIT_CODE = 77\n\nexport type NodeInspectType = 'inspect' | 'inspect-brk' | undefined\n\n/**\n * Get the debug type from the `NODE_OPTIONS` environment variable.\n */\nexport function getNodeDebugType(): NodeInspectType {\n const args = [...process.execArgv, ...getNodeOptionsArgs()]\n if (args.length === 0) return\n\n const parsed = parseNodeArgs(args)\n\n if (parsed.inspect) return 'inspect'\n if (parsed['inspect-brk'] || parsed['inspect_brk']) return 'inspect-brk'\n}\n\n/**\n * Get the `max-old-space-size` value from the `NODE_OPTIONS` environment\n * variable.\n *\n * @returns The value of the `max-old-space-size` option as a number.\n */\nexport function getMaxOldSpaceSize() {\n const args = getNodeOptionsArgs()\n if (args.length === 0) return\n\n const parsed = parseNodeArgs(args)\n\n const size = parsed['max-old-space-size'] || parsed['max_old_space_size']\n if (!size || typeof size !== 'string') return\n\n return parseInt(size, 10)\n}\n"],"names":["parseArgs","InvalidArgumentError","printAndExit","message","code","console","log","error","process","exit","parseNodeArgs","args","values","tokens","strict","orphan","i","length","token","kind","value","name","tokenizeArgs","input","isInString","willStartNewArg","char","Error","push","getNodeOptionsArgs","env","NODE_OPTIONS","formatDebugAddress","host","port","getParsedDebugAddress","undefined","parsed","address","inspect","includes","split","parseInt","getFormattedDebugAddress","formatNodeOptions","Object","entries","map","key","startsWith","JSON","stringify","filter","arg","join","getParsedNodeOptionsWithoutInspect","getFormattedNodeOptionsWithoutInspect","keys","parseValidPositiveInteger","parsedValue","isNaN","isFinite","RESTART_EXIT_CODE","getNodeDebugType","execArgv","getMaxOldSpaceSize","size"],"mappings":"AAAA,SAASA,SAAS,QAAQ,YAAW;AACrC,SAASC,oBAAoB,QAAQ,+BAA8B;AAEnE,OAAO,SAASC,aAAaC,OAAe,EAAEC,OAAO,CAAC;IACpD,IAAIA,SAAS,GAAG;QACdC,QAAQC,GAAG,CAACH;IACd,OAAO;QACLE,QAAQE,KAAK,CAACJ;IAChB;IAEA,OAAOK,QAAQC,IAAI,CAACL;AACtB;AAEA,MAAMM,gBAAgB,CAACC;IACrB,MAAM,EAAEC,MAAM,EAAEC,MAAM,EAAE,GAAGb,UAAU;QAAEW;QAAMG,QAAQ;QAAOD,QAAQ;IAAK;IAEzE,2EAA2E;IAC3E,wCAAwC;IACxC,IAAIE,SAAS;IACb,IAAK,IAAIC,IAAI,GAAGA,IAAIH,OAAOI,MAAM,EAAED,IAAK;QACtC,MAAME,QAAQL,MAAM,CAACG,EAAE;QAEvB,IAAIE,MAAMC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OAAOuC;AACT;AAEA,OAAO,MAAMG,oBAAoB,GAAE;AAInC;;CAEC,GACD,OAAO,SAASC;IACd,MAAMpD,OAAO;WAAIH,QAAQwD,QAAQ;WAAKnC;KAAqB;IAC3D,IAAIlB,KAAKM,MAAM,KAAK,GAAG;IAEvB,MAAMoB,SAAS3B,cAAcC;IAE7B,IAAI0B,OAAOE,OAAO,EAAE,OAAO;IAC3B,IAAIF,MAAM,CAAC,cAAc,IAAIA,MAAM,CAAC,cAAc,EAAE,OAAO;AAC7D;AAEA;;;;;CAKC,GACD,OAAO,SAAS4B;IACd,MAAMtD,OAAOkB;IACb,IAAIlB,KAAKM,MAAM,KAAK,GAAG;IAEvB,MAAMoB,SAAS3B,cAAcC;IAE7B,MAAMuD,OAAO7B,MAAM,CAAC,qBAAqB,IAAIA,MAAM,CAAC,qBAAqB;IACzE,IAAI,CAAC6B,QAAQ,OAAOA,SAAS,UAAU;IAEvC,OAAOxB,SAASwB,MAAM;AACxB","ignoreList":[0]}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
export function isStableBuild() {
|
2
2
|
var _process_env___NEXT_VERSION;
|
3
|
-
return !((_process_env___NEXT_VERSION = "15.5.1-canary.
|
3
|
+
return !((_process_env___NEXT_VERSION = "15.5.1-canary.33") == null ? void 0 : _process_env___NEXT_VERSION.includes('canary')) && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
|
4
4
|
}
|
5
5
|
export class CanaryOnlyError extends Error {
|
6
6
|
constructor(arg){
|
@@ -710,8 +710,6 @@ export interface ExperimentalConfig {
|
|
710
710
|
/**
|
711
711
|
* When enabled, in dev mode, Next.js will send React's debug info through the
|
712
712
|
* WebSocket connection, instead of including it in the main RSC payload.
|
713
|
-
*
|
714
|
-
* @default true
|
715
713
|
*/
|
716
714
|
reactDebugChannel?: boolean;
|
717
715
|
/**
|
@@ -1335,7 +1333,7 @@ export declare const defaultConfig: Readonly<{
|
|
1335
1333
|
};
|
1336
1334
|
allowDevelopmentBuild: undefined;
|
1337
1335
|
reactCompiler: undefined;
|
1338
|
-
reactDebugChannel:
|
1336
|
+
reactDebugChannel: false;
|
1339
1337
|
staticGenerationRetryCount: undefined;
|
1340
1338
|
serverComponentsHmrCache: true;
|
1341
1339
|
staticGenerationMaxConcurrency: number;
|
@@ -206,7 +206,7 @@ const defaultConfig = Object.freeze({
|
|
206
206
|
},
|
207
207
|
allowDevelopmentBuild: undefined,
|
208
208
|
reactCompiler: undefined,
|
209
|
-
reactDebugChannel:
|
209
|
+
reactDebugChannel: false,
|
210
210
|
staticGenerationRetryCount: undefined,
|
211
211
|
serverComponentsHmrCache: true,
|
212
212
|
staticGenerationMaxConcurrency: 8,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/server/config-shared.ts"],"sourcesContent":["import os from 'os'\nimport type { webpack } from 'next/dist/compiled/webpack/webpack'\nimport type {\n Header,\n Redirect,\n Rewrite,\n RouteHas,\n} from '../lib/load-custom-routes'\nimport { imageConfigDefault } from '../shared/lib/image-config'\nimport type {\n ImageConfig,\n ImageConfigComplete,\n} from '../shared/lib/image-config'\nimport type { SubresourceIntegrityAlgorithm } from '../build/webpack/plugins/subresource-integrity-plugin'\nimport type { WEB_VITALS } from '../shared/lib/utils'\nimport type { NextParsedUrlQuery } from './request-meta'\nimport type { SizeLimit } from '../types'\nimport type { SupportedTestRunners } from '../cli/next-test'\nimport type { ExperimentalPPRConfig } from './lib/experimental/ppr'\nimport { INFINITE_CACHE } from '../lib/constants'\nimport type {\n ManifestRewriteRoute,\n ManifestHeaderRoute,\n ManifestRedirectRoute,\n ManifestRoute,\n} from '../build'\nimport { isStableBuild } from '../shared/lib/canary-only'\nimport type { RenderingMode } from '../build/rendering-mode'\nimport type { Revalidate } from './lib/cache-control'\nimport type { AdapterOutputType } from '../shared/lib/constants'\nimport type { MiddlewareMatcher } from '../build/analysis/get-page-static-info'\nimport type { FallbackRouteParam } from '../build/static-paths/types'\n\nexport type NextConfigComplete = Required<NextConfig> & {\n images: Required<ImageConfigComplete>\n typescript: TypeScriptConfig\n configOrigin?: string\n configFile?: string\n configFileName: string\n // override NextConfigComplete.experimental.htmlLimitedBots to string\n // because it's not defined in NextConfigComplete.experimental\n htmlLimitedBots: string | undefined\n experimental: Omit<ExperimentalConfig, 'turbo'>\n}\n\nexport type AdapterOutputs = Array<{\n /**\n * id is a unique identifier for the output\n */\n id: string\n /**\n * pathname is the URL path that the output is meant to\n * be routable to at e.g. /blog/[slug] or /_next/static/chunks/chunk.js\n */\n pathname: string\n /**\n * runtime for the route, this doesn't apply for prerender or static\n */\n runtime?: 'nodejs' | 'edge'\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 * 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 * matchers are the configured matchers for middleware\n */\n matchers?: MiddlewareMatcher[]\n\n /**\n * bypassToken is the generated token that signals a prerender cache\n * should be bypassed\n */\n bypassToken?: string\n\n /**\n * postponed is the PPR state when it postponed and is used for resuming\n */\n postponed?: string\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 * 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 * 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 */\n assets?: Record<string, string>\n /**\n * filePath is present for all cases except a Prerender\n * which may or may not have a fallback (initial cache entry).\n * The parent output will have a filePath for a prerender though\n */\n filePath?: string\n /**\n * type of output\n */\n type: AdapterOutputType\n}>\n\nexport interface NextAdapter {\n name: string\n modifyConfig?: (\n config: NextConfigComplete\n ) => Promise<NextConfigComplete> | NextConfigComplete\n onBuildComplete?: (ctx: {\n routes: {\n headers: Array<ManifestHeaderRoute>\n redirects: Array<ManifestRedirectRoute>\n rewrites: {\n beforeFiles: Array<ManifestRewriteRoute>\n afterFiles: Array<ManifestRewriteRoute>\n fallback: Array<ManifestRewriteRoute>\n }\n dynamicRoutes: ReadonlyArray<ManifestRoute>\n }\n outputs: AdapterOutputs\n }) => Promise<void> | void\n}\n\nexport type I18NDomains = readonly DomainLocale[]\n\nexport interface I18NConfig {\n defaultLocale: string\n domains?: I18NDomains\n localeDetection?: false\n locales: readonly string[]\n}\n\nexport interface DomainLocale {\n defaultLocale: string\n domain: string\n http?: true\n locales?: readonly string[]\n}\n\nexport interface ESLintConfig {\n /** Only run ESLint on these directories with `next lint` and `next build`. */\n dirs?: string[]\n /** Do not run ESLint during production builds (`next build`). */\n ignoreDuringBuilds?: boolean\n}\n\nexport interface TypeScriptConfig {\n /** Do not run TypeScript during production builds (`next build`). */\n ignoreBuildErrors?: boolean\n /** Relative path to a custom tsconfig file */\n tsconfigPath?: string\n}\n\nexport interface EmotionConfig {\n sourceMap?: boolean\n autoLabel?: 'dev-only' | 'always' | 'never'\n labelFormat?: string\n importMap?: {\n [importName: string]: {\n [exportName: string]: {\n canonicalImport?: [string, string]\n styledBaseImport?: [string, string]\n }\n }\n }\n}\n\nexport interface StyledComponentsConfig {\n /**\n * Enabled by default in development, disabled in production to reduce file size,\n * setting this will override the default for all environments.\n */\n displayName?: boolean\n topLevelImportPaths?: string[]\n ssr?: boolean\n fileName?: boolean\n meaninglessFileNames?: string[]\n minify?: boolean\n transpileTemplateLiterals?: boolean\n namespace?: string\n pure?: boolean\n cssProp?: boolean\n}\n\ntype JSONValue =\n | string\n | number\n | boolean\n | JSONValue[]\n | { [k: string]: JSONValue }\n\nexport type TurbopackLoaderItem =\n | string\n | {\n loader: string\n // At the moment, Turbopack options must be JSON-serializable, so restrict values.\n options?: Record<string, JSONValue>\n }\n\nexport type TurbopackLoaderBuiltinCondition =\n | 'default'\n | 'browser'\n | 'foreign'\n | 'development'\n | 'production'\n | 'node'\n | 'edge-light'\n\nexport type TurbopackRuleCondition =\n | { all: TurbopackRuleCondition[] }\n | { any: TurbopackRuleCondition[] }\n | { not: TurbopackRuleCondition }\n | TurbopackLoaderBuiltinCondition\n | {\n path?: string | RegExp\n content?: RegExp\n }\n\nexport type TurbopackRuleConfigItem = {\n loaders: TurbopackLoaderItem[]\n as?: string\n condition?: TurbopackRuleCondition\n}\n\n/**\n * This can be an object representing a single configuration, or a list of\n * loaders and/or rule configuration objects.\n *\n * - A list of loader path strings or objects is the \"shorthand\" syntax.\n * - A list of rule configuration objects can be useful when each configuration\n * object has different `condition` fields, but still match the same top-level\n * path glob.\n */\nexport type TurbopackRuleConfigCollection =\n | TurbopackRuleConfigItem\n | (TurbopackLoaderItem | TurbopackRuleConfigItem)[]\n\nexport interface TurbopackOptions {\n /**\n * (`next --turbopack` only) A mapping of aliased imports to modules to load in their place.\n *\n * @see [Resolve Alias](https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack#resolving-aliases)\n */\n resolveAlias?: Record<\n string,\n string | string[] | Record<string, string | string[]>\n >\n\n /**\n * (`next --turbopack` only) A list of extensions to resolve when importing files.\n *\n * @see [Resolve Extensions](https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack#resolving-custom-extensions)\n */\n resolveExtensions?: string[]\n\n /**\n * (`next --turbopack` only) A list of webpack loaders to apply when running with Turbopack.\n *\n * @see [Turbopack Loaders](https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack#configuring-webpack-loaders)\n */\n rules?: Record<string, TurbopackRuleConfigCollection>\n\n /**\n * The module ID strategy to use for Turbopack.\n * If not set, the default is `'named'` for development and `'deterministic'`\n * for production.\n */\n moduleIds?: 'named' | 'deterministic'\n\n /**\n * This is the repo root usually and only files above this\n * directory can be resolved by turbopack.\n */\n root?: string\n}\n\nexport interface DeprecatedExperimentalTurboOptions extends TurbopackOptions {\n /**\n * (`next --turbopack` only) A list of webpack loaders to apply when running with Turbopack.\n *\n * @deprecated Use `rules` instead.\n * @see [Turbopack Loaders](https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack#configuring-webpack-loaders)\n */\n loaders?: Record<string, TurbopackLoaderItem[]>\n\n /**\n * A target memory limit for turbo, in bytes.\n * @deprecated Use `experimental.turbopackMemoryLimit` instead.\n */\n memoryLimit?: number\n\n /**\n * Enable minification. Defaults to true in build mode and false in dev mode.\n * @deprecated Use `experimental.turbopackMinify` instead.\n */\n minify?: boolean\n\n /**\n * Enable tree shaking for the turbopack dev server and build.\n * @deprecated Use `experimental.turbopackTreeShaking` instead.\n */\n treeShaking?: boolean\n\n /**\n * Enable source maps. Defaults to true.\n * @deprecated Use `experimental.turbopackSourceMaps` instead.\n */\n sourceMaps?: boolean\n}\n\nexport interface WebpackConfigContext {\n /** Next.js root directory */\n dir: string\n /** Indicates if the compilation will be done in development */\n dev: boolean\n /** It's `true` for server-side compilation, and `false` for client-side compilation */\n isServer: boolean\n /** The build id, used as a unique identifier between builds */\n buildId: string\n /** The next.config.js merged with default values */\n config: NextConfigComplete\n /** Default loaders used internally by Next.js */\n defaultLoaders: {\n /** Default babel-loader configuration */\n babel: any\n }\n /** Number of total Next.js pages */\n totalPages: number\n /** The webpack configuration */\n webpack: any\n /** The current server runtime */\n nextRuntime?: 'nodejs' | 'edge'\n}\n\nexport interface NextJsWebpackConfig {\n (\n /** Existing Webpack config */\n config: any,\n context: WebpackConfigContext\n ): any\n}\n\n/**\n * Set of options for the react compiler next.js\n * currently supports.\n *\n * This can be changed without breaking changes while supporting\n * react compiler in the experimental phase.\n */\nexport interface ReactCompilerOptions {\n compilationMode?: 'infer' | 'annotation' | 'all'\n panicThreshold?: 'ALL_ERRORS' | 'CRITICAL_ERRORS' | 'NONE'\n}\n\nexport interface IncomingRequestLoggingConfig {\n /**\n * A regular expression array to match incoming requests that should not be logged.\n * You can specify multiple patterns to match incoming requests that should not be logged.\n */\n ignore?: RegExp[]\n}\n\nexport interface LoggingConfig {\n fetches?: {\n fullUrl?: boolean\n /**\n * If true, fetch requests that are restored from the HMR cache are logged\n * during an HMR refresh request, i.e. when editing a server component.\n */\n hmrRefreshes?: boolean\n }\n\n /**\n * If set to false, incoming request logging is disabled.\n * You can specify a pattern to match incoming requests that should not be logged.\n */\n incomingRequests?: boolean | IncomingRequestLoggingConfig\n}\n\nexport interface ExperimentalConfig {\n adapterPath?: string\n useSkewCookie?: boolean\n cacheHandlers?: {\n default?: string\n remote?: string\n static?: string\n [handlerName: string]: string | undefined\n }\n multiZoneDraftMode?: boolean\n appNavFailHandling?: boolean\n prerenderEarlyExit?: boolean\n linkNoTouchStart?: boolean\n caseSensitiveRoutes?: boolean\n clientSegmentCache?: boolean | 'client-only'\n\n /**\n * Enables RDC for Dynamic Navigations. This is only supported for App Router\n * when Partial Prerendering is also enabled. This is enabled by default when\n * Partial Prerendering is enabled.\n */\n rdcForNavigations?: boolean\n clientParamParsing?: boolean\n\n /**\n * The origins that are allowed to write the rewritten headers when\n * performing a non-relative rewrite. When undefined, no non-relative\n * rewrites will get the rewrite headers.\n */\n clientParamParsingOrigins?: string[]\n dynamicOnHover?: boolean\n preloadEntriesOnStart?: boolean\n clientRouterFilter?: boolean\n clientRouterFilterRedirects?: boolean\n /**\n * This config can be used to override the cache behavior for the client router.\n * These values indicate the time, in seconds, that the cache should be considered\n * reusable. When the `prefetch` Link prop is left unspecified, this will use the `dynamic` value.\n * When the `prefetch` Link prop is set to `true`, this will use the `static` value.\n */\n staleTimes?: {\n dynamic?: number\n static?: number\n }\n cacheLife?: {\n [profile: string]: {\n // How long the client can cache a value without checking with the server.\n stale?: number\n // How frequently you want the cache to refresh on the server.\n // Stale values may be served while revalidating.\n revalidate?: number\n // In the worst case scenario, where you haven't had traffic in a while,\n // how stale can a value be until you prefer deopting to dynamic.\n // Must be longer than revalidate.\n expire?: number\n }\n }\n // decimal for percent for possible false positives\n // e.g. 0.01 for 10% potential false matches lower\n // percent increases size of the filter\n clientRouterFilterAllowedRate?: number\n externalMiddlewareRewritesResolve?: boolean\n extensionAlias?: Record<string, any>\n allowedRevalidateHeaderKeys?: string[]\n fetchCacheKeyPrefix?: string\n imgOptConcurrency?: number | null\n imgOptTimeoutInSeconds?: number\n imgOptMaxInputPixels?: number\n imgOptSequentialRead?: boolean | null\n imgOptSkipMetadata?: boolean | null\n optimisticClientCache?: boolean\n /**\n * @deprecated use config.expireTime instead\n */\n expireTime?: number\n middlewarePrefetch?: 'strict' | 'flexible'\n manualClientBasePath?: boolean\n /**\n * CSS Chunking strategy. Defaults to `true` (\"loose\" mode), which guesses dependencies\n * between CSS files to keep ordering of them.\n * An alternative is 'strict', which will try to keep correct ordering as\n * much as possible, even when this leads to many requests.\n */\n cssChunking?: boolean | 'strict'\n disablePostcssPresetEnv?: boolean\n cpus?: number\n memoryBasedWorkersCount?: boolean\n proxyTimeout?: number\n isrFlushToDisk?: boolean\n workerThreads?: boolean\n // optimizeCss can be boolean or critters' option object\n // Use Record<string, unknown> as critters doesn't export its Option type\n // https://github.com/GoogleChromeLabs/critters/blob/a590c05f9197b656d2aeaae9369df2483c26b072/packages/critters/src/index.d.ts\n optimizeCss?: boolean | Record<string, unknown>\n nextScriptWorkers?: boolean\n scrollRestoration?: boolean\n externalDir?: boolean\n /** @deprecated built-in amp support will be removed in Next 16 */\n amp?: {\n optimizer?: any\n validator?: string\n skipValidation?: boolean\n }\n disableOptimizedLoading?: boolean\n gzipSize?: boolean\n craCompat?: boolean\n esmExternals?: boolean | 'loose'\n fullySpecified?: boolean\n urlImports?: NonNullable<webpack.Configuration['experiments']>['buildHttp']\n swcTraceProfiling?: boolean\n forceSwcTransforms?: boolean\n\n swcPlugins?: Array<[string, Record<string, unknown>]>\n largePageDataBytes?: number\n /**\n * If set to `false`, webpack won't fall back to polyfill Node.js modules in the browser\n * Full list of old polyfills is accessible here:\n * [webpack/webpack#ModuleNotoundError.js#L13-L42](https://github.com/webpack/webpack/blob/2a0536cf510768111a3a6dceeb14cb79b9f59273/lib/ModuleNotFoundError.js#L13-L42)\n */\n fallbackNodePolyfills?: false\n sri?: {\n algorithm?: SubresourceIntegrityAlgorithm\n }\n\n webVitalsAttribution?: Array<(typeof WEB_VITALS)[number]>\n\n /**\n * Automatically apply the \"modularizeImports\" optimization to imports of the specified packages.\n */\n optimizePackageImports?: string[]\n\n /**\n * Optimize React APIs for server builds.\n */\n optimizeServerReact?: boolean\n\n /**\n * @deprecated Use `config.turbopack` instead.\n * Run `npx @next/codemod@latest next-experimental-turbo-to-turbopack .` to migrate automatically.\n */\n turbo?: DeprecatedExperimentalTurboOptions\n\n /**\n * A target memory limit for turbo, in bytes.\n */\n turbopackMemoryLimit?: number\n\n /**\n * Enable minification. Defaults to true in build mode and false in dev mode.\n */\n turbopackMinify?: boolean\n\n /**\n * Enable scope hoisting. Defaults to true in build mode. Always disabled in development mode.\n */\n turbopackScopeHoisting?: boolean\n\n /**\n * Enable persistent caching for the turbopack dev server and build.\n */\n turbopackPersistentCaching?: boolean\n\n /**\n * Enable source maps. Defaults to true.\n */\n turbopackSourceMaps?: boolean\n\n /**\n * Enable tree shaking for the turbopack dev server and build.\n */\n turbopackTreeShaking?: boolean\n\n /**\n * Enable removing unused exports for turbopack dev server and build.\n */\n turbopackRemoveUnusedExports?: boolean\n\n /**\n * Use the system-provided CA roots instead of bundled CA roots for external HTTPS requests\n * made by Turbopack. Currently this is only used for fetching data from Google Fonts.\n *\n * This may be useful in cases where you or an employer are MITMing traffic.\n *\n * This option is experimental because:\n * - This may cause small performance problems, as it uses [`rustls-native-certs`](\n * https://github.com/rustls/rustls-native-certs).\n * - In the future, this may become the default, and this option may be eliminated, once\n * <https://github.com/seanmonstar/reqwest/issues/2159> is resolved.\n *\n * Users who need to configure this behavior system-wide can override the project\n * configuration using the `NEXT_TURBOPACK_EXPERIMENTAL_USE_SYSTEM_TLS_CERTS=1` environment\n * variable.\n *\n * This option is ignored on Windows on ARM, where the native TLS implementation is always\n * used.\n *\n * If you need to set a proxy, Turbopack [respects the common `HTTP_PROXY` and `HTTPS_PROXY`\n * environment variable convention](https://docs.rs/reqwest/latest/reqwest/#proxies). HTTP\n * proxies are supported, SOCKS proxies are not currently supported.\n */\n turbopackUseSystemTlsCerts?: boolean\n\n /**\n * Set this to `false` to disable the automatic configuration of the babel loader when a babel\n * configuration file is present. The babel loader configuration is enabled by default.\n */\n turbopackUseBuiltinBabel?: boolean\n\n /**\n * Set this to `false` to disable the automatic configuration of the sass loader. The sass loader\n * configuration is enabled by default.\n */\n turbopackUseBuiltinSass?: boolean\n\n /**\n * For use with `@next/mdx`. Compile MDX files using the new Rust compiler.\n * @see https://nextjs.org/docs/app/api-reference/next-config-js/mdxRs\n */\n mdxRs?:\n | boolean\n | {\n development?: boolean\n jsx?: boolean\n jsxRuntime?: string\n jsxImportSource?: string\n providerImportSource?: string\n mdxType?: 'gfm' | 'commonmark'\n }\n\n /**\n * Enable type checking for Link and Router.push, etc.\n * @deprecated Use `typedRoutes` instead — this feature is now stable.\n * @see https://nextjs.org/docs/app/api-reference/config/typescript#statically-typed-links\n */\n typedRoutes?: boolean\n\n /**\n * Enable type-checking and autocompletion for environment variables.\n *\n * @default false\n */\n typedEnv?: boolean\n\n /**\n * Runs the compilations for server and edge in parallel instead of in serial.\n * This will make builds faster if there is enough server and edge functions\n * in the application at the cost of more memory.\n *\n * NOTE: This option is only valid when the build process can use workers. See\n * the documentation for `webpackBuildWorker` for more details.\n */\n parallelServerCompiles?: boolean\n\n /**\n * Runs the logic to collect build traces for the server routes in parallel\n * with other work during the compilation. This will increase the speed of\n * the build at the cost of more memory. This option may incur some additional\n * work compared to if the option was disabled since the work is started\n * before data from the client compilation is available to potentially reduce\n * the amount of code that needs to be traced. Despite that, this may still\n * result in faster builds for some applications.\n *\n * Valid values are:\n * - `true`: Collect the server build traces in parallel.\n * - `false`: Do not collect the server build traces in parallel.\n * - `undefined`: Collect server build traces in parallel only in the `experimental-compile` mode.\n *\n * NOTE: This option is only valid when the build process can use workers. See\n * the documentation for `webpackBuildWorker` for more details.\n */\n parallelServerBuildTraces?: boolean\n\n /**\n * Run the Webpack build in a separate process to optimize memory usage during build.\n * Valid values are:\n * - `false`: Disable the Webpack build worker\n * - `true`: Enable the Webpack build worker\n * - `undefined`: Enable the Webpack build worker only if the webpack config is not customized\n */\n webpackBuildWorker?: boolean\n\n /**\n * Enables optimizations to reduce memory usage in Webpack. This reduces the max size of the heap\n * but may increase compile times slightly.\n * Valid values are:\n * - `false`: Disable Webpack memory optimizations (default).\n * - `true`: Enables Webpack memory optimizations.\n */\n webpackMemoryOptimizations?: boolean\n\n /**\n * The array of the meta tags to the client injected by tracing propagation data.\n */\n clientTraceMetadata?: string[]\n\n /**\n * Enables experimental Partial Prerendering feature of Next.js.\n * Using this feature will enable the `react@experimental` for the `app` directory.\n */\n ppr?: ExperimentalPPRConfig\n\n /**\n * Enables experimental taint APIs in React.\n * Using this feature will enable the `react@experimental` for the `app` directory.\n */\n taint?: boolean\n\n /**\n * Enables the Back/Forward Cache for the router.\n */\n routerBFCache?: boolean\n\n /**\n * Uninstalls all \"unhandledRejection\" and \"uncaughtException\" listeners from\n * the global process so that we can override the behavior, which in some\n * runtimes is to exit the process.\n *\n * This is experimental until we've considered the impact in various\n * deployment environments.\n */\n removeUncaughtErrorAndRejectionListeners?: boolean\n\n /**\n * During an RSC request, validates that the request headers match the\n * cache-busting search parameter sent by the client.\n */\n validateRSCRequestHeaders?: boolean\n\n serverActions?: {\n /**\n * Allows adjusting body parser size limit for server actions.\n */\n bodySizeLimit?: SizeLimit\n\n /**\n * Allowed origins that can bypass Server Action's CSRF check. This is helpful\n * when you have reverse proxy in front of your app.\n * @example\n * [\"my-app.com\", \"*.my-app.com\"]\n */\n allowedOrigins?: string[]\n }\n\n /**\n * enables the minification of server code.\n */\n serverMinification?: boolean\n\n /**\n * Enables source maps while generating static pages.\n * Helps with errors during the prerender phase in `next build`.\n */\n enablePrerenderSourceMaps?: boolean\n\n /**\n * Enables source maps generation for the server production bundle.\n */\n serverSourceMaps?: boolean\n\n /**\n * @internal Used by the Next.js internals only.\n */\n trustHostHeader?: boolean\n /**\n * @internal Used by the Next.js internals only.\n */\n isExperimentalCompile?: boolean\n\n useWasmBinary?: boolean\n\n /**\n * Use lightningcss instead of postcss-loader\n */\n useLightningcss?: boolean\n\n /**\n * Enables view transitions by using the {@link https://github.com/facebook/react/pull/31975 unstable_ViewTransition} Component.\n */\n viewTransition?: boolean\n\n /**\n * Enables `fetch` requests to be proxied to the experimental test proxy server\n */\n testProxy?: boolean\n\n /**\n * Set a default test runner to be used by `next experimental-test`.\n */\n defaultTestRunner?: SupportedTestRunners\n /**\n * Allow NODE_ENV=development even for `next build`.\n */\n allowDevelopmentBuild?: true\n /**\n * @deprecated use `config.bundlePagesRouterDependencies` instead\n *\n */\n bundlePagesExternals?: boolean\n /**\n * @deprecated use `config.serverExternalPackages` instead\n *\n */\n serverComponentsExternalPackages?: string[]\n /**\n * Enable experimental React compiler optimization.\n * Configuration accepts partial config object to the compiler, if provided\n * compiler will be enabled.\n */\n reactCompiler?: boolean | ReactCompilerOptions\n\n /**\n * When enabled, in dev mode, Next.js will send React's debug info through the\n * WebSocket connection, instead of including it in the main RSC payload.\n *\n * @default true\n */\n reactDebugChannel?: boolean\n\n /**\n * The number of times to retry static generation (per page) before giving up.\n */\n staticGenerationRetryCount?: number\n\n /**\n * The amount of pages to export per worker during static generation.\n */\n staticGenerationMaxConcurrency?: number\n\n /**\n * The minimum number of pages to be chunked into each export worker.\n */\n staticGenerationMinPagesPerWorker?: number\n\n /**\n * Allows previously fetched data to be re-used when editing server components.\n */\n serverComponentsHmrCache?: boolean\n\n /**\n * When enabled, will cause IO in App Router to be excluded from prerenders,\n * unless explicitly cached. This also enables the experimental Partial\n * Prerendering feature of Next.js, and it enables `react@experimental` being\n * used for the `app` directory.\n */\n cacheComponents?: boolean\n\n /**\n * @deprecated Use `experimental.cacheComponents` instead.\n */\n dynamicIO?: boolean\n\n /**\n * Render <style> tags inline in the HTML for imported CSS assets.\n * Supports app-router in production mode only.\n */\n inlineCss?: boolean\n\n // TODO: Remove this config when the API is stable.\n /**\n * This config allows you to enable the experimental navigation API `forbidden` and `unauthorized`.\n */\n authInterrupts?: boolean\n\n /**\n * Enables the use of the `\"use cache\"` directive.\n */\n useCache?: boolean\n\n /**\n * Enables detection and reporting of slow modules during development builds.\n * Enabling this may impact build performance to ensure accurate measurements.\n */\n slowModuleDetection?: {\n /**\n * The time threshold in milliseconds for identifying slow modules.\n * Modules taking longer than this build time threshold will be reported.\n */\n buildTimeThresholdMs: number\n }\n\n /**\n * Enables using the global-not-found.js file in the app directory\n *\n */\n globalNotFound?: boolean\n\n /**\n * Enable debug information to be forwarded from browser to dev server stdout/stderr\n */\n browserDebugInfoInTerminal?:\n | boolean\n | {\n /**\n * Option to limit stringification at a specific nesting depth when logging circular objects.\n * @default 5\n */\n depthLimit?: number\n\n /**\n * Maximum number of properties/elements to stringify when logging objects/arrays with circular references.\n * @default 100\n */\n edgeLimit?: number\n /**\n * Whether to include source location information in debug output when available\n */\n showSourceLocation?: boolean\n }\n\n /**\n * When enabled, will only opt-in to special smooth scroll handling when\n * data-scroll-behavior=\"smooth\" is present on the <html> element.\n * This will be the default, non-configurable behavior in the next major version.\n *\n * @default false\n */\n optimizeRouterScrolling?: boolean\n\n /**\n * Enable accessing root params via the `next/root-params` module.\n */\n rootParams?: boolean\n}\n\nexport type ExportPathMap = {\n [path: string]: {\n page: string\n query?: NextParsedUrlQuery\n\n /**\n * When true, this indicates that this is a pages router page that should\n * be rendered as a fallback.\n *\n * @internal\n */\n _pagesFallback?: boolean\n\n /**\n * The locale that this page should be rendered in.\n *\n * @internal\n */\n _locale?: string\n\n /**\n * The path that was used to generate the page.\n *\n * @internal\n */\n _ssgPath?: string\n\n /**\n * The parameters that are currently unknown.\n *\n * @internal\n */\n _fallbackRouteParams?: readonly FallbackRouteParam[]\n\n /**\n * @internal\n */\n _isAppDir?: boolean\n\n /**\n * @internal\n */\n _isDynamicError?: boolean\n\n /**\n * @internal\n */\n _isRoutePPREnabled?: boolean\n\n /**\n * When true, the page is prerendered as a fallback shell, while allowing\n * any dynamic accesses to result in an empty shell. This is the case when\n * the app has `experimental.ppr` and `experimental.cacheComponents` enabled, and\n * there are also routes prerendered with a more complete set of params.\n * Prerendering those routes would catch any invalid dynamic accesses.\n *\n * @internal\n */\n _allowEmptyStaticShell?: boolean\n }\n}\n\n/**\n * Next.js can be configured through a `next.config.js` file in the root of your project directory.\n *\n * This can change the behavior, enable experimental features, and configure other advanced options.\n *\n * Read more: [Next.js Docs: `next.config.js`](https://nextjs.org/docs/app/api-reference/config/next-config-js)\n */\nexport interface NextConfig extends Record<string, any> {\n allowedDevOrigins?: string[]\n\n exportPathMap?: (\n defaultMap: ExportPathMap,\n ctx: {\n dev: boolean\n dir: string\n outDir: string | null\n distDir: string\n buildId: string\n }\n ) => Promise<ExportPathMap> | ExportPathMap\n\n /**\n * Internationalization configuration\n *\n * @see [Internationalization docs](https://nextjs.org/docs/advanced-features/i18n-routing)\n */\n i18n?: I18NConfig | null\n\n /**\n * @since version 11\n * @see [ESLint configuration](https://nextjs.org/docs/app/api-reference/config/eslint)\n */\n eslint?: ESLintConfig\n\n /**\n * @see [Next.js TypeScript documentation](https://nextjs.org/docs/app/api-reference/config/typescript)\n */\n typescript?: TypeScriptConfig\n\n /**\n * Enable type checking for Link and Router.push, etc.\n * This feature requires TypeScript in your project.\n *\n * @see [Typed Links documentation](https://nextjs.org/docs/app/api-reference/config/typescript#statically-typed-links)\n */\n typedRoutes?: boolean\n\n /**\n * Headers allow you to set custom HTTP headers for an incoming request path.\n *\n * @see [Headers configuration documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/headers)\n */\n headers?: () => Promise<Header[]>\n\n /**\n * Rewrites allow you to map an incoming request path to a different destination path.\n *\n * @see [Rewrites configuration documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/rewrites)\n */\n rewrites?: () => Promise<\n | Rewrite[]\n | {\n beforeFiles?: Rewrite[]\n afterFiles?: Rewrite[]\n fallback?: Rewrite[]\n }\n >\n\n /**\n * Redirects allow you to redirect an incoming request path to a different destination path.\n *\n * @see [Redirects configuration documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/redirects)\n */\n redirects?: () => Promise<Redirect[]>\n\n /**\n * @see [Moment.js locales excluded by default](https://nextjs.org/docs/upgrading#momentjs-locales-excluded-by-default)\n */\n excludeDefaultMomentLocales?: boolean\n\n /**\n * Before continuing to add custom webpack configuration to your application make sure Next.js doesn't already support your use-case\n *\n * @see [Custom Webpack Config documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/webpack)\n */\n webpack?: NextJsWebpackConfig | null\n\n /**\n * By default Next.js will redirect urls with trailing slashes to their counterpart without a trailing slash.\n *\n * @default false\n * @see [Trailing Slash Configuration](https://nextjs.org/docs/app/api-reference/config/next-config-js/trailingSlash)\n */\n trailingSlash?: boolean\n\n /**\n * Next.js comes with built-in support for environment variables\n *\n * @see [Environment Variables documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/env)\n */\n env?: Record<string, string | undefined>\n\n /**\n * Destination directory (defaults to `.next`)\n */\n distDir?: string\n\n /**\n * The build output directory (defaults to `.next`) is now cleared by default except for the Next.js caches.\n */\n cleanDistDir?: boolean\n\n /**\n * To set up a CDN, you can set up an asset prefix and configure your CDN's origin to resolve to the domain that Next.js is hosted on.\n *\n * @see [CDN Support with Asset Prefix](https://nextjs.org/docs/app/api-reference/config/next-config-js/assetPrefix)\n */\n assetPrefix?: string\n\n /**\n * The default cache handler for the Pages and App Router uses the filesystem cache. This requires no configuration, however, you can customize the cache handler if you prefer.\n *\n * @see [Configuring Caching](https://nextjs.org/docs/app/building-your-application/deploying#configuring-caching) and the [API Reference](https://nextjs.org/docs/app/api-reference/next-config-js/incrementalCacheHandlerPath).\n */\n cacheHandler?: string | undefined\n\n /**\n * Configure the in-memory cache size in bytes. Defaults to 50 MB.\n * If `cacheMaxMemorySize: 0`, this disables in-memory caching entirely.\n *\n * @see [Configuring Caching](https://nextjs.org/docs/app/building-your-application/deploying#configuring-caching).\n */\n cacheMaxMemorySize?: number\n\n /**\n * By default, `Next` will serve each file in the `pages` folder under a pathname matching the filename.\n * To disable this behavior and prevent routing based set this to `true`.\n *\n * @default true\n * @see [Disabling file-system routing](https://nextjs.org/docs/advanced-features/custom-server#disabling-file-system-routing)\n */\n useFileSystemPublicRoutes?: boolean\n\n /**\n * @see [Configuring the build ID](https://nextjs.org/docs/app/api-reference/config/next-config-js/generateBuildId)\n */\n generateBuildId?: () => string | null | Promise<string | null>\n\n /** @see [Disabling ETag Configuration](https://nextjs.org/docs/app/api-reference/config/next-config-js/generateEtags) */\n generateEtags?: boolean\n\n /** @see [Including non-page files in the pages directory](https://nextjs.org/docs/app/api-reference/config/next-config-js/pageExtensions) */\n pageExtensions?: string[]\n\n /** @see [Compression documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/compress) */\n compress?: boolean\n\n /** @see [Disabling x-powered-by](https://nextjs.org/docs/app/api-reference/config/next-config-js/poweredByHeader) */\n poweredByHeader?: boolean\n\n /** @see [Using the Image Component](https://nextjs.org/docs/app/api-reference/next-config-js/images) */\n images?: ImageConfig\n\n /** Configure indicators in development environment */\n devIndicators?:\n | false\n | {\n /**\n * Position of the development tools indicator in the browser window.\n * @default \"bottom-left\"\n * */\n position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'\n }\n\n /**\n * Next.js exposes some options that give you some control over how the server will dispose or keep in memory built pages in development.\n *\n * @see [Configuring `onDemandEntries`](https://nextjs.org/docs/app/api-reference/config/next-config-js/onDemandEntries)\n */\n onDemandEntries?: {\n /** period (in ms) where the server will keep pages in the buffer */\n maxInactiveAge?: number\n /** number of pages that should be kept simultaneously without being disposed */\n pagesBufferLength?: number\n }\n\n /**\n * @deprecated built-in amp support will be removed in Next 16\n * @see [`next/amp`](https://nextjs.org/docs/api-reference/next/amp)\n */\n amp?: {\n canonicalBase?: string\n }\n\n /**\n * A unique identifier for a deployment that will be included in each request's query string or header.\n */\n deploymentId?: string\n\n /**\n * Deploy a Next.js application under a sub-path of a domain\n *\n * @see [Base path configuration](https://nextjs.org/docs/app/api-reference/config/next-config-js/basePath)\n */\n basePath?: string\n\n /** @see [Customizing sass options](https://nextjs.org/docs/app/api-reference/next-config-js/sassOptions) */\n sassOptions?: {\n implementation?: string\n [key: string]: any\n }\n\n /**\n * Enable browser source map generation during the production build\n *\n * @see [Source Maps](https://nextjs.org/docs/advanced-features/source-maps)\n */\n productionBrowserSourceMaps?: boolean\n\n /**\n * Enable react profiling in production\n *\n */\n reactProductionProfiling?: boolean\n\n /**\n * The Next.js runtime is Strict Mode-compliant.\n *\n * @see [React Strict Mode](https://nextjs.org/docs/app/api-reference/config/next-config-js/reactStrictMode)\n */\n reactStrictMode?: boolean | null\n\n /**\n * The maximum length of the headers that are emitted by React and added to\n * the response.\n *\n * @see [React Max Headers Length](https://nextjs.org/docs/app/api-reference/config/next-config-js/reactMaxHeadersLength)\n */\n reactMaxHeadersLength?: number\n\n /**\n * Add public (in browser) runtime configuration to your app\n *\n * @see [Runtime configuration](https://nextjs.org/docs/pages/api-reference/config/next-config-js/runtime-configuration\n */\n publicRuntimeConfig?: { [key: string]: any }\n\n /**\n * Add server runtime configuration to your app\n *\n * @see [Runtime configuration](https://nextjs.org/docs/pages/api-reference/config/next-config-js/runtime-configuration\n */\n serverRuntimeConfig?: { [key: string]: any }\n\n /**\n * Next.js enables HTTP Keep-Alive by default.\n * You may want to disable HTTP Keep-Alive for certain `fetch()` calls or globally.\n *\n * @see [Disabling HTTP Keep-Alive](https://nextjs.org/docs/app/api-reference/next-config-js/httpAgentOptions)\n */\n httpAgentOptions?: { keepAlive?: boolean }\n\n /**\n * Timeout after waiting to generate static pages in seconds\n *\n * @default 60\n */\n staticPageGenerationTimeout?: number\n\n /**\n * Add `\"crossorigin\"` attribute to generated `<script>` elements generated by `<Head />` or `<NextScript />` components\n *\n *\n * @see [`crossorigin` attribute documentation](https://developer.mozilla.org/docs/Web/HTML/Attributes/crossorigin)\n */\n crossOrigin?: 'anonymous' | 'use-credentials'\n\n /**\n * Optionally enable compiler transforms\n *\n * @see [Supported Compiler Options](https://nextjs.org/docs/advanced-features/compiler#supported-features)\n */\n compiler?: {\n reactRemoveProperties?:\n | boolean\n | {\n properties?: string[]\n }\n relay?: {\n src: string\n artifactDirectory?: string\n language?: 'typescript' | 'javascript' | 'flow'\n eagerEsModules?: boolean\n }\n removeConsole?:\n | boolean\n | {\n exclude?: string[]\n }\n styledComponents?: boolean | StyledComponentsConfig\n emotion?: boolean | EmotionConfig\n\n styledJsx?:\n | boolean\n | {\n useLightningcss?: boolean\n }\n\n /**\n * Replaces variables in your code during compile time. Each key will be\n * replaced with the respective values.\n */\n define?: Record<string, string>\n\n /**\n * Replaces server-only (Node.js and Edge) variables in your code during compile time.\n * Each key will be replaced with the respective values.\n */\n defineServer?: Record<string, string>\n\n /**\n * A hook function that executes after production build compilation finishes,\n * but before running post-compilation tasks such as type checking and\n * static page generation.\n */\n runAfterProductionCompile?: (metadata: {\n /**\n * The root directory of the project\n */\n projectDir: string\n /**\n * The build output directory (defaults to `.next`)\n */\n distDir: string\n }) => Promise<void>\n }\n\n /**\n * The type of build output.\n * - `undefined`: The default build output, `.next` directory, that works with production mode `next start` or a hosting provider like Vercel\n * - `'standalone'`: A standalone build output, `.next/standalone` directory, that only includes necessary files/dependencies. Useful for self-hosting in a Docker container.\n * - `'export'`: An exported build output, `out` directory, that only includes static HTML/CSS/JS. Useful for self-hosting without a Node.js server.\n * @see [Output File Tracing](https://nextjs.org/docs/advanced-features/output-file-tracing)\n * @see [Static HTML Export](https://nextjs.org/docs/advanced-features/static-html-export)\n */\n output?: 'standalone' | 'export'\n\n /**\n * Automatically transpile and bundle dependencies from local packages (like monorepos) or from external dependencies (`node_modules`). This replaces the\n * `next-transpile-modules` package.\n * @see [transpilePackages](https://nextjs.org/docs/advanced-features/compiler#module-transpilation)\n */\n transpilePackages?: string[]\n\n /**\n * Options for Turbopack. Temporarily also available as `experimental.turbo` for compatibility.\n */\n turbopack?: TurbopackOptions\n\n skipMiddlewareUrlNormalize?: boolean\n\n skipTrailingSlashRedirect?: boolean\n\n modularizeImports?: Record<\n string,\n {\n transform: string | Record<string, string>\n preventFullImport?: boolean\n skipDefaultConversion?: boolean\n }\n >\n\n /**\n * Logging configuration. Set to `false` to disable logging.\n */\n logging?: LoggingConfig | false\n\n /**\n * period (in seconds) where the server allow to serve stale cache\n */\n expireTime?: number\n\n /**\n * Enable experimental features. Note that all experimental features are subject to breaking changes in the future.\n */\n experimental?: ExperimentalConfig\n\n /**\n * Enables the bundling of node_modules packages (externals) for pages server-side bundles.\n * @see https://nextjs.org/docs/pages/api-reference/next-config-js/bundlePagesRouterDependencies\n */\n bundlePagesRouterDependencies?: boolean\n\n /**\n * A list of packages that should be treated as external in the server build.\n * @see https://nextjs.org/docs/app/api-reference/next-config-js/serverExternalPackages\n */\n serverExternalPackages?: string[]\n\n /**\n * This is the repo root usually and only files above this\n * directory are traced and included.\n */\n outputFileTracingRoot?: string\n\n /**\n * This allows manually excluding traced files if too many\n * are included incorrectly on a per-page basis.\n */\n outputFileTracingExcludes?: Record<string, string[]>\n\n /**\n * This allows manually including traced files if some\n * were not detected on a per-page basis.\n */\n outputFileTracingIncludes?: Record<string, string[]>\n\n watchOptions?: {\n pollIntervalMs?: number\n }\n\n /**\n * User Agent of bots that can handle streaming metadata.\n * Besides the default behavior, Next.js act differently on serving metadata to bots based on their capability.\n *\n * @default\n * /Mediapartners-Google|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview/i\n */\n htmlLimitedBots?: RegExp\n}\n\nexport const defaultConfig = Object.freeze({\n env: {},\n webpack: null,\n eslint: {\n ignoreDuringBuilds: false,\n },\n typescript: {\n ignoreBuildErrors: false,\n tsconfigPath: undefined,\n },\n typedRoutes: false,\n distDir: '.next',\n cleanDistDir: true,\n assetPrefix: '',\n cacheHandler: process.env.NEXT_CACHE_HANDLER_PATH,\n // default to 50MB limit\n cacheMaxMemorySize: 50 * 1024 * 1024,\n configOrigin: 'default',\n useFileSystemPublicRoutes: true,\n generateBuildId: () => null,\n generateEtags: true,\n pageExtensions: ['tsx', 'ts', 'jsx', 'js'],\n poweredByHeader: true,\n compress: true,\n images: imageConfigDefault,\n devIndicators: {\n position: 'bottom-left',\n },\n onDemandEntries: {\n maxInactiveAge: 60 * 1000,\n pagesBufferLength: 5,\n },\n amp: {\n canonicalBase: '',\n },\n basePath: '',\n sassOptions: {},\n trailingSlash: false,\n i18n: null,\n productionBrowserSourceMaps: false,\n excludeDefaultMomentLocales: true,\n serverRuntimeConfig: {},\n publicRuntimeConfig: {},\n reactProductionProfiling: false,\n reactStrictMode: null,\n reactMaxHeadersLength: 6000,\n httpAgentOptions: {\n keepAlive: true,\n },\n logging: {},\n compiler: {},\n expireTime: process.env.NEXT_PRIVATE_CDN_CONSUMED_SWR_CACHE_CONTROL\n ? undefined\n : 31536000, // one year\n staticPageGenerationTimeout: 60,\n output: !!process.env.NEXT_PRIVATE_STANDALONE ? 'standalone' : undefined,\n modularizeImports: undefined,\n outputFileTracingRoot: process.env.NEXT_PRIVATE_OUTPUT_TRACE_ROOT || '',\n allowedDevOrigins: undefined,\n experimental: {\n adapterPath: process.env.NEXT_ADAPTER_PATH || undefined,\n useSkewCookie: false,\n cacheLife: {\n default: {\n stale: undefined, // defaults to staleTimes.static\n revalidate: 60 * 15, // 15 minutes\n expire: INFINITE_CACHE,\n },\n seconds: {\n stale: 30, // 30 seconds\n revalidate: 1, // 1 second\n expire: 60, // 1 minute\n },\n minutes: {\n stale: 60 * 5, // 5 minutes\n revalidate: 60, // 1 minute\n expire: 60 * 60, // 1 hour\n },\n hours: {\n stale: 60 * 5, // 5 minutes\n revalidate: 60 * 60, // 1 hour\n expire: 60 * 60 * 24, // 1 day\n },\n days: {\n stale: 60 * 5, // 5 minutes\n revalidate: 60 * 60 * 24, // 1 day\n expire: 60 * 60 * 24 * 7, // 1 week\n },\n weeks: {\n stale: 60 * 5, // 5 minutes\n revalidate: 60 * 60 * 24 * 7, // 1 week\n expire: 60 * 60 * 24 * 30, // 1 month\n },\n max: {\n stale: 60 * 5, // 5 minutes\n revalidate: 60 * 60 * 24 * 30, // 1 month\n expire: INFINITE_CACHE, // Unbounded.\n },\n },\n cacheHandlers: {\n default: process.env.NEXT_DEFAULT_CACHE_HANDLER_PATH,\n remote: process.env.NEXT_REMOTE_CACHE_HANDLER_PATH,\n static: process.env.NEXT_STATIC_CACHE_HANDLER_PATH,\n },\n cssChunking: true,\n multiZoneDraftMode: false,\n appNavFailHandling: false,\n prerenderEarlyExit: true,\n serverMinification: true,\n // Will default to cacheComponents value.\n enablePrerenderSourceMaps: undefined,\n serverSourceMaps: false,\n linkNoTouchStart: false,\n caseSensitiveRoutes: false,\n clientSegmentCache: false,\n rdcForNavigations: false,\n clientParamParsing: false,\n clientParamParsingOrigins: undefined,\n dynamicOnHover: false,\n preloadEntriesOnStart: true,\n clientRouterFilter: true,\n clientRouterFilterRedirects: false,\n fetchCacheKeyPrefix: '',\n middlewarePrefetch: 'flexible',\n optimisticClientCache: true,\n manualClientBasePath: false,\n cpus: Math.max(\n 1,\n (Number(process.env.CIRCLE_NODE_TOTAL) ||\n (os.cpus() || { length: 1 }).length) - 1\n ),\n memoryBasedWorkersCount: false,\n imgOptConcurrency: null,\n imgOptTimeoutInSeconds: 7,\n imgOptMaxInputPixels: 268_402_689, // https://sharp.pixelplumbing.com/api-constructor#:~:text=%5Boptions.limitInputPixels%5D\n imgOptSequentialRead: null,\n imgOptSkipMetadata: null,\n isrFlushToDisk: true,\n workerThreads: false,\n proxyTimeout: undefined,\n optimizeCss: false,\n nextScriptWorkers: false,\n scrollRestoration: false,\n externalDir: false,\n disableOptimizedLoading: false,\n gzipSize: true,\n craCompat: false,\n esmExternals: true,\n fullySpecified: false,\n swcTraceProfiling: false,\n forceSwcTransforms: false,\n swcPlugins: undefined,\n largePageDataBytes: 128 * 1000, // 128KB by default\n disablePostcssPresetEnv: undefined,\n amp: undefined,\n urlImports: undefined,\n turbo: undefined,\n typedEnv: false,\n clientTraceMetadata: undefined,\n parallelServerCompiles: false,\n parallelServerBuildTraces: false,\n ppr: false,\n authInterrupts: false,\n webpackBuildWorker: undefined,\n webpackMemoryOptimizations: false,\n optimizeServerReact: true,\n viewTransition: false,\n routerBFCache: false,\n removeUncaughtErrorAndRejectionListeners: false,\n validateRSCRequestHeaders: !!(\n process.env.__NEXT_TEST_MODE || !isStableBuild()\n ),\n staleTimes: {\n dynamic: 0,\n static: 300,\n },\n allowDevelopmentBuild: undefined,\n reactCompiler: undefined,\n reactDebugChannel: true,\n staticGenerationRetryCount: undefined,\n serverComponentsHmrCache: true,\n staticGenerationMaxConcurrency: 8,\n staticGenerationMinPagesPerWorker: 25,\n cacheComponents: false,\n inlineCss: false,\n useCache: undefined,\n slowModuleDetection: undefined,\n globalNotFound: false,\n browserDebugInfoInTerminal: false,\n optimizeRouterScrolling: false,\n },\n htmlLimitedBots: undefined,\n bundlePagesRouterDependencies: false,\n} satisfies NextConfig)\n\nexport async function normalizeConfig(phase: string, config: any) {\n if (typeof config === 'function') {\n config = config(phase, { defaultConfig })\n }\n // Support `new Promise` and `async () =>` as return values of the config export\n return await config\n}\n"],"names":["defaultConfig","normalizeConfig","Object","freeze","env","webpack","eslint","ignoreDuringBuilds","typescript","ignoreBuildErrors","tsconfigPath","undefined","typedRoutes","distDir","cleanDistDir","assetPrefix","cacheHandler","process","NEXT_CACHE_HANDLER_PATH","cacheMaxMemorySize","configOrigin","useFileSystemPublicRoutes","generateBuildId","generateEtags","pageExtensions","poweredByHeader","compress","images","imageConfigDefault","devIndicators","position","onDemandEntries","maxInactiveAge","pagesBufferLength","amp","canonicalBase","basePath","sassOptions","trailingSlash","i18n","productionBrowserSourceMaps","excludeDefaultMomentLocales","serverRuntimeConfig","publicRuntimeConfig","reactProductionProfiling","reactStrictMode","reactMaxHeadersLength","httpAgentOptions","keepAlive","logging","compiler","expireTime","NEXT_PRIVATE_CDN_CONSUMED_SWR_CACHE_CONTROL","staticPageGenerationTimeout","output","NEXT_PRIVATE_STANDALONE","modularizeImports","outputFileTracingRoot","NEXT_PRIVATE_OUTPUT_TRACE_ROOT","allowedDevOrigins","experimental","adapterPath","NEXT_ADAPTER_PATH","useSkewCookie","cacheLife","default","stale","revalidate","expire","INFINITE_CACHE","seconds","minutes","hours","days","weeks","max","cacheHandlers","NEXT_DEFAULT_CACHE_HANDLER_PATH","remote","NEXT_REMOTE_CACHE_HANDLER_PATH","static","NEXT_STATIC_CACHE_HANDLER_PATH","cssChunking","multiZoneDraftMode","appNavFailHandling","prerenderEarlyExit","serverMinification","enablePrerenderSourceMaps","serverSourceMaps","linkNoTouchStart","caseSensitiveRoutes","clientSegmentCache","rdcForNavigations","clientParamParsing","clientParamParsingOrigins","dynamicOnHover","preloadEntriesOnStart","clientRouterFilter","clientRouterFilterRedirects","fetchCacheKeyPrefix","middlewarePrefetch","optimisticClientCache","manualClientBasePath","cpus","Math","Number","CIRCLE_NODE_TOTAL","os","length","memoryBasedWorkersCount","imgOptConcurrency","imgOptTimeoutInSeconds","imgOptMaxInputPixels","imgOptSequentialRead","imgOptSkipMetadata","isrFlushToDisk","workerThreads","proxyTimeout","optimizeCss","nextScriptWorkers","scrollRestoration","externalDir","disableOptimizedLoading","gzipSize","craCompat","esmExternals","fullySpecified","swcTraceProfiling","forceSwcTransforms","swcPlugins","largePageDataBytes","disablePostcssPresetEnv","urlImports","turbo","typedEnv","clientTraceMetadata","parallelServerCompiles","parallelServerBuildTraces","ppr","authInterrupts","webpackBuildWorker","webpackMemoryOptimizations","optimizeServerReact","viewTransition","routerBFCache","removeUncaughtErrorAndRejectionListeners","validateRSCRequestHeaders","__NEXT_TEST_MODE","isStableBuild","staleTimes","dynamic","allowDevelopmentBuild","reactCompiler","reactDebugChannel","staticGenerationRetryCount","serverComponentsHmrCache","staticGenerationMaxConcurrency","staticGenerationMinPagesPerWorker","cacheComponents","inlineCss","useCache","slowModuleDetection","globalNotFound","browserDebugInfoInTerminal","optimizeRouterScrolling","htmlLimitedBots","bundlePagesRouterDependencies","phase","config"],"mappings":";;;;;;;;;;;;;;;IAk7CaA,aAAa;eAAbA;;IAmMSC,eAAe;eAAfA;;;2DArnDP;6BAQoB;2BAWJ;4BAOD;;;;;;AAw5CvB,MAAMD,gBAAgBE,OAAOC,MAAM,CAAC;IACzCC,KAAK,CAAC;IACNC,SAAS;IACTC,QAAQ;QACNC,oBAAoB;IACtB;IACAC,YAAY;QACVC,mBAAmB;QACnBC,cAAcC;IAChB;IACAC,aAAa;IACbC,SAAS;IACTC,cAAc;IACdC,aAAa;IACbC,cAAcC,QAAQb,GAAG,CAACc,uBAAuB;IACjD,wBAAwB;IACxBC,oBAAoB,KAAK,OAAO;IAChCC,cAAc;IACdC,2BAA2B;IAC3BC,iBAAiB,IAAM;IACvBC,eAAe;IACfC,gBAAgB;QAAC;QAAO;QAAM;QAA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5H;QACrB6H,wBAAwB;QACxBC,2BAA2B;QAC3BC,KAAK;QACLC,gBAAgB;QAChBC,oBAAoBjI;QACpBkI,4BAA4B;QAC5BC,qBAAqB;QACrBC,gBAAgB;QAChBC,eAAe;QACfC,0CAA0C;QAC1CC,2BAA2B,CAAC,CAC1BjI,CAAAA,QAAQb,GAAG,CAAC+I,gBAAgB,IAAI,CAACC,IAAAA,yBAAa,GAAC;QAEjDC,YAAY;YACVC,SAAS;YACTtE,QAAQ;QACV;QACAuE,uBAAuB5I;QACvB6I,eAAe7I;QACf8I,mBAAmB;QACnBC,4BAA4B/I;QAC5BgJ,0BAA0B;QAC1BC,gCAAgC;QAChCC,mCAAmC;QACnCC,iBAAiB;QACjBC,WAAW;QACXC,UAAUrJ;QACVsJ,qBAAqBtJ;QACrBuJ,gBAAgB;QAChBC,4BAA4B;QAC5BC,yBAAyB;IAC3B;IACAC,iBAAiB1J;IACjB2J,+BAA+B;AACjC;AAEO,eAAerK,gBAAgBsK,KAAa,EAAEC,MAAW;IAC9D,IAAI,OAAOA,WAAW,YAAY;QAChCA,SAASA,OAAOD,OAAO;YAAEvK;QAAc;IACzC;IACA,gFAAgF;IAChF,OAAO,MAAMwK;AACf","ignoreList":[0]}
|
1
|
+
{"version":3,"sources":["../../src/server/config-shared.ts"],"sourcesContent":["import os from 'os'\nimport type { webpack } from 'next/dist/compiled/webpack/webpack'\nimport type {\n Header,\n Redirect,\n Rewrite,\n RouteHas,\n} from '../lib/load-custom-routes'\nimport { imageConfigDefault } from '../shared/lib/image-config'\nimport type {\n ImageConfig,\n ImageConfigComplete,\n} from '../shared/lib/image-config'\nimport type { SubresourceIntegrityAlgorithm } from '../build/webpack/plugins/subresource-integrity-plugin'\nimport type { WEB_VITALS } from '../shared/lib/utils'\nimport type { NextParsedUrlQuery } from './request-meta'\nimport type { SizeLimit } from '../types'\nimport type { SupportedTestRunners } from '../cli/next-test'\nimport type { ExperimentalPPRConfig } from './lib/experimental/ppr'\nimport { INFINITE_CACHE } from '../lib/constants'\nimport type {\n ManifestRewriteRoute,\n ManifestHeaderRoute,\n ManifestRedirectRoute,\n ManifestRoute,\n} from '../build'\nimport { isStableBuild } from '../shared/lib/canary-only'\nimport type { RenderingMode } from '../build/rendering-mode'\nimport type { Revalidate } from './lib/cache-control'\nimport type { AdapterOutputType } from '../shared/lib/constants'\nimport type { MiddlewareMatcher } from '../build/analysis/get-page-static-info'\nimport type { FallbackRouteParam } from '../build/static-paths/types'\n\nexport type NextConfigComplete = Required<NextConfig> & {\n images: Required<ImageConfigComplete>\n typescript: TypeScriptConfig\n configOrigin?: string\n configFile?: string\n configFileName: string\n // override NextConfigComplete.experimental.htmlLimitedBots to string\n // because it's not defined in NextConfigComplete.experimental\n htmlLimitedBots: string | undefined\n experimental: Omit<ExperimentalConfig, 'turbo'>\n}\n\nexport type AdapterOutputs = Array<{\n /**\n * id is a unique identifier for the output\n */\n id: string\n /**\n * pathname is the URL path that the output is meant to\n * be routable to at e.g. /blog/[slug] or /_next/static/chunks/chunk.js\n */\n pathname: string\n /**\n * runtime for the route, this doesn't apply for prerender or static\n */\n runtime?: 'nodejs' | 'edge'\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 * 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 * matchers are the configured matchers for middleware\n */\n matchers?: MiddlewareMatcher[]\n\n /**\n * bypassToken is the generated token that signals a prerender cache\n * should be bypassed\n */\n bypassToken?: string\n\n /**\n * postponed is the PPR state when it postponed and is used for resuming\n */\n postponed?: string\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 * 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 * 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 */\n assets?: Record<string, string>\n /**\n * filePath is present for all cases except a Prerender\n * which may or may not have a fallback (initial cache entry).\n * The parent output will have a filePath for a prerender though\n */\n filePath?: string\n /**\n * type of output\n */\n type: AdapterOutputType\n}>\n\nexport interface NextAdapter {\n name: string\n modifyConfig?: (\n config: NextConfigComplete\n ) => Promise<NextConfigComplete> | NextConfigComplete\n onBuildComplete?: (ctx: {\n routes: {\n headers: Array<ManifestHeaderRoute>\n redirects: Array<ManifestRedirectRoute>\n rewrites: {\n beforeFiles: Array<ManifestRewriteRoute>\n afterFiles: Array<ManifestRewriteRoute>\n fallback: Array<ManifestRewriteRoute>\n }\n dynamicRoutes: ReadonlyArray<ManifestRoute>\n }\n outputs: AdapterOutputs\n }) => Promise<void> | void\n}\n\nexport type I18NDomains = readonly DomainLocale[]\n\nexport interface I18NConfig {\n defaultLocale: string\n domains?: I18NDomains\n localeDetection?: false\n locales: readonly string[]\n}\n\nexport interface DomainLocale {\n defaultLocale: string\n domain: string\n http?: true\n locales?: readonly string[]\n}\n\nexport interface ESLintConfig {\n /** Only run ESLint on these directories with `next lint` and `next build`. */\n dirs?: string[]\n /** Do not run ESLint during production builds (`next build`). */\n ignoreDuringBuilds?: boolean\n}\n\nexport interface TypeScriptConfig {\n /** Do not run TypeScript during production builds (`next build`). */\n ignoreBuildErrors?: boolean\n /** Relative path to a custom tsconfig file */\n tsconfigPath?: string\n}\n\nexport interface EmotionConfig {\n sourceMap?: boolean\n autoLabel?: 'dev-only' | 'always' | 'never'\n labelFormat?: string\n importMap?: {\n [importName: string]: {\n [exportName: string]: {\n canonicalImport?: [string, string]\n styledBaseImport?: [string, string]\n }\n }\n }\n}\n\nexport interface StyledComponentsConfig {\n /**\n * Enabled by default in development, disabled in production to reduce file size,\n * setting this will override the default for all environments.\n */\n displayName?: boolean\n topLevelImportPaths?: string[]\n ssr?: boolean\n fileName?: boolean\n meaninglessFileNames?: string[]\n minify?: boolean\n transpileTemplateLiterals?: boolean\n namespace?: string\n pure?: boolean\n cssProp?: boolean\n}\n\ntype JSONValue =\n | string\n | number\n | boolean\n | JSONValue[]\n | { [k: string]: JSONValue }\n\nexport type TurbopackLoaderItem =\n | string\n | {\n loader: string\n // At the moment, Turbopack options must be JSON-serializable, so restrict values.\n options?: Record<string, JSONValue>\n }\n\nexport type TurbopackLoaderBuiltinCondition =\n | 'default'\n | 'browser'\n | 'foreign'\n | 'development'\n | 'production'\n | 'node'\n | 'edge-light'\n\nexport type TurbopackRuleCondition =\n | { all: TurbopackRuleCondition[] }\n | { any: TurbopackRuleCondition[] }\n | { not: TurbopackRuleCondition }\n | TurbopackLoaderBuiltinCondition\n | {\n path?: string | RegExp\n content?: RegExp\n }\n\nexport type TurbopackRuleConfigItem = {\n loaders: TurbopackLoaderItem[]\n as?: string\n condition?: TurbopackRuleCondition\n}\n\n/**\n * This can be an object representing a single configuration, or a list of\n * loaders and/or rule configuration objects.\n *\n * - A list of loader path strings or objects is the \"shorthand\" syntax.\n * - A list of rule configuration objects can be useful when each configuration\n * object has different `condition` fields, but still match the same top-level\n * path glob.\n */\nexport type TurbopackRuleConfigCollection =\n | TurbopackRuleConfigItem\n | (TurbopackLoaderItem | TurbopackRuleConfigItem)[]\n\nexport interface TurbopackOptions {\n /**\n * (`next --turbopack` only) A mapping of aliased imports to modules to load in their place.\n *\n * @see [Resolve Alias](https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack#resolving-aliases)\n */\n resolveAlias?: Record<\n string,\n string | string[] | Record<string, string | string[]>\n >\n\n /**\n * (`next --turbopack` only) A list of extensions to resolve when importing files.\n *\n * @see [Resolve Extensions](https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack#resolving-custom-extensions)\n */\n resolveExtensions?: string[]\n\n /**\n * (`next --turbopack` only) A list of webpack loaders to apply when running with Turbopack.\n *\n * @see [Turbopack Loaders](https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack#configuring-webpack-loaders)\n */\n rules?: Record<string, TurbopackRuleConfigCollection>\n\n /**\n * The module ID strategy to use for Turbopack.\n * If not set, the default is `'named'` for development and `'deterministic'`\n * for production.\n */\n moduleIds?: 'named' | 'deterministic'\n\n /**\n * This is the repo root usually and only files above this\n * directory can be resolved by turbopack.\n */\n root?: string\n}\n\nexport interface DeprecatedExperimentalTurboOptions extends TurbopackOptions {\n /**\n * (`next --turbopack` only) A list of webpack loaders to apply when running with Turbopack.\n *\n * @deprecated Use `rules` instead.\n * @see [Turbopack Loaders](https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack#configuring-webpack-loaders)\n */\n loaders?: Record<string, TurbopackLoaderItem[]>\n\n /**\n * A target memory limit for turbo, in bytes.\n * @deprecated Use `experimental.turbopackMemoryLimit` instead.\n */\n memoryLimit?: number\n\n /**\n * Enable minification. Defaults to true in build mode and false in dev mode.\n * @deprecated Use `experimental.turbopackMinify` instead.\n */\n minify?: boolean\n\n /**\n * Enable tree shaking for the turbopack dev server and build.\n * @deprecated Use `experimental.turbopackTreeShaking` instead.\n */\n treeShaking?: boolean\n\n /**\n * Enable source maps. Defaults to true.\n * @deprecated Use `experimental.turbopackSourceMaps` instead.\n */\n sourceMaps?: boolean\n}\n\nexport interface WebpackConfigContext {\n /** Next.js root directory */\n dir: string\n /** Indicates if the compilation will be done in development */\n dev: boolean\n /** It's `true` for server-side compilation, and `false` for client-side compilation */\n isServer: boolean\n /** The build id, used as a unique identifier between builds */\n buildId: string\n /** The next.config.js merged with default values */\n config: NextConfigComplete\n /** Default loaders used internally by Next.js */\n defaultLoaders: {\n /** Default babel-loader configuration */\n babel: any\n }\n /** Number of total Next.js pages */\n totalPages: number\n /** The webpack configuration */\n webpack: any\n /** The current server runtime */\n nextRuntime?: 'nodejs' | 'edge'\n}\n\nexport interface NextJsWebpackConfig {\n (\n /** Existing Webpack config */\n config: any,\n context: WebpackConfigContext\n ): any\n}\n\n/**\n * Set of options for the react compiler next.js\n * currently supports.\n *\n * This can be changed without breaking changes while supporting\n * react compiler in the experimental phase.\n */\nexport interface ReactCompilerOptions {\n compilationMode?: 'infer' | 'annotation' | 'all'\n panicThreshold?: 'ALL_ERRORS' | 'CRITICAL_ERRORS' | 'NONE'\n}\n\nexport interface IncomingRequestLoggingConfig {\n /**\n * A regular expression array to match incoming requests that should not be logged.\n * You can specify multiple patterns to match incoming requests that should not be logged.\n */\n ignore?: RegExp[]\n}\n\nexport interface LoggingConfig {\n fetches?: {\n fullUrl?: boolean\n /**\n * If true, fetch requests that are restored from the HMR cache are logged\n * during an HMR refresh request, i.e. when editing a server component.\n */\n hmrRefreshes?: boolean\n }\n\n /**\n * If set to false, incoming request logging is disabled.\n * You can specify a pattern to match incoming requests that should not be logged.\n */\n incomingRequests?: boolean | IncomingRequestLoggingConfig\n}\n\nexport interface ExperimentalConfig {\n adapterPath?: string\n useSkewCookie?: boolean\n cacheHandlers?: {\n default?: string\n remote?: string\n static?: string\n [handlerName: string]: string | undefined\n }\n multiZoneDraftMode?: boolean\n appNavFailHandling?: boolean\n prerenderEarlyExit?: boolean\n linkNoTouchStart?: boolean\n caseSensitiveRoutes?: boolean\n clientSegmentCache?: boolean | 'client-only'\n\n /**\n * Enables RDC for Dynamic Navigations. This is only supported for App Router\n * when Partial Prerendering is also enabled. This is enabled by default when\n * Partial Prerendering is enabled.\n */\n rdcForNavigations?: boolean\n clientParamParsing?: boolean\n\n /**\n * The origins that are allowed to write the rewritten headers when\n * performing a non-relative rewrite. When undefined, no non-relative\n * rewrites will get the rewrite headers.\n */\n clientParamParsingOrigins?: string[]\n dynamicOnHover?: boolean\n preloadEntriesOnStart?: boolean\n clientRouterFilter?: boolean\n clientRouterFilterRedirects?: boolean\n /**\n * This config can be used to override the cache behavior for the client router.\n * These values indicate the time, in seconds, that the cache should be considered\n * reusable. When the `prefetch` Link prop is left unspecified, this will use the `dynamic` value.\n * When the `prefetch` Link prop is set to `true`, this will use the `static` value.\n */\n staleTimes?: {\n dynamic?: number\n static?: number\n }\n cacheLife?: {\n [profile: string]: {\n // How long the client can cache a value without checking with the server.\n stale?: number\n // How frequently you want the cache to refresh on the server.\n // Stale values may be served while revalidating.\n revalidate?: number\n // In the worst case scenario, where you haven't had traffic in a while,\n // how stale can a value be until you prefer deopting to dynamic.\n // Must be longer than revalidate.\n expire?: number\n }\n }\n // decimal for percent for possible false positives\n // e.g. 0.01 for 10% potential false matches lower\n // percent increases size of the filter\n clientRouterFilterAllowedRate?: number\n externalMiddlewareRewritesResolve?: boolean\n extensionAlias?: Record<string, any>\n allowedRevalidateHeaderKeys?: string[]\n fetchCacheKeyPrefix?: string\n imgOptConcurrency?: number | null\n imgOptTimeoutInSeconds?: number\n imgOptMaxInputPixels?: number\n imgOptSequentialRead?: boolean | null\n imgOptSkipMetadata?: boolean | null\n optimisticClientCache?: boolean\n /**\n * @deprecated use config.expireTime instead\n */\n expireTime?: number\n middlewarePrefetch?: 'strict' | 'flexible'\n manualClientBasePath?: boolean\n /**\n * CSS Chunking strategy. Defaults to `true` (\"loose\" mode), which guesses dependencies\n * between CSS files to keep ordering of them.\n * An alternative is 'strict', which will try to keep correct ordering as\n * much as possible, even when this leads to many requests.\n */\n cssChunking?: boolean | 'strict'\n disablePostcssPresetEnv?: boolean\n cpus?: number\n memoryBasedWorkersCount?: boolean\n proxyTimeout?: number\n isrFlushToDisk?: boolean\n workerThreads?: boolean\n // optimizeCss can be boolean or critters' option object\n // Use Record<string, unknown> as critters doesn't export its Option type\n // https://github.com/GoogleChromeLabs/critters/blob/a590c05f9197b656d2aeaae9369df2483c26b072/packages/critters/src/index.d.ts\n optimizeCss?: boolean | Record<string, unknown>\n nextScriptWorkers?: boolean\n scrollRestoration?: boolean\n externalDir?: boolean\n /** @deprecated built-in amp support will be removed in Next 16 */\n amp?: {\n optimizer?: any\n validator?: string\n skipValidation?: boolean\n }\n disableOptimizedLoading?: boolean\n gzipSize?: boolean\n craCompat?: boolean\n esmExternals?: boolean | 'loose'\n fullySpecified?: boolean\n urlImports?: NonNullable<webpack.Configuration['experiments']>['buildHttp']\n swcTraceProfiling?: boolean\n forceSwcTransforms?: boolean\n\n swcPlugins?: Array<[string, Record<string, unknown>]>\n largePageDataBytes?: number\n /**\n * If set to `false`, webpack won't fall back to polyfill Node.js modules in the browser\n * Full list of old polyfills is accessible here:\n * [webpack/webpack#ModuleNotoundError.js#L13-L42](https://github.com/webpack/webpack/blob/2a0536cf510768111a3a6dceeb14cb79b9f59273/lib/ModuleNotFoundError.js#L13-L42)\n */\n fallbackNodePolyfills?: false\n sri?: {\n algorithm?: SubresourceIntegrityAlgorithm\n }\n\n webVitalsAttribution?: Array<(typeof WEB_VITALS)[number]>\n\n /**\n * Automatically apply the \"modularizeImports\" optimization to imports of the specified packages.\n */\n optimizePackageImports?: string[]\n\n /**\n * Optimize React APIs for server builds.\n */\n optimizeServerReact?: boolean\n\n /**\n * @deprecated Use `config.turbopack` instead.\n * Run `npx @next/codemod@latest next-experimental-turbo-to-turbopack .` to migrate automatically.\n */\n turbo?: DeprecatedExperimentalTurboOptions\n\n /**\n * A target memory limit for turbo, in bytes.\n */\n turbopackMemoryLimit?: number\n\n /**\n * Enable minification. Defaults to true in build mode and false in dev mode.\n */\n turbopackMinify?: boolean\n\n /**\n * Enable scope hoisting. Defaults to true in build mode. Always disabled in development mode.\n */\n turbopackScopeHoisting?: boolean\n\n /**\n * Enable persistent caching for the turbopack dev server and build.\n */\n turbopackPersistentCaching?: boolean\n\n /**\n * Enable source maps. Defaults to true.\n */\n turbopackSourceMaps?: boolean\n\n /**\n * Enable tree shaking for the turbopack dev server and build.\n */\n turbopackTreeShaking?: boolean\n\n /**\n * Enable removing unused exports for turbopack dev server and build.\n */\n turbopackRemoveUnusedExports?: boolean\n\n /**\n * Use the system-provided CA roots instead of bundled CA roots for external HTTPS requests\n * made by Turbopack. Currently this is only used for fetching data from Google Fonts.\n *\n * This may be useful in cases where you or an employer are MITMing traffic.\n *\n * This option is experimental because:\n * - This may cause small performance problems, as it uses [`rustls-native-certs`](\n * https://github.com/rustls/rustls-native-certs).\n * - In the future, this may become the default, and this option may be eliminated, once\n * <https://github.com/seanmonstar/reqwest/issues/2159> is resolved.\n *\n * Users who need to configure this behavior system-wide can override the project\n * configuration using the `NEXT_TURBOPACK_EXPERIMENTAL_USE_SYSTEM_TLS_CERTS=1` environment\n * variable.\n *\n * This option is ignored on Windows on ARM, where the native TLS implementation is always\n * used.\n *\n * If you need to set a proxy, Turbopack [respects the common `HTTP_PROXY` and `HTTPS_PROXY`\n * environment variable convention](https://docs.rs/reqwest/latest/reqwest/#proxies). HTTP\n * proxies are supported, SOCKS proxies are not currently supported.\n */\n turbopackUseSystemTlsCerts?: boolean\n\n /**\n * Set this to `false` to disable the automatic configuration of the babel loader when a babel\n * configuration file is present. The babel loader configuration is enabled by default.\n */\n turbopackUseBuiltinBabel?: boolean\n\n /**\n * Set this to `false` to disable the automatic configuration of the sass loader. The sass loader\n * configuration is enabled by default.\n */\n turbopackUseBuiltinSass?: boolean\n\n /**\n * For use with `@next/mdx`. Compile MDX files using the new Rust compiler.\n * @see https://nextjs.org/docs/app/api-reference/next-config-js/mdxRs\n */\n mdxRs?:\n | boolean\n | {\n development?: boolean\n jsx?: boolean\n jsxRuntime?: string\n jsxImportSource?: string\n providerImportSource?: string\n mdxType?: 'gfm' | 'commonmark'\n }\n\n /**\n * Enable type checking for Link and Router.push, etc.\n * @deprecated Use `typedRoutes` instead — this feature is now stable.\n * @see https://nextjs.org/docs/app/api-reference/config/typescript#statically-typed-links\n */\n typedRoutes?: boolean\n\n /**\n * Enable type-checking and autocompletion for environment variables.\n *\n * @default false\n */\n typedEnv?: boolean\n\n /**\n * Runs the compilations for server and edge in parallel instead of in serial.\n * This will make builds faster if there is enough server and edge functions\n * in the application at the cost of more memory.\n *\n * NOTE: This option is only valid when the build process can use workers. See\n * the documentation for `webpackBuildWorker` for more details.\n */\n parallelServerCompiles?: boolean\n\n /**\n * Runs the logic to collect build traces for the server routes in parallel\n * with other work during the compilation. This will increase the speed of\n * the build at the cost of more memory. This option may incur some additional\n * work compared to if the option was disabled since the work is started\n * before data from the client compilation is available to potentially reduce\n * the amount of code that needs to be traced. Despite that, this may still\n * result in faster builds for some applications.\n *\n * Valid values are:\n * - `true`: Collect the server build traces in parallel.\n * - `false`: Do not collect the server build traces in parallel.\n * - `undefined`: Collect server build traces in parallel only in the `experimental-compile` mode.\n *\n * NOTE: This option is only valid when the build process can use workers. See\n * the documentation for `webpackBuildWorker` for more details.\n */\n parallelServerBuildTraces?: boolean\n\n /**\n * Run the Webpack build in a separate process to optimize memory usage during build.\n * Valid values are:\n * - `false`: Disable the Webpack build worker\n * - `true`: Enable the Webpack build worker\n * - `undefined`: Enable the Webpack build worker only if the webpack config is not customized\n */\n webpackBuildWorker?: boolean\n\n /**\n * Enables optimizations to reduce memory usage in Webpack. This reduces the max size of the heap\n * but may increase compile times slightly.\n * Valid values are:\n * - `false`: Disable Webpack memory optimizations (default).\n * - `true`: Enables Webpack memory optimizations.\n */\n webpackMemoryOptimizations?: boolean\n\n /**\n * The array of the meta tags to the client injected by tracing propagation data.\n */\n clientTraceMetadata?: string[]\n\n /**\n * Enables experimental Partial Prerendering feature of Next.js.\n * Using this feature will enable the `react@experimental` for the `app` directory.\n */\n ppr?: ExperimentalPPRConfig\n\n /**\n * Enables experimental taint APIs in React.\n * Using this feature will enable the `react@experimental` for the `app` directory.\n */\n taint?: boolean\n\n /**\n * Enables the Back/Forward Cache for the router.\n */\n routerBFCache?: boolean\n\n /**\n * Uninstalls all \"unhandledRejection\" and \"uncaughtException\" listeners from\n * the global process so that we can override the behavior, which in some\n * runtimes is to exit the process.\n *\n * This is experimental until we've considered the impact in various\n * deployment environments.\n */\n removeUncaughtErrorAndRejectionListeners?: boolean\n\n /**\n * During an RSC request, validates that the request headers match the\n * cache-busting search parameter sent by the client.\n */\n validateRSCRequestHeaders?: boolean\n\n serverActions?: {\n /**\n * Allows adjusting body parser size limit for server actions.\n */\n bodySizeLimit?: SizeLimit\n\n /**\n * Allowed origins that can bypass Server Action's CSRF check. This is helpful\n * when you have reverse proxy in front of your app.\n * @example\n * [\"my-app.com\", \"*.my-app.com\"]\n */\n allowedOrigins?: string[]\n }\n\n /**\n * enables the minification of server code.\n */\n serverMinification?: boolean\n\n /**\n * Enables source maps while generating static pages.\n * Helps with errors during the prerender phase in `next build`.\n */\n enablePrerenderSourceMaps?: boolean\n\n /**\n * Enables source maps generation for the server production bundle.\n */\n serverSourceMaps?: boolean\n\n /**\n * @internal Used by the Next.js internals only.\n */\n trustHostHeader?: boolean\n /**\n * @internal Used by the Next.js internals only.\n */\n isExperimentalCompile?: boolean\n\n useWasmBinary?: boolean\n\n /**\n * Use lightningcss instead of postcss-loader\n */\n useLightningcss?: boolean\n\n /**\n * Enables view transitions by using the {@link https://github.com/facebook/react/pull/31975 unstable_ViewTransition} Component.\n */\n viewTransition?: boolean\n\n /**\n * Enables `fetch` requests to be proxied to the experimental test proxy server\n */\n testProxy?: boolean\n\n /**\n * Set a default test runner to be used by `next experimental-test`.\n */\n defaultTestRunner?: SupportedTestRunners\n /**\n * Allow NODE_ENV=development even for `next build`.\n */\n allowDevelopmentBuild?: true\n /**\n * @deprecated use `config.bundlePagesRouterDependencies` instead\n *\n */\n bundlePagesExternals?: boolean\n /**\n * @deprecated use `config.serverExternalPackages` instead\n *\n */\n serverComponentsExternalPackages?: string[]\n /**\n * Enable experimental React compiler optimization.\n * Configuration accepts partial config object to the compiler, if provided\n * compiler will be enabled.\n */\n reactCompiler?: boolean | ReactCompilerOptions\n\n /**\n * When enabled, in dev mode, Next.js will send React's debug info through the\n * WebSocket connection, instead of including it in the main RSC payload.\n */\n reactDebugChannel?: boolean\n\n /**\n * The number of times to retry static generation (per page) before giving up.\n */\n staticGenerationRetryCount?: number\n\n /**\n * The amount of pages to export per worker during static generation.\n */\n staticGenerationMaxConcurrency?: number\n\n /**\n * The minimum number of pages to be chunked into each export worker.\n */\n staticGenerationMinPagesPerWorker?: number\n\n /**\n * Allows previously fetched data to be re-used when editing server components.\n */\n serverComponentsHmrCache?: boolean\n\n /**\n * When enabled, will cause IO in App Router to be excluded from prerenders,\n * unless explicitly cached. This also enables the experimental Partial\n * Prerendering feature of Next.js, and it enables `react@experimental` being\n * used for the `app` directory.\n */\n cacheComponents?: boolean\n\n /**\n * @deprecated Use `experimental.cacheComponents` instead.\n */\n dynamicIO?: boolean\n\n /**\n * Render <style> tags inline in the HTML for imported CSS assets.\n * Supports app-router in production mode only.\n */\n inlineCss?: boolean\n\n // TODO: Remove this config when the API is stable.\n /**\n * This config allows you to enable the experimental navigation API `forbidden` and `unauthorized`.\n */\n authInterrupts?: boolean\n\n /**\n * Enables the use of the `\"use cache\"` directive.\n */\n useCache?: boolean\n\n /**\n * Enables detection and reporting of slow modules during development builds.\n * Enabling this may impact build performance to ensure accurate measurements.\n */\n slowModuleDetection?: {\n /**\n * The time threshold in milliseconds for identifying slow modules.\n * Modules taking longer than this build time threshold will be reported.\n */\n buildTimeThresholdMs: number\n }\n\n /**\n * Enables using the global-not-found.js file in the app directory\n *\n */\n globalNotFound?: boolean\n\n /**\n * Enable debug information to be forwarded from browser to dev server stdout/stderr\n */\n browserDebugInfoInTerminal?:\n | boolean\n | {\n /**\n * Option to limit stringification at a specific nesting depth when logging circular objects.\n * @default 5\n */\n depthLimit?: number\n\n /**\n * Maximum number of properties/elements to stringify when logging objects/arrays with circular references.\n * @default 100\n */\n edgeLimit?: number\n /**\n * Whether to include source location information in debug output when available\n */\n showSourceLocation?: boolean\n }\n\n /**\n * When enabled, will only opt-in to special smooth scroll handling when\n * data-scroll-behavior=\"smooth\" is present on the <html> element.\n * This will be the default, non-configurable behavior in the next major version.\n *\n * @default false\n */\n optimizeRouterScrolling?: boolean\n\n /**\n * Enable accessing root params via the `next/root-params` module.\n */\n rootParams?: boolean\n}\n\nexport type ExportPathMap = {\n [path: string]: {\n page: string\n query?: NextParsedUrlQuery\n\n /**\n * When true, this indicates that this is a pages router page that should\n * be rendered as a fallback.\n *\n * @internal\n */\n _pagesFallback?: boolean\n\n /**\n * The locale that this page should be rendered in.\n *\n * @internal\n */\n _locale?: string\n\n /**\n * The path that was used to generate the page.\n *\n * @internal\n */\n _ssgPath?: string\n\n /**\n * The parameters that are currently unknown.\n *\n * @internal\n */\n _fallbackRouteParams?: readonly FallbackRouteParam[]\n\n /**\n * @internal\n */\n _isAppDir?: boolean\n\n /**\n * @internal\n */\n _isDynamicError?: boolean\n\n /**\n * @internal\n */\n _isRoutePPREnabled?: boolean\n\n /**\n * When true, the page is prerendered as a fallback shell, while allowing\n * any dynamic accesses to result in an empty shell. This is the case when\n * the app has `experimental.ppr` and `experimental.cacheComponents` enabled, and\n * there are also routes prerendered with a more complete set of params.\n * Prerendering those routes would catch any invalid dynamic accesses.\n *\n * @internal\n */\n _allowEmptyStaticShell?: boolean\n }\n}\n\n/**\n * Next.js can be configured through a `next.config.js` file in the root of your project directory.\n *\n * This can change the behavior, enable experimental features, and configure other advanced options.\n *\n * Read more: [Next.js Docs: `next.config.js`](https://nextjs.org/docs/app/api-reference/config/next-config-js)\n */\nexport interface NextConfig extends Record<string, any> {\n allowedDevOrigins?: string[]\n\n exportPathMap?: (\n defaultMap: ExportPathMap,\n ctx: {\n dev: boolean\n dir: string\n outDir: string | null\n distDir: string\n buildId: string\n }\n ) => Promise<ExportPathMap> | ExportPathMap\n\n /**\n * Internationalization configuration\n *\n * @see [Internationalization docs](https://nextjs.org/docs/advanced-features/i18n-routing)\n */\n i18n?: I18NConfig | null\n\n /**\n * @since version 11\n * @see [ESLint configuration](https://nextjs.org/docs/app/api-reference/config/eslint)\n */\n eslint?: ESLintConfig\n\n /**\n * @see [Next.js TypeScript documentation](https://nextjs.org/docs/app/api-reference/config/typescript)\n */\n typescript?: TypeScriptConfig\n\n /**\n * Enable type checking for Link and Router.push, etc.\n * This feature requires TypeScript in your project.\n *\n * @see [Typed Links documentation](https://nextjs.org/docs/app/api-reference/config/typescript#statically-typed-links)\n */\n typedRoutes?: boolean\n\n /**\n * Headers allow you to set custom HTTP headers for an incoming request path.\n *\n * @see [Headers configuration documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/headers)\n */\n headers?: () => Promise<Header[]>\n\n /**\n * Rewrites allow you to map an incoming request path to a different destination path.\n *\n * @see [Rewrites configuration documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/rewrites)\n */\n rewrites?: () => Promise<\n | Rewrite[]\n | {\n beforeFiles?: Rewrite[]\n afterFiles?: Rewrite[]\n fallback?: Rewrite[]\n }\n >\n\n /**\n * Redirects allow you to redirect an incoming request path to a different destination path.\n *\n * @see [Redirects configuration documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/redirects)\n */\n redirects?: () => Promise<Redirect[]>\n\n /**\n * @see [Moment.js locales excluded by default](https://nextjs.org/docs/upgrading#momentjs-locales-excluded-by-default)\n */\n excludeDefaultMomentLocales?: boolean\n\n /**\n * Before continuing to add custom webpack configuration to your application make sure Next.js doesn't already support your use-case\n *\n * @see [Custom Webpack Config documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/webpack)\n */\n webpack?: NextJsWebpackConfig | null\n\n /**\n * By default Next.js will redirect urls with trailing slashes to their counterpart without a trailing slash.\n *\n * @default false\n * @see [Trailing Slash Configuration](https://nextjs.org/docs/app/api-reference/config/next-config-js/trailingSlash)\n */\n trailingSlash?: boolean\n\n /**\n * Next.js comes with built-in support for environment variables\n *\n * @see [Environment Variables documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/env)\n */\n env?: Record<string, string | undefined>\n\n /**\n * Destination directory (defaults to `.next`)\n */\n distDir?: string\n\n /**\n * The build output directory (defaults to `.next`) is now cleared by default except for the Next.js caches.\n */\n cleanDistDir?: boolean\n\n /**\n * To set up a CDN, you can set up an asset prefix and configure your CDN's origin to resolve to the domain that Next.js is hosted on.\n *\n * @see [CDN Support with Asset Prefix](https://nextjs.org/docs/app/api-reference/config/next-config-js/assetPrefix)\n */\n assetPrefix?: string\n\n /**\n * The default cache handler for the Pages and App Router uses the filesystem cache. This requires no configuration, however, you can customize the cache handler if you prefer.\n *\n * @see [Configuring Caching](https://nextjs.org/docs/app/building-your-application/deploying#configuring-caching) and the [API Reference](https://nextjs.org/docs/app/api-reference/next-config-js/incrementalCacheHandlerPath).\n */\n cacheHandler?: string | undefined\n\n /**\n * Configure the in-memory cache size in bytes. Defaults to 50 MB.\n * If `cacheMaxMemorySize: 0`, this disables in-memory caching entirely.\n *\n * @see [Configuring Caching](https://nextjs.org/docs/app/building-your-application/deploying#configuring-caching).\n */\n cacheMaxMemorySize?: number\n\n /**\n * By default, `Next` will serve each file in the `pages` folder under a pathname matching the filename.\n * To disable this behavior and prevent routing based set this to `true`.\n *\n * @default true\n * @see [Disabling file-system routing](https://nextjs.org/docs/advanced-features/custom-server#disabling-file-system-routing)\n */\n useFileSystemPublicRoutes?: boolean\n\n /**\n * @see [Configuring the build ID](https://nextjs.org/docs/app/api-reference/config/next-config-js/generateBuildId)\n */\n generateBuildId?: () => string | null | Promise<string | null>\n\n /** @see [Disabling ETag Configuration](https://nextjs.org/docs/app/api-reference/config/next-config-js/generateEtags) */\n generateEtags?: boolean\n\n /** @see [Including non-page files in the pages directory](https://nextjs.org/docs/app/api-reference/config/next-config-js/pageExtensions) */\n pageExtensions?: string[]\n\n /** @see [Compression documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/compress) */\n compress?: boolean\n\n /** @see [Disabling x-powered-by](https://nextjs.org/docs/app/api-reference/config/next-config-js/poweredByHeader) */\n poweredByHeader?: boolean\n\n /** @see [Using the Image Component](https://nextjs.org/docs/app/api-reference/next-config-js/images) */\n images?: ImageConfig\n\n /** Configure indicators in development environment */\n devIndicators?:\n | false\n | {\n /**\n * Position of the development tools indicator in the browser window.\n * @default \"bottom-left\"\n * */\n position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'\n }\n\n /**\n * Next.js exposes some options that give you some control over how the server will dispose or keep in memory built pages in development.\n *\n * @see [Configuring `onDemandEntries`](https://nextjs.org/docs/app/api-reference/config/next-config-js/onDemandEntries)\n */\n onDemandEntries?: {\n /** period (in ms) where the server will keep pages in the buffer */\n maxInactiveAge?: number\n /** number of pages that should be kept simultaneously without being disposed */\n pagesBufferLength?: number\n }\n\n /**\n * @deprecated built-in amp support will be removed in Next 16\n * @see [`next/amp`](https://nextjs.org/docs/api-reference/next/amp)\n */\n amp?: {\n canonicalBase?: string\n }\n\n /**\n * A unique identifier for a deployment that will be included in each request's query string or header.\n */\n deploymentId?: string\n\n /**\n * Deploy a Next.js application under a sub-path of a domain\n *\n * @see [Base path configuration](https://nextjs.org/docs/app/api-reference/config/next-config-js/basePath)\n */\n basePath?: string\n\n /** @see [Customizing sass options](https://nextjs.org/docs/app/api-reference/next-config-js/sassOptions) */\n sassOptions?: {\n implementation?: string\n [key: string]: any\n }\n\n /**\n * Enable browser source map generation during the production build\n *\n * @see [Source Maps](https://nextjs.org/docs/advanced-features/source-maps)\n */\n productionBrowserSourceMaps?: boolean\n\n /**\n * Enable react profiling in production\n *\n */\n reactProductionProfiling?: boolean\n\n /**\n * The Next.js runtime is Strict Mode-compliant.\n *\n * @see [React Strict Mode](https://nextjs.org/docs/app/api-reference/config/next-config-js/reactStrictMode)\n */\n reactStrictMode?: boolean | null\n\n /**\n * The maximum length of the headers that are emitted by React and added to\n * the response.\n *\n * @see [React Max Headers Length](https://nextjs.org/docs/app/api-reference/config/next-config-js/reactMaxHeadersLength)\n */\n reactMaxHeadersLength?: number\n\n /**\n * Add public (in browser) runtime configuration to your app\n *\n * @see [Runtime configuration](https://nextjs.org/docs/pages/api-reference/config/next-config-js/runtime-configuration\n */\n publicRuntimeConfig?: { [key: string]: any }\n\n /**\n * Add server runtime configuration to your app\n *\n * @see [Runtime configuration](https://nextjs.org/docs/pages/api-reference/config/next-config-js/runtime-configuration\n */\n serverRuntimeConfig?: { [key: string]: any }\n\n /**\n * Next.js enables HTTP Keep-Alive by default.\n * You may want to disable HTTP Keep-Alive for certain `fetch()` calls or globally.\n *\n * @see [Disabling HTTP Keep-Alive](https://nextjs.org/docs/app/api-reference/next-config-js/httpAgentOptions)\n */\n httpAgentOptions?: { keepAlive?: boolean }\n\n /**\n * Timeout after waiting to generate static pages in seconds\n *\n * @default 60\n */\n staticPageGenerationTimeout?: number\n\n /**\n * Add `\"crossorigin\"` attribute to generated `<script>` elements generated by `<Head />` or `<NextScript />` components\n *\n *\n * @see [`crossorigin` attribute documentation](https://developer.mozilla.org/docs/Web/HTML/Attributes/crossorigin)\n */\n crossOrigin?: 'anonymous' | 'use-credentials'\n\n /**\n * Optionally enable compiler transforms\n *\n * @see [Supported Compiler Options](https://nextjs.org/docs/advanced-features/compiler#supported-features)\n */\n compiler?: {\n reactRemoveProperties?:\n | boolean\n | {\n properties?: string[]\n }\n relay?: {\n src: string\n artifactDirectory?: string\n language?: 'typescript' | 'javascript' | 'flow'\n eagerEsModules?: boolean\n }\n removeConsole?:\n | boolean\n | {\n exclude?: string[]\n }\n styledComponents?: boolean | StyledComponentsConfig\n emotion?: boolean | EmotionConfig\n\n styledJsx?:\n | boolean\n | {\n useLightningcss?: boolean\n }\n\n /**\n * Replaces variables in your code during compile time. Each key will be\n * replaced with the respective values.\n */\n define?: Record<string, string>\n\n /**\n * Replaces server-only (Node.js and Edge) variables in your code during compile time.\n * Each key will be replaced with the respective values.\n */\n defineServer?: Record<string, string>\n\n /**\n * A hook function that executes after production build compilation finishes,\n * but before running post-compilation tasks such as type checking and\n * static page generation.\n */\n runAfterProductionCompile?: (metadata: {\n /**\n * The root directory of the project\n */\n projectDir: string\n /**\n * The build output directory (defaults to `.next`)\n */\n distDir: string\n }) => Promise<void>\n }\n\n /**\n * The type of build output.\n * - `undefined`: The default build output, `.next` directory, that works with production mode `next start` or a hosting provider like Vercel\n * - `'standalone'`: A standalone build output, `.next/standalone` directory, that only includes necessary files/dependencies. Useful for self-hosting in a Docker container.\n * - `'export'`: An exported build output, `out` directory, that only includes static HTML/CSS/JS. Useful for self-hosting without a Node.js server.\n * @see [Output File Tracing](https://nextjs.org/docs/advanced-features/output-file-tracing)\n * @see [Static HTML Export](https://nextjs.org/docs/advanced-features/static-html-export)\n */\n output?: 'standalone' | 'export'\n\n /**\n * Automatically transpile and bundle dependencies from local packages (like monorepos) or from external dependencies (`node_modules`). This replaces the\n * `next-transpile-modules` package.\n * @see [transpilePackages](https://nextjs.org/docs/advanced-features/compiler#module-transpilation)\n */\n transpilePackages?: string[]\n\n /**\n * Options for Turbopack. Temporarily also available as `experimental.turbo` for compatibility.\n */\n turbopack?: TurbopackOptions\n\n skipMiddlewareUrlNormalize?: boolean\n\n skipTrailingSlashRedirect?: boolean\n\n modularizeImports?: Record<\n string,\n {\n transform: string | Record<string, string>\n preventFullImport?: boolean\n skipDefaultConversion?: boolean\n }\n >\n\n /**\n * Logging configuration. Set to `false` to disable logging.\n */\n logging?: LoggingConfig | false\n\n /**\n * period (in seconds) where the server allow to serve stale cache\n */\n expireTime?: number\n\n /**\n * Enable experimental features. Note that all experimental features are subject to breaking changes in the future.\n */\n experimental?: ExperimentalConfig\n\n /**\n * Enables the bundling of node_modules packages (externals) for pages server-side bundles.\n * @see https://nextjs.org/docs/pages/api-reference/next-config-js/bundlePagesRouterDependencies\n */\n bundlePagesRouterDependencies?: boolean\n\n /**\n * A list of packages that should be treated as external in the server build.\n * @see https://nextjs.org/docs/app/api-reference/next-config-js/serverExternalPackages\n */\n serverExternalPackages?: string[]\n\n /**\n * This is the repo root usually and only files above this\n * directory are traced and included.\n */\n outputFileTracingRoot?: string\n\n /**\n * This allows manually excluding traced files if too many\n * are included incorrectly on a per-page basis.\n */\n outputFileTracingExcludes?: Record<string, string[]>\n\n /**\n * This allows manually including traced files if some\n * were not detected on a per-page basis.\n */\n outputFileTracingIncludes?: Record<string, string[]>\n\n watchOptions?: {\n pollIntervalMs?: number\n }\n\n /**\n * User Agent of bots that can handle streaming metadata.\n * Besides the default behavior, Next.js act differently on serving metadata to bots based on their capability.\n *\n * @default\n * /Mediapartners-Google|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview/i\n */\n htmlLimitedBots?: RegExp\n}\n\nexport const defaultConfig = Object.freeze({\n env: {},\n webpack: null,\n eslint: {\n ignoreDuringBuilds: false,\n },\n typescript: {\n ignoreBuildErrors: false,\n tsconfigPath: undefined,\n },\n typedRoutes: false,\n distDir: '.next',\n cleanDistDir: true,\n assetPrefix: '',\n cacheHandler: process.env.NEXT_CACHE_HANDLER_PATH,\n // default to 50MB limit\n cacheMaxMemorySize: 50 * 1024 * 1024,\n configOrigin: 'default',\n useFileSystemPublicRoutes: true,\n generateBuildId: () => null,\n generateEtags: true,\n pageExtensions: ['tsx', 'ts', 'jsx', 'js'],\n poweredByHeader: true,\n compress: true,\n images: imageConfigDefault,\n devIndicators: {\n position: 'bottom-left',\n },\n onDemandEntries: {\n maxInactiveAge: 60 * 1000,\n pagesBufferLength: 5,\n },\n amp: {\n canonicalBase: '',\n },\n basePath: '',\n sassOptions: {},\n trailingSlash: false,\n i18n: null,\n productionBrowserSourceMaps: false,\n excludeDefaultMomentLocales: true,\n serverRuntimeConfig: {},\n publicRuntimeConfig: {},\n reactProductionProfiling: false,\n reactStrictMode: null,\n reactMaxHeadersLength: 6000,\n httpAgentOptions: {\n keepAlive: true,\n },\n logging: {},\n compiler: {},\n expireTime: process.env.NEXT_PRIVATE_CDN_CONSUMED_SWR_CACHE_CONTROL\n ? undefined\n : 31536000, // one year\n staticPageGenerationTimeout: 60,\n output: !!process.env.NEXT_PRIVATE_STANDALONE ? 'standalone' : undefined,\n modularizeImports: undefined,\n outputFileTracingRoot: process.env.NEXT_PRIVATE_OUTPUT_TRACE_ROOT || '',\n allowedDevOrigins: undefined,\n experimental: {\n adapterPath: process.env.NEXT_ADAPTER_PATH || undefined,\n useSkewCookie: false,\n cacheLife: {\n default: {\n stale: undefined, // defaults to staleTimes.static\n revalidate: 60 * 15, // 15 minutes\n expire: INFINITE_CACHE,\n },\n seconds: {\n stale: 30, // 30 seconds\n revalidate: 1, // 1 second\n expire: 60, // 1 minute\n },\n minutes: {\n stale: 60 * 5, // 5 minutes\n revalidate: 60, // 1 minute\n expire: 60 * 60, // 1 hour\n },\n hours: {\n stale: 60 * 5, // 5 minutes\n revalidate: 60 * 60, // 1 hour\n expire: 60 * 60 * 24, // 1 day\n },\n days: {\n stale: 60 * 5, // 5 minutes\n revalidate: 60 * 60 * 24, // 1 day\n expire: 60 * 60 * 24 * 7, // 1 week\n },\n weeks: {\n stale: 60 * 5, // 5 minutes\n revalidate: 60 * 60 * 24 * 7, // 1 week\n expire: 60 * 60 * 24 * 30, // 1 month\n },\n max: {\n stale: 60 * 5, // 5 minutes\n revalidate: 60 * 60 * 24 * 30, // 1 month\n expire: INFINITE_CACHE, // Unbounded.\n },\n },\n cacheHandlers: {\n default: process.env.NEXT_DEFAULT_CACHE_HANDLER_PATH,\n remote: process.env.NEXT_REMOTE_CACHE_HANDLER_PATH,\n static: process.env.NEXT_STATIC_CACHE_HANDLER_PATH,\n },\n cssChunking: true,\n multiZoneDraftMode: false,\n appNavFailHandling: false,\n prerenderEarlyExit: true,\n serverMinification: true,\n // Will default to cacheComponents value.\n enablePrerenderSourceMaps: undefined,\n serverSourceMaps: false,\n linkNoTouchStart: false,\n caseSensitiveRoutes: false,\n clientSegmentCache: false,\n rdcForNavigations: false,\n clientParamParsing: false,\n clientParamParsingOrigins: undefined,\n dynamicOnHover: false,\n preloadEntriesOnStart: true,\n clientRouterFilter: true,\n clientRouterFilterRedirects: false,\n fetchCacheKeyPrefix: '',\n middlewarePrefetch: 'flexible',\n optimisticClientCache: true,\n manualClientBasePath: false,\n cpus: Math.max(\n 1,\n (Number(process.env.CIRCLE_NODE_TOTAL) ||\n (os.cpus() || { length: 1 }).length) - 1\n ),\n memoryBasedWorkersCount: false,\n imgOptConcurrency: null,\n imgOptTimeoutInSeconds: 7,\n imgOptMaxInputPixels: 268_402_689, // https://sharp.pixelplumbing.com/api-constructor#:~:text=%5Boptions.limitInputPixels%5D\n imgOptSequentialRead: null,\n imgOptSkipMetadata: null,\n isrFlushToDisk: true,\n workerThreads: false,\n proxyTimeout: undefined,\n optimizeCss: false,\n nextScriptWorkers: false,\n scrollRestoration: false,\n externalDir: false,\n disableOptimizedLoading: false,\n gzipSize: true,\n craCompat: false,\n esmExternals: true,\n fullySpecified: false,\n swcTraceProfiling: false,\n forceSwcTransforms: false,\n swcPlugins: undefined,\n largePageDataBytes: 128 * 1000, // 128KB by default\n disablePostcssPresetEnv: undefined,\n amp: undefined,\n urlImports: undefined,\n turbo: undefined,\n typedEnv: false,\n clientTraceMetadata: undefined,\n parallelServerCompiles: false,\n parallelServerBuildTraces: false,\n ppr: false,\n authInterrupts: false,\n webpackBuildWorker: undefined,\n webpackMemoryOptimizations: false,\n optimizeServerReact: true,\n viewTransition: false,\n routerBFCache: false,\n removeUncaughtErrorAndRejectionListeners: false,\n validateRSCRequestHeaders: !!(\n process.env.__NEXT_TEST_MODE || !isStableBuild()\n ),\n staleTimes: {\n dynamic: 0,\n static: 300,\n },\n allowDevelopmentBuild: undefined,\n reactCompiler: undefined,\n reactDebugChannel: false,\n staticGenerationRetryCount: undefined,\n serverComponentsHmrCache: true,\n staticGenerationMaxConcurrency: 8,\n staticGenerationMinPagesPerWorker: 25,\n cacheComponents: false,\n inlineCss: false,\n useCache: undefined,\n slowModuleDetection: undefined,\n globalNotFound: false,\n browserDebugInfoInTerminal: false,\n optimizeRouterScrolling: false,\n },\n htmlLimitedBots: undefined,\n bundlePagesRouterDependencies: false,\n} satisfies NextConfig)\n\nexport async function normalizeConfig(phase: string, config: any) {\n if (typeof config === 'function') {\n config = config(phase, { defaultConfig })\n }\n // Support `new Promise` and `async () =>` as return values of the config export\n return await config\n}\n"],"names":["defaultConfig","normalizeConfig","Object","freeze","env","webpack","eslint","ignoreDuringBuilds","typescript","ignoreBuildErrors","tsconfigPath","undefined","typedRoutes","distDir","cleanDistDir","assetPrefix","cacheHandler","process","NEXT_CACHE_HANDLER_PATH","cacheMaxMemorySize","configOrigin","useFileSystemPublicRoutes","generateBuildId","generateEtags","pageExtensions","poweredByHeader","compress","images","imageConfigDefault","devIndicators","position","onDemandEntries","maxInactiveAge","pagesBufferLength","amp","canonicalBase","basePath","sassOptions","trailingSlash","i18n","productionBrowserSourceMaps","excludeDefaultMomentLocales","serverRuntimeConfig","publicRuntimeConfig","reactProductionProfiling","reactStrictMode","reactMaxHeadersLength","httpAgentOptions","keepAlive","logging","compiler","expireTime","NEXT_PRIVATE_CDN_CONSUMED_SWR_CACHE_CONTROL","staticPageGenerationTimeout","output","NEXT_PRIVATE_STANDALONE","modularizeImports","outputFileTracingRoot","NEXT_PRIVATE_OUTPUT_TRACE_ROOT","allowedDevOrigins","experimental","adapterPath","NEXT_ADAPTER_PATH","useSkewCookie","cacheLife","default","stale","revalidate","expire","INFINITE_CACHE","seconds","minutes","hours","days","weeks","max","cacheHandlers","NEXT_DEFAULT_CACHE_HANDLER_PATH","remote","NEXT_REMOTE_CACHE_HANDLER_PATH","static","NEXT_STATIC_CACHE_HANDLER_PATH","cssChunking","multiZoneDraftMode","appNavFailHandling","prerenderEarlyExit","serverMinification","enablePrerenderSourceMaps","serverSourceMaps","linkNoTouchStart","caseSensitiveRoutes","clientSegmentCache","rdcForNavigations","clientParamParsing","clientParamParsingOrigins","dynamicOnHover","preloadEntriesOnStart","clientRouterFilter","clientRouterFilterRedirects","fetchCacheKeyPrefix","middlewarePrefetch","optimisticClientCache","manualClientBasePath","cpus","Math","Number","CIRCLE_NODE_TOTAL","os","length","memoryBasedWorkersCount","imgOptConcurrency","imgOptTimeoutInSeconds","imgOptMaxInputPixels","imgOptSequentialRead","imgOptSkipMetadata","isrFlushToDisk","workerThreads","proxyTimeout","optimizeCss","nextScriptWorkers","scrollRestoration","externalDir","disableOptimizedLoading","gzipSize","craCompat","esmExternals","fullySpecified","swcTraceProfiling","forceSwcTransforms","swcPlugins","largePageDataBytes","disablePostcssPresetEnv","urlImports","turbo","typedEnv","clientTraceMetadata","parallelServerCompiles","parallelServerBuildTraces","ppr","authInterrupts","webpackBuildWorker","webpackMemoryOptimizations","optimizeServerReact","viewTransition","routerBFCache","removeUncaughtErrorAndRejectionListeners","validateRSCRequestHeaders","__NEXT_TEST_MODE","isStableBuild","staleTimes","dynamic","allowDevelopmentBuild","reactCompiler","reactDebugChannel","staticGenerationRetryCount","serverComponentsHmrCache","staticGenerationMaxConcurrency","staticGenerationMinPagesPerWorker","cacheComponents","inlineCss","useCache","slowModuleDetection","globalNotFound","browserDebugInfoInTerminal","optimizeRouterScrolling","htmlLimitedBots","bundlePagesRouterDependencies","phase","config"],"mappings":";;;;;;;;;;;;;;;IAg7CaA,aAAa;eAAbA;;IAmMSC,eAAe;eAAfA;;;2DAnnDP;6BAQoB;2BAWJ;4BAOD;;;;;;AAs5CvB,MAAMD,gBAAgBE,OAAOC,MAAM,CAAC;IACzCC,KAAK,CAAC;IACNC,SAAS;IACTC,QAAQ;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fC,cAAc1G;QACd2G,aAAa;QACbC,mBAAmB;QACnBC,mBAAmB;QACnBC,aAAa;QACbC,yBAAyB;QACzBC,UAAU;QACVC,WAAW;QACXC,cAAc;QACdC,gBAAgB;QAChBC,mBAAmB;QACnBC,oBAAoB;QACpBC,YAAYtH;QACZuH,oBAAoB,MAAM;QAC1BC,yBAAyBxH;QACzBuB,KAAKvB;QACLyH,YAAYzH;QACZ0H,OAAO1H;QACP2H,UAAU;QACVC,qBAAqB5H;QACrB6H,wBAAwB;QACxBC,2BAA2B;QAC3BC,KAAK;QACLC,gBAAgB;QAChBC,oBAAoBjI;QACpBkI,4BAA4B;QAC5BC,qBAAqB;QACrBC,gBAAgB;QAChBC,eAAe;QACfC,0CAA0C;QAC1CC,2BAA2B,CAAC,CAC1BjI,CAAAA,QAAQb,GAAG,CAAC+I,gBAAgB,IAAI,CAACC,IAAAA,yBAAa,GAAC;QAEjDC,YAAY;YACVC,SAAS;YACTtE,QAAQ;QACV;QACAuE,uBAAuB5I;QACvB6I,eAAe7I;QACf8I,mBAAmB;QACnBC,4BAA4B/I;QAC5BgJ,0BAA0B;QAC1BC,gCAAgC;QAChCC,mCAAmC;QACnCC,iBAAiB;QACjBC,WAAW;QACXC,UAAUrJ;QACVsJ,qBAAqBtJ;QACrBuJ,gBAAgB;QAChBC,4BAA4B;QAC5BC,yBAAyB;IAC3B;IACAC,iBAAiB1J;IACjB2J,+BAA+B;AACjC;AAEO,eAAerK,gBAAgBsK,KAAa,EAAEC,MAAW;IAC9D,IAAI,OAAOA,WAAW,YAAY;QAChCA,SAASA,OAAOD,OAAO;YAAEvK;QAAc;IACzC;IACA,gFAAgF;IAChF,OAAO,MAAMwK;AACf","ignoreList":[0]}
|
@@ -146,7 +146,7 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
|
|
146
146
|
}
|
147
147
|
const hasRewrites = opts.fsChecker.rewrites.afterFiles.length > 0 || opts.fsChecker.rewrites.beforeFiles.length > 0 || opts.fsChecker.rewrites.fallback.length > 0;
|
148
148
|
const hotReloaderSpan = (0, _trace.trace)('hot-reloader', undefined, {
|
149
|
-
version: "15.5.1-canary.
|
149
|
+
version: "15.5.1-canary.33"
|
150
150
|
});
|
151
151
|
// Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
|
152
152
|
// of the current `next dev` invocation.
|
@@ -264,7 +264,7 @@ class HotReloaderWebpack {
|
|
264
264
|
this.previewProps = previewProps;
|
265
265
|
this.rewrites = rewrites;
|
266
266
|
this.hotReloaderSpan = (0, _trace.trace)('hot-reloader', undefined, {
|
267
|
-
version: "15.5.1-canary.
|
267
|
+
version: "15.5.1-canary.33"
|
268
268
|
});
|
269
269
|
// Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
|
270
270
|
// of the current `next dev` invocation.
|
@@ -82,7 +82,7 @@ function logStartInfo({ networkUrl, appUrl, envInfo, experimentalFeatures, logBu
|
|
82
82
|
bundlerSuffix = ' (webpack)';
|
83
83
|
}
|
84
84
|
}
|
85
|
-
_log.bootstrap(`${(0, _picocolors.bold)((0, _picocolors.purple)(`${_log.prefixes.ready} Next.js ${"15.5.1-canary.
|
85
|
+
_log.bootstrap(`${(0, _picocolors.bold)((0, _picocolors.purple)(`${_log.prefixes.ready} Next.js ${"15.5.1-canary.33"}`))}${bundlerSuffix}`);
|
86
86
|
if (appUrl) {
|
87
87
|
_log.bootstrap(`- Local: ${appUrl}`);
|
88
88
|
}
|
@@ -179,7 +179,7 @@ async function getRequestHandlers({ dir, port, isDev, onDevServerCleanup, server
|
|
179
179
|
async function startServer(serverOptions) {
|
180
180
|
const { dir, isDev, hostname, minimalMode, allowRetry, keepAliveTimeout, selfSignedCertificate } = serverOptions;
|
181
181
|
let { port } = serverOptions;
|
182
|
-
process.title = `next-server (v${"15.5.1-canary.
|
182
|
+
process.title = `next-server (v${"15.5.1-canary.33"})`;
|
183
183
|
let handlersReady = ()=>{};
|
184
184
|
let handlersError = ()=>{};
|
185
185
|
let handlersPromise = new Promise((resolve, reject)=>{
|
@@ -8,6 +8,13 @@ export declare function printAndExit(message: string, code?: number): never;
|
|
8
8
|
* @returns An array of strings with the tokenized arguments.
|
9
9
|
*/
|
10
10
|
export declare const tokenizeArgs: (input: string) => string[];
|
11
|
+
/**
|
12
|
+
* Get the node options from the environment variable `NODE_OPTIONS` and returns
|
13
|
+
* them as an array of strings.
|
14
|
+
*
|
15
|
+
* @returns An array of strings with the node options.
|
16
|
+
*/
|
17
|
+
export declare const getNodeOptionsArgs: () => string[];
|
11
18
|
/**
|
12
19
|
* The debug address is in the form of `[host:]port`. The host is optional.
|
13
20
|
*/
|
package/dist/server/lib/utils.js
CHANGED
@@ -10,6 +10,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
10
10
|
getFormattedNodeOptionsWithoutInspect: null,
|
11
11
|
getMaxOldSpaceSize: null,
|
12
12
|
getNodeDebugType: null,
|
13
|
+
getNodeOptionsArgs: null,
|
13
14
|
getParsedDebugAddress: null,
|
14
15
|
getParsedNodeOptionsWithoutInspect: null,
|
15
16
|
parseValidPositiveInteger: null,
|
@@ -44,6 +45,9 @@ _export(exports, {
|
|
44
45
|
getNodeDebugType: function() {
|
45
46
|
return getNodeDebugType;
|
46
47
|
},
|
48
|
+
getNodeOptionsArgs: function() {
|
49
|
+
return getNodeOptionsArgs;
|
50
|
+
},
|
47
51
|
getParsedDebugAddress: function() {
|
48
52
|
return getParsedDebugAddress;
|
49
53
|
},
|
@@ -153,12 +157,7 @@ const tokenizeArgs = (input)=>{
|
|
153
157
|
}
|
154
158
|
return args;
|
155
159
|
};
|
156
|
-
|
157
|
-
* Get the node options from the environment variable `NODE_OPTIONS` and returns
|
158
|
-
* them as an array of strings.
|
159
|
-
*
|
160
|
-
* @returns An array of strings with the node options.
|
161
|
-
*/ const getNodeOptionsArgs = ()=>{
|
160
|
+
const getNodeOptionsArgs = ()=>{
|
162
161
|
if (!process.env.NODE_OPTIONS) return [];
|
163
162
|
return tokenizeArgs(process.env.NODE_OPTIONS);
|
164
163
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/server/lib/utils.ts"],"sourcesContent":["import { parseArgs } from 'node:util'\nimport { InvalidArgumentError } from 'next/dist/compiled/commander'\n\nexport function printAndExit(message: string, code = 1) {\n if (code === 0) {\n console.log(message)\n } else {\n console.error(message)\n }\n\n return process.exit(code)\n}\n\nconst parseNodeArgs = (args: string[]) => {\n const { values, tokens } = parseArgs({ args, strict: false, tokens: true })\n\n // For the `NODE_OPTIONS`, we support arguments with values without the `=`\n // sign. We need to parse them manually.\n let orphan = null\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i]\n\n if (token.kind === 'option-terminator') {\n break\n }\n\n // When we encounter an option, if it's value is undefined, we should check\n // to see if the following tokens are positional parameters. If they are,\n // then the option is orphaned, and we can assign it.\n if (token.kind === 'option') {\n orphan = typeof token.value === 'undefined' ? token : null\n continue\n }\n\n // If the token isn't a positional one, then we can't assign it to the found\n // orphaned option.\n if (token.kind !== 'positional') {\n orphan = null\n continue\n }\n\n // If we don't have an orphan, then we can skip this token.\n if (!orphan) {\n continue\n }\n\n // If the token is a positional one, and it has a value, so add it to the\n // values object. If it already exists, append it with a space.\n if (orphan.name in values && typeof values[orphan.name] === 'string') {\n values[orphan.name] += ` ${token.value}`\n } else {\n values[orphan.name] = token.value\n }\n }\n\n return values\n}\n\n/**\n * Tokenizes the arguments string into an array of strings, supporting quoted\n * values and escaped characters.\n * Converted from: https://github.com/nodejs/node/blob/c29d53c5cfc63c5a876084e788d70c9e87bed880/src/node_options.cc#L1401\n *\n * @param input The arguments string to be tokenized.\n * @returns An array of strings with the tokenized arguments.\n */\nexport const tokenizeArgs = (input: string): string[] => {\n let args: string[] = []\n let isInString = false\n let willStartNewArg = true\n\n for (let i = 0; i < input.length; i++) {\n let char = input[i]\n\n // Skip any escaped characters in strings.\n if (char === '\\\\' && isInString) {\n // Ensure we don't have an escape character at the end.\n if (input.length === i + 1) {\n throw new Error('Invalid escape character at the end.')\n }\n\n // Skip the next character.\n char = input[++i]\n }\n // If we find a space outside of a string, we should start a new argument.\n else if (char === ' ' && !isInString) {\n willStartNewArg = true\n continue\n }\n\n // If we find a quote, we should toggle the string flag.\n else if (char === '\"') {\n isInString = !isInString\n continue\n }\n\n // If we're starting a new argument, we should add it to the array.\n if (willStartNewArg) {\n args.push(char)\n willStartNewArg = false\n }\n // Otherwise, add it to the last argument.\n else {\n args[args.length - 1] += char\n }\n }\n\n if (isInString) {\n throw new Error('Unterminated string')\n }\n\n return args\n}\n\n/**\n * Get the node options from the environment variable `NODE_OPTIONS` and returns\n * them as an array of strings.\n *\n * @returns An array of strings with the node options.\n */\nconst getNodeOptionsArgs = () => {\n if (!process.env.NODE_OPTIONS) return []\n\n return tokenizeArgs(process.env.NODE_OPTIONS)\n}\n\n/**\n * The debug address is in the form of `[host:]port`. The host is optional.\n */\ntype DebugAddress = {\n host: string | undefined\n port: number\n}\n\n/**\n * Formats the debug address into a string.\n */\nexport const formatDebugAddress = ({ host, port }: DebugAddress): string => {\n if (host) return `${host}:${port}`\n return `${port}`\n}\n\n/**\n * Get's the debug address from the `NODE_OPTIONS` environment variable. If the\n * address is not found, it returns the default host (`undefined`) and port\n * (`9229`).\n *\n * @returns An object with the host and port of the debug address.\n */\nexport const getParsedDebugAddress = (): DebugAddress => {\n const args = getNodeOptionsArgs()\n if (args.length === 0) return { host: undefined, port: 9229 }\n\n const parsed = parseNodeArgs(args)\n\n // We expect to find the debug port in one of these options. The first one\n // found will be used.\n const address =\n parsed.inspect ?? parsed['inspect-brk'] ?? parsed['inspect_brk']\n\n if (!address || typeof address !== 'string') {\n return { host: undefined, port: 9229 }\n }\n\n // The address is in the form of `[host:]port`. Let's parse the address.\n if (address.includes(':')) {\n const [host, port] = address.split(':')\n return { host, port: parseInt(port, 10) }\n }\n\n return { host: undefined, port: parseInt(address, 10) }\n}\n\n/**\n * Get the debug address from the `NODE_OPTIONS` environment variable and format\n * it into a string.\n *\n * @returns A string with the formatted debug address.\n */\nexport const getFormattedDebugAddress = () =>\n formatDebugAddress(getParsedDebugAddress())\n\n/**\n * Stringify the arguments to be used in a command line. It will ignore any\n * argument that has a value of `undefined`.\n *\n * @param args The arguments to be stringified.\n * @returns A string with the arguments.\n */\nexport function formatNodeOptions(\n args: Record<string, string | boolean | undefined>\n): string {\n return Object.entries(args)\n .map(([key, value]) => {\n if (value === true) {\n return `--${key}`\n }\n\n if (value) {\n return `--${key}=${\n // Values with spaces need to be quoted. We use JSON.stringify to\n // also escape any nested quotes.\n value.includes(' ') && !value.startsWith('\"')\n ? JSON.stringify(value)\n : value\n }`\n }\n\n return null\n })\n .filter((arg) => arg !== null)\n .join(' ')\n}\n\n/**\n * Get the node options from the `NODE_OPTIONS` environment variable and parse\n * them into an object without the inspect options.\n *\n * @returns An object with the parsed node options.\n */\nexport function getParsedNodeOptionsWithoutInspect() {\n const args = getNodeOptionsArgs()\n if (args.length === 0) return {}\n\n const parsed = parseNodeArgs(args)\n\n // Remove inspect options.\n delete parsed.inspect\n delete parsed['inspect-brk']\n delete parsed['inspect_brk']\n\n return parsed\n}\n\n/**\n * Get the node options from the `NODE_OPTIONS` environment variable and format\n * them into a string without the inspect options.\n *\n * @returns A string with the formatted node options.\n */\nexport function getFormattedNodeOptionsWithoutInspect() {\n const args = getParsedNodeOptionsWithoutInspect()\n if (Object.keys(args).length === 0) return ''\n\n return formatNodeOptions(args)\n}\n\n/**\n * Check if the value is a valid positive integer and parse it. If it's not, it will throw an error.\n *\n * @param value The value to be parsed.\n */\nexport function parseValidPositiveInteger(value: string): number {\n const parsedValue = parseInt(value, 10)\n\n if (isNaN(parsedValue) || !isFinite(parsedValue) || parsedValue < 0) {\n throw new InvalidArgumentError(`'${value}' is not a non-negative number.`)\n }\n return parsedValue\n}\n\nexport const RESTART_EXIT_CODE = 77\n\nexport type NodeInspectType = 'inspect' | 'inspect-brk' | undefined\n\n/**\n * Get the debug type from the `NODE_OPTIONS` environment variable.\n */\nexport function getNodeDebugType(): NodeInspectType {\n const args = [...process.execArgv, ...getNodeOptionsArgs()]\n if (args.length === 0) return\n\n const parsed = parseNodeArgs(args)\n\n if (parsed.inspect) return 'inspect'\n if (parsed['inspect-brk'] || parsed['inspect_brk']) return 'inspect-brk'\n}\n\n/**\n * Get the `max-old-space-size` value from the `NODE_OPTIONS` environment\n * variable.\n *\n * @returns The value of the `max-old-space-size` option as a number.\n */\nexport function getMaxOldSpaceSize() {\n const args = getNodeOptionsArgs()\n if (args.length === 0) return\n\n const parsed = parseNodeArgs(args)\n\n const size = parsed['max-old-space-size'] || parsed['max_old_space_size']\n if (!size || typeof size !== 'string') return\n\n return parseInt(size, 10)\n}\n"],"names":["RESTART_EXIT_CODE","formatDebugAddress","formatNodeOptions","getFormattedDebugAddress","getFormattedNodeOptionsWithoutInspect","getMaxOldSpaceSize","getNodeDebugType","getParsedDebugAddress","getParsedNodeOptionsWithoutInspect","parseValidPositiveInteger","printAndExit","tokenizeArgs","message","code","console","log","error","process","exit","parseNodeArgs","args","values","tokens","parseArgs","strict","orphan","i","length","token","kind","value","name","input","isInString","willStartNewArg","char","Error","push","getNodeOptionsArgs","env","NODE_OPTIONS","host","port","undefined","parsed","address","inspect","includes","split","parseInt","Object","entries","map","key","startsWith","JSON","stringify","filter","arg","join","keys","parsedValue","isNaN","isFinite","InvalidArgumentError","execArgv","size"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;IAqQaA,iBAAiB;eAAjBA;;IA5HAC,kBAAkB;eAAlBA;;IAoDGC,iBAAiB;eAAjBA;;IAVHC,wBAAwB;eAAxBA;;IA6DGC,qCAAqC;eAArCA;;IA4CAC,kBAAkB;eAAlBA;;IAhBAC,gBAAgB;eAAhBA;;IAvHHC,qBAAqB;eAArBA;;IAuEGC,kCAAkC;eAAlCA;;IAgCAC,yBAAyB;eAAzBA;;IAzPAC,YAAY;eAAZA;;IA+DHC,YAAY;eAAZA;;;0BAlEa;2BACW;AAE9B,SAASD,aAAaE,OAAe,EAA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AAO;IAE3C,OAAOzB,kBAAkBkB;AAC3B;AAOO,SAASX,0BAA0BqB,KAAa;IACrD,MAAM+B,cAAcZ,SAASnB,OAAO;IAEpC,IAAIgC,MAAMD,gBAAgB,CAACE,SAASF,gBAAgBA,cAAc,GAAG;QACnE,MAAM,IAAIG,+BAAoB,CAAC,CAAC,CAAC,EAAElC,MAAM,+BAA+B,CAAC;IAC3E;IACA,OAAO+B;AACT;AAEO,MAAM7D,oBAAoB;AAO1B,SAASM;IACd,MAAMc,OAAO;WAAIH,QAAQgD,QAAQ;WAAK3B;KAAqB;IAC3D,IAAIlB,KAAKO,MAAM,KAAK,GAAG;IAEvB,MAAMiB,SAASzB,cAAcC;IAE7B,IAAIwB,OAAOE,OAAO,EAAE,OAAO;IAC3B,IAAIF,MAAM,CAAC,cAAc,IAAIA,MAAM,CAAC,cAAc,EAAE,OAAO;AAC7D;AAQO,SAASvC;IACd,MAAMe,OAAOkB;IACb,IAAIlB,KAAKO,MAAM,KAAK,GAAG;IAEvB,MAAMiB,SAASzB,cAAcC;IAE7B,MAAM8C,OAAOtB,MAAM,CAAC,qBAAqB,IAAIA,MAAM,CAAC,qBAAqB;IACzE,IAAI,CAACsB,QAAQ,OAAOA,SAAS,UAAU;IAEvC,OAAOjB,SAASiB,MAAM;AACxB","ignoreList":[0]}
|
1
|
+
{"version":3,"sources":["../../../src/server/lib/utils.ts"],"sourcesContent":["import { parseArgs } from 'node:util'\nimport { InvalidArgumentError } from 'next/dist/compiled/commander'\n\nexport function printAndExit(message: string, code = 1) {\n if (code === 0) {\n console.log(message)\n } else {\n console.error(message)\n }\n\n return process.exit(code)\n}\n\nconst parseNodeArgs = (args: string[]) => {\n const { values, tokens } = parseArgs({ args, strict: false, tokens: true })\n\n // For the `NODE_OPTIONS`, we support arguments with values without the `=`\n // sign. We need to parse them manually.\n let orphan = null\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i]\n\n if (token.kind === 'option-terminator') {\n break\n }\n\n // When we encounter an option, if it's value is undefined, we should check\n // to see if the following tokens are positional parameters. If they are,\n // then the option is orphaned, and we can assign it.\n if (token.kind === 'option') {\n orphan = typeof token.value === 'undefined' ? token : null\n continue\n }\n\n // If the token isn't a positional one, then we can't assign it to the found\n // orphaned option.\n if (token.kind !== 'positional') {\n orphan = null\n continue\n }\n\n // If we don't have an orphan, then we can skip this token.\n if (!orphan) {\n continue\n }\n\n // If the token is a positional one, and it has a value, so add it to the\n // values object. If it already exists, append it with a space.\n if (orphan.name in values && typeof values[orphan.name] === 'string') {\n values[orphan.name] += ` ${token.value}`\n } else {\n values[orphan.name] = token.value\n }\n }\n\n return values\n}\n\n/**\n * Tokenizes the arguments string into an array of strings, supporting quoted\n * values and escaped characters.\n * Converted from: https://github.com/nodejs/node/blob/c29d53c5cfc63c5a876084e788d70c9e87bed880/src/node_options.cc#L1401\n *\n * @param input The arguments string to be tokenized.\n * @returns An array of strings with the tokenized arguments.\n */\nexport const tokenizeArgs = (input: string): string[] => {\n let args: string[] = []\n let isInString = false\n let willStartNewArg = true\n\n for (let i = 0; i < input.length; i++) {\n let char = input[i]\n\n // Skip any escaped characters in strings.\n if (char === '\\\\' && isInString) {\n // Ensure we don't have an escape character at the end.\n if (input.length === i + 1) {\n throw new Error('Invalid escape character at the end.')\n }\n\n // Skip the next character.\n char = input[++i]\n }\n // If we find a space outside of a string, we should start a new argument.\n else if (char === ' ' && !isInString) {\n willStartNewArg = true\n continue\n }\n\n // If we find a quote, we should toggle the string flag.\n else if (char === '\"') {\n isInString = !isInString\n continue\n }\n\n // If we're starting a new argument, we should add it to the array.\n if (willStartNewArg) {\n args.push(char)\n willStartNewArg = false\n }\n // Otherwise, add it to the last argument.\n else {\n args[args.length - 1] += char\n }\n }\n\n if (isInString) {\n throw new Error('Unterminated string')\n }\n\n return args\n}\n\n/**\n * Get the node options from the environment variable `NODE_OPTIONS` and returns\n * them as an array of strings.\n *\n * @returns An array of strings with the node options.\n */\nexport const getNodeOptionsArgs = () => {\n if (!process.env.NODE_OPTIONS) return []\n\n return tokenizeArgs(process.env.NODE_OPTIONS)\n}\n\n/**\n * The debug address is in the form of `[host:]port`. The host is optional.\n */\ntype DebugAddress = {\n host: string | undefined\n port: number\n}\n\n/**\n * Formats the debug address into a string.\n */\nexport const formatDebugAddress = ({ host, port }: DebugAddress): string => {\n if (host) return `${host}:${port}`\n return `${port}`\n}\n\n/**\n * Get's the debug address from the `NODE_OPTIONS` environment variable. If the\n * address is not found, it returns the default host (`undefined`) and port\n * (`9229`).\n *\n * @returns An object with the host and port of the debug address.\n */\nexport const getParsedDebugAddress = (): DebugAddress => {\n const args = getNodeOptionsArgs()\n if (args.length === 0) return { host: undefined, port: 9229 }\n\n const parsed = parseNodeArgs(args)\n\n // We expect to find the debug port in one of these options. The first one\n // found will be used.\n const address =\n parsed.inspect ?? parsed['inspect-brk'] ?? parsed['inspect_brk']\n\n if (!address || typeof address !== 'string') {\n return { host: undefined, port: 9229 }\n }\n\n // The address is in the form of `[host:]port`. Let's parse the address.\n if (address.includes(':')) {\n const [host, port] = address.split(':')\n return { host, port: parseInt(port, 10) }\n }\n\n return { host: undefined, port: parseInt(address, 10) }\n}\n\n/**\n * Get the debug address from the `NODE_OPTIONS` environment variable and format\n * it into a string.\n *\n * @returns A string with the formatted debug address.\n */\nexport const getFormattedDebugAddress = () =>\n formatDebugAddress(getParsedDebugAddress())\n\n/**\n * Stringify the arguments to be used in a command line. It will ignore any\n * argument that has a value of `undefined`.\n *\n * @param args The arguments to be stringified.\n * @returns A string with the arguments.\n */\nexport function formatNodeOptions(\n args: Record<string, string | boolean | undefined>\n): string {\n return Object.entries(args)\n .map(([key, value]) => {\n if (value === true) {\n return `--${key}`\n }\n\n if (value) {\n return `--${key}=${\n // Values with spaces need to be quoted. We use JSON.stringify to\n // also escape any nested quotes.\n value.includes(' ') && !value.startsWith('\"')\n ? JSON.stringify(value)\n : value\n }`\n }\n\n return null\n })\n .filter((arg) => arg !== null)\n .join(' ')\n}\n\n/**\n * Get the node options from the `NODE_OPTIONS` environment variable and parse\n * them into an object without the inspect options.\n *\n * @returns An object with the parsed node options.\n */\nexport function getParsedNodeOptionsWithoutInspect() {\n const args = getNodeOptionsArgs()\n if (args.length === 0) return {}\n\n const parsed = parseNodeArgs(args)\n\n // Remove inspect options.\n delete parsed.inspect\n delete parsed['inspect-brk']\n delete parsed['inspect_brk']\n\n return parsed\n}\n\n/**\n * Get the node options from the `NODE_OPTIONS` environment variable and format\n * them into a string without the inspect options.\n *\n * @returns A string with the formatted node options.\n */\nexport function getFormattedNodeOptionsWithoutInspect() {\n const args = getParsedNodeOptionsWithoutInspect()\n if (Object.keys(args).length === 0) return ''\n\n return formatNodeOptions(args)\n}\n\n/**\n * Check if the value is a valid positive integer and parse it. If it's not, it will throw an error.\n *\n * @param value The value to be parsed.\n */\nexport function parseValidPositiveInteger(value: string): number {\n const parsedValue = parseInt(value, 10)\n\n if (isNaN(parsedValue) || !isFinite(parsedValue) || parsedValue < 0) {\n throw new InvalidArgumentError(`'${value}' is not a non-negative number.`)\n }\n return parsedValue\n}\n\nexport const RESTART_EXIT_CODE = 77\n\nexport type NodeInspectType = 'inspect' | 'inspect-brk' | undefined\n\n/**\n * Get the debug type from the `NODE_OPTIONS` environment variable.\n */\nexport function getNodeDebugType(): NodeInspectType {\n const args = [...process.execArgv, ...getNodeOptionsArgs()]\n if (args.length === 0) return\n\n const parsed = parseNodeArgs(args)\n\n if (parsed.inspect) return 'inspect'\n if (parsed['inspect-brk'] || parsed['inspect_brk']) return 'inspect-brk'\n}\n\n/**\n * Get the `max-old-space-size` value from the `NODE_OPTIONS` environment\n * variable.\n *\n * @returns The value of the `max-old-space-size` option as a number.\n */\nexport function getMaxOldSpaceSize() {\n const args = getNodeOptionsArgs()\n if (args.length === 0) return\n\n const parsed = parseNodeArgs(args)\n\n const size = parsed['max-old-space-size'] || parsed['max_old_space_size']\n if (!size || typeof size !== 'string') return\n\n return parseInt(size, 10)\n}\n"],"names":["RESTART_EXIT_CODE","formatDebugAddress","formatNodeOptions","getFormattedDebugAddress","getFormattedNodeOptionsWithoutInspect","getMaxOldSpaceSize","getNodeDebugType","getNodeOptionsArgs","getParsedDebugAddress","getParsedNodeOptionsWithoutInspect","parseValidPositiveInteger","printAndExit","tokenizeArgs","message","code","console","log","error","process","exit","parseNodeArgs","args","values","tokens","parseArgs","strict","orphan","i","length","token","kind","value","name","input","isInString","willStartNewArg","char","Error","push","env","NODE_OPTIONS","host","port","undefined","parsed","address","inspect","includes","split","parseInt","Object","entries","map","key","startsWith","JSON","stringify","filter","arg","join","keys","parsedValue","isNaN","isFinite","InvalidArgumentError","execArgv","size"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;IAqQaA,iBAAiB;eAAjBA;;IA5HAC,kBAAkB;eAAlBA;;IAoDGC,iBAAiB;eAAjBA;;IAVHC,wBAAwB;eAAxBA;;IA6DGC,qCAAqC;eAArCA;;IA4CAC,kBAAkB;eAAlBA;;IAhBAC,gBAAgB;eAAhBA;;IApJHC,kBAAkB;eAAlBA;;IA6BAC,qBAAqB;eAArBA;;IAuEGC,kCAAkC;eAAlCA;;IAgCAC,yBAAyB;eAAzBA;;IAzPAC,YAAY;eAAZA;;IA+DHC,YAAY;eAAZA;;;0BAlEa;2BACW;AAE9B,SAASD,aAAaE,OAAe,EAAEC,OAAO,CAAC;IACpD,IAAIA,SAAS,GAAG;QACdC,QAAQC,GAAG,CAACH;IACd,OAAO;QACLE,QAAQE,KAAK,CAACJ;IAChB;IAEA,OAAOK,QAAQC,IAAI,CAACL;AACtB;AAEA,MAAMM,gBAAgB,CAACC;IACrB,MAAM,EAAEC,MAAM,EAAEC,MAAM,EAAE,GAAGC,IAAAA,mBAAS,EAAC;QAAEH;QAAMI,QAAQ;QAAOF,QAAQ;IAAK;IAEzE,2EAA2E;IAC3E,wCAAwC;IACxC,IAAIG,SAAS;IACb,IAAK,IAAIC,IAAI,GAAGA,IAAIJ,OAAOK,MAAM,EAAED,IAAK;QACtC,MAAME,QAAQN,MAA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,OAAO,EAAE,OAAO;IAC3B,IAAIF,MAAM,CAAC,cAAc,IAAIA,MAAM,CAAC,cAAc,EAAE,OAAO;AAC7D;AAQO,SAASvC;IACd,MAAMgB,OAAOd;IACb,IAAIc,KAAKO,MAAM,KAAK,GAAG;IAEvB,MAAMgB,SAASxB,cAAcC;IAE7B,MAAM6C,OAAOtB,MAAM,CAAC,qBAAqB,IAAIA,MAAM,CAAC,qBAAqB;IACzE,IAAI,CAACsB,QAAQ,OAAOA,SAAS,UAAU;IAEvC,OAAOjB,SAASiB,MAAM;AACxB","ignoreList":[0]}
|
@@ -22,7 +22,7 @@ _export(exports, {
|
|
22
22
|
});
|
23
23
|
function isStableBuild() {
|
24
24
|
var _process_env___NEXT_VERSION;
|
25
|
-
return !((_process_env___NEXT_VERSION = "15.5.1-canary.
|
25
|
+
return !((_process_env___NEXT_VERSION = "15.5.1-canary.33") == null ? void 0 : _process_env___NEXT_VERSION.includes('canary')) && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
|
26
26
|
}
|
27
27
|
class CanaryOnlyError extends Error {
|
28
28
|
constructor(arg){
|