Changelog

What's new in AxilJS

Release notes for every AxilJS release, with breaking changes and upgrade steps. All @axiljs/* packages share one version number.

v0.3.6

Latest
$ npm install @axiljs/runtime@0.3.6 @axiljs/stores@0.3.6

Shared state in one call

  • useStores() installs the stores behind tIdempotent, tCache, tLock and tRateLimit in one call. Any object with the matching methods works, so Redis or your own backend plugs in the same way. Docs
  • createSqlStores(fromConnection(db)) builds every SQL store with one table prefix, plus ensureSchema() and close(). Use lock: 'advisory' for PostgreSQL advisory locks. Docs
  • SqlBudgetStore keeps AI budgets from withBudget in the database, so token, cost and request limits hold across servers. Docs

Templates

  • saas-api and high-scale-api open a DATABASE_URL connection, install the SQL stores, call wireAll(), expose the Studio Intent view in development only and close everything on shutdown. Docs

Upgrade

  • Running more than one instance? The new guide explains which state is per process by default and how to share it. Docs

v0.3.5

New package

  • @axiljs/stores: SQL-backed rate limits, idempotency records, cache and locks for PostgreSQL, MySQL 8 and SQLite, so several servers share state without Redis. No dependencies. Docs

Queue and database

  • SqlQueueBackend lets several servers share one job table. Jobs are claimed with FOR UPDATE SKIP LOCKED, locks are renewed while a job runs and stale jobs return to the queue. Docs
  • Migration safety: analyzeMigration() and MigrationRunner#check() flag statements that take heavy locks or break running code, and suggest the safe alternative. safety: 'block' stops a dangerous migration. Docs

Verifying intent

  • axil verify lists the decorators you use, which ones the runtime enforces and classes that are never wired, then runs your tests with AXIL_INTENT_MODE=enforce. Docs
  • expectIdempotent, expectTenantIsolated and expectNoIntentViolations turn declared intent into tests. Docs
  • Studio Intent view: live violations, SLO status, circuit states and enforced decorators. Docs

AI governance

  • withBudget enforces token, cost and request limits per tenant before the model is called. withRedaction masks or tokenizes e-mail addresses, card numbers, API keys and more before prompts leave your server. recordingProvider and replayProvider make AI tests deterministic and offline. Docs

Fixes

  • Three regular expressions that could take super-linear time on crafted input (ORM statement classification, runtime key templates and duration parsing).

v0.3.4

Intent verification

  • Decorators that state a promise are now checked at runtime: tReadOnly blocks writes before they reach the database, tPure forbids side effects, tTenantIsolated rejects other tenants' rows, tIdempotent runs once per key and tSlo tracks latency percentiles. Modes: enforce, warn and off. Docs

Resilience decorators run

  • tCircuitBreaker, tFallback, tBulkhead, tConcurrency, tMutex, tLock, tDedupe, tHedge, the tCache family, tRateLimit, tThrottle and tDebounce now execute. The runtime enforces 26 decorators, up from 3. Docs

Durability and clusters

  • FileQueueStore keeps queued jobs on disk, so a restart loses nothing. Docs
  • ClusterStore shares rate-limit counters across cluster workers. Docs
  • emit(type, payload, { broadcast: true }) delivers events to other worker processes. Docs
  • serve(factory, { onPrimary }) installs primary-side services before workers start. Docs

Project

  • Rewritten README, CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md and a sponsor button.

v0.3.3

$ npx @axiljs/cli@latest create

Breaking changes

  • Core: server.trustProxy now defaults to false. Clients could forge X-Forwarded-For to dodge per-IP rate limits. Behind a load balancer, set trustProxy to the number of proxy hops. Docs
  • Validation: v.number() converts numeric strings to numbers, and rejects blank strings (an empty ?page= used to pass as 0). Docs
  • AI: vector scores are plain cosine similarity (−1 to 1). A threshold written for the old 0–1 scale converts as 2t − 1. Docs

New packages

  • @axiljs/runtime runs your decorators: request context withgetContext(), tRetry / tTimeout / tAudit interceptors, andtRedact / tSensitive redaction for responses and logs. Docs
  • @axiljs/scale: cluster mode with crash restart and graceful drain,axil.scaling.json, a capacity planner, a built-in load generator and a multi-process readiness scan. Docs
  • @axiljs/decorator is now published on npm. Docs

CLI and templates

  • axil create opens a template picker: ↑↓ to move, ←→ for categories, space to pick, / to search. The project name is asked for when you leave it out. Docs
  • Ten templates: minimal, REST API, SaaS API, realtime chat, live dashboard, background jobs, webhook receiver, AI assistant, microservice and high-scale API. Each one compiles under strict TypeScript and ships with passing tests. Docs
  • axil capacity checks whether your machine or deployment can carry a target load, and reports what to change. Docs
  • axil deploy sizes Kubernetes manifests from axil.scaling.json: replicas, autoscaler, pod resources, worker count, and HOST=0.0.0.0 for containers. Docs
  • New projects include @axiljs/studio, so axil run opens Studio straight away.
  • New orange AxilJS brand across the CLI, matching the logo.

ORM Studio

  • Redesigned with light and dark themes, a command palette (Ctrl K), a page address for every view, and a mobile layout. It now runs fully offline, with no CDN fonts or scripts. Docs
  • Data grid with server-side sort, search, filter chips, a row-detail drawer and clickable foreign keys. Structure and Relations tabs. Docs
  • Request builder that sends through Studio itself: no CORS errors, full response headers, copy as cURL, request history. Docs
  • Schema diagram of every table and foreign key, with pan and zoom.

Fixes

  • import of @axiljs/cloud from ES modules works (the package pointed at a file that didn't exist).
  • Core keeps the raw request body as req.rawBody, so webhook signatures can be verified.
  • Observability exposes the request span, so handlers can trace downstream calls.
  • Testing: hooks outside describe() work, and string bodies are no longer encoded twice.
  • Queue retry jitter now scales with the delay; cron helpers are exported.
  • WebSocket connections on an unknown path get a 404 instead of hanging.
  • AI: RAG thresholds filter unrelated chunks, short documents are no longer dropped, and you can use a separate embedding provider.
  • Queue, circuit, events, AI and ORM logging can be switched off with a logger / logging option.
  • Studio no longer installs a conflicting axil command.

Upgrade

  • Update every package together, since they share one version: npm install @axiljs/core@0.3.3 (and the same for each @axiljs/* package you use).
  • Behind a proxy or load balancer, set server.trustProxy.
  • If npx still shows an old CLI, run npx @axiljs/cli@latest or npm install -g @axiljs/cli@latest.
Every published version is on npm.