Skip to content

Releases: tinystruct/tinystruct

v1.7.32

Choose a tag to compare

@m0ver m0ver released this 16 Sep 01:19

v1.7.32 Release Notes

This is a maintenance release focused on bug fixes, performance improvements, and stability enhancements.

Bug Fixes & Improvements

  • Various stability and performance enhancements
  • Ongoing improvements to the core framework

Version Information

  • Previous version: v1.7.31
  • Framework version: 1.7.32

Full Changelog: v1.7.31...v1.7.32

v1.7.31

Choose a tag to compare

@m0ver m0ver released this 13 Sep 15:42

v1.7.31 Release Notes

Major Features & Enhancements

PostgreSQL Schema & SSL Support

  • Schema-Qualified Table Mappings: Full support for schema-qualified table mappings across all database types
  • PostgreSQL Schema-Aware Code Generation: Enhanced code generator with schema support for PostgreSQL
  • JDBC SSL Support: Resolved JDBC SSL certificate and key files from classpath for secure database connections
  • SQL Script Parsing Improvements: Enhanced parsing for semicolons inside quoted strings, preventing false split points

Performance Optimization

  • XML Mapping Caching: Added caching for XML mapping templates to reduce parsing overhead
  • Class Path Caching: Implemented class path resolution caching for improved initialization speed
  • SQL Injection Verdict Caching: Cached SQL injection analysis results for better query execution performance
  • Database Result Parsing: Optimized repository result parsing and bulk row population for faster data operations

Distributed Lock & Queue Enhancements

  • Watcher Polling Timeouts: Introduced polling timeouts for file lock acquisition to prevent indefinite blocking
  • DistributedMessageQueue Reliability: Fixed lock acquisition, polling sleep, and state verification logic
  • Improved Locking Mechanisms: Better handling of distributed locks with improved timeout and polling strategies

Code Quality & Maintenance

  • Field & FieldInfo Optimization: Refactored with HashMap-based optimizations and improved code comments
  • MCP Tool Schema Generation: Improved schema generation and request dispatching for MCP tools
  • PostgreSQL Dispatcher Support: Added PostgreSQL generator support to the command dispatcher
  • Unit Tests Enhancement: Updated JUnit tests for comprehensive coverage

Database & Repository Improvements

Repository Method Unification

  • Consolidated Parameter Binding: Unified setParameters() methods in AbstractDataRepository for all repository types
  • Generic Whitelist-Based Updates: Implemented generic parameter-driven update methods in AbstractDataRepository and RedisServer
  • Type Support: Fixed long type handling in parameter-binding loops across MySQL, SQLite, and SQL Server implementations

Bug Fixes

  • Missing Long Type Support: Resolved missing long type support in MySQL, SQLite, and SQL Server parameter binding
  • Prepared Statement Binding: Improved SQL Server prepared statement binding with proper parameter order

Version Updates

  • Core framework version bumped from 1.7.30 to 1.7.31
  • Updated in pom.xml and related configuration files

Technical Details

Key Commits:

  • Schema-qualified table mappings and SSL resource resolution
  • Performance improvements across data, locking, and MCP modules
  • Caching layers for XML templates, class paths, and SQL injection verdicts
  • Field and FieldInfo optimization with HashMap refactoring

This release focuses on PostgreSQL enhancements, performance optimization through strategic caching, improved distributed locking mechanisms, and better code quality across the framework.

v1.7.30

Choose a tag to compare

@m0ver m0ver released this 04 Sep 00:38

v1.7.30 Release Notes

Major Features

PostgreSQL Database Support

  • Added full support for PostgreSQL database operations
  • Introduced PostgreSQLServer repository implementation with complete CRUD operations
  • Added PostgreSQLGenerator for automatic code generation from PostgreSQL tables
  • PostgreSQL is now available as a Type.PostgreSQL option in the repository type enum
  • Enhanced connection manager with intelligent default port detection (3306 for MySQL, 5432 for PostgreSQL, 1433 for SQL Server)

Database & ORM Improvements

Repository Interface Enhancements

  • Added new update(Field ready_fields, String table, Set<String> onlyFields) method to the Repository interface for selective field updates
  • Allows developers to update specific fields while keeping others unchanged, preventing accidental overwrites
  • All repository implementations now support selective field updating

Parameter Type Handling

  • Enhanced setParameters() methods in AbstractDataRepository to properly handle long type fields
  • Improved database type mapping and parameter binding across all database implementations

SQLite & SQLServer Updates

  • Added support for long data type in SQLite operations
  • Updated SQLServer update logic to use prepared statements with proper parameter binding
  • Improved error handling and type conversion in all repository implementations

Security Enhancements

Deserialization Protection

  • Added ObjectInputFilter to DistributedHashMap to prevent gadget-chain deserialization attacks (CWE-502)
  • Implemented allow-list of safe queue classes that can be deserialized
  • Protects against unsafe autoType features by restricting class instantiation during object deserialization

JSON Processing & Parsing

Nested Structure Protection

  • Added ParseContext class to track nesting depth for JSON parsing
  • Implements maximum nesting depth limit (default: 1000) to guard against StackOverflowError
  • Prevents both maliciously deep and accidentally malformed JSON input
  • Enhanced Builder and Builders classes to share a single ParseContext across mutually-recursive parsing operations

Code Generation

  • New PostgreSQL-specific code generator for automatic entity class generation
  • Generates proper mapping files for PostgreSQL-specific data types
  • Supports PostgreSQL-specific type conversions (timestamp, character varying, bytea, etc.)

Dependencies Updates

  • SQLite JDBC: upgraded from 3.53.2.1 to 3.53.4.0
  • PostgreSQL JDBC: added version 42.7.13
  • Maven Surefire Plugin: added version 3.2.5 for improved test execution

Testing

  • Added comprehensive unit tests for PostgreSQL functionality
  • Added tests for MySQL, SQL Server, and SQLite operations
  • New tests for PostgreSQL code generator functionality
  • Enhanced Builder and Builders tests for Unicode character handling

Documentation Updates

  • Updated all README files (English and multilingual) with PostgreSQL support documentation
  • Updated developer guide with PostgreSQL dependency information
  • Updated SKILL.md with PostgreSQL MCP server support starting from v1.7.30
  • Updated all configuration examples to reflect PostgreSQL as an available database option

Bug Fixes & Quality Improvements

  • Fixed line ending issues (CRLF/LF normalization) across multiple repository files
  • Improved Unicode character handling in JSON serialization
  • Enhanced field type mapping across different database systems
  • Better handling of NULL values in result set processing

Version Updates

  • Core framework version bumped from 1.7.29 to 1.7.30
  • Updated in multiple configuration locations: pom.xml, dispatcher scripts, and ApplicationManager

v1.7.29

Choose a tag to compare

@m0ver m0ver released this 22 Aug 14:35

Release Notes for v1.7.29

Security & Authentication

  • Enhanced JWT Configuration: Separated the symmetric secret and asymmetric public key configurations. You can now cleanly use jwt.secret for HMAC secrets (with a configurable jwt.secret.format) and jwt.key.public for RSA public keys.

Server & Network Enhancements

  • Domain Logic Decoupling: Removed hard-coded or specific domain logic from HttpServer to allow for more agnostic host processing.
  • Flexible Cookies: Removed strict domain limitations for cookie setting, providing greater flexibility when deploying across varying environments.
  • Path Processing Optimization: Simplified the processing logic for raw request paths, making routing more robust.

Examples & Documentation

  • Sample Update: Minor updates to the SampleMCPServerApplication.java reference implementation.

v1.7.28: fix(security): prevent path traversal and refine HTTP server controls

Choose a tag to compare

@m0ver m0ver released this 03 Aug 11:09
- 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

Choose a tag to compare

@m0ver m0ver released this 17 Jun 11:18
Update the version to be 1.7.27, Update DEVELOPER_GUIDE.md and SKILL.md

v1.7.26

Choose a tag to compare

@m0ver m0ver released this 12 Jun 16:25
Update application.properties to fix class not found issue, update sk…

v1.7.25

v1.7.25 Pre-release
Pre-release

Choose a tag to compare

@m0ver m0ver released this 02 Jun 11:38
Update application.properties

v1.7.24

Choose a tag to compare

@m0ver m0ver released this 23 May 11:31
Add StringEscapeTest.java to test some cases.

v1.7.23

Choose a tag to compare

@m0ver m0ver released this 10 May 15:41

Key Features

  1. 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.