generators/fix-entity/prompts.js
function askForColumnsName() {
    // Don't ask columns name if there aren't any field
    // Or option --force
    if (this.fields === undefined || this.fields.length === 0 || this.force) {
        return;
    }

    this.log(chalk.green(`Asking column names for ${this.fields.length} field(s)`));
    const done = this.async();

    // work on a copy
    this.fieldsPile = this.fields.slice();
    // feed the first item for the first question
    this.field = this.fieldsPile.shift();
    askForColumnName.call(this, done);
}
function askForColumnsName() {
    // Don't ask columns name if there aren't any field
    // Or option --force
    if (this.fields === undefined || this.fields.length === 0 || this.force) {
        return;
    }

    this.log(chalk.green(`Asking column names for ${this.fields.length} field(s)`));
    const done = this.async();

    // work on a copy
    this.fieldsPile = this.fields.slice();
    // feed the first item for the first question
    this.field = this.fieldsPile.shift();
    askForColumnName.call(this, done);
}
function askForColumnsName ( ) { // Don't ask columns name if there aren't any field // Or option --force if ( this . fields === undefined || this . fields . length === 0 || this . force ) { return ; } this . log ( chalk . green ( ` ${ this . fields . length } ` ) ) ; const done = this . async ( ) ; // work on a copy this . fieldsPile = this . fields . slice ( ) ; // feed the first item for the first question this . field = this . fieldsPile . shift ( ) ; askForColumnName . call ( this , done ) ; }
For each field of an entity, ask the actual column name
For each field of an entity ask the actual column name