@@ -5,20 +5,21 @@ import { type fetch } from 'cross-fetch';
55import Logger , { ILogger } from 'js-logger' ;
66import { RSocket , RSocketConnector , Requestable } from 'rsocket-core' ;
77import { WebsocketClientTransport } from 'rsocket-websocket-client' ;
8+ import PACKAGE from '../../../../package.json' with { type : 'json' } ;
89import { AbortOperation } from '../../../utils/AbortOperation.js' ;
910import { DataStream } from '../../../utils/DataStream.js' ;
1011import { PowerSyncCredentials } from '../../connection/PowerSyncCredentials.js' ;
1112import { StreamingSyncLine , StreamingSyncRequest } from './streaming-sync-types.js' ;
1213
13- import { version as POWERSYNC_JS_VERSION } from '../../../../package.json' ;
14-
1514export type BSONImplementation = typeof BSON ;
1615
17- const POWERSYNC_TRAILING_SLASH_MATCH = / \/ + $ / ;
1816export 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
2324const REFRESH_CREDENTIALS_SAFETY_PERIOD_MS = 30_000 ;
2425const 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 : {
0 commit comments