next 15.0.4-canary.23 → 15.0.4-canary.24

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.

Potentially problematic release.


This version of next might be problematic. Click here for more details.

Files changed (59) hide show
  1. package/dist/bin/next +1 -1
  2. package/dist/build/index.js +2 -2
  3. package/dist/build/swc/index.js +1 -1
  4. package/dist/build/webpack/plugins/wellknown-errors-plugin/parseNotFoundError.js +3 -3
  5. package/dist/build/webpack/plugins/wellknown-errors-plugin/parseNotFoundError.js.map +1 -1
  6. package/dist/build/webpack-config.js +2 -2
  7. package/dist/client/app-bootstrap.js +1 -1
  8. package/dist/client/components/react-dev-overlay/server/{middleware.js → middleware-webpack.js} +1 -1
  9. package/dist/client/components/react-dev-overlay/server/middleware-webpack.js.map +1 -0
  10. package/dist/client/index.js +1 -1
  11. package/dist/compiled/next-server/server.runtime.prod.js.map +1 -1
  12. package/dist/esm/build/index.js +2 -2
  13. package/dist/esm/build/swc/index.js +1 -1
  14. package/dist/esm/build/webpack/plugins/wellknown-errors-plugin/parseNotFoundError.js +1 -1
  15. package/dist/esm/build/webpack/plugins/wellknown-errors-plugin/parseNotFoundError.js.map +1 -1
  16. package/dist/esm/build/webpack-config.js +2 -2
  17. package/dist/esm/client/app-bootstrap.js +1 -1
  18. package/dist/esm/client/components/react-dev-overlay/server/{middleware.js → middleware-webpack.js} +1 -1
  19. package/dist/esm/client/components/react-dev-overlay/server/middleware-webpack.js.map +1 -0
  20. package/dist/esm/client/index.js +1 -1
  21. package/dist/esm/server/config.js +1 -1
  22. package/dist/esm/server/dev/hot-reloader-turbopack.js +1 -1
  23. package/dist/esm/server/dev/hot-reloader-webpack.js +2 -2
  24. package/dist/esm/server/dev/hot-reloader-webpack.js.map +1 -1
  25. package/dist/esm/server/image-optimizer.js +2 -2
  26. package/dist/esm/server/image-optimizer.js.map +1 -1
  27. package/dist/esm/server/lib/app-info-log.js +1 -1
  28. package/dist/esm/server/lib/router-utils/setup-dev-bundler.js +1 -1
  29. package/dist/esm/server/lib/router-utils/setup-dev-bundler.js.map +1 -1
  30. package/dist/esm/server/lib/start-server.js +1 -1
  31. package/dist/esm/server/patch-error-inspect.js +1 -1
  32. package/dist/esm/server/patch-error-inspect.js.map +1 -1
  33. package/dist/esm/server/web/sandbox/context.js +1 -1
  34. package/dist/esm/server/web/sandbox/context.js.map +1 -1
  35. package/dist/esm/server/web/sandbox/sandbox.js +1 -1
  36. package/dist/esm/server/web/sandbox/sandbox.js.map +1 -1
  37. package/dist/server/config.js +1 -1
  38. package/dist/server/dev/hot-reloader-turbopack.js +1 -1
  39. package/dist/server/dev/hot-reloader-webpack.js +4 -4
  40. package/dist/server/dev/hot-reloader-webpack.js.map +1 -1
  41. package/dist/server/image-optimizer.js +2 -2
  42. package/dist/server/image-optimizer.js.map +1 -1
  43. package/dist/server/lib/app-info-log.js +1 -1
  44. package/dist/server/lib/router-utils/setup-dev-bundler.js +5 -5
  45. package/dist/server/lib/router-utils/setup-dev-bundler.js.map +1 -1
  46. package/dist/server/lib/start-server.js +1 -1
  47. package/dist/server/patch-error-inspect.js +2 -2
  48. package/dist/server/patch-error-inspect.js.map +1 -1
  49. package/dist/server/web/sandbox/context.js +1 -1
  50. package/dist/server/web/sandbox/context.js.map +1 -1
  51. package/dist/server/web/sandbox/sandbox.js +1 -1
  52. package/dist/server/web/sandbox/sandbox.js.map +1 -1
  53. package/dist/telemetry/anonymous-meta.js +1 -1
  54. package/dist/telemetry/events/session-stopped.js +2 -2
  55. package/dist/telemetry/events/version.js +2 -2
  56. package/package.json +15 -15
  57. package/dist/client/components/react-dev-overlay/server/middleware.js.map +0 -1
  58. package/dist/esm/client/components/react-dev-overlay/server/middleware.js.map +0 -1
  59. /package/dist/client/components/react-dev-overlay/server/{middleware.d.ts → middleware-webpack.d.ts} +0 -0
