Rocky_Mountain_Vending/.pnpm-store/v10/files/9e/9da800b59be54a8601ee196b1d7ed27ca8ecf9c5117e7f562af69f85a10a5ee80e08453f366b95421c9dd0a54f1d33aaf36decfa558989ac1931132e81e45f
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

1 line
No EOL
12 KiB
Text

{"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 '../../../../server/dev/middleware-webpack'\nimport type { webpack } from 'next/dist/compiled/webpack/webpack'\nimport type { RawSourceMap } from 'next/dist/compiled/source-map08'\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\nfunction sourceMapIgnoreListsEverything(\n sourceMap: RawSourceMap & { ignoreList?: number[] }\n): boolean {\n return sourceMap.sources.length === sourceMap.ignoreList?.length\n}\n\nasync function getSourceFrame(\n input: any,\n fileName: any,\n compilation: any\n): Promise<{ frame: string; line1: string; column1: 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 ignoredByDefault: sourceMapIgnoreListsEverything(sourceMap),\n source: {\n type: 'bundle',\n sourceMap,\n ignoredSources: getIgnoredSources(sourceMap),\n compilation,\n moduleId,\n moduleURL: fileName,\n },\n rootDirectory: compilation.options.context!,\n frame: {\n arguments: [],\n file: fileName,\n methodName: '',\n line1: loc.start.line,\n // loc is 0-based but columns in stack frames are 1-based.\n column1: (loc.start.column ?? 0) + 1,\n },\n })\n\n return {\n frame: result?.originalCodeFrame ?? '',\n line1: result?.originalStackFrame?.line1?.toString() ?? '',\n column1: result?.originalStackFrame?.column1?.toString() ?? '',\n }\n }\n } catch {}\n\n return { frame: '', line1: '', column1: '' }\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, line1, column1 } = 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 line1,\n column1\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":["bold","cyan","green","red","yellow","SimpleWebpackError","createOriginalStackFrame","getIgnoredSources","getModuleTrace","input","compilation","visitedModules","Set","moduleTrace","current","module","has","add","origin","moduleGraph","getIssuer","push","sourceMapIgnoreListsEverything","sourceMap","sources","length","ignoreList","getSourceFrame","fileName","loc","dependencies","map","d","filter","Boolean","originalSource","undefined","result","moduleId","chunkGraph","getModuleId","ignoredByDefault","source","type","ignoredSources","moduleURL","rootDirectory","options","context","frame","arguments","file","methodName","line1","start","line","column1","column","originalCodeFrame","originalStackFrame","toString","getFormattedFileName","lineNumber","loaders","find","loader","test","JSON","parse","resourceResolveData","query","slice","path","formattedFileName","getNotFoundError","name","message","errorMessage","error","replace","importTrace","readableIdentifier","requestShortener","join","err","getImageError","page","rawRequest","importedFile","buffer","split","some","includes","concat"],"mappings":"AAAA,SAASA,IAAI,EAAEC,IAAI,EAAEC,KAAK,EAAEC,GAAG,EAAEC,MAAM,QAAQ,6BAA4B;AAC3E,SAASC,kBAAkB,QAAQ,uBAAsB;AACzD,SACEC,wBAAwB,EACxBC,iBAAiB,QACZ,4CAA2C;AAIlD,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,GA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