v1.2.2
This commit is contained in:
parent
b13051943d
commit
5cf42e538c
6
index.ts
6
index.ts
@ -1,3 +1,3 @@
|
|||||||
export { MessageBroker } from "./src/MessageBroker.js";
|
export { MessageBroker, BrokerOptions } from "./src/MessageBroker.js";
|
||||||
export { MariaDB } from './src/MariaDB.js';
|
export { MariaDB, MariaOptions } from './src/MariaDB.js';
|
||||||
export { MongoDB } from './src/MongoDB.js';
|
export { MongoDB, MongoOptions } from './src/MongoDB.js';
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@navy.gif/wrappers",
|
"name": "@navy.gif/wrappers",
|
||||||
"version": "1.2.1",
|
"version": "1.2.2",
|
||||||
"description": "Various wrapper classes I use in my projects",
|
"description": "Various wrapper classes I use in my projects",
|
||||||
"repository": "https://git.corgi.wtf/Navy.gif/wrappers.git",
|
"repository": "https://git.corgi.wtf/Navy.gif/wrappers.git",
|
||||||
"author": "Navy.gif",
|
"author": "Navy.gif",
|
||||||
|
@ -14,7 +14,7 @@ type Credentials = {
|
|||||||
database: string
|
database: string
|
||||||
}
|
}
|
||||||
|
|
||||||
type MariaOptions = {
|
export type MariaOptions = {
|
||||||
load: boolean,
|
load: boolean,
|
||||||
cluster: PoolClusterConfig,
|
cluster: PoolClusterConfig,
|
||||||
client: PoolConfig,
|
client: PoolConfig,
|
||||||
|
@ -22,7 +22,7 @@ type QueueDef = {
|
|||||||
maxPriority: number
|
maxPriority: number
|
||||||
}
|
}
|
||||||
|
|
||||||
type BrokerOptions = {
|
export type BrokerOptions = {
|
||||||
host: string,
|
host: string,
|
||||||
user: string,
|
user: string,
|
||||||
pass: string,
|
pass: string,
|
||||||
|
@ -12,7 +12,7 @@ type Credentials = {
|
|||||||
authDb: string
|
authDb: string
|
||||||
}
|
}
|
||||||
|
|
||||||
type MongoOptions = {
|
export type MongoOptions = {
|
||||||
credentials: Credentials,
|
credentials: Credentials,
|
||||||
loggerOptions: LoggerClientOptions,
|
loggerOptions: LoggerClientOptions,
|
||||||
client: MongoClientOptions
|
client: MongoClientOptions
|
||||||
@ -120,7 +120,7 @@ class MongoDB {
|
|||||||
* @returns {Array} An array containing the corresponding objects for the query
|
* @returns {Array} An array containing the corresponding objects for the query
|
||||||
* @memberof Database
|
* @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)
|
if (!this.#db)
|
||||||
throw new Error(`MongoDB not connected`);
|
throw new Error(`MongoDB not connected`);
|
||||||
|
Loading…
Reference in New Issue
Block a user