@@ -20,6 +20,7 @@ const DEFAULT_API_VERSION = 1;
20
20
import * as Atelier from "./atelier" ;
21
21
22
22
export interface ConnectionSettings {
23
+ serverName : string ;
23
24
active : boolean ;
24
25
apiVersion : number ;
25
26
https : boolean ;
@@ -47,7 +48,7 @@ export class AtelierAPI {
47
48
}
48
49
49
50
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 ;
51
52
const ns = this . namespace || this . _config . ns ;
52
53
const host = this . externalServer
53
54
? this . _config . host
@@ -58,6 +59,7 @@ export class AtelierAPI {
58
59
const password = workspaceState . get ( this . configName + ":password" , this . _config . password ) ;
59
60
const apiVersion = workspaceState . get ( this . configName + ":apiVersion" , DEFAULT_API_VERSION ) ;
60
61
return {
62
+ serverName,
61
63
active,
62
64
apiVersion,
63
65
https,
@@ -164,13 +166,14 @@ export class AtelierAPI {
164
166
serverName = "" ;
165
167
}
166
168
167
- if ( serverName && serverName . length ) {
169
+ if ( serverName !== "" ) {
168
170
const {
169
171
webServer : { scheme, host, port, pathPrefix = "" } ,
170
172
username,
171
173
password,
172
174
} = getResolvedConnectionSpec ( serverName , config ( "intersystems.servers" , workspaceFolderName ) . get ( serverName ) ) ;
173
175
this . _config = {
176
+ serverName,
174
177
active : this . externalServer || conn . active ,
175
178
apiVersion : workspaceState . get ( this . configName + ":apiVersion" , DEFAULT_API_VERSION ) ,
176
179
https : scheme === "https" ,
@@ -190,6 +193,7 @@ export class AtelierAPI {
190
193
}
191
194
} else {
192
195
this . _config = conn ;
196
+ this . _config . serverName = serverName ;
193
197
}
194
198
}
195
199
0 commit comments