UNPKG

agentsqripts

Version:

Comprehensive static code analysis toolkit for identifying technical debt, security vulnerabilities, performance issues, and code quality problems

47 lines (45 loc) 2.3 kB
/** * @file AST-based code block extraction facade * @description Single responsibility: Provide clean API for semantic block extraction * * This facade module provides a centralized entry point for AST-based semantic block * extraction while maintaining strict Single Responsibility Principle compliance. * It abstracts the internal implementation details and provides a stable API for * consumers of the WET code analysis functionality. * * Design rationale: * - Facade pattern maintains clean separation between API and implementation * - Re-export structure allows internal reorganization without breaking consumers * - Single function focus enables precise dependency management * - Consistent with AgentSqripts module organization patterns */ const extractSemanticBlocks = require('./ast-block/extractSemanticBlocks'); /** * Facade module exports for AST-based semantic block extraction * * Implementation rationale: * - Object export structure provides room for future expansion while maintaining compatibility * - Named export clearly identifies the specific functionality being exposed * - Re-export pattern allows implementation details to change without affecting consumers * - Consistent API structure enables predictable usage patterns across analyzers * * Architectural considerations: * - Separates public API from internal implementation structure * - Enables refactoring of internal modules without breaking external dependencies * - Provides clear entry point for semantic block extraction functionality * - Maintains consistency with other analyzer facade patterns * * Future extensibility: * - Object structure allows adding related functions without breaking changes * - Module can expand to include configuration options or related utilities * - Internal implementation can be reorganized without affecting this interface * - Supports gradual migration to new implementation approaches * * Alternative approaches considered: * - Direct require in consumers: Rejected to avoid tight coupling to internal structure * - Multiple individual exports: Rejected to maintain focused single responsibility * - Function wrapping: Rejected as unnecessary abstraction layer for simple re-export */ module.exports = { extractSemanticBlocks };