@@ -223,35 +223,23 @@ export class _StackAdminAppImplIncomplete<HasTokenStore extends boolean, Project
223223 // END_PLATFORM
224224 async updateConfig ( configOverride : EnvironmentConfigOverrideOverride ) {
225225 await app . _interface . updateConfigOverride ( "environment" , configOverride ) ;
226- await Promise . all ( [
227- app . _configOverridesCache . refresh ( [ ] ) ,
228- app . _adminProjectCache . refresh ( [ ] ) ,
229- ] ) ;
226+ await app . _refreshProjectConfig ( ) ;
230227 } ,
231228 async pushConfig ( config : EnvironmentConfigOverrideOverride , options : PushConfigOptions ) {
232229 await app . _interface . setConfigOverride ( "branch" , config , pushedConfigSourceToApi ( options . source ) ) ;
233- await Promise . all ( [
234- app . _configOverridesCache . refresh ( [ ] ) ,
235- app . _adminProjectCache . refresh ( [ ] ) ,
236- ] ) ;
230+ await app . _refreshProjectConfig ( ) ;
237231 } ,
238232 async updatePushedConfig ( config : EnvironmentConfigOverrideOverride ) {
239233 await app . _interface . updateConfigOverride ( "branch" , config ) ;
240- await Promise . all ( [
241- app . _configOverridesCache . refresh ( [ ] ) ,
242- app . _adminProjectCache . refresh ( [ ] ) ,
243- ] ) ;
234+ await app . _refreshProjectConfig ( ) ;
244235 } ,
245236 async getPushedConfigSource ( ) : Promise < PushedConfigSource > {
246237 const apiSource = await app . _interface . getPushedConfigSource ( ) ;
247238 return apiToPushedConfigSource ( apiSource ) ;
248239 } ,
249240 async unlinkPushedConfigSource ( ) : Promise < void > {
250241 await app . _interface . unlinkPushedConfigSource ( ) ;
251- await Promise . all ( [
252- app . _configOverridesCache . refresh ( [ ] ) ,
253- app . _adminProjectCache . refresh ( [ ] ) ,
254- ] ) ;
242+ await app . _refreshProjectConfig ( ) ;
255243 } ,
256244 async update ( update : AdminProjectUpdateOptions ) {
257245 const updateOptions = adminProjectUpdateOptionsToCrud ( update ) ;
@@ -498,6 +486,13 @@ export class _StackAdminAppImplIncomplete<HasTokenStore extends boolean, Project
498486 ] ) ;
499487 }
500488
489+ protected async _refreshProjectConfig ( ) {
490+ await Promise . all ( [
491+ this . _configOverridesCache . refresh ( [ ] ) ,
492+ this . _adminProjectCache . refresh ( [ ] ) ,
493+ ] ) ;
494+ }
495+
501496 protected async _refreshInternalApiKeys ( ) {
502497 await this . _internalApiKeysCache . refresh ( [ ] ) ;
503498 }
0 commit comments