detect.d.ts 992 B

12345678910111213141516171819202122
  1. import { D as DetectOptions, d as DetectResult, a as AgentName } from './shared/package-manager-detector.257741fc.js';
  2. /**
  3. * Detects the package manager used in the project.
  4. * @param options {DetectOptions} The options to use when detecting the package manager.
  5. * @returns {Promise<DetectResult | null>} The detected package manager or `null` if not found.
  6. */
  7. declare function detect(options?: DetectOptions): Promise<DetectResult | null>;
  8. /**
  9. * Detects the package manager used in the project.
  10. * @param options {DetectOptions} The options to use when detecting the package manager.
  11. * @returns {DetectResult | null>} The detected package manager or `null` if not found.
  12. */
  13. declare function detectSync(options?: DetectOptions): DetectResult | null;
  14. /**
  15. * Detects the package manager used in the running process.
  16. *
  17. * This method will check for `process.env.npm_config_user_agent`.
  18. */
  19. declare function getUserAgent(): AgentName | null;
  20. export { detect, detectSync, getUserAgent };