Member Junction
    Preparing search index...

    Core orchestrator for MemberJunction installs.

    Headless and event-driven — never writes to stdout. Frontends subscribe to typed events via InstallerEngine.On to render progress, handle prompts, and display diagnostics. Supports checkpoint/resume for long-running installs.

    const engine = new InstallerEngine();

    // Subscribe to events
    engine.On('phase:start', (e) => console.log(`Phase: ${e.Phase}`));
    engine.On('step:progress', (e) => console.log(` ${e.Message}`));
    engine.On('error', (e) => console.error(e.Error.message));

    // Create and execute a plan
    const plan = await engine.CreatePlan({ Dir: '/app', Tag: 'v5.1.0' });
    const result = await engine.Run(plan, { Verbose: true, Yes: true });
    Index

    Constructors

    Methods

    • Run diagnostics on an existing or target install directory.

      Performs preflight checks (Node version, disk space, SQL connectivity, etc.) and known-issue detection. Does not modify any files. Results are returned as a Diagnostics object and also emitted as diagnostic events.

      Parameters

      • targetDir: string

        Absolute path to the directory to diagnose.

      • Optionaloptions: DoctorOptions

        Optional doctor options (currently reserved for future use).

      Returns Promise<Diagnostics>

      Diagnostics with environment info, check results, and last install info.

    • List available MemberJunction release versions from GitHub.

      Fetches releases from the MemberJunction GitHub repository using the unauthenticated REST API (60 requests/hour rate limit).

      Parameters

      • includePrerelease: boolean = false

        Whether to include pre-release tags (default: false).

      Returns Promise<VersionInfo[]>

      Array of available versions sorted by publish date (newest first).

    • Resume a previously interrupted install from a checkpoint state file.

      Loads the .mj-install-state.json from the given directory, reconstructs a plan from the saved tag, and calls Run with resume enabled.

      Parameters

      • stateFileDir: string

        Directory containing the .mj-install-state.json file.

      • Optionaloptions: RunOptions

        Runtime options forwarded to Run.

      Returns Promise<InstallResult>

      Install result from the resumed execution.

      With code NO_STATE_FILE if no checkpoint exists.

    • Execute an install plan, emitting events throughout.

      Iterates through plan phases in order. Supports checkpoint/resume — if a previous install left a .mj-install-state.json, completed phases are skipped automatically. Pass NoResume: true in options to force a fresh start.

      Stops on the first phase failure and returns partial results. The state file is updated after each phase, so re-running resumes from the failed phase.

      Parameters

      Returns Promise<InstallResult>

      Install result with success status, duration, warnings, and phase lists.