Skip to content

0.3.3

Choose a tag to compare

@3m1n3nc3 3m1n3nc3 released this 04 May 15:03
· 388 commits to main since this release

What's Changed

Authentication and HTTP Foundation

  • Added new @arkstack/auth package with:
    • Auth service for user authentication, JWT/session handling, logout, and token authorization.
    • CurrentSession and SessionDevice helpers.
    • User and PersonalAccessToken contracts.
    • AuthenticationException.
  • Added new @arkstack/http package with framework-neutral Request and Response wrappers.
  • Added auth middleware to framework drivers:
    • @arkstack/driver-express/middlewares
    • @arkstack/driver-h3/middlewares
  • Added Express and H3 app-template User and PersonalAccessToken models.
  • Updated Express and H3 personal access token migrations with device_info.

Common Package Improvements

  • Replaced error-handling.ts with a class-based ErrorHandler.
  • Added common exception classes:
    • Exception
    • AppException
    • RequestException
  • Added shared hashing and encryption utilities.
  • Added typed getModel() helper with support for abstract constructors and app model registries.
  • Exported the new common helpers and exceptions from @arkstack/common.

Driver and Runtime Updates

  • Added framework-specific rate limit exceptions for Express and H3 drivers.
  • Updated Express and H3 error handlers to use the new shared error handling flow.
  • Removed duplicated app-template error utilities from Express and H3 kits.
  • Updated router behavior in the Express template.

Console and Scaffolding

  • Added migrate:fresh command support to console packages.
  • Updated lean scaffold generation to remove Arkorm/database model files more completely.
  • Updated scaffold dependency versions to 0.3.13.
  • Improved lean profile tests around model/database cleanup.

CI and Release Workflow

  • Switched CI, docs deploy, and publish workflows to pnpm install --frozen-lockfile.
  • Updated CI package build flow to build workspace packages and refresh lockfile state before app builds.
  • Renamed CI migration step from Prisma to Arkorm database migrations.
  • Updated package metadata and lockfile for the new packages and dependencies.

Tests

  • Added DB-backed auth tests using real jose tokens.
  • Added package-level tests for:
    • @arkstack/http
    • @arkstack/auth
    • Express auth middleware
    • H3 auth middleware
  • Added app-template integration tests:
    • Express via supertest
    • H3 via app.fetch(new Request(...))
  • Added teardown for auth test records so created users and personal access tokens are cleaned up after tests.

Full Changelog

0.2.2...0.3.3