Enfyra Server v2.2.3
Enfyra Server v2.2.3
Breaking Changes
The file public-access field on enfyra_file changed from isPublished to isPublic. Existing databases are migrated through data/snapshot-migration.json, but dynamic scripts, API clients, GraphQL selections, file upload/update payloads, and integrations that read or write enfyra_file.isPublished must migrate to enfyra_file.isPublic.
The server now requires Node 24.x for install, build, start, dev, and test commands. package.json, .node-version, .nvmrc, and scripts/check-node-version.js enforce the runtime so environments on older or newer Node majors must switch to Node 24 before running Enfyra Server.
POST /auth/token/exchange now returns short-lived access JWTs capped at 60 seconds or the API token expiration, whichever is earlier. Clients that treated exchanged JWTs as long-lived credentials must re-exchange the API token when the access JWT expires.
Features
- Added process-local user and role caching in
src/shared/utils/load-user-with-role.util.ts, reducing repeated database/cache reads across HTTP, GraphQL, WebSocket, OAuth, and private file access paths. - Added overlap-aware metadata migration in
src/engines/bootstrap/services/metadata-migration.service.tsandsrc/engines/bootstrap/utils/metadata-physical-migration.util.ts, allowing legacy and canonical system rows to merge while preserving custom fields. - Added static admin route metadata to
data/data-migration.jsonfor reload, script validation, test run, flow trigger, and Redis admin endpoints so upgraded databases receive the same built-in route definitions. - Added Node and Yarn runtime metadata in
package.json,.node-version,.nvmrc, and.yarnrc.ymlto align local, CI, and production execution.
Operational Flow
Before: API token exchange could issue an access JWT whose expiration followed the API token itself. After: each exchange returns a short-lived access JWT, so API-token clients keep the long-lived token private and request fresh access credentials as needed.
Before: user and role snapshots were repeatedly loaded through shared cache paths during authenticated request handling. After: each server process keeps a short local snapshot and invalidates it through the existing revocation flow.
Before: metadata migration stopped or risked losing custom values when legacy and canonical system tables or collections both existed. After: migration reconciles overlapping rows, backfills legacy-only fields, and keeps canonical records as the active target.
Before: existing databases could miss metadata for built-in admin endpoints such as /admin/script/validate or /admin/test/run. After: data/data-migration.json seeds those route records during upgrade.
Bug Fixes
- Fixed
src/http/middlewares/dynamic-interceptor.middleware.tsso dynamic success post-hooks no longer run on error responses from built-in routes. - Fixed
src/modules/me/services/me.service.tsto use secure repository access for/meand OAuth account reads, applying field-permission scoping to self-service profile responses. - Fixed file route and file-management payload handling in
src/http/routes/file.routes.tsandsrc/modules/file-management/services/file-management.service.tsto use theisPublicfield consistently. - Improved metadata migration test coverage in
test/domain/metadata-migration.service.spec.ts,test/domain/metadata-migration.real-db.spec.ts, andtest/domain/metadata-physical-migration.util.spec.tsfor overlapping SQL and MongoDB upgrade cases.