Skip to content

Releases: enfyra/server

Enfyra Server v1.4.0

06 Feb 11:51
bae97fd

Choose a tag to compare

enfyra-server v1.4.0

Added

  • WebSocket Module: Dynamic WebSocket Gateway support with Socket.IO
    • Dynamic namespace registration per gateway path
    • Authentication support via JWT token
    • Connection and event handler queues with BullMQ
    • Redis-based cache synchronization for multi-instance deployments
    • Real-time message broadcasting to users, rooms, and namespaces

WebSocket Features

  • Dynamic Gateway Factory: Create and manage WebSocket gateways dynamically
  • Event Handlers: Register custom event handlers via scripts
  • Connection Handlers: Execute custom logic on client connection
  • Permission System: Fine-grained access control per gateway/event
  • Multi-Instance Support: Redis pub/sync for cache coordination

Technical Details

  • Socket.IO as the WebSocket library
  • BullMQ for event queue processing
  • Redis for distributed cache and pub/sub
  • Dynamic Namespace: /ws/{gateway-path}

Database Tables

  • websocket_definition - Gateway configurations
  • websocket_event_definition - Event handlers per gateway

Enfyra Server v1.3.4

13 Jan 04:45
4400f52

Choose a tag to compare

Release v1.3.4

Changes

Admin Account Configuration

  • Move admin account configuration from init.json to environment variables
  • Add ADMIN_EMAIL and ADMIN_PASSWORD to .env and env_example
  • Admin account is now automatically created on first init from env variables
  • Remove hardcoded admin credentials from source code

Enfyra Server v1.3.3

05 Jan 08:42
e041b10

Choose a tag to compare

Release v1.3.3

What's Changed

  • Terminology Update: Changed package type terminology from 'Backend' to 'Server' for consistency
  • Package Management Enhancement: Improved package management service and controller handling logic

Enfyra Server v1.3.2

27 Dec 06:55
d539c64

Choose a tag to compare

Release v1.3.2

Fixed

  • Fixed CTE pattern for PostgreSQL and MySQL when querying with nested relations
  • Fixed type mismatch between json and jsonb in CTE aggregation queries
  • Fixed MySQL raw query result parsing (returning object instead of array)
  • Fixed jsonb_agg with COALESCE in CTE definitions for PostgreSQL
  • Improved empty array default handling for JSON aggregation functions

Technical Changes

  • Updated nested-subquery-builder.ts to use '[]'::jsonb instead of '[]'::json for PostgreSQL CTEs
  • Improved MySQL raw query result parsing logic to handle multiple formats
  • Ensured type consistency between CTE definitions and SELECT clauses

Enfyra Server v1.3.1

25 Dec 16:24
5395054

Choose a tag to compare

Release v1.3.1

Hook System Improvements

Global Hooks

  • Added isGlobal field to hook definitions for explicit global hook configuration
  • Global hooks now use isGlobal: true instead of checking route null
  • Updated default response hook to include all CRUD methods (GET, POST, PATCH, DELETE)

Method Matching

  • Removed default "all methods" behavior - hooks now only run for explicitly specified methods
  • Each hook must specify which methods it applies to

Query Builder Enhancements

Field Handling

  • Fields that don't exist are now silently skipped instead of causing errors
  • Improved error handling for invalid field references

Relation Filtering

  • Added support for filtering relations directly using ID operators:
    • parent._is_null / parent._is_not_null - Check if relation exists
    • parent._eq / parent._neq - Compare relation ID
    • parent._in / parent._not_in - Match relation IDs in array
  • Both direct filtering (parent._eq: 3) and explicit ID filtering (parent.id._eq: 3) are supported
  • Works for both SQL and MongoDB databases

Enfyra Server v1.3.0

23 Dec 19:41
a5b48f7

Choose a tag to compare

Release v1.3.0

Breaking Changes

Hook System Refactor

  • Refactored hook definition structure: Split hook_definition table into two separate tables:
    • pre_hook_definition: Hooks that execute before route handlers
    • post_hook_definition: Hooks that execute after route handlers
  • Both tables now use a unified code field (type: code) instead of separate preHook and afterHook fields
  • Both tables maintain relationship with route_definition via inverse properties preHook and postHook
  • Updated all hook execution logic in middleware and interceptors to use the new structure

Changes

  • Removed test files from the repository
  • Removed "Handlers" and "Hooks" menu items from default configuration (now managed in Routings)

Migration Notes

Existing hook definitions need to be migrated:

  • Pre-hooks: Move preHook code to pre_hook_definition.code
  • Post-hooks: Move afterHook code to post_hook_definition.code
  • Update timeout fields: preHookTimeouttimeout (in pre_hook_definition), afterHookTimeouttimeout (in post_hook_definition)

Enfyra Server v1.2.7

20 Dec 05:43
42d2abe

Choose a tag to compare

Release v1.2.7

Database Configuration & Replication

URI-Based Configuration

  • Standardized database configuration to use URI format (Prisma style) for all database types
  • Supports MySQL, PostgreSQL, and MongoDB with consistent DB_URI format
  • Backward compatible with legacy separate environment variables
  • URL encoding support for passwords with special characters

SQL Replication Support

  • Master-replica replication with automatic read/write routing
  • Read queries automatically route to replicas using round-robin
  • Write queries (INSERT, UPDATE, DELETE) always use master
  • Transactions always use master for consistency
  • Connection pool automatically distributed between master and replicas based on configured ratio

