Files
microservices/shell/config.js
2024-09-27 01:14:21 +08:00

81 lines
2.0 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const utils = require('./utils');
module.exports = {
home: {
type: 'select',
name: 'value',
message: '请单选你需要的服务:',
hint: '- 空格选择、回车提交',
warn: '不可选',
choices: [
{
title: '--------基础模块-----------',
disabled: true
},
{
title: '1服务注册&发现',
description: '启动服务注册中心,启动后各服务将自动连接',
value: 'app'
},
{
title: '2Api 网关',
description: '各微服务模块将通过Api网关统一处理客户端请求',
value: 'gateway'
},
{
title: '--------业务模块-----------',
disabled: true
},
...utils.getDirList("../services").map((v,i) => {
return {
title: `${i+1}${v} 微服务模块`,
description: `${v} 相关的业务模块`,
value: v
}
}),
{
title: '--------批量操作-----------',
disabled: true
},
{
title: '1全部 启/停',
description: '启动 或 停止 所有项目',
value: "operate_all"
},
{
title: '2单个 启/停',
description: '启动 或 停止 单个项目',
value: "operate_single"
},
{
title: '3终止端口',
description: '结束指定的端口',
value: "operate_kill"
},
]
},
actionList: {
type: 'select',
name: 'value',
message: '请单选你需要的操作',
hint: '- 空格选择、回车提交',
warn: '不可选',
choices: [
{
title: '1安装依赖',
description: '执行 npm i 初始化依赖',
value: 'install'
},
{
title: '2删除依赖',
description: '输入或粘贴需要 删除 的依赖包名称',
value: 'uninstall'
},
{
title: '3更新依赖',
description: '输入或粘贴需要 更新 的依赖包名称',
value: 'update'
},
]
}
}