Member Junction
    Preparing search index...

    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.

    const preflight = new PreflightPhase();
    const result = await preflight.Run({
    TargetDir: '/path/to/install',
    Config: { DatabaseHost: 'localhost', DatabasePort: 1433 },
    SkipDB: false,
    Emitter: emitter,
    });
    if (!result.Passed) {
    console.error('Preflight failed:', result.Diagnostics.Failures);
    }
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Run the full diagnostic suite for mj doctor.

      Performs all preflight checks plus additional doctor-only checks:

      • Config file presence (.env, mj.config.cjs)
      • CodeGen artifact existence (mj_generatedentities)

      Unlike Run, this method does not fail on hard errors — all results are returned as diagnostics for the health report.

      Parameters

      • targetDir: string

        Target install directory to diagnose.

      • config: PartialInstallConfig

        Partial config with database host/port for connectivity check.

      • emitter: InstallerEventEmitter

        Event emitter for diagnostic events.

      Returns Promise<Diagnostics>

      Aggregated diagnostics from all checks.