@powersync/service-core 1.27.0 → 1.27.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 +43 -0
- package/dist/api/RouteAPI.d.ts +8 -1
- package/dist/api/api-index.d.ts +1 -0
- package/dist/api/api-index.js +1 -0
- package/dist/api/api-index.js.map +1 -1
- package/dist/api/diagnostics.js +33 -16
- package/dist/api/diagnostics.js.map +1 -1
- package/dist/api/source-capabilities.d.ts +7 -0
- package/dist/api/source-capabilities.js +23 -0
- package/dist/api/source-capabilities.js.map +1 -0
- package/dist/auth/JwtPayload.d.ts +2 -2
- package/dist/auth/JwtPayload.js +2 -2
- package/dist/auth/JwtPayload.js.map +1 -1
- package/dist/replication/AbstractReplicationJob.d.ts +4 -6
- package/dist/replication/AbstractReplicationJob.js.map +1 -1
- package/dist/replication/AbstractReplicator.d.ts +15 -0
- package/dist/replication/AbstractReplicator.js +35 -3
- package/dist/replication/AbstractReplicator.js.map +1 -1
- package/dist/replication/ReplicationModule.js +13 -2
- package/dist/replication/ReplicationModule.js.map +1 -1
- package/dist/routes/configure-fastify.d.ts +39 -27
- package/dist/routes/endpoints/admin.d.ts +78 -54
- package/dist/routes/endpoints/admin.js +23 -9
- package/dist/routes/endpoints/admin.js.map +1 -1
- package/dist/routes/endpoints/sync-rules.js +39 -6
- package/dist/routes/endpoints/sync-rules.js.map +1 -1
- package/dist/storage/BucketStorageFactory.d.ts +11 -1
- package/dist/storage/BucketStorageFactory.js +22 -2
- package/dist/storage/BucketStorageFactory.js.map +1 -1
- package/dist/storage/PersistedSyncConfigContent.d.ts +2 -1
- package/dist/storage/PersistedSyncConfigContent.js.map +1 -1
- package/dist/storage/StorageProvider.d.ts +3 -0
- package/dist/storage/SyncRulesBucketStorage.d.ts +1 -1
- package/dist/storage/implementation/IncrementalReprocessingCompatibility.js +5 -1
- package/dist/storage/implementation/IncrementalReprocessingCompatibility.js.map +1 -1
- package/package.json +11 -11
- package/src/api/RouteAPI.ts +9 -1
- package/src/api/api-index.ts +1 -0
- package/src/api/diagnostics.ts +30 -14
- package/src/api/source-capabilities.ts +24 -0
- package/src/auth/JwtPayload.ts +2 -2
- package/src/replication/AbstractReplicationJob.ts +2 -4
- package/src/replication/AbstractReplicator.ts +44 -3
- package/src/replication/ReplicationModule.ts +12 -2
- package/src/routes/endpoints/admin.ts +28 -10
- package/src/routes/endpoints/sync-rules.ts +42 -9
- package/src/storage/BucketStorageFactory.ts +22 -2
- package/src/storage/PersistedSyncConfigContent.ts +3 -0
- package/src/storage/StorageProvider.ts +3 -0
- package/src/storage/SyncRulesBucketStorage.ts +1 -1
- package/src/storage/implementation/IncrementalReprocessingCompatibility.ts +13 -1
- package/test/src/AbstractReplicator.test.ts +156 -0
- package/test/src/diagnostics.test.ts +128 -0
- package/test/src/routes/admin.test.ts +235 -4
- package/test/src/routes/sync-rules.test.ts +124 -0
- package/test/src/source_table_config.test.ts +104 -0
- package/test/src/storage/BucketStorageFactory.test.ts +46 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -70,19 +70,22 @@ export declare const diagnostics: router.Endpoint<{
|
|
|
70
70
|
sync_rules_content?: boolean | undefined;
|
|
71
71
|
}, {
|
|
72
72
|
connections: {
|
|
73
|
+
id: string;
|
|
73
74
|
errors: {
|
|
74
|
-
level: "warning" | "fatal";
|
|
75
75
|
message: string;
|
|
76
|
+
level: "warning" | "fatal";
|
|
76
77
|
location?: {
|
|
77
78
|
start_offset: number;
|
|
78
79
|
end_offset: number;
|
|
79
80
|
} | undefined;
|
|
80
81
|
ts?: string | undefined;
|
|
81
82
|
}[];
|
|
82
|
-
id: string;
|
|
83
83
|
connected: boolean;
|
|
84
84
|
postgres_uri: string;
|
|
85
85
|
}[];
|
|
86
|
+
service?: {
|
|
87
|
+
version: string;
|
|
88
|
+
} | undefined;
|
|
86
89
|
active_sync_rules?: {
|
|
87
90
|
errors: {
|
|
88
91
|
level: "warning" | "fatal";
|
|
@@ -169,25 +172,29 @@ export declare const diagnostics: router.Endpoint<{
|
|
|
169
172
|
version_label?: string | null | undefined;
|
|
170
173
|
content?: string | undefined;
|
|
171
174
|
} | undefined;
|
|
175
|
+
sync_config_source?: "config" | "api" | undefined;
|
|
172
176
|
}, import("../router.js").Context, import("../router.js").RequestEndpointHandlerPayload<{
|
|
173
177
|
sync_rules_content?: boolean | undefined;
|
|
174
178
|
}, import("../router.js").Context, import("../router.js").BasicRouterRequest>, router.EndpointHandler<import("../router.js").RequestEndpointHandlerPayload<{
|
|
175
179
|
sync_rules_content?: boolean | undefined;
|
|
176
180
|
}, import("../router.js").Context, import("../router.js").BasicRouterRequest>, {
|
|
177
181
|
connections: {
|
|
182
|
+
id: string;
|
|
178
183
|
errors: {
|
|
179
|
-
level: "warning" | "fatal";
|
|
180
184
|
message: string;
|
|
185
|
+
level: "warning" | "fatal";
|
|
181
186
|
location?: {
|
|
182
187
|
start_offset: number;
|
|
183
188
|
end_offset: number;
|
|
184
189
|
} | undefined;
|
|
185
190
|
ts?: string | undefined;
|
|
186
191
|
}[];
|
|
187
|
-
id: string;
|
|
188
192
|
connected: boolean;
|
|
189
193
|
postgres_uri: string;
|
|
190
194
|
}[];
|
|
195
|
+
service?: {
|
|
196
|
+
version: string;
|
|
197
|
+
} | undefined;
|
|
191
198
|
active_sync_rules?: {
|
|
192
199
|
errors: {
|
|
193
200
|
level: "warning" | "fatal";
|
|
@@ -274,6 +281,7 @@ export declare const diagnostics: router.Endpoint<{
|
|
|
274
281
|
version_label?: string | null | undefined;
|
|
275
282
|
content?: string | undefined;
|
|
276
283
|
} | undefined;
|
|
284
|
+
sync_config_source?: "config" | "api" | undefined;
|
|
277
285
|
}>> & {
|
|
278
286
|
path: string;
|
|
279
287
|
method: router.HTTPMethod.POST;
|
|
@@ -291,19 +299,22 @@ export declare const diagnostics: router.Endpoint<{
|
|
|
291
299
|
sync_rules_content?: boolean | undefined;
|
|
292
300
|
}, import("../router.js").Context, import("../router.js").BasicRouterRequest>) => Promise<{
|
|
293
301
|
connections: {
|
|
302
|
+
id: string;
|
|
294
303
|
errors: {
|
|
295
|
-
level: "warning" | "fatal";
|
|
296
304
|
message: string;
|
|
305
|
+
level: "warning" | "fatal";
|
|
297
306
|
location?: {
|
|
298
307
|
start_offset: number;
|
|
299
308
|
end_offset: number;
|
|
300
309
|
} | undefined;
|
|
301
310
|
ts?: string | undefined;
|
|
302
311
|
}[];
|
|
303
|
-
id: string;
|
|
304
312
|
connected: boolean;
|
|
305
313
|
postgres_uri: string;
|
|
306
314
|
}[];
|
|
315
|
+
service?: {
|
|
316
|
+
version: string;
|
|
317
|
+
} | undefined;
|
|
307
318
|
active_sync_rules?: {
|
|
308
319
|
errors: {
|
|
309
320
|
level: "warning" | "fatal";
|
|
@@ -390,9 +401,11 @@ export declare const diagnostics: router.Endpoint<{
|
|
|
390
401
|
version_label?: string | null | undefined;
|
|
391
402
|
content?: string | undefined;
|
|
392
403
|
} | undefined;
|
|
404
|
+
sync_config_source?: "config" | "api" | undefined;
|
|
393
405
|
}>;
|
|
394
406
|
};
|
|
395
407
|
export declare const getSchema: router.Endpoint<{}, {
|
|
408
|
+
defaultSchema: string;
|
|
396
409
|
connections: {
|
|
397
410
|
tag: string;
|
|
398
411
|
schemas: {
|
|
@@ -401,9 +414,9 @@ export declare const getSchema: router.Endpoint<{}, {
|
|
|
401
414
|
name: string;
|
|
402
415
|
columns: {
|
|
403
416
|
name: string;
|
|
417
|
+
type: string;
|
|
404
418
|
sqlite_type: number | import("@powersync/service-types").SqliteSchemaTypeText;
|
|
405
419
|
internal_type: string;
|
|
406
|
-
type: string;
|
|
407
420
|
pg_type: string;
|
|
408
421
|
description?: string | undefined;
|
|
409
422
|
}[];
|
|
@@ -411,9 +424,9 @@ export declare const getSchema: router.Endpoint<{}, {
|
|
|
411
424
|
}[];
|
|
412
425
|
id?: string | undefined;
|
|
413
426
|
}[];
|
|
414
|
-
defaultSchema: string;
|
|
415
427
|
defaultConnectionTag: string;
|
|
416
428
|
}, import("../router.js").Context, import("../router.js").RequestEndpointHandlerPayload<{}, import("../router.js").Context, import("../router.js").BasicRouterRequest>, router.EndpointHandler<import("../router.js").RequestEndpointHandlerPayload<{}, import("../router.js").Context, import("../router.js").BasicRouterRequest>, {
|
|
429
|
+
defaultSchema: string;
|
|
417
430
|
connections: {
|
|
418
431
|
tag: string;
|
|
419
432
|
schemas: {
|
|
@@ -422,9 +435,9 @@ export declare const getSchema: router.Endpoint<{}, {
|
|
|
422
435
|
name: string;
|
|
423
436
|
columns: {
|
|
424
437
|
name: string;
|
|
438
|
+
type: string;
|
|
425
439
|
sqlite_type: number | import("@powersync/service-types").SqliteSchemaTypeText;
|
|
426
440
|
internal_type: string;
|
|
427
|
-
type: string;
|
|
428
441
|
pg_type: string;
|
|
429
442
|
description?: string | undefined;
|
|
430
443
|
}[];
|
|
@@ -432,7 +445,6 @@ export declare const getSchema: router.Endpoint<{}, {
|
|
|
432
445
|
}[];
|
|
433
446
|
id?: string | undefined;
|
|
434
447
|
}[];
|
|
435
|
-
defaultSchema: string;
|
|
436
448
|
defaultConnectionTag: string;
|
|
437
449
|
}>> & {
|
|
438
450
|
path: string;
|
|
@@ -446,6 +458,7 @@ export declare const getSchema: router.Endpoint<{}, {
|
|
|
446
458
|
};
|
|
447
459
|
validator: schema.MicroValidator<{}, string[]>;
|
|
448
460
|
handler: (payload: import("../router.js").RequestEndpointHandlerPayload<{}, import("../router.js").Context, import("../router.js").BasicRouterRequest>) => Promise<{
|
|
461
|
+
defaultSchema: string;
|
|
449
462
|
connections: {
|
|
450
463
|
tag: string;
|
|
451
464
|
schemas: {
|
|
@@ -454,9 +467,9 @@ export declare const getSchema: router.Endpoint<{}, {
|
|
|
454
467
|
name: string;
|
|
455
468
|
columns: {
|
|
456
469
|
name: string;
|
|
470
|
+
type: string;
|
|
457
471
|
sqlite_type: number | import("@powersync/service-types").SqliteSchemaTypeText;
|
|
458
472
|
internal_type: string;
|
|
459
|
-
type: string;
|
|
460
473
|
pg_type: string;
|
|
461
474
|
description?: string | undefined;
|
|
462
475
|
}[];
|
|
@@ -464,7 +477,6 @@ export declare const getSchema: router.Endpoint<{}, {
|
|
|
464
477
|
}[];
|
|
465
478
|
id?: string | undefined;
|
|
466
479
|
}[];
|
|
467
|
-
defaultSchema: string;
|
|
468
480
|
defaultConnectionTag: string;
|
|
469
481
|
}>;
|
|
470
482
|
};
|
|
@@ -503,8 +515,8 @@ export declare const validate: router.Endpoint<{
|
|
|
503
515
|
sync_rules: string;
|
|
504
516
|
}, {
|
|
505
517
|
errors: {
|
|
506
|
-
level: "warning" | "fatal";
|
|
507
518
|
message: string;
|
|
519
|
+
level: "warning" | "fatal";
|
|
508
520
|
location?: {
|
|
509
521
|
start_offset: number;
|
|
510
522
|
end_offset: number;
|
|
@@ -517,18 +529,18 @@ export declare const validate: router.Endpoint<{
|
|
|
517
529
|
tables: {
|
|
518
530
|
name: string;
|
|
519
531
|
schema: string;
|
|
520
|
-
replication_id: string[];
|
|
521
|
-
data_queries: boolean;
|
|
522
|
-
parameter_queries: boolean;
|
|
523
532
|
errors: {
|
|
524
|
-
level: "warning" | "fatal";
|
|
525
533
|
message: string;
|
|
534
|
+
level: "warning" | "fatal";
|
|
526
535
|
location?: {
|
|
527
536
|
start_offset: number;
|
|
528
537
|
end_offset: number;
|
|
529
538
|
} | undefined;
|
|
530
539
|
ts?: string | undefined;
|
|
531
540
|
}[];
|
|
541
|
+
replication_id: string[];
|
|
542
|
+
data_queries: boolean;
|
|
543
|
+
parameter_queries: boolean;
|
|
532
544
|
pattern?: string | undefined;
|
|
533
545
|
}[];
|
|
534
546
|
slot_name: string;
|
|
@@ -549,8 +561,8 @@ export declare const validate: router.Endpoint<{
|
|
|
549
561
|
sync_rules: string;
|
|
550
562
|
}, import("../router.js").Context, import("../router.js").BasicRouterRequest>, {
|
|
551
563
|
errors: {
|
|
552
|
-
level: "warning" | "fatal";
|
|
553
564
|
message: string;
|
|
565
|
+
level: "warning" | "fatal";
|
|
554
566
|
location?: {
|
|
555
567
|
start_offset: number;
|
|
556
568
|
end_offset: number;
|
|
@@ -563,18 +575,18 @@ export declare const validate: router.Endpoint<{
|
|
|
563
575
|
tables: {
|
|
564
576
|
name: string;
|
|
565
577
|
schema: string;
|
|
566
|
-
replication_id: string[];
|
|
567
|
-
data_queries: boolean;
|
|
568
|
-
parameter_queries: boolean;
|
|
569
578
|
errors: {
|
|
570
|
-
level: "warning" | "fatal";
|
|
571
579
|
message: string;
|
|
580
|
+
level: "warning" | "fatal";
|
|
572
581
|
location?: {
|
|
573
582
|
start_offset: number;
|
|
574
583
|
end_offset: number;
|
|
575
584
|
} | undefined;
|
|
576
585
|
ts?: string | undefined;
|
|
577
586
|
}[];
|
|
587
|
+
replication_id: string[];
|
|
588
|
+
data_queries: boolean;
|
|
589
|
+
parameter_queries: boolean;
|
|
578
590
|
pattern?: string | undefined;
|
|
579
591
|
}[];
|
|
580
592
|
slot_name: string;
|
|
@@ -606,8 +618,8 @@ export declare const validate: router.Endpoint<{
|
|
|
606
618
|
sync_rules: string;
|
|
607
619
|
}, import("../router.js").Context, import("../router.js").BasicRouterRequest>) => Promise<{
|
|
608
620
|
errors: {
|
|
609
|
-
level: "warning" | "fatal";
|
|
610
621
|
message: string;
|
|
622
|
+
level: "warning" | "fatal";
|
|
611
623
|
location?: {
|
|
612
624
|
start_offset: number;
|
|
613
625
|
end_offset: number;
|
|
@@ -620,18 +632,18 @@ export declare const validate: router.Endpoint<{
|
|
|
620
632
|
tables: {
|
|
621
633
|
name: string;
|
|
622
634
|
schema: string;
|
|
623
|
-
replication_id: string[];
|
|
624
|
-
data_queries: boolean;
|
|
625
|
-
parameter_queries: boolean;
|
|
626
635
|
errors: {
|
|
627
|
-
level: "warning" | "fatal";
|
|
628
636
|
message: string;
|
|
637
|
+
level: "warning" | "fatal";
|
|
629
638
|
location?: {
|
|
630
639
|
start_offset: number;
|
|
631
640
|
end_offset: number;
|
|
632
641
|
} | undefined;
|
|
633
642
|
ts?: string | undefined;
|
|
634
643
|
}[];
|
|
644
|
+
replication_id: string[];
|
|
645
|
+
data_queries: boolean;
|
|
646
|
+
parameter_queries: boolean;
|
|
635
647
|
pattern?: string | undefined;
|
|
636
648
|
}[];
|
|
637
649
|
slot_name: string;
|
|
@@ -715,19 +727,22 @@ export declare const ADMIN_ROUTES: ((router.Endpoint<{
|
|
|
715
727
|
sync_rules_content?: boolean | undefined;
|
|
716
728
|
}, {
|
|
717
729
|
connections: {
|
|
730
|
+
id: string;
|
|
718
731
|
errors: {
|
|
719
|
-
level: "warning" | "fatal";
|
|
720
732
|
message: string;
|
|
733
|
+
level: "warning" | "fatal";
|
|
721
734
|
location?: {
|
|
722
735
|
start_offset: number;
|
|
723
736
|
end_offset: number;
|
|
724
737
|
} | undefined;
|
|
725
738
|
ts?: string | undefined;
|
|
726
739
|
}[];
|
|
727
|
-
id: string;
|
|
728
740
|
connected: boolean;
|
|
729
741
|
postgres_uri: string;
|
|
730
742
|
}[];
|
|
743
|
+
service?: {
|
|
744
|
+
version: string;
|
|
745
|
+
} | undefined;
|
|
731
746
|
active_sync_rules?: {
|
|
732
747
|
errors: {
|
|
733
748
|
level: "warning" | "fatal";
|
|
@@ -814,25 +829,29 @@ export declare const ADMIN_ROUTES: ((router.Endpoint<{
|
|
|
814
829
|
version_label?: string | null | undefined;
|
|
815
830
|
content?: string | undefined;
|
|
816
831
|
} | undefined;
|
|
832
|
+
sync_config_source?: "config" | "api" | undefined;
|
|
817
833
|
}, import("../router.js").Context, import("../router.js").RequestEndpointHandlerPayload<{
|
|
818
834
|
sync_rules_content?: boolean | undefined;
|
|
819
835
|
}, import("../router.js").Context, import("../router.js").BasicRouterRequest>, router.EndpointHandler<import("../router.js").RequestEndpointHandlerPayload<{
|
|
820
836
|
sync_rules_content?: boolean | undefined;
|
|
821
837
|
}, import("../router.js").Context, import("../router.js").BasicRouterRequest>, {
|
|
822
838
|
connections: {
|
|
839
|
+
id: string;
|
|
823
840
|
errors: {
|
|
824
|
-
level: "warning" | "fatal";
|
|
825
841
|
message: string;
|
|
842
|
+
level: "warning" | "fatal";
|
|
826
843
|
location?: {
|
|
827
844
|
start_offset: number;
|
|
828
845
|
end_offset: number;
|
|
829
846
|
} | undefined;
|
|
830
847
|
ts?: string | undefined;
|
|
831
848
|
}[];
|
|
832
|
-
id: string;
|
|
833
849
|
connected: boolean;
|
|
834
850
|
postgres_uri: string;
|
|
835
851
|
}[];
|
|
852
|
+
service?: {
|
|
853
|
+
version: string;
|
|
854
|
+
} | undefined;
|
|
836
855
|
active_sync_rules?: {
|
|
837
856
|
errors: {
|
|
838
857
|
level: "warning" | "fatal";
|
|
@@ -919,6 +938,7 @@ export declare const ADMIN_ROUTES: ((router.Endpoint<{
|
|
|
919
938
|
version_label?: string | null | undefined;
|
|
920
939
|
content?: string | undefined;
|
|
921
940
|
} | undefined;
|
|
941
|
+
sync_config_source?: "config" | "api" | undefined;
|
|
922
942
|
}>> & {
|
|
923
943
|
path: string;
|
|
924
944
|
method: router.HTTPMethod.POST;
|
|
@@ -936,19 +956,22 @@ export declare const ADMIN_ROUTES: ((router.Endpoint<{
|
|
|
936
956
|
sync_rules_content?: boolean | undefined;
|
|
937
957
|
}, import("../router.js").Context, import("../router.js").BasicRouterRequest>) => Promise<{
|
|
938
958
|
connections: {
|
|
959
|
+
id: string;
|
|
939
960
|
errors: {
|
|
940
|
-
level: "warning" | "fatal";
|
|
941
961
|
message: string;
|
|
962
|
+
level: "warning" | "fatal";
|
|
942
963
|
location?: {
|
|
943
964
|
start_offset: number;
|
|
944
965
|
end_offset: number;
|
|
945
966
|
} | undefined;
|
|
946
967
|
ts?: string | undefined;
|
|
947
968
|
}[];
|
|
948
|
-
id: string;
|
|
949
969
|
connected: boolean;
|
|
950
970
|
postgres_uri: string;
|
|
951
971
|
}[];
|
|
972
|
+
service?: {
|
|
973
|
+
version: string;
|
|
974
|
+
} | undefined;
|
|
952
975
|
active_sync_rules?: {
|
|
953
976
|
errors: {
|
|
954
977
|
level: "warning" | "fatal";
|
|
@@ -1035,8 +1058,10 @@ export declare const ADMIN_ROUTES: ((router.Endpoint<{
|
|
|
1035
1058
|
version_label?: string | null | undefined;
|
|
1036
1059
|
content?: string | undefined;
|
|
1037
1060
|
} | undefined;
|
|
1061
|
+
sync_config_source?: "config" | "api" | undefined;
|
|
1038
1062
|
}>;
|
|
1039
1063
|
}) | (router.Endpoint<{}, {
|
|
1064
|
+
defaultSchema: string;
|
|
1040
1065
|
connections: {
|
|
1041
1066
|
tag: string;
|
|
1042
1067
|
schemas: {
|
|
@@ -1045,9 +1070,9 @@ export declare const ADMIN_ROUTES: ((router.Endpoint<{
|
|
|
1045
1070
|
name: string;
|
|
1046
1071
|
columns: {
|
|
1047
1072
|
name: string;
|
|
1073
|
+
type: string;
|
|
1048
1074
|
sqlite_type: number | import("@powersync/service-types").SqliteSchemaTypeText;
|
|
1049
1075
|
internal_type: string;
|
|
1050
|
-
type: string;
|
|
1051
1076
|
pg_type: string;
|
|
1052
1077
|
description?: string | undefined;
|
|
1053
1078
|
}[];
|
|
@@ -1055,9 +1080,9 @@ export declare const ADMIN_ROUTES: ((router.Endpoint<{
|
|
|
1055
1080
|
}[];
|
|
1056
1081
|
id?: string | undefined;
|
|
1057
1082
|
}[];
|
|
1058
|
-
defaultSchema: string;
|
|
1059
1083
|
defaultConnectionTag: string;
|
|
1060
1084
|
}, import("../router.js").Context, import("../router.js").RequestEndpointHandlerPayload<{}, import("../router.js").Context, import("../router.js").BasicRouterRequest>, router.EndpointHandler<import("../router.js").RequestEndpointHandlerPayload<{}, import("../router.js").Context, import("../router.js").BasicRouterRequest>, {
|
|
1085
|
+
defaultSchema: string;
|
|
1061
1086
|
connections: {
|
|
1062
1087
|
tag: string;
|
|
1063
1088
|
schemas: {
|
|
@@ -1066,9 +1091,9 @@ export declare const ADMIN_ROUTES: ((router.Endpoint<{
|
|
|
1066
1091
|
name: string;
|
|
1067
1092
|
columns: {
|
|
1068
1093
|
name: string;
|
|
1094
|
+
type: string;
|
|
1069
1095
|
sqlite_type: number | import("@powersync/service-types").SqliteSchemaTypeText;
|
|
1070
1096
|
internal_type: string;
|
|
1071
|
-
type: string;
|
|
1072
1097
|
pg_type: string;
|
|
1073
1098
|
description?: string | undefined;
|
|
1074
1099
|
}[];
|
|
@@ -1076,7 +1101,6 @@ export declare const ADMIN_ROUTES: ((router.Endpoint<{
|
|
|
1076
1101
|
}[];
|
|
1077
1102
|
id?: string | undefined;
|
|
1078
1103
|
}[];
|
|
1079
|
-
defaultSchema: string;
|
|
1080
1104
|
defaultConnectionTag: string;
|
|
1081
1105
|
}>> & {
|
|
1082
1106
|
path: string;
|
|
@@ -1090,6 +1114,7 @@ export declare const ADMIN_ROUTES: ((router.Endpoint<{
|
|
|
1090
1114
|
};
|
|
1091
1115
|
validator: schema.MicroValidator<{}, string[]>;
|
|
1092
1116
|
handler: (payload: import("../router.js").RequestEndpointHandlerPayload<{}, import("../router.js").Context, import("../router.js").BasicRouterRequest>) => Promise<{
|
|
1117
|
+
defaultSchema: string;
|
|
1093
1118
|
connections: {
|
|
1094
1119
|
tag: string;
|
|
1095
1120
|
schemas: {
|
|
@@ -1098,9 +1123,9 @@ export declare const ADMIN_ROUTES: ((router.Endpoint<{
|
|
|
1098
1123
|
name: string;
|
|
1099
1124
|
columns: {
|
|
1100
1125
|
name: string;
|
|
1126
|
+
type: string;
|
|
1101
1127
|
sqlite_type: number | import("@powersync/service-types").SqliteSchemaTypeText;
|
|
1102
1128
|
internal_type: string;
|
|
1103
|
-
type: string;
|
|
1104
1129
|
pg_type: string;
|
|
1105
1130
|
description?: string | undefined;
|
|
1106
1131
|
}[];
|
|
@@ -1108,7 +1133,6 @@ export declare const ADMIN_ROUTES: ((router.Endpoint<{
|
|
|
1108
1133
|
}[];
|
|
1109
1134
|
id?: string | undefined;
|
|
1110
1135
|
}[];
|
|
1111
|
-
defaultSchema: string;
|
|
1112
1136
|
defaultConnectionTag: string;
|
|
1113
1137
|
}>;
|
|
1114
1138
|
}) | (router.Endpoint<{}, {
|
|
@@ -1145,8 +1169,8 @@ export declare const ADMIN_ROUTES: ((router.Endpoint<{
|
|
|
1145
1169
|
sync_rules: string;
|
|
1146
1170
|
}, {
|
|
1147
1171
|
errors: {
|
|
1148
|
-
level: "warning" | "fatal";
|
|
1149
1172
|
message: string;
|
|
1173
|
+
level: "warning" | "fatal";
|
|
1150
1174
|
location?: {
|
|
1151
1175
|
start_offset: number;
|
|
1152
1176
|
end_offset: number;
|
|
@@ -1159,18 +1183,18 @@ export declare const ADMIN_ROUTES: ((router.Endpoint<{
|
|
|
1159
1183
|
tables: {
|
|
1160
1184
|
name: string;
|
|
1161
1185
|
schema: string;
|
|
1162
|
-
replication_id: string[];
|
|
1163
|
-
data_queries: boolean;
|
|
1164
|
-
parameter_queries: boolean;
|
|
1165
1186
|
errors: {
|
|
1166
|
-
level: "warning" | "fatal";
|
|
1167
1187
|
message: string;
|
|
1188
|
+
level: "warning" | "fatal";
|
|
1168
1189
|
location?: {
|
|
1169
1190
|
start_offset: number;
|
|
1170
1191
|
end_offset: number;
|
|
1171
1192
|
} | undefined;
|
|
1172
1193
|
ts?: string | undefined;
|
|
1173
1194
|
}[];
|
|
1195
|
+
replication_id: string[];
|
|
1196
|
+
data_queries: boolean;
|
|
1197
|
+
parameter_queries: boolean;
|
|
1174
1198
|
pattern?: string | undefined;
|
|
1175
1199
|
}[];
|
|
1176
1200
|
slot_name: string;
|
|
@@ -1191,8 +1215,8 @@ export declare const ADMIN_ROUTES: ((router.Endpoint<{
|
|
|
1191
1215
|
sync_rules: string;
|
|
1192
1216
|
}, import("../router.js").Context, import("../router.js").BasicRouterRequest>, {
|
|
1193
1217
|
errors: {
|
|
1194
|
-
level: "warning" | "fatal";
|
|
1195
1218
|
message: string;
|
|
1219
|
+
level: "warning" | "fatal";
|
|
1196
1220
|
location?: {
|
|
1197
1221
|
start_offset: number;
|
|
1198
1222
|
end_offset: number;
|
|
@@ -1205,18 +1229,18 @@ export declare const ADMIN_ROUTES: ((router.Endpoint<{
|
|
|
1205
1229
|
tables: {
|
|
1206
1230
|
name: string;
|
|
1207
1231
|
schema: string;
|
|
1208
|
-
replication_id: string[];
|
|
1209
|
-
data_queries: boolean;
|
|
1210
|
-
parameter_queries: boolean;
|
|
1211
1232
|
errors: {
|
|
1212
|
-
level: "warning" | "fatal";
|
|
1213
1233
|
message: string;
|
|
1234
|
+
level: "warning" | "fatal";
|
|
1214
1235
|
location?: {
|
|
1215
1236
|
start_offset: number;
|
|
1216
1237
|
end_offset: number;
|
|
1217
1238
|
} | undefined;
|
|
1218
1239
|
ts?: string | undefined;
|
|
1219
1240
|
}[];
|
|
1241
|
+
replication_id: string[];
|
|
1242
|
+
data_queries: boolean;
|
|
1243
|
+
parameter_queries: boolean;
|
|
1220
1244
|
pattern?: string | undefined;
|
|
1221
1245
|
}[];
|
|
1222
1246
|
slot_name: string;
|
|
@@ -1248,8 +1272,8 @@ export declare const ADMIN_ROUTES: ((router.Endpoint<{
|
|
|
1248
1272
|
sync_rules: string;
|
|
1249
1273
|
}, import("../router.js").Context, import("../router.js").BasicRouterRequest>) => Promise<{
|
|
1250
1274
|
errors: {
|
|
1251
|
-
level: "warning" | "fatal";
|
|
1252
1275
|
message: string;
|
|
1276
|
+
level: "warning" | "fatal";
|
|
1253
1277
|
location?: {
|
|
1254
1278
|
start_offset: number;
|
|
1255
1279
|
end_offset: number;
|
|
@@ -1262,18 +1286,18 @@ export declare const ADMIN_ROUTES: ((router.Endpoint<{
|
|
|
1262
1286
|
tables: {
|
|
1263
1287
|
name: string;
|
|
1264
1288
|
schema: string;
|
|
1265
|
-
replication_id: string[];
|
|
1266
|
-
data_queries: boolean;
|
|
1267
|
-
parameter_queries: boolean;
|
|
1268
1289
|
errors: {
|
|
1269
|
-
level: "warning" | "fatal";
|
|
1270
1290
|
message: string;
|
|
1291
|
+
level: "warning" | "fatal";
|
|
1271
1292
|
location?: {
|
|
1272
1293
|
start_offset: number;
|
|
1273
1294
|
end_offset: number;
|
|
1274
1295
|
} | undefined;
|
|
1275
1296
|
ts?: string | undefined;
|
|
1276
1297
|
}[];
|
|
1298
|
+
replication_id: string[];
|
|
1299
|
+
data_queries: boolean;
|
|
1300
|
+
parameter_queries: boolean;
|
|
1277
1301
|
pattern?: string | undefined;
|
|
1278
1302
|
}[];
|
|
1279
1303
|
slot_name: string;
|
|
@@ -5,6 +5,7 @@ import { internal_routes } from '@powersync/service-types';
|
|
|
5
5
|
import { DEFAULT_HYDRATION_STATE } from '@powersync/service-sync-rules';
|
|
6
6
|
import * as api from '../../api/api-index.js';
|
|
7
7
|
import * as storage from '../../storage/storage-index.js';
|
|
8
|
+
import { POWERSYNC_VERSION } from '../../util/version.js';
|
|
8
9
|
import { authApi } from '../auth.js';
|
|
9
10
|
import { routeDefinition } from '../router.js';
|
|
10
11
|
/**
|
|
@@ -41,14 +42,21 @@ export const diagnostics = routeDefinition({
|
|
|
41
42
|
const { context } = payload;
|
|
42
43
|
const { service_context } = context;
|
|
43
44
|
const include_content = payload.params.sync_rules_content ?? false;
|
|
45
|
+
const serviceResponse = {
|
|
46
|
+
service: {
|
|
47
|
+
version: POWERSYNC_VERSION
|
|
48
|
+
}
|
|
49
|
+
};
|
|
44
50
|
const apiHandler = service_context.routerEngine.getAPI();
|
|
45
51
|
const status = await apiHandler.getConnectionStatus();
|
|
46
52
|
if (!status) {
|
|
47
53
|
return internal_routes.DiagnosticsResponse.encode({
|
|
54
|
+
...serviceResponse,
|
|
48
55
|
connections: []
|
|
49
56
|
});
|
|
50
57
|
}
|
|
51
|
-
const { storageEngine: { activeBucketStorage } } = service_context;
|
|
58
|
+
const { storageEngine: { activeBucketStorage }, configuration } = service_context;
|
|
59
|
+
const sync_config_source = configuration?.sync_rules.present ? 'config' : 'api';
|
|
52
60
|
const active = await activeBucketStorage.getActiveSyncConfig();
|
|
53
61
|
const deploying = await activeBucketStorage.getDeployingSyncConfig();
|
|
54
62
|
const active_status = await api.getSyncRulesStatus(apiHandler, active?.content ?? null, {
|
|
@@ -66,6 +74,7 @@ export const diagnostics = routeDefinition({
|
|
|
66
74
|
active: false
|
|
67
75
|
}, deploying.storage);
|
|
68
76
|
return internal_routes.DiagnosticsResponse.encode({
|
|
77
|
+
...serviceResponse,
|
|
69
78
|
connections: [
|
|
70
79
|
{
|
|
71
80
|
...status,
|
|
@@ -74,7 +83,8 @@ export const diagnostics = routeDefinition({
|
|
|
74
83
|
}
|
|
75
84
|
],
|
|
76
85
|
active_sync_rules: active_status,
|
|
77
|
-
deploying_sync_rules: deploying_status
|
|
86
|
+
deploying_sync_rules: deploying_status,
|
|
87
|
+
sync_config_source
|
|
78
88
|
});
|
|
79
89
|
}
|
|
80
90
|
});
|
|
@@ -117,10 +127,16 @@ export const reprocess = routeDefinition({
|
|
|
117
127
|
// 1. This always re-parses the source YAML. If there are changes to the Sync Streams compiler, that can affect the sync plan.
|
|
118
128
|
// 2. If the source does not set the storage version, this will update it do the current version.
|
|
119
129
|
// We can consider tweaking this behavior in the future.
|
|
120
|
-
const
|
|
130
|
+
const parsed = SqlSyncRules.fromYaml(active.content.sync_rules_content, {
|
|
131
|
+
...apiHandler.getParseSyncRulesOptions(),
|
|
132
|
+
schema: undefined,
|
|
121
133
|
// This sync config already passed validation. But if the config is not valid anymore due
|
|
122
134
|
// to a service change, we do want to report the error here.
|
|
123
|
-
|
|
135
|
+
throwOnError: true
|
|
136
|
+
});
|
|
137
|
+
storage.logSyncConfigErrors(parsed);
|
|
138
|
+
await api.assertSourceCapabilities(apiHandler, parsed.config);
|
|
139
|
+
const new_rules = await activeBucketStorage.updateSyncRules(storage.updateSyncRulesFromConfig(parsed, {
|
|
124
140
|
version_label: active.content.version_label,
|
|
125
141
|
forceNewReplicationStream: true
|
|
126
142
|
}));
|
|
@@ -138,16 +154,14 @@ export const reprocess = routeDefinition({
|
|
|
138
154
|
}
|
|
139
155
|
});
|
|
140
156
|
class FakeSyncRulesContentForValidation extends storage.PersistedSyncConfigContent {
|
|
141
|
-
apiHandler;
|
|
142
157
|
schema;
|
|
143
|
-
constructor(
|
|
158
|
+
constructor(schema, data) {
|
|
144
159
|
super(data);
|
|
145
|
-
this.apiHandler = apiHandler;
|
|
146
160
|
this.schema = schema;
|
|
147
161
|
}
|
|
148
162
|
parsed(options) {
|
|
149
163
|
const syncConfig = SqlSyncRules.fromYaml(this.sync_rules_content, {
|
|
150
|
-
...
|
|
164
|
+
...options,
|
|
151
165
|
schema: this.schema
|
|
152
166
|
});
|
|
153
167
|
let hydrated;
|
|
@@ -180,7 +194,7 @@ export const validate = routeDefinition({
|
|
|
180
194
|
const apiHandler = service_context.routerEngine.getAPI();
|
|
181
195
|
const schemaData = await api.getConnectionsSchema(apiHandler);
|
|
182
196
|
const schema = new StaticSchema(schemaData.connections);
|
|
183
|
-
const sync_rules = new FakeSyncRulesContentForValidation(
|
|
197
|
+
const sync_rules = new FakeSyncRulesContentForValidation(schema, {
|
|
184
198
|
// Dummy values
|
|
185
199
|
replicationStreamId: 0,
|
|
186
200
|
replicationStreamName: '',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin.js","sourceRoot":"","sources":["../../../src/routes/endpoints/admin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,EAEL,UAAU,EAEV,YAAY,EACZ,YAAY,EACb,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"admin.js","sourceRoot":"","sources":["../../../src/routes/endpoints/admin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,EAEL,UAAU,EAEV,YAAY,EACZ,YAAY,EACb,MAAM,+BAA+B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