Rocky_Mountain_Vending/.pnpm-store/v10/files/b5/35c4828f4de5731b1a66ae952aac514ed28cac25ee6889016f21290e62c4d13edad56595a16cd6a125bb9df719bf5f86b1437fc0a5888dc59f93b9920b082a
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

36 lines
No EOL
1.4 KiB
Text

import path from 'path';
import { warn } from '../build/output/log';
import { detectTypo } from './detect-typo';
import { realpathSync } from './realpath';
import { printAndExit } from '../server/lib/utils';
export function getProjectDir(dir, exitOnEnoent = true) {
const resolvedDir = path.resolve(dir || '.');
try {
const realDir = realpathSync(resolvedDir);
if (resolvedDir !== realDir && resolvedDir.toLowerCase() === realDir.toLowerCase()) {
warn(`Invalid casing detected for project dir, received ${resolvedDir} actual path ${realDir}, see more info here https://nextjs.org/docs/messages/invalid-project-dir-casing`);
}
return realDir;
} catch (err) {
if (err.code === 'ENOENT' && exitOnEnoent) {
if (typeof dir === 'string') {
const detectedTypo = detectTypo(dir, [
'build',
'dev',
'info',
'lint',
'start',
'telemetry',
'experimental-test'
]);
if (detectedTypo) {
return printAndExit(`"next ${dir}" does not exist. Did you mean "next ${detectedTypo}"?`);
}
}
return printAndExit(`Invalid project directory provided, no such directory: ${resolvedDir}`);
}
throw err;
}
}
//# sourceMappingURL=get-project-dir.js.map