#!/bin/bash
# Detect and report the package manager for this project

# JavaScript/TypeScript detection
if [ -f "pnpm-lock.yaml" ]; then
    echo "✓ Package manager: pnpm"
elif [ -f "yarn.lock" ]; then
    echo "✓ Package manager: yarn"
elif [ -f "bun.lockb" ]; then
    echo "✓ Package manager: bun"
elif [ -f "package-lock.json" ]; then
    echo "✓ Package manager: npm"
elif [ -f "package.json" ]; then
    echo "ℹ️  Package manager: npm (default, no lockfile)"
fi

# Python detection
if [ -f "poetry.lock" ]; then
    echo "✓ Python package manager: poetry"
elif [ -f "Pipfile.lock" ]; then
    echo "✓ Python package manager: pipenv"
elif [ -f "uv.lock" ]; then
    echo "✓ Python package manager: uv"
elif [ -f "requirements.txt" ] || [ -f "pyproject.toml" ]; then
    echo "✓ Python package manager: pip"
fi

exit 0
