/opt/canhelp/node_modules/next/dist/esm/shared/lib
NameSizeModeActions
errors/-0755rm
i18n/-0755rm
isomorphic/-0755rm
lazy-dynamic/-0755rm
page-path/-0755rm
router/-0755rm
segment-cache/-0755rm
turbopack/-0755rm
utils/-0755rm
amp-context.shared-runtime.js2380644editdlrm
amp-context.shared-runtime.js.map5800644editdlrm
amp-mode.js2150644editdlrm
amp-mode.js.map4690644editdlrm
amp.js3190644editdlrm
amp.js.map6260644editdlrm
app-dynamic.js6100644editdlrm
app-dynamic.js.map18750644editdlrm
app-router-context.shared-runtime.js7050644editdlrm
app-router-context.shared-runtime.js.map62550644editdlrm
bloom-filter.js27610644editdlrm
bloom-filter.js.map54920644editdlrm
canary-only.js8180644editdlrm
canary-only.js.map14240644editdlrm
constants.js69750644editdlrm
constants.js.map117540644editdlrm
deep-freeze.js10460644editdlrm
deep-freeze.js.map17590644editdlrm
deep-readonly.js2790644editdlrm
deep-readonly.js.map5750644editdlrm
dset.d.ts1170644editdlrm
dset.js17240644editdlrm
dset.js.map25540644editdlrm
dynamic.js44310644editdlrm
dynamic.js.map75070644editdlrm
encode-uri-path.js1540644editdlrm
encode-uri-path.js.map4520644editdlrm
error-source.js3790644editdlrm
error-source.js.map9830644editdlrm
escape-regexp.js4760644editdlrm
escape-regexp.js.map8350644editdlrm
fnv1a.js25840644editdlrm
fnv1a.js.map40720644editdlrm
format-webpack-messages.js81210644editdlrm
format-webpack-messages.js.map129540644editdlrm
get-hostname.js7490644editdlrm
get-hostname.js.map13790644editdlrm
get-img-props.js249440644editdlrm
get-img-props.js.map378080644editdlrm
get-rspack.js20960644editdlrm
get-rspack.js.map27600644editdlrm
get-webpack-bundler.js4090644editdlrm
get-webpack-bundler.js.map7370644editdlrm
hash.js9010644editdlrm
hash.js.map14840644editdlrm
head-manager-context.shared-runtime.js2560644editdlrm
head-manager-context.shared-runtime.js.map8620644editdlrm
head.js57410644editdlrm
head.js.map96030644editdlrm
hooks-client-context.shared-runtime.js4970644editdlrm
hooks-client-context.shared-runtime.js.map10810644editdlrm
html-context.shared-runtime.js6880644editdlrm
html-context.shared-runtime.js.map27550644editdlrm
image-blur-svg.js12830644editdlrm
image-blur-svg.js.map21070644editdlrm
image-config-context.shared-runtime.js3250644editdlrm
image-config-context.shared-runtime.js.map7830644editdlrm
image-config.js9550644editdlrm
image-config.js.map59040644editdlrm
image-external.js12120644editdlrm
image-external.js.map21930644editdlrm
image-loader.js48650644editdlrm
image-loader.js.map67440644editdlrm
invariant-error.js2910644editdlrm
invariant-error.js.map6660644editdlrm
is-internal.js7480644editdlrm
is-internal.js.map12620644editdlrm
is-plain-object.js7040644editdlrm
is-plain-object.js.map12040644editdlrm
is-thenable.js3350644editdlrm
is-thenable.js.map6640644editdlrm
loadable-context.shared-runtime.js2590644editdlrm
loadable-context.shared-runtime.js.map6510644editdlrm
loadable.shared-runtime.js80110644editdlrm
loadable.shared-runtime.js.map138270644editdlrm
magic-identifier.js31450644editdlrm
magic-identifier.js.map41010644editdlrm
match-local-pattern.js8780644editdlrm
match-local-pattern.js.map16720644editdlrm
match-remote-pattern.js14860644editdlrm
match-remote-pattern.js.map26850644editdlrm
mitt.js20620644editdlrm
mitt.js.map29980644editdlrm
modern-browserslist-target.d.ts1990644editdlrm
modern-browserslist-target.js6380644editdlrm
modern-browserslist-target.js.map8930644editdlrm
no-fallback-error.external.js1960644editdlrm
no-fallback-error.external.js.map4100644editdlrm
normalized-asset-prefix.js7370644editdlrm
normalized-asset-prefix.js.map12970644editdlrm
promise-with-resolvers.js3720644editdlrm
promise-with-resolvers.js.map7620644editdlrm
router-context.shared-runtime.js2370644editdlrm
router-context.shared-runtime.js.map6210644editdlrm
runtime-config.external.js3730644editdlrm
runtime-config.external.js.map6510644editdlrm
segment.js7410644editdlrm
segment.js.map16450644editdlrm
server-inserted-html.shared-runtime.js7480644editdlrm
server-inserted-html.shared-runtime.js.map13830644editdlrm
server-reference-info.js18650644editdlrm
server-reference-info.js.map33340644editdlrm
side-effect.js25660644editdlrm
side-effect.js.map39540644editdlrm
styled-jsx.d.ts430644editdlrm
styled-jsx.js850644editdlrm
styled-jsx.js.map2300644editdlrm
utils.js47280644editdlrm
utils.js.map158240644editdlrm
zod.js26320644editdlrm
zod.js.map44900644editdlrm
Edit: /opt/canhelp/node_modules/next/dist/esm/shared/lib/format-webpack-messages.js.map (12954B)
{"version":3,"sources":["../../../src/shared/lib/format-webpack-messages.ts"],"sourcesContent":["/**\nMIT License\n\nCopyright (c) 2015-present, Facebook, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\nimport stripAnsi from 'next/dist/compiled/strip-ansi'\n// This file is based on https://github.com/facebook/create-react-app/blob/7b1a32be6ec9f99a6c9a3c66813f3ac09c4736b9/packages/react-dev-utils/formatWebpackMessages.js\n// It's been edited to remove chalk and CRA-specific logic\n\nconst friendlySyntaxErrorLabel = 'Syntax error:'\n\nconst WEBPACK_BREAKING_CHANGE_POLYFILLS =\n '\\n\\nBREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.'\n\nfunction isLikelyASyntaxError(message: string) {\n return stripAnsi(message).includes(friendlySyntaxErrorLabel)\n}\n\nlet hadMissingSassError = false\n\n// Cleans up webpack error messages.\nfunction formatMessage(\n message: any,\n verbose?: boolean,\n importTraceNote?: boolean\n) {\n // TODO: Replace this once webpack 5 is stable\n if (typeof message === 'object' && message.message) {\n const filteredModuleTrace =\n message.moduleTrace &&\n message.moduleTrace.filter(\n (trace: any) =>\n !/next-(middleware|client-pages|route|edge-function)-loader\\.js/.test(\n trace.originName\n )\n )\n\n let body = message.message\n const breakingChangeIndex = body.indexOf(WEBPACK_BREAKING_CHANGE_POLYFILLS)\n if (breakingChangeIndex >= 0) {\n body = body.slice(0, breakingChangeIndex)\n }\n\n message =\n (message.moduleName ? stripAnsi(message.moduleName) + '\\n' : '') +\n (message.file ? stripAnsi(message.file) + '\\n' : '') +\n body +\n (message.details && verbose ? '\\n' + message.details : '') +\n (filteredModuleTrace && filteredModuleTrace.length\n ? (importTraceNote || '\\n\\nImport trace for requested module:') +\n filteredModuleTrace\n .map((trace: any) => `\\n${trace.moduleName}`)\n .join('')\n : '') +\n (message.stack && verbose ? '\\n' + message.stack : '')\n }\n let lines = message.split('\\n')\n\n // Strip Webpack-added headers off errors/warnings\n // https://github.com/webpack/webpack/blob/master/lib/ModuleError.js\n lines = lines.filter((line: string) => !/Module [A-z ]+\\(from/.test(line))\n\n // Transform parsing error into syntax error\n // TODO: move this to our ESLint formatter?\n lines = lines.map((line: string) => {\n const parsingError = /Line (\\d+):(?:(\\d+):)?\\s*Parsing error: (.+)$/.exec(\n line\n )\n if (!parsingError) {\n return line\n }\n const [, errorLine, errorColumn, errorMessage] = parsingError\n return `${friendlySyntaxErrorLabel} ${errorMessage} (${errorLine}:${errorColumn})`\n })\n\n message = lines.join('\\n')\n // Smoosh syntax errors (commonly found in CSS)\n message = message.replace(\n /SyntaxError\\s+\\((\\d+):(\\d+)\\)\\s*(.+?)\\n/g,\n `${friendlySyntaxErrorLabel} $3 ($1:$2)\\n`\n )\n // Clean up export errors\n message = message.replace(\n /^.*export '(.+?)' was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$1' is not exported from '$2'.`\n )\n message = message.replace(\n /^.*export 'default' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$2' does not contain a default export (imported as '$1').`\n )\n message = message.replace(\n /^.*export '(.+?)' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$1' is not exported from '$3' (imported as '$2').`\n )\n lines = message.split('\\n')\n\n // Remove leading newline\n if (lines.length > 2 && lines[1].trim() === '') {\n lines.splice(1, 1)\n }\n\n // Cleans up verbose \"module not found\" messages for files and packages.\n if (lines[1] && lines[1].startsWith('Module not found: ')) {\n lines = [\n lines[0],\n lines[1]\n .replace('Error: ', '')\n .replace('Module not found: Cannot find file:', 'Cannot find file:'),\n ...lines.slice(2),\n ]\n }\n\n // Add helpful message for users trying to use Sass for the first time\n if (lines[1] && lines[1].match(/Cannot find module.+sass/)) {\n // ./file.module.scss (<>) => ./file.module.scss\n const firstLine = lines[0].split('!')\n lines[0] = firstLine[firstLine.length - 1]\n\n lines[1] =\n \"To use Next.js' built-in Sass support, you first need to install `sass`.\\n\"\n lines[1] += 'Run `npm i sass` or `yarn add sass` inside your workspace.\\n'\n lines[1] += '\\nLearn more: https://nextjs.org/docs/messages/install-sass'\n\n // dispose of unhelpful stack trace\n lines = lines.slice(0, 2)\n hadMissingSassError = true\n } else if (\n hadMissingSassError &&\n message.match(/(sass-loader|resolve-url-loader: CSS error)/)\n ) {\n // dispose of unhelpful stack trace following missing sass module\n lines = []\n }\n\n if (!verbose) {\n message = lines.join('\\n')\n // Internal stacks are generally useless so we strip them... with the\n // exception of stacks containing `webpack:` because they're normally\n // from user code generated by Webpack. For more information see\n // https://github.com/facebook/create-react-app/pull/1050\n message = message.replace(\n /^\\s*at\\s((?!webpack:).)*:\\d+:\\d+[\\s)]*(\\n|$)/gm,\n ''\n ) // at ... ...:x:y\n message = message.replace(/^\\s*at\\s(\\n|$)/gm, '') // at \n\n message = message.replace(\n /File was processed with these loaders:\\n(.+[\\\\/](next[\\\\/]dist[\\\\/].+|@next[\\\\/]react-refresh-utils[\\\\/]loader)\\.js\\n)*You may need an additional loader to handle the result of these loaders.\\n/g,\n ''\n )\n\n lines = message.split('\\n')\n }\n\n // Remove duplicated newlines\n lines = (lines as string[]).filter(\n (line, index, arr) =>\n index === 0 || line.trim() !== '' || line.trim() !== arr[index - 1].trim()\n )\n\n // Reassemble the message\n message = lines.join('\\n')\n return message.trim()\n}\n\nexport default function formatWebpackMessages(json: any, verbose?: boolean) {\n const formattedErrors = json.errors.map((message: any) => {\n const isUnknownNextFontError = message.message.includes(\n 'An error occurred in `next/font`.'\n )\n return formatMessage(message, isUnknownNextFontError || verbose)\n })\n const formattedWarnings = json.warnings.map((message: any) => {\n return formatMessage(message, verbose)\n })\n\n // Reorder errors to put the most relevant ones first.\n let reactServerComponentsError = -1\n\n for (let i = 0; i < formattedErrors.length; i++) {\n const error = formattedErrors[i]\n if (error.includes('ReactServerComponentsError')) {\n reactServerComponentsError = i\n break\n }\n }\n\n // Move the reactServerComponentsError to the top if it exists\n if (reactServerComponentsError !== -1) {\n const error = formattedErrors.splice(reactServerComponentsError, 1)\n formattedErrors.unshift(error[0])\n }\n\n const result = {\n ...json,\n errors: formattedErrors,\n warnings: formattedWarnings,\n }\n if (!verbose && result.errors.some(isLikelyASyntaxError)) {\n // If there are any syntax errors, show just them.\n result.errors = result.errors.filter(isLikelyASyntaxError)\n result.warnings = []\n }\n return result\n}\n"],"names":["stripAnsi","friendlySyntaxErrorLabel","WEBPACK_BREAKING_CHANGE_POLYFILLS","isLikelyASyntaxError","message","includes","hadMissingSassError","formatMessage","verbose","importTraceNote","filteredModuleTrace","moduleTrace","filter","trace","test","originName","body","breakingChangeIndex","indexOf","slice","moduleName","file","details","length","map","join","stack","lines","split","line","parsingError","exec","errorLine","errorColumn","errorMessage","replace","trim","splice","startsWith","match","firstLine","index","arr","formatWebpackMessages","json","formattedErrors","errors","isUnknownNextFontError","formattedWarnings","warnings","reactServerComponentsError","i","error","unshift","result","some"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;AAsBA,GACA,OAAOA,eAAe,gCAA+B;AACrD,qKAAqK;AACrK,0DAA0D;AAE1D,MAAMC,2BAA2B;AAEjC,MAAMC,oCACJ;AAEF,SAASC,qBAAqBC,OAAe;IAC3C,OAAOJ,UAAUI,SAASC,QAAQ,CAACJ;AACrC;AAEA,IAAIK,sBAAsB;AAE1B,oCAAoC;AACpC,SAASC,cACPH,OAAY,EACZI,OAAiB,EACjBC,eAAyB;IAEzB,8CAA8C;IAC9C,IAAI,OAAOL,YAAY,YAAYA,QAAQA,OAAO,EAAE;QAClD,MAAMM,sBACJN,QAAQO,WAAW,IACnBP,QAAQO,WAAW,CAACC,MAAM,CACxB,CAACC,QACC,CAAC,gEAAgEC,IAAI,CACnED,MAAME,UAAU;QAIxB,IAAIC,OAAOZ,QAAQA,OAAO;QAC1B,MAAMa,sBAAsBD,KAAKE,OAAO,CAAChB;QACzC,IAAIe,uBAAuB,GAAG;YAC5BD,OAAOA,KAAKG,KAAK,CAAC,GAAGF;QACvB;QAEAb,UACE,AAACA,CAAAA,QAAQgB,UAAU,GAAGpB,UAAUI,QAAQgB,UAAU,IAAI,OAAO,EAAC,IAC7DhB,CAAAA,QAAQiB,IAAI,GAAGrB,UAAUI,QAAQiB,IAAI,IAAI,OAAO,EAAC,IAClDL,OACCZ,CAAAA,QAAQkB,OAAO,IAAId,UAAU,OAAOJ,QAAQkB,OAAO,GAAG,EAAC,IACvDZ,CAAAA,uBAAuBA,oBAAoBa,MAAM,GAC9C,AAACd,CAAAA,mBAAmB,wCAAuC,IAC3DC,oBACGc,GAAG,CAAC,CAACX,QAAe,AAAC,OAAIA,MAAMO,UAAU,EACzCK,IAAI,CAAC,MACR,EAAC,IACJrB,CAAAA,QAAQsB,KAAK,IAAIlB,UAAU,OAAOJ,QAAQ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