Skip to content

Conversation

@carloseberhardt
Copy link
Contributor

  • feat: refactor stepzenProjectScanner into modular service architecture
  • feat: complete migration to service architecture\n\nPhase 3: Remove compatibility layer and complete migration\n\n## Changes\n\n### Removed\n- utils/stepzenProjectScanner.ts: Compatibility layer no longer needed\n\n### Updated\n- All commands and utilities now use services.schemaIndex directly\n- Updated imports across the codebase\n- Fixed type annotations in tests\n\n### Architecture\n- extension.ts: Direct service usage for scanning and hashing\n- commands/: All commands use services.schemaIndex methods\n- utils/: CodeLens provider and diagnostics use service architecture\n- tests/: Updated to use new service methods\n\n## Benefits\n- Cleaner, more maintainable codebase\n- No legacy compatibility layer\n- Consistent service-oriented architecture throughout\n- All 101 tests passing\n\nResolves: Issue STRUCT1: Split stepzenProjectScanner into parser/indexer/diagnostics modules #49 - Refactor stepzenProjectScanner into smaller modules

Split the monolithic stepzenProjectScanner.ts (743 LoC) into focused,
testable modules while maintaining 100% backward compatibility.

## New Architecture

### Service Layer
- services/SchemaIndexService.ts: Main orchestration service
- services/index.ts: Updated service registry with schemaIndex

### Schema Processing Layer
- services/schema/indexer.ts: Core indexing logic and data structures
- services/schema/linker.ts: Loop-safe SDL include traversal
- services/schema/parser.ts: GraphQL AST utility functions

### Compatibility Layer
- utils/stepzenProjectScanner.ts: Backward-compatible API wrapper

## Benefits
- Improved modularity with single-responsibility modules
- Enhanced testability through dependency injection
- Better maintainability with clear separation of concerns
- Preserved performance with optimized data structures

## Testing
- All 101 tests passing (including STRUCT1-TESTS)
- Service registry tests updated for new schemaIndex service
- Full backward compatibility verified

## Documentation
- Added comprehensive architecture documentation
- Detailed migration strategy and benefits
- Clear module responsibilities and data flow

Resolves: #49
…ompatibility layer and complete migration\n\n## Changes\n\n### Removed\n- utils/stepzenProjectScanner.ts: Compatibility layer no longer needed\n\n### Updated\n- All commands and utilities now use services.schemaIndex directly\n- Updated imports across the codebase\n- Fixed type annotations in tests\n\n### Architecture\n- extension.ts: Direct service usage for scanning and hashing\n- commands/: All commands use services.schemaIndex methods\n- utils/: CodeLens provider and diagnostics use service architecture\n- tests/: Updated to use new service methods\n\n## Benefits\n- Cleaner, more maintainable codebase\n- No legacy compatibility layer\n- Consistent service-oriented architecture throughout\n- All 101 tests passing\n\nResolves: Issue #49 - Refactor stepzenProjectScanner into smaller modules
@carloseberhardt carloseberhardt merged commit 64eb3a0 into main May 25, 2025
2 checks passed
@carloseberhardt carloseberhardt deleted the issue-49 branch May 25, 2025 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

STRUCT1: Split stepzenProjectScanner into parser/indexer/diagnostics modules

2 participants