src/common/config/index.js
/**
   * Properly combines all sources of data into a single, manageable set of all config data
   */
Properly combines all sources of data into a single, manageable set of all config data
Properly combines all sources of data into a single manageable set of all config data
regenerateCombinedConfigData() {
    this.combinedData = Object.assign({}, this.defaultConfigData, this.localConfigData, this.buildConfigData, this.registryConfigData);
    delete this.combinedData.defaultTeam;
    delete this.combinedData.defaultTeams;
    const combinedTeams = [];
    if (this.buildConfigData.defaultTeams && this.buildConfigData.defaultTeams.length) {
      combinedTeams.push(...this.buildConfigData.defaultTeams);
    }
    if (this.registryConfigData.teams && this.registryConfigData.teams.length) {
      combinedTeams.push(...this.registryConfigData.teams);
    }
    if (this.enableServerManagement) {
      combinedTeams.push(...this.localConfigData.teams);
    }
    this.combinedData.teams = combinedTeams;
    this.combinedData.localTeams = this.localConfigData.teams;
    this.combinedData.buildTeams = this.buildConfigData.defaultTeams;
    this.combinedData.registryTeams = this.registryConfigData.teams;
  }
regenerateCombinedConfigData ( ) { this . combinedData = Object . assign ( { } , this . defaultConfigData , this . localConfigData , this . buildConfigData , this . registryConfigData ) ; delete this . combinedData . defaultTeam ; delete this . combinedData . defaultTeams ; const combinedTeams = [ ] ; if ( this . buildConfigData . defaultTeams && this . buildConfigData . defaultTeams . length ) { combinedTeams . push ( ... this . buildConfigData . defaultTeams ) ; } if ( this . registryConfigData . teams && this . registryConfigData . teams . length ) { combinedTeams . push ( ... this . registryConfigData . teams ) ; } if ( this . enableServerManagement ) { combinedTeams . push ( ... this . localConfigData . teams ) ; } this . combinedData . teams = combinedTeams ; this . combinedData . localTeams = this . localConfigData . teams ; this . combinedData . buildTeams = this . buildConfigData . defaultTeams ; this . combinedData . registryTeams = this . registryConfigData . teams ; }
Properly combines all sources of data into a single, manageable set of all config data
Properly combines all sources of data into a single manageable set of all config data
// combine all config data in the correct order // remove unecessary data pulled from default and build config // IMPORTANT: properly combine teams from all sources // - start by adding default teams from buildConfig, if any // - add registry defined teams, if any // - add locally defined teams only if server management is enabled