package/dist/bin/next CHANGED
@@ -75,7 +75,7 @@ const program = new NextRootCommand();
75
75
  program.name('next').description('The Next.js CLI allows you to develop, build, start your application, and more.').configureHelp({
76
76
  formatHelp: (cmd, helper)=>(0, _formatclihelpoutput.formatCliHelpOutput)(cmd, helper),
77
77
  subcommandTerm: (cmd)=>`${cmd.name()} ${cmd.usage()}`
78
- }).helpCommand(false).helpOption('-h, --help', 'Displays this message.').version(`Next.js v${"15.0.4-canary.23"}`, '-v, --version', 'Outputs the Next.js version.');
78
+ }).helpCommand(false).helpOption('-h, --help', 'Displays this message.').version(`Next.js v${"15.0.4-canary.24"}`, '-v, --version', 'Outputs the Next.js version.');
79
79
  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('--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.').addOption(new _commander.Option('--experimental-turbo').hideHelp()).addOption(new _commander.Option('--experimental-build-mode [mode]', 'Uses an experimental build mode.').choices([
80
80
  'compile',
81
81
  'generate'
@@ -352,7 +352,7 @@ async function build(dir, reactProductionProfiling = false, debugOutput = false,
352
352
  const nextBuildSpan = (0, _trace.trace)('next-build', undefined, {
353
353
  buildMode: experimentalBuildMode,
354
354
  isTurboBuild: String(turboNextBuild),
355
- version: "15.0.4-canary.23"
355
+ version: "15.0.4-canary.24"
356
356
  });
357
357
  _buildcontext.NextBuildContext.nextBuildSpan = nextBuildSpan;
358
358
  _buildcontext.NextBuildContext.dir = dir;
@@ -754,7 +754,7 @@ async function build(dir, reactProductionProfiling = false, debugOutput = false,
754
754
  // Files outside of the distDir can be "type": "module"
755
755
  await writeFileUtf8(_path.default.join(distDir, 'package.json'), '{"type": "commonjs"}');
756
756
  // These are written to distDir, so they need to come after creating and cleaning distDr.
757
- await (0, _builddiagnostics.recordFrameworkVersion)("15.0.4-canary.23");
757
+ await (0, _builddiagnostics.recordFrameworkVersion)("15.0.4-canary.24");
758
758
  await (0, _builddiagnostics.updateBuildDiagnostics)({
759
759
  buildStage: 'start'
760
760
  });
@@ -127,7 +127,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
127
127
  }
128
128
  return newObj;
129
129
  }
130
- const nextVersion = "15.0.4-canary.23";
130
+ const nextVersion = "15.0.4-canary.24";
131
131
  const ArchName = (0, _os.arch)();
132
132
  const PlatformName = (0, _os.platform)();
133
133
  function infoLog(...args) {
@@ -22,7 +22,7 @@ _export(exports, {
22
22
  });
23
23
  const _picocolors = require("../../../../lib/picocolors");
24
24
  const _simpleWebpackError = require("./simpleWebpackError");
25
- const _middleware = require("../../../../client/components/react-dev-overlay/server/middleware");
25
+ const _middlewarewebpack = require("../../../../client/components/react-dev-overlay/server/middleware-webpack");
26
26
  // Based on https://github.com/webpack/webpack/blob/fcdd04a833943394bbb0a9eeb54a962a24cc7e41/lib/stats/DefaultStatsFactoryPlugin.js#L422-L431
27
27
  /*
28
28
  Copyright JS Foundation and other contributors
@@ -72,11 +72,11 @@ async function getSourceFrame(input, fileName, compilation) {
72
72
  if (sourceMap) {
73
73
  var _result_originalStackFrame_lineNumber, _result_originalStackFrame, _result_originalStackFrame_column, _result_originalStackFrame1;
74
74
  const moduleId = compilation.chunkGraph.getModuleId(module1);
75
- const result = await (0, _middleware.createOriginalStackFrame)({
75
+ const result = await (0, _middlewarewebpack.createOriginalStackFrame)({
76
76
  source: {
77
77
  type: 'bundle',
78
78
  sourceMap,
79
- ignoredSources: (0, _middleware.getIgnoredSources)(sourceMap),
79
+ ignoredSources: (0, _middlewarewebpack.getIgnoredSources)(sourceMap),
80
80
  compilation,
81
81
  moduleId,
82
82
  modulePath: fileName
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/build/webpack/plugins/wellknown-errors-plugin/parseNotFoundError.ts"],"sourcesContent":["import { bold, cyan, green, red, yellow } from '../../../../lib/picocolors'\nimport { SimpleWebpackError } from './simpleWebpackError'\nimport {\n createOriginalStackFrame,\n getIgnoredSources,\n} from '../../../../client/components/react-dev-overlay/server/middleware'\nimport type { webpack } from 'next/dist/compiled/webpack/webpack'\n\n// Based on https://github.com/webpack/webpack/blob/fcdd04a833943394bbb0a9eeb54a962a24cc7e41/lib/stats/DefaultStatsFactoryPlugin.js#L422-L431\n/*\nCopyright JS Foundation and other contributors\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n*/\nfunction getModuleTrace(input: any, compilation: any) {\n const visitedModules = new Set()\n const moduleTrace = []\n let current = input.module\n while (current) {\n if (visitedModules.has(current)) break // circular (technically impossible, but who knows)\n visitedModules.add(current)\n const origin = compilation.moduleGraph.getIssuer(current)\n if (!origin) break\n moduleTrace.push({ origin, module: current })\n current = origin\n }\n\n return moduleTrace\n}\n\nasync function getSourceFrame(\n input: any,\n fileName: any,\n compilation: any\n): Promise<{ frame: string; lineNumber: string; column: string }> {\n try {\n const loc =\n input.loc || input.dependencies.map((d: any) => d.loc).filter(Boolean)[0]\n const module = input.module as webpack.Module\n const originalSource = module.originalSource()\n const sourceMap = originalSource?.map() ?? undefined\n\n if (sourceMap) {\n const moduleId = compilation.chunkGraph.getModuleId(module)\n\n const result = await createOriginalStackFrame({\n source: {\n type: 'bundle',\n sourceMap,\n ignoredSources: getIgnoredSources(sourceMap),\n compilation,\n moduleId,\n modulePath: fileName,\n },\n rootDirectory: compilation.options.context!,\n frame: {\n arguments: [],\n file: fileName,\n methodName: '',\n lineNumber: loc.start.line,\n column: loc.start.column,\n },\n })\n\n return {\n frame: result?.originalCodeFrame ?? '',\n lineNumber: result?.originalStackFrame?.lineNumber?.toString() ?? '',\n column: result?.originalStackFrame?.column?.toString() ?? '',\n }\n }\n } catch {}\n\n return { frame: '', lineNumber: '', column: '' }\n}\n\nfunction getFormattedFileName(\n fileName: string,\n module: any,\n lineNumber?: string,\n column?: string\n): string {\n if (\n module.loaders?.find((loader: any) =>\n /next-font-loader[/\\\\]index.js/.test(loader.loader)\n )\n ) {\n // Parse the query and get the path of the file where the font function was called.\n // provided by next-swc next-transform-font\n return JSON.parse(module.resourceResolveData.query.slice(1)).path\n } else {\n let formattedFileName: string = cyan(fileName)\n if (lineNumber && column) {\n formattedFileName += `:${yellow(lineNumber)}:${yellow(column)}`\n }\n\n return formattedFileName\n }\n}\n\nexport async function getNotFoundError(\n compilation: webpack.Compilation,\n input: any,\n fileName: string,\n module: any\n) {\n if (\n input.name !== 'ModuleNotFoundError' &&\n !(\n input.name === 'ModuleBuildError' &&\n /Error: Can't resolve '.+' in /.test(input.message)\n )\n ) {\n return false\n }\n\n try {\n const { frame, lineNumber, column } = await getSourceFrame(\n input,\n fileName,\n compilation\n )\n\n const errorMessage = input.error.message\n .replace(/ in '.*?'/, '')\n .replace(/Can't resolve '(.*)'/, `Can't resolve '${green('$1')}'`)\n\n const importTrace = () => {\n const moduleTrace = getModuleTrace(input, compilation)\n .map(({ origin }) =>\n origin.readableIdentifier(compilation.requestShortener)\n )\n .filter(\n (name) =>\n name &&\n !/next-(app|middleware|client-pages|route|flight-(client|server|client-entry))-loader/.test(\n name\n ) &&\n !/css-loader.+\\.js/.test(name)\n )\n if (moduleTrace.length === 0) return ''\n\n return `\\nImport trace for requested module:\\n${moduleTrace.join('\\n')}`\n }\n\n let message =\n red(bold('Module not found')) +\n `: ${errorMessage}` +\n '\\n' +\n frame +\n (frame !== '' ? '\\n' : '') +\n '\\nhttps://nextjs.org/docs/messages/module-not-found\\n' +\n importTrace()\n\n const formattedFileName = getFormattedFileName(\n fileName,\n module,\n lineNumber,\n column\n )\n\n return new SimpleWebpackError(formattedFileName, message)\n } catch (err) {\n // Don't fail on failure to resolve sourcemaps\n return input\n }\n}\n\nexport async function getImageError(\n compilation: any,\n input: any,\n err: Error\n): Promise<SimpleWebpackError | false> {\n if (err.name !== 'InvalidImageFormatError') {\n return false\n }\n\n const moduleTrace = getModuleTrace(input, compilation)\n const { origin, module } = moduleTrace[0] || {}\n if (!origin || !module) {\n return false\n }\n const page = origin.rawRequest.replace(/^private-next-pages/, './pages')\n const importedFile = module.rawRequest\n const source = origin.originalSource().buffer().toString('utf8') as string\n let lineNumber = -1\n source.split('\\n').some((line) => {\n lineNumber++\n return line.includes(importedFile)\n })\n return new SimpleWebpackError(\n `${cyan(page)}:${yellow(lineNumber.toString())}`,\n red(bold('Error')).concat(\n `: Image import \"${importedFile}\" is not a valid image file. The image may be corrupted or an unsupported format.`\n )\n )\n}\n"],"names":["getImageError","getNotFoundError","getModuleTrace","input","compilation","visitedModules","Set","moduleTrace","current","module","has","add","origin","moduleGraph","getIssuer","push","getSourceFrame","fileName","loc","dependencies","map","d","filter","Boolean","originalSource","sourceMap","undefined","result","moduleId","chunkGraph","getModuleId","createOriginalStackFrame","source","type","ignoredSources","getIgnoredSources","modulePath","rootDirectory","options","context","frame","arguments","file","methodName","lineNumber","start","line","column","originalCodeFrame","originalStackFrame","toString","getFormattedFileName","loaders","find","loader","test","JSON","parse","resourceResolveData","query","slice","path","formattedFileName","cyan","yellow","name","message","errorMessage","error","replace","green","importTrace","readableIdentifier","requestShortener","length","join","red","bold","SimpleWebpackError","err","page","rawR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AAEH,QAAAA,OAAM,EAAE,GAAGF,WAAW,CAAC,EAAE,IAAI,CAAC;IAC9C,IAAI,CAACK,UAAU,CAACH,SAAQ;QACtB,OAAO;IACT;IACA,MAAMuE,OAAOpE,OAAOqE,UAAU,CAACZ,OAAO,CAAC,uBAAuB;IAC9D,MAAMa,eAAezE,QAAOwE,UAAU;IACtC,MAAMjD,SAASpB,OAAOY,cAAc,GAAG2D,MAAM,GAAGjC,QAAQ,CAAC;IACzD,IAAIN,aAAa,CAAC;IAClBZ,OAAOoD,KAAK,CAAC,MAAMC,IAAI,CAAC,CAACvC;QACvBF;QACA,OAAOE,KAAKwC,QAAQ,CAACJ;IACvB;IACA,OAAO,IAAIJ,sCAAkB,CAC3B,GAAGf,IAAAA,gBAAI,EAACiB,MAAM,CAAC,EAAEhB,IAAAA,kBAAM,EAACpB,WAAWM,QAAQ,KAAK,EAChD0B,IAAAA,eAAG,EAACC,IAAAA,gBAAI,EAAC,UAAUU,MAAM,CACvB,CAAC,gBAAgB,EAAEL,aAAa,iFAAiF,CAAC;AAGxH"}
1
+ {"version":3,"sources":["../../../../../src/build/webpack/plugins/wellknown-errors-plugin/parseNotFoundError.ts"],"sourcesContent":["import { bold, cyan, green, red, yellow } from '../../../../lib/picocolors'\nimport { SimpleWebpackError } from './simpleWebpackError'\nimport {\n createOriginalStackFrame,\n getIgnoredSources,\n} from '../../../../client/components/react-dev-overlay/server/middleware-webpack'\nimport type { webpack } from 'next/dist/compiled/webpack/webpack'\n\n// Based on https://github.com/webpack/webpack/blob/fcdd04a833943394bbb0a9eeb54a962a24cc7e41/lib/stats/DefaultStatsFactoryPlugin.js#L422-L431\n/*\nCopyright JS Foundation and other contributors\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n*/\nfunction getModuleTrace(input: any, compilation: any) {\n const visitedModules = new Set()\n const moduleTrace = []\n let current = input.module\n while (current) {\n if (visitedModules.has(current)) break // circular (technically impossible, but who knows)\n visitedModules.add(current)\n const origin = compilation.moduleGraph.getIssuer(current)\n if (!origin) break\n moduleTrace.push({ origin, module: current })\n current = origin\n }\n\n return moduleTrace\n}\n\nasync function getSourceFrame(\n input: any,\n fileName: any,\n compilation: any\n): Promise<{ frame: string; lineNumber: string; column: string }> {\n try {\n const loc =\n input.loc || input.dependencies.map((d: any) => d.loc).filter(Boolean)[0]\n const module = input.module as webpack.Module\n const originalSource = module.originalSource()\n const sourceMap = originalSource?.map() ?? undefined\n\n if (sourceMap) {\n const moduleId = compilation.chunkGraph.getModuleId(module)\n\n const result = await createOriginalStackFrame({\n source: {\n type: 'bundle',\n sourceMap,\n ignoredSources: getIgnoredSources(sourceMap),\n compilation,\n moduleId,\n modulePath: fileName,\n },\n rootDirectory: compilation.options.context!,\n frame: {\n arguments: [],\n file: fileName,\n methodName: '',\n lineNumber: loc.start.line,\n column: loc.start.column,\n },\n })\n\n return {\n frame: result?.originalCodeFrame ?? '',\n lineNumber: result?.originalStackFrame?.lineNumber?.toString() ?? '',\n column: result?.originalStackFrame?.column?.toString() ?? '',\n }\n }\n } catch {}\n\n return { frame: '', lineNumber: '', column: '' }\n}\n\nfunction getFormattedFileName(\n fileName: string,\n module: any,\n lineNumber?: string,\n column?: string\n): string {\n if (\n module.loaders?.find((loader: any) =>\n /next-font-loader[/\\\\]index.js/.test(loader.loader)\n )\n ) {\n // Parse the query and get the path of the file where the font function was called.\n // provided by next-swc next-transform-font\n return JSON.parse(module.resourceResolveData.query.slice(1)).path\n } else {\n let formattedFileName: string = cyan(fileName)\n if (lineNumber && column) {\n formattedFileName += `:${yellow(lineNumber)}:${yellow(column)}`\n }\n\n return formattedFileName\n }\n}\n\nexport async function getNotFoundError(\n compilation: webpack.Compilation,\n input: any,\n fileName: string,\n module: any\n) {\n if (\n input.name !== 'ModuleNotFoundError' &&\n !(\n input.name === 'ModuleBuildError' &&\n /Error: Can't resolve '.+' in /.test(input.message)\n )\n ) {\n return false\n }\n\n try {\n const { frame, lineNumber, column } = await getSourceFrame(\n input,\n fileName,\n compilation\n )\n\n const errorMessage = input.error.message\n .replace(/ in '.*?'/, '')\n .replace(/Can't resolve '(.*)'/, `Can't resolve '${green('$1')}'`)\n\n const importTrace = () => {\n const moduleTrace = getModuleTrace(input, compilation)\n .map(({ origin }) =>\n origin.readableIdentifier(compilation.requestShortener)\n )\n .filter(\n (name) =>\n name &&\n !/next-(app|middleware|client-pages|route|flight-(client|server|client-entry))-loader/.test(\n name\n ) &&\n !/css-loader.+\\.js/.test(name)\n )\n if (moduleTrace.length === 0) return ''\n\n return `\\nImport trace for requested module:\\n${moduleTrace.join('\\n')}`\n }\n\n let message =\n red(bold('Module not found')) +\n `: ${errorMessage}` +\n '\\n' +\n frame +\n (frame !== '' ? '\\n' : '') +\n '\\nhttps://nextjs.org/docs/messages/module-not-found\\n' +\n importTrace()\n\n const formattedFileName = getFormattedFileName(\n fileName,\n module,\n lineNumber,\n column\n )\n\n return new SimpleWebpackError(formattedFileName, message)\n } catch (err) {\n // Don't fail on failure to resolve sourcemaps\n return input\n }\n}\n\nexport async function getImageError(\n compilation: any,\n input: any,\n err: Error\n): Promise<SimpleWebpackError | false> {\n if (err.name !== 'InvalidImageFormatError') {\n return false\n }\n\n const moduleTrace = getModuleTrace(input, compilation)\n const { origin, module } = moduleTrace[0] || {}\n if (!origin || !module) {\n return false\n }\n const page = origin.rawRequest.replace(/^private-next-pages/, './pages')\n const importedFile = module.rawRequest\n const source = origin.originalSource().buffer().toString('utf8') as string\n let lineNumber = -1\n source.split('\\n').some((line) => {\n lineNumber++\n return line.includes(importedFile)\n })\n return new SimpleWebpackError(\n `${cyan(page)}:${yellow(lineNumber.toString())}`,\n red(bold('Error')).concat(\n `: Image import \"${importedFile}\" is not a valid image file. The image may be corrupted or an unsupported format.`\n )\n )\n}\n"],"names":["getImageError","getNotFoundError","getModuleTrace","input","compilation","visitedModules","Set","moduleTrace","current","module","has","add","origin","moduleGraph","getIssuer","push","getSourceFrame","fileName","loc","dependencies","map","d","filter","Boolean","originalSource","sourceMap","undefined","result","moduleId","chunkGraph","getModuleId","createOriginalStackFrame","source","type","ignoredSources","getIgnoredSources","modulePath","rootDirectory","options","context","frame","arguments","file","methodName","lineNumber","start","line","column","originalCodeFrame","originalStackFrame","toString","getFormattedFileName","loaders","find","loader","test","JSON","parse","resourceResolveData","query","slice","path","formattedFileName","cyan","yellow","name","message","errorMessage","error","replace","green","importTrace","readableIdentifier","requestShortener","length","join","red","bold","SimpleWebpackError","err","page","rawRequest","importedFile","buffer","split","some","includes","concat"],"mappings":";;;;;;;;;;;;;;;IAyLsBA,aAAa;eAAbA;;IApEAC,gBAAgB;eAAhBA;;;4BArHyB;oCACZ;mCAI5B;AAGP,6IAA6I;AAC7I;;;;;;;;;;;;;;;;;;;;;;AAsBA,GACA,SAASC,eAAeC,KAAU,EAAEC,WAAgB;IAClD,MAAMC,iBAAiB,IAAIC;IAC3B,MAAMC,cAAc,EAAE;IACtB,IAAIC,UAAUL,MAAMM,MAAM;IAC1B,MAAOD,QAAS;QACd,IAAIH,eAAeK,GAAG,CAACF,UAAU,O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C;QACvBF;QACA,OAAOE,KAAKwC,QAAQ,CAACJ;IACvB;IACA,OAAO,IAAIJ,sCAAkB,CAC3B,GAAGf,IAAAA,gBAAI,EAACiB,MAAM,CAAC,EAAEhB,IAAAA,kBAAM,EAACpB,WAAWM,QAAQ,KAAK,EAChD0B,IAAAA,eAAG,EAACC,IAAAA,gBAAI,EAAC,UAAUU,MAAM,CACvB,CAAC,gBAAgB,EAAEL,aAAa,iFAAiF,CAAC;AAGxH"}
@@ -1502,7 +1502,7 @@ async function getBaseWebpackConfig(dir, { buildId, encryptionKey, config, compi
1502
1502
  isClient && new _copyfileplugin.CopyFilePlugin({
1503
1503
  // file path to build output of `@next/polyfill-nomodule`
1504
1504
  filePath: require.resolve('./polyfills/polyfill-nomodule'),
1505
- cacheKey: "15.0.4-canary.23",
1505
+ cacheKey: "15.0.4-canary.24",
1506
1506
  name: `static/chunks/polyfills${dev ? '' : '-[hash]'}.js`,
1507
1507
  minimize: false,
1508
1508
  info: {
@@ -1731,7 +1731,7 @@ async function getBaseWebpackConfig(dir, { buildId, encryptionKey, config, compi
1731
1731
  // - Next.js location on disk (some loaders use absolute paths and some resolve options depend on absolute paths)
1732
1732
  // - Next.js version
1733
1733
  // - next.config.js keys that affect compilation
1734
- version: `${__dirname}|${"15.0.4-canary.23"}|${configVars}`,
1734
+ version: `${__dirname}|${"15.0.4-canary.24"}|${configVars}`,
1735
1735
  cacheDirectory: _path.default.join(distDir, 'cache', 'webpack'),
1736
1736
  // For production builds, it's more efficient to compress all cache files together instead of compression each one individually.
1737
1737
  // So we disable compression here and allow the build runner to take care of compressing the cache as a whole.
@@ -13,7 +13,7 @@ Object.defineProperty(exports, "appBootstrap", {
13
13
  return appBootstrap;
14
14
  }
15
15
  });
16
- const version = "15.0.4-canary.23";
16
+ const version = "15.0.4-canary.24";
17
17
  window.next = {
18
18
  version,
19
19
  appDir: true
@@ -413,4 +413,4 @@ if ((typeof exports.default === 'function' || (typeof exports.default === 'objec
413
413
  module.exports = exports.default;
414
414
  }
415
415
 
416
- //# sourceMappingURL=middleware.js.map
416
+ //# sourceMappingURL=middleware-webpack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/client/components/react-dev-overlay/server/middleware-webpack.ts"],"sourcesContent":["import { constants as FS, promises as fs } from 'fs'\nimport path from 'path'\nimport url from 'url'\nimport { SourceMapConsumer } from 'next/dist/compiled/source-map08'\nimport type { StackFrame } from 'next/dist/compiled/stacktrace-parser'\nimport { getSourceMapFromFile } from '../internal/helpers/get-source-map-from-file'\nimport { launchEditor } from '../internal/helpers/launchEditor'\nimport {\n badRequest,\n findSourcePackage,\n getOriginalCodeFrame,\n internalServerError,\n json,\n noContent,\n type OriginalStackFrameResponse,\n} from './shared'\nimport { NEXT_PROJECT_ROOT } from '../../../../build/next-dir-paths'\nexport { getServerError } from '../internal/helpers/node-stack-frames'\nexport { parseStack } from '../internal/helpers/parse-stack'\nexport { getSourceMapFromFile }\n\nimport type { IncomingMessage, ServerResponse } from 'http'\nimport type webpack from 'webpack'\nimport type {\n NullableMappedPosition,\n RawSourceMap,\n} from 'next/dist/compiled/source-map08'\nimport { formatFrameSourceFile } from '../internal/helpers/webpack-module-path'\nimport type { MappedPosition } from 'source-map'\n\nfunction shouldIgnorePath(modulePath: string): boolean {\n return (\n modulePath.includes('node_modules') ||\n // Only relevant for when Next.js is symlinked e.g. in the Next.js monorepo\n modulePath.includes('next/dist')\n )\n}\n\ntype IgnoredSources = Array<{ url: string; ignored: boolean }>\n\nexport interface IgnorableStackFrame extends StackFrame {\n ignored: boolean\n}\n\ntype SourceAttributes = {\n sourcePosition: NullableMappedPosition\n sourceContent: string | null\n}\n\ntype Source =\n | {\n type: 'file'\n sourceMap: RawSourceMap\n ignoredSources: IgnoredSources\n modulePath: string\n }\n | {\n type: 'bundle'\n sourceMap: RawSourceMap\n ignoredSources: IgnoredSources\n compilation: webpack.Compilation\n moduleId: string\n modulePath: string\n }\n\nfunction getModuleById(\n id: string | undefined,\n compilation: webpack.Compilation\n) {\n const { chunkGraph, modules } = compilation\n\n return [...modules].find((module) => chunkGraph.getModuleId(module) === id)\n}\n\nfunction findModuleNotFoundFromError(errorMessage: string | undefined) {\n return errorMessage?.match(/'([^']+)' module/)?.[1]\n}\n\nfunction getSourcePath(source: string) {\n return source.replace(/^(webpack:\\/\\/\\/|webpack:\\/\\/|webpack:\\/\\/_N_E\\/)/, '')\n}\n\nasync function findOriginalSourcePositionAndContent(\n sourceMap: RawSourceMap,\n position: { line: number; column: number | null }\n): Promise<SourceAttributes | null> {\n const consumer = await new SourceMapConsumer(sourceMap)\n try {\n const sourcePosition = consumer.originalPositionFor({\n line: position.line,\n column: position.column ?? 0,\n })\n\n if (!sourcePosition.source) {\n return null\n }\n\n const sourceContent: string | null =\n consumer.sourceContentFor(\n sourcePosition.source,\n /* returnNullOnMissing */ true\n ) ?? null\n\n return {\n sourcePosition,\n sourceContent,\n }\n } finally {\n consumer.destroy()\n }\n}\n\nexport function getIgnoredSources(sourceMap: RawSourceMap): IgnoredSources {\n const ignoreList = new Set<number>()\n const moduleFilenames = sourceMap?.sources ?? []\n\n for (let index = 0; index < moduleFilenames.length; index++) {\n // bundlerFilePath case: webpack://./app/page.tsx\n const bundlerFilePath = moduleFilenames[index]\n // Format the path to the normal file path\n const formattedFilePath = formatFrameSourceFile(bundlerFilePath)\n if (shouldIgnorePath(formattedFilePath)) {\n ignoreList.add(index)\n }\n }\n\n const ignoredSources = sourceMap.sources.map((source, index) => {\n return {\n url: source,\n ignored: ignoreList.has(sourceMap.sources.indexOf(source)),\n content: sourceMap.sourcesContent?.[index] ?? null,\n }\n })\n return ignoredSources\n}\n\nfunction isIgnoredSource(\n source: Source,\n sourcePosition: MappedPosition | NullableMappedPosition\n) {\n if (sourcePosition.source == null) {\n return true\n }\n for (const ignoredSource of source.ignoredSources) {\n if (ignoredSource.ignored && ignoredSource.url === sourcePosition.source) {\n return true\n }\n }\n\n return false\n}\n\nfunction createStackFrame(searchParams: URLSearchParams) {\n const file = searchParams.get('file') as string\n return {\n file,\n methodName: searchParams.get('methodName') as string,\n lineNumber: parseInt(searchParams.get('lineNumber') ?? '0', 10) || 0,\n column: parseInt(searchParams.get('column') ?? '0', 10) || 0,\n arguments: searchParams.getAll('arguments').filter(Boolean),\n } satisfies StackFrame\n}\n\nfunction findOriginalSourcePositionAndContentFromCompilation(\n moduleId: string | undefined,\n importedModule: string,\n compilation: webpack.Compilation\n): SourceAttributes | null {\n const module = getModuleById(moduleId, compilation)\n return module?.buildInfo?.importLocByPath?.get(importedModule) ?? null\n}\n\nexport async function createOriginalStackFrame({\n source,\n rootDirectory,\n frame,\n errorMessage,\n}: {\n source: Source\n rootDirectory: string\n frame: StackFrame\n errorMessage?: string\n}): Promise<OriginalStackFrameResponse | null> {\n const { lineNumber, column } = frame\n const moduleNotFound = findModuleNotFoundFromError(errorMessage)\n const result = await (async () => {\n if (moduleNotFound) {\n if (source.type === 'file') {\n return undefined\n }\n\n return findOriginalSourcePositionAndContentFromCompilation(\n source.moduleId,\n moduleNotFound,\n source.compilation\n )\n }\n // This returns 1-based lines and 0-based columns\n return await findOriginalSourcePositionAndContent(source.sourceMap, {\n line: lineNumber ?? 1,\n column,\n })\n })()\n\n if (!result) {\n return null\n }\n const { sourcePosition, sourceContent } = result\n\n if (!sourcePosition.source) {\n return null\n }\n\n const ignored =\n isIgnoredSource(source, sourcePosition) ||\n // If the source file is externals, should be excluded even it's not ignored source.\n // e.g. webpack://next/dist/.. needs to be ignored\n shouldIgnorePath(source.modulePath)\n\n const sourcePath = getSourcePath(\n // When sourcePosition.source is the loader path the modulePath is generally better.\n (sourcePosition.source!.includes('|')\n ? source.modulePath\n : sourcePosition.source) || source.modulePath\n )\n const filePath = path.resolve(rootDirectory, sourcePath)\n\n const resolvedFilePath = sourceContent\n ? path.relative(rootDirectory, filePath)\n : sourcePosition.source\n\n const traced: IgnorableStackFrame = {\n file: resolvedFilePath,\n lineNumber: sourcePosition.line,\n column: (sourcePosition.column ?? 0) + 1,\n methodName:\n sourcePosition.name ||\n // default is not a valid identifier in JS so webpack uses a custom variable when it's an unnamed default export\n // Resolve it back to `default` for the method name if the source position didn't have the method.\n frame.methodName\n ?.replace('__WEBPACK_DEFAULT_EXPORT__', 'default')\n ?.replace('__webpack_exports__.', ''),\n arguments: [],\n ignored,\n }\n\n return {\n originalStackFrame: traced,\n originalCodeFrame: getOriginalCodeFrame(traced, sourceContent),\n sourcePackage: findSourcePackage(traced),\n }\n}\n\nexport async function getSourceMapFromCompilation(\n id: string,\n compilation: webpack.Compilation\n): Promise<RawSourceMap | undefined> {\n try {\n const module = getModuleById(id, compilation)\n\n if (!module) {\n return undefined\n }\n\n // @ts-expect-error The types for `CodeGenerationResults.get` require a\n // runtime to be passed as second argument, but apparently it also works\n // without it.\n const codeGenerationResult = compilation.codeGenerationResults.get(module)\n const source = codeGenerationResult?.sources.get('javascript')\n\n return source?.map() ?? undefined\n } catch (err) {\n console.error(`Failed to lookup module by ID (\"${id}\"):`, err)\n return undefined\n }\n}\n\nasync function getSource(\n filename: string,\n options: {\n getCompilations: () => webpack.Compilation[]\n }\n): Promise<Source | undefined> {\n const { getCompilations } = options\n\n if (path.isAbsolute(filename)) {\n filename = url.pathToFileURL(filename).href\n }\n\n if (filename.startsWith('file:')) {\n const sourceMap = await getSourceMapFromFile(filename)\n return sourceMap\n ? {\n type: 'file',\n sourceMap,\n ignoredSources: getIgnoredSources(sourceMap),\n modulePath: filename.replace(/^file:\\/\\//, ''),\n }\n : undefined\n }\n\n // webpack-internal:///./src/hello.tsx => ./src/hello.tsx\n // rsc://React/Server/webpack-internal:///(rsc)/./src/hello.tsx?42 => (rsc)/./src/hello.tsx\n // webpack://_N_E/./src/hello.tsx => ./src/hello.tsx\n const moduleId = filename\n .replace(\n /^(rsc:\\/\\/React\\/[^/]+\\/)?(webpack-internal:\\/\\/\\/|webpack:\\/\\/(_N_E\\/)?)/,\n ''\n )\n .replace(/\\?\\d+$/, '')\n\n // (rsc)/./src/hello.tsx => ./src/hello.tsx\n const modulePath = moduleId.replace(/^(\\(.*\\)\\/?)/, '')\n\n for (const compilation of getCompilations()) {\n // TODO: `ignoreList`\n const sourceMap = await getSourceMapFromCompilation(moduleId, compilation)\n const ignoreList = []\n const moduleFilenames = sourceMap?.sources ?? []\n\n for (let index = 0; index < moduleFilenames.length; index++) {\n // bundlerFilePath case: webpack://./app/page.tsx\n const bundlerFilePath = moduleFilenames[index]\n // Format the path to the normal file path\n const formattedFilePath = formatFrameSourceFile(bundlerFilePath)\n if (shouldIgnorePath(formattedFilePath)) {\n ignoreList.push(index)\n }\n }\n\n if (sourceMap) {\n const ignoredSources = getIgnoredSources(sourceMap)\n return {\n type: 'bundle',\n sourceMap,\n compilation,\n moduleId,\n modulePath,\n ignoredSources,\n }\n }\n }\n\n return undefined\n}\n\nexport function getOverlayMiddleware(options: {\n rootDirectory: string\n clientStats: () => webpack.Stats | null\n serverStats: () => webpack.Stats | null\n edgeServerStats: () => webpack.Stats | null\n}) {\n const { rootDirectory, clientStats, serverStats, edgeServerStats } = options\n\n return async function (\n req: IncomingMessage,\n res: ServerResponse,\n next: () => void\n ): Promise<void> {\n const { pathname, searchParams } = new URL(`http://n${req.url}`)\n\n if (pathname === '/__nextjs_original-stack-frame') {\n const isServer = searchParams.get('isServer') === 'true'\n const isEdgeServer = searchParams.get('isEdgeServer') === 'true'\n const isAppDirectory = searchParams.get('isAppDirectory') === 'true'\n const frame = createStackFrame(searchParams)\n const formattedFilePath = formatFrameSourceFile(frame.file)\n const filePath = path.join(rootDirectory, formattedFilePath)\n const isNextjsSource = filePath.startsWith(NEXT_PROJECT_ROOT)\n\n let sourcePackage = findSourcePackage(frame)\n let source: Source | undefined\n\n if (isNextjsSource) {\n sourcePackage = 'next'\n return json(res, { sourcePackage })\n }\n\n try {\n source = await getSource(frame.file, {\n getCompilations: () => {\n const compilations: webpack.Compilation[] = []\n\n // Try Client Compilation first. In `pages` we leverage\n // `isClientError` to check. In `app` it depends on if it's a server\n // / client component and when the code throws. E.g. during HTML\n // rendering it's the server/edge compilation.\n if ((!isEdgeServer && !isServer) || isAppDirectory) {\n const compilation = clientStats()?.compilation\n\n if (compilation) {\n compilations.push(compilation)\n }\n }\n\n // Try Server Compilation. In `pages` this could be something\n // imported in getServerSideProps/getStaticProps as the code for\n // those is tree-shaken. In `app` this finds server components and\n // code that was imported from a server component. It also covers\n // when client component code throws during HTML rendering.\n if (isServer || isAppDirectory) {\n const compilation = serverStats()?.compilation\n\n if (compilation) {\n compilations.push(compilation)\n }\n }\n\n // Try Edge Server Compilation. Both cases are the same as Server\n // Compilation, main difference is that it covers `runtime: 'edge'`\n // pages/app routes.\n if (isEdgeServer || isAppDirectory) {\n const compilation = edgeServerStats()?.compilation\n\n if (compilation) {\n compilations.push(compilation)\n }\n }\n\n return compilations\n },\n })\n } catch (err) {\n console.error('Failed to get source map:', err)\n return internalServerError(res)\n }\n\n if (!source) {\n if (sourcePackage) return json(res, { sourcePackage })\n return noContent(res)\n }\n\n try {\n const originalStackFrameResponse = await createOriginalStackFrame({\n frame,\n source,\n rootDirectory,\n })\n\n if (!originalStackFrameResponse) {\n if (sourcePackage) return json(res, { sourcePackage })\n return noContent(res)\n }\n\n return json(res, originalStackFrameResponse)\n } catch (err) {\n console.log('Failed to parse source map:', err)\n return internalServerError(res)\n }\n } else if (pathname === '/__nextjs_launch-editor') {\n const frame = createStackFrame(searchParams)\n\n if (!frame.file) return badRequest(res)\n\n // frame files may start with their webpack layer, like (middleware)/middleware.js\n const filePath = path.resolve(\n rootDirectory,\n frame.file.replace(/^\\([^)]+\\)\\//, '')\n )\n const fileExists = await fs.access(filePath, FS.F_OK).then(\n () => true,\n () => false\n )\n if (!fileExists) return noContent(res)\n\n try {\n await launchEditor(filePath, frame.lineNumber, frame.column ?? 1)\n } catch (err) {\n console.log('Failed to launch editor:', err)\n return internalServerError(res)\n }\n\n return noContent(res)\n }\n\n return next()\n }\n}\n\nexport function getSourceMapMiddleware(options: {\n clientStats: () => webpack.Stats | null\n serverStats: () => webpack.Stats | null\n edgeServerStats: () => webpack.Stats | null\n}) {\n const { clientStats, serverStats, edgeServerStats } = options\n\n return async function (\n req: IncomingMessage,\n res: ServerResponse,\n next: () => void\n ): Promise<void> {\n const { pathname, searchParams } = new URL(`http://n${req.url}`)\n\n if (pathname !== '/__nextjs_source-map') {\n return next()\n }\n\n const filename = searchParams.get('filename')\n\n if (!filename) {\n return badRequest(res)\n }\n\n let source: Source | undefined\n\n try {\n source = await getSource(filename, {\n getCompilations: () => {\n const compilations: webpack.Compilation[] = []\n\n for (const stats of [\n clientStats(),\n serverStats(),\n edgeServerStats(),\n ]) {\n if (stats?.compilation) {\n compilations.push(stats.compilation)\n }\n }\n\n return compilations\n },\n })\n } catch (error) {\n console.error('Failed to get source map:', error)\n\n return internalServerError(res)\n }\n\n if (!source) {\n return noContent(res)\n }\n\n return json(res, source.sourceMap)\n }\n}\n"],"names":["createOriginalStackFrame","getIgnoredSources","getOverlayMiddleware","getServerError","getSourceMapFromCompilation","getSourceMapFromFile","getSourceMapMiddleware","parseStack","shouldIgnorePath","modulePath","includes","getModuleById","id","compilation","chunkGraph","modules","find","module","getModuleId","findModuleNotFoundFromError","errorMessage","match","getSourcePath","source","replace","findOriginalSourcePositionAndContent","sourceMap","position","consumer","SourceMapConsumer","sourcePosition","originalPositionFor","line","column","sourceContent","sourceContentFor","destroy","ignoreList","Set","moduleFilenames","sources","index","length","bundlerFilePath","formattedFilePath","formatFrameSourceFile","add","ignoredSources","map","url","ignored","has","indexOf","content","sourcesContent","isIgnoredSource","ignoredSource","createStackFrame","searchParams","file","get","methodName","lineNumber","parseInt","arguments","getAll","filter","Boolean","findOriginalSourcePositionAndContentFromCompilation","moduleId","importedModule","buildInfo","importLocByPath","rootDirectory","frame","moduleNotFound","result","type","undefined","sourcePath","filePath","path","resolve","resolvedFilePath","relative","traced","name","originalStackFrame","originalCodeFrame","getOriginalCodeFrame","sourcePackage","findSourcePackage","codeGenerationResult","codeGenerationResults","err","console","error","getSource","filename","options","getCompilations","isAbsolute","pathToFileURL","href","startsWith","push","clientStats","serverStats","edgeServerStats","req","res","next","pathname","URL","isServer","isEdgeServer","isAppDirectory","join","isNextjsSource","NEXT_PROJECT_ROOT","json","compilations","internalServerError","noContent","originalStackFrameResponse","log","badRequest","fileExists","fs","access","FS","F_OK","then","launchEditor","stats"],"mappings":";;;;;;;;;;;;;;;;;;;;;IA4KsBA,wBAAwB;eAAxBA;;IA5DNC,iBAAiB;eAAjBA;;IA0OAC,oBAAoB;eAApBA;;IAzUPC,cAAc;eAAdA,+BAAc;;IA4ODC,2BAA2B;eAA3BA;;IA1ObC,oBAAoB;eAApBA,0CAAoB;;IA4cbC,sBAAsB;eAAtBA;;IA7cPC,UAAU;eAAVA,sBAAU;;;;oBAlB6B;+DAC/B;8DACD;6BACkB;sCAEG;8BACR;wBAStB;8BAC2B;iCACH;4BACJ;mCASW;AAGtC,SAASC,iBAAiBC,UAAkB;IAC1C,OACEA,WAAWC,QAAQ,CAAC,mBACpB,2EAA2E;IAC3ED,WAAWC,QAAQ,CAAC;AAExB;AA6BA,SAASC,cACPC,EAAsB,EACtBC,WAAgC;IAEhC,MAAM,EAAEC,UAAU,EAAEC,OAAO,EAAE,GAAGF;IAEhC,OAAO;WAAIE;KAAQ,CAACC,IAAI,CAAC,CAACC,UAAWH,WAAWI,WAAW,CAACD,aAAYL;AAC1E;AAEA,SAASO,4BAA4BC,YAAgC;QAC5DA;IAAP,OAAOA,iCAAAA,sBAAAA,aAAcC,KAAK,CAAC,wCAApBD,mBAAyC,CAAC,EAAE;AACrD;AAEA,SAASE,cAAcC,MAAc;IACnC,OAAOA,OAAOC,OAAO,CAAC,qDAAqD;AAC7E;AAEA,eAAeC,qCACbC,SAAuB,EACvBC,QAAiD;IAEjD,MAAMC,WAAW,MAAM,IAAIC,8BAAiB,CAACH;IAC7C,IAAI;YAGQC;QAFV,MAAMG,iBAAiBF,SAASG,mBAAmB,CAAC;YAClDC,MAAML,SAASK,IA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BAAU,EAAChB;QACpB;QAEA,IAAIvF;QAEJ,IAAI;YACFA,SAAS,MAAM0E,UAAUC,UAAU;gBACjCE,iBAAiB;oBACf,MAAMqB,eAAsC,EAAE;oBAE9C,KAAK,MAAMa,SAAS;wBAClB5B;wBACAC;wBACAC;qBACD,CAAE;wBACD,IAAI0B,yBAAAA,MAAOzH,WAAW,EAAE;4BACtB4G,aAAahB,IAAI,CAAC6B,MAAMzH,WAAW;wBACrC;oBACF;oBAEA,OAAO4G;gBACT;YACF;QACF,EAAE,OAAOzB,OAAO;YACdD,QAAQC,KAAK,CAAC,6BAA6BA;YAE3C,OAAO0B,IAAAA,2BAAmB,EAACZ;QAC7B;QAEA,IAAI,CAACvF,QAAQ;YACX,OAAOoG,IAAAA,iBAAS,EAACb;QACnB;QAEA,OAAOU,IAAAA,YAAI,EAACV,KAAKvF,OAAOG,SAAS;IACnC;AACF"}
@@ -61,7 +61,7 @@ const _hooksclientcontextsharedruntime = require("../shared/lib/hooks-client-con
61
61
  const _shared = require("./react-client-callbacks/shared");
62
62
  const _tracer = /*#__PURE__*/ _interop_require_default._(require("./tracing/tracer"));
63
63
  const _reporttosocket = /*#__PURE__*/ _interop_require_default._(require("./tracing/report-to-socket"));
64
- const version = "15.0.4-canary.23";
64
+ const version = "15.0.4-canary.24";
65
65
  let router;
66
66
  const emitter = (0, _mitt.default)();
67
67
  const looseToArray = (input)=>[].slice.call(input);