feat: clear rollup

This commit is contained in:
2025-04-24 12:42:02 +08:00
parent c2e8818975
commit 6827945446
13 changed files with 285 additions and 361 deletions

View File

@@ -8,6 +8,7 @@ import { queryApp } from '../../../query/app-manager/query-app.ts';
import { checkAppDir, installApp, uninstallApp } from '@/module/download/install.ts';
import { fileIsExist } from '@/uitls/file.ts';
import fs from 'fs';
import { getConfig } from '@/module/get-config.ts';
export const appCommand = new Command('app').description('app 命令').action(() => {
console.log('app');
});
@@ -27,7 +28,7 @@ program.addCommand(appCommand);
const downloadAppCommand = new Command('download')
.description('下载 app serve client的包. \napp download -i root/code-center')
.option('-i, --id <id>', '下载 app serve client的包, id 或者user/key')
.option('-o, --output <output>', '下载 app serve client的包, 输出路径')
.option('-o, --output <output>', '下载 app serve client的包, 输出路径, 默认是当前目录')
.option('-t, --type <type>', '下载 app serve client的包, 类型, app或者web 默认为web')
.option('-r, --registry <registry>', '下载 app serve client的包, 使用私有源')
.action(async (options) => {
@@ -58,6 +59,9 @@ const downloadAppCommand = new Command('download')
let registry = 'https://kevisual.cn';
if (options?.registry) {
registry = new URL(options.registry).origin;
} else {
const config = getConfig();
registry = new URL(config.baseURL).origin;
}
if (res.code === 200) {
const app = res.data;