A Node.js library wrapping the official MongoDB driver to provide simplified CRUD operations (find, insert, update, delete) designed for use with N3xGen components and OIH (Open Integration Hub) flows. Version 1.3.3 uses the MongoDB Node.js driver (v3.x) and the util-nxg-cg library for logging and validation. It only supports callback-based usage and lacks native Promise or async/await support. The library is not actively maintained; last updated in 2022, with limited documentation and no TypeScript definitions.
npm install mongodb-cg-libNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates using mongoProcess with callback to perform a find operation.
Replace with 'mongodb' driver and use native async/await.
Wrap in a Promise: await new Promise((resolve, reject) => mongoProcess(config, (err, res) => err ? reject(err) : resolve(res))).
Set options to empty object if not needed, and test each operation thoroughly.
Change to: const { mongoProcess } = require('mongodb-cg-lib'); or import { mongoProcess } from 'mongodb-cg-lib';Ensure config contains 'uri', 'dbName', 'collection', 'operation', and 'query' where needed.