@powersync/service-module-mongodb 0.8.3 → 0.9.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 +35 -0
- package/dist/api/MongoRouteAPIAdapter.d.ts +0 -1
- package/dist/api/MongoRouteAPIAdapter.js +2 -5
- package/dist/api/MongoRouteAPIAdapter.js.map +1 -1
- package/dist/replication/ChangeStream.d.ts +1 -0
- package/dist/replication/ChangeStream.js +30 -9
- package/dist/replication/ChangeStream.js.map +1 -1
- package/dist/replication/MongoRelation.d.ts +8 -1
- package/dist/replication/MongoRelation.js +12 -5
- package/dist/replication/MongoRelation.js.map +1 -1
- package/package.json +10 -11
- package/src/api/MongoRouteAPIAdapter.ts +2 -6
- package/src/replication/ChangeStream.ts +47 -11
- package/src/replication/MongoRelation.ts +17 -5
- package/test/src/change_stream_utils.ts +2 -2
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -12,7 +12,7 @@ import { METRICS_HELPER, test_utils } from '@powersync/service-core-tests';
|
|
|
12
12
|
|
|
13
13
|
import { ChangeStream, ChangeStreamOptions } from '@module/replication/ChangeStream.js';
|
|
14
14
|
import { MongoManager } from '@module/replication/MongoManager.js';
|
|
15
|
-
import { createCheckpoint } from '@module/replication/MongoRelation.js';
|
|
15
|
+
import { createCheckpoint, STANDALONE_CHECKPOINT_ID } from '@module/replication/MongoRelation.js';
|
|
16
16
|
import { NormalizedMongoConnectionConfig } from '@module/types/types.js';
|
|
17
17
|
|
|
18
18
|
import { TEST_CONNECTION_OPTIONS, clearTestDb } from './util.js';
|
|
@@ -160,7 +160,7 @@ export async function getClientCheckpoint(
|
|
|
160
160
|
options?: { timeout?: number }
|
|
161
161
|
): Promise<InternalOpId> {
|
|
162
162
|
const start = Date.now();
|
|
163
|
-
const lsn = await createCheckpoint(client, db);
|
|
163
|
+
const lsn = await createCheckpoint(client, db, STANDALONE_CHECKPOINT_ID);
|
|
164
164
|
// This old API needs a persisted checkpoint id.
|
|
165
165
|
// Since we don't use LSNs anymore, the only way to get that is to wait.
|
|
166
166
|
|