import chalk from 'chalk';
import { GENERATOR_JAVA, GENERATOR_LIQUIBASE, GENERATOR_SPRING_DATA_RELATIONAL } from '../generator-list.mjs';
import { APPLICATION_TYPE_GATEWAY, APPLICATION_TYPE_MICROSERVICE, APPLICATION_TYPE_MONOLITH } from '../../jdl/index.js';
const command = {
    options: {
        authenticationType: {
            name: 'auth',
            description: 'Provide authentication type for the application when skipping server side generation',
            type: String,
            scope: 'storage',
        },
        db: {
            description: 'Provide DB name for the application when skipping server side generation',
            type: String,
        },
        incrementalChangelog: {
            description: 'Creates incremental database changelogs',
            type: Boolean,
            scope: 'storage',
        },
        skipUserManagement: {
            description: 'Skip the user management module during app generation',
            type: Boolean,
            scope: 'storage',
        },
        recreateInitialChangelog: {
            description: 'Recreate the initial database changelog based on the current config',
            type: Boolean,
        },
        buildTool: {
            name: 'build',
            description: 'Provide build tool for the application when skipping server side generation',
            type: String,
            scope: 'storage',
        },
        cacheProvider: {
            description: 'Cache provider',
            type: String,
            scope: 'storage',
        },
        enableSwaggerCodegen: {
            description: 'API first development using OpenAPI-generator',
            type: Boolean,
            scope: 'storage',
        },
        enableHibernateCache: {
            description: 'Enable hibernate cache',
            type: Boolean,
            scope: 'storage',
        },
        messageBroker: {
            description: 'message broker',
            type: String,
            scope: 'storage',
        },
        reactive: {
            description: 'Generate a reactive backend',
            type: Boolean,
            scope: 'storage',
        },
        searchEngine: {
            description: 'Provide search engine for the application when skipping server side generation',
            type: String,
            scope: 'storage',
        },
        skipCheckLengthOfIdentifier: {
            description: 'Skip check the length of the identifier, only for recent Oracle databases that support 30+ characters metadata',
            type: Boolean,
            scope: 'storage',
        },
        skipDbChangelog: {
            description: 'Skip the generation of database migrations',
            type: Boolean,
        },
        skipFakeData: {
            description: 'Skip generation of fake data for development',
            type: Boolean,
            scope: 'storage',
        },
        websocket: {
            description: 'Provide websocket option for the application when skipping server side generation',
            type: String,
            scope: 'storage',
        },
        projectVersion: {
            description: 'project version to use, this option is not persisted',
            type: String,
            env: 'JHI_PROJECT_VERSION',
            scope: 'generator',
        },
        jhipsterDependenciesVersion: {
            description: 'jhipster-dependencies version to use, this option is not persisted',
            type: String,
            env: 'JHIPSTER_DEPENDENCIES_VERSION',
            scope: 'generator',
        },
        fakeKeytool: {
            description: 'Add a fake certificate store file for test purposes',
            type: Boolean,
            env: 'FAKE_KEYTOOL',
            scope: 'generator',
            hide: true,
        },
    },
    configs: {
        applicationType: {
            description: 'Application type to generate',
            cli: {
                type: String,
            },
            prompt: {
                type: 'list',
                message: `Which ${chalk.yellow('*type*')} of application would you like to create?`,
            },
            choices: [
                {
                    value: APPLICATION_TYPE_MONOLITH,
                    name: 'Monolithic application (recommended for simple projects)',
                },
                {
                    value: APPLICATION_TYPE_GATEWAY,
                    name: 'Gateway application',
                },
                {
                    value: APPLICATION_TYPE_MICROSERVICE,
                    name: 'Microservice application',
                },
            ],
        },
    },
    import: [GENERATOR_JAVA, GENERATOR_LIQUIBASE, GENERATOR_SPRING_DATA_RELATIONAL],
};
export default command;
