first commit
This commit is contained in:
81
shell/config.js
Normal file
81
shell/config.js
Normal file
@@ -0,0 +1,81 @@
|
||||
const utils = require('./utils');
|
||||
|
||||
module.exports = {
|
||||
home: {
|
||||
type: 'select',
|
||||
name: 'value',
|
||||
message: '请单选你需要的服务:',
|
||||
hint: '- 空格选择、回车提交',
|
||||
warn: '不可选',
|
||||
choices: [
|
||||
{
|
||||
title: '--------基础模块-----------',
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
title: '1:服务注册&发现',
|
||||
description: '启动服务注册中心,启动后各服务将自动连接',
|
||||
value: 'app'
|
||||
},
|
||||
{
|
||||
title: '2:Api 网关',
|
||||
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'
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user