Common functionality shared between different runtime implementations (Bun, Deno, etc.).
This module provides shared behavior for:
- Port management and cleanup
- HTTP client operations
- Configuration handling
- Error handling patterns
- Process monitoring
Summary
Functions
Safely terminates a runtime process with proper cleanup.
Formats error messages consistently across runtimes.
Gets OS PID from port with error handling.
Handles file change events with async processing and timeout. Uses non-blocking approach to prevent GenServer blocking.
Standardized error handling for runtime operations.
Makes HTTP request to runtime server with standardized error handling.
Merges user configuration with defaults, applying validation.
Normalizes exit reasons for consistent process termination.
Creates port options for spawning runtime processes.
Creates environment variables for runtime processes.
Validates configuration values with proper error messages.
Functions
Safely terminates a runtime process with proper cleanup.
Formats error messages consistently across runtimes.
Gets OS PID from port with error handling.
Handles file change events with async processing and timeout. Uses non-blocking approach to prevent GenServer blocking.
Standardized error handling for runtime operations.
Returns {:ok, result} or {:error, reason} tuples consistently.
Makes HTTP request to runtime server with standardized error handling.
Merges user configuration with defaults, applying validation.
Normalizes exit reasons for consistent process termination.
Creates port options for spawning runtime processes.
Creates environment variables for runtime processes.
Validates configuration values with proper error messages.