This commit is contained in:
Erik 2023-04-14 20:39:30 +03:00
parent b13051943d
commit 5cf42e538c
Signed by: Navy.gif
GPG Key ID: 2532FBBB61C65A68
5 changed files with 8 additions and 8 deletions

View File

@ -1,3 +1,3 @@
export { MessageBroker } from "./src/MessageBroker.js";
export { MariaDB } from './src/MariaDB.js';
export { MongoDB } from './src/MongoDB.js';
export { MessageBroker, BrokerOptions } from "./src/MessageBroker.js";
export { MariaDB, MariaOptions } from './src/MariaDB.js';
export { MongoDB, MongoOptions } from './src/MongoDB.js';

View File

@ -1,6 +1,6 @@
{
"name": "@navy.gif/wrappers",
"version": "1.2.1",
"version": "1.2.2",
"description": "Various wrapper classes I use in my projects",
"repository": "https://git.corgi.wtf/Navy.gif/wrappers.git",
"author": "Navy.gif",

View File

@ -14,7 +14,7 @@ type Credentials = {
database: string
}
type MariaOptions = {
export type MariaOptions = {
load: boolean,
cluster: PoolClusterConfig,
client: PoolConfig,

View File

@ -22,7 +22,7 @@ type QueueDef = {
maxPriority: number
}
type BrokerOptions = {
export type BrokerOptions = {
host: string,
user: string,
pass: string,

View File

@ -12,7 +12,7 @@ type Credentials = {
authDb: string
}
type MongoOptions = {
export type MongoOptions = {
credentials: Credentials,
loggerOptions: LoggerClientOptions,
client: MongoClientOptions
@ -120,7 +120,7 @@ class MongoDB {
* @returns {Array} An array containing the corresponding objects for the query
* @memberof Database
*/
async find<T extends Document> (db: string, query: object, options: object): Promise<WithId<T>[]> {
async find<T extends Document> (db: string, query: object, options?: object): Promise<WithId<T>[]> {
if (!this.#db)
throw new Error(`MongoDB not connected`);