@powersync/service-core 0.3.0 → 0.4.0
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 +18 -0
- package/dist/auth/JwtPayload.d.ts +6 -2
- package/dist/auth/KeyStore.js +1 -7
- package/dist/auth/KeyStore.js.map +1 -1
- package/dist/entry/commands/migrate-action.js +12 -4
- package/dist/entry/commands/migrate-action.js.map +1 -1
- package/dist/migrations/migrations.js +8 -0
- package/dist/migrations/migrations.js.map +1 -1
- package/dist/routes/endpoints/socket-route.js +5 -5
- package/dist/routes/endpoints/socket-route.js.map +1 -1
- package/dist/routes/endpoints/sync-stream.d.ts +1 -1
- package/dist/routes/endpoints/sync-stream.js +4 -4
- package/dist/routes/endpoints/sync-stream.js.map +1 -1
- package/dist/sync/sync.d.ts +2 -2
- package/dist/sync/sync.js +2 -2
- package/dist/sync/sync.js.map +1 -1
- package/package.json +3 -3
- package/src/auth/JwtPayload.ts +6 -2
- package/src/auth/KeyStore.ts +1 -7
- package/src/entry/commands/migrate-action.ts +12 -4
- package/src/migrations/migrations.ts +8 -0
- package/src/routes/endpoints/socket-route.ts +6 -9
- package/src/routes/endpoints/sync-stream.ts +4 -7
- package/src/sync/sync.ts +5 -5
- package/test/src/data_storage.test.ts +4 -19
- package/test/src/sync.test.ts +6 -5
- package/tsconfig.tsbuildinfo +1 -1
- package/test/src/sql_functions.test.ts +0 -254
- package/test/src/sql_operators.test.ts +0 -132
- package/test/src/sync_rules.test.ts +0 -1053
package/test/src/sync.test.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { JSONBig } from '@powersync/service-jsonbig';
|
|
|
8
8
|
import { streamResponse } from '../../src/sync/sync.js';
|
|
9
9
|
import * as timers from 'timers/promises';
|
|
10
10
|
import { lsnMakeComparable } from '@powersync/service-jpgwire';
|
|
11
|
+
import { RequestParameters } from '@powersync/service-sync-rules';
|
|
11
12
|
|
|
12
13
|
describe('sync - mongodb', function () {
|
|
13
14
|
defineTests(MONGO_STORAGE_FACTORY);
|
|
@@ -77,7 +78,7 @@ function defineTests(factory: StorageFactory) {
|
|
|
77
78
|
include_checksum: true,
|
|
78
79
|
raw_data: true
|
|
79
80
|
},
|
|
80
|
-
syncParams: {
|
|
81
|
+
syncParams: new RequestParameters({ sub: '' }, {}),
|
|
81
82
|
token: { exp: Date.now() / 1000 + 10 } as any
|
|
82
83
|
});
|
|
83
84
|
|
|
@@ -117,7 +118,7 @@ function defineTests(factory: StorageFactory) {
|
|
|
117
118
|
include_checksum: true,
|
|
118
119
|
raw_data: false
|
|
119
120
|
},
|
|
120
|
-
syncParams: {
|
|
121
|
+
syncParams: new RequestParameters({ sub: '' }, {}),
|
|
121
122
|
token: { exp: Date.now() / 1000 + 10 } as any
|
|
122
123
|
});
|
|
123
124
|
|
|
@@ -145,7 +146,7 @@ function defineTests(factory: StorageFactory) {
|
|
|
145
146
|
include_checksum: true,
|
|
146
147
|
raw_data: true
|
|
147
148
|
},
|
|
148
|
-
syncParams: {
|
|
149
|
+
syncParams: new RequestParameters({ sub: '' }, {}),
|
|
149
150
|
token: { exp: 0 } as any
|
|
150
151
|
});
|
|
151
152
|
|
|
@@ -171,7 +172,7 @@ function defineTests(factory: StorageFactory) {
|
|
|
171
172
|
include_checksum: true,
|
|
172
173
|
raw_data: true
|
|
173
174
|
},
|
|
174
|
-
syncParams: {
|
|
175
|
+
syncParams: new RequestParameters({ sub: '' }, {}),
|
|
175
176
|
token: { exp: Date.now() / 1000 + 10 } as any
|
|
176
177
|
});
|
|
177
178
|
const iter = stream[Symbol.asyncIterator]();
|
|
@@ -231,7 +232,7 @@ function defineTests(factory: StorageFactory) {
|
|
|
231
232
|
include_checksum: true,
|
|
232
233
|
raw_data: true
|
|
233
234
|
},
|
|
234
|
-
syncParams: {
|
|
235
|
+
syncParams: new RequestParameters({ sub: '' }, {}),
|
|
235
236
|
token: { exp: exp } as any
|
|
236
237
|
});
|
|
237
238
|
const iter = stream[Symbol.asyncIterator]();
|