v1.3.0
Refactor ServerConfig to unified mount-based architecture
Summary
Replaced separate plugin configurations with a unified mounts array in ServerConfig, allowing multiple instances of each plugin type with explicit routing priority control.
Changes
- TypeScript: Updated ServerConfig interface to support discriminated union types for mounts (webdav, zip, static)
- Rust backend: Refactored AppHttpServer to dynamically instantiate plugins from mounts array instead of hardcoded registration
- Plugins: Modified StaticFilePlugin, WebDavPlugin, and ZipMountPlugin to accept mount_path during construction and properly strip prefixes
- Documentation: Updated README files with new API examples and created detailed refactor plan
- Tests: Migrated all test cases to new configuration format
Key Features
- ✅ Unified configuration through
mountsarray with explicit routing priority - ✅ Support for multiple instances of each plugin type
- ✅ Maintains JS callback as ultimate fallback for unhandled requests
- ✅ Preserves backward compatibility through
root_dirfield - ✅ Clean separation between static serving and dynamic request handling
The new architecture provides Nginx-like routing flexibility while maintaining the hybrid server model's core principle: static serving first, dynamic JS fallback.