@@ -138,7 +138,11 @@ export class CipConnectionService implements vscode.Disposable {
138138 * settings. On a hard refresh (`ignoreLegacy: true`) we skip the legacy key
139139 * entirely, making dw.json the sole source of truth.
140140 */
141- private deriveFromConfig ( opts : { ignoreLegacy ?: boolean } = { } ) : { groups : CipRealmGroup [ ] ; realms : CipRealm [ ] ; active : CipConnection } {
141+ private deriveFromConfig ( opts : { ignoreLegacy ?: boolean } = { } ) : {
142+ groups : CipRealmGroup [ ] ;
143+ realms : CipRealm [ ] ;
144+ active : CipConnection ;
145+ } {
142146 const legacy = opts . ignoreLegacy ? undefined : this . workspaceState . get < Partial < CipRealm > > ( LEGACY_KEY ) ;
143147 const config = this . configProvider . getConfig ( ) ;
144148 const cfgTenant = ( config ?. values . tenantId ?? '' ) . toString ( ) ;
@@ -430,7 +434,14 @@ function resolveHost(realm: Pick<CipRealm, 'env' | 'host'>): string {
430434}
431435
432436function realmFrom ( conn : CipConnection ) : CipRealm {
433- return { id : conn . id , groupId : conn . groupId , label : conn . label , tenantId : conn . tenantId , env : conn . env , host : conn . host } ;
437+ return {
438+ id : conn . id ,
439+ groupId : conn . groupId ,
440+ label : conn . label ,
441+ tenantId : conn . tenantId ,
442+ env : conn . env ,
443+ host : conn . host ,
444+ } ;
434445}
435446
436447function generateId ( ) : string {
@@ -441,11 +452,17 @@ function generateId(): string {
441452 * e.g. "bjmp_prd" → "bjmp", "acme_sbx001" → "acme", "myorg" → "myorg"
442453 */
443454function labelFromTenantId ( tenantId : string ) : string {
444- return (
445- tenantId . replace ( / _ (?: p r d | p r o d | p r | s b x | s a n d b o x | s b | s t g | s t a g i n g | s t | d e v | d v | u a t | q a ) \w * $ / i, '' ) || tenantId
446- ) ;
455+ return tenantId . replace ( / _ (?: p r d | p r o d | p r | s b x | s a n d b o x | s b | s t g | s t a g i n g | s t | d e v | d v | u a t | q a ) \w * $ / i, '' ) || tenantId ;
447456}
448457
449458function makeBlankConnection ( ) : CipConnection {
450- return { id : generateId ( ) , groupId : '' , label : '' , tenantId : '' , env : 'prod' , host : DEFAULT_CIP_HOST , status : 'disconnected' } ;
459+ return {
460+ id : generateId ( ) ,
461+ groupId : '' ,
462+ label : '' ,
463+ tenantId : '' ,
464+ env : 'prod' ,
465+ host : DEFAULT_CIP_HOST ,
466+ status : 'disconnected' ,
467+ } ;
451468}
0 commit comments