@powersync/service-module-mongodb 0.0.0-dev-20261007110800 → 0.0.0-dev-20261015132441

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.
Files changed (54) hide show
  1. package/CHANGELOG.md +14 -11
  2. package/benchmarks/env.ts +11 -0
  3. package/benchmarks/replication_branch_throughput.benchmark.ts +240 -0
  4. package/dist/api/MongoRouteAPIAdapter.d.ts +5 -0
  5. package/dist/api/MongoRouteAPIAdapter.js +11 -4
  6. package/dist/api/MongoRouteAPIAdapter.js.map +1 -1
  7. package/dist/module/MongoModule.js +1 -0
  8. package/dist/module/MongoModule.js.map +1 -1
  9. package/dist/replication/ChangeStream.d.ts +2 -1
  10. package/dist/replication/ChangeStream.js +164 -150
  11. package/dist/replication/ChangeStream.js.map +1 -1
  12. package/dist/replication/ChangeStreamReplicationJob.js +17 -9
  13. package/dist/replication/ChangeStreamReplicationJob.js.map +1 -1
  14. package/dist/replication/MongoReplicationQueryProvider.d.ts +9 -11
  15. package/dist/replication/MongoReplicationQueryProvider.js.map +1 -1
  16. package/dist/replication/MongoReplicationStream.d.ts +37 -48
  17. package/dist/replication/MongoReplicationStream.js +157 -30
  18. package/dist/replication/MongoReplicationStream.js.map +1 -1
  19. package/dist/replication/MongoReplicationStreamTypes.d.ts +157 -0
  20. package/dist/replication/MongoReplicationStreamTypes.js +19 -0
  21. package/dist/replication/MongoReplicationStreamTypes.js.map +1 -0
  22. package/dist/replication/MongoSnapshotter.js +59 -30
  23. package/dist/replication/MongoSnapshotter.js.map +1 -1
  24. package/dist/replication/estimateFilteredSnapshotCount.d.ts +12 -0
  25. package/dist/replication/estimateFilteredSnapshotCount.js +79 -0
  26. package/dist/replication/estimateFilteredSnapshotCount.js.map +1 -0
  27. package/dist/replication/replication-index.d.ts +1 -0
  28. package/dist/replication/replication-index.js +1 -0
  29. package/dist/replication/replication-index.js.map +1 -1
  30. package/package.json +11 -10
  31. package/src/api/MongoRouteAPIAdapter.ts +12 -5
  32. package/src/module/MongoModule.ts +1 -0
  33. package/src/replication/ChangeStream.ts +183 -173
  34. package/src/replication/ChangeStreamReplicationJob.ts +16 -9
  35. package/src/replication/MongoReplicationQueryProvider.ts +9 -11
  36. package/src/replication/MongoReplicationStream.ts +196 -83
  37. package/src/replication/MongoReplicationStreamTypes.ts +169 -0
  38. package/src/replication/MongoSnapshotter.ts +64 -33
  39. package/src/replication/estimateFilteredSnapshotCount.ts +93 -0
  40. package/src/replication/replication-index.ts +1 -0
  41. package/test/src/change_event_memory.test.ts +33 -0
  42. package/test/src/change_stream_abort.test.ts +110 -0
  43. package/test/src/filtering_example.test.ts +65 -0
  44. package/test/src/filtering_lifecycle.test.ts +101 -0
  45. package/test/src/query_provider_availability.test.ts +1 -0
  46. package/test/src/query_provider_diagnostics.test.ts +55 -0
  47. package/test/src/replication_stream.test.ts +411 -34
  48. package/test/src/snapshot_count.test.ts +146 -0
  49. package/test/src/snapshot_count_integration.test.ts +70 -0
  50. package/test/src/snapshot_query_provider.test.ts +21 -2
  51. package/test/src/stream_progress.test.ts +62 -44
  52. package/test/tsconfig.json +2 -2
  53. package/tsconfig.tsbuildinfo +1 -1
  54. package/vitest.benchmark.config.ts +15 -0
@@ -0,0 +1,15 @@
1
+ import { defineConfig, mergeConfig } from 'vitest/config';
2
+ import { serviceIntegrationTestConfig } from '../test_config';
3
+
4
+ export default mergeConfig(
5
+ serviceIntegrationTestConfig(__dirname),
6
+ defineConfig({
7
+ test: {
8
+ include: ['benchmarks/*.benchmark.ts'],
9
+ pool: 'forks',
10
+ execArgv: ['--expose-gc'],
11
+ maxWorkers: 1,
12
+ fileParallelism: false
13
+ }
14
+ })
15
+ );