update: 更新light-code部分的代码模块

This commit is contained in:
2025-11-11 03:42:21 +08:00
parent dbd59e2fd9
commit 5df5a943ed
16 changed files with 761 additions and 1035 deletions

View File

@@ -32,7 +32,6 @@ 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('-t, --type <type>', '下载 app serve client的包, 类型, app或者web 默认为web')
.option('-r, --registry <registry>', '下载 app serve client的包, 使用私有源')
.option('-f, --force ', '强制覆盖')
.option('-y, --yes ', '覆盖的时候不提示')
@@ -71,16 +70,9 @@ const downloadAppCommand = new Command('download')
console.log('registry', registry, data, options.type);
if (res.code === 200) {
const app = res.data;
let appType: 'app' | 'web' = 'web';
if (options.type === 'app') {
appType = 'app';
} else if (options.type === 'web') {
appType = 'web';
}
const result = await installApp(app, {
appDir: output,
kevisualUrl: registry,
appType: appType,
force: options.force,
yes: options.yes,
});
@@ -98,7 +90,6 @@ const uninstallAppCommand = new Command('uninstall')
.alias('remove')
.description('卸载 app serve client的包。 手动删除更简单。')
.option('-i, --id <id>', 'user/key')
.option('-t, --type <type>', 'app或者web 默认为web', 'web')
.option('-p, --path <path>', '删除的路径, 如果存在,则优先执行,不会去判断 id 和 type 。')
.action(async (options) => {
if (options.path) {