Skip to content

Commit 58eea95

Browse files
fix version import
1 parent 605f1bf commit 58eea95

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

packages/common/src/client/sync/stream/AbstractRemote.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,21 @@ import { type fetch } from 'cross-fetch';
55
import Logger, { ILogger } from 'js-logger';
66
import { RSocket, RSocketConnector, Requestable } from 'rsocket-core';
77
import { WebsocketClientTransport } from 'rsocket-websocket-client';
8+
import PACKAGE from '../../../../package.json' with { type: 'json' };
89
import { AbortOperation } from '../../../utils/AbortOperation.js';
910
import { DataStream } from '../../../utils/DataStream.js';
1011
import { PowerSyncCredentials } from '../../connection/PowerSyncCredentials.js';
1112
import { StreamingSyncLine, StreamingSyncRequest } from './streaming-sync-types.js';
1213

13-
import { version as POWERSYNC_JS_VERSION } from '../../../../package.json';
14-
1514
export type BSONImplementation = typeof BSON;
1615

17-
const POWERSYNC_TRAILING_SLASH_MATCH = /\/+$/;
1816
export type RemoteConnector = {
1917
fetchCredentials: () => Promise<PowerSyncCredentials | null>;
2018
};
2119

20+
const POWERSYNC_TRAILING_SLASH_MATCH = /\/+$/;
21+
const POWERSYNC_JS_VERSION = PACKAGE.version;
22+
2223
// Refresh at least 30 sec before it expires
2324
const REFRESH_CREDENTIALS_SAFETY_PERIOD_MS = 30_000;
2425
const SYNC_QUEUE_REQUEST_N = 10;
@@ -133,6 +134,8 @@ export abstract class AbstractRemote {
133134

134135
const userAgent = this.getUserAgent();
135136

137+
console.log('user agent is', userAgent);
138+
136139
return {
137140
url: credentials.endpoint + path,
138141
headers: {

packages/common/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"outDir": "./lib",
99
"lib": ["esnext"],
1010
"declaration": true,
11-
"module": "node16",
12-
"moduleResolution": "node16",
11+
"module": "NodeNext",
12+
"moduleResolution": "nodenext",
1313
"preserveConstEnums": true,
1414
"esModuleInterop": false,
1515
"skipLibCheck": false,

0 commit comments

Comments
 (0)