@powersync/service-core 0.0.0-dev-20250724091220 → 0.0.0-dev-20250724111728
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 +5 -4
- package/dist/storage/BucketStorageBatch.d.ts +12 -2
- package/dist/storage/BucketStorageBatch.js.map +1 -1
- package/dist/storage/SyncRulesBucketStorage.d.ts +0 -1
- package/dist/storage/SyncRulesBucketStorage.js.map +1 -1
- package/dist/util/lsn.d.ts +4 -0
- package/dist/util/lsn.js +11 -0
- package/dist/util/lsn.js.map +1 -0
- package/dist/util/util-index.d.ts +1 -0
- package/dist/util/util-index.js +1 -0
- package/dist/util/util-index.js.map +1 -1
- package/package.json +4 -4
- package/src/storage/BucketStorageBatch.ts +13 -2
- package/src/storage/SyncRulesBucketStorage.ts +0 -2
- package/src/util/lsn.ts +8 -0
- package/src/util/util-index.ts +1 -0
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
# @powersync/service-core
|
|
2
2
|
|
|
3
|
-
## 0.0.0-dev-
|
|
3
|
+
## 0.0.0-dev-20250724111728
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
7
|
- 4ebc3bf: Report lack of commits or keepalives as issues in the diagnostics api.
|
|
8
|
+
- d56eeb9: Delay switching over to new sync rules until we have a consistent checkpoint.
|
|
8
9
|
|
|
9
10
|
### Patch Changes
|
|
10
11
|
|
|
@@ -13,9 +14,9 @@
|
|
|
13
14
|
- a700ec9: Reporting mongo storage added to storage engine.
|
|
14
15
|
- Updated dependencies [f1d187b]
|
|
15
16
|
- Updated dependencies [a700ec9]
|
|
16
|
-
- @powersync/service-types@0.0.0-dev-
|
|
17
|
-
- @powersync/lib-services-framework@0.0.0-dev-
|
|
18
|
-
- @powersync/service-rsocket-router@0.0.0-dev-
|
|
17
|
+
- @powersync/service-types@0.0.0-dev-20250724111728
|
|
18
|
+
- @powersync/lib-services-framework@0.0.0-dev-20250724111728
|
|
19
|
+
- @powersync/service-rsocket-router@0.0.0-dev-20250724111728
|
|
19
20
|
|
|
20
21
|
## 1.13.4
|
|
21
22
|
|
|
@@ -49,16 +49,26 @@ export interface BucketStorageBatch extends ObserverClient<BucketBatchStorageLis
|
|
|
49
49
|
*/
|
|
50
50
|
keepalive(lsn: string): Promise<boolean>;
|
|
51
51
|
/**
|
|
52
|
-
* Set the LSN
|
|
52
|
+
* Set the LSN that replication should resume from.
|
|
53
|
+
*
|
|
54
|
+
* This can be used for:
|
|
55
|
+
* 1. Setting the LSN for a snapshot, before starting replication.
|
|
56
|
+
* 2. Setting the LSN to resume from after a replication restart, without advancing the checkpoint LSN via a commit.
|
|
53
57
|
*
|
|
54
58
|
* Not required if the source database keeps track of this, for example with
|
|
55
59
|
* PostgreSQL logical replication slots.
|
|
56
60
|
*/
|
|
57
|
-
|
|
61
|
+
setResumeLsn(lsn: string): Promise<void>;
|
|
58
62
|
/**
|
|
59
63
|
* Get the last checkpoint LSN, from either commit or keepalive.
|
|
60
64
|
*/
|
|
61
65
|
lastCheckpointLsn: string | null;
|
|
66
|
+
/**
|
|
67
|
+
* LSN to resume from.
|
|
68
|
+
*
|
|
69
|
+
* Not relevant for streams where the source keeps track of replication progress, such as Postgres.
|
|
70
|
+
*/
|
|
71
|
+
resumeFromLsn: string | null;
|
|
62
72
|
markSnapshotDone(tables: SourceTable[], no_checkpoint_before_lsn: string): Promise<SourceTable[]>;
|
|
63
73
|
updateTableProgress(table: SourceTable, progress: Partial<TableSnapshotStatus>): Promise<SourceTable>;
|
|
64
74
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BucketStorageBatch.js","sourceRoot":"","sources":["../../src/storage/BucketStorageBatch.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,mCAAmC,GAAqC;IACnF,sBAAsB,EAAE,IAAI;IAC5B,uBAAuB,EAAE,IAAI;CAC9B,CAAC;
|
|
1
|
+
{"version":3,"file":"BucketStorageBatch.js","sourceRoot":"","sources":["../../src/storage/BucketStorageBatch.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,mCAAmC,GAAqC;IACnF,sBAAsB,EAAE,IAAI;IAC5B,uBAAuB,EAAE,IAAI;CAC9B,CAAC;AAgHF,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,qCAAiB,CAAA;IACjB,qCAAiB,CAAA;AACnB,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B"}
|
|
@@ -36,7 +36,6 @@ export interface SyncRulesBucketStorage extends ObserverClient<SyncRulesBucketSt
|
|
|
36
36
|
* Clear the storage, without changing state.
|
|
37
37
|
*/
|
|
38
38
|
clear(options?: ClearStorageOptions): Promise<void>;
|
|
39
|
-
autoActivate(): Promise<void>;
|
|
40
39
|
/**
|
|
41
40
|
* Record a replication error.
|
|
42
41
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SyncRulesBucketStorage.js","sourceRoot":"","sources":["../../src/storage/SyncRulesBucketStorage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SyncRulesBucketStorage.js","sourceRoot":"","sources":["../../src/storage/SyncRulesBucketStorage.ts"],"names":[],"mappings":"AA0RA,MAAM,CAAC,MAAM,yBAAyB,GAAsB;IAC1D,kBAAkB,EAAE,IAAI,GAAG,EAAU;IACrC,qBAAqB,EAAE,IAAI;IAC3B,uBAAuB,EAAE,IAAI,GAAG,EAAU;IAC1C,0BAA0B,EAAE,IAAI;CACjC,CAAC"}
|
package/dist/util/lsn.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lsn.js","sourceRoot":"","sources":["../../src/util/lsn.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,UAAU,MAAM,CAAC,CAA4B,EAAE,CAA4B;IAC/E,IAAI,CAAC,IAAI,IAAI;QAAE,OAAO,CAAC,IAAI,IAAI,CAAC;IAChC,IAAI,CAAC,IAAI,IAAI;QAAE,OAAO,CAAC,CAAC;IACxB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACvB,CAAC"}
|
package/dist/util/util-index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util-index.js","sourceRoot":"","sources":["../../src/util/util-index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAE7B,cAAc,aAAa,CAAC;AAC5B,cAAc,uCAAuC,CAAC;AACtD,cAAc,mBAAmB,CAAC;AAElC,cAAc,yCAAyC,CAAC;AACxD,cAAc,qDAAqD,CAAC;AACpE,cAAc,uDAAuD,CAAC;AACtE,cAAc,yDAAyD,CAAC;AAExE,cAAc,yDAAyD,CAAC;AACxE,cAAc,6DAA6D,CAAC;AAC5E,cAAc,yDAAyD,CAAC;AACxE,cAAc,uCAAuC,CAAC;AACtD,cAAc,4CAA4C,CAAC"}
|
|
1
|
+
{"version":3,"file":"util-index.js","sourceRoot":"","sources":["../../src/util/util-index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAE7B,cAAc,aAAa,CAAC;AAC5B,cAAc,uCAAuC,CAAC;AACtD,cAAc,mBAAmB,CAAC;AAElC,cAAc,yCAAyC,CAAC;AACxD,cAAc,qDAAqD,CAAC;AACpE,cAAc,uDAAuD,CAAC;AACtE,cAAc,yDAAyD,CAAC;AAExE,cAAc,yDAAyD,CAAC;AACxE,cAAc,6DAA6D,CAAC;AAC5E,cAAc,yDAAyD,CAAC;AACxE,cAAc,uCAAuC,CAAC;AACtD,cAAc,4CAA4C,CAAC"}
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
|
-
"version": "0.0.0-dev-
|
|
8
|
+
"version": "0.0.0-dev-20250724111728",
|
|
9
9
|
"main": "dist/index.js",
|
|
10
10
|
"license": "FSL-1.1-Apache-2.0",
|
|
11
11
|
"type": "module",
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"uuid": "^11.1.0",
|
|
33
33
|
"winston": "^3.13.0",
|
|
34
34
|
"yaml": "^2.3.2",
|
|
35
|
-
"@powersync/lib-services-framework": "0.0.0-dev-20250724091220",
|
|
36
35
|
"@powersync/service-jsonbig": "0.17.10",
|
|
37
|
-
"@powersync/
|
|
36
|
+
"@powersync/lib-services-framework": "0.0.0-dev-20250724111728",
|
|
37
|
+
"@powersync/service-rsocket-router": "0.0.0-dev-20250724111728",
|
|
38
38
|
"@powersync/service-sync-rules": "0.27.0",
|
|
39
|
-
"@powersync/service-types": "0.0.0-dev-
|
|
39
|
+
"@powersync/service-types": "0.0.0-dev-20250724111728"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/async": "^3.2.24",
|
|
@@ -60,18 +60,29 @@ export interface BucketStorageBatch extends ObserverClient<BucketBatchStorageLis
|
|
|
60
60
|
keepalive(lsn: string): Promise<boolean>;
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
|
-
* Set the LSN
|
|
63
|
+
* Set the LSN that replication should resume from.
|
|
64
|
+
*
|
|
65
|
+
* This can be used for:
|
|
66
|
+
* 1. Setting the LSN for a snapshot, before starting replication.
|
|
67
|
+
* 2. Setting the LSN to resume from after a replication restart, without advancing the checkpoint LSN via a commit.
|
|
64
68
|
*
|
|
65
69
|
* Not required if the source database keeps track of this, for example with
|
|
66
70
|
* PostgreSQL logical replication slots.
|
|
67
71
|
*/
|
|
68
|
-
|
|
72
|
+
setResumeLsn(lsn: string): Promise<void>;
|
|
69
73
|
|
|
70
74
|
/**
|
|
71
75
|
* Get the last checkpoint LSN, from either commit or keepalive.
|
|
72
76
|
*/
|
|
73
77
|
lastCheckpointLsn: string | null;
|
|
74
78
|
|
|
79
|
+
/**
|
|
80
|
+
* LSN to resume from.
|
|
81
|
+
*
|
|
82
|
+
* Not relevant for streams where the source keeps track of replication progress, such as Postgres.
|
|
83
|
+
*/
|
|
84
|
+
resumeFromLsn: string | null;
|
|
85
|
+
|
|
75
86
|
markSnapshotDone(tables: SourceTable[], no_checkpoint_before_lsn: string): Promise<SourceTable[]>;
|
|
76
87
|
|
|
77
88
|
updateTableProgress(table: SourceTable, progress: Partial<TableSnapshotStatus>): Promise<SourceTable>;
|
package/src/util/lsn.ts
ADDED