fix(core): update
This commit is contained in:
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@pushrocks/smartdata',
|
||||
version: '5.0.3',
|
||||
version: '5.0.4',
|
||||
description: 'do more with data'
|
||||
}
|
||||
|
@ -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 }
|
@ -1 +0,0 @@
|
||||
export * from './mongodescriptor.js';
|
@ -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;
|
||||
}
|
@ -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';
|
||||
}
|
||||
|
Reference in New Issue
Block a user