From 5cf42e538c1bfcd3fc8aa4ffaecbebdc1b95f7a2 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Fri, 14 Apr 2023 20:39:30 +0300 Subject: [PATCH] v1.2.2 --- index.ts | 6 +++--- package.json | 2 +- src/MariaDB.ts | 2 +- src/MessageBroker.ts | 2 +- src/MongoDB.ts | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/index.ts b/index.ts index 1945314..2bfcddc 100644 --- a/index.ts +++ b/index.ts @@ -1,3 +1,3 @@ -export { MessageBroker } from "./src/MessageBroker.js"; -export { MariaDB } from './src/MariaDB.js'; -export { MongoDB } from './src/MongoDB.js'; \ No newline at end of file +export { MessageBroker, BrokerOptions } from "./src/MessageBroker.js"; +export { MariaDB, MariaOptions } from './src/MariaDB.js'; +export { MongoDB, MongoOptions } from './src/MongoDB.js'; \ No newline at end of file diff --git a/package.json b/package.json index d164748..a74106a 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/MariaDB.ts b/src/MariaDB.ts index c1db9a8..9937811 100644 --- a/src/MariaDB.ts +++ b/src/MariaDB.ts @@ -14,7 +14,7 @@ type Credentials = { database: string } -type MariaOptions = { +export type MariaOptions = { load: boolean, cluster: PoolClusterConfig, client: PoolConfig, diff --git a/src/MessageBroker.ts b/src/MessageBroker.ts index fd0b10b..cdedc9e 100644 --- a/src/MessageBroker.ts +++ b/src/MessageBroker.ts @@ -22,7 +22,7 @@ type QueueDef = { maxPriority: number } -type BrokerOptions = { +export type BrokerOptions = { host: string, user: string, pass: string, diff --git a/src/MongoDB.ts b/src/MongoDB.ts index a126433..d80d3fc 100644 --- a/src/MongoDB.ts +++ b/src/MongoDB.ts @@ -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 (db: string, query: object, options: object): Promise[]> { + async find (db: string, query: object, options?: object): Promise[]> { if (!this.#db) throw new Error(`MongoDB not connected`);