File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
packages/service-core/src/entry/commands Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,7 @@ import { Command } from 'commander';
22
33import { logger } from '@powersync/lib-services-framework' ;
44import * as v8 from 'v8' ;
5- import { mongo } from '../../db/db-index.js' ;
6- import { MongoBucketStorage , PowerSyncMongo } from '../../storage/storage-index.js' ;
5+ import { createPowerSyncMongo , MongoBucketStorage } from '../../storage/storage-index.js' ;
76import { loadConfig } from '../../util/config.js' ;
87import { extractRunnerOptions , wrapConfigCommand } from './config-command.js' ;
98
@@ -31,10 +30,10 @@ export function registerCompactAction(program: Command) {
3130
3231 const config = await loadConfig ( runnerConfig ) ;
3332 const { storage } = config ;
34- const client = mongo . createMongoClient ( storage ) ;
33+ const psdb = createPowerSyncMongo ( storage ) ;
34+ const client = psdb . client ;
3535 await client . connect ( ) ;
3636 try {
37- const psdb = new PowerSyncMongo ( client , { database : storage . database } ) ;
3837 const bucketStorage = new MongoBucketStorage ( psdb , { slot_name_prefix : config . slot_name_prefix } ) ;
3938 const active = await bucketStorage . getActiveSyncRules ( ) ;
4039 if ( active == null ) {
You can’t perform that action at this time.
0 commit comments