async prompting()

in generators/ReliableStatefulService/index.js [24:50]


  async prompting() {
    // var done = this.async();
    var utility = require('../utility');
    var prompts = [{
      type: 'input'
      , name: 'serviceFQN'
      , message: 'Enter the name of Reliable Stateful Service : '
      , validate: function (input) {
        return input ? utility.validateFQN(input) : false;
      }
    }];
    
    await this.prompt(prompts).then(input => {
      this.serviceFQN = input.serviceFQN;
      var parts = this.serviceFQN.split('.')
      , name  = parts.pop();
      this.packageName = parts.join('.');
      this.dir = parts.join('/');
      this.reliableServiceName = utility.capitalizeFirstLetter(name.trim());
      this.serviceFQN = (!this.packageName ? "" : this.packageName + ".") + this.reliableServiceName;
      if (!this.packageName) {
        this.packageName = "statefulservice";
        this.serviceFQN = "statefulservice." + this.serviceFQN;
        this.dir = this.dir + "/statefulservice";
      }
    });
  }