UNPKG

@wangkanai/devops-mcp

Version:

Dynamic Azure DevOps MCP Server for directory-based environment switching

46 lines 1.52 kB
"use strict"; /** * Environment Detection Service * Detects current working directory and maps to appropriate Azure DevOps configuration * @deprecated Use DirectoryDetector instead */ Object.defineProperty(exports, "__esModule", { value: true }); exports.EnvironmentDetector = void 0; const directory_detector_js_1 = require("../directory-detector.js"); class EnvironmentDetector { constructor(mappings, defaultConfig) { this.directoryDetector = new directory_detector_js_1.DirectoryDetector(mappings, defaultConfig); } /** * Detect Azure DevOps configuration based on current directory */ detectEnvironment(currentDirectory) { return this.directoryDetector.detectConfiguration(currentDirectory); } /** * Add a new project mapping */ addMapping(mapping) { this.directoryDetector.addMapping(mapping.directory, mapping.config); } /** * Get all configured mappings */ getMappings() { return this.directoryDetector.getConfiguredDirectories(); } /** * Get project context for directory */ getProjectContext(currentDirectory) { return this.directoryDetector.getProjectContext(currentDirectory); } /** * Check if directory is configured */ isConfiguredDirectory(currentDirectory) { return this.directoryDetector.isConfiguredDirectory(currentDirectory); } } exports.EnvironmentDetector = EnvironmentDetector; //# sourceMappingURL=environment-detector.js.map