feat: clear rollup
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user