fix(core): update

This commit is contained in:
2022-06-05 17:18:13 +02:00
parent 811e2490b8
commit fe065b966f
7 changed files with 22 additions and 44 deletions

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@pushrocks/smartdata',
version: '5.0.3',
version: '5.0.4',
description: 'do more with data'
}

View File

@ -4,4 +4,6 @@ export * from './smartdata.classes.doc.js';
export * from './smartdata.classes.easystore.js';
export * from './smartdata.classes.cursor.js';
export type { IMongoDescriptor } from './interfaces/index.js';
import * as plugins from './smartdata.plugins.js';
type IMongoDescriptor = plugins.tsclass.database.IMongoDescriptor;
export type { IMongoDescriptor }

View File

@ -1 +0,0 @@
export * from './mongodescriptor.js';

View File

@ -1,22 +0,0 @@
export interface IMongoDescriptor {
/**
* the URL to connect to
*/
mongoDbUrl: string;
/**
* the db to use for the project
*/
mongoDbName?: string;
/**
* a username to use to connect to the database
*/
mongoDbUser?: string;
/**
* an optional password that will be replace <PASSWORD> in the connection string
*/
mongoDbPass?: string;
}

View File

@ -5,7 +5,6 @@ import { SmartdataCollection } from './smartdata.classes.collection.js';
import { EasyStore } from './smartdata.classes.easystore.js';
import { logger } from './smartdata.logging.js';
import { IMongoDescriptor } from './interfaces/index.js';
/**
* interface - indicates the connection status of the db
@ -13,13 +12,13 @@ import { IMongoDescriptor } from './interfaces/index.js';
export type TConnectionStatus = 'initial' | 'disconnected' | 'connected' | 'failed';
export class SmartdataDb {
smartdataOptions: IMongoDescriptor;
smartdataOptions: plugins.tsclass.database.IMongoDescriptor;
mongoDbClient: plugins.mongodb.MongoClient;
mongoDb: plugins.mongodb.Db;
status: TConnectionStatus;
smartdataCollectionMap = new ObjectMap<SmartdataCollection<any>>();
constructor(smartdataOptions: IMongoDescriptor) {
constructor(smartdataOptions: plugins.tsclass.database.IMongoDescriptor) {
this.smartdataOptions = smartdataOptions;
this.status = 'initial';
}