File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @icepanel/sdk" ,
3- "version" : " 0.0.39 " ,
3+ "version" : " 0.0.40 " ,
44 "private" : false ,
55 "repository" : {
66 "type" : " git" ,
Original file line number Diff line number Diff line change @@ -22,13 +22,19 @@ export class IcePanelClient extends Client {
2222 updatedOptions . baseUrl = async ( ) => {
2323 const baseUrl = options . baseUrl ? await core . Supplier . get ( options . baseUrl ) : undefined
2424 if ( baseUrl ) {
25- return `https://${ baseUrl } /${ options . apiVersion } `
25+ const url = new URL ( baseUrl )
26+ url . pathname = `/${ options . apiVersion } `
27+ return url . toString ( )
2628 }
2729 const environment = options . environment ? await core . Supplier . get ( options . environment ) : undefined
2830 if ( environment ) {
29- return `https://api.${ environment } .icepanel.cloud/${ options . apiVersion } `
31+ const url = new URL ( `https://api.${ environment } .icepanel.cloud` )
32+ url . pathname = `/${ options . apiVersion } `
33+ return url . toString ( )
3034 }
31- return `https://api.icepanel.io/${ options . apiVersion } `
35+ const url = new URL ( `https://api.icepanel.io` )
36+ url . pathname = `/${ options . apiVersion } `
37+ return url . toString ( )
3238 }
3339
3440 if ( options . apiKey ) {
You can’t perform that action at this time.
0 commit comments