Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
811e2490b8 | |||
206ccd40e9 | |||
055298172f | |||
278f3c8169 |
18
package-lock.json
generated
18
package-lock.json
generated
@ -1,18 +1,18 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartdata",
|
"name": "@pushrocks/smartdata",
|
||||||
"version": "5.0.1",
|
"version": "5.0.3",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@pushrocks/smartdata",
|
"name": "@pushrocks/smartdata",
|
||||||
"version": "5.0.1",
|
"version": "5.0.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/lik": "^5.0.4",
|
"@pushrocks/lik": "^5.0.4",
|
||||||
"@pushrocks/smartdelay": "^2.0.13",
|
"@pushrocks/smartdelay": "^2.0.13",
|
||||||
"@pushrocks/smartlog": "^2.0.44",
|
"@pushrocks/smartlog": "^2.0.44",
|
||||||
"@pushrocks/smartmongo": "^2.0.0",
|
"@pushrocks/smartmongo": "^2.0.1",
|
||||||
"@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",
|
||||||
@ -802,9 +802,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@pushrocks/smartmongo": {
|
"node_modules/@pushrocks/smartmongo": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.1",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartmongo/-/smartmongo-2.0.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartmongo/-/smartmongo-2.0.1.tgz",
|
||||||
"integrity": "sha512-YDUDQqU3ReLJvZi3CJXqn5LULOrhKdpShvSnYx4fLqCyBoP0sDA3SBP5L2arTmF5IlrhreWqBL5AX3Guegt5jQ==",
|
"integrity": "sha512-apKedLxGTd5HO6Ke43ZknA4aMI+3tTNBXAzyalHgxh+b/p5fx62mCbgpxpR5EOXfxpPiHk7eaDip6k06a2hw1Q==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/smartdata": "^4.0.27",
|
"@pushrocks/smartdata": "^4.0.27",
|
||||||
@ -6941,9 +6941,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smartmongo": {
|
"@pushrocks/smartmongo": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.1",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartmongo/-/smartmongo-2.0.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartmongo/-/smartmongo-2.0.1.tgz",
|
||||||
"integrity": "sha512-YDUDQqU3ReLJvZi3CJXqn5LULOrhKdpShvSnYx4fLqCyBoP0sDA3SBP5L2arTmF5IlrhreWqBL5AX3Guegt5jQ==",
|
"integrity": "sha512-apKedLxGTd5HO6Ke43ZknA4aMI+3tTNBXAzyalHgxh+b/p5fx62mCbgpxpR5EOXfxpPiHk7eaDip6k06a2hw1Q==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/smartdata": "^4.0.27",
|
"@pushrocks/smartdata": "^4.0.27",
|
||||||
"@pushrocks/smartpromise": "^3.1.7",
|
"@pushrocks/smartpromise": "^3.1.7",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartdata",
|
"name": "@pushrocks/smartdata",
|
||||||
"version": "5.0.1",
|
"version": "5.0.3",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "do more with data",
|
"description": "do more with data",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
@ -24,7 +24,7 @@
|
|||||||
"@pushrocks/lik": "^5.0.4",
|
"@pushrocks/lik": "^5.0.4",
|
||||||
"@pushrocks/smartdelay": "^2.0.13",
|
"@pushrocks/smartdelay": "^2.0.13",
|
||||||
"@pushrocks/smartlog": "^2.0.44",
|
"@pushrocks/smartlog": "^2.0.44",
|
||||||
"@pushrocks/smartmongo": "^2.0.0",
|
"@pushrocks/smartmongo": "^2.0.1",
|
||||||
"@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",
|
||||||
|
@ -19,13 +19,13 @@ let testDb: smartdata.SmartdataDb;
|
|||||||
|
|
||||||
const totalCars = 2000;
|
const totalCars = 2000;
|
||||||
|
|
||||||
tap.skip.test('should create a testinstance as database', async () => {
|
tap.test('should create a testinstance as database', async () => {
|
||||||
smartmongoInstance = await smartmongo.SmartMongo.createAndStart();
|
smartmongoInstance = await smartmongo.SmartMongo.createAndStart();
|
||||||
testDb = new smartdata.SmartdataDb(await smartmongoInstance.getMongoDescriptor());
|
testDb = new smartdata.SmartdataDb(await smartmongoInstance.getMongoDescriptor());
|
||||||
await testDb.init();
|
await testDb.init();
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should connect to atlas', async (tools) => {
|
tap.skip.test('should connect to atlas', async (tools) => {
|
||||||
const databaseName = `test-smartdata-${smartunique.shortId()}`;
|
const databaseName = `test-smartdata-${smartunique.shortId()}`;
|
||||||
testDb = new smartdata.SmartdataDb({
|
testDb = new smartdata.SmartdataDb({
|
||||||
mongoDbUrl: testQenv.getEnvVarOnDemand('MONGO_URL'),
|
mongoDbUrl: testQenv.getEnvVarOnDemand('MONGO_URL'),
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@pushrocks/smartdata',
|
name: '@pushrocks/smartdata',
|
||||||
version: '5.0.1',
|
version: '5.0.3',
|
||||||
description: 'do more with data'
|
description: 'do more with data'
|
||||||
}
|
}
|
||||||
|
@ -11,11 +11,11 @@ export class SmartdataDbWatcher<T = any> {
|
|||||||
// INSTANCE
|
// INSTANCE
|
||||||
private changeStream: plugins.mongodb.ChangeStream<T>;
|
private changeStream: plugins.mongodb.ChangeStream<T>;
|
||||||
|
|
||||||
public changeSubject = new plugins.smartrx.rxjs.Subject<SmartDataDbDoc<T, T>>();
|
public changeSubject = new plugins.smartrx.rxjs.Subject<T>();
|
||||||
constructor(changeStreamArg: plugins.mongodb.ChangeStream<T>, smartdataDbDocArg: typeof SmartDataDbDoc) {
|
constructor(changeStreamArg: plugins.mongodb.ChangeStream<T>, smartdataDbDocArg: typeof SmartDataDbDoc) {
|
||||||
this.changeStream = changeStreamArg;
|
this.changeStream = changeStreamArg;
|
||||||
this.changeStream.on('change', async (item: T) => {
|
this.changeStream.on('change', async (item: T) => {
|
||||||
this.changeSubject.next(smartdataDbDocArg.createInstanceFromMongoDbNativeDoc(item));
|
this.changeSubject.next(smartdataDbDocArg.createInstanceFromMongoDbNativeDoc(item) as any as T);
|
||||||
})
|
})
|
||||||
plugins.smartdelay.delayFor(0).then(() => {
|
plugins.smartdelay.delayFor(0).then(() => {
|
||||||
this.readyDeferred.resolve();
|
this.readyDeferred.resolve();
|
||||||
|
Reference in New Issue
Block a user