Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions generators/base-workspaces/internal/docker-prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const askForApplicationType = asPromptingTask(async function askForApplic
await this.prompt(
[
{
type: 'list',
type: 'select',
name: 'deploymentApplicationType',
message: 'Which *type* of application would you like to deploy?',
choices: [
Expand Down Expand Up @@ -168,7 +168,7 @@ export const askForMonitoring = asPromptingTask(async function askForMonitoring(
await this.prompt(
[
{
type: 'list',
type: 'select',
name: 'monitoring',
message: 'Do you want to setup monitoring for your applications ?',
choices: [
Expand Down Expand Up @@ -224,7 +224,7 @@ export const askForServiceDiscovery: any = asPromptingWorkspacesTask(async funct
await this.prompt(
[
{
type: 'list',
type: 'select',
name: 'serviceDiscoveryType',
message: 'Which Service Discovery registry and Configuration server would you like to use ?',
choices: [
Expand Down Expand Up @@ -294,7 +294,7 @@ export const askForServiceDiscoveryWorkspace = asPromptingWorkspacesTask(async f
await this.prompt(
[
{
type: 'list',
type: 'select',
name: 'serviceDiscoveryType',
message: 'Which Service Discovery registry and Configuration server would you like to use ?',
choices: [
Expand Down
2 changes: 1 addition & 1 deletion generators/client/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const command = {
type: String,
},
prompt: generator => ({
type: 'list',
type: 'select',
message: () =>
generator.jhipsterConfigWithDefaults.applicationType === APPLICATION_TYPE_MICROSERVICE
? `Which ${chalk.yellow('*framework*')} would you like to use as microfrontend?`
Expand Down
4 changes: 2 additions & 2 deletions generators/client/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const askForClientTheme = asPromptingTask(async function askForClientThem

await this.prompt(
{
type: 'list',
type: 'select',
name: 'clientTheme',
when: () => ['angular', 'react', 'vue'].includes(clientFramework!),
message: 'Would you like to use a Bootswatch theme (https://bootswatch.com/)?',
Expand Down Expand Up @@ -60,7 +60,7 @@ export const askForClientThemeVariant = asPromptingTask(async function askForCli
const config = this.jhipsterConfigWithDefaults;
await this.prompt(
{
type: 'list',
type: 'select',
name: 'clientThemeVariant',
when: () => !this.jhipsterConfig.skipClient,
message: 'Choose a Bootswatch variant navbar theme (https://bootswatch.com/)?',
Expand Down
2 changes: 1 addition & 1 deletion generators/common/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const command = {
type: String,
},
prompt: {
type: 'list',
type: 'select',
message: `Which ${chalk.yellow('*type*')} of application would you like to create?`,
},
choices: applicationTypesChoices,
Expand Down
18 changes: 9 additions & 9 deletions generators/entity/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const askForUpdate = asPromptingTask(async function askForUpdate(this: En
}
const answers = await this.prompt([
{
type: 'list',
type: 'select',
name: 'updateEntity',
message:
'Do you want to update the entity? This will replace the existing files for this entity, all your custom code will be overwritten',
Expand Down Expand Up @@ -262,7 +262,7 @@ export function askForFiltering(this: EntityGenerator) {
}
return this.prompt([
{
type: 'list',
type: 'select',
name: 'filtering',
message: 'Do you want to add filtering?',
choices: [
Expand Down Expand Up @@ -308,7 +308,7 @@ export function askForDTO(this: EntityGenerator) {
}
return this.prompt([
{
type: 'list',
type: 'select',
name: 'dto',
message: 'Do you want to use a Data Transfer Object (DTO)?',
choices: [
Expand Down Expand Up @@ -336,7 +336,7 @@ export function askForService(this: EntityGenerator) {
}
return this.prompt([
{
type: 'list',
type: 'select',
name: 'service',
message: 'Do you want to use separate service class for your business logic?',
choices: [
Expand Down Expand Up @@ -371,7 +371,7 @@ export function askForPagination(this: EntityGenerator) {
}
return this.prompt([
{
type: 'list',
type: 'select',
name: 'pagination',
message: 'Do you want pagination and sorting on your entity?',
choices: [
Expand Down Expand Up @@ -450,7 +450,7 @@ async function askForField(this: EntityGenerator) {
message: 'What is the name of your field?',
},
{
type: 'list',
type: 'select',
name: 'fieldType',
message: 'What is the type of your field?',
choices: () => [
Expand Down Expand Up @@ -544,7 +544,7 @@ async function askForField(this: EntityGenerator) {
},
{
when: response => response.fieldType === BYTES || response.fieldType === BYTE_BUFFER,
type: 'list',
type: 'select',
name: 'fieldTypeBlobContent',
message: 'What is the content of the Blob field?',
choices: answers => [
Expand Down Expand Up @@ -742,7 +742,7 @@ async function askForRelationship(this: EntityGenerator, ...args: any[]) {

const answers = await this.prompt([
{
type: 'list',
type: 'select',
name: 'otherEntityName',
message: 'What is the other entity?',
choices: () => [...this.getExistingEntityNames(), ...(application.generateBuiltInUserEntity ? ['User'] : [])],
Expand Down Expand Up @@ -772,7 +772,7 @@ async function askForRelationship(this: EntityGenerator, ...args: any[]) {
default: response => lowerFirst(response.otherEntityName),
},
{
type: 'list',
type: 'select',
name: 'relationshipType',
message: 'What is the type of the relationship?',
choices: response => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const command = {
},
prompt: gen => ({
when: !gen.all && !gen.sampleName,
type: 'list',
type: 'select',
message: 'which sample group do you want to lookup?',
choices: async () => getGithubSamplesGroups(gen.templatePath(gen.samplesFolder ?? '')),
default: DEFAULT_SAMPLES_GROUP,
Expand All @@ -57,7 +57,7 @@ const command = {
sampleName: {
prompt: gen => ({
when: !gen.all,
type: 'list',
type: 'select',
message: 'which sample do you want to generate?',
choices: async answers => {
const samples = await getGithubSamplesGroup(gen.templatePath(), answers.samplesGroup ?? gen.samplesGroup);
Expand Down
8 changes: 4 additions & 4 deletions generators/heroku/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export default class HerokuGenerator extends BaseApplicationGenerator<HerokuEnti

const answers = await this.prompt([
{
type: 'list',
type: 'select',
name: 'herokuRegion',
message: 'On which region do you want to deploy?',
choices: ['us', 'eu'],
Expand All @@ -169,7 +169,7 @@ export default class HerokuGenerator extends BaseApplicationGenerator<HerokuEnti
await this.prompt(
[
{
type: 'list',
type: 'select',
name: 'herokuDeployType',
message: 'Which type of deployment do you want?',
choices: [
Expand All @@ -187,7 +187,7 @@ export default class HerokuGenerator extends BaseApplicationGenerator<HerokuEnti
await this.prompt(
[
{
type: 'list',
type: 'select',
name: 'herokuJavaVersion',
message: 'Which Java version would you like to use to build and run your app?',
choices: JAVA_COMPATIBLE_VERSIONS.map(version => ({ value: version })),
Expand Down Expand Up @@ -282,7 +282,7 @@ export default class HerokuGenerator extends BaseApplicationGenerator<HerokuEnti
this.log.log('');
const props = await this.prompt([
{
type: 'list',
type: 'select',
name: 'herokuForceName',
message: `The Heroku application "${chalk.cyan(this.herokuAppName)}" already exists! Use it anyways?`,
choices: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const command = {
type: String,
},
prompt: {
type: 'list',
type: 'select',
message: 'Would you like to use Maven or Gradle for building the backend?',
},
choices: [
Expand Down
2 changes: 1 addition & 1 deletion generators/kubernetes-knative/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const askForGeneratorType = asPromptingTask(async function askForGenerato
await this.prompt(
[
{
type: 'list',
type: 'select',
name: 'generatorType',
message: 'Which *type* of generator would you like to base this on?',
choices: [
Expand Down
8 changes: 4 additions & 4 deletions generators/kubernetes/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const askForKubernetesServiceType = asPromptingTask(async function askFor
[
{
when: () => !this.jhipsterConfigWithDefaults.istio,
type: 'list',
type: 'select',
name: 'kubernetesServiceType',
message: 'Choose the Kubernetes service type for your edge services',
choices: [
Expand Down Expand Up @@ -88,7 +88,7 @@ export const askForIngressType = asPromptingTask(async function askForIngressTyp
[
{
when: () => this.jhipsterConfigWithDefaults.kubernetesServiceType === INGRESS,
type: 'list',
type: 'select',
name: 'ingressType',
message: 'Choose the Kubernetes Ingress type',
choices: [
Expand Down Expand Up @@ -180,7 +180,7 @@ export const askForIstioSupport = asPromptingTask(async function askForIstioSupp
await this.prompt(
[
{
type: 'list',
type: 'select',
name: 'istio',
message: 'Do you want to enable Istio?',
choices: [
Expand Down Expand Up @@ -210,7 +210,7 @@ export const askForPersistentStorage = asPromptingWorkspacesTask(async function
[
{
when: () => usingDataBase,
type: 'list',
type: 'select',
name: 'kubernetesUseDynamicStorage',
message: 'Do you want to use dynamic storage provisioning for your stateful services?',
choices: [
Expand Down
2 changes: 1 addition & 1 deletion generators/languages/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const askI18n = asPromptingTask<LanguagesGenerator>(async function askI18
default: true,
},
{
type: 'list',
type: 'select',
name: 'nativeLanguage',
message: 'Please choose the native language of the application',
choices: () => languagesAsChoices([...this.supportedLanguages.values()]),
Expand Down
4 changes: 2 additions & 2 deletions generators/spring-boot/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const command = {
},
prompt: gen => ({
when: () => ['gateway', 'microservice'].includes(gen.jhipsterConfigWithDefaults.applicationType),
type: 'list',
type: 'select',
message: 'Which service discovery server do you want to use?',
default: 'consul',
}),
Expand Down Expand Up @@ -105,7 +105,7 @@ const command = {
type: String,
},
prompt: (gen, config) => ({
type: 'list',
type: 'select',
message: `Which ${chalk.yellow('*type*')} of authentication would you like to use?`,
choices: () =>
gen.jhipsterConfigWithDefaults.applicationType !== APPLICATION_TYPE_MONOLITH
Expand Down
8 changes: 4 additions & 4 deletions generators/spring-boot/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const askForServerSideOpts = asPromptingTask(async function (this: Spring
await this.prompt(
[
{
type: 'list',
type: 'select',
name: 'databaseType',
message: `Which ${chalk.yellow('*type*')} of database would you like to use?`,
choices: () => {
Expand Down Expand Up @@ -90,15 +90,15 @@ export const askForServerSideOpts = asPromptingTask(async function (this: Spring
},
{
when: response => response.databaseType === SQL,
type: 'list',
type: 'select',
name: 'prodDatabaseType',
message: `Which ${chalk.yellow('*production*')} database would you like to use?`,
choices: reactive ? R2DBC_DB_OPTIONS : SQL_DB_OPTIONS,
default: (this.jhipsterConfigWithDefaults as SpringDataRelationalConfig).prodDatabaseType,
},
{
when: response => response.databaseType === SQL,
type: 'list',
type: 'select',
name: 'devDatabaseType',
message: `Which ${chalk.yellow('*development*')} database would you like to use?`,
choices: response => {
Expand All @@ -117,7 +117,7 @@ export const askForServerSideOpts = asPromptingTask(async function (this: Spring
},
{
when: !reactive,
type: 'list',
type: 'select',
name: 'cacheProvider',
message: 'Which cache do you want to use? (Spring cache abstraction)',
choices: [
Expand Down
2 changes: 1 addition & 1 deletion lib/command/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ type CliSpecType = CliOptionSpec['type'] | typeof Object;
export type JHipsterChoices = readonly [...(string | JHipsterNamedChoice)[]];

export type PromptSpec = {
readonly type: 'input' | 'list' | 'confirm' | 'checkbox';
readonly type: 'input' | 'select' | 'confirm' | 'checkbox';
readonly message: string | ((arg: any) => string);
readonly when?: boolean | ((arg: any) => boolean);
readonly default?: any | ((arg: any) => any);
Expand Down
Loading