Releases: tinystruct/tinystruct
Release list
v1.7.28: fix(security): prevent path traversal and refine HTTP server controls
- Enhance path normalization in `Dispatcher` and `HttpServer` to properly validate base directory boundaries and prevent directory traversal attacks. - Update `sanitizeUri` in `HttpServer` to return a normalized `Path` and support longer URIs (up to 2048 chars). - Hide sensitive exception details in HTTP 500 responses unless the environment is set to 'development'. - Mark session cookies as `Secure` when requests are served over HTTPS. - Update `maven-assembly-plugin` to version 3.7.1. - Bump project version to 1.7.28.
v1.7.27
v1.7.26
v1.7.25
v1.7.24
v1.7.23
Key Features
- Automated Package Imports
The POJO generation pipeline is now fully autonomous. The generators (MySQL, MSSQL, SQLite, and H2) dynamically analyze table column types and inject the necessary Java imports into the generated code.
Automatic Detections:
java.time.LocalDateTime (for DATETIME, TIMESTAMP, DATETIME2)
java.util.Date (for DATE)
java.sql.Timestamp
java.sql.Time
Simplified CLI: The interactive prompt for manual package imports has been removed, reducing developer friction during the generate command execution.
2. Native LocalDateTime Support
Full support for java.time.LocalDateTime has been integrated into the data hydration layer.
Field Mapping: SQL types TIMESTAMP, DATETIME2, and SMALLDATETIME are now natively mapped to LocalDateTime.
Robust Hydration: The FieldInfo utility now handles conversions from both java.sql.Timestamp objects and ISO-compliant strings, ensuring compatibility across different JDBC drivers and database vendors.
3. Generator Architecture Refactoring
Interface Simplification: The Generator interface has been streamlined by removing the importPackages method, moving the responsibility of dependency management to the generators themselves.
Standardized Hydration: All generators now use a consistent, camelCase naming convention for hydration methods (e.g., localDateTimeValue()), improving codebase predictability.
Modern Syntax: Internal mapping logic now utilizes modern Java switch expressions for cleaner, more readable type-to-import resolution.
4. CLI & Dispatcher Polish
Code Clean-up: Significant refactoring of Dispatcher.java to improve code readability, fix indentation inconsistencies, and optimize help text formatting.
Improved Tooling: Enhanced the maven-wrapper extraction process and standardized solution guidance for common issues like ClassNotFoundException.
v1.7.22
v1.7.21
v1.7.20
v1.7.19: fix: update version to 1.7.19 and upgrade dependencies
- Version: Bump project version from 1.7.18 to 1.7.19 across pom.xml, scripts, and documentation. - Documentation: Update version references in README.md and DEVELOPER_GUIDE.md. - Application: Update VERSION constant in ApplicationManager.java. - Scripts: Update version variables in bin/dispatcher, bin/dispatcher.cmd, and build.sh. - Dependencies: Upgrade lettuce.version to 7.5.0.RELEASE. - Dependencies: Upgrade sqlite.version to 3.51.3.0. - Dependencies: Upgrade mockito.version to 5.23.0.