Skip to content

Conversation

@carloseberhardt
Copy link
Contributor

stepzen import from within vscode

Add complete foundation for StepZen CLI import integration with VS Code extension.
Implements all four import types with robust validation and error handling.

## New Features

### Import Service Architecture
- Generalized ImportService with command builder pattern
- Automatic import type detection and validation
- Service registry integration with dependency injection
- Comprehensive error handling and logging

### Import Types Supported
- **cURL Import**: Parse cURL commands, extract headers, handle authentication
- **OpenAPI Import**: Support for OpenAPI specs (files and URLs)
- **GraphQL Import**: GraphQL endpoint introspection with authentication
- **Database Import**: All database types (PostgreSQL, MySQL, Snowflake, etc.)

### Type System
- Complete TypeScript interfaces for all import configurations
- Proper type discrimination and validation
- Support for all CLI options and parameters

### Testing
- 213 passing tests with comprehensive coverage
- Unit tests for all import types and validation logic
- Error handling scenarios and edge cases
- Query name generation and configuration building

## Technical Implementation

- Command builder pattern for extensibility
- Robust validation with proper error bubbling
- Integration with existing service registry
- Follows established architecture patterns
- ESLint compliant with TypeScript strict mode

## Files Added/Modified

- `src/types/import.ts` - Complete type definitions
- `src/services/importService.ts` - Core import service implementation
- `src/test/unit/services/importService.test.ts` - Comprehensive test suite
- `src/test/unit/commands/importCurl.test.ts` - cURL parsing logic tests
- `src/services/index.ts` - Service registry integration
- `src/extension.ts` - Command registration

This establishes the foundation for intelligent import enhancement features
including cURL parsing, guided configuration, and schema optimization.
@carloseberhardt carloseberhardt merged commit 5831edf into main May 29, 2025
1 check passed
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.

2 participants