Rocky_Mountain_Vending/.pnpm-store/v10/files/7a/53652eabd164c3657befc18daffaa6d51d0bdc566b6b07c8ed1f0ab42ccb5fef290010a46dc5fdd74bad118b01f84d4eadae840fdea713b28395b2e7a060e9
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

48 lines
No EOL
1.3 KiB
Text

import fs from 'fs';
import path from 'path';
import { execSync } from 'child_process';
export function getPkgManager(baseDir) {
try {
for (const { lockFile, packageManager } of [
{
lockFile: 'yarn.lock',
packageManager: 'yarn'
},
{
lockFile: 'pnpm-lock.yaml',
packageManager: 'pnpm'
},
{
lockFile: 'package-lock.json',
packageManager: 'npm'
}
]){
if (fs.existsSync(path.join(baseDir, lockFile))) {
return packageManager;
}
}
const userAgent = process.env.npm_config_user_agent;
if (userAgent) {
if (userAgent.startsWith('yarn')) {
return 'yarn';
} else if (userAgent.startsWith('pnpm')) {
return 'pnpm';
}
}
try {
execSync('yarn --version', {
stdio: 'ignore'
});
return 'yarn';
} catch {
execSync('pnpm --version', {
stdio: 'ignore'
});
return 'pnpm';
}
} catch {
return 'npm';
}
}
//# sourceMappingURL=get-pkg-manager.js.map