all files / lib/common/variables/ index.js

28.57% Statements 2/7
100% Branches 0/0
16.67% Functions 1/6
28.57% Lines 2/7
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64                1×                                                                                                           1×  
'use strict';
 
 
/**
 * Class that manages global CLI variables
 */
class Variables {
  constructor(sqz) {
    this.sqz = sqz;
  }
 
  /**
   * Returns current selected stage
   *
   * @Return {String} stage - stage value
   * @name this.sqz.variables.getStage
   */
  getStage() {
    return this.sqz.vars.stage;
  }
 
  /**
   * Returns current selected region
   *
   * @Return {String} region - region value
   * @name this.sqz.variables.getRegion
   */
  getRegion() {
    return this.sqz.vars.region;
  }
 
  /**
   * Returns project config variables
   *
   * @Return {Object} project - project data
   * @name this.sqz.variables.getProject
   */
  getProject() {
    return this.sqz.vars.project;
  }
 
  /**
   * Returns all available microservices in the current project
   *
   * @Return {Object} microservices - microservices data
   * @name this.sqz.variables.getMicroservices
   */
  getMicroservices() {
    return this.sqz.vars.microservices;
  }
 
  /**
   * Returns project's hooks
   *
   * @Return {Object} hooks - hooks data
   * @name this.sqz.variables.getHooks
   */
  getHooks() {
    return this.sqz.vars.hooks;
  }
}
 
module.exports = Variables;