@powersync/common 0.0.0-dev-20250207081035 → 0.0.0-dev-20250210155038
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.
|
@@ -3,18 +3,19 @@ import ndjsonStream from 'can-ndjson-stream';
|
|
|
3
3
|
import Logger from 'js-logger';
|
|
4
4
|
import { RSocketConnector } from 'rsocket-core';
|
|
5
5
|
import { WebsocketClientTransport } from 'rsocket-websocket-client';
|
|
6
|
+
import PACKAGE from '../../../../package.json' with { type: 'json' };
|
|
6
7
|
import { AbortOperation } from '../../../utils/AbortOperation.js';
|
|
7
8
|
import { DataStream } from '../../../utils/DataStream.js';
|
|
8
|
-
import { version as POWERSYNC_JS_VERSION } from '../../../../package.json';
|
|
9
9
|
const POWERSYNC_TRAILING_SLASH_MATCH = /\/+$/;
|
|
10
|
+
const POWERSYNC_JS_VERSION = PACKAGE.version;
|
|
10
11
|
// Refresh at least 30 sec before it expires
|
|
11
12
|
const REFRESH_CREDENTIALS_SAFETY_PERIOD_MS = 30_000;
|
|
12
|
-
const SYNC_QUEUE_REQUEST_N =
|
|
13
|
+
const SYNC_QUEUE_REQUEST_N = 10;
|
|
13
14
|
const SYNC_QUEUE_REQUEST_LOW_WATER = 5;
|
|
14
15
|
// Keep alive message is sent every period
|
|
15
|
-
const KEEP_ALIVE_MS =
|
|
16
|
+
const KEEP_ALIVE_MS = 20_000;
|
|
16
17
|
// The ACK must be received in this period
|
|
17
|
-
const KEEP_ALIVE_LIFETIME_MS =
|
|
18
|
+
const KEEP_ALIVE_LIFETIME_MS = 30_000;
|
|
18
19
|
export const DEFAULT_REMOTE_LOGGER = Logger.get('PowerSyncRemote');
|
|
19
20
|
/**
|
|
20
21
|
* Class wrapper for providing a fetch implementation.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powersync/common",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20250210155038",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -52,8 +52,6 @@
|
|
|
52
52
|
"rsocket-core": "1.0.0-alpha.3",
|
|
53
53
|
"rsocket-websocket-client": "1.0.0-alpha.3",
|
|
54
54
|
"text-encoding": "^0.7.0",
|
|
55
|
-
"typescript": "^5.5.3",
|
|
56
|
-
"vitest": "^2.0.5",
|
|
57
55
|
"web-streams-polyfill": "3.2.1"
|
|
58
56
|
},
|
|
59
57
|
"scripts": {
|