Skip to content

v0.7.12

Choose a tag to compare

@github-actions github-actions released this 02 Oct 09:24
· 38 commits to main since this release

ExisJS Release v0.7.12

Release Date: 2026-10-02
Type: Database Lifecycle Alignment & Documentation Synchronization
Affected Packages: exisjs, create-exisjs


Highlights

  • Automatic Database Boot Connection (DatabaseManager.connectAll):
    • Registered databases (registerDatabase) are now automatically connected during the application bootstrap sequence across app.create(), defineApp().boot(), start-server (before listening), and testing environments (createTestApp).
    • Implemented internal connection deduplication (_connected tracking) so multiple boot triggers never invoke connect() redundantly.
  • Dual Callback Support for Database Health Checks (isHealthy & healthCheck):
    • DatabaseRegistration now formally supports both isHealthy and healthCheck callback property names.
    • DatabaseManager.checkHealth() dynamically evaluates whichever callback is provided (db.isHealthy || db.healthCheck), ensuring 100% backward compatibility and exact alignment with documentation.
  • Documentation & Type Synchronization:
    • Updated API reference (docs/reference/database.mdx) with exact type definitions and return structures for DatabaseRegistration and DatabaseManager.checkHealth().
  • New exis run (alias exis exec) CLI Command:
    • Automatically loads .env, .env.local, and mode files before running any TypeScript script or external tool (e.g. exis run drizzle-kit push, exis run scripts/seed.ts).
    • Seamlessly bridges third-party database tools, migration CLIs, and standalone worker scripts into the ExisJS environment configuration.
  • exisjs routes CLI Subprocess Module Resolution:
    • exisjs routes now executes app inspection via a TypeScript-aware subprocess with tsx runner and path alias resolution (@/*), resolving module loader errors on Windows (file:///... import failures) without needing prior compilation.
  • Production Manifest Dedicated src/cron/ Bundling:
    • generateManifest in manifest.ts now prioritizes the compiled outDir directory in production builds, eliminating duplicate source file references and resolving BUILD_VALIDATION_FAILED errors on projects with dedicated src/cron/* tasks.
  • Standardized Cron Job Mounting Logs:
    • Replaced verbose multiline cron mounting logs with clean, single-line structured outputs including job name, schedule expression, and relative file path (Mounted cron "<jobName>" (<schedule>) -> <relFile>).
  • Dev Watcher Hot-Reload Scoping & Runtime Artifact Exclusion (exis dev):
    • Enforced strict executable file extension filtering (.ts, .tsx, .js, .jsx, .mjs, .cjs, .env*, config JSONs) in the development watcher, preventing accidental restarts on non-source edits.
    • Automatically excluded runtime data and output directories (downloads/, storage/, uploads/, tmp/, temp/, logs/, data/, fixtures/, reports/, artifacts/, public/) and data file extensions (.csv, .xlsx, .pdf, .log, .sqlite, .db, .png, .jpg, .svg, .md, .txt, etc.).
    • Added first-class watch config options in exis.config.ts (paths, ignore, extensions, debounceMs).
  • Starter Scaffolding tsconfig.json Expansion:
    • Expanded tsconfigTemplate in create-exisjs to include "types": ["node"] and include root '*.config.ts', '*.config.js', and '*.ts' patterns, preventing TS2580: Cannot find name 'process' in standalone tools like drizzle.config.ts.
  • Scaffolding Dependency Updates:
    • Bumped starter template dependencies in create-exisjs to exisjs: '^0.7.12'.

Key Improvements & Details

1. Database Registration with healthCheck or isHealthy

import { exis } from 'exisjs'
import { registerDatabase } from 'exisjs/database'
import { PrismaClient } from '@prisma/client'

const prisma = new PrismaClient()

export default exis({
  async onStart(app) {
    // Both healthCheck and isHealthy are supported
    registerDatabase(app, {
      name: 'prisma-postgres',
      connect: async () => {
        await prisma.$connect()
      },
      disconnect: async () => {
        await prisma.$disconnect()
      },
      healthCheck: async () => {
        await prisma.$queryRaw`SELECT 1`
        return true
      },
    })
  },
})

Full Changelog: v0.7.11...v0.7.12