Skip to content

v1.5.16-beta

Choose a tag to compare

@Uanela Uanela released this 10 Jul 08:14

Features

  • New ArkosFile type — exported from arkos, extending Express.Multer.File with optional pathname and url fields. ArkosRequest.file and ArkosRequest.files are now typed as ArkosFile / ArkosFile[] instead of the raw Multer type.
  • isProduction() helper exposed — a new exported utility that returns whether the app is running via arkos start after arkos build (checks ARKOS_BUILD env var).
  • 404 handling for missing uploaded files — the static file-serving middleware now catches ENOENT errors and throws a proper AppError (404, FileNotFound) instead of silently falling through. expressStatic.fallthrough now defaults to false.
  • Smarter OpenAPI generation for uploads:
    • File upload descriptions now clarify whether a field is a "Single file field" or "Array file field," in addition to size limits.
    • multipart/form-data is generated alone when upload fields are required; application/json is now also generated alongside it when uploads are optional.
    • Array-type binary fields no longer get an incorrect [0] suffix in flattened OpenAPI schemas.
  • Automatic type coercion in generated schemas:
    • Zod schemas generated by the CLI now use z.coerce.* for strings, numbers, booleans, dates, and bigints, so values arriving as strings (e.g. from multipart/form-data or query params) are coerced correctly.
    • class-validator DTOs now include @Transform decorators performing equivalent coercion for booleans, numbers, bigints, and dates.
  • Broader router handler typingArkosRouteMethodHandler and related types now accept both regular and error-handling middleware more flexibly (including arrays of mixed handler types).
  • UploadManager.isAllFieldRequired() — new helper to determine whether all fields in an upload config are required, used to decide whether application/json should also be offered as a request content type.

Fixes

  • Email service — SMTP auth is only set when both user and pass are provided (previously threw if either was missing); the required-config check now only requires host. The from address is now correctly formatted with a display name when config.name is set.
  • Error handlerstatusCode and status are now only preserved from the thrown error when err.isOperational is true; otherwise they're normalized to 500/"error", preventing accidental leakage of arbitrary error properties on unexpected errors.
  • Graceful shutdownSIGTERM now also exits immediately when __SKIP_LISTEN is set, in addition to the existing ARKOS_BUILD check.
  • getFileUploadRouter is no longer async — removed unnecessary await in call sites and tests.

Chores / Internal

  • Removed the unused arkos-prisma-input.bak.ts backup file.
  • Updated documentation links for the email service guide (/docs/guides/email-service).
  • Various test-suite cleanups (unused parameter renames to _, updated expectations for the new fallthrough: false default and file-not-found handler).

Breaking / Behavioral Changes for Scaffolded Projects (create-arkos)

  • The AuthPermissionAction enum has been removed from the scaffolded Prisma schema, DTOs, and Zod schemas. The action field on AuthPermission is now a plain String in the database and validated as a non-empty string (z.string().min(1) / @IsString()), rather than a fixed enum. Existing scaffolded projects relying on the enum will need to migrate manually.

Version Changes

  • arkos: 1.5.15-beta1.5.16-canary.1
  • create-arkos: 1.5.15-beta1.5.16-canary.1