Skip to content

v1.6.2-beta

Choose a tag to compare

@Uanela Uanela released this 27 May 19:28
· 95 commits to main since this release

Summary

This release focuses on improving developer experience, fixing critical bugs, enhancing OpenAPI support, and refining configuration APIs.

Breaking Changes

None.

New Features

OpenAPI Options Propagation

OpenAPI metadata (tags, security, servers, externalDocs) now properly propagates through nested routers. Router-level options are inherited by child routes unless explicitly overridden at the route level.

Enhanced Pagination Metadata

The findMany operation now returns additional pagination fields:

· page - current page number
· pages - total number of pages
· limit - items per page
· hasNextPage - boolean indicating if next page exists
· hasPrevPage - boolean indicating if previous page exists

File Upload Route Disable

Added enabled option to disable built-in file upload routes:

fileUpload: {
  enabled: false
}

Request Logging Timestamp in Production

Production request logs now include full date and time (YYYY-MM-DD HH:MM:SS) instead of just time.

Cookie Configuration Enhancements

JWT cookie now supports domain and expires options for better cross-domain and session control.

Improvements

CORS Configuration Simplified

CORS configuration now accepts cors.CorsOptions directly. The deprecated allowedOrigins, options, and customHandler shapes still work but will show deprecation warnings with migration guidance.

· Development default: origin: true, credentials: true
· Production default: origin: "*", credentials: false

Sort Parameter Merging

req.query.orderBy is now properly merged with sort parameter in APIFeatures.

Build Process Robustness

TypeScript configuration files with comments are now parsed correctly, preventing build crashes.

CLI Detection

Applications now throw clear errors if started without the Arkos CLI, ensuring proper CLI usage.

Bug Fixes

· Foreign key constraint violation error code changed from 400 to 409 (Conflict)
· Fixed BaseService.prisma getter to properly initialize Prisma instance
· Improved TypeScript config parsing when files contain errors
· Fixed cookieParser configuration to properly accept secret and options

Documentation

· Added blog post: "Rethinking CORS Defaults in Arkos.js"
· Added dynamic meta tags for blog and documentation pages (title, description, Open Graph)

Chores

· Code structure improvements
· Test suite updates and fixes
· Sandbox environment updates