Thin MongoDB ODM built for Standard Schema
mongodb zod deno

feat: Implement initial version of mizzleORM

This commit introduces the initial implementation of mizzleORM, a lightweight, fully type-safe MongoDB ORM in TypeScript, inspired by Drizzle ORM.

Key changes include:

- Added core files: `.gitignore`, `.npmignore`, `package.json`, `README.md`, `tsconfig.json`.
- Implemented schema definition with Zod in `src/schema.ts` and `src/schema.js`, including `defineModel`, `InferModel`, and `InsertType` utilities.
- Created `MongoModel` class in `src/model.ts` and `src/model.js` for performing CRUD operations on MongoDB collections with Zod schema validation.
- Implemented MongoDB connection management in `src/client.ts` and `src/client.js` with `connect`, `disconnect`, and `getDb` functions.
- Added an example usage in `examples/user.ts` and `examples/user.js` demonstrating basic CRUD operations.
- Added tests in `tests/user.test.ts` and `tests/user.test.js` to verify the functionality of the ORM.
- Exported key functionalities in `src/index.ts` and `src/index.js`.

This initial version provides a foundation for type-safe MongoDB interactions with schema validation and a simple API.

dev-shahed c000d89a

.DS_Store

This is a binary file and will not be displayed.

+1
.gitignore
···
+
node_modules/
+1
.npmignore
···
+
node_modules/
+131
README.md
···
+
# mizzleORM
+
+
A lightweight, fully type-safe MongoDB ORM in TypeScript, inspired by Drizzle ORM.
+
+
## Features
+
+
* **Schema-first:** Define and validate document schemas using Zod.
+
* **Type-safe queries:** Auto-complete and type-safe insert/find/update/delete operations.
+
* **Lightweight & modular:** No decorators, no runtime magic – everything is composable and transparent.
+
* **Developer-first DX:** Simple, minimal API with great IDE support.
+
* Works directly on top of MongoDB's native driver.
+
+
## Installation
+
+
```bash
+
npm install mizzleorm mongodb zod
+
# or
+
yarn add mizzleorm mongodb zod
+
```
+
+
## Usage
+
+
### 1. Define your schema
+
+
```typescript
+
// src/schemas/user.ts
+
import { z } from 'zod';
+
import { defineModel } from 'mizzleorm';
+
+
export const userSchema = defineModel(z.object({
+
name: z.string(),
+
email: z.string().email(),
+
age: z.number().int().positive().optional(),
+
createdAt: z.date().default(() => new Date()),
+
}));
+
+
export type User = z.infer<typeof userSchema>;
+
```
+
+
### 2. Connect to MongoDB and create a model
+
+
```typescript
+
// src/index.ts or your main application file
+
import { connect, MongoModel, InferModel, InsertType } from 'mizzleorm';
+
import { userSchema } from './schemas/user'; // Assuming you saved the schema above
+
import { ObjectId } from 'mongodb';
+
+
// Infer types
+
type User = InferModel<typeof userSchema>;
+
type UserInsert = InsertType<typeof userSchema>;
+
+
async function main() {
+
await connect('mongodb://localhost:27017', 'your_database_name');
+
const UserModel = new MongoModel('users', userSchema);
+
+
// ... perform operations
+
+
await disconnect();
+
}
+
+
main().catch(console.error);
+
```
+
+
### 3. Perform operations
+
+
```typescript
+
// Insert a document
+
const newUser: UserInsert = {
+
name: 'John Doe',
+
email: 'john.doe@example.com',
+
age: 30,
+
};
+
const insertResult = await UserModel.insertOne(newUser);
+
console.log('Inserted user:', insertResult.insertedId);
+
+
// Find documents
+
const users = await UserModel.find({ name: 'John Doe' });
+
console.log('Found users:', users);
+
+
// Find one document
+
const foundUser = await UserModel.findOne({ _id: new ObjectId(insertResult.insertedId) });
+
console.log('Found one user:', foundUser);
+
+
// Update a document
+
const updateResult = await UserModel.update(
+
{ _id: new ObjectId(insertResult.insertedId) },
+
{ age: 31 }
+
);
+
console.log('Updated user count:', updateResult.modifiedCount);
+
+
// Delete documents
+
const deleteResult = await UserModel.delete({ name: 'John Doe' });
+
console.log('Deleted user count:', deleteResult.deletedCount);
+
```
+
+
## Project Structure
+
+
```
+
mongo-orm/
+
├── src/
+
│ ├── schema.ts # schema definition utility
+
│ ├── model.ts # MongoModel wrapper
+
│ ├── client.ts # MongoDB connection
+
│ ├── index.ts # public API export
+
├── examples/
+
│ └── user.ts # usage example
+
├── tests/
+
├── package.json
+
├── tsconfig.json
+
├── README.md
+
```
+
+
## Development
+
+
To build the project:
+
+
```bash
+
npm run build
+
```
+
+
To run the example:
+
+
```bash
+
npm run example
+
```
+
+
## License
+
+
MIT
+
+
+115
examples/user.js
···
+
"use strict";
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+
return new (P || (P = Promise))(function (resolve, reject) {
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
+
});
+
};
+
var __generator = (this && this.__generator) || function (thisArg, body) {
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+
function verb(n) { return function (v) { return step([n, v]); }; }
+
function step(op) {
+
if (f) throw new TypeError("Generator is already executing.");
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+
if (y = 0, t) op = [op[0] & 2, t.value];
+
switch (op[0]) {
+
case 0: case 1: t = op; break;
+
case 4: _.label++; return { value: op[1], done: false };
+
case 5: _.label++; y = op[1]; op = [0]; continue;
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
+
default:
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+
if (t[2]) _.ops.pop();
+
_.trys.pop(); continue;
+
}
+
op = body.call(thisArg, _);
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
+
}
+
};
+
Object.defineProperty(exports, "__esModule", { value: true });
+
var zod_1 = require("zod");
+
var src_1 = require("../src");
+
var mongodb_1 = require("mongodb");
+
// 1. Define your schema using Zod
+
var userSchema = (0, src_1.defineModel)(zod_1.z.object({
+
name: zod_1.z.string(),
+
email: zod_1.z.string().email(),
+
age: zod_1.z.number().int().positive().optional(),
+
createdAt: zod_1.z.date().default(function () { return new Date(); }),
+
}));
+
function runExample() {
+
return __awaiter(this, void 0, void 0, function () {
+
var UserModel, newUser, insertResult, users, foundUser, updateResult, updatedUser, deleteResult, error_1;
+
return __generator(this, function (_a) {
+
switch (_a.label) {
+
case 0:
+
_a.trys.push([0, 9, 10, 12]);
+
// 3. Connect to MongoDB
+
return [4 /*yield*/, (0, src_1.connect)('mongodb://localhost:27017', 'mizzleorm_example')];
+
case 1:
+
// 3. Connect to MongoDB
+
_a.sent();
+
console.log('Connected to MongoDB');
+
UserModel = new src_1.MongoModel('users', userSchema);
+
// Clean up previous data
+
return [4 /*yield*/, UserModel.delete({})];
+
case 2:
+
// Clean up previous data
+
_a.sent();
+
newUser = {
+
name: 'Alice Smith',
+
email: 'alice@example.com',
+
age: 30,
+
};
+
return [4 /*yield*/, UserModel.insertOne(newUser)];
+
case 3:
+
insertResult = _a.sent();
+
console.log('Inserted user:', insertResult.insertedId);
+
return [4 /*yield*/, UserModel.find({ name: 'Alice Smith' })];
+
case 4:
+
users = _a.sent();
+
console.log('Found users:', users);
+
return [4 /*yield*/, UserModel.findOne({ _id: new mongodb_1.ObjectId(insertResult.insertedId) })];
+
case 5:
+
foundUser = _a.sent();
+
console.log('Found one user:', foundUser);
+
return [4 /*yield*/, UserModel.update({ _id: new mongodb_1.ObjectId(insertResult.insertedId) }, { age: 31 })];
+
case 6:
+
updateResult = _a.sent();
+
console.log('Updated user count:', updateResult.modifiedCount);
+
return [4 /*yield*/, UserModel.findOne({ _id: new mongodb_1.ObjectId(insertResult.insertedId) })];
+
case 7:
+
updatedUser = _a.sent();
+
console.log('Updated user data:', updatedUser);
+
return [4 /*yield*/, UserModel.delete({ name: 'Alice Smith' })];
+
case 8:
+
deleteResult = _a.sent();
+
console.log('Deleted user count:', deleteResult.deletedCount);
+
return [3 /*break*/, 12];
+
case 9:
+
error_1 = _a.sent();
+
console.error('Error during example run:', error_1);
+
return [3 /*break*/, 12];
+
case 10:
+
// 9. Disconnect from MongoDB
+
return [4 /*yield*/, (0, src_1.disconnect)()];
+
case 11:
+
// 9. Disconnect from MongoDB
+
_a.sent();
+
console.log('Disconnected from MongoDB');
+
return [7 /*endfinally*/];
+
case 12: return [2 /*return*/];
+
}
+
});
+
});
+
}
+
runExample();
+73
examples/user.ts
···
+
import { z } from 'zod';
+
import { defineModel, MongoModel, connect, disconnect, InferModel, InsertType } from '../src';
+
import { ObjectId } from 'mongodb';
+
+
// 1. Define your schema using Zod
+
const userSchema = defineModel(z.object({
+
name: z.string(),
+
email: z.string().email(),
+
age: z.number().int().positive().optional(),
+
createdAt: z.date().default(() => new Date()),
+
}));
+
+
// Infer the TypeScript type from the Zod schema
+
type User = InferModel<typeof userSchema>;
+
type UserInsert = InsertType<typeof userSchema>;
+
+
async function runExample() {
+
try {
+
// 3. Connect to MongoDB
+
await connect('mongodb://localhost:27017', 'mizzleorm_example');
+
console.log('Connected to MongoDB');
+
+
// 2. Create a MongoModel for your collection
+
const UserModel = new MongoModel('users', userSchema);
+
+
// Clean up previous data
+
await UserModel.delete({});
+
+
// 4. Insert a new document
+
const newUser: UserInsert = {
+
name: 'Alice Smith',
+
email: 'alice@example.com',
+
age: 30,
+
};
+
const insertResult = await UserModel.insertOne(newUser);
+
console.log('Inserted user:', insertResult.insertedId);
+
+
// 5. Find documents
+
const users = await UserModel.find({ name: 'Alice Smith' });
+
console.log('Found users:', users);
+
+
// 6. Find one document
+
const foundUser = await UserModel.findOne({ _id: new ObjectId(insertResult.insertedId) });
+
console.log('Found one user:', foundUser);
+
+
// 7. Update a document
+
const updateResult = await UserModel.update(
+
{ _id: new ObjectId(insertResult.insertedId) },
+
{ age: 31 }
+
);
+
console.log('Updated user count:', updateResult.modifiedCount);
+
+
const updatedUser = await UserModel.findOne({ _id: new ObjectId(insertResult.insertedId) });
+
console.log('Updated user data:', updatedUser);
+
+
// 8. Delete documents
+
const deleteResult = await UserModel.delete({ name: 'Alice Smith' });
+
console.log('Deleted user count:', deleteResult.deletedCount);
+
+
} catch (error) {
+
console.error('Error during example run:', error);
+
} finally {
+
// 9. Disconnect from MongoDB
+
await disconnect();
+
console.log('Disconnected from MongoDB');
+
}
+
}
+
+
runExample();
+
+
+
+
+2097
package-lock.json
···
+
{
+
"name": "mizzleorm",
+
"version": "0.0.1",
+
"lockfileVersion": 3,
+
"requires": true,
+
"packages": {
+
"": {
+
"name": "mizzleorm",
+
"version": "0.0.1",
+
"license": "MIT",
+
"dependencies": {
+
"mongodb": "^6.8.0",
+
"zod": "^3.23.8"
+
},
+
"devDependencies": {
+
"@types/mongodb": "^4.0.7",
+
"@types/node": "^20.14.10",
+
"ts-node": "^10.9.2",
+
"typescript": "^5.5.3",
+
"vitest": "^1.6.0"
+
}
+
},
+
"node_modules/@cspotcode/source-map-support": {
+
"version": "0.8.1",
+
"resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
+
"integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"@jridgewell/trace-mapping": "0.3.9"
+
},
+
"engines": {
+
"node": ">=12"
+
}
+
},
+
"node_modules/@esbuild/aix-ppc64": {
+
"version": "0.21.5",
+
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz",
+
"integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==",
+
"cpu": [
+
"ppc64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"aix"
+
],
+
"engines": {
+
"node": ">=12"
+
}
+
},
+
"node_modules/@esbuild/android-arm": {
+
"version": "0.21.5",
+
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz",
+
"integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==",
+
"cpu": [
+
"arm"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"android"
+
],
+
"engines": {
+
"node": ">=12"
+
}
+
},
+
"node_modules/@esbuild/android-arm64": {
+
"version": "0.21.5",
+
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz",
+
"integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==",
+
"cpu": [
+
"arm64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"android"
+
],
+
"engines": {
+
"node": ">=12"
+
}
+
},
+
"node_modules/@esbuild/android-x64": {
+
"version": "0.21.5",
+
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz",
+
"integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==",
+
"cpu": [
+
"x64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"android"
+
],
+
"engines": {
+
"node": ">=12"
+
}
+
},
+
"node_modules/@esbuild/darwin-arm64": {
+
"version": "0.21.5",
+
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz",
+
"integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==",
+
"cpu": [
+
"arm64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"darwin"
+
],
+
"engines": {
+
"node": ">=12"
+
}
+
},
+
"node_modules/@esbuild/darwin-x64": {
+
"version": "0.21.5",
+
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz",
+
"integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==",
+
"cpu": [
+
"x64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"darwin"
+
],
+
"engines": {
+
"node": ">=12"
+
}
+
},
+
"node_modules/@esbuild/freebsd-arm64": {
+
"version": "0.21.5",
+
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz",
+
"integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==",
+
"cpu": [
+
"arm64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"freebsd"
+
],
+
"engines": {
+
"node": ">=12"
+
}
+
},
+
"node_modules/@esbuild/freebsd-x64": {
+
"version": "0.21.5",
+
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz",
+
"integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==",
+
"cpu": [
+
"x64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"freebsd"
+
],
+
"engines": {
+
"node": ">=12"
+
}
+
},
+
"node_modules/@esbuild/linux-arm": {
+
"version": "0.21.5",
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz",
+
"integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==",
+
"cpu": [
+
"arm"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"linux"
+
],
+
"engines": {
+
"node": ">=12"
+
}
+
},
+
"node_modules/@esbuild/linux-arm64": {
+
"version": "0.21.5",
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz",
+
"integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==",
+
"cpu": [
+
"arm64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"linux"
+
],
+
"engines": {
+
"node": ">=12"
+
}
+
},
+
"node_modules/@esbuild/linux-ia32": {
+
"version": "0.21.5",
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz",
+
"integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==",
+
"cpu": [
+
"ia32"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"linux"
+
],
+
"engines": {
+
"node": ">=12"
+
}
+
},
+
"node_modules/@esbuild/linux-loong64": {
+
"version": "0.21.5",
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz",
+
"integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==",
+
"cpu": [
+
"loong64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"linux"
+
],
+
"engines": {
+
"node": ">=12"
+
}
+
},
+
"node_modules/@esbuild/linux-mips64el": {
+
"version": "0.21.5",
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz",
+
"integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==",
+
"cpu": [
+
"mips64el"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"linux"
+
],
+
"engines": {
+
"node": ">=12"
+
}
+
},
+
"node_modules/@esbuild/linux-ppc64": {
+
"version": "0.21.5",
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz",
+
"integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==",
+
"cpu": [
+
"ppc64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"linux"
+
],
+
"engines": {
+
"node": ">=12"
+
}
+
},
+
"node_modules/@esbuild/linux-riscv64": {
+
"version": "0.21.5",
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz",
+
"integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==",
+
"cpu": [
+
"riscv64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"linux"
+
],
+
"engines": {
+
"node": ">=12"
+
}
+
},
+
"node_modules/@esbuild/linux-s390x": {
+
"version": "0.21.5",
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz",
+
"integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==",
+
"cpu": [
+
"s390x"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"linux"
+
],
+
"engines": {
+
"node": ">=12"
+
}
+
},
+
"node_modules/@esbuild/linux-x64": {
+
"version": "0.21.5",
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz",
+
"integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==",
+
"cpu": [
+
"x64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"linux"
+
],
+
"engines": {
+
"node": ">=12"
+
}
+
},
+
"node_modules/@esbuild/netbsd-x64": {
+
"version": "0.21.5",
+
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz",
+
"integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==",
+
"cpu": [
+
"x64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"netbsd"
+
],
+
"engines": {
+
"node": ">=12"
+
}
+
},
+
"node_modules/@esbuild/openbsd-x64": {
+
"version": "0.21.5",
+
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz",
+
"integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==",
+
"cpu": [
+
"x64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"openbsd"
+
],
+
"engines": {
+
"node": ">=12"
+
}
+
},
+
"node_modules/@esbuild/sunos-x64": {
+
"version": "0.21.5",
+
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz",
+
"integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==",
+
"cpu": [
+
"x64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"sunos"
+
],
+
"engines": {
+
"node": ">=12"
+
}
+
},
+
"node_modules/@esbuild/win32-arm64": {
+
"version": "0.21.5",
+
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz",
+
"integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==",
+
"cpu": [
+
"arm64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"win32"
+
],
+
"engines": {
+
"node": ">=12"
+
}
+
},
+
"node_modules/@esbuild/win32-ia32": {
+
"version": "0.21.5",
+
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz",
+
"integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==",
+
"cpu": [
+
"ia32"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"win32"
+
],
+
"engines": {
+
"node": ">=12"
+
}
+
},
+
"node_modules/@esbuild/win32-x64": {
+
"version": "0.21.5",
+
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz",
+
"integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==",
+
"cpu": [
+
"x64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"win32"
+
],
+
"engines": {
+
"node": ">=12"
+
}
+
},
+
"node_modules/@jest/schemas": {
+
"version": "29.6.3",
+
"resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz",
+
"integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"@sinclair/typebox": "^0.27.8"
+
},
+
"engines": {
+
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+
}
+
},
+
"node_modules/@jridgewell/resolve-uri": {
+
"version": "3.1.2",
+
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
+
"integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
+
"dev": true,
+
"license": "MIT",
+
"engines": {
+
"node": ">=6.0.0"
+
}
+
},
+
"node_modules/@jridgewell/sourcemap-codec": {
+
"version": "1.5.4",
+
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.4.tgz",
+
"integrity": "sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==",
+
"dev": true,
+
"license": "MIT"
+
},
+
"node_modules/@jridgewell/trace-mapping": {
+
"version": "0.3.9",
+
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
+
"integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"@jridgewell/resolve-uri": "^3.0.3",
+
"@jridgewell/sourcemap-codec": "^1.4.10"
+
}
+
},
+
"node_modules/@mongodb-js/saslprep": {
+
"version": "1.3.0",
+
"resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.3.0.tgz",
+
"integrity": "sha512-zlayKCsIjYb7/IdfqxorK5+xUMyi4vOKcFy10wKJYc63NSdKI8mNME+uJqfatkPmOSMMUiojrL58IePKBm3gvQ==",
+
"license": "MIT",
+
"dependencies": {
+
"sparse-bitfield": "^3.0.3"
+
}
+
},
+
"node_modules/@rollup/rollup-android-arm-eabi": {
+
"version": "4.45.1",
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.45.1.tgz",
+
"integrity": "sha512-NEySIFvMY0ZQO+utJkgoMiCAjMrGvnbDLHvcmlA33UXJpYBCvlBEbMMtV837uCkS+plG2umfhn0T5mMAxGrlRA==",
+
"cpu": [
+
"arm"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"android"
+
]
+
},
+
"node_modules/@rollup/rollup-android-arm64": {
+
"version": "4.45.1",
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.45.1.tgz",
+
"integrity": "sha512-ujQ+sMXJkg4LRJaYreaVx7Z/VMgBBd89wGS4qMrdtfUFZ+TSY5Rs9asgjitLwzeIbhwdEhyj29zhst3L1lKsRQ==",
+
"cpu": [
+
"arm64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"android"
+
]
+
},
+
"node_modules/@rollup/rollup-darwin-arm64": {
+
"version": "4.45.1",
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.45.1.tgz",
+
"integrity": "sha512-FSncqHvqTm3lC6Y13xncsdOYfxGSLnP+73k815EfNmpewPs+EyM49haPS105Rh4aF5mJKywk9X0ogzLXZzN9lA==",
+
"cpu": [
+
"arm64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"darwin"
+
]
+
},
+
"node_modules/@rollup/rollup-darwin-x64": {
+
"version": "4.45.1",
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.45.1.tgz",
+
"integrity": "sha512-2/vVn/husP5XI7Fsf/RlhDaQJ7x9zjvC81anIVbr4b/f0xtSmXQTFcGIQ/B1cXIYM6h2nAhJkdMHTnD7OtQ9Og==",
+
"cpu": [
+
"x64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"darwin"
+
]
+
},
+
"node_modules/@rollup/rollup-freebsd-arm64": {
+
"version": "4.45.1",
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.45.1.tgz",
+
"integrity": "sha512-4g1kaDxQItZsrkVTdYQ0bxu4ZIQ32cotoQbmsAnW1jAE4XCMbcBPDirX5fyUzdhVCKgPcrwWuucI8yrVRBw2+g==",
+
"cpu": [
+
"arm64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"freebsd"
+
]
+
},
+
"node_modules/@rollup/rollup-freebsd-x64": {
+
"version": "4.45.1",
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.45.1.tgz",
+
"integrity": "sha512-L/6JsfiL74i3uK1Ti2ZFSNsp5NMiM4/kbbGEcOCps99aZx3g8SJMO1/9Y0n/qKlWZfn6sScf98lEOUe2mBvW9A==",
+
"cpu": [
+
"x64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"freebsd"
+
]
+
},
+
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
+
"version": "4.45.1",
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.45.1.tgz",
+
"integrity": "sha512-RkdOTu2jK7brlu+ZwjMIZfdV2sSYHK2qR08FUWcIoqJC2eywHbXr0L8T/pONFwkGukQqERDheaGTeedG+rra6Q==",
+
"cpu": [
+
"arm"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"linux"
+
]
+
},
+
"node_modules/@rollup/rollup-linux-arm-musleabihf": {
+
"version": "4.45.1",
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.45.1.tgz",
+
"integrity": "sha512-3kJ8pgfBt6CIIr1o+HQA7OZ9mp/zDk3ctekGl9qn/pRBgrRgfwiffaUmqioUGN9hv0OHv2gxmvdKOkARCtRb8Q==",
+
"cpu": [
+
"arm"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"linux"
+
]
+
},
+
"node_modules/@rollup/rollup-linux-arm64-gnu": {
+
"version": "4.45.1",
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.45.1.tgz",
+
"integrity": "sha512-k3dOKCfIVixWjG7OXTCOmDfJj3vbdhN0QYEqB+OuGArOChek22hn7Uy5A/gTDNAcCy5v2YcXRJ/Qcnm4/ma1xw==",
+
"cpu": [
+
"arm64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"linux"
+
]
+
},
+
"node_modules/@rollup/rollup-linux-arm64-musl": {
+
"version": "4.45.1",
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.45.1.tgz",
+
"integrity": "sha512-PmI1vxQetnM58ZmDFl9/Uk2lpBBby6B6rF4muJc65uZbxCs0EA7hhKCk2PKlmZKuyVSHAyIw3+/SiuMLxKxWog==",
+
"cpu": [
+
"arm64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"linux"
+
]
+
},
+
"node_modules/@rollup/rollup-linux-loongarch64-gnu": {
+
"version": "4.45.1",
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.45.1.tgz",
+
"integrity": "sha512-9UmI0VzGmNJ28ibHW2GpE2nF0PBQqsyiS4kcJ5vK+wuwGnV5RlqdczVocDSUfGX/Na7/XINRVoUgJyFIgipoRg==",
+
"cpu": [
+
"loong64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"linux"
+
]
+
},
+
"node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
+
"version": "4.45.1",
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.45.1.tgz",
+
"integrity": "sha512-7nR2KY8oEOUTD3pBAxIBBbZr0U7U+R9HDTPNy+5nVVHDXI4ikYniH1oxQz9VoB5PbBU1CZuDGHkLJkd3zLMWsg==",
+
"cpu": [
+
"ppc64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"linux"
+
]
+
},
+
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
+
"version": "4.45.1",
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.45.1.tgz",
+
"integrity": "sha512-nlcl3jgUultKROfZijKjRQLUu9Ma0PeNv/VFHkZiKbXTBQXhpytS8CIj5/NfBeECZtY2FJQubm6ltIxm/ftxpw==",
+
"cpu": [
+
"riscv64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"linux"
+
]
+
},
+
"node_modules/@rollup/rollup-linux-riscv64-musl": {
+
"version": "4.45.1",
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.45.1.tgz",
+
"integrity": "sha512-HJV65KLS51rW0VY6rvZkiieiBnurSzpzore1bMKAhunQiECPuxsROvyeaot/tcK3A3aGnI+qTHqisrpSgQrpgA==",
+
"cpu": [
+
"riscv64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"linux"
+
]
+
},
+
"node_modules/@rollup/rollup-linux-s390x-gnu": {
+
"version": "4.45.1",
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.45.1.tgz",
+
"integrity": "sha512-NITBOCv3Qqc6hhwFt7jLV78VEO/il4YcBzoMGGNxznLgRQf43VQDae0aAzKiBeEPIxnDrACiMgbqjuihx08OOw==",
+
"cpu": [
+
"s390x"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"linux"
+
]
+
},
+
"node_modules/@rollup/rollup-linux-x64-gnu": {
+
"version": "4.45.1",
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.45.1.tgz",
+
"integrity": "sha512-+E/lYl6qu1zqgPEnTrs4WysQtvc/Sh4fC2nByfFExqgYrqkKWp1tWIbe+ELhixnenSpBbLXNi6vbEEJ8M7fiHw==",
+
"cpu": [
+
"x64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"linux"
+
]
+
},
+
"node_modules/@rollup/rollup-linux-x64-musl": {
+
"version": "4.45.1",
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.45.1.tgz",
+
"integrity": "sha512-a6WIAp89p3kpNoYStITT9RbTbTnqarU7D8N8F2CV+4Cl9fwCOZraLVuVFvlpsW0SbIiYtEnhCZBPLoNdRkjQFw==",
+
"cpu": [
+
"x64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"linux"
+
]
+
},
+
"node_modules/@rollup/rollup-win32-arm64-msvc": {
+
"version": "4.45.1",
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.45.1.tgz",
+
"integrity": "sha512-T5Bi/NS3fQiJeYdGvRpTAP5P02kqSOpqiopwhj0uaXB6nzs5JVi2XMJb18JUSKhCOX8+UE1UKQufyD6Or48dJg==",
+
"cpu": [
+
"arm64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"win32"
+
]
+
},
+
"node_modules/@rollup/rollup-win32-ia32-msvc": {
+
"version": "4.45.1",
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.45.1.tgz",
+
"integrity": "sha512-lxV2Pako3ujjuUe9jiU3/s7KSrDfH6IgTSQOnDWr9aJ92YsFd7EurmClK0ly/t8dzMkDtd04g60WX6yl0sGfdw==",
+
"cpu": [
+
"ia32"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"win32"
+
]
+
},
+
"node_modules/@rollup/rollup-win32-x64-msvc": {
+
"version": "4.45.1",
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.45.1.tgz",
+
"integrity": "sha512-M/fKi4sasCdM8i0aWJjCSFm2qEnYRR8AMLG2kxp6wD13+tMGA4Z1tVAuHkNRjud5SW2EM3naLuK35w9twvf6aA==",
+
"cpu": [
+
"x64"
+
],
+
"dev": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"win32"
+
]
+
},
+
"node_modules/@sinclair/typebox": {
+
"version": "0.27.8",
+
"resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz",
+
"integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==",
+
"dev": true,
+
"license": "MIT"
+
},
+
"node_modules/@tsconfig/node10": {
+
"version": "1.0.11",
+
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz",
+
"integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==",
+
"dev": true,
+
"license": "MIT"
+
},
+
"node_modules/@tsconfig/node12": {
+
"version": "1.0.11",
+
"resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
+
"integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
+
"dev": true,
+
"license": "MIT"
+
},
+
"node_modules/@tsconfig/node14": {
+
"version": "1.0.3",
+
"resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
+
"integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
+
"dev": true,
+
"license": "MIT"
+
},
+
"node_modules/@tsconfig/node16": {
+
"version": "1.0.4",
+
"resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz",
+
"integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==",
+
"dev": true,
+
"license": "MIT"
+
},
+
"node_modules/@types/estree": {
+
"version": "1.0.8",
+
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
+
"integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",
+
"dev": true,
+
"license": "MIT"
+
},
+
"node_modules/@types/mongodb": {
+
"version": "4.0.7",
+
"resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-4.0.7.tgz",
+
"integrity": "sha512-lPUYPpzA43baXqnd36cZ9xxorprybxXDzteVKCPAdp14ppHtFJHnXYvNpmBvtMUTb5fKXVv6sVbzo1LHkWhJlw==",
+
"deprecated": "mongodb provides its own types. @types/mongodb is no longer needed.",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"mongodb": "*"
+
}
+
},
+
"node_modules/@types/node": {
+
"version": "20.19.8",
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.8.tgz",
+
"integrity": "sha512-HzbgCY53T6bfu4tT7Aq3TvViJyHjLjPNaAS3HOuMc9pw97KHsUtXNX4L+wu59g1WnjsZSko35MbEqnO58rihhw==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"undici-types": "~6.21.0"
+
}
+
},
+
"node_modules/@types/webidl-conversions": {
+
"version": "7.0.3",
+
"resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz",
+
"integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA==",
+
"license": "MIT"
+
},
+
"node_modules/@types/whatwg-url": {
+
"version": "11.0.5",
+
"resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-11.0.5.tgz",
+
"integrity": "sha512-coYR071JRaHa+xoEvvYqvnIHaVqaYrLPbsufM9BF63HkwI5Lgmy2QR8Q5K/lYDYo5AK82wOvSOS0UsLTpTG7uQ==",
+
"license": "MIT",
+
"dependencies": {
+
"@types/webidl-conversions": "*"
+
}
+
},
+
"node_modules/@vitest/expect": {
+
"version": "1.6.1",
+
"resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.6.1.tgz",
+
"integrity": "sha512-jXL+9+ZNIJKruofqXuuTClf44eSpcHlgj3CiuNihUF3Ioujtmc0zIa3UJOW5RjDK1YLBJZnWBlPuqhYycLioog==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"@vitest/spy": "1.6.1",
+
"@vitest/utils": "1.6.1",
+
"chai": "^4.3.10"
+
},
+
"funding": {
+
"url": "https://opencollective.com/vitest"
+
}
+
},
+
"node_modules/@vitest/runner": {
+
"version": "1.6.1",
+
"resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.6.1.tgz",
+
"integrity": "sha512-3nSnYXkVkf3mXFfE7vVyPmi3Sazhb/2cfZGGs0JRzFsPFvAMBEcrweV1V1GsrstdXeKCTXlJbvnQwGWgEIHmOA==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"@vitest/utils": "1.6.1",
+
"p-limit": "^5.0.0",
+
"pathe": "^1.1.1"
+
},
+
"funding": {
+
"url": "https://opencollective.com/vitest"
+
}
+
},
+
"node_modules/@vitest/snapshot": {
+
"version": "1.6.1",
+
"resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.6.1.tgz",
+
"integrity": "sha512-WvidQuWAzU2p95u8GAKlRMqMyN1yOJkGHnx3M1PL9Raf7AQ1kwLKg04ADlCa3+OXUZE7BceOhVZiuWAbzCKcUQ==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"magic-string": "^0.30.5",
+
"pathe": "^1.1.1",
+
"pretty-format": "^29.7.0"
+
},
+
"funding": {
+
"url": "https://opencollective.com/vitest"
+
}
+
},
+
"node_modules/@vitest/spy": {
+
"version": "1.6.1",
+
"resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.6.1.tgz",
+
"integrity": "sha512-MGcMmpGkZebsMZhbQKkAf9CX5zGvjkBTqf8Zx3ApYWXr3wG+QvEu2eXWfnIIWYSJExIp4V9FCKDEeygzkYrXMw==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"tinyspy": "^2.2.0"
+
},
+
"funding": {
+
"url": "https://opencollective.com/vitest"
+
}
+
},
+
"node_modules/@vitest/utils": {
+
"version": "1.6.1",
+
"resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.6.1.tgz",
+
"integrity": "sha512-jOrrUvXM4Av9ZWiG1EajNto0u96kWAhJ1LmPmJhXXQx/32MecEKd10pOLYgS2BQx1TgkGhloPU1ArDW2vvaY6g==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"diff-sequences": "^29.6.3",
+
"estree-walker": "^3.0.3",
+
"loupe": "^2.3.7",
+
"pretty-format": "^29.7.0"
+
},
+
"funding": {
+
"url": "https://opencollective.com/vitest"
+
}
+
},
+
"node_modules/acorn": {
+
"version": "8.15.0",
+
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
+
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
+
"dev": true,
+
"license": "MIT",
+
"bin": {
+
"acorn": "bin/acorn"
+
},
+
"engines": {
+
"node": ">=0.4.0"
+
}
+
},
+
"node_modules/acorn-walk": {
+
"version": "8.3.4",
+
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz",
+
"integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"acorn": "^8.11.0"
+
},
+
"engines": {
+
"node": ">=0.4.0"
+
}
+
},
+
"node_modules/ansi-styles": {
+
"version": "5.2.0",
+
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",
+
"integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
+
"dev": true,
+
"license": "MIT",
+
"engines": {
+
"node": ">=10"
+
},
+
"funding": {
+
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
+
}
+
},
+
"node_modules/arg": {
+
"version": "4.1.3",
+
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
+
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
+
"dev": true,
+
"license": "MIT"
+
},
+
"node_modules/assertion-error": {
+
"version": "1.1.0",
+
"resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
+
"integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==",
+
"dev": true,
+
"license": "MIT",
+
"engines": {
+
"node": "*"
+
}
+
},
+
"node_modules/bson": {
+
"version": "6.10.4",
+
"resolved": "https://registry.npmjs.org/bson/-/bson-6.10.4.tgz",
+
"integrity": "sha512-WIsKqkSC0ABoBJuT1LEX+2HEvNmNKKgnTAyd0fL8qzK4SH2i9NXg+t08YtdZp/V9IZ33cxe3iV4yM0qg8lMQng==",
+
"license": "Apache-2.0",
+
"engines": {
+
"node": ">=16.20.1"
+
}
+
},
+
"node_modules/cac": {
+
"version": "6.7.14",
+
"resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz",
+
"integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==",
+
"dev": true,
+
"license": "MIT",
+
"engines": {
+
"node": ">=8"
+
}
+
},
+
"node_modules/chai": {
+
"version": "4.5.0",
+
"resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz",
+
"integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"assertion-error": "^1.1.0",
+
"check-error": "^1.0.3",
+
"deep-eql": "^4.1.3",
+
"get-func-name": "^2.0.2",
+
"loupe": "^2.3.6",
+
"pathval": "^1.1.1",
+
"type-detect": "^4.1.0"
+
},
+
"engines": {
+
"node": ">=4"
+
}
+
},
+
"node_modules/check-error": {
+
"version": "1.0.3",
+
"resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz",
+
"integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"get-func-name": "^2.0.2"
+
},
+
"engines": {
+
"node": "*"
+
}
+
},
+
"node_modules/confbox": {
+
"version": "0.1.8",
+
"resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz",
+
"integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==",
+
"dev": true,
+
"license": "MIT"
+
},
+
"node_modules/create-require": {
+
"version": "1.1.1",
+
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
+
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
+
"dev": true,
+
"license": "MIT"
+
},
+
"node_modules/cross-spawn": {
+
"version": "7.0.6",
+
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
+
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"path-key": "^3.1.0",
+
"shebang-command": "^2.0.0",
+
"which": "^2.0.1"
+
},
+
"engines": {
+
"node": ">= 8"
+
}
+
},
+
"node_modules/debug": {
+
"version": "4.4.1",
+
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz",
+
"integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"ms": "^2.1.3"
+
},
+
"engines": {
+
"node": ">=6.0"
+
},
+
"peerDependenciesMeta": {
+
"supports-color": {
+
"optional": true
+
}
+
}
+
},
+
"node_modules/deep-eql": {
+
"version": "4.1.4",
+
"resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz",
+
"integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"type-detect": "^4.0.0"
+
},
+
"engines": {
+
"node": ">=6"
+
}
+
},
+
"node_modules/diff": {
+
"version": "4.0.2",
+
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
+
"integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
+
"dev": true,
+
"license": "BSD-3-Clause",
+
"engines": {
+
"node": ">=0.3.1"
+
}
+
},
+
"node_modules/diff-sequences": {
+
"version": "29.6.3",
+
"resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz",
+
"integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==",
+
"dev": true,
+
"license": "MIT",
+
"engines": {
+
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+
}
+
},
+
"node_modules/esbuild": {
+
"version": "0.21.5",
+
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz",
+
"integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==",
+
"dev": true,
+
"hasInstallScript": true,
+
"license": "MIT",
+
"bin": {
+
"esbuild": "bin/esbuild"
+
},
+
"engines": {
+
"node": ">=12"
+
},
+
"optionalDependencies": {
+
"@esbuild/aix-ppc64": "0.21.5",
+
"@esbuild/android-arm": "0.21.5",
+
"@esbuild/android-arm64": "0.21.5",
+
"@esbuild/android-x64": "0.21.5",
+
"@esbuild/darwin-arm64": "0.21.5",
+
"@esbuild/darwin-x64": "0.21.5",
+
"@esbuild/freebsd-arm64": "0.21.5",
+
"@esbuild/freebsd-x64": "0.21.5",
+
"@esbuild/linux-arm": "0.21.5",
+
"@esbuild/linux-arm64": "0.21.5",
+
"@esbuild/linux-ia32": "0.21.5",
+
"@esbuild/linux-loong64": "0.21.5",
+
"@esbuild/linux-mips64el": "0.21.5",
+
"@esbuild/linux-ppc64": "0.21.5",
+
"@esbuild/linux-riscv64": "0.21.5",
+
"@esbuild/linux-s390x": "0.21.5",
+
"@esbuild/linux-x64": "0.21.5",
+
"@esbuild/netbsd-x64": "0.21.5",
+
"@esbuild/openbsd-x64": "0.21.5",
+
"@esbuild/sunos-x64": "0.21.5",
+
"@esbuild/win32-arm64": "0.21.5",
+
"@esbuild/win32-ia32": "0.21.5",
+
"@esbuild/win32-x64": "0.21.5"
+
}
+
},
+
"node_modules/estree-walker": {
+
"version": "3.0.3",
+
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
+
"integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"@types/estree": "^1.0.0"
+
}
+
},
+
"node_modules/execa": {
+
"version": "8.0.1",
+
"resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz",
+
"integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"cross-spawn": "^7.0.3",
+
"get-stream": "^8.0.1",
+
"human-signals": "^5.0.0",
+
"is-stream": "^3.0.0",
+
"merge-stream": "^2.0.0",
+
"npm-run-path": "^5.1.0",
+
"onetime": "^6.0.0",
+
"signal-exit": "^4.1.0",
+
"strip-final-newline": "^3.0.0"
+
},
+
"engines": {
+
"node": ">=16.17"
+
},
+
"funding": {
+
"url": "https://github.com/sindresorhus/execa?sponsor=1"
+
}
+
},
+
"node_modules/fsevents": {
+
"version": "2.3.3",
+
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+
"dev": true,
+
"hasInstallScript": true,
+
"license": "MIT",
+
"optional": true,
+
"os": [
+
"darwin"
+
],
+
"engines": {
+
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+
}
+
},
+
"node_modules/get-func-name": {
+
"version": "2.0.2",
+
"resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz",
+
"integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==",
+
"dev": true,
+
"license": "MIT",
+
"engines": {
+
"node": "*"
+
}
+
},
+
"node_modules/get-stream": {
+
"version": "8.0.1",
+
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz",
+
"integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==",
+
"dev": true,
+
"license": "MIT",
+
"engines": {
+
"node": ">=16"
+
},
+
"funding": {
+
"url": "https://github.com/sponsors/sindresorhus"
+
}
+
},
+
"node_modules/human-signals": {
+
"version": "5.0.0",
+
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz",
+
"integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==",
+
"dev": true,
+
"license": "Apache-2.0",
+
"engines": {
+
"node": ">=16.17.0"
+
}
+
},
+
"node_modules/is-stream": {
+
"version": "3.0.0",
+
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz",
+
"integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==",
+
"dev": true,
+
"license": "MIT",
+
"engines": {
+
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+
},
+
"funding": {
+
"url": "https://github.com/sponsors/sindresorhus"
+
}
+
},
+
"node_modules/isexe": {
+
"version": "2.0.0",
+
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
+
"dev": true,
+
"license": "ISC"
+
},
+
"node_modules/js-tokens": {
+
"version": "9.0.1",
+
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz",
+
"integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==",
+
"dev": true,
+
"license": "MIT"
+
},
+
"node_modules/local-pkg": {
+
"version": "0.5.1",
+
"resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.1.tgz",
+
"integrity": "sha512-9rrA30MRRP3gBD3HTGnC6cDFpaE1kVDWxWgqWJUN0RvDNAo+Nz/9GxB+nHOH0ifbVFy0hSA1V6vFDvnx54lTEQ==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"mlly": "^1.7.3",
+
"pkg-types": "^1.2.1"
+
},
+
"engines": {
+
"node": ">=14"
+
},
+
"funding": {
+
"url": "https://github.com/sponsors/antfu"
+
}
+
},
+
"node_modules/loupe": {
+
"version": "2.3.7",
+
"resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz",
+
"integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"get-func-name": "^2.0.1"
+
}
+
},
+
"node_modules/magic-string": {
+
"version": "0.30.17",
+
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz",
+
"integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"@jridgewell/sourcemap-codec": "^1.5.0"
+
}
+
},
+
"node_modules/make-error": {
+
"version": "1.3.6",
+
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
+
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
+
"dev": true,
+
"license": "ISC"
+
},
+
"node_modules/memory-pager": {
+
"version": "1.5.0",
+
"resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
+
"integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==",
+
"license": "MIT"
+
},
+
"node_modules/merge-stream": {
+
"version": "2.0.0",
+
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
+
"integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
+
"dev": true,
+
"license": "MIT"
+
},
+
"node_modules/mimic-fn": {
+
"version": "4.0.0",
+
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
+
"integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
+
"dev": true,
+
"license": "MIT",
+
"engines": {
+
"node": ">=12"
+
},
+
"funding": {
+
"url": "https://github.com/sponsors/sindresorhus"
+
}
+
},
+
"node_modules/mlly": {
+
"version": "1.7.4",
+
"resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.4.tgz",
+
"integrity": "sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"acorn": "^8.14.0",
+
"pathe": "^2.0.1",
+
"pkg-types": "^1.3.0",
+
"ufo": "^1.5.4"
+
}
+
},
+
"node_modules/mlly/node_modules/pathe": {
+
"version": "2.0.3",
+
"resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz",
+
"integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==",
+
"dev": true,
+
"license": "MIT"
+
},
+
"node_modules/mongodb": {
+
"version": "6.17.0",
+
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.17.0.tgz",
+
"integrity": "sha512-neerUzg/8U26cgruLysKEjJvoNSXhyID3RvzvdcpsIi2COYM3FS3o9nlH7fxFtefTb942dX3W9i37oPfCVj4wA==",
+
"license": "Apache-2.0",
+
"dependencies": {
+
"@mongodb-js/saslprep": "^1.1.9",
+
"bson": "^6.10.4",
+
"mongodb-connection-string-url": "^3.0.0"
+
},
+
"engines": {
+
"node": ">=16.20.1"
+
},
+
"peerDependencies": {
+
"@aws-sdk/credential-providers": "^3.188.0",
+
"@mongodb-js/zstd": "^1.1.0 || ^2.0.0",
+
"gcp-metadata": "^5.2.0",
+
"kerberos": "^2.0.1",
+
"mongodb-client-encryption": ">=6.0.0 <7",
+
"snappy": "^7.2.2",
+
"socks": "^2.7.1"
+
},
+
"peerDependenciesMeta": {
+
"@aws-sdk/credential-providers": {
+
"optional": true
+
},
+
"@mongodb-js/zstd": {
+
"optional": true
+
},
+
"gcp-metadata": {
+
"optional": true
+
},
+
"kerberos": {
+
"optional": true
+
},
+
"mongodb-client-encryption": {
+
"optional": true
+
},
+
"snappy": {
+
"optional": true
+
},
+
"socks": {
+
"optional": true
+
}
+
}
+
},
+
"node_modules/mongodb-connection-string-url": {
+
"version": "3.0.2",
+
"resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.2.tgz",
+
"integrity": "sha512-rMO7CGo/9BFwyZABcKAWL8UJwH/Kc2x0g72uhDWzG48URRax5TCIcJ7Rc3RZqffZzO/Gwff/jyKwCU9TN8gehA==",
+
"license": "Apache-2.0",
+
"dependencies": {
+
"@types/whatwg-url": "^11.0.2",
+
"whatwg-url": "^14.1.0 || ^13.0.0"
+
}
+
},
+
"node_modules/ms": {
+
"version": "2.1.3",
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+
"dev": true,
+
"license": "MIT"
+
},
+
"node_modules/nanoid": {
+
"version": "3.3.11",
+
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
+
"integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
+
"dev": true,
+
"funding": [
+
{
+
"type": "github",
+
"url": "https://github.com/sponsors/ai"
+
}
+
],
+
"license": "MIT",
+
"bin": {
+
"nanoid": "bin/nanoid.cjs"
+
},
+
"engines": {
+
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
+
}
+
},
+
"node_modules/npm-run-path": {
+
"version": "5.3.0",
+
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz",
+
"integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"path-key": "^4.0.0"
+
},
+
"engines": {
+
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+
},
+
"funding": {
+
"url": "https://github.com/sponsors/sindresorhus"
+
}
+
},
+
"node_modules/npm-run-path/node_modules/path-key": {
+
"version": "4.0.0",
+
"resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz",
+
"integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==",
+
"dev": true,
+
"license": "MIT",
+
"engines": {
+
"node": ">=12"
+
},
+
"funding": {
+
"url": "https://github.com/sponsors/sindresorhus"
+
}
+
},
+
"node_modules/onetime": {
+
"version": "6.0.0",
+
"resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz",
+
"integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"mimic-fn": "^4.0.0"
+
},
+
"engines": {
+
"node": ">=12"
+
},
+
"funding": {
+
"url": "https://github.com/sponsors/sindresorhus"
+
}
+
},
+
"node_modules/p-limit": {
+
"version": "5.0.0",
+
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-5.0.0.tgz",
+
"integrity": "sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"yocto-queue": "^1.0.0"
+
},
+
"engines": {
+
"node": ">=18"
+
},
+
"funding": {
+
"url": "https://github.com/sponsors/sindresorhus"
+
}
+
},
+
"node_modules/path-key": {
+
"version": "3.1.1",
+
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+
"dev": true,
+
"license": "MIT",
+
"engines": {
+
"node": ">=8"
+
}
+
},
+
"node_modules/pathe": {
+
"version": "1.1.2",
+
"resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz",
+
"integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==",
+
"dev": true,
+
"license": "MIT"
+
},
+
"node_modules/pathval": {
+
"version": "1.1.1",
+
"resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz",
+
"integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==",
+
"dev": true,
+
"license": "MIT",
+
"engines": {
+
"node": "*"
+
}
+
},
+
"node_modules/picocolors": {
+
"version": "1.1.1",
+
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
+
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
+
"dev": true,
+
"license": "ISC"
+
},
+
"node_modules/pkg-types": {
+
"version": "1.3.1",
+
"resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz",
+
"integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"confbox": "^0.1.8",
+
"mlly": "^1.7.4",
+
"pathe": "^2.0.1"
+
}
+
},
+
"node_modules/pkg-types/node_modules/pathe": {
+
"version": "2.0.3",
+
"resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz",
+
"integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==",
+
"dev": true,
+
"license": "MIT"
+
},
+
"node_modules/postcss": {
+
"version": "8.5.6",
+
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz",
+
"integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==",
+
"dev": true,
+
"funding": [
+
{
+
"type": "opencollective",
+
"url": "https://opencollective.com/postcss/"
+
},
+
{
+
"type": "tidelift",
+
"url": "https://tidelift.com/funding/github/npm/postcss"
+
},
+
{
+
"type": "github",
+
"url": "https://github.com/sponsors/ai"
+
}
+
],
+
"license": "MIT",
+
"dependencies": {
+
"nanoid": "^3.3.11",
+
"picocolors": "^1.1.1",
+
"source-map-js": "^1.2.1"
+
},
+
"engines": {
+
"node": "^10 || ^12 || >=14"
+
}
+
},
+
"node_modules/pretty-format": {
+
"version": "29.7.0",
+
"resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz",
+
"integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"@jest/schemas": "^29.6.3",
+
"ansi-styles": "^5.0.0",
+
"react-is": "^18.0.0"
+
},
+
"engines": {
+
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+
}
+
},
+
"node_modules/punycode": {
+
"version": "2.3.1",
+
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
+
"integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
+
"license": "MIT",
+
"engines": {
+
"node": ">=6"
+
}
+
},
+
"node_modules/react-is": {
+
"version": "18.3.1",
+
"resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz",
+
"integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==",
+
"dev": true,
+
"license": "MIT"
+
},
+
"node_modules/rollup": {
+
"version": "4.45.1",
+
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.45.1.tgz",
+
"integrity": "sha512-4iya7Jb76fVpQyLoiVpzUrsjQ12r3dM7fIVz+4NwoYvZOShknRmiv+iu9CClZml5ZLGb0XMcYLutK6w9tgxHDw==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"@types/estree": "1.0.8"
+
},
+
"bin": {
+
"rollup": "dist/bin/rollup"
+
},
+
"engines": {
+
"node": ">=18.0.0",
+
"npm": ">=8.0.0"
+
},
+
"optionalDependencies": {
+
"@rollup/rollup-android-arm-eabi": "4.45.1",
+
"@rollup/rollup-android-arm64": "4.45.1",
+
"@rollup/rollup-darwin-arm64": "4.45.1",
+
"@rollup/rollup-darwin-x64": "4.45.1",
+
"@rollup/rollup-freebsd-arm64": "4.45.1",
+
"@rollup/rollup-freebsd-x64": "4.45.1",
+
"@rollup/rollup-linux-arm-gnueabihf": "4.45.1",
+
"@rollup/rollup-linux-arm-musleabihf": "4.45.1",
+
"@rollup/rollup-linux-arm64-gnu": "4.45.1",
+
"@rollup/rollup-linux-arm64-musl": "4.45.1",
+
"@rollup/rollup-linux-loongarch64-gnu": "4.45.1",
+
"@rollup/rollup-linux-powerpc64le-gnu": "4.45.1",
+
"@rollup/rollup-linux-riscv64-gnu": "4.45.1",
+
"@rollup/rollup-linux-riscv64-musl": "4.45.1",
+
"@rollup/rollup-linux-s390x-gnu": "4.45.1",
+
"@rollup/rollup-linux-x64-gnu": "4.45.1",
+
"@rollup/rollup-linux-x64-musl": "4.45.1",
+
"@rollup/rollup-win32-arm64-msvc": "4.45.1",
+
"@rollup/rollup-win32-ia32-msvc": "4.45.1",
+
"@rollup/rollup-win32-x64-msvc": "4.45.1",
+
"fsevents": "~2.3.2"
+
}
+
},
+
"node_modules/shebang-command": {
+
"version": "2.0.0",
+
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"shebang-regex": "^3.0.0"
+
},
+
"engines": {
+
"node": ">=8"
+
}
+
},
+
"node_modules/shebang-regex": {
+
"version": "3.0.0",
+
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+
"dev": true,
+
"license": "MIT",
+
"engines": {
+
"node": ">=8"
+
}
+
},
+
"node_modules/siginfo": {
+
"version": "2.0.0",
+
"resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz",
+
"integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==",
+
"dev": true,
+
"license": "ISC"
+
},
+
"node_modules/signal-exit": {
+
"version": "4.1.0",
+
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
+
"integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
+
"dev": true,
+
"license": "ISC",
+
"engines": {
+
"node": ">=14"
+
},
+
"funding": {
+
"url": "https://github.com/sponsors/isaacs"
+
}
+
},
+
"node_modules/source-map-js": {
+
"version": "1.2.1",
+
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
+
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
+
"dev": true,
+
"license": "BSD-3-Clause",
+
"engines": {
+
"node": ">=0.10.0"
+
}
+
},
+
"node_modules/sparse-bitfield": {
+
"version": "3.0.3",
+
"resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
+
"integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==",
+
"license": "MIT",
+
"dependencies": {
+
"memory-pager": "^1.0.2"
+
}
+
},
+
"node_modules/stackback": {
+
"version": "0.0.2",
+
"resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz",
+
"integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==",
+
"dev": true,
+
"license": "MIT"
+
},
+
"node_modules/std-env": {
+
"version": "3.9.0",
+
"resolved": "https://registry.npmjs.org/std-env/-/std-env-3.9.0.tgz",
+
"integrity": "sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==",
+
"dev": true,
+
"license": "MIT"
+
},
+
"node_modules/strip-final-newline": {
+
"version": "3.0.0",
+
"resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz",
+
"integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==",
+
"dev": true,
+
"license": "MIT",
+
"engines": {
+
"node": ">=12"
+
},
+
"funding": {
+
"url": "https://github.com/sponsors/sindresorhus"
+
}
+
},
+
"node_modules/strip-literal": {
+
"version": "2.1.1",
+
"resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-2.1.1.tgz",
+
"integrity": "sha512-631UJ6O00eNGfMiWG78ck80dfBab8X6IVFB51jZK5Icd7XAs60Z5y7QdSd/wGIklnWvRbUNloVzhOKKmutxQ6Q==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"js-tokens": "^9.0.1"
+
},
+
"funding": {
+
"url": "https://github.com/sponsors/antfu"
+
}
+
},
+
"node_modules/tinybench": {
+
"version": "2.9.0",
+
"resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz",
+
"integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==",
+
"dev": true,
+
"license": "MIT"
+
},
+
"node_modules/tinypool": {
+
"version": "0.8.4",
+
"resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.8.4.tgz",
+
"integrity": "sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==",
+
"dev": true,
+
"license": "MIT",
+
"engines": {
+
"node": ">=14.0.0"
+
}
+
},
+
"node_modules/tinyspy": {
+
"version": "2.2.1",
+
"resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.1.tgz",
+
"integrity": "sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==",
+
"dev": true,
+
"license": "MIT",
+
"engines": {
+
"node": ">=14.0.0"
+
}
+
},
+
"node_modules/tr46": {
+
"version": "5.1.1",
+
"resolved": "https://registry.npmjs.org/tr46/-/tr46-5.1.1.tgz",
+
"integrity": "sha512-hdF5ZgjTqgAntKkklYw0R03MG2x/bSzTtkxmIRw/sTNV8YXsCJ1tfLAX23lhxhHJlEf3CRCOCGGWw3vI3GaSPw==",
+
"license": "MIT",
+
"dependencies": {
+
"punycode": "^2.3.1"
+
},
+
"engines": {
+
"node": ">=18"
+
}
+
},
+
"node_modules/ts-node": {
+
"version": "10.9.2",
+
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz",
+
"integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"@cspotcode/source-map-support": "^0.8.0",
+
"@tsconfig/node10": "^1.0.7",
+
"@tsconfig/node12": "^1.0.7",
+
"@tsconfig/node14": "^1.0.0",
+
"@tsconfig/node16": "^1.0.2",
+
"acorn": "^8.4.1",
+
"acorn-walk": "^8.1.1",
+
"arg": "^4.1.0",
+
"create-require": "^1.1.0",
+
"diff": "^4.0.1",
+
"make-error": "^1.1.1",
+
"v8-compile-cache-lib": "^3.0.1",
+
"yn": "3.1.1"
+
},
+
"bin": {
+
"ts-node": "dist/bin.js",
+
"ts-node-cwd": "dist/bin-cwd.js",
+
"ts-node-esm": "dist/bin-esm.js",
+
"ts-node-script": "dist/bin-script.js",
+
"ts-node-transpile-only": "dist/bin-transpile.js",
+
"ts-script": "dist/bin-script-deprecated.js"
+
},
+
"peerDependencies": {
+
"@swc/core": ">=1.2.50",
+
"@swc/wasm": ">=1.2.50",
+
"@types/node": "*",
+
"typescript": ">=2.7"
+
},
+
"peerDependenciesMeta": {
+
"@swc/core": {
+
"optional": true
+
},
+
"@swc/wasm": {
+
"optional": true
+
}
+
}
+
},
+
"node_modules/type-detect": {
+
"version": "4.1.0",
+
"resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz",
+
"integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==",
+
"dev": true,
+
"license": "MIT",
+
"engines": {
+
"node": ">=4"
+
}
+
},
+
"node_modules/typescript": {
+
"version": "5.8.3",
+
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
+
"integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
+
"dev": true,
+
"license": "Apache-2.0",
+
"bin": {
+
"tsc": "bin/tsc",
+
"tsserver": "bin/tsserver"
+
},
+
"engines": {
+
"node": ">=14.17"
+
}
+
},
+
"node_modules/ufo": {
+
"version": "1.6.1",
+
"resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.1.tgz",
+
"integrity": "sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==",
+
"dev": true,
+
"license": "MIT"
+
},
+
"node_modules/undici-types": {
+
"version": "6.21.0",
+
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
+
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
+
"dev": true,
+
"license": "MIT"
+
},
+
"node_modules/v8-compile-cache-lib": {
+
"version": "3.0.1",
+
"resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
+
"integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
+
"dev": true,
+
"license": "MIT"
+
},
+
"node_modules/vite": {
+
"version": "5.4.19",
+
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.19.tgz",
+
"integrity": "sha512-qO3aKv3HoQC8QKiNSTuUM1l9o/XX3+c+VTgLHbJWHZGeTPVAg2XwazI9UWzoxjIJCGCV2zU60uqMzjeLZuULqA==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"esbuild": "^0.21.3",
+
"postcss": "^8.4.43",
+
"rollup": "^4.20.0"
+
},
+
"bin": {
+
"vite": "bin/vite.js"
+
},
+
"engines": {
+
"node": "^18.0.0 || >=20.0.0"
+
},
+
"funding": {
+
"url": "https://github.com/vitejs/vite?sponsor=1"
+
},
+
"optionalDependencies": {
+
"fsevents": "~2.3.3"
+
},
+
"peerDependencies": {
+
"@types/node": "^18.0.0 || >=20.0.0",
+
"less": "*",
+
"lightningcss": "^1.21.0",
+
"sass": "*",
+
"sass-embedded": "*",
+
"stylus": "*",
+
"sugarss": "*",
+
"terser": "^5.4.0"
+
},
+
"peerDependenciesMeta": {
+
"@types/node": {
+
"optional": true
+
},
+
"less": {
+
"optional": true
+
},
+
"lightningcss": {
+
"optional": true
+
},
+
"sass": {
+
"optional": true
+
},
+
"sass-embedded": {
+
"optional": true
+
},
+
"stylus": {
+
"optional": true
+
},
+
"sugarss": {
+
"optional": true
+
},
+
"terser": {
+
"optional": true
+
}
+
}
+
},
+
"node_modules/vite-node": {
+
"version": "1.6.1",
+
"resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.6.1.tgz",
+
"integrity": "sha512-YAXkfvGtuTzwWbDSACdJSg4A4DZiAqckWe90Zapc/sEX3XvHcw1NdurM/6od8J207tSDqNbSsgdCacBgvJKFuA==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"cac": "^6.7.14",
+
"debug": "^4.3.4",
+
"pathe": "^1.1.1",
+
"picocolors": "^1.0.0",
+
"vite": "^5.0.0"
+
},
+
"bin": {
+
"vite-node": "vite-node.mjs"
+
},
+
"engines": {
+
"node": "^18.0.0 || >=20.0.0"
+
},
+
"funding": {
+
"url": "https://opencollective.com/vitest"
+
}
+
},
+
"node_modules/vitest": {
+
"version": "1.6.1",
+
"resolved": "https://registry.npmjs.org/vitest/-/vitest-1.6.1.tgz",
+
"integrity": "sha512-Ljb1cnSJSivGN0LqXd/zmDbWEM0RNNg2t1QW/XUhYl/qPqyu7CsqeWtqQXHVaJsecLPuDoak2oJcZN2QoRIOag==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"@vitest/expect": "1.6.1",
+
"@vitest/runner": "1.6.1",
+
"@vitest/snapshot": "1.6.1",
+
"@vitest/spy": "1.6.1",
+
"@vitest/utils": "1.6.1",
+
"acorn-walk": "^8.3.2",
+
"chai": "^4.3.10",
+
"debug": "^4.3.4",
+
"execa": "^8.0.1",
+
"local-pkg": "^0.5.0",
+
"magic-string": "^0.30.5",
+
"pathe": "^1.1.1",
+
"picocolors": "^1.0.0",
+
"std-env": "^3.5.0",
+
"strip-literal": "^2.0.0",
+
"tinybench": "^2.5.1",
+
"tinypool": "^0.8.3",
+
"vite": "^5.0.0",
+
"vite-node": "1.6.1",
+
"why-is-node-running": "^2.2.2"
+
},
+
"bin": {
+
"vitest": "vitest.mjs"
+
},
+
"engines": {
+
"node": "^18.0.0 || >=20.0.0"
+
},
+
"funding": {
+
"url": "https://opencollective.com/vitest"
+
},
+
"peerDependencies": {
+
"@edge-runtime/vm": "*",
+
"@types/node": "^18.0.0 || >=20.0.0",
+
"@vitest/browser": "1.6.1",
+
"@vitest/ui": "1.6.1",
+
"happy-dom": "*",
+
"jsdom": "*"
+
},
+
"peerDependenciesMeta": {
+
"@edge-runtime/vm": {
+
"optional": true
+
},
+
"@types/node": {
+
"optional": true
+
},
+
"@vitest/browser": {
+
"optional": true
+
},
+
"@vitest/ui": {
+
"optional": true
+
},
+
"happy-dom": {
+
"optional": true
+
},
+
"jsdom": {
+
"optional": true
+
}
+
}
+
},
+
"node_modules/webidl-conversions": {
+
"version": "7.0.0",
+
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
+
"integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",
+
"license": "BSD-2-Clause",
+
"engines": {
+
"node": ">=12"
+
}
+
},
+
"node_modules/whatwg-url": {
+
"version": "14.2.0",
+
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.2.0.tgz",
+
"integrity": "sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw==",
+
"license": "MIT",
+
"dependencies": {
+
"tr46": "^5.1.0",
+
"webidl-conversions": "^7.0.0"
+
},
+
"engines": {
+
"node": ">=18"
+
}
+
},
+
"node_modules/which": {
+
"version": "2.0.2",
+
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+
"dev": true,
+
"license": "ISC",
+
"dependencies": {
+
"isexe": "^2.0.0"
+
},
+
"bin": {
+
"node-which": "bin/node-which"
+
},
+
"engines": {
+
"node": ">= 8"
+
}
+
},
+
"node_modules/why-is-node-running": {
+
"version": "2.3.0",
+
"resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz",
+
"integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==",
+
"dev": true,
+
"license": "MIT",
+
"dependencies": {
+
"siginfo": "^2.0.0",
+
"stackback": "0.0.2"
+
},
+
"bin": {
+
"why-is-node-running": "cli.js"
+
},
+
"engines": {
+
"node": ">=8"
+
}
+
},
+
"node_modules/yn": {
+
"version": "3.1.1",
+
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
+
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
+
"dev": true,
+
"license": "MIT",
+
"engines": {
+
"node": ">=6"
+
}
+
},
+
"node_modules/yocto-queue": {
+
"version": "1.2.1",
+
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.1.tgz",
+
"integrity": "sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg==",
+
"dev": true,
+
"license": "MIT",
+
"engines": {
+
"node": ">=12.20"
+
},
+
"funding": {
+
"url": "https://github.com/sponsors/sindresorhus"
+
}
+
},
+
"node_modules/zod": {
+
"version": "3.25.76",
+
"resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
+
"integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
+
"license": "MIT",
+
"funding": {
+
"url": "https://github.com/sponsors/colinhacks"
+
}
+
}
+
}
+
}
+36
package.json
···
+
{
+
"name": "mizzleorm",
+
"version": "0.0.1",
+
"description": "A lightweight, fully type-safe MongoDB ORM in TypeScript, inspired by Drizzle ORM.",
+
"main": "dist/index.js",
+
"types": "dist/index.d.ts",
+
"scripts": {
+
"build": "tsc",
+
"test": "vitest",
+
"example": "ts-node examples/user.ts"
+
},
+
"keywords": [
+
"mongodb",
+
"orm",
+
"typescript",
+
"zod",
+
"type-safe"
+
],
+
"author": "dev-shahed",
+
"license": "MIT",
+
"devDependencies": {
+
"@types/mongodb": "^4.0.7",
+
"@types/node": "^20.14.10",
+
"ts-node": "^10.9.2",
+
"typescript": "^5.5.3",
+
"vitest": "^1.6.0"
+
},
+
"dependencies": {
+
"mongodb": "^6.8.0",
+
"zod": "^3.23.8"
+
},
+
"directories": {
+
"example": "examples",
+
"test": "tests"
+
}
+
}
+85
src/client.js
···
+
"use strict";
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+
return new (P || (P = Promise))(function (resolve, reject) {
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
+
});
+
};
+
var __generator = (this && this.__generator) || function (thisArg, body) {
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+
function verb(n) { return function (v) { return step([n, v]); }; }
+
function step(op) {
+
if (f) throw new TypeError("Generator is already executing.");
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+
if (y = 0, t) op = [op[0] & 2, t.value];
+
switch (op[0]) {
+
case 0: case 1: t = op; break;
+
case 4: _.label++; return { value: op[1], done: false };
+
case 5: _.label++; y = op[1]; op = [0]; continue;
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
+
default:
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+
if (t[2]) _.ops.pop();
+
_.trys.pop(); continue;
+
}
+
op = body.call(thisArg, _);
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
+
}
+
};
+
Object.defineProperty(exports, "__esModule", { value: true });
+
exports.connect = connect;
+
exports.disconnect = disconnect;
+
exports.getDb = getDb;
+
var mongodb_1 = require("mongodb");
+
var connection = null;
+
function connect(uri, dbName) {
+
return __awaiter(this, void 0, void 0, function () {
+
var client, db;
+
return __generator(this, function (_a) {
+
switch (_a.label) {
+
case 0:
+
if (connection) {
+
return [2 /*return*/, connection];
+
}
+
client = new mongodb_1.MongoClient(uri);
+
return [4 /*yield*/, client.connect()];
+
case 1:
+
_a.sent();
+
db = client.db(dbName);
+
connection = { client: client, db: db };
+
return [2 /*return*/, connection];
+
}
+
});
+
});
+
}
+
function disconnect() {
+
return __awaiter(this, void 0, void 0, function () {
+
return __generator(this, function (_a) {
+
switch (_a.label) {
+
case 0:
+
if (!connection) return [3 /*break*/, 2];
+
return [4 /*yield*/, connection.client.close()];
+
case 1:
+
_a.sent();
+
connection = null;
+
_a.label = 2;
+
case 2: return [2 /*return*/];
+
}
+
});
+
});
+
}
+
function getDb() {
+
if (!connection) {
+
throw new Error('MongoDB not connected. Call connect() first.');
+
}
+
return connection.db;
+
}
+37
src/client.ts
···
+
import { MongoClient, Db } from 'mongodb';
+
+
interface MongoConnection {
+
client: MongoClient;
+
db: Db;
+
}
+
+
let connection: MongoConnection | null = null;
+
+
export async function connect(uri: string, dbName: string): Promise<MongoConnection> {
+
if (connection) {
+
return connection;
+
}
+
+
const client = new MongoClient(uri);
+
await client.connect();
+
const db = client.db(dbName);
+
+
connection = { client, db };
+
return connection;
+
}
+
+
export async function disconnect(): Promise<void> {
+
if (connection) {
+
await connection.client.close();
+
connection = null;
+
}
+
}
+
+
export function getDb(): Db {
+
if (!connection) {
+
throw new Error('MongoDB not connected. Call connect() first.');
+
}
+
return connection.db;
+
}
+
+
+10
src/index.js
···
+
"use strict";
+
Object.defineProperty(exports, "__esModule", { value: true });
+
exports.MongoModel = exports.disconnect = exports.connect = exports.defineModel = void 0;
+
var schema_1 = require("./schema");
+
Object.defineProperty(exports, "defineModel", { enumerable: true, get: function () { return schema_1.defineModel; } });
+
var client_1 = require("./client");
+
Object.defineProperty(exports, "connect", { enumerable: true, get: function () { return client_1.connect; } });
+
Object.defineProperty(exports, "disconnect", { enumerable: true, get: function () { return client_1.disconnect; } });
+
var model_1 = require("./model");
+
Object.defineProperty(exports, "MongoModel", { enumerable: true, get: function () { return model_1.MongoModel; } });
+5
src/index.ts
···
+
export { defineModel, InferModel, InsertType } from './schema';
+
export { connect, disconnect } from './client';
+
export { MongoModel } from './model';
+
+
+73
src/model.js
···
+
"use strict";
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+
return new (P || (P = Promise))(function (resolve, reject) {
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
+
});
+
};
+
var __generator = (this && this.__generator) || function (thisArg, body) {
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+
function verb(n) { return function (v) { return step([n, v]); }; }
+
function step(op) {
+
if (f) throw new TypeError("Generator is already executing.");
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+
if (y = 0, t) op = [op[0] & 2, t.value];
+
switch (op[0]) {
+
case 0: case 1: t = op; break;
+
case 4: _.label++; return { value: op[1], done: false };
+
case 5: _.label++; y = op[1]; op = [0]; continue;
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
+
default:
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+
if (t[2]) _.ops.pop();
+
_.trys.pop(); continue;
+
}
+
op = body.call(thisArg, _);
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
+
}
+
};
+
Object.defineProperty(exports, "__esModule", { value: true });
+
exports.MongoModel = void 0;
+
var client_1 = require("./client");
+
var MongoModel = /** @class */ (function () {
+
function MongoModel(collectionName, schema) {
+
this.collection = (0, client_1.getDb)().collection(collectionName);
+
this.schema = schema;
+
}
+
MongoModel.prototype.insertOne = function (data) {
+
return __awaiter(this, void 0, void 0, function () {
+
var validatedData;
+
return __generator(this, function (_a) {
+
validatedData = this.schema.parse(data);
+
return [2 /*return*/, this.collection.insertOne(validatedData)];
+
});
+
});
+
};
+
MongoModel.prototype.find = function (query) {
+
return this.collection.find(query).toArray();
+
};
+
MongoModel.prototype.findOne = function (query) {
+
return this.collection.findOne(query);
+
};
+
MongoModel.prototype.update = function (query, data) {
+
return __awaiter(this, void 0, void 0, function () {
+
return __generator(this, function (_a) {
+
return [2 /*return*/, this.collection.updateMany(query, { $set: data })];
+
});
+
});
+
};
+
MongoModel.prototype.delete = function (query) {
+
return this.collection.deleteMany(query);
+
};
+
return MongoModel;
+
}());
+
exports.MongoModel = MongoModel;
+37
src/model.ts
···
+
import { z } from 'zod';
+
import { Collection, InsertOneResult, UpdateResult, DeleteResult, Document, ObjectId, Filter } from 'mongodb';
+
import { getDb } from './client';
+
import { InsertType } from './schema';
+
+
export class MongoModel<T extends z.ZodObject<any>> {
+
private collection: Collection<z.infer<T>>;
+
private schema: T;
+
+
constructor(collectionName: string, schema: T) {
+
this.collection = getDb().collection<z.infer<T>>(collectionName);
+
this.schema = schema;
+
}
+
+
async insertOne(data: InsertType<T>): Promise<InsertOneResult<z.infer<T>>> {
+
const validatedData = this.schema.parse(data);
+
return this.collection.insertOne(validatedData as any);
+
}
+
+
find(query: Filter<z.infer<T>>): Promise<(z.infer<T> & { _id: ObjectId })[]> {
+
return this.collection.find(query).toArray() as Promise<(z.infer<T> & { _id: ObjectId })[]>;
+
}
+
+
findOne(query: Filter<z.infer<T>>): Promise<(z.infer<T> & { _id: ObjectId }) | null> {
+
return this.collection.findOne(query) as Promise<(z.infer<T> & { _id: ObjectId }) | null>;
+
}
+
+
async update(query: Filter<z.infer<T>>, data: Partial<z.infer<T>>): Promise<UpdateResult> {
+
return this.collection.updateMany(query, { $set: data });
+
}
+
+
delete(query: Filter<z.infer<T>>): Promise<DeleteResult> {
+
return this.collection.deleteMany(query);
+
}
+
}
+
+
+6
src/schema.js
···
+
"use strict";
+
Object.defineProperty(exports, "__esModule", { value: true });
+
exports.defineModel = defineModel;
+
function defineModel(schema) {
+
return schema;
+
}
+12
src/schema.ts
···
+
import { z } from 'zod';
+
import { ObjectId } from 'mongodb';
+
+
export function defineModel<T extends z.ZodObject<any>>(schema: T) {
+
return schema;
+
}
+
+
export type InferModel<T extends z.ZodObject<any>> = z.infer<T> & { _id?: ObjectId };
+
+
export type InsertType<T extends z.ZodObject<any>> = Omit<z.infer<T>, 'createdAt'> & { createdAt?: Date };
+
+
+128
tests/user.test.js
···
+
"use strict";
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+
return new (P || (P = Promise))(function (resolve, reject) {
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
+
});
+
};
+
var __generator = (this && this.__generator) || function (thisArg, body) {
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+
function verb(n) { return function (v) { return step([n, v]); }; }
+
function step(op) {
+
if (f) throw new TypeError("Generator is already executing.");
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+
if (y = 0, t) op = [op[0] & 2, t.value];
+
switch (op[0]) {
+
case 0: case 1: t = op; break;
+
case 4: _.label++; return { value: op[1], done: false };
+
case 5: _.label++; y = op[1]; op = [0]; continue;
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
+
default:
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+
if (t[2]) _.ops.pop();
+
_.trys.pop(); continue;
+
}
+
op = body.call(thisArg, _);
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
+
}
+
};
+
Object.defineProperty(exports, "__esModule", { value: true });
+
var zod_1 = require("zod");
+
var src_1 = require("../src");
+
var mongodb_1 = require("mongodb");
+
var userSchema = (0, src_1.defineModel)(zod_1.z.object({
+
name: zod_1.z.string(),
+
email: zod_1.z.string().email(),
+
age: zod_1.z.number().int().positive().optional(),
+
createdAt: zod_1.z.date().default(function () { return new Date(); }),
+
}));
+
function runTests() {
+
return __awaiter(this, void 0, void 0, function () {
+
var UserModel, newUser, insertResult, foundUser, updateResult, updatedUser, deleteResult, deletedUser, error_1;
+
return __generator(this, function (_a) {
+
switch (_a.label) {
+
case 0:
+
_a.trys.push([0, 9, 10, 12]);
+
return [4 /*yield*/, (0, src_1.connect)('mongodb://localhost:27017', 'mizzleorm_test_db')];
+
case 1:
+
_a.sent();
+
console.log('Connected to MongoDB for testing.');
+
UserModel = new src_1.MongoModel('users', userSchema);
+
// Clean up before tests
+
return [4 /*yield*/, UserModel.delete({})];
+
case 2:
+
// Clean up before tests
+
_a.sent();
+
console.log('Cleaned up existing data.');
+
newUser = {
+
name: 'Test User',
+
email: 'test@example.com',
+
age: 25,
+
};
+
return [4 /*yield*/, UserModel.insertOne(newUser)];
+
case 3:
+
insertResult = _a.sent();
+
console.log('Test 1 (Insert): User inserted with ID:', insertResult.insertedId);
+
if (!insertResult.insertedId) {
+
throw new Error('Test 1 Failed: User not inserted.');
+
}
+
return [4 /*yield*/, UserModel.findOne({ _id: new mongodb_1.ObjectId(insertResult.insertedId) })];
+
case 4:
+
foundUser = _a.sent();
+
console.log('Test 2 (Find One): Found user:', foundUser);
+
if (!foundUser || foundUser.email !== 'test@example.com') {
+
throw new Error('Test 2 Failed: User not found or data mismatch.');
+
}
+
return [4 /*yield*/, UserModel.update({ _id: new mongodb_1.ObjectId(insertResult.insertedId) }, { age: 26 })];
+
case 5:
+
updateResult = _a.sent();
+
console.log('Test 3 (Update): Modified count:', updateResult.modifiedCount);
+
if (updateResult.modifiedCount !== 1) {
+
throw new Error('Test 3 Failed: User not updated.');
+
}
+
return [4 /*yield*/, UserModel.findOne({ _id: new mongodb_1.ObjectId(insertResult.insertedId) })];
+
case 6:
+
updatedUser = _a.sent();
+
if (!updatedUser || updatedUser.age !== 26) {
+
throw new Error('Test 3 Failed: Updated user data mismatch.');
+
}
+
return [4 /*yield*/, UserModel.delete({ _id: new mongodb_1.ObjectId(insertResult.insertedId) })];
+
case 7:
+
deleteResult = _a.sent();
+
console.log('Test 4 (Delete): Deleted count:', deleteResult.deletedCount);
+
if (deleteResult.deletedCount !== 1) {
+
throw new Error('Test 4 Failed: User not deleted.');
+
}
+
return [4 /*yield*/, UserModel.findOne({ _id: new mongodb_1.ObjectId(insertResult.insertedId) })];
+
case 8:
+
deletedUser = _a.sent();
+
if (deletedUser) {
+
throw new Error('Test 4 Failed: User still exists after deletion.');
+
}
+
console.log('\nAll tests passed successfully!');
+
return [3 /*break*/, 12];
+
case 9:
+
error_1 = _a.sent();
+
console.error('\nTests failed:', error_1);
+
process.exit(1);
+
return [3 /*break*/, 12];
+
case 10: return [4 /*yield*/, (0, src_1.disconnect)()];
+
case 11:
+
_a.sent();
+
console.log('Disconnected from MongoDB.');
+
return [7 /*endfinally*/];
+
case 12: return [2 /*return*/];
+
}
+
});
+
});
+
}
+
runTests();
+83
tests/user.test.ts
···
+
import { z } from 'zod';
+
import { defineModel, MongoModel, connect, disconnect, InferModel, InsertType } from '../src';
+
import { ObjectId } from 'mongodb';
+
+
const userSchema = defineModel(z.object({
+
name: z.string(),
+
email: z.string().email(),
+
age: z.number().int().positive().optional(),
+
createdAt: z.date().default(() => new Date()),
+
}));
+
+
type User = InferModel<typeof userSchema>;
+
type UserInsert = InsertType<typeof userSchema>;
+
+
async function runTests() {
+
try {
+
await connect('mongodb://localhost:27017', 'mizzleorm_test_db');
+
console.log('Connected to MongoDB for testing.');
+
+
const UserModel = new MongoModel('users', userSchema);
+
+
// Clean up before tests
+
await UserModel.delete({});
+
console.log('Cleaned up existing data.');
+
+
// Test 1: Insert a new user
+
const newUser: UserInsert = {
+
name: 'Test User',
+
email: 'test@example.com',
+
age: 25,
+
};
+
const insertResult = await UserModel.insertOne(newUser);
+
console.log('Test 1 (Insert): User inserted with ID:', insertResult.insertedId);
+
if (!insertResult.insertedId) {
+
throw new Error('Test 1 Failed: User not inserted.');
+
}
+
+
// Test 2: Find the inserted user
+
const foundUser = await UserModel.findOne({ _id: new ObjectId(insertResult.insertedId) });
+
console.log('Test 2 (Find One): Found user:', foundUser);
+
if (!foundUser || foundUser.email !== 'test@example.com') {
+
throw new Error('Test 2 Failed: User not found or data mismatch.');
+
}
+
+
// Test 3: Update the user
+
const updateResult = await UserModel.update(
+
{ _id: new ObjectId(insertResult.insertedId) },
+
{ age: 26 }
+
);
+
console.log('Test 3 (Update): Modified count:', updateResult.modifiedCount);
+
if (updateResult.modifiedCount !== 1) {
+
throw new Error('Test 3 Failed: User not updated.');
+
}
+
const updatedUser = await UserModel.findOne({ _id: new ObjectId(insertResult.insertedId) });
+
if (!updatedUser || updatedUser.age !== 26) {
+
throw new Error('Test 3 Failed: Updated user data mismatch.');
+
}
+
+
// Test 4: Delete the user
+
const deleteResult = await UserModel.delete({ _id: new ObjectId(insertResult.insertedId) });
+
console.log('Test 4 (Delete): Deleted count:', deleteResult.deletedCount);
+
if (deleteResult.deletedCount !== 1) {
+
throw new Error('Test 4 Failed: User not deleted.');
+
}
+
const deletedUser = await UserModel.findOne({ _id: new ObjectId(insertResult.insertedId) });
+
if (deletedUser) {
+
throw new Error('Test 4 Failed: User still exists after deletion.');
+
}
+
+
console.log('\nAll tests passed successfully!');
+
+
} catch (error) {
+
console.error('\nTests failed:', error);
+
process.exit(1);
+
} finally {
+
await disconnect();
+
console.log('Disconnected from MongoDB.');
+
}
+
}
+
+
runTests();
+
+
+17
tsconfig.json
···
+
{
+
"compilerOptions": {
+
"target": "ES2020",
+
"module": "CommonJS",
+
"lib": ["ES2020", "DOM"],
+
"strict": true,
+
"esModuleInterop": true,
+
"skipLibCheck": true,
+
"forceConsistentCasingInFileNames": true,
+
"outDir": "./dist",
+
"declaration": true
+
},
+
"include": ["src/**/*.ts"],
+
"exclude": ["node_modules", "dist"]
+
}
+
+