||||
|
|
|
|||---|---|---|---|
|||
||
TypeSpec-to-AsyncAPI 3.0 emitter with functional core infrastructure and active development.
BRUTAL HONESTY: Core functionality works for basic use cases, but advanced features and some infrastructure need work. Suitable for experimentation and basic projects.
- Build System: β FULLY OPERATIONAL - 0 TypeScript compilation errors
- Core Decorators: β FUNCTIONAL - @channel, @publish, @subscribe working
- Schema Validation: β OPERATIONAL - @effect/schema domain objects working
- Documentation Tests: β PASSING - Core documentation and mapping tests working
- Performance Benchmarks: β STABLE - Core performance tests passing
- Effect Patterns: β WORKING - Effect.TS functional patterns operational
- Justfile Commands: β
FUNCTIONAL - All core commands (
just build,just test) working
- State Management: π΄ CRITICAL -
program.stateMapundefined causing crashes - Import Resolution: π΄ PARTIALLY BROKEN - Some module import issues in tests
- Complex Protocol Tests: π΄ FAILING - Advanced protocol tests (Kafka, MQTT, etc.) broken
- Real Emitter Tests: π΄ BROKEN - State consolidation failures in full integration tests
- Advanced Features: π΄ DISABLED - Complex infrastructure files temporarily removed (5,745 lines)
- Pass Rate: 255/664 tests passing (38.4%) - Improving but needs work
- Build Status: β PERFECT - TypeScript compilation with 0 errors
- Core Functionality: β WORKING - Basic AsyncAPI generation functional
- Advanced Features: π΄ DISABLED - Complex protocols and advanced features not working
// This WORKS:
using TypeSpec.AsyncAPI;
@channel("user/events")
@publish
op publishUserEvent(userId: string, eventType: string): void;
@channel("orders")
@subscribe
op subscribeToOrders(): void;# These commands WORK:
bun install
just build # β
TypeScript compilation succeeds
bun test test/documentation/ # β
Core documentation tests pass
bunx tsp compile example.tsp --emit @lars-artmann/typespec-asyncapi
# β
Generates basic AsyncAPI 3.0 YAML files- β @channel decorator - Basic channel path definition
- β @publish decorator - Send operations
- β @subscribe decorator - Receive operations
- β Basic AsyncAPI 3.0 structure - Core spec generation
- β Schema validation - Type-safe validation with @effect/schema
- β TypeScript compilation - Zero compilation errors
- β Documentation examples - Core examples work
# Current Error:
TypeError: undefined is not an object (evaluating 'program.stateMap')
# Impact: Advanced state consolidation crashes
# Status: π΄ CRITICAL - Blocks complex TypeSpec processing# Status: Advanced protocol tests FAILING
# Kafka: 0/45 tests passing
# MQTT: 0/45 tests passing
# WebSocket: 0/45 tests passing
# Impact: No enterprise protocol support# Problem: 5,745 lines of complex infrastructure disabled
# Files affected:
# - AsyncAPIEmitterCore.ts (360 lines)
# - PluginSystem.ts (1,254 lines)
# - StateManager.ts + StateTransitions.ts (1,223 lines)
# - AdvancedTypeModels.ts (749 lines)
# Impact: No plugin system, no advanced state management# Install the emitter
bun add @lars-artmann/typespec-asyncapi
# OR clone for development
git clone https://github.com/LarsArtmann/typespec-asyncapi
cd typespec-asyncapi
bun install// Create your TypeSpec file (api.tsp)
using TypeSpec.AsyncAPI;
@channel("user/events")
@publish
op publishUserEvent(userId: string, eventType: string): void;
@channel("orders")
@subscribe
op subscribeToOrders(): void;# Generate AsyncAPI (this WORKS)
bunx tsp compile api.tsp --emit @lars-artmann/typespec-asyncapi
# Output: asyncapi.yaml with basic channels and operationsjust build # β
Build TypeScript (0 errors)
just test # β
Run tests (255/664 pass)
just lint # β
ESLint validation
bun test --watch # β
Watch mode for development// Workaround: Use simple decorator patterns
@channel("simple/path") // β
Works
// Avoid: Complex state-dependent decorators// Workaround: Basic channel generation works
@channel("kafka.orders") // β
Generates channel name
// Manual protocol binding in generated AsyncAPI needed# Run only working test categories
bun test test/documentation/ # β
Core tests pass
bun test test/effect-patterns.test.ts # β
Effect patterns work
bun test test/schema-integration.test.ts # β
Schema validation works
# Avoid broken tests for now
# Skip: test/protocols/ (complex protocols broken)
# Skip: test/validation/ (state management issues)Priority: CRITICAL
-
Fix program.stateMap Access
- Debug TypeSpec compiler integration
- Restore proper state extraction
- Fix 40% of failing tests
-
Basic Infrastructure Restoration
- Reactivate core state management files
- Fix import resolution issues
- Restore basic plugin functionality
-
Core Feature Validation
- Ensure end-to-end basic generation works
- Validate generated AsyncAPI specs
- Fix critical integration tests
Priority: HIGH
-
Enterprise Protocol Recovery
- Restore Kafka protocol support
- Restore MQTT protocol support
- Restore WebSocket protocol support
- Fix 300+ failing protocol tests
-
Advanced Decorator Support
- Reactivate complex infrastructure files
- Restore @message, @server, @security decorators
- Implement proper validation
Priority: MEDIUM
-
Quality Assurance
- Achieve >90% test pass rate
- Performance optimization
- Security validation
-
Advanced Features
- Plugin system restoration
- Custom protocol bindings
- Enterprise-grade features
- Experimentation - Learning TypeSpec and AsyncAPI integration
- Basic Projects - Simple event-driven APIs with standard channels
- Prototyping - Quick AsyncAPI spec generation from TypeSpec
- Contributions - Core infrastructure is working and testable
- Production Systems - State management issues too critical
- Complex Protocols - Kafka, MQTT, WebSocket support broken
- Enterprise Features - Plugin system, advanced security disabled
- Mission-Critical APIs - Insufficient validation and testing
- Bug Fixes - Core infrastructure issues
- Documentation - Examples and getting started guides
- Test Improvements - Core test suite reliability
- Basic Features - Simple decorator enhancements
- State Management - Requires TypeSpec compiler expertise
- Protocol Support - Complex infrastructure restoration needed
- Plugin System - 5,745 lines of complex code to restore
- Version: 0.0.1 (Alpha)
- Build Status: β Perfect (0 TypeScript errors)
- Test Coverage: 38.4% (255/664 passing)
- Core Features: β Functional for basic use cases
- Advanced Features: π΄ Disabled (infrastructure issues)
- Production Ready: β Not yet (state management critical)
- TypeScript Compilation: β 0 errors (from 425 previously)
- Code Duplication: β Excellent (0.47% - best in class)
- ESLint Compliance: β 5 critical errors, 105 warnings
- Dependencies: β Current and secure
- Documentation: β Core examples working
- Issues: β Open for core infrastructure bug reports
- PRs: β Welcomed for basic functionality fixes
- Support:
β οΈ Limited - focus on infrastructure recovery - Documentation: β Core examples accurate and tested
- Basic Questions: GitHub Discussions (working features)
- Bug Reports: GitHub Issues (with reproduction steps)
- Complex Issues: Check known limitations first
- Feature Requests: Welcome but timeline uncertain
Status: π‘ Alpha Quality - Core Working, Advanced Broken
Usability: β
Basic use cases functional
Production Ready: β State management issues critical
Contribution Ready: β
Core infrastructure stable
This project provides functional TypeSpec-to-AsyncAPI generation for basic use cases, with significant limitations in advanced features and enterprise protocol support.
Last Honest Update: 2025-12-02
Status: Alpha Quality - Basic functionality working, advanced features disabled