fix(core): update

This commit is contained in:
Philipp Kunz 2022-06-14 22:02:57 +02:00
parent f726cf4c5b
commit 2fcd3f1550
4 changed files with 1190 additions and 654 deletions

1821
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -21,26 +21,27 @@
}, },
"homepage": "https://gitlab.com/pushrocks/smartdata#README", "homepage": "https://gitlab.com/pushrocks/smartdata#README",
"dependencies": { "dependencies": {
"@pushrocks/lik": "^5.0.4", "@pushrocks/lik": "^6.0.0",
"@pushrocks/smartdelay": "^2.0.13", "@pushrocks/smartdelay": "^2.0.13",
"@pushrocks/smartlog": "^2.0.44", "@pushrocks/smartlog": "^2.0.44",
"@pushrocks/smartmongo": "^2.0.1", "@pushrocks/smartmongo": "^2.0.7",
"@pushrocks/smartpromise": "^3.1.7", "@pushrocks/smartpromise": "^3.1.7",
"@pushrocks/smartrx": "^2.0.25", "@pushrocks/smartrx": "^2.0.25",
"@pushrocks/smartstring": "^4.0.2", "@pushrocks/smartstring": "^4.0.2",
"@pushrocks/smartunique": "^3.0.3", "@pushrocks/smartunique": "^3.0.3",
"@tsclass/tsclass": "^4.0.3", "@tsclass/tsclass": "^4.0.8",
"@types/lodash": "^4.14.182", "@types/lodash": "^4.14.182",
"@types/mongodb": "^4.0.7", "@types/mongodb": "^4.0.7",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"mongodb": "^4.6.0" "mongodb": "^4.7.0"
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.61", "@gitzone/tsbuild": "^2.1.63",
"@gitzone/tsrun": "^1.2.37",
"@gitzone/tstest": "^1.0.71", "@gitzone/tstest": "^1.0.71",
"@pushrocks/qenv": "^4.0.10", "@pushrocks/qenv": "^4.0.10",
"@pushrocks/tapbundle": "^5.0.3", "@pushrocks/tapbundle": "^5.0.3",
"@types/node": "^17.0.34", "@types/node": "^17.0.42",
"@types/shortid": "0.0.29" "@types/shortid": "0.0.29"
}, },
"files": [ "files": [

View File

@ -55,6 +55,9 @@ class Car extends smartdata.SmartDataDbDoc<Car, Car> {
@smartdata.svDb() @smartdata.svDb()
public brand: string; public brand: string;
@smartdata.svDb()
public testBuffer = Buffer.from('hello');
@smartdata.svDb() @smartdata.svDb()
deepData = { deepData = {
sodeep: 'yes', sodeep: 'yes',
@ -67,7 +70,7 @@ class Car extends smartdata.SmartDataDbDoc<Car, Car> {
} }
} }
tap.test('should save the car to the db', async () => { tap.test('should save the car to the db', async (toolsArg) => {
const myCar = new Car('red', 'Volvo'); const myCar = new Car('red', 'Volvo');
await myCar.save(); await myCar.save();
@ -75,6 +78,9 @@ tap.test('should save the car to the db', async () => {
await myCar2.save(); await myCar2.save();
let counter = 0; let counter = 0;
const gottenCarInstance = await Car.getInstance({});
console.log(gottenCarInstance.testBuffer);
process.memoryUsage(); process.memoryUsage();
do { do {
const myCar3 = new Car('red', 'Renault'); const myCar3 = new Car('red', 'Renault');

View File

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