package com.freeleaps.devops.enums

enum DependenciesManager {
  PIP('pip'),
  NPM('npm'),
  YARN('yarn'),
  PNPM('pnpm'),
  UNKNOWN('Unknown')

  final String manager

  DependenciesManager(String manager) {
    this.manager = manager
  }

  static DependenciesManager parse(String manager) {
    switch (manager) {
      case 'pip':
        return DependenciesManager.PIP
      case 'npm':
        return DependenciesManager.NPM
      case 'yarn':
        return DependenciesManager.YARN
      case 'pnpm':
        return DependenciesManager.PNPM
      default:
        return DependenciesManager.UNKNOWN
    }
  }
}