UNPKG

next-mongo-connector

Version:

A modern, secure MongoDB connector for serverless Next.js apps — built with enterprise-grade security, smart caching, pooling, graceful shutdown handling, and full TypeScript support. Maximum security against hijacking and hacking attempts.

28 lines (26 loc) 961 B
// src/empty-module.ts var sign = () => { }; var createCredentials = () => ({}); var initializeClient = () => Promise.resolve(); var processAuth = () => Promise.resolve(); var serialize = (obj) => JSON.stringify(obj); var deserialize = (str) => JSON.parse(str); var compress = (data) => data; var uncompress = (data) => data; var prepareString = (str) => str; var autoEncryption = { createKey: () => Buffer.from([]), encrypt: (data) => data, decrypt: (data) => data }; var fromEnv = () => ({}); var fromInstance = () => ({}); var fromTemporaryCredentials = () => ({}); var createClient = () => ({ connect: () => Promise.resolve(), disconnect: () => Promise.resolve(), get: () => Promise.resolve(null), set: () => Promise.resolve(null) }); export { autoEncryption, compress, createClient, createCredentials, deserialize, fromEnv, fromInstance, fromTemporaryCredentials, initializeClient, prepareString, processAuth, serialize, sign, uncompress };