Rocky_Mountain_Vending/.pnpm-store/v10/files/4f/2386cd67e45eba7001104e8bf6a546cb45d578b5189d9f38081d4c2624d0396cae53fe0ae661b3906ed039a5171fc1cf734780c1d4f876b142e20ddbc28d86
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
4.9 KiB
Text

{"version":3,"sources":["../../src/lib/find-config.ts"],"sourcesContent":["import findUp from 'next/dist/compiled/find-up'\nimport { readFile } from 'fs/promises'\nimport JSON5 from 'next/dist/compiled/json5'\nimport { pathToFileURL } from 'url'\n\ntype RecursivePartial<T> = {\n [P in keyof T]?: RecursivePartial<T[P]>\n}\n\nexport function findConfigPath(\n dir: string,\n key: string\n): Promise<string | undefined> {\n // If we didn't find the configuration in `package.json`, we should look for\n // known filenames.\n return findUp(\n [\n `.${key}rc.json`,\n `${key}.config.json`,\n `.${key}rc.js`,\n `${key}.config.js`,\n `${key}.config.mjs`,\n `${key}.config.cjs`,\n ],\n {\n cwd: dir,\n }\n )\n}\n\n// We'll allow configuration to be typed, but we force everything provided to\n// become optional. We do not perform any schema validation. We should maybe\n// force all the types to be `unknown` as well.\nexport async function findConfig<T>(\n directory: string,\n key: string,\n _returnFile?: boolean\n): Promise<RecursivePartial<T> | null> {\n // `package.json` configuration always wins. Let's check that first.\n const packageJsonPath = await findUp('package.json', { cwd: directory })\n let isESM = false\n\n if (packageJsonPath) {\n try {\n const packageJsonStr = await readFile(packageJsonPath, 'utf8')\n const packageJson = JSON.parse(packageJsonStr) as {\n [key: string]: string\n }\n\n if (typeof packageJson !== 'object') {\n throw new Error() // Stop processing and continue\n }\n\n if (packageJson.type === 'module') {\n isESM = true\n }\n\n if (packageJson[key] != null && typeof packageJson[key] === 'object') {\n return packageJson[key]\n }\n } catch {\n // Ignore error and continue\n }\n }\n\n const filePath = await findConfigPath(directory, key)\n\n const esmImport = (path: string) => {\n // Skip mapping to absolute url with pathToFileURL on windows if it's jest\n // https://github.com/nodejs/node/issues/31710#issuecomment-587345749\n if (process.platform === 'win32' && !process.env.JEST_WORKER_ID) {\n // on windows import(\"C:\\\\path\\\\to\\\\file\") is not valid, so we need to\n // use file:// URLs\n return import(pathToFileURL(path).toString())\n } else {\n return import(path)\n }\n }\n\n if (filePath) {\n if (filePath.endsWith('.js')) {\n if (isESM) {\n return (await esmImport(filePath)).default\n } else {\n return require(filePath)\n }\n } else if (filePath.endsWith('.mjs')) {\n return (await esmImport(filePath)).default\n } else if (filePath.endsWith('.cjs')) {\n return require(filePath)\n }\n\n // We load JSON contents with JSON5 to allow users to comment in their\n // configuration file. This pattern was popularized by TypeScript.\n const fileContents = await readFile(filePath, 'utf8')\n return JSON5.parse(fileContents)\n }\n\n return null\n}\n"],"names":["findUp","readFile","JSON5","pathToFileURL","findConfigPath","dir","key","cwd","findConfig","directory","_returnFile","packageJsonPath","isESM","packageJsonStr","packageJson","JSON","parse","Error","type","filePath","esmImport","path","process","platform","env","JEST_WORKER_ID","toString","endsWith","default","require","fileContents"],"mappings":"AAAA,OAAOA,YAAY,6BAA4B;AAC/C,SAASC,QAAQ,QAAQ,cAAa;AACtC,OAAOC,WAAW,2BAA0B;AAC5C,SAASC,aAAa,QAAQ,MAAK;AAMnC,OAAO,SAASC,eACdC,GAAW,EACXC,GAAW;IAEX,4EAA4E;IAC5E,mBAAmB;IACnB,OAAON,OACL;QACE,CAAC,CAAC,EAAEM,IAAI,OAAO,CAAC;QAChB,GAAGA,IAAI,YAAY,CAAC;QACpB,CAAC,CAAC,EAAEA,IAAI,KAAK,CAAC;QACd,GAAGA,IAAI,UAAU,CAAC;QAClB,GAAGA,IAAI,WAAW,CAAC;QACnB,GAAGA,IAAI,WAAW,CAAC;KACpB,EACD;QACEC,KAAKF;IACP;AAEJ;AAEA,6EAA6E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