Skip to content

Enfyra Server v2.0.6

Choose a tag to compare

@dothinh115 dothinh115 released this 22 Apr 23:26

v2.0.6

Bug Fixes

  • Fixed KnexHookManagerService unique-constraint displacement crashing with NOT NULL violation on composite uniques (e.g. route_handler_definition unique ["route","method"]). The hook now iterates per-unique instead of per-relation, matches on all FK columns of the composite key, and skips displacement when any FK is NOT NULL — letting the DB enforce the constraint naturally.

  • Migrated jwtAuthMiddleware from jsonwebtoken to jose for JWT verification. Token-expired detection now uses ERR_JWT_EXPIRED instead of TokenExpiredError.

Features

  • Added DebugTrace utility (src/shared/utils/debug-trace.util.ts) for opt-in per-request performance tracing. Append ?debugMode=true to any dynamic route request to receive a debug object in the response with middleware timing, query planner output, SQL, EXPLAIN, and db_execute duration breakdown.

  • Added executeSimple fast path in SqlQueryExecutor for queries with no joins, no relation filters/sorts, no deep fetches, no table relations, and explicit field selection. Bypasses the full CTE/left-join pipeline for lower latency on simple lookups.

  • Added $debug to TDynamicContext, propagated through route-detect.middleware and QueryBuilderService into both SQL and Mongo query engines.

Removed

  • Removed stale inverse relation handlers on method_definition via data-migration.json (leftover from pre-v1.7.8 inverse relation refactor).