MongoDB adapter for inSite framework (v2.4.0) — provides connection management, collection lifecycle (create/ensure), Change Streams with listener API, JSON Schema validation, and index creation. Requires Node >=20 and mongodb driver v6+. Differentiators: integrates with inSite ecosystem, auto-replaces localhost with 127.0.0.1, supports masking sensitive fields in logs. Released under MIT.
npm install insite-dbNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to MongoDB, ensures a 'users' collection with schema and unique index on email.
Use '127.0.0.1' directly in URL to avoid unexpected rewrites.
Use ES module imports: import { connect } from 'insite-db'.Set watch: true (or omit) for enhanced collection with change stream listeners.
Set LOGS_MASK_SENSITIVE, LOGS_MASK_PII, LOGS_MASK_SKIP environment variables to mask fields.
Run: npm install insite-db
Change to: import { connect } from 'insite-db'Remove deprecated options; insite-db uses modern driver defaults.