@@ -5,11 +5,18 @@ use std::{
55} ;
66
77use clap:: { Args , Parser , Subcommand } ;
8- use convex_cdc_core:: {
8+ use convex_export_s3:: {
9+ publish:: { publish_staging_to_s3, PublishS3Options } ,
10+ service:: { run_service, RunOptions } ,
11+ sink:: parquet:: ParquetRawChangeLogWriter ,
12+ staging:: materialize:: { MaterializeStagingOptions , StagingMaterializer } ,
13+ } ;
14+ use convex_sync_core:: {
915 config:: { ConvexConnectionConfig , OutputConfig , OutputFormat } ,
1016 convex:: { client:: ConvexClient , schemas:: JsonSchemasQuery } ,
1117 errors:: AppResult ,
1218 model:: schema:: SchemaCatalog ,
19+ output:: { write_jsonl_stream, write_value} ,
1320 state:: checkpoint_store:: FileCheckpointStore ,
1421 sync:: {
1522 delta_sync:: { fetch_delta_events, DeltaSyncOptions } ,
@@ -18,15 +25,6 @@ use convex_cdc_core::{
1825 } ,
1926 telemetry:: { logging, metrics} ,
2027} ;
21- use convex_target_s3:: {
22- publish:: { publish_staging_to_s3, PublishS3Options } ,
23- service:: { run_service, RunOptions } ,
24- sink:: {
25- jsonl:: { write_jsonl_stream, write_value} ,
26- parquet:: ParquetRawChangeLogWriter ,
27- } ,
28- staging:: materialize:: { MaterializeStagingOptions , StagingMaterializer } ,
29- } ;
3028use url:: Url ;
3129
3230const CLI_VERSION : & str = match option_env ! ( "CONVEX_SYNC_VERSION" ) {
@@ -246,7 +244,7 @@ async fn handle_snapshot(client: &ConvexClient, args: SnapshotArgs) -> AppResult
246244 let mut writer = open_writer ( & output) ?;
247245 if args. raw {
248246 let response = client
249- . list_snapshot ( & convex_cdc_core :: convex:: snapshot:: ListSnapshotQuery {
247+ . list_snapshot ( & convex_sync_core :: convex:: snapshot:: ListSnapshotQuery {
250248 snapshot : args. snapshot ,
251249 cursor : args. cursor ,
252250 table_name : args. table_name ,
@@ -287,7 +285,7 @@ async fn handle_deltas(client: &ConvexClient, args: DeltasArgs) -> AppResult<()>
287285 let mut writer = open_writer ( & output) ?;
288286 if args. raw {
289287 let response = client
290- . document_deltas ( & convex_cdc_core :: convex:: deltas:: DocumentDeltasQuery {
288+ . document_deltas ( & convex_sync_core :: convex:: deltas:: DocumentDeltasQuery {
291289 cursor : args. cursor ,
292290 table_name : args. table_name ,
293291 } )
@@ -394,10 +392,10 @@ async fn load_schema_catalog(client: &ConvexClient) -> AppResult<SchemaCatalog>
394392
395393fn build_client ( connection : & ConnectionArgs ) -> AppResult < ConvexClient > {
396394 let deployment_url = connection. deployment_url . clone ( ) . ok_or (
397- convex_cdc_core :: errors:: AppError :: MissingRequiredConfig ( "CONVEX_DEPLOYMENT_URL" ) ,
395+ convex_sync_core :: errors:: AppError :: MissingRequiredConfig ( "CONVEX_DEPLOYMENT_URL" ) ,
398396 ) ?;
399397 let deploy_key = connection. deploy_key . clone ( ) . ok_or (
400- convex_cdc_core :: errors:: AppError :: MissingRequiredConfig ( "CONVEX_DEPLOY_KEY" ) ,
398+ convex_sync_core :: errors:: AppError :: MissingRequiredConfig ( "CONVEX_DEPLOY_KEY" ) ,
401399 ) ?;
402400 ConvexClient :: new ( ConvexConnectionConfig :: new ( deployment_url, deploy_key) ?)
403401}
0 commit comments