gen-jhipster
Version:
Spring Boot + Angular/React/Vue in one handy generator
34 lines (33 loc) • 915 B
JavaScript
const command = {
options: {
enableGrpc: {
description: 'Enable gRPC?',
type: Boolean,
scope: 'storage',
},
},
configs: {
grpcPort: {
cli: {
type: String,
},
prompt: (gen) => ({
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;