One Detector Fits All: Robust and Adaptive Detection of Malicious Packages from PyPI to Enterprises