Files
tuxmate-abusoww/src/lib/aur.ts
N1C4T c3b737f901 refactor: split CommandFooter, perf tweaks
- extracted drawer modal to CommandDrawer (~180 lines)
- CommandFooter now under 270 lines
- replaced transition-all with specific props (colors, transform, etc)
- should reduce repaints on hover states
2025-12-31 22:11:19 +04:00

78 lines
1.6 KiB
TypeScript

// AUR package detection - figures out if a package is from AUR or official repos
/** Patterns that indicate an AUR package (suffixes) */
export const AUR_PATTERNS = ['-bin', '-git', '-appimage'];
/**
* Known AUR packages that don't follow the suffix naming convention.
* These are packages that exist only in AUR, not in official Arch repos.
*/
export const KNOWN_AUR_PACKAGES = new Set([
// Browsers
'google-chrome',
'zen-browser-bin',
'helium-browser-bin',
// Communication
'slack-desktop',
'zoom',
'vesktop-bin',
// Dev Editors
'sublime-text-4',
'vscodium-bin',
'cursor-bin',
// Dev Tools
'postman-bin',
'bruno-bin',
'hoppscotch-bin',
// Dev Languages
'bun-bin',
// Media
'spotify',
'stremio',
// Gaming
'heroic-games-launcher-bin',
'protonup-qt-bin',
// Office
'onlyoffice-bin',
'logseq-desktop-bin',
'joplin-appimage',
// VPN
'proton-vpn-gtk-app',
'mullvad-vpn-bin',
// File Sharing
'localsend-bin',
'dropbox',
'ab-download-manager-bin',
// Security
'bitwarden',
// Creative
'orcaslicer-bin',
// Browsers (additional)
'brave-bin',
'librewolf-bin',
]);
/**
* Check if a package name is an AUR package
* @param packageName - The Arch package name to check
* @returns true if the package is from AUR
*/
export function isAurPackage(packageName: string): boolean {
if (KNOWN_AUR_PACKAGES.has(packageName)) {
return true;
}
return AUR_PATTERNS.some(pattern => packageName.endsWith(pattern));
}