text: const chalk = require('chalk');
  
  const ServerGenerator = require('generator-jhipster/generators/server');
  
  const entandoBlueprintPromptingPhase = require('./phases/prompting');
  const entandoBlueprintWritingPhase = require('./phases/writing');
  
  module.exports = class extends ServerGenerator {
    constructor(args, opts) {
      super(args, { fromBlueprint: true, ...opts }); // fromBlueprint variable is important
  
      this.jhipsterContext = this.options.jhipsterContext;
      const jhContext = this.jhipsterContext;
  
      if (!jhContext) {
        this.error(
          `This is a JHipster blueprint and should be used only like ${chalk.yellow(
            'jhipster --blueprints entando',
          )}`,
        );
      }
  
      this.configOptions = jhContext.configOptions || {};
      // This sets up options for this sub generator and is being reused from JHipster
      jhContext.setupServerOptions(this, jhContext);
    }
  
    get initializing() {
      // initializing - Your initialization methods (checking current project state, getting configs, etc)
  
      return super._initializing();
    }
  
    get configuring() {
      // configuring - Saving configurations and configure the project (creating .editorconfig files and other metadata files)
  
      return super._configuring();
    }
  
    get prompting() {
      // prompting - Where you prompt users for options (where you’d call this.prompt())
      const jhipsterPromptingPhase = super._prompting();
  
      return { ...jhipsterPromptingPhase, ...entandoBlueprintPromptingPhase };
    }
  
    get default() {
      // Here we are not overriding this phase and hence its being handled by JHipster
      return super._default();
    }
  
    get writing() {
      // writing - Where you write the generator specific files (routes, controllers, etc)
      const jhipsterWritingPhase = super._writing();
  
      return { ...jhipsterWritingPhase, ...entandoBlueprintWritingPhase };
    }
  
    get end() {
      // Here we are not overriding this phase and hence its being handled by JHipster
      return super._end();
    }
  };
  