next 15.6.0-canary.3 → 15.6.0-canary.4
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/adapter/build-complete.js +1 -1
- package/dist/build/adapter/build-complete.js.map +1 -1
- package/dist/build/index.js +3 -3
- 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.prod.js +1 -1
- package/dist/compiled/next-server/pages-api-turbo.runtime.prod.js.map +1 -1
- package/dist/compiled/next-server/pages-turbo.runtime.prod.js +1 -1
- package/dist/compiled/next-server/pages-turbo.runtime.prod.js.map +1 -1
- package/dist/compiled/next-server/server.runtime.prod.js +1 -1
- package/dist/compiled/next-server/server.runtime.prod.js.map +1 -1
- package/dist/esm/build/adapter/build-complete.js +1 -1
- package/dist/esm/build/adapter/build-complete.js.map +1 -1
- package/dist/esm/build/index.js +3 -3
- 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/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/node-environment-extensions/unhandled-rejection.js +2 -2
- package/dist/esm/server/node-environment-extensions/unhandled-rejection.js.map +1 -1
- package/dist/esm/shared/lib/canary-only.js +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/node-environment-extensions/unhandled-rejection.js +2 -2
- package/dist/server/node-environment-extensions/unhandled-rejection.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
package/dist/bin/next
CHANGED
@@ -79,7 +79,7 @@ const program = new NextRootCommand();
|
|
79
79
|
program.name('next').description('The Next.js CLI allows you to develop, build, start your application, and more.').configureHelp({
|
80
80
|
formatHelp: (cmd, helper)=>(0, _formatclihelpoutput.formatCliHelpOutput)(cmd, helper),
|
81
81
|
subcommandTerm: (cmd)=>`${cmd.name()} ${cmd.usage()}`
|
82
|
-
}).helpCommand(false).helpOption('-h, --help', 'Displays this message.').version(`Next.js v${"15.6.0-canary.
|
82
|
+
}).helpCommand(false).helpOption('-h, --help', 'Displays this message.').version(`Next.js v${"15.6.0-canary.4"}`, '-v, --version', 'Outputs the Next.js version.');
|
83
83
|
program.command('build').description('Creates an optimized production build of your application. The output displays information about each route.').argument('[directory]', `A directory on which to build the application. ${(0, _picocolors.italic)('If no directory is provided, the current directory will be used.')}`).option('-d, --debug', 'Enables a more verbose build output.').option('--debug-prerender', 'Enables debug mode for prerendering. Not for production use!').option('--no-lint', 'Disables linting.').option('--no-mangling', 'Disables mangling.').option('--profile', 'Enables production profiling for React.').option('--experimental-app-only', 'Builds only App Router routes.').option('--turbo', 'Starts development mode using Turbopack.').option('--turbopack', 'Starts development mode using Turbopack.').addOption(new _commander.Option('--experimental-build-mode [mode]', 'Uses an experimental build mode.').choices([
|
84
84
|
'compile',
|
85
85
|
'generate',
|
@@ -408,7 +408,7 @@ async function handleBuildComplete({ dir, config, distDir, pageKeys, tracingRoot
|
|
408
408
|
outputs.prerenders.push(initialOutput);
|
409
409
|
if (dataRoute) {
|
410
410
|
var _initialOutput_fallback;
|
411
|
-
let dataFilePath = _path.default.join(pagesDistDir, `${route}.json`);
|
411
|
+
let dataFilePath = _path.default.join(pagesDistDir, `${route === '/' ? 'index' : route}.json`);
|
412
412
|
if (isAppPage) {
|
413
413
|
// When experimental PPR is enabled, we expect that the data
|
414
414
|
// that should be served as a part of the prerender should
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/build/adapter/build-complete.ts"],"sourcesContent":["import path from 'path'\nimport fs from 'fs/promises'\nimport { pathToFileURL } from 'url'\nimport * as Log from '../output/log'\nimport { isMiddlewareFilename } from '../utils'\nimport { RenderingMode } from '../rendering-mode'\nimport { interopDefault } from '../../lib/interop-default'\nimport type { RouteHas } from '../../lib/load-custom-routes'\nimport { recursiveReadDir } from '../../lib/recursive-readdir'\nimport { isDynamicRoute } from '../../shared/lib/router/utils'\nimport type { Revalidate } from '../../server/lib/cache-control'\nimport type { NextConfigComplete } from '../../server/config-shared'\nimport type { MiddlewareMatcher } from '../analysis/get-page-static-info'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport { AdapterOutputType, type PHASE_TYPE } from '../../shared/lib/constants'\nimport { normalizePagePath } from '../../shared/lib/page-path/normalize-page-path'\n\nimport type {\n MiddlewareManifest,\n EdgeFunctionDefinition,\n} from '../webpack/plugins/middleware-plugin'\n\nimport type {\n ManifestRoute,\n RoutesManifest,\n PrerenderManifest,\n ManifestHeaderRoute,\n ManifestRewriteRoute,\n ManifestRedirectRoute,\n FunctionsConfigManifest,\n} from '..'\n\nimport {\n HTML_CONTENT_TYPE_HEADER,\n JSON_CONTENT_TYPE_HEADER,\n NEXT_RESUME_HEADER,\n} from '../../lib/constants'\n\ninterface SharedRouteFields {\n /**\n * id is the unique identifier of the output\n */\n id: string\n /**\n * filePath is the location on disk of the built entrypoint asset\n */\n filePath: string\n /**\n * pathname is the URL pathname the asset should be served at\n */\n pathname: string\n /**\n * runtime is which runtime the entrypoint is built for\n */\n runtime: 'nodejs' | 'edge'\n /**\n * assets are all necessary traced assets that could be\n * loaded by the output to handle a request e.g. traced\n * node_modules or necessary manifests for Next.js.\n * The key is the relative path from the repo root and the value\n * is the absolute path to the file\n */\n assets: Record<string, string>\n\n /**\n * 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\nexport interface AdapterOutput {\n /**\n * `PAGES` represents all the React pages that are under `pages/`.\n */\n PAGES: SharedRouteFields & {\n type: AdapterOutputType.PAGES\n }\n\n /**\n * `PAGES_API` represents all the API routes under `pages/api/`.\n */\n PAGES_API: SharedRouteFields & {\n type: AdapterOutputType.PAGES_API\n }\n /**\n * `APP_PAGE` represents all the React pages that are under `app/` with the\n * filename of `page.{j,t}s{,x}`.\n */\n APP_PAGE: SharedRouteFields & {\n type: AdapterOutputType.APP_PAGE\n }\n\n /**\n * `APP_ROUTE` represents all the API routes and metadata routes that are under `app/` with the\n * filename of `route.{j,t}s{,x}`.\n */\n APP_ROUTE: SharedRouteFields & {\n type: AdapterOutputType.APP_ROUTE\n }\n\n /**\n * `PRERENDER` represents an ISR enabled route that might\n * have a seeded cache entry or fallback generated during build\n */\n PRERENDER: {\n id: string\n pathname: string\n type: AdapterOutputType.PRERENDER\n\n /**\n * For prerenders the parent output is the originating\n * page that the prerender is created from\n */\n parentOutputId: string\n\n /**\n * groupId is the identifier for a group of prerenders that should be\n * revalidated together\n */\n groupId: number\n\n pprChain?: {\n headers: Record<string, string>\n }\n\n /**\n * fallback is initial cache data generated during build for a prerender\n */\n fallback?: {\n /**\n * path to the fallback file can be HTML/JSON/RSC\n */\n filePath: string\n /**\n * initialStatus is the status code that should be applied\n * when serving the fallback\n */\n initialStatus?: number\n /**\n * initialHeaders are the headers that should be sent when\n * serving the fallback\n */\n initialHeaders?: Record<string, string | string[]>\n /**\n * initial expiration is how long until the fallback entry\n * is considered expired and no longer valid to serve\n */\n initialExpiration?: number\n /**\n * initial revalidate is how long until the fallback is\n * considered stale and should be revalidated\n */\n initialRevalidate?: Revalidate\n\n /**\n * postponedState is the PPR state when it postponed and is used for resuming\n */\n postponedState?: string\n }\n /**\n * config related to the route\n */\n config: {\n /**\n * allowQuery is the allowed query values to be passed\n * to an ISR function and what should be considered for the cacheKey\n * e.g. for /blog/[slug], \"slug\" is the only allowQuery\n */\n allowQuery?: string[]\n /**\n * allowHeader is the allowed headers to be passed to an\n * ISR function to prevent accidentally poisoning the cache\n * from leaking additional information that can impact the render\n */\n allowHeader?: string[]\n /**\n * bypass for is a list of has conditions the cache\n * should be bypassed and invoked directly e.g. action header\n */\n bypassFor?: RouteHas[]\n /**\n * renderingMode signals PPR or not for a prerender\n */\n renderingMode?: RenderingMode\n\n /**\n * 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\n /**\n * `STATIC_FILE` represents a static file (ie /_next/static) or a purely\n * static HTML asset e.g. an automatically statically optimized page\n * that does not use ISR\n */\n STATIC_FILE: {\n id: string\n filePath: string\n pathname: string\n type: AdapterOutputType.STATIC_FILE\n }\n\n /**\n * `MIDDLEWARE` represents the middleware output if present\n */\n MIDDLEWARE: SharedRouteFields & {\n type: AdapterOutputType.MIDDLEWARE\n /**\n * config related to the route\n */\n config: SharedRouteFields['config'] & {\n /**\n * matchers are the configured matchers for middleware\n */\n matchers?: MiddlewareMatcher[]\n }\n }\n}\n\nexport interface AdapterOutputs {\n pages: Array<AdapterOutput['PAGES']>\n middleware?: AdapterOutput['MIDDLEWARE']\n appPages: Array<AdapterOutput['APP_PAGE']>\n pagesApi: Array<AdapterOutput['PAGES_API']>\n appRoutes: Array<AdapterOutput['APP_ROUTE']>\n prerenders: Array<AdapterOutput['PRERENDER']>\n staticFiles: Array<AdapterOutput['STATIC_FILE']>\n}\n\nexport interface NextAdapter {\n name: string\n /**\n * modifyConfig is called for any CLI command that loads the next.config\n * to only apply for specific commands the \"phase\" should be used\n * @param config\n * @param ctx\n * @returns\n */\n modifyConfig?: (\n config: NextConfigComplete,\n ctx: {\n phase: PHASE_TYPE\n }\n ) => Promise<NextConfigComplete> | NextConfigComplete\n onBuildComplete?: (ctx: {\n routes: {\n headers: Array<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 /**\n * projectDir is the absolute directory the Next.js application is in\n */\n projectDir: string\n /**\n * repoRoot is the absolute path of the detected root of the repo\n */\n repoRoot: string\n /**\n * distDir is the absolute path to the dist directory\n */\n distDir: string\n /**\n * config is the loaded next.config (has modifyConfig applied)\n */\n config: NextConfigComplete\n /**\n * nextVersion is the current version of Next.js being used\n */\n nextVersion: string\n }) => Promise<void> | void\n}\n\nexport async function handleBuildComplete({\n dir,\n config,\n distDir,\n pageKeys,\n tracingRoot,\n adapterPath,\n appPageKeys,\n staticPages,\n nextVersion,\n hasStatic404,\n routesManifest,\n hasNodeMiddleware,\n prerenderManifest,\n middlewareManifest,\n requiredServerFiles,\n hasInstrumentationHook,\n functionsConfigManifest,\n}: {\n dir: string\n distDir: string\n adapterPath: string\n tracingRoot: string\n nextVersion: string\n hasStatic404: boolean\n staticPages: Set<string>\n hasNodeMiddleware: boolean\n config: NextConfigComplete\n pageKeys: readonly string[]\n requiredServerFiles: string[]\n routesManifest: RoutesManifest\n hasInstrumentationHook: boolean\n prerenderManifest: PrerenderManifest\n middlewareManifest: MiddlewareManifest\n appPageKeys?: readonly string[] | undefined\n functionsConfigManifest: FunctionsConfigManifest\n}) {\n const adapterMod = interopDefault(\n await import(pathToFileURL(require.resolve(adapterPath)).href)\n ) as NextAdapter\n\n if (typeof adapterMod.onBuildComplete === 'function') {\n Log.info(`Running onBuildComplete from ${adapterMod.name}`)\n\n try {\n const outputs: AdapterOutputs = {\n pages: [],\n pagesApi: [],\n appPages: [],\n appRoutes: [],\n prerenders: [],\n staticFiles: [],\n }\n\n const staticFiles = await recursiveReadDir(path.join(distDir, 'static'))\n\n for (const file of staticFiles) {\n const pathname = path.posix.join('/_next/static', file)\n const filePath = path.join(distDir, 'static', file)\n outputs.staticFiles.push({\n type: AdapterOutputType.STATIC_FILE,\n id: path.join('static', file),\n pathname,\n filePath,\n })\n }\n\n const sharedNodeAssets: Record<string, string> = {}\n\n for (const file of requiredServerFiles) {\n // add to shared node assets\n const filePath = path.join(dir, file)\n const fileOutputPath = path.relative(tracingRoot, filePath)\n sharedNodeAssets[fileOutputPath] = filePath\n }\n\n if (hasInstrumentationHook) {\n const assets = await handleTraceFiles(\n path.join(distDir, 'server', 'instrumentation.js.nft.json')\n )\n const fileOutputPath = path.relative(\n tracingRoot,\n path.join(distDir, 'server', 'instrumentation.js')\n )\n sharedNodeAssets[fileOutputPath] = path.join(\n distDir,\n 'server',\n 'instrumentation.js'\n )\n Object.assign(sharedNodeAssets, assets)\n }\n\n async function handleTraceFiles(\n traceFilePath: string\n ): Promise<Record<string, string>> {\n const assets: Record<string, string> = Object.assign(\n {},\n sharedNodeAssets\n )\n const traceData = JSON.parse(\n await fs.readFile(traceFilePath, 'utf8')\n ) as {\n files: string[]\n }\n const traceFileDir = path.dirname(traceFilePath)\n\n for (const relativeFile of traceData.files) {\n const tracedFilePath = path.join(traceFileDir, relativeFile)\n const fileOutputPath = path.relative(tracingRoot, tracedFilePath)\n assets[fileOutputPath] = tracedFilePath\n }\n return assets\n }\n\n async function handleEdgeFunction(\n page: EdgeFunctionDefinition,\n isMiddleware: boolean = false\n ) {\n let type: AdapterOutputType = AdapterOutputType.PAGES\n const isAppPrefix = page.page.startsWith('app/')\n const isAppPage = isAppPrefix && page.page.endsWith('/page')\n const isAppRoute = isAppPrefix && page.page.endsWith('/route')\n let currentOutputs: Array<\n | AdapterOutput['PAGES']\n | AdapterOutput['PAGES_API']\n | AdapterOutput['APP_PAGE']\n | AdapterOutput['APP_ROUTE']\n > = outputs.pages\n\n if (isMiddleware) {\n type = AdapterOutputType.MIDDLEWARE\n } else if (isAppPage) {\n currentOutputs = outputs.appPages\n type = AdapterOutputType.APP_PAGE\n } else if (isAppRoute) {\n currentOutputs = outputs.appRoutes\n type = AdapterOutputType.APP_ROUTE\n } else if (page.page.startsWith('/api')) {\n currentOutputs = outputs.pagesApi\n type = AdapterOutputType.PAGES_API\n }\n\n const output: Omit<AdapterOutput[typeof type], 'type'> & {\n type: any\n } = {\n type,\n id: page.name,\n runtime: 'edge',\n pathname: isAppPrefix ? normalizeAppPath(page.name) : page.name,\n filePath: path.join(\n distDir,\n page.files.find(\n (item) =>\n item.startsWith('server/app') || item.startsWith('server/pages')\n ) ||\n // TODO: turbopack build doesn't name the main entry chunk\n // identifiably so we don't know which to mark here but\n // technically edge needs all chunks to load always so\n // should this field even be provided?\n page.files[0] ||\n ''\n ),\n assets: {},\n config:\n type === AdapterOutputType.MIDDLEWARE\n ? {\n matchers: page.matchers,\n }\n : {},\n }\n\n function handleFile(file: string) {\n const originalPath = path.join(distDir, file)\n const fileOutputPath = path.join(\n path.relative(tracingRoot, distDir),\n file\n )\n if (!output.assets) {\n output.assets = {}\n }\n output.assets[fileOutputPath] = originalPath\n }\n for (const file of page.files) {\n handleFile(file)\n }\n for (const item of [...(page.wasm || []), ...(page.assets || [])]) {\n handleFile(item.filePath)\n }\n\n if (type === AdapterOutputType.MIDDLEWARE) {\n outputs.middleware = output\n } else {\n currentOutputs.push(output)\n }\n }\n\n const edgeFunctionHandlers: Promise<any>[] = []\n\n for (const middleware of Object.values(middlewareManifest.middleware)) {\n if (isMiddlewareFilename(middleware.name)) {\n edgeFunctionHandlers.push(handleEdgeFunction(middleware, true))\n }\n }\n\n for (const page of Object.values(middlewareManifest.functions)) {\n edgeFunctionHandlers.push(handleEdgeFunction(page))\n }\n const pagesDistDir = path.join(distDir, 'server', 'pages')\n const pageOutputMap: Record<\n string,\n AdapterOutput['PAGES'] | AdapterOutput['PAGES_API']\n > = {}\n\n for (const page of pageKeys) {\n if (page === '/_app' || page === '/_document') {\n continue\n }\n\n if (middlewareManifest.functions.hasOwnProperty(page)) {\n continue\n }\n\n const route = normalizePagePath(page)\n const pageFile = path.join(\n pagesDistDir,\n `${normalizePagePath(page)}.js`\n )\n\n // if it's an auto static optimized page it's just\n // a static file\n if (staticPages.has(page)) {\n outputs.staticFiles.push({\n id: page,\n pathname: route,\n type: AdapterOutputType.STATIC_FILE,\n filePath: pageFile.replace(/\\.js$/, '.html'),\n } satisfies AdapterOutput['STATIC_FILE'])\n continue\n }\n\n const pageTraceFile = `${pageFile}.nft.json`\n const assets = await handleTraceFiles(pageTraceFile).catch((err) => {\n if (err.code !== 'ENOENT' || (page !== '/404' && page !== '/500')) {\n Log.warn(`Failed to locate traced assets for ${pageFile}`, err)\n }\n return {} as Record<string, string>\n })\n const functionConfig = functionsConfigManifest.functions[route] || {}\n\n const output: AdapterOutput['PAGES'] | AdapterOutput['PAGES_API'] = {\n id: route,\n type: page.startsWith('/api')\n ? AdapterOutputType.PAGES_API\n : AdapterOutputType.PAGES,\n filePath: pageTraceFile.replace(/\\.nft\\.json$/, ''),\n pathname: route,\n assets,\n runtime: 'nodejs',\n config: {\n maxDuration: functionConfig.maxDuration,\n preferredRegion: functionConfig.regions,\n },\n }\n pageOutputMap[page] = output\n\n if (output.type === AdapterOutputType.PAGES) {\n outputs.pages.push(output)\n } else {\n outputs.pagesApi.push(output)\n }\n }\n\n if (hasNodeMiddleware) {\n const middlewareFile = path.join(distDir, 'server', 'middleware.js')\n const middlewareTrace = `${middlewareFile}.nft.json`\n const assets = await handleTraceFiles(middlewareTrace)\n const functionConfig =\n functionsConfigManifest.functions['/_middleware'] || {}\n\n outputs.middleware = {\n pathname: '/_middleware',\n id: '/_middleware',\n assets,\n type: AdapterOutputType.MIDDLEWARE,\n runtime: 'nodejs',\n filePath: middlewareFile,\n config: {\n matchers: functionConfig.matchers,\n },\n } satisfies AdapterOutput['MIDDLEWARE']\n }\n const appOutputMap: Record<\n string,\n AdapterOutput['APP_PAGE'] | AdapterOutput['APP_ROUTE']\n > = {}\n const appDistDir = path.join(distDir, 'server', 'app')\n\n if (appPageKeys) {\n for (const page of appPageKeys) {\n if (middlewareManifest.functions.hasOwnProperty(page)) {\n continue\n }\n const normalizedPage = normalizeAppPath(page)\n const pageFile = path.join(appDistDir, `${page}.js`)\n const pageTraceFile = `${pageFile}.nft.json`\n const assets = await handleTraceFiles(pageTraceFile).catch((err) => {\n Log.warn(`Failed to copy traced files for ${pageFile}`, err)\n return {} as Record<string, string>\n })\n const functionConfig =\n functionsConfigManifest.functions[normalizedPage] || {}\n\n const output: AdapterOutput['APP_PAGE'] | AdapterOutput['APP_ROUTE'] =\n {\n pathname: normalizedPage,\n id: normalizedPage,\n assets,\n type: page.endsWith('/route')\n ? AdapterOutputType.APP_ROUTE\n : AdapterOutputType.APP_PAGE,\n runtime: 'nodejs',\n filePath: pageFile,\n config: {\n maxDuration: functionConfig.maxDuration,\n preferredRegion: functionConfig.regions,\n },\n }\n appOutputMap[normalizedPage] = output\n\n if (output.type === AdapterOutputType.APP_PAGE) {\n outputs.appPages.push(output)\n } else {\n outputs.appRoutes.push(output)\n }\n }\n }\n\n const getParentOutput = (\n srcRoute: string,\n childRoute: string,\n allowMissing?: boolean\n ) => {\n const parentOutput = pageOutputMap[srcRoute] || appOutputMap[srcRoute]\n\n if (!parentOutput && !allowMissing) {\n console.error({\n appOutputs: Object.keys(appOutputMap),\n pageOutputs: Object.keys(pageOutputMap),\n })\n throw new Error(\n `Invariant: failed to find source route ${srcRoute} for prerender ${childRoute}`\n )\n }\n return parentOutput\n }\n\n const {\n prefetchSegmentDirSuffix,\n prefetchSegmentSuffix,\n varyHeader,\n didPostponeHeader,\n contentTypeHeader: rscContentTypeHeader,\n } = routesManifest.rsc\n\n const handleAppMeta = async (\n route: string,\n initialOutput: AdapterOutput['PRERENDER'],\n meta: {\n postponed?: string\n segmentPaths?: string[]\n }\n ) => {\n if (meta.postponed && initialOutput.fallback) {\n initialOutput.fallback.postponedState = meta.postponed\n }\n\n if (meta?.segmentPaths) {\n const segmentsDir = path.join(\n appDistDir,\n `${route}${prefetchSegmentDirSuffix}`\n )\n\n for (const segmentPath of meta.segmentPaths) {\n const outputSegmentPath =\n path.join(\n appDistDir,\n route + prefetchSegmentDirSuffix,\n segmentPath\n ) + prefetchSegmentSuffix\n\n const fallbackPathname = path.join(\n segmentsDir,\n segmentPath + prefetchSegmentSuffix\n )\n\n outputs.prerenders.push({\n id: outputSegmentPath,\n pathname: outputSegmentPath,\n type: AdapterOutputType.PRERENDER,\n parentOutputId: initialOutput.parentOutputId,\n groupId: initialOutput.groupId,\n\n config: {\n ...initialOutput.config,\n },\n\n fallback: {\n filePath: fallbackPathname,\n initialExpiration: initialOutput.fallback?.initialExpiration,\n initialRevalidate: initialOutput.fallback?.initialRevalidate,\n\n initialHeaders: {\n ...initialOutput.fallback?.initialHeaders,\n vary: varyHeader,\n 'content-type': rscContentTypeHeader,\n [didPostponeHeader]: '2',\n },\n },\n } satisfies AdapterOutput['PRERENDER'])\n }\n }\n }\n\n let prerenderGroupId = 1\n\n type AppRouteMeta = {\n segmentPaths?: string[]\n postponed?: string\n headers?: Record<string, string>\n status?: number\n }\n\n const getAppRouteMeta = async (\n route: string,\n isAppPage: boolean\n ): Promise<AppRouteMeta> => {\n const meta: AppRouteMeta = isAppPage\n ? JSON.parse(\n await fs\n .readFile(path.join(appDistDir, `${route}.meta`), 'utf8')\n .catch(() => '{}')\n )\n : {}\n\n if (meta.headers) {\n // normalize these for consistency\n for (const key of Object.keys(meta.headers)) {\n const keyLower = key.toLowerCase()\n if (keyLower !== key) {\n const value = meta.headers[key]\n delete meta.headers[key]\n meta.headers[keyLower] = value\n }\n }\n }\n\n return meta\n }\n\n for (const route in prerenderManifest.routes) {\n const {\n initialExpireSeconds: initialExpiration,\n initialRevalidateSeconds: initialRevalidate,\n initialHeaders,\n initialStatus,\n prefetchDataRoute,\n dataRoute,\n renderingMode,\n allowHeader,\n experimentalBypassFor,\n } = prerenderManifest.routes[route]\n\n const srcRoute = prerenderManifest.routes[route].srcRoute || route\n const isAppPage =\n Boolean(appOutputMap[srcRoute]) || srcRoute === '/_not-found'\n\n const isNotFoundTrue = prerenderManifest.notFoundRoutes.includes(route)\n\n let allowQuery: string[] | undefined\n const routeKeys = routesManifest.dynamicRoutes.find(\n (item) => item.page === srcRoute\n )?.routeKeys\n\n if (!isDynamicRoute(srcRoute)) {\n // for non-dynamic routes we use an empty array since\n // no query values bust the cache for non-dynamic prerenders\n // prerendered paths also do not pass allowQuery as they match\n // during handle: 'filesystem' so should not cache differently\n // by query values\n allowQuery = []\n } else if (routeKeys) {\n // if we have routeKeys in the routes-manifest we use those\n // for allowQuery for dynamic routes\n allowQuery = Object.values(routeKeys)\n }\n\n let filePath = path.join(\n isAppPage ? appDistDir : pagesDistDir,\n `${route === '/' ? 'index' : route}.${isAppPage && !dataRoute ? 'body' : 'html'}`\n )\n\n // we use the static 404 for notFound: true if available\n // if not we do a blocking invoke on first request\n if (isNotFoundTrue && hasStatic404) {\n filePath = path.join(pagesDistDir, '404.html')\n }\n\n const meta = await getAppRouteMeta(route, isAppPage)\n\n const initialOutput: AdapterOutput['PRERENDER'] = {\n id: route,\n type: AdapterOutputType.PRERENDER,\n pathname: route,\n parentOutputId:\n srcRoute === '/_not-found'\n ? srcRoute\n : getParentOutput(srcRoute, route).id,\n groupId: prerenderGroupId,\n\n pprChain:\n isAppPage && config.experimental.ppr\n ? {\n headers: {\n [NEXT_RESUME_HEADER]: '1',\n },\n }\n : undefined,\n\n fallback:\n !isNotFoundTrue || (isNotFoundTrue && hasStatic404)\n ? {\n filePath,\n initialStatus,\n initialHeaders: {\n ...initialHeaders,\n vary: varyHeader,\n 'content-type': HTML_CONTENT_TYPE_HEADER,\n ...meta.headers,\n },\n initialExpiration,\n initialRevalidate: initialRevalidate || 1,\n }\n : undefined,\n config: {\n allowQuery,\n allowHeader,\n renderingMode,\n bypassFor: experimentalBypassFor,\n bypassToken: prerenderManifest.preview.previewModeId,\n },\n }\n outputs.prerenders.push(initialOutput)\n\n if (dataRoute) {\n let dataFilePath = path.join(pagesDistDir, `${route}.json`)\n\n if (isAppPage) {\n // When experimental PPR is enabled, we expect that the data\n // that should be served as a part of the prerender should\n // be from the prefetch data route. If this isn't enabled\n // for ppr, the only way to get the data is from the data\n // route.\n dataFilePath = path.join(\n appDistDir,\n prefetchDataRoute &&\n renderingMode === RenderingMode.PARTIALLY_STATIC\n ? prefetchDataRoute\n : dataRoute\n )\n }\n\n outputs.prerenders.push({\n ...initialOutput,\n id: dataRoute,\n pathname: dataRoute,\n fallback: isNotFoundTrue\n ? undefined\n : {\n ...initialOutput.fallback,\n initialHeaders: {\n ...initialOutput.fallback?.initialHeaders,\n 'content-type': isAppPage\n ? rscContentTypeHeader\n : JSON_CONTENT_TYPE_HEADER,\n },\n filePath: dataFilePath,\n },\n })\n }\n\n if (isAppPage) {\n await handleAppMeta(route, initialOutput, meta)\n }\n prerenderGroupId += 1\n }\n\n for (const dynamicRoute in prerenderManifest.dynamicRoutes) {\n const {\n fallback,\n fallbackExpire,\n fallbackRevalidate,\n fallbackHeaders,\n fallbackStatus,\n allowHeader,\n dataRoute,\n renderingMode,\n experimentalBypassFor,\n } = prerenderManifest.dynamicRoutes[dynamicRoute]\n\n const isAppPage = Boolean(appOutputMap[dynamicRoute])\n\n const allowQuery = Object.values(\n routesManifest.dynamicRoutes.find(\n (item) => item.page === dynamicRoute\n )?.routeKeys || {}\n )\n const meta = await getAppRouteMeta(dynamicRoute, isAppPage)\n\n const initialOutput: AdapterOutput['PRERENDER'] = {\n id: dynamicRoute,\n type: AdapterOutputType.PRERENDER,\n pathname: dynamicRoute,\n parentOutputId: getParentOutput(dynamicRoute, dynamicRoute).id,\n groupId: prerenderGroupId,\n config: {\n allowQuery,\n allowHeader,\n renderingMode,\n bypassFor: experimentalBypassFor,\n bypassToken: prerenderManifest.preview.previewModeId,\n },\n fallback:\n typeof fallback === 'string'\n ? {\n filePath: path.join(\n isAppPage ? appDistDir : pagesDistDir,\n // app router dynamic route fallbacks don't have the\n // extension so ensure it's added here\n fallback.endsWith('.html') ? fallback : `${fallback}.html`\n ),\n initialStatus: fallbackStatus,\n initialHeaders: {\n ...fallbackHeaders,\n 'content-type': HTML_CONTENT_TYPE_HEADER,\n },\n initialExpiration: fallbackExpire,\n initialRevalidate: fallbackRevalidate || 1,\n }\n : undefined,\n }\n outputs.prerenders.push(initialOutput)\n\n if (isAppPage) {\n await handleAppMeta(dynamicRoute, initialOutput, meta)\n }\n\n if (dataRoute) {\n outputs.prerenders.push({\n ...initialOutput,\n id: dataRoute,\n pathname: dataRoute,\n fallback: undefined,\n })\n }\n prerenderGroupId += 1\n }\n\n await adapterMod.onBuildComplete({\n routes: {\n dynamicRoutes: routesManifest.dynamicRoutes,\n rewrites: routesManifest.rewrites,\n redirects: routesManifest.redirects,\n headers: routesManifest.headers,\n },\n outputs,\n\n config,\n distDir,\n nextVersion,\n projectDir: dir,\n repoRoot: tracingRoot,\n })\n } catch (err) {\n Log.error(`Failed to run onBuildComplete from ${adapterMod.name}`)\n throw err\n }\n }\n}\n"],"names":["handleBuildComplete","dir","config","distDir","pageKeys","tracingRoot","adapterPath","appPageKeys","staticPages","nextVersion","hasStatic404","routesManifest","hasNodeMiddleware","prerenderManifest","middlewareManifest","requiredServerFiles","hasInstrumentationHook","functionsConfigManifest","adapterMod","interopDefault","pathToFileURL","require","resolve","href","onBuildComplete","Log","info","name","outputs","pages","pagesApi","appPages","appRoutes","prerenders","staticFiles","recursiveReadDir","path","join","file","pathname","posix","filePath","push","type","AdapterOutputType","STATIC_FILE","id","sharedNodeAssets","fileOutputPath","relative","assets","handleTraceFiles","Object","assign","traceFilePath","traceData","JSON","parse","fs","readFile","traceFileDir","dirname","relativeFile","files","tracedFilePath","handleEdgeFunction","page","isMiddleware","PAGES","isAppPrefix","startsWith","isAppPage","endsWith","isAppRoute","currentOutputs","MIDDLEWARE","APP_PAGE","APP_ROUTE","PAGES_API","output","runtime","normalizeAppPath","find","item","matchers","handleFile","originalPath","wasm","middleware","edgeFunctionHandlers","values","isMiddlewareFilename","functions","pagesDistDir","pageOutputMap","hasOwnProperty","route","normalizePagePath","pageFile","has","replace","pageTraceFile","catch","err","code","warn","functionConfig","maxDuration","preferredRegion","regions","middlewareFile","middlewareTrace","appOutputMap","appDistDir","normalizedPage","getParentOutput","srcRoute","childRoute","allowMissing","parentOutput","console","error","appOutputs","keys","pageOutputs","Error","prefetchSegmentDirSuffix","prefetchSegmentSuffix","varyHeader","didPostponeHeader","contentTypeHeader","rscContentTypeHeader","rsc","handleAppMeta","initialOutput","meta","postponed","fallback","postponedState","segmentPaths","segmentsDir","segmentPath","outputSegmentPath","fallbackPathname","PRERENDER","parentOutputId","groupId","initialExpiration","initialRevalidate","initialHeaders","vary","prerenderGroupId","getAppRouteMeta","headers","key","keyLower","toLowerCase","value","routes","initialExpireSeconds","initialRevalidateSeconds","initialStatus","prefetchDataRoute","dataRoute","renderingMode","allowHeader","experimentalBypassFor","Boolean","isNotFoundTrue","notFoundRoutes","includes","allowQuery","routeKeys","dynamicRoutes","isDynamicRoute","pprChain","experimental","ppr","NEXT_RESUME_HEADER","undefined","HTML_CONTENT_TYPE_HEADER","bypassFor","bypassToken","preview","previewModeId","dataFilePath","RenderingMode","PARTIALLY_STATIC","JSON_CONTENT_TYPE_HEADER","dynamicRoute","fallbackExpire","fallbackRevalidate","fallbackHeaders","fallbackStatus","rewrites","redirects","projectDir","repoRoot"],"mappings":";;;;+BA2SsBA;;;eAAAA;;;6DA3SL;iEACF;qBACe;6DACT;uBACgB;+BACP;gCACC;kCAEE;wBACF;0BAIE;2BACkB;mCACjB;4BAqB3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuQA,eAAeA,oBAAoB,EACxCC,GAAG,EACHC,MAAM,EACNC,OAAO,EACPC,QAAQ,EACRC,WAAW,EACXC,WAAW,EACXC,WAAW,EACXC,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AAoB;YACtB;YAEA,MAAMrI,WAAWM,eAAe,CAAC;gBAC/BsI,QAAQ;oBACNe,eAAelK,eAAekK,aAAa;oBAC3CqB,UAAUvL,eAAeuL,QAAQ;oBACjCC,WAAWxL,eAAewL,SAAS;oBACnC1C,SAAS9I,eAAe8I,OAAO;gBACjC;gBACA7H;gBAEA1B;gBACAC;gBACAM;gBACA2L,YAAYnM;gBACZoM,UAAUhM;YACZ;QACF,EAAE,OAAOkG,KAAK;YACZ9E,KAAIgG,KAAK,CAAC,CAAC,mCAAmC,EAAEvG,WAAWS,IAAI,EAAE;YACjE,MAAM4E;QACR;IACF;AACF","ignoreList":[0]}
|
1
|
+
{"version":3,"sources":["../../../src/build/adapter/build-complete.ts"],"sourcesContent":["import path from 'path'\nimport fs from 'fs/promises'\nimport { pathToFileURL } from 'url'\nimport * as Log from '../output/log'\nimport { isMiddlewareFilename } from '../utils'\nimport { RenderingMode } from '../rendering-mode'\nimport { interopDefault } from '../../lib/interop-default'\nimport type { RouteHas } from '../../lib/load-custom-routes'\nimport { recursiveReadDir } from '../../lib/recursive-readdir'\nimport { isDynamicRoute } from '../../shared/lib/router/utils'\nimport type { Revalidate } from '../../server/lib/cache-control'\nimport type { NextConfigComplete } from '../../server/config-shared'\nimport type { MiddlewareMatcher } from '../analysis/get-page-static-info'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport { AdapterOutputType, type PHASE_TYPE } from '../../shared/lib/constants'\nimport { normalizePagePath } from '../../shared/lib/page-path/normalize-page-path'\n\nimport type {\n MiddlewareManifest,\n EdgeFunctionDefinition,\n} from '../webpack/plugins/middleware-plugin'\n\nimport type {\n ManifestRoute,\n RoutesManifest,\n PrerenderManifest,\n ManifestHeaderRoute,\n ManifestRewriteRoute,\n ManifestRedirectRoute,\n FunctionsConfigManifest,\n} from '..'\n\nimport {\n HTML_CONTENT_TYPE_HEADER,\n JSON_CONTENT_TYPE_HEADER,\n NEXT_RESUME_HEADER,\n} from '../../lib/constants'\n\ninterface SharedRouteFields {\n /**\n * id is the unique identifier of the output\n */\n id: string\n /**\n * filePath is the location on disk of the built entrypoint asset\n */\n filePath: string\n /**\n * pathname is the URL pathname the asset should be served at\n */\n pathname: string\n /**\n * runtime is which runtime the entrypoint is built for\n */\n runtime: 'nodejs' | 'edge'\n /**\n * assets are all necessary traced assets that could be\n * loaded by the output to handle a request e.g. traced\n * node_modules or necessary manifests for Next.js.\n * The key is the relative path from the repo root and the value\n * is the absolute path to the file\n */\n assets: Record<string, string>\n\n /**\n * 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\nexport interface AdapterOutput {\n /**\n * `PAGES` represents all the React pages that are under `pages/`.\n */\n PAGES: SharedRouteFields & {\n type: AdapterOutputType.PAGES\n }\n\n /**\n * `PAGES_API` represents all the API routes under `pages/api/`.\n */\n PAGES_API: SharedRouteFields & {\n type: AdapterOutputType.PAGES_API\n }\n /**\n * `APP_PAGE` represents all the React pages that are under `app/` with the\n * filename of `page.{j,t}s{,x}`.\n */\n APP_PAGE: SharedRouteFields & {\n type: AdapterOutputType.APP_PAGE\n }\n\n /**\n * `APP_ROUTE` represents all the API routes and metadata routes that are under `app/` with the\n * filename of `route.{j,t}s{,x}`.\n */\n APP_ROUTE: SharedRouteFields & {\n type: AdapterOutputType.APP_ROUTE\n }\n\n /**\n * `PRERENDER` represents an ISR enabled route that might\n * have a seeded cache entry or fallback generated during build\n */\n PRERENDER: {\n id: string\n pathname: string\n type: AdapterOutputType.PRERENDER\n\n /**\n * For prerenders the parent output is the originating\n * page that the prerender is created from\n */\n parentOutputId: string\n\n /**\n * groupId is the identifier for a group of prerenders that should be\n * revalidated together\n */\n groupId: number\n\n pprChain?: {\n headers: Record<string, string>\n }\n\n /**\n * fallback is initial cache data generated during build for a prerender\n */\n fallback?: {\n /**\n * path to the fallback file can be HTML/JSON/RSC\n */\n filePath: string\n /**\n * initialStatus is the status code that should be applied\n * when serving the fallback\n */\n initialStatus?: number\n /**\n * initialHeaders are the headers that should be sent when\n * serving the fallback\n */\n initialHeaders?: Record<string, string | string[]>\n /**\n * initial expiration is how long until the fallback entry\n * is considered expired and no longer valid to serve\n */\n initialExpiration?: number\n /**\n * initial revalidate is how long until the fallback is\n * considered stale and should be revalidated\n */\n initialRevalidate?: Revalidate\n\n /**\n * postponedState is the PPR state when it postponed and is used for resuming\n */\n postponedState?: string\n }\n /**\n * config related to the route\n */\n config: {\n /**\n * allowQuery is the allowed query values to be passed\n * to an ISR function and what should be considered for the cacheKey\n * e.g. for /blog/[slug], \"slug\" is the only allowQuery\n */\n allowQuery?: string[]\n /**\n * allowHeader is the allowed headers to be passed to an\n * ISR function to prevent accidentally poisoning the cache\n * from leaking additional information that can impact the render\n */\n allowHeader?: string[]\n /**\n * bypass for is a list of has conditions the cache\n * should be bypassed and invoked directly e.g. action header\n */\n bypassFor?: RouteHas[]\n /**\n * renderingMode signals PPR or not for a prerender\n */\n renderingMode?: RenderingMode\n\n /**\n * 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\n /**\n * `STATIC_FILE` represents a static file (ie /_next/static) or a purely\n * static HTML asset e.g. an automatically statically optimized page\n * that does not use ISR\n */\n STATIC_FILE: {\n id: string\n filePath: string\n pathname: string\n type: AdapterOutputType.STATIC_FILE\n }\n\n /**\n * `MIDDLEWARE` represents the middleware output if present\n */\n MIDDLEWARE: SharedRouteFields & {\n type: AdapterOutputType.MIDDLEWARE\n /**\n * config related to the route\n */\n config: SharedRouteFields['config'] & {\n /**\n * matchers are the configured matchers for middleware\n */\n matchers?: MiddlewareMatcher[]\n }\n }\n}\n\nexport interface AdapterOutputs {\n pages: Array<AdapterOutput['PAGES']>\n middleware?: AdapterOutput['MIDDLEWARE']\n appPages: Array<AdapterOutput['APP_PAGE']>\n pagesApi: Array<AdapterOutput['PAGES_API']>\n appRoutes: Array<AdapterOutput['APP_ROUTE']>\n prerenders: Array<AdapterOutput['PRERENDER']>\n staticFiles: Array<AdapterOutput['STATIC_FILE']>\n}\n\nexport interface NextAdapter {\n name: string\n /**\n * modifyConfig is called for any CLI command that loads the next.config\n * to only apply for specific commands the \"phase\" should be used\n * @param config\n * @param ctx\n * @returns\n */\n modifyConfig?: (\n config: NextConfigComplete,\n ctx: {\n phase: PHASE_TYPE\n }\n ) => Promise<NextConfigComplete> | NextConfigComplete\n onBuildComplete?: (ctx: {\n routes: {\n headers: Array<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 /**\n * projectDir is the absolute directory the Next.js application is in\n */\n projectDir: string\n /**\n * repoRoot is the absolute path of the detected root of the repo\n */\n repoRoot: string\n /**\n * distDir is the absolute path to the dist directory\n */\n distDir: string\n /**\n * config is the loaded next.config (has modifyConfig applied)\n */\n config: NextConfigComplete\n /**\n * nextVersion is the current version of Next.js being used\n */\n nextVersion: string\n }) => Promise<void> | void\n}\n\nexport async function handleBuildComplete({\n dir,\n config,\n distDir,\n pageKeys,\n tracingRoot,\n adapterPath,\n appPageKeys,\n staticPages,\n nextVersion,\n hasStatic404,\n routesManifest,\n hasNodeMiddleware,\n prerenderManifest,\n middlewareManifest,\n requiredServerFiles,\n hasInstrumentationHook,\n functionsConfigManifest,\n}: {\n dir: string\n distDir: string\n adapterPath: string\n tracingRoot: string\n nextVersion: string\n hasStatic404: boolean\n staticPages: Set<string>\n hasNodeMiddleware: boolean\n config: NextConfigComplete\n pageKeys: readonly string[]\n requiredServerFiles: string[]\n routesManifest: RoutesManifest\n hasInstrumentationHook: boolean\n prerenderManifest: PrerenderManifest\n middlewareManifest: MiddlewareManifest\n appPageKeys?: readonly string[] | undefined\n functionsConfigManifest: FunctionsConfigManifest\n}) {\n const adapterMod = interopDefault(\n await import(pathToFileURL(require.resolve(adapterPath)).href)\n ) as NextAdapter\n\n if (typeof adapterMod.onBuildComplete === 'function') {\n Log.info(`Running onBuildComplete from ${adapterMod.name}`)\n\n try {\n const outputs: AdapterOutputs = {\n pages: [],\n pagesApi: [],\n appPages: [],\n appRoutes: [],\n prerenders: [],\n staticFiles: [],\n }\n\n const staticFiles = await recursiveReadDir(path.join(distDir, 'static'))\n\n for (const file of staticFiles) {\n const pathname = path.posix.join('/_next/static', file)\n const filePath = path.join(distDir, 'static', file)\n outputs.staticFiles.push({\n type: AdapterOutputType.STATIC_FILE,\n id: path.join('static', file),\n pathname,\n filePath,\n })\n }\n\n const sharedNodeAssets: Record<string, string> = {}\n\n for (const file of requiredServerFiles) {\n // add to shared node assets\n const filePath = path.join(dir, file)\n const fileOutputPath = path.relative(tracingRoot, filePath)\n sharedNodeAssets[fileOutputPath] = filePath\n }\n\n if (hasInstrumentationHook) {\n const assets = await handleTraceFiles(\n path.join(distDir, 'server', 'instrumentation.js.nft.json')\n )\n const fileOutputPath = path.relative(\n tracingRoot,\n path.join(distDir, 'server', 'instrumentation.js')\n )\n sharedNodeAssets[fileOutputPath] = path.join(\n distDir,\n 'server',\n 'instrumentation.js'\n )\n Object.assign(sharedNodeAssets, assets)\n }\n\n async function handleTraceFiles(\n traceFilePath: string\n ): Promise<Record<string, string>> {\n const assets: Record<string, string> = Object.assign(\n {},\n sharedNodeAssets\n )\n const traceData = JSON.parse(\n await fs.readFile(traceFilePath, 'utf8')\n ) as {\n files: string[]\n }\n const traceFileDir = path.dirname(traceFilePath)\n\n for (const relativeFile of traceData.files) {\n const tracedFilePath = path.join(traceFileDir, relativeFile)\n const fileOutputPath = path.relative(tracingRoot, tracedFilePath)\n assets[fileOutputPath] = tracedFilePath\n }\n return assets\n }\n\n async function handleEdgeFunction(\n page: EdgeFunctionDefinition,\n isMiddleware: boolean = false\n ) {\n let type: AdapterOutputType = AdapterOutputType.PAGES\n const isAppPrefix = page.page.startsWith('app/')\n const isAppPage = isAppPrefix && page.page.endsWith('/page')\n const isAppRoute = isAppPrefix && page.page.endsWith('/route')\n let currentOutputs: Array<\n | AdapterOutput['PAGES']\n | AdapterOutput['PAGES_API']\n | AdapterOutput['APP_PAGE']\n | AdapterOutput['APP_ROUTE']\n > = outputs.pages\n\n if (isMiddleware) {\n type = AdapterOutputType.MIDDLEWARE\n } else if (isAppPage) {\n currentOutputs = outputs.appPages\n type = AdapterOutputType.APP_PAGE\n } else if (isAppRoute) {\n currentOutputs = outputs.appRoutes\n type = AdapterOutputType.APP_ROUTE\n } else if (page.page.startsWith('/api')) {\n currentOutputs = outputs.pagesApi\n type = AdapterOutputType.PAGES_API\n }\n\n const output: Omit<AdapterOutput[typeof type], 'type'> & {\n type: any\n } = {\n type,\n id: page.name,\n runtime: 'edge',\n pathname: isAppPrefix ? normalizeAppPath(page.name) : page.name,\n filePath: path.join(\n distDir,\n page.files.find(\n (item) =>\n item.startsWith('server/app') || item.startsWith('server/pages')\n ) ||\n // TODO: turbopack build doesn't name the main entry chunk\n // identifiably so we don't know which to mark here but\n // technically edge needs all chunks to load always so\n // should this field even be provided?\n page.files[0] ||\n ''\n ),\n assets: {},\n config:\n type === AdapterOutputType.MIDDLEWARE\n ? {\n matchers: page.matchers,\n }\n : {},\n }\n\n function handleFile(file: string) {\n const originalPath = path.join(distDir, file)\n const fileOutputPath = path.join(\n path.relative(tracingRoot, distDir),\n file\n )\n if (!output.assets) {\n output.assets = {}\n }\n output.assets[fileOutputPath] = originalPath\n }\n for (const file of page.files) {\n handleFile(file)\n }\n for (const item of [...(page.wasm || []), ...(page.assets || [])]) {\n handleFile(item.filePath)\n }\n\n if (type === AdapterOutputType.MIDDLEWARE) {\n outputs.middleware = output\n } else {\n currentOutputs.push(output)\n }\n }\n\n const edgeFunctionHandlers: Promise<any>[] = []\n\n for (const middleware of Object.values(middlewareManifest.middleware)) {\n if (isMiddlewareFilename(middleware.name)) {\n edgeFunctionHandlers.push(handleEdgeFunction(middleware, true))\n }\n }\n\n for (const page of Object.values(middlewareManifest.functions)) {\n edgeFunctionHandlers.push(handleEdgeFunction(page))\n }\n const pagesDistDir = path.join(distDir, 'server', 'pages')\n const pageOutputMap: Record<\n string,\n AdapterOutput['PAGES'] | AdapterOutput['PAGES_API']\n > = {}\n\n for (const page of pageKeys) {\n if (page === '/_app' || page === '/_document') {\n continue\n }\n\n if (middlewareManifest.functions.hasOwnProperty(page)) {\n continue\n }\n\n const route = normalizePagePath(page)\n const pageFile = path.join(\n pagesDistDir,\n `${normalizePagePath(page)}.js`\n )\n\n // if it's an auto static optimized page it's just\n // a static file\n if (staticPages.has(page)) {\n outputs.staticFiles.push({\n id: page,\n pathname: route,\n type: AdapterOutputType.STATIC_FILE,\n filePath: pageFile.replace(/\\.js$/, '.html'),\n } satisfies AdapterOutput['STATIC_FILE'])\n continue\n }\n\n const pageTraceFile = `${pageFile}.nft.json`\n const assets = await handleTraceFiles(pageTraceFile).catch((err) => {\n if (err.code !== 'ENOENT' || (page !== '/404' && page !== '/500')) {\n Log.warn(`Failed to locate traced assets for ${pageFile}`, err)\n }\n return {} as Record<string, string>\n })\n const functionConfig = functionsConfigManifest.functions[route] || {}\n\n const output: AdapterOutput['PAGES'] | AdapterOutput['PAGES_API'] = {\n id: route,\n type: page.startsWith('/api')\n ? AdapterOutputType.PAGES_API\n : AdapterOutputType.PAGES,\n filePath: pageTraceFile.replace(/\\.nft\\.json$/, ''),\n pathname: route,\n assets,\n runtime: 'nodejs',\n config: {\n maxDuration: functionConfig.maxDuration,\n preferredRegion: functionConfig.regions,\n },\n }\n pageOutputMap[page] = output\n\n if (output.type === AdapterOutputType.PAGES) {\n outputs.pages.push(output)\n } else {\n outputs.pagesApi.push(output)\n }\n }\n\n if (hasNodeMiddleware) {\n const middlewareFile = path.join(distDir, 'server', 'middleware.js')\n const middlewareTrace = `${middlewareFile}.nft.json`\n const assets = await handleTraceFiles(middlewareTrace)\n const functionConfig =\n functionsConfigManifest.functions['/_middleware'] || {}\n\n outputs.middleware = {\n pathname: '/_middleware',\n id: '/_middleware',\n assets,\n type: AdapterOutputType.MIDDLEWARE,\n runtime: 'nodejs',\n filePath: middlewareFile,\n config: {\n matchers: functionConfig.matchers,\n },\n } satisfies AdapterOutput['MIDDLEWARE']\n }\n const appOutputMap: Record<\n string,\n AdapterOutput['APP_PAGE'] | AdapterOutput['APP_ROUTE']\n > = {}\n const appDistDir = path.join(distDir, 'server', 'app')\n\n if (appPageKeys) {\n for (const page of appPageKeys) {\n if (middlewareManifest.functions.hasOwnProperty(page)) {\n continue\n }\n const normalizedPage = normalizeAppPath(page)\n const pageFile = path.join(appDistDir, `${page}.js`)\n const pageTraceFile = `${pageFile}.nft.json`\n const assets = await handleTraceFiles(pageTraceFile).catch((err) => {\n Log.warn(`Failed to copy traced files for ${pageFile}`, err)\n return {} as Record<string, string>\n })\n const functionConfig =\n functionsConfigManifest.functions[normalizedPage] || {}\n\n const output: AdapterOutput['APP_PAGE'] | AdapterOutput['APP_ROUTE'] =\n {\n pathname: normalizedPage,\n id: normalizedPage,\n assets,\n type: page.endsWith('/route')\n ? AdapterOutputType.APP_ROUTE\n : AdapterOutputType.APP_PAGE,\n runtime: 'nodejs',\n filePath: pageFile,\n config: {\n maxDuration: functionConfig.maxDuration,\n preferredRegion: functionConfig.regions,\n },\n }\n appOutputMap[normalizedPage] = output\n\n if (output.type === AdapterOutputType.APP_PAGE) {\n outputs.appPages.push(output)\n } else {\n outputs.appRoutes.push(output)\n }\n }\n }\n\n const getParentOutput = (\n srcRoute: string,\n childRoute: string,\n allowMissing?: boolean\n ) => {\n const parentOutput = pageOutputMap[srcRoute] || appOutputMap[srcRoute]\n\n if (!parentOutput && !allowMissing) {\n console.error({\n appOutputs: Object.keys(appOutputMap),\n pageOutputs: Object.keys(pageOutputMap),\n })\n throw new Error(\n `Invariant: failed to find source route ${srcRoute} for prerender ${childRoute}`\n )\n }\n return parentOutput\n }\n\n const {\n prefetchSegmentDirSuffix,\n prefetchSegmentSuffix,\n varyHeader,\n didPostponeHeader,\n contentTypeHeader: rscContentTypeHeader,\n } = routesManifest.rsc\n\n const handleAppMeta = async (\n route: string,\n initialOutput: AdapterOutput['PRERENDER'],\n meta: {\n postponed?: string\n segmentPaths?: string[]\n }\n ) => {\n if (meta.postponed && initialOutput.fallback) {\n initialOutput.fallback.postponedState = meta.postponed\n }\n\n if (meta?.segmentPaths) {\n const segmentsDir = path.join(\n appDistDir,\n `${route}${prefetchSegmentDirSuffix}`\n )\n\n for (const segmentPath of meta.segmentPaths) {\n const outputSegmentPath =\n path.join(\n appDistDir,\n route + prefetchSegmentDirSuffix,\n segmentPath\n ) + prefetchSegmentSuffix\n\n const fallbackPathname = path.join(\n segmentsDir,\n segmentPath + prefetchSegmentSuffix\n )\n\n outputs.prerenders.push({\n id: outputSegmentPath,\n pathname: outputSegmentPath,\n type: AdapterOutputType.PRERENDER,\n parentOutputId: initialOutput.parentOutputId,\n groupId: initialOutput.groupId,\n\n config: {\n ...initialOutput.config,\n },\n\n fallback: {\n filePath: fallbackPathname,\n initialExpiration: initialOutput.fallback?.initialExpiration,\n initialRevalidate: initialOutput.fallback?.initialRevalidate,\n\n initialHeaders: {\n ...initialOutput.fallback?.initialHeaders,\n vary: varyHeader,\n 'content-type': rscContentTypeHeader,\n [didPostponeHeader]: '2',\n },\n },\n } satisfies AdapterOutput['PRERENDER'])\n }\n }\n }\n\n let prerenderGroupId = 1\n\n type AppRouteMeta = {\n segmentPaths?: string[]\n postponed?: string\n headers?: Record<string, string>\n status?: number\n }\n\n const getAppRouteMeta = async (\n route: string,\n isAppPage: boolean\n ): Promise<AppRouteMeta> => {\n const meta: AppRouteMeta = isAppPage\n ? JSON.parse(\n await fs\n .readFile(path.join(appDistDir, `${route}.meta`), 'utf8')\n .catch(() => '{}')\n )\n : {}\n\n if (meta.headers) {\n // normalize these for consistency\n for (const key of Object.keys(meta.headers)) {\n const keyLower = key.toLowerCase()\n if (keyLower !== key) {\n const value = meta.headers[key]\n delete meta.headers[key]\n meta.headers[keyLower] = value\n }\n }\n }\n\n return meta\n }\n\n for (const route in prerenderManifest.routes) {\n const {\n initialExpireSeconds: initialExpiration,\n initialRevalidateSeconds: initialRevalidate,\n initialHeaders,\n initialStatus,\n prefetchDataRoute,\n dataRoute,\n renderingMode,\n allowHeader,\n experimentalBypassFor,\n } = prerenderManifest.routes[route]\n\n const srcRoute = prerenderManifest.routes[route].srcRoute || route\n const isAppPage =\n Boolean(appOutputMap[srcRoute]) || srcRoute === '/_not-found'\n\n const isNotFoundTrue = prerenderManifest.notFoundRoutes.includes(route)\n\n let allowQuery: string[] | undefined\n const routeKeys = routesManifest.dynamicRoutes.find(\n (item) => item.page === srcRoute\n )?.routeKeys\n\n if (!isDynamicRoute(srcRoute)) {\n // for non-dynamic routes we use an empty array since\n // no query values bust the cache for non-dynamic prerenders\n // prerendered paths also do not pass allowQuery as they match\n // during handle: 'filesystem' so should not cache differently\n // by query values\n allowQuery = []\n } else if (routeKeys) {\n // if we have routeKeys in the routes-manifest we use those\n // for allowQuery for dynamic routes\n allowQuery = Object.values(routeKeys)\n }\n\n let filePath = path.join(\n isAppPage ? appDistDir : pagesDistDir,\n `${route === '/' ? 'index' : route}.${isAppPage && !dataRoute ? 'body' : 'html'}`\n )\n\n // we use the static 404 for notFound: true if available\n // if not we do a blocking invoke on first request\n if (isNotFoundTrue && hasStatic404) {\n filePath = path.join(pagesDistDir, '404.html')\n }\n\n const meta = await getAppRouteMeta(route, isAppPage)\n\n const initialOutput: AdapterOutput['PRERENDER'] = {\n id: route,\n type: AdapterOutputType.PRERENDER,\n pathname: route,\n parentOutputId:\n srcRoute === '/_not-found'\n ? srcRoute\n : getParentOutput(srcRoute, route).id,\n groupId: prerenderGroupId,\n\n pprChain:\n isAppPage && config.experimental.ppr\n ? {\n headers: {\n [NEXT_RESUME_HEADER]: '1',\n },\n }\n : undefined,\n\n fallback:\n !isNotFoundTrue || (isNotFoundTrue && hasStatic404)\n ? {\n filePath,\n initialStatus,\n initialHeaders: {\n ...initialHeaders,\n vary: varyHeader,\n 'content-type': HTML_CONTENT_TYPE_HEADER,\n ...meta.headers,\n },\n initialExpiration,\n initialRevalidate: initialRevalidate || 1,\n }\n : undefined,\n config: {\n allowQuery,\n allowHeader,\n renderingMode,\n bypassFor: experimentalBypassFor,\n bypassToken: prerenderManifest.preview.previewModeId,\n },\n }\n outputs.prerenders.push(initialOutput)\n\n if (dataRoute) {\n let dataFilePath = path.join(\n pagesDistDir,\n `${route === '/' ? 'index' : route}.json`\n )\n\n if (isAppPage) {\n // When experimental PPR is enabled, we expect that the data\n // that should be served as a part of the prerender should\n // be from the prefetch data route. If this isn't enabled\n // for ppr, the only way to get the data is from the data\n // route.\n dataFilePath = path.join(\n appDistDir,\n prefetchDataRoute &&\n renderingMode === RenderingMode.PARTIALLY_STATIC\n ? prefetchDataRoute\n : dataRoute\n )\n }\n\n outputs.prerenders.push({\n ...initialOutput,\n id: dataRoute,\n pathname: dataRoute,\n fallback: isNotFoundTrue\n ? undefined\n : {\n ...initialOutput.fallback,\n initialHeaders: {\n ...initialOutput.fallback?.initialHeaders,\n 'content-type': isAppPage\n ? rscContentTypeHeader\n : JSON_CONTENT_TYPE_HEADER,\n },\n filePath: dataFilePath,\n },\n })\n }\n\n if (isAppPage) {\n await handleAppMeta(route, initialOutput, meta)\n }\n prerenderGroupId += 1\n }\n\n for (const dynamicRoute in prerenderManifest.dynamicRoutes) {\n const {\n fallback,\n fallbackExpire,\n fallbackRevalidate,\n fallbackHeaders,\n fallbackStatus,\n allowHeader,\n dataRoute,\n renderingMode,\n experimentalBypassFor,\n } = prerenderManifest.dynamicRoutes[dynamicRoute]\n\n const isAppPage = Boolean(appOutputMap[dynamicRoute])\n\n const allowQuery = Object.values(\n routesManifest.dynamicRoutes.find(\n (item) => item.page === dynamicRoute\n )?.routeKeys || {}\n )\n const meta = await getAppRouteMeta(dynamicRoute, isAppPage)\n\n const initialOutput: AdapterOutput['PRERENDER'] = {\n id: dynamicRoute,\n type: AdapterOutputType.PRERENDER,\n pathname: dynamicRoute,\n parentOutputId: getParentOutput(dynamicRoute, dynamicRoute).id,\n groupId: prerenderGroupId,\n config: {\n allowQuery,\n allowHeader,\n renderingMode,\n bypassFor: experimentalBypassFor,\n bypassToken: prerenderManifest.preview.previewModeId,\n },\n fallback:\n typeof fallback === 'string'\n ? {\n filePath: path.join(\n isAppPage ? appDistDir : pagesDistDir,\n // app router dynamic route fallbacks don't have the\n // extension so ensure it's added here\n fallback.endsWith('.html') ? fallback : `${fallback}.html`\n ),\n initialStatus: fallbackStatus,\n initialHeaders: {\n ...fallbackHeaders,\n 'content-type': HTML_CONTENT_TYPE_HEADER,\n },\n initialExpiration: fallbackExpire,\n initialRevalidate: fallbackRevalidate || 1,\n }\n : undefined,\n }\n outputs.prerenders.push(initialOutput)\n\n if (isAppPage) {\n await handleAppMeta(dynamicRoute, initialOutput, meta)\n }\n\n if (dataRoute) {\n outputs.prerenders.push({\n ...initialOutput,\n id: dataRoute,\n pathname: dataRoute,\n fallback: undefined,\n })\n }\n prerenderGroupId += 1\n }\n\n await adapterMod.onBuildComplete({\n routes: {\n dynamicRoutes: routesManifest.dynamicRoutes,\n rewrites: routesManifest.rewrites,\n redirects: routesManifest.redirects,\n headers: routesManifest.headers,\n },\n outputs,\n\n config,\n distDir,\n nextVersion,\n projectDir: dir,\n repoRoot: tracingRoot,\n })\n } catch (err) {\n Log.error(`Failed to run onBuildComplete from ${adapterMod.name}`)\n throw err\n }\n }\n}\n"],"names":["handleBuildComplete","dir","config","distDir","pageKeys","tracingRoot","adapterPath","appPageKeys","staticPages","nextVersion","hasStatic404","routesManifest","hasNodeMiddleware","prerenderManifest","middlewareManifest","requiredServerFiles","hasInstrumentationHook","functionsConfigManifest","adapterMod","interopDefault","pathToFileURL","require","resolve","href","onBuildComplete","Log","info","name","outputs","pages","pagesApi","appPages","appRoutes","prerenders","staticFiles","recursiveReadDir","path","join","file","pathname","posix","filePath","push","type","AdapterOutputType","STATIC_FILE","id","sharedNodeAssets","fileOutputPath","relative","assets","handleTraceFiles","Object","assign","traceFilePath","traceData","JSON","parse","fs","readFile","traceFileDir","dirname","relativeFile","files","tracedFilePath","handleEdgeFunction","page","isMiddleware","PAGES","isAppPrefix","startsWith","isAppPage","endsWith","isAppRoute","currentOutputs","MIDDLEWARE","APP_PAGE","APP_ROUTE","PAGES_API","output","runtime","normalizeAppPath","find","item","matchers","handleFile","originalPath","wasm","middleware","edgeFunctionHandlers","values","isMiddlewareFilename","functions","pagesDistDir","pageOutputMap","hasOwnProperty","route","normalizePagePath","pageFile","has","replace","pageTraceFile","catch","err","code","warn","functionConfig","maxDuration","preferredRegion","regions","middlewareFile","middlewareTrace","appOutputMap","appDistDir","normalizedPage","getParentOutput","srcRoute","childRoute","allowMissing","parentOutput","console","error","appOutputs","keys","pageOutputs","Error","prefetchSegmentDirSuffix","prefetchSegmentSuffix","varyHeader","didPostponeHeader","contentTypeHeader","rscContentTypeHeader","rsc","handleAppMeta","initialOutput","meta","postponed","fallback","postponedState","segmentPaths","segmentsDir","segmentPath","outputSegmentPath","fallbackPathname","PRERENDER","parentOutputId","groupId","initialExpiration","initialRevalidate","initialHeaders","vary","prerenderGroupId","getAppRouteMeta","headers","key","keyLower","toLowerCase","value","routes","initialExpireSeconds","initialRevalidateSeconds","initialStatus","prefetchDataRoute","dataRoute","renderingMode","allowHeader","experimentalBypassFor","Boolean","isNotFoundTrue","notFoundRoutes","includes","allowQuery","routeKeys","dynamicRoutes","isDynamicRoute","pprChain","experimental","ppr","NEXT_RESUME_HEADER","undefined","HTML_CONTENT_TYPE_HEADER","bypassFor","bypassToken","preview","previewModeId","dataFilePath","RenderingMode","PARTIALLY_STATIC","JSON_CONTENT_TYPE_HEADER","dynamicRoute","fallbackExpire","fallbackRevalidate","fallbackHeaders","fallbackStatus","rewrites","redirects","projectDir","repoRoot"],"mappings":";;;;+BA2SsBA;;;eAAAA;;;6DA3SL;iEACF;qBACe;6DACT;uBACgB;+BACP;gCACC;kCAEE;wBACF;0BAIE;2BACkB;mCACjB;4BAqB3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuQA,eAAeA,oBAAoB,EACxCC,GAAG,EACHC,MAAM,EACNC,OAAO,EACPC,QAAQ,EACRC,WAAW,EACXC,WAAW,EACXC,WAAW,EACXC,WAAW,EACXC,WAAW,EACXC,YAAY,EACZC,cAAc,EACdC,iBAAiB,EACjBC,iBAAiB,EACjBC,kBAAkB,EAClBC,mBAAmB,EACnBC,sBAAsB,EACtBC,uBAAuB,EAmBxB;IACC,MAAMC,aAAaC,IAAAA,8BAAc,EAC/B,MAAM,MAAM,CAACC,IAAAA,kBAAa,EAACC,QAAQC,OAAO,CAAChB,cAAciB,IAAI;IAG/D,IAAI,OAAOL,WAAWM,eAAe,KAAK,YAAY;QACpDC,KAAIC,IAAI,CAAC,CAAC,6BAA6B,EAAER,WAAWS,IAAI,EAAE;QAE1D,IAAI;YACF,MAAMC,UAA0B;gBAC9BC,OAAO,EAAE;gBACTC,UAAU,EAAE;gBACZC,UAAU,EAAE;gBACZC,WAAW,EAAE;gBACbC,YAAY,EAAE;gBACdC,aAAa,EAAE;YACjB;YAEA,MAAMA,cAAc,MAAMC,IAAAA,kCAAgB,EAACC,aAAI,CAACC,IAAI,CAAClC,SAAS;YAE9D,KAAK,MAAMmC,QAAQJ,YAAa;gBAC9B,MAAMK,WAAWH,aAAI,CAACI,KAAK,CAACH,IAAI,CAAC,iBAAiBC;gBAClD,MAAMG,WAAWL,aAAI,CAACC,IAAI,CAAClC,SAAS,UAAUmC;gBAC9CV,QAAQM,WAAW,CAACQ,IAAI,CAAC;oBACvBC,MAAMC,4BAAiB,CAACC,WAAW;oBACnCC,IAAIV,aAAI,CAACC,IAAI,CAAC,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AgBZ,oCAAwB;wBAC1C;wBACAjC,mBAAmB2C;wBACnB1C,mBAAmB2C,sBAAsB;oBAC3C,IACAZ;gBACR;gBACAvJ,QAAQK,UAAU,CAACS,IAAI,CAAC4F;gBAExB,IAAI/D,WAAW;oBACb,MAAM8D,cAAcwD,cAAcvD,eAAeC;gBACnD;gBAEA,IAAI4B,WAAW;oBACbvI,QAAQK,UAAU,CAACS,IAAI,CAAC;wBACtB,GAAG4F,aAAa;wBAChBxF,IAAIqH;wBACJ5H,UAAU4H;wBACV1B,UAAU0C;oBACZ;gBACF;gBACA5B,oBAAoB;YACtB;YAEA,MAAMrI,WAAWM,eAAe,CAAC;gBAC/BsI,QAAQ;oBACNe,eAAelK,eAAekK,aAAa;oBAC3CqB,UAAUvL,eAAeuL,QAAQ;oBACjCC,WAAWxL,eAAewL,SAAS;oBACnC1C,SAAS9I,eAAe8I,OAAO;gBACjC;gBACA7H;gBAEA1B;gBACAC;gBACAM;gBACA2L,YAAYnM;gBACZoM,UAAUhM;YACZ;QACF,EAAE,OAAOkG,KAAK;YACZ9E,KAAIgG,KAAK,CAAC,CAAC,mCAAmC,EAAEvG,WAAWS,IAAI,EAAE;YACjE,MAAM4E;QACR;IACF;AACF","ignoreList":[0]}
|
package/dist/build/index.js
CHANGED
@@ -371,7 +371,7 @@ async function build(dir, reactProductionProfiling = false, debugOutput = false,
|
|
371
371
|
const nextBuildSpan = (0, _trace.trace)('next-build', undefined, {
|
372
372
|
buildMode: experimentalBuildMode,
|
373
373
|
isTurboBuild: String(isTurbopack),
|
374
|
-
version: "15.6.0-canary.
|
374
|
+
version: "15.6.0-canary.4"
|
375
375
|
});
|
376
376
|
_buildcontext.NextBuildContext.nextBuildSpan = nextBuildSpan;
|
377
377
|
_buildcontext.NextBuildContext.dir = dir;
|
@@ -850,7 +850,7 @@ async function build(dir, reactProductionProfiling = false, debugOutput = false,
|
|
850
850
|
// Files outside of the distDir can be "type": "module"
|
851
851
|
await writeFileUtf8(_path.default.join(distDir, 'package.json'), '{"type": "commonjs"}');
|
852
852
|
// These are written to distDir, so they need to come after creating and cleaning distDr.
|
853
|
-
await (0, _builddiagnostics.recordFrameworkVersion)("15.6.0-canary.
|
853
|
+
await (0, _builddiagnostics.recordFrameworkVersion)("15.6.0-canary.4");
|
854
854
|
await (0, _builddiagnostics.updateBuildDiagnostics)({
|
855
855
|
buildStage: 'start'
|
856
856
|
});
|
@@ -2509,7 +2509,7 @@ async function build(dir, reactProductionProfiling = false, debugOutput = false,
|
|
2509
2509
|
distDir,
|
2510
2510
|
config,
|
2511
2511
|
staticPages,
|
2512
|
-
nextVersion: "15.6.0-canary.
|
2512
|
+
nextVersion: "15.6.0-canary.4",
|
2513
2513
|
tracingRoot: outputFileTracingRoot,
|
2514
2514
|
hasNodeMiddleware,
|
2515
2515
|
hasInstrumentationHook,
|
package/dist/build/swc/index.js
CHANGED
@@ -131,7 +131,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
131
131
|
}
|
132
132
|
return newObj;
|
133
133
|
}
|
134
|
-
const nextVersion = "15.6.0-canary.
|
134
|
+
const nextVersion = "15.6.0-canary.4";
|
135
135
|
const ArchName = (0, _os.arch)();
|
136
136
|
const PlatformName = (0, _os.platform)();
|
137
137
|
function infoLog(...args) {
|
@@ -1711,7 +1711,7 @@ async function getBaseWebpackConfig(dir, { buildId, encryptionKey, config, compi
|
|
1711
1711
|
isClient && new _copyfileplugin.CopyFilePlugin({
|
1712
1712
|
// file path to build output of `@next/polyfill-nomodule`
|
1713
1713
|
filePath: require.resolve('./polyfills/polyfill-nomodule'),
|
1714
|
-
cacheKey: "15.6.0-canary.
|
1714
|
+
cacheKey: "15.6.0-canary.4",
|
1715
1715
|
name: `static/chunks/polyfills${dev ? '' : '-[hash]'}.js`,
|
1716
1716
|
minimize: false,
|
1717
1717
|
info: {
|
@@ -1895,7 +1895,7 @@ async function getBaseWebpackConfig(dir, { buildId, encryptionKey, config, compi
|
|
1895
1895
|
// - Next.js location on disk (some loaders use absolute paths and some resolve options depend on absolute paths)
|
1896
1896
|
// - Next.js version
|
1897
1897
|
// - next.config.js keys that affect compilation
|
1898
|
-
version: `${__dirname}|${"15.6.0-canary.
|
1898
|
+
version: `${__dirname}|${"15.6.0-canary.4"}|${configVars}`,
|
1899
1899
|
cacheDirectory: _path.default.join(distDir, 'cache', 'webpack'),
|
1900
1900
|
// For production builds, it's more efficient to compress all cache files together instead of compression each one individually.
|
1901
1901
|
// So we disable compression here and allow the build runner to take care of compressing the cache as a whole.
|
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "appBootstrap", {
|
|
15
15
|
});
|
16
16
|
const _assetprefix = require("./asset-prefix");
|
17
17
|
const _setattributesfromprops = require("./set-attributes-from-props");
|
18
|
-
const version = "15.6.0-canary.
|
18
|
+
const version = "15.6.0-canary.4";
|
19
19
|
window.next = {
|
20
20
|
version,
|
21
21
|
appDir: true
|
package/dist/client/index.js
CHANGED
@@ -61,7 +61,7 @@ const _hooksclientcontextsharedruntime = require("../shared/lib/hooks-client-con
|
|
61
61
|
const _onrecoverableerror = require("./react-client-callbacks/on-recoverable-error");
|
62
62
|
const _tracer = /*#__PURE__*/ _interop_require_default._(require("./tracing/tracer"));
|
63
63
|
const _isnextroutererror = require("./components/is-next-router-error");
|
64
|
-
const version = "15.6.0-canary.
|
64
|
+
const version = "15.6.0-canary.4";
|
65
65
|
let router;
|
66
66
|
const emitter = (0, _mitt.default)();
|
67
67
|
const looseToArray = (input)=>[].slice.call(input);
|