File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @powersync/service-core ' : patch
3
+ ---
4
+
5
+ Improved Postgres connection port restrictions. Connections are now supported on ports >= 1024.
Original file line number Diff line number Diff line change 13
13
"build" : " tsc -b" ,
14
14
"build:tests" : " tsc -b test/tsconfig.json" ,
15
15
"test" : " vitest --no-threads" ,
16
- "clean" : " rm -rf ./lib && tsc -b --clean"
16
+ "clean" : " rm -rf ./dist && tsc -b --clean"
17
17
},
18
18
"dependencies" : {
19
19
"@js-sdsl/ordered-set" : " ^4.4.2" ,
Original file line number Diff line number Diff line change 1
- import { PostgresConnection } from './PowerSyncConfig.js' ;
2
1
import * as urijs from 'uri-js' ;
2
+ import { PostgresConnection } from './PowerSyncConfig.js' ;
3
3
4
4
/**
5
5
* Validate and normalize connection options.
@@ -97,11 +97,10 @@ export function validatePort(port: string | number): number {
97
97
if ( typeof port == 'string' ) {
98
98
port = parseInt ( port ) ;
99
99
}
100
- if ( port >= 1024 && port <= 49151 ) {
101
- return port ;
102
- } else {
100
+ if ( port < 1024 ) {
103
101
throw new Error ( `Port ${ port } not supported` ) ;
104
102
}
103
+ return port ;
105
104
}
106
105
107
106
/**
You can’t perform that action at this time.
0 commit comments