async prompting()

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


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