Rocky_Mountain_Vending/.pnpm-store/v10/files/37/3ec1b82d0ebeac2e96383457fe79071641721dd3f2f40c77c833f192567a500a36eb0194b01785fa65f8906276c42ce7a70877004184a89566990050ea4d01
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
3.7 KiB
Text

{"version":3,"sources":["../../../src/lib/typescript/writeAppTypeDeclarations.ts"],"sourcesContent":["import os from 'os'\nimport path from 'path'\nimport { promises as fs } from 'fs'\n\nexport async function writeAppTypeDeclarations({\n baseDir,\n distDir,\n imageImportsEnabled,\n hasPagesDir,\n hasAppDir,\n}: {\n baseDir: string\n distDir: string\n imageImportsEnabled: boolean\n hasPagesDir: boolean\n hasAppDir: boolean\n}): Promise<void> {\n // Reference `next` types\n const appTypeDeclarations = path.join(baseDir, 'next-env.d.ts')\n\n // Defaults EOL to system default\n let eol = os.EOL\n let currentContent: string | undefined\n\n try {\n currentContent = await fs.readFile(appTypeDeclarations, 'utf8')\n // If file already exists then preserve its line ending\n const lf = currentContent.indexOf('\\n', /* skip first so we can lf - 1 */ 1)\n\n if (lf !== -1) {\n if (currentContent[lf - 1] === '\\r') {\n eol = '\\r\\n'\n } else {\n eol = '\\n'\n }\n }\n } catch {}\n\n /**\n * \"Triple-slash directives\" used to create typings files for Next.js projects\n * using Typescript .\n *\n * @see https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html\n */\n const directives: string[] = [\n // Include the core Next.js typings.\n '/// <reference types=\"next\" />',\n ]\n\n if (imageImportsEnabled) {\n directives.push('/// <reference types=\"next/image-types/global\" />')\n }\n\n if (hasAppDir && hasPagesDir) {\n directives.push(\n '/// <reference types=\"next/navigation-types/compat/navigation\" />'\n )\n }\n\n const routeTypesPath = path.posix.join(\n distDir.replaceAll(path.win32.sep, path.posix.sep),\n 'types/routes.d.ts'\n )\n\n // Use ESM import instead of triple-slash reference for better ESLint compatibility\n directives.push(`import \"./${routeTypesPath}\";`)\n\n // Push the notice in.\n directives.push(\n '',\n '// NOTE: This file should not be edited',\n `// see https://nextjs.org/docs/${hasAppDir ? 'app' : 'pages'}/api-reference/config/typescript for more information.`\n )\n\n const content = directives.join(eol) + eol\n\n // Avoids an un-necessary write on read-only fs\n if (currentContent === content) {\n return\n }\n await fs.writeFile(appTypeDeclarations, content)\n}\n"],"names":["os","path","promises","fs","writeAppTypeDeclarations","baseDir","distDir","imageImportsEnabled","hasPagesDir","hasAppDir","appTypeDeclarations","join","eol","EOL","currentContent","readFile","lf","indexOf","directives","push","routeTypesPath","posix","replaceAll","win32","sep","content","writeFile"],"mappings":"AAAA,OAAOA,QAAQ,KAAI;AACnB,OAAOC,UAAU,OAAM;AACvB,SAASC,YAAYC,EAAE,QAAQ,KAAI;AAEnC,OAAO,eAAeC,yBAAyB,EAC7CC,OAAO,EACPC,OAAO,EACPC,mBAAmB,EACnBC,WAAW,EACXC,SAAS,EAOV;IACC,yBAAyB;IACzB,MAAMC,sBAAsBT,KAAKU,IAAI,CAACN,SAAS;IAE/C,iCAAiC;IACjC,IAAIO,MAAMZ,GAAGa,GAAG;IAChB,IAAIC;IAEJ,IAAI;QACFA,iBAAiB,MAAMX,GAAGY,QAAQ,CAACL,qBAAqB;QACxD,uDAAuD;QACvD,MAAMM,KAAKF,eAAeG,OAAO,CAAC,MAAM,+BAA+B,GAAG;QAE1E,IAAID,OAAO,CAAC,GAAG;YACb,IAAIF,cAAc,CAACE,KAAK,EAAE,KAAK,MAAM;gBACnCJ,MAAM;YACR,OAAO;gBACLA,MAAM;YACR;QACF;IACF,EAAE,OAAM,CAAC;IAET;;;;;GAKC,GACD,MAAMM,aAAuB;QAC3B,oCAAoC;QACpC;KACD;IAED,IAAIX,qBAAqB;QACvBW,WAAWC,IAAI,CAAC;IAClB;IAEA,IA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