feat: 重构代理功能,添加文件代理支持并优化相关逻辑

This commit is contained in:
2026-01-18 13:41:47 +08:00
parent 5e5f4f6543
commit 43992d896f
11 changed files with 166 additions and 63 deletions

View File

@@ -69,6 +69,7 @@ program
.option('-n, --name <name>', '服务名称', 'assistant-server')
.option('-p, --port <port>', '服务端口')
.option('-s, --start', '是否启动服务')
.option('-r, --root <root>', '工作空间路径')
.option('-e, --interpreter <interpreter>', '指定使用的解释器', 'bun')
.action(async (options) => {
// console.log('当前执行路径:', execPath, inte);
@@ -99,7 +100,9 @@ program
if (port) {
pm2Command += ` -p ${port}`;
}
if (options.root) {
pm2Command += ` --root ${options.root}`;
}
console.log(chalk.gray('执行命令:'), pm2Command);
console.log(chalk.gray('脚本路径:'), runPath);