From fe065b966f5a905c2f544786f8d7749c8c1b721c Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Sun, 5 Jun 2022 17:18:13 +0200 Subject: [PATCH] fix(core): update --- package-lock.json | 30 +++++++++++++++--------------- package.json | 2 +- ts/00_commitinfo_data.ts | 2 +- ts/index.ts | 4 +++- ts/interfaces/index.ts | 1 - ts/interfaces/mongodescriptor.ts | 22 ---------------------- ts/smartdata.classes.db.ts | 5 ++--- 7 files changed, 22 insertions(+), 44 deletions(-) delete mode 100644 ts/interfaces/index.ts delete mode 100644 ts/interfaces/mongodescriptor.ts diff --git a/package-lock.json b/package-lock.json index a33daee..ae2cc2d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@pushrocks/smartrx": "^2.0.25", "@pushrocks/smartstring": "^4.0.2", "@pushrocks/smartunique": "^3.0.3", - "@tsclass/tsclass": "^4.0.2", + "@tsclass/tsclass": "^4.0.3", "@types/lodash": "^4.14.182", "@types/mongodb": "^4.0.7", "lodash": "^4.17.21", @@ -1166,12 +1166,12 @@ } }, "node_modules/@tsclass/tsclass": { - "version": "4.0.2", - "resolved": "https://verdaccio.lossless.one/@tsclass%2ftsclass/-/tsclass-4.0.2.tgz", - "integrity": "sha512-f3r1P2+h3upZboMrWqr9KrkK5V1DtiiSlImeHTQmnhdYlxRykarciV2ssDPGY0J8w44pkWKgYG2dkuypIbSj1w==", + "version": "4.0.3", + "resolved": "https://verdaccio.lossless.one/@tsclass%2ftsclass/-/tsclass-4.0.3.tgz", + "integrity": "sha512-dvi+8IncskjJ2ApXg5AyqEa+C5KkXtRPXYmh3MKr5BCdBitJjPQ6Rni3EBaGlD9RTYMCvjmHUNjwJub0b3GDMA==", "license": "MIT", "dependencies": { - "type-fest": "^2.9.0" + "type-fest": "^2.13.0" } }, "node_modules/@tsconfig/node10": { @@ -5835,9 +5835,9 @@ "license": "0BSD" }, "node_modules/type-fest": { - "version": "2.12.2", - "resolved": "https://verdaccio.lossless.one/type-fest/-/type-fest-2.12.2.tgz", - "integrity": "sha512-qt6ylCGpLjZ7AaODxbpyBZSs9fCI9SkL3Z9q2oxMBQhs/uyY+VD8jHA8ULCGmWQJlBgqvO3EJeAngOHD8zQCrQ==", + "version": "2.13.0", + "resolved": "https://verdaccio.lossless.one/type-fest/-/type-fest-2.13.0.tgz", + "integrity": "sha512-lPfAm42MxE4/456+QyIaaVBAwgpJb6xZ8PRu09utnhPdWwcyj9vgy6Sq0Z5yNbJ21EdxB5dRU/Qg8bsyAMtlcw==", "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=12.20" @@ -7272,11 +7272,11 @@ } }, "@tsclass/tsclass": { - "version": "4.0.2", - "resolved": "https://verdaccio.lossless.one/@tsclass%2ftsclass/-/tsclass-4.0.2.tgz", - "integrity": "sha512-f3r1P2+h3upZboMrWqr9KrkK5V1DtiiSlImeHTQmnhdYlxRykarciV2ssDPGY0J8w44pkWKgYG2dkuypIbSj1w==", + "version": "4.0.3", + "resolved": "https://verdaccio.lossless.one/@tsclass%2ftsclass/-/tsclass-4.0.3.tgz", + "integrity": "sha512-dvi+8IncskjJ2ApXg5AyqEa+C5KkXtRPXYmh3MKr5BCdBitJjPQ6Rni3EBaGlD9RTYMCvjmHUNjwJub0b3GDMA==", "requires": { - "type-fest": "^2.9.0" + "type-fest": "^2.13.0" } }, "@tsconfig/node10": { @@ -10489,9 +10489,9 @@ "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" }, "type-fest": { - "version": "2.12.2", - "resolved": "https://verdaccio.lossless.one/type-fest/-/type-fest-2.12.2.tgz", - "integrity": "sha512-qt6ylCGpLjZ7AaODxbpyBZSs9fCI9SkL3Z9q2oxMBQhs/uyY+VD8jHA8ULCGmWQJlBgqvO3EJeAngOHD8zQCrQ==" + "version": "2.13.0", + "resolved": "https://verdaccio.lossless.one/type-fest/-/type-fest-2.13.0.tgz", + "integrity": "sha512-lPfAm42MxE4/456+QyIaaVBAwgpJb6xZ8PRu09utnhPdWwcyj9vgy6Sq0Z5yNbJ21EdxB5dRU/Qg8bsyAMtlcw==" }, "type-is": { "version": "1.6.18", diff --git a/package.json b/package.json index ebfc9c1..56ee524 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "@pushrocks/smartrx": "^2.0.25", "@pushrocks/smartstring": "^4.0.2", "@pushrocks/smartunique": "^3.0.3", - "@tsclass/tsclass": "^4.0.2", + "@tsclass/tsclass": "^4.0.3", "@types/lodash": "^4.14.182", "@types/mongodb": "^4.0.7", "lodash": "^4.17.21", diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 0524a42..614e418 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@pushrocks/smartdata', - version: '5.0.3', + version: '5.0.4', description: 'do more with data' } diff --git a/ts/index.ts b/ts/index.ts index fcdd7cf..d530882 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -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 } \ No newline at end of file diff --git a/ts/interfaces/index.ts b/ts/interfaces/index.ts deleted file mode 100644 index 15635b5..0000000 --- a/ts/interfaces/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './mongodescriptor.js'; diff --git a/ts/interfaces/mongodescriptor.ts b/ts/interfaces/mongodescriptor.ts deleted file mode 100644 index ccb6dc5..0000000 --- a/ts/interfaces/mongodescriptor.ts +++ /dev/null @@ -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 in the connection string - */ - mongoDbPass?: string; -} diff --git a/ts/smartdata.classes.db.ts b/ts/smartdata.classes.db.ts index 1341779..45e68fb 100644 --- a/ts/smartdata.classes.db.ts +++ b/ts/smartdata.classes.db.ts @@ -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>(); - constructor(smartdataOptions: IMongoDescriptor) { + constructor(smartdataOptions: plugins.tsclass.database.IMongoDescriptor) { this.smartdataOptions = smartdataOptions; this.status = 'initial'; }