openmixer — generated API reference
    Preparing search index...

    Class NetworkSettingsStore

    Loads + saves the persisted NetworkOverrides JSON file at a fixed path — the JsonSettingsStore discipline over the override shape. loadSync serves the /net/overrides row's station, whose peek is pure and synchronous by the station contract (StateStation.peek).

    Hierarchy

    Index
    • get path(): string

      The file this store persists to (surfaced in logs / the Setup panel).

      Returns string

    • The document a save writes — validated / normalised, so junk never lands on disk.

      Parameters

      • settings: { host?: string; port?: number }
        • Optionalhost?: string

          Web bind address.

        • Optionalport?: number

          Web (HTTP) port. 0 = ephemeral (tests).

      Returns unknown

    • The value a missing, unreadable or malformed file degrades to.

      Returns { host?: string; port?: number }

      • Optionalhost?: string

        Web bind address.

      • Optionalport?: number

        Web (HTTP) port. 0 = ephemeral (tests).

    • Read the persisted settings; the default on ENOENT or any parse error.

      Returns Promise<{ host?: string; port?: number }>

    • The same read, synchronously — for a row station whose peek is pure and synchronous by the station contract (StateStation.peek). Same degradation law as load.

      Returns { host?: string; port?: number }

      • Optionalhost?: string

        Web bind address.

      • Optionalport?: number

        Web (HTTP) port. 0 = ephemeral (tests).

    • Keep only the fields of an untrusted blob that validate individually.

      Parameters

      • blob: unknown

      Returns { host?: string; port?: number }

      • Optionalhost?: string

        Web bind address.

      • Optionalport?: number

        Web (HTTP) port. 0 = ephemeral (tests).

    • Persist the settings atomically (temp + rename), creating the parent dir on demand.

      Parameters

      • settings: { host?: string; port?: number }
        • Optionalhost?: string

          Web bind address.

        • Optionalport?: number

          Web (HTTP) port. 0 = ephemeral (tests).

      Returns Promise<void>