Run all preflight checks and return the results.
Preflight input with target directory, config, and emitter.
Result with pass/fail status, diagnostics, and detected OS.
Run the full diagnostic suite for mj doctor.
Performs all preflight checks plus additional doctor-only checks:
.env, mj.config.cjs)mj_generatedentities)Unlike Run, this method does not fail on hard errors — all results are returned as diagnostics for the health report.
Target install directory to diagnose.
Partial config with database host/port for connectivity check.
Event emitter for diagnostic events.
Aggregated diagnostics from all checks.
Phase A — Preflight checks that validate the install environment.
Runs all prerequisite checks and collects results into a Diagnostics object. Hard failures (Node version, npm, disk space, SQL, write perms) prevent the install from proceeding. Warnings (port conflicts, Node recommendation) are informational.
Example