Features

  • Health checks for replica nodes with automatic failover
  • DB_READ_FROM_MASTER option to include master in round-robin pool for reads
  • Automatic pool distribution: master gets 60% by default, remaining 40% divided among replicas
  • Configurable pool distribution ratio via DB_POOL_MASTER_RATIO

Configuration

  • DB_URI: Master/write connection URI
  • DB_REPLICA_URIS: Comma-separated replica URIs for read operations
  • DB_READ_FROM_MASTER: Include master in read pool (default: false)
  • DB_POOL_MASTER_RATIO: Pool distribution ratio (default: 0.6)

Enfyra Server v1.2.6

17 Dec 08:42
892dd42

Choose a tag to compare

Release v1.2.6 – Text Search & JSON Handling

  • Text search optimization (MySQL-first)

    • Added generated search columns and indexes to support efficient _contains, _starts_with, _ends_with on text fields.
    • Kept query semantics compatible with existing LIKE-based Vietnamese search (using unaccent).
  • Standardized simple-json storage

    • Simplified type system: removed json as a schema type, kept only simple-json.
    • Mapped simple-json to TEXT/LONGTEXT in SQL; stringify/parse handled via centralized hooks.
    • Updated type-mapping helpers so anysimple-json and DB json/jsonb → TS string.
  • Column/Relation metadata improvements

    • Added metadata field to column definitions and wired it through DTOs, table-creation/update flows, and snapshot schema.
    • Ensured metadata, options, and default values for metadata tables are consistently JSON.stringify/JSON.parsed.
  • Migration and MySQL compatibility fixes

    • Fixed ALTER TABLE ... DROP COLUMN IF EXISTS for MySQL (now uses a compatible variant).
    • Cleaned up JSON-related DDL generation and column operations to always align with the new simple-json TEXT strategy.

Enfyra Server v1.2.5

14 Dec 02:03
21acd9b

Choose a tag to compare

Release Notes - v1.2.5

🎉 Overview

This release focuses on improving MongoDB support, fixing file upload consistency, and enhancing image processing capabilities.

✨ New Features

MongoDB Support Enhancements

  • ObjectId Normalization: MongoDB ObjectId fields are now automatically converted to strings in query results, ensuring consistent API responses
  • Assets Endpoint MongoDB Support: Assets endpoint now fully supports MongoDB, correctly handling storage config lookups and file retrieval
  • Improved Type Conversion: Enhanced foreign key field handling for MongoDB, automatically converting string IDs to ObjectId when needed

🐛 Bug Fixes

MongoDB Query Builder

  • Filter Builder Improvements: Fixed id to _id conversion logic to properly check database type before conversion
  • Relation Filter Null Handling: Fixed issue where MongoDB aggregation pipelines incorrectly filtered out documents with null relations when explicitly querying for null values
  • Operator Consistency: Aligned MongoDB filter operators with SQL implementation (_contains, _starts_with, _ends_with instead of like)
  • Type Converter: Improved handling of foreign key fields ending with Id to correctly convert to ObjectId for MongoDB

File Management

  • Saga Pattern Implementation: Implemented Saga pattern for file uploads to ensure data consistency. If database save fails, the uploaded file is automatically deleted from cloud storage
  • Storage Config Cache: Fixed MongoDB ObjectId handling in storage config cache service
  • File Upload DTO: Updated to accept both number (SQL) and string (MongoDB ObjectId) for folder and storageConfig fields

Image Processing

  • AVIF Quality Handling: Fixed issue where AVIF format would fail when quality parameter is provided. AVIF now ignores quality parameter and only converts format
  • Error Handling: Improved error logging for image processing failures

Database Schema

  • MongoDB Schema Migration: Fixed bigint to long BSON type conversion for fields like filesize
  • Type Mapping: Enhanced type mapping in schema migration to include more column types (varchar, char, richtext, smallint, tinyint, double, numeric, real, simple-json, enum)

🔧 Technical Improvements

Code Quality

  • Database Type Handling: Refactored to pass dbType as a separate parameter instead of embedding it in metadata, keeping metadata clean and database-agnostic
  • Error Messages: Enhanced MongoDB validation error messages to include detailed schema rule violations
  • Type Safety: Improved TypeScript type handling for MongoDB ObjectId conversions

Breaking Changes

None

Migration Notes

No migration required. All changes are backward compatible.

Dependencies

No new dependencies added.

Acknowledgments

Thanks to all contributors and testers who helped identify and fix issues in this release.

Enfyra Server v1.2.4

13 Dec 14:44
e853193

Choose a tag to compare

Release Notes v1.2.4

🚀 New Features

Schema Migration

  • Enhanced schema migration lock service with database type handling (PostgreSQL/MySQL)
  • Added onDelete column support to relation_definition table

AI Agent Improvements

  • Added batching rules for CRUD operations (100 records per batch)
  • Improved conversation handling with conversation ID in system prompts
  • Enhanced error handling in batch dynamic repository operations
  • Added confirmation requirements for destructive operations

🔧 Improvements

  • Refactored AI agent utilities and tool definitions
  • Improved system prompt builder and conversation summary service
  • Enhanced LLM service with better provider handling
  • Updated table creation workflow and tool selection helpers

🗑️ Removed

  • Removed DeepSeek LLM provider support
  • Removed CONTRIBUTING.md

📝 Documentation

  • Updated hints for CRUD write operations with batching guidelines
  • Improved error handling documentation in AI agent prompts