gen-jhipster
Version:
VHipster - Spring Boot + Angular/React/Vue in one handy generator
34 lines (33 loc) • 1.02 kB
JavaScript
const command = {
configs: {
enableGrpc: {
description: 'Enable gRPC?',
cli: { type: Boolean },
default: true,
scope: 'storage',
},
grpcPort: {
cli: {
type: String,
},
prompt: () => ({
when: () => false, // Asked in spring-boot askForVhipsterOpts for correct order
type: 'input',
message: 'gRPC port?',
default: '9090',
validate: (input) => {
if (/^\d+$/.test(input)) {
const port = parseInt(input, 10);
if (port > 0 && port < 65536)
return true;
}
return 'Please enter a valid port number between 1 and 65535';
},
}),
scope: 'storage',
description: 'The gRPC port',
},
},
import: [],
};
export default command;