@powersync/service-module-mongodb 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/dist/api/MongoRouteAPIAdapter.d.ts +1 -1
- package/dist/api/MongoRouteAPIAdapter.js +3 -3
- package/dist/api/MongoRouteAPIAdapter.js.map +1 -1
- package/dist/replication/ChangeStream.d.ts +1 -1
- package/dist/replication/ChangeStream.js +3 -3
- package/dist/replication/ChangeStream.js.map +1 -1
- package/dist/replication/ChangeStreamReplicationJob.js +2 -2
- package/dist/replication/ChangeStreamReplicationJob.js.map +1 -1
- package/dist/replication/MongoManager.d.ts +1 -1
- package/dist/replication/MongoManager.js +1 -1
- package/dist/replication/MongoManager.js.map +1 -1
- package/dist/replication/MongoRelation.d.ts +1 -1
- package/dist/replication/MongoRelation.js +1 -1
- package/dist/replication/MongoRelation.js.map +1 -1
- package/package.json +7 -7
- package/src/api/MongoRouteAPIAdapter.ts +4 -3
- package/src/replication/ChangeStream.ts +3 -3
- package/src/replication/ChangeStreamReplicationJob.ts +3 -4
- package/src/replication/MongoManager.ts +2 -1
- package/src/replication/MongoRelation.ts +3 -2
- package/test/src/change_stream.test.ts +13 -7
- package/test/src/change_stream_utils.ts +4 -3
- package/test/src/env.ts +4 -1
- package/test/src/mongo_test.test.ts +5 -4
- package/test/src/setup.ts +5 -0
- package/test/src/slow_tests.test.ts +15 -4
- package/test/src/util.ts +8 -3
- package/tsconfig.tsbuildinfo +1 -1
package/test/src/util.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { mongo } from '@powersync/lib-service-mongodb';
|
|
3
2
|
import * as mongo_storage from '@powersync/service-module-mongodb-storage';
|
|
4
|
-
import * as
|
|
3
|
+
import * as postgres_storage from '@powersync/service-module-postgres-storage';
|
|
4
|
+
|
|
5
|
+
import * as types from '@module/types/types.js';
|
|
5
6
|
import { env } from './env.js';
|
|
6
7
|
|
|
7
8
|
export const TEST_URI = env.MONGO_TEST_DATA_URL;
|
|
@@ -16,6 +17,10 @@ export const INITIALIZED_MONGO_STORAGE_FACTORY = mongo_storage.MongoTestStorageF
|
|
|
16
17
|
isCI: env.CI
|
|
17
18
|
});
|
|
18
19
|
|
|
20
|
+
export const INITIALIZED_POSTGRES_STORAGE_FACTORY = postgres_storage.PostgresTestStorageFactoryGenerator({
|
|
21
|
+
url: env.PG_STORAGE_TEST_URL
|
|
22
|
+
});
|
|
23
|
+
|
|
19
24
|
export async function clearTestDb(db: mongo.Db) {
|
|
20
25
|
await db.dropDatabase();
|
|
21
26
|
}
|