A MongoDB instance model used internally by MongoDB Compass to represent database instances with properties like host, port, topology, and replica set state. Version 12.49.0 is current, with frequent releases tied to Compass. It is a core abstraction within the Compass data layer but not intended for standalone use. Differentiates as a stateful model with change events, built on top of the MongoDB Node.js driver's topology monitoring.
npm install mongodb-instance-modelNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates an InstanceModel from a connected MongoClient's topology, listens for changes, and fetches instance data.
Use `client.topology` after connecting the MongoClient.
Refer to the changelog for event name changes.
Upgrade to Node.js 14 or later.
Use `import InstanceModel from 'mongodb-instance-model'` (no braces).
Pass `client.topology` after calling `client.connect()`.
Update @types/mongodb to version >=4.0.0 or cast `(client as any).topology`.