@@ -20,6 +20,7 @@ const DEFAULT_API_VERSION = 1;
2020import * as Atelier from "./atelier" ;
2121
2222export interface ConnectionSettings {
23+ serverName : string ;
2324 active : boolean ;
2425 apiVersion : number ;
2526 https : boolean ;
@@ -47,7 +48,7 @@ export class AtelierAPI {
4748 }
4849
4950 public get config ( ) : ConnectionSettings {
50- const { active = false , https = false , pathPrefix = "" , username } = this . _config ;
51+ const { serverName , active = false , https = false , pathPrefix = "" , username } = this . _config ;
5152 const ns = this . namespace || this . _config . ns ;
5253 const host = this . externalServer
5354 ? this . _config . host
@@ -58,6 +59,7 @@ export class AtelierAPI {
5859 const password = workspaceState . get ( this . configName + ":password" , this . _config . password ) ;
5960 const apiVersion = workspaceState . get ( this . configName + ":apiVersion" , DEFAULT_API_VERSION ) ;
6061 return {
62+ serverName,
6163 active,
6264 apiVersion,
6365 https,
@@ -164,13 +166,14 @@ export class AtelierAPI {
164166 serverName = "" ;
165167 }
166168
167- if ( serverName && serverName . length ) {
169+ if ( serverName !== "" ) {
168170 const {
169171 webServer : { scheme, host, port, pathPrefix = "" } ,
170172 username,
171173 password,
172174 } = getResolvedConnectionSpec ( serverName , config ( "intersystems.servers" , workspaceFolderName ) . get ( serverName ) ) ;
173175 this . _config = {
176+ serverName,
174177 active : this . externalServer || conn . active ,
175178 apiVersion : workspaceState . get ( this . configName + ":apiVersion" , DEFAULT_API_VERSION ) ,
176179 https : scheme === "https" ,
@@ -190,6 +193,7 @@ export class AtelierAPI {
190193 }
191194 } else {
192195 this . _config = conn ;
196+ this . _config . serverName = serverName ;
193197 }
194198 }
195199
0 commit